prompt,context,true_answer,predicted_answer,exact_match What is the name of the school with the Tornadoes Lady Tornadoes?,"CREATE TABLE table_name_41 (school VARCHAR, nickname_s_ VARCHAR);","SELECT school FROM table_name_41 WHERE nickname_s_ = ""tornadoes lady tornadoes"";","SELECT school FROM table_name_41 WHERE nickname_s_ = ""tornadoes lady tornadoes"";",1 What is the total number of hours spent on open pedagogy projects per student?,"CREATE TABLE students (student_id INT, student_name TEXT); CREATE TABLE open_pedagogy_projects (project_id INT, student_id INT, hours_spent_on_project INT); ","SELECT s.student_name, SUM(opp.hours_spent_on_project) as total_hours_spent_on_projects FROM open_pedagogy_projects opp JOIN students s ON opp.student_id = s.student_id GROUP BY opp.student_id;","SELECT students.student_name, SUM(open_pedagogy_projects.hours_spent_on_project) FROM students INNER JOIN open_pedagogy_projects ON students.student_id = open_pedagogy_projects.student_id GROUP BY students.student_name;",0 How many peacekeeping operations were conducted by African nations between 2017 and 2021?,"CREATE TABLE PeacekeepingOperations (nation VARCHAR(50), year INT, operation_count INT); ","SELECT SUM(operation_count) FROM PeacekeepingOperations WHERE nation IN ('Egypt', 'Nigeria', 'South Africa', 'Algeria', 'Morocco') AND year BETWEEN 2017 AND 2021;","SELECT country, SUM(operation_count) FROM PeacekeepingOperations WHERE year BETWEEN 2017 AND 2021 GROUP BY nation;",0 What is the average life expectancy for each gender?,"CREATE TABLE life_expectancy_gender (gender VARCHAR(50), expectancy FLOAT);","SELECT gender, AVG(expectancy) FROM life_expectancy_gender GROUP BY gender;","SELECT gender, AVG(attendance) FROM life_expectancy_gender GROUP BY gender;",0 Show the number of unique users who engaged with both 'music' and 'movies' content in France.,"CREATE TABLE user_interactions (user_id INT, content_type VARCHAR(255), country VARCHAR(255));",SELECT COUNT(DISTINCT user_id) FROM (SELECT user_id FROM user_interactions WHERE content_type = 'music' AND country = 'France' INTERSECT SELECT user_id FROM user_interactions WHERE content_type = 'movies' AND country = 'France');,"SELECT COUNT(DISTINCT user_id) FROM user_interactions WHERE content_type IN ('music','movies') AND country = 'France';",0 Update 'Infrastructure' table and set 'Status' to 'Completed' for records where 'Type' is 'Pipeline' and 'Country' is 'Canada',"CREATE TABLE Infrastructure (InfrastructureID INT, Type VARCHAR(20), Country VARCHAR(20), Status VARCHAR(20));",UPDATE Infrastructure SET Status = 'Completed' WHERE Type = 'Pipeline' AND Country = 'Canada';,UPDATE Infrastructure SET Status = 'Completed' WHERE Type = 'Pipeline' AND Country = 'Canada';,1 Which states have the highest and lowest healthcare access scores?,"CREATE TABLE healthcare_access (id INT, state VARCHAR(2), score INT); ","SELECT state, score FROM healthcare_access ORDER BY score DESC, state ASC LIMIT 1; SELECT state, score FROM healthcare_access ORDER BY score ASC, state ASC LIMIT 1;","SELECT state, score FROM healthcare_access ORDER BY score DESC LIMIT 1;",0 Delete all records from the 'ports' table where the region is 'North America'.,"CREATE TABLE ports (id INT PRIMARY KEY, name VARCHAR(50), region VARCHAR(20));",DELETE FROM ports WHERE region = 'North America';,DELETE FROM ports WHERE region = 'North America';,1 "What are the total construction costs for all building permits in the state of Florida for the year 2020, excluding residential permits?","CREATE TABLE building_permits (permit_type TEXT, state TEXT, cost INTEGER, year INTEGER);",SELECT SUM(cost) FROM building_permits WHERE state = 'Florida' AND year = 2020 AND permit_type != 'Residential';,SELECT SUM(cost) FROM building_permits WHERE state = 'Florida' AND year = 2020 AND permit_type!= 'Residential';,0 What is the safety rating of the most recently manufactured chemical?,"CREATE TABLE chemical_manufacturing (manufacturing_id INT, chemical_id INT, safety_rating INT, manufacture_date DATE); ",SELECT safety_rating FROM chemical_manufacturing WHERE manufacture_date = (SELECT MAX(manufacture_date) FROM chemical_manufacturing),"SELECT chemical_id, safety_rating FROM chemical_manufacturing ORDER BY manufacture_date DESC LIMIT 1;",0 Where did South Melbourne go to play a team at home?,"CREATE TABLE table_name_98 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_98 WHERE away_team = ""south melbourne"";","SELECT home_team FROM table_name_98 WHERE away_team = ""south melbourne"";",1 What were the scores of the Wimbledon final matches where Newcombe was the runner-up?,"CREATE TABLE table_23259077_1 (score_in_the_final VARCHAR, outcome VARCHAR, championship VARCHAR);","SELECT score_in_the_final FROM table_23259077_1 WHERE outcome = ""Runner-up"" AND championship = ""Wimbledon"";","SELECT score_in_the_final FROM table_23259077_1 WHERE outcome = ""Runner-up"" AND championship = ""Wimbledon"";",1 Which college has a linebacker from Lessburg High School?,"CREATE TABLE table_name_92 (college VARCHAR, position VARCHAR, school VARCHAR);","SELECT college FROM table_name_92 WHERE position = ""linebacker"" AND school = ""lessburg high school"";","SELECT college FROM table_name_92 WHERE position = ""linebacker"" AND school = ""lessburg high school"";",1 "What is the total number of military equipment in the 'aircraft' category, by country?","CREATE TABLE military_equipment (country VARCHAR(50), category VARCHAR(50), number INT); ","SELECT country, SUM(number) as total_aircraft FROM military_equipment WHERE category = 'Aircraft' GROUP BY country;","SELECT country, SUM(number) FROM military_equipment WHERE category = 'aircraft' GROUP BY country;",0 What is the score for the away team at Victoria Park?,"CREATE TABLE table_name_24 (away_team VARCHAR, venue VARCHAR);","SELECT away_team AS score FROM table_name_24 WHERE venue = ""victoria park"";","SELECT away_team AS score FROM table_name_24 WHERE venue = ""victoria park"";",1 which Label is in 15 december 1992?,"CREATE TABLE table_name_45 (label VARCHAR, date VARCHAR);","SELECT label FROM table_name_45 WHERE date = ""15 december 1992"";","SELECT label FROM table_name_45 WHERE date = ""15 december 1992"";",1 "What is the average Total, when the Nation is Sweden, and when the value for Bronze is less than 3?","CREATE TABLE table_name_52 (total INTEGER, nation VARCHAR, bronze VARCHAR);","SELECT AVG(total) FROM table_name_52 WHERE nation = ""sweden"" AND bronze < 3;","SELECT AVG(total) FROM table_name_52 WHERE nation = ""sweden"" AND bronze 3;",0 Update the region of a traditional art in the 'traditional_arts' table,"CREATE TABLE traditional_arts (id INT PRIMARY KEY, name VARCHAR(255), type VARCHAR(255), region VARCHAR(255));",UPDATE traditional_arts SET region = 'Central Asia' WHERE id = 1;,UPDATE traditional_arts SET region = 'North' WHERE type = 'traditional';,0 What is the percentage of successful space missions by country in 2019?,"CREATE TABLE Space_Missions (mission_date DATE, country VARCHAR(255), success BOOLEAN); ","SELECT country, (COUNT(success) FILTER (WHERE success = TRUE) * 100.0 / COUNT(*)) AS success_percentage FROM Space_Missions WHERE YEAR(mission_date) = 2019 GROUP BY country;","SELECT country, (SUM(Success) / (SELECT SUM(Success) FROM Space_Missions WHERE YEAR(mission_date) = 2019 GROUP BY country)) * 100.0 / (SELECT SUM(Success) FROM Space_Missions WHERE YEAR(mission_date) = 2019 GROUP BY country);",0 Update the productivity of the worker with id 1 to 15.2 if the worker is from the 'mining' department and the year is 2020.,"CREATE TABLE productivity(id INT, worker TEXT, department TEXT, year INT, productivity FLOAT);",UPDATE productivity SET productivity = 15.2 WHERE id = 1 AND department = 'mining' AND year = 2020;,UPDATE productivity SET productivity = 15.2 WHERE worker = 1 AND department ='mining' AND year = 2020;,0 "List all volunteers who have contributed more than 20 hours in total, along with their corresponding organization names and the causes they supported, for mission areas Art and Culture and Environment.","CREATE TABLE volunteers (id INT, name VARCHAR(100), organization_id INT, cause VARCHAR(50), hours DECIMAL(5, 2)); CREATE TABLE organizations (id INT, name VARCHAR(100), mission_area VARCHAR(50), state VARCHAR(50)); ","SELECT v.name, o.name as organization_name, v.cause, SUM(v.hours) as total_hours FROM volunteers v INNER JOIN organizations o ON v.organization_id = o.id WHERE o.mission_area IN ('Art and Culture', 'Environment') GROUP BY v.name, v.organization_id, v.cause HAVING SUM(v.hours) > 20;","SELECT volunteers.name, organizations.name, organizations.cause FROM volunteers INNER JOIN organizations ON volunteers.organization_id = organizations.id WHERE organizations.mission_area IN ('Art and Culture', 'Environment') AND volunteers.hours > 20;",0 What was the value in 1995 for A in 2000 at the Indian Wells tournament?,CREATE TABLE table_name_95 (tournament VARCHAR);,"SELECT 1995 FROM table_name_95 WHERE 2000 = ""a"" AND tournament = ""indian wells"";","SELECT 1995 FROM table_name_95 WHERE 2000 = ""a"";",0 What is the minimum age of visitors from underrepresented communities?,"CREATE TABLE VisitorDemographics (id INT, community_id INT, visitor_age INT);",SELECT MIN(visitor_age) FROM VisitorDemographics WHERE community_id IN (SELECT id FROM Communities WHERE is_underrepresented = TRUE);,SELECT MIN(visitor_age) FROM VisitorDemographics WHERE community_id IN (SELECT community_id FROM Communities WHERE subquery = 'Underrepresented');,0 What is the maximum lifespan of a communication satellite in geostationary orbit?,"CREATE TABLE communication_satellites (id INT PRIMARY KEY, name VARCHAR(255), manufacturer VARCHAR(255), type VARCHAR(255), launch_date DATE, lifespan INT);",SELECT MAX(lifespan) FROM communication_satellites WHERE orbit_type = 'Geostationary';,SELECT MAX(lifespan) FROM communication_satellites WHERE type = 'Geostationary';,0 The Proto-Germanic origin of /w/ is associated with what Roman entry?,"CREATE TABLE table_name_27 (roman VARCHAR, proto_germanic_origin VARCHAR);","SELECT roman FROM table_name_27 WHERE proto_germanic_origin = ""/w/"";","SELECT roman FROM table_name_27 WHERE proto_germanic_origin = ""/w/"";",1 How many community education programs were conducted in 2020 and 2021?,"CREATE TABLE Education_Programs (id INT, year INT, type VARCHAR(50));","SELECT COUNT(*) FROM Education_Programs WHERE year IN (2020, 2021);","SELECT COUNT(*) FROM Education_Programs WHERE year IN (2020, 2021) AND type = 'Community Education';",0 "For entries with fewer than 28 played, with 45 goals against and points 1 of 33, what is the average drawn?","CREATE TABLE table_name_45 (drawn INTEGER, played VARCHAR, points_1 VARCHAR, goals_against VARCHAR);","SELECT AVG(drawn) FROM table_name_45 WHERE points_1 = ""33"" AND goals_against = 45 AND played < 28;",SELECT AVG(drawn) FROM table_name_45 WHERE points_1 = 33 AND goals_against = 45 AND played 28;,0 What is the average conservation status score for all marine species affected by ocean acidification?,"CREATE TABLE marine_species (species_name TEXT, affected_by_ocean_acidification BOOLEAN, conservation_status_score FLOAT);",SELECT AVG(conservation_status_score) FROM marine_species WHERE affected_by_ocean_acidification = TRUE;,SELECT AVG(conservation_status_score) FROM marine_species WHERE affected_by_ocean_acidification = TRUE;,1 "What is the call sign of the translator with an ERP W greater than 38 and a city license from Great Falls, Montana?","CREATE TABLE table_name_60 (call_sign VARCHAR, erp_w VARCHAR, city_of_license VARCHAR);","SELECT call_sign FROM table_name_60 WHERE erp_w > 38 AND city_of_license = ""great falls, montana"";","SELECT call_sign FROM table_name_60 WHERE erp_w > 38 AND city_of_license = ""great falls, montana"";",1 How many construction projects were completed each month in 2020 and 2021?,"CREATE TABLE project_timeline (id INT, project VARCHAR(50), start_date DATE, end_date DATE); ","SELECT YEAR(start_date) AS year, MONTH(start_date) AS month, COUNT(*) AS projects FROM project_timeline WHERE end_date IS NOT NULL GROUP BY year, month;","SELECT EXTRACT(MONTH FROM start_date) AS month, COUNT(*) FROM project_timeline WHERE EXTRACT(YEAR FROM end_date) IN (2020, 2021) GROUP BY month;",0 "What Tournament had a Score of 4–6, 6–7, 3–6?","CREATE TABLE table_name_95 (tournament VARCHAR, score VARCHAR);","SELECT tournament FROM table_name_95 WHERE score = ""4–6, 6–7, 3–6"";","SELECT tournament FROM table_name_95 WHERE score = ""4–6, 6–7, 3–6"";",1 "When was the last time, since December 14, 1986, that the attendance was lower than 47,096?","CREATE TABLE table_name_51 (week INTEGER, date VARCHAR, attendance VARCHAR);","SELECT MAX(week) FROM table_name_51 WHERE date = ""december 14, 1986"" AND attendance < 47 OFFSET 096;","SELECT MAX(week) FROM table_name_51 WHERE date = ""december 14, 1986"" AND attendance 47 OFFSET 096;",0 What is the average amount of food aid (in tons) received per person in the 'refugee_camps' table?,"CREATE TABLE refugee_camps (id INT, camp_name TEXT, location TEXT, population INT, food_aid_tons FLOAT);",SELECT AVG(food_aid_tons/population) FROM refugee_camps;,SELECT AVG(food_aid_tons) FROM refugee_camps;,0 What is the median income for each household type?,"CREATE TABLE Household_Types (name VARCHAR(50), median_income INT); ","SELECT name, MEDIAN(median_income) FROM Household_Types GROUP BY name;","SELECT name, median_income FROM Household_Types;",0 what episode is called jewboy,"CREATE TABLE table_name_20 (episodes VARCHAR, title VARCHAR);","SELECT episodes FROM table_name_20 WHERE title = ""jewboy"";","SELECT episodes FROM table_name_20 WHERE title = ""jewboy"";",1 List the number of male and female graduate students in the English department,"CREATE TABLE Department (id INT, name VARCHAR(255)); CREATE TABLE Student (id INT, department_id INT, gender VARCHAR(10)); ","SELECT s.gender, COUNT(*) as num_students FROM Student s JOIN Department d ON s.department_id = d.id WHERE d.name = 'English' GROUP BY s.gender;","SELECT COUNT(*) FROM Student JOIN Department ON Student.department_id = Department.id WHERE Department.name = 'English' AND gender IN ('Male', 'Female');",0 Update the purchase location of equipment with EquipmentID 2 to 'United States'.,"CREATE TABLE Equipment (EquipmentID INT, EquipmentName VARCHAR(50), PurchaseDate DATE, PurchaseLocation VARCHAR(50)); ",UPDATE Equipment SET PurchaseLocation = 'United States' WHERE EquipmentID = 2;,UPDATE Equipment SET PurchaseLocation = 'United States' WHERE EquipmentID = 2;,1 List all climate finance initiatives in Africa that were successful.,"CREATE TABLE climate_finance (region VARCHAR(255), initiative_status VARCHAR(255)); ",SELECT * FROM climate_finance WHERE region = 'Africa' AND initiative_status = 'successful';,SELECT initiative_status FROM climate_finance WHERE region = 'Africa' AND initiative_status = 'Successful';,0 Name the sum of long for avg more than 9.8 with rec less than 5 and yards less than 20,"CREATE TABLE table_name_25 (long INTEGER, yards VARCHAR, avg VARCHAR, rec VARCHAR);",SELECT SUM(long) FROM table_name_25 WHERE avg > 9.8 AND rec < 5 AND yards < 20;,SELECT SUM(long) FROM table_name_25 WHERE avg > 9.8 AND rec 5 AND yards 20;,0 Delete records from construction_projects table where city is 'GreenValley' and completion_date is before '2020-01-01',"CREATE TABLE construction_projects (id INT, city VARCHAR(20), completion_date DATE);",DELETE FROM construction_projects WHERE city = 'GreenValley' AND completion_date < '2020-01-01';,DELETE FROM construction_projects WHERE city = 'GreenValley' AND completion_date '2020-01-01';,0 What is the average number of days to remediate vulnerabilities in the technology sector?,"CREATE TABLE technology_sector (sector VARCHAR(255), vulnerability VARCHAR(255), remediation_days INT); ",SELECT AVG(remediation_days) FROM technology_sector WHERE sector = 'Technology';,SELECT AVG(remediation_days) FROM technology_sector WHERE sector = 'technology';,0 Which tournament did Patrick Rafter win?,"CREATE TABLE table_name_96 (tournament VARCHAR, winner VARCHAR);","SELECT tournament FROM table_name_96 WHERE winner = ""patrick rafter"";","SELECT tournament FROM table_name_96 WHERE winner = ""patrick rafter"";",1 Who was the home team in the game with a record of 2-4?,"CREATE TABLE table_name_50 (home VARCHAR, record VARCHAR);","SELECT home FROM table_name_50 WHERE record = ""2-4"";","SELECT home FROM table_name_50 WHERE record = ""2-4"";",1 What is the maximum safety rating in the 'workplace_safety' table for workplaces with a union membership size greater than 100 in the 'labor_rights' table?,"CREATE TABLE workplace_safety (safety_rating INT, workplace_id INT); CREATE TABLE labor_rights (workplace_id INT, union_membership_size INT);",SELECT MAX(workplace_safety.safety_rating) FROM workplace_safety INNER JOIN labor_rights ON workplace_safety.workplace_id = labor_rights.workplace_id WHERE labor_rights.union_membership_size > 100;,SELECT MAX(workplace_safety.safety_rating) FROM workplace_safety INNER JOIN labor_rights ON workplace_safety.workplace_id = labor_rights.workplace_id WHERE labor_rights.union_membership_size > 100;,1 How many solar power plants are there in the 'solar_plants' table?,"CREATE TABLE solar_plants (name TEXT, capacity INTEGER); ",SELECT COUNT(*) FROM solar_plants;,SELECT COUNT(*) FROM solar_plants;,1 How many races have less than 2 podiums and 19th position before 2009?,"CREATE TABLE table_name_56 (races INTEGER, season VARCHAR, podiums VARCHAR, position VARCHAR);","SELECT AVG(races) FROM table_name_56 WHERE podiums < 2 AND position = ""19th"" AND season < 2009;","SELECT SUM(races) FROM table_name_56 WHERE podiums 2 AND position = ""19th"" AND season 2009;",0 What is the total number of mental health parity violations for each community?,"CREATE TABLE mental_health_parity (violation_id INT, violation_date DATE, community_id INT); ","SELECT community_id, COUNT(violation_id) FROM mental_health_parity GROUP BY community_id;","SELECT community_id, COUNT(*) as total_violations FROM mental_health_parity GROUP BY community_id;",0 Determine the total cost of military equipment acquired in Q1 2022,"CREATE TABLE military_equipment_acquisition (equipment_id INT, cost FLOAT, acquisition_date DATE); ",SELECT SUM(cost) FROM military_equipment_acquisition WHERE acquisition_date >= '2022-01-01' AND acquisition_date < '2022-04-01';,SELECT SUM(cost) FROM military_equipment_acquisition WHERE acquisition_date BETWEEN '2022-01-01' AND '2022-03-31';,0 "In the game where the home team was St Kilda, what was the attendance?","CREATE TABLE table_name_52 (crowd VARCHAR, home_team VARCHAR);","SELECT crowd FROM table_name_52 WHERE home_team = ""st kilda"";","SELECT crowd FROM table_name_52 WHERE home_team = ""st kilda"";",1 "How many episodes originally aired on August 31, 1995?","CREATE TABLE table_11951237_2 (title VARCHAR, original_air_date VARCHAR);","SELECT COUNT(title) FROM table_11951237_2 WHERE original_air_date = ""August 31, 1995"";","SELECT COUNT(title) FROM table_11951237_2 WHERE original_air_date = ""August 31, 1995"";",1 What is the Date of the Athlete from Ferris High School?,"CREATE TABLE table_name_17 (date VARCHAR, school VARCHAR);","SELECT date FROM table_name_17 WHERE school = ""ferris high school"";","SELECT date FROM table_name_17 WHERE school = ""ferris high school"";",1 What is the total view count for all movies and TV shows produced in the US?,"CREATE TABLE movies (id INT, title VARCHAR(255), release_year INT, views INT, country VARCHAR(50)); CREATE TABLE tv_shows (id INT, title VARCHAR(255), release_year INT, views INT, country VARCHAR(50)); ",SELECT SUM(views) FROM movies WHERE country = 'USA' UNION SELECT SUM(views) FROM tv_shows WHERE country = 'USA';,SELECT SUM(views) FROM movies JOIN tv_shows ON movies.release_year = tv_shows.release_year WHERE country = 'USA';,0 What is the total weight of products shipped from 'China'?,"CREATE TABLE products (product_id INT, name TEXT, weight FLOAT, country TEXT); CREATE TABLE orders (order_id INT, product_id INT, shipped BOOLEAN); ",SELECT SUM(products.weight) FROM products INNER JOIN orders ON products.product_id = orders.product_id WHERE products.country = 'China' AND orders.shipped = true;,SELECT SUM(weight) FROM products JOIN orders ON products.product_id = orders.product_id WHERE products.country = 'China';,0 which players have a height of 2.07m? ,"CREATE TABLE table_23670057_5 (player VARCHAR, height__m_ VARCHAR);","SELECT player FROM table_23670057_5 WHERE height__m_ = ""2.07"";","SELECT player FROM table_23670057_5 WHERE height__m_ = ""2.07m"";",0 Find the total number of fans who engaged with each social media platform for a specific team?,"CREATE TABLE fans (fan_id INT, team_name VARCHAR(50), platform VARCHAR(50), followers INT); ","SELECT team_name, SUM(followers) as total_followers FROM fans GROUP BY team_name;","SELECT platform, SUM(followers) as total_followers FROM fans GROUP BY platform;",0 What percentage of voters voted for a third party in the county that had 802 third party voters?,"CREATE TABLE table_20278716_2 (others__percentage VARCHAR, others__number VARCHAR);",SELECT others__percentage FROM table_20278716_2 WHERE others__number = 802;,SELECT others__percentage FROM table_20278716_2 WHERE others__number = 802;,1 What country had a Finish of t8?,"CREATE TABLE table_name_59 (country VARCHAR, finish VARCHAR);","SELECT country FROM table_name_59 WHERE finish = ""t8"";","SELECT country FROM table_name_59 WHERE finish = ""t8"";",1 "List the names and total points scored by football players in the 'football_matches' table, sorted by total points in descending order.","CREATE TABLE football_teams (team_id INT, team_name VARCHAR(50));CREATE VIEW football_matches AS SELECT player_id, team_id, SUM(points) AS total_points FROM football_player_scores GROUP BY player_id, team_id;","SELECT football_teams.team_name, football_matches.total_points, basketball_players.name FROM football_teams INNER JOIN football_matches ON football_teams.team_id = football_matches.team_id INNER JOIN basketball_players ON basketball_players.player_id = football_matches.player_id ORDER BY football_matches.total_points DESC;","SELECT player_name, total_points FROM football_matches ORDER BY total_points DESC;",0 Which party is sydney sampson a member of?,"CREATE TABLE table_name_10 (party VARCHAR, member VARCHAR);","SELECT party FROM table_name_10 WHERE member = ""sydney sampson"";","SELECT party FROM table_name_10 WHERE member = ""sydney sampson"";",1 Which cybersecurity vulnerabilities were discovered in 'Software X' in the last 2 years?,"CREATE TABLE if not exists cybersecurity_vulnerabilities (software VARCHAR(50), year INT, vulnerability_name VARCHAR(50), description TEXT);","SELECT software, vulnerability_name, description FROM cybersecurity_vulnerabilities WHERE software = 'Software X' AND year >= 2020;",SELECT vulnerability_name FROM cybersecurity_vulnerabilities WHERE software = 'Software X' AND year BETWEEN 2019 AND 2021;,0 What is the total number of building permits issued in the city of Seattle in 2020?,"CREATE TABLE building_permits (permit_id INT, city VARCHAR(20), year INT, permits_issued INT); ",SELECT SUM(permits_issued) FROM building_permits WHERE city = 'Seattle' AND year = 2020;,SELECT SUM(permits_issued) FROM building_permits WHERE city = 'Seattle' AND year = 2020;,1 What is the average lifelong learning score for students in each city?,"CREATE TABLE student_lifelong_learning (student_id INT, city VARCHAR(20), learning_score INT); ","SELECT city, AVG(learning_score) as avg_score FROM student_lifelong_learning GROUP BY city;","SELECT city, AVG(learning_score) FROM student_lifelong_learning GROUP BY city;",0 What is the average transaction amount per customer in the 'Retail Banking' division?,"CREATE TABLE Customers (CustomerID INT, Division VARCHAR(20)); CREATE TABLE Transactions (TransactionID INT, CustomerID INT, Amount DECIMAL(10,2)); ",SELECT AVG(Amount) FROM Transactions INNER JOIN Customers ON Transactions.CustomerID = Customers.CustomerID WHERE Customers.Division = 'Retail Banking';,SELECT AVG(Transactions.Amount) FROM Transactions INNER JOIN Customers ON Transactions.CustomerID = Customers.CustomerID WHERE Customers.Dividence = 'Retail Banking';,0 What is the maximum number of games played by a single player?,"CREATE TABLE Players (PlayerID INT, Age INT, Gender VARCHAR(10), NumGamesPlayed INT); ",SELECT MAX(NumGamesPlayed) as MaxGames FROM Players;,SELECT MAX(NumGamesPlayed) FROM Players;,0 List all countries with deep-sea exploration programs and the year they started.,"CREATE TABLE countries (country_name TEXT, deep_sea_program TEXT, start_year INT); ","SELECT country_name, deep_sea_program, start_year FROM countries;","SELECT country_name, deep_sea_program, start_year FROM countries;",1 "What is the total number of Rank, when Date of Official Foundation of Municipality is after 1926, when Province is ""Sistan and Baluchestan"", and when 2006 is greater than 567449?","CREATE TABLE table_name_87 (rank VARCHAR, date_of_official_foundation_of_municipality VARCHAR, province VARCHAR);","SELECT COUNT(rank) FROM table_name_87 WHERE date_of_official_foundation_of_municipality > 1926 AND province = ""sistan and baluchestan"" AND 2006 > 567449;","SELECT COUNT(rank) FROM table_name_87 WHERE date_of_official_foundation_of_municipality > 1926 AND province = ""sistan and baluchestan"" AND 2006 > 567449;",1 What is the rank of energy efficiency for each region in the 'energy_efficiency' table?,"CREATE TABLE energy_efficiency (region VARCHAR(50), energy_efficiency NUMERIC(5,2)); ","SELECT region, RANK() OVER (ORDER BY energy_efficiency DESC) FROM energy_efficiency;","SELECT region, energy_efficiency, RANK() OVER (ORDER BY energy_efficiency DESC) as rank FROM energy_efficiency;",0 Who were the top 3 donors in terms of total donation amount to education programs in 2021?,"CREATE TABLE Donors (donor_id INT, donor_name VARCHAR(50), total_donation_amount DECIMAL(10,2), last_donation_date DATE); CREATE TABLE Donations (donation_id INT, donor_id INT, donation_amount DECIMAL(10,2), donation_date DATE, program_id INT);","SELECT donor_name, SUM(donation_amount) as total_donation_amount FROM Donors d JOIN Donations don ON d.donor_id = don.donor_id WHERE program_id IN (SELECT program_id FROM Programs WHERE category = 'education') AND YEAR(donation_date) = 2021 GROUP BY donor_name ORDER BY total_donation_amount DESC LIMIT 3;","SELECT Donors.donor_name, SUM(Donations.donation_amount) as total_donation FROM Donors INNER JOIN Donations ON Donors.donor_id = Donations.donor_id WHERE Donations.donation_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY Donors.donor_name ORDER BY total_donation DESC LIMIT 3;",0 What is the total cost of satellite missions organized by each country?,"CREATE TABLE satellite_missions (id INT, mission_name VARCHAR(255), country VARCHAR(255), cost FLOAT, duration FLOAT); ","SELECT country, SUM(cost) as total_cost FROM satellite_missions GROUP BY country;","SELECT country, SUM(cost) as total_cost FROM satellite_missions GROUP BY country;",1 What is the percentage of security incidents in the last 6 months that were caused by each type of threat?,"CREATE TABLE security_incidents (id INT, threat_type VARCHAR(255), timestamp TIMESTAMP);","SELECT threat_type, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM security_incidents WHERE timestamp >= NOW() - INTERVAL 6 MONTH)) AS percentage FROM security_incidents WHERE timestamp >= NOW() - INTERVAL 6 MONTH GROUP BY threat_type;","SELECT threat_type, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM security_incidents WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 6 MONTH)) as percentage FROM security_incidents WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 6 MONTH) GROUP BY threat_type;",0 How many extra points are there that Herrnstein had with less than 2 touchdowns and less than 0 field goals?,"CREATE TABLE table_name_35 (extra_points INTEGER, field_goals VARCHAR, touchdowns VARCHAR, player VARCHAR);","SELECT AVG(extra_points) FROM table_name_35 WHERE touchdowns < 2 AND player = ""herrnstein"" AND field_goals < 0;","SELECT SUM(extra_points) FROM table_name_35 WHERE touchdowns 2 AND player = ""hernstein"" AND field_goals 0;",0 What's the average production budget for Animation movies?,"CREATE TABLE movie (id INT, title VARCHAR(50), genre VARCHAR(20), budget DECIMAL(8,2)); ",SELECT AVG(budget) FROM movie WHERE genre = 'Animation';,SELECT AVG(budget) FROM movie WHERE genre = 'Animation';,1 What is listed for the RECNet that also has a Frequency of 91.1 FM?,"CREATE TABLE table_name_51 (recnet VARCHAR, frequency VARCHAR);","SELECT recnet FROM table_name_51 WHERE frequency = ""91.1 fm"";","SELECT recnet FROM table_name_51 WHERE frequency = ""91.1 fm"";",1 How many concerts have been held in total for each continent?,"CREATE TABLE concerts (concert_id INT, concert_name VARCHAR(100), artist_id INT, country VARCHAR(50), continent VARCHAR(50)); ","SELECT continent, COUNT(concert_id) AS total_concerts FROM concerts GROUP BY continent;","SELECT continent, COUNT(*) FROM concerts GROUP BY continent;",0 What is the total revenue of cruelty-free haircare products in Germany?,"CREATE TABLE CrueltyFreeProducts (product VARCHAR(255), country VARCHAR(255), revenue DECIMAL(10,2)); ",SELECT SUM(revenue) FROM CrueltyFreeProducts WHERE product LIKE 'Shampoo%' OR product LIKE 'Conditioner%' OR product LIKE 'Styling Gel%' AND country = 'Germany';,SELECT SUM(revenue) FROM CrueltyFreeProducts WHERE country = 'Germany';,0 What is the date successor seated where Massachusetts 2nd is the district?,"CREATE TABLE table_225093_4 (date_successor_seated VARCHAR, district VARCHAR);","SELECT date_successor_seated FROM table_225093_4 WHERE district = ""Massachusetts 2nd"";","SELECT date_successor_seated FROM table_225093_4 WHERE district = ""Massachusetts 2nd"";",1 What is the total climate finance investment in energy efficiency in North America?,"CREATE TABLE finance (region VARCHAR(255), sector VARCHAR(255), amount FLOAT); ",SELECT SUM(amount) FROM finance WHERE region = 'North America' AND sector = 'Energy Efficiency';,SELECT SUM(amount) FROM finance WHERE region = 'North America' AND sector = 'Energy Efficiency';,1 What game is the first with the Pittsburgh Penguins the opponent?,"CREATE TABLE table_name_49 (game INTEGER, opponent VARCHAR);","SELECT MIN(game) FROM table_name_49 WHERE opponent = ""pittsburgh penguins"";","SELECT MIN(game) FROM table_name_49 WHERE opponent = ""pittsburgh penguins"";",1 "What is the total number of green certified buildings, grouped by certification type and year, where the total number is greater than 100?","CREATE TABLE green_certified_buildings (building_id INT, certification_type VARCHAR(50), year INT);","SELECT certification_type, year, COUNT(building_id) FROM green_certified_buildings GROUP BY certification_type, year HAVING COUNT(building_id) > 100;","SELECT certification_type, year, COUNT(*) FROM green_certified_buildings GROUP BY certification_type, year HAVING COUNT(*) > 100;",0 "What is the difference in energy efficiency scores between the most efficient and least efficient cities in the 'asia-pacific' region, using a window function to find the difference?","CREATE TABLE Cities_AP (id INT, city VARCHAR(50), region VARCHAR(50), efficiency_score INT); ","SELECT city, region, efficiency_score, LAG(efficiency_score) OVER (PARTITION BY region ORDER BY efficiency_score DESC) as previous_efficiency_score, efficiency_score - LAG(efficiency_score) OVER (PARTITION BY region ORDER BY efficiency_score DESC) as difference FROM Cities_AP WHERE region = 'Asia-Pacific' ORDER BY region, difference DESC;","SELECT city, efficiency_score, RANK() OVER (ORDER BY efficiency_score DESC) as efficiency_difference FROM Cities_AP WHERE region = 'asia-pacific';",0 What is the top score for tsuneyuki nakajima?,"CREATE TABLE table_name_80 (score INTEGER, player VARCHAR);","SELECT MAX(score) FROM table_name_80 WHERE player = ""tsuneyuki nakajima"";","SELECT MAX(score) FROM table_name_80 WHERE player = ""tsuneyuki nakajima"";",1 How many Series A investments have been made in companies with at least one female founder?,"CREATE TABLE company (id INT, name TEXT, founder_gender TEXT); CREATE TABLE investment_rounds (id INT, company_id INT, round TEXT, funding_amount INT);",SELECT COUNT(*) FROM investment_rounds JOIN company ON investment_rounds.company_id = company.id WHERE round = 'Series A' AND founder_gender = 'Female';,SELECT COUNT(*) FROM investment_rounds ir JOIN company c ON ir.company_id = c.id WHERE c.founder_gender = 'Female' AND ir.round = 'Series A';,0 "Delete funding records older than 2021 for ""GreenTech Solutions""","CREATE TABLE funding (id INT PRIMARY KEY AUTO_INCREMENT, company_id INT, amount FLOAT, funding_date DATE);",DELETE FROM funding WHERE funding_date < '2021-01-01' AND company_id IN (SELECT id FROM company WHERE name = 'GreenTech Solutions');,DELETE FROM funding WHERE company_id = 1 AND funding_date '2021-01-01';,0 Name the 2006 when the 2010 is 27,CREATE TABLE table_name_26 (Id VARCHAR);,"SELECT 2006 FROM table_name_26 WHERE 2010 = ""27"";",SELECT 2006 FROM table_name_26 WHERE 2010 = 27;,0 What is the total quantity of item 'WidgetA' shipped from France to the USA?,"CREATE TABLE Warehouse (id INT, item VARCHAR(50), quantity INT, country VARCHAR(50)); ",SELECT SUM(quantity) FROM Warehouse WHERE item = 'WidgetA' AND country = 'France' AND EXISTS (SELECT 1 FROM Warehouse w2 WHERE w2.item = 'WidgetA' AND w2.country = 'USA');,SELECT SUM(quantity) FROM Warehouse WHERE item = 'WidgetA' AND country = 'France';,0 Count the number of companies founded by individuals from underrepresented racial and ethnic groups,"CREATE TABLE company_founding(id INT PRIMARY KEY, company_name VARCHAR(100), founder_race VARCHAR(50)); ","SELECT COUNT(*) FROM company_founding WHERE founder_race IN ('Black', 'Hispanic', 'Indigenous', 'Pacific Islander');","SELECT COUNT(*) FROM company_founding WHERE founder_race IN ('African American', 'Hispanic', 'Hispanic');",0 What is the minimum financial capability score for customers?,"CREATE TABLE customers (customer_id INT, name VARCHAR(50), financial_capability_score INT); ",SELECT MIN(financial_capability_score) FROM customers;,SELECT MIN(financial_capability_score) FROM customers;,1 Which countries have received the most humanitarian aid in the form of housing assistance in the last 5 years?,"CREATE TABLE housing_assistance (id INT, country VARCHAR(50), aid_type VARCHAR(50), amount FLOAT, date DATE); ","SELECT country, SUM(amount) as total_housing_aid FROM housing_assistance WHERE aid_type = 'housing' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR) GROUP BY country ORDER BY total_housing_aid DESC;","SELECT country, SUM(amount) as total_aid FROM housing_assistance WHERE aid_type = 'housing assistance' AND date >= DATEADD(year, -5, GETDATE()) GROUP BY country ORDER BY total_aid DESC;",0 What percentage of users were using other Mozilla browsers during the period in which 9.00% were using Chrome?,"CREATE TABLE table_name_58 (other_mozilla VARCHAR, chrome VARCHAR);","SELECT other_mozilla FROM table_name_58 WHERE chrome = ""9.00%"";","SELECT other_mozilla FROM table_name_58 WHERE chrome = ""9.00%"";",1 What was the total amount donated by each donor in Q4 2023?,"CREATE TABLE donors (donor_id INT, donor_name TEXT, donation_amount FLOAT); CREATE TABLE donations (donation_id INT, donor_id INT, donation_date DATE, donation_amount FLOAT); ","SELECT donor_name, SUM(donation_amount) as total_donation FROM donations d JOIN donors don ON d.donor_id = don.donor_id WHERE donation_date BETWEEN '2023-10-01' AND '2023-12-31' GROUP BY donor_name;","SELECT d.donor_name, SUM(d.donation_amount) as total_donation FROM donors d JOIN donations d ON d.donor_id = d.donor_id WHERE d.donation_date BETWEEN '2023-04-01' AND '2023-06-30' GROUP BY d.donor_name;",0 How many games were played by the player with 927 points?,"CREATE TABLE table_2208838_4 (played VARCHAR, points VARCHAR);",SELECT played FROM table_2208838_4 WHERE points = 927;,SELECT COUNT(played) FROM table_2208838_4 WHERE points = 927;,0 List all security incidents and their associated threat types from the 'incidents' and 'threats' tables,"CREATE TABLE incidents (incident_id INT PRIMARY KEY, incident_title VARCHAR(255), asset_id INT); CREATE TABLE threats (threat_id INT PRIMARY KEY, threat_type VARCHAR(255)); ","SELECT i.incident_title, t.threat_type FROM incidents i INNER JOIN threats t ON i.asset_id = t.threat_id;","SELECT incidents.incident_title, threats.threat_type FROM incidents INNER JOIN threats ON incidents.account_id = threats.account_id;",0 How many users from Australia in the art category have less than 500 followers?,"CREATE TABLE users (id INT, country VARCHAR(255), category VARCHAR(255), followers INT); ",SELECT COUNT(DISTINCT users.id) FROM users WHERE users.country = 'Australia' AND users.category = 'art' AND users.followers < 500;,SELECT COUNT(*) FROM users WHERE country = 'Australia' AND category = 'art' AND followers 500;,0 What years did Alvin Mitchell play?,"CREATE TABLE table_name_44 (years VARCHAR, player VARCHAR);","SELECT years FROM table_name_44 WHERE player = ""alvin mitchell"";","SELECT years FROM table_name_44 WHERE player = ""alvin mitchell"";",1 What is the total number of marine species in the Southern Ocean?,"CREATE TABLE Southern_Ocean (area_name text, species_name text, species_abundance numeric);",SELECT COUNT(DISTINCT species_name) FROM Southern_Ocean WHERE area_name = 'Southern Ocean';,SELECT SUM(species_abundance) FROM Southern_Ocean;,0 "Identify the top 5 materials with the highest average green rating, using a SQL query with a window function.","CREATE TABLE green_building_materials (material_id INT, material_name VARCHAR(50), green_rating FLOAT, manufacturer VARCHAR(50), production_date DATE);CREATE TABLE green_buildings_materials (building_id INT, material_id INT, quantity INT, install_date DATE);CREATE VIEW green_materials_summary AS SELECT green_buildings_materials.material_id, green_building_materials.material_name, green_building_materials.green_rating, AVG(green_buildings_materials.green_rating) OVER (PARTITION BY green_buildings_materials.material_id) AS avg_rating FROM green_buildings_materials JOIN green_building_materials ON green_buildings_materials.material_id = green_building_materials.material_id;","SELECT material_name, avg_rating FROM green_materials_summary ORDER BY avg_rating DESC FETCH NEXT 5 ROWS ONLY;","SELECT material_name, AVG(avg_rating) as avg_rating FROM green_materials_summary GROUP BY material_name ORDER BY avg_rating DESC LIMIT 5;",0 What is the total swimsuit number with gowns larger than 9.48 with interviews larger than 8.94 in florida?,"CREATE TABLE table_name_35 (swimsuit VARCHAR, interview VARCHAR, evening_gown VARCHAR, country VARCHAR);","SELECT COUNT(swimsuit) FROM table_name_35 WHERE evening_gown > 9.48 AND country = ""florida"" AND interview > 8.94;","SELECT COUNT(swimsuit) FROM table_name_35 WHERE evening_gown > 9.48 AND country = ""florida"" AND interview > 8.94;",1 Insert a new vegan brand in the database,"CREATE TABLE brands (brand_id INT, brand_name TEXT, cruelty_free BOOLEAN, vegan BOOLEAN, country TEXT);","INSERT INTO brands (brand_id, brand_name, cruelty_free, vegan, country) VALUES (4, 'Pacifica', TRUE, TRUE, 'USA');","INSERT INTO brands (brand_id, brand_name, cruelty_free, vegan, country) VALUES (1, 'Vegan', TRUE);",0 "What was the opponent on november 8, 1981?","CREATE TABLE table_name_6 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_6 WHERE date = ""november 8, 1981"";","SELECT opponent FROM table_name_6 WHERE date = ""november 8, 1981"";",1 "Which Indigenous communities received climate finance over 500,000 in 2020?","CREATE TABLE climate_finance_recipients (year INT, community VARCHAR(255), amount FLOAT); ",SELECT community FROM climate_finance_recipients WHERE year = 2020 AND amount > 500000;,SELECT community FROM climate_finance_recipients WHERE year = 2020 AND amount > 500000;,1 "What is the Network, when Title is ""Epik High's Love And Delusion""?","CREATE TABLE table_name_86 (network VARCHAR, title VARCHAR);","SELECT network FROM table_name_86 WHERE title = ""epik high's love and delusion"";","SELECT network FROM table_name_86 WHERE title = ""epik high's love and delusion"";",1 Who is the December playmate with a November playmate Marlene Janssen?,"CREATE TABLE table_name_72 (december VARCHAR, november VARCHAR);","SELECT december FROM table_name_72 WHERE november = ""marlene janssen"";","SELECT december FROM table_name_72 WHERE november = ""marlene janssen"";",1 Show the locations of schools that have more than 1 player.,"CREATE TABLE player (School_ID VARCHAR); CREATE TABLE school (Location VARCHAR, School_ID VARCHAR);",SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1;,SELECT T1.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T2.School_ID HAVING COUNT(*) > 1;,0 Identify the agricultural innovation metrics in Latin America with the lowest cost and at least two implementing organizations.,"CREATE TABLE InnovationMetrics (ID INT, Name VARCHAR(50), Cost INT, ImplementingOrg VARCHAR(50)); ","SELECT Name, Cost, ImplementingOrg FROM InnovationMetrics WHERE Cost = (SELECT MIN(Cost) FROM InnovationMetrics) AND (SELECT COUNT(*) FROM InnovationMetrics WHERE Cost = (SELECT MIN(Cost) FROM InnovationMetrics)) >= 2 AND Continent = 'Latin America';","SELECT Name, Cost FROM InnovationMetrics WHERE Cost = (SELECT MIN(Cost) FROM InnovationMetrics WHERE ImplementingOrg LIKE '%Latin%') ORDER BY Cost DESC LIMIT 2;",0 What is the average temperature in the greenhouses located in the 'urban' area?,"CREATE TABLE greenhouses (id INT, name VARCHAR(20), location VARCHAR(10), temperature DECIMAL(5,2));",SELECT AVG(temperature) FROM greenhouses WHERE location = 'urban';,SELECT AVG(temperature) FROM greenhouses WHERE location = 'urban';,1 Who are all of the telecom providers for which the upload rate is 1024 kbits and the resale category is yes?,"CREATE TABLE table_1773908_3 (provider VARCHAR, up__up_to_kbit_s_ VARCHAR, resale VARCHAR);","SELECT provider FROM table_1773908_3 WHERE up__up_to_kbit_s_ = 1024 AND resale = ""yes"";","SELECT provider FROM table_1773908_3 WHERE up__up_to_kbit_s_ = ""1024"" AND resale = ""yes"";",0 Insert a new 'oil_platform' record for 'Blue Star Inc.' off the coast of Nigeria,"CREATE TABLE oil_platform (id INT PRIMARY KEY, name TEXT, operator TEXT, location TEXT, depth FLOAT);","INSERT INTO oil_platform (name, operator, location, depth) VALUES ('Poseidon', 'Blue Star Inc.', 'Offshore Nigeria', 1200.5);","INSERT INTO oil_platform (id, name, operator, location, depth) VALUES (1, 'Blue Star Inc.', 'Nigeria', 'Nigeria', 1);",0 What is the minimum energy production of wind turbines installed in China after 2016?,"CREATE TABLE wind_turbines (id INT, installation_year INT, energy_production FLOAT, country VARCHAR(50)); ",SELECT MIN(energy_production) FROM wind_turbines WHERE installation_year > 2016 AND country = 'China';,SELECT MIN(energy_production) FROM wind_turbines WHERE country = 'China' AND installation_year > 2016;,0 What is the total oil production in the Gulf of Mexico in 2019?,"CREATE TABLE production_figures (well_id INT, year INT, oil_production INT, gas_production INT); ",SELECT SUM(oil_production) FROM production_figures WHERE year = 2019 AND region = 'Gulf of Mexico';,SELECT SUM(oil_production) FROM production_figures WHERE year = 2019 AND gas_production = (SELECT gas_production FROM production_figures WHERE year = 2019);,0 "How many points were there in a year earlier than 1977, a Cosworth V8 engine, and an entry from HB Bewaking alarm systems?","CREATE TABLE table_name_68 (points VARCHAR, entrant VARCHAR, year VARCHAR, engine VARCHAR);","SELECT points FROM table_name_68 WHERE year < 1977 AND engine = ""cosworth v8"" AND entrant = ""hb bewaking alarm systems"";","SELECT points FROM table_name_68 WHERE year 1977 AND engine = ""cosworth v8"" AND entrant = ""hb bewaking alarm systems"";",0 What is the total number of research grants received by the College of Engineering in the last 5 years?,"CREATE TABLE grants (id INT, department VARCHAR(50), amount DECIMAL(10,2), grant_date DATE); ","SELECT SUM(amount) FROM grants WHERE department LIKE 'Engineering%' AND grant_date >= DATE_SUB(CURDATE(), INTERVAL 5 YEAR);","SELECT COUNT(*) FROM grants WHERE department = 'College of Engineering' AND grant_date >= DATEADD(year, -5, GETDATE());",0 What is the Score that has a Result of 2–1 on 5 july 2007?,"CREATE TABLE table_name_47 (score VARCHAR, result VARCHAR, date VARCHAR);","SELECT score FROM table_name_47 WHERE result = ""2–1"" AND date = ""5 july 2007"";","SELECT score FROM table_name_47 WHERE result = ""2–1"" AND date = ""5 july 2007"";",1 list all wildlife habitats with their respective areas in descending order,"CREATE SCHEMA forestry; CREATE TABLE habitats (id INT, name VARCHAR(50), area FLOAT); ","SELECT name, area FROM forestry.habitats ORDER BY area DESC;","SELECT name, area FROM forestry.habitats ORDER BY area DESC;",1 What is the ergative for the dative (i)mas?,"CREATE TABLE table_name_53 (ergative VARCHAR, dative VARCHAR);","SELECT ergative FROM table_name_53 WHERE dative = ""(i)mas"";","SELECT ergative FROM table_name_53 WHERE dative = ""(i)mas"";",1 What is the number of publications in the top-tier Computer Science conferences by female faculty members in the past year?,"CREATE TABLE faculty (id INT, name VARCHAR(50), department VARCHAR(50), gender VARCHAR(10), last_publication_date DATE); CREATE TABLE conferences (id INT, name VARCHAR(50), tier VARCHAR(10)); CREATE TABLE publications (id INT, faculty_id INT, conference_id INT);","SELECT COUNT(*) FROM (SELECT f.id FROM faculty f JOIN publications p ON f.id = p.faculty_id JOIN conferences c ON p.conference_id = c.id WHERE f.gender = 'Female' AND f.department = 'Computer Science' AND f.last_publication_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND c.tier = 'Top-tier') subquery;","SELECT COUNT(*) FROM publications p JOIN faculty f ON p.faculty_id = f.id JOIN conferences c ON p.conference_id = c.id WHERE f.gender = 'Female' AND c.tier = 'Computer Science' AND p.last_publication_date >= DATEADD(year, -1, GETDATE());",0 Which year did the Angeles City based airline begin operations?,"CREATE TABLE table_15637071_1 (commenced_operations VARCHAR, headquarters VARCHAR);","SELECT commenced_operations FROM table_15637071_1 WHERE headquarters = ""Angeles City"";","SELECT began_operations FROM table_15637071_1 WHERE headquarters = ""Angeles City"";",0 What was the average revenue per sale for natural hair care products in 2022?,"CREATE TABLE haircare_sales (sale_date DATE, product_natural BOOLEAN, revenue DECIMAL(10,2)); ",SELECT AVG(revenue) FROM haircare_sales WHERE product_natural = TRUE AND sale_date BETWEEN '2022-01-01' AND '2022-12-31';,SELECT AVG(revenue) FROM haircare_sales WHERE product_natural = true AND sale_date BETWEEN '2022-01-01' AND '2022-12-31';,0 Find the top 3 dates in the 'satellite_data' table with the lowest temperature for 'Field_6'.,"CREATE TABLE satellite_data (field VARCHAR(255), temperature FLOAT, date DATE);","SELECT date, temperature FROM (SELECT date, temperature, ROW_NUMBER() OVER (PARTITION BY field ORDER BY temperature ASC) as rn FROM satellite_data WHERE field = 'Field_6') t WHERE rn <= 3;","SELECT date, temperature FROM satellite_data WHERE field = 'Field_6' ORDER BY temperature DESC LIMIT 3;",0 who is the opponent on 2004-06-26 with the result of loss?,"CREATE TABLE table_name_78 (opponent VARCHAR, date VARCHAR, result VARCHAR);","SELECT opponent FROM table_name_78 WHERE date = ""2004-06-26"" AND result = ""loss"";","SELECT opponent FROM table_name_78 WHERE date = ""2004-06-26"" AND result = ""loss"";",1 "What is the maximum goals score with less than 13 wins, greater than 86 goals were conceded, and more than 32 games lost?","CREATE TABLE table_name_87 (goals_scored INTEGER, loses VARCHAR, wins VARCHAR, goals_conceded VARCHAR);",SELECT MAX(goals_scored) FROM table_name_87 WHERE wins < 13 AND goals_conceded > 86 AND loses > 32;,SELECT MAX(goals_scored) FROM table_name_87 WHERE wins 13 AND goals_conceded > 86 AND loses > 32;,0 "What team has tony parker (10) as the high assists, kurt thomas (12) as the high rebounds?","CREATE TABLE table_name_57 (team VARCHAR, high_assists VARCHAR, high_rebounds VARCHAR);","SELECT team FROM table_name_57 WHERE high_assists = ""tony parker (10)"" AND high_rebounds = ""kurt thomas (12)"";","SELECT team FROM table_name_57 WHERE high_assists = ""tony parker (10)"" AND high_rebounds = ""kurt thomas (12)"";",1 What is the longitude of the feature named Razia Patera? ,"CREATE TABLE table_16799784_8 (longitude VARCHAR, name VARCHAR);","SELECT longitude FROM table_16799784_8 WHERE name = ""Razia Patera"";","SELECT longitude FROM table_16799784_8 WHERE name = ""Razia Patera"";",1 What is the total number of ranks that had vestron as the studio?,"CREATE TABLE table_name_48 (rank VARCHAR, studio VARCHAR);","SELECT COUNT(rank) FROM table_name_48 WHERE studio = ""vestron"";","SELECT COUNT(rank) FROM table_name_48 WHERE studio = ""vestron"";",1 What is the total number of workers in factories using organic cotton?,"CREATE TABLE factory_info (id INT, factory VARCHAR(100), location VARCHAR(100), uses_organic_cotton BOOLEAN, num_workers INT); ",SELECT SUM(num_workers) FROM factory_info WHERE uses_organic_cotton = TRUE;,SELECT SUM(num_workers) FROM factory_info WHERE uses_organic_cotton = true;,0 What is the nickname that means god holds my life?,"CREATE TABLE table_11908801_1 (nickname VARCHAR, meaning VARCHAR);","SELECT nickname FROM table_11908801_1 WHERE meaning = ""God Holds My Life"";","SELECT nickname FROM table_11908801_1 WHERE meaning = ""God Holds My Life"";",1 What is the year began for the site with free userpics cost of $1 and a userpics paid value of N/A?,"CREATE TABLE table_name_92 (year_began VARCHAR, userpics_paid VARCHAR, userpics_free VARCHAR);","SELECT year_began FROM table_name_92 WHERE userpics_paid = ""n/a"" AND userpics_free = ""1"";","SELECT year_began FROM table_name_92 WHERE userpics_paid = ""n/a"" AND userpics_free = ""$1"";",0 What is the nationality of the person with number 27?,"CREATE TABLE table_name_96 (nationality VARCHAR, jersey_number_s_ VARCHAR);","SELECT nationality FROM table_name_96 WHERE jersey_number_s_ = ""27"";",SELECT nationality FROM table_name_96 WHERE jersey_number_s_ = 27;,0 What's the total number of players who play FPS games in Asia?,"CREATE TABLE Players (PlayerID INT, Age INT, Gender VARCHAR(10), Location VARCHAR(20)); CREATE TABLE Games (GameID INT, GameName VARCHAR(20), Genre VARCHAR(10)); ",SELECT COUNT(*) FROM Players INNER JOIN (SELECT DISTINCT PlayerID FROM Games WHERE Genre = 'FPS') AS FPSPlayers ON Players.PlayerID = FPSPlayers.PlayerID WHERE Players.Location = 'Asia';,SELECT COUNT(DISTINCT Players.PlayerID) FROM Players INNER JOIN Games ON Players.GameID = Games.GameID WHERE Games.Genre = 'FPS' AND Players.Location = 'Asia';,0 What Country has a Player of nick faldo?,"CREATE TABLE table_name_74 (country VARCHAR, player VARCHAR);","SELECT country FROM table_name_74 WHERE player = ""nick faldo"";","SELECT country FROM table_name_74 WHERE player = ""nick faldo"";",1 What is the maximum amount of grant funding received by a single faculty member in the Physics department in a single year?,"CREATE TABLE grants (id INT, faculty_id INT, year INT, amount DECIMAL(10,2)); CREATE TABLE faculty (id INT, name VARCHAR(50), department VARCHAR(50)); ",SELECT MAX(g.amount) FROM grants g JOIN faculty f ON g.faculty_id = f.id WHERE f.department = 'Physics';,SELECT MAX(grants.amount) FROM grants INNER JOIN faculty ON grants.faculty_id = faculty.id WHERE faculty.department = 'Physics';,0 Which charts had debut sales of of more than 339333.011497678?,"CREATE TABLE table_23180638_1 (oricon_albums_chart VARCHAR, debut_sales__copies_ INTEGER);",SELECT oricon_albums_chart FROM table_23180638_1 WHERE debut_sales__copies_ > 339333.011497678;,SELECToricon_albums_chart FROM table_23180638_1 WHERE debut_sales__copies_ > 339333.011497678;,0 What was the speed of the rider that earned 1 point?,"CREATE TABLE table_name_24 (speed VARCHAR, points VARCHAR);",SELECT speed FROM table_name_24 WHERE points = 1;,SELECT speed FROM table_name_24 WHERE points = 1;,1 What country is Pierre Vermeulen from?,"CREATE TABLE table_24565004_22 (nationality² VARCHAR, name VARCHAR);","SELECT nationality² FROM table_24565004_22 WHERE name = ""Pierre Vermeulen"";","SELECT nationality2 FROM table_24565004_22 WHERE name = ""Pierre Vermeulen"";",0 what's the maximum peru vs. world (percent) with 9672 species in the world ,"CREATE TABLE table_11727969_1 (peru_vs_world__percent_ INTEGER, species_in_the_world VARCHAR);",SELECT MAX(peru_vs_world__percent_) FROM table_11727969_1 WHERE species_in_the_world = 9672;,SELECT MAX(peru_vs_world__percent_) FROM table_11727969_1 WHERE species_in_the_world = 9672;,1 Count the number of Lanthanum mining permits issued in Brazil and Argentina in 2020 with a production capacity less than 500 tons.,"CREATE TABLE lanthanum_permits (year INT, country TEXT, tons INT); ","SELECT COUNT(*) FROM lanthanum_permits WHERE country IN ('Brazil', 'Argentina') AND year = 2020 AND tons < 500;","SELECT COUNT(*) FROM lanthanum_permits WHERE year = 2020 AND country IN ('Brazil', 'Argentina') AND tons 500;",0 How many economic diversification efforts were successful in India between 2017 and 2019?,"CREATE TABLE economic_diversification_efforts (id INT, country VARCHAR(20), success BOOLEAN, start_year INT, end_year INT); ",SELECT COUNT(*) FROM economic_diversification_efforts WHERE country = 'India' AND start_year >= 2017 AND end_year <= 2019 AND success = true;,SELECT COUNT(*) FROM economic_diversification_efforts WHERE country = 'India' AND success = TRUE AND start_year BETWEEN 2017 AND 2019;,0 What Location has a Delivery of barge and the Name of scaevola?,"CREATE TABLE table_name_77 (location VARCHAR, delivery VARCHAR, name VARCHAR);","SELECT location FROM table_name_77 WHERE delivery = ""barge"" AND name = ""scaevola"";","SELECT location FROM table_name_77 WHERE delivery = ""barge"" AND name = ""scaevola"";",1 What is the average age of teachers who have completed professional development courses in the last year?,"CREATE TABLE Teacher (TeacherID INT, Age INT, CompletedProfessionalDevelopment YEAR); CREATE VIEW ProfessionalDevelopmentLastYear AS SELECT * FROM Teacher WHERE CompletedProfessionalDevelopment >= YEAR(CURRENT_DATE) - 1;",SELECT AVG(Age) FROM ProfessionalDevelopmentLastYear;,SELECT AVG(Age) FROM Teacher INNER JOIN ProfessionalDevelopmentLastYear ON Teacher.TeacherID = ProfessionalDevelopmentLastYear.TeacherID WHERE ProfessionalDevelopmentLastYear.CURRENT_DATE >= YEAR(CURRENT_DATE) - 1;,0 How many unique customers made purchases in Illinois in the first half of 2021?,"CREATE TABLE purchases (id INT, state VARCHAR(50), month VARCHAR(50), customer_id INT); ",SELECT COUNT(DISTINCT customer_id) FROM purchases WHERE state = 'Illinois' AND (month = 'January' OR month = 'February' OR month = 'March' OR month = 'April' OR month = 'May' OR month = 'June') AND customer_id IS NOT NULL;,SELECT COUNT(DISTINCT customer_id) FROM purchases WHERE state = 'Illinois' AND month BETWEEN '2021-01-01' AND '2021-06-30';,0 What are the total costs of support programs for 'Mentorship Program' and 'Tutoring Program' from the 'SupportPrograms' table?,"CREATE TABLE SupportPrograms (program_id INT, program_name VARCHAR(255), cost DECIMAL(10, 2)); ","SELECT SUM(cost) FROM SupportPrograms WHERE program_name IN ('Mentorship Program', 'Tutoring Program');","SELECT SUM(cost) FROM SupportPrograms WHERE program_name IN ('Mentorship Program', 'Tutoring Program');",1 "Which manager had less than 287 losses, less than 80 wins, a win percentage of 0.296, and was employed in 1904?","CREATE TABLE table_name_96 (manager VARCHAR, wpct VARCHAR, years VARCHAR, losses VARCHAR, wins VARCHAR);","SELECT manager FROM table_name_96 WHERE losses < 287 AND wins < 80 AND years = ""1904"" AND wpct = 0.296;","SELECT manager FROM table_name_96 WHERE losses 287 AND wins 80 AND wpct = ""0.296"" AND years = 1904;",0 When the pos equals 18 what is the max amount of points?,"CREATE TABLE table_23391714_1 (points INTEGER, pos VARCHAR);",SELECT MAX(points) FROM table_23391714_1 WHERE pos = 18;,SELECT MAX(points) FROM table_23391714_1 WHERE pos = 18;,1 "Which representative has a Termination of MIssion date Mar 25, 1976?","CREATE TABLE table_name_59 (representative VARCHAR, termination_of_mission VARCHAR);","SELECT representative FROM table_name_59 WHERE termination_of_mission = ""mar 25, 1976"";","SELECT representative FROM table_name_59 WHERE termination_of_mission = ""mar 25, 1976"";",1 What is the number of vaccinations administered in each country?,"CREATE TABLE vaccinations(id INT, patient_id INT, country TEXT, date DATE);","SELECT country, COUNT(*) FROM vaccinations GROUP BY country;","SELECT country, COUNT(*) FROM vaccinations GROUP BY country;",1 Insert a new record into the 'artists' table for a new artist named 'Mx. Painter' with a 'gender' of 'Non-binary' and 'artist_id' of 4.,"CREATE TABLE artists (artist_id INT, name VARCHAR(255), gender VARCHAR(64));","INSERT INTO artists (artist_id, name, gender) VALUES (4, 'Mx. Painter', 'Non-binary');","INSERT INTO artists (artist_id, name, gender) VALUES (4, 'Mx. Painter', 'Non-binary');",1 List all aircraft models and their average flight hours for the year 2019.,"CREATE TABLE aircraft_flights (id INT, model VARCHAR(50), flight_hours DECIMAL(5,2), year INT); ","SELECT model, AVG(flight_hours) as avg_flight_hours FROM aircraft_flights WHERE year = 2019 GROUP BY model;","SELECT model, AVG(flight_hours) FROM aircraft_flights WHERE year = 2019 GROUP BY model;",0 What is the average distance to the nearest hospital for residents in rural county 'Yolo'?,"CREATE TABLE hospitals (id INT, name TEXT, location TEXT); ","SELECT AVG(Distance) FROM (SELECT patient_address AS Address, MIN(h.location) AS Distance FROM patients GROUP BY patient_address) AS patient_distance JOIN hospitals h ON patient_distance.Distance = STRDISTANCE(patient_distance.Address, h.location) WHERE h.location LIKE '%Yolo%';",SELECT AVG(distance) FROM hospitals WHERE location = 'Yolo';,0 "What is the lowest total metals of a team with more than 6 silver, 6 bronze, and fewer than 16 gold medals?","CREATE TABLE table_name_77 (total INTEGER, gold VARCHAR, silver VARCHAR, bronze VARCHAR);",SELECT MIN(total) FROM table_name_77 WHERE silver > 6 AND bronze = 6 AND gold < 16;,SELECT MIN(total) FROM table_name_77 WHERE silver > 6 AND bronze = 6 AND gold 16;,0 " who is the champion where semi-finalist #2 is na and location is morrisville, nc","CREATE TABLE table_11214772_1 (champion VARCHAR, semi_finalist__number2 VARCHAR, location VARCHAR);","SELECT champion FROM table_11214772_1 WHERE semi_finalist__number2 = ""NA"" AND location = ""Morrisville, NC"";","SELECT champion FROM table_11214772_1 WHERE semi_finalist__number2 = ""NA"" AND location = ""Morrisville, NC"";",1 List the names of all cosmetics products that have not been tested on animals and have an ingredients source country of either the US or Canada.,"CREATE TABLE product_info (product_name TEXT, is_tested_on_animals BOOLEAN, ingredients_source_country TEXT); ","SELECT product_name FROM product_info WHERE is_tested_on_animals = false AND ingredients_source_country IN ('US', 'CA');","SELECT product_name FROM product_info WHERE is_tested_on_animals = true AND ingredients_source_country IN ('USA', 'Canada');",0 What is the maximum salary of workers in the 'retail' industry who are part of a union?,"CREATE TABLE workers (id INT, name VARCHAR(255), industry VARCHAR(255), salary DECIMAL(10,2)); CREATE TABLE unions (id INT, worker_id INT, union VARCHAR(255)); ",SELECT MAX(workers.salary) FROM workers INNER JOIN unions ON workers.id = unions.worker_id WHERE workers.industry = 'retail' AND unions.union = 'yes';,SELECT MAX(workers.salary) FROM workers INNER JOIN unions ON workers.id = unions.worker_id WHERE workers.industry ='retail';,0 How many traffic accidents were there in each district in the month of July 2021?,"CREATE TABLE TrafficAccidents (District INT, AccidentDate DATE); ","SELECT District, COUNT(*) FROM TrafficAccidents WHERE MONTH(AccidentDate) = 7 GROUP BY District;","SELECT District, COUNT(*) FROM TrafficAccidents WHERE AccidentDate BETWEEN '2021-07-01' AND '2021-07-31' GROUP BY District;",0 What's the part 3 of the verb in class 5?,"CREATE TABLE table_1745843_6 (part_3 VARCHAR, class VARCHAR);","SELECT part_3 FROM table_1745843_6 WHERE class = ""5"";",SELECT part_3 FROM table_1745843_6 WHERE class = 5;,0 Which aquatic species have health metrics above the average?,"CREATE TABLE health_metrics (id INT, species VARCHAR(50), metric FLOAT); ",SELECT species FROM health_metrics WHERE metric > (SELECT AVG(metric) FROM health_metrics);,SELECT species FROM health_metrics WHERE metric > (SELECT AVG(metric) FROM health_metrics);,1 Which biotech startups are associated with the genetic research department?,"CREATE TABLE Startup (Startup_Name VARCHAR(50) PRIMARY KEY, Industry VARCHAR(50), Funding DECIMAL(10, 2)); ",SELECT S.Startup_Name FROM Startup S WHERE S.Industry = 'Genetic Research';,SELECT Startup_Name FROM Startup WHERE Industry = 'Genetic Research';,0 How many games have players participated in that start with the word 'Space' in the game library?,"CREATE TABLE Game_Library (game_id INT, game_name VARCHAR(50), player_id INT); ",SELECT COUNT(DISTINCT game_id) FROM Game_Library WHERE game_name LIKE 'Space%';,SELECT COUNT(*) FROM Game_Library WHERE game_name LIKE '%Space%';,0 Which Position has a Years in Orlando of 1997–1998?,"CREATE TABLE table_name_68 (position VARCHAR, years_in_orlando VARCHAR);","SELECT position FROM table_name_68 WHERE years_in_orlando = ""1997–1998"";","SELECT position FROM table_name_68 WHERE years_in_orlando = ""1997–1998"";",1 Count the number of employees hired in each year.,"CREATE TABLE Employees (EmployeeID INT, HireDate DATE); ","SELECT YEAR(HireDate) AS Year, COUNT(*) AS NumberOfEmployees FROM Employees GROUP BY Year;","SELECT HireDate, COUNT(*) FROM Employees GROUP BY HireDate;",0 Which leagues entered in rounds where there were 16 winners from the previous round?,"CREATE TABLE table_23449363_1 (leagues_entering_at_this_round VARCHAR, winners_from_previous_round VARCHAR);","SELECT leagues_entering_at_this_round FROM table_23449363_1 WHERE winners_from_previous_round = ""16"";",SELECT leagues_entering_at_this_round FROM table_23449363_1 WHERE winners_from_previous_round = 16;,0 "Show the total number of posts and comments by users in the 'LGBTQ+' community on Twitter and Instagram in the past week, broken down by gender.","CREATE TABLE posts (post_id INT, user_id INT, platform VARCHAR(20), post_text VARCHAR(100), post_date DATE); CREATE TABLE comments (comment_id INT, post_id INT, user_id INT, comment_text VARCHAR(100), comment_date DATE); CREATE TABLE user_profile (user_id INT, community VARCHAR(20), gender VARCHAR(10)); ","SELECT p.platform, u.gender, COUNT(DISTINCT p.post_id) as num_posts, COUNT(DISTINCT c.comment_id) as num_comments FROM posts p JOIN comments c ON p.post_id = c.post_id JOIN user_profile u ON p.user_id = u.user_id WHERE p.platform IN ('Twitter', 'Instagram') AND u.community = 'LGBTQ+' AND p.post_date >= DATEADD(week, -1, GETDATE()) GROUP BY p.platform, u.gender;","SELECT u.gender, COUNT(p.post_id) as total_posts, COUNT(c.comment_id) as total_comments FROM posts p JOIN comments c ON p.post_id = c.post_id JOIN user_profile u ON p.user_id = u.user_id WHERE p.platform IN ('Twitter', 'Instagram') AND p.post_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) GROUP BY p.platform;",0 What is the name of the softball stadium for the school that has Eastern Baseball Stadium?,"CREATE TABLE table_1974545_3 (softball_stadium VARCHAR, baseball_stadium VARCHAR);","SELECT softball_stadium FROM table_1974545_3 WHERE baseball_stadium = ""Eastern Baseball Stadium"";","SELECT softball_stadium FROM table_1974545_3 WHERE baseball_stadium = ""Eastern Baseball Stadium"";",1 What was the score of the game against the San Diego Chargers?,"CREATE TABLE table_name_50 (week INTEGER, opponent VARCHAR);","SELECT SUM(week) FROM table_name_50 WHERE opponent = ""san diego chargers"";","SELECT SUM(week) FROM table_name_50 WHERE opponent = ""san diego chargers"";",1 List the number of climate adaptation projects in each country in the Americas.,"CREATE TABLE climate_adaptation (project_name TEXT, country TEXT);","SELECT country, COUNT(project_name) as num_projects FROM climate_adaptation WHERE country IN ('USA', 'Canada', 'Mexico') GROUP BY country;","SELECT country, COUNT(*) FROM climate_adaptation GROUP BY country;",0 What country has a territory of French Guiana?,"CREATE TABLE table_name_28 (country VARCHAR, territory VARCHAR);","SELECT country FROM table_name_28 WHERE territory = ""french guiana"";","SELECT country FROM table_name_28 WHERE territory = ""french guiana"";",1 Insert a new voyage for 'VesselC' from Port of Oakland to Port of Los Angeles on 2022-03-20.,"CREATE TABLE Vessels (Id INT, Name VARCHAR(50), Type VARCHAR(50), MaxSpeed DECIMAL(5,2)); CREATE TABLE PortVoyages (Id INT, VesselId INT, DeparturePort VARCHAR(50), ArrivalPort VARCHAR(50), DepartureDate DATE);","INSERT INTO PortVoyages (VesselId, DeparturePort, ArrivalPort, DepartureDate) VALUES ((SELECT Id FROM Vessels WHERE Name = 'VesselC'), 'Oakland', 'Los Angeles', '2022-03-20');","INSERT INTO PortVoyages (VesselId, DeparturePort, ArrivalPort, DepartureDate) VALUES ('VesselC', 'Port of Oakland', 'Port of Los Angeles', '2022-03-20');",0 What is the total number of employees in the 'mining_company' and 'equipment_rental' departments?,"CREATE TABLE mining_company(id INT, name VARCHAR(50), department VARCHAR(50)); CREATE TABLE equipment_rental(id INT, name VARCHAR(50), department VARCHAR(50)); ",SELECT COUNT(*) FROM ( (SELECT name FROM mining_company) UNION (SELECT name FROM equipment_rental) ) AS all_names;,SELECT COUNT(*) FROM mining_company INNER JOIN equipment_rental ON mining_company.department = equipment_rental.department;,0 When 19th is the position what is the highest amount of poles?,"CREATE TABLE table_22737506_1 (poles INTEGER, pos VARCHAR);","SELECT MAX(poles) FROM table_22737506_1 WHERE pos = ""19th"";","SELECT MAX(poles) FROM table_22737506_1 WHERE pos = ""19th"";",1 What are the top 5 most expensive products?,"CREATE TABLE if not exists product (id INT PRIMARY KEY, name TEXT, brand_id INT, price DECIMAL(5,2)); ","SELECT name, price FROM product ORDER BY price DESC LIMIT 5;","SELECT name, price FROM product ORDER BY price DESC LIMIT 5;",1 "Name the typ for project of igmdp and weight of 16,000","CREATE TABLE table_name_65 (type VARCHAR, project VARCHAR, weight__kg_ VARCHAR);","SELECT type FROM table_name_65 WHERE project = ""igmdp"" AND weight__kg_ = ""16,000"";","SELECT type FROM table_name_65 WHERE project = ""igmdp"" AND weight__kg_ = ""16000"";",0 Insert a new program record for 'Greenfield Community Center',"CREATE TABLE Programs (program_id INT, program_name VARCHAR(50), location VARCHAR(50)); ","INSERT INTO Programs (program_id, program_name, location) VALUES (2, 'Summer Camp', 'Greenfield Community Center');","INSERT INTO Programs (program_id, program_name, location) VALUES (1, 'Greenfield Community Center', 'Greenfield');",0 What college does Dennis Scott attend?,"CREATE TABLE table_name_26 (college VARCHAR, player VARCHAR);","SELECT college FROM table_name_26 WHERE player = ""dennis scott"";","SELECT college FROM table_name_26 WHERE player = ""dennis scott"";",1 "Find the number of papers published by each researcher, ordered by the number of papers in descending order.","CREATE TABLE ai_researchers (id INT, name VARCHAR(100), published_papers INT); ","SELECT name, published_papers FROM ai_researchers ORDER BY published_papers DESC;","SELECT name, published_papers FROM ai_researchers ORDER BY published_papers DESC;",1 How many opponents have a 1-0 record against the Cowboys?,"CREATE TABLE table_22801331_1 (opponents VARCHAR, record VARCHAR);","SELECT opponents FROM table_22801331_1 WHERE record = ""1-0"";","SELECT opponents FROM table_22801331_1 WHERE record = ""1-0"";",1 How many vessels arrived from Canada to the US gulf coast in the past month?,"CREATE TABLE vessels(id INT, name VARCHAR(50), country VARCHAR(50)); CREATE TABLE vessel_locations(id INT, vessel_id INT, location VARCHAR(50), timestamp TIMESTAMP);","SELECT COUNT(DISTINCT vessels.id) FROM vessels JOIN vessel_locations ON vessels.id = vessel_locations.vessel_id WHERE vessels.country = 'Canada' AND location LIKE '%US Gulf%' AND timestamp > DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH)","SELECT COUNT(*) FROM vessels v JOIN vessel_locations vl ON v.id = vl.vessel_id WHERE vl.country = 'Canada' AND vl.location = 'US' AND vl.timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH);",0 "What was the result of Bridgeview, Illinois?","CREATE TABLE table_name_33 (result VARCHAR, venue VARCHAR);","SELECT result FROM table_name_33 WHERE venue = ""bridgeview, illinois"";","SELECT result FROM table_name_33 WHERE venue = ""bridgeview, illinois"";",1 What is Lisbeth Trickett's time?,"CREATE TABLE table_name_32 (time VARCHAR, name VARCHAR);","SELECT COUNT(time) FROM table_name_32 WHERE name = ""lisbeth trickett"";","SELECT time FROM table_name_32 WHERE name = ""lisbeth trickett"";",0 Show the average food safety inspection score by restaurant location for the last year.,"CREATE TABLE inspections (inspection_id INT, restaurant_id INT, date DATE, score INT); CREATE TABLE restaurants (restaurant_id INT, name VARCHAR(255), location VARCHAR(255)); ","SELECT r.location, AVG(i.score) as avg_score FROM inspections i JOIN restaurants r ON i.restaurant_id = r.restaurant_id WHERE i.date >= DATE(NOW()) - INTERVAL 365 DAY GROUP BY r.location;","SELECT r.location, AVG(i.score) as avg_score FROM inspections i JOIN restaurants r ON i.restaurant_id = r.restaurant_id WHERE i.date >= DATEADD(year, -1, GETDATE()) GROUP BY r.location;",0 "What is the average property tax for co-owned properties in the city of Austin, Texas?","CREATE TABLE property_owners (id INT PRIMARY KEY, name TEXT, share FLOAT); CREATE TABLE properties (id INT PRIMARY KEY, address TEXT, city TEXT, state TEXT, property_tax FLOAT); CREATE TABLE co_ownership (property_id INT, owner_id INT, FOREIGN KEY (property_id) REFERENCES properties(id), FOREIGN KEY (owner_id) REFERENCES property_owners(id));",SELECT AVG(properties.property_tax) FROM properties INNER JOIN co_ownership ON properties.id = co_ownership.property_id WHERE property_owners.city = 'Austin' AND property_owners.state = 'Texas' AND co_ownership.owner_id IN (SELECT owner_id FROM property_owners WHERE share > 0.5);,SELECT AVG(property_tax) FROM properties JOIN co_ownership ON properties.id = co_ownership.property_id JOIN property_owners ON co_ownership.property_id = property_owners.id WHERE city = 'Austin' AND state = 'Texas';,0 What is the 1st leg when team number 1 is CSU SIBIU?,CREATE TABLE table_name_53 (team__number1 VARCHAR);,"SELECT 1 AS st_leg FROM table_name_53 WHERE team__number1 = ""csu sibiu"";","SELECT 1 AS st_leg FROM table_name_53 WHERE team__number1 = ""csu sibiu"";",1 What are the safety ratings of the electric vehicles that participated in safety testing?,"CREATE TABLE Vehicle (id INT, name TEXT, is_electric BOOLEAN, safety_rating FLOAT); CREATE TABLE SafetyTesting (id INT, vehicle_id INT); ","SELECT Vehicle.name, Vehicle.safety_rating FROM Vehicle INNER JOIN SafetyTesting ON Vehicle.id = SafetyTesting.vehicle_id WHERE is_electric = true;","SELECT Vehicle.name, Vehicle.safety_rating FROM Vehicle INNER JOIN SafetyTesting ON Vehicle.id = SafetyTesting.vehicle_id WHERE Vehicle.is_electric = true;",0 "Which Heat has a Nationality of bulgaria, and a Result larger than 55.97?","CREATE TABLE table_name_30 (heat INTEGER, nationality VARCHAR, result VARCHAR);","SELECT MIN(heat) FROM table_name_30 WHERE nationality = ""bulgaria"" AND result > 55.97;","SELECT SUM(heat) FROM table_name_30 WHERE nationality = ""bulgaria"" AND result > 55.97;",0 How many workplace safety incidents have been reported in the 'construction' industry by month in 2022?,"CREATE TABLE safety_incidents (incident_id INT, industry TEXT, incident_date DATE); ","SELECT industry, MONTH(incident_date) AS month, COUNT(*) OVER (PARTITION BY industry, MONTH(incident_date)) FROM safety_incidents WHERE industry = 'construction' AND YEAR(incident_date) = 2022;","SELECT EXTRACT(MONTH FROM incident_date) AS month, COUNT(*) FROM safety_incidents WHERE industry = 'construction' AND EXTRACT(YEAR FROM incident_date) = 2022 GROUP BY month;",0 "What is the minimum billing amount for each case in the 'billing' table, grouped by case type?","CREATE TABLE cases (case_id INT, case_type VARCHAR(255)); CREATE TABLE billing (bill_id INT, case_id INT, amount DECIMAL(10,2)); ","SELECT cases.case_type, MIN(billing.amount) FROM billing JOIN cases ON billing.case_id = cases.case_id GROUP BY cases.case_type;","SELECT c.case_type, MIN(b.amount) FROM cases c JOIN billing b ON c.case_id = b.case_id GROUP BY c.case_type;",0 "What is Away Team, when Home Team is ""Ipswich Town"", and when Date is ""6 February 1986""?","CREATE TABLE table_name_90 (away_team VARCHAR, home_team VARCHAR, date VARCHAR);","SELECT away_team FROM table_name_90 WHERE home_team = ""ipswich town"" AND date = ""6 february 1986"";","SELECT away_team FROM table_name_90 WHERE home_team = ""ipswich town"" AND date = ""6 february 1986"";",1 How many winners scored exactly 202 (-11)?,"CREATE TABLE table_21260421_1 (winner VARCHAR, score VARCHAR);","SELECT COUNT(winner) FROM table_21260421_1 WHERE score = ""202 (-11)"";","SELECT COUNT(winner) FROM table_21260421_1 WHERE score = ""202 (-11)"";",1 What is the average age of trees in forestry_plots table?,"CREATE TABLE forestry_plots (id INT, tree_type VARCHAR(255), planted_date DATE, age INT); ",SELECT AVG(age) FROM forestry_plots;,SELECT AVG(age) FROM forestry_plots;,1 "What is the highest Week when the opponent was kansas city chiefs, with more than 26,469 in attendance?","CREATE TABLE table_name_54 (week INTEGER, opponent VARCHAR, attendance VARCHAR);","SELECT MAX(week) FROM table_name_54 WHERE opponent = ""kansas city chiefs"" AND attendance > 26 OFFSET 469;","SELECT MAX(week) FROM table_name_54 WHERE opponent = ""kansas city chiefs"" AND attendance > 26 OFFSET 469;",1 What's the average ESG score of companies in the technology sector?,"CREATE TABLE companies (id INT, sector VARCHAR(20), ESG_score FLOAT); ",SELECT AVG(ESG_score) FROM companies WHERE sector = 'Technology';,SELECT AVG(ESG_score) FROM companies WHERE sector = 'technology';,0 Calculate the average mental health score for each gender,"CREATE TABLE student_mental_health (student_id INT, mental_health_score INT, gender TEXT);","SELECT sd.gender, AVG(smh.mental_health_score) FROM student_mental_health smh INNER JOIN student_demographics sd ON smh.student_id = sd.student_id GROUP BY sd.gender;","SELECT gender, AVG(mental_health_score) FROM student_mental_health GROUP BY gender;",0 Identify the number of marine species in the Pacific Ocean with a vulnerable conservation status.',"CREATE TABLE marine_species (name VARCHAR(255), conservation_status VARCHAR(50), ocean VARCHAR(50)); ",SELECT COUNT(*) FROM marine_species WHERE conservation_status = 'Vulnerable' AND ocean = 'Pacific';,SELECT COUNT(*) FROM marine_species WHERE conservation_status = 'vulnerable' AND ocean = 'Pacific Ocean';,0 "Tell me the week for result of l 31-27, and an Attendance smaller than 85,865","CREATE TABLE table_name_99 (week INTEGER, result VARCHAR, attendance VARCHAR);","SELECT AVG(week) FROM table_name_99 WHERE result = ""l 31-27"" AND attendance < 85 OFFSET 865;","SELECT SUM(week) FROM table_name_99 WHERE result = ""l 31-27"" AND attendance 85 OFFSET 865;",0 who is the incumbent where the district is florida 9?,"CREATE TABLE table_1341663_10 (incumbent VARCHAR, district VARCHAR);","SELECT incumbent FROM table_1341663_10 WHERE district = ""Florida 9"";","SELECT incumbent FROM table_1341663_10 WHERE district = ""Florida 9"";",1 Which country is Lemd the ICAO of?,"CREATE TABLE table_name_34 (country VARCHAR, icao VARCHAR);","SELECT country FROM table_name_34 WHERE icao = ""lemd"";","SELECT country FROM table_name_34 WHERE icao = ""lemd"";",1 Who is the opposing team when the game was played on the Shea Stadium?,"CREATE TABLE table_17386066_2 (opponent VARCHAR, stadium VARCHAR);","SELECT opponent FROM table_17386066_2 WHERE stadium = ""Shea stadium"";","SELECT opponent FROM table_17386066_2 WHERE stadium = ""Shea Stadium"";",0 Which chassis scored 52 points?,"CREATE TABLE table_name_55 (chassis VARCHAR, points VARCHAR);",SELECT chassis FROM table_name_55 WHERE points = 52;,SELECT chassis FROM table_name_55 WHERE points = 52;,1 "Display the number of donors and total amount donated for each program, along with program details.","CREATE TABLE donors (id INT, name TEXT, email TEXT); CREATE TABLE donations (id INT, donor_id INT, program_id INT, amount DECIMAL); CREATE TABLE programs (id INT, name TEXT, location TEXT, budget INT);","SELECT programs.name as program_name, COUNT(DISTINCT donations.donor_id) as num_donors, SUM(donations.amount) as total_donation, programs.budget as budget FROM programs INNER JOIN donations ON programs.id = donations.program_id GROUP BY programs.id;","SELECT p.name, COUNT(d.id) as num_donors, SUM(d.amount) as total_donated FROM donors d JOIN donations d ON d.id = d.donor_id JOIN programs p ON d.program_id = p.id GROUP BY p.name;",0 List the id of students who never attends courses?,CREATE TABLE student_course_attendance (student_id VARCHAR); CREATE TABLE students (student_id VARCHAR);,SELECT student_id FROM students WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance);,SELECT T1.student_id FROM students AS T1 JOIN student_course_attendance AS T2 ON T1.student_id = T2.student_id;,0 "How many employees and contractors work for each mining company, and what is the total number of employees and contractors across all mining companies?","CREATE TABLE mining_companies (company_id INT, company_name TEXT);CREATE TABLE employees (employee_id INT, employee_name TEXT, company_id INT, employee_type TEXT);","SELECT c.company_name, SUM(e.employee_type = 'employee') AS total_employees, SUM(e.employee_type = 'contractor') AS total_contractors FROM employees e INNER JOIN mining_companies c ON e.company_id = c.company_id GROUP BY c.company_id, c.company_name;SELECT 'Total' AS company_name, SUM(employee_type = 'employee') AS total_employees, SUM(employee_type = 'contractor') AS total_contractors FROM employees;","SELECT mining_companies.company_name, COUNT(employees.employee_id) as total_employees, COUNT(employees.employee_id) as total_contractors FROM mining_companies INNER JOIN employees ON mining_companies.company_id = employees.company_id GROUP BY mining_companies.company_name;",0 "What venue was the match against the guest team, FK ibar, played at?","CREATE TABLE table_name_65 (venue VARCHAR, guest VARCHAR);","SELECT venue FROM table_name_65 WHERE guest = ""fk ibar"";","SELECT venue FROM table_name_65 WHERE guest = ""fk ibar"";",1 List all artworks that have been created by artists from Africa and are on display in Europe.,"CREATE TABLE Artists (ArtistID INT, Name TEXT, Country TEXT);CREATE TABLE Artworks (ArtworkID INT, Title TEXT, ArtistID INT);CREATE TABLE GalleryArtworks (GalleryID INT, ArtworkID INT);CREATE TABLE GalleryLocations (GalleryID INT, Country TEXT);",SELECT Artworks.Title FROM Artists INNER JOIN Artworks ON Artworks.ArtistID = Artists.ArtistID INNER JOIN GalleryArtworks ON Artworks.ArtworkID = GalleryArtworks.ArtworkID INNER JOIN GalleryLocations ON GalleryArtworks.GalleryID = GalleryLocations.GalleryID WHERE Artists.Country = 'Africa' AND GalleryLocations.Country = 'Europe';,SELECT Artworks.Title FROM Artworks INNER JOIN GalleryArtworks ON Artworks.ArtistID = GalleryArtworks.ArtworkID INNER JOIN GalleryLocations ON GalleryArtworks.GalleryID = GalleryLocations.GalleryID WHERE Artists.Country = 'Africa' AND GalleryLocations.Country = 'Europe';,0 What is the average distance to the nearest hospital for each rural community?,"CREATE TABLE hospitals (hospital_id INT, hospital_name VARCHAR(255), location_id INT); CREATE TABLE communities (community_id INT, community_name VARCHAR(255), location_id INT, population INT); CREATE TABLE distances (distance_id INT, hospital_id INT, community_id INT, distance_km FLOAT); ","SELECT c.community_name, AVG(d.distance_km) AS avg_distance_to_hospital FROM communities c JOIN distances d ON c.community_id = d.community_id JOIN hospitals h ON d.hospital_id = h.hospital_id WHERE c.location_id = 1 GROUP BY c.community_name;","SELECT c.community_name, AVG(d.distance_km) as avg_distance FROM distances d JOIN communities c ON d.community_id = c.community_id JOIN hospitals h ON d.hospital_id = h.hospital_id JOIN communities c ON d.community_id = c.community_id GROUP BY c.community_name;",0 Which cities have the most eco-friendly hotels?,"CREATE TABLE eco_hotels(id INT, name TEXT, city TEXT, sustainable BOOLEAN); ","SELECT city, COUNT(*) FROM eco_hotels WHERE sustainable = true GROUP BY city ORDER BY COUNT(*) DESC;","SELECT city, COUNT(*) FROM eco_hotels WHERE sustainable = true GROUP BY city ORDER BY COUNT(*) DESC LIMIT 1;",0 Update the claims table to change the claim amount for policy number 9 to 3500 for claim date of '2020-03-15',"CREATE TABLE claims (claim_number INT, policy_number INT, claim_amount INT, claim_date DATE); ",UPDATE claims SET claim_amount = 3500 WHERE policy_number = 9 AND claim_date = '2020-03-15';,UPDATE claims SET claim_amount = 3500 WHERE policy_number = 9 AND claim_date = '2020-03-15';,1 How many cruelty-free ingredients are used in total across all products?,"CREATE TABLE Product (id INT, productName VARCHAR(50), price DECIMAL(5,2)); CREATE TABLE Ingredient (id INT, productId INT, ingredient VARCHAR(50), sourceCountry VARCHAR(50), crueltyFree BOOLEAN); ",SELECT SUM(I.crueltyFree) as totalCrueltyFreeIngredients FROM Ingredient I;,SELECT COUNT(*) FROM Ingredient i JOIN Product p ON i.productId = p.id WHERE i.crueltyFree = TRUE;,0 "Which players from the 'players' table have the highest average scores in the 'scores' table, and how many high scores did they achieve?","CREATE TABLE players (player_id INT, name VARCHAR(50)); CREATE TABLE scores (score_id INT, player_id INT, score INT); ","SELECT p.name, AVG(s.score) as avg_score, COUNT(*) as high_scores FROM players p JOIN scores s ON p.player_id = s.player_id WHERE s.score >= (SELECT AVG(score) FROM scores) GROUP BY p.player_id ORDER BY avg_score DESC, high_scores DESC;","SELECT players.name, AVG(scores.score) as avg_score, COUNT(scores.score) as high_scores FROM players INNER JOIN scores ON players.player_id = scores.player_id GROUP BY players.name ORDER BY high_scores DESC;",0 Display all users who have never interacted with posts about 'veganism'.,"CREATE TABLE interactions (user_id INT, post_id INT); CREATE TABLE posts (id INT, content TEXT);",SELECT DISTINCT u.username FROM users u LEFT JOIN interactions i ON u.id = i.user_id LEFT JOIN posts p ON i.post_id = p.id WHERE p.content NOT LIKE '%veganism%';,SELECT DISTINCT u.user_id FROM interactions i JOIN posts p ON i.post_id = p.id WHERE p.content LIKE '%veganism%';,0 "What is the highest Psychological Dependence, when Pleasure is less than 2.3, when Drug is ""Cannabis"", and when Physical Dependence is less than 0.8?","CREATE TABLE table_name_55 (psychological_dependence INTEGER, physical_dependence VARCHAR, pleasure VARCHAR, drug VARCHAR);","SELECT MAX(psychological_dependence) FROM table_name_55 WHERE pleasure < 2.3 AND drug = ""cannabis"" AND physical_dependence < 0.8;","SELECT MAX(psychological_dependence) FROM table_name_55 WHERE pleasure 2.3 AND drug = ""cannabis"" AND physical_dependence 0.8;",0 What is the total number of accessibility-related staff hires in Q2 and Q3 of 2022?,"CREATE TABLE StaffHires (hire_date DATE, staff_type VARCHAR(255)); ",SELECT SUM(total_hires) as q2_q3_hires FROM (SELECT CASE WHEN hire_date BETWEEN '2022-04-01' AND LAST_DAY('2022-06-30') THEN 1 WHEN hire_date BETWEEN '2022-07-01' AND LAST_DAY('2022-09-30') THEN 1 ELSE 0 END as total_hires FROM StaffHires) AS subquery;,SELECT COUNT(*) FROM StaffHires WHERE hire_date BETWEEN '2022-01-01' AND '2022-12-31' AND staff_type = 'Accessibility';,0 Which eSports teams have the most tournament wins in the last 3 years?,"CREATE TABLE Teams (TeamID INT, Name VARCHAR(50), TournamentWins INT, LastTournamentDate DATE);","SELECT t.Name, SUM(t.TournamentWins) as TotalWins FROM Teams t WHERE t.LastTournamentDate >= DATEADD(year, -3, GETDATE()) GROUP BY t.Name HAVING COUNT(*) >= 3 ORDER BY TotalWins DESC;","SELECT Name, SUM(TournamentWins) as TotalWins FROM Teams WHERE LastTournamentDate >= DATEADD(year, -3, GETDATE()) GROUP BY Name ORDER BY TotalWins DESC;",0 "What is the average waiting time for public buses in Sydney, Australia during peak hours?","CREATE TABLE public_buses (bus_id INT, trip_id INT, trip_start_time TIMESTAMP, trip_end_time TIMESTAMP, start_location TEXT, end_location TEXT, city TEXT, avg_waiting_time DECIMAL, peak_hours TEXT);",SELECT AVG(avg_waiting_time) FROM public_buses WHERE city = 'Sydney' AND peak_hours = 'yes';,SELECT AVG(avg_waiting_time) FROM public_buses WHERE city = 'Sydney' AND peak_hours = 'peak';,0 List the names and capacities of fish feed factories in Asia and their connected fish farms.,"CREATE TABLE fish_feed_factories (id INT, name TEXT, region TEXT, capacity INT); CREATE TABLE factory_connections (id INT, factory_id INT, farm_id INT); ","SELECT FFF.name, FFF.capacity, TF.name AS farm_name FROM fish_feed_factories FFF JOIN factory_connections FC ON FFF.id = FC.factory_id JOIN tilapia_farms TF ON FC.farm_id = TF.id WHERE FFF.region = 'Asia';","SELECT ff.name, ff.capacity, fc.farm_id FROM fish_feed_factories ff JOIN factory_connections fc ON ff.id = fc.factory_id WHERE ff.region = 'Asia';",0 Which dams in Texas have a higher elevation than the Hoover Dam?,"CREATE TABLE dams (id INT, name VARCHAR(255), location VARCHAR(255), elevation INT, height INT, reservoir VARCHAR(255)); ","SELECT name, elevation FROM dams WHERE elevation > (SELECT elevation FROM dams WHERE name = 'Hoover Dam') AND location LIKE '%TX%';",SELECT name FROM dams WHERE location = 'Texas' AND elevation > (SELECT height FROM dams WHERE reservoir = 'Hoover Dam');,0 Manager of lyman lamb / marty berghammer is in what league?,"CREATE TABLE table_name_59 (league VARCHAR, manager VARCHAR);","SELECT league FROM table_name_59 WHERE manager = ""lyman lamb / marty berghammer"";","SELECT league FROM table_name_59 WHERE manager = ""lyman lamb / marty berghammer"";",1 What is the Winning score in 1956?,"CREATE TABLE table_name_57 (winning_score VARCHAR, year VARCHAR);",SELECT winning_score FROM table_name_57 WHERE year = 1956;,SELECT winning_score FROM table_name_57 WHERE year = 1956;,1 What province was New Plymouth formed from?,"CREATE TABLE table_275023_1 (formed_from VARCHAR, province VARCHAR);","SELECT formed_from FROM table_275023_1 WHERE province = ""New Plymouth"";","SELECT formed_from FROM table_275023_1 WHERE province = ""New Plymouth"";",1 What is the maximum age of employees in the HR department?,"CREATE TABLE Employees (id INT, name VARCHAR(50), age INT, department VARCHAR(50)); ",SELECT MAX(age) FROM Employees WHERE department = 'HR';,SELECT MAX(age) FROM Employees WHERE department = 'HR';,1 Insert new records for a new marine species into the 'MarineLife' table,"CREATE TABLE MarineLife (id INT, species VARCHAR(50), population INT, last_sighting DATE); ","INSERT INTO MarineLife (id, species, population, last_sighting) VALUES (5, 'Blue Whale', 2000, '2021-09-22');","INSERT INTO MarineLife (id, species, population, last_sighting) VALUES (1, 'Sea Turtle', '2022-01-01');",0 What is the average age of clients per practice area?,"CREATE TABLE ClientPracticeArea (ClientID INT, PracticeAreaID INT, Age INT); ","SELECT PA.PracticeArea, AVG(CPA.Age) AS Avg_Age FROM PracticeAreas PA INNER JOIN ClientPracticeArea CPA ON PA.PracticeAreaID = CPA.PracticeAreaID GROUP BY PA.PracticeArea;","SELECT PracticeAreaID, AVG(Age) FROM ClientPracticeArea GROUP BY PracticeAreaID;",0 What is the Fatalities when the tail number was unknown and in Kabul>,"CREATE TABLE table_name_53 (fatalities VARCHAR, tail_number VARCHAR, location VARCHAR);","SELECT fatalities FROM table_name_53 WHERE tail_number = ""unknown"" AND location = ""kabul"";","SELECT fatalities FROM table_name_53 WHERE tail_number = ""unknown"" AND location = ""kabul>"";",0 What is the total number of journeys for 'Light Rail' mode of transport in 'Summer' season?,"CREATE TABLE Journeys(journey_id INT, journey_date DATE, mode_of_transport VARCHAR(20)); ",SELECT COUNT(*) FROM Journeys WHERE mode_of_transport = 'Light Rail' AND EXTRACT(MONTH FROM journey_date) BETWEEN 6 AND 8;,SELECT COUNT(*) FROM Journeys WHERE mode_of_transport = 'Light Rail' AND journey_date BETWEEN '2022-01-01' AND '2022-06-30';,0 "Create a new table named 'regulatory_compliance' with columns 'country', 'carrier', 'law', and 'compliance_date'.","CREATE TABLE regulatory_compliance (country VARCHAR(50), carrier VARCHAR(50), law VARCHAR(50), compliance_date DATE);","INSERT INTO regulatory_compliance (country, carrier, law, compliance_date) VALUES ('Brazil', 'Vivo', 'Data Privacy Act', '2023-05-01');","CREATE TABLE regulatory_compliance (country VARCHAR(50), carrier VARCHAR(50), law VARCHAR(50), compliance_date DATE);",0 What is the average rating of eco-friendly hotels in Barcelona?,"CREATE TABLE eco_hotels (hotel_id INT, name TEXT, city TEXT, rating FLOAT); ",SELECT AVG(rating) FROM eco_hotels WHERE city = 'Barcelona';,SELECT AVG(rating) FROM eco_hotels WHERE city = 'Barcelona';,1 What is the highest attendance for the match against west ham united at the venue of a?,"CREATE TABLE table_name_42 (attendance INTEGER, venue VARCHAR, opponent VARCHAR);","SELECT MAX(attendance) FROM table_name_42 WHERE venue = ""a"" AND opponent = ""west ham united"";","SELECT MAX(attendance) FROM table_name_42 WHERE venue = ""a"" AND opponent = ""west ham united"";",1 "What is Team, when Game is ""59""?","CREATE TABLE table_name_25 (team VARCHAR, game VARCHAR);",SELECT team FROM table_name_25 WHERE game = 59;,"SELECT team FROM table_name_25 WHERE game = ""59"";",0 Identify the broadband subscribers who have not had any usage in the last 60 days.,"CREATE TABLE broadband_subscribers (subscriber_id INT, name VARCHAR(50), last_usage_date DATE);","SELECT subscriber_id, name FROM broadband_subscribers WHERE last_usage_date <= DATE_SUB(CURDATE(), INTERVAL 60 DAY);","SELECT name FROM broadband_subscribers WHERE last_usage_date DATE_SUB(CURDATE(), INTERVAL 60 DAY);",0 What is the mass distribution of space debris collected by Chinese missions?,"CREATE TABLE space_debris (id INT, name VARCHAR(50), mission VARCHAR(50), mass FLOAT); ","SELECT mission, AVG(mass) as avg_mass, MIN(mass) as min_mass, MAX(mass) as max_mass FROM space_debris WHERE mission LIKE 'Chinese-%' GROUP BY mission;","SELECT mission, SUM(mass) as total_mass FROM space_debris WHERE country = 'China' GROUP BY mission;",0 What is the location when the opposition is mid canterbury?,"CREATE TABLE table_26847237_3 (location VARCHAR, opposition VARCHAR);","SELECT location FROM table_26847237_3 WHERE opposition = ""Mid Canterbury"";","SELECT location FROM table_26847237_3 WHERE opposition = ""Mid Canterbury"";",1 What is the maximum number of publications per year for graduate students in the Physics department?,"CREATE TABLE department (name VARCHAR(255), id INT);CREATE TABLE graduate_student (name VARCHAR(255), department_id INT, publication_year INT);",SELECT MAX(publication_year) FROM graduate_student WHERE department_id IN (SELECT id FROM department WHERE name = 'Physics');,SELECT MAX(publication_year) FROM graduate_student WHERE department_id = (SELECT id FROM department WHERE name = 'Physics');,0 What is the result when there's less than 2 goals?,"CREATE TABLE table_name_46 (result VARCHAR, goal INTEGER);",SELECT result FROM table_name_46 WHERE goal < 2;,SELECT result FROM table_name_46 WHERE goal 2;,0 What is the fan title with an end date of 1967-11-12?,"CREATE TABLE table_2560677_1 (fan_title VARCHAR, end_date VARCHAR);","SELECT fan_title FROM table_2560677_1 WHERE end_date = ""1967-11-12"";","SELECT fan_title FROM table_2560677_1 WHERE end_date = ""1967-11-12"";",1 Determine the average calorie count of dishes with a 'Vegan' tag and their respective cuisine types.,"CREATE TABLE dishes (dish_id INT PRIMARY KEY, dish_name VARCHAR(255), calories INT, cuisine_id INT, dietary_restrictions VARCHAR(255), FOREIGN KEY (cuisine_id) REFERENCES cuisine(cuisine_id));","SELECT c.cuisine_name, AVG(d.calories) FROM dishes d JOIN cuisine c ON d.cuisine_id = c.cuisine_id WHERE dietary_restrictions LIKE '%Vegan%' GROUP BY c.cuisine_id;","SELECT cuisine_id, AVG(calories) as avg_calories, cuisine_type FROM dishes WHERE dietary_restrictions = 'Vegan' GROUP BY cuisine_id;",0 What did the home team score against the away team Hawthorn?,"CREATE TABLE table_name_30 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team AS score FROM table_name_30 WHERE away_team = ""hawthorn"";","SELECT home_team AS score FROM table_name_30 WHERE away_team = ""hawthorn"";",1 "What is the average range for electric sedans in the ""ev_sedans"" view?",CREATE VIEW ev_sedans AS SELECT * FROM green_vehicles WHERE type = 'Electric' AND category = 'Sedan';,SELECT AVG(range) FROM ev_sedans;,SELECT AVG(range) FROM ev_sedans;,1 How many episodes did Cliff Bole directed in season 3?,"CREATE TABLE table_17861265_1 (title VARCHAR, directed_by VARCHAR);","SELECT COUNT(title) FROM table_17861265_1 WHERE directed_by = ""Cliff Bole"";","SELECT COUNT(title) FROM table_17861265_1 WHERE directed_by = ""Cliff Bole"";",1 What is the average number of streams per user in each country?,"CREATE TABLE country_streams (stream_id INT, country VARCHAR(255), user_id INT, streams_amount INT);","SELECT country, AVG(streams_amount) FROM country_streams GROUP BY country;","SELECT country, AVG(streams_amount) as avg_streams_per_user FROM country_streams GROUP BY country;",0 Which player has a height of 6-7?,"CREATE TABLE table_name_5 (player VARCHAR, height VARCHAR);","SELECT player FROM table_name_5 WHERE height = ""6-7"";","SELECT player FROM table_name_5 WHERE height = ""6-7"";",1 Insert data into funding records table,"CREATE TABLE funding (funding_id INT, company_id INT, funding_amount FLOAT);","INSERT INTO funding (funding_id, company_id, funding_amount) VALUES (1, 1, 50000), (2, 2, 75000), (3, 3, 100000), (4, 4, 150000), (5, 5, 200000);","INSERT INTO funding (funding_id, company_id, funding_amount) VALUES (1, 'Analytics', 1000.00);",0 What is the average react of the athlete with a time less than 22.29 and a rank greater than 1?,"CREATE TABLE table_name_11 (react INTEGER, time VARCHAR, rank VARCHAR);",SELECT AVG(react) FROM table_name_11 WHERE time < 22.29 AND rank > 1;,SELECT AVG(react) FROM table_name_11 WHERE time 22.29 AND rank > 1;,0 What is the lowest capacity that has stadion mladina as the stadium?,"CREATE TABLE table_name_96 (capacity INTEGER, stadium VARCHAR);","SELECT MIN(capacity) FROM table_name_96 WHERE stadium = ""stadion mladina"";","SELECT MIN(capacity) FROM table_name_96 WHERE stadium = ""stadion mladina"";",1 "List the top 5 customers with the highest broadband usage in the last month, along with their corresponding plan?","CREATE TABLE customers (id INT, name VARCHAR(255), broadband_plan_id INT, usage DECIMAL(10,2), created_at TIMESTAMP); CREATE TABLE broadband_plans (id INT, name VARCHAR(255), price DECIMAL(10,2));","SELECT c.name, bp.name, SUM(c.usage) as total_usage FROM customers c JOIN broadband_plans bp ON c.broadband_plan_id = bp.id WHERE c.created_at >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY c.name, bp.name ORDER BY total_usage DESC LIMIT 5;","SELECT customers.name, broadband_plans.name, broadband_plans.price FROM customers INNER JOIN broadband_plans ON customers.broadband_plan_id = broadband_plans.id WHERE customers.created_at >= DATEADD(month, -1, GETDATE()) GROUP BY customers.name ORDER BY broadband_plans.price DESC LIMIT 5;",0 What event has a time of 7:45.67?,"CREATE TABLE table_name_62 (event VARCHAR, time VARCHAR);","SELECT event FROM table_name_62 WHERE time = ""7:45.67"";","SELECT event FROM table_name_62 WHERE time = ""7:45.67"";",1 List the names of soccer teams in the Premier League that have more than 50% of their players born outside of the UK.,"CREATE TABLE IF NOT EXISTS players (id INT, name VARCHAR(50), position VARCHAR(50), team VARCHAR(50), country VARCHAR(50)); CREATE VIEW IF NOT EXISTS uk_players AS SELECT team, COUNT(*) AS count FROM players WHERE country = 'UK' GROUP BY team;",SELECT team FROM players JOIN uk_players ON players.team = uk_players.team WHERE players.team IN (SELECT team FROM uk_players WHERE count < COUNT(*) * 0.5) AND players.country != 'UK' GROUP BY team HAVING COUNT(*) > (SELECT COUNT(*)/2 FROM players WHERE team = players.team);,SELECT team FROM uk_players GROUP BY team HAVING COUNT(*) > 50;,0 What is the minimum budget for all projects in the infrastructure development database?,"CREATE TABLE if not exists Projects (id INT, name VARCHAR(50), type VARCHAR(50), budget DECIMAL(10,2)); ",SELECT MIN(budget) FROM Projects;,SELECT MIN(budget) FROM Projects WHERE type = 'Infrastructure Development';,0 Show the top 3 states with the highest number of rural hospitals,"CREATE TABLE rural_hospitals (id INT, name VARCHAR(50), state VARCHAR(20)); ","SELECT state, COUNT(*) as num_hospitals FROM rural_hospitals GROUP BY state ORDER BY num_hospitals DESC LIMIT 3;","SELECT state, COUNT(*) as hospital_count FROM rural_hospitals GROUP BY state ORDER BY hospital_count DESC LIMIT 3;",0 Insert new safety protocol records for the given chemicals and locations.,"CREATE TABLE safety_protocols (id INT PRIMARY KEY, chemical_id INT, location VARCHAR(255), safety_regulation VARCHAR(255), last_updated DATE);","INSERT INTO safety_protocols (id, chemical_id, location, safety_regulation, last_updated) VALUES (1, 11, 'New York', 'Regulation XYZ', '2022-03-01'), (2, 12, 'California', 'Regulation ABC', '2022-03-02'), (3, 13, 'Texas', 'Regulation LMN', '2022-03-03'), (4, 14, 'Florida', 'Regulation PQR', '2022-03-04'), (5, 15, 'Illinois', 'Regulation STU', '2022-03-05');","INSERT INTO safety_protocols (id, chemical_id, location, safety_regulation, last_updated) VALUES (1, 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals'), (2, 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals'), (3, 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals', 'Chemicals');",0 What is the average sustainability rating of fabrics from Bangladesh?,"CREATE TABLE fabric (fabric_id INT, fabric_name VARCHAR(50), origin_country VARCHAR(50), sustainability_rating INT); ","SELECT origin_country, AVG(sustainability_rating) FROM fabric WHERE origin_country = 'Bangladesh';",SELECT AVG(sustainability_rating) FROM fabric WHERE origin_country = 'Bangladesh';,0 What is the total number of area listed for cannonvale with a population less than 409?,"CREATE TABLE table_name_96 (area__km_2__ VARCHAR, population VARCHAR, place VARCHAR);","SELECT COUNT(area__km_2__) FROM table_name_96 WHERE population < 409 AND place = ""cannonvale"";","SELECT COUNT(area__km_2__) FROM table_name_96 WHERE population 409 AND place = ""cannonvale"";",0 What is the average donation amount per donor from 'Mexico' in the year 2020?,"CREATE TABLE Donors (DonorID int, DonorName varchar(100), Country varchar(50), DonationAmount decimal(10,2)); ",SELECT AVG(DonationAmount) FROM Donors WHERE Country = 'Mexico' AND YEAR(DonationDate) = 2020;,SELECT AVG(DonationAmount) FROM Donors WHERE Country = 'Mexico' AND YEAR(DonationDate) = 2020;,1 insert new military equipment sale records into sales_data,"CREATE TABLE sales_data (id INT, equipment_name TEXT, sale_date DATE, quantity INT, total_cost FLOAT);","INSERT INTO sales_data (id, equipment_name, sale_date, quantity, total_cost) VALUES (3, 'M2 Bradley', '2021-03-15', 8, 25000000), (4, 'APS-153 Radar', '2021-05-20', 1, 2000000);","INSERT INTO sales_data (id, equipment_name, sale_date, quantity, total_cost) VALUES (1, 'Military Equipment', '2022-03-01', '2022-03-31', '2022-03-31'), (2, 'Military Equipment', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31');",0 What is the percentage of sustainable projects in California out of all projects in the state?,"CREATE TABLE Projects (ProjectID INT, State CHAR(2), IsSustainable BOOLEAN); ",SELECT (COUNT(*) FILTER (WHERE Projects.IsSustainable = true) * 100.0 / COUNT(*)) AS SustainablePercentage FROM Projects WHERE Projects.State = 'CA';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Projects WHERE State = 'California')) AS Percentage FROM Projects WHERE State = 'California' AND IsSustainable = TRUE;,0 List the graduate students who have received a research grant but do not have an advisor.,"CREATE TABLE graduate_students (id INT, name VARCHAR(50), advisor VARCHAR(50), grant INT); ",SELECT name FROM graduate_students WHERE grant = 1 AND advisor IS NULL;,SELECT name FROM graduate_students WHERE advisor IS NULL;,0 How many teachers have participated in professional development programs per state?,"CREATE TABLE teachers (teacher_id INT, teacher_name TEXT, state TEXT); CREATE TABLE professional_development (pd_id INT, teacher_id INT, pd_program TEXT); ","SELECT t.state, COUNT(DISTINCT p.teacher_id) as num_teachers_pd FROM teachers t JOIN professional_development p ON t.teacher_id = p.teacher_id GROUP BY t.state;","SELECT t.state, COUNT(pd.teacher_id) FROM teachers t JOIN professional_development pd ON t.teacher_id = pd.teacher_id GROUP BY t.state;",0 "Show the addresses and phones of all the buildings managed by ""Brenden"".","CREATE TABLE Apartment_Buildings (building_address VARCHAR, building_phone VARCHAR, building_manager VARCHAR);","SELECT building_address, building_phone FROM Apartment_Buildings WHERE building_manager = ""Brenden"";","SELECT building_address, building_phone FROM Apartment_Buildings WHERE building_manager = ""Brenden"";",1 Identify virtual reality (VR) game designers who have designed games for more than one genre.,"CREATE TABLE Designers (DesignerID INT, DesignerName VARCHAR(50), VR_Designer BOOLEAN);CREATE TABLE Games (GameID INT, GameName VARCHAR(50), DesignerID INT, GameGenre VARCHAR(20));",SELECT d.DesignerName FROM Designers d INNER JOIN Games g1 ON d.DesignerID = g1.DesignerID INNER JOIN Games g2 ON d.DesignerID = g2.DesignerID AND g1.GameGenre != g2.GameGenre WHERE d.VR_Designer = TRUE;,SELECT Designers.DesignerName FROM Designers INNER JOIN Games ON Designers.DesignerID = Games.DesignerID WHERE Designers.VR_Designer = TRUE GROUP BY Designers.DesignerName HAVING COUNT(DISTINCT Games.GameGenre) > 1;,0 Count the number of explainable AI models developed by each organization and return the TOP 3 organizations with the highest count?,"CREATE TABLE ExplainableAI (id INT, model_name VARCHAR(50), organization VARCHAR(50)); ","SELECT organization, COUNT(model_name) as model_count FROM ExplainableAI GROUP BY organization ORDER BY model_count DESC LIMIT 3;","SELECT organization, COUNT(*) as num_models FROM ExplainableAI GROUP BY organization ORDER BY num_models DESC LIMIT 3;",0 Game 2 has how much attendance?,"CREATE TABLE table_name_1 (attendance VARCHAR, game VARCHAR);",SELECT attendance FROM table_name_1 WHERE game = 2;,SELECT attendance FROM table_name_1 WHERE game = 2;,1 Who was eliminated that entered after number 3 and lasted 35:55?,"CREATE TABLE table_name_74 (eliminated VARCHAR, entered VARCHAR, time VARCHAR);","SELECT eliminated FROM table_name_74 WHERE entered > 3 AND time = ""35:55"";","SELECT eliminated FROM table_name_74 WHERE entered > 3 AND time = ""35:55"";",1 What is the mean number of caps for Ryota Asano?,"CREATE TABLE table_name_67 (caps INTEGER, player VARCHAR);","SELECT AVG(caps) FROM table_name_67 WHERE player = ""ryota asano"";","SELECT AVG(caps) FROM table_name_67 WHERE player = ""ryota asano"";",1 List all eco-certified accommodations with more than 500 visitors in 2021,"CREATE TABLE accommodations (id INT, country VARCHAR(50), is_eco_certified BOOLEAN, visitors INT, year INT); ","SELECT country, visitors FROM accommodations WHERE is_eco_certified = TRUE AND visitors > 500 AND year = 2021;",SELECT * FROM accommodations WHERE is_eco_certified = true AND visitors > 500 AND year = 2021;,0 On what date was the Result l 38-14?,"CREATE TABLE table_name_46 (date VARCHAR, result VARCHAR);","SELECT date FROM table_name_46 WHERE result = ""l 38-14"";","SELECT date FROM table_name_46 WHERE result = ""l 38-14"";",1 How many farms in France have a stock level greater than 400?,"CREATE TABLE FarmLocation (LocationID INT, FarmName VARCHAR(50), Country VARCHAR(50), StockLevel INT); ",SELECT COUNT(*) FROM FarmLocation WHERE Country = 'France' AND StockLevel > 400;,SELECT COUNT(*) FROM FarmLocation WHERE Country = 'France' AND StockLevel > 400;,1 What's the lower house majority in the state whose Senior senator is J. Shaheen?,"CREATE TABLE table_21531764_2 (lower_house_majority VARCHAR, senior_us_senator VARCHAR);","SELECT lower_house_majority FROM table_21531764_2 WHERE senior_us_senator = ""J. Shaheen"";","SELECT lower_house_majority FROM table_21531764_2 WHERE senior_us_senator = ""J. Shaheen"";",1 Who is everyone on the men's doubles when men's singles is Ma Wenge?,"CREATE TABLE table_28211988_1 (mens_doubles VARCHAR, mens_singles VARCHAR);","SELECT mens_doubles FROM table_28211988_1 WHERE mens_singles = ""Ma Wenge"";","SELECT mens_doubles FROM table_28211988_1 WHERE mens_singles = ""Ma Wenge"";",1 How many donations were made in January 2021?,"CREATE TABLE donations (id INT, donation_date DATE); ",SELECT COUNT(*) FROM donations WHERE donation_date BETWEEN '2021-01-01' AND '2021-01-31';,SELECT COUNT(*) FROM donations WHERE donation_date BETWEEN '2021-01-01' AND '2021-01-31';,1 What is the NFL club of the cornerback player with a pick greater than 63?,"CREATE TABLE table_name_34 (nfl_club VARCHAR, pick VARCHAR, position VARCHAR);","SELECT nfl_club FROM table_name_34 WHERE pick > 63 AND position = ""cornerback"";","SELECT nfl_club FROM table_name_34 WHERE pick > 63 AND position = ""cornerback"";",1 "Insert a new record into the 'suppliers' table with id 101, name 'Green Supplies', 'country' 'USA', and 'renewable_material_usage' as 90%","CREATE TABLE suppliers (id INT, name VARCHAR(255), country VARCHAR(255), renewable_material_usage DECIMAL(5,2));","INSERT INTO suppliers (id, name, country, renewable_material_usage) VALUES (101, 'Green Supplies', 'USA', 0.90);","INSERT INTO suppliers (id, name, country, renewable_material_usage) VALUES (101, 'Green Supplies', 'USA', 90%);",0 What is the average price of recycled textile products in different regions?,"CREATE TABLE recycled_textile_prices (region VARCHAR(50), price INT); ","SELECT region, AVG(price) FROM recycled_textile_prices GROUP BY region;","SELECT region, AVG(price) FROM recycled_textile_prices GROUP BY region;",1 List all smart contracts with a risk score above 75.,"CREATE TABLE smart_contracts (id INT, name TEXT, risk_score INT); ",SELECT * FROM smart_contracts WHERE risk_score > 75;,SELECT name FROM smart_contracts WHERE risk_score > 75;,0 What was the highest scoring FIFA World Cup match in history?,"CREATE TABLE fifa_games (game_id INT, season_year INT, team1 VARCHAR(50), team2 VARCHAR(50), score1 INT, score2 INT);","SELECT team1, team2, GREATEST(score1, score2) AS total_score FROM fifa_games ORDER BY total_score DESC LIMIT 1;",SELECT MAX(score1) FROM fifa_games;,0 What is the total revenue of products that are sustainably sourced?,"CREATE TABLE products (product_id INT, name VARCHAR(50), is_sustainable BOOLEAN); CREATE TABLE sales (sale_id INT, product_id INT, revenue DECIMAL(10,2)); ",SELECT SUM(sales.revenue) FROM sales JOIN products ON sales.product_id = products.product_id WHERE products.is_sustainable = true;,SELECT SUM(sales.revenue) FROM sales INNER JOIN products ON sales.product_id = products.product_id WHERE products.is_sustainable = true;,0 How many climate adaptation projects were completed in North America?,"CREATE TABLE climate_adaptation (region VARCHAR(255), project_status VARCHAR(255)); ",SELECT COUNT(*) FROM climate_adaptation WHERE region = 'North America' AND project_status = 'completed';,SELECT COUNT(*) FROM climate_adaptation WHERE region = 'North America' AND project_status = 'Completed';,0 List the top 3 countries with the most gold medals won in the olympic_medals dataset.,"CREATE TABLE olympic_medals (country VARCHAR(50), medal VARCHAR(50), year INT);","SELECT country, COUNT(medal) as total_golds FROM olympic_medals WHERE medal = 'gold' GROUP BY country ORDER BY total_golds DESC LIMIT 3;","SELECT country, medal FROM olympic_medals ORDER BY medal DESC LIMIT 3;",0 What is the average number of likes on posts from users in the United States?,"CREATE TABLE users (id INT, country VARCHAR(255)); CREATE TABLE posts (id INT, user_id INT, likes INT); ",SELECT AVG(posts.likes) FROM posts JOIN users ON posts.user_id = users.id WHERE users.country = 'United States';,SELECT AVG(posts.likes) FROM posts INNER JOIN users ON posts.user_id = users.id WHERE users.country = 'United States';,0 Who took the winning slot at the Vojens venue?,"CREATE TABLE table_name_29 (winners VARCHAR, venue VARCHAR);","SELECT winners FROM table_name_29 WHERE venue = ""vojens"";","SELECT winners FROM table_name_29 WHERE venue = ""vojens"";",1 Who are the astronauts that have not been on any mission for 'SpacePioneers'?,"CREATE TABLE Astronauts (id INT, name VARCHAR(50), organization VARCHAR(50)); CREATE TABLE Missions (id INT, astronaut_id INT, company VARCHAR(50), mission_type VARCHAR(50)); ",SELECT a.name FROM Astronauts a LEFT JOIN Missions m ON a.id = m.astronaut_id AND a.organization = m.company WHERE m.id IS NULL AND a.organization = 'SpacePioneers';,SELECT Astronauts.name FROM Astronauts INNER JOIN Missions ON Astronauts.id = Missions.astronaut_id WHERE Missions.company = 'SpacePioneers';,0 What is the total number of animals rescued by each organization in the last 3 years?,"CREATE TABLE animal_rescue_data (organization VARCHAR(255), year INT, animals_rescued INT);","SELECT organization, SUM(animals_rescued) FROM animal_rescue_data WHERE year BETWEEN 2020 AND 2022 GROUP BY organization;","SELECT organization, SUM(animals_rescued) as total_rescued FROM animal_rescue_data WHERE year >= YEAR(CURRENT_DATE) - 3 GROUP BY organization;",0 What is the title of the episode written by David J. Burke?,"CREATE TABLE table_name_6 (title VARCHAR, written_by VARCHAR);","SELECT title FROM table_name_6 WHERE written_by = ""david j. burke"";","SELECT title FROM table_name_6 WHERE written_by = ""david j. burke"";",1 Update the name column to 'Sustainability' for all records in the sustainability_initiatives table with 'Environment' as the current name,"CREATE TABLE sustainability_initiatives (sustainability_initiative_id INT, name VARCHAR(50), description TEXT, start_date DATE, end_date DATE);",UPDATE sustainability_initiatives SET name = 'Sustainability' WHERE name = 'Environment';,UPDATE sustainability_initiatives SET name = 'Sustainability' WHERE name = 'Environment';,1 What is the total round of the 129 pick?,"CREATE TABLE table_name_49 (round VARCHAR, pick__number VARCHAR);",SELECT COUNT(round) FROM table_name_49 WHERE pick__number = 129;,SELECT COUNT(round) FROM table_name_49 WHERE pick__number = 129;,1 What is Trevor Cann's nationality?,"CREATE TABLE table_name_10 (nationality VARCHAR, player VARCHAR);","SELECT nationality FROM table_name_10 WHERE player = ""trevor cann"";","SELECT nationality FROM table_name_10 WHERE player = ""trevor cann"";",1 How many customers have made purchases for both regular and sustainable fashion items?,"CREATE TABLE customers (id INT, name TEXT); CREATE TABLE orders (id INT, customer_id INT, item_id INT, order_value DECIMAL, is_sustainable BOOLEAN); CREATE TABLE items (id INT, name TEXT, category TEXT);","SELECT COUNT(DISTINCT c.id) FROM customers c JOIN orders o ON c.id = o.customer_id JOIN items i ON o.item_id = i.id WHERE i.category IN ('regular', 'sustainable');","SELECT COUNT(DISTINCT customers.id) FROM customers INNER JOIN orders ON customers.id = orders.customer_id INNER JOIN items ON orders.item_id = items.id WHERE items.category IN ('Regular', 'Sustainable');",0 Who is the player on a team from the 1970s?,"CREATE TABLE table_name_63 (player VARCHAR, team VARCHAR);","SELECT player FROM table_name_63 WHERE team = ""1970s"";","SELECT player FROM table_name_63 WHERE team = ""1970s"";",1 "Which neurology drugs had sales greater than $100,000,000?","CREATE TABLE sales (drug_class TEXT, drug_name TEXT, sales_amount INTEGER);",SELECT drug_class FROM sales WHERE drug_class = 'neurology' GROUP BY drug_class HAVING SUM(sales_amount) > 100000000;,SELECT drug_name FROM sales WHERE drug_class = 'Neurology' AND sales_amount > 100000000;,0 "Update ""collective_bargaining"" table where the ""union_id"" is 3","CREATE TABLE collective_bargaining (union_id INT, agreement_date DATE, agreement_duration INT); ",UPDATE collective_bargaining SET agreement_duration = 48 WHERE union_id = 3;,UPDATE collective_bargaining SET agreement_duration = agreement_duration WHERE union_id = 3;,0 What Player has more than 1 Touchdowns with 0 Extra Points and less than 50 Points?,"CREATE TABLE table_name_61 (player VARCHAR, points VARCHAR, touchdowns VARCHAR, extra_points VARCHAR);",SELECT player FROM table_name_61 WHERE touchdowns > 1 AND extra_points = 0 AND points < 50;,SELECT player FROM table_name_61 WHERE touchdowns > 1 AND extra_points = 0 AND points 50;,0 Season 9 all the titles were no. in series.,"CREATE TABLE table_27115960_1 (title VARCHAR, no_in_series VARCHAR);",SELECT title FROM table_27115960_1 WHERE no_in_series = 9;,SELECT title FROM table_27115960_1 WHERE no_in_series = 9;,1 List all stations with wheelchair accessibility on bus routes and subway lines.,"CREATE TABLE stations (station_id INT, station_name VARCHAR(255)); CREATE TABLE bus_stations (route_id INT, station_id INT, is_wheelchair_accessible BOOLEAN); CREATE TABLE subway_stations (line_id INT, station_id INT, is_wheelchair_accessible BOOLEAN);",SELECT s.station_name FROM stations s INNER JOIN bus_stations bs ON s.station_id = bs.station_id WHERE bs.is_wheelchair_accessible = TRUE UNION SELECT s.station_name FROM stations s INNER JOIN subway_stations ss ON s.station_id = ss.station_id WHERE ss.is_wheelchair_accessible = TRUE;,SELECT s.station_name FROM stations s JOIN bus_stations b ON s.station_id = b.station_id JOIN subway_stations s ON b.station_id = s.station_id WHERE b.is_wheelchair_accessible = true;,0 When was the game played against Astley Bridge 'a'?,"CREATE TABLE table_name_56 (date VARCHAR, opponents VARCHAR);","SELECT date FROM table_name_56 WHERE opponents = ""astley bridge 'a'"";","SELECT date FROM table_name_56 WHERE opponents = ""astley bridge 'a'"";",1 What is the average goals against when there are more than 42 played?,"CREATE TABLE table_name_55 (goals_against INTEGER, played INTEGER);",SELECT AVG(goals_against) FROM table_name_55 WHERE played > 42;,SELECT AVG(goals_against) FROM table_name_55 WHERE played > 42;,1 What is the average engagement rate for posts containing hashtags related to 'cooking' in the past week?,"CREATE TABLE posts (id INT, hashtags TEXT, engagement_rate DECIMAL(5, 2), timestamp TIMESTAMP); ","SELECT AVG(engagement_rate) FROM posts WHERE hashtags LIKE '%#cooking%' AND timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 WEEK);","SELECT AVG(engagement_rate) FROM posts WHERE hashtags LIKE '%cooking%' AND timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 WEEK);",0 What is the total sales of vegetarian dishes?,"CREATE TABLE menu (item VARCHAR(255), category VARCHAR(255), is_vegetarian BOOLEAN); CREATE TABLE orders (order_id INT, item VARCHAR(255), quantity INT); ",SELECT SUM(o.quantity) AS total_vegetarian_sales FROM orders o INNER JOIN menu m ON o.item = m.item WHERE m.is_vegetarian = TRUE;,SELECT SUM(quantity) FROM orders JOIN menu ON orders.item = menu.item WHERE menu.is_vegetarian = true;,0 How much water was consumed in the province of British Columbia in 2018?,"CREATE TABLE water_usage(province VARCHAR(20), year INT, consumption INT); ",SELECT consumption FROM water_usage WHERE province = 'British Columbia' AND year = 2018;,SELECT SUM(consumption) FROM water_usage WHERE province = 'British Columbia' AND year = 2018;,0 What are the unique types of player positions in the tryout?,CREATE TABLE tryout (pPos VARCHAR);,SELECT COUNT(DISTINCT pPos) FROM tryout;,SELECT DISTINCT pPos FROM tryout;,0 Delete records of workers who have worked more than 50 hours in the state of New York on non-sustainable projects.,"CREATE TABLE construction_labor (id INT, worker_name VARCHAR(50), hours_worked INT, project_type VARCHAR(20), state VARCHAR(20)); ",DELETE FROM construction_labor WHERE hours_worked > 50 AND project_type != 'Sustainable' AND state = 'New York';,DELETE FROM construction_labor WHERE hours_worked > 50 AND state = 'New York' AND project_type = 'Non-sustainable';,0 What's the 1996 if 1986 has a 1R?,CREATE TABLE table_name_53 (Id VARCHAR);,"SELECT 1996 FROM table_name_53 WHERE 1986 = ""1r"";","SELECT 1996 FROM table_name_53 WHERE 1986 = ""1r"";",1 What is the percentage of female students in the Physics department?,"CREATE TABLE student_records(id INT, gender TEXT, department TEXT); ",SELECT 100.0 * COUNT(*) / (SELECT COUNT(*) FROM student_records WHERE department = 'Physics') FROM student_records WHERE gender = 'female' AND department = 'Physics';,SELECT (COUNT(*) FILTER (WHERE gender = 'Female')) * 100.0 / COUNT(*) FROM student_records WHERE department = 'Physics';,0 Find the average number of virtual tour bookings per user in 'Europe'?,"CREATE TABLE user_bookings (user_id INT, country TEXT, num_virtual_tours INT); CREATE TABLE countries (country TEXT, continent TEXT); ",SELECT AVG(num_virtual_tours) FROM user_bookings WHERE country IN (SELECT country FROM countries WHERE continent = 'Europe');,SELECT AVG(num_virtual_tours) FROM user_bookings JOIN countries ON user_bookings.country = countries.country WHERE countries.continent = 'Europe';,0 What is the highest frequency from uncionfeypoder.com?,"CREATE TABLE table_name_79 (frequency INTEGER, website VARCHAR);","SELECT MAX(frequency) FROM table_name_79 WHERE website = ""uncionfeypoder.com"";","SELECT MAX(frequency) FROM table_name_79 WHERE website = ""uncionfeypoder.com"";",1 Who was the losing team on June 16?,"CREATE TABLE table_name_25 (losing_team VARCHAR, date VARCHAR);","SELECT losing_team FROM table_name_25 WHERE date = ""june 16"";","SELECT losing_team FROM table_name_25 WHERE date = ""june 16"";",1 How many positions have a played greater than 12?,"CREATE TABLE table_name_26 (position VARCHAR, played INTEGER);",SELECT COUNT(position) FROM table_name_26 WHERE played > 12;,SELECT COUNT(position) FROM table_name_26 WHERE played > 12;,1 What team played Hawthorn?,"CREATE TABLE table_name_82 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team FROM table_name_82 WHERE home_team = ""hawthorn"";","SELECT away_team FROM table_name_82 WHERE home_team = ""hawthorn"";",1 What is the Series leader with a Date that is may 31?,"CREATE TABLE table_name_64 (series_leader VARCHAR, date VARCHAR);","SELECT series_leader FROM table_name_64 WHERE date = ""may 31"";","SELECT series_leader FROM table_name_64 WHERE date = ""may 31"";",1 What is the average number of yellow cards received by each soccer team in the EPL?,"CREATE TABLE epl_cards (team_id INT, team VARCHAR(50), yellow_cards INT, red_cards INT); ","SELECT team, AVG(yellow_cards) FROM epl_cards GROUP BY team;","SELECT team, AVG(yellow_cards) as avg_yellow_cards FROM epl_cards GROUP BY team;",0 Calculate the total amount donated by top 3 donors in Q1 2022.,"CREATE TABLE Donations (DonationID int, DonationDate date, Amount decimal(10,2)); ","SELECT SUM(Amount) as TotalDonation FROM (SELECT DonorID, SUM(Amount) as Amount FROM Donations WHERE DonationDate BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY DonorID ORDER BY Amount DESC LIMIT 3) as TopDonors;",SELECT SUM(Amount) FROM Donations WHERE DonationDate BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY DonationID ORDER BY SUM(Amount) DESC LIMIT 3;,0 Delete all transactions associated with account type 'Standard'.,"CREATE TABLE accounts (account_id INT, account_type TEXT); CREATE TABLE transactions (transaction_id INT, account_id INT, amount DECIMAL(10, 2)); ",DELETE FROM transactions WHERE transactions.account_id IN (SELECT accounts.account_id FROM accounts WHERE accounts.account_type = 'Standard');,DELETE FROM transactions WHERE account_id = (SELECT account_id FROM accounts WHERE account_type = 'Standard');,0 A competition of test taking place on 23 Apr 1988 had what as a score?,"CREATE TABLE table_name_51 (score VARCHAR, competition VARCHAR, date VARCHAR);","SELECT score FROM table_name_51 WHERE competition = ""test"" AND date = ""23 apr 1988"";","SELECT score FROM table_name_51 WHERE competition = ""test"" AND date = ""23 april 1988"";",0 Who was the lead envoy of the congratulation mission in 1718 with the Ryūkyūan King shō kei?,"CREATE TABLE table_name_10 (lead_envoy VARCHAR, year VARCHAR, ryūkyūan_king VARCHAR, mission_type VARCHAR);","SELECT lead_envoy FROM table_name_10 WHERE ryūkyūan_king = ""shō kei"" AND mission_type = ""congratulation"" AND year = 1718;","SELECT lead_envoy FROM table_name_10 WHERE rykyan_king = ""sh kei"" AND mission_type = ""congratulation"" AND year = 1718;",0 what is the tie no when the away team is solihull moors?,"CREATE TABLE table_name_82 (tie_no INTEGER, away_team VARCHAR);","SELECT SUM(tie_no) FROM table_name_82 WHERE away_team = ""solihull moors"";","SELECT SUM(tie_no) FROM table_name_82 WHERE away_team = ""solihull moors"";",1 What is the biggest week with an opponent of washington redskins?,"CREATE TABLE table_name_18 (week INTEGER, opponent VARCHAR);","SELECT MAX(week) FROM table_name_18 WHERE opponent = ""washington redskins"";","SELECT MAX(week) FROM table_name_18 WHERE opponent = ""washington redskins"";",1 What is the maximum GPA of graduate students in the Mathematics department who have published at least one paper?,"CREATE SCHEMA if not exists higher_ed;CREATE TABLE if not exists higher_ed.students(id INT, name VARCHAR(255), department VARCHAR(255), gpa DECIMAL(3,2));CREATE TABLE if not exists higher_ed.publications(id INT, title VARCHAR(255), author_id INT);",SELECT MAX(s.gpa) FROM higher_ed.students s JOIN higher_ed.publications p ON s.id = p.author_id WHERE s.department = 'Mathematics' GROUP BY s.id HAVING COUNT(p.id) > 0;,SELECT MAX(gpa) FROM higher_ed.students WHERE department = 'Mathematics';,0 Which Year is the lowest one that has a To par of –1?,"CREATE TABLE table_name_93 (year INTEGER, to_par VARCHAR);","SELECT MIN(year) FROM table_name_93 WHERE to_par = ""–1"";","SELECT MIN(year) FROM table_name_93 WHERE to_par = ""–1"";",1 Name the total number of popular votes for mn attorney general in 1994,"CREATE TABLE table_name_74 (popular_votes VARCHAR, office VARCHAR, year VARCHAR);","SELECT COUNT(popular_votes) FROM table_name_74 WHERE office = ""mn attorney general"" AND year = 1994;","SELECT COUNT(popular_votes) FROM table_name_74 WHERE office = ""mn attorney general"" AND year = 1994;",1 Name the horizontal 0 for 通 tong,"CREATE TABLE table_25519358_1 (horizontal_0_a VARCHAR, name VARCHAR);","SELECT horizontal_0_a FROM table_25519358_1 WHERE name = ""通 TONG"";","SELECT horizontal_0_a FROM table_25519358_1 WHERE name = "" Tong"";",0 What are the top 5 countries with the most security incidents in the past month?,"CREATE TABLE security_incidents (id INT, timestamp TIMESTAMP, country VARCHAR(255), incident_type VARCHAR(255)); ","SELECT country, COUNT(*) as incident_count FROM security_incidents WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 MONTH) GROUP BY country ORDER BY incident_count DESC LIMIT 5;","SELECT country, COUNT(*) as incident_count FROM security_incidents WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY country ORDER BY incident_count DESC LIMIT 5;",0 What is the minimum claim amount for policyholders living in 'Ohio' who have policies issued before '2019-01-01'?,"CREATE TABLE policyholders (id INT, name TEXT, state TEXT); CREATE TABLE policies (id INT, policyholder_id INT, issue_date DATE, claim_amount FLOAT); ",SELECT MIN(claim_amount) FROM policies INNER JOIN policyholders ON policies.policyholder_id = policyholders.id WHERE policies.issue_date < '2019-01-01' AND policyholders.state = 'OH';,SELECT MIN(claim_amount) FROM policies JOIN policyholders ON policies.policyholder_id = policyholders.id WHERE policyholders.state = 'Ohio' AND policyholders.issue_date '2019-01-01';,0 What category was Brian D'arcy James nominated for?,"CREATE TABLE table_name_6 (category VARCHAR, nominee VARCHAR, result VARCHAR);","SELECT category FROM table_name_6 WHERE nominee = ""brian d'arcy james"" AND result = ""nominated"";","SELECT category FROM table_name_6 WHERE nominee = ""brian d'arcy james"" AND result = ""nominated"";",1 What is the Player that has a To standard of –4?,"CREATE TABLE table_name_15 (player VARCHAR, to_par VARCHAR);","SELECT player FROM table_name_15 WHERE to_par = ""–4"";","SELECT player FROM table_name_15 WHERE to_par = ""–4"";",1 What are years that Obinna Ekezie played for the Grizzlies?,"CREATE TABLE table_name_94 (years_for_grizzlies VARCHAR, player VARCHAR);","SELECT years_for_grizzlies FROM table_name_94 WHERE player = ""obinna ekezie"";","SELECT years_for_grizzlies FROM table_name_94 WHERE player = ""obinna ekezie"";",1 "For each restaurant, list the meals that have a calorie count above the average calorie count for all meals in the restaurant.","CREATE TABLE Restaurants (RestaurantID INT, RestaurantName VARCHAR(50)); CREATE TABLE Meals (MealID INT, RestaurantID INT, MealName VARCHAR(50), CalorieCount INT); ","SELECT RestaurantName, MealName, CalorieCount FROM (SELECT RestaurantName, MealName, CalorieCount, AVG(CalorieCount) OVER (PARTITION BY RestaurantID) as avg_calories FROM Restaurants R JOIN Meals M ON R.RestaurantID = M.RestaurantID) t WHERE CalorieCount > avg_calories;","SELECT R.RestaurantName, AVG(M.CalorieCount) as AvgCalorieCount FROM Restaurants R INNER JOIN Meals M ON R.RestaurantID = M.RestaurantID GROUP BY R.RestaurantName HAVING AvgCalorieCount > (SELECT AVG(CalorieCount) FROM Meals);",0 "For what nation is the gold medals 0, and the bronze medals less than 1?","CREATE TABLE table_name_28 (nation VARCHAR, gold VARCHAR, bronze VARCHAR);",SELECT nation FROM table_name_28 WHERE gold = 0 AND bronze < 1;,SELECT nation FROM table_name_28 WHERE gold = 0 AND bronze 1;,0 What is the maximum claim amount per policyholder in California?,"CREATE TABLE Policyholders (ID INT, ClaimAmount DECIMAL(10, 2), State VARCHAR(50)); ","SELECT State, MAX(ClaimAmount) FROM Policyholders WHERE State = 'California' GROUP BY State;",SELECT MAX(ClaimAmount) FROM Policyholders WHERE State = 'California';,0 List the top 5 states in the United States with the highest percentage of prison population reduction due to criminal justice reform between 2015 and 2020?,"CREATE TABLE prison_population (state VARCHAR(255), population INT, year INT); CREATE TABLE criminal_justice_reform (state VARCHAR(255), reduction_percentage DECIMAL(5,2)); ","SELECT state, reduction_percentage FROM criminal_justice_reform WHERE state IN (SELECT state FROM prison_population WHERE year BETWEEN 2015 AND 2020) ORDER BY reduction_percentage DESC LIMIT 5;","SELECT prison_population.state, criminal_justice_reform.reduction_percentage FROM prison_population INNER JOIN criminal_justice_reform ON prison_population.state = criminal_justice_reform.state WHERE prison_population.year BETWEEN 2015 AND 2020 GROUP BY prison_population.state ORDER BY reduction_percentage DESC LIMIT 5;",0 Which races have 137 points?,"CREATE TABLE table_25318033_1 (races VARCHAR, points VARCHAR);","SELECT races FROM table_25318033_1 WHERE points = ""137"";",SELECT races FROM table_25318033_1 WHERE points = 137;,0 "What is the Chipset based on with a Digital/analog signal of analog, with an Available interface of agp, with Retail name with all-in-wonder 9800?","CREATE TABLE table_name_18 (chipset_based_on VARCHAR, retail_name VARCHAR, digital_analog_signal VARCHAR, available_interface VARCHAR);","SELECT chipset_based_on FROM table_name_18 WHERE digital_analog_signal = ""analog"" AND available_interface = ""agp"" AND retail_name = ""all-in-wonder 9800"";","SELECT chipset_based_on FROM table_name_18 WHERE digital_analog_signal = ""analog"" AND available_interface = ""agp"" AND retail_name = ""all-in-wonder 9800"";",1 What is the bronze number for the nation with less than 0 gold?,"CREATE TABLE table_name_53 (bronze INTEGER, gold INTEGER);",SELECT MIN(bronze) FROM table_name_53 WHERE gold < 0;,SELECT SUM(bronze) FROM table_name_53 WHERE gold 0;,0 What is the total number of infectious disease cases reported in Texas in 2021?,"CREATE TABLE CasesByYear (CaseID INT, Age INT, Gender VARCHAR(10), City VARCHAR(20), Disease VARCHAR(20), Year INT); ","SELECT COUNT(*) FROM CasesByYear WHERE City = 'Texas' AND Year = 2021 AND Disease IN ('Cholera', 'Tuberculosis', 'Measles', 'Influenza');",SELECT COUNT(*) FROM CasesByYear WHERE City = 'Texas' AND Disease = 'Infectious Disease' AND Year = 2021;,0 Find the dish with the highest price in the 'Pizza' category,"CREATE TABLE menu (dish_name TEXT, category TEXT, price DECIMAL); ","SELECT dish_name, MAX(price) FROM menu WHERE category = 'Pizza' GROUP BY category;","SELECT dish_name, MAX(price) FROM menu WHERE category = 'Pizza' GROUP BY dish_name;",0 When was became dauphine when birth is 1393?,"CREATE TABLE table_name_72 (became_dauphine VARCHAR, birth VARCHAR);","SELECT became_dauphine FROM table_name_72 WHERE birth = ""1393"";",SELECT became_dauphine FROM table_name_72 WHERE birth = 1393;,0 What is the total number of AI safety violations in the past 24 months for each region?,"CREATE TABLE ai_safety_violations_by_region (violation_id INT PRIMARY KEY, violation_date DATE, region VARCHAR(255));","SELECT region, COUNT(*) AS violation_count FROM ai_safety_violations_by_region WHERE violation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 24 MONTH) GROUP BY region;","SELECT region, COUNT(*) as total_violations FROM ai_safety_violations_by_region WHERE violation_date >= DATEADD(month, -24, GETDATE()) GROUP BY region;",0 What is the average age of astronauts who have piloted Dragon spacecraft on missions to ISS?,"CREATE TABLE astronauts (id INT, name VARCHAR(50), age INT, spacecraft_experience VARCHAR(50));CREATE TABLE missions (id INT, astronaut_id INT, spacecraft VARCHAR(50), mission_destination VARCHAR(50)); ",SELECT AVG(astronauts.age) FROM astronauts INNER JOIN missions ON astronauts.id = missions.astronaut_id WHERE astronauts.spacecraft_experience = 'Dragon' AND missions.mission_destination = 'ISS';,SELECT AVG(a.age) FROM astronauts a JOIN missions m ON a.id = m.astronaut_id WHERE a.spacecraft_experience = 'Dragon' AND m.mission_destination = 'ISS';,0 How many articles were published by each author in the 'articles' table in 2022?,"CREATE TABLE articles (id INT, title VARCHAR(255), author VARCHAR(255), content TEXT, date DATE); ","SELECT author, COUNT(*) as article_count FROM articles WHERE date >= '2022-01-01' AND date < '2023-01-01' GROUP BY author;","SELECT author, COUNT(*) FROM articles WHERE date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY author;",0 Where is the location for the home rink Triangle sports plex/Greensboro ice house?,"CREATE TABLE table_name_36 (location VARCHAR, home_rink VARCHAR);","SELECT location FROM table_name_36 WHERE home_rink = ""triangle sports plex/greensboro ice house"";","SELECT location FROM table_name_36 WHERE home_rink = ""triangle sports plex/greensboro ice house"";",1 What was the total budget for climate adaptation projects starting in 2022?,"CREATE TABLE climate_adaptation (project_name TEXT, budget INTEGER, start_date DATE); ",SELECT SUM(budget) FROM climate_adaptation WHERE start_date >= '2022-01-01';,SELECT SUM(budget) FROM climate_adaptation WHERE start_date BETWEEN '2022-01-01' AND '2022-12-31';,0 How many events does the tournament with a top-10 of 2 and more than 5 cuts have?,"CREATE TABLE table_name_77 (events INTEGER, top_10 VARCHAR, cuts_made VARCHAR);",SELECT SUM(events) FROM table_name_77 WHERE top_10 = 2 AND cuts_made > 5;,SELECT SUM(events) FROM table_name_77 WHERE top_10 = 2 AND cuts_made > 5;,1 Which cities are in European countries where English is not the official language?,"CREATE TABLE city (Name VARCHAR, CountryCode VARCHAR); CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, IsOfficial VARCHAR, Language VARCHAR); CREATE TABLE country (Code VARCHAR, Continent VARCHAR, Name VARCHAR);",SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND NOT T1.Name IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English');,SELECT T1.Name FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode JOIN countrylanguage AS T3 ON T2.CountryCode = T3.CountryCode WHERE T3.IsOfficial = 'English' AND T3.Language = 'English' AND T3.Continent = 'Europe';,0 What is the average life expectancy in each region of sub-Saharan Africa?,"CREATE TABLE sub_saharan_africa_regions (id INT, name VARCHAR(255)); CREATE TABLE life_expectancy (id INT, region_id INT, expectancy DECIMAL(5,2)); ","SELECT r.name, AVG(le.expectancy) FROM life_expectancy le JOIN sub_saharan_africa_regions r ON le.region_id = r.id GROUP BY r.name;","SELECT sub_saharan_africa_regions.name, AVG(life_expectancy.attendance) as avg_life_expectancy FROM sub_saharan_africa_regions INNER JOIN life_expectancy ON sub_saharan_africa_regions.id = life_expectancy.region_id GROUP BY sub_saharan_africa_regions.name;",0 Show member names without any registered branch.,"CREATE TABLE member (name VARCHAR, member_id VARCHAR); CREATE TABLE membership_register_branch (name VARCHAR, member_id VARCHAR);",SELECT name FROM member WHERE NOT member_id IN (SELECT member_id FROM membership_register_branch);,SELECT T1.name FROM member AS T1 JOIN membership_register_branch AS T2 ON T1.member_id = T2.member_id WHERE T2.member_id IS NULL;,0 How many parcels were shipped to 'DEL' from each airport?,"CREATE TABLE shipments (id INT, source_airport VARCHAR(5), destination_airport VARCHAR(5), shipped_date DATE); ","SELECT source_airport, COUNT(*) FROM shipments WHERE destination_airport = 'DEL' GROUP BY source_airport;","SELECT source_airport, COUNT(*) FROM shipments WHERE destination_airport = 'DEL' GROUP BY source_airport;",1 Create a table that shows the average percentage of natural ingredients in each product,"CREATE TABLE product_ingredients (product_id INT, ingredient VARCHAR(255), percentage FLOAT, PRIMARY KEY (product_id, ingredient));","CREATE TABLE avg_natural_ingredients AS SELECT product_id, AVG(percentage) as avg_natural_ingredients FROM product_ingredients WHERE ingredient LIKE 'natural%' GROUP BY product_id;","CREATE TABLE product_ingredients (product_id INT, ingredient VARCHAR(255), percentage FLOAT);",0 What is the name of the Canadian astronaut who has been on the most missions?,"CREATE TABLE astronauts (id INT, name VARCHAR(50), agency VARCHAR(50), missions INT);",SELECT name FROM astronauts WHERE agency = 'Canada' ORDER BY missions DESC LIMIT 1;,SELECT name FROM astronauts WHERE agency = 'Canada' ORDER BY missions DESC LIMIT 1;,1 Delete vessels with no safety incidents from the Vessels table.,"CREATE TABLE Vessels (ID INT, Name VARCHAR(50), Type VARCHAR(50)); CREATE TABLE SafetyIncidents (ID INT, VesselID INT, Location VARCHAR(50), IncidentType VARCHAR(50)); ",DELETE v FROM Vessels v LEFT JOIN SafetyIncidents si ON v.ID = si.VesselID WHERE si.ID IS NULL;,DELETE FROM SafetyIncidents WHERE VesselID IS NULL;,0 Name the tier 1 ratio for irish life and permanent,"CREATE TABLE table_22368322_2 (tier_1_ratio VARCHAR, institution VARCHAR);","SELECT tier_1_ratio FROM table_22368322_2 WHERE institution = ""Irish Life and Permanent"";","SELECT tier_1_ratio FROM table_22368322_2 WHERE institution = ""Irish Life"";",0 What is the total cost of ingredients for each dish in the dinner menu?,"CREATE TABLE DinnerIngredients (id INT, dish_id INT, ingredient_id INT, cost INT);","SELECT d.name, SUM(di.cost) FROM DinnerIngredients di INNER JOIN DinnerMenu d ON di.dish_id = d.id GROUP BY d.name;","SELECT dish_id, SUM(cost) FROM DinnerIngredients GROUP BY dish_id;",0 What is the score for game 5?,"CREATE TABLE table_name_82 (score VARCHAR, game VARCHAR);",SELECT score FROM table_name_82 WHERE game = 5;,SELECT score FROM table_name_82 WHERE game = 5;,1 What place did the Sake Tuyas come in when the Denim Demons were 4th?,"CREATE TABLE table_29619494_2 (sake_tuyas VARCHAR, denim_demons VARCHAR);","SELECT sake_tuyas FROM table_29619494_2 WHERE denim_demons = ""4th"";","SELECT sake_tuyas FROM table_29619494_2 WHERE denim_demons = ""4th"";",1 What was the Report for the Monaco race?,"CREATE TABLE table_name_32 (report VARCHAR, location VARCHAR);","SELECT report FROM table_name_32 WHERE location = ""monaco"";","SELECT report FROM table_name_32 WHERE location = ""monaco"";",1 Name the matches for wickets 17,"CREATE TABLE table_17900317_5 (matches VARCHAR, wickets VARCHAR);",SELECT matches FROM table_17900317_5 WHERE wickets = 17;,SELECT matches FROM table_17900317_5 WHERE wickets = 17;,1 What is the Record of the Game after 40 with New York Rangers as Opponent?,"CREATE TABLE table_name_5 (record VARCHAR, game VARCHAR, opponent VARCHAR);","SELECT record FROM table_name_5 WHERE game > 40 AND opponent = ""new york rangers"";","SELECT record FROM table_name_5 WHERE game > 40 AND opponent = ""new york rangers"";",1 How many rounds was the fight at UFC 34?,"CREATE TABLE table_name_7 (round INTEGER, event VARCHAR);","SELECT SUM(round) FROM table_name_7 WHERE event = ""ufc 34"";","SELECT SUM(round) FROM table_name_7 WHERE event = ""ufc 34"";",1 What is the total number of emergency calls during rush hours in 'Bronx'?,"CREATE TABLE emergencies (id INT, hour INT, neighborhood VARCHAR(20), response_time FLOAT); ","SELECT COUNT(*) FROM emergencies WHERE neighborhood = 'Bronx' AND hour IN (7, 8, 16, 17, 18);",SELECT COUNT(*) FROM emergencies WHERE neighborhood = 'Bronx' AND hour = 1;,0 What Nation of citizenship has a stock car vehicle with a year of 1999?,"CREATE TABLE table_name_78 (nation_of_citizenship VARCHAR, type_of_vehicle VARCHAR, year VARCHAR);","SELECT nation_of_citizenship FROM table_name_78 WHERE type_of_vehicle = ""stock car"" AND year = 1999;","SELECT nation_of_citizenship FROM table_name_78 WHERE type_of_vehicle = ""stock car"" AND year = 1999;",1 What is the total number of fish added to the Shrimp farm in 2021?,"CREATE TABLE FarmStock (farm_id INT, date DATE, action VARCHAR(10), quantity INT); ",SELECT SUM(quantity) total_fish FROM FarmStock WHERE farm_id = 3 AND YEAR(date) = 2021 AND action = 'added';,SELECT SUM(quantity) FROM FarmStock WHERE farm_id = 1 AND date BETWEEN '2021-01-01' AND '2021-12-31';,0 Which labor rights organization has the most members in the 'Government' domain?,"CREATE TABLE unions (id INT, name TEXT, domain TEXT); ",SELECT name FROM unions WHERE domain = 'Government' GROUP BY name ORDER BY COUNT(*) DESC LIMIT 1;,"SELECT name, COUNT(*) FROM unions WHERE domain = 'Government' GROUP BY name ORDER BY COUNT(*) DESC LIMIT 1;",0 How many creative AI models have a safety score above 0.95 and were developed in South Asia?,"CREATE TABLE safety_scores (model_id INT, region VARCHAR(50), safety FLOAT); ",SELECT COUNT(*) FROM safety_scores WHERE region = 'South Asia' AND safety > 0.95;,SELECT COUNT(*) FROM safety_scores WHERE region = 'South Asia' AND safety > 0.95;,1 How many smart contracts are there in the 'Avalanche' network?,"CREATE TABLE avalanche_smart_contracts (id INT, name VARCHAR(255), network VARCHAR(255)); ",SELECT COUNT(*) FROM avalanche_smart_contracts WHERE network = 'avalanche';,SELECT COUNT(*) FROM avalanche_smart_contracts WHERE network = 'Avalanche';,0 How many extreme weather events occurred in the North American Arctic?,"CREATE TABLE ClimateEvents ( id INT, type VARCHAR(50), location VARCHAR(50), start_date DATETIME, end_date DATETIME ); ","SELECT location, COUNT(id) as num_events FROM ClimateEvents WHERE location = 'North American Arctic' GROUP BY location HAVING COUNT(id) > 0;",SELECT COUNT(*) FROM ClimateEvents WHERE type = 'Extreme' AND location = 'North America Arctic';,0 "Add a new excavation site ""Chan Chan"" in Peru to the excavations table.","artifacts(artifact_id, name, description, date_found, excavation_site_id); excavations(excavation_site_id, name, location, start_date, end_date)","INSERT INTO excavations (excavation_site_id, name, location, start_date, end_date)","INSERT INTO excavations (excavation_site_id, name, location, start_date, end_date) VALUES ('Chan Chan', 'Peru');",0 Calculate the total number of food safety incidents for each category in the safety_incidents table.,"CREATE TABLE safety_incidents (incident_id INT, incident_category VARCHAR(50), incident_description TEXT); ","SELECT incident_category, COUNT(*) FROM safety_incidents GROUP BY incident_category;","SELECT incident_category, COUNT(*) FROM safety_incidents GROUP BY incident_category;",1 Name the % for core moldova being 4.36%,"CREATE TABLE table_19260_1 (_percentage VARCHAR, _percentage_core_moldova VARCHAR);","SELECT _percentage FROM table_19260_1 WHERE _percentage_core_moldova = ""4.36_percentage"";","SELECT _percentage FROM table_19260_1 WHERE _percentage_core_moldova = ""4.36%"";",0 Who was number 7 when Olivia was number 5 and Emma was number 2?,"CREATE TABLE table_name_16 (no_7 VARCHAR, no_5 VARCHAR, no_2 VARCHAR);","SELECT no_7 FROM table_name_16 WHERE no_5 = ""olivia"" AND no_2 = ""emma"";","SELECT no_7 FROM table_name_16 WHERE no_5 = ""olivia"" AND no_2 = ""emma"";",1 What was the average methane emission in 2019?,"CREATE TABLE gas_emissions (year INT, methane_emissions FLOAT); INSERT INTO gas_emissions",SELECT AVG(methane_emissions) FROM gas_emissions WHERE year = 2019;,SELECT AVG(methane_emissions) FROM gas_emissions WHERE year = 2019;,1 What is the average dapp rating for each category?,"CREATE TABLE dapp_categories (category_id INT, category_name VARCHAR(30), category_description TEXT, avg_rating DECIMAL(3,2), total_dapps INT); ","SELECT category_name, avg_rating FROM dapp_categories;","SELECT category_name, AVG(avg_rating) as avg_rating FROM dapp_categories GROUP BY category_name;",0 Show the total weight of cargo for vessels with a speed greater than 25 knots,"CREATE TABLE Vessels (Id INT, Name VARCHAR(50), Speed FLOAT, CargoWeight FLOAT); ",SELECT SUM(CargoWeight) FROM Vessels WHERE Speed > 25;,SELECT SUM(CargoWeight) FROM Vessels WHERE Speed > 25;,1 state the winnings of yates racing front row motorsports where poles were 0,"CREATE TABLE table_2012187_1 (winnings VARCHAR, poles VARCHAR, team_s_ VARCHAR);","SELECT winnings FROM table_2012187_1 WHERE poles = 0 AND team_s_ = ""Yates Racing Front Row Motorsports"";","SELECT winnings FROM table_2012187_1 WHERE poles = 0 AND team_s_ = ""Yates Racing Front Row Motorsports"";",1 What is the market share of autonomous buses in Singapore over time?,"CREATE TABLE BusSales(id INT, type VARCHAR(20), city VARCHAR(20), year INT, quantity INT);","SELECT type, city, AVG(quantity*100.0/SUM(quantity)) OVER (PARTITION BY type, city ORDER BY year ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) as market_share FROM BusSales WHERE city = 'Singapore' AND type IN ('Autonomous', 'Conventional') GROUP BY type, city, year ORDER BY year;","SELECT year, SUM(quantity) as total_quantity FROM BusSales WHERE city = 'Singapore' AND type = 'Autonomous' GROUP BY year;",0 What is the minimum clinical trial cost for drugs approved by the TGA?,"CREATE TABLE clinical_trials (drug_name VARCHAR(255), trial_cost FLOAT, approval_body VARCHAR(255)); ",SELECT MIN(trial_cost) FROM clinical_trials WHERE approval_body = 'TGA';,SELECT MIN(trial_cost) FROM clinical_trials WHERE approval_body = 'TGA';,1 Who was the winner and nominees for the movie directed by cary joji fukunaga?,"CREATE TABLE table_name_44 (winner_and_nominees VARCHAR, director VARCHAR);","SELECT winner_and_nominees FROM table_name_44 WHERE director = ""cary joji fukunaga"";","SELECT winner_and_nominees FROM table_name_44 WHERE director = ""cary joji fukunaga"";",1 How many marine protected areas are there in the South Atlantic Ocean?,"CREATE TABLE marine_protected_areas_sa (id INT, name VARCHAR(255), region VARCHAR(255)); ",SELECT COUNT(DISTINCT name) FROM marine_protected_areas_sa WHERE region = 'South Atlantic';,SELECT COUNT(*) FROM marine_protected_areas_sa WHERE region = 'South Atlantic Ocean';,0 What is the total budget for accommodations and support programs for students with learning disabilities in the Midwest?,"CREATE TABLE Accommodations (ID INT, Type VARCHAR(50), Cost FLOAT, Disability VARCHAR(50), Region VARCHAR(50)); CREATE TABLE SupportPrograms (ID INT, Type VARCHAR(50), Cost FLOAT, Disability VARCHAR(50), Region VARCHAR(50)); ","SELECT SUM(A.Cost) + SUM(S.Cost) FROM Accommodations A, SupportPrograms S WHERE A.Disability = 'Learning Disability' AND S.Disability = 'Learning Disability' AND A.Region = 'Midwest' AND S.Region = 'Midwest';",SELECT SUM(Accommodations.Cost) FROM Accommodations INNER JOIN SupportPrograms ON Accommodations.Type = SupportPrograms.Type WHERE Accommodations.Disability = 'Learning Disability' AND Accommodations.Region = 'Midwest';,0 What is the date of Gavril Radomir's Bulgarian Victory?,"CREATE TABLE table_name_15 (date VARCHAR, result VARCHAR, bulgarian_commander VARCHAR);","SELECT date FROM table_name_15 WHERE result = ""bulgarian victory"" AND bulgarian_commander = ""gavril radomir"";","SELECT date FROM table_name_15 WHERE result = ""bulgarian_victory"" AND bulgarian_commander = ""gavril radomir"";",0 Identify cities with only one restaurant.,"CREATE TABLE Restaurants (restaurant_id INT, name TEXT, city TEXT, revenue FLOAT); ",SELECT city FROM Restaurants GROUP BY city HAVING COUNT(*) = 1;,SELECT city FROM Restaurants GROUP BY city HAVING COUNT(DISTINCT restaurant_id) = 1;,0 Which excavation sites have more artifacts from the Roman period than the Iron Age?,"CREATE TABLE SiteArtifacts (SiteID INT, ArtifactID INT, Period TEXT); ",SELECT SiteID FROM SiteArtifacts WHERE Period = 'Roman' GROUP BY SiteID HAVING COUNT(*) > (SELECT COUNT(*) FROM SiteArtifacts WHERE SiteID = SiteArtifacts.SiteID AND Period = 'Iron Age'),SELECT SiteID FROM SiteArtifacts WHERE Period = 'Roman' GROUP BY SiteID HAVING COUNT(*) > (SELECT COUNT(*) FROM SiteArtifacts WHERE Period = 'Iron Age');,0 Which league goals has FA cup apps of 2?,"CREATE TABLE table_name_39 (league_goals VARCHAR, fa_cup_apps VARCHAR);",SELECT league_goals FROM table_name_39 WHERE fa_cup_apps = 2;,"SELECT league_goals FROM table_name_39 WHERE fa_cup_apps = ""2"";",0 "What is the average percentage of female and male employees for each company, with total funding?","CREATE TABLE Diversity_Metrics (company_name VARCHAR(50), gender VARCHAR(10), percentage FLOAT); ","SELECT f.company_name, gender, AVG(percentage) as avg_percentage, SUM(funding_amount) as total_funding FROM Diversity_Metrics d JOIN Funding_Records f ON d.company_name = f.company_name GROUP BY f.company_name, gender;","SELECT company_name, AVG(percentage) as avg_percentage, SUM(funding) as total_funding FROM Diversity_Metrics GROUP BY company_name;",0 What is the total revenue generated from warehouse management for customers in the Middle East in H2 2022?,"CREATE TABLE WarehouseManagement (id INT, customer VARCHAR(255), revenue FLOAT, region VARCHAR(255), half INT, year INT);",SELECT SUM(revenue) FROM WarehouseManagement WHERE region = 'Middle East' AND half = 2 AND year = 2022;,SELECT SUM(revenue) FROM WarehouseManagement WHERE region = 'Middle East' AND half = 2 AND year = 2022;,1 What is the total number of students and teachers involved in open pedagogy projects for each semester?,"CREATE TABLE semesters (semester_id INT, semester_name TEXT); CREATE TABLE student_open_pedagogy (student_id INT, semester_id INT); CREATE TABLE teacher_open_pedagogy (teacher_id INT, semester_id INT); ","SELECT s.semester_name, COUNT(sop.student_id) AS num_students, COUNT(top.teacher_id) AS num_teachers FROM semesters s LEFT JOIN student_open_pedagogy sop ON s.semester_id = sop.semester_id FULL OUTER JOIN teacher_open_pedagogy top ON s.semester_id = top.semester_id GROUP BY s.semester_name;","SELECT s.semester_name, COUNT(s.student_id) as total_students, COUNT(t.teacher_id) as total_teachers FROM semesters s JOIN student_open_pedagogy s ON s.semester_id = s.semester_id JOIN teacher_open_pedagogy t ON s.semester_id = t.semester_id GROUP BY s.semester_name;",0 What is the maximum and minimum energy efficiency rating for buildings in France?,"CREATE TABLE BuildingEfficiency ( BuildingID INT, Country VARCHAR(255), Rating FLOAT );","SELECT MAX(Rating) as MaxRating, MIN(Rating) as MinRating FROM BuildingEfficiency WHERE Country = 'France';","SELECT MAX(Rating), MIN(Rating) FROM BuildingEfficiency WHERE Country = 'France';",0 Who is the lw position player from a round greater than 10?,"CREATE TABLE table_name_76 (player VARCHAR, position VARCHAR, round VARCHAR);","SELECT player FROM table_name_76 WHERE position = ""lw"" AND round > 10;","SELECT player FROM table_name_76 WHERE position = ""lw"" AND round > 10;",1 what is the series number where the date of first broadcast is 16 october 2008?,"CREATE TABLE table_12995531_3 (series_number VARCHAR, date_of_first_broadcast VARCHAR);","SELECT series_number FROM table_12995531_3 WHERE date_of_first_broadcast = ""16 October 2008"";","SELECT series_number FROM table_12995531_3 WHERE date_of_first_broadcast = ""16 October 2008"";",1 "What is the Elevator of the Elected Elevated on September 21, 1179?","CREATE TABLE table_name_50 (elevator VARCHAR, elevated VARCHAR);","SELECT elevator FROM table_name_50 WHERE elevated = ""september 21, 1179"";","SELECT elevator FROM table_name_50 WHERE elevated = ""september 21, 1179"";",1 Delete all copper mines in Canada.,"CREATE TABLE mines (id INT, name TEXT, location TEXT, production_volume INT, mineral TEXT); ",DELETE FROM mines WHERE location = 'Canada' AND mineral = 'copper';,DELETE FROM mines WHERE mineral = 'Copper' AND location = 'Canada';,0 What is the average number of rounds for billy hicks who had an overall pick number bigger than 310?,"CREATE TABLE table_name_1 (round INTEGER, overall VARCHAR, name VARCHAR);","SELECT AVG(round) FROM table_name_1 WHERE overall > 310 AND name = ""billy hicks"";","SELECT AVG(round) FROM table_name_1 WHERE overall > 310 AND name = ""billy hicks"";",1 What is the draw for a match that had 10 points?,"CREATE TABLE table_name_37 (draw VARCHAR, points VARCHAR);","SELECT draw FROM table_name_37 WHERE points = ""10"";","SELECT draw FROM table_name_37 WHERE points = ""10"";",1 "List each owner's first name, last name, and the size of his for her dog.","CREATE TABLE Owners (first_name VARCHAR, last_name VARCHAR, owner_id VARCHAR); CREATE TABLE Dogs (size_code VARCHAR, owner_id VARCHAR);","SELECT T1.first_name, T1.last_name, T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id;","SELECT T1.first_name, T1.last_name, T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id;",1 Where did Brian Hightower play when he has the Conv of 0?,"CREATE TABLE table_name_47 (venue VARCHAR, conv VARCHAR, player VARCHAR);","SELECT venue FROM table_name_47 WHERE conv = ""0"" AND player = ""brian hightower"";","SELECT venue FROM table_name_47 WHERE conv = ""0"" AND player = ""brian hightower"";",1 What is the total number of workers employed in fair trade certified factories by country?,"CREATE TABLE fair_trade_factories (factory_id INT, factory_name VARCHAR(50), country VARCHAR(50), num_workers INT); ","SELECT country, SUM(num_workers) FROM fair_trade_factories GROUP BY country;","SELECT country, SUM(num_workers) FROM fair_trade_factories GROUP BY country;",1 Who played on waca ground and scored 79 points?,"CREATE TABLE table_name_43 (opponent VARCHAR, ground VARCHAR, score VARCHAR);","SELECT opponent FROM table_name_43 WHERE ground = ""waca ground"" AND score = ""79"";","SELECT opponent FROM table_name_43 WHERE ground = ""waca"" AND score = ""79"";",0 What is the total number of cases heard in each court type in each state?,"CREATE TABLE court_types (court_type_id INT, court_type_name VARCHAR(20), court_state VARCHAR(2)); CREATE TABLE court_cases (case_id INT, case_state VARCHAR(2), court_type_id INT, days_to_resolve INT); ","SELECT ct.court_type_name, cc.case_state, COUNT(cc.case_id) FROM court_types ct INNER JOIN court_cases cc ON ct.court_type_id = cc.court_type_id GROUP BY ct.court_type_name, cc.case_state;","SELECT court_types.court_state, COUNT(court_cases.case_id) as total_cases FROM court_types INNER JOIN court_cases ON court_types.court_type_id = court_cases.court_type_id GROUP BY court_types.court_state;",0 How many weights are there when the flange with is 304?,"CREATE TABLE table_2071644_2 (weight__kg_m_ VARCHAR, flange_width__mm_ VARCHAR);",SELECT COUNT(weight__kg_m_) FROM table_2071644_2 WHERE flange_width__mm_ = 304;,SELECT COUNT(weight__kg_m_) FROM table_2071644_2 WHERE flange_width__mm_ = 304;,1 "What is Mean Free Path, when Vacuum Range is ""medium vacuum""?","CREATE TABLE table_name_25 (mean_free_path VARCHAR, vacuum_range VARCHAR);","SELECT mean_free_path FROM table_name_25 WHERE vacuum_range = ""medium vacuum"";","SELECT mean_free_path FROM table_name_25 WHERE vacuum_range = ""medium vacuum"";",1 Find the number of public transportation trips in 'public_transportation' table that were taken in '2022-01-01' and '2022-12-31' and display the results by trip_type.,"CREATE TABLE public_transportation (id INT, trip_date DATE, trip_type VARCHAR(20), num_trips INT);","SELECT trip_type, COUNT(*) AS num_trips FROM public_transportation WHERE trip_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY trip_type;","SELECT trip_type, SUM(num_trips) FROM public_transportation WHERE trip_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY trip_type;",0 What is the ICAO in India with IATA TRZ?,"CREATE TABLE table_name_90 (icao VARCHAR, country VARCHAR, iata VARCHAR);","SELECT icao FROM table_name_90 WHERE country = ""india"" AND iata = ""trz"";","SELECT icao FROM table_name_90 WHERE country = ""india"" AND iata = ""trz"";",1 What is the average response time for police assistance requests in each sector?,"CREATE TABLE police_assistance (id INT, sector VARCHAR(50), response_time INT); ","SELECT sector, AVG(response_time) FROM police_assistance GROUP BY sector;","SELECT sector, AVG(response_time) FROM police_assistance GROUP BY sector;",1 What is the minimum age of visitors who attended the exhibition 'Frida Kahlo: Her Life and Art'?,"CREATE TABLE exhibitions (id INT, city VARCHAR(20), visitor_age INT, visit_date DATE); ",SELECT MIN(visitor_age) FROM exhibitions WHERE exhibition_name = 'Frida Kahlo: Her Life and Art';,SELECT MIN(visitor_age) FROM exhibitions WHERE city = 'Frida Kahlo: Her Life and Art';,0 How many areas are named West Isles? ,"CREATE TABLE table_170969_2 (area_km_2 VARCHAR, official_name VARCHAR);","SELECT COUNT(area_km_2) FROM table_170969_2 WHERE official_name = ""West Isles"";","SELECT COUNT(area_km_2) FROM table_170969_2 WHERE official_name = ""West Isles"";",1 What is the highest heart rate recorded in a workout session?,"CREATE TABLE WorkoutSessions (SessionID INT, MemberID INT, HeartRate FLOAT); ",SELECT MAX(HeartRate) FROM WorkoutSessions;,SELECT MAX(HeartRate) FROM WorkoutSessions;,1 Who is the nominee for Best Lead Actress?,"CREATE TABLE table_name_96 (nominee VARCHAR, category VARCHAR);","SELECT nominee FROM table_name_96 WHERE category = ""best lead actress"";","SELECT nominee FROM table_name_96 WHERE category = ""best lead actress"";",1 How many crimes were reported in the state of Texas in 2020?,"CREATE TABLE crimes (id INT, state VARCHAR(255), year INT, number_of_crimes INT); ",SELECT SUM(number_of_crimes) FROM crimes WHERE state = 'Texas' AND year = 2020;,SELECT SUM(number_of_crimes) FROM crimes WHERE state = 'Texas' AND year = 2020;,1 Name the team with a tie number of 6.,"CREATE TABLE table_name_51 (date VARCHAR, tie_no VARCHAR);","SELECT date FROM table_name_51 WHERE tie_no = ""6"";","SELECT date FROM table_name_51 WHERE tie_no = ""6"";",1 "Insert the record for the species ""Hawksbill sea turtle"" with scientific name ""Eretmochelys imbricata"" and common name ""Hawksbill turtle"".","CREATE TABLE marine_species (scientific_name TEXT, common_name TEXT); ","INSERT INTO marine_species (scientific_name, common_name) VALUES ('Eretmochelys imbricata', 'Hawksbill sea turtle');","INSERT INTO marine_species (scientific_name, common_name) VALUES ('Eretmochelys imbricata', 'Hawksbill turtle');",0 "Name the republican steve sauerberg for august 12, 2008","CREATE TABLE table_16751596_2 (republican VARCHAR, dates_administered VARCHAR);","SELECT republican AS :_steve_sauerberg FROM table_16751596_2 WHERE dates_administered = ""August 12, 2008"";","SELECT republican FROM table_16751596_2 WHERE dates_administered = ""August 12, 2008"";",0 "Which Venue has a Notes of heptathlon, and a Year of 1991?","CREATE TABLE table_name_20 (venue VARCHAR, notes VARCHAR, year VARCHAR);","SELECT venue FROM table_name_20 WHERE notes = ""heptathlon"" AND year = 1991;","SELECT venue FROM table_name_20 WHERE notes = ""heptathlon"" AND year = 1991;",1 What is the average laps for the grid smaller than 21 for Renzo Zorzi?,"CREATE TABLE table_name_6 (laps INTEGER, grid VARCHAR, driver VARCHAR);","SELECT AVG(laps) FROM table_name_6 WHERE grid < 21 AND driver = ""renzo zorzi"";","SELECT AVG(laps) FROM table_name_6 WHERE grid 21 AND driver = ""renzo zorzi"";",0 What is the minimum and maximum temperature range (in Celsius) for greenhouses in Spain?,"CREATE TABLE greenhouses (id INT, name VARCHAR(255), location VARCHAR(255), min_temp DECIMAL(4,2), max_temp DECIMAL(4,2)); ","SELECT location, MIN(min_temp) as min_temp, MAX(max_temp) as max_temp FROM greenhouses WHERE location = 'Spain';","SELECT MIN(min_temp) as min_temp, MAX(max_temp) as max_temp FROM greenhouses WHERE location = 'Spain';",0 Delete all IoT sensor data for farm_id 777,"CREATE TABLE iot_sensor_data (id INT, farm_id INT, sensor_type VARCHAR(255), value FLOAT, measurement_date DATE);",DELETE FROM iot_sensor_data WHERE farm_id = 777;,DELETE FROM iot_sensor_data WHERE farm_id = 777;,1 Find the total revenue for the West coast region.,"CREATE TABLE sales (id INT, location VARCHAR(20), quantity INT, price DECIMAL(5,2)); ",SELECT SUM(quantity * price) AS total_revenue FROM sales WHERE location = 'West';,SELECT SUM(quantity * price) FROM sales WHERE location = 'West Coast';,0 Delete all records in the community_engagement table related to the 'Cultural Awareness Program'?,"CREATE TABLE community_engagement (id INT, program VARCHAR(50), country VARCHAR(50)); ",DELETE FROM community_engagement WHERE program = 'Cultural Awareness Program';,DELETE FROM community_engagement WHERE program = 'Cultural Awareness Program';,1 What is the total duration (in minutes) of all pilates classes taken by users with the last name 'Garcia'?,"CREATE TABLE pilates_classes (class_id INT, user_id INT, duration INT, last_name VARCHAR(20));",SELECT SUM(duration) FROM pilates_classes WHERE last_name = 'Garcia';,SELECT SUM(duration) FROM pilates_classes WHERE last_name = 'Garcia';,1 What is the average amount of research grants awarded to the Chemistry department in the second half of 2021?,"CREATE TABLE ResearchGrants(GranteeID INT, Department VARCHAR(20), Amount FLOAT, GrantDate DATE); ",SELECT AVG(rg.Amount) FROM ResearchGrants rg WHERE rg.Department = 'Chemistry' AND MONTH(rg.GrantDate) > 6 AND YEAR(rg.GrantDate) = 2021;,SELECT AVG(Amount) FROM ResearchGrants WHERE Department = 'Chemistry' AND GrantDate BETWEEN '2021-01-01' AND '2021-06-30';,0 Update the Gender of the community health worker with Age 50 in 'QC' province to 'Non-binary'.,"CREATE TABLE CommunityHealthWorkersCanada (WorkerID INT, Age INT, Gender VARCHAR(10), Province VARCHAR(2)); ",UPDATE CommunityHealthWorkersCanada SET Gender = 'Non-binary' WHERE Age = 50 AND Province = 'QC';,UPDATE CommunityHealthWorkersCanada SET Gender = 'Non-binary' WHERE Age = 50 AND Province = 'QC';,1 What is the total revenue generated from sponsored posts in South America in the last quarter?,"CREATE TABLE sponsored_posts (post_id INT, revenue DECIMAL(10,2), region VARCHAR(10)); ","SELECT SUM(revenue) FROM sponsored_posts WHERE region = 'South America' AND post_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH);","SELECT SUM(revenue) FROM sponsored_posts WHERE region = 'South America' AND post_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH);",0 What is the total number of volunteers and staff members in each department?,"CREATE TABLE departments (id INT, name VARCHAR(255)); CREATE TABLE volunteers (id INT, department_id INT, joined_date DATE); CREATE TABLE staff (id INT, department_id INT, hired_date DATE);","SELECT departments.name, COUNT(volunteers.id) + COUNT(staff.id) FROM departments LEFT JOIN volunteers ON departments.id = volunteers.department_id LEFT JOIN staff ON departments.id = staff.department_id GROUP BY departments.id;","SELECT d.name, COUNT(v.id) as total_volunteers, COUNT(s.id) as total_staff FROM departments d JOIN volunteers v ON d.id = v.department_id JOIN staff s ON v.department_id = s.department_id GROUP BY d.name;",0 How many companies are in the energy sector with an ESG score above 80?,"CREATE TABLE companies (id INT, name VARCHAR(255), sector VARCHAR(255), ESG_score FLOAT); CREATE TABLE sectors (id INT, sector VARCHAR(255)); ",SELECT COUNT(*) AS num_companies FROM companies c JOIN sectors s ON c.sector = s.sector WHERE s.sector = 'Energy' AND c.ESG_score > 80;,SELECT COUNT(*) FROM companies JOIN sectors ON companies.sector = sectors.sector WHERE companies.ESG_score > 80;,0 What are the conservation statuses of marine species that are unique to the Indian Ocean?,"CREATE TABLE marine_species_status (id INT, species_name VARCHAR(255), conservation_status VARCHAR(255)); CREATE TABLE oceanography (id INT, species_name VARCHAR(255), location VARCHAR(255)); ","SELECT conservation_status FROM marine_species_status WHERE species_name NOT IN (SELECT species_name FROM oceanography WHERE location IN ('Atlantic Ocean', 'Pacific Ocean', 'Arctic Ocean')) AND species_name IN (SELECT species_name FROM oceanography WHERE location = 'Indian Ocean');",SELECT marine_species_status.conservation_status FROM marine_species_status INNER JOIN oceanography ON marine_species_status.species_name = oceanography.species_name WHERE oceanography.location = 'Indian Ocean';,0 List all community health workers from Brazil,"CREATE TABLE community_health_workers (id INT PRIMARY KEY, worker_name VARCHAR(50), language_spoken VARCHAR(20), years_of_experience INT);",SELECT * FROM community_health_workers WHERE state = 'Brazil';,SELECT worker_name FROM community_health_workers WHERE language_spoken = 'Brazil';,0 "What is the number of flu vaccinations administered, by race and ethnicity?","CREATE TABLE flu_vaccinations (race_ethnicity VARCHAR(20), num_vaccinations INT); ","SELECT race_ethnicity, SUM(num_vaccinations) as total_vaccinations FROM flu_vaccinations GROUP BY race_ethnicity;","SELECT race_ethnicity, SUM(num_vaccinations) FROM flu_vaccinations GROUP BY race_ethnicity;",0 What is the number of individuals with savings in each country?,"CREATE TABLE if not exists savings (id INT, individual_id INT, country VARCHAR(50), has_savings BOOLEAN, age INT, gender VARCHAR(10));","SELECT country, COUNT(*) FROM savings WHERE has_savings = TRUE GROUP BY country;","SELECT country, COUNT(DISTINCT individual_id) FROM savings WHERE has_savings = TRUE GROUP BY country;",0 Update the 'digital_assets' table to set the 'circulating_supply' to 15000000 for all records where the asset_name is 'Bitcoin',"CREATE TABLE digital_assets (asset_id INT PRIMARY KEY, asset_name VARCHAR(100), asset_type VARCHAR(50), circulating_supply INT);",UPDATE digital_assets SET circulating_supply = 15000000 WHERE asset_name = 'Bitcoin';,UPDATE digital_assets SET circulating_supply = 15000000 WHERE asset_name = 'Bitcoin';,1 What is the maximum drought impact score for each year?,"CREATE TABLE yearly_drought (year INT, score INT); ","SELECT year, MAX(score) FROM yearly_drought GROUP BY year;","SELECT year, MAX(score) FROM yearly_drought GROUP BY year;",1 "Who is the Winner, when the City is Berlin?","CREATE TABLE table_name_19 (winner VARCHAR, city VARCHAR);","SELECT winner FROM table_name_19 WHERE city = ""berlin"";","SELECT winner FROM table_name_19 WHERE city = ""berlin"";",1 What is the distribution of users by age and gender?,"CREATE TABLE users (user_id INT, age INT, gender ENUM('M', 'F', 'Other')); ","SELECT gender, age, COUNT(user_id) AS user_count FROM users GROUP BY gender, age;","SELECT age, gender, COUNT(*) as num_users FROM users GROUP BY age, gender;",0 what is the points against when drawn is drawn?,CREATE TABLE table_name_96 (points_against VARCHAR);,"SELECT points_against FROM table_name_96 WHERE ""drawn"" = ""drawn"";","SELECT points_against FROM table_name_96 WHERE ""drawn"" = ""drawn"";",1 Count the number of wastewater treatment plants in 'WastewaterPlants' table that treat more than 1 million gallons daily.,"CREATE TABLE WastewaterPlants (id INT, plant_name TEXT, daily_capacity INT);",SELECT COUNT(*) FROM WastewaterPlants WHERE daily_capacity > 1000000;,SELECT COUNT(*) FROM WastewaterPlants WHERE daily_capacity > 10000000;,0 What are the suppliers located in 'Paris' with a sustainability rating greater than 85?,"CREATE TABLE suppliers (id INT, name VARCHAR(255), location VARCHAR(255), sustainability_rating INT); ",SELECT name FROM suppliers WHERE location = 'Paris' AND sustainability_rating > 85;,SELECT name FROM suppliers WHERE location = 'Paris' AND sustainability_rating > 85;,1 What is the maximum price of vegan dishes?,"CREATE TABLE Restaurants (id INT, name VARCHAR(50), type VARCHAR(20)); CREATE TABLE Menu (id INT, restaurant_id INT, dish VARCHAR(50), price DECIMAL(5,2)); ",SELECT MAX(price) FROM Menu WHERE dish LIKE '%vegan%';,SELECT MAX(m.price) FROM Menu m JOIN Restaurants r ON m.restaurant_id = r.id WHERE r.type = 'Vegan';,0 What is the Date of the game where the Cavaliers have a Record of 15-27?,"CREATE TABLE table_name_57 (date VARCHAR, record VARCHAR);","SELECT date FROM table_name_57 WHERE record = ""15-27"";","SELECT date FROM table_name_57 WHERE record = ""15-27"";",1 What is the average age of artifacts in Greece?,"CREATE TABLE Site (SiteID INT PRIMARY KEY, SiteName VARCHAR(50), Country VARCHAR(50), City VARCHAR(50)); CREATE TABLE Artifact (ArtifactID INT PRIMARY KEY, SiteID INT, ArtifactName VARCHAR(50), Material VARCHAR(50), Era VARCHAR(50)); CREATE TABLE Discovery (DiscoveryID INT PRIMARY KEY, DiscoveryDate DATE, DiscoveryTeam VARCHAR(50), ArtifactID INT, SiteID INT); ",SELECT AVG(EXTRACT(YEAR FROM CURRENT_DATE) - EXTRACT(YEAR FROM Discovery.DiscoveryDate)) FROM Discovery JOIN Artifact ON Discovery.ArtifactID = Artifact.ArtifactID WHERE Artifact.SiteID = (SELECT SiteID FROM Site WHERE SiteName = 'Akrotiri');,SELECT AVG(Artifact.Era) FROM Artifact INNER JOIN Discovery ON Artifact.SiteID = Discovery.SiteID WHERE Site.Country = 'Greece';,0 "Delete the automation trend for May 6, 2022","CREATE TABLE automation_trends (date DATETIME, trend_data VARCHAR(500));",DELETE FROM automation_trends WHERE date = '2022-05-06';,DELETE FROM automation_trends WHERE date = '2022-05-6';,0 Name the date for irish points being 89,"CREATE TABLE table_22875369_3 (date VARCHAR, irish_points VARCHAR);",SELECT date FROM table_22875369_3 WHERE irish_points = 89;,"SELECT date FROM table_22875369_3 WHERE irish_points = ""89"";",0 What record has November 15 as the date?,"CREATE TABLE table_name_32 (record VARCHAR, date VARCHAR);","SELECT record FROM table_name_32 WHERE date = ""november 15"";","SELECT record FROM table_name_32 WHERE date = ""november 15"";",1 What is the difference in property sizes between co-owned and non-co-owned properties in each country?,"CREATE TABLE properties (id INT, size INT, is_co_owned BOOLEAN, country VARCHAR(255)); ","SELECT country, AVG(size) FILTER (WHERE is_co_owned = true) - AVG(size) FILTER (WHERE is_co_owned = false) as diff FROM properties GROUP BY country;","SELECT country, size, COUNT(*) OVER (PARTITION BY country) as size_difference FROM properties WHERE is_co_owned = true GROUP BY country;",0 Name the IATA for jessore,"CREATE TABLE table_name_80 (iata VARCHAR, city VARCHAR);","SELECT iata FROM table_name_80 WHERE city = ""jessore"";","SELECT iata FROM table_name_80 WHERE city = ""jessore"";",1 Identify the top 3 cities with the highest number of renewable energy projects in the 'RenewableEnergyProjects' table.,"CREATE TABLE RenewableEnergyProjects (id INT, project_name VARCHAR(50), city VARCHAR(50), project_type VARCHAR(50));","SELECT city, COUNT(*) as project_count FROM RenewableEnergyProjects GROUP BY city ORDER BY project_count DESC LIMIT 3;","SELECT city, COUNT(*) as project_count FROM RenewableEnergyProjects GROUP BY city ORDER BY project_count DESC LIMIT 3;",1 Who are the community engagement coordinators in the 'community_engagement' schema?,"CREATE TABLE community_engagement (id INT, name VARCHAR(255), role VARCHAR(255)); ","SELECT name, role FROM community_engagement.community_engagement WHERE role LIKE 'Coordinator%';",SELECT name FROM community_engagement WHERE role = 'Coordinator';,0 What are all the run times with 8.2 million viewers?,"CREATE TABLE table_1429629_1 (run_time VARCHAR, viewers__in_millions_ VARCHAR);","SELECT run_time FROM table_1429629_1 WHERE viewers__in_millions_ = ""8.2"";","SELECT run_time FROM table_1429629_1 WHERE viewers__in_millions_ = ""8.2"";",1 What is the average age of mining engineers and supervisors?,"CREATE TABLE positions (id INT, name VARCHAR(50), position VARCHAR(50), age INT); ","SELECT AVG(age) AS avg_age FROM positions WHERE position IN ('Mining Engineer', 'Supervisor');","SELECT AVG(age) FROM positions WHERE position IN ('mining engineer','supervisor');",0 "List all rural infrastructure projects in the 'rural_development' database, along with their corresponding budgets, and the total number of beneficiaries they have reached.","CREATE TABLE infrastructure_projects (project_id INT, project_name VARCHAR(50), budget INT, region VARCHAR(50)); CREATE TABLE beneficiaries (beneficiary_id INT, project_id INT, number_of_beneficiaries INT); ","SELECT infrastructure_projects.project_name, infrastructure_projects.budget, SUM(beneficiaries.number_of_beneficiaries) FROM infrastructure_projects INNER JOIN beneficiaries ON infrastructure_projects.project_id = beneficiaries.project_id GROUP BY infrastructure_projects.project_name, infrastructure_projects.budget;","SELECT infrastructure_projects.project_name, infrastructure_projects.budget, beneficiaries.number_of_beneficiaries FROM infrastructure_projects INNER JOIN beneficiaries ON infrastructure_projects.project_id = beneficiaries.project_id;",0 "What is the smallest number of goals against when there are 1 of 18 points, and more than 8 are drawn?","CREATE TABLE table_name_58 (goals_against INTEGER, points_1 VARCHAR, drawn VARCHAR);","SELECT MIN(goals_against) FROM table_name_58 WHERE points_1 = ""18"" AND drawn > 8;",SELECT MIN(goals_against) FROM table_name_58 WHERE points_1 = 18 AND drawn > 8;,0 Where is the school located that has mustangs as a mascot?,"CREATE TABLE table_name_93 (location VARCHAR, mascot VARCHAR);","SELECT location FROM table_name_93 WHERE mascot = ""mustangs"";","SELECT location FROM table_name_93 WHERE mascot = ""mustangs"";",1 What is the maximum response time for emergency calls in the city of Chicago?,"CREATE TABLE EmergencyCalls (ID INT, City VARCHAR(20), ResponseTime INT); ",SELECT MAX(ResponseTime) FROM EmergencyCalls WHERE City = 'Chicago';,SELECT MAX(ResponseTime) FROM EmergencyCalls WHERE City = 'Chicago';,1 List clients who have improved their financial wellbeing in the last 6 months?,"CREATE TABLE clients (client_id INT, financial_wellbeing_score INT, last_updated DATE); ","SELECT client_id FROM clients WHERE last_updated > DATE_SUB(NOW(), INTERVAL 6 MONTH) AND financial_wellbeing_score > (SELECT financial_wellbeing_score FROM clients WHERE clients.client_id = clients.client_id AND last_updated = (SELECT MAX(last_updated) FROM clients c WHERE c.client_id = clients.client_id));","SELECT client_id, financial_wellbeing_score FROM clients WHERE last_updated >= DATEADD(month, -6, GETDATE());",0 What is the total number of flight hours for aircraft of each manufacturer in the last 5 years?,"CREATE TABLE Aircraft_Flight_Hours (flight_id INT, aircraft_type VARCHAR(50), manufacturer VARCHAR(50), flight_hours INT, flight_date DATE); ","SELECT manufacturer, SUM(flight_hours) as total_flight_hours FROM Aircraft_Flight_Hours WHERE flight_date >= DATEADD(year, -5, GETDATE()) GROUP BY manufacturer;","SELECT manufacturer, SUM(flight_hours) as total_flight_hours FROM Aircraft_Flight_Hours WHERE flight_date >= DATEADD(year, -5, GETDATE()) GROUP BY manufacturer;",1 Who are the youngest and oldest astronauts for each gender?,"CREATE TABLE Astronaut (id INT, name VARCHAR(50), age INT, gender VARCHAR(10), agency VARCHAR(50)); ","SELECT gender, MIN(age) as youngest_age, MAX(age) as oldest_age FROM Astronaut GROUP BY gender;","SELECT gender, MIN(age) as youngest_age, MIN(age) as oldest_age FROM Astronaut GROUP BY gender;",0 Which chemical has the highest emission rate in the Southeast region?,"CREATE TABLE Emissions (chemical VARCHAR(20), emission_rate INT, location VARCHAR(20)); ","SELECT chemical, emission_rate FROM Emissions WHERE location = 'Southeast' ORDER BY emission_rate DESC LIMIT 1;","SELECT chemical, MAX(emission_rate) FROM Emissions WHERE location = 'Southeast' GROUP BY chemical;",0 What is the average round for Club team of garmisch-partenkirchen riessersee sc (germany 2)?,"CREATE TABLE table_name_64 (round INTEGER, club_team VARCHAR);","SELECT AVG(round) FROM table_name_64 WHERE club_team = ""garmisch-partenkirchen riessersee sc (germany 2)"";","SELECT AVG(round) FROM table_name_64 WHERE club_team = ""garmisch-partenkirchen riessersee sc (germany 2)"";",1 Insert a new record into the 'manufacturers' table for a manufacturer located in 'Nepal' with a certification of 'Fair Trade',"CREATE TABLE manufacturers(id INT, name VARCHAR(255), country VARCHAR(255), certification VARCHAR(255));","INSERT INTO manufacturers(id, name, country, certification) VALUES (4, 'Himalayan Handicrafts', 'Nepal', 'Fair Trade');","INSERT INTO manufacturers (name, country, certification) VALUES ('Nepal', 'Fair Trade');",0 "What is the average salary of workers in the 'mining' industry, grouped by their job titles, in the state of 'Utah'?","CREATE TABLE workers (id INT, name VARCHAR(50), job_title VARCHAR(50), industry VARCHAR(50), state VARCHAR(50), salary FLOAT); ","SELECT job_title, AVG(salary) FROM workers WHERE industry = 'Mining' AND state = 'Utah' GROUP BY job_title;","SELECT job_title, AVG(salary) FROM workers WHERE industry ='mining' AND state = 'Utah' GROUP BY job_title;",0 "Name the record for rose garden 20,565 attendance","CREATE TABLE table_23286158_8 (record VARCHAR, location_attendance VARCHAR);","SELECT record FROM table_23286158_8 WHERE location_attendance = ""Rose Garden 20,565"";","SELECT record FROM table_23286158_8 WHERE location_attendance = ""Rose Garden 20,565"";",1 When did Essendon play at home?,"CREATE TABLE table_name_15 (date VARCHAR, home_team VARCHAR);","SELECT date FROM table_name_15 WHERE home_team = ""essendon"";","SELECT date FROM table_name_15 WHERE home_team = ""essendon"";",1 List all unique 'types' in the 'organizations' table,"CREATE TABLE organizations (id INT, name VARCHAR(50), type VARCHAR(50), country VARCHAR(50)); ",SELECT DISTINCT type FROM organizations;,SELECT DISTINCT type FROM organizations;,1 What was the total number of visits to the modern art exhibitions?,"CREATE TABLE exhibitions (id INT, name VARCHAR(50), type VARCHAR(50), visitor_count INT); CREATE TABLE modern_art_visits (id INT, exhibition_id INT, visit_date DATE, no_visitors INT); ",SELECT SUM(no_visitors) FROM modern_art_visits;,SELECT SUM(no_visitors) FROM modern_art_visits;,1 How many unique fans attended games of teams in the eastern_conference in the fan_attendance table?,"CREATE TABLE fan_attendance (id INT, fan_id INT, team VARCHAR(50), conference VARCHAR(50), game_date DATE);",SELECT COUNT(DISTINCT fan_id) FROM fan_attendance WHERE conference = 'eastern_conference';,SELECT COUNT(DISTINCT fan_id) FROM fan_attendance WHERE conference = 'Eastern';,0 What was the score of Bernhard Langer after 3 rounds?,"CREATE TABLE table_name_88 (score VARCHAR, player VARCHAR);","SELECT score FROM table_name_88 WHERE player = ""bernhard langer"";","SELECT score FROM table_name_88 WHERE player = ""bernhard langer"";",1 What was the average donation amount by gender in 2020?,"CREATE TABLE donations (donor_id INT, donation_date DATE, amount DECIMAL(10,2), gender TEXT); ","SELECT gender, AVG(amount) as avg_donation_amount FROM donations WHERE YEAR(donation_date) = 2020 GROUP BY gender;","SELECT gender, AVG(amount) as avg_donation FROM donations WHERE YEAR(donation_date) = 2020 GROUP BY gender;",0 How many fans attended the basketball games in the top 5 stadiums in the US in 2021?,"CREATE TABLE basketball_stadiums (stadium_name TEXT, location TEXT, capacity INT, games_hosted INT); CREATE TABLE basketball_attendance (stadium_name TEXT, date TEXT, fans_attended INT);","SELECT s.stadium_name, COUNT(a.fans_attended) FROM basketball_stadiums s JOIN basketball_attendance a ON s.stadium_name = a.stadium_name WHERE s.location = 'US' GROUP BY s.stadium_name ORDER BY COUNT(a.fans_attended) DESC LIMIT 5;",SELECT SUM(fans_attended) FROM basketball_attendance WHERE stadium_name IN (SELECT stadium_name FROM basketball_stadiums WHERE location = 'US') AND date = '2021-01-01' GROUP BY stadium_name ORDER BY SUM(fans_attended) DESC LIMIT 5;,0 Find the description and credit for the course QM-261?,"CREATE TABLE course (crs_credit VARCHAR, crs_description VARCHAR, crs_code VARCHAR);","SELECT crs_credit, crs_description FROM course WHERE crs_code = 'QM-261';","SELECT crs_description, crs_credit FROM course WHERE crs_code = ""QM-261"";",0 What was the total tenure time with a rank of 49?,"CREATE TABLE table_name_3 (total_tenure_time VARCHAR, total_tenure_rank VARCHAR);",SELECT total_tenure_time FROM table_name_3 WHERE total_tenure_rank = 49;,SELECT total_tenure_time FROM table_name_3 WHERE total_tenure_rank = 49;,1 What is the total number of art workshops attended by participants from underrepresented communities?,"CREATE TABLE art_workshops (id INT, participant_id INT, workshop_type VARCHAR(20), community_type VARCHAR(20)); CREATE TABLE participants (id INT, name VARCHAR(50), community_type VARCHAR(20)); ",SELECT COUNT(*) FROM art_workshops w INNER JOIN participants p ON w.participant_id = p.id WHERE w.community_type = 'underrepresented';,SELECT COUNT(*) FROM art_workshops JOIN participants ON art_workshops.participant_id = participants.id WHERE participants.community_type = 'Underrepresented';,0 "Find the dates of assessment notes for students with first name ""Fanny"".","CREATE TABLE Students (student_id VARCHAR, first_name VARCHAR); CREATE TABLE Assessment_Notes (date_of_notes VARCHAR, student_id VARCHAR);","SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = ""Fanny"";","SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = ""Fanny"";",1 Calculate the total CO2 emissions from all mining activities in 2020.,"CREATE TABLE co2_emissions (activity VARCHAR(50), co2_emission INT); ","SELECT SUM(co2_emission) FROM co2_emissions WHERE activity IN ('Gold mining', 'Silver mining', 'Iron ore mining', 'Coal mining', 'Copper mining', 'Zinc mining');",SELECT SUM(co2_emission) FROM co2_emissions WHERE activity = 'Mining' AND YEAR(co2_emission) = 2020;,0 What is the maximum temperature reading for all IoT sensors in the 'fields' table?,"CREATE TABLE fields (id INT, sensor_id INT, temperature DECIMAL(5,2)); ",SELECT MAX(temperature) FROM fields;,SELECT MAX(temperature) FROM fields;,1 What was the total budget for healthcare programs in 2022?,"CREATE TABLE Programs (id INT, program_id INT, program_name VARCHAR(100), budget DECIMAL(10, 2), start_date DATE, end_date DATE); ",SELECT SUM(budget) FROM Programs WHERE program_id BETWEEN 201 AND 210 AND start_date <= '2022-12-31' AND end_date >= '2022-01-01';,SELECT SUM(budget) FROM Programs WHERE program_name = 'Healthcare' AND YEAR(start_date) = 2022;,0 Which categories received the most funding from donations in 2021?,"CREATE TABLE Donations (DonationID int, Amount decimal(10,2), PaymentMethod varchar(50), DonationDate date, Category varchar(50)); ","SELECT Category, SUM(Amount) as TotalDonationAmount FROM Donations WHERE YEAR(DonationDate) = 2021 GROUP BY Category ORDER BY TotalDonationAmount DESC;","SELECT Category, COUNT(*) as TotalDonations FROM Donations WHERE YEAR(DonationDate) = 2021 GROUP BY Category ORDER BY TotalDonations DESC;",0 What are the green building certifications held by companies based in the Asia-Pacific region?,"CREATE TABLE green_buildings (id INT, company_name TEXT, certification TEXT, region TEXT); ",SELECT DISTINCT certification FROM green_buildings WHERE region = 'Asia-Pacific';,SELECT certification FROM green_buildings WHERE region = 'Asia-Pacific';,0 What is the maximum response time for emergency calls in 'Riverdale'?,"CREATE TABLE emergency_calls (id INT, region VARCHAR(20), response_time INT);",SELECT MAX(response_time) FROM emergency_calls WHERE region = 'Riverdale';,SELECT MAX(response_time) FROM emergency_calls WHERE region = 'Riverdale';,1 What is the number of accidents for each aircraft manufacturer per year?,"CREATE SCHEMA if not exists aerospace;CREATE TABLE if not exists aerospace.aircraft (id INT PRIMARY KEY, name VARCHAR(50), model VARCHAR(50), manufacturer VARCHAR(50), accidents INT, launch_year INT); ","SELECT manufacturer, launch_year, SUM(accidents) as total_accidents FROM aerospace.aircraft GROUP BY manufacturer, launch_year;","SELECT manufacturer, launch_year, SUM(accidents) as total_accidents FROM aerospace.aircraft GROUP BY manufacturer, launch_year;",1 what will be the population of Africa when Oceania is 67 (0.6%),"CREATE TABLE table_19017269_5 (africa VARCHAR, oceania VARCHAR);","SELECT africa FROM table_19017269_5 WHERE oceania = ""67 (0.6%)"";","SELECT africa FROM table_19017269_5 WHERE oceania = ""67 (0.6%)"";",1 how many times is the total apps 1 and the fa cup goals less than 0 for bob mountain?,"CREATE TABLE table_name_40 (total_goals VARCHAR, fa_cup_goals VARCHAR, total_apps VARCHAR, name VARCHAR);","SELECT COUNT(total_goals) FROM table_name_40 WHERE total_apps = ""1"" AND name = ""bob mountain"" AND fa_cup_goals < 0;","SELECT COUNT(total_goals) FROM table_name_40 WHERE total_apps = 1 AND name = ""bob mountain"" AND fa_cup_goals 0;",0 When svein tuft is the winner what is the highest stage?,"CREATE TABLE table_28298471_14 (stage INTEGER, winner VARCHAR);","SELECT MAX(stage) FROM table_28298471_14 WHERE winner = ""Svein Tuft"";","SELECT MAX(stage) FROM table_28298471_14 WHERE winner = ""Svein Tuft"";",1 Which player played 2004-05,"CREATE TABLE table_11545282_18 (player VARCHAR, years_for_jazz VARCHAR);","SELECT player FROM table_11545282_18 WHERE years_for_jazz = ""2004-05"";","SELECT player FROM table_11545282_18 WHERE years_for_jazz = ""2004-05"";",1 Which 3’UTR sequence has the GenBank ID at hq021440?,CREATE TABLE table_name_87 (genbank_id VARCHAR);,"SELECT 3 AS ’utr_sequence FROM table_name_87 WHERE genbank_id = ""hq021440"";","SELECT 3 AS _UTR FROM table_name_87 WHERE genbank_id = ""hq021440"";",0 What is the total quantity of materials delivered to each factory in CityA?,"CREATE TABLE Factories (id INT, name TEXT, location TEXT);CREATE TABLE Materials (id INT, supplier_id INT, factory_id INT, material TEXT, quantity INT, date DATE);","SELECT m.factory_id, SUM(m.quantity) FROM Materials m INNER JOIN Factories f ON m.factory_id = f.id WHERE f.location = 'CityA' GROUP BY m.factory_id;","SELECT f.name, SUM(m.quantity) FROM Factories f JOIN Materials m ON f.id = m.factory_id WHERE f.location = 'CityA' GROUP BY f.name;",0 "What is Record, when Event is ""Independent Event"", and when Method is ""Submission (Peruvian Necktie)""?","CREATE TABLE table_name_2 (record VARCHAR, event VARCHAR, method VARCHAR);","SELECT record FROM table_name_2 WHERE event = ""independent event"" AND method = ""submission (peruvian necktie)"";","SELECT record FROM table_name_2 WHERE event = ""independent event"" AND method = ""submission (peruvian necktie)"";",1 "Show the ""equipment_name"" and ""quantity"" columns from the ""military_equipment"" table, sorted by the ""quantity"" column in descending order","CREATE TABLE military_equipment (id INT, equipment_name VARCHAR(50), quantity INT); ","SELECT equipment_name, quantity FROM military_equipment ORDER BY quantity DESC;","SELECT equipment_name, quantity FROM military_equipment ORDER BY quantity DESC;",1 What are the demographics of patients who received mental health treatment in Canada?,"CREATE TABLE patients (id INT PRIMARY KEY, age INT, gender VARCHAR(50), country VARCHAR(50));","SELECT age, gender FROM patients WHERE country = 'Canada' AND id IN (SELECT patient_id FROM prescriptions);",SELECT demographics FROM patients WHERE country = 'Canada';,0 What is the maximum AI adoption score for hotels in 'Europe'?,"CREATE TABLE ai_adoption (hotel_id INT, score INT);",SELECT MAX(score) FROM ai_adoption WHERE country = 'Europe';,SELECT MAX(score) FROM ai_adoption WHERE hotel_id IN (SELECT hotel_id FROM hotels WHERE region = 'Europe');,0 How many positions were given when 30 points were won? ,"CREATE TABLE table_24330803_1 (position VARCHAR, points VARCHAR);","SELECT COUNT(position) FROM table_24330803_1 WHERE points = ""30"";","SELECT COUNT(position) FROM table_24330803_1 WHERE points = ""30"";",1 What is the Catalog of the RCA release?,"CREATE TABLE table_name_58 (catalog VARCHAR, label VARCHAR);","SELECT catalog FROM table_name_58 WHERE label = ""rca"";","SELECT catalog FROM table_name_58 WHERE label = ""rca"";",1 On what date were the NY Rangers home?,"CREATE TABLE table_name_98 (date VARCHAR, home VARCHAR);","SELECT date FROM table_name_98 WHERE home = ""ny rangers"";","SELECT date FROM table_name_98 WHERE home = ""new york rangers"";",0 Count the number of spacecraft manufactured by SpaceX before 2015,"CREATE TABLE spacecraft (id INT, name VARCHAR(50), manufacturer VARCHAR(50), launch_year INT);",SELECT COUNT(*) FROM spacecraft WHERE manufacturer = 'SpaceX' AND launch_year < 2015;,SELECT COUNT(*) FROM spacecraft WHERE manufacturer = 'SpaceX' AND launch_year 2015;,0 Which type of song did miriam yeung sing?,"CREATE TABLE table_name_66 (kind_of_the_song VARCHAR, singer VARCHAR);","SELECT kind_of_the_song FROM table_name_66 WHERE singer = ""miriam yeung"";","SELECT kind_of_the_song FROM table_name_66 WHERE singer = ""miriam yeung"";",1 What percentage of donors in 2023 were recurring donors?,"CREATE TABLE DonorInfo (DonorID INT, DonationYear INT, RecurringDonor BOOLEAN); ",SELECT (COUNT(*) FILTER (WHERE RecurringDonor = true)) * 100.0 / COUNT(*) as RecurringDonorPercentage FROM DonorInfo WHERE DonationYear = 2023;,SELECT 100.0 * SUM(RecurringDonor) / (SELECT SUM(RecurringDonor) FROM DonorInfo WHERE DonationYear = 2023) AS Percentage FROM DonorInfo WHERE DonationYear = 2023;,0 what is the salary and name of the employee who has the most number of aircraft certificates?,"CREATE TABLE Certificate (eid VARCHAR); CREATE TABLE Employee (name VARCHAR, salary VARCHAR, eid VARCHAR);","SELECT T1.name, T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY COUNT(*) DESC LIMIT 1;","SELECT T1.name, T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY COUNT(*) DESC LIMIT 1;",1 What was the airing date when the number of episodes was larger than 20 and had the genre of costume action?,"CREATE TABLE table_name_73 (airing_date VARCHAR, number_of_episodes VARCHAR, genre VARCHAR);","SELECT airing_date FROM table_name_73 WHERE number_of_episodes > 20 AND genre = ""costume action"";","SELECT airing_date FROM table_name_73 WHERE number_of_episodes > 20 AND genre = ""costume action"";",1 What is the total number of users from India and China?,"CREATE TABLE users (id INT, name VARCHAR(50), gender VARCHAR(10), age INT, city VARCHAR(50), country VARCHAR(50)); ","SELECT country, COUNT(*) as total_users FROM users WHERE country IN ('India', 'China') GROUP BY country;","SELECT COUNT(*) FROM users WHERE country IN ('India', 'China');",0 "What is the average number of points scored by players from the Eastern Conference in NBA games, excluding players with less than 10 games played?","CREATE TABLE NBA_Teams (Team VARCHAR(50), Conference VARCHAR(50), Points INT); ",SELECT AVG(Points) FROM NBA_Teams WHERE Conference = 'Eastern' AND Points > (SELECT AVG(Points) FROM NBA_Teams WHERE Conference = 'Eastern') GROUP BY Conference HAVING COUNT(*) >= 10;,SELECT AVG(Points) FROM NBA_Teams WHERE Conference = 'Eastern' AND Players 10;,0 Tell me the result for warsaw 1929,"CREATE TABLE table_name_8 (result VARCHAR, location VARCHAR, year VARCHAR);","SELECT result FROM table_name_8 WHERE location = ""warsaw"" AND year = 1929;","SELECT result FROM table_name_8 WHERE location = ""warsaw 1929"" AND year = ""1929"";",0 What is the fastest lap in the Le Mans Bugatti circuit?,"CREATE TABLE table_name_72 (fastest_lap VARCHAR, circuit VARCHAR);","SELECT fastest_lap FROM table_name_72 WHERE circuit = ""le mans bugatti"";","SELECT fastest_lap FROM table_name_72 WHERE circuit = ""le mans bugatti"";",1 What was Kilgore's (R) percentage when Potts (I) polled at 1%?,"CREATE TABLE table_name_95 (kilgore__r_ VARCHAR, potts__i_ VARCHAR);","SELECT kilgore__r_ FROM table_name_95 WHERE potts__i_ = ""1%"";","SELECT kilgore__r_ FROM table_name_95 WHERE potts__i_ = ""1%"";",1 "What is the average risk score of vulnerabilities detected in the last 30 days, grouped by software vendor?","CREATE TABLE vulnerabilities (id INT, detection_date DATE, software_vendor VARCHAR(255), risk_score INT); ","SELECT software_vendor, AVG(risk_score) as avg_risk_score FROM vulnerabilities WHERE detection_date >= DATE(NOW()) - INTERVAL 30 DAY GROUP BY software_vendor;","SELECT software_vendor, AVG(risk_score) as avg_risk_score FROM vulnerabilities WHERE detection_date >= DATEADD(day, -30, GETDATE()) GROUP BY software_vendor;",0 "What score has February 12, 2006 as the date?","CREATE TABLE table_name_38 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_38 WHERE date = ""february 12, 2006"";","SELECT score FROM table_name_38 WHERE date = ""february 12, 2006"";",1 What is the percentage of organic certified fish farms in the Gulf of Mexico in 2020?,"CREATE TABLE fish_farms (farm_id INT, region VARCHAR(50), certification_status VARCHAR(50), year INT);",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM fish_farms WHERE year = 2020)) as percentage FROM fish_farms WHERE region = 'Gulf of Mexico' AND certification_status = 'organic' AND year = 2020;,SELECT (COUNT(*) FILTER (WHERE certification_status = 'Organic')) * 100.0 / COUNT(*) FROM fish_farms WHERE region = 'Gulf of Mexico' AND certification_status = 'Organic' AND year = 2020;,0 What is the average billing amount for cases in the 'Southern' region?,"CREATE TABLE Regions (CaseID INT, Region VARCHAR(50)); ",SELECT AVG(BillingAmount) FROM CaseBilling INNER JOIN Regions ON CaseBilling.CaseID = Regions.CaseID WHERE Region = 'Southern';,SELECT AVG(BillingAmount) FROM Cases WHERE Region = 'Southern';,0 "Find the number of contracts awarded to HUBZone businesses in the Defense industry, broken down by contract value range","CREATE TABLE defense_contracts (contract_id INT, contract_value FLOAT, business_zone VARCHAR(20)); ","SELECT CASE WHEN contract_value < 500000 THEN 'Under 500,000' WHEN contract_value < 1000000 THEN '500,000 to 1,000,000' ELSE 'Over 1,000,000' END AS value_range, COUNT(*) AS contract_count FROM defense_contracts WHERE business_zone = 'HUBZone' GROUP BY value_range;","SELECT business_zone, COUNT(*) as contract_count FROM defense_contracts WHERE business_zone = 'HUBZone' GROUP BY business_zone;",0 What is the name and location of all heritage sites with language preservation programs?,"CREATE TABLE heritage_sites (id INT, name VARCHAR, location VARCHAR, preservation_program VARCHAR); CREATE TABLE preservation_status (id INT, status VARCHAR); ","SELECT heritage_sites.name, heritage_sites.location FROM heritage_sites INNER JOIN preservation_status ON heritage_sites.preservation_program = preservation_status.status WHERE preservation_status.status = 'Active';","SELECT T1.name, T1.location FROM heritage_sites AS T1 JOIN preservation_status AS T2 ON T1.id = T2.preservation_program;",0 "What is the total length of all public transportation projects in New York City that have been completed since 2015, and the average completion time for these projects, ordered by the completion time?","CREATE TABLE transport_projects (id INT, project_name VARCHAR(255), location VARCHAR(255), length FLOAT, completion_time INT); ","SELECT SUM(length), AVG(completion_time) FROM transport_projects WHERE location = 'New York City' AND completion_time >= 2015 GROUP BY completion_time ORDER BY completion_time;","SELECT location, SUM(length) as total_length, AVG(completion_time) as avg_completion_time FROM transport_projects WHERE location = 'New York City' AND completion_time >= '2015-01-01' GROUP BY location ORDER BY total_length DESC;",0 What is the average production cost for each rare earth element in China and the US?,"CREATE TABLE production_costs ( id INT PRIMARY KEY, element VARCHAR(20), country VARCHAR(50), year INT, cost FLOAT );","SELECT element, country, AVG(cost) as avg_cost FROM production_costs WHERE country IN ('China', 'US') GROUP BY element, country;","SELECT element, AVG(cost) FROM production_costs WHERE country IN ('China', 'US') GROUP BY element;",0 "What is the nba draft for the player from the hometown of virginia beach, va?","CREATE TABLE table_11677760_1 (nba_draft VARCHAR, hometown VARCHAR);","SELECT nba_draft FROM table_11677760_1 WHERE hometown = ""Virginia Beach, VA"";","SELECT nba_draft FROM table_11677760_1 WHERE hometown = ""Virginia Beach, VA"";",1 What is the Rank for Viktors Dobrecovs with less than 325 Matches?,"CREATE TABLE table_name_34 (rank INTEGER, name VARCHAR, matches VARCHAR);","SELECT AVG(rank) FROM table_name_34 WHERE name = ""viktors dobrecovs"" AND matches < 325;","SELECT SUM(rank) FROM table_name_34 WHERE name = ""viktors dobrecovs"" AND matches 325;",0 Who is the runner(s)-up with a winning score of −5 (72-71-68=211)?,"CREATE TABLE table_name_48 (runner_s__up VARCHAR, winning_score VARCHAR);",SELECT runner_s__up FROM table_name_48 WHERE winning_score = −5(72 - 71 - 68 = 211);,SELECT runner_s__up FROM table_name_48 WHERE winning_score = 5 (72 - 71 - 68 = 211);,0 "What is Package/Option, when Television Service is Sky Inside?","CREATE TABLE table_name_74 (package_option VARCHAR, television_service VARCHAR);","SELECT package_option FROM table_name_74 WHERE television_service = ""sky inside"";","SELECT package_option FROM table_name_74 WHERE television_service = ""sky inside"";",1 Get the number of unique train routes with wheelchair accessibility for station 'Central',"CREATE TABLE trains (id INT PRIMARY KEY, route_id INT, station VARCHAR(20), wheelchair_accessible BOOLEAN);",SELECT COUNT(DISTINCT route_id) AS num_routes FROM trains WHERE station = 'Central' AND wheelchair_accessible = TRUE;,SELECT COUNT(DISTINCT route_id) FROM trains WHERE station = 'Central' AND wheelchair_accessible = true;,0 What are the latest intelligence gathering techniques used in the 'IntelligenceGathering' table?,"CREATE TABLE IntelligenceGathering (id INT PRIMARY KEY, technique VARCHAR(100), description TEXT, implementation_date DATE, source VARCHAR(50)); ","SELECT technique, description, implementation_date FROM IntelligenceGathering ORDER BY implementation_date DESC LIMIT 1;","SELECT technique, implementation_date FROM IntelligenceGathering ORDER BY implementation_date DESC LIMIT 1;",0 "List the number of graduate student admissions by department in the College of Science, ordered from most to least admissions.","CREATE TABLE College_of_Science (department VARCHAR(50), num_admissions INT); ","SELECT department, num_admissions FROM College_of_Science ORDER BY num_admissions DESC;","SELECT department, SUM(num_admissions) as total_admissions FROM College_of_Science GROUP BY department ORDER BY total_admissions DESC;",0 What Venue has Spartak St. Petersburg Club?,"CREATE TABLE table_name_71 (venue VARCHAR, club VARCHAR);","SELECT venue FROM table_name_71 WHERE club = ""spartak st. petersburg"";","SELECT venue FROM table_name_71 WHERE club = ""spartak st. petersburg"";",1 What is the latest launch year for a satellite?,"CREATE TABLE satellites (id INT PRIMARY KEY, company VARCHAR(50), launch_year INT); ",SELECT MAX(launch_year) FROM satellites;,SELECT MAX(launch_year) FROM satellites;,1 "What is the average total medals of the soviet union, which has more than 2 bronze and more than 0 silver medals?","CREATE TABLE table_name_2 (total INTEGER, nation VARCHAR, bronze VARCHAR, silver VARCHAR);","SELECT AVG(total) FROM table_name_2 WHERE bronze > 2 AND silver > 0 AND nation = ""soviet union"";","SELECT AVG(total) FROM table_name_2 WHERE bronze > 2 AND silver > 0 AND nation = ""soviet union"";",1 "what is the venue on october 28, 2008?","CREATE TABLE table_name_43 (venue VARCHAR, date VARCHAR);","SELECT venue FROM table_name_43 WHERE date = ""october 28, 2008"";","SELECT venue FROM table_name_43 WHERE date = ""october 28, 2008"";",1 What year did the Leo Jackson Racing team win?,"CREATE TABLE table_22298383_1 (year VARCHAR, team VARCHAR);","SELECT year FROM table_22298383_1 WHERE team = ""Leo Jackson Racing"";","SELECT year FROM table_22298383_1 WHERE team = ""Leo Jackson Racing"";",1 What is the average value of artworks by Indigenous Australian artists?,"CREATE TABLE artist_origin (id INT, artist_name VARCHAR(50), origin VARCHAR(50)); CREATE TABLE artwork_value (id INT, artwork_name VARCHAR(50), artist_id INT, value DECIMAL(10, 2));",SELECT AVG(value) as avg_value FROM artwork_value a JOIN artist_origin o ON a.artist_id = o.id WHERE o.origin = 'Indigenous Australian';,SELECT AVG(value) FROM artwork_value JOIN artist_origin ON artwork_value.artist_id = artist_origin.id WHERE artist_origin.origine = 'Indigenous Australian';,0 Where is Fred Couples from?,"CREATE TABLE table_name_71 (country VARCHAR, player VARCHAR);","SELECT country FROM table_name_71 WHERE player = ""fred couples"";","SELECT country FROM table_name_71 WHERE player = ""fred couple"";",0 What is the total value of military equipment sales to India?,"CREATE TABLE Military_Equipment_Sales(id INT, country VARCHAR(50), equipment_type VARCHAR(50), sale_value FLOAT); ",SELECT SUM(sale_value) FROM Military_Equipment_Sales WHERE country = 'India';,SELECT SUM(sale_value) FROM Military_Equipment_Sales WHERE country = 'India';,1 Update the feeding frequency for all Salmon in Tank5 to 4 times per day.,"CREATE TABLE Tank5 (species VARCHAR(20), individual_id INT, feeding_frequency INT); ",UPDATE Tank5 SET feeding_frequency = 4 WHERE species = 'Salmon';,UPDATE Tank5 SET feeding_frequency = 4 WHERE species = 'Salmon';,1 What is the average number of offsides by a team in a single Ligue 1 season?,"CREATE TABLE french_teams (team_id INT, team_name VARCHAR(50)); CREATE TABLE french_matches (match_id INT, home_team_id INT, away_team_id INT, home_team_offsides INT, away_team_offsides INT); ",SELECT AVG(home_team_offsides + away_team_offsides) AS avg_offsides FROM french_matches;,SELECT AVG(home_team_offsides) FROM french_matches JOIN french_teams ON french_matches.away_team_id = french_teams.team_id WHERE Ligue 1 = 1;,0 What is the average daily rate (ADR) for each hotel in a given country?,"CREATE TABLE hotels (hotel_id INT, hotel_name TEXT, country TEXT, base_rate FLOAT);CREATE TABLE bookings (booking_id INT, hotel_id INT, booking_date DATE, rooms_sold INT, revenue FLOAT); ","SELECT h.hotel_name, h.country, AVG(h.base_rate) as avg_daily_rate FROM hotels h INNER JOIN (SELECT hotel_id, DATE(booking_date) as date, SUM(revenue) / SUM(rooms_sold) as daily_rate FROM bookings GROUP BY hotel_id, date) b ON h.hotel_id = b.hotel_id WHERE h.country = 'USA' GROUP BY h.hotel_name, h.country;","SELECT h.country, AVG(h.base_rate) as avg_daily_rate FROM hotels h JOIN bookings b ON h.hotel_id = b.hotel_id GROUP BY h.country;",0 What is the total economic diversification investment in 'Latin America' from '2018' to '2020'?,"CREATE TABLE economic_diversification(id INT, investment TEXT, location TEXT, year INT, amount INT); ",SELECT SUM(amount) FROM economic_diversification WHERE location = 'Latin America' AND year BETWEEN 2018 AND 2020;,SELECT SUM(amount) FROM economic_diversification WHERE location = 'Latin America' AND year BETWEEN 2018 AND 2020;,1 What is the total water conservation effort (in cubic meters) by each city in 2021?,"CREATE TABLE city_water_conservation (city VARCHAR(50), year INT, conservation_volume INT); ","SELECT city, SUM(conservation_volume) AS total_conservation_volume FROM city_water_conservation WHERE year = 2021 GROUP BY city;","SELECT city, SUM(conservation_volume) FROM city_water_conservation WHERE year = 2021 GROUP BY city;",0 What is the total length of all ocean floor mapping projects in the 'MappingLengths' table?,"CREATE TABLE MappingLengths (MappingID INT PRIMARY KEY, MappingName TEXT, MappingLength FLOAT);",SELECT SUM(MappingLength) FROM MappingLengths;,SELECT SUM(MappingLength) FROM MappingLengths;,1 What is the maximum budget allocated for public transportation in urban areas?,"CREATE TABLE areas (id INT, name VARCHAR(20)); CREATE TABLE budget (item VARCHAR(20), area_id INT, amount INT); ",SELECT MAX(amount) FROM budget WHERE item = 'Public Transportation' AND area_id = (SELECT id FROM areas WHERE name = 'Urban');,SELECT MAX(amount) FROM budget WHERE item = 'Public Transportation' AND area_id IN (SELECT id FROM areas WHERE name = 'Urban');,0 "Which Date has a Tournament of milan , italy?","CREATE TABLE table_name_69 (date VARCHAR, tournament VARCHAR);","SELECT date FROM table_name_69 WHERE tournament = ""milan , italy"";","SELECT date FROM table_name_69 WHERE tournament = ""milan, italy"";",0 What is the lowest Shots with a Point that is larger than 32?,"CREATE TABLE table_name_38 (shots INTEGER, points INTEGER);",SELECT MIN(shots) FROM table_name_38 WHERE points > 32;,SELECT MIN(shots) FROM table_name_38 WHERE points > 32;,1 What is the average donation amount by new members in Q2 2022?,"CREATE TABLE Members (MemberID INT, JoinDate DATE, Region VARCHAR(50)); CREATE TABLE Donations (DonationID INT, MemberID INT, DonationDate DATE, Amount DECIMAL(10,2)); ",SELECT AVG(Amount) FROM Donations INNER JOIN Members ON Donations.MemberID = Members.MemberID WHERE YEAR(DonationDate) = 2022 AND Members.MemberID NOT IN (SELECT Members.MemberID FROM Members GROUP BY Members.MemberID HAVING COUNT(Members.MemberID) < 2) AND QUARTER(DonationDate) = 2;,SELECT AVG(Donations.Amount) FROM Donations INNER JOIN Members ON Donations.MemberID = Members.MemberID WHERE Members.JoinDate BETWEEN '2022-04-01' AND '2022-03-31';,0 What is the total billing amount for cases with a successful outcome in New York?,"CREATE TABLE cases (case_id INT, case_outcome VARCHAR(20), billing_amount DECIMAL(10, 2), case_location VARCHAR(20)); ",SELECT SUM(billing_amount) FROM cases WHERE case_outcome = 'Successful' AND case_location = 'New York';,SELECT SUM(billing_amount) FROM cases WHERE case_outcome = 'Successful' AND case_location = 'New York';,1 How many safety inspections were conducted for fishing vessels in the Southern Ocean in the last 3 years?,"CREATE TABLE safety_inspections (id INT, vessel_name VARCHAR(50), type VARCHAR(50), region VARCHAR(50), date DATE); ","SELECT type, COUNT(*) FROM safety_inspections WHERE region = 'Southern Ocean' AND date >= DATE_SUB(CURDATE(), INTERVAL 3 YEAR) AND type = 'Fishing Vessel' GROUP BY type;","SELECT COUNT(*) FROM safety_inspections WHERE type = 'fishing' AND region = 'Southern Ocean' AND date >= DATEADD(year, -3, GETDATE());",0 Which year did the Short Pump Town Center Mall open?,"CREATE TABLE table_name_4 (year_opened VARCHAR, mall_name VARCHAR);","SELECT year_opened FROM table_name_4 WHERE mall_name = ""short pump town center"";","SELECT year_opened FROM table_name_4 WHERE mall_name = ""short pump town center mall"";",0 What is the total amount of climate finance invested in each country?,"CREATE TABLE finance (country TEXT, investment_amount FLOAT); ","SELECT country, SUM(investment_amount) FROM finance GROUP BY country;","SELECT country, SUM(investment_amount) FROM finance GROUP BY country;",1 What is the Name of draft Pick #10?,"CREATE TABLE table_name_19 (name VARCHAR, pick__number VARCHAR);",SELECT name FROM table_name_19 WHERE pick__number = 10;,"SELECT name FROM table_name_19 WHERE pick__number = ""10"";",0 "What is the lowest February, when Record is ""21-30-11"", and when Game is greater than 62?","CREATE TABLE table_name_54 (february INTEGER, record VARCHAR, game VARCHAR);","SELECT MIN(february) FROM table_name_54 WHERE record = ""21-30-11"" AND game > 62;","SELECT MIN(february) FROM table_name_54 WHERE record = ""21-30-11"" AND game > 62;",1 What is the average temperature for all chemical storage units in Texas?,"CREATE TABLE storage_units (id INT, state VARCHAR(255), temperature FLOAT); ",SELECT AVG(temperature) FROM storage_units WHERE state = 'Texas',SELECT AVG(temperature) FROM storage_units WHERE state = 'Texas';,0 How many opponents were there for the game recorded as 6-4 in the Atlanta Falcons 1978 season?,"CREATE TABLE table_16710971_2 (opponents VARCHAR, record VARCHAR);","SELECT COUNT(opponents) FROM table_16710971_2 WHERE record = ""6-4"";","SELECT opponents FROM table_16710971_2 WHERE record = ""6-4"";",0 What is the maximum biomass (kg) of fish in fish farms located in the Caribbean Sea?,"CREATE TABLE fish_farms (id INT, name TEXT, location TEXT, biomass FLOAT); ",SELECT MAX(biomass) FROM fish_farms WHERE location = 'Caribbean Sea';,SELECT MAX(biomass) FROM fish_farms WHERE location = 'Caribbean Sea';,1 What are the service names with the highest budget?,"CREATE TABLE Service (id INT, department_id INT, name VARCHAR(50), cost DECIMAL(10,2)); ",SELECT Service.name FROM Service WHERE cost = (SELECT MAX(cost) FROM Service),"SELECT name, cost FROM Service ORDER BY cost DESC LIMIT 1;",0 "What are the names and total salary expenditures of the rural health departments, with the departments ordered by total salary expenditure and including the patient count for each department?","CREATE TABLE departments (name VARCHAR(255), patient_count INT, total_salary NUMERIC(10, 2)); ","SELECT name, patient_count, total_salary FROM departments ORDER BY total_salary DESC;","SELECT name, SUM(total_salary) as total_salary_expenditure FROM departments GROUP BY name ORDER BY total_salary_expenditure DESC;",0 "List the name of all the distinct customers who have orders with status ""Packing"".","CREATE TABLE orders (customer_id VARCHAR, order_status VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR);","SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = ""Packing"";","SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = ""Packing"";",1 List the total production and reserves for oil fields in the North Sea.,"CREATE TABLE OilFields (FieldID INT, FieldName VARCHAR(50), Country VARCHAR(50), Production INT, Reserves INT); ","SELECT Country, SUM(Production) AS Total_Production, SUM(Reserves) AS Total_Reserves FROM OilFields WHERE Country = 'North Sea' GROUP BY Country;","SELECT SUM(Production) as TotalProduction, SUM(Reserves) as TotalReserves FROM OilFields WHERE Country = 'North Sea';",0 Which Location has a result of L 31-52?,"CREATE TABLE table_name_67 (location VARCHAR, result VARCHAR);","SELECT location FROM table_name_67 WHERE result = ""l 31-52"";","SELECT location FROM table_name_67 WHERE result = ""l 31-52"";",1 What is the top grid that roger williamson lapped less than 7?,"CREATE TABLE table_name_73 (grid INTEGER, driver VARCHAR, laps VARCHAR);","SELECT MAX(grid) FROM table_name_73 WHERE driver = ""roger williamson"" AND laps < 7;","SELECT MAX(grid) FROM table_name_73 WHERE driver = ""roger williamson"" AND laps 7;",0 What is the total number of 'heavy_machinery' in the 'drilling' and 'excavation' categories in the 'equipment_inventory' table?,"CREATE TABLE equipment_inventory (equipment_category VARCHAR(50), equipment_type VARCHAR(50), quantity INT); ","SELECT equipment_category, SUM(quantity) as total_quantity FROM equipment_inventory WHERE equipment_category = 'heavy_machinery' AND (equipment_type = 'drilling' OR equipment_type = 'excavation') GROUP BY equipment_category;","SELECT SUM(quantity) FROM equipment_inventory WHERE equipment_category IN ('drilling', 'excavation');",0 Show AI models' safety and fairness scores for models from non-profit organizations.,"CREATE TABLE ai_models (model_name TEXT, safety_score INTEGER, fairness_score INTEGER, organization_type TEXT); ","SELECT model_name, safety_score, fairness_score FROM ai_models WHERE organization_type = 'Non-Profit';","SELECT model_name, safety_score, fairness_score FROM ai_models WHERE organization_type = 'Non-profit';",0 How many clubs does number 6 play for?,"CREATE TABLE table_12962773_15 (current_club VARCHAR, no VARCHAR);",SELECT COUNT(current_club) FROM table_12962773_15 WHERE no = 6;,SELECT COUNT(current_club) FROM table_12962773_15 WHERE no = 6;,1 Which ICB Sector had a ticker symbol of pp?,"CREATE TABLE table_name_47 (icb_sector VARCHAR, ticker_symbol VARCHAR);","SELECT icb_sector FROM table_name_47 WHERE ticker_symbol = ""pp"";","SELECT icb_sector FROM table_name_47 WHERE ticker_symbol = ""pp"";",1 Show the number of security incidents for each severity level in the last month.,"CREATE TABLE incident_severity (id INT, incident_count INT, severity VARCHAR(50), incident_date DATE); ","SELECT severity, SUM(incident_count) as total_incidents FROM incident_severity WHERE incident_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) GROUP BY severity;","SELECT severity, COUNT(*) as incident_count FROM incident_severity WHERE incident_date >= DATEADD(month, -1, GETDATE()) GROUP BY severity;",0 Who is the opponent in the final of the Tournament of Blenheim?,"CREATE TABLE table_name_42 (opponent_in_the_final VARCHAR, tournament VARCHAR);","SELECT opponent_in_the_final FROM table_name_42 WHERE tournament = ""blenheim"";","SELECT opponent_in_the_final FROM table_name_42 WHERE tournament = ""blenheim"";",1 What is the total number of marine mammals in the Pacific Ocean?,"CREATE TABLE marine_mammals (mammal TEXT, ocean TEXT); ",SELECT COUNT(*) FROM marine_mammals WHERE ocean = 'Pacific Ocean' AND mammal LIKE 'Whale%';,SELECT COUNT(*) FROM marine_mammals WHERE ocean = 'Pacific Ocean';,0 What is the total number of academic publications by female authors?,"CREATE TABLE publications (id INT, author_gender VARCHAR(6), title VARCHAR(255)); ",SELECT COUNT(*) FROM publications WHERE author_gender = 'Female';,SELECT COUNT(*) FROM publications WHERE author_gender = 'Female';,1 What is the trend of mental health scores over time for each school?,"CREATE TABLE students_time (student_id INT, student_name VARCHAR(50), school_id INT, mental_health_score INT, measurement_date DATE); ","SELECT school_id, measurement_date, mental_health_score, LAG(mental_health_score) OVER (PARTITION BY school_id ORDER BY measurement_date) as previous_mental_health_score FROM students_time;","SELECT school_id, AVG(mental_health_score) as avg_mental_health_score FROM students_time GROUP BY school_id;",0 Which player won in 1987 and ended with a score of +9?,"CREATE TABLE table_name_75 (total VARCHAR, to_par VARCHAR, year_s__won VARCHAR);","SELECT total FROM table_name_75 WHERE to_par = ""+9"" AND year_s__won = ""1987"";","SELECT total FROM table_name_75 WHERE to_par = ""+9"" AND year_s__won = ""1987"";",1 Update the name of the port with id 3 to 'Port of Rotterdam',"CREATE TABLE ports (id INT, name TEXT, country TEXT); ",UPDATE ports SET name = 'Port of Rotterdam' WHERE id = 3;,UPDATE ports SET name = 'Port of Rotterdam' WHERE id = 3;,1 How many volunteers signed up in 'Q2 2022' and 'Q3 2022'?,"CREATE TABLE volunteers (volunteer_id INT, volunteer_name TEXT, volunteer_signup_quarter INT, volunteer_signup_year INT); ","SELECT COUNT(*) FROM volunteers WHERE volunteer_signup_quarter IN (2, 3) AND volunteer_signup_year = 2022;","SELECT COUNT(*) FROM volunteers WHERE volunteer_signup_quarter IN ('Q2 2022', 'Q3 2022');",0 What is the total revenue generated from sales of products that are both ethically sourced and produced using circular supply chains?,"CREATE TABLE sales (sale_id INT, product_id INT, quantity INT, price DECIMAL); CREATE TABLE products (product_id INT, product_name TEXT, is_ethically_sourced BOOLEAN, is_circular_supply_chain BOOLEAN); ",SELECT SUM(quantity * price) FROM sales INNER JOIN products ON sales.product_id = products.product_id WHERE is_ethically_sourced = TRUE AND is_circular_supply_chain = TRUE;,SELECT SUM(sales.quantity * sales.price) FROM sales INNER JOIN products ON sales.product_id = products.product_id WHERE products.is_ethically_sourced = TRUE AND products.is_circular_supply_chain = TRUE;,0 What is the total number of returns from Indonesia to Italy with a value less than 50?,"CREATE TABLE id_it_returns (id INT, value INT); ",SELECT COUNT(*) FROM id_it_returns WHERE value < 50;,SELECT COUNT(*) FROM id_it_returns WHERE value 50 AND country = 'Indonesia';,0 What is the Record when Buffalo is at Home?,"CREATE TABLE table_name_36 (record VARCHAR, home VARCHAR);","SELECT record FROM table_name_36 WHERE home = ""buffalo"";","SELECT record FROM table_name_36 WHERE home = ""buffalo"";",1 What was the total number of tourists visiting South American countries in 2017?,"CREATE TABLE Tourist_Arrivals ( id INT, country_id INT, year INT, visitors INT, FOREIGN KEY (country_id) REFERENCES Countries(id) ); ",SELECT SUM(t.visitors) as total_visitors FROM Tourist_Arrivals t INNER JOIN Countries c ON t.country_id = c.id WHERE c.continent = 'South America' AND t.year = 2017;,SELECT SUM(visitors) FROM Tourist_Arrivals WHERE year = 2017 AND Country_id IN (SELECT id FROM Countries WHERE country_name = 'South America');,0 "What rank has 0 as the bronze, and a total less than 3, with north korea as the nation?","CREATE TABLE table_name_56 (rank VARCHAR, nation VARCHAR, bronze VARCHAR, total VARCHAR);","SELECT rank FROM table_name_56 WHERE bronze = 0 AND total < 3 AND nation = ""north korea"";","SELECT rank FROM table_name_56 WHERE bronze = 0 AND total 3 AND nation = ""north korea"";",0 What was the 2006 population count of the local government area where Coober Pedy is located?,"CREATE TABLE table_23685890_2 (pop_2006 VARCHAR, major_town VARCHAR);","SELECT pop_2006 FROM table_23685890_2 WHERE major_town = ""Coober Pedy"";","SELECT COUNT(pop_2006) FROM table_23685890_2 WHERE major_town = ""Coober Pedy"";",0 "List aircraft models along with the number of flight hours they have accumulated, ranked in descending order per manufacturer.","CREATE TABLE AircraftModels (ModelID INT, Model VARCHAR(50), Manufacturer VARCHAR(50), FlightHours INT); ","SELECT Model, Manufacturer, SUM(FlightHours) AS Total_Flight_Hours, RANK() OVER (PARTITION BY Manufacturer ORDER BY SUM(FlightHours) DESC) AS Flight_Hour_Rank FROM AircraftModels GROUP BY Model, Manufacturer;","SELECT Model, Manufacturer, SUM(FlightHours) as TotalFlightHours FROM AircraftModels GROUP BY Model, Manufacturer ORDER BY TotalFlightHours DESC;",0 What is the average rating of hotels in 'Paris'?,"CREATE TABLE hotels (id INT, name TEXT, city TEXT, rating FLOAT); ",SELECT AVG(rating) FROM hotels WHERE city = 'Paris';,SELECT AVG(rating) FROM hotels WHERE city = 'Paris';,1 Which is the most populated city in Africa?,"CREATE TABLE City (CityName VARCHAR(50), Country VARCHAR(50), Population INT, Continent VARCHAR(50)); ","SELECT CityName, Population FROM City WHERE Continent = 'Africa' ORDER BY Population DESC LIMIT 1;","SELECT CityName, MAX(Population) FROM City WHERE Continent = 'Africa' GROUP BY CityName;",0 What is the average growth rate of yellowtail in offshore fish farms in Japan?,"CREATE TABLE fish_growth (id INT, farm_id INT, species TEXT, growth_rate DECIMAL(5,2), country TEXT, water_type TEXT); ",SELECT AVG(growth_rate) FROM fish_growth WHERE species = 'Yellowtail' AND country = 'Japan' AND water_type = 'Offshore';,SELECT AVG(growth_rate) FROM fish_growth WHERE species = 'Yellowtail' AND country = 'Japan' AND water_type = 'Offshore';,1 What circuit is the Sprint Cup series championship?,"CREATE TABLE table_name_29 (circuit VARCHAR, championship VARCHAR);","SELECT circuit FROM table_name_29 WHERE championship = ""sprint cup series"";","SELECT circuit FROM table_name_29 WHERE championship = ""sprint cup series"";",1 What is the highest number in attendance against the game at Kansas City Chiefs?,"CREATE TABLE table_name_47 (attendance INTEGER, opponent VARCHAR);","SELECT MAX(attendance) FROM table_name_47 WHERE opponent = ""at kansas city chiefs"";","SELECT MAX(attendance) FROM table_name_47 WHERE opponent = ""kansas city chiefs"";",0 What is the highest number of laps when honda is the manufacturer and the grid number is 12?,"CREATE TABLE table_name_27 (laps INTEGER, manufacturer VARCHAR, grid VARCHAR);","SELECT MAX(laps) FROM table_name_27 WHERE manufacturer = ""honda"" AND grid = 12;","SELECT MAX(laps) FROM table_name_27 WHERE manufacturer = ""honda"" AND grid = 12;",1 List all records from 'farmers' table sorted by age,"CREATE TABLE farmers (id INT PRIMARY KEY, name VARCHAR(100), age INT, gender VARCHAR(10), location VARCHAR(50));",SELECT * FROM farmers ORDER BY age;,SELECT * FROM farmers ORDER BY age;,1 "What is the average age of all female news reporters in the ""reporters"" table?","CREATE TABLE reporters (id INT PRIMARY KEY, name TEXT, gender TEXT, age INT, country TEXT);",SELECT AVG(age) FROM reporters WHERE gender = 'female';,SELECT AVG(age) FROM reporters WHERE gender = 'Female';,0 What is the maximum salary for each position in the Finance department?,"CREATE TABLE finance_positions (id INT, position VARCHAR(50), department VARCHAR(50), salary FLOAT); ","SELECT position, MAX(salary) FROM finance_positions WHERE department = 'Finance' GROUP BY position;","SELECT position, MAX(salary) FROM finance_positions WHERE department = 'Finance' GROUP BY position;",1 What is the maximum number of bytes transferred in a single day?,"CREATE TABLE network_traffic (id INT, date DATE, bytes INT); ","SELECT date, MAX(bytes) as max_bytes FROM network_traffic GROUP BY date;",SELECT MAX(bytes) FROM network_traffic;,0 How many confirmed COVID-19 cases in Japan?,"CREATE TABLE CovidData (Country TEXT, ConfirmedCases INT); ",SELECT ConfirmedCases FROM CovidData WHERE Country = 'Japan';,SELECT SUM(ConfirmedCases) FROM CovidData WHERE Country = 'Japan';,0 Find the 'vehicle_id' of the 'AutonomousCar' with the highest 'max_speed' in the 'Vehicles' table,"CREATE TABLE Vehicles (vehicle_id INT, vehicle_type VARCHAR(20), max_speed INT); ",SELECT vehicle_id FROM Vehicles WHERE vehicle_type = 'AutonomousCar' AND max_speed = (SELECT MAX(max_speed) FROM Vehicles WHERE vehicle_type = 'AutonomousCar');,SELECT vehicle_id FROM Vehicles WHERE vehicle_type = 'AutonomousCar' AND max_speed = (SELECT MAX(max_speed) FROM Vehicles WHERE vehicle_type = 'AutonomousCar');,1 Who sponsors Josele Garza in all rounds?,"CREATE TABLE table_name_60 (sponsor_s_ VARCHAR, rounds VARCHAR, driver_s_ VARCHAR);","SELECT sponsor_s_ FROM table_name_60 WHERE rounds = ""all"" AND driver_s_ = ""josele garza"";","SELECT sponsor_s_ FROM table_name_60 WHERE rounds = ""all"" AND driver_s_ = ""josele garza"";",1 What is the average property tax for each city?,"CREATE TABLE tax (id INT, amount FLOAT, city VARCHAR(20)); CREATE TABLE property (id INT, city VARCHAR(20), tax_id INT); ","SELECT p.city, AVG(t.amount) FROM property p JOIN tax t ON p.tax_id = t.id GROUP BY p.city;","SELECT p.city, AVG(t.amount) as avg_tax FROM property p JOIN tax t ON p.tax_id = t.id GROUP BY p.city;",0 What was the average sale price for artworks in each art movement?,"CREATE TABLE Artworks (Artwork VARCHAR(255), ArtMovement VARCHAR(255), SalePrice DECIMAL(10,2)); ","SELECT ArtMovement, AVG(SalePrice) as AvgSalePrice FROM Artworks GROUP BY ArtMovement;","SELECT ArtMovement, AVG(SalePrice) FROM Artworks GROUP BY ArtMovement;",0 "What is the total water consumption by agricultural, industrial, and residential sectors in 2021?","CREATE TABLE water_consumption_sectors (sector VARCHAR(50), year INT, consumption INT); ","SELECT sector, SUM(consumption) as total_consumption FROM water_consumption_sectors WHERE year = 2021 GROUP BY sector;","SELECT sector, SUM(consumption) FROM water_consumption_sectors WHERE year = 2021 GROUP BY sector;",0 Create a table for storing healthcare facility inspection results,"CREATE TABLE inspection_results (id INT PRIMARY KEY, facility_id INT, inspection_date DATE, inspection_score INT);","INSERT INTO inspection_results (id, facility_id, inspection_date, inspection_score) VALUES (1, 1, '2022-10-15', 90), (2, 1, '2023-03-20', 95), (3, 2, '2022-11-05', 85);","CREATE TABLE inspection_results (id INT PRIMARY KEY, facility_id INT, inspection_date DATE, inspection_score INT);",0 Update the inventory count of all cotton skirts to 200.,"CREATE TABLE cotton_skirts (id INT PRIMARY KEY, inventory_count INT); ",UPDATE cotton_skirts SET inventory_count = 200;,UPDATE cotton_skirts SET inventory_count = 200 WHERE id = 200;,0 What is the most common infectious disease in Asia?,"CREATE TABLE Diseases (Disease TEXT, Continent TEXT, NumberOfCases INTEGER); ",SELECT Disease FROM Diseases WHERE Continent = 'Asia' AND NumberOfCases = (SELECT MAX(NumberOfCases) FROM Diseases WHERE Continent = 'Asia');,"SELECT Disease, COUNT(*) AS NumberOfCases FROM Diseases WHERE Continent = 'Asia' GROUP BY Disease ORDER BY NumberOfCases DESC LIMIT 1;",0 What is the total number of hours played for the game 'League of Legends'?,"CREATE TABLE PlayerActivity (PlayerID INT, Game VARCHAR(100), HoursPlayed INT); ",SELECT SUM(HoursPlayed) FROM PlayerActivity WHERE Game = 'League of Legends';,SELECT SUM(HoursPlayed) FROM PlayerActivity WHERE Game = 'League of Legends';,1 What is the maximum price of a product that contains shea butter and is sourced from Africa?,"CREATE TABLE ingredients (ingredient_id INT, ingredient VARCHAR(255), source_country VARCHAR(255)); CREATE TABLE product_ingredients (product_id INT, ingredient_id INT, price DECIMAL(5,2));",SELECT MAX(price) FROM product_ingredients JOIN ingredients ON product_ingredients.ingredient_id = ingredients.ingredient_id WHERE ingredient = 'shea butter' AND source_country = 'Africa';,SELECT MAX(price) FROM product_ingredients p JOIN ingredients i ON p.ingredient_id = i.ingredient_id WHERE i.source_country = 'Africa' AND i.ingredient LIKE '%Shea Butter%';,0 Name the points against for 51 points,"CREATE TABLE table_12792876_4 (points_against VARCHAR, points VARCHAR);","SELECT points_against FROM table_12792876_4 WHERE points = ""51"";",SELECT points_against FROM table_12792876_4 WHERE points = 51;,0 How many labor violations were reported in the 'labour_productivity' table for mines located in 'Asia'?,"CREATE TABLE labour_productivity (mine_location VARCHAR(255), violation_count INT); ",SELECT COUNT(*) FROM labour_productivity WHERE mine_location = 'Asia';,SELECT SUM(violation_count) FROM labour_productivity WHERE mine_location = 'Asia';,0 "For the tournament played on Oct 17, 1982, what was the winning score?","CREATE TABLE table_name_69 (winning_score VARCHAR, date VARCHAR);","SELECT winning_score FROM table_name_69 WHERE date = ""oct 17, 1982"";","SELECT winning_score FROM table_name_69 WHERE date = ""october 17, 1982"";",0 What is the maximum number of ads clicked by users in Canada on our platform in a single day?,"CREATE TABLE user_actions (user_id INT, user_country VARCHAR(50), action_date DATE, ad_clicks INT);",SELECT MAX(ad_clicks) FROM user_actions WHERE user_country = 'Canada';,SELECT MAX(ad_clicks) FROM user_actions WHERE user_country = 'Canada';,1 What was the record when they played game 58?,"CREATE TABLE table_name_59 (record VARCHAR, game VARCHAR);",SELECT record FROM table_name_59 WHERE game = 58;,"SELECT record FROM table_name_59 WHERE game = ""58"";",0 What is the name of the spacecraft with the longest duration in space?,"CREATE TABLE Spacecraft (name VARCHAR(30), duration INT); ",SELECT name FROM Spacecraft ORDER BY duration DESC LIMIT 1;,SELECT name FROM Spacecraft ORDER BY duration DESC LIMIT 1;,1 Who is the winner of the H.E.B. Texas open?,"CREATE TABLE table_name_76 (winner VARCHAR, tournament VARCHAR);","SELECT winner FROM table_name_76 WHERE tournament = ""h.e.b. texas open"";","SELECT winner FROM table_name_76 WHERE tournament = ""h.e.b. texas open"";",1 How many departments does the college has?,CREATE TABLE department (dept_name VARCHAR);,SELECT COUNT(DISTINCT dept_name) FROM department;,SELECT COUNT(*) FROM department;,0 What are the names and completion dates of all utility projects in the infrastructure database?,"CREATE TABLE Infrastructure_Projects (Project_ID INT, Project_Name VARCHAR(50), Project_Type VARCHAR(50), Completion_Date DATE); ","SELECT Project_Name, Completion_Date FROM Infrastructure_Projects WHERE Project_Type = 'Utility';","SELECT Project_Name, Completion_Date FROM Infrastructure_Projects WHERE Project_Type = 'Utility';",1 What is the total number of military equipment sold by contractors to the European Union?,"CREATE TABLE Contractors (ContractorID INT, ContractorName VARCHAR(100), Country VARCHAR(50));CREATE TABLE MilitaryEquipment (EquipmentID INT, EquipmentName VARCHAR(100), QuantitySold INT, ContractorID INT);CREATE VIEW EUMembers AS SELECT 'Germany' AS Country UNION ALL SELECT 'France' UNION ALL SELECT 'Italy' UNION ALL SELECT 'Spain' UNION ALL SELECT 'Netherlands' UNION ALL SELECT 'Belgium';",SELECT SUM(ME.QuantitySold) FROM MilitaryEquipment ME JOIN Contractors C ON ME.ContractorID = C.ContractorID WHERE C.Country IN (SELECT Country FROM EUMembers);,SELECT SUM(QuantitySold) FROM MilitaryEquipment INNER JOIN EUMembers ON MilitaryEquipment.ContractorID = EUMembers.ContractorID WHERE EUMembers.Country = 'Germany';,0 What is the average ESG rating for companies in the technology sector with more than 5000 employees?,"CREATE TABLE companies (id INT, sector VARCHAR(255), employees INT, esg_rating FLOAT); ",SELECT AVG(esg_rating) FROM companies WHERE sector = 'technology' AND employees > 5000;,SELECT AVG(esg_rating) FROM companies WHERE sector = 'technology' AND employees > 5000;,1 "What is the average mass of all spacecraft that use a specific type of propulsion system, grouped by manufacturing country?","CREATE TABLE Spacecraft (SpacecraftID INT, PropulsionSystem VARCHAR, ManufacturingCountry VARCHAR, Mass FLOAT);","SELECT ManufacturingCountry, AVG(Mass) FROM Spacecraft WHERE PropulsionSystem = 'Chemical Rocket' GROUP BY ManufacturingCountry;","SELECT ManufacturingCountry, AVG(Mass) FROM Spacecraft GROUP BY ManufacturingCountry;",0 What is the average price of cruelty-free certified products?,"CREATE TABLE products (id INT, name VARCHAR(255), category VARCHAR(255), price DECIMAL(10, 2), is_cruelty_free BOOLEAN); ",SELECT AVG(price) FROM products WHERE is_cruelty_free = true;,SELECT AVG(price) FROM products WHERE is_cruelty_free = true;,1 Find the id and name of the staff who has been assigned for the shortest period.,"CREATE TABLE Staff_Department_Assignments (staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_name VARCHAR);","SELECT T1.staff_id, T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1;","SELECT T1.staff_id, T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY COUNT(*) DESC LIMIT 1;",0 What are the names of the Venus missions by Russia?,"CREATE TABLE venus_mission (name VARCHAR(50), launch_year INT, agency VARCHAR(50));",SELECT name FROM venus_mission WHERE agency = 'Russia';,SELECT name FROM venus_mission WHERE agency = 'Russia';,1 What is the average quantity of sustainable materials used per production in Europe?,"CREATE TABLE production (production_id INT, material_id INT, quantity INT, country TEXT); CREATE TABLE materials (material_id INT, material_name TEXT, is_sustainable BOOLEAN); ",SELECT AVG(quantity) FROM production JOIN materials ON production.material_id = materials.material_id WHERE is_sustainable = TRUE AND country = 'Europe';,SELECT AVG(production.quantity) FROM production INNER JOIN materials ON production.material_id = materials.material_id WHERE materials.is_sustainable = true AND production.country = 'Europe';,0 "For events with values of exactly 1, and 0 cuts made, what is the fewest number of top-10s?","CREATE TABLE table_name_79 (top_10 INTEGER, events VARCHAR, cuts_made VARCHAR);",SELECT MIN(top_10) FROM table_name_79 WHERE events = 1 AND cuts_made > 0;,"SELECT MIN(top_10) FROM table_name_79 WHERE events = ""1"" AND cuts_made 0;",0 "What is Headquarter, when Language is English, and when Type is Independent Online News Portal?","CREATE TABLE table_name_89 (headquarter VARCHAR, language VARCHAR, type VARCHAR);","SELECT headquarter FROM table_name_89 WHERE language = ""english"" AND type = ""independent online news portal"";","SELECT headquarter FROM table_name_89 WHERE language = ""english"" AND type = ""independent online news portal"";",1 How many female candidates were interviewed for managerial positions in the last 6 months?,"CREATE TABLE Candidates (CandidateID INT, Gender VARCHAR(10), Position VARCHAR(20), InterviewDate DATE); ","SELECT COUNT(*) FROM Candidates WHERE Gender = 'Female' AND Position = 'Manager' AND InterviewDate BETWEEN DATE_SUB(CURDATE(), INTERVAL 6 MONTH) AND CURDATE();","SELECT COUNT(*) FROM Candidates WHERE Gender = 'Female' AND Position = 'Manager' AND InterviewDate >= DATEADD(month, -6, GETDATE());",0 How many female patients were diagnosed with a disease before 2020?,"CREATE TABLE Rural_Patients (Patient_ID INT, Age INT, Gender VARCHAR(10), Diagnosis VARCHAR(20)); CREATE TABLE Asthma_Diagnosis (Diagnosis VARCHAR(20), Diagnosis_Date DATE); ",SELECT COUNT(Rural_Patients.Patient_ID) FROM Rural_Patients INNER JOIN Asthma_Diagnosis ON Rural_Patients.Diagnosis = Asthma_Diagnosis.Diagnosis WHERE Rural_Patients.Gender = 'Female' AND Asthma_Diagnosis.Diagnosis_Date < '2020-01-01';,SELECT COUNT(*) FROM Rural_Patients WHERE Gender = 'Female' AND Diagnosis '2020-01-01';,0 What is the total revenue generated by tourism in Bali in 2020?,"CREATE TABLE bali_tourism (id INT, year INT, revenue INT); ",SELECT SUM(revenue) FROM bali_tourism WHERE year = 2020;,SELECT SUM(revenue) FROM bali_tourism WHERE year = 2020;,1 What was the name of the race on 24 September?,"CREATE TABLE table_name_37 (name VARCHAR, date VARCHAR);","SELECT name FROM table_name_37 WHERE date = ""24 september"";","SELECT name FROM table_name_37 WHERE date = ""24 september"";",1 Name the year with the best female pop vocal album and result of won,"CREATE TABLE table_name_43 (year VARCHAR, category VARCHAR, result VARCHAR);","SELECT year FROM table_name_43 WHERE category = ""best female pop vocal album"" AND result = ""won"";","SELECT year FROM table_name_43 WHERE category = ""best female pop vocal album"" AND result = ""won"";",1 What is the maximum membership duration in the 'retail' sector?,"CREATE TABLE union_members (member_id INT, sector VARCHAR(20), membership_duration INT); ",SELECT MAX(membership_duration) FROM union_members WHERE sector = 'Retail';,SELECT MAX(membership_duration) FROM union_members WHERE sector ='retail';,0 What is the maximum capacity of a shelter in 'west_africa' region?,"CREATE TABLE region (region_id INT, name VARCHAR(255)); CREATE TABLE shelter (shelter_id INT, name VARCHAR(255), region_id INT, capacity INT); ",SELECT MAX(capacity) FROM shelter WHERE region_id = (SELECT region_id FROM region WHERE name = 'west_africa');,SELECT MAX(capacity) FROM shelter WHERE region_id = (SELECT region_id FROM region WHERE name = 'west_africa');,1 List the top 3 cuisines with the highest average calorie content?,"CREATE TABLE Dishes (DishID INT, DishName VARCHAR(50), Cuisine VARCHAR(50), Calories INT); ","SELECT Cuisine, AVG(Calories) FROM Dishes GROUP BY Cuisine ORDER BY AVG(Calories) DESC LIMIT 3;","SELECT Cuisine, AVG(Calories) as AvgCalories FROM Dishes GROUP BY Cuisine ORDER BY AvgCalories DESC LIMIT 3;",0 What is the total waste generated by all departments in the last month?,"CREATE TABLE Waste (waste_id INT, department VARCHAR(20), waste_amount DECIMAL(5,2), waste_date DATE);","SELECT SUM(waste_amount) FROM Waste WHERE waste_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH);","SELECT SUM(waste_amount) FROM Waste WHERE waste_date >= DATEADD(month, -1, GETDATE());",0 Which game site has a recap as the match report for week 7?,"CREATE TABLE table_name_84 (game_site VARCHAR, match_report VARCHAR, week VARCHAR);","SELECT game_site FROM table_name_84 WHERE match_report = ""recap"" AND week = 7;","SELECT game_site FROM table_name_84 WHERE match_report = ""recap"" AND week = 7;",1 Which Institution has a Mascot of broncbusters?,"CREATE TABLE table_name_43 (institution VARCHAR, mascot VARCHAR);","SELECT institution FROM table_name_43 WHERE mascot = ""broncbusters"";","SELECT institution FROM table_name_43 WHERE mascot = ""broncbusters"";",1 "What is the number of mental health parity coverage cases per community health worker, by state?","CREATE TABLE CommunityHealthWorkers (WorkerID INT, State VARCHAR(20)); CREATE TABLE MentalHealthParity (State VARCHAR(20), Coverage DECIMAL(5,2)); ","SELECT State, COUNT(DISTINCT WorkerID) as NumWorkers, SUM(Coverage) as TotalCoverage, 1.0 * SUM(Coverage) / COUNT(DISTINCT WorkerID) as AvgCoveragePerWorker FROM CommunityHealthWorkers JOIN MentalHealthParity ON CommunityHealthWorkers.State = MentalHealthParity.State GROUP BY State;","SELECT CommunityHealthWorkers.State, COUNT(MentalHealthParity.Coverage) FROM CommunityHealthWorkers INNER JOIN MentalHealthParity ON CommunityHealthWorkers.State = MentalHealthParity.State GROUP BY CommunityHealthWorkers.State;",0 List the top 3 riskiest states for underwriting?,"CREATE TABLE RiskAssessment (State VARCHAR(2), RiskScore INT); ","SELECT State, RiskScore FROM RiskAssessment ORDER BY RiskScore DESC LIMIT 3;","SELECT State, RiskScore FROM RiskAssessment ORDER BY RiskScore DESC LIMIT 3;",1 Which Score has Opponents in the final of john bromwich frank sedgman?,"CREATE TABLE table_name_92 (score VARCHAR, opponents_in_the_final VARCHAR);","SELECT score FROM table_name_92 WHERE opponents_in_the_final = ""john bromwich frank sedgman"";","SELECT score FROM table_name_92 WHERE opponents_in_the_final = ""john bromwich frank sedgman"";",1 What is the change in landfill capacity for Europe between the years 2017 and 2018?,"CREATE TABLE landfill_capacity (region VARCHAR(50), year INT, capacity FLOAT); ","SELECT (LAG(capacity, 1) OVER (PARTITION BY region ORDER BY year) - capacity) * 100 FROM landfill_capacity WHERE region = 'Europe';","SELECT region, year, capacity, ROW_NUMBER() OVER (PARTITION BY region ORDER BY year) as rn FROM landfill_capacity WHERE region = 'Europe';",0 What is the average rating of eco-friendly hotels in Rome?,"CREATE TABLE eco_hotels_italy (hotel_id INT, name TEXT, city TEXT, rating FLOAT); ",SELECT AVG(rating) FROM eco_hotels_italy WHERE city = 'Rome';,SELECT AVG(rating) FROM eco_hotels_italy WHERE city = 'Rome';,1 List the top 5 ingredients with the lowest calorie count in the ingredient_nutrition table.,"CREATE TABLE ingredient_nutrition (ingredient_id INT, ingredient_name VARCHAR(50), calorie_count INT); ","SELECT ingredient_id, ingredient_name, calorie_count FROM (SELECT ingredient_id, ingredient_name, calorie_count, ROW_NUMBER() OVER (ORDER BY calorie_count ASC) AS rank FROM ingredient_nutrition) WHERE rank <= 5;","SELECT ingredient_name, calorie_count FROM ingredient_nutrition ORDER BY calorie_count DESC LIMIT 5;",0 What is the average speed of vessels with the 'HighSpeed' classification?,"CREATE TABLE Vessels (VesselID INT, VesselName VARCHAR(50), Classification VARCHAR(50), AverageSpeed DECIMAL(5,2)); ",SELECT AVG(AverageSpeed) FROM Vessels WHERE Classification = 'HighSpeed';,SELECT AVG(AverageSpeed) FROM Vessels WHERE Classification = 'HighSpeed';,1 Identify the years with the lowest production of Cerium and Praseodymium,"CREATE TABLE production_data (element VARCHAR(10), year INT, quantity INT); ","SELECT element, MIN(year) AS min_year FROM production_data WHERE element IN ('Cerium', 'Praseodymium') GROUP BY element;","SELECT year, MIN(quantity) FROM production_data WHERE element IN ('Cerium', 'Praseodymium') GROUP BY year ORDER BY MIN(quantity) DESC LIMIT 1;",0 what is the least total when the nation is canada (can) and bronze is less than 0?,"CREATE TABLE table_name_78 (total INTEGER, nation VARCHAR, bronze VARCHAR);","SELECT MIN(total) FROM table_name_78 WHERE nation = ""canada (can)"" AND bronze < 0;","SELECT MIN(total) FROM table_name_78 WHERE nation = ""canadian (can)"" AND bronze 0;",0 Which FAT32 has yes v1.0/v1.1 for NTFS?,"CREATE TABLE table_name_31 (fat32 VARCHAR, ntfs VARCHAR);","SELECT fat32 FROM table_name_31 WHERE ntfs = ""yes v1.0/v1.1"";","SELECT fat32 FROM table_name_31 WHERE ntfs = ""yes v1.0/v1.1"";",1 What was Home team Footscray's score?,CREATE TABLE table_name_52 (home_team VARCHAR);,"SELECT home_team AS score FROM table_name_52 WHERE home_team = ""footscray"";","SELECT home_team AS score FROM table_name_52 WHERE home_team = ""footscray"";",1 Update the artist_demographics table to include the correct artist_gender for artist 'Alexander' with artist_id 101.,"CREATE TABLE artist_demographics (artist_id INT, artist_name TEXT, artist_gender TEXT);",UPDATE artist_demographics SET artist_gender = 'Male' WHERE artist_id = 101 AND artist_name = 'Alexander';,UPDATE artist_demographics SET artist_gender = 'Alexander' WHERE artist_id = 101;,0 What's the rank when the laps are fewer than 137 and the qual is 116.470?,"CREATE TABLE table_name_99 (rank VARCHAR, laps VARCHAR, qual VARCHAR);","SELECT rank FROM table_name_99 WHERE laps < 137 AND qual = ""116.470"";","SELECT rank FROM table_name_99 WHERE laps 137 AND qual = ""116.470"";",0 What is the total cargo weight for Vessel A?,"CREATE TABLE Vessels (VesselID varchar(10), CargoWeight int); ",SELECT SUM(CargoWeight) FROM Vessels WHERE VesselID = 'VesselA';,SELECT SUM(CargoWeight) FROM Vessels WHERE VesselID = 'Vessel A';,0 "Update the vessel ""Mediterranean Mermaid"" with id 108 to have a gross tonnage of 3000","CREATE TABLE vessels (id INT, name TEXT, gross_tonnage INT);",UPDATE vessels SET gross_tonnage = 3000 WHERE id = 108 AND name = 'Mediterranean Mermaid';,UPDATE vessels SET gross_tonnage = 3000 WHERE id = 108 AND name = 'Mediterranean Mermaid';,1 What are the safety protocols for high-risk chemicals?,"CREATE TABLE chemicals (id INT PRIMARY KEY, chemical_name VARCHAR(255), hazard_level VARCHAR(255));",SELECT * FROM chemicals WHERE hazard_level = 'High';,"SELECT chemical_name, hazard_level FROM chemicals WHERE hazard_level = 'High';",0 What is the 2013 BAFA adult flag division in Aylesbury?,CREATE TABLE table_name_95 (location VARCHAR);,"SELECT 2013 AS _bafa_adult_flag_division FROM table_name_95 WHERE location = ""aylesbury"";","SELECT 2013 FROM table_name_95 WHERE location = ""aylesbury"";",0 Calculate the average program impact and expenses per continent.,"CREATE TABLE Programs (ProgramID INT, ProgramName TEXT, Location TEXT, Expenses DECIMAL(10,2), Impact INT, Continent TEXT); ","SELECT Continent, AVG(Expenses), AVG(Impact) FROM Programs GROUP BY Continent;","SELECT Continent, AVG(Impact) as AvgImpact, AVG(Expenses) as AvgExpenses FROM Programs GROUP BY Continent;",0 What is the maximum amount of sugar in grams for vegan desserts?,"CREATE TABLE desserts (id INT, name VARCHAR(255), vegan BOOLEAN, sugar_grams INT); ",SELECT MAX(sugar_grams) FROM desserts WHERE vegan = TRUE;,SELECT MAX(sugar_grams) FROM desserts WHERE vegan = true;,0 What is the name where the delivered date is 1839/08?,"CREATE TABLE table_name_22 (name VARCHAR, delivered VARCHAR);","SELECT name FROM table_name_22 WHERE delivered = ""1839/08"";","SELECT name FROM table_name_22 WHERE delivered = ""1839/08"";",1 What league played in 2011?,"CREATE TABLE table_name_65 (league VARCHAR, year VARCHAR);",SELECT league FROM table_name_65 WHERE year = 2011;,SELECT league FROM table_name_65 WHERE year = 2011;,1 "What is the average Week for the game at three rivers stadium, with a Record of 3–2?","CREATE TABLE table_name_44 (week INTEGER, location VARCHAR, record VARCHAR);","SELECT AVG(week) FROM table_name_44 WHERE location = ""three rivers stadium"" AND record = ""3–2"";","SELECT AVG(week) FROM table_name_44 WHERE location = ""three rivers stadium"" AND record = ""3–2"";",1 Which mine has the highest labor productivity?,"CREATE TABLE mines (mine_id INT, name TEXT, location TEXT, productivity FLOAT); ","SELECT name, MAX(productivity) FROM mines;","SELECT name, MAX(productivity) FROM mines GROUP BY name;",0 What is the internet when the position is more than 13?,"CREATE TABLE table_name_12 (internet VARCHAR, position INTEGER);",SELECT internet FROM table_name_12 WHERE position > 13;,SELECT internet FROM table_name_12 WHERE position > 13;,1 "What is Date, when Rating 1.5, and when Event is Johnson Vs. Moraga?","CREATE TABLE table_name_76 (date VARCHAR, rating VARCHAR, event VARCHAR);","SELECT date FROM table_name_76 WHERE rating = ""1.5"" AND event = ""johnson vs. moraga"";","SELECT date FROM table_name_76 WHERE rating = ""1.5"" AND event = ""johnson vs. moraga"";",1 What is Oxfordshire Area's Ensemble Name?,"CREATE TABLE table_name_29 (ensemble_name VARCHAR, area VARCHAR);","SELECT ensemble_name FROM table_name_29 WHERE area = ""oxfordshire"";","SELECT ensemble_name FROM table_name_29 WHERE area = ""oxfordshire"";",1 What rank is Germany?,"CREATE TABLE table_name_74 (rank VARCHAR, country VARCHAR);","SELECT rank FROM table_name_74 WHERE country = ""germany"";","SELECT rank FROM table_name_74 WHERE country = ""germany"";",1 Insert a new record for the 'Tesla Model Y' with an MPG of 125 in the 'green_vehicles' table.,"CREATE TABLE green_vehicles (vehicle_id INT, make VARCHAR(50), model VARCHAR(50), mpg DECIMAL(5,2));","INSERT INTO green_vehicles (vehicle_id, make, model, mpg) VALUES (NULL, 'Tesla', 'Model Y', 125);","INSERT INTO green_vehicles (make, model, mpg) VALUES ('Tesla Model Y', 125);",0 "How many losses have corinthians as the team, with an against greater than 26?","CREATE TABLE table_name_32 (lost INTEGER, team VARCHAR, against VARCHAR);","SELECT SUM(lost) FROM table_name_32 WHERE team = ""corinthians"" AND against > 26;","SELECT SUM(lost) FROM table_name_32 WHERE team = ""corinthians"" AND against > 26;",1 Where is the station with a coverage of yucatán quintana roo campeche transmitting from?,"CREATE TABLE table_name_15 (transmitting_from VARCHAR, coverage VARCHAR);","SELECT transmitting_from FROM table_name_15 WHERE coverage = ""yucatán quintana roo campeche"";","SELECT transmitting_from FROM table_name_15 WHERE coverage = ""yucatán quintana roo campeche"";",1 What is the maximum response time for emergency calls in each precinct for the month of August 2021?,"CREATE TABLE emergency_calls (id INT, precinct VARCHAR(20), response_time INT, call_date DATE); ","SELECT precinct, MAX(response_time) FROM emergency_calls WHERE call_date BETWEEN '2021-08-01' AND '2021-08-31' GROUP BY precinct;","SELECT precinct, MAX(response_time) FROM emergency_calls WHERE call_date BETWEEN '2021-08-01' AND '2021-08-30' GROUP BY precinct;",0 "Identify the artist with the most works displayed in galleries located in Tokyo, and show the number of works and gallery names.","CREATE TABLE Artists (id INT, name VARCHAR(30)); CREATE TABLE Works (id INT, artist_id INT, title VARCHAR(50)); CREATE TABLE Gallery_Works (id INT, gallery_id INT, work_id INT); CREATE TABLE Galleries (id INT, name VARCHAR(30), city VARCHAR(20)); ","SELECT a.name, COUNT(w.id) as num_works, GROUP_CONCAT(g.name) as gallery_names FROM Artists a JOIN Works w ON a.id = w.artist_id JOIN Gallery_Works gw ON w.id = gw.work_id JOIN Galleries g ON gw.gallery_id = g.id WHERE g.city = 'Tokyo' GROUP BY a.name ORDER BY num_works DESC LIMIT 1;","SELECT a.name, COUNT(w.id) as works_count FROM Artists a JOIN Gallery_Works w ON a.id = w.artist_id JOIN Galleries g ON w.artist_id = g.id WHERE g.city = 'Tokyo' GROUP BY a.name ORDER BY works_count DESC LIMIT 1;",0 How many travel advisories have been issued for France in the last 12 months?,"CREATE TABLE travel_advisories (country VARCHAR(20), issue_date DATE); ","SELECT COUNT(*) FROM travel_advisories WHERE country = 'France' AND issue_date >= DATE_SUB(NOW(), INTERVAL 12 MONTH);","SELECT COUNT(*) FROM travel_advisories WHERE country = 'France' AND issue_date >= DATEADD(month, -12, GETDATE());",0 "What is the percentage of users who have accepted our data privacy policy in each country, in the past 6 months?","CREATE TABLE users (user_id INT, first_name VARCHAR(50), last_name VARCHAR(50), age INT, gender VARCHAR(10), country VARCHAR(50), accepted_privacy_policy BOOLEAN);","SELECT country, ROUND(100.0 * SUM(CASE WHEN accepted_privacy_policy THEN 1 ELSE 0 END) / COUNT(user_id) OVER (PARTITION BY country), 2) AS acceptance_percentage FROM users WHERE accepted_privacy_policy IS NOT NULL AND post_date >= (CURRENT_DATE - INTERVAL '6 months') GROUP BY country;","SELECT country, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM users WHERE accepted_privacy_policy = TRUE)) as percentage FROM users WHERE accepted_privacy_policy = TRUE AND acceptance_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) GROUP BY country;",0 How many animals of each species are there in each region?,"CREATE TABLE region_animal_counts (region VARCHAR(255), species VARCHAR(255), animal_count INT); ","SELECT region, species, SUM(animal_count) as total_count FROM region_animal_counts GROUP BY region, species ORDER BY total_count DESC;","SELECT region, species, animal_count FROM region_animal_counts GROUP BY region, species;",0 List the names of heritage sites and their respective conservation statuses in 'Country A'.,"CREATE TABLE Heritage_Sites (site_name VARCHAR(50), country VARCHAR(50), conservation_status VARCHAR(50)); ","SELECT site_name, conservation_status FROM Heritage_Sites WHERE country = 'Country A';","SELECT site_name, conservation_status FROM Heritage_Sites WHERE country = 'Country A';",1 What's bob tway's score?,"CREATE TABLE table_name_51 (score VARCHAR, player VARCHAR);","SELECT score FROM table_name_51 WHERE player = ""bob tway"";","SELECT score FROM table_name_51 WHERE player = ""bob tway"";",1 In what country was the car with the čz 171cc engine?,"CREATE TABLE table_name_34 (country VARCHAR, engine_make_capacity VARCHAR);","SELECT country FROM table_name_34 WHERE engine_make_capacity = ""čz 171cc"";","SELECT country FROM table_name_34 WHERE engine_make_capacity = ""z 171cc"";",0 What is the average sourcing cost for organic ingredients across all products?,"CREATE TABLE Ingredients (Product_ID INT, Ingredient_Name TEXT, Organic BOOLEAN, Sourcing_Cost FLOAT); ",SELECT AVG(Sourcing_Cost) FROM Ingredients WHERE Organic = TRUE;,SELECT AVG(Sourcing_Cost) FROM Ingredients WHERE Organic = true;,0 What is the total quantity of 'Eco-friendly Cotton' textile sourced from 'Asia'?,"CREATE TABLE textile_sourcing (id INT, region VARCHAR(20), material VARCHAR(30), quantity INT);",SELECT SUM(quantity) FROM textile_sourcing WHERE region = 'Asia' AND material = 'Eco-friendly Cotton';,SELECT SUM(quantity) FROM textile_sourcing WHERE region = 'Asia' AND material = 'Eco-friendly Cotton';,1 "What is the total quantity of minerals extracted by each company, and the total number of employees and contractors for each company?","CREATE TABLE companies (id INT, name VARCHAR(50)); CREATE TABLE company_sites (id INT, company_id INT, site_id INT); CREATE TABLE mining_sites (id INT, name VARCHAR(50), location VARCHAR(50), company_id INT); CREATE TABLE employees (id INT, site_id INT, role VARCHAR(50), quantity INT); CREATE TABLE contractors (id INT, site_id INT, quantity INT); CREATE TABLE minerals_extracted (id INT, site_id INT, quantity INT);","SELECT c.name AS company, SUM(me.quantity) AS total_minerals_extracted, SUM(e.quantity + c.quantity) AS total_workforce FROM companies c INNER JOIN company_sites cs ON c.id = cs.company_id INNER JOIN mining_sites ms ON cs.site_id = ms.id INNER JOIN (SELECT site_id, SUM(quantity) AS quantity FROM employees GROUP BY site_id) e ON ms.id = e.site_id INNER JOIN (SELECT site_id, SUM(quantity) AS quantity FROM contractors GROUP BY site_id) c ON ms.id = c.site_id INNER JOIN (SELECT site_id, SUM(quantity) AS quantity FROM minerals_extracted GROUP BY site_id) me ON ms.id = me.site_id GROUP BY c.name;","SELECT companies.name, SUM(minerals_extracted.quantity) as total_quantity, COUNT(minerals_extracted.id) as total_quantity FROM companies INNER JOIN mining_sites ON companies.id = mining_sites.company_id INNER JOIN contractors ON mining_sites.site_id = contractors.site_id INNER JOIN minerals_extracted ON company_sites.id = minerals_extracted.site_id GROUP BY companies.name;",0 "What is the total number of public works projects in the city of Mumbai, India since 2015?","CREATE TABLE PublicWorks (ProjectID INT, Name TEXT, Location TEXT, StartYear INT, Country TEXT); ","SELECT COUNT(PublicWorks.ProjectID) FROM PublicWorks WHERE PublicWorks.Location = 'Mumbai, India' AND PublicWorks.StartYear >= 2015",SELECT COUNT(*) FROM PublicWorks WHERE Location = 'Mumbai' AND StartYear >= 2015;,0 When was a game won with more than 11 to par?,"CREATE TABLE table_name_6 (year_s__won VARCHAR, to_par INTEGER);",SELECT year_s__won FROM table_name_6 WHERE to_par > 11;,SELECT year_s__won FROM table_name_6 WHERE to_par > 11;,1 How many broadband subscribers have speeds greater than 500 Mbps in the state of California?,"CREATE TABLE broadband_subscribers (subscriber_id INT, state VARCHAR(255), speed_mbps DECIMAL(5,1)); ",SELECT COUNT(*) FROM broadband_subscribers WHERE state = 'California' AND speed_mbps > 500;,SELECT COUNT(*) FROM broadband_subscribers WHERE state = 'California' AND speed_mbps > 500;,1 What is the maximum carbon price for each region in Asia-Pacific between 2021-01-01 and 2021-02-28?,"CREATE TABLE carbon_prices_3 (id INT, region VARCHAR(50), price DECIMAL(10,2), date DATE); ","SELECT region, MAX(price) as max_price FROM carbon_prices_3 WHERE date BETWEEN '2021-01-01' AND '2021-02-28' AND region LIKE 'Asia-Pacific%' GROUP BY region;","SELECT region, MAX(price) FROM carbon_prices_3 WHERE date BETWEEN '2021-01-01' AND '2021-02-28' GROUP BY region;",0 Who was the home team at Kardinia Park?,"CREATE TABLE table_name_78 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_78 WHERE venue = ""kardinia park"";","SELECT home_team FROM table_name_78 WHERE venue = ""kardinia park"";",1 What are the results of those elections for which Marcy Kaptur is the incumbent?,"CREATE TABLE table_1805191_36 (results VARCHAR, incumbent VARCHAR);","SELECT results FROM table_1805191_36 WHERE incumbent = ""Marcy Kaptur"";","SELECT results FROM table_1805191_36 WHERE incumbent = ""Marcy Kaptur"";",1 Which disasters in 2020 had the highest impact on the environment?,"CREATE TABLE environmental_impact (id INT, disaster_name VARCHAR(50), year INT, environmental_impact_score INT); ",SELECT disaster_name FROM environmental_impact WHERE year = 2020 ORDER BY environmental_impact_score DESC LIMIT 3;,"SELECT disaster_name, environmental_impact_score FROM environmental_impact WHERE year = 2020 ORDER BY environmental_impact_score DESC LIMIT 1;",0 Find the distinct ages of students who have secretary votes in the fall election cycle.,"CREATE TABLE VOTING_RECORD (Secretary_Vote VARCHAR, Election_Cycle VARCHAR); CREATE TABLE STUDENT (Age VARCHAR, StuID VARCHAR);","SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = ""Fall"";","SELECT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = ""Fall"";",0 "What is the rank when there was less than 1 gold, 0 bronze, and more than 1 total?","CREATE TABLE table_name_23 (rank INTEGER, total VARCHAR, gold VARCHAR, bronze VARCHAR);",SELECT SUM(rank) FROM table_name_23 WHERE gold < 1 AND bronze = 0 AND total > 1;,SELECT SUM(rank) FROM table_name_23 WHERE gold 1 AND bronze 0 AND total > 1;,0 What are the total biomass and stock counts for each species in Q1 2022?,"CREATE TABLE fish_stock (date DATE, species VARCHAR(50), biomass FLOAT, stock_count INTEGER); ","SELECT EXTRACT(QUARTER FROM date) as quarter, species, SUM(biomass) as total_biomass, SUM(stock_count) as total_stock_count FROM fish_stock WHERE date >= '2022-01-01' AND date <= '2022-03-31' GROUP BY quarter, species;","SELECT species, SUM(biomass) as total_biomass, SUM(stock_count) as total_stock_count FROM fish_stock WHERE date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY species;",0 What is the average value for each health equity metric?,"CREATE TABLE HealthEquityMetrics (ID INT PRIMARY KEY, CommunityID INT, Metric VARCHAR(20), Value FLOAT);","SELECT Metric, AVG(Value) as AverageValue FROM HealthEquityMetrics GROUP BY Metric;","SELECT Metric, AVG(Value) FROM HealthEquityMetrics GROUP BY Metric;",0 What is the total number of military technology patents filed in Asia in the last decade?,"CREATE TABLE military_tech_patents (patent_id INT, location VARCHAR(255), timestamp TIMESTAMP); ","SELECT COUNT(*) FROM military_tech_patents WHERE location LIKE 'Asia%' AND timestamp > DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 10 YEAR);","SELECT COUNT(*) FROM military_tech_patents WHERE location LIKE '%Asia%' AND timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 10 YEAR);",0 "What is the minimum number of visitors for the ""Photography"" exhibition in the first quarter of 2022?","CREATE TABLE daily_visitor_count (date DATE, exhibition_id INT, visitor_count INT); ",SELECT MIN(visitor_count) FROM daily_visitor_count WHERE exhibition_id = 5 AND date BETWEEN '2022-01-01' AND '2022-03-31';,SELECT MIN(visitor_count) FROM daily_visitor_count WHERE exhibition_id = 1 AND date BETWEEN '2022-01-01' AND '2022-03-31';,0 What was the attendance in the gave versus the Brewers with a score of 9–6?,"CREATE TABLE table_name_43 (attendance VARCHAR, opponent VARCHAR, score VARCHAR);","SELECT attendance FROM table_name_43 WHERE opponent = ""brewers"" AND score = ""9–6"";","SELECT attendance FROM table_name_43 WHERE opponent = ""brewers"" AND score = ""9–6"";",1 What is the number of customers in the Asia-Pacific region?,"CREATE TABLE customers (customer_id INT, name VARCHAR(50), region VARCHAR(50)); ","SELECT region, COUNT(*) FROM customers WHERE region = 'Asia-Pacific' GROUP BY region;",SELECT COUNT(*) FROM customers WHERE region = 'Asia-Pacific';,0 Which accommodation type was requested the most in 2022 and how many times was it requested?,"CREATE TABLE Accommodations (Id INT, StudentId INT, Type VARCHAR(50), RequestDate DATE); ","SELECT Type, COUNT(*) AS RequestCount FROM Accommodations WHERE RequestDate BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY Type HAVING RequestCount = (SELECT MAX(RequestCount) FROM (SELECT Type, COUNT(*) AS RequestCount FROM Accommodations WHERE RequestDate BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY Type) AS Subquery);","SELECT Type, COUNT(*) FROM Accommodations WHERE YEAR(RequestDate) = 2022 GROUP BY Type ORDER BY COUNT(*) DESC LIMIT 1;",0 Delete size records for customers not fitting standard sizes,"CREATE TABLE CustomerSizes (CustomerID INT, Size TEXT); ","DELETE FROM CustomerSizes WHERE Size NOT IN ('XS', 'S', 'M');",DELETE FROM CustomerSizes WHERE Size IS NULL;,0 What score did the Green Bay Packers get as visitor?,"CREATE TABLE table_name_8 (score VARCHAR, visitor VARCHAR);","SELECT score FROM table_name_8 WHERE visitor = ""green bay packers"";","SELECT score FROM table_name_8 WHERE visitor = ""green bay packers"";",1 What is the maximum and minimum energy consumption of buildings in 'RegionB' in the 'GreenBuildings' table?,"CREATE TABLE GreenBuildings (id INT, name VARCHAR(50), location VARCHAR(50), energy_consumption FLOAT);","SELECT MAX(energy_consumption) AS max_consumption, MIN(energy_consumption) AS min_consumption FROM GreenBuildings WHERE location = 'RegionB';","SELECT MAX(energy_consumption), MIN(energy_consumption) FROM GreenBuildings WHERE location = 'RegionB';",0 What is the total number of autonomous driving research studies conducted in Germany?,"CREATE TABLE AutonomousDrivingStudies (Country VARCHAR(50), Studies INT); ",SELECT SUM(Studies) FROM AutonomousDrivingStudies WHERE Country = 'Germany';,SELECT SUM(Studies) FROM AutonomousDrivingStudies WHERE Country = 'Germany';,1 What is the total water consumption in Indonesia in 2017?,"CREATE TABLE water_consumption (country VARCHAR(20), year INT, consumption FLOAT); ",SELECT consumption FROM water_consumption WHERE country = 'Indonesia' AND year = 2017;,SELECT SUM(consumption) FROM water_consumption WHERE country = 'Indonesia' AND year = 2017;,0 How many wells were drilled in 'FieldH' between 2017 and 2019?,"CREATE TABLE wells (well_id varchar(10), field varchar(10), datetime date); ",SELECT COUNT(DISTINCT well_id) FROM wells WHERE field = 'FieldH' AND datetime BETWEEN '2017-01-01' AND '2019-12-31';,SELECT COUNT(*) FROM wells WHERE field = 'FieldH' AND datetime BETWEEN '2017-01-01' AND '2019-12-31';,0 What is the average recycling rate for each material in the past month?,"CREATE TABLE RecyclingRates (material VARCHAR(50), date DATE, recycling_rate DECIMAL(5,2)); ","SELECT material, AVG(recycling_rate) FROM RecyclingRates WHERE date >= DATEADD(month, -1, GETDATE()) GROUP BY material;","SELECT material, AVG(recycling_rate) as avg_recycling_rate FROM RecyclingRates WHERE date >= DATEADD(month, -1, GETDATE()) GROUP BY material;",0 Show the property type descriptions of properties belonging to that code.,"CREATE TABLE Properties (property_type_code VARCHAR); CREATE TABLE Ref_Property_Types (property_type_description VARCHAR, property_type_code VARCHAR);",SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code;,SELECT T1.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code = T2.property_type_code;,0 Who was the team guest captain for episode 2?,"CREATE TABLE table_25816476_2 (team_guest_captain VARCHAR, episode VARCHAR);",SELECT team_guest_captain FROM table_25816476_2 WHERE episode = 2;,SELECT team_guest_captain FROM table_25816476_2 WHERE episode = 2;,1 Marat Safin is the opponent in the final in what championship?,"CREATE TABLE table_26202788_7 (championship VARCHAR, opponent_in_the_final VARCHAR);","SELECT championship FROM table_26202788_7 WHERE opponent_in_the_final = ""Marat Safin"";","SELECT championship FROM table_26202788_7 WHERE opponent_in_the_final = ""Marat Safin"";",1 What player has a t57 as the finish?,"CREATE TABLE table_name_65 (player VARCHAR, finish VARCHAR);","SELECT player FROM table_name_65 WHERE finish = ""t57"";","SELECT player FROM table_name_65 WHERE finish = ""t57"";",1 What is the total of the crowd when the home team is footscray?,"CREATE TABLE table_name_60 (crowd VARCHAR, home_team VARCHAR);","SELECT COUNT(crowd) FROM table_name_60 WHERE home_team = ""footscray"";","SELECT COUNT(crowd) FROM table_name_60 WHERE home_team = ""footscray"";",1 What is the average ticket price for classical music concerts in Japan?,"CREATE TABLE concerts (id INT, location VARCHAR(50), genre VARCHAR(50), price DECIMAL(5,2)); ",SELECT AVG(price) FROM concerts WHERE location = 'Japan' AND genre = 'Classical Music';,SELECT AVG(price) FROM concerts WHERE genre = 'Classical' AND location = 'Japan';,0 "What is Score, when Place is ""T1""?","CREATE TABLE table_name_15 (score VARCHAR, place VARCHAR);","SELECT score FROM table_name_15 WHERE place = ""t1"";","SELECT score FROM table_name_15 WHERE place = ""t1"";",1 What Romani word has the same meaning as the Persian word dah?,"CREATE TABLE table_name_56 (romani VARCHAR, persian VARCHAR);","SELECT romani FROM table_name_56 WHERE persian = ""dah"";","SELECT romani FROM table_name_56 WHERE persian = ""dah"";",1 "what is the winter olympics when the country is soviet union and holmenkollen is 1970, 1979?","CREATE TABLE table_name_5 (winter_olympics INTEGER, country VARCHAR, holmenkollen VARCHAR);","SELECT SUM(winter_olympics) FROM table_name_5 WHERE country = ""soviet union"" AND holmenkollen = ""1970, 1979"";","SELECT AVG(winter_olympics) FROM table_name_5 WHERE country = ""soviet union"" AND holmenkollen = ""1970, 1979"";",0 What is the average quantity of neodymium mined per day in Australia and Canada in the past 2 years?,"CREATE TABLE mine_data (id INT, element TEXT, location TEXT, date DATE, quantity INT); ","SELECT AVG(quantity) FROM mine_data WHERE element = 'neodymium' AND location IN ('Australia', 'Canada') AND extract(year from date) >= 2020;","SELECT AVG(quantity) FROM mine_data WHERE element = 'Neodymium' AND location IN ('Australia', 'Canada') AND date >= DATEADD(year, -2, GETDATE());",0 Identify the top 3 sustainable sourcing practices by total cost,"CREATE TABLE SustainablePractices (PracticeID int, Practice varchar(255), Cost decimal(10,2)); ","SELECT Practice, SUM(Cost) as TotalCost FROM SustainablePractices GROUP BY Practice ORDER BY TotalCost DESC LIMIT 3;","SELECT Practice, SUM(Cost) as TotalCost FROM SustainablePractices GROUP BY Practice ORDER BY TotalCost DESC LIMIT 3;",1 How long did the trans 1 take when 2:00:40.20 is the total time?,"CREATE TABLE table_name_28 (trans_1 VARCHAR, total_time VARCHAR);","SELECT trans_1 FROM table_name_28 WHERE total_time = ""2:00:40.20"";","SELECT trans_1 FROM table_name_28 WHERE total_time = ""2:00:40.20"";",1 What is the minimum revenue for each farm?,"CREATE TABLE farm_revenue (id INT PRIMARY KEY, farm_id INT, year INT, revenue INT); ","SELECT farm_id, MIN(revenue) FROM farm_revenue GROUP BY farm_id;","SELECT farm_id, MIN(revenue) FROM farm_revenue GROUP BY farm_id;",1 Delete all records of marine life observations in the Southern Ocean.,"CREATE TABLE Oceans (id INT, name VARCHAR(20)); CREATE TABLE MarineLife (id INT, ocean_id INT, species VARCHAR(50), count INT); ",DELETE FROM MarineLife WHERE MarineLife.ocean_id = (SELECT id FROM Oceans WHERE Oceans.name = 'Southern');,DELETE FROM MarineLife WHERE ocean_id = (SELECT id FROM Oceans WHERE name = 'Southern Ocean');,0 What is the total revenue from vegetarian dishes last week?,"CREATE TABLE menus (menu_id INT, menu_name VARCHAR(50), category VARCHAR(50), price DECIMAL(5,2)); CREATE TABLE orders (order_id INT, order_date DATE, menu_id INT); ",SELECT SUM(price) FROM menus JOIN orders ON menus.menu_id = orders.menu_id WHERE menus.category = 'Vegetarian' AND orders.order_date BETWEEN '2022-05-01' AND '2022-05-07';,"SELECT SUM(price) FROM menus m JOIN orders o ON m.menu_id = o.menu_id WHERE m.category = 'Vegetarian' AND o.order_date >= DATEADD(week, -1, GETDATE());",0 What are the call types and dates for all calls in 'urban_police' that occurred after '2022-01-01 10:00:00'?,"CREATE TABLE urban_police (id INT, call_type VARCHAR(20), call_date TIMESTAMP); ","SELECT call_type, call_date FROM urban_police WHERE call_date > '2022-01-01 10:00:00';","SELECT call_type, call_date FROM urban_police WHERE call_date > '2022-01-01 10:00:00';",1 Determine the total number of pipelines in the United States and Canada,"CREATE TABLE pipelines_us_canada (pipeline_name VARCHAR(50), country VARCHAR(50), length INT); ","SELECT SUM(IIF(country = 'Canada', 1, 0)) + SUM(IIF(country = 'United States', 1, 0)) FROM pipelines_us_canada;","SELECT COUNT(*) FROM pipelines_us_canada WHERE country IN ('United States', 'Canada');",0 Which food safety records have been updated in the last 30 days?,"CREATE TABLE FoodSafetyRecords (record_id INT, product_id INT, updated_at TIMESTAMP); ",SELECT * FROM FoodSafetyRecords WHERE updated_at >= NOW() - INTERVAL '30 days';,"SELECT record_id, product_id, updated_at FROM FoodSafetyRecords WHERE updated_at >= DATEADD(day, -30, GETDATE());",0 What is the total revenue for vegetarian menu items?,"CREATE TABLE restaurants (id INT, name VARCHAR(255)); CREATE TABLE menu_items (id INT, name VARCHAR(255), vegetarian BOOLEAN, restaurant_id INT); CREATE TABLE orders (menu_item_id INT, revenue INT); ",SELECT SUM(o.revenue) as total_revenue FROM orders o JOIN menu_items mi ON o.menu_item_id = mi.id WHERE mi.vegetarian = TRUE;,SELECT SUM(o.revenue) FROM orders o JOIN menu_items m ON o.menu_item_id = m.id WHERE m.vegetarian = true;,0 "What is the number of attendees at each type of event in the 'music' category, grouped by age range?","CREATE TABLE attendee_data (id INT, event_name TEXT, attendee_age INT, event_category TEXT); ","SELECT event_category, CASE WHEN attendee_age BETWEEN 18 AND 30 THEN '18-30' WHEN attendee_age BETWEEN 31 AND 50 THEN '31-50' ELSE '51+' END AS age_range, COUNT(*) FROM attendee_data WHERE event_category = 'Music' GROUP BY event_category, age_range;","SELECT event_category, age_range, COUNT(*) FROM attendee_data WHERE event_category ='music' GROUP BY event_category, age_range;",0 What is the smallest point amount for years prior to 1958 when the class is 350cc?,"CREATE TABLE table_name_91 (points INTEGER, year VARCHAR, class VARCHAR);","SELECT MIN(points) FROM table_name_91 WHERE year < 1958 AND class = ""350cc"";","SELECT MIN(points) FROM table_name_91 WHERE year 1958 AND class = ""350cc"";",0 What is the total number of countries where Spanish is spoken by the largest percentage of people?,"CREATE TABLE countrylanguage (Percentage INTEGER, CountryCode VARCHAR, LANGUAGE VARCHAR);","SELECT COUNT(*), MAX(Percentage) FROM countrylanguage WHERE LANGUAGE = ""Spanish"" GROUP BY CountryCode;",SELECT COUNT(*) FROM countrylanguage WHERE LANGUAGE = 'Spanish' AND Percentage = (SELECT MAX(Percentage) FROM countrylanguage);,0 "What is the total number of visitors who attended exhibitions in the 'Art' category, and the number of days each exhibition in this category was open to the public?","CREATE TABLE Exhibitions (id INT, name VARCHAR(20), category VARCHAR(20), visitors INT, start_date DATE, end_date DATE); ","SELECT E.category, E.name, SUM(E.visitors) AS total_visitors, DATEDIFF(E.end_date, E.start_date) + 1 AS days_open FROM Exhibitions E WHERE E.category = 'Art' GROUP BY E.category, E.name;","SELECT category, SUM(visitors) as total_visitors, COUNT(*) as num_days FROM Exhibitions WHERE category = 'Art' GROUP BY category;",0 "What is the total budget allocated for environmental protection in 2018, 2019, and 2020?","CREATE TABLE EnvironmentalBudget (Year INTEGER, Budget INTEGER); ","SELECT SUM(Budget) FROM EnvironmentalBudget WHERE Year IN (2018, 2019, 2020);","SELECT SUM(Budget) FROM EnvironmentalBudget WHERE Year IN (2018, 2019);",0 "What is the total carbon pricing revenue in Canada, the United States, and Mexico?","CREATE TABLE carbon_pricing (country VARCHAR(20), revenue INT); ","SELECT SUM(revenue) FROM carbon_pricing WHERE country IN ('Canada', 'United States', 'Mexico');","SELECT SUM(revenue) FROM carbon_pricing WHERE country IN ('Canada', 'United States', 'Mexico');",1 How many episodes are directed by ricardo mendez matta?,"CREATE TABLE table_26866519_1 (season__number VARCHAR, director VARCHAR);","SELECT COUNT(season__number) FROM table_26866519_1 WHERE director = ""Ricardo Mendez Matta"";","SELECT COUNT(season__number) FROM table_26866519_1 WHERE director = ""Ricardo Mendez Matta"";",1 What is the maximum budget allocated for public transportation in the state of California?,"CREATE TABLE public_transportation_budget (state VARCHAR(20), budget INT); ",SELECT MAX(budget) FROM public_transportation_budget WHERE state = 'California';,SELECT MAX(budget) FROM public_transportation_budget WHERE state = 'California';,1 What is the average age of attendees who have participated in 'Artistic Explorers' program?,"CREATE TABLE if not exists event_attendees (id INT, name VARCHAR(50), age INT, program VARCHAR(50)); ",SELECT AVG(age) FROM event_attendees WHERE program = 'Artistic Explorers';,SELECT AVG(age) FROM event_attendees WHERE program = 'Artistic Explorers';,1 What is the average episode number on 19 March 1993 with Jim Sweeney as performer 1?,"CREATE TABLE table_name_29 (episode INTEGER, performer_1 VARCHAR, date VARCHAR);","SELECT AVG(episode) FROM table_name_29 WHERE performer_1 = ""jim sweeney"" AND date = ""19 march 1993"";","SELECT AVG(episode) FROM table_name_29 WHERE performer_1 = ""jim sweeney"" AND date = ""19 march 1993"";",1 What are the total installed solar capacities for all cities in the renewable_energy_projects table?,"CREATE TABLE renewable_energy_projects (city VARCHAR(50), technology VARCHAR(50), capacity FLOAT); ",SELECT SUM(capacity) FROM renewable_energy_projects WHERE technology = 'Solar';,SELECT SUM(capacity) FROM renewable_energy_projects WHERE technology = 'Solar';,1 What was the gdp of the country with a gdp per capita of $18048?,"CREATE TABLE table_1307842_6 (gdp__billion_us$_ VARCHAR, gdp_per_capita__us$_ VARCHAR);",SELECT gdp__billion_us$_ FROM table_1307842_6 WHERE gdp_per_capita__us$_ = 18048;,"SELECT gdp__billion_us$_ FROM table_1307842_6 WHERE gdp_per_capita__us$_ = ""$18048"";",0 I want to know the average Gold for total smaller 12 and bronze less than 1 and wushu with silver more than 3,"CREATE TABLE table_name_2 (gold INTEGER, silver VARCHAR, sport VARCHAR, total VARCHAR, bronze VARCHAR);","SELECT AVG(gold) FROM table_name_2 WHERE total < 12 AND bronze < 1 AND sport = ""wushu"" AND silver > 3;","SELECT AVG(gold) FROM table_name_2 WHERE total 12 AND bronze 1 AND sport = ""wushu"" AND silver > 3;",0 How many rounds is the fight against Michael Chavez?,"CREATE TABLE table_name_46 (round INTEGER, opponent VARCHAR);","SELECT AVG(round) FROM table_name_46 WHERE opponent = ""michael chavez"";","SELECT SUM(round) FROM table_name_46 WHERE opponent = ""michael chavez"";",0 What is the total number of visual artists in the art collection of the MoMA and the Tate Modern?,"CREATE TABLE art_collection (museum VARCHAR(255), artist VARCHAR(255), art_type VARCHAR(255), year INT, value DECIMAL(10,2)); ","SELECT SUM(artist_count) FROM (SELECT COUNT(DISTINCT artist) AS artist_count FROM art_collection WHERE museum IN ('MoMA', 'Tate Modern') GROUP BY museum) AS subquery;","SELECT COUNT(*) FROM art_collection WHERE museum IN ('MoMA', 'Tate Modern') AND art_type = 'Visual';",0 What Date has a Result of l 21–34?,"CREATE TABLE table_name_31 (date VARCHAR, result VARCHAR);","SELECT date FROM table_name_31 WHERE result = ""l 21–34"";","SELECT date FROM table_name_31 WHERE result = ""l 21–34"";",1 "Count the number of startups founded by people from historically underrepresented communities in the ""technology"" sector","CREATE TABLE startups (id INT, name VARCHAR(50), founder_community VARCHAR(30), sector VARCHAR(20));","SELECT COUNT(*) FROM startups WHERE founder_community IN ('LGBTQ+', 'Racial Minority', 'Women') AND sector = 'technology';",SELECT COUNT(*) FROM startups WHERE founder_community IN (SELECT founder_community FROM startups WHERE sector = 'technology') AND founder_community IN (SELECT founder_community FROM startups WHERE sector = 'technology');,0 Show the number of days in 2023 where there were at least two emergency calls,"CREATE TABLE emergency_calls_2023 (id INT, call_date DATE); ",SELECT call_date FROM emergency_calls_2023 GROUP BY call_date HAVING COUNT(*) >= 2;,SELECT COUNT(*) FROM emergency_calls_2023 WHERE call_date >= '2023-01-01' AND call_date '2022-01-01';,0 What is the total revenue of Pop Art paintings sold in New York since 2017?,"CREATE TABLE ArtSales (id INT, painting_name VARCHAR(50), price FLOAT, sale_date DATE, painting_style VARCHAR(20), sale_location VARCHAR(30)); ",SELECT SUM(price) FROM ArtSales WHERE painting_style = 'Pop Art' AND sale_location = 'New York' AND sale_date >= '2017-01-01';,SELECT SUM(price) FROM ArtSales WHERE painting_style = 'Pop Art' AND sale_location = 'New York' AND sale_date >= '2017-01-01';,1 Calculate the average donation amount by donors from the USA.,"CREATE TABLE Donors (DonorID INT, DonorName TEXT, Country TEXT, Amount INT); ",SELECT AVG(Amount) FROM Donors WHERE Country = 'USA';,SELECT AVG(Amount) FROM Donors WHERE Country = 'USA';,1 What is the total budget for community development initiatives in Mexico?,"CREATE TABLE CommunityDev (id INT, initiative VARCHAR(255), country VARCHAR(255), budget FLOAT); ",SELECT SUM(budget) FROM CommunityDev WHERE country = 'Mexico';,SELECT SUM(budget) FROM CommunityDev WHERE country = 'Mexico';,1 What position does the player with 13 caps play?,"CREATE TABLE table_name_85 (position VARCHAR, caps VARCHAR);",SELECT position FROM table_name_85 WHERE caps = 13;,SELECT position FROM table_name_85 WHERE caps = 13;,1 "Visitor of dallas, and a Date of june 12 had what highest attendance?","CREATE TABLE table_name_16 (attendance INTEGER, visitor VARCHAR, date VARCHAR);","SELECT MAX(attendance) FROM table_name_16 WHERE visitor = ""dallas"" AND date = ""june 12"";","SELECT MAX(attendance) FROM table_name_16 WHERE visitor = ""dallas"" AND date = ""june 12"";",1 What is the name of the player who is a wr and has a weight of 197?,"CREATE TABLE table_name_83 (name VARCHAR, position VARCHAR, weight VARCHAR);","SELECT name FROM table_name_83 WHERE position = ""wr"" AND weight = 197;","SELECT name FROM table_name_83 WHERE position = ""wr"" AND weight = 197;",1 Find the first name of students who are living in the Smith Hall.,"CREATE TABLE student (fname VARCHAR, stuid VARCHAR); CREATE TABLE lives_in (stuid VARCHAR, dormid VARCHAR); CREATE TABLE dorm (dormid VARCHAR, dorm_name VARCHAR);",SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall';,"SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T3.dormid WHERE T3.dorm_name = ""Smith Hall"";",0 Count the number of Latinx female founders who have raised over $10M in seed funding.,"CREATE TABLE founder (id INT, name TEXT, gender TEXT, ethnicity TEXT); CREATE TABLE funding (id INT, startup_id INT, round TEXT, amount FLOAT);",SELECT COUNT(*) FROM founder f JOIN funding ft ON f.id = ft.startup_id WHERE f.gender = 'Female' AND f.ethnicity = 'Latinx' AND ft.amount > 10000000.00 AND ft.round = 'Seed';,SELECT COUNT(*) FROM founder JOIN funding ON founder.id = funding.startup_id WHERE founder.gender = 'Latinx' AND founder.ethnicity = 'Female' AND funding.round = 'Seed' AND funding.amount > 10000000;,0 What is the sum of league cup appearances for the players with FA cup goals larger than 0 and FA cup appearances less than 2?,"CREATE TABLE table_name_63 (league_cup_apps INTEGER, fa_cup_goals VARCHAR, fa_cup_apps VARCHAR);",SELECT SUM(league_cup_apps) FROM table_name_63 WHERE fa_cup_goals > 0 AND fa_cup_apps < 2;,SELECT SUM(league_cup_apps) FROM table_name_63 WHERE fa_cup_goals > 0 AND fa_cup_apps 2;,0 Which position was the World Indoor Championships in a year later than 2008?,"CREATE TABLE table_name_64 (position VARCHAR, competition VARCHAR, year VARCHAR);","SELECT position FROM table_name_64 WHERE competition = ""world indoor championships"" AND year > 2008;","SELECT position FROM table_name_64 WHERE competition = ""world indoor championships"" AND year > 2008;",1 Show the cultural competency scores of healthcare providers by city in descending order.,"CREATE TABLE HealthcareProviders (ProviderId INT, CulturalCompetencyScore INT, City VARCHAR(255)); ","SELECT City, CulturalCompetencyScore FROM HealthcareProviders ORDER BY CulturalCompetencyScore DESC;","SELECT City, CulturalCompetencyScore FROM HealthcareProviders ORDER BY CulturalCompetencyScore DESC;",1 What is the average depth of all marine species habitats?,"CREATE TABLE marine_species (id INT, name VARCHAR(255), habitat_type VARCHAR(255), average_depth FLOAT); CREATE TABLE ocean_depths (location VARCHAR(255), depth FLOAT); ",SELECT AVG(ms.average_depth) as avg_depth FROM marine_species ms;,SELECT AVG(ms.average_depth) FROM marine_species ms INNER JOIN ocean_depths od ON ms.habitat_type = od.location;,0 What's the maximum ESG rating for the 'technology' sector?,"CREATE TABLE companies (id INT, sector TEXT, ESG_rating FLOAT); ",SELECT MAX(ESG_rating) FROM companies WHERE sector = 'technology';,SELECT MAX(ESG_rating) FROM companies WHERE sector = 'technology';,1 Create a view for mammals,"CREATE TABLE animals (id INT PRIMARY KEY, name VARCHAR(50), species VARCHAR(50), population INT); CREATE VIEW mammals AS SELECT * FROM animals WHERE species = 'Mammal';",CREATE VIEW mammals AS SELECT * FROM animals WHERE species = 'Mammal';,CREATE VIEW mammals AS SELECT * FROM mammals;,0 How many sustainable tourism initiatives were launched in Africa in 2020 and 2021?,"CREATE TABLE sustainability_initiatives (location VARCHAR(50), year INT); ","SELECT year, COUNT(*) as total_initiatives FROM sustainability_initiatives WHERE location LIKE '%Africa%' AND year IN (2020, 2021) GROUP BY year;","SELECT COUNT(*) FROM sustainability_initiatives WHERE location = 'Africa' AND year IN (2020, 2021);",0 Weight of 220 has what class?,"CREATE TABLE table_name_5 (class VARCHAR, weight VARCHAR);",SELECT class FROM table_name_5 WHERE weight = 220;,SELECT class FROM table_name_5 WHERE weight = 220;,1 What is the total area of cropland (in hectares) for each crop type?,"CREATE TABLE cropland_types (type VARCHAR(50), area INT); ","SELECT type, area FROM cropland_types;","SELECT type, SUM(area) FROM cropland_types GROUP BY type;",0 "What are the booking start and end dates of the apartments with type code ""Duplex""?","CREATE TABLE Apartments (apt_id VARCHAR, apt_type_code VARCHAR); CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, apt_id VARCHAR);","SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = ""Duplex"";","SELECT T1.booking_start_date, T1.booking_start_date FROM Apartments AS T1 JOIN Apartment_Bookings AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = ""Duplex"";",0 "List all the suppliers and the number of garments they provided for the Spring 2023 collection, ranked by the number of garments supplied.","CREATE TABLE Suppliers (supplier_id INT, supplier_name VARCHAR(50)); CREATE TABLE Garment_Suppliers (garment_id INT, supplier_id INT); CREATE TABLE Garments (garment_id INT, collection_name VARCHAR(50)); ","SELECT s.supplier_name, COUNT(gs.garment_id) AS garments_supplied FROM Suppliers s JOIN Garment_Suppliers gs ON s.supplier_id = gs.supplier_id JOIN Garments g ON gs.garment_id = g.garment_id WHERE g.collection_name = 'Spring 2023' GROUP BY s.supplier_name ORDER BY garments_supplied DESC;","SELECT s.supplier_name, COUNT(gs.garment_id) as garment_count FROM Suppliers s JOIN Garment_Suppliers gs ON s.supplier_id = gs.supplier_id JOIN Garments g ON gs.garment_id = g.garment_id WHERE g.collection_name = 'Spring 2023' GROUP BY s.supplier_name ORDER BY garment_count DESC;",0 Who used Gordini Straight-6 in 1956?,"CREATE TABLE table_name_93 (entrant VARCHAR, engine VARCHAR, year VARCHAR);","SELECT entrant FROM table_name_93 WHERE engine = ""gordini straight-6"" AND year = 1956;","SELECT entrant FROM table_name_93 WHERE engine = ""gondini straight-6"" AND year = 1956;",0 What is the total number of eco-friendly accommodations in South Africa?,"CREATE TABLE south_africa_tourism (name VARCHAR(255), location VARCHAR(255), type VARCHAR(255), certification DATE); ",SELECT COUNT(*) FROM south_africa_tourism WHERE type = 'Hotel' AND certification IS NOT NULL;,SELECT COUNT(*) FROM south_africa_tourism WHERE type = 'Eco-friendly';,0 What is the fewest recorded entrants against paris saint-germain?,"CREATE TABLE table_26455614_1 (entries INTEGER, winner VARCHAR);","SELECT MIN(entries) FROM table_26455614_1 WHERE winner = ""Paris Saint-Germain"";","SELECT MIN(entries) FROM table_26455614_1 WHERE winner = ""Paris Saint-Germain"";",1 Find the average construction cost of airports in the Northeast region,"CREATE TABLE Airport (id INT, name VARCHAR(255), region VARCHAR(255), construction_cost DECIMAL(10, 2)); ","SELECT region, AVG(construction_cost) FROM Airport WHERE region = 'Northeast' GROUP BY region;",SELECT AVG(construction_cost) FROM Airport WHERE region = 'Northeast';,0 WHAT IS THE POPULATION OF 2007 WHEN 2010 POPULATION WAS SMALLER THAN 1282?,"CREATE TABLE table_name_2 (population__2007_ VARCHAR, population__2010_ INTEGER);",SELECT COUNT(population__2007_) FROM table_name_2 WHERE population__2010_ < 1282;,SELECT population__2007_ FROM table_name_2 WHERE population__2010_ 1282;,0 What was the highest Pick for Lonnie Brockman before round 9?,"CREATE TABLE table_name_30 (pick INTEGER, player VARCHAR, round VARCHAR);","SELECT MAX(pick) FROM table_name_30 WHERE player = ""lonnie brockman"" AND round < 9;","SELECT MAX(pick) FROM table_name_30 WHERE player = ""lonnie brockman"" AND round 9;",0 Which regions had the highest and lowest donation amounts in 2022?,"CREATE TABLE Donors (DonorID INT, DonorRegion VARCHAR(50), Amount DECIMAL(10,2)); ","SELECT DonorRegion, MAX(Amount) as HighestDonation, MIN(Amount) as LowestDonation FROM Donors WHERE YEAR(DonationDate) = 2022 GROUP BY DonorRegion HAVING COUNT(DonorID) > 1;","SELECT DonorRegion, MAX(Amount) AS MaxDonation, MIN(Amount) AS MinDonation FROM Donors WHERE YEAR(DonationDate) = 2022 GROUP BY DonorRegion;",0 Find the total revenue of organic haircare products in the Asian market for the current year.,"CREATE TABLE sales(product_id INT, sale_date DATE, revenue DECIMAL(10,2), country VARCHAR(50)); CREATE TABLE products(product_id INT, product_name VARCHAR(50), is_organic BOOLEAN, product_category VARCHAR(50)); ",SELECT SUM(sales.revenue) as total_revenue FROM sales JOIN products ON sales.product_id = products.product_id WHERE products.is_organic = TRUE AND sales.country = 'Asia' AND YEAR(sales.sale_date) = YEAR(CURDATE());,"SELECT SUM(sales.revenue) FROM sales INNER JOIN products ON sales.product_id = products.product_id WHERE products.is_organic = true AND sales.country = 'Asia' AND sales.sale_date >= DATEADD(year, -1, GETDATE());",0 How many unique volunteers have there been in each program in the past year?,"CREATE TABLE volunteers (id INT, name VARCHAR(255), program VARCHAR(255), volunteer_date DATE); CREATE TABLE all_programs (id INT, name VARCHAR(255), focus_area VARCHAR(255));","SELECT program, COUNT(DISTINCT id) FROM volunteers JOIN all_programs ON volunteers.program = all_programs.name WHERE volunteer_date >= DATEADD(year, -1, GETDATE()) GROUP BY program;","SELECT a.name, COUNT(DISTINCT v.id) as unique_volunteers FROM volunteers v JOIN all_programs a ON v.program = a.name WHERE v.volunteer_date >= DATEADD(year, -1, GETDATE()) GROUP BY a.name;",0 How many open service requests are there in each city in the 'Transportation' service category?,"CREATE TABLE Service_Request (id INT, city_id INT, service VARCHAR(50), status VARCHAR(20), date_created DATETIME); ","SELECT C.name as city_name, SR.service, COUNT(*) as num_open_requests FROM City C INNER JOIN Service_Request SR ON C.id = SR.city_id WHERE SR.status = 'Open' AND SR.service LIKE '%Transportation%' GROUP BY C.name;","SELECT city_id, COUNT(*) as open_requests FROM Service_Request WHERE service = 'Transportation' GROUP BY city_id;",0 "Delete records of citizens who have provided negative feedback in the last 6 months from the ""citizen_feedback"" table","CREATE TABLE citizen_feedback (citizen_id INT, feedback TEXT, feedback_date DATE);",DELETE FROM citizen_feedback WHERE feedback LIKE '-%' AND feedback_date > (SELECT DATE(NOW()) - INTERVAL 6 MONTH);,"DELETE FROM citizen_feedback WHERE feedback = 'negative' AND feedback_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",0 Which organizations have received grants for capacity building in the last year?,"CREATE TABLE organizations (id INT, name VARCHAR(50), type VARCHAR(30)); CREATE TABLE grants (id INT, org_id INT, amount INT, date DATE, purpose VARCHAR(30)); ","SELECT organizations.name FROM organizations INNER JOIN grants ON organizations.id = grants.org_id WHERE grants.date >= DATEADD(year, -1, GETDATE()) AND organizations.type = 'capacity building';","SELECT o.name FROM organizations o INNER JOIN grants g ON o.id = g.org_id WHERE g.purpose = 'capacity building' AND g.date >= DATEADD(year, -1, GETDATE());",0 List the Solar Power Plants in India with the lowest energy production cost?,"CREATE TABLE Solar_Power_Plants (project_id INT, location VARCHAR(50), energy_production_cost FLOAT); ","SELECT project_id, location, energy_production_cost FROM (SELECT project_id, location, energy_production_cost, RANK() OVER (ORDER BY energy_production_cost ASC) as project_rank FROM Solar_Power_Plants WHERE location = 'India') ranked_projects WHERE project_rank <= 3;","SELECT project_id, location, energy_production_cost FROM Solar_Power_Plants WHERE location = 'India' ORDER BY energy_production_cost DESC LIMIT 1;",0 Calculate the number of publications in each journal,"CREATE TABLE publications (id INT, title VARCHAR(50), journal VARCHAR(30)); ","SELECT journal, COUNT(*) FROM publications GROUP BY journal;","SELECT journal, COUNT(*) FROM publications GROUP BY journal;",1 On what day did tommy ellis drive?,"CREATE TABLE table_28178756_1 (date VARCHAR, driver VARCHAR);","SELECT date FROM table_28178756_1 WHERE driver = ""Tommy Ellis"";","SELECT date FROM table_28178756_1 WHERE driver = ""Tommy Ellis"";",1 Identify countries with higher diamond exports than imports between 2015 and 2017.,"CREATE TABLE diamond_export (year INT, country TEXT, export_amount FLOAT); CREATE TABLE diamond_import (year INT, country TEXT, import_amount FLOAT); ",SELECT diamond_export.country FROM diamond_export INNER JOIN diamond_import ON diamond_export.country = diamond_import.country WHERE diamond_export.year BETWEEN 2015 AND 2017 GROUP BY diamond_export.country HAVING SUM(diamond_export.export_amount) > SUM(diamond_import.import_amount);,SELECT d.country FROM diamond_export d JOIN diamond_import d ON d.country = d.country WHERE d.export_amount > d.import_amount AND d.year BETWEEN 2015 AND 2017 GROUP BY d.country HAVING COUNT(d.export_amount) > d.import_amount;,0 How many grids for peter collins?,"CREATE TABLE table_name_71 (grid VARCHAR, driver VARCHAR);","SELECT COUNT(grid) FROM table_name_71 WHERE driver = ""peter collins"";","SELECT COUNT(grid) FROM table_name_71 WHERE driver = ""peter collins"";",1 What is the name of the mental health campaign with the highest budget in 'campaigns_2021'?,"CREATE TABLE campaigns_2021 (campaign_id INT, name VARCHAR(50), budget INT, region VARCHAR(50)); ",SELECT name FROM campaigns_2021 WHERE budget = (SELECT MAX(budget) FROM campaigns_2021);,SELECT name FROM campaigns_2021 WHERE budget = (SELECT MAX(budget) FROM campaigns_2021);,1 What are the earnings for jim colbert with under 4 wins?,"CREATE TABLE table_name_33 (earnings___ VARCHAR, player VARCHAR, wins VARCHAR);","SELECT COUNT(earnings___) AS $__ FROM table_name_33 WHERE player = ""jim colbert"" AND wins < 4;","SELECT earnings___ FROM table_name_33 WHERE player = ""jim colbert"" AND wins 4;",0 Which state has the lowest recycling rate?,"CREATE TABLE recycling_rates (state VARCHAR(20), year INT, recycling_rate FLOAT); ","SELECT state, MIN(recycling_rate) FROM recycling_rates;","SELECT state, MIN(recycling_rate) FROM recycling_rates GROUP BY state;",0 Which sustainable material categories have an average production cost above the overall average?,"CREATE TABLE sustainable_materials (id INT, category VARCHAR(255), production_cost FLOAT); ","SELECT category, production_cost FROM sustainable_materials WHERE production_cost > (SELECT AVG(production_cost) FROM sustainable_materials);","SELECT category, AVG(production_cost) FROM sustainable_materials GROUP BY category HAVING AVG(production_cost) > (SELECT AVG(production_cost) FROM sustainable_materials);",0 Which countries have the highest number of social good technology initiatives?,"CREATE TABLE initiatives (id INT, name VARCHAR(50), country VARCHAR(50));","SELECT country, COUNT(*) as count FROM initiatives WHERE name LIKE '%social good%' GROUP BY country ORDER BY count DESC LIMIT 5;","SELECT country, COUNT(*) as num_initiatives FROM initiatives GROUP BY country ORDER BY num_initiatives DESC LIMIT 1;",0 What is the minimum daily production of Samarium in 'Europe' in 2018?,"CREATE TABLE mining(day INT, year INT, region VARCHAR(10), element VARCHAR(10), quantity INT); ","SELECT MIN(quantity) FROM mining WHERE element = 'Samarium' AND region = 'Europe' AND year = 2018 GROUP BY day, year, element, region",SELECT MIN(quantity) FROM mining WHERE element = 'Samarium' AND region = 'Europe' AND year = 2018;,0 Which donors in the Indigenous community have donated more than $1000 in total?,"CREATE TABLE donors (id INT, name VARCHAR(50), ethnicity VARCHAR(50), state VARCHAR(50)); CREATE TABLE donations (id INT, donor_id INT, amount DECIMAL(10,2)); ",SELECT dd.name FROM donors dd INNER JOIN donations d ON dd.id = d.donor_id WHERE dd.ethnicity LIKE 'Indigenous%' GROUP BY dd.name HAVING SUM(d.amount) > 1000;,SELECT donors.name FROM donors INNER JOIN donations ON donors.id = donations.donor_id WHERE donors.ethnicity = 'Indigenous' AND donations.amount > 1000;,0 What is the average age of patients diagnosed with eating disorders?,"CREATE TABLE patient (patient_id INT, name VARCHAR(50), age INT, gender VARCHAR(10), condition VARCHAR(50)); ","SELECT AVG(age) FROM patient WHERE condition IN ('Anorexia Nervosa', 'Bulimia Nervosa');",SELECT AVG(age) FROM patient WHERE condition = 'Eating Disorder';,0 "How many weeks have an attendance less than 26,048?","CREATE TABLE table_name_7 (week INTEGER, attendance INTEGER);",SELECT SUM(week) FROM table_name_7 WHERE attendance < 26 OFFSET 048;,SELECT SUM(week) FROM table_name_7 WHERE attendance 26 OFFSET 048;,0 "When the Winning is 71-71-70-69=281, what is the To par?","CREATE TABLE table_name_7 (to_par VARCHAR, winning_score VARCHAR);",SELECT to_par FROM table_name_7 WHERE winning_score = 71 - 71 - 70 - 69 = 281;,SELECT to_par FROM table_name_7 WHERE winning_score = 71 - 71 - 70 - 69 = 281;,1 "What is the total sales for each product category, and what is the percentage of total sales for each category?","CREATE TABLE sales_by_category (sale_id INT, category VARCHAR(255), sale_amount DECIMAL(10,2)); ","SELECT category, SUM(sale_amount) as total_sales, 100.0 * SUM(sale_amount) / SUM(SUM(sale_amount)) OVER () as percentage_of_total FROM sales_by_category GROUP BY category;","SELECT category, SUM(sale_amount) as total_sales, 100.0 * SUM(sale_amount) / (SELECT SUM(sale_amount) FROM sales_by_category GROUP BY category) as percentage FROM sales_by_category GROUP BY category;",0 What is the total value of transactions in the technology sector in Q4 2022?,"CREATE TABLE transaction (transaction_id INT, sector VARCHAR(255), transaction_value DECIMAL(10,2), transaction_date DATE); ",SELECT SUM(transaction_value) FROM transaction WHERE sector = 'technology' AND transaction_date BETWEEN '2022-10-01' AND '2022-12-31';,SELECT SUM(transaction_value) FROM transaction WHERE sector = 'Technology' AND transaction_date BETWEEN '2022-04-01' AND '2022-06-30';,0 Show the top 3 safe AI algorithms based on their evaluation scores.,"CREATE TABLE safe_ai_algorithms (id INT, algorithm VARCHAR(25), evaluation_score FLOAT); ","SELECT algorithm, evaluation_score FROM safe_ai_algorithms ORDER BY evaluation_score DESC LIMIT 3;","SELECT algorithm, evaluation_score FROM safe_ai_algorithms ORDER BY evaluation_score DESC LIMIT 3;",1 "Which Score has a Visitor of montreal canadiens, and Points of 5?","CREATE TABLE table_name_93 (score VARCHAR, visitor VARCHAR, points VARCHAR);","SELECT score FROM table_name_93 WHERE visitor = ""montreal canadiens"" AND points = 5;","SELECT score FROM table_name_93 WHERE visitor = ""montreal canadiens"" AND points = ""5"";",0 What is the average age of patients with HIV in Texas?,"CREATE TABLE patients (id INT, name VARCHAR(50), age INT, state VARCHAR(20)); CREATE VIEW hiv_patients AS SELECT * FROM patients WHERE disease = 'HIV';",SELECT AVG(age) FROM hiv_patients WHERE state = 'Texas';,SELECT AVG(age) FROM hiv_patients WHERE state = 'Texas';,1 "How many races had 4 podiums, 5 poles and more than 3 Flaps?","CREATE TABLE table_name_64 (race INTEGER, flap VARCHAR, podium VARCHAR, pole VARCHAR);",SELECT SUM(race) FROM table_name_64 WHERE podium = 4 AND pole = 5 AND flap > 3;,SELECT SUM(race) FROM table_name_64 WHERE podium = 4 AND pole = 5 AND flap > 3;,1 What is the total number of mental health parity violations by healthcare providers in the Midwest region?,"CREATE TABLE HealthcareProviders (ProviderID INT, Region VARCHAR(255), ViolationID INT); ","SELECT Region, COUNT(ViolationID) as ViolationCount FROM HealthcareProviders WHERE Region = 'Midwest' GROUP BY Region;",SELECT COUNT(*) FROM HealthcareProviders WHERE Region = 'Midwest' AND ViolationID IN (SELECT ViolationID FROM HealthcareProviders WHERE Region = 'Midwest');,0 Remove all clients from the 'family_law' table who have not had any cases opened in the last 5 years,"CREATE TABLE family_law (client_id INT, client_name VARCHAR(50), last_case_date DATE);",WITH inactive_clients AS (DELETE FROM family_law WHERE last_case_date < (CURRENT_DATE - INTERVAL '5 years') RETURNING *) SELECT * FROM inactive_clients;,"DELETE FROM family_law WHERE last_case_date DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR);",0 What is the average risk score of security incidents in the APAC region in Q4 2021?,"CREATE TABLE security_incidents (id INT, risk_score INT, region TEXT, date DATE); ",SELECT AVG(risk_score) FROM security_incidents WHERE region = 'APAC' AND date >= '2021-10-01' AND date < '2022-01-01';,SELECT AVG(risk_score) FROM security_incidents WHERE region = 'APAC' AND date BETWEEN '2021-04-01' AND '2021-06-30';,0 What is the average salary of employees who identify as veterans?,"CREATE TABLE Employees (EmployeeID INT, Veteran VARCHAR(10), Salary DECIMAL(10,2)); ",SELECT AVG(Salary) FROM Employees WHERE Veteran = 'Yes';,SELECT AVG(Salary) FROM Employees WHERE Veteran = 'Veteran';,0 What is the average budget for disability services initiatives per year?,"CREATE TABLE budgets (budget_id INT, budget_year INT, budget_amount DECIMAL(10, 2));",SELECT AVG(budget_amount) FROM budgets WHERE budget_category = 'Disability Services';,"SELECT budget_year, AVG(budget_amount) as avg_budget FROM budgets GROUP BY budget_year;",0 "Which Location has a Year Joined of 1966, and a Previous Conference of noble county, and a School of wawaka?","CREATE TABLE table_name_83 (location VARCHAR, school VARCHAR, year_joined VARCHAR, previous_conference VARCHAR);","SELECT location FROM table_name_83 WHERE year_joined = 1966 AND previous_conference = ""noble county"" AND school = ""wawaka"";","SELECT location FROM table_name_83 WHERE year_joined = 1966 AND previous_conference = ""royal county"" AND school = ""wawawaka"";",0 WHich INEGI code has a Population density (/km 2 ) smaller than 81.4 and 0.6593 Human Development Index (2000)?,"CREATE TABLE table_name_17 (inegi_code INTEGER, population_density___km_2__ VARCHAR, human_development_index__2000_ VARCHAR);",SELECT AVG(inegi_code) FROM table_name_17 WHERE population_density___km_2__ < 81.4 AND human_development_index__2000_ = 0.6593;,"SELECT MAX(inegi_code) FROM table_name_17 WHERE population_density___km_2__ 81.4 AND human_development_index__2000_ = ""0.66593"";",0 What Round has the Track Winton?,"CREATE TABLE table_name_30 (round VARCHAR, track VARCHAR);","SELECT round FROM table_name_30 WHERE track = ""winton"";","SELECT round FROM table_name_30 WHERE track = ""winton"";",1 What is the average age of employees in the HR department who have not received diversity and inclusion training?,"CREATE TABLE Employees (EmployeeID INT, Department VARCHAR(20), Age INT, HasReceivedDiversityTraining BOOLEAN); ",SELECT AVG(Age) FROM Employees WHERE Department = 'HR' AND HasReceivedDiversityTraining = false;,SELECT AVG(Age) FROM Employees WHERE Department = 'HR' AND HasReceivedDiversityTraining = false;,1 who is the replacement when the team is milton keynes dons?,"CREATE TABLE table_name_10 (replaced_by VARCHAR, team VARCHAR);","SELECT replaced_by FROM table_name_10 WHERE team = ""milton keynes dons"";","SELECT replaced_by FROM table_name_10 WHERE team = ""milton keynes dons"";",1 Who are the top 5 countries with the most satellites in orbit?,"CREATE TABLE satellites (id INT, country VARCHAR(50), launch_date DATETIME); CREATE TABLE launches (id INT, satellite_id INT, country VARCHAR(50), launch_date DATETIME); ","SELECT country, COUNT(s.id) as total_satellites FROM satellites s JOIN launches l ON s.id = l.satellite_id GROUP BY country ORDER BY total_satellites DESC LIMIT 5;","SELECT s.country, COUNT(s.id) as num_satellites FROM satellites s JOIN launches l ON s.id = l.satellite_id GROUP BY s.country ORDER BY num_satellites DESC LIMIT 5;",0 What is the earliest season where Aisha Jefcoate was the runner-up?,"CREATE TABLE table_name_13 (season INTEGER, runner_up VARCHAR);","SELECT MIN(season) FROM table_name_13 WHERE runner_up = ""aisha jefcoate"";","SELECT MIN(season) FROM table_name_13 WHERE runner_up = ""aisha jefcoate"";",1 What is the average daily ridership for each subway line in Tokyo?,"CREATE TABLE subway (line_id INT, city VARCHAR(50), daily_ridership INT); ","SELECT line_id, city, AVG(daily_ridership) FROM subway GROUP BY line_id, city;","SELECT line_id, AVG(daily_ridership) FROM subway WHERE city = 'Tokyo' GROUP BY line_id;",0 What is the revenue generated by Hotel Chain A in Asia in the last 12 months?,"CREATE TABLE revenue (hotel_chain VARCHAR(255), region VARCHAR(255), revenue FLOAT, revenue_date DATE); ","SELECT SUM(revenue) FROM revenue WHERE hotel_chain = 'Hotel Chain A' AND region = 'Asia' AND revenue_date >= DATEADD(month, -12, GETDATE());","SELECT revenue FROM revenue WHERE hotel_chain = 'Hotel Chain A' AND region = 'Asia' AND revenue_date >= DATEADD(month, -12, GETDATE());",0 "Show the total salary spent on employees in each location, ordered by the total salary.","CREATE TABLE Employees (EmployeeID INT, Salary DECIMAL(10, 2), Location VARCHAR(50)); ","SELECT Location, SUM(Salary) FROM Employees GROUP BY Location ORDER BY SUM(Salary) DESC;","SELECT Location, SUM(Salary) as TotalSalary FROM Employees GROUP BY Location ORDER BY TotalSalary DESC;",0 Name the high points 31-27,"CREATE TABLE table_22669044_9 (high_points VARCHAR, record VARCHAR);","SELECT high_points FROM table_22669044_9 WHERE record = ""31-27"";","SELECT high_points FROM table_22669044_9 WHERE record = ""31-27"";",1 Which locations had their first year in 2001? ,"CREATE TABLE table_29788320_2 (location VARCHAR, first_year VARCHAR);",SELECT location FROM table_29788320_2 WHERE first_year = 2001;,SELECT location FROM table_29788320_2 WHERE first_year = 2001;,1 What is the average salary of employees in the IT department hired after January 2020?,"CREATE TABLE Employees (EmployeeID INT, Department VARCHAR(50), Gender VARCHAR(10), Salary FLOAT, HireDate DATE); ",SELECT AVG(Salary) FROM Employees WHERE Department = 'IT' AND HireDate > '2020-01-01';,SELECT AVG(Salary) FROM Employees WHERE Department = 'IT' AND HireDate > '2020-01-01';,1 How many event dates occurred when event details were women's sabre?,"CREATE TABLE table_28003469_1 (event_date VARCHAR, event_details VARCHAR);","SELECT COUNT(event_date) FROM table_28003469_1 WHERE event_details = ""Women's Sabre"";","SELECT COUNT(event_date) FROM table_28003469_1 WHERE event_details = ""Women's Sabre"";",1 Name the tournament for semifinal hard surface for opponent of pam casale,"CREATE TABLE table_name_86 (tournament VARCHAR, opponent VARCHAR, round VARCHAR, surface VARCHAR);","SELECT tournament FROM table_name_86 WHERE round = ""semifinal"" AND surface = ""hard"" AND opponent = ""pam casale"";","SELECT tournament FROM table_name_86 WHERE round = ""final"" AND surface = ""hard"" AND opponent = ""pam casale"";",0 What is the total revenue for each menu category in a specific region?,"CREATE TABLE menus (menu_id INT, category VARCHAR(255)); CREATE TABLE sales (sale_id INT, menu_id INT, quantity INT, region VARCHAR(255), price DECIMAL(10, 2));","SELECT m.category, SUM(s.price * s.quantity) as total_revenue FROM menus m INNER JOIN sales s ON m.menu_id = s.menu_id WHERE s.region = 'North' GROUP BY m.category;","SELECT m.category, SUM(s.quantity * s.price) as total_revenue FROM menus m JOIN sales s ON m.menu_id = s.menu_id WHERE s.region = 'USA' GROUP BY m.category;",0 What is the average number of points of the game after January 3 against the Cleveland Barons?,"CREATE TABLE table_name_23 (points INTEGER, opponent VARCHAR, january VARCHAR);","SELECT AVG(points) FROM table_name_23 WHERE opponent = ""cleveland barons"" AND january > 3;","SELECT AVG(points) FROM table_name_23 WHERE opponent = ""cleveland barons"" AND january > 3;",1 How many electric vehicle models are available in each country?,"CREATE TABLE Countries (Id INT, Name VARCHAR(50)); CREATE TABLE Vehicle_Models (Id INT, Name VARCHAR(50), Type VARCHAR(50), Country_Id INT);","SELECT C.Name, COUNT(V.Id) FROM Countries C INNER JOIN Vehicle_Models V ON C.Id = V.Country_Id WHERE V.Type = 'Electric' GROUP BY C.Name;","SELECT c.Name, COUNT(vm.Id) FROM Countries c JOIN Vehicle_Models vm ON c.Id = vm.Country_Id WHERE vm.Type = 'Electric' GROUP BY c.Name;",0 How many hotels were added to the database in the month of January 2023?,"CREATE TABLE hotels (id INT, name TEXT, region TEXT, added_date DATE);",SELECT COUNT(*) FROM hotels WHERE MONTH(added_date) = 1 AND YEAR(added_date) = 2023;,SELECT COUNT(*) FROM hotels WHERE added_date BETWEEN '2023-01-01' AND '2023-01-31';,0 What is the total calorie count for each type of cuisine?,"CREATE TABLE Cuisines (CuisineID INT, CuisineType VARCHAR(50)); CREATE TABLE Meals (MealID INT, CuisineID INT, MealName VARCHAR(50), CalorieCount INT); ","SELECT CuisineType, SUM(CalorieCount) as total_calories FROM Cuisines C JOIN Meals M ON C.CuisineID = M.CuisineID GROUP BY CuisineType;","SELECT Cuisines.CuisineType, SUM(Meals.CalorieCount) as TotalCalorieCount FROM Cuisines INNER JOIN Meals ON Cuisines.CuisineID = Meals.CuisineID GROUP BY Cuisines.CuisineType;",0 What is the total cargo weight handled by the company Orion Lines at the Port of Hong Kong?,"CREATE TABLE ports (id INT, name VARCHAR(50), country VARCHAR(50)); CREATE TABLE cargo_operations (id INT, port_id INT, company VARCHAR(50), type VARCHAR(50), weight INT); ",SELECT SUM(weight) FROM cargo_operations WHERE company = 'Orion Lines' AND port_id = (SELECT id FROM ports WHERE name = 'Port of Hong Kong');,SELECT SUM(weight) FROM cargo_operations JOIN ports ON cargo_operations.port_id = ports.id WHERE ports.name = 'Port of Hong Kong' AND cargo_operations.company = 'Orion Lines';,0 How many aircraft models were produced per month for the last two years?,"CREATE TABLE AircraftProduction ( id INT, model VARCHAR(255), production_date DATE); ","SELECT DATEPART(YEAR, production_date) AS year, DATEPART(MONTH, production_date) AS month, COUNT(DISTINCT model) AS aircraft_models_produced FROM AircraftProduction WHERE production_date >= DATEADD(YEAR, -2, GETDATE()) GROUP BY DATEPART(YEAR, production_date), DATEPART(MONTH, production_date);","SELECT DATE_FORMAT(production_date, '%Y-%m') AS month, COUNT(*) FROM AircraftProduction WHERE production_date >= DATE_SUB(CURRENT_DATE, INTERVAL 2 YEAR) GROUP BY month;",0 What is the total cost of all projects in 'Roads' category?,"CREATE TABLE InfrastructureProjects (id INT, category VARCHAR(20), cost FLOAT); ",SELECT SUM(cost) FROM InfrastructureProjects WHERE category = 'Roads';,SELECT SUM(cost) FROM InfrastructureProjects WHERE category = 'Roads';,1 "What is the lowest Not Outs with an average lower than 31.25, fewer than 13 matches, and fewer than 327 runs?","CREATE TABLE table_name_8 (not_outs INTEGER, runs VARCHAR, average VARCHAR, matches VARCHAR);",SELECT MIN(not_outs) FROM table_name_8 WHERE average < 31.25 AND matches < 13 AND runs < 327;,SELECT MIN(not_outs) FROM table_name_8 WHERE average 31.25 AND matches 13 AND runs 327;,0 What is the ratio of male to female patients diagnosed with heart disease?,"CREATE TABLE Patients (PatientID INT, Age INT, Gender TEXT, Diagnosis TEXT, State TEXT); ",SELECT COUNT(*) FILTER (WHERE Gender = 'Male') / COUNT(*) FILTER (WHERE Gender = 'Female') AS Ratio FROM Patients WHERE Diagnosis = 'Heart Disease';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Patients WHERE Diagnosis = 'Heart Disease')) AS Ratio FROM Patients WHERE Gender = 'Male' AND Diagnosis = 'Heart Disease';,0 The indicative of si måchan has what as the inverse subjunctive?,"CREATE TABLE table_name_8 (inverse_subjunctive VARCHAR, indicative VARCHAR);","SELECT inverse_subjunctive FROM table_name_8 WHERE indicative = ""si måchan"";","SELECT inverse_subjunctive FROM table_name_8 WHERE indicative = ""si mchan"";",0 "What is the total number of posts made by users with the role ""influencer"" in the ""users_roles_table""?","CREATE TABLE users_roles_table (user_id INT, role VARCHAR(20)); ",SELECT SUM(post_count) FROM (SELECT COUNT(*) AS post_count FROM users_table JOIN users_roles_table ON users_table.user_id = users_roles_table.user_id WHERE users_roles_table.role = 'influencer' GROUP BY users_table.user_id) AS subquery;,SELECT COUNT(*) FROM users_roles_table WHERE role = 'influencer';,0 How many unique ethical certifications are there for all products in the PRODUCT table?,"CREATE TABLE PRODUCT ( id INT PRIMARY KEY, name TEXT, material TEXT, quantity INT, country TEXT, certifications TEXT ); ",SELECT DISTINCT certifications FROM PRODUCT;,SELECT COUNT(DISTINCT certifications) FROM PRODUCT;,0 "Which cities in Japan have populations over 2 million, and what are their populations?","CREATE TABLE japan_cities (name TEXT, population INTEGER); ","SELECT name, population FROM japan_cities WHERE population > 2000000;","SELECT name, population FROM japan_cities WHERE population > 20000000;",0 Find all records where the budget allocated for a public service is greater than 6000000,"CREATE TABLE Public_Services( service_id INT PRIMARY KEY, service_name VARCHAR(255), location VARCHAR(255), budget FLOAT, created_date DATE); ",SELECT * FROM Public_Services WHERE budget > 6000000;,SELECT * FROM Public_Services WHERE budget > 6000000;,1 What is the distribution of player levels in esports events?,"CREATE TABLE esports_events (id INT, event VARCHAR(20), player_level INT); ","SELECT event, player_level, COUNT(*) as count FROM esports_events GROUP BY event, player_level;","SELECT player_level, COUNT(*) FROM esports_events GROUP BY player_level;",0 Name the date for chris evert opponent and carpet surface,"CREATE TABLE table_name_98 (date VARCHAR, opponent VARCHAR, surface VARCHAR);","SELECT date FROM table_name_98 WHERE opponent = ""chris evert"" AND surface = ""carpet"";","SELECT date FROM table_name_98 WHERE opponent = ""chris evert"" AND surface = ""carpet"";",1 What is the average monthly donation amount per donor?,"CREATE TABLE donor_monthly_donations (donor_id INT, donation_amount DECIMAL(10,2), donation_date DATE); ","SELECT donor_id, AVG(donation_amount) as avg_monthly_donation FROM donor_monthly_donations GROUP BY donor_id;","SELECT donor_id, AVG(donation_amount) as avg_monthly_donation FROM donor_monthly_donations GROUP BY donor_id;",1 What themed area opened in 2010 as an animal show?,"CREATE TABLE table_name_35 (themed_area VARCHAR, type VARCHAR, opened VARCHAR);","SELECT themed_area FROM table_name_35 WHERE type = ""animal show"" AND opened = ""2010"";","SELECT themed_area FROM table_name_35 WHERE type = ""animal show"" AND opened = ""2010"";",1 What date was week 2?,"CREATE TABLE table_14971788_1 (date VARCHAR, week VARCHAR);",SELECT date FROM table_14971788_1 WHERE week = 2;,SELECT date FROM table_14971788_1 WHERE week = 2;,1 How many hotels have adopted AI in South America?,"CREATE TABLE ai_adoption (hotel_id INT, country VARCHAR(255), ai_adoption BOOLEAN); ",SELECT COUNT(*) FROM ai_adoption WHERE country = 'South America' AND ai_adoption = true;,SELECT COUNT(*) FROM ai_adoption WHERE country = 'South America' AND ai_adoption = TRUE;,0 Which Team has a Winner of 1?,"CREATE TABLE table_name_6 (team VARCHAR, winner VARCHAR);","SELECT team FROM table_name_6 WHERE winner = ""1"";","SELECT team FROM table_name_6 WHERE winner = ""1"";",1 "What is the Original Team of the contestant from Wrightsville, Georgia ?","CREATE TABLE table_name_13 (original_team VARCHAR, hometown VARCHAR);","SELECT original_team FROM table_name_13 WHERE hometown = ""wrightsville, georgia"";","SELECT original_team FROM table_name_13 WHERE hometown = ""wrightsville, georgia"";",1 How many cybersecurity incidents were reported in the 'cybersecurity' view for the year 2020?,"CREATE VIEW cybersecurity AS SELECT incident_id, type, description, report_date FROM security_incidents WHERE category = 'cybersecurity'; CREATE TABLE security_incidents (incident_id INT PRIMARY KEY, type VARCHAR(50), description TEXT, report_date DATE, category VARCHAR(50)); ",SELECT COUNT(*) FROM cybersecurity WHERE YEAR(report_date) = 2020;,SELECT COUNT(*) FROM cybersecurity WHERE year = 2020;,0 How many participants attended visual art programs by age group in H2 2022?,"CREATE TABLE ArtAttendance (id INT, age_group VARCHAR(10), program VARCHAR(20), attendance INT, attendance_date DATE); ","SELECT program, age_group, SUM(attendance) as total_attendance FROM ArtAttendance WHERE YEAR(attendance_date) = 2022 AND MONTH(attendance_date) > 6 AND program = 'Visual Art' GROUP BY program, age_group;","SELECT age_group, SUM(attendance) as total_attendance FROM ArtAttendance WHERE EXTRACT(YEAR FROM attendance_date) = 2022 AND EXTRACT(YEAR FROM attendance_date) = 2022 GROUP BY age_group;",0 What was the score when the record was 21-31-13?,"CREATE TABLE table_17360840_9 (score VARCHAR, record VARCHAR);","SELECT score FROM table_17360840_9 WHERE record = ""21-31-13"";","SELECT score FROM table_17360840_9 WHERE record = ""21-31-13"";",1 "What is the highest round in the Wec 25 match in Las Vegas, Nevada, United States?","CREATE TABLE table_name_80 (round INTEGER, location VARCHAR, event VARCHAR);","SELECT MAX(round) FROM table_name_80 WHERE location = ""las vegas, nevada, united states"" AND event = ""wec 25"";","SELECT MAX(round) FROM table_name_80 WHERE location = ""las vegas, nevada, united states"" AND event = ""wec 25 match"";",0 What was the loss when the score was 7-1?,"CREATE TABLE table_name_26 (loss VARCHAR, score VARCHAR);","SELECT loss FROM table_name_26 WHERE score = ""7-1"";","SELECT loss FROM table_name_26 WHERE score = ""7-1"";",1 "Add a new record to the 'athletics_meets' table for a meet with a capacity of 50000 located in 'Delhi', 'India'","CREATE TABLE athletics_meets (meet_id INT, meet_name VARCHAR(50), capacity INT, city VARCHAR(50), country VARCHAR(50));","INSERT INTO athletics_meets (meet_id, meet_name, capacity, city, country) VALUES (1, 'Delhi Athletics Meet', 50000, 'Delhi', 'India');","INSERT INTO athletics_meets (meet_id, meet_name, capacity, city, country) VALUES (1, 'Delhi', 50000, 'India');",0 Insert a new record into the public_works table with the name 'Sewer Rehabilitation' and cost 500000 for the location 'City D',"CREATE TABLE public_works (id INT PRIMARY KEY, project_name VARCHAR(255), cost INT, location VARCHAR(255)); ","INSERT INTO public_works (project_name, cost, location) VALUES ('Sewer Rehabilitation', 500000, 'City D');","INSERT INTO public_works (project_name, cost, location) VALUES ('Sewer Rehabilitation', 500000, 'City D');",1 Show the total number of male and female reporters in the 'news_reporters' table.,"CREATE TABLE news_reporters (reporter_id INT, name VARCHAR(50), age INT, gender VARCHAR(10), hire_date DATE);","SELECT gender, COUNT(*) FROM news_reporters GROUP BY gender;","SELECT gender, COUNT(*) FROM news_reporters GROUP BY gender;",1 Name the least population 1.1.2008 with population per square km of 1.957 and population 1.1.2006 less than 12.67,"CREATE TABLE table_name_62 (population_112008 INTEGER, population_per_square_km VARCHAR, population_112006 VARCHAR);",SELECT MIN(population_112008) FROM table_name_62 WHERE population_per_square_km = 1.957 AND population_112006 < 12.67;,SELECT MIN(population_112008) FROM table_name_62 WHERE population_per_square_km = 1.957 AND population_112006 12.67;,0 "List all garment manufacturers that use eco-friendly materials, ordered alphabetically.","CREATE TABLE manufacturers (id INT PRIMARY KEY, name VARCHAR(50), eco_friendly BOOLEAN);",SELECT name FROM manufacturers WHERE eco_friendly = TRUE ORDER BY name;,SELECT name FROM manufacturers WHERE eco_friendly = true ORDER BY name;,0 What is the total attendance for cultural events in the 'dance' category?,"CREATE TABLE events (id INT, name VARCHAR(50), category VARCHAR(20), attendance INT); ",SELECT SUM(attendance) FROM events WHERE category = 'dance';,SELECT SUM(attendance) FROM events WHERE category = 'dance';,1 Name the 125cc winner with circuit of estoril,CREATE TABLE table_name_2 (circuit VARCHAR);,"SELECT 125 AS cc_winner FROM table_name_2 WHERE circuit = ""estoril"";","SELECT 125 AS cc_winner FROM table_name_2 WHERE circuit = ""estoril"";",1 Which Quantity has a Designation of type 4?,"CREATE TABLE table_name_82 (quantity INTEGER, designation VARCHAR);","SELECT AVG(quantity) FROM table_name_82 WHERE designation = ""type 4"";","SELECT SUM(quantity) FROM table_name_82 WHERE designation = ""type 4"";",0 "For the game whose developer was Ailive, is it a Move-only release?","CREATE TABLE table_26538035_1 (move_only VARCHAR, developer VARCHAR);","SELECT move_only FROM table_26538035_1 WHERE developer = ""AiLive"";","SELECT move_only FROM table_26538035_1 WHERE developer = ""Ailive"";",0 What date had a time of 20:10?,"CREATE TABLE table_name_25 (date VARCHAR, time VARCHAR);","SELECT date FROM table_name_25 WHERE time = ""20:10"";","SELECT date FROM table_name_25 WHERE time = ""20:10"";",1 Calculate the average number of kills per game for each team in the gaming tournament.,"CREATE TABLE GameStats (Team VARCHAR(50), Game VARCHAR(50), Kills INT); ","SELECT Team, AVG(Kills) AS AvgKillsPerGame FROM GameStats GROUP BY Team;","SELECT Team, AVG(Kills) FROM GameStats GROUP BY Team;",0 Show the total amount of waste generated by each manufacturing process in the past year.,"CREATE TABLE manufacturing_processes (process_id INT, name TEXT); CREATE TABLE waste_generation (process_id INT, waste_amount INT, date DATE);","SELECT manufacturing_processes.name, SUM(waste_generation.waste_amount) FROM manufacturing_processes INNER JOIN waste_generation ON manufacturing_processes.process_id = waste_generation.process_id WHERE waste_generation.date > DATEADD(year, -1, GETDATE()) GROUP BY manufacturing_processes.name;","SELECT manufacturing_processes.name, SUM(waste_generation.waste_amount) as total_waste FROM manufacturing_processes INNER JOIN waste_generation ON manufacturing_processes.process_id = waste_generation.process_id WHERE waste_generation.date >= DATEADD(year, -1, GETDATE()) GROUP BY manufacturing_processes.name;",0 What is the maximum amount of funds spent on refugee support in each region?,"CREATE TABLE funds (id INT, category TEXT, region TEXT, amount DECIMAL(10,2)); ","SELECT region, MAX(amount) FROM funds WHERE category = 'Refugee Support' GROUP BY region;","SELECT region, MAX(amount) FROM funds WHERE category = 'Refugee Support' GROUP BY region;",1 What is the total number of disability accommodations provided in each city in the United States?,"CREATE TABLE country (country_code VARCHAR(5), country_name VARCHAR(50)); CREATE TABLE city (city_id INT, city_name VARCHAR(50), country_code VARCHAR(5)); CREATE TABLE accommodation (accommodation_id INT, accommodation_date DATE, city_id INT); ","SELECT C.city_name, COUNT(A.accommodation_id) as total_accommodations FROM accommodation A JOIN city C ON A.city_id = C.city_id WHERE C.country_code = 'USA' GROUP BY C.city_name;","SELECT city.city_name, COUNT(accommodation.accommodation_id) as total_accommodations FROM city INNER JOIN accommodation ON city.city_id = accommodation.city_id WHERE country.country_code = 'United States' GROUP BY city.city_name;",0 What is the minimum number of streams for Folk music in July?,"CREATE TABLE Streams (id INT, genre VARCHAR(20), date DATE, streams INT); ",SELECT MIN(streams) FROM Streams WHERE genre = 'Folk' AND date BETWEEN '2022-07-01' AND '2022-07-31';,SELECT MIN(streams) FROM Streams WHERE genre = 'Folk' AND date BETWEEN '2022-07-01' AND '2022-07-30';,0 Find the number of green buildings in each country.,"CREATE TABLE green_buildings (building_id INT, country VARCHAR(50)); ","SELECT country, COUNT(*) FROM green_buildings GROUP BY country","SELECT country, COUNT(*) FROM green_buildings GROUP BY country;",0 What is the total amount of world records for Roger Francois?,"CREATE TABLE table_name_54 (roger_françois VARCHAR, world_record VARCHAR);","SELECT roger_françois FROM table_name_54 WHERE world_record = ""total"";","SELECT COUNT(roger_françois) FROM table_name_54 WHERE world_record = ""robert françois"";",0 Name the director who has title of transylvania 6-5000,"CREATE TABLE table_name_47 (director VARCHAR, title VARCHAR);","SELECT director FROM table_name_47 WHERE title = ""transylvania 6-5000"";","SELECT director FROM table_name_47 WHERE title = ""transylvania 6-5000"";",1 "What is the production by mining operation and year, in ascending order of production?","CREATE TABLE production_data (operation_name VARCHAR(50), year INT, production INT); ","SELECT operation_name, year, production FROM production_data ORDER BY production ASC;","SELECT operation_name, year, production FROM production_data ORDER BY production ASC;",1 What is the maximum age of patients who received therapy in 'clinic_e'?,"CREATE TABLE clinic_e (patient_id INT, age INT, treatment VARCHAR(10)); ",SELECT MAX(age) FROM clinic_e WHERE treatment = 'therapy';,SELECT MAX(age) FROM clinic_e WHERE treatment = 'therapy';,1 What is the sum of the pick numbers for the player that went to San Miguel Beermen who played at San Sebastian?,"CREATE TABLE table_name_36 (pick INTEGER, pba_team VARCHAR, college VARCHAR);","SELECT SUM(pick) FROM table_name_36 WHERE pba_team = ""san miguel beermen"" AND college = ""san sebastian"";","SELECT SUM(pick) FROM table_name_36 WHERE pba_team = ""san miguel beermen"" AND college = ""san sebastian"";",1 what's the fcc info with call sign being w265av,"CREATE TABLE table_13998897_1 (fcc_info VARCHAR, call_sign VARCHAR);","SELECT fcc_info FROM table_13998897_1 WHERE call_sign = ""W265AV"";","SELECT fcc_info FROM table_13998897_1 WHERE call_sign = ""W265AV"";",1 What's greatest attendance on May 7?,"CREATE TABLE table_name_89 (attendance INTEGER, date VARCHAR);","SELECT MAX(attendance) FROM table_name_89 WHERE date = ""may 7"";","SELECT MAX(attendance) FROM table_name_89 WHERE date = ""may 7"";",1 Which genetic research projects have a budget greater than the average budget?,"CREATE TABLE research (name TEXT, budget FLOAT); ",SELECT name FROM research WHERE budget > (SELECT AVG(budget) FROM research);,SELECT name FROM research WHERE budget > (SELECT AVG(budget) FROM research);,1 Who are the top 3 new customers with the highest financial wellbeing scores?,"CREATE TABLE customers (customer_id INT, customer_name VARCHAR(255), customer_type VARCHAR(255), age INT, financial_wellbeing_score INT);","SELECT c.customer_name, c.financial_wellbeing_score FROM customers c WHERE c.customer_type = 'New' ORDER BY c.financial_wellbeing_score DESC LIMIT 3;","SELECT customer_name, financial_wellbeing_score FROM customers ORDER BY financial_wellbeing_score DESC LIMIT 3;",0 Calculate the average revenue per album for all rock albums available on the 'desktop' platform.,"CREATE TABLE artists (id INT, name TEXT, genre TEXT); CREATE TABLE albums (id INT, title TEXT, artist_id INT, platform TEXT); CREATE TABLE sales (id INT, album_id INT, quantity INT, revenue DECIMAL); CREATE VIEW rock_desktop_albums AS SELECT a.id, a.title, ar.name FROM albums a JOIN artists ar ON a.artist_id = ar.id WHERE ar.genre = 'rock' AND a.platform = 'desktop'; CREATE VIEW rock_desktop_sales AS SELECT s.album_id, AVG(s.revenue) as avg_revenue FROM sales s JOIN rock_desktop_albums rda ON s.album_id = rda.id GROUP BY album_id;",SELECT avg_revenue FROM rock_desktop_sales;,"SELECT a.name, AVG(s.revenue) as avg_revenue FROM rock_desktop_albums a JOIN rock_desktop_sales s ON a.id = s.album_id JOIN artists a ON a.id = a.id JOIN albums a ON a.id = a.artist_id JOIN sales s ON a.id = s.album_id WHERE a.platform = 'desktop';",0 How many cultural heritage sites in India and Egypt were visited by more than 20000 people in 2021?,"CREATE TABLE sites (site_id INT, site_name VARCHAR(50), country VARCHAR(50), year INT, visitors INT); ","SELECT COUNT(*) FROM sites WHERE country IN ('India', 'Egypt') AND year = 2021 AND visitors > 20000;","SELECT COUNT(*) FROM sites WHERE country IN ('India', 'Egypt') AND year = 2021 AND visitors > 20000;",1 "What is the prevalence of diabetes in rural areas, grouped by state and age range?","CREATE TABLE patients (patient_id INT, age INT, has_diabetes BOOLEAN, state VARCHAR); CREATE TABLE rural_areas (area_id INT, state VARCHAR); ","SELECT state, FLOOR(age / 10) * 10 AS age_range, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM patients JOIN rural_areas ON patients.state = rural_areas.state) AS prevalence FROM patients JOIN rural_areas ON patients.state = rural_areas.state WHERE has_diabetes = true GROUP BY state, age_range;","SELECT p.state, p.age, SUM(p.has_diabetes) as prevalence FROM patients p INNER JOIN rural_areas ra ON p.state = ra.state GROUP BY p.state, p.age;",0 What is the average age of teachers who have completed a professional development course in the past year?,"CREATE TABLE teachers (id INT, name VARCHAR(50), age INT, last_pd_course DATE);","SELECT AVG(age) FROM teachers WHERE last_pd_course >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR);","SELECT AVG(age) FROM teachers WHERE last_pd_course >= DATEADD(year, -1, GETDATE());",0 How many journal articles were published by female faculty members in the Engineering department in the last 2 years?,"CREATE TABLE if NOT EXISTS publications (id INT, facultyid INT, department VARCHAR(20), type VARCHAR(20), pubdate DATE);","SELECT COUNT(*) FROM publications WHERE gender='Female' AND department='Engineering' AND type='Journal' AND pubdate >= DATE_SUB(CURRENT_DATE, INTERVAL 2 YEAR);","SELECT COUNT(*) FROM publications WHERE department = 'Engineering' AND type = 'Journal' AND pubdate >= DATEADD(year, -2, GETDATE());",0 Identify the top 3 organizations with the most unique donors.,"CREATE TABLE organization (id INT, name VARCHAR(255)); CREATE TABLE donor (id INT, name VARCHAR(255), organization_id INT);","SELECT o.name, COUNT(DISTINCT d.id) as num_donors FROM organization o JOIN donor d ON o.id = d.organization_id GROUP BY o.id ORDER BY num_donors DESC LIMIT 3;","SELECT o.name, COUNT(DISTINCT d.id) as unique_donors FROM organization o JOIN donor d ON o.id = d.organization_id GROUP BY o.name ORDER BY unique_donors DESC LIMIT 3;",0 "What is the total sales of dishes that have a rating of 4 or higher, broken down by category?","CREATE TABLE Orders (OrderID INT, DishID INT, Quantity INT, Rating INT); CREATE TABLE Dishes (DishID INT, DishName VARCHAR(50), Category VARCHAR(50), Price DECIMAL(5,2)); ","SELECT Category, SUM(Quantity * Price) as TotalSales FROM Orders JOIN Dishes ON Orders.DishID = Dishes.DishID WHERE Rating >= 4 GROUP BY Category;","SELECT Category, SUM(Quantity) as TotalSales FROM Orders JOIN Dishes ON Orders.DishID = Dishes.DishID WHERE Rating >= 4 GROUP BY Category;",0 what is the average water sqmi with a population (2010) more than 47 in the Brenna Township with Longitude less than -97.171507,"CREATE TABLE table_name_8 (water__sqmi_ INTEGER, longitude VARCHAR, pop__2010_ VARCHAR, township VARCHAR);","SELECT AVG(water__sqmi_) FROM table_name_8 WHERE pop__2010_ > 47 AND township = ""brenna"" AND longitude < -97.171507;","SELECT AVG(water__sqmi_) FROM table_name_8 WHERE pop__2010_ > 47 AND township = ""brennera"" AND longitude -97.171507;",0 "What is Tournament, when Date is ""9 August 1993""?","CREATE TABLE table_name_38 (tournament VARCHAR, date VARCHAR);","SELECT tournament FROM table_name_38 WHERE date = ""9 august 1993"";","SELECT tournament FROM table_name_38 WHERE date = ""9 august 1993"";",1 What is the maximum budget allocated to any public service in the city of Sydney?,"CREATE TABLE public_services (name VARCHAR(255), city VARCHAR(255), budget DECIMAL(10,2)); ",SELECT MAX(budget) FROM public_services WHERE city = 'Sydney';,SELECT MAX(budget) FROM public_services WHERE city = 'Sydney';,1 "WHICH Regular Season has a League of npsl, and a Year of 2008?","CREATE TABLE table_name_64 (regular_season VARCHAR, league VARCHAR, year VARCHAR);","SELECT regular_season FROM table_name_64 WHERE league = ""npsl"" AND year = ""2008"";","SELECT regular_season FROM table_name_64 WHERE league = ""npsl"" AND year = 2008;",0 What is the Average for Silver medals that have more than 17 Golds?,"CREATE TABLE table_name_50 (silver INTEGER, gold INTEGER);",SELECT AVG(silver) FROM table_name_50 WHERE gold > 17;,SELECT AVG(silver) FROM table_name_50 WHERE gold > 17;,1 What is the total quantity of 'Eco-friendly Tops' sold in each store in 'Brazil' for the 'Winter 2024' season?,"CREATE TABLE StoreSales (StoreID INT, ProductID INT, QuantitySold INT, StoreCountry VARCHAR(50), SaleDate DATE); CREATE TABLE Products (ProductID INT, ProductType VARCHAR(20), Sustainable BOOLEAN); ","SELECT StoreCountry, ProductType, SUM(QuantitySold) as TotalQuantitySold FROM StoreSales S JOIN Products P ON S.ProductID = P.ProductID WHERE P.ProductType = 'Eco-friendly Tops' AND StoreCountry = 'Brazil' AND SaleDate BETWEEN '2024-01-01' AND '2024-03-31' GROUP BY StoreCountry, ProductType;","SELECT StoreCountry, SUM(QuantitySold) FROM StoreSales JOIN Products ON StoreSales.ProductID = Products.ProductID WHERE ProductType = 'Eco-friendly Tops' AND StoreCountry = 'Brazil' AND SaleDate BETWEEN '2024-01-01' AND '2022-01-31' GROUP BY StoreCountry;",0 "What is the lowest number for draw when the points are less than 17, and the lost is 13?","CREATE TABLE table_name_4 (draw INTEGER, points VARCHAR, lost VARCHAR);",SELECT MIN(draw) FROM table_name_4 WHERE points < 17 AND lost = 13;,SELECT MIN(draw) FROM table_name_4 WHERE points 17 AND lost = 13;,0 "What season had a winning profit of $15,000?","CREATE TABLE table_2311410_1 (season VARCHAR, winning_profit___aud__ VARCHAR);","SELECT season FROM table_2311410_1 WHERE winning_profit___aud__ = ""$15,000"";","SELECT season FROM table_2311410_1 WHERE winning_profit___aud__ = ""$15000"";",0 Name the number of number in series for production code of 06-04-621,"CREATE TABLE table_1876825_7 (no_in_series VARCHAR, production_code VARCHAR);","SELECT COUNT(no_in_series) FROM table_1876825_7 WHERE production_code = ""06-04-621"";","SELECT COUNT(no_in_series) FROM table_1876825_7 WHERE production_code = ""06-04-621"";",1 What is the total number of artifacts from the 'Bronze Age' culture?,"CREATE TABLE ExcavationSites (id INT, site VARCHAR(20), location VARCHAR(30), start_date DATE, end_date DATE); CREATE TABLE Artifacts (id INT, excavation_site VARCHAR(20), artifact_name VARCHAR(30), pieces INT, culture VARCHAR(20)); ",SELECT SUM(pieces) FROM Artifacts WHERE culture = 'Bronze Age';,SELECT SUM(Artifacts.pieces) FROM Artifacts INNER JOIN ExcavationSites ON Artifacts.excavation_site = ExcavationSites.site WHERE Artifacts.culture = 'Bronze Age';,0 How many users in each country have accessed media content related to diversity and representation in the last month?,"CREATE TABLE users (id INT, country VARCHAR(50), accessed_diversity_content BOOLEAN);","SELECT country, COUNT(*) FROM users WHERE accessed_diversity_content = true GROUP BY country;","SELECT country, COUNT(*) FROM users WHERE accessed_diversity_content = TRUE AND accessed_diversity_content = TRUE AND MONTH(accessed_diversity_content) >= DATEADD(month, -1, GETDATE()) GROUP BY country;",0 What is the away side's score when richmond is at home?,"CREATE TABLE table_name_3 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team AS score FROM table_name_3 WHERE home_team = ""richmond"";","SELECT away_team AS score FROM table_name_3 WHERE home_team = ""richmond"";",1 Identify the safety incidents in Colombia with higher impact levels than their preceding incident.,"CREATE TABLE safety_incidents (incident_id INT, incident_type VARCHAR(50), impact_level INT, incident_order INT, country VARCHAR(50)); ","SELECT incident_id, incident_type, impact_level FROM (SELECT incident_id, incident_type, impact_level, LAG(impact_level) OVER (PARTITION BY country ORDER BY incident_order) AS lag_value FROM safety_incidents WHERE country = 'Colombia') tmp WHERE impact_level > lag_value;","SELECT incident_id, incident_type, impact_level, incident_order FROM safety_incidents WHERE country = 'Colombia' AND impact_level > (SELECT impact_level FROM safety_incidents WHERE country = 'Colombia');",0 Which organizations focus on ethical AI in Africa?,"CREATE TABLE organization (name VARCHAR(50), focus VARCHAR(50), location VARCHAR(50)); ",SELECT name FROM organization WHERE focus = 'Ethical AI' AND location = 'Africa';,SELECT name FROM organization WHERE focus = 'Ethical AI' AND location = 'Africa';,1 What was the attendance for record 2-0?,"CREATE TABLE table_name_52 (attendance VARCHAR, record VARCHAR);","SELECT attendance FROM table_name_52 WHERE record = ""2-0"";","SELECT attendance FROM table_name_52 WHERE record = ""2-0"";",1 Determine the sales trends for cruelty-free makeup products by quarter,"CREATE TABLE makeup_sales (sale_date DATE, product VARCHAR(255), sales_quantity INT, is_cruelty_free BOOLEAN); ","SELECT DATE_TRUNC('quarter', sale_date) AS quarter, SUM(sales_quantity) FROM makeup_sales WHERE is_cruelty_free = TRUE GROUP BY quarter;","SELECT EXTRACT(QUARTER FROM sale_date) AS quarter, SUM(sales_quantity) AS total_sales FROM makeup_sales WHERE is_cruelty_free = true GROUP BY quarter;",0 How many years have a Record of 73-65?,"CREATE TABLE table_name_74 (year VARCHAR, record VARCHAR);","SELECT COUNT(year) FROM table_name_74 WHERE record = ""73-65"";","SELECT COUNT(year) FROM table_name_74 WHERE record = ""73-65"";",1 How many people live in the district who's capital is héngfēng xiàn?,"CREATE TABLE table_1300525_1 (population VARCHAR, pinyin VARCHAR);","SELECT population FROM table_1300525_1 WHERE pinyin = ""Héngfēng Xiàn"";","SELECT COUNT(population) FROM table_1300525_1 WHERE pinyin = ""Héngfng Xiàn"";",0 What is the maximum score achieved by player 'Mia' in the game 'Fortnite'?,"CREATE TABLE fortnite_scores (id INT, player TEXT, score INT, game TEXT); ",SELECT MAX(score) FROM fortnite_scores WHERE player = 'Mia' AND game = 'Fortnite';,SELECT MAX(score) FROM fortnite_scores WHERE player = 'Mia' AND game = 'Fortnite';,1 What is the oldest launch year for a satellite?,"CREATE TABLE satellites (id INT PRIMARY KEY, company VARCHAR(50), launch_year INT); ",SELECT MIN(launch_year) FROM satellites;,SELECT MAX(launch_year) FROM satellites;,0 What are the first and last name of the faculty who has the most students?,"CREATE TABLE Student (advisor VARCHAR); CREATE TABLE Faculty (fname VARCHAR, lname VARCHAR, FacID VARCHAR);","SELECT T1.fname, T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY COUNT(*) DESC LIMIT 1;","SELECT T1.fname, T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.fname ORDER BY COUNT(*) DESC LIMIT 1;",0 What's the percentage of the immigrants in 2007 in the country with 14.1% of the immigrants in 2006?,"CREATE TABLE table_23619212_1 (_percentage_of_all_immigrants_2007 VARCHAR, _percentage_of_all_immigrants_2006 VARCHAR);","SELECT _percentage_of_all_immigrants_2007 FROM table_23619212_1 WHERE _percentage_of_all_immigrants_2006 = ""14.1%"";","SELECT _percentage_of_all_immigrants_2007 FROM table_23619212_1 WHERE _percentage_of_all_immigrants_2006 = ""14.1%"";",1 What is the regulatory framework status in 'australia'?,"CREATE TABLE regulation (id INT, country VARCHAR(20), status VARCHAR(20)); ",SELECT status FROM regulation WHERE country = 'australia';,SELECT status FROM regulation WHERE country = 'Australia';,0 Tell me the peak for prom being less than 147,"CREATE TABLE table_name_26 (peak VARCHAR, prom__m_ INTEGER);",SELECT peak FROM table_name_26 WHERE prom__m_ < 147;,SELECT peak FROM table_name_26 WHERE prom__m_ 147;,0 What is the total number of properties and their summed price in each city with a green housing policy?,"CREATE TABLE cities (city_id INT, name VARCHAR(255), green_policy BOOLEAN);CREATE TABLE properties (property_id INT, city_id INT, price INT); ","SELECT cities.name, COUNT(properties.property_id) as total_properties, SUM(properties.price) as total_price FROM properties JOIN cities ON properties.city_id = cities.city_id WHERE cities.green_policy = true GROUP BY cities.name;","SELECT c.name, COUNT(p.property_id) as total_properties, SUM(p.price) as total_price FROM cities c JOIN properties p ON c.city_id = p.city_id WHERE c.green_policy = true GROUP BY c.name;",0 "How many unique donors have contributed over $5000 in total, and what is their combined contribution amount?","CREATE TABLE donors (donor_id INT, donor_name VARCHAR(50), total_donation_amount DECIMAL(10,2)); ","SELECT COUNT(DISTINCT donor_name) as num_donors, SUM(total_donation_amount) as total_donation_amount FROM donors WHERE total_donation_amount > 5000;","SELECT COUNT(DISTINCT donor_id) as unique_donors, SUM(total_donation_amount) as total_donation_amount FROM donors GROUP BY unique_donors HAVING total_donation_amount > 5000;",0 Delete all records from the marine_species table where the species name contains 'Shark',"CREATE TABLE marine_species (id INT, name VARCHAR(50), population INT);",DELETE FROM marine_species WHERE name LIKE '%Shark%';,DELETE FROM marine_species WHERE name LIKE '%Shark%';,1 List all investments in the 'renewable_energy' sector with their risk scores.,"CREATE TABLE investments (id INT, name TEXT, sector TEXT, risk_score FLOAT); ",SELECT * FROM investments WHERE sector = 'renewable_energy';,"SELECT name, risk_score FROM investments WHERE sector ='renewable_energy';",0 "Add a new 'game' record with player_id 5, and score 100","CREATE TABLE games (id INT, player_id INT, score INT);","INSERT INTO games (player_id, score) VALUES (5, 100);","INSERT INTO games (id, player_id, score) VALUES (5, 100);",0 How many grids for heinz-harald frentzen with 61 laps?,"CREATE TABLE table_name_12 (grid VARCHAR, laps VARCHAR, driver VARCHAR);","SELECT COUNT(grid) FROM table_name_12 WHERE laps = 61 AND driver = ""heinz-harald frentzen"";","SELECT COUNT(grid) FROM table_name_12 WHERE laps = 61 AND driver = ""heinz-harald frentzen"";",1 Who are the top 3 mediators with the highest number of cases in the last 2 years?,"CREATE TABLE mediators (id INT, name VARCHAR(255), year INT, num_cases INT); ","SELECT name, SUM(num_cases) as total_cases FROM mediators WHERE year IN (2020, 2021) GROUP BY name ORDER BY total_cases DESC LIMIT 3;","SELECT name, SUM(num_cases) as total_cases FROM mediators WHERE year >= YEAR(CURRENT_DATE) - 2 GROUP BY name ORDER BY total_cases DESC LIMIT 3;",0 What was the record when chicago was the visiting team?,"CREATE TABLE table_name_98 (record VARCHAR, visitor VARCHAR);","SELECT record FROM table_name_98 WHERE visitor = ""chicago"";","SELECT record FROM table_name_98 WHERE visitor = ""chicago"";",1 What is the slowest 50m split time for a total of 53.74 in a lane of less than 3?,"CREATE TABLE table_name_8 (split__50m_ INTEGER, time VARCHAR, lane VARCHAR);",SELECT MAX(split__50m_) FROM table_name_8 WHERE time = 53.74 AND lane < 3;,"SELECT MIN(split__50m_) FROM table_name_8 WHERE time = ""53.74"" AND lane 3;",0 How many financial wellbeing workshops were held in Q3 for low-income individuals and women?,"CREATE TABLE Workshops (WorkshopID INT, Date DATE, IncomeLevel VARCHAR(255), Gender VARCHAR(255)); ",SELECT COUNT(*) FROM Workshops WHERE Date >= '2022-07-01' AND Date < '2022-10-01' AND IncomeLevel = 'Low Income' AND Gender = 'Female';,"SELECT COUNT(*) FROM Workshops WHERE EXTRACT(QUARTER FROM Date) = 3 AND IncomeLevel IN ('Low Income', 'Female');",0 What is the minimum 2010 population of Edgewater?,"CREATE TABLE table_249512_2 (population__2010_ INTEGER, place_name VARCHAR);","SELECT MIN(population__2010_) FROM table_249512_2 WHERE place_name = ""Edgewater"";","SELECT MIN(population__2010_) FROM table_249512_2 WHERE place_name = ""Edgewater"";",1 "What was the region of the release from May 27, 2009?","CREATE TABLE table_name_55 (region VARCHAR, date VARCHAR);","SELECT region FROM table_name_55 WHERE date = ""may 27, 2009"";","SELECT region FROM table_name_55 WHERE date = ""may 27, 2009"";",1 "Bronze smaller than 5, and a Silver larger than 0 is which nation?","CREATE TABLE table_name_66 (nation VARCHAR, bronze VARCHAR, silver VARCHAR);",SELECT nation FROM table_name_66 WHERE bronze < 5 AND silver > 0;,SELECT nation FROM table_name_66 WHERE bronze 5 AND silver > 0;,0 "Which Description has a Year of Issue of 1983, and a Weight of 3.50grams?","CREATE TABLE table_name_67 (description VARCHAR, year_of_issue VARCHAR, weight VARCHAR);","SELECT description FROM table_name_67 WHERE year_of_issue = 1983 AND weight = ""3.50grams"";","SELECT description FROM table_name_67 WHERE year_of_issue = 1983 AND weight = ""3.50grams"";",1 Name the most number of s eva,CREATE TABLE table_1558077_8 (number_of_s_eva INTEGER);,SELECT MAX(number_of_s_eva) FROM table_1558077_8;,SELECT MAX(number_of_s_eva) FROM table_1558077_8;,1 "Which volunteers have contributed the most hours to a specific program, and what is the total number of hours they have contributed?","CREATE TABLE VolunteerHours (VolunteerID INT, VolunteerName TEXT, Program TEXT, Hours DECIMAL(5,2)); ","SELECT VolunteerName, Program, SUM(Hours) AS TotalHours FROM VolunteerHours GROUP BY VolunteerName, Program ORDER BY TotalHours DESC;","SELECT VolunteerName, SUM(Hours) as TotalHours FROM VolunteerHours GROUP BY VolunteerName ORDER BY TotalHours DESC LIMIT 1;",0 What is the average age of community health workers by race and gender?,"CREATE TABLE CommunityHealthWorkersRG (WorkerID INT, Age INT, Race VARCHAR(255), Gender VARCHAR(255)); ","SELECT Race, Gender, AVG(Age) as AvgAge FROM CommunityHealthWorkersRG GROUP BY Race, Gender;","SELECT Race, Gender, AVG(Age) FROM CommunityHealthWorkersRG GROUP BY Race, Gender;",0 Who directed episode number 626 in the series?,"CREATE TABLE table_25800134_19 (director VARCHAR, series__number VARCHAR);",SELECT director FROM table_25800134_19 WHERE series__number = 626;,SELECT director FROM table_25800134_19 WHERE series__number = 626;,1 What is the Home team of the Kidderminster Harriers Away game?,"CREATE TABLE table_name_20 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_20 WHERE away_team = ""kidderminster harriers"";","SELECT home_team FROM table_name_20 WHERE away_team = ""kidderminster harriers"";",1 What is the average age of female patients diagnosed with Tuberculosis in Canada in 2020?,"CREATE TABLE Patients (ID INT, Gender VARCHAR(10), Age INT, Disease VARCHAR(20), Country VARCHAR(30), Diagnosis_Date DATE); ",SELECT AVG(Age) FROM Patients WHERE Gender = 'Female' AND Disease = 'Tuberculosis' AND Country = 'Canada' AND YEAR(Diagnosis_Date) = 2020;,SELECT AVG(Age) FROM Patients WHERE Gender = 'Female' AND Disease = 'Tuberculosis' AND Country = 'Canada' AND YEAR(Diagnosis_Date) = 2020;,1 Delete all records from the 'wells' table where the 'well_type' is 'deviated' and the 'region' is 'Gulf of Mexico',"CREATE TABLE wells (well_id INT, well_name VARCHAR(50), well_type VARCHAR(20), region VARCHAR(30)); ",DELETE FROM wells WHERE well_type = 'deviated' AND region = 'Gulf of Mexico';,DELETE FROM wells WHERE well_type = 'deviated' AND region = 'Gulf of Mexico';,1 Name the ICAO for when IATA is zyl,"CREATE TABLE table_name_22 (icao VARCHAR, iata VARCHAR);","SELECT icao FROM table_name_22 WHERE iata = ""zyl"";","SELECT icao FROM table_name_22 WHERE iata = ""zyl"";",1 "When Yale is listed as the regular season winner, what tournament venue is given?","CREATE TABLE table_28365816_2 (tournament_venue__city_ VARCHAR, regular_season_winner VARCHAR);","SELECT tournament_venue__city_ FROM table_28365816_2 WHERE regular_season_winner = ""Yale"";","SELECT tournament_venue__city_ FROM table_28365816_2 WHERE regular_season_winner = ""Yale"";",1 Which activities have the highest and lowest calories burned?,"CREATE TABLE activity_data (member_id INT, activity VARCHAR(20), calories INT); ","SELECT activity, MAX(calories) AS max_calories, MIN(calories) AS min_calories FROM activity_data GROUP BY activity;","SELECT activity, MAX(calories) as max_calories, MIN(calories) as min_calories FROM activity_data GROUP BY activity;",0 How many episodes have a series number of 35?,"CREATE TABLE table_13505192_3 (episode_title VARCHAR, series_number VARCHAR);",SELECT COUNT(episode_title) FROM table_13505192_3 WHERE series_number = 35;,SELECT COUNT(episode_title) FROM table_13505192_3 WHERE series_number = 35;,1 "What is the FCC info for the city of Tribune, Kansas?","CREATE TABLE table_name_74 (fcc_info VARCHAR, city_of_license VARCHAR);","SELECT fcc_info FROM table_name_74 WHERE city_of_license = ""tribune, kansas"";","SELECT fcc_info FROM table_name_74 WHERE city_of_license = ""tribune, kansas"";",1 What is the nationality of the player who played guard in 2006?,"CREATE TABLE table_name_85 (nationality VARCHAR, position_s_ VARCHAR, season_s_ VARCHAR);","SELECT nationality FROM table_name_85 WHERE position_s_ = ""guard"" AND season_s_ = ""2006"";","SELECT nationality FROM table_name_85 WHERE position_s_ = ""guard"" AND season_s_ = ""2006"";",1 Show me all the chemicals produced in factories located in Florida or Georgia?,"CREATE TABLE factories (factory_id INT, name TEXT, location TEXT); CREATE TABLE productions (factory_id INT, chemical TEXT); ","SELECT p.chemical FROM factories f JOIN productions p ON f.factory_id = p.factory_id WHERE f.location IN ('Florida', 'Georgia');","SELECT p.chemical FROM productions p JOIN factories f ON p.factory_id = f.factory_id WHERE f.location IN ('Florida', 'Georgia');",0 How many years did caroline lubrez win?,"CREATE TABLE table_name_19 (year INTEGER, winner VARCHAR);","SELECT SUM(year) FROM table_name_19 WHERE winner = ""caroline lubrez"";","SELECT SUM(year) FROM table_name_19 WHERE winner = ""caroline lubrez"";",1 Who was the young rider classification when Alessandro Petacchi won?,"CREATE TABLE table_28538368_2 (young_rider_classification VARCHAR, winner VARCHAR);","SELECT young_rider_classification FROM table_28538368_2 WHERE winner = ""Alessandro Petacchi"";","SELECT young_rider_classification FROM table_28538368_2 WHERE winner = ""Alessandro Petacchi"";",1 Which Faroese has an English of white?,"CREATE TABLE table_name_83 (faroese VARCHAR, english VARCHAR);","SELECT faroese FROM table_name_83 WHERE english = ""white"";","SELECT faroese FROM table_name_83 WHERE english = ""white"";",1 Insert a new soldier record into the 'soldiers' table,"CREATE TABLE soldiers (id INT PRIMARY KEY, name VARCHAR(50), rank VARCHAR(50), branch VARCHAR(50));","INSERT INTO soldiers (id, name, rank, branch) VALUES (102, 'Jane Doe', 'Lieutenant', 'Navy');","INSERT INTO soldiers (id, name, rank, branch) VALUES (1, 'Soldier', 'Retired', 'Retired'), (2, 'Retired', 'Retired', 'Retired'), (3, 'Retired', 'Retired', 'Retired'), (4, 'Retired', 'Retired', 'Retired'), (5, 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired', 'Retired'",0 What is the average price of silk garments sourced from India?,"CREATE TABLE garments (id INT, price DECIMAL(5,2), material VARCHAR(20), country VARCHAR(20)); -- additional rows removed for brevity;",SELECT AVG(price) FROM garments WHERE material = 'silk' AND country = 'India';,SELECT AVG(price) FROM garments WHERE material = 'Silk' AND country = 'India';,0 "What is the average age of all ships in the fleet_management table, and also the average age of all ships in the government_registry table?","CREATE TABLE fleet_management(ship_id INT, ship_name VARCHAR(50), age INT); CREATE TABLE government_registry(ship_id INT, ship_name VARCHAR(50), age INT);","SELECT AVG(fm.age) AS avg_fleet_age, AVG(gr.age) AS avg_gov_age FROM fleet_management fm, government_registry gr;","SELECT AVG(fm.age) as avg_age, AVG(gr.age) as avg_age FROM fleet_management fm INNER JOIN government_registry gr ON fm.ship_id = gr.ship_id;",0 What is the maximum ocean acidification level ever recorded in the Arctic Ocean?,"CREATE TABLE ocean_acidification_data (location VARCHAR(255), acidification_level FLOAT, measurement_date DATE);",SELECT MAX(acidification_level) FROM ocean_acidification_data WHERE location = 'Arctic Ocean';,SELECT MAX(acidification_level) FROM ocean_acidification_data WHERE location = 'Arctic Ocean';,1 Who is in November where February is willy rey?,"CREATE TABLE table_name_48 (november VARCHAR, february VARCHAR);","SELECT november FROM table_name_48 WHERE february = ""willy rey"";","SELECT november FROM table_name_48 WHERE february = ""willy rey"";",1 What candidates ran in the election with don fuqua?,"CREATE TABLE table_1341690_9 (candidates VARCHAR, incumbent VARCHAR);","SELECT candidates FROM table_1341690_9 WHERE incumbent = ""Don Fuqua"";","SELECT candidates FROM table_1341690_9 WHERE incumbent = ""Don Fuqua"";",1 What is the average number of employees for startups with a female founder in the biotech industry?,"CREATE TABLE company_data (id INT, company_id INT, num_employees INT); ",SELECT AVG(num_employees) FROM company_data INNER JOIN company ON company_data.company_id = company.id WHERE company.founder_gender = 'female' AND company.industry = 'biotech';,SELECT AVG(num_employees) FROM company_data WHERE company_id IN (SELECT id FROM companies WHERE gender = 'Female');,0 What is the total number of high severity vulnerabilities reported by external sources in the last month?,"CREATE TABLE vulnerabilities (id INT, severity TEXT, source TEXT, reported_date DATE); ","SELECT COUNT(*) FROM vulnerabilities WHERE severity = 'high' AND reported_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) AND source = 'external';","SELECT COUNT(*) FROM vulnerabilities WHERE severity = 'high' AND reported_date >= DATEADD(month, -1, GETDATE());",0 Name the kickoff for rheinstadion,"CREATE TABLE table_27690037_2 (kickoff VARCHAR, game_site VARCHAR);","SELECT kickoff FROM table_27690037_2 WHERE game_site = ""Rheinstadion"";","SELECT kickoff FROM table_27690037_2 WHERE game_site = ""Rheinstadion"";",1 What is the total number of posts with hashtag '#nature' for users in 'EU' region?,"CREATE TABLE hashtags (id INT, post_id INT, tag TEXT); ",SELECT COUNT(posts.id) FROM posts JOIN hashtags ON posts.id = hashtags.post_id JOIN users ON posts.user_id = users.id WHERE users.region = 'EU' AND hashtags.tag = '#nature';,SELECT COUNT(*) FROM hashtags WHERE tag = '#nature' AND region = 'EU';,0 "Which Result has a First elected of 1876, and a District of south carolina 3?","CREATE TABLE table_name_6 (result VARCHAR, first_elected VARCHAR, district VARCHAR);","SELECT result FROM table_name_6 WHERE first_elected = 1876 AND district = ""south carolina 3"";","SELECT result FROM table_name_6 WHERE first_elected = ""1876"" AND district = ""south carolina 3"";",0 "Find the total revenue for each dispensary type in Q2 2022, excluding medical sales.","CREATE TABLE dispensaries (id INT, name VARCHAR(255), type VARCHAR(255), total_revenue DECIMAL(10,2), order_date DATE); ","SELECT type, SUM(total_revenue) FROM dispensaries WHERE QUARTER(order_date) = 2 AND type != 'medical' GROUP BY type;","SELECT type, SUM(total_revenue) as total_revenue FROM dispensaries WHERE order_date BETWEEN '2022-04-01' AND '2022-06-30' AND type!= 'Medical' GROUP BY type;",0 "How many security incidents have been reported by each threat intelligence team in the last 6 months, according to our Incident Tracking database?","CREATE TABLE IncidentTracking (id INT, team VARCHAR(50), incident_count INT, timestamp DATETIME); ","SELECT team, SUM(incident_count) as total_incidents FROM IncidentTracking WHERE timestamp >= DATE_SUB(NOW(), INTERVAL 6 MONTH) GROUP BY team;","SELECT team, SUM(incident_count) as total_incidents FROM IncidentTracking WHERE timestamp >= DATEADD(month, -6, GETDATE()) GROUP BY team;",0 I want the date for nihat kahveci,"CREATE TABLE table_name_93 (date VARCHAR, turkey_scorers VARCHAR);","SELECT date FROM table_name_93 WHERE turkey_scorers = ""nihat kahveci"";","SELECT date FROM table_name_93 WHERE turkey_scorers = ""nihat kahveci"";",1 Find the total number of streams for artists from Africa in 2021.,"CREATE TABLE streams (id INT, artist VARCHAR(50), country VARCHAR(50), streams INT, year INT); ",SELECT SUM(streams) FROM streams WHERE country IN (SELECT DISTINCT country FROM artists WHERE continent = 'Africa') AND year = 2021;,SELECT SUM(streams) FROM streams WHERE artist LIKE '%Africa%' AND year = 2021;,0 Find the top 10 destinations with the highest average delivery time in Asia?,"CREATE TABLE Routes (id INT, origin_city VARCHAR(255), destination_city VARCHAR(255), distance INT, etd DATE, eta DATE);","SELECT destination_city, AVG(DATEDIFF(day, etd, eta)) AS avg_delay FROM Routes WHERE origin_city IN (SELECT city FROM Warehouse WHERE country = 'Asia') GROUP BY destination_city ORDER BY avg_delay DESC LIMIT 10;","SELECT origin_city, destination_city, AVG(distance) as avg_delivery_time FROM Routes WHERE destination_city LIKE '%Asia%' GROUP BY origin_city ORDER BY avg_delivery_time DESC LIMIT 10;",0 Delete the records of tennis players who have not won a match in the Grand Slam tournaments in the last 5 years.,"CREATE TABLE tennis_players (player_id INT, name VARCHAR(50), nationality VARCHAR(50), matches_played INT, matches_won INT, tournament VARCHAR(50), year INT); ",DELETE FROM tennis_players WHERE tournament LIKE '%Grand Slam%' AND year >= YEAR(CURRENT_DATE) - 5 AND matches_won = 0;,DELETE FROM tennis_players WHERE matches_won IS NULL AND tournament = 'Grand Slam' AND year BETWEEN 2019 AND 2021;,0 Update the revenue data for a specific restaurant,"CREATE TABLE revenue (restaurant_id INT, revenue_date DATE, total_revenue DECIMAL(10,2));",UPDATE revenue SET total_revenue = 5000.00 WHERE restaurant_id = 789 AND revenue_date = '2022-02-15';,UPDATE revenue SET total_revenue = total_revenue WHERE restaurant_id = 1;,0 How many disaster response teams are present in each country?,"CREATE TABLE DisasterTeams (Country VARCHAR(20), TeamID INT); ","SELECT Country, COUNT(TeamID) as NumTeams FROM DisasterTeams GROUP BY Country;","SELECT Country, COUNT(*) FROM DisasterTeams GROUP BY Country;",0 "What is the average donation amount for each program, excluding anonymous donations, in the year 2020?","CREATE TABLE donations (id INT, donation_amount DECIMAL(10,2), donation_date DATE, program_name VARCHAR(50)); CREATE TABLE programs (id INT, program_name VARCHAR(50)); ","SELECT p.program_name, AVG(d.donation_amount) AS avg_donation FROM donations d JOIN programs p ON d.program_name = p.program_name WHERE d.donor_name != 'Anonymous' AND YEAR(d.donation_date) = 2020 GROUP BY p.program_name;","SELECT p.program_name, AVG(d.donation_amount) as avg_donation FROM donations d JOIN programs p ON d.program_name = p.program_name WHERE d.donation_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY p.program_name;",0 Who publishes Wolverine?,"CREATE TABLE table_name_67 (publisher VARCHAR, character_s_ VARCHAR);","SELECT publisher FROM table_name_67 WHERE character_s_ = ""wolverine"";","SELECT publisher FROM table_name_67 WHERE character_s_ = ""wolverine"";",1 What is listed as the Place of birth for the Elector of Soffredo?,"CREATE TABLE table_name_31 (place_of_birth VARCHAR, elector VARCHAR);","SELECT place_of_birth FROM table_name_31 WHERE elector = ""soffredo"";","SELECT place_of_birth FROM table_name_31 WHERE elector = ""soffredo"";",1 What is the percentage of mobile subscribers who are using 5G network in each city in the state of California?,"CREATE TABLE subscriber_data (subscriber_id INT, network_type VARCHAR(10), city VARCHAR(20), state VARCHAR(20)); ","SELECT city, 100.0 * SUM(CASE WHEN network_type = '5G' THEN 1 ELSE 0 END) / COUNT(*) as pct_5g FROM subscriber_data WHERE state = 'CA' GROUP BY city;","SELECT city, 100.0 * COUNT(*) / (SELECT COUNT(*) FROM subscriber_data WHERE network_type = '5G' AND state = 'California' GROUP BY city) as percentage FROM subscriber_data WHERE network_type = '5G' AND state = 'California' GROUP BY city;",0 What was the Runner-up during the 2005-06 Season with Kiveton Park as the Winner?,"CREATE TABLE table_name_88 (runner_up VARCHAR, winner VARCHAR, season VARCHAR);","SELECT runner_up FROM table_name_88 WHERE winner = ""kiveton park"" AND season = ""2005-06"";","SELECT runner_up FROM table_name_88 WHERE winner = ""kiveton park"" AND season = ""2005-06"";",1 How many were in attendance during week 12?,"CREATE TABLE table_name_78 (attendance VARCHAR, week VARCHAR);",SELECT attendance FROM table_name_78 WHERE week = 12;,SELECT attendance FROM table_name_78 WHERE week = 12;,1 What are the top 5 vulnerabilities with the highest severity score in the last quarter?,"CREATE TABLE Vulnerabilities (vuln_id INT, vuln_severity INT, vuln_date DATE);","SELECT vuln_id, vuln_severity FROM Vulnerabilities WHERE vuln_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH) AND CURRENT_DATE GROUP BY vuln_id, vuln_severity ORDER BY vuln_severity DESC LIMIT 5;","SELECT vuln_id, vuln_severity FROM Vulnerabilities WHERE vuln_date >= DATEADD(quarter, -1, GETDATE()) GROUP BY vuln_id ORDER BY vuln_severity DESC LIMIT 5;",0 How many space missions were launched by each country in the space_missions table?,"CREATE TABLE space_missions (country VARCHAR(30), launch_year INT, mission_name VARCHAR(50)); ","SELECT country, COUNT(mission_name) OVER (PARTITION BY country) FROM space_missions;","SELECT country, COUNT(*) FROM space_missions GROUP BY country;",0 What is the venue for the event on 12 November 2005?,"CREATE TABLE table_name_13 (venue VARCHAR, date VARCHAR);","SELECT venue FROM table_name_13 WHERE date = ""12 november 2005"";","SELECT venue FROM table_name_13 WHERE date = ""12 november 2005"";",1 List all pollution control initiatives in the Indian Ocean.,"CREATE TABLE OceanCleanup (id INT, name TEXT, location TEXT, start_date DATE, end_date DATE); ",SELECT * FROM OceanCleanup WHERE location = 'Indian Ocean';,SELECT name FROM OceanCleanup WHERE location = 'Indian Ocean';,0 What are the project costs for each category in the Northeast region?,"CREATE TABLE Projects (region VARCHAR(20), category VARCHAR(20), project_cost INT); ","SELECT category, project_cost FROM Projects WHERE region = 'Northeast';","SELECT category, project_cost FROM Projects WHERE region = 'Northeast' GROUP BY category;",0 "What is the average watch time per user for each content category, segmented by gender?","CREATE TABLE user_content_views (view_id INT, user_id INT, content_id INT, view_date DATE, user_gender VARCHAR(10), watch_time INT); CREATE TABLE content (content_id INT, content_category VARCHAR(20));","SELECT content.content_category, user_gender, AVG(watch_time) as avg_watch_time FROM user_content_views JOIN content ON user_content_views.content_id = content.content_id GROUP BY content.content_category, user_gender;","SELECT content_category, user_gender, AVG(watch_time) as avg_watch_time FROM user_content_views JOIN content ON user_content_views.content_id = content.content_id GROUP BY content_category, user_gender;",0 What is the total number of bronze medals with a total of 4 medals and 1 gold medal?,"CREATE TABLE table_name_90 (bronze VARCHAR, total VARCHAR, gold VARCHAR);",SELECT COUNT(bronze) FROM table_name_90 WHERE total = 4 AND gold = 1;,SELECT COUNT(bronze) FROM table_name_90 WHERE total = 4 AND gold = 1;,1 How many seasons have 1 goals and more than 11 apps?,"CREATE TABLE table_name_89 (season VARCHAR, goals VARCHAR, apps VARCHAR);",SELECT COUNT(season) FROM table_name_89 WHERE goals = 1 AND apps > 11;,SELECT COUNT(season) FROM table_name_89 WHERE goals = 1 AND apps > 11;,1 "What is the total grant funding received by each department in the College of Arts and Humanities, broken down by year?","CREATE TABLE department (id INT, name VARCHAR(255), college VARCHAR(255)); CREATE TABLE grant (id INT, department_id INT, title VARCHAR(255), amount DECIMAL(10,2), year INT);","SELECT d.name, g.year, SUM(g.amount) as total_funding FROM grant g JOIN department d ON g.department_id = d.id WHERE d.college = 'College of Arts and Humanities' GROUP BY d.name, g.year;","SELECT d.name, g.year, SUM(g.amount) as total_grant_funding FROM department d JOIN grant g ON d.id = g.department_id WHERE d.college = 'College of Arts and Humanities' GROUP BY d.name, g.year;",0 What day is the grand prix de trois-rivières?,"CREATE TABLE table_name_30 (date VARCHAR, race_title VARCHAR);","SELECT date FROM table_name_30 WHERE race_title = ""grand prix de trois-rivières"";","SELECT date FROM table_name_30 WHERE race_title = ""grand prix de trois-rivières"";",1 What are the names and safety scores of aircraft manufactured by 'EagleTech' with safety scores greater than 85?,"CREATE TABLE Aircraft (id INT, name VARCHAR(50), manufacturer VARCHAR(50), safety_score INT); ","SELECT name, safety_score FROM Aircraft WHERE manufacturer = 'EagleTech' AND safety_score > 85;","SELECT name, safety_score FROM Aircraft WHERE manufacturer = 'EagleTech' AND safety_score > 85;",1 "How many unique volunteers signed up in Q4 2020 and Q1 2021, sorted by their signup date?","CREATE TABLE volunteers (id INT, name TEXT, signup_date DATE); ",SELECT COUNT(DISTINCT id) FROM volunteers WHERE signup_date BETWEEN '2020-10-01' AND '2021-01-31' ORDER BY signup_date;,"SELECT DATE_FORMAT(signup_date, '%Y-%m') as signup_date, COUNT(DISTINCT name) as unique_volunteers FROM volunteers WHERE signup_date BETWEEN '2020-01-01' AND '2021-06-30' GROUP BY signup_date ORDER BY signup_date;",0 What is week 3 when week 6 is 26.05?,"CREATE TABLE table_name_78 (week_3 VARCHAR, week_6 VARCHAR);","SELECT week_3 FROM table_name_78 WHERE week_6 = ""26.05"";","SELECT week_3 FROM table_name_78 WHERE week_6 = ""26.05"";",1 How many different species are there in 'Community Education Program 1'?,"CREATE TABLE Programs (id INT, name VARCHAR(30)); CREATE TABLE Animals_In_Programs (program_id INT, animal_id INT, species VARCHAR(20)); ",SELECT COUNT(DISTINCT species) FROM Animals_In_Programs WHERE program_id = 1;,SELECT COUNT(DISTINCT species) FROM Animals_In_Programs WHERE program_id = 1;,1 What is the average concert ticket price for Hip-Hop artists?,"CREATE TABLE Concerts (ConcertID INT, ArtistID INT, Venue VARCHAR(100), Date DATE);",SELECT AVG(T.Price) AS AvgPrice FROM Artists A INNER JOIN Concerts C ON A.ArtistID = C.ArtistID INNER JOIN Tickets T ON C.ConcertID = T.ConcertID WHERE A.Genre = 'Hip-Hop';,SELECT AVG(Price) FROM Concerts WHERE ArtistID IN (SELECT ArtistID FROM Artists WHERE Artists.Name = 'Hip-Hop');,0 "What is the Record with a Date that is may 20, 1961?","CREATE TABLE table_name_73 (record VARCHAR, date VARCHAR);","SELECT record FROM table_name_73 WHERE date = ""may 20, 1961"";","SELECT record FROM table_name_73 WHERE date = ""may 20, 1961"";",1 How many products were not included in any order?,CREATE TABLE products (product_id VARCHAR); CREATE TABLE Order_items (product_id VARCHAR);,SELECT COUNT(*) FROM products WHERE NOT product_id IN (SELECT product_id FROM Order_items);,SELECT COUNT(*) FROM products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id WHERE T2.product_id IS NULL;,0 "Which Losses have a South West DFL of branxholme-wallacedale, and less than 2 Byes?","CREATE TABLE table_name_21 (losses INTEGER, south_west_dfl VARCHAR, byes VARCHAR);","SELECT AVG(losses) FROM table_name_21 WHERE south_west_dfl = ""branxholme-wallacedale"" AND byes < 2;","SELECT SUM(losses) FROM table_name_21 WHERE south_west_dfl = ""branxholme-wallacedale"" AND byes 2;",0 What artist was released in 2005?,"CREATE TABLE table_name_71 (artist VARCHAR, year VARCHAR);",SELECT artist FROM table_name_71 WHERE year = 2005;,SELECT artist FROM table_name_71 WHERE year = 2005;,1 Find all suppliers from India with an order count greater than 10.,"CREATE TABLE suppliers (id INT, name VARCHAR(255), country VARCHAR(255)); CREATE TABLE orders (id INT, supplier_id INT, quantity INT); ",SELECT suppliers.name FROM suppliers JOIN orders ON suppliers.id = orders.supplier_id GROUP BY suppliers.name HAVING COUNT(orders.id) > 10 AND suppliers.country = 'India';,SELECT suppliers.name FROM suppliers INNER JOIN orders ON suppliers.id = orders.supplier_id WHERE suppliers.country = 'India' AND orders.quantity > 10;,0 What is the 'maintenance_cost' for 'Plant E' in 'water_treatment_plants'?,"CREATE TABLE water_treatment_plants (id INT, plant_name VARCHAR(50), maintenance_cost INT); ",SELECT maintenance_cost FROM water_treatment_plants WHERE plant_name = 'Plant E';,SELECT maintenance_cost FROM water_treatment_plants WHERE plant_name = 'Plant E';,1 Add new IoT sensor records for crop type 'Soybean'.,"CREATE TABLE sensor_data (id INT, crop_type VARCHAR(255), temperature INT, humidity INT, measurement_date DATE);","INSERT INTO sensor_data (id, crop_type, temperature, humidity, measurement_date) VALUES (7, 'Soybean', 25, 60, '2021-06-03'); INSERT INTO sensor_data (id, crop_type, temperature, humidity, measurement_date) VALUES (8, 'Soybean', 27, 62, '2021-06-04');","INSERT INTO sensor_data (id, crop_type, temperature, humidity, measurement_date) VALUES (1, 'Soybean', '2022-01-01', '2022-12-31');",0 How many autonomous vehicles have been sold in each state in the autonomousvehiclesales schema?,"CREATE TABLE States (id INT, name VARCHAR(50)); CREATE TABLE AutonomousVehiclesSales (id INT, state_id INT, vehicle_id INT, quantity INT, PRIMARY KEY (id), FOREIGN KEY (state_id) REFERENCES States(id)); CREATE TABLE AutonomousVehicles (id INT, make VARCHAR(50), model VARCHAR(50), PRIMARY KEY (id)); CREATE TABLE AutonomousVehicleSales (sales_id INT, vehicle_id INT, PRIMARY KEY (sales_id), FOREIGN KEY (sales_id) REFERENCES AutonomousVehiclesSales(id), FOREIGN KEY (vehicle_id) REFERENCES AutonomousVehicles(id));","SELECT s.name, SUM(avs.quantity) FROM AutonomousVehiclesSales avs JOIN States s ON avs.state_id = s.id JOIN AutonomousVehicleSales av ON avs.sales_id = av.id GROUP BY s.name;","SELECT s.name, SUM(avs.quantity) FROM States s JOIN AutonomousVehiclessales avs ON s.id = avs.state_id JOIN AutonomousVehicles avs ON avs.vehicle_id = avs.vehicle_id GROUP BY s.name;",0 Find the average rating and total reviews for each game in the 'Games' table,"CREATE TABLE Games (game_id INT, game_name VARCHAR(100), rating DECIMAL(3,2), reviews INT); ","SELECT game_name, AVG(rating) AS avg_rating, SUM(reviews) AS total_reviews FROM Games GROUP BY game_name;","SELECT game_name, AVG(rating) as avg_rating, SUM(reviews) as total_reviews FROM Games GROUP BY game_name;",0 What are the names of unions that have a higher number of female members than male members in California?,"CREATE TABLE union_gender_distribution (id INT, union_name TEXT, state TEXT, total_male INT, total_female INT); ",SELECT union_name FROM union_gender_distribution WHERE total_female > total_male AND state = 'California';,SELECT union_name FROM union_gender_distribution WHERE state = 'California' AND total_female > total_female;,0 What was the latest week with a result of l 14-3?,"CREATE TABLE table_name_83 (week INTEGER, result VARCHAR);","SELECT MAX(week) FROM table_name_83 WHERE result = ""l 14-3"";","SELECT MAX(week) FROM table_name_83 WHERE result = ""l 14-3"";",1 How many users are there in each gender category?,"CREATE TABLE users (id INT, age INT, gender TEXT); ","SELECT gender, COUNT(*) as count FROM users GROUP BY gender;","SELECT gender, COUNT(*) FROM users GROUP BY gender;",0 "What is Name, when Overall is greater than 132, and when Round is 12?","CREATE TABLE table_name_59 (name VARCHAR, overall VARCHAR, round VARCHAR);",SELECT name FROM table_name_59 WHERE overall > 132 AND round = 12;,SELECT name FROM table_name_59 WHERE overall > 132 AND round = 12;,1 When someone was first elected in 1898 what was the result?,"CREATE TABLE table_name_53 (result VARCHAR, first_elected VARCHAR);","SELECT result FROM table_name_53 WHERE first_elected = ""1898"";","SELECT result FROM table_name_53 WHERE first_elected = ""1898"";",1 What is the total water consumption for the 'Industrial' district in the month of September?,"CREATE TABLE WaterConsumption (id INT, plant_id INT, consumption_date DATE, consumption INT, district VARCHAR(50)); ",SELECT SUM(consumption) FROM WaterConsumption WHERE district = 'Industrial' AND MONTH(consumption_date) = 9;,SELECT SUM(consumption) FROM WaterConsumption WHERE district = 'Industrial' AND consumption_date BETWEEN '2022-09-01' AND '2022-09-30';,0 What is the total cost of all NASA's Mars missions?,"CREATE TABLE Missions (MissionID INT, Name VARCHAR(50), Agency VARCHAR(50), Cost INT); ",SELECT SUM(Cost) FROM Missions WHERE Agency = 'NASA' AND Name LIKE '%Mars%';,SELECT SUM(Cost) FROM Missions WHERE Agency = 'NASA' AND Name = 'Mars';,0 What percentage of digital divide initiatives in North America focus on infrastructure?,"CREATE TABLE digital_divide_initiatives (initiative_id INT, region VARCHAR(20), type VARCHAR(20), budget DECIMAL(10,2)); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM digital_divide_initiatives WHERE region = 'North America')) as percentage FROM digital_divide_initiatives WHERE region = 'North America' AND type = 'infrastructure';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM digital_divide_initiatives WHERE region = 'North America')) AS percentage FROM digital_divide_initiatives WHERE region = 'North America' AND type = 'Infrastructure';,0 Which Returned On has a Year of 2011?,"CREATE TABLE table_name_87 (returned_on VARCHAR, year VARCHAR);",SELECT returned_on FROM table_name_87 WHERE year = 2011;,SELECT returned_on FROM table_name_87 WHERE year = 2011;,1 Update the language_status of endangered languages in the Languages table based on the data in the LanguageStatus table.,"CREATE TABLE Languages (language_id INT, language_name VARCHAR(20), language_family VARCHAR(20), language_status VARCHAR(10)); CREATE TABLE LanguageStatus (language_id INT, status_name VARCHAR(20), status_date DATE);",UPDATE Languages l SET l.language_status = (SELECT status_name FROM LanguageStatus WHERE l.language_id = LanguageStatus.language_id AND status_date = (SELECT MAX(status_date) FROM LanguageStatus WHERE language_id = LanguageStatus.language_id)) WHERE EXISTS (SELECT 1 FROM LanguageStatus WHERE Languages.language_id = LanguageStatus.language_id);,UPDATE Languages SET language_status = 'Endangered' WHERE language_id IN (SELECT language_id FROM LanguageStatus WHERE status_name = 'Endangered');,0 What's the average content rating for TV shows in Canada?,"CREATE TABLE tv_shows (id INT, title VARCHAR(255), release_year INT, country VARCHAR(100), content_rating DECIMAL(10,2));",SELECT AVG(content_rating) FROM tv_shows WHERE country = 'Canada';,SELECT AVG(content_rating) FROM tv_shows WHERE country = 'Canada';,1 Find the name and age of the youngest individual in the 'ancient_burials' table.,"CREATE TABLE ancient_burials (id INT, name VARCHAR(50), age INT, gender VARCHAR(10), grave_contents VARCHAR(255)); ","SELECT name, age FROM ancient_burials WHERE age = (SELECT MIN(age) FROM ancient_burials);","SELECT name, age FROM ancient_burials ORDER BY age DESC LIMIT 1;",0 Which cultivators in Washington had the lowest production cost per pound for Flower in Q3 2021?,"CREATE TABLE production (date DATE, cultivator VARCHAR(255), product VARCHAR(255), cost DECIMAL(10,2), weight DECIMAL(10,2)); CREATE TABLE cultivators (name VARCHAR(255), state VARCHAR(2)); ","SELECT cultivator, AVG(cost / weight) as avg_cost_per_pound FROM production JOIN cultivators ON production.cultivator = cultivators.name WHERE EXTRACT(QUARTER FROM date) = 3 AND EXTRACT(YEAR FROM date) = 2021 AND product = 'Flower' AND state = 'WA' GROUP BY cultivator ORDER BY avg_cost_per_pound ASC LIMIT 1;","SELECT cultivator, MIN(cost/weight) FROM production WHERE product = 'Flower' AND state = 'Washington' AND date BETWEEN '2021-04-01' AND '2021-06-30' GROUP BY cultivator;",0 How many ends won catagories are listed when there are 8 stolen ends? ,"CREATE TABLE table_25714995_2 (Ends VARCHAR, stolen_ends VARCHAR);",SELECT COUNT(Ends) AS won FROM table_25714995_2 WHERE stolen_ends = 8;,SELECT COUNT(Ends) FROM table_25714995_2 WHERE stolen_ends = 8;,0 How many times did the Lancaster City team play?,"CREATE TABLE table_17366952_1 (played VARCHAR, team VARCHAR);","SELECT COUNT(played) FROM table_17366952_1 WHERE team = ""Lancaster City"";","SELECT played FROM table_17366952_1 WHERE team = ""Lancaster City"";",0 "What was the season record when the location attendance was Air Canada Centre 19,800?","CREATE TABLE table_name_26 (record VARCHAR, location_attendance VARCHAR);","SELECT record FROM table_name_26 WHERE location_attendance = ""air canada centre 19,800"";","SELECT record FROM table_name_26 WHERE location_attendance = ""air canada centre 19,800"";",1 Find the number of tickets sold per concert by the artist 'Taylor Swift',"CREATE TABLE concerts (id INT, artist_name VARCHAR(255), tickets_sold INT); ","SELECT artist_name, SUM(tickets_sold) as total_tickets_sold FROM concerts WHERE artist_name = 'Taylor Swift' GROUP BY artist_name;","SELECT artist_name, SUM(tickets_sold) as total_tickets_sold FROM concerts WHERE artist_name = 'Taylor Swift' GROUP BY artist_name;",1 "What is the maximum drought impact for cities in Colorado on January 25, 2022?","CREATE TABLE DroughtImpactCO (Id INT PRIMARY KEY, City VARCHAR(255), Impact FLOAT, Date DATE); ","SELECT City, MAX(Impact) FROM DroughtImpactCO WHERE Date = '2022-01-25' GROUP BY City;",SELECT MAX(Impact) FROM DroughtImpactCO WHERE City = 'Colorado' AND Date BETWEEN '2022-01-25' AND '2022-01-31';,0 Count the number of hotels without a virtual tour in Australia,"CREATE TABLE hotels (id INT, name TEXT, country TEXT, virtual_tour BOOLEAN); ",SELECT COUNT(*) FROM hotels WHERE country = 'Australia' AND virtual_tour = false;,SELECT COUNT(*) FROM hotels WHERE country = 'Australia' AND virtual_tour = false;,1 What is the total number of virtual tours taken by users in each age group?,"CREATE TABLE virtual_tour_users (user_id INT, tour_id INT, age_group TEXT); ","SELECT age_group, COUNT(DISTINCT tour_id) as total_tours FROM virtual_tour_users GROUP BY age_group;","SELECT age_group, COUNT(*) FROM virtual_tour_users GROUP BY age_group;",0 What is the most common treatment type for patients with 'PTSD' in 'clinic_TX'?,"CREATE TABLE clinic_TX (patient_id INT, name VARCHAR(50), primary_diagnosis VARCHAR(50), treatment_type VARCHAR(50)); ","SELECT treatment_type, COUNT(*) as count FROM clinic_TX WHERE primary_diagnosis = 'PTSD' GROUP BY treatment_type ORDER BY count DESC LIMIT 1;","SELECT treatment_type, COUNT(*) FROM clinic_TX WHERE primary_diagnosis = 'PTSD' GROUP BY treatment_type ORDER BY COUNT(*) DESC LIMIT 1;",0 "List the program categories with no donations in the last 6 months, including those that have never received donations.","CREATE TABLE program_categories (program_category VARCHAR(20));CREATE TABLE program_donations_time (program_category VARCHAR(20), donation_date DATE);","SELECT program_category FROM program_categories WHERE program_category NOT IN (SELECT program_category FROM program_donations_time WHERE donation_date IS NOT NULL AND donation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH));","SELECT program_categories.program_category FROM program_categories INNER JOIN program_donations_time ON program_categories.program_category = program_donations_time.program_category WHERE program_donations_time.donation_date DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) AND program_donations_time.program_category IS NULL;",0 What is the wildlife population trend for each species between 2019 and 2021?,"CREATE TABLE wildlife (species VARCHAR(255), population INT, year INT); ","SELECT species, (population_2021 - population_2019) as population_change FROM (SELECT species, MAX(CASE WHEN year = 2021 THEN population END) as population_2021, MAX(CASE WHEN year = 2019 THEN population END) as population_2019 FROM wildlife GROUP BY species) as population_changes;","SELECT species, SUM(population) as total_population FROM wildlife WHERE year BETWEEN 2019 AND 2021 GROUP BY species;",0 How many semifinalists where from peru?,"CREATE TABLE table_30018460_1 (semifinalists VARCHAR, country_territory VARCHAR);","SELECT semifinalists FROM table_30018460_1 WHERE country_territory = ""Peru"";","SELECT COUNT(semifinalists) FROM table_30018460_1 WHERE country_territory = ""Peru"";",0 Minimum number of green buildings in each country?,"CREATE TABLE green_buildings (id INT, name TEXT, country TEXT); CREATE TABLE countries (id INT, name TEXT);","SELECT countries.name, MIN(green_buildings.id) FROM countries LEFT JOIN green_buildings ON countries.id = green_buildings.country GROUP BY countries.name;","SELECT c.name, MIN(gb.id) FROM green_buildings gb JOIN countries c ON gb.country = c.name GROUP BY c.name;",0 What are the losses where the award is Mike Miller (Smoy)?,"CREATE TABLE table_name_34 (losses VARCHAR, awards VARCHAR);","SELECT losses FROM table_name_34 WHERE awards = ""mike miller (smoy)"";","SELECT losses FROM table_name_34 WHERE awards = ""mike miller (smoy)"";",1 How many strokes off par was the player who scored 157?,"CREATE TABLE table_name_17 (to_par VARCHAR, total VARCHAR);",SELECT COUNT(to_par) FROM table_name_17 WHERE total = 157;,SELECT to_par FROM table_name_17 WHERE total = 157;,0 Who are the top 5 users by number of policy violations?,"CREATE TABLE policy_violations (id INT, user_id INT, violation_date DATE); CREATE TABLE users (id INT, name VARCHAR(50)); ","SELECT users.name, COUNT(policy_violations.id) as violation_count FROM policy_violations INNER JOIN users ON policy_violations.user_id = users.id GROUP BY users.name ORDER BY violation_count DESC LIMIT 5;","SELECT u.name, COUNT(pv.id) as violation_count FROM policy_violations pv JOIN users u ON pv.user_id = u.id GROUP BY u.name ORDER BY violation_count DESC LIMIT 5;",0 "What is High Rebounds, when Date is ""March 12""?","CREATE TABLE table_name_8 (high_rebounds VARCHAR, date VARCHAR);","SELECT high_rebounds FROM table_name_8 WHERE date = ""march 12"";","SELECT high_rebounds FROM table_name_8 WHERE date = ""march 12"";",1 Get the number of rugby union games played in 2023,"CREATE TABLE rugby_union_games (game_date DATE, home_team VARCHAR(255), away_team VARCHAR(255)); ",SELECT COUNT(*) FROM rugby_union_games WHERE YEAR(game_date) = 2023;,SELECT COUNT(*) FROM rugby_union_games WHERE game_date BETWEEN '2023-01-01' AND '2023-12-31';,0 "Studio host of john ryder, and a Year of 2007-08 had what play by play?","CREATE TABLE table_name_38 (play_by_play VARCHAR, studio_host VARCHAR, year VARCHAR);","SELECT play_by_play FROM table_name_38 WHERE studio_host = ""john ryder"" AND year = ""2007-08"";","SELECT play_by_play FROM table_name_38 WHERE studio_host = ""john ryder"" AND year = ""2007-08"";",1 What is the total number of green building projects in New York in 2020?,"CREATE TABLE project_type (project_id INT, state VARCHAR(2), year INT, type VARCHAR(20)); ",SELECT COUNT(*) FROM project_type WHERE state = 'NY' AND year = 2020 AND type = 'Green';,SELECT COUNT(*) FROM project_type WHERE state = 'New York' AND year = 2020 AND type = 'Green';,0 Which College/Junior/Club team has a Round of 6?,"CREATE TABLE table_name_13 (college_junior_club_team VARCHAR, round VARCHAR);",SELECT college_junior_club_team FROM table_name_13 WHERE round = 6;,SELECT college_junior_club_team FROM table_name_13 WHERE round = 6;,1 "For each stadium, find the number of ticket sales in January and February of 2023, ranked from highest to lowest.","CREATE TABLE Stadiums (StadiumID INT, Stadium VARCHAR(50), City VARCHAR(50)); CREATE TABLE TicketSales (TicketID INT, StadiumID INT, SaleDate DATE); ","SELECT Stadium, COUNT(*) AS SaleCount FROM TicketSales JOIN Stadiums ON TicketSales.StadiumID = Stadiums.StadiumID WHERE SaleDate BETWEEN '2023-01-01' AND '2023-02-28' GROUP BY Stadium ORDER BY SaleCount DESC;","SELECT Stadiums.Stadium, COUNT(TicketSales.TicketID) as TotalSales FROM Stadiums INNER JOIN TicketSales ON Stadiums.StadiumID = TicketSales.StadiumID WHERE SaleDate BETWEEN '2023-01-01' AND '2023-02-31' GROUP BY Stadiums.Stadium ORDER BY TotalSales DESC;",0 "What is the name of the river found in Madhya Pradesh, India?","CREATE TABLE table_name_31 (name_of_the_river VARCHAR, name_of_the_state_where_found_in_india VARCHAR);","SELECT name_of_the_river FROM table_name_31 WHERE name_of_the_state_where_found_in_india = ""madhya pradesh"";","SELECT name_of_the_river FROM table_name_31 WHERE name_of_the_state_where_found_in_india = ""madhya pradesh"";",1 Alter the 'waste_generation_metrics' table to add a new column 'region',"CREATE TABLE waste_generation_metrics ( country VARCHAR(50), year INT, generation_metric INT);",ALTER TABLE waste_generation_metrics ADD COLUMN region VARCHAR(50);,ALTER TABLE waste_generation_metrics ADD COLUMN region;,0 Where was the game played when the Buffalo Bills had a record of 8-8?,"CREATE TABLE table_name_80 (location VARCHAR, record VARCHAR);","SELECT location FROM table_name_80 WHERE record = ""8-8"";","SELECT location FROM table_name_80 WHERE record = ""8-8"";",1 What is the number of AI safety incidents recorded for each country in the 'safety_incidents' table?,"CREATE TABLE safety_incidents (country VARCHAR(20), incident_type VARCHAR(20), incident_count INT); ","SELECT country, incident_type, SUM(incident_count) as total_incidents FROM safety_incidents GROUP BY country;","SELECT country, SUM(incident_count) as total_incidents FROM safety_incidents GROUP BY country;",0 What country parred E and scored 71-73-70-74=288?,"CREATE TABLE table_name_19 (country VARCHAR, to_par VARCHAR, score VARCHAR);","SELECT country FROM table_name_19 WHERE to_par = ""e"" AND score = 71 - 73 - 70 - 74 = 288;","SELECT country FROM table_name_19 WHERE to_par = ""e"" AND score = 71 - 73 - 70 - 74 = 288;",1 Which Date has a Set 1 of 21–25?,"CREATE TABLE table_name_31 (date VARCHAR, set_1 VARCHAR);","SELECT date FROM table_name_31 WHERE set_1 = ""21–25"";","SELECT date FROM table_name_31 WHERE set_1 = ""21–25"";",1 What is the minimum ocean temperature recorded for any ocean?,"CREATE TABLE ocean_temperatures (id INT, name TEXT, min_temp FLOAT); ",SELECT MIN(min_temp) FROM ocean_temperatures;,SELECT MIN(min_temp) FROM ocean_temperatures;,1 Find the last name of female (sex is F) students in the descending order of age.,"CREATE TABLE STUDENT (LName VARCHAR, Sex VARCHAR, Age VARCHAR);","SELECT LName FROM STUDENT WHERE Sex = ""F"" ORDER BY Age DESC;",SELECT LName FROM STUDENT WHERE Sex = 'F' ORDER BY Age DESC;,0 "Identify the states with the lowest wastewater treatment plant construction rates between 2005 and 2010, including only states with at least 3 plants constructed.","CREATE TABLE wastewater_plants(state VARCHAR(20), year INT, num_plants INT); ","SELECT state, AVG(num_plants) AS avg_construction_rate FROM wastewater_plants WHERE year BETWEEN 2005 AND 2007 AND num_plants >= 3 GROUP BY state ORDER BY avg_construction_rate LIMIT 2;","SELECT state, num_plants FROM wastewater_plants WHERE year BETWEEN 2005 AND 2010 ORDER BY num_plants DESC LIMIT 3;",0 List all employees who joined the company in the year 2020.,"CREATE TABLE Employees (EmployeeID INT, Name VARCHAR(50), JoinDate DATE); ",SELECT * FROM Employees WHERE YEAR(JoinDate) = 2020;,SELECT * FROM Employees WHERE YEAR(JoinDate) = 2020;,1 What was the average CO2 emission for jean production by country in 2020?,"CREATE TABLE co2_emission (garment_type VARCHAR(20), country VARCHAR(20), year INT, co2_emission FLOAT); ",SELECT AVG(co2_emission) FROM co2_emission WHERE garment_type = 'jeans' AND year = 2020;,"SELECT country, AVG(co2_emission) FROM co2_emission WHERE garment_type = 'jean' AND year = 2020 GROUP BY country;",0 "What is the average donation amount for donors from Nigeria, grouped by cause?","CREATE TABLE donors (donor_id INT, donor_name TEXT, donor_country TEXT); CREATE TABLE donations (donation_id INT, donor_id INT, cause TEXT, amount DECIMAL(10,2)); CREATE TABLE causes (cause_id INT, cause TEXT); ","SELECT d.donor_country, c.cause, AVG(donations.amount) as avg_donation FROM donors d JOIN donations ON d.donor_id = donations.donor_id JOIN causes c ON donations.cause = c.cause WHERE d.donor_country = 'Nigeria' GROUP BY d.donor_country, c.cause;","SELECT c.cause, AVG(d.amount) as avg_donation FROM donors d JOIN donations d ON d.donor_id = d.donor_id JOIN causes c ON d.cause = c.cause WHERE d.donor_country = 'Nigeria' GROUP BY c.cause;",0 Which Money (£) has a Player of jodie mudd?,"CREATE TABLE table_name_72 (money___ VARCHAR, player VARCHAR);","SELECT COUNT(money___) AS £__ FROM table_name_72 WHERE player = ""jodie mudd"";","SELECT money___ FROM table_name_72 WHERE player = ""jodie mudd"";",0 How many games does leandro love have?,"CREATE TABLE table_name_96 (games VARCHAR, name VARCHAR);","SELECT games FROM table_name_96 WHERE name = ""leandro love"";","SELECT games FROM table_name_96 WHERE name = ""leandro love"";",1 "What's the population that has a median family income of $50,553?","CREATE TABLE table_name_1 (population VARCHAR, median_family_income VARCHAR);","SELECT COUNT(population) FROM table_name_1 WHERE median_family_income = ""$50,553"";","SELECT population FROM table_name_1 WHERE median_family_income = ""$50,553"";",0 Show me the departure date and arrival date for all flights from Los Angeles to Honolulu.,"CREATE TABLE Flight (departure_date VARCHAR, arrival_date VARCHAR, origin VARCHAR, destination VARCHAR);","SELECT departure_date, arrival_date FROM Flight WHERE origin = ""Los Angeles"" AND destination = ""Honolulu"";","SELECT departure_date, arrival_date FROM Flight WHERE origin = ""Los Angeles"" AND destination = ""Honolulu"";",1 What is the snatch when Marcin Dołęga ( POL ) was 430kg?,"CREATE TABLE table_name_1 (snatch VARCHAR, marcin_dołęga___pol__ VARCHAR);","SELECT snatch FROM table_name_1 WHERE marcin_dołęga___pol__ = ""430kg"";","SELECT snatch FROM table_name_1 WHERE marcin_doga___pol__ = ""430kg"";",0 Who is the winning driver of the race on 2 June with a.z.k./roc-compétition a.z.k./roc-compétition as the winning team?,"CREATE TABLE table_name_15 (winning_driver VARCHAR, winning_team VARCHAR, date VARCHAR);","SELECT winning_driver FROM table_name_15 WHERE winning_team = ""a.z.k./roc-compétition a.z.k./roc-compétition"" AND date = ""2 june"";","SELECT winning_driver FROM table_name_15 WHERE winning_team = ""a.z.k./roc-compétition a.z.k./roc-compétition"" AND date = ""2 june"";",1 What was the place and date that the Apartments area was damaged?,"CREATE TABLE table_23014685_1 (place_ VARCHAR, _date VARCHAR, area_damaged VARCHAR);","SELECT place_ & _date FROM table_23014685_1 WHERE area_damaged = ""Apartments area"";","SELECT place_, _date FROM table_23014685_1 WHERE area_damaged = ""Apartments"";",0 What is the total revenue generated by 'hotels' in 'South America' that offer 'pool' facilities?,"CREATE TABLE hotels(id INT, name TEXT, country TEXT, rating FLOAT, pool BOOLEAN, revenue FLOAT);",SELECT SUM(revenue) FROM hotels WHERE country = 'South America' AND pool = TRUE;,SELECT SUM(revenue) FROM hotels WHERE country = 'South America' AND pool = TRUE;,1 "What is Duration, when Test Flight is Taxi Test #2?","CREATE TABLE table_name_20 (duration VARCHAR, test_flight VARCHAR);","SELECT duration FROM table_name_20 WHERE test_flight = ""taxi test #2"";","SELECT duration FROM table_name_20 WHERE test_flight = ""taxi test #2"";",1 What is the total number of Mars rovers and orbiters launched by NASA?,"CREATE TABLE mars_rovers (id INT, name VARCHAR(50), type VARCHAR(50), agency VARCHAR(50), launch_date DATE); ",SELECT COUNT(*) FROM mars_rovers WHERE agency = 'NASA' AND (type = 'Rover' OR type = 'Orbiter');,"SELECT COUNT(*) FROM mars_rovers WHERE agency = 'NASA' AND type IN ('Rover', 'Orbiter');",0 "What year was The Horn Blows at Midnight, directed by Raoul Walsh?","CREATE TABLE table_name_96 (year INTEGER, director VARCHAR, title VARCHAR);","SELECT AVG(year) FROM table_name_96 WHERE director = ""raoul walsh"" AND title = ""the horn blows at midnight"";","SELECT AVG(year) FROM table_name_96 WHERE director = ""raoul walsh"" AND title = ""the horn blows at midnight"";",1 what is the least bronze when the rank is 3 and silver is less than 2?,"CREATE TABLE table_name_3 (bronze INTEGER, rank VARCHAR, silver VARCHAR);","SELECT MIN(bronze) FROM table_name_3 WHERE rank = ""3"" AND silver < 2;",SELECT MIN(bronze) FROM table_name_3 WHERE rank = 3 AND silver 2;,0 How many hotels are there in each category?,"CREATE TABLE hotels (hotel_id INT, name TEXT, category TEXT); ","SELECT category, COUNT(*) FROM hotels GROUP BY category;","SELECT category, COUNT(*) FROM hotels GROUP BY category;",1 How many years have agroecology systems been implemented in each country?,"CREATE TABLE agroecology_countries (country VARCHAR(255), years_implemented INT); CREATE VIEW agroecology_systems_view AS SELECT * FROM agroecology_countries WHERE years_implemented > 5;",SELECT country FROM agroecology_systems_view,"SELECT country, SUM(years_implemented) FROM agroecology_systems_view GROUP BY country;",0 Who was the away team at the game at Victoria Park?,"CREATE TABLE table_name_65 (away_team VARCHAR, venue VARCHAR);","SELECT away_team FROM table_name_65 WHERE venue = ""victoria park"";","SELECT away_team FROM table_name_65 WHERE venue = ""victoria park"";",1 Name the date for loss of ruffin (3-5),"CREATE TABLE table_name_44 (date VARCHAR, loss VARCHAR);","SELECT date FROM table_name_44 WHERE loss = ""ruffin (3-5)"";","SELECT date FROM table_name_44 WHERE loss = ""ruffin (3-5)"";",1 What is the percentage of graduate students in the Computer Science program who have published in a top-tier academic journal?,"CREATE TABLE student_publications (id INT, student_id INT, journal_tier VARCHAR(255), publication_year INT); CREATE TABLE students (id INT, program VARCHAR(255)); ","SELECT program, 100.0 * SUM(CASE WHEN journal_tier = 'top-tier' THEN 1 ELSE 0 END) / COUNT(*) as top_tier_percentage FROM student_publications sp JOIN students s ON sp.student_id = s.id WHERE s.program = 'Computer Science' GROUP BY program;",SELECT (COUNT(*) FILTER (WHERE journal_tier = 'Top')) * 100.0 / COUNT(*) FROM student_publications JOIN students ON student_publications.student_id = students.id WHERE students.program = 'Computer Science';,0 Delete the broadband subscriber record with id 2,"CREATE TABLE broadband_subscribers (id INT, region VARCHAR(20), subscription_date DATE); ",DELETE FROM broadband_subscribers WHERE id = 2;,DELETE FROM broadband_subscribers WHERE id = 2;,1 Which Run has an Opponent of Canterbury?,"CREATE TABLE table_name_52 (runs VARCHAR, opponent VARCHAR);","SELECT runs FROM table_name_52 WHERE opponent = ""canterbury"";","SELECT runs FROM table_name_52 WHERE opponent = ""christchurch"";",0 What is the average number of rounds for winner Rafael Cavalcante?,"CREATE TABLE table_name_37 (round INTEGER, winner VARCHAR);","SELECT AVG(round) FROM table_name_37 WHERE winner = ""rafael cavalcante"";","SELECT AVG(round) FROM table_name_37 WHERE winner = ""rafael cavalcante"";",1 What is the away team at glenferrie oval?,"CREATE TABLE table_name_33 (away_team VARCHAR, venue VARCHAR);","SELECT away_team FROM table_name_33 WHERE venue = ""glenferrie oval"";","SELECT away_team FROM table_name_33 WHERE venue = ""glenferrie oval"";",1 Find the teams with the greatest difference in ticket sales between home and away matches.,"CREATE TABLE teams (team_id INT, team_name VARCHAR(100)); CREATE TABLE matches (match_id INT, team_home_id INT, team_away_id INT, tickets_sold INT); ","SELECT team_name, home_sales - away_sales as diff FROM (SELECT team_home_id, SUM(tickets_sold) as home_sales FROM matches GROUP BY team_home_id) home_sales JOIN (SELECT team_away_id, SUM(tickets_sold) as away_sales FROM matches GROUP BY team_away_id) away_sales JOIN teams t ON home_sales.team_home_id = t.team_id OR away_sales.team_away_id = t.team_id ORDER BY diff DESC;","SELECT t.team_name, SUM(m.tickets_sold) OVER (PARTITION BY t.team_home_id ORDER BY SUM(m.tickets_sold) DESC) as ticket_sales_difference FROM teams t JOIN matches m ON t.team_id = m.team_home_id ORDER BY ticket_sold DESC LIMIT 1;",0 Which members have not attended a workout since joining?,"CREATE TABLE member_data (member_id INT, join_date DATE); CREATE TABLE member_workouts (member_id INT, workout_date DATE);",SELECT mdata.member_id FROM member_data mdata LEFT JOIN member_workouts mworkouts ON mdata.member_id = mworkouts.member_id WHERE mworkouts.member_id IS NULL;,SELECT m.member_id FROM member_data m JOIN member_workouts m ON m.member_id = m.member_id WHERE m.join_date IS NULL;,0 What is the status of the membership application on 2008-12-15?,"CREATE TABLE table_name_26 (status VARCHAR, membership_application VARCHAR);","SELECT status FROM table_name_26 WHERE membership_application = ""2008-12-15"";","SELECT status FROM table_name_26 WHERE membership_application = ""2008-12-15"";",1 How many garment factories are in Cambodia?,"CREATE TABLE garment_factories (country VARCHAR(255), factory_id INT, factory_name VARCHAR(255), city VARCHAR(255)); ",SELECT COUNT(DISTINCT factory_id) FROM garment_factories WHERE country = 'Cambodia';,SELECT COUNT(*) FROM garment_factories WHERE country = 'Cambodia';,0 What is the prefix for the formula of Rsor'?,"CREATE TABLE table_name_75 (prefix VARCHAR, formula VARCHAR);","SELECT prefix FROM table_name_75 WHERE formula = ""rsor'"";","SELECT prefix FROM table_name_75 WHERE formula = ""rsor'"";",1 List regions with average vessel speed above 12 knots.,"CREATE TABLE Vessel_Performance (Vessel_ID INT, Speed FLOAT, Region VARCHAR(255)); ",SELECT Region FROM Vessel_Performance WHERE Speed > 12 GROUP BY Region HAVING AVG(Speed) > 12;,SELECT Region FROM Vessel_Performance WHERE Speed > 12;,0 What is the average number of defense diplomacy events held in Africa each year?,"CREATE TABLE Diplomacy_Events (Nation VARCHAR(50), Continent VARCHAR(50), Year INT, Events INT); ",SELECT AVG(Events) FROM Diplomacy_Events WHERE Continent = 'Africa';,SELECT AVG(Events) FROM Diplomacy_Events WHERE Continent = 'Africa';,1 What is the total number of members in the 'Educators_Union' with a safety_rating above 8?,"CREATE TABLE Educators_Union (union_member_id INT, member_id INT, safety_rating FLOAT); ",SELECT COUNT(union_member_id) FROM Educators_Union WHERE safety_rating > 8;,SELECT COUNT(*) FROM Educators_Union WHERE safety_rating > 8;,0 "Which Leading scorer 1 has a League Contested of northern premier league premier division, and an FA Cup of 2q?","CREATE TABLE table_name_2 (leading_scorer_1 VARCHAR, leaguecontested VARCHAR, fa_cup VARCHAR);","SELECT leading_scorer_1 FROM table_name_2 WHERE leaguecontested = ""northern premier league premier division"" AND fa_cup = ""2q"";","SELECT leading_scorer_1 FROM table_name_2 WHERE leaguecontested = ""northern premier league premier division"" AND fa_cup = ""2q"";",1 What is the average mental health score for each school district?,"CREATE TABLE student_mental_health_district (student_id INT, district_id INT, score INT);","SELECT d.district_name, AVG(smhd.score) as avg_score FROM student_mental_health_district smhd JOIN school_districts d ON smhd.district_id = d.district_id GROUP BY d.district_name;","SELECT district_id, AVG(score) as avg_score FROM student_mental_health_district GROUP BY district_id;",0 what is the tries against where points is 60?,"CREATE TABLE table_12828723_4 (tries_against VARCHAR, points VARCHAR);","SELECT tries_against FROM table_12828723_4 WHERE points = ""60"";",SELECT tries_against FROM table_12828723_4 WHERE points = 60;,0 Who previously attended south kent school / brentwood hs?,"CREATE TABLE table_29050051_3 (name VARCHAR, previous_school VARCHAR);","SELECT name FROM table_29050051_3 WHERE previous_school = ""South Kent School / Brentwood HS"";","SELECT name FROM table_29050051_3 WHERE previous_school = ""South Kent School / Brentwood Hs"";",0 What is the total budget for agricultural projects in 'rural_development' database that were completed after 2020?,"CREATE TABLE agricultural_projects (id INT, project_name TEXT, budget FLOAT, completion_date DATE); ",SELECT SUM(budget) as total_budget FROM agricultural_projects WHERE completion_date > '2020-12-31';,SELECT SUM(budget) FROM agricultural_projects WHERE completion_date > '2020-01-01';,0 Which City has mandalay bay resort,"CREATE TABLE table_name_29 (city VARCHAR, venue VARCHAR);","SELECT city FROM table_name_29 WHERE venue = ""mandalay bay resort"";","SELECT city FROM table_name_29 WHERE venue = ""mandalay bay resort"";",1 List all military equipment maintenance requests for helicopters in the Middle East,"CREATE TABLE military_equipment_maintenance (request_id INT, request_date DATE, equipment_type VARCHAR(255), service_branch VARCHAR(255), region VARCHAR(255));",SELECT * FROM military_equipment_maintenance WHERE equipment_type LIKE '%helicopter%' AND region = 'Middle East';,SELECT * FROM military_equipment_maintenance WHERE equipment_type = 'Helicopter' AND region = 'Middle East';,0 Where did Footscray play as the away team?,"CREATE TABLE table_name_76 (venue VARCHAR, away_team VARCHAR);","SELECT venue FROM table_name_76 WHERE away_team = ""footscray"";","SELECT venue FROM table_name_76 WHERE away_team = ""footscray"";",1 List mining sites in Ghana with overdue environmental impact assessments (EIAs) and safety inspections.,"CREATE TABLE mining_sites (site_id INT, site_name VARCHAR(50), country VARCHAR(20)); CREATE TABLE eia_schedule (site_id INT, eia_date DATE); CREATE TABLE safety_inspection (site_id INT, inspection_date DATE); ","SELECT site_name FROM mining_sites INNER JOIN eia_schedule ON mining_sites.site_id = eia_schedule.site_id INNER JOIN safety_inspection ON mining_sites.site_id = safety_inspection.site_id WHERE eia_schedule.eia_date < DATE_SUB(CURDATE(), INTERVAL 6 MONTH) AND safety_inspection.inspection_date < DATE_SUB(CURDATE(), INTERVAL 12 MONTH);","SELECT mining_sites.site_name FROM mining_sites INNER JOIN eia_schedule ON mining_sites.site_id = eia_schedule.site_id INNER JOIN safety_inspection ON mining_sites.site_id = safety_inspection.site_id WHERE mining_sites.country = 'Ghana' AND eia_schedule.eia_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 Total financial wellbeing score for the United States.,"CREATE TABLE financial_wellbeing_2 (id INT, country VARCHAR(20), score INT); ",SELECT SUM(score) FROM financial_wellbeing_2 WHERE country = 'United States';,SELECT SUM(score) FROM financial_wellbeing_2 WHERE country = 'United States';,1 Insert new environmental impact assessment records for the given chemicals.,"CREATE TABLE environmental_impact_assessments (id INT PRIMARY KEY, chemical_id INT, year INT, co2_emissions FLOAT, waste_generated FLOAT); ","INSERT INTO environmental_impact_assessments (id, chemical_id, year, co2_emissions, waste_generated) VALUES (6, 6, 2020, 150.7, 31.2), (7, 7, 2020, 105.6, 20.5), (8, 8, 2020, 142.3, 29.8), (9, 9, 2020, 128.8, 27.9), (10, 10, 2020, 118.1, 25.6);","INSERT INTO environmental_impact_assessments (id, chemical_id, year, co2_emissions, waste_generated) VALUES (1, 'Chemical Impact Assessment', '2022-01-01', '2022-12-31');",0 Count the number of access to justice programs by location,"CREATE TABLE programs (id INT PRIMARY KEY, location VARCHAR(255), type VARCHAR(255));","SELECT location, COUNT(*) FROM programs WHERE type = 'Access to Justice' GROUP BY location;","SELECT location, COUNT(*) FROM programs WHERE type = 'Access to Justice' GROUP BY location;",1 When dydek (8) has the highest rebounds who has the highest amount of points?,"CREATE TABLE table_18904831_6 (high_points VARCHAR, high_rebounds VARCHAR);","SELECT high_points FROM table_18904831_6 WHERE high_rebounds = ""Dydek (8)"";","SELECT high_points FROM table_18904831_6 WHERE high_rebounds = ""Dydek (8)"";",1 "Name the number of year for 6–3, 6–2 hard surface","CREATE TABLE table_23235767_4 (year VARCHAR, score_in_the_final VARCHAR, surface VARCHAR);","SELECT COUNT(year) FROM table_23235767_4 WHERE score_in_the_final = ""6–3, 6–2"" AND surface = ""Hard"";","SELECT COUNT(year) FROM table_23235767_4 WHERE score_in_the_final = ""6–3, 6–2"" AND surface = ""Hard"";",1 Show the unique energy sources in the database,"CREATE TABLE energy_sources (id INT, name TEXT); ",SELECT DISTINCT name FROM energy_sources;,SELECT DISTINCT name FROM energy_sources;,1 What is the average number of views per virtual tour in Rome?,"CREATE TABLE virtual_tours (id INT, city TEXT, views INT); ",SELECT AVG(views) FROM virtual_tours WHERE city = 'Rome';,SELECT AVG(views) FROM virtual_tours WHERE city = 'Rome';,1 What is the average revenue per concert by country?,"CREATE TABLE concerts (id INT, artist_id INT, city VARCHAR(50), country VARCHAR(50), revenue FLOAT); ","SELECT country, AVG(revenue) as avg_revenue FROM concerts GROUP BY country;","SELECT country, AVG(revenue) as avg_revenue FROM concerts GROUP BY country;",1 "Which tournament had a final score of 6–7, 2–6, and a Partner of wayne arthurs?","CREATE TABLE table_name_7 (tournament VARCHAR, score_in_the_final VARCHAR, partner VARCHAR);","SELECT tournament FROM table_name_7 WHERE score_in_the_final = ""6–7, 2–6"" AND partner = ""wayne arthurs"";","SELECT tournament FROM table_name_7 WHERE score_in_the_final = ""6–7, 2–6"" AND partner = ""wayne arthurs"";",1 Who vacated the Pennsylvania 6th district?,"CREATE TABLE table_225098_4 (vacator VARCHAR, district VARCHAR);","SELECT vacator FROM table_225098_4 WHERE district = ""Pennsylvania 6th"";","SELECT vacator FROM table_225098_4 WHERE district = ""Pennsylvania 6th"";",1 How many unique spacecraft have been launched by India?,"CREATE TABLE spacecraft (id INT, name VARCHAR(255), country VARCHAR(255), launch_date DATE);",SELECT COUNT(DISTINCT spacecraft.name) FROM spacecraft WHERE spacecraft.country = 'India';,SELECT COUNT(DISTINCT id) FROM spacecraft WHERE country = 'India';,0 List all hospitals in California that have reduced their rural patient base by over 10% since 2017.,"CREATE TABLE hospitals (hospital_id INT, name TEXT, location TEXT, rural BOOLEAN);CREATE TABLE patients (patient_id INT, hospital_id INT, year INT, rural BOOLEAN);","SELECT h.name FROM hospitals h JOIN (SELECT hospital_id, 100.0 * COUNT(*) FILTER (WHERE rural) / SUM(COUNT(*)) OVER (PARTITION BY hospital_id) AS reduction_ratio FROM patients WHERE year IN (2017, 2022) GROUP BY hospital_id) t ON h.hospital_id = t.hospital_id WHERE t.reduction_ratio > 10.0 AND h.state = 'California';",SELECT hospitals.name FROM hospitals INNER JOIN patients ON hospitals.hospital_id = patients.hospital_id WHERE hospitals.rural = true AND patients.year >= 2017 AND hospitals.location = 'California' AND patients.rural = true;,0 What is the batting style of the player born on 14 November 1971?,"CREATE TABLE table_name_77 (batting_style VARCHAR, date_of_birth VARCHAR);","SELECT batting_style FROM table_name_77 WHERE date_of_birth = ""14 november 1971"";","SELECT batting_style FROM table_name_77 WHERE date_of_birth = ""14 november 1971"";",1 "Find the number of registered users from each country who signed up in the last month, and order by the count in descending order.","CREATE TABLE users (id INT, name VARCHAR(100), country VARCHAR(50), signup_date DATE); ","SELECT country, COUNT(*) as num_users FROM users WHERE signup_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY country ORDER BY num_users DESC;","SELECT country, COUNT(*) as num_users FROM users WHERE signup_date >= DATEADD(month, -1, GETDATE()) GROUP BY country ORDER BY num_users DESC;",0 What is the average budget for agricultural innovation projects in 2021?,"CREATE TABLE agricultural_innovation_budget (id INT, project_id INT, budget DECIMAL(10,2)); CREATE TABLE rural_innovation (id INT, project_name VARCHAR(255), sector VARCHAR(255), location VARCHAR(255), start_date DATE, end_date DATE); ",SELECT AVG(budget) FROM agricultural_innovation_budget JOIN rural_innovation ON agricultural_innovation_budget.project_id = rural_innovation.id WHERE YEAR(start_date) = 2021 AND YEAR(end_date) = 2021;,SELECT AVG(budget) FROM agricultural_innovation_budget INNER JOIN rural_innovation ON agricultural_innovation_budget.project_id = rural_innovation.id WHERE YEAR(start_date) = 2021 AND YEAR(end_date) = 2021;,0 Find the number of unique visitors who attended events in 'Chicago' or 'Seattle'.,"CREATE TABLE EventVisitors (visitor_id INT, event_id INT, visitor_location VARCHAR(20)); ","SELECT DISTINCT visitor_location FROM EventVisitors WHERE visitor_location IN ('Chicago', 'Seattle');","SELECT COUNT(DISTINCT visitor_id) FROM EventVisitors WHERE visitor_location IN ('Chicago', 'Seattle');",0 When did series 6 start?,"CREATE TABLE table_24057191_2 (start_date VARCHAR, series VARCHAR);",SELECT start_date FROM table_24057191_2 WHERE series = 6;,SELECT start_date FROM table_24057191_2 WHERE series = 6;,1 what is 2010 when 2011 is 2r and 2008 is 2r?,CREATE TABLE table_name_46 (Id VARCHAR);,"SELECT 2010 FROM table_name_46 WHERE 2011 = ""2r"" AND 2008 = ""2r"";","SELECT 2010 FROM table_name_46 WHERE 2011 = ""2r"" AND 2008 = ""2r"";",1 What's the total revenue for TV shows in the 'Drama' genre?,"CREATE TABLE TVShows (id INT, title VARCHAR(100), genre VARCHAR(20), viewers INT, budget FLOAT, revenue FLOAT);",SELECT SUM(revenue) FROM TVShows WHERE genre = 'Drama';,SELECT SUM(revenue) FROM TVShows WHERE genre = 'Drama';,1 How many silver medalist was won?,CREATE TABLE table_22355_71 (silver INTEGER);,SELECT MAX(silver) FROM table_22355_71;,SELECT SUM(silver) FROM table_22355_71;,0 What is the total amount of waste generated in the year 2018 in the residential sector?,"CREATE TABLE waste_generation (id INT, sector VARCHAR(20), year INT, waste_generated FLOAT); ",SELECT SUM(waste_generated) FROM waste_generation WHERE sector = 'residential' AND year = 2018;,SELECT SUM(waste_generated) FROM waste_generation WHERE sector = 'Residential' AND year = 2018;,0 How many mental health parity complaints were filed by age group?,"CREATE TABLE MentalHealthParity (ComplaintID INT, Age INT, FilingDate DATE); ","SELECT FLOOR(Age/10)*10 as AgeGroup, COUNT(*) as ComplaintCount FROM MentalHealthParity WHERE YEAR(FilingDate) = 2020 GROUP BY AgeGroup;","SELECT Age, COUNT(*) FROM MentalHealthParity GROUP BY Age;",0 When was the build date for ff20 PRR class and erie built builder's model?,"CREATE TABLE table_name_14 (build_date VARCHAR, prr_class VARCHAR, builder’s_model VARCHAR);","SELECT build_date FROM table_name_14 WHERE prr_class = ""ff20"" AND builder’s_model = ""erie built"";","SELECT build_date FROM table_name_14 WHERE prr_class = ""ff20"" AND builder’s_model = ""erie built"";",1 What player went to Ohio State College?,"CREATE TABLE table_10812938_5 (player VARCHAR, college VARCHAR);","SELECT player FROM table_10812938_5 WHERE college = ""Ohio State"";","SELECT player FROM table_10812938_5 WHERE college = ""Ohio State"";",1 What is the minimum billing amount for cases in each region?,"CREATE TABLE Regions (RegionID INT, Region VARCHAR(20)); CREATE TABLE Cases (CaseID INT, RegionID INT, BillingAmount DECIMAL(10,2)); ","SELECT Region, MIN(BillingAmount) FROM Cases INNER JOIN Regions ON Cases.RegionID = Regions.RegionID GROUP BY Region;","SELECT Regions.Region, MIN(Cases.BillingAmount) FROM Regions INNER JOIN Cases ON Regions.RegionID = Cases.RegionID GROUP BY Regions.Region;",0 "Show the year-over-year donation growth rate for each cause, for the years 2019 and 2020.","CREATE TABLE DonationCausesYOY (DonationCauseID int, DonationCause varchar(50), DonationYear int, DonationAmount decimal(10,2)); ","SELECT DonationCause, DonationYear, DonationAmount, LAG(DonationAmount, 1) OVER (PARTITION BY DonationCause ORDER BY DonationYear) as PreviousYearAmount, (DonationAmount - LAG(DonationAmount, 1) OVER (PARTITION BY DonationCause ORDER BY DonationYear)) * 100.0 / LAG(DonationAmount, 1) OVER (PARTITION BY DonationCause ORDER BY DonationYear) as DonationGrowthRate FROM DonationCausesYOY WHERE DonationYear IN (2019, 2020) ORDER BY DonationCause, DonationYear;","SELECT DonationCause, YEAR(DonationYear) as Year, ROW_NUMBER() OVER (PARTITION BY DonationCause ORDER BY DonationYear) as Rank FROM DonationCausesYOY WHERE DonationYear IN (2019, 2020) GROUP BY DonationCause;",0 "What is the maximum length of any wastewater treatment facility in California, and the name of the facility, along with its construction year?","CREATE TABLE wastewater_treatment_facilities (id INT, facility_name VARCHAR(255), location VARCHAR(255), length FLOAT, construction_year INT); ","SELECT facility_name, length, construction_year FROM wastewater_treatment_facilities WHERE location = 'California' AND length = (SELECT MAX(length) FROM wastewater_treatment_facilities WHERE location = 'California');","SELECT facility_name, MAX(length) as max_length, construction_year FROM wastewater_treatment_facilities WHERE location = 'California' GROUP BY facility_name;",0 "What show that was aired on January 24, 2008 with a rating larger than 3.6 had the lowest viewers? How Many Viewers in the millions?","CREATE TABLE table_name_65 (viewers__m_ INTEGER, air_date VARCHAR, rating VARCHAR);","SELECT MIN(viewers__m_) FROM table_name_65 WHERE air_date = ""january 24, 2008"" AND rating > 3.6;","SELECT MIN(viewers__m_) FROM table_name_65 WHERE air_date = ""january 24, 2008"" AND rating > 3.6;",1 What attendance has Washington redskins as the opponent?,"CREATE TABLE table_name_89 (attendance VARCHAR, opponent VARCHAR);","SELECT attendance FROM table_name_89 WHERE opponent = ""washington redskins"";","SELECT attendance FROM table_name_89 WHERE opponent = ""washington redskins"";",1 What is the platform of the 2010 game with Shuichiro Nishiya as director?,"CREATE TABLE table_name_5 (platform_s_ VARCHAR, year VARCHAR, director VARCHAR);","SELECT platform_s_ FROM table_name_5 WHERE year = 2010 AND director = ""shuichiro nishiya"";","SELECT platform_s_ FROM table_name_5 WHERE year = 2010 AND director = ""shuichiro nishiya"";",1 Return the gender and name of artist who produced the song with the lowest resolution.,"CREATE TABLE artist (gender VARCHAR, artist_name VARCHAR); CREATE TABLE song (artist_name VARCHAR, resolution VARCHAR);","SELECT T1.gender, T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution LIMIT 1;","SELECT T1.gender, T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution = (SELECT MIN(resolution) FROM song);",0 Determine the number of unique subway lines in New York City.,"CREATE TABLE entries (id INT PRIMARY KEY, station_name VARCHAR(255), line VARCHAR(255), entries INT); ",SELECT COUNT(DISTINCT line) AS num_lines FROM entries;,SELECT COUNT(DISTINCT line) FROM entries WHERE station_name = 'New York City';,0 "What is the engine name that has a maximum torque at rpm of n·m ( lbf·ft ) @ 3,800?","CREATE TABLE table_name_42 (engine_name VARCHAR, max_torque_at_rpm VARCHAR);","SELECT engine_name FROM table_name_42 WHERE max_torque_at_rpm = ""n·m ( lbf·ft ) @ 3,800"";","SELECT engine_name FROM table_name_42 WHERE max_torque_at_rpm = ""nm ( lbfft ) @ 3,800"";",0 What is the second deepest trench in the Indian Plate?,"CREATE TABLE Indian_Plate (trench_name TEXT, location TEXT, avg_depth FLOAT); ","SELECT trench_name, avg_depth FROM (SELECT trench_name, avg_depth, ROW_NUMBER() OVER (ORDER BY avg_depth DESC) AS rn FROM Indian_Plate) AS subquery WHERE rn = 2;","SELECT trench_name, avg_depth FROM Indian_Plate ORDER BY avg_depth DESC LIMIT 2;",0 What is the total number of hours spent on open pedagogy projects by students in the 'Science' department?,"CREATE TABLE projects (id INT, project_name TEXT, department TEXT, hours_spent INT); ",SELECT SUM(hours_spent) FROM projects WHERE department = 'Science';,SELECT SUM(hours_spent) FROM projects WHERE department = 'Science';,1 What are the top 3 favorite dishes by customer zip code?,"CREATE TABLE customer (customer_id INT, name VARCHAR(50), zip VARCHAR(10));CREATE TABLE orders (order_id INT, customer_id INT, dish VARCHAR(50), price DECIMAL(5,2));","SELECT zip, dish, COUNT(*) as count FROM customer c JOIN orders o ON c.customer_id = o.customer_id GROUP BY zip, dish ORDER BY zip, count DESC;","SELECT c.zip, dish, o.price FROM customer c JOIN orders o ON c.customer_id = o.customer_id GROUP BY c.zip, dish ORDER BY o.price DESC LIMIT 3;",0 Update the position of an employee in the Employees table,"CREATE TABLE Employees (id INT, name VARCHAR(50), position VARCHAR(50), left_company BOOLEAN);",UPDATE Employees SET position = 'Senior Software Engineer' WHERE name = 'Juan Garcia';,UPDATE Employees SET position = 'Employee' WHERE id = (SELECT id FROM Employees WHERE position = 'Employee' AND left_company = TRUE);,0 Name the location attendance for utah,"CREATE TABLE table_23211041_10 (location_attendance VARCHAR, team VARCHAR);","SELECT location_attendance FROM table_23211041_10 WHERE team = ""Utah"";","SELECT location_attendance FROM table_23211041_10 WHERE team = ""Utah"";",1 "What is the distribution of view times for content related to climate change, segmented by age group?","CREATE TABLE user_age_groups (user_id INT, user_age_group VARCHAR(20)); CREATE TABLE content_topics (content_id INT, content_topic VARCHAR(50), content_length INT); CREATE TABLE user_content_views (view_id INT, user_id INT, content_id INT, view_date DATE);","SELECT user_age_group, AVG(content_length / 60) as avg_view_time FROM user_content_views JOIN user_age_groups ON user_content_views.user_id = user_age_groups.user_id JOIN content_topics ON user_content_views.content_id = content_topics.content_id WHERE content_topics.content_topic = 'climate change' GROUP BY user_age_group;","SELECT user_age_groups.user_age_group, COUNT(DISTINCT user_content_views.view_id) AS view_times FROM user_age_groups INNER JOIN user_content_views ON user_age_groups.user_id = user_content_views.user_id INNER JOIN content_topics ON user_content_views.content_id = content_topics.content_id WHERE content_topics.content_topic = 'climate change' GROUP BY user_age_groups.user_age_group;",0 How many times has a specific food additive been used by suppliers in the past year?,"CREATE TABLE Suppliers (SupplierID int, Name varchar(50), LastInspection date); CREATE TABLE Additives (AdditiveID int, Name varchar(50), SupplierID int, Uses int); ",SELECT SUM(Additives.Uses) FROM Additives JOIN Suppliers ON Additives.SupplierID = Suppliers.SupplierID WHERE Suppliers.LastInspection >= '2021-01-01';,"SELECT COUNT(*) FROM Additives INNER JOIN Suppliers ON Additives.SupplierID = Suppliers.SupplierID WHERE Suppliers.LastInspection >= DATEADD(year, -1, GETDATE());",0 What is the population density of mongmong-toto-maite?,"CREATE TABLE table_2588674_1 (pop_density INTEGER, village VARCHAR);","SELECT MIN(pop_density) FROM table_2588674_1 WHERE village = ""Mongmong-Toto-Maite"";","SELECT MAX(pop_density) FROM table_2588674_1 WHERE village = ""Mongmong-Toto-Maite"";",0 "What is the total donation amount by donors located in Southeast Asia in 2022, broken down by donor type?","CREATE TABLE Donors (DonorID int, DonorType varchar(50), Country varchar(50), AmountDonated numeric(18,2), DonationDate date); ","SELECT DonorType, SUM(AmountDonated) as TotalDonated FROM Donors WHERE Country LIKE 'Southeast Asia%' AND YEAR(DonationDate) = 2022 GROUP BY DonorType;","SELECT DonorType, SUM(AmountDonated) as TotalDonation FROM Donors WHERE Country LIKE 'Southeast%' AND YEAR(DonationDate) = 2022 GROUP BY DonorType;",0 What is the lowest decile with a state authority and Midhirst school?,"CREATE TABLE table_name_71 (decile INTEGER, authority VARCHAR, name VARCHAR);","SELECT MIN(decile) FROM table_name_71 WHERE authority = ""state"" AND name = ""midhirst school"";","SELECT MIN(decile) FROM table_name_71 WHERE authority = ""state"" AND name = ""midhirst school"";",1 "Insert a new record into the 'Grants' table for a grant named 'Grant 2' with a grant amount of $12,000","CREATE TABLE Grants (id INT PRIMARY KEY, grant_name VARCHAR(255), grant_amount DECIMAL(10,2)); ","INSERT INTO Grants (grant_name, grant_amount) VALUES ('Grant 2', 12000.00);","INSERT INTO Grants (id, grant_name, grant_amount) VALUES (2, 'Grant 2', 12000);",0 "What is Height, when Name is ""Manuela Zanchi""?","CREATE TABLE table_name_95 (height VARCHAR, name VARCHAR);","SELECT height FROM table_name_95 WHERE name = ""manuela zanchi"";","SELECT height FROM table_name_95 WHERE name = ""manuela zanchi"";",1 Name the least rank subcontinent for bangladesh,"CREATE TABLE table_2248784_3 (rank_subcontinent INTEGER, country VARCHAR);","SELECT MIN(rank_subcontinent) FROM table_2248784_3 WHERE country = ""Bangladesh"";","SELECT MIN(rank_subcontinent) FROM table_2248784_3 WHERE country = ""Bangladesh"";",1 What is the average weight of all shipments to Australia?,"CREATE TABLE Shipment (id INT, weight INT, destination_country VARCHAR(50)); ",SELECT AVG(weight) FROM Shipment WHERE destination_country = 'Australia';,SELECT AVG(weight) FROM Shipment WHERE destination_country = 'Australia';,1 What is the production code for episode 26 in the series?,"CREATE TABLE table_1876825_3 (production_code VARCHAR, no_in_series VARCHAR);",SELECT production_code FROM table_1876825_3 WHERE no_in_series = 26;,SELECT production_code FROM table_1876825_3 WHERE no_in_series = 26;,1 Which stations on the Red Line have wheelchair accessibility?,"CREATE TABLE Stations (line VARCHAR(20), station VARCHAR(20), accessibility BOOLEAN); ",SELECT station FROM Stations WHERE line = 'Red Line' AND accessibility = true;,SELECT station FROM Stations WHERE line = 'Red Line' AND accessibility = true;,1 Who are the co-owners of properties with sustainable urbanism certifications in 'GreenTown'?,"CREATE TABLE properties (id INT, address VARCHAR(255), city VARCHAR(255), state VARCHAR(255), price INT, certification_type VARCHAR(255)); ",SELECT DISTINCT co_owners.owner_name FROM co_owners INNER JOIN properties ON co_owners.property_id = properties.id WHERE properties.city = 'GreenTown' AND properties.certification_type = 'GreenUrb';,SELECT co_owners FROM properties WHERE city = 'GreenTown' AND certification_type = 'Sustainable Urbanism';,0 What is the total amount of grants awarded for capacity building in the last 2 years?,"CREATE TABLE grants (id INT, org_id INT, amount INT, date DATE, purpose VARCHAR(30)); ","SELECT SUM(amount) FROM grants WHERE purpose = 'capacity building' AND date >= DATEADD(year, -2, GETDATE());","SELECT SUM(amount) FROM grants WHERE purpose = 'capacity building' AND date >= DATEADD(year, -2, GETDATE());",1 Calculate the average emergency room wait time for rural hospitals in the western region.,"CREATE TABLE hospitals (id INT, name TEXT, region TEXT, wait_time FLOAT);","SELECT region, AVG(wait_time) FROM hospitals WHERE region = 'Western' AND type = 'Rural' GROUP BY region;",SELECT AVG(wait_time) FROM hospitals WHERE region = 'western';,0 When was the score 56-26?,"CREATE TABLE table_name_2 (date VARCHAR, record VARCHAR);","SELECT date FROM table_name_2 WHERE record = ""56-26"";","SELECT date FROM table_name_2 WHERE record = ""56-26"";",1 List the suppliers and their respective total revenue for vegan products in Germany.,"CREATE TABLE suppliers (supp_id INT, name VARCHAR(50), country VARCHAR(50)); CREATE TABLE products (product_id INT, name VARCHAR(50), type VARCHAR(20), price DECIMAL(5,2)); ","SELECT s.name, SUM(p.price) FROM suppliers s JOIN products p ON s.name = p.name WHERE s.country = 'Germany' AND p.type = 'vegan' GROUP BY s.name;","SELECT suppliers.name, SUM(products.price) as total_revenue FROM suppliers INNER JOIN products ON suppliers.supp_id = products.product_id WHERE products.type = 'Vegan' AND suppliers.country = 'Germany' GROUP BY suppliers.name;",0 What is the name of the most expensive product?,"CREATE TABLE products (id INT, company VARCHAR(255), price DECIMAL(5,2), name VARCHAR(255)); ",SELECT name FROM products WHERE price = (SELECT MAX(price) FROM products);,SELECT name FROM products ORDER BY price DESC LIMIT 1;,0 Insert a new volunteer with the name 'John Doe' and email 'johndoe@example.com' into the 'volunteers' table.,"CREATE TABLE volunteers (id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255), email VARCHAR(255));","INSERT INTO volunteers (name, email) VALUES ('John Doe', 'johndoe@example.com');","INSERT INTO volunteers (name, email) VALUES ('John Doe', 'johndoe@example.com');",1 what is the malayalam name മലയാളം of tamil name தமிழ் punarpoosam புனர்பூசம்,"CREATE TABLE table_201400_2 (malayalam_name_മലയാളം VARCHAR, tamil_name_தமிழ் VARCHAR);","SELECT malayalam_name_മലയാളം FROM table_201400_2 WHERE tamil_name_தமிழ் = ""Punarpoosam புனர்பூசம்"";","SELECT malayalam_name_ FROM table_201400_2 WHERE tamil_name_ = ""Punarpoosam "";",0 Tell me the sum of losses for wins less than 2 and rank of 10 with appearances larger than 3,"CREATE TABLE table_name_60 (losses INTEGER, appearances VARCHAR, wins VARCHAR, rank VARCHAR);",SELECT SUM(losses) FROM table_name_60 WHERE wins < 2 AND rank = 10 AND appearances > 3;,SELECT SUM(losses) FROM table_name_60 WHERE wins 2 AND rank = 10 AND appearances > 3;,0 "What was the total number of citizen complaints received by the city of Chicago in 2024, categorized by utilities, parks, and sanitation?","CREATE TABLE city_complaints (city varchar(50), year int, category varchar(50), num_complaints int); ",SELECT SUM(num_complaints) FROM city_complaints WHERE city = 'Chicago' AND (category = 'Utilities' OR category = 'Parks' OR category = 'Sanitation') AND year = 2024;,"SELECT category, SUM(num_complaints) FROM city_complaints WHERE city = 'Chicago' AND year = 2024 GROUP BY category;",0 I want to know the catalog number for album and seed records label for cd and title of grey,"CREATE TABLE table_name_66 (catalog_number VARCHAR, title VARCHAR, formats VARCHAR, format VARCHAR, label VARCHAR);","SELECT catalog_number FROM table_name_66 WHERE format = ""album"" AND label = ""seed records"" AND formats = ""cd"" AND title = ""grey"";","SELECT catalog_number FROM table_name_66 WHERE format = ""album"" AND label = ""seed records"" AND format = ""cd"" AND title = ""grey"";",0 How many shader models have a 900 core clock ( mhz )?,"CREATE TABLE table_25839957_5 (shader_model VARCHAR, core_clock___mhz__ VARCHAR);","SELECT COUNT(shader_model) FROM table_25839957_5 WHERE core_clock___mhz__ = ""900"";","SELECT COUNT(shader_model) FROM table_25839957_5 WHERE core_clock___mhz__ = ""900"";",1 Create a table for mental health conditions,"CREATE TABLE mental_health_conditions (id INT PRIMARY KEY, name VARCHAR(255), description TEXT);","CREATE TABLE mental_health_conditions (id INT PRIMARY KEY, name VARCHAR(255), description TEXT);","CREATE TABLE mental_health_conditions (id INT PRIMARY KEY, name VARCHAR(255), description TEXT);",1 Who are the employees working in the 'GreenTech' industry?,"CREATE TABLE Company (id INT, name TEXT, industry TEXT, location TEXT); CREATE TABLE Employee (id INT, company_id INT, name TEXT, role TEXT, gender TEXT, ethnicity TEXT, date_hired DATE); ",SELECT Employee.name FROM Employee INNER JOIN Company ON Company.id = Employee.company_id WHERE Company.industry = 'GreenTech';,SELECT Employee.name FROM Employee INNER JOIN Company ON Employee.company_id = Company.id WHERE Company.industry = 'GreenTech';,0 What opponents played Waldstadion in a game?,"CREATE TABLE table_24951872_2 (opponent VARCHAR, game_site VARCHAR);","SELECT opponent FROM table_24951872_2 WHERE game_site = ""Waldstadion"";","SELECT opponent FROM table_24951872_2 WHERE game_site = ""Waldstadion"";",1 What is the total weight of recycled materials used by each country?,"CREATE TABLE Countries (CountryID INT, CountryName VARCHAR(50)); CREATE TABLE RecycledMaterials (MaterialID INT, MaterialName VARCHAR(50), Weight DECIMAL(5,2), CountryID INT); ","SELECT CountryName, SUM(Weight) as TotalWeight FROM Countries c JOIN RecycledMaterials rm ON c.CountryID = rm.CountryID GROUP BY CountryName;","SELECT Countries.CountryName, SUM(RecycledMaterials.Weight) as TotalWeight FROM Countries INNER JOIN RecycledMaterials ON Countries.CountryID = RecycledMaterials.CountryID GROUP BY Countries.CountryName;",0 "Calculate the average transaction amount for users in the ShariahCompliantTransactions table, grouped by month.","CREATE TABLE ShariahCompliantTransactions (transactionID INT, userID VARCHAR(20), transactionAmount DECIMAL(10,2), transactionDate DATE); ","SELECT MONTH(transactionDate), AVG(transactionAmount) FROM ShariahCompliantTransactions GROUP BY MONTH(transactionDate);","SELECT EXTRACT(MONTH FROM transactionDate) AS month, AVG(transactionAmount) AS avgTransactionAmount FROM ShariahCompliantTransactions GROUP BY month;",0 "What is Date, when High Rebounds is ""Yao Ming (10)""?","CREATE TABLE table_name_86 (date VARCHAR, high_rebounds VARCHAR);","SELECT date FROM table_name_86 WHERE high_rebounds = ""yao ming (10)"";","SELECT date FROM table_name_86 WHERE high_rebounds = ""yao ming (10)"";",1 Update the 'production_rate' of the 'Mine_001' record in the 'mines' table to 500,"CREATE TABLE mines (id VARCHAR(10), name VARCHAR(50), location VARCHAR(50), production_rate INT); ",UPDATE mines SET production_rate = 500 WHERE id = 'Mine_001';,UPDATE mines SET production_rate = 500 WHERE name = 'Mine_001';,0 How many streams did Latin artists get in the last month?,"CREATE TABLE Streaming (id INT, artist VARCHAR(255), genre VARCHAR(255), date DATE); ","SELECT COUNT(*) FROM Streaming WHERE genre = 'Latin' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);","SELECT COUNT(*) FROM Streaming WHERE genre = 'Latin' AND date >= DATEADD(month, -1, GETDATE());",0 What is the total revenue for hotels in Canada that use AI-powered recommendation engines?,"CREATE TABLE hotels (hotel_id INT, hotel_name TEXT, country TEXT, revenue FLOAT); CREATE TABLE ai_recs (hotel_id INT, rec_engine TEXT); ",SELECT SUM(hotels.revenue) FROM hotels INNER JOIN ai_recs ON hotels.hotel_id = ai_recs.hotel_id WHERE hotels.country = 'Canada' AND ai_recs.rec_engine = 'AI-powered';,SELECT SUM(hotels.revenue) FROM hotels INNER JOIN ai_recs ON hotels.hotel_id = ai_recs.hotel_id WHERE hotels.country = 'Canada';,0 What is the average price of vegan entrées in the New York region?,"CREATE TABLE Menu (id INT, item_name VARCHAR(20), item_type VARCHAR(10), price DECIMAL(10,2), region VARCHAR(10)); ",SELECT AVG(price) FROM Menu WHERE item_type = 'entrée' AND region = 'New York' AND item_name LIKE '%vegan%';,SELECT AVG(price) FROM Menu WHERE item_type = 'entrée' AND region = 'New York' AND item_type ='vegan';,0 Which player has 69 as the score?,"CREATE TABLE table_name_52 (player VARCHAR, score VARCHAR);",SELECT player FROM table_name_52 WHERE score = 69;,SELECT player FROM table_name_52 WHERE score = 69;,1 What is the percentage of patients with mental health disorders who have had a community health worker visit in the past month?,"CREATE TABLE patients (id INT, has_mental_health_disorder BOOLEAN, last_visit_date DATE); CREATE TABLE community_health_workers_visits (patient_id INT, visit_date DATE); ",SELECT (COUNT(*) FILTER (WHERE patients.has_mental_health_disorder = true AND community_health_workers_visits.visit_date >= (CURRENT_DATE - INTERVAL '1 month'))) * 100.0 / (SELECT COUNT(*) FROM patients WHERE has_mental_health_disorder = true) as percentage;,"SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM patients WHERE has_mental_health_disorder = TRUE AND last_visit_date >= DATEADD(month, -1, GETDATE()))) FROM patients WHERE has_mental_health_disorder = TRUE AND last_visit_date >= DATEADD(month, -1, GETDATE());",0 What is the highest position of the team having played under 10 matches?,"CREATE TABLE table_name_73 (position INTEGER, played INTEGER);",SELECT MAX(position) FROM table_name_73 WHERE played < 10;,SELECT MAX(position) FROM table_name_73 WHERE played 10;,0 Was the semi-final round held at home or away?,"CREATE TABLE table_name_53 (h___a VARCHAR, round VARCHAR);","SELECT h___a FROM table_name_53 WHERE round = ""semi-final"";","SELECT h___a FROM table_name_53 WHERE round = ""semi-final"";",1 What is the average price of europium per kilogram in the last 2 years?,"CREATE TABLE prices (id INT, element TEXT, date DATE, price INT); ",SELECT AVG(price) FROM prices WHERE element = 'europium' AND extract(year from date) >= 2020;,"SELECT AVG(price) FROM prices WHERE element = 'Europium' AND date >= DATEADD(year, -2, GETDATE());",0 "List the collective bargaining agreements in the technology sector that were signed in the last 3 years, excluding those from the United States.","CREATE TABLE cba(id INT, sector VARCHAR(50), country VARCHAR(14), signing_date DATE);","SELECT * FROM cba WHERE sector = 'Technology' AND country != 'United States' AND signing_date >= (SELECT DATE_SUB(CURDATE(), INTERVAL 3 YEAR))","SELECT * FROM cba WHERE sector = 'technology' AND country!= 'United States' AND signing_date >= DATEADD(year, -3, GETDATE());",0 What was the date that Elvir Krehmic made a high jump record?,"CREATE TABLE table_name_78 (date VARCHAR, athlete VARCHAR);","SELECT date FROM table_name_78 WHERE athlete = ""elvir krehmic"";","SELECT date FROM table_name_78 WHERE athlete = ""elvir krehmic"";",1 "What is the Country of the 10,000m Event?","CREATE TABLE table_name_39 (country VARCHAR, event VARCHAR);","SELECT country FROM table_name_39 WHERE event = ""10,000m"";","SELECT country FROM table_name_39 WHERE event = ""10,000m"";",1 What's the TDP for the 7130N model?,"CREATE TABLE table_269920_3 (tdp__w_ INTEGER, model VARCHAR);","SELECT MIN(tdp__w_) FROM table_269920_3 WHERE model = ""7130N"";","SELECT MAX(tdp__w_) FROM table_269920_3 WHERE model = ""7130N"";",0 Add a column to 'species',"CREATE TABLE species (id INT PRIMARY KEY, name VARCHAR(255), population INT, conservation_status VARCHAR(255));",ALTER TABLE species ADD COLUMN last_sighting DATE;,"INSERT INTO species (id, name, population, conservation_status) VALUES (1, 'Seabird', 'Native American', 'Endangered');",0 "What is the total number of security incidents by country for the last year, ordered from highest to lowest?","CREATE TABLE security_incidents (incident_id INT, incident_date DATE, country VARCHAR(50)); ","SELECT country, COUNT(incident_id) as total_incidents FROM security_incidents WHERE incident_date >= DATEADD(year, -1, CURRENT_DATE) GROUP BY country ORDER BY total_incidents DESC;","SELECT country, COUNT(*) as total_incidents FROM security_incidents WHERE incident_date >= DATEADD(year, -1, GETDATE()) GROUP BY country ORDER BY total_incidents DESC;",0 Which television service has italian for its language?,"CREATE TABLE table_name_46 (television_service VARCHAR, language VARCHAR);","SELECT television_service FROM table_name_46 WHERE language = ""italian"";","SELECT television_service FROM table_name_46 WHERE language = ""italy"";",0 "Which Attendance has an Opponent of new york giants, and a Week smaller than 5?","CREATE TABLE table_name_88 (attendance INTEGER, opponent VARCHAR, week VARCHAR);","SELECT AVG(attendance) FROM table_name_88 WHERE opponent = ""new york giants"" AND week < 5;","SELECT AVG(attendance) FROM table_name_88 WHERE opponent = ""new york giants"" AND week 5;",0 What type is the settlement of Lok? ,"CREATE TABLE table_2562572_19 (type VARCHAR, settlement VARCHAR);","SELECT type FROM table_2562572_19 WHERE settlement = ""Lok"";","SELECT type FROM table_2562572_19 WHERE settlement = ""Lop"";",0 How many years have a Form album of the thing?,"CREATE TABLE table_name_39 (year INTEGER, from_album VARCHAR);","SELECT SUM(year) FROM table_name_39 WHERE from_album = ""the thing"";","SELECT SUM(year) FROM table_name_39 WHERE from_album = ""form"";",0 Find the name and rank of the 3 youngest winners across all matches.,"CREATE TABLE matches (winner_name VARCHAR, winner_rank VARCHAR, winner_age VARCHAR);","SELECT DISTINCT winner_name, winner_rank FROM matches ORDER BY winner_age LIMIT 3;","SELECT winner_name, winner_rank FROM matches ORDER BY winner_age DESC LIMIT 3;",0 What is the Loco Nos of the e3 class?,"CREATE TABLE table_name_80 (loco_nos VARCHAR, class VARCHAR);","SELECT loco_nos FROM table_name_80 WHERE class = ""e3"";","SELECT loco_nos FROM table_name_80 WHERE class = ""e3"";",1 What is the total amount of scandium exported to Europe in the last 3 years?,"CREATE TABLE exports (id INT, element TEXT, location TEXT, date DATE, quantity INT); ",SELECT SUM(quantity) FROM exports WHERE element = 'scandium' AND location = 'Europe' AND extract(year from date) >= 2019;,"SELECT SUM(quantity) FROM exports WHERE element = 'Scandium' AND location = 'Europe' AND date >= DATEADD(year, -3, GETDATE());",0 What is the maximum number of military aircrafts in Southeast Asian countries?,"CREATE TABLE MilitaryAircrafts (Country VARCHAR(50), NumberOfAircrafts INT); ","SELECT MAX(NumberOfAircrafts) FROM MilitaryAircrafts WHERE Country IN ('Indonesia', 'Thailand', 'Malaysia', 'Singapore', 'Vietnam');",SELECT MAX(NumberOfAircrafts) FROM MilitaryAircrafts WHERE Country IN ('Southeast Asia');,0 How many items appear in the viewers column when the draw is 2?,"CREATE TABLE table_27994983_8 (viewers VARCHAR, draw VARCHAR);",SELECT COUNT(viewers) FROM table_27994983_8 WHERE draw = 2;,SELECT COUNT(viewers) FROM table_27994983_8 WHERE draw = 2;,1 Name the total number of directors for number 6,"CREATE TABLE table_20345624_2 (director VARCHAR, no VARCHAR);",SELECT COUNT(director) FROM table_20345624_2 WHERE no = 6;,SELECT COUNT(director) FROM table_20345624_2 WHERE no = 6;,1 Delete the feed type 'flakes' from the 'feeding' table,"CREATE TABLE fish_stock (fish_id INT PRIMARY KEY, species VARCHAR(50), location VARCHAR(50), biomass FLOAT); CREATE TABLE feeding (feed_id INT PRIMARY KEY, feed_type VARCHAR(50), nutrients FLOAT); ",DELETE FROM feeding WHERE feed_type = 'flakes';,DELETE FROM feeding WHERE feed_type = 'flakes';,1 Insert a new volunteer with ID 6 who signed up on 2022-07-15,"CREATE TABLE volunteers (volunteer_id INT, signup_date DATE); ","INSERT INTO volunteers (volunteer_id, signup_date) VALUES (6, '2022-07-15');","INSERT INTO volunteers (volunteer_id, signup_date) VALUES (6, '2022-07-15');",1 "What is the highest latitude when there are more than 0.518 square miles of water, a longitude less than -99.830606, and a population of 18?","CREATE TABLE table_name_69 (latitude INTEGER, pop__2010_ VARCHAR, water__sqmi_ VARCHAR, longitude VARCHAR);",SELECT MAX(latitude) FROM table_name_69 WHERE water__sqmi_ > 0.518 AND longitude < -99.830606 AND pop__2010_ = 18;,SELECT MAX(latitude) FROM table_name_69 WHERE water__sqmi_ > 0.518 AND longitude -99.830606 AND pop__2010_ = 18;,0 Display athlete names and their total goals and assists,"CREATE TABLE athlete_stats (athlete_id INT PRIMARY KEY, name VARCHAR(100), sport VARCHAR(50), team VARCHAR(50), games_played INT, goals_scored INT, assists INT); ","SELECT name, SUM(goals_scored) as total_goals, SUM(assists) as total_assists FROM athlete_stats GROUP BY name;","SELECT name, SUM(goals_scored) AS total_goals, SUM(assists) AS total_assists FROM athlete_stats GROUP BY name;",0 What is the average energy efficiency (kWh/ton) of electric vehicles sold in Japan since 2019?,"CREATE TABLE ev_sales (id INT, model TEXT, country TEXT, energy_efficiency FLOAT, year INT); ",SELECT AVG(energy_efficiency) FROM ev_sales WHERE country = 'Japan' AND year >= 2019;,SELECT AVG(energy_efficiency) FROM ev_sales WHERE country = 'Japan' AND year >= 2019;,1 What is the total number of military equipment sold by 'Green Defense Inc.' to the 'Middle East' region?,"CREATE TABLE GreenDefenseIncSales(id INT, company VARCHAR(255), region VARCHAR(255), equipment VARCHAR(255), quantity INT);",SELECT SUM(quantity) FROM GreenDefenseIncSales WHERE company = 'Green Defense Inc.' AND region = 'Middle East';,SELECT SUM(quantity) FROM GreenDefenseIncSales WHERE company = 'Green Defense Inc.' AND region = 'Middle East';,1 Insert records for new clients from the Socially Responsible Lending database,"CREATE TABLE socially_responsible_lending_client (client_id INT PRIMARY KEY, name VARCHAR(100), age INT, gender VARCHAR(10));CREATE TABLE socially_responsible_lending_loan (loan_id INT PRIMARY KEY, client_id INT, loan_amount DECIMAL(10, 2), loan_date DATE);","INSERT INTO client (client_id, name, age, gender) SELECT client_id, name, age, gender FROM socially_responsible_lending_client WHERE NOT EXISTS (SELECT 1 FROM client c WHERE c.client_id = socially_responsible_lending_client.client_id);","INSERT INTO socially_responsible_lending_client (client_id, name, age, gender) VALUES (1, 'Male', 'Male', 'Male', 'Female', 'Male'); INSERT INTO socially_responsible_lending_loan (loan_id, client_id, loan_amount, loan_date) VALUES (1, 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male'), 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', 'Male', ",0 What was the number of unique users who streamed a Japanese artist's songs in 2020?,"CREATE TABLE Japanese_Streaming (user INT, artist VARCHAR(50), year INT); ","SELECT artist, COUNT(DISTINCT user) FROM Japanese_Streaming WHERE year = 2020 GROUP BY artist;",SELECT COUNT(DISTINCT user) FROM Japanese_Streaming WHERE artist = 'Japanese' AND year = 2020;,0 Which episode had 2.75 million viewers in the U.S.?,"CREATE TABLE table_25740548_4 (title VARCHAR, us_viewers__million_ VARCHAR);","SELECT title FROM table_25740548_4 WHERE us_viewers__million_ = ""2.75"";","SELECT title FROM table_25740548_4 WHERE us_viewers__million_ = ""2.75"";",1 What was the attendance of week 8?,"CREATE TABLE table_name_24 (attendance VARCHAR, week VARCHAR);",SELECT attendance FROM table_name_24 WHERE week = 8;,SELECT attendance FROM table_name_24 WHERE week = 8;,1 What is the total waste generation for the top 2 contributors in 2019?,"CREATE TABLE waste_generation (id INT, country VARCHAR(255), year INT, waste_quantity INT); ","SELECT country, SUM(waste_quantity) FROM waste_generation WHERE year = 2019 GROUP BY country ORDER BY SUM(waste_quantity) DESC LIMIT 2;",SELECT SUM(waste_quantity) FROM waste_generation WHERE year = 2019 ORDER BY SUM(waste_quantity) DESC LIMIT 2;,0 Where was the hometown for the player that attended Shanley High School?,"CREATE TABLE table_11677691_4 (hometown VARCHAR, school VARCHAR);","SELECT hometown FROM table_11677691_4 WHERE school = ""Shanley High school"";","SELECT hometown FROM table_11677691_4 WHERE school = ""Shanley High School"";",0 Show the technology and installed capacity of the top 3 renewable projects with the highest installed capacity in the renewable_projects table.,"CREATE TABLE renewable_projects (project_id INT, project_name VARCHAR(255), location VARCHAR(255), technology VARCHAR(255), installed_capacity FLOAT);","SELECT technology, installed_capacity FROM (SELECT technology, installed_capacity, ROW_NUMBER() OVER (ORDER BY installed_capacity DESC) AS rank FROM renewable_projects) WHERE rank <= 3;","SELECT technology, installed_capacity FROM renewable_projects ORDER BY installed_capacity DESC LIMIT 3;",0 Which crops are grown in the Northwest and what is their scientific name?,"CREATE TABLE crops (id INT PRIMARY KEY, name VARCHAR(50), scientific_name VARCHAR(50), growth_season VARCHAR(20), family VARCHAR(25), region VARCHAR(25)); ","SELECT name, scientific_name FROM crops WHERE region = 'Northwest';","SELECT name, scientific_name FROM crops WHERE region = 'Northwest';",1 What is the home team of the April 14 game?,"CREATE TABLE table_name_27 (home VARCHAR, date VARCHAR);","SELECT home FROM table_name_27 WHERE date = ""april 14"";","SELECT home FROM table_name_27 WHERE date = ""april 14"";",1 What is the number range for the T 3 class?,"CREATE TABLE table_name_88 (number_range VARCHAR, class VARCHAR);","SELECT number_range FROM table_name_88 WHERE class = ""t 3"";","SELECT number_range FROM table_name_88 WHERE class = ""t 3"";",1 What are the names and salaries of employees who work in departments with manufacturing activities and have a salary greater than the average salary in those departments?,"CREATE TABLE Departments (DepartmentID INT PRIMARY KEY, DepartmentName VARCHAR(50)); ","SELECT E.FirstName, E.LastName, E.Salary FROM Employees E INNER JOIN Departments D ON E.Department = D.DepartmentName WHERE D.DepartmentName IN ('Manufacturing') AND E.Salary > (SELECT AVG(E.Salary) FROM Employees E INNER JOIN Departments D ON E.Department = D.DepartmentName WHERE D.DepartmentName IN ('Manufacturing'));","SELECT DepartmentName, SUM(Salary) FROM Departments WHERE DepartmentName LIKE '%Manufacturing%' GROUP BY DepartmentName HAVING SUM(Salary) > (SELECT AVG(Salary) FROM Departments WHERE DepartmentName LIKE '%Manufacturing%');",0 What is the name of a pick more than 5 at Washington College?,"CREATE TABLE table_name_45 (name VARCHAR, pick__number VARCHAR, college VARCHAR);","SELECT name FROM table_name_45 WHERE pick__number > 5 AND college = ""washington"";","SELECT name FROM table_name_45 WHERE pick__number > 5 AND college = ""washington"";",1 What is the average revenue for restaurants in New York and Los Angeles?,"CREATE TABLE restaurant_revenue(location VARCHAR(255), revenue INT); ",SELECT AVG(revenue) FROM restaurant_revenue WHERE location LIKE '%New York%' OR location LIKE '%Los Angeles%';,"SELECT AVG(revenue) FROM restaurant_revenue WHERE location IN ('New York', 'Los Angeles');",0 "Show the total fare collected from the payments table, grouped by vehicle type from the vehicles table","CREATE TABLE payments (payment_id INT, payment_amount DECIMAL(5,2), vehicle_id INT); CREATE TABLE vehicles (vehicle_id INT, vehicle_type VARCHAR(50)); ","SELECT v.vehicle_type, SUM(p.payment_amount) FROM payments p JOIN vehicles v ON p.vehicle_id = v.vehicle_id GROUP BY v.vehicle_type;","SELECT v.vehicle_type, SUM(p.payment_amount) as total_fare FROM payments p JOIN vehicles v ON p.vehicle_id = v.vehicle_id GROUP BY v.vehicle_type;",0 "What was the game #7, at or versus (home or at)?","CREATE TABLE table_20745754_1 (at_vs VARCHAR, _number VARCHAR);","SELECT at_vs FROM table_20745754_1 WHERE _number = ""7"";",SELECT at_vs FROM table_20745754_1 WHERE _number = 7;,0 How many bronzes for nations with over 22 golds and ranked under 2?,"CREATE TABLE table_name_66 (bronze INTEGER, gold VARCHAR, rank VARCHAR);",SELECT MAX(bronze) FROM table_name_66 WHERE gold > 22 AND rank < 2;,SELECT SUM(bronze) FROM table_name_66 WHERE gold > 22 AND rank 2;,0 What is the average rank for Denmark?,"CREATE TABLE table_name_33 (rank INTEGER, country VARCHAR);","SELECT AVG(rank) FROM table_name_33 WHERE country = ""denmark"";","SELECT AVG(rank) FROM table_name_33 WHERE country = ""danmark"";",0 what 1989 has 2002 of 4r and 2005 of 4r?,CREATE TABLE table_name_22 (Id VARCHAR);,"SELECT 1989 FROM table_name_22 WHERE 2002 = ""4r"" AND 2005 = ""4r"";","SELECT 1989 FROM table_name_22 WHERE 2002 = ""4r"" AND 2005 = ""4r"";",1 What is the total revenue for 'Fusion Foods' in Q2 2019?,"CREATE TABLE Revenue (restaurant_id INT, quarter INT, year INT, revenue INT); ",SELECT SUM(revenue) FROM Revenue WHERE restaurant_id = 11 AND EXTRACT(QUARTER FROM DATE '2019-01-01' + INTERVAL (quarter - 1) * 3 MONTH) = 2 AND EXTRACT(YEAR FROM DATE '2019-01-01' + INTERVAL (quarter - 1) * 3 MONTH) = 2019;,SELECT SUM(revenue) FROM Revenue WHERE restaurant_id = 1 AND quarter = 2 AND year = 2019;,0 What College has a Player that is jermaine romans?,"CREATE TABLE table_name_79 (college VARCHAR, player VARCHAR);","SELECT college FROM table_name_79 WHERE player = ""jermaine romans"";","SELECT college FROM table_name_79 WHERE player = ""jermaine romans"";",1 What is the maximum price of organic cosmetics sourced from the United States?,"CREATE TABLE products (product_id INT, name TEXT, is_organic BOOLEAN, price DECIMAL, source_country TEXT); ",SELECT MAX(price) FROM products WHERE is_organic = TRUE AND source_country = 'USA';,SELECT MAX(price) FROM products WHERE is_organic = true AND source_country = 'United States';,0 When is The Opponents of lincoln city and a H / A of a?,"CREATE TABLE table_name_31 (date VARCHAR, opponents VARCHAR, h___a VARCHAR);","SELECT date FROM table_name_31 WHERE opponents = ""lincoln city"" AND h___a = ""a"";","SELECT date FROM table_name_31 WHERE opponents = ""lincoln city"" AND h___a = ""a"";",1 Which menu category has the highest inventory value for organic items?,"CREATE TABLE organic_categories (id INT, category VARCHAR(255), total_value DECIMAL(5,2)); ","SELECT category, total_value FROM organic_categories ORDER BY total_value DESC LIMIT 1;","SELECT category, MAX(total_value) FROM organic_categories GROUP BY category;",0 What percentage of cruelty-free products are also vegan?,"CREATE TABLE products (product_id INT, cruelty_free BOOLEAN, vegan BOOLEAN); ",SELECT (COUNT(p.cruelty_free AND p.vegan) * 100.0 / (SELECT COUNT(*) FROM products)) AS vegan_cruelty_free_percentage FROM products p;,SELECT (COUNT(*) FILTER (WHERE cruelty_free = TRUE) * 100.0 / COUNT(*)) AS percentage FROM products WHERE vegan = TRUE;,0 Insert records into 'military_equipment' table,"CREATE TABLE military_equipment (id INT PRIMARY KEY, name VARCHAR(255), type VARCHAR(255), manufacturer VARCHAR(255), year INT); ","INSERT INTO military_equipment (id, name, type, manufacturer, year) VALUES (2, 'F-15 Eagle', 'Fighter', 'McDonnell Douglas', 1976);","INSERT INTO military_equipment (id, name, type, manufacturer, year) VALUES (1, 'Military Equipment', 'Military', 'Military', '2022-03-01');",0 List all unique item codes in warehouse 'AFRICA-JNB',"CREATE TABLE item_codes (id INT, warehouse_id VARCHAR(5), item_code VARCHAR(5)); ",SELECT DISTINCT item_code FROM item_codes WHERE warehouse_id = (SELECT id FROM warehouses WHERE name = 'AFRICA-JNB');,SELECT DISTINCT item_code FROM item_codes WHERE warehouse_id = 'AFRICA-JNB';,0 What is the average waste generation rate per capita in each city?,"CREATE TABLE city_waste_generation (city_id INT, city_name VARCHAR(50), population INT, waste_generated FLOAT); ","SELECT city_name, AVG(waste_generated/population) OVER (PARTITION BY city_name) as avg_waste_per_capita FROM city_waste_generation;","SELECT city_name, AVG(waste_generated / population) as avg_waste_generated_per_capita FROM city_waste_generation GROUP BY city_name;",0 What is the minimum rating of hotels in Europe that have adopted AI technology?,"CREATE TABLE hotels (hotel_id INT, hotel_name TEXT, country TEXT, rating FLOAT, ai_adoption BOOLEAN); ",SELECT MIN(rating) FROM hotels WHERE ai_adoption = true AND country = 'Europe';,SELECT MIN(rating) FROM hotels WHERE country = 'Europe' AND ai_adoption = true;,0 "Which Played is the lowest one that has a Team of vasco da gama, and an Against smaller than 11?","CREATE TABLE table_name_54 (played INTEGER, team VARCHAR, against VARCHAR);","SELECT MIN(played) FROM table_name_54 WHERE team = ""vasco da gama"" AND against < 11;","SELECT MIN(played) FROM table_name_54 WHERE team = ""vasco da gama"" AND against 11;",0 Calculate the total sales for each crop type in Canada.,"CREATE TABLE Crops (id INT, farmer_id INT, crop_name VARCHAR(50), yield INT, sale_price DECIMAL(5,2)); ","SELECT crop_name, SUM(yield * sale_price) as total_sales FROM Crops WHERE farmer_id IN (SELECT id FROM Farmers WHERE location = 'Canada') GROUP BY crop_name;","SELECT crop_name, SUM(sale_price) as total_sales FROM Crops WHERE country = 'Canada' GROUP BY crop_name;",0 What Team's Pre-Season Manager's manner of departure was the end of tenure as caretaker?,"CREATE TABLE table_name_52 (team VARCHAR, position_in_table VARCHAR, manner_of_departure VARCHAR);","SELECT team FROM table_name_52 WHERE position_in_table = ""pre-season"" AND manner_of_departure = ""end of tenure as caretaker"";","SELECT team FROM table_name_52 WHERE position_in_table = ""pre-season manager"" AND manner_of_departure = ""end of tenure as caretaker"";",0 What is the average number of followers per post for users in the social_media schema?,"CREATE TABLE users (id INT, name VARCHAR(50), posts_count INT, followers INT); CREATE TABLE posts (id INT, user_id INT, post_text VARCHAR(255));",SELECT AVG(followers / posts_count) FROM users JOIN posts ON users.id = posts.user_id;,SELECT AVG(users.followers) FROM users INNER JOIN posts ON users.id = posts.user_id;,0 Who was the outgoing manager replaced by Marian Bucurescu?,"CREATE TABLE table_17115950_2 (outgoing_manager VARCHAR, replaced_by VARCHAR);","SELECT outgoing_manager FROM table_17115950_2 WHERE replaced_by = ""Marian Bucurescu"";","SELECT outgoing_manager FROM table_17115950_2 WHERE replaced_by = ""Mariana Bucurescu"";",0 Delete all records in the 'proteins' table where the 'molecular_weight' is greater than 100000,"CREATE TABLE proteins (id INT PRIMARY KEY, name TEXT, molecular_weight INT);",DELETE FROM proteins WHERE molecular_weight > 100000;,DELETE FROM proteins WHERE molecular_weight > 100000;,1 Show the machine types and their average production rates in the electronics manufacturing industry.,"CREATE TABLE machine_types (machine_type VARCHAR(50), industry VARCHAR(50), production_rate FLOAT); ","SELECT machine_type, AVG(production_rate) FROM machine_types WHERE industry = 'Electronics' GROUP BY machine_type;","SELECT machine_type, AVG(production_rate) FROM machine_types WHERE industry = 'Electronics' GROUP BY machine_type;",1 What is the most popular virtual reality game among players aged 18-24?,"CREATE TABLE player (player_id INT, name VARCHAR(50), age INT, vr_game VARCHAR(50)); ","SELECT vr_game, COUNT(*) FROM player WHERE age BETWEEN 18 AND 24 GROUP BY vr_game ORDER BY COUNT(*) DESC LIMIT 1;","SELECT vr_game, COUNT(*) as num_players FROM player WHERE age BETWEEN 18 AND 24 GROUP BY vr_game ORDER BY num_players DESC LIMIT 1;",0 What was the score of the team that danced a jive and was safe?,"CREATE TABLE table_name_65 (score VARCHAR, dance VARCHAR, result VARCHAR);","SELECT score FROM table_name_65 WHERE dance = ""jive"" AND result = ""safe"";","SELECT score FROM table_name_65 WHERE dance = ""jive"" AND result = ""safe"";",1 What is the total amount of resources depleted from each mining site in 2019?,"CREATE TABLE Resources (ResourceID INT, SiteID INT, Year INT, Quantity INT); ","SELECT SiteID, SUM(Quantity) FROM Resources WHERE Year = 2019 GROUP BY SiteID;","SELECT SiteID, SUM(Quantity) FROM Resources WHERE Year = 2019 GROUP BY SiteID;",1 How many skincare and haircare products have been launched in the last year in Canada?,"CREATE TABLE canada_products (product_id INT, product_category VARCHAR(50), launch_date DATE); ","SELECT COUNT(*) FROM canada_products WHERE product_category IN ('Skincare', 'Haircare') AND launch_date >= DATEADD(year, -1, CURRENT_DATE);","SELECT COUNT(*) FROM canada_products WHERE product_category IN ('skincare', 'haircare') AND launch_date >= DATEADD(year, -1, GETDATE());",0 How many products have been discontinued for each brand?,"CREATE TABLE product_status (id INT, brand VARCHAR(255), is_discontinued BOOLEAN); ","SELECT brand, COUNT(*) as discontinued_products FROM product_status WHERE is_discontinued = true GROUP BY brand;","SELECT brand, COUNT(*) FROM product_status WHERE is_discontinued = true GROUP BY brand;",0 WHich province has an IATA of UYN?,"CREATE TABLE table_name_12 (province VARCHAR, iata VARCHAR);","SELECT province FROM table_name_12 WHERE iata = ""uyn"";","SELECT province FROM table_name_12 WHERE iata = ""uyn"";",1 Add a new table with information about lawyers,"CREATE TABLE lawyers (id INT PRIMARY KEY, name VARCHAR(255), state VARCHAR(2));","CREATE TABLE lawyer_cases (id INT PRIMARY KEY, lawyer_id INT, case_number VARCHAR(50), FOREIGN KEY (lawyer_id) REFERENCES lawyers(id));","INSERT INTO lawyers (id, name, state) VALUES (1, 'Michael', 'New York');",0 What was the first season of the club who last won a title in 2012?,"CREATE TABLE table_1096793_1 (first_season VARCHAR, last_title VARCHAR);","SELECT first_season FROM table_1096793_1 WHERE last_title = ""2012"";","SELECT first_season FROM table_1096793_1 WHERE last_title = ""2012"";",1 Name the most decile for roll of 428,"CREATE TABLE table_name_94 (decile INTEGER, roll VARCHAR);",SELECT MAX(decile) FROM table_name_94 WHERE roll = 428;,SELECT MAX(decile) FROM table_name_94 WHERE roll = 428;,1 "What is the total number of top-25 in the Masters Tournament, which has 0 top-10 and more than 0 top-5?","CREATE TABLE table_name_16 (top_25 VARCHAR, top_5 VARCHAR, top_10 VARCHAR, tournament VARCHAR);","SELECT COUNT(top_25) FROM table_name_16 WHERE top_10 = 0 AND tournament = ""masters tournament"" AND top_5 > 0;","SELECT COUNT(top_25) FROM table_name_16 WHERE top_10 = 0 AND tournament = ""masters"" AND top_5 > 0;",0 On what date was the record 59–59?,"CREATE TABLE table_name_62 (date VARCHAR, record VARCHAR);","SELECT date FROM table_name_62 WHERE record = ""59–59"";","SELECT date FROM table_name_62 WHERE record = ""59–59"";",1 "What is the total investment in ethical funds in Oceania, excluding New Zealand?","CREATE TABLE ethical_funds (id INT, investment DECIMAL(10,2), location VARCHAR(50)); ",SELECT SUM(investment) FROM ethical_funds WHERE location <> 'New Zealand' AND location = 'Oceania';,SELECT SUM(investment) FROM ethical_funds WHERE location = 'Oceania' AND location!= 'New Zealand';,0 "What is the policy number, policy type, and coverage amount for policies with a policy start date within the last 30 days?","CREATE TABLE policies (policy_number INT, policy_type VARCHAR(50), coverage_amount INT, policy_start_date DATE); ","SELECT policy_number, policy_type, coverage_amount FROM policies WHERE policy_start_date >= CURDATE() - INTERVAL 30 DAY;","SELECT policy_number, policy_type, coverage_amount FROM policies WHERE policy_start_date >= DATEADD(day, -30, GETDATE());",0 What is the average price per gram of sativa strains sold by dispensaries in Oakland?,"CREATE TABLE dispensaries (id INT, name TEXT, city TEXT, state TEXT); CREATE TABLE strains (id INT, name TEXT, type TEXT, price_per_gram DECIMAL); ",SELECT AVG(price_per_gram) FROM strains JOIN dispensaries ON FALSE WHERE strains.type = 'sativa' AND dispensaries.city = 'Oakland';,SELECT AVG(strains.price_per_gram) FROM strains INNER JOIN dispensaries ON strains.id = dispensaries.id WHERE strains.type ='sativa' AND dispensaries.city = 'Oakland';,0 What is the maximum carbon sequestration in Asian forests?,"CREATE TABLE forests (id INT, country VARCHAR(255), region VARCHAR(255), carbon_sequestration FLOAT);",SELECT MAX(carbon_sequestration) FROM forests WHERE region = 'Asia';,SELECT MAX(carbon_sequestration) FROM forests WHERE region = 'Asia';,1 Which programs received donations from the most zip codes in the US in 2020?,"CREATE TABLE DonationsByZip (DonationID int, DonorZip varchar(10), ProgramID int); ","SELECT ProgramName, COUNT(DISTINCT DonorZip) as ZipCodes FROM DonationsByZip DBZ JOIN Programs P ON DBZ.ProgramID = P.ProgramID WHERE DonationDate BETWEEN '2020-01-01' AND '2020-12-31' AND DonorZip LIKE '______' GROUP BY ProgramName ORDER BY ZipCodes DESC, ProgramName ASC;","SELECT ProgramID, COUNT(*) as TotalDonations FROM DonationsByZip WHERE DonorZip = 'US' AND YEAR(DonationDate) = 2020 GROUP BY ProgramID ORDER BY TotalDonations DESC LIMIT 1;",0 "What is the total number of military equipment sold to each country and the total quantity sold, ordered by the total quantity sold in descending order?","CREATE TABLE military_sales (id INT PRIMARY KEY, seller VARCHAR(255), buyer VARCHAR(255), equipment_type VARCHAR(255), quantity INT);","SELECT buyer, SUM(quantity) FROM military_sales GROUP BY buyer ORDER BY SUM(quantity) DESC;","SELECT country, SUM(quantity) as total_quantity, SUM(quantity) as total_quantity FROM military_sales GROUP BY country ORDER BY total_quantity DESC;",0 "What is the number of employees in the ""mining_operations"" table, who are older than 40 and working in the ""management"" department?","CREATE TABLE mining_operations (id INT, name VARCHAR(50), department VARCHAR(50), age INT);",SELECT COUNT(*) FROM mining_operations WHERE department = 'management' AND age > 40;,SELECT COUNT(*) FROM mining_operations WHERE department ='management' AND age > 40;,0 "How many community development initiatives were completed in the last 2 years, categorized by project type, region, and status?","CREATE TABLE initiative (initiative_id INT, initative_start_date DATE, initative_end_date DATE, budget FLOAT, region VARCHAR(50), status VARCHAR(50)); ","SELECT EXTRACT(YEAR FROM initative_end_date) - EXTRACT(YEAR FROM initative_start_date) AS years_diff, region, status, project_type, COUNT(*) AS num_initiatives FROM initiative WHERE initative_end_date >= (CURRENT_DATE - INTERVAL '2 years') GROUP BY region, status, project_type, years_diff ORDER BY region, num_initiatives DESC;","SELECT project_type, region, status, COUNT(*) FROM initiative WHERE initative_start_date >= DATEADD(year, -2, GETDATE()) GROUP BY project_type, region, status;",0 Which office has 1 New Hampshire as a third place state?,"CREATE TABLE table_20246201_9 (office VARCHAR, states___third_place VARCHAR);","SELECT office FROM table_20246201_9 WHERE states___third_place = ""1 New Hampshire"";","SELECT office FROM table_20246201_9 WHERE states___third_place = ""1 New Hampshire"";",1 How many venues were used on 10 Mar 2007?,"CREATE TABLE table_14981555_3 (venue VARCHAR, date VARCHAR);","SELECT venue FROM table_14981555_3 WHERE date = ""10 Mar 2007"";","SELECT COUNT(venue) FROM table_14981555_3 WHERE date = ""10 Mar 2007"";",0 Determine the percentage of 'Vegan' products in the 'Skin Care' category.,"CREATE TABLE products (product_id INT, product_name TEXT, category TEXT, vegan_friendly BOOLEAN); ",SELECT 100.0 * COUNT(*) / (SELECT COUNT(*) FROM products WHERE category = 'Skin Care') AS pct_vegan_skin_care FROM products WHERE category = 'Skin Care' AND vegan_friendly = true;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM products WHERE category = 'Skin Care')) FROM products WHERE category = 'Skin Care' AND vegan_friendly = true;,0 What is the average prize pool for esports events?,"CREATE TABLE EsportsEvents (EventID INT, EventName VARCHAR(50), PrizePool DECIMAL(10,2)); ",SELECT AVG(PrizePool) FROM EsportsEvents;,SELECT AVG(PrizePool) FROM EsportsEvents;,1 "What is High Points, when Game is less than 82, when Location Attendance is ""Quicken Loans Arena 20,562"", and when High Rebounds is ""Žydrūnas Ilgauskas (13)""?","CREATE TABLE table_name_19 (high_points VARCHAR, high_rebounds VARCHAR, game VARCHAR, location_attendance VARCHAR);","SELECT high_points FROM table_name_19 WHERE game < 82 AND location_attendance = ""quicken loans arena 20,562"" AND high_rebounds = ""žydrūnas ilgauskas (13)"";","SELECT high_points FROM table_name_19 WHERE game 82 AND location_attendance = ""quicken loans arena 20,562"" AND high_rebounds = ""ydrnas ilgauskas (13)"";",0 "Which score has a competition of 1997 dunhill cup malaysia and february 23, 1997 as the date?","CREATE TABLE table_name_92 (score VARCHAR, competition VARCHAR, date VARCHAR);","SELECT score FROM table_name_92 WHERE competition = ""1997 dunhill cup malaysia"" AND date = ""february 23, 1997"";","SELECT score FROM table_name_92 WHERE competition = ""1997 dunhill cup malaysia"" AND date = ""february 23, 1997"";",1 Find the total biomass of fish in the sustainable_seafood_trends_3 table for each fishing_method.,"CREATE TABLE sustainable_seafood_trends_3 (fishing_method VARCHAR(255), biomass FLOAT); ","SELECT fishing_method, SUM(biomass) FROM sustainable_seafood_trends_3 GROUP BY fishing_method;","SELECT fishing_method, SUM(biomass) FROM sustainable_seafood_trends_3 GROUP BY fishing_method;",1 Please show each industry and the corresponding number of companies in that industry.,CREATE TABLE Companies (Industry VARCHAR);,"SELECT Industry, COUNT(*) FROM Companies GROUP BY Industry;","SELECT Industry, COUNT(*) FROM Companies GROUP BY Industry;",1 Which episode is number 3 in the season?,"CREATE TABLE table_29960651_5 (episode VARCHAR, no_for_season VARCHAR);",SELECT episode FROM table_29960651_5 WHERE no_for_season = 3;,SELECT episode FROM table_29960651_5 WHERE no_for_season = 3;,1 What is the average score of players who have achieved more than 10 victories in the game 'Galactic Battles'?,"CREATE TABLE Galactic_Battles (Player_ID INT, Player_Name VARCHAR(50), Score INT, Victories INT); ",SELECT AVG(Score) FROM Galactic_Battles WHERE Victories > 10 AND Game_Name = 'Galactic Battles';,SELECT AVG(Score) FROM Galactic_Battles WHERE Victories > 10;,0 "What is the average salary of workers in the manufacturing industry, grouped by their job role and location?","CREATE TABLE salaries (worker_id INT, job_role VARCHAR(255), location VARCHAR(255), salary FLOAT);","SELECT location, job_role, AVG(salary) FROM salaries GROUP BY location, job_role;","SELECT job_role, location, AVG(salary) as avg_salary FROM salaries WHERE industry = 'Manufacturing' GROUP BY job_role, location;",0 Insert new student records for 'Oregon' and 'Washington' who have completed their mental health counseling,"CREATE TABLE NewStudents (StudentID INT, State VARCHAR(10), Counseling VARCHAR(10)); ","INSERT INTO NewStudents (StudentID, State, Counseling) VALUES (3, 'Oregon', 'Completed'), (4, 'Washington', 'Completed');","INSERT INTO NewStudents (StudentID, State, Counseling) VALUES ('Oregon', 'Washington');",0 What is the average speed of electric vehicles in 'paris'?,"CREATE TABLE if not exists cities (city varchar(20)); CREATE TABLE if not exists vehicle_data (vehicle_type varchar(20), city varchar(20), speed float); ",SELECT AVG(speed) FROM vehicle_data WHERE vehicle_type = 'electric' AND city = 'paris';,SELECT AVG(speed) FROM vehicle_data WHERE vehicle_type = 'Electric' AND city = 'Paris';,0 List the species and maximum depth for deep-sea fish found in the Indian Ocean.,"CREATE TABLE deep_sea_fish (species VARCHAR(255), ocean VARCHAR(255), max_depth INT); ","SELECT species, max_depth FROM deep_sea_fish WHERE ocean = 'Indian Ocean'","SELECT species, max_depth FROM deep_sea_fish WHERE ocean = 'Indian Ocean';",0 What is the maximum transaction value for the 'Gaming' industry sector in the 'DOGE' digital asset in Q2 2022?,"CREATE TABLE transaction_values (industry_sector VARCHAR(10), asset_name VARCHAR(10), quarter INT, max_transaction_value INT); ",SELECT max_transaction_value FROM transaction_values WHERE industry_sector = 'Gaming' AND asset_name = 'DOGE' AND quarter = 2;,SELECT MAX(max_transaction_value) FROM transaction_values WHERE industry_sector = 'Gaming' AND asset_name = 'DOGE' AND quarter = 2;,0 "What are the total number of speakers and number of endangered languages in each continent, excluding Antarctica?","CREATE TABLE Languages (Language_Name VARCHAR(50), Continent VARCHAR(50), Number_Speakers INT, Endangered BOOLEAN); ","SELECT Continent, SUM(Number_Speakers) AS Total_Speakers, COUNT(*) AS Endangered_Languages FROM Languages WHERE Continent NOT IN ('Antarctica') GROUP BY Continent;","SELECT Continent, SUM(Number_Speakers) as Total_Speakers, SUM(Endangered) as Total_Endangered FROM Languages WHERE Continent!= 'Antarctica' GROUP BY Continent;",0 Which team won at winton motor raceway?,"CREATE TABLE table_name_5 (team VARCHAR, circuit VARCHAR);","SELECT team FROM table_name_5 WHERE circuit = ""winton motor raceway"";","SELECT team FROM table_name_5 WHERE circuit = ""winton motor raceway"";",1 "What is Location Attendance, when High Assists is ""Rafer Alston (7)"", and when High Rebounds is ""Yao Ming (13)""?","CREATE TABLE table_name_64 (location_attendance VARCHAR, high_assists VARCHAR, high_rebounds VARCHAR);","SELECT location_attendance FROM table_name_64 WHERE high_assists = ""rafer alston (7)"" AND high_rebounds = ""yao ming (13)"";","SELECT location_attendance FROM table_name_64 WHERE high_assists = ""rafer alston (7)"" AND high_rebounds = ""yao ming (13)"";",1 What is the highest place of a swimmer from the Netherlands?,"CREATE TABLE table_name_75 (rank INTEGER, nationality VARCHAR);","SELECT MAX(rank) FROM table_name_75 WHERE nationality = ""netherlands"";","SELECT MAX(rank) FROM table_name_75 WHERE nationality = ""niederlande"";",0 Name the series ep for darts,"CREATE TABLE table_name_27 (series_ep VARCHAR, segment_d VARCHAR);","SELECT series_ep FROM table_name_27 WHERE segment_d = ""darts"";","SELECT series_ep FROM table_name_27 WHERE segment_d = ""darts"";",1 "Delete records from the ""military_equipment"" table where the quantity is less than 10","CREATE TABLE military_equipment (id INT, equipment_name VARCHAR(50), quantity INT); ",DELETE FROM military_equipment WHERE quantity < 10;,DELETE FROM military_equipment WHERE quantity 10;,0 What is the average age of patients who were diagnosed with depression and anxiety disorders in 2021?,"CREATE TABLE diagnoses (patient_id INT, age INT, diagnosis_name VARCHAR(50), diagnosis_date DATE); ","SELECT AVG(age) FROM diagnoses WHERE diagnosis_name IN ('Depression', 'Anxiety Disorder') AND YEAR(diagnosis_date) = 2021;","SELECT AVG(age) FROM diagnoses WHERE diagnosis_name IN ('Depression', 'Anxiety') AND diagnosis_date BETWEEN '2021-01-01' AND '2021-12-31';",0 List unique last names of attorneys who handled more than 20 immigration cases and their respective counts.,"CREATE TABLE immigration_cases (case_id INT, attorney_id INT, attorney_last_name VARCHAR(50));","SELECT attorney_last_name, COUNT(*) as case_count FROM immigration_cases GROUP BY attorney_last_name HAVING COUNT(*) > 20;","SELECT DISTINCT attorney_last_name, COUNT(*) FROM immigration_cases GROUP BY attorney_last_name HAVING COUNT(*) > 20;",0 "How many sustainable sourcing certifications does each restaurant have, grouped by certification type?","CREATE TABLE Certifications (restaurant TEXT, certification TEXT); ","SELECT certification, COUNT(DISTINCT restaurant) FROM Certifications GROUP BY certification;","SELECT restaurant, certification, COUNT(*) FROM Certifications GROUP BY restaurant, certification;",0 What are the cities whose population is between 160000 and 900000?,"CREATE TABLE city (name VARCHAR, Population INTEGER);",SELECT name FROM city WHERE Population BETWEEN 160000 AND 900000;,SELECT name FROM city WHERE Population BETWEEN 160000 AND 900000;,1 What is the average price of artworks created by female artists?,"CREATE TABLE Artworks (id INT, title TEXT, artist_id INT, price INT); CREATE TABLE Artists (id INT, name TEXT, gender TEXT, birth_year INT, death_year INT); ",SELECT AVG(Artworks.price) FROM Artworks INNER JOIN Artists ON Artworks.artist_id = Artists.id WHERE Artists.gender = 'Female';,SELECT AVG(Artworks.price) FROM Artworks INNER JOIN Artists ON Artworks.artist_id = Artists.id WHERE Artists.gender = 'Female';,1 Which party was Andrea Ronchi from?,"CREATE TABLE table_name_85 (party VARCHAR, minister VARCHAR);","SELECT party FROM table_name_85 WHERE minister = ""andrea ronchi"";","SELECT party FROM table_name_85 WHERE minister = ""andrea ronchi"";",1 "How many clubs does the student named ""Eric Tai"" belong to?","CREATE TABLE student (stuid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR);","SELECT COUNT(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = ""Eric"" AND t3.lname = ""Tai"";","SELECT COUNT(*) FROM club AS T1 JOIN member_of_club AS T2 ON T1.clubid = T2.clubid JOIN student AS T3 ON T2.stuid = T3.stuid WHERE T3.fname = ""Eric Tai"";",0 When did the technical knockout against Fatu Tuimanono happen?,"CREATE TABLE table_name_24 (date VARCHAR, method VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_24 WHERE method = ""technical knockout"" AND opponent = ""fatu tuimanono"";","SELECT date FROM table_name_24 WHERE method = ""technical knockout"" AND opponent = ""fatu tuimanono"";",1 What is the total waste generation by month for the material 'Metal' in 2021?,"CREATE TABLE monthly_waste_generation (month VARCHAR(10), year INT, material VARCHAR(20), quantity INT); ","SELECT STRFTIME('%m', month) as month, SUM(quantity) as total_waste FROM monthly_waste_generation WHERE year = 2021 AND material = 'Metal' GROUP BY STRFTIME('%m', month);","SELECT month, SUM(quantity) FROM monthly_waste_generation WHERE material = 'Metal' AND year = 2021 GROUP BY month;",0 how many big wins does peru state college have,"CREATE TABLE table_14115168_4 (national_titles VARCHAR, school VARCHAR);","SELECT COUNT(national_titles) FROM table_14115168_4 WHERE school = ""Peru State College"";","SELECT national_titles FROM table_14115168_4 WHERE school = ""Peru State College"";",0 What is the highest number of amendments cosponsored associated with 53 amendments originally cosponsored and over 54 bills sponsored?,"CREATE TABLE table_name_25 (all_amendments_cosponsored INTEGER, amendments_originally_cosponsored VARCHAR, all_bills_sponsored VARCHAR);",SELECT MAX(all_amendments_cosponsored) FROM table_name_25 WHERE amendments_originally_cosponsored = 53 AND all_bills_sponsored > 54;,SELECT MAX(all_amendments_cosponsored) FROM table_name_25 WHERE amendments_originally_cosponsored = 53 AND all_bills_sponsored > 54;,1 What position was Jafus White who was picked after round 1?,"CREATE TABLE table_name_87 (position VARCHAR, round VARCHAR, player VARCHAR);","SELECT position FROM table_name_87 WHERE round > 1 AND player = ""jafus white"";","SELECT position FROM table_name_87 WHERE round > 1 AND player = ""jafus white"";",1 What is the final win percentage of the Sault Ste. Marie Greyhounds? ,"CREATE TABLE table_17751942_4 (final_win__percentage VARCHAR, team VARCHAR);","SELECT final_win__percentage FROM table_17751942_4 WHERE team = ""Sault Ste. Marie Greyhounds"";","SELECT final_win__percentage FROM table_17751942_4 WHERE team = ""Sault Ste. Marie Greyhounds"";",1 What is the total revenue generated by Latin music artists in 2020?,"CREATE TABLE artists (id INT, name VARCHAR, genre VARCHAR, revenue FLOAT); CREATE TABLE sales (artist_id INT, year INT, revenue FLOAT); ",SELECT SUM(sales.revenue) FROM sales JOIN artists ON sales.artist_id = artists.id WHERE artists.genre = 'Latin' AND sales.year = 2020;,SELECT SUM(sales.revenue) FROM sales INNER JOIN artists ON sales.artist_id = artists.id WHERE artists.genre = 'Latin' AND sales.year = 2020;,0 What is the total number of professional development courses completed by teachers in each school?,"CREATE TABLE schools (school_id INT, school_name TEXT, num_teachers INT); CREATE TABLE courses (course_id INT, course_name TEXT, school_id INT, teacher_id INT); ","SELECT school_name, COUNT(course_id) as num_courses FROM schools JOIN courses ON schools.school_id = courses.school_id GROUP BY school_name;","SELECT s.school_name, SUM(c.course_id) as total_courses FROM schools s JOIN courses c ON s.school_id = c.school_id GROUP BY s.school_name;",0 "Add new record to sustainable_practices table with id 12, title 'Rainwater Harvesting Systems Installation', description 'Installation of rainwater harvesting systems on buildings', date '2022-05-05'","CREATE TABLE sustainable_practices (id INT, title VARCHAR(50), description TEXT, date DATE);","INSERT INTO sustainable_practices (id, title, description, date) VALUES (12, 'Rainwater Harvesting Systems Installation', 'Installation of rainwater harvesting systems on buildings', '2022-05-05');","INSERT INTO sustainable_practices (id, title, description, date) VALUES (12, 'Rainwater Harvesting Systems Installation', 'Installation of rainwater harvesting systems on buildings', '2022-05-05');",1 What is the average water usage in MWh per month for the industrial sector in 2020?,"CREATE TABLE avg_water_usage_per_month (year INT, sector VARCHAR(20), month INT, usage FLOAT); ",SELECT AVG(usage) FROM avg_water_usage_per_month WHERE year = 2020 AND sector = 'industrial';,SELECT AVG(usage) FROM avg_water_usage_per_month WHERE sector = 'Industrial' AND year = 2020;,0 List all songs that have been streamed more than any other song in their respective genre.,"CREATE TABLE genre_song_streams (genre VARCHAR(10), song_id INT, stream_count BIGINT);","SELECT genre, song_id, stream_count FROM genre_song_streams gss1 WHERE stream_count >= ALL (SELECT stream_count FROM genre_song_streams gss2 WHERE gss1.genre = gss2.genre) ORDER BY genre;","SELECT genre, SUM(stream_count) as total_streams FROM genre_song_streams GROUP BY genre HAVING total_streams > (SELECT SUM(stream_count) FROM genre_song_streams);",0 "Which Airing date has a Number of episodes larger than 20, and a Genre of modern drama?","CREATE TABLE table_name_39 (airing_date VARCHAR, number_of_episodes VARCHAR, genre VARCHAR);","SELECT airing_date FROM table_name_39 WHERE number_of_episodes > 20 AND genre = ""modern drama"";","SELECT airing_date FROM table_name_39 WHERE number_of_episodes > 20 AND genre = ""modern drama"";",1 "Delete a fleet from the ""fleets"" table","CREATE TABLE fleets (id INT PRIMARY KEY, name VARCHAR(255), country VARCHAR(255));",DELETE FROM fleets WHERE id = 1;,DELETE FROM fleets;,0 What is the least top division titles?,CREATE TABLE table_11250_4 (top_division_titles INTEGER);,SELECT MIN(top_division_titles) FROM table_11250_4;,SELECT MIN(top_division_titles) FROM table_11250_4;,1 How many tasks does each project have? List the task count and the project detail.,"CREATE TABLE Projects (project_details VARCHAR, project_id VARCHAR); CREATE TABLE Tasks (project_id VARCHAR);","SELECT COUNT(*), T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id;","SELECT T1.project_id, T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id;",0 "Insert a new menu item ""Veggie Burger"" with a price of $12.50","CREATE TABLE menu_items (item_id INT, name VARCHAR(50), price DECIMAL(5,2));","INSERT INTO menu_items (name, price) VALUES ('Veggie Burger', 12.50);","INSERT INTO menu_items (name, price) VALUES ('Veggie Burger', 12.50);",1 What are the total number of works in the 'Artworks' and 'Exhibitions' tables?,"CREATE TABLE Artworks (ArtworkID INT, Title TEXT); CREATE TABLE Exhibitions (ExhibitionID INT, Title TEXT); ",SELECT COUNT(*) FROM Artworks UNION ALL SELECT COUNT(*) FROM Exhibitions;,SELECT COUNT(DISTINCT Artworks.ArtworkID) FROM Artworks INNER JOIN Exhibitions ON Artworks.ArtworkID = Exhibitions.ExhibitionID;,0 How many players from Oceania have achieved 'Pro' status in any game?,"CREATE TABLE PlayerStatus (PlayerID INT, PlayerStatus VARCHAR(255), GameName VARCHAR(255)); CREATE TABLE Continents (ContinentID INT, Continent VARCHAR(255)); ",SELECT COUNT(DISTINCT PlayerStatus.PlayerID) FROM PlayerStatus JOIN Players ON PlayerStatus.PlayerID = Players.PlayerID JOIN Continents ON Players.ContinentID = Continents.ContinentID WHERE PlayerStatus = 'Pro' AND Continents.Continent = 'Oceania';,SELECT COUNT(DISTINCT PlayerID) FROM PlayerStatus INNER JOIN Continents ON PlayerStatus.PlayerID = Continents.ContinentID WHERE PlayerStatus.PlayerStatus = 'Pro' AND Continents.Continent = 'Oceania';,0 "Which restaurants in the city have a hygiene rating above 80? Display the restaurant ID, name, and hygiene rating.","CREATE TABLE restaurant_hygiene (restaurant_id INT, name TEXT, hygiene_rating INT); ","SELECT restaurant_id, name, hygiene_rating FROM restaurant_hygiene WHERE hygiene_rating > 80;","SELECT restaurant_id, name, hygiene_rating FROM restaurant_hygiene WHERE hygiene_rating > 80;",1 what team played on april 9,"CREATE TABLE table_name_58 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_58 WHERE date = ""april 9"";","SELECT opponent FROM table_name_58 WHERE date = ""april 9"";",1 "Update the R&D expenditure for 'DrugB' to $2,500,000 in Q3 2019.","CREATE TABLE rd_expenditure (drug_name TEXT, quarter INTEGER, year INTEGER, amount INTEGER); ",UPDATE rd_expenditure SET amount = 2500000 WHERE drug_name = 'DrugB' AND quarter = 3 AND year = 2019;,"UPDATE rd_expenditure SET amount = $2,500,000 WHERE drug_name = 'DrugB' AND quarter = 3 AND year = 2019;",0 "Find the total number of marine species and their observation counts in the Arctic Ocean, excluding fish.","CREATE TABLE arctic_marine_species (species VARCHAR(255), count INT); ","SELECT COUNT(DISTINCT species) AS species_count, SUM(count) AS total_count FROM arctic_marine_species WHERE species != 'Fish';","SELECT species, SUM(count) FROM arctic_marine_species WHERE species!= 'fish' GROUP BY species;",0 What is the maximum ocean acidification level recorded in the 'acidification_data' table?,"CREATE TABLE acidification_data (sample_id INT, location VARCHAR(255), level FLOAT);",SELECT MAX(level) FROM acidification_data;,SELECT MAX(level) FROM acidification_data;,1 What is the total number of shipments for each warehouse?,"CREATE TABLE shipments (shipment_id INT, warehouse_id VARCHAR(5), quantity INT); CREATE TABLE warehouses (warehouse_id VARCHAR(5), city VARCHAR(5), state VARCHAR(3)); ","SELECT warehouses.warehouse_id, COUNT(shipments.shipment_id) FROM warehouses LEFT JOIN shipments ON warehouses.warehouse_id = shipments.warehouse_id GROUP BY warehouses.warehouse_id;","SELECT w.warehouse_id, SUM(s.quantity) as total_shipments FROM shipments s JOIN warehouses w ON s.warehouse_id = w.warehouse_id GROUP BY w.warehouse_id;",0 who had high assists on december 3?,"CREATE TABLE table_27756314_7 (high_assists VARCHAR, date VARCHAR);","SELECT high_assists FROM table_27756314_7 WHERE date = ""December 3"";","SELECT high_assists FROM table_27756314_7 WHERE date = ""December 3"";",1 Insert a new record for a tennis match in France with 1500 tickets sold.,"CREATE TABLE matches (match_id INT, sport VARCHAR(50), location VARCHAR(50), tickets_sold INT);","INSERT INTO matches (match_id, sport, location, tickets_sold) VALUES (3, 'Tennis', 'France', 1500);","INSERT INTO matches (match_id, sport, location, tickets_sold) VALUES (1, 'Tennis', 'France', 1500);",0 What is the score of the match with deportes savio as the away team?,"CREATE TABLE table_name_57 (score VARCHAR, away VARCHAR);","SELECT score FROM table_name_57 WHERE away = ""deportes savio"";","SELECT score FROM table_name_57 WHERE away = ""deportes savio"";",1 "When did the 4th, Midwest season happen?","CREATE TABLE table_1990460_1 (year VARCHAR, regular_season VARCHAR);","SELECT year FROM table_1990460_1 WHERE regular_season = ""4th, Midwest"";","SELECT year FROM table_1990460_1 WHERE regular_season = ""4th, Midwest"";",1 "What label uses the stereo LP for catalog scyl-934,623?","CREATE TABLE table_name_24 (label VARCHAR, format VARCHAR, catalog VARCHAR);","SELECT label FROM table_name_24 WHERE format = ""stereo lp"" AND catalog = ""scyl-934,623"";","SELECT label FROM table_name_24 WHERE format = ""stereo lp"" AND catalog = ""scyl-934,623"";",1 What is the average number of autonomous driving research papers published in the UK?,"CREATE TABLE Research_Papers (year INT, country VARCHAR(50), topic VARCHAR(50), quantity INT); ",SELECT AVG(quantity) FROM Research_Papers WHERE year = 2020 AND country = 'UK' AND topic = 'Autonomous Driving';,SELECT AVG(quantity) FROM Research_Papers WHERE country = 'UK' AND topic = 'Autonomous Driving';,0 Identify the top 3 countries with the highest increase in international visitor expenditure between 2018 and 2022 that have implemented sustainable tourism practices.,"CREATE TABLE tourism_spending_ext (id INT, country VARCHAR(50), year INT, international_visitors INT, total_expenditure FLOAT, sustainability_practice BOOLEAN); ","SELECT t1.country, (t1.total_expenditure - t2.total_expenditure) as expenditure_increase FROM tourism_spending_ext t1 JOIN tourism_spending_ext t2 ON t1.country = t2.country AND t1.year = 2022 AND t2.year = 2018 WHERE t1.sustainability_practice = true GROUP BY t1.country ORDER BY expenditure_increase DESC LIMIT 3;","SELECT country, SUM(total_expenditure) as total_expenditure FROM tourism_spending_ext WHERE year BETWEEN 2018 AND 2022 AND sustainability_practice = TRUE GROUP BY country ORDER BY total_expenditure DESC LIMIT 3;",0 What is the total quantity of organic ingredients used in menu items?,"CREATE TABLE Dishes (DishID INT, Name VARCHAR(50), Quantity INT); CREATE TABLE Ingredients (IngredientID INT, DishID INT, Quantity INT, Organic BOOLEAN); ",SELECT SUM(i.Quantity) FROM Dishes d JOIN Ingredients i ON d.DishID = i.DishID WHERE i.Organic = TRUE;,SELECT SUM(Quantity) FROM Dishes d JOIN Ingredients i ON d.DishID = i.DishID WHERE i.Organic = true;,0 Name the wickets when overs bowled is 9,"CREATE TABLE table_15700367_4 (wickets VARCHAR, overs_bowled VARCHAR);","SELECT wickets FROM table_15700367_4 WHERE overs_bowled = ""9"";",SELECT wickets FROM table_15700367_4 WHERE overs_bowled = 9;,0 Calculate the total waste produced by each menu category in the past year.,"CREATE TABLE waste (waste_id INT, menu_item_id INT, waste_amount INT, waste_date DATE); CREATE TABLE menu_items (menu_item_id INT, category VARCHAR(255)); ","SELECT c1.category, SUM(w1.waste_amount) AS total_waste FROM waste w1 INNER JOIN menu_items m1 ON w1.menu_item_id = m1.menu_item_id INNER JOIN (SELECT menu_item_id, category FROM menu_items EXCEPT SELECT menu_item_id, category FROM menu_items WHERE menu_item_id NOT IN (SELECT menu_item_id FROM waste)) c1 ON m1.menu_item_id = c1.menu_item_id WHERE w1.waste_date > DATEADD(year, -1, GETDATE()) GROUP BY c1.category;","SELECT m.category, SUM(w.waste_amount) as total_waste FROM waste w JOIN menu_items m ON w.menu_item_id = m.menu_item_id WHERE w.waste_date >= DATEADD(year, -1, GETDATE()) GROUP BY m.category;",0 What is the total number of articles published by 'CNN' and 'Fox News' in the technology category?,"CREATE TABLE cnn (article_id INT, title TEXT, category TEXT, publisher TEXT); CREATE TABLE fox_news (article_id INT, title TEXT, category TEXT, publisher TEXT); ",SELECT COUNT(*) FROM ( (SELECT * FROM cnn WHERE category = 'Technology') UNION (SELECT * FROM fox_news WHERE category = 'Technology') );,SELECT COUNT(*) FROM cnn INNER JOIN fox_news ON cnn.article_id = fox_news.article_id WHERE category = 'technology';,0 What is the average age of employees who have completed diversity training?,"CREATE TABLE EmployeeTraining (EmployeeID INT, Age INT, DiversityTraining BOOLEAN); ",SELECT AVG(Age) FROM EmployeeTraining WHERE DiversityTraining = TRUE;,SELECT AVG(Age) FROM EmployeeTraining WHERE DiversityTraining = TRUE;,1 How many clinical trials failed in 2015?,"CREATE TABLE PharmaTrials (DrugName TEXT, TrialYear INTEGER, Outcome TEXT); ",SELECT COUNT(*) FROM PharmaTrials WHERE TrialYear = 2015 AND Outcome = 'Failure';,SELECT COUNT(*) FROM PharmaTrials WHERE TrialYear = 2015 AND Outcome = 'Failed';,0 "When they played San Lorenzo, what was the score of the second leg?",CREATE TABLE table_17282875_3 (team__number1 VARCHAR);,"SELECT 2 AS nd_leg FROM table_17282875_3 WHERE team__number1 = ""San Lorenzo"";","SELECT score FROM table_17282875_3 WHERE team__number1 = ""San Lorenzo"";",0 What is the takeover date of the FA division mitre?,"CREATE TABLE table_name_19 (takeover_date VARCHAR, fa_division_s_ VARCHAR);","SELECT takeover_date FROM table_name_19 WHERE fa_division_s_ = ""mitre"";","SELECT takeover_date FROM table_name_19 WHERE fa_division_s_ = ""mitre"";",1 Who is the player born before 1985 who is less than 2.02 tall?,"CREATE TABLE table_name_2 (player VARCHAR, year_born VARCHAR, height VARCHAR);",SELECT player FROM table_name_2 WHERE year_born < 1985 AND height < 2.02;,SELECT player FROM table_name_2 WHERE year_born 1985 AND height 2.02;,0 Average CO2 emissions per MWh for renewable energy sources in Q1 2021?,"CREATE TABLE co2_emissions (quarter INT, source VARCHAR(255), emissions FLOAT); ","SELECT AVG(emissions) AS avg_emissions, source FROM co2_emissions WHERE quarter = 1 AND source IN ('Solar', 'Wind', 'Hydro') GROUP BY source;","SELECT source, AVG(emissions) FROM co2_emissions WHERE quarter = 1 GROUP BY source;",0 "Update threat information with the following details: [(1, 'APT28', 'Russia', 'state-sponsored'), (2, 'APT33', 'Iran', 'state-sponsored'), (3, 'APT38', 'North Korea', 'state-sponsored')] in the ""threats"" table","CREATE TABLE threats (id INT PRIMARY KEY, name VARCHAR(50), country VARCHAR(50), type VARCHAR(20));","UPDATE threats SET country = CASE id WHEN 1 THEN 'Russia' WHEN 2 THEN 'Iran' WHEN 3 THEN 'North Korea' END, type = 'state-sponsored' WHERE id IN (1, 2, 3);",UPDATE threats SET name = 'Russia' WHERE country = 'Russia' AND type ='state-sponsored';,0 what is the silver for mexico?,"CREATE TABLE table_name_9 (silver VARCHAR, nation VARCHAR);","SELECT silver FROM table_name_9 WHERE nation = ""mexico"";","SELECT silver FROM table_name_9 WHERE nation = ""mexico"";",1 "What is the average cost of materials for water treatment plants constructed in California since 2010, ordered by the date of construction?","CREATE TABLE water_treatment_plants (id INT, location VARCHAR(255), construction_date DATE, material_cost FLOAT); ",SELECT AVG(material_cost) FROM water_treatment_plants WHERE location = 'California' AND construction_date >= '2010-01-01' GROUP BY construction_date ORDER BY construction_date;,SELECT AVG(material_cost) FROM water_treatment_plants WHERE location = 'California' AND construction_date >= '2010-01-01' ORDER BY construction_date;,0 "What is the date with 68,463 in attendance?","CREATE TABLE table_name_82 (date VARCHAR, attendance VARCHAR);","SELECT date FROM table_name_82 WHERE attendance = ""68,463"";","SELECT date FROM table_name_82 WHERE attendance = ""68,463"";",1 What are the total installed solar panel capacities for power plants in Mexico?,"CREATE TABLE Power_Plant (id INT, name VARCHAR(50), solar_panel_capacity FLOAT, country VARCHAR(50)); ",SELECT SUM(solar_panel_capacity) FROM Power_Plant WHERE country = 'Mexico' AND type = 'Solar Power Plant';,SELECT SUM(solar_panel_capacity) FROM Power_Plant WHERE country = 'Mexico';,0 Find the number of games played by athletes named 'John',athlete_stats; athlete_demographics,"SELECT athlete_stats.athlete_id, COUNT(athlete_stats.games_played) as games_played_count FROM athlete_stats INNER JOIN athlete_demographics ON athlete_stats.athlete_id = athlete_demographics.id WHERE athlete_demographics.name = 'John' GROUP BY athlete_stats.athlete_id;",SELECT COUNT(*) FROM athlete_stats; athlete_demographics WHERE athlete_name = 'John';,0 What is the average response time for emergency calls and fire incidents in the downtown area?,"CREATE TABLE emergency_calls (id INT, location VARCHAR(20), response_time INT); CREATE TABLE fire_incidents (id INT, location VARCHAR(20), response_time INT); ",SELECT AVG(response_time) FROM emergency_calls WHERE location = 'downtown' UNION ALL SELECT AVG(response_time) FROM fire_incidents WHERE location = 'downtown';,SELECT AVG(response_time) FROM emergency_calls INNER JOIN fire_incidents ON emergency_calls.location = fire_incidents.location WHERE location = 'Downtown';,0 What was the total revenue for the state of California in January 2022?,"CREATE TABLE sales (id INT, state VARCHAR(20), revenue DECIMAL(10,2), month INT, year INT);",SELECT SUM(revenue) FROM sales WHERE state = 'California' AND month = 1 AND year = 2022;,SELECT SUM(revenue) FROM sales WHERE state = 'California' AND month = 1 AND year = 2022;,1 "Name the Surface which has a Score in the final of 6–3, 6–2 and Opponents in the final of mansour bahrami diego pérez?","CREATE TABLE table_name_87 (surface VARCHAR, score_in_the_final VARCHAR, opponents_in_the_final VARCHAR);","SELECT surface FROM table_name_87 WHERE score_in_the_final = ""6–3, 6–2"" AND opponents_in_the_final = ""mansour bahrami diego pérez"";","SELECT surface FROM table_name_87 WHERE score_in_the_final = ""6–3, 6–2"" AND opponents_in_the_final = ""mansour bahrami diego pérez"";",1 How many graduate students in the Biology department have published at least one paper?,"CREATE SCHEMA if not exists higher_ed;CREATE TABLE if not exists higher_ed.students(id INT, name VARCHAR(255), department VARCHAR(255));CREATE TABLE if not exists higher_ed.publications(id INT, title VARCHAR(255), author_id INT);",SELECT COUNT(DISTINCT s.id) FROM higher_ed.students s JOIN higher_ed.publications p ON s.id = p.author_id WHERE s.department = 'Biology';,SELECT COUNT(*) FROM higher_ed.students INNER JOIN higher_ed.publications ON higher_ed.students.id = higher_ed.publications.author_id WHERE higher_ed.students.department = 'Biology';,0 What is the name and region of the state with the highest spending on public education?,"CREATE TABLE state_education_spending (state VARCHAR(255), education_spending DECIMAL(10,2), region VARCHAR(255)); ","SELECT state, region FROM state_education_spending ORDER BY education_spending DESC LIMIT 1;","SELECT state, region FROM state_education_spending WHERE education_spending = (SELECT MAX(education_spending) FROM state_education_spending);",0 What is the score for the match where the opponent in the final was james cerretani todd perry?,"CREATE TABLE table_name_5 (score VARCHAR, opponents_in_the_final VARCHAR);","SELECT score FROM table_name_5 WHERE opponents_in_the_final = ""james cerretani todd perry"";","SELECT score FROM table_name_5 WHERE opponents_in_the_final = ""james cerretani todd perry"";",1 What percentage of the votes in Tippah did Obama get?,"CREATE TABLE table_20799587_1 (obama_percentage VARCHAR, county VARCHAR);","SELECT obama_percentage FROM table_20799587_1 WHERE county = ""Tippah"";","SELECT obama_percentage FROM table_20799587_1 WHERE county = ""Tippah"";",1 What is the production number for Bell Hoppy in the MM Series?,"CREATE TABLE table_name_21 (production_number VARCHAR, series VARCHAR, title VARCHAR);","SELECT COUNT(production_number) FROM table_name_21 WHERE series = ""mm"" AND title = ""bell hoppy"";","SELECT production_number FROM table_name_21 WHERE series = ""mm"" AND title = ""bell hoppy"";",0 "How many cultural heritage sites are there in Germany, Austria, and Switzerland?","CREATE TABLE heritage_sites (site_id INT, site_name TEXT, country TEXT); ","SELECT COUNT(*) FROM heritage_sites WHERE country IN ('Germany', 'Austria', 'Switzerland');","SELECT COUNT(*) FROM heritage_sites WHERE country IN ('Germany', 'Austria', 'Switzerland');",1 What is the distribution of fan demographics by favorite sports?,"CREATE TABLE fan_demographics_sports (id INT, fan VARCHAR(255), age INT, gender VARCHAR(10), sport VARCHAR(255)); ","SELECT sport, gender, COUNT(*) as fans_count FROM fan_demographics_sports GROUP BY sport, gender;","SELECT sport, COUNT(*) as num_fans FROM fan_demographics_sports GROUP BY sport;",0 What is the lowest Prize amount for the Irish Derby Race?,"CREATE TABLE table_name_87 (prize__ INTEGER, race VARCHAR);","SELECT MIN(prize__) AS £k_ FROM table_name_87 WHERE race = ""irish derby"";","SELECT MIN(prize__) FROM table_name_87 WHERE race = ""irish derby"";",0 what was the score on june 29 when the devil rays los?,"CREATE TABLE table_name_11 (score VARCHAR, losing_team VARCHAR, date VARCHAR);","SELECT score FROM table_name_11 WHERE losing_team = ""devil rays"" AND date = ""june 29"";","SELECT score FROM table_name_11 WHERE losing_team = ""devil rays los"" AND date = ""june 29"";",0 "Who was the opponents head coach with the result L, 56-6?","CREATE TABLE table_26240481_1 (opponents_head_coach VARCHAR, result VARCHAR);","SELECT opponents_head_coach FROM table_26240481_1 WHERE result = ""L, 56-6"";","SELECT opponents_head_coach FROM table_26240481_1 WHERE result = ""L, 56-6"";",1 What is the minimum number of disability accommodations requested per month in Europe in 2022?,"CREATE TABLE Accommodations (Id INT, StudentId INT, Type VARCHAR(50), RequestDate DATE, Region VARCHAR(30)); ",SELECT MIN(COUNT(*)) FROM Accommodations WHERE RequestDate BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY EXTRACT(MONTH FROM RequestDate);,SELECT MIN(CASE WHEN RequestDate >= '2022-01-01' THEN 1 ELSE 0 END) FROM Accommodations WHERE Type = 'Disability' AND RequestDate '2022-01-01' AND Region = 'Europe';,0 Which artists contributed to the most collaborations in the music industry?,"CREATE TABLE Artists (id INT, name VARCHAR(50), collaborations INT); CREATE TABLE Collaborations (id INT, artist1 INT, artist2 INT); ","SELECT A.name, COUNT(*) as collaborations_count FROM Artists A INNER JOIN Collaborations C ON A.id = C.artist1 OR A.id = C.artist2 GROUP BY A.name ORDER BY collaborations_count DESC;","SELECT Artists.name, COUNT(Collaborations.id) as collaborations_count FROM Artists INNER JOIN Collaborations ON Artists.id = Collaborations.artist1 GROUP BY Artists.name ORDER BY collaborations_count DESC LIMIT 1;",0 What year was the election when the # of seats won was 65?,"CREATE TABLE table_123462_2 (election VARCHAR, _number_of_seats_won VARCHAR);",SELECT election FROM table_123462_2 WHERE _number_of_seats_won = 65;,SELECT election FROM table_123462_2 WHERE _number_of_seats_won = 65;,1 What was the nation that had 59 totals?,"CREATE TABLE table_name_75 (nation VARCHAR, total VARCHAR);",SELECT nation FROM table_name_75 WHERE total = 59;,SELECT nation FROM table_name_75 WHERE total = 59;,1 "Driving Force EX of no, and a Driving Force GT of yes, and a Driving Force Pro of yes has what feature?","CREATE TABLE table_name_64 (feature VARCHAR, driving_force_pro VARCHAR, driving_force_ex VARCHAR, driving_force_gt VARCHAR);","SELECT feature FROM table_name_64 WHERE driving_force_ex = ""no"" AND driving_force_gt = ""yes"" AND driving_force_pro = ""yes"";","SELECT feature FROM table_name_64 WHERE driving_force_ex = ""no"" AND driving_force_gt = ""yes"" AND driving_force_pro = ""yes"";",1 What is the average occupancy rate for eco-friendly hotels in Costa Rica?,"CREATE TABLE hotels(id INT, name TEXT, country TEXT, is_eco_friendly BOOLEAN); ",SELECT AVG(occupancy_rate) FROM (SELECT occupancy_rate FROM hotel_stats WHERE hotel_id IN (SELECT id FROM hotels WHERE country = 'Costa Rica' AND is_eco_friendly = true) ORDER BY date DESC) subquery LIMIT 1;,SELECT AVG(CASE WHEN is_eco_friendly THEN 1 ELSE 0 END) AS occupancy_rate FROM hotels WHERE country = 'Costa Rica';,0 Which ingredients have been sourced from India for cosmetic products in the past year?,"CREATE TABLE ingredient_sourcing (ingredient_name VARCHAR(255), sourcing_location VARCHAR(255), last_updated DATE); ","SELECT ingredient_name FROM ingredient_sourcing WHERE sourcing_location = 'India' AND last_updated >= DATEADD(year, -1, GETDATE());","SELECT ingredient_name FROM ingredient_sourcing WHERE sourcing_location = 'India' AND last_updated >= DATEADD(year, -1, GETDATE());",1 What is the average grid number that had Team China with less than 10 laps?,"CREATE TABLE table_name_29 (grid INTEGER, laps VARCHAR, team VARCHAR);","SELECT AVG(grid) FROM table_name_29 WHERE laps < 10 AND team = ""china"";","SELECT AVG(grid) FROM table_name_29 WHERE laps 10 AND team = ""china"";",0 Find the top 3 countries with the highest financial capability scores.,"CREATE TABLE financial_capability (id INT, country VARCHAR(255), score INT);","SELECT country, score FROM (SELECT country, score, ROW_NUMBER() OVER (ORDER BY score DESC) rn FROM financial_capability) t WHERE rn <= 3;","SELECT country, score FROM financial_capability ORDER BY score DESC LIMIT 3;",0 what is the time/retired when the constructor is maserati and the laps is 90?,"CREATE TABLE table_name_74 (time_retired VARCHAR, constructor VARCHAR, laps VARCHAR);","SELECT time_retired FROM table_name_74 WHERE constructor = ""maserati"" AND laps = 90;","SELECT time_retired FROM table_name_74 WHERE constructor = ""maserati"" AND laps = 90;",1 "What is the attendance of the November 19, 1990 game?","CREATE TABLE table_name_49 (attendance VARCHAR, date VARCHAR);","SELECT attendance FROM table_name_49 WHERE date = ""november 19, 1990"";","SELECT attendance FROM table_name_49 WHERE date = ""november 19, 1990"";",1 what are the lines served where station users is 210076?,"CREATE TABLE table_14748457_1 (lines_served VARCHAR, station_users_2008_9 VARCHAR);","SELECT lines_served FROM table_14748457_1 WHERE station_users_2008_9 = ""210076"";","SELECT lines_served FROM table_14748457_1 WHERE station_users_2008_9 = ""210076"";",1 What is the maximum impact measurement score for companies in the technology sector?,"CREATE TABLE company_impact (id INT, name VARCHAR(255), sector VARCHAR(255), impact_measurement_score FLOAT); ",SELECT MAX(impact_measurement_score) FROM company_impact WHERE sector = 'Technology';,SELECT MAX(impact_measurement_score) FROM company_impact WHERE sector = 'Technology';,1 What's the losing bonus of Crumlin RFC?,"CREATE TABLE table_name_21 (losing_bonus VARCHAR, club VARCHAR);","SELECT losing_bonus FROM table_name_21 WHERE club = ""crumlin rfc"";","SELECT losing_bonus FROM table_name_21 WHERE club = ""crumlin rfc"";",1 Which vegan skincare products have a rating above 4.2?,"CREATE TABLE cosmetics_info(product_name TEXT, is_vegan BOOLEAN, rating DECIMAL); ",SELECT product_name FROM cosmetics_info WHERE is_vegan = true AND rating > 4.2;,SELECT product_name FROM cosmetics_info WHERE is_vegan = true AND rating > 4.2;,1 What is the average waste generation and water usage for chemicals produced in the USA?,"CREATE TABLE chemical_production (id INT, chemical_id INT, production_country VARCHAR(255), waste_generation INT, water_usage INT); ","SELECT AVG(waste_generation) as avg_waste_generation, AVG(water_usage) as avg_water_usage FROM chemical_production WHERE production_country = 'USA';","SELECT AVG(waste_generation) as avg_waste_generation, AVG(water_usage) as avg_water_usage FROM chemical_production WHERE production_country = 'USA';",1 "What is the international mail with the lowest number to have less than 72 domestic freight, 0 domestic mail later than 2012 with total freight and mail more than 4,695?","CREATE TABLE table_name_82 (international_mail INTEGER, total_freight_and_mail VARCHAR, year VARCHAR, domestic_freight VARCHAR, domestic_mail VARCHAR);",SELECT MIN(international_mail) FROM table_name_82 WHERE domestic_freight < 72 AND domestic_mail = 0 AND year < 2012 AND total_freight_and_mail > 4 OFFSET 695;,SELECT MIN(international_mail) FROM table_name_82 WHERE domestic_freight 72 AND domestic_mail = 0 AND year > 2012 AND total_freight_and_mail > 4 OFFSET 695;,0 What is the Senators' division record?,"CREATE TABLE table_name_39 (division_record VARCHAR, team VARCHAR);","SELECT division_record FROM table_name_39 WHERE team = ""senators"";","SELECT division_record FROM table_name_39 WHERE team = ""senators"";",1 "List the number of community policing programs in CityB, C and D, and the total budget for each city's programs.","CREATE TABLE CityBudgets (City VARCHAR(50), Budget INT); CREATE TABLE CommunityPolicing (City VARCHAR(50), Program VARCHAR(50), Budget INT); ","SELECT C.City, COUNT(CP.Program) AS Programs, SUM(CP.Budget) AS TotalBudget FROM CityBudgets C LEFT JOIN CommunityPolicing CP ON C.City = CP.City GROUP BY C.City;","SELECT CityBudgets.City, COUNT(CommunityPolicing.Program) AS NumberOfPrograms, SUM(CommunityPolicing.Budget) AS TotalBudget FROM CityBudgets INNER JOIN CommunityPolicing ON CityBudgets.City = CommunityPolicing.City GROUP BY CityBudgets.City;",0 What was the lowest water(sqmi) in the county of dickey where the longitude was smaller than -98.444062?,"CREATE TABLE table_name_47 (water__sqmi_ INTEGER, county VARCHAR, longitude VARCHAR);","SELECT MIN(water__sqmi_) FROM table_name_47 WHERE county = ""dickey"" AND longitude < -98.444062;","SELECT MIN(water__sqmi_) FROM table_name_47 WHERE county = "" dickey"" AND longitude -98.444062;",0 Spain had what time with lanes smaller than 4?,"CREATE TABLE table_name_84 (time VARCHAR, lane VARCHAR, nationality VARCHAR);","SELECT time FROM table_name_84 WHERE lane < 4 AND nationality = ""spain"";","SELECT time FROM table_name_84 WHERE lane 4 AND nationality = ""spain"";",0 What is the maximum investment value in the finance sector?,"CREATE TABLE investments (investment_id INT, investor_id INT, sector VARCHAR(20), investment_value DECIMAL(10,2)); ",SELECT MAX(investment_value) FROM investments WHERE sector = 'finance';,SELECT MAX(investment_value) FROM investments WHERE sector = 'Finance';,0 "Which Track time has a Disc larger than 2, a Track smaller than 22, and an English title of younger girl?","CREATE TABLE table_name_80 (track VARCHAR, english_title VARCHAR, disc VARCHAR);","SELECT track AS time FROM table_name_80 WHERE disc > 2 AND track < 22 AND english_title = ""younger girl"";","SELECT track FROM table_name_80 WHERE english_title = ""younger girl"" AND disc > 2 AND track 22;",0 What is the total revenue for each game genre in the last quarter?,"CREATE TABLE games (id INT, genre VARCHAR(255), revenue DECIMAL(5,2));","SELECT genre, SUM(revenue) FROM games WHERE revenue IS NOT NULL AND purchase_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH) GROUP BY genre;","SELECT genre, SUM(revenue) as total_revenue FROM games WHERE revenue >= (SELECT SUM(revenue) FROM games WHERE period >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH) GROUP BY genre) GROUP BY genre;",0 Where was the title released in 1977?,"CREATE TABLE table_name_98 (country_of_release VARCHAR, year_of_release VARCHAR);",SELECT country_of_release FROM table_name_98 WHERE year_of_release = 1977;,SELECT country_of_release FROM table_name_98 WHERE year_of_release = 1977;,1 What is the maximum age of volunteers in the volunteers table who have completed more than 3 training sessions?,"CREATE TABLE volunteers (id INT, name VARCHAR(50), age INT, sessions_completed INT);",SELECT MAX(age) FROM volunteers WHERE sessions_completed > 3;,SELECT MAX(age) FROM volunteers WHERE sessions_completed > 3;,1 "What is the total budget allocated for each program, sorted in descending order?","CREATE TABLE Programs (id INT, name VARCHAR(100), budget DECIMAL(10, 2)); ","SELECT name, budget FROM Programs ORDER BY budget DESC;","SELECT name, SUM(budget) as total_budget FROM Programs GROUP BY name ORDER BY total_budget DESC;",0 Report the distinct registration date and the election cycle.,"CREATE TABLE VOTING_RECORD (Registration_Date VARCHAR, Election_Cycle VARCHAR);","SELECT DISTINCT Registration_Date, Election_Cycle FROM VOTING_RECORD;","SELECT Registration_Date, Election_Cycle FROM VOTING_RECORD;",0 "List all ports with their corresponding cargo handling records, sorted by the date of cargo handling in descending order.","CREATE TABLE ports (id INT, name VARCHAR(50)); CREATE TABLE cargo_handling (id INT, port_id INT, date DATE, cargo_weight INT); ","SELECT ports.name, cargo_handling.date, cargo_handling.cargo_weight FROM ports INNER JOIN cargo_handling ON ports.id = cargo_handling.port_id ORDER BY cargo_handling.date DESC;","SELECT ports.name, cargo_handling.date FROM ports INNER JOIN cargo_handling ON ports.id = cargo_handling.port_id ORDER BY cargo_handling.date DESC;",0 How many professors do have a Ph.D. degree?,CREATE TABLE professor (prof_high_degree VARCHAR);,SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.';,"SELECT COUNT(*) FROM professor WHERE prof_high_degree = ""Ph.D."";",0 What years was Lebanon the nationality?,"CREATE TABLE table_name_82 (years_in_orlando VARCHAR, nationality VARCHAR);","SELECT years_in_orlando FROM table_name_82 WHERE nationality = ""lebanon"";","SELECT years_in_orlando FROM table_name_82 WHERE nationality = ""lebanon"";",1 How much did Nina Carberry win? ,"CREATE TABLE table_26903214_1 (prize_money VARCHAR, rider VARCHAR);","SELECT prize_money FROM table_26903214_1 WHERE rider = ""Nina Carberry"";","SELECT prize_money FROM table_26903214_1 WHERE rider = ""Nina Carberry"";",1 Find the titles of items whose rating is higher than the average review rating of all items.,"CREATE TABLE review (rating INTEGER); CREATE TABLE item (title VARCHAR, i_id VARCHAR); CREATE TABLE review (i_id VARCHAR, rating INTEGER);",SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > (SELECT AVG(rating) FROM review);,SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > (SELECT AVG(rating) FROM review);,1 What is the per-capita GDP for the country with an overall GDP of 156.640?,"CREATE TABLE table_name_90 (gdp_per_capita__us$_ VARCHAR, gdp__billion_us$_ VARCHAR);","SELECT gdp_per_capita__us$_ FROM table_name_90 WHERE gdp__billion_us$_ = ""156.640"";","SELECT gdp_per_capita__us$_ FROM table_name_90 WHERE gdp__billion_us$_ = ""156.640"";",1 How many games were played in city Atlanta in 2000?,"CREATE TABLE park (park_id VARCHAR, city VARCHAR); CREATE TABLE home_game (park_id VARCHAR, year VARCHAR);",SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta';,"SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T2.city = ""Atlanta"" AND T2.year = 2000;",0 What is the total number of workplace safety violations in the 'construction' schema for the months of 'July' and 'August' in '2022'?,"CREATE TABLE safety_violations (id INT, date DATE, industry VARCHAR(255), violation_count INT); ",SELECT SUM(violation_count) FROM safety_violations WHERE industry = 'construction' AND date BETWEEN '2022-07-01' AND '2022-08-31';,SELECT SUM(violation_count) FROM safety_violations WHERE date BETWEEN '2022-01-01' AND '2022-08-30' AND industry = 'construction';,0 Which military equipment type has the lowest maintenance cost?,"CREATE TABLE equipment_maintenance (equipment_type TEXT, cost FLOAT); ","SELECT equipment_type, cost FROM equipment_maintenance ORDER BY cost ASC LIMIT 1;","SELECT equipment_type, MIN(cost) FROM equipment_maintenance GROUP BY equipment_type;",0 "What is the most common type of violation, in the last month?","CREATE TABLE violations (violation_id INT, violation_type VARCHAR(20), violation_date DATE); ","SELECT violation_type, COUNT(*) as num_occurrences FROM (SELECT violation_type, ROW_NUMBER() OVER (PARTITION BY violation_type ORDER BY violation_date DESC) as rn FROM violations WHERE violation_date >= DATEADD(month, -1, GETDATE())) x WHERE rn = 1 GROUP BY violation_type;","SELECT violation_type, COUNT(*) as count FROM violations WHERE violation_date >= DATEADD(month, -1, GETDATE()) GROUP BY violation_type ORDER BY count DESC LIMIT 1;",0 How many clients have made at least one investment in the past year?,"CREATE TABLE clients (id INT, registered_date DATE);CREATE TABLE investments (id INT, client_id INT, investment_date DATE); ",SELECT COUNT(DISTINCT c.id) FROM clients c WHERE EXISTS (SELECT 1 FROM investments i WHERE c.id = i.client_id AND i.investment_date >= c.registered_date + INTERVAL '1 year');,"SELECT COUNT(*) FROM clients JOIN investments ON clients.id = investments.client_id WHERE investments.investment_date >= DATEADD(year, -1, GETDATE());",0 What is the average voice plan cost for each state?,"CREATE TABLE voice_plans (plan_id int, plan_cost float, plan_type varchar(10)); CREATE TABLE voice_subscribers (subscriber_id int, voice_plan varchar(10), state varchar(20)); ","SELECT state, AVG(plan_cost) as avg_voice_plan_cost FROM voice_subscribers sub INNER JOIN voice_plans plan ON sub.voice_plan = plan.plan_type GROUP BY state;","SELECT s.state, AVG(vp.plan_cost) as avg_plan_cost FROM voice_plans vp JOIN voice_subscribers vs ON vp.plan_id = vs.plan_id GROUP BY s.state;",0 How many financially capable individuals are there in the urban areas of the country?,"CREATE TABLE financial_capability (location TEXT, capable BOOLEAN); ",SELECT COUNT(*) FROM financial_capability WHERE location LIKE '%urban%' AND capable = TRUE;,SELECT COUNT(*) FROM financial_capability WHERE location = 'urban' AND capable = true;,0 What is the Player that has a To standard of –4?,"CREATE TABLE table_name_71 (player VARCHAR, to_par VARCHAR);","SELECT player FROM table_name_71 WHERE to_par = ""–4"";","SELECT player FROM table_name_71 WHERE to_par = ""–4"";",1 "What is the total number of properties and the total area of sustainable urban projects in the city of ""Chicago""?","CREATE TABLE properties (property_id INT, area FLOAT, city_id INT, PRIMARY KEY (property_id), FOREIGN KEY (city_id) REFERENCES cities(city_id)); CREATE TABLE sustainable_projects (project_id INT, area FLOAT, city_id INT, PRIMARY KEY (project_id)); CREATE TABLE cities (city_id INT, city_name TEXT, PRIMARY KEY (city_id)); ","SELECT COUNT(*), SUM(sustainable_projects.area) FROM properties, sustainable_projects JOIN cities ON properties.city_id = cities.city_id AND sustainable_projects.city_id = cities.city_id WHERE cities.city_name = 'Chicago';","SELECT COUNT(*), SUM(area) FROM properties INNER JOIN sustainable_projects ON properties.city_id = sustainable_projects.city_id INNER JOIN cities ON properties.city_id = cities.city_id WHERE cities.city_name = 'Chicago';",0 What are the Odds for the Horse called Ready's Echo?,"CREATE TABLE table_name_72 (odds VARCHAR, horse VARCHAR);","SELECT odds FROM table_name_72 WHERE horse = ""ready's echo"";","SELECT odds FROM table_name_72 WHERE horse = ""ready's echo"";",1 Delete space debris with a weight below 100 kg.,"CREATE TABLE space_debris (id INT, diameter FLOAT, weight INT, material VARCHAR(255), location VARCHAR(255));",DELETE FROM space_debris WHERE weight < 100;,DELETE FROM space_debris WHERE weight 100;,0 What was the final score on March 26?,"CREATE TABLE table_11959669_7 (score VARCHAR, date VARCHAR);","SELECT score FROM table_11959669_7 WHERE date = ""March 26"";","SELECT score FROM table_11959669_7 WHERE date = ""March 26"";",1 What is the lowest capacity for 1903?,"CREATE TABLE table_name_75 (capacity INTEGER, year_opened VARCHAR);","SELECT MIN(capacity) FROM table_name_75 WHERE year_opened = ""1903"";",SELECT MIN(capacity) FROM table_name_75 WHERE year_opened = 1903;,0 Update the depth of the 'Southern Ocean Squid' to 3500 meters in the marine_species table.,"CREATE TABLE marine_species (id INT, species_name VARCHAR(255), ocean VARCHAR(255), depth INT); ",UPDATE marine_species SET depth = 3500 WHERE species_name = 'Southern Ocean Squid';,UPDATE marine_species SET depth = 3500 WHERE species_name = 'Southern Ocean Squid';,1 What was the citizen feedback score for public transportation in Tokyo in Q2 2022?,"CREATE TABLE citizen_feedback (quarter INT, city VARCHAR(20), service VARCHAR(20), score INT); ",SELECT score FROM citizen_feedback WHERE city = 'Tokyo' AND service = 'Public Transportation' AND quarter = 2;,SELECT score FROM citizen_feedback WHERE city = 'Tokyo' AND service = 'Public Transportation' AND quarter = 2;,1 How many defense diplomacy events were conducted in each region?,"CREATE TABLE defense_diplomacy (id INT, region VARCHAR(255), event VARCHAR(255));","SELECT region, COUNT(event) FROM defense_diplomacy GROUP BY region;","SELECT region, COUNT(*) FROM defense_diplomacy GROUP BY region;",0 Which user has the highest sum of revenue for their concert ticket sales?,"CREATE TABLE concert_ticket_sales (id INT, user_id INT, concert_id INT, quantity INT, revenue INT); ","SELECT user_id, SUM(revenue) as total_revenue, RANK() OVER (ORDER BY SUM(revenue) DESC) as user_rank FROM concert_ticket_sales GROUP BY user_id;","SELECT user_id, SUM(revenue) as total_revenue FROM concert_ticket_sales GROUP BY user_id ORDER BY total_revenue DESC LIMIT 1;",0 Find the top 2 union names with the highest average salary.,"CREATE TABLE UnionH(union_name VARCHAR(10), member_id INT, salary INT); ","SELECT union_name, AVG(salary) FROM UnionH GROUP BY union_name ORDER BY AVG(salary) DESC LIMIT 2;","SELECT union_name, AVG(salary) as avg_salary FROM UnionH GROUP BY union_name ORDER BY avg_salary DESC LIMIT 2;",0 What is the total biomass of fish for each species in the Arctic Ocean?,"CREATE TABLE fish_species (species VARCHAR(255), biomass FLOAT, region VARCHAR(255)); ","SELECT species, SUM(biomass) as total_biomass FROM fish_species WHERE region = 'Arctic Ocean' GROUP BY species;","SELECT species, SUM(biomass) FROM fish_species WHERE region = 'Arctic Ocean' GROUP BY species;",0 List the top 3 states with the highest water consumption in the residential sector in 2019?,"CREATE TABLE states ( state_id INT, state_name TEXT ); CREATE TABLE residential_water_usage ( id INT, state_id INT, year INT, water_consumption FLOAT ); ","SELECT s.state_name, SUM(r.water_consumption) as total_water_consumption FROM states s JOIN residential_water_usage r ON s.state_id = r.state_id WHERE r.year = 2019 GROUP BY s.state_name ORDER BY total_water_consumption DESC LIMIT 3;","SELECT states.state_name, residential_water_usage.water_consumption FROM states INNER JOIN residential_water_usage ON states.state_id = residential_water_usage.state_id WHERE residential_water_usage.year = 2019 GROUP BY states.state_name ORDER BY residential_water_usage.water_consumption DESC LIMIT 3;",0 In what year did the team of aston martin racing have a position of 6th?,"CREATE TABLE table_name_35 (year VARCHAR, team VARCHAR, pos VARCHAR);","SELECT COUNT(year) FROM table_name_35 WHERE team = ""aston martin racing"" AND pos = ""6th"";","SELECT year FROM table_name_35 WHERE team = ""aston martin racing"" AND pos = ""6th"";",0 What was the result of the second round?,"CREATE TABLE table_name_5 (result VARCHAR, round VARCHAR);","SELECT result FROM table_name_5 WHERE round = ""second round"";","SELECT result FROM table_name_5 WHERE round = ""second round"";",1 What is the total amount of minerals extracted per mine?,"CREATE TABLE extraction (mine_id INT, extraction_date DATE, mineral TEXT, quantity INT); ","SELECT mine_id, SUM(quantity) FROM extraction GROUP BY mine_id;","SELECT mine_id, SUM(quantity) FROM extraction GROUP BY mine_id;",1 Find the top 5 freight forwarding routes with the lowest total revenue in Q2 2021.,"CREATE TABLE route_revenue (route_id INT, revenue FLOAT, order_date DATE);","SELECT route_id, SUM(revenue) as total_revenue FROM route_revenue WHERE EXTRACT(MONTH FROM order_date) BETWEEN 4 AND 6 GROUP BY route_id ORDER BY total_revenue ASC LIMIT 5;","SELECT route_id, SUM(revenue) as total_revenue FROM route_revenue WHERE order_date BETWEEN '2021-04-01' AND '2021-06-30' GROUP BY route_id ORDER BY total_revenue DESC LIMIT 5;",0 "What was the average bias metric for each algorithm used in the Algorithmic Fairness tests from January 1, 2022, to January 7, 2022?","CREATE TABLE algorithmic_fairness_tests (id INT PRIMARY KEY, algorithm VARCHAR(255), dataset VARCHAR(255), bias_metric FLOAT, test_date DATE); ","SELECT algorithm, AVG(bias_metric) as avg_bias_metric FROM algorithmic_fairness_tests WHERE test_date BETWEEN '2022-01-01' AND '2022-01-07' GROUP BY algorithm;","SELECT algorithm, AVG(bias_metric) as avg_bias_metric FROM algorithmic_fairness_tests WHERE test_date BETWEEN '2022-01-01' AND '2022-01-37' GROUP BY algorithm;",0 Show the number of unique founders who have founded companies that have received funding.,"CREATE TABLE Founders (id INT, name TEXT, gender TEXT); CREATE TABLE Companies (id INT, name TEXT, founder_id INT, funding_received BOOLEAN); ",SELECT COUNT(DISTINCT Founders.name) FROM Founders INNER JOIN Companies ON Founders.id = Companies.founder_id WHERE Companies.funding_received = TRUE;,SELECT COUNT(DISTINCT Founders.id) FROM Founders INNER JOIN Companies ON Founders.id = Companies.founder_id WHERE Companies.funding_received = TRUE;,0 What was the winning score for oldsmobile lpga classic?,"CREATE TABLE table_name_64 (winning_score VARCHAR, tournament VARCHAR);","SELECT winning_score FROM table_name_64 WHERE tournament = ""oldsmobile lpga classic"";","SELECT winning_score FROM table_name_64 WHERE tournament = ""oldsmobile lpga classic"";",1 "List well IDs and their depths in the 'ArcticOcean' schema, ordered by depth.","CREATE TABLE ArcticOcean.wells (well_id INT, depth FLOAT); ","SELECT well_id, depth FROM ArcticOcean.wells ORDER BY depth;","SELECT well_id, depth FROM ArcticOcean.wells ORDER BY depth;",1 What is the average number of volunteer hours per volunteer for 2021?,"CREATE TABLE volunteers (volunteer_id INT, volunteer_name VARCHAR(50), volunteer_hours DECIMAL(10,2), volunteer_date DATE);","SELECT AVG(volunteer_hours) FROM (SELECT volunteer_hours, volunteer_id FROM volunteers WHERE YEAR(volunteer_date) = 2021 GROUP BY volunteer_id) AS volunteer_hours_summary;",SELECT AVG(volunteer_hours) FROM volunteers WHERE YEAR(volunteer_date) = 2021;,0 What party is the member that has an electorate of Lindsay?,"CREATE TABLE table_name_34 (party VARCHAR, electorate VARCHAR);","SELECT party FROM table_name_34 WHERE electorate = ""lindsay"";","SELECT party FROM table_name_34 WHERE electorate = ""lindsay"";",1 What are the production quantities for each machine type and their associated divisions?,"CREATE TABLE machine_production (machine_id INT, machine_type TEXT, division TEXT, production_quantity INT); ","SELECT machine_type, division, production_quantity FROM machine_production;","SELECT machine_type, division, production_quantity FROM machine_production GROUP BY machine_type, division;",0 When johannesburg is the hometown who is the contestant?,"CREATE TABLE table_18626383_2 (contestant VARCHAR, hometown VARCHAR);","SELECT contestant FROM table_18626383_2 WHERE hometown = ""Johannesburg"";","SELECT contestant FROM table_18626383_2 WHERE hometown = ""Johannesburg"";",1 What was the total effic for the quarterbacks?,"CREATE TABLE table_name_20 (effic INTEGER, name VARCHAR);","SELECT MIN(effic) FROM table_name_20 WHERE name = ""total"";","SELECT SUM(effic) FROM table_name_20 WHERE name = ""quarterbacks"";",0 How many entries are there for high rebounds when high points is inge – 19?,"CREATE TABLE table_30054758_3 (high_rebounds VARCHAR, high_points VARCHAR);","SELECT COUNT(high_rebounds) FROM table_30054758_3 WHERE high_points = ""Inge – 19"";","SELECT COUNT(high_rebounds) FROM table_30054758_3 WHERE high_points = ""Inge – 19"";",1 "What is the maximum water consumption per mining site, and which rock formations are present at that site?","CREATE TABLE environmental_impact (id INT PRIMARY KEY, mining_site_id INT, pollution_level INT, water_consumption FLOAT, FOREIGN KEY (mining_site_id) REFERENCES mining_sites(id)); CREATE TABLE geological_survey (id INT PRIMARY KEY, mining_site_id INT, rock_formation VARCHAR(255), depth FLOAT, FOREIGN KEY (mining_site_id) REFERENCES mining_sites(id)); ","SELECT e.name, MAX(ei.water_consumption) AS max_water_consumption, GROUP_CONCAT(DISTINCT gs.rock_formation) AS rock_formations FROM environmental_impact ei JOIN mining_sites e ON ei.mining_site_id = e.id JOIN geological_survey gs ON e.id = gs.mining_site_id GROUP BY e.name;","SELECT e.mining_site_id, MAX(e.water_consumption) as max_water_consumption, gs.rock_formation FROM environmental_impact e INNER JOIN geological_survey gs ON e.mining_site_id = gs.mining_site_id GROUP BY e.mining_site_id;",0 What are the names of services with an average rating above 8?,"CREATE TABLE Service (id INT, department_id INT, name VARCHAR(50), cost DECIMAL(10,2)); CREATE TABLE CitizenFeedback (id INT, service_id INT, rating INT); ","SELECT Service.name FROM Service INNER JOIN (SELECT service_id, AVG(rating) as average_rating FROM CitizenFeedback GROUP BY service_id) as CitizenAverage ON Service.id = CitizenAverage.service_id WHERE CitizenAverage.average_rating > 8;",SELECT Service.name FROM Service INNER JOIN CitizenFeedback ON Service.id = CitizenFeedback.service_id WHERE CitizenFeedback.rating > 8;,0 How many games have 61-16 as the record?,"CREATE TABLE table_name_14 (game VARCHAR, record VARCHAR);","SELECT COUNT(game) FROM table_name_14 WHERE record = ""61-16"";","SELECT COUNT(game) FROM table_name_14 WHERE record = ""61-16"";",1 What was the name for the locomotive with a type of 2-8-0 and a number of 20?,"CREATE TABLE table_name_23 (name VARCHAR, type VARCHAR, number VARCHAR);","SELECT name FROM table_name_23 WHERE type = ""2-8-0"" AND number = 20;","SELECT name FROM table_name_23 WHERE type = ""2-8-0"" AND number = 20;",1 What is the average number of employees for companies founded by immigrants in the technology industry?,"CREATE TABLE companies (id INT, name TEXT, industry TEXT, founding_year INT, founder_immigrant TEXT); ",SELECT AVG(num_employees) FROM companies INNER JOIN company_details ON companies.id = company_details.company_id WHERE companies.founder_immigrant = 'Yes' AND companies.industry = 'Technology';,SELECT AVG(COUNT(*)) FROM companies WHERE industry = 'Technology' AND founder_immigrant = 'Immigrant';,0 "Which Surname has Throws of r, and a Position of p, and a DOB of 26 april 1989?","CREATE TABLE table_name_64 (surname VARCHAR, dob VARCHAR, throws VARCHAR, position VARCHAR);","SELECT surname FROM table_name_64 WHERE throws = ""r"" AND position = ""p"" AND dob = ""26 april 1989"";","SELECT surname FROM table_name_64 WHERE throws = ""r"" AND position = ""p"" AND dob = ""26 april 1989"";",1 What is the average project duration for each type of construction project?,"CREATE TABLE project (id INT, name VARCHAR(255), start_date DATE, end_date DATE); ","SELECT project_type, AVG(DATEDIFF(end_date, start_date)) as avg_project_duration FROM (SELECT id, name, start_date, end_date, 'Residential' as project_type FROM project WHERE name LIKE '%Residential%' UNION ALL SELECT id, name, start_date, end_date, 'Commercial' as project_type FROM project WHERE name LIKE '%Commercial%') as subquery GROUP BY project_type;","SELECT name, AVG(DATEDIFF(end_date, start_date)) as avg_duration FROM project GROUP BY name;",0 What's the highest pick for SS position?,"CREATE TABLE table_name_76 (pick INTEGER, position VARCHAR);","SELECT MAX(pick) FROM table_name_76 WHERE position = ""ss"";","SELECT MAX(pick) FROM table_name_76 WHERE position = ""ss"";",1 Name the winner for jason byrne,"CREATE TABLE table_19930660_1 (winner VARCHAR, marcus_guest VARCHAR);","SELECT winner FROM table_19930660_1 WHERE marcus_guest = ""Jason Byrne"";","SELECT winner FROM table_19930660_1 WHERE marcus_guest = ""Jason Byrne"";",1 What is the number of peacekeeping operations conducted by the UN in the Middle East region?,"CREATE TABLE PeacekeepingOperations (OperationID INT, OperationName VARCHAR(100), OperationType VARCHAR(50), StartDate DATE, EndDate DATE);",SELECT COUNT(OperationID) FROM PeacekeepingOperations WHERE OperationType = 'Peacekeeping' AND (StartDate BETWEEN '2000-01-01' AND '2022-12-31') AND (EndDate BETWEEN '2000-01-01' AND '2022-12-31') AND (OperationName LIKE '%Middle East%');,SELECT COUNT(*) FROM PeacekeepingOperations WHERE OperationType = 'Peacekeeping' AND Region = 'Middle East';,0 What year did Yuri Omeltchenko win Silver?,"CREATE TABLE table_name_57 (year VARCHAR, silver VARCHAR);","SELECT year FROM table_name_57 WHERE silver = ""yuri omeltchenko"";","SELECT year FROM table_name_57 WHERE silver = ""yuri omeltchenko"";",1 What is the number of humanitarian assistance missions by the USA and China from 2016 to 2018?,"CREATE TABLE humanitarian_assistance (country VARCHAR(50), year INT, mission VARCHAR(50)); ","SELECT country, COUNT(mission) as total_missions FROM humanitarian_assistance WHERE (country = 'USA' OR country = 'China') AND (year BETWEEN 2016 AND 2018) GROUP BY country;","SELECT COUNT(*) FROM humanitarian_assistance WHERE country IN ('USA', 'China') AND year BETWEEN 2016 AND 2018;",0 Find the name of medication used on the patient who stays in room 111?,"CREATE TABLE Prescribes (Patient VARCHAR, Medication VARCHAR); CREATE TABLE Medication (name VARCHAR, Code VARCHAR); CREATE TABLE patient (SSN VARCHAR); CREATE TABLE stay (Patient VARCHAR);",SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111;,SELECT T1.name FROM Prescribes AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN stay AS T3 ON T1.Patient = T3.Patient;,0 Show energy efficiency stats for the 'commercial' sector in the 'efficiency' schema.,"CREATE SCHEMA efficiency; CREATE TABLE energy_efficiency (sector VARCHAR(255), energy_rating DECIMAL(3,2)); ",SELECT energy_rating FROM efficiency.energy_efficiency WHERE sector = 'commercial';,"SELECT sector, energy_rating FROM efficiency.energy_efficiency WHERE sector = 'commercial';",0 What is the average sustainable score for products manufactured in 'Europe' in the month of 'January'?,"CREATE TABLE SustainableFashion (ProductID INT, SustainableScore INT, ManufacturingDate DATE); ",SELECT AVG(SustainableScore) FROM SustainableFashion WHERE ManufacturingDate BETWEEN '2021-01-01' AND '2021-01-31';,SELECT AVG(SustainableScore) FROM SustainableFashion WHERE ManufacturingDate BETWEEN '2022-01-01' AND '2022-01-31' AND ManufacturingDate BETWEEN '2022-01-31' AND '2022-01-31';,0 What is the most current year where the women's doubles champions are astrid eidenbenz claudia jehle,"CREATE TABLE table_15001681_1 (year INTEGER, womens_doubles VARCHAR);","SELECT MAX(year) FROM table_15001681_1 WHERE womens_doubles = ""Astrid Eidenbenz Claudia Jehle"";","SELECT MAX(year) FROM table_15001681_1 WHERE womens_doubles = ""Atrid Eidenbenz Claudia Jehle"";",0 What is the minimum mental health score of students in 'Spring 2023' by gender?,"CREATE TABLE student_mental_health (student_id INT, mental_health_score INT, gender VARCHAR(255), date DATE); CREATE VIEW spring_2023_smh AS SELECT * FROM student_mental_health WHERE date BETWEEN '2023-01-01' AND '2023-06-30';","SELECT MIN(mental_health_score) as min_mental_health, gender FROM spring_2023_smh GROUP BY gender;","SELECT gender, MIN(mental_health_score) FROM spring_2023_smh GROUP BY gender;",0 What is the lowest episode number with 6.19 million viewers and a production code of icec487y?,"CREATE TABLE table_2501754_4 (episode__number INTEGER, viewing_figures_millions VARCHAR, prod_code VARCHAR);","SELECT MIN(episode__number) FROM table_2501754_4 WHERE viewing_figures_millions = ""6.19"" AND prod_code = ""ICEC487Y"";","SELECT MIN(episode__number) FROM table_2501754_4 WHERE viewing_figures_millions = ""6.19"" AND prod_code = ""ICEC487Y"";",1 "What is the total quantity of organic waste produced in the city of London, United Kingdom, for the year 2021?","CREATE TABLE waste_types (type VARCHAR(20), quantity INT); ",SELECT SUM(quantity) FROM waste_types WHERE type = 'organic' AND YEAR(date) = 2021;,SELECT SUM(quantity) FROM waste_types WHERE type = 'organic' AND YEAR(date) = 2021;,1 List all districts and their respective total crime counts.,"CREATE TABLE districts (district_id INT, district_name TEXT); CREATE TABLE crimes (crime_id INT, district_id INT, crime_type TEXT, crime_count INT);","SELECT d.district_name, SUM(c.crime_count) FROM districts d INNER JOIN crimes c ON d.district_id = c.district_id GROUP BY d.district_name;","SELECT d.district_name, SUM(c.crime_count) as total_crime_count FROM districts d JOIN crimes c ON d.district_id = c.district_id GROUP BY d.district_name;",0 "List all tables in the ""public"" schema that have more than 100 rows?","CREATE TABLE IF NOT EXISTS public.example_table2 (id SERIAL PRIMARY KEY, data TEXT); ",SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_type = 'BASE TABLE' AND (SELECT COUNT(*) FROM information_schema.columns WHERE table_schema = table_name.table_schema AND table_name = table_name.table_name) > 0 GROUP BY table_name HAVING COUNT(*) > 100;,SELECT * FROM public.example_table2 WHERE data > 100;,0 What was the maximum response time for emergency medical services in the first quarter of 2022?,"CREATE TABLE ems_incidents (id INT, incident_date DATE, response_time INT); ",SELECT MAX(response_time) FROM ems_incidents WHERE incident_date BETWEEN '2022-01-01' AND '2022-03-31';,SELECT MAX(response_time) FROM ems_incidents WHERE incident_date BETWEEN '2022-01-01' AND '2022-03-31';,1 What is the maximum funding for bioprocess engineering projects?,"CREATE TABLE genome_inc (id INT, project TEXT, funding FLOAT); ",SELECT MAX(funding) FROM genome_inc WHERE project = 'Bioprocess Engineering';,SELECT MAX(funding) FROM genome_inc;,0 "Show the names of journalists from ""England"" or ""Wales"".","CREATE TABLE journalist (Name VARCHAR, Nationality VARCHAR);","SELECT Name FROM journalist WHERE Nationality = ""England"" OR Nationality = ""Wales"";","SELECT Name FROM journalist WHERE Nationality IN ('England', 'Wales');",0 Who run for office in district Maryland 3?,"CREATE TABLE table_1341453_22 (candidates VARCHAR, district VARCHAR);","SELECT candidates FROM table_1341453_22 WHERE district = ""Maryland 3"";","SELECT candidates FROM table_1341453_22 WHERE district = ""Maryland 3"";",1 "What is the total revenue for each fitness program, in ascending order?","CREATE TABLE sales (sale_id INT, program_id INT, revenue FLOAT); ","SELECT program_id, SUM(revenue) as total_revenue FROM sales GROUP BY program_id ORDER BY total_revenue ASC;","SELECT program_id, SUM(revenue) as total_revenue FROM sales GROUP BY program_id ORDER BY total_revenue DESC;",0 "At Time Warner Cable Arena 12,096, what was the high points?","CREATE TABLE table_name_85 (high_points VARCHAR, location_attendance VARCHAR);","SELECT high_points FROM table_name_85 WHERE location_attendance = ""time warner cable arena 12,096"";","SELECT high_points FROM table_name_85 WHERE location_attendance = ""time warner cable arena 12,096"";",1 What is the venue when the score was 8-2?,"CREATE TABLE table_name_61 (venue VARCHAR, score VARCHAR);","SELECT venue FROM table_name_61 WHERE score = ""8-2"";","SELECT venue FROM table_name_61 WHERE score = ""8-2"";",1 Identify the least stocked ingredients in the EMEA region.,"CREATE TABLE inventory (item_id INT, item_name VARCHAR(50), region VARCHAR(20), quantity INT, purchase_price DECIMAL(5,2)); ","SELECT item_name, quantity FROM inventory WHERE region = 'EMEA' ORDER BY quantity ASC;",SELECT MIN(quantity * purchase_price) FROM inventory WHERE region = 'EMEA';,0 What is the total budget allocated for public participation programs in the state of New York for the year 2020?,"CREATE TABLE public_participation_programs (program_id INT, budget INT, state VARCHAR(20), year INT); ",SELECT SUM(budget) FROM public_participation_programs WHERE state = 'New York' AND year = 2020;,SELECT SUM(budget) FROM public_participation_programs WHERE state = 'New York' AND year = 2020;,1 "to the Latin of f, y, u/v/w?","CREATE TABLE table_name_63 (greek VARCHAR, latin VARCHAR);","SELECT greek FROM table_name_63 WHERE latin = ""f, y, u/v/w"";","SELECT greek FROM table_name_63 WHERE latin = ""f, y, u/v/w"";",1 "What is the total number of positions when there are more than 48 goals against, 1 of 29 points are played, and less than 34 games have been played?","CREATE TABLE table_name_61 (position VARCHAR, played VARCHAR, goals_against VARCHAR, points_1 VARCHAR);","SELECT COUNT(position) FROM table_name_61 WHERE goals_against > 48 AND points_1 = ""29"" AND played < 34;",SELECT COUNT(position) FROM table_name_61 WHERE goals_against > 48 AND points_1 = 29 AND played 34;,0 "Insert a new record into the Turtles table for the Leatherback Turtle, with the ocean being the Atlantic Ocean and a population of 45000.","CREATE TABLE Turtles (Species VARCHAR(255), Ocean VARCHAR(255), Population INT);","INSERT INTO Turtles (Species, Ocean, Population) VALUES ('Leatherback Turtle', 'Atlantic Ocean', 45000);","INSERT INTO Turtles (Species, Ocean, Population) VALUES ('Leatherback Turtle', 'Atlantic Ocean', 45000);",1 Find the total energy generated by renewable sources in the US,"CREATE TABLE renewable_sources (country VARCHAR(50), energy_type VARCHAR(50), generation FLOAT); ","SELECT SUM(generation) FROM renewable_sources WHERE country = 'United States' AND energy_type IN ('Solar', 'Wind');",SELECT SUM(generation) FROM renewable_sources WHERE country = 'US' AND energy_type = 'Renewable';,0 "What is the three-month rolling average of workplace injury rates, partitioned by industry?","CREATE TABLE injuries (id INT, industry VARCHAR(255), injury_date DATE, rate DECIMAL(5, 2)); ","SELECT industry, AVG(rate) OVER (PARTITION BY industry ORDER BY injury_date ROWS BETWEEN 2 PRECEDING AND CURRENT ROW) as rolling_avg FROM injuries;","SELECT industry, AVG(rate) as rolling_avg FROM injuries WHERE injury_date >= DATEADD(month, -3, GETDATE()) GROUP BY industry;",0 "What player has The United States as the country, with t2 as the place?","CREATE TABLE table_name_9 (player VARCHAR, country VARCHAR, place VARCHAR);","SELECT player FROM table_name_9 WHERE country = ""united states"" AND place = ""t2"";","SELECT player FROM table_name_9 WHERE country = ""united states"" AND place = ""t2"";",1 What engine is used by Colin Bennett Racing with an 811 chassis?,"CREATE TABLE table_name_48 (engine VARCHAR, entrant VARCHAR, chassis VARCHAR);","SELECT engine FROM table_name_48 WHERE entrant = ""colin bennett racing"" AND chassis = ""811"";","SELECT engine FROM table_name_48 WHERE entrant = ""colin bennett racing"" AND chassis = ""811"";",1 Calculate the percentage of users in the social_media schema who are female and who have posted about fashion.,"CREATE TABLE users (id INT, name VARCHAR(50), gender VARCHAR(10)); CREATE TABLE user_posts (user_id INT, post_id INT, category_id INT);",SELECT COUNT(DISTINCT CASE WHEN u.gender = 'female' THEN u.id ELSE NULL END) / COUNT(DISTINCT u.id) * 100 AS female_fashion_percentage FROM users u JOIN user_posts up ON u.id = up.user_id WHERE up.category_id = (SELECT id FROM categories WHERE name = 'fashion');,SELECT (COUNT(*) FILTER (WHERE gender = 'Female')) * 100.0 / COUNT(*) FROM users JOIN user_posts ON users.id = user_posts.user_id WHERE category_id = (SELECT category_id FROM category_id WHERE gender = 'Female');,0 Name the original title for not nominated result with report on death,"CREATE TABLE table_20963074_1 (original_title VARCHAR, result VARCHAR, film_title_used_in_nomination VARCHAR);","SELECT original_title FROM table_20963074_1 WHERE result = ""Not Nominated"" AND film_title_used_in_nomination = ""Report on Death"";","SELECT original_title FROM table_20963074_1 WHERE result = ""Not Nominated"" AND film_title_used_in_nomination = ""Report on Death"";",1 List all members who have attended a workout and own a wearable device,"CREATE TABLE wearable_owners (member_id INT, has_wearable BOOLEAN);",SELECT DISTINCT m.member_id FROM member_profiles m INNER JOIN wearable_owners wo ON m.member_id = wo.member_id INNER JOIN workout_records wr ON m.member_id = wr.member_id WHERE wo.has_wearable = TRUE;,SELECT member_id FROM wearable_owners WHERE has_wearable = TRUE;,0 What is the distribution of research grant amounts per department?,"CREATE TABLE departments (id INT, name TEXT); CREATE TABLE grants (id INT, department_id INT, amount INT); ","SELECT g.department_id, AVG(g.amount) as avg_grant_amount, MAX(g.amount) as max_grant_amount, MIN(g.amount) as min_grant_amount, STDDEV(g.amount) as stddev_grant_amount FROM grants g GROUP BY g.department_id;","SELECT d.name, SUM(g.amount) as total_grant_amount FROM departments d JOIN grants g ON d.id = g.department_id GROUP BY d.name;",0 What is track 6's title?,"CREATE TABLE table_name_62 (title VARCHAR, track VARCHAR);",SELECT title FROM table_name_62 WHERE track = 6;,SELECT title FROM table_name_62 WHERE track = 6;,1 "Compute the percentage change in agricultural innovation metrics between 2021 and 2022, partitioned by metric type, and order by the highest increase?","CREATE TABLE agricultural_metrics (id INT, year INT, metric_type TEXT, value INT, PRIMARY KEY (id)); ","SELECT metric_type, ((value - LAG(value, 1) OVER (PARTITION BY metric_type ORDER BY year)) * 100.0 / LAG(value, 1) OVER (PARTITION BY metric_type ORDER BY year)) as pct_change FROM agricultural_metrics WHERE year IN (2021, 2022) GROUP BY metric_type ORDER BY pct_change DESC;","SELECT metric_type, AVG(value) OVER (PARTITION BY metric_type ORDER BY AVG(value) DESC) as percentage_change FROM agricultural_metrics WHERE year BETWEEN 2021 AND 2022 GROUP BY metric_type ORDER BY percentage_change DESC;",0 Update the donation amount of donation id 2 to 3000.,"CREATE TABLE donations (id INT, donor_id INT, organization_id INT, amount DECIMAL(10,2), donation_date DATE); ",UPDATE donations SET amount = 3000 WHERE id = 2;,UPDATE donations SET amount = 3000 WHERE donor_id = 2;,0 What is the average rank of the Reliance Entertainment movie with an opening day on Wednesday before 2012?,"CREATE TABLE table_name_8 (rank INTEGER, studio_s_ VARCHAR, day_of_week VARCHAR, year VARCHAR);","SELECT AVG(rank) FROM table_name_8 WHERE day_of_week = ""wednesday"" AND year < 2012 AND studio_s_ = ""reliance entertainment"";","SELECT AVG(rank) FROM table_name_8 WHERE day_of_week ""wednesday"" AND year 2012 AND studio_s_ = ""reliance entertainment"";",0 Find the first treatment date for each patient who started therapy in '2022',"CREATE TABLE patient_info (patient_id INT, first_treatment_date DATE); CREATE TABLE therapy_sessions (patient_id INT, session_date DATE); ","SELECT patient_id, MIN(session_date) AS first_treatment_date FROM therapy_sessions WHERE patient_id IN (SELECT patient_id FROM patient_info WHERE first_treatment_date IS NULL OR first_treatment_date = '2022-01-01') GROUP BY patient_id;","SELECT p.patient_id, p.first_treatment_date FROM patient_info p INNER JOIN therapy_sessions t ON p.patient_id = t.patient_id WHERE t.session_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY p.patient_id;",0 "If the Close ranged weapons are the knife (stone), knife (iron), what are the Long ranged weapons?","CREATE TABLE table_27704991_1 (long_ranged_weapons VARCHAR, close_ranged_weapons VARCHAR);","SELECT long_ranged_weapons FROM table_27704991_1 WHERE close_ranged_weapons = ""Knife (stone), Knife (iron)"";","SELECT long_ranged_weapons FROM table_27704991_1 WHERE close_ranged_weapons = ""Knife (stone), knife (iron)"";",0 Who is the visitor team of game 19 with Los Angeles as the home team?,"CREATE TABLE table_name_30 (visitor VARCHAR, home VARCHAR, game__number VARCHAR);","SELECT visitor FROM table_name_30 WHERE home = ""los angeles"" AND game__number = 19;","SELECT visitor FROM table_name_30 WHERE home = ""los angeles"" AND game__number = 19;",1 Insert a new record of military equipment sale,"CREATE TABLE sales (id INT, year INT, country VARCHAR(255), equipment_type VARCHAR(255), revenue FLOAT);","INSERT INTO sales (id, year, country, equipment_type, revenue) VALUES (2, 2021, 'Canada', 'Naval Vessels', 12000000);","INSERT INTO sales (id, year, country, equipment_type, revenue) VALUES (1, 'Military Equipment Sales', 'USA', 'Military', 'Military', 'Military');",0 What is the average spending of tourists from Africa who visited sustainable hotels?,"CREATE TABLE tourists (id INT, name VARCHAR(255), country_of_origin VARCHAR(255), spending_per_day DECIMAL(10,2)); CREATE VIEW high_spending_tourists AS SELECT * FROM tourists WHERE spending_per_day > 200; CREATE TABLE hotel_sustainability (hotel_id INT, waste_reduction BOOLEAN, energy_efficiency BOOLEAN, water_conservation BOOLEAN);",SELECT AVG(t.spending_per_day) FROM tourists t JOIN high_spending_tourists hst ON t.id = hst.id JOIN hotel_sustainability hs ON hst.hotel_id = hs.hotel_id WHERE t.country_of_origin LIKE 'Africa%';,SELECT AVG(high_spending_tourists.spending_per_day) FROM high_spending_tourists INNER JOIN hotel_sustainability ON high_spending_tourists.hotel_id = hotel_sustainability.hotel_id WHERE tourists.country_of_origin = 'Africa';,0 How many volunteers engaged in each program during Q1 2022?,"CREATE TABLE Volunteers (VolunteerID int, Name varchar(100), Program varchar(50), Hours int); ","SELECT Program, COUNT(DISTINCT VolunteerID) as NumberOfVolunteers FROM Volunteers WHERE MONTH(VolunteerDate) BETWEEN 1 AND 3 GROUP BY Program;","SELECT Program, COUNT(*) FROM Volunteers WHERE Hours >= 1 AND YEAR(VolunteerID) = 2022 GROUP BY Program;",0 Identify the total number of defense projects initiated by the top 3 defense contractors in 2019.,"CREATE TABLE DefenseContractors (contractor_id INT, contractor_name VARCHAR(50), country VARCHAR(50)); CREATE TABLE DefenseProjects (project_id INT, contractor_id INT, project_name VARCHAR(50), start_date DATE, end_date DATE); ","SELECT COUNT(DISTINCT DefenseProjects.project_id) FROM DefenseProjects INNER JOIN DefenseContractors ON DefenseProjects.contractor_id = DefenseContractors.contractor_id WHERE DefenseContractors.contractor_name IN ('Lockheed Martin', 'BAE Systems', 'Airbus') AND YEAR(DefenseProjects.start_date) = 2019 ORDER BY DefenseProjects.project_id;",SELECT COUNT(*) FROM DefenseProjects dp JOIN DefenseContractors dc ON dp.contractor_id = dc.contractor_id WHERE YEAR(dp.start_date) = 2019 AND YEAR(dp.end_date) = 2019 GROUP BY dc.contractor_name ORDER BY COUNT(*) DESC LIMIT 3;,0 What is the average population of cities in the Midwest region?,"CREATE TABLE City (id INT, name VARCHAR(255), population INT, region VARCHAR(255)); ","SELECT region, AVG(population) FROM City WHERE region = 'Midwest' GROUP BY region;",SELECT AVG(population) FROM City WHERE region = 'Midwest';,0 Who is the winner for the match on October 7?,"CREATE TABLE table_name_20 (winner VARCHAR, date VARCHAR);","SELECT winner FROM table_name_20 WHERE date = ""october 7"";","SELECT winner FROM table_name_20 WHERE date = ""october 7"";",1 "How many public libraries are there in California, and what is the total budget allocated to them?","CREATE TABLE public_libraries (state VARCHAR(20), num_libraries INT, budget FLOAT); ",SELECT SUM(budget) FROM public_libraries WHERE state = 'California'; SELECT COUNT(*) FROM public_libraries WHERE state = 'California';,"SELECT num_libraries, SUM(budget) FROM public_libraries WHERE state = 'California' GROUP BY num_libraries;",0 What is the average cargo handling time for each port?,"CREATE TABLE cargo_handling (id INT, ship_id INT, port_id INT, handling_time INT); CREATE TABLE ports (id INT, name VARCHAR(50)); ","SELECT ports.name, AVG(cargo_handling.handling_time) FROM cargo_handling JOIN ports ON cargo_handling.port_id = ports.id GROUP BY ports.id, ports.name;","SELECT p.name, AVG(c.handling_time) as avg_handling_time FROM cargo_handling c JOIN ports p ON c.port_id = p.id GROUP BY p.name;",0 List the production cost of the 'Eco-friendly Polymer' chemical for each month in 2019,"CREATE TABLE production (chemical VARCHAR(20), month INT, year INT, cost FLOAT); ","SELECT month, cost FROM production WHERE chemical = 'Eco-friendly Polymer' AND year = 2019;","SELECT month, cost FROM production WHERE chemical = 'Eco-friendly Polymer' AND year = 2019 GROUP BY month;",0 What is the total of TCKL in 2000 with a P/KO RET less than 14?,"CREATE TABLE table_name_9 (tckl VARCHAR, year VARCHAR, p_ko_ret VARCHAR);","SELECT COUNT(tckl) FROM table_name_9 WHERE year = ""2000"" AND p_ko_ret < 14;",SELECT COUNT(tckl) FROM table_name_9 WHERE year = 2000 AND p_ko_ret 14;,0 How many non-vegetarian menu items are there with a price greater than $15?,"CREATE TABLE menus (menu_id INT, menu_name VARCHAR(50), type VARCHAR(20), price DECIMAL(5,2)); ",SELECT COUNT(*) FROM menus WHERE type = 'non-vegetarian' AND price > 15.00;,SELECT COUNT(*) FROM menus WHERE type = 'Non-Vegetarian' AND price > 15;,0 "Which Season has a Game of fcs midwest region, and a Score of 40-33?","CREATE TABLE table_name_29 (season INTEGER, game VARCHAR, score VARCHAR);","SELECT MAX(season) FROM table_name_29 WHERE game = ""fcs midwest region"" AND score = ""40-33"";","SELECT AVG(season) FROM table_name_29 WHERE game = ""fcs midwest region"" AND score = ""40-33"";",0 Which Country has a Player of arjun atwal?,"CREATE TABLE table_name_19 (country VARCHAR, player VARCHAR);","SELECT country FROM table_name_19 WHERE player = ""arjun atwal"";","SELECT country FROM table_name_19 WHERE player = ""arjun atwal"";",1 What is the average labor productivity in silver mining?,"CREATE TABLE labor (employee_id INT, employee_name VARCHAR(50), department VARCHAR(20), hours_worked INT, productivity INT); ",SELECT AVG(l.productivity) AS avg_productivity FROM labor l WHERE l.department = 'silver';,SELECT AVG(productivity) FROM labor WHERE department = 'Silver Mining';,0 "What is the total expenditure, in US dollars, for economic diversification efforts in Mexico in 2016 and 2017, excluding projects with a budget less than 100000 USD?","CREATE TABLE economic_diversification_efforts (id INT, country VARCHAR(255), budget_usd FLOAT, completion_date DATE); ",SELECT SUM(budget_usd) FROM economic_diversification_efforts WHERE country = 'Mexico' AND completion_date BETWEEN '2016-01-01' AND '2017-12-31' AND budget_usd >= 100000;,SELECT SUM(budget_usd) FROM economic_diversification_efforts WHERE country = 'Mexico' AND completion_date BETWEEN '2016-01-01' AND '2017-12-31' AND budget_usd 100000;,0 What is the maximum number of workforce development programs offered by companies in a single country?,"CREATE TABLE companies (id INT, name TEXT, country TEXT, num_workforce_programs INT); ","SELECT MAX(num_workforce_programs) AS max_programs FROM companies WHERE country IN ('USA', 'Canada', 'Mexico', 'Brazil');",SELECT MAX(num_workforce_programs) FROM companies;,0 What is the average number of national security threats reported in '2022'?,"CREATE SCHEMA IF NOT EXISTS national_security_threats; CREATE TABLE IF NOT EXISTS threats_year (id INT PRIMARY KEY, year INT, count INT); ",SELECT AVG(count) FROM national_security_threats.threats_year WHERE year = 2022;,SELECT AVG(count) FROM national_security_threats.threats_year WHERE year = 2022;,1 What is the lowest total?,CREATE TABLE table_19439864_2 (total INTEGER);,SELECT MIN(total) FROM table_19439864_2;,SELECT MIN(total) FROM table_19439864_2;,1 What is the minimum depth of all marine species observed in the Pacific ocean?,"CREATE TABLE marine_species (id INT, species_name VARCHAR(255), ocean VARCHAR(255), depth INT); ",SELECT MIN(depth) FROM marine_species WHERE ocean = 'Pacific';,SELECT MIN(depth) FROM marine_species WHERE ocean = 'Pacific';,1 "Which season used production code ""am10""?","CREATE TABLE table_23279434_1 (season__number VARCHAR, production_code VARCHAR);","SELECT COUNT(season__number) FROM table_23279434_1 WHERE production_code = ""AM10"";","SELECT season__number FROM table_23279434_1 WHERE production_code = ""Am10"";",0 What is the number of maintenance records for each type of military equipment in the equipment_maintenance table?,"CREATE TABLE equipment_maintenance (equipment_type VARCHAR(255), maintenance_frequency INT);","SELECT equipment_type, SUM(maintenance_frequency) FROM equipment_maintenance GROUP BY equipment_type;","SELECT equipment_type, COUNT(*) FROM equipment_maintenance GROUP BY equipment_type;",0 Show the average session duration per player,"CREATE TABLE game_sessions (session_id INT, player_id INT, session_start_time TIMESTAMP, session_duration INTERVAL); CREATE VIEW average_session_duration AS SELECT player_id, AVG(session_duration) as avg_session_duration FROM game_sessions GROUP BY player_id;",SELECT * FROM average_session_duration;,"SELECT player_id, AVG(avg_session_duration) as avg_session_duration FROM average_session_duration GROUP BY player_id;",0 Which report is where rd. is 9?,"CREATE TABLE table_19850806_3 (report VARCHAR, rd VARCHAR);","SELECT report FROM table_19850806_3 WHERE rd = ""9"";",SELECT report FROM table_19850806_3 WHERE rd = 9;,0 "What was the result of the December 15, 2002 game?","CREATE TABLE table_name_66 (result VARCHAR, date VARCHAR);","SELECT result FROM table_name_66 WHERE date = ""december 15, 2002"";","SELECT result FROM table_name_66 WHERE date = ""december 15, 2002"";",1 What date did the Fai Cup with Derry City F.C. as runners-up take place?,"CREATE TABLE table_name_33 (date VARCHAR, competition VARCHAR, runners_up VARCHAR);","SELECT date FROM table_name_33 WHERE competition = ""fai cup"" AND runners_up = ""derry city f.c."";","SELECT date FROM table_name_33 WHERE competition = ""fai cup"" AND runners_up = ""derry city f.c."";",1 What was the attendance when the VFL played MCG?,"CREATE TABLE table_name_70 (crowd VARCHAR, venue VARCHAR);","SELECT COUNT(crowd) FROM table_name_70 WHERE venue = ""mcg"";","SELECT crowd FROM table_name_70 WHERE venue = ""mcg"";",0 How many renewable energy projects were completed in the last 5 years in Germany?,"CREATE TABLE renewable_energy_projects (id INT, country VARCHAR(50), completion_date DATE); ","SELECT COUNT(*) FROM renewable_energy_projects WHERE country = 'Germany' AND completion_date >= DATE_SUB(CURDATE(), INTERVAL 5 YEAR);","SELECT COUNT(*) FROM renewable_energy_projects WHERE country = 'Germany' AND completion_date >= DATEADD(year, -5, GETDATE());",0 Name the class with call sign of k220cp,"CREATE TABLE table_name_2 (class VARCHAR, call_sign VARCHAR);","SELECT class FROM table_name_2 WHERE call_sign = ""k220cp"";","SELECT class FROM table_name_2 WHERE call_sign = ""k220cp"";",1 What is the opponent from April 19?,"CREATE TABLE table_name_35 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_35 WHERE date = ""april 19"";","SELECT opponent FROM table_name_35 WHERE date = ""april 19"";",1 "What is 2011, when 2010 is ""WTA Premier 5 Tournaments""?",CREATE TABLE table_name_49 (Id VARCHAR);,"SELECT 2011 FROM table_name_49 WHERE 2010 = ""wta premier 5 tournaments"";","SELECT 2011 FROM table_name_49 WHERE 2010 = ""wta premier 5 tournaments"";",1 Who is Team Suzuki's rider and ranks higher than 6?,"CREATE TABLE table_name_44 (rider VARCHAR, rank VARCHAR, team VARCHAR);","SELECT rider FROM table_name_44 WHERE rank > 6 AND team = ""suzuki"";","SELECT rider FROM table_name_44 WHERE rank > 6 AND team = ""suzuki"";",1 What are the top 5 most popular game modes in VR games played by female players over the age of 30?,"CREATE TABLE users (user_id INT, age INT, gender VARCHAR(10)); CREATE TABLE vr_games (game_id INT, game_mode VARCHAR(20)); CREATE TABLE user_games (user_id INT, game_id INT, playtime INT); ","SELECT game_mode, SUM(playtime) AS total_playtime FROM user_games JOIN users ON user_games.user_id = users.user_id JOIN vr_games ON user_games.game_id = vr_games.game_id WHERE users.age > 30 AND users.gender = 'Female' GROUP BY game_mode ORDER BY total_playtime DESC LIMIT 5;","SELECT vr_games.game_mode, COUNT(user_games.user_id) as total_playtime FROM user_games JOIN users ON user_games.user_id = users.user_id JOIN vr_games ON user_games.game_id = vr_games.game_id WHERE users.age > 30 AND users.gender = 'Female' GROUP BY vr_games.game_mode ORDER BY total_playtime DESC LIMIT 5;",0 How many elevations are listed for Paratia? ,"CREATE TABLE table_2251578_4 (elevation__m_ VARCHAR, district VARCHAR);","SELECT COUNT(elevation__m_) FROM table_2251578_4 WHERE district = ""Paratia"";","SELECT COUNT(elevation__m_) FROM table_2251578_4 WHERE district = ""Paratia"";",1 Find the top 3 countries with the highest revenue from cultural heritage tours?,"CREATE TABLE Tours (id INT, name TEXT, country TEXT, type TEXT, revenue INT); ","SELECT country, SUM(revenue) AS total_revenue FROM Tours GROUP BY country ORDER BY total_revenue DESC LIMIT 3;","SELECT country, SUM(revenue) as total_revenue FROM Tours WHERE type = 'Cultural Heritage' GROUP BY country ORDER BY total_revenue DESC LIMIT 3;",0 What is the total plastic waste generation in Germany?,"CREATE TABLE WasteGenerationData (country VARCHAR(50), waste_type VARCHAR(50), waste_kg FLOAT); ",SELECT SUM(waste_kg) FROM WasteGenerationData WHERE country = 'Germany' AND waste_type = 'Plastic Waste';,SELECT SUM(waste_kg) FROM WasteGenerationData WHERE country = 'Germany' AND waste_type = 'plastic';,0 Name the revenue for eps being 1.19,"CREATE TABLE table_20614109_1 (revenue__ INTEGER, earnings_per_share__€_ VARCHAR);","SELECT MAX(revenue__) AS €million_ FROM table_20614109_1 WHERE earnings_per_share__€_ = ""1.19"";","SELECT MAX(revenue__) FROM table_20614109_1 WHERE earnings_per_share__€_ = ""1.19"";",0 Who had the fastest lap in round 1?,"CREATE TABLE table_29162856_1 (fastest_lap VARCHAR, round VARCHAR);",SELECT fastest_lap FROM table_29162856_1 WHERE round = 1;,SELECT fastest_lap FROM table_29162856_1 WHERE round = 1;,1 What is the average carbon price in the EU Emissions Trading System over the past year?,"CREATE TABLE carbon_prices (date DATE, region VARCHAR(20), price FLOAT); ",SELECT AVG(price) FROM carbon_prices WHERE region = 'EU ETS' AND date BETWEEN '2021-01-01' AND '2022-01-01';,"SELECT AVG(price) FROM carbon_prices WHERE region = 'EU Emissions Trading System' AND date >= DATEADD(year, -1, GETDATE());",0 What are the top 3 countries with the highest total volunteer hours in arts and culture activities?,"CREATE TABLE VolunteerHours (VolunteerID INT, Country VARCHAR(50), Activity VARCHAR(50), Hours INT); ","SELECT Country, SUM(Hours) AS TotalHours FROM VolunteerHours WHERE Activity = 'Arts and Culture' GROUP BY Country ORDER BY TotalHours DESC LIMIT 3;","SELECT Country, SUM(Hours) as TotalHours FROM VolunteerHours WHERE Activity = 'Arts and Culture' GROUP BY Country ORDER BY TotalHours DESC LIMIT 3;",0 What qual had a finish of 16 in 1968?,"CREATE TABLE table_name_64 (qual VARCHAR, finish VARCHAR, year VARCHAR);","SELECT qual FROM table_name_64 WHERE finish = ""16"" AND year = ""1968"";","SELECT qual FROM table_name_64 WHERE finish = ""16"" AND year = 1968;",0 "Which name has a License of gpl, and a Platform of windows?","CREATE TABLE table_name_47 (name VARCHAR, license VARCHAR, platform VARCHAR);","SELECT name FROM table_name_47 WHERE license = ""gpl"" AND platform = ""windows"";","SELECT name FROM table_name_47 WHERE license = ""gpl"" AND platform = ""windows"";",1 Name the trinidad for yellow-bellied puffing snake,"CREATE TABLE table_1850282_7 (trinidad VARCHAR, common_name VARCHAR);","SELECT trinidad FROM table_1850282_7 WHERE common_name = ""Yellow-bellied puffing snake"";","SELECT trinidad FROM table_1850282_7 WHERE common_name = ""Yellow-bellied puffing snake"";",1 What is the record for Brussels translations?,"CREATE TABLE table_name_84 (recorded VARCHAR, translation VARCHAR);","SELECT recorded FROM table_name_84 WHERE translation = ""brussels"";","SELECT recorded FROM table_name_84 WHERE translation = ""brussels"";",1 what is distance for the 7th position?,"CREATE TABLE table_25429986_1 (distance VARCHAR, position VARCHAR);","SELECT COUNT(distance) FROM table_25429986_1 WHERE position = ""7th"";","SELECT distance FROM table_25429986_1 WHERE position = ""7th"";",0 What is the maximum number of military bases in African countries?,"CREATE TABLE military_bases (country VARCHAR(50), num_bases INT); ","SELECT MAX(num_bases) FROM military_bases WHERE country IN ('Egypt', 'Algeria', 'South Africa', 'Morocco', 'Sudan', 'Libya');","SELECT MAX(num_bases) FROM military_bases WHERE country IN ('Nigeria', 'Egypt', 'South Africa');",0 How many products are sold by each supplier?,"CREATE TABLE Products (ProductID int, SupplierID int, QuantitySold int);","SELECT SupplierID, SUM(QuantitySold) FROM Products GROUP BY SupplierID;","SELECT SupplierID, SUM(QuantitySold) as TotalSold FROM Products GROUP BY SupplierID;",0 List all marine species and their conservation status.,"CREATE TABLE marine_species (species_id INT, species_name VARCHAR(255)); CREATE TABLE conservation_status (status_id INT, species_id INT, status VARCHAR(50)); ","SELECT marine_species.species_name, conservation_status.status FROM marine_species INNER JOIN conservation_status ON marine_species.species_id = conservation_status.species_id;","SELECT marine_species.species_name, conservation_status.status FROM marine_species INNER JOIN conservation_status ON marine_species.species_id = conservation_status.species_id;",1 What airport is in Sabha?,"CREATE TABLE table_name_43 (airport VARCHAR, city VARCHAR);","SELECT airport FROM table_name_43 WHERE city = ""sabha"";","SELECT airport FROM table_name_43 WHERE city = ""sabha"";",1 How many satellites has China launched?,"CREATE TABLE Satellite_Launches (Launch_ID INT, Country VARCHAR(50), Satellite_Name VARCHAR(50), Launch_Year INT, PRIMARY KEY (Launch_ID)); ",SELECT COUNT(*) FROM Satellite_Launches WHERE Country = 'China';,SELECT COUNT(*) FROM Satellite_Launches WHERE Country = 'China';,1 What is the average water temperature for each location in the Carps_Farming table?,"CREATE TABLE Carps_Farming (Farm_ID INT, Farm_Name TEXT, Location TEXT, Water_Temperature FLOAT); ","SELECT Location, AVG(Water_Temperature) FROM Carps_Farming GROUP BY Location;","SELECT Location, AVG(Water_Temperature) FROM Carps_Farming GROUP BY Location;",1 "What is the average age of patients who have been treated for generalized anxiety disorder, by their ethnicity?","CREATE TABLE patients (id INT, age INT, ethnicity TEXT); CREATE TABLE diagnoses (patient_id INT, condition TEXT); ","SELECT ethnicity, AVG(age) as avg_age FROM patients JOIN diagnoses ON patients.id = diagnoses.patient_id WHERE diagnoses.condition = 'Generalized Anxiety Disorder' GROUP BY ethnicity;","SELECT p.ethnicity, AVG(p.age) FROM patients p JOIN diagnoses d ON p.id = d.patient_id WHERE d.condition = 'Generalized Anxiety Disorder' GROUP BY p.ethnicity;",0 "Display the number of transactions for each regulatory framework, along with the total number of digital assets associated with each framework. If there are no associated digital assets, display '0'.","CREATE TABLE regulatory_frameworks (framework_id INT, framework_name VARCHAR(255)); CREATE TABLE assets_frameworks (asset_id INT, framework_id INT);","SELECT rf.framework_name, COUNT(rf.framework_id) as num_frameworks, SUM(CASE WHEN af.asset_id IS NOT NULL THEN 1 ELSE 0 END) as num_assets FROM regulatory_frameworks rf LEFT JOIN assets_frameworks af ON rf.framework_id = af.framework_id GROUP BY rf.framework_name;","SELECT regulatory_frameworks.framework_name, COUNT(DISTINCT assets_frameworks.asset_id) as num_transactions, SUM(assets_frameworks.asset_id) as total_assets FROM regulatory_frameworks INNER JOIN assets_frameworks ON regulatory_frameworks.framework_id = assets_frameworks.framework_id GROUP BY regulatory_frameworks.framework_name;",0 Who was the opponent when there was 117 rushing yards?,"CREATE TABLE table_26108103_2 (opponent VARCHAR, rushing_yards VARCHAR);",SELECT opponent FROM table_26108103_2 WHERE rushing_yards = 117;,SELECT opponent FROM table_26108103_2 WHERE rushing_yards = 117;,1 What is the production rate trend for each well over time?,"CREATE TABLE Production (ProductionID INT, WellID INT, ProductionDate DATE, ProductionRate FLOAT, Country VARCHAR(50)); ","SELECT WellID, ProductionDate, ProductionRate, ROW_NUMBER() OVER (PARTITION BY WellID ORDER BY ProductionDate) AS RowNumber FROM Production;","SELECT WellID, ProductionDate, ProductionRate, ROW_NUMBER() OVER (PARTITION BY WellID ORDER BY ProductionDate DESC) as Rank FROM Production;",0 Delete the records of movies from the 'Movies' table where the production budget exceeds $150 million.,"CREATE TABLE Movies (movie_id INT PRIMARY KEY, title VARCHAR(100), release_year INT, production_budget INT); ",DELETE FROM Movies WHERE production_budget > 150000000;,DELETE FROM Movies WHERE production_budget > 150000000;,1 Who was the parter against Marin čilić lovro Zovko?,"CREATE TABLE table_name_41 (partnering VARCHAR, opponents VARCHAR);","SELECT partnering FROM table_name_41 WHERE opponents = ""marin čilić lovro zovko"";","SELECT partnering FROM table_name_41 WHERE opponents = ""marin ili lovro zovko"";",0 List all threat intelligence alerts with a severity of 'High' and issued in 2021.,"CREATE TABLE ThreatIntelligence (alert_id INT, date DATE, severity VARCHAR(255)); ",SELECT * FROM ThreatIntelligence WHERE severity = 'High' AND YEAR(date) = 2021;,SELECT * FROM ThreatIntelligence WHERE severity = 'High' AND date BETWEEN '2021-01-01' AND '2021-12-31';,0 Which recycling plants in the United States process more than 5 types of waste?,"CREATE TABLE recycling_plants (name TEXT, country TEXT, waste_types INTEGER); ",SELECT name FROM recycling_plants WHERE country = 'USA' AND waste_types > 5;,SELECT name FROM recycling_plants WHERE country = 'United States' AND waste_types > 5;,0 Which manufacturer has 8 laps?,"CREATE TABLE table_name_18 (manufacturer VARCHAR, laps VARCHAR);","SELECT manufacturer FROM table_name_18 WHERE laps = ""8"";",SELECT manufacturer FROM table_name_18 WHERE laps = 8;,0 What is the average age of policyholders with auto insurance policies in Texas?,"CREATE TABLE policyholders (id INT, state VARCHAR(2), policy_type VARCHAR(20), age INT); ",SELECT AVG(age) FROM policyholders WHERE state = 'TX' AND policy_type = 'Auto';,SELECT AVG(age) FROM policyholders WHERE state = 'Texas' AND policy_type = 'Auto';,0 In which series was season 18?,"CREATE TABLE table_2409041_6 (no_in_series VARCHAR, no_in_season VARCHAR);",SELECT COUNT(no_in_series) FROM table_2409041_6 WHERE no_in_season = 18;,SELECT no_in_series FROM table_2409041_6 WHERE no_in_season = 18;,0 What is the latest marine conservation initiative in the Pacific Ocean?,"CREATE TABLE marine_conservation_initiatives (id INT, initiative_name TEXT, start_date DATE, location TEXT); ",SELECT initiative_name FROM marine_conservation_initiatives WHERE location = 'Pacific Ocean' ORDER BY start_date DESC LIMIT 1;,"SELECT initiative_name, start_date FROM marine_conservation_initiatives WHERE location = 'Pacific Ocean' ORDER BY start_date DESC LIMIT 1;",0 What is the success rate of cases in which the plaintiff's age is greater than 65?,"CREATE TABLE cases (id INT, plaintiff_age INT, case_outcome VARCHAR(10)); ",SELECT 100.0 * AVG(CASE WHEN cases.plaintiff_age > 65 THEN (CASE WHEN cases.case_outcome = 'won' THEN 1 ELSE 0 END) ELSE 0 END) / COUNT(*) AS success_rate FROM cases;,SELECT COUNT(*) * 100.0 / (SELECT COUNT(*) FROM cases WHERE plaintiff_age > 65) AS success_rate FROM cases WHERE plaintiff_age > 65;,0 What is the total number of security incidents in the last year by country?,"CREATE TABLE Incidents (id INT, incident_year DATE, country VARCHAR(255)); ","SELECT Incidents.country AS Country, COUNT(*) AS Total_Incidents FROM Incidents WHERE Incidents.incident_year >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) GROUP BY Incidents.country;","SELECT country, COUNT(*) FROM Incidents WHERE incident_year >= DATEADD(year, -1, GETDATE()) GROUP BY country;",0 How many female employees work in the 'sustainable_practices' table?,"CREATE TABLE sustainable_practices (employee_id INT, first_name VARCHAR(50), last_name VARCHAR(50), gender VARCHAR(10), position VARCHAR(50), hours_worked INT); ",SELECT COUNT(*) FROM sustainable_practices WHERE gender = 'Female';,SELECT COUNT(*) FROM sustainable_practices WHERE gender = 'Female';,1 Which destinations received the most sustainable tourism awards in 2018 and 2019?,"CREATE TABLE destinations (name VARCHAR(50), year INT, awards INT);CREATE TABLE sustainable_tourism_awards (destination_name VARCHAR(50), year INT, category VARCHAR(50));","SELECT name FROM destinations WHERE awards IN (SELECT MAX(awards) FROM destinations WHERE year IN (2018, 2019)) AND year IN (2018, 2019) UNION SELECT destination_name FROM sustainable_tourism_awards WHERE category = 'Sustainable Tourism' AND year IN (2018, 2019) GROUP BY destination_name HAVING COUNT(*) > 1;","SELECT destinations.name, SUM(sustainable_tourism_awards.awards) as total_awards FROM destinations INNER JOIN sustainable_tourism_awards ON destinations.name = sustainable_tourism_awards.destination_name WHERE destinations.year IN (2018, 2019) GROUP BY destinations.name ORDER BY total_awards DESC;",0 "What is the number of employees in each sector in the 'workplace_safety' schema, grouped by sector?","CREATE SCHEMA workplace_safety; CREATE TABLE employees (id INT, name VARCHAR, sector VARCHAR); ","SELECT sector, COUNT(*) AS num_employees FROM workplace_safety.employees GROUP BY sector;","SELECT sector, COUNT(*) FROM workplace_safety.employees GROUP BY sector;",0 Update the records of community health workers whose age is above 45 and set their new age to 45.,"CREATE TABLE CommunityHealthWorkers (WorkerID INT, Age INT, Gender VARCHAR(10)); ",UPDATE CommunityHealthWorkers SET Age = 45 WHERE Age > 45;,UPDATE CommunityHealthWorkers SET Age = 45 WHERE Age > 45;,1 What is the total revenue for each category of products?,"CREATE TABLE products (product_id INT, category VARCHAR(255), revenue INT); ","SELECT category, SUM(revenue) FROM products GROUP BY category;","SELECT category, SUM(revenue) FROM products GROUP BY category;",1 Find the number of AI safety incidents for each region in the US.,"CREATE TABLE ai_safety_incidents (incident_id INTEGER, incident_region TEXT); ","SELECT incident_region, COUNT(*) FROM ai_safety_incidents GROUP BY incident_region;","SELECT incident_region, COUNT(*) FROM ai_safety_incidents GROUP BY incident_region;",1 "If the speaker is Munu Adhi (2) K. Rajaram, what is the election year maximum?","CREATE TABLE table_23512864_4 (election_year INTEGER, speaker VARCHAR);","SELECT MAX(election_year) FROM table_23512864_4 WHERE speaker = ""Munu Adhi (2) K. Rajaram"";","SELECT MAX(election_year) FROM table_23512864_4 WHERE speaker = ""Munu Adhi (2) K. Rajaram"";",1 How many marine life research data entries are there for species with the word 'Shark' in their name?,"CREATE TABLE marine_life_research(id INT, species VARCHAR(50), population INT); ",SELECT COUNT(*) FROM marine_life_research WHERE species LIKE '%Shark%';,SELECT COUNT(*) FROM marine_life_research WHERE species LIKE '%Shark%';,1 Get the number of renewable energy installations in each country,"CREATE TABLE renewable_installs (country VARCHAR(50), installations INT); ","SELECT country, COUNT(installs) FROM renewable_installs GROUP BY country;","SELECT country, SUM(installations) FROM renewable_installs GROUP BY country;",0 List the names and locations of all marine research facilities in the Arctic ocean.,"CREATE TABLE marine_research_facilities (facility_name TEXT, location TEXT); ","SELECT facility_name, location FROM marine_research_facilities WHERE location = 'Arctic Ocean';","SELECT facility_name, location FROM marine_research_facilities WHERE location = 'Arctic Ocean';",1 What is the percentage of water conservation initiatives implemented in each state in the southern region in 2019?',"CREATE TABLE conservation_initiatives (state VARCHAR(255), init_date DATE, type VARCHAR(255)); CREATE TABLE state_population (state VARCHAR(255), population INT); ","SELECT ci.state, (COUNT(ci.init_date) * 100.0 / sp.population) AS percentage FROM conservation_initiatives AS ci JOIN state_population AS sp ON ci.state = sp.state WHERE ci.state IN ('Florida', 'Georgia', 'South Carolina', 'North Carolina', 'Virginia', 'West Virginia', 'Maryland', 'Delaware', 'District of Columbia') AND YEAR(ci.init_date) = 2019 GROUP BY ci.state;","SELECT c.state, (COUNT(c.init_date) * 100.0 / (SELECT COUNT(*) FROM conservation_initiatives c INNER JOIN state_population sp ON c.state = sp.state)) as percentage FROM conservation_initiatives c INNER JOIN state_population sp ON c.state = sp.state WHERE c.type = 'Water Conservation' AND YEAR(c.init_date) = 2019 GROUP BY c.state;",0 List the number of offshore drilling platforms in the South China Sea as of 2018.,"CREATE TABLE south_china_sea_platforms (year INT, region VARCHAR(20), num_platforms INT); ",SELECT num_platforms FROM south_china_sea_platforms WHERE year = 2018 AND region = 'South China Sea';,SELECT SUM(num_platforms) FROM south_china_sea_platforms WHERE year = 2018 AND region = 'South China Sea';,0 Find the total number of data sets related to economic development in 'island' schema where is_open is true.,"CREATE SCHEMA island; CREATE TABLE island.economic_development_data (id INT, name VARCHAR(255), is_open BOOLEAN); ",SELECT COUNT(*) FROM island.economic_development_data WHERE is_open = true;,SELECT COUNT(*) FROM island.economic_development_data WHERE is_open = true;,1 What is the total investment amount for each investor?,"CREATE TABLE investors (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), investment_amount DECIMAL(10,2)); ","SELECT id, SUM(investment_amount) FROM investors GROUP BY id;","SELECT name, SUM(investment_amount) as total_investment FROM investors GROUP BY name;",0 Find all the forenames of distinct drivers who was in position 1 as standing and won?,"CREATE TABLE driverstandings (driverid VARCHAR, position VARCHAR, wins VARCHAR); CREATE TABLE drivers (forename VARCHAR, driverid VARCHAR);",SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1;,SELECT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1;,0 What are the first names and last names of the employees who live in Calgary city.,"CREATE TABLE EMPLOYEE (FirstName VARCHAR, LastName VARCHAR, City VARCHAR);","SELECT FirstName, LastName FROM EMPLOYEE WHERE City = ""Calgary"";","SELECT FirstName, LastName FROM EMPLOYEE WHERE City = ""Calgary"";",1 How many drivers drove on Suzuka Circuit where Loïc Duval took pole position?,"CREATE TABLE table_22379931_2 (winning_driver VARCHAR, circuit VARCHAR, pole_position VARCHAR);","SELECT COUNT(winning_driver) FROM table_22379931_2 WHERE circuit = ""Suzuka circuit"" AND pole_position = ""Loïc Duval"";","SELECT COUNT(winning_driver) FROM table_22379931_2 WHERE circuit = ""Suzuka Circuit"" AND pole_position = ""Loc Duval"";",0 "What is the average data usage per mobile customer in the city of Chicago, split by postpaid and prepaid plans and by device type?","CREATE TABLE mobile_customers (customer_id INT, data_usage FLOAT, city VARCHAR(20), plan_type VARCHAR(10), device_type VARCHAR(10));","SELECT plan_type, device_type, AVG(data_usage) FROM mobile_customers WHERE city = 'Chicago' GROUP BY plan_type, device_type;","SELECT plan_type, device_type, AVG(data_usage) as avg_data_usage FROM mobile_customers WHERE city = 'Chicago' GROUP BY plan_type, device_type;",0 What is the number of employees working in mining operations in each state?,"CREATE TABLE num_employees (site VARCHAR(20), state VARCHAR(20), num_employees INT); ","SELECT state, SUM(num_employees) FROM num_employees GROUP BY state;","SELECT state, SUM(num_employees) FROM num_employees GROUP BY state;",1 Create a table to store information about network infrastructure investments,"CREATE TABLE network_investments (id INT PRIMARY KEY, location TEXT, investment_amount INT, date DATE);","CREATE TABLE network_investments AS SELECT * FROM (VALUES (1, 'New York', 500000, '2021-09-01'), (2, 'California', 600000, '2021-08-15'), (3, 'Texas', 400000, '2021-07-01'));","CREATE TABLE network_investments (id INT PRIMARY KEY, location TEXT, investment_amount INT, date DATE);",0 "Which Venue has a Year larger than 1868, and an Opposition of derbyshire?","CREATE TABLE table_name_97 (venue VARCHAR, year VARCHAR, opposition VARCHAR);","SELECT venue FROM table_name_97 WHERE year > 1868 AND opposition = ""derbyshire"";","SELECT venue FROM table_name_97 WHERE year > 1868 AND opposition = ""derbyshire"";",1 How many TV shows were produced in each genre in the USA?,"CREATE TABLE TV_Shows (id INT, title VARCHAR(255), country VARCHAR(255), genre VARCHAR(255)); ","SELECT genre, COUNT(*) FROM TV_Shows WHERE country = 'USA' GROUP BY genre;","SELECT genre, COUNT(*) FROM TV_Shows WHERE country = 'USA' GROUP BY genre;",1 What was the highest number of touchdowns by a player?,CREATE TABLE table_25647137_2 (touchdowns INTEGER);,SELECT MAX(touchdowns) FROM table_25647137_2;,SELECT MAX(touchdowns) FROM table_25647137_2;,1 "What is the average caseload per parole officer, partitioned by region, for the year 2020?","CREATE TABLE parole_officers (officer_id INT, region VARCHAR(255), cases_assigned INT, case_year INT); ","SELECT region, AVG(cases_assigned) avg_cases FROM (SELECT officer_id, region, cases_assigned, case_year, ROW_NUMBER() OVER (PARTITION BY region ORDER BY case_year DESC) rn FROM parole_officers WHERE case_year = 2020) x WHERE rn = 1 GROUP BY region;","SELECT region, AVG(cases_assigned) as avg_caseload FROM parole_officers WHERE case_year = 2020 GROUP BY region;",0 Get the total cost of all climate adaptation projects in 'South America'.,"CREATE TABLE climate_adaptation (project_id INT, project_name VARCHAR(255), location VARCHAR(255), start_date DATE, end_date DATE, total_cost DECIMAL(10,2));",SELECT SUM(total_cost) FROM climate_adaptation WHERE location = 'South America';,SELECT SUM(total_cost) FROM climate_adaptation WHERE location = 'South America';,1 Who are the top 3 content creators in terms of views for Asian communities?,"CREATE TABLE content_views (id INT, content_creator VARCHAR, views INT, community VARCHAR); ","SELECT content_creator, SUM(views) as total_views FROM content_views WHERE community = 'Asian American' GROUP BY content_creator ORDER BY total_views DESC LIMIT 3;","SELECT content_creator, views FROM content_views WHERE community = 'Asian' ORDER BY views DESC LIMIT 3;",0 Delete all records of network infrastructure investments in the 'Asia' region.,"CREATE TABLE investments(id INT, investment VARCHAR(25), date DATE, region VARCHAR(20)); ",DELETE FROM investments WHERE region = 'Asia';,DELETE FROM investments WHERE region = 'Asia';,1 "Name the high points for toyota center 18,269?","CREATE TABLE table_11964263_13 (high_points VARCHAR, location_attendance VARCHAR);","SELECT high_points FROM table_11964263_13 WHERE location_attendance = ""Toyota Center 18,269"";","SELECT high_points FROM table_11964263_13 WHERE location_attendance = ""Toyota Center 18,269"";",1 What is the maximum range of electric vehicles in the vehicle_test_data table for each make and model?,"CREATE TABLE vehicle_test_data (id INT, make VARCHAR(20), model VARCHAR(20), range DECIMAL(5,2)); ","SELECT make, model, MAX(range) FROM vehicle_test_data GROUP BY make, model;","SELECT make, model, MAX(range) FROM vehicle_test_data GROUP BY make, model;",1 find the pixel aspect ratio and nation of the tv channels that do not use English.,"CREATE TABLE tv_channel (Pixel_aspect_ratio_PAR VARCHAR, country VARCHAR, LANGUAGE VARCHAR);","SELECT Pixel_aspect_ratio_PAR, country FROM tv_channel WHERE LANGUAGE <> 'English';","SELECT Pixel_aspect_ratio_PAR, country FROM tv_channel WHERE LANGUAGE IS NULL;",0 What is the trend of satellite deployment projects over the last decade?,"CREATE TABLE satellite_projects (id INT, country VARCHAR(255), manufacturer VARCHAR(255), project_start_date DATE, project_end_date DATE);","SELECT YEAR(project_start_date) as year, COUNT(*) as num_projects FROM satellite_projects GROUP BY year ORDER BY year;","SELECT country, manufacturer, project_start_date, project_end_date, ROW_NUMBER() OVER (ORDER BY project_start_date DESC) as rn FROM satellite_projects WHERE project_start_date >= DATEADD(year, -10, GETDATE()) GROUP BY country, manufacturer, project_start_date, project_end_date;",0 What is donovan's surname?,"CREATE TABLE table_name_12 (surname VARCHAR, first VARCHAR);","SELECT surname FROM table_name_12 WHERE first = ""donovan"";","SELECT surname FROM table_name_12 WHERE first = ""donovan"";",1 What is the score on 22 january 2008?,"CREATE TABLE table_name_88 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_88 WHERE date = ""22 january 2008"";","SELECT score FROM table_name_88 WHERE date = ""22 january 2008"";",1 what's the first elected with opponent being ralph regula (r) 75.0% j. michael finn (d) 25.0%,"CREATE TABLE table_1341522_38 (first_elected VARCHAR, opponent VARCHAR);","SELECT first_elected FROM table_1341522_38 WHERE opponent = ""Ralph Regula (R) 75.0% J. Michael Finn (D) 25.0%"";","SELECT first_elected FROM table_1341522_38 WHERE opponent = ""Ralph Rege (R) 75.0% J. Michael Finn (D) 25.0%"";",0 What was the average ticket price for concerts in a specific city?,"CREATE TABLE Concerts (id INT, city VARCHAR(20), price FLOAT, tickets_sold INT); ",SELECT AVG(price) FROM Concerts WHERE city = 'Chicago';,"SELECT city, AVG(price) FROM Concerts GROUP BY city;",0 Calculate the total sales revenue for each day of the week.,"CREATE TABLE Sales (SaleID int, SaleDate date, Revenue decimal(5,2)); ","SELECT DATEPART(dw, SaleDate) AS DayOfWeek, SUM(Revenue) AS TotalRevenue FROM Sales GROUP BY DATEPART(dw, SaleDate);","SELECT SaleDate, SUM(Revenue) as TotalRevenue FROM Sales GROUP BY SaleDate;",0 Add new union member records for the month of April in the Midwestern region.,"CREATE TABLE union_membership (id INT, member_name VARCHAR(255), join_date DATE, is_new_member BOOLEAN);","INSERT INTO union_membership (id, member_name, join_date, is_new_member) VALUES (6, 'Member F', '2022-04-01', true), (7, 'Member G', '2022-04-15', true);","INSERT INTO union_membership (id, member_name, join_date, is_new_member) VALUES (1, 'Midwestern', '2022-04-01', TRUE);",0 What is the minimum biomass of any whale species in the Indian Ocean?,"CREATE TABLE whale_biomass (species TEXT, location TEXT, biomass INTEGER); ",SELECT MIN(biomass) FROM whale_biomass WHERE location = 'Indian';,SELECT MIN(biomass) FROM whale_biomass WHERE location = 'Indian Ocean';,0 Find the top 5 hotels with the highest CO2 emission?,"CREATE TABLE Hotels (id INT, name TEXT, country TEXT, type TEXT, co2_emission INT); ","SELECT name, SUM(co2_emission) AS total_emission FROM Hotels GROUP BY name ORDER BY total_emission DESC LIMIT 5;","SELECT name, co2_emission FROM Hotels ORDER BY co2_emission DESC LIMIT 5;",0 What is the average emergency response time for each neighborhood?,"CREATE TABLE Neighborhoods (NeighborhoodID INT, Name VARCHAR(50)); CREATE TABLE EmergencyResponses (ResponseID INT, NeighborhoodID INT, ResponseTime INT);","SELECT N.Name, AVG(E.ResponseTime) as AvgResponseTime FROM Neighborhoods N INNER JOIN EmergencyResponses E ON N.NeighborhoodID = E.NeighborhoodID GROUP BY N.Name;","SELECT Neighborhoods.Name, AVG(EmergencyResponses.ResponseTime) as AvgResponseTime FROM Neighborhoods INNER JOIN EmergencyResponses ON Neighborhoods.NeighborhoodID = EmergencyResponses.NeighborhoodID GROUP BY Neighborhoods.Name;",0 What's the lowest grid with and entrant of fred saunders?,"CREATE TABLE table_name_47 (grid INTEGER, entrant VARCHAR);","SELECT MIN(grid) FROM table_name_47 WHERE entrant = ""fred saunders"";","SELECT MIN(grid) FROM table_name_47 WHERE entrant = ""fred saunders"";",1 Get the number of inclusive policies for each city in inclusive_cities table.,"CREATE TABLE inclusive_cities (id INT, city VARCHAR(255), policy_count INT); ","SELECT city, policy_count FROM inclusive_cities;","SELECT city, policy_count FROM inclusive_cities GROUP BY city;",0 Update records of subscribers with data usage of 32GB in Florida to 33GB.,"CREATE TABLE mobile_subscribers (subscriber_id INT, data_usage FLOAT, state VARCHAR(255)); ",UPDATE mobile_subscribers SET data_usage = 33 WHERE data_usage = 32 AND state = 'Florida';,UPDATE mobile_subscribers SET data_usage = 33 WHERE state = 'Florida' AND data_usage = 32;,0 "How many hours of professional development training have been completed by teachers in each subject area, in the last year?","CREATE TABLE teacher_training (id INT, teacher_id INT, subject_area VARCHAR(50), training_hours INT, training_date DATE); ","SELECT subject_area, PERIOD_DIFF(DATE_FORMAT(CURDATE(), '%Y%m'), DATE_FORMAT(training_date, '%Y%m')) as training_months, SUM(training_hours) as total_hours FROM teacher_training WHERE training_date >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR) GROUP BY subject_area, training_months;","SELECT subject_area, SUM(training_hours) as total_hours FROM teacher_training WHERE training_date >= DATEADD(year, -1, GETDATE()) GROUP BY subject_area;",0 How many traditional music instruments are documented for each country?,"CREATE TABLE MusicInstruments (id INT, instrument VARCHAR(255), country VARCHAR(255)); ","SELECT country, COUNT(*) FROM MusicInstruments GROUP BY country;","SELECT country, COUNT(instrument) FROM MusicInstruments GROUP BY country;",0 Find the number of albums released by Latin American artists in the last 10 years.,"CREATE TABLE artists (artist_id INT, artist_name TEXT, country TEXT); CREATE TABLE albums (album_id INT, title TEXT, release_date DATE, artist_id INT); ","SELECT COUNT(albums.album_id) FROM albums JOIN artists ON albums.artist_id = artists.artist_id WHERE artists.country IN ('Mexico', 'Brazil') AND albums.release_date >= DATE_SUB(CURDATE(), INTERVAL 10 YEAR);","SELECT COUNT(*) FROM albums JOIN artists ON albums.artist_id = artists.artist_id WHERE artists.country = 'Latin America' AND albums.release_date >= DATEADD(year, -10, GETDATE());",0 "What is the total funding received by companies in the 'Fintech' sector, grouped by their founding year?","CREATE TABLE companies (id INT, name TEXT, industry TEXT, founding_year INT, funding FLOAT); ","SELECT founding_year, SUM(funding) FROM companies WHERE industry = 'Fintech' GROUP BY founding_year;","SELECT founding_year, SUM(funding) FROM companies WHERE industry = 'Fintech' GROUP BY founding_year;",1 "What is the total number of steps taken by members with the last name ""Garcia""?","CREATE TABLE wearable_data (member_id INT, step_count INT, record_date DATE, last_name VARCHAR(50)); ",SELECT SUM(step_count) FROM wearable_data WHERE last_name = 'Garcia';,SELECT SUM(step_count) FROM wearable_data WHERE last_name = 'Garcia';,1 Update the military technology with ID 3 to have a new technology type.,"CREATE TABLE military_technology (id INT, name VARCHAR(255), technology_type VARCHAR(255));",UPDATE military_technology SET technology_type = 'Air Defense System' WHERE id = 3;,UPDATE military_technology SET technology_type = 'new' WHERE id = 3;,0 What is the average age of male members who use a heart rate monitor?,"CREATE TABLE member_details (member_id INT, gender VARCHAR(10), uses_heart_rate_monitor INT, age INT); ",SELECT AVG(age) FROM member_details WHERE gender = 'Male' AND uses_heart_rate_monitor = 1;,SELECT AVG(age) FROM member_details WHERE gender = 'Male' AND uses_heart_rate_monitor = 'Heart Rate Monitor';,0 How many security incidents were resolved by each tier 1 support engineer in the last quarter?,"CREATE TABLE incidents (id INT, status VARCHAR(255), resolution_date DATE, support_tier INT, support_engineer VARCHAR(255)); ","SELECT support_engineer, COUNT(*) AS resolved_incidents FROM incidents WHERE support_tier = 1 AND status = 'Resolved' AND resolution_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH) GROUP BY support_engineer;","SELECT support_engineer, COUNT(*) FROM incidents WHERE resolution_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH) AND support_tier = 1 GROUP BY support_engineer;",0 Who is the 'manager' of the 'quality control' department?,"CREATE TABLE departments (name VARCHAR(50), manager VARCHAR(100)); ",SELECT manager FROM departments WHERE name = 'quality control';,SELECT manager FROM departments WHERE name = 'quality control';,1 "Get the number of users who liked, shared, or commented on posts containing the hashtag ""#gaming"" in March 2022, in the 'gaming' network.","CREATE TABLE posts (id INT, user_id INT, timestamp DATETIME, content TEXT, hashtags TEXT, network VARCHAR(255)); ",SELECT COUNT(DISTINCT user_id) FROM posts WHERE hashtags LIKE '%#gaming%' AND MONTH(timestamp) = 3 AND network = 'gaming';,SELECT COUNT(*) FROM posts WHERE hashtags LIKE '%#gaming%' AND timestamp BETWEEN '2022-03-01' AND '2022-03-31' AND network = 'gaming';,0 "Which Position has an Event of 10,000 m, and a Competition of world championships, and a Year larger than 1993?","CREATE TABLE table_name_8 (position VARCHAR, year VARCHAR, event VARCHAR, competition VARCHAR);","SELECT position FROM table_name_8 WHERE event = ""10,000 m"" AND competition = ""world championships"" AND year > 1993;","SELECT position FROM table_name_8 WHERE event = ""10,000 m"" AND competition = ""world championships"" AND year > 1993;",1 "What is the total water consumption in the residential sector in the United States for the year 2022, excluding the months of June, July, and August?","CREATE TABLE monthly_residential_water_usage (region VARCHAR(20), water_consumption FLOAT, usage_date DATE); ",SELECT SUM(water_consumption) FROM monthly_residential_water_usage WHERE region = 'United States' AND usage_date < '2022-06-01' AND usage_date >= '2022-01-01';,SELECT SUM(water_consumption) FROM monthly_residential_water_usage WHERE region = 'United States' AND usage_date BETWEEN '2022-01-01' AND '2022-06-30';,0 Insert a new record in table port_operations with operation as 'loading' and cargo_id as 103,"CREATE TABLE port_operations (id INT PRIMARY KEY, cargo_id INT, operation VARCHAR(20));","INSERT INTO port_operations (cargo_id, operation) VALUES (103, 'loading');","INSERT INTO port_operations (id, cargo_id, operation) VALUES (103, 'loading');",0 What is the total number of patients diagnosed with Ebola in Democratic Republic of Congo in 2021?,"CREATE TABLE Patients (ID INT, Gender VARCHAR(10), Disease VARCHAR(20), Country VARCHAR(30), Diagnosis_Date DATE); ",SELECT COUNT(*) FROM Patients WHERE Disease = 'Ebola' AND Country = 'Democratic Republic of Congo' AND YEAR(Diagnosis_Date) = 2021;,SELECT COUNT(*) FROM Patients WHERE Disease = 'Ebola' AND Country = 'Democratic Republic of Congo' AND YEAR(Diagnosis_Date) = 2021;,1 What is the total swimsuit with Preliminaries smaller than 8.27?,"CREATE TABLE table_name_48 (swimsuit INTEGER, preliminaries INTEGER);",SELECT SUM(swimsuit) FROM table_name_48 WHERE preliminaries < 8.27;,SELECT SUM(swimsuit) FROM table_name_48 WHERE preliminaries 8.27;,0 What nationality was the round 6 draft pick?,"CREATE TABLE table_name_44 (nationality VARCHAR, round VARCHAR);",SELECT nationality FROM table_name_44 WHERE round = 6;,SELECT nationality FROM table_name_44 WHERE round = 6;,1 How many Silver medals did the Nation of Croatia receive with a Total medal of more than 1?,"CREATE TABLE table_name_3 (silver INTEGER, nation VARCHAR, bronze VARCHAR, total VARCHAR);","SELECT MIN(silver) FROM table_name_3 WHERE bronze = 1 AND total > 1 AND nation = ""croatia"";","SELECT SUM(silver) FROM table_name_3 WHERE bronze = ""croatia"" AND total > 1;",0 What is the document id and name with greatest number of paragraphs?,"CREATE TABLE Documents (document_name VARCHAR, document_id VARCHAR); CREATE TABLE Paragraphs (document_id VARCHAR);","SELECT T1.document_id, T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY COUNT(*) DESC LIMIT 1;","SELECT T1.document_id, T1.document_name FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY COUNT(*) DESC LIMIT 1;",0 What is the average program impact score for the 'Black/African American' demographic in the 'Visual Arts' category?,"CREATE SCHEMA if not exists arts_culture; CREATE TABLE if not exists arts_culture.programs(program_id INT, program_name VARCHAR(50), demographic VARCHAR(10), category VARCHAR(20), impact_score INT);",SELECT AVG(programs.impact_score) FROM arts_culture.programs WHERE programs.demographic = 'Black/African American' AND programs.category = 'Visual Arts';,SELECT AVG(impact_score) FROM arts_culture.programs WHERE demographic = 'Black/African American' AND category = 'Visual Arts';,0 How many wildlife species are present in the mangrove forests of Southeast Asia?,"CREATE TABLE wildlife_species (forest_type VARCHAR(30), species_count INT); ",SELECT species_count FROM wildlife_species WHERE forest_type = 'Mangrove Forest - Southeast Asia';,SELECT SUM(species_count) FROM wildlife_species WHERE forest_type = 'Mangrove' AND region = 'Southeast Asia';,0 What is the age of the friend of Zach with longest year relationship?,"CREATE TABLE PersonFriend (friend VARCHAR, name VARCHAR, year VARCHAR); CREATE TABLE PersonFriend (YEAR INTEGER, name VARCHAR); CREATE TABLE Person (age VARCHAR, name VARCHAR);",SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT MAX(YEAR) FROM PersonFriend WHERE name = 'Zach');,SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT MAX(YEAR) FROM PersonFriend);,0 what is the lowest capacity in grodno,"CREATE TABLE table_name_79 (capacity INTEGER, location VARCHAR);","SELECT MIN(capacity) FROM table_name_79 WHERE location = ""grodno"";","SELECT MIN(capacity) FROM table_name_79 WHERE location = ""grodno"";",1 What are the names of all aircraft manufactured by Russian companies?,"CREATE TABLE Manufacturers (Id INT, Name VARCHAR(50), Country VARCHAR(50)); CREATE TABLE Aircraft (Id INT, Name VARCHAR(50), ManufacturerId INT); ",SELECT Aircraft.Name FROM Aircraft JOIN Manufacturers ON Aircraft.ManufacturerId = Manufacturers.Id WHERE Manufacturers.Country = 'Russia';,SELECT Aircraft.Name FROM Aircraft INNER JOIN Manufacturers ON Aircraft.ManufacturerId = Manufacturers.Id WHERE Manufacturers.Country = 'Russia';,0 What was the game site against the Dallas Texans?,"CREATE TABLE table_17765888_1 (game_site VARCHAR, opponent VARCHAR);","SELECT game_site FROM table_17765888_1 WHERE opponent = ""Dallas Texans"";","SELECT game_site FROM table_17765888_1 WHERE opponent = ""Dallas Texans"";",1 How many animals were admitted to the rehabilitation center in June 2021?,"CREATE TABLE rehab_center (animal_id INT, admission_date DATE); ",SELECT COUNT(*) FROM rehab_center WHERE admission_date BETWEEN '2021-06-01' AND '2021-06-30';,SELECT COUNT(*) FROM rehab_center WHERE admission_date BETWEEN '2021-01-01' AND '2021-06-30';,0 Name the original air date for harry hannigan directed by adam weissman,"CREATE TABLE table_23937219_2 (original_air_date VARCHAR, written_by VARCHAR, directed_by VARCHAR);","SELECT original_air_date FROM table_23937219_2 WHERE written_by = ""Harry Hannigan"" AND directed_by = ""Adam Weissman"";","SELECT original_air_date FROM table_23937219_2 WHERE written_by = ""Harry Hannigan"" AND directed_by = ""Adam Weissman"";",1 What is the average number of mental health screenings conducted per month for students in the 'Rural' district?,"CREATE TABLE mental_health_screenings (id INT, district TEXT, screening_date DATE); ",SELECT AVG(COUNT(*)) FROM mental_health_screenings WHERE district = 'Rural' GROUP BY EXTRACT(MONTH FROM screening_date);,"SELECT AVG(COUNT(*)) FROM mental_health_screenings WHERE district = 'Rural' AND screening_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) AND CURRENT_DATE GROUP BY DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);",0 "Which Played has a Position larger than 5, a Points larger than 0, and a Drawn smaller than 0?","CREATE TABLE table_name_26 (played INTEGER, drawn VARCHAR, position VARCHAR, points VARCHAR);",SELECT MAX(played) FROM table_name_26 WHERE position > 5 AND points > 0 AND drawn < 0;,SELECT SUM(played) FROM table_name_26 WHERE position > 5 AND points > 0 AND drawn 0;,0 What is the total value of defense contracts awarded to companies in California?,"CREATE TABLE defense_contracts (contract_id INT, company_name TEXT, state TEXT, contract_value FLOAT); ",SELECT SUM(contract_value) FROM defense_contracts WHERE state = 'California';,SELECT SUM(contract_value) FROM defense_contracts WHERE state = 'California';,1 Insert a new record into the 'Project_Timeline' table for the 'Sustainable City' project in the 'East' region.,"CREATE TABLE Project_Timeline (id INT, region VARCHAR(20), project VARCHAR(30), phase VARCHAR(20), start_date DATE, end_date DATE, labor_cost FLOAT);","INSERT INTO Project_Timeline (id, region, project, phase, start_date, end_date, labor_cost) VALUES (4, 'East', 'Sustainable City', 'Planning', '2022-10-01', '2023-01-31', 100000.00);","INSERT INTO Project_Timeline (id, region, project, phase, start_date, end_date, labor_cost) VALUES (1, 'Sustainable City', 'East', start_date, end_date, labor_cost);",0 List document id of documents status is done and document type is Paper and the document is shipped by shipping agent named USPS.,"CREATE TABLE Ref_Shipping_Agents (document_id VARCHAR, document_status_code VARCHAR, document_type_code VARCHAR); CREATE TABLE Documents (document_id VARCHAR, document_status_code VARCHAR, document_type_code VARCHAR);","SELECT document_id FROM Documents WHERE document_status_code = ""done"" AND document_type_code = ""Paper"" INTERSECT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = ""USPS"";","SELECT T1.document_id FROM Documents AS T1 JOIN Ref_Shipping_Agents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_status_code = ""done"" AND T2.document_type_code = ""Paper"" AND T2.document_type_code = ""USPS"";",0 What is the maximum cost of projects in the energy division?,"CREATE TABLE Projects (id INT, division VARCHAR(10)); CREATE TABLE EnergyProjects (id INT, project_id INT, cost DECIMAL(10,2)); ",SELECT MAX(e.cost) FROM EnergyProjects e JOIN Projects p ON e.project_id = p.id WHERE p.division = 'energy';,SELECT MAX(EnergyProjects.cost) FROM EnergyProjects INNER JOIN Projects ON EnergyProjects.project_id = Projects.id WHERE Projects.division = 'Energy';,0 What is the total budget for projects in 'Mumbai'?,"CREATE TABLE projects (id INT PRIMARY KEY, name VARCHAR(50), budget DECIMAL(10,2), start_date DATE, end_date DATE, location VARCHAR(50)); ",SELECT SUM(budget) FROM projects WHERE location = 'Mumbai';,SELECT SUM(budget) FROM projects WHERE location = 'Mumbai';,1 what's the report with fastest lap being felipe massa and winning driver being jenson button,"CREATE TABLE table_12161822_5 (report VARCHAR, fastest_lap VARCHAR, winning_driver VARCHAR);","SELECT report FROM table_12161822_5 WHERE fastest_lap = ""Felipe Massa"" AND winning_driver = ""Jenson Button"";","SELECT report FROM table_12161822_5 WHERE fastest_lap = ""Felipe Massa"" AND winning_driver = ""Jenson Button"";",1 Which districts with area_type 'Rural' have no budget allocated for any sector?,"CREATE TABLE districts (district_id INT, district_name VARCHAR(20), area_type VARCHAR(10)); CREATE TABLE budget_allocation (budget_id INT, district_id INT, sector VARCHAR(20), budget_amount INT); ",SELECT d.district_name FROM districts d LEFT JOIN budget_allocation ba ON d.district_id = ba.district_id WHERE ba.district_id IS NULL AND d.area_type = 'Rural' AND budget_amount IS NULL;,SELECT districts.district_name FROM districts INNER JOIN budget_allocation ON districts.district_id = budget_allocation.district_id WHERE districts.area_type = 'Rural' AND budget_allocation.sector IS NULL;,0 What is the average media literacy score by continent?,"CREATE TABLE media_literacy (id INT, user_id INT, country VARCHAR(50), continent VARCHAR(50), score INT); ","SELECT continent, AVG(score) as avg_score FROM media_literacy GROUP BY continent;","SELECT continent, AVG(score) as avg_score FROM media_literacy GROUP BY continent;",1 WHAT IS THE NAME WITH BAYER LEVERKUSEN?,"CREATE TABLE table_name_53 (name VARCHAR, moving_to VARCHAR);","SELECT name FROM table_name_53 WHERE moving_to = ""bayer leverkusen"";","SELECT name FROM table_name_53 WHERE moving_to = ""bayer leverkusen"";",1 "Who was the Opponent in the match with a Score of 6–3, 6–4?","CREATE TABLE table_name_61 (opponent VARCHAR, score VARCHAR);","SELECT opponent FROM table_name_61 WHERE score = ""6–3, 6–4"";","SELECT opponent FROM table_name_61 WHERE score = ""6–3, 6–4"";",1 How many times did he hold 12 poles?,"CREATE TABLE table_26400438_1 (f_laps VARCHAR, poles VARCHAR);",SELECT COUNT(f_laps) FROM table_26400438_1 WHERE poles = 12;,SELECT f_laps FROM table_26400438_1 WHERE poles = 12;,0 "What was the total attendance for each program type, with an additional column for the percentage of total attendance?","CREATE TABLE Attendance (id INT, program_type VARCHAR(50), attendees INT); ","SELECT program_type, SUM(attendees) as total_attendance, 100.0 * SUM(attendees) / (SELECT SUM(attendees) FROM Attendance) as percentage_of_total FROM Attendance GROUP BY program_type;","SELECT program_type, SUM(attendees) as total_attendance FROM Attendance GROUP BY program_type;",0 What is the lowest amount of goals scored that has more than 19 goal conceded and played less than 18?,"CREATE TABLE table_name_50 (goals_scored INTEGER, goals_conceded VARCHAR, played VARCHAR);",SELECT MIN(goals_scored) FROM table_name_50 WHERE goals_conceded > 19 AND played < 18;,SELECT MIN(goals_scored) FROM table_name_50 WHERE goals_conceded > 19 AND played 18;,0 Which College/junior/club team has a Round of 2?,"CREATE TABLE table_name_11 (college_junior_club_team VARCHAR, round VARCHAR);",SELECT college_junior_club_team FROM table_name_11 WHERE round = 2;,SELECT college_junior_club_team FROM table_name_11 WHERE round = 2;,1 What's the number of the 1.0.12 release version?,"CREATE TABLE table_28540539_2 (version VARCHAR, release VARCHAR);","SELECT COUNT(version) FROM table_28540539_2 WHERE release = ""1.0.12"";","SELECT COUNT(version) FROM table_28540539_2 WHERE release = ""1.0.12"";",1 Which is Natural Wood Keyboard with a Model of clps306?,"CREATE TABLE table_name_18 (natural_wood_keyboard VARCHAR, model VARCHAR);","SELECT natural_wood_keyboard FROM table_name_18 WHERE model = ""clps306"";","SELECT natural_wood_keyboard FROM table_name_18 WHERE model = ""clps306"";",1 What is the total number of losses that has draws larger than 1 and a Portland DFL of westerns?,"CREATE TABLE table_name_75 (losses INTEGER, portland_dfl VARCHAR, draws VARCHAR);","SELECT SUM(losses) FROM table_name_75 WHERE portland_dfl = ""westerns"" AND draws > 1;","SELECT SUM(losses) FROM table_name_75 WHERE portland_dfl = ""westerns"" AND draws > 1;",1 Insert a new record into the 'equipment' table for a new shovel from 'Canada' with ID 123,"CREATE TABLE equipment (id INT, type VARCHAR(50), country VARCHAR(50), purchase_date DATE);","INSERT INTO equipment (id, type, country, purchase_date) VALUES (123, 'shovel', 'Canada', CURRENT_DATE);","INSERT INTO equipment (id, type, country, purchase_date) VALUES (123, 'Spill', 'Canada', '2022-03-01');",0 What Winning driver has a Winning constructor of sunbeam?,"CREATE TABLE table_name_43 (winning_driver VARCHAR, winning_constructor VARCHAR);","SELECT winning_driver FROM table_name_43 WHERE winning_constructor = ""sunbeam"";","SELECT winning_driver FROM table_name_43 WHERE winning_constructor = ""sunbeam"";",1 What is the rank of the country with total more than 3 and more than 6 silver?,"CREATE TABLE table_name_66 (rank VARCHAR, total VARCHAR, silver VARCHAR);",SELECT rank FROM table_name_66 WHERE total > 3 AND silver > 6;,SELECT rank FROM table_name_66 WHERE total > 3 AND silver > 6;,1 "Create a new view named ""vessel_summary"" with columns ""vessel_id"", ""average_speed"", ""total_fuel_efficiency"", and ""successful_inspections"".","CREATE VIEW vessel_summary AS SELECT vessel_id, AVG(avg_speed) AS average_speed, SUM(fuel_efficiency) AS total_fuel_efficiency, COUNT(*) FILTER (WHERE result = 'PASS') AS successful_inspections FROM vessel_performance JOIN safety_records ON vessel_performance.vessel_id = safety_records.vessel_id GROUP BY vessel_id;","CREATE VIEW vessel_summary AS SELECT vessel_id, AVG(avg_speed) AS average_speed, SUM(fuel_efficiency) AS total_fuel_efficiency, COUNT(*) FILTER (WHERE result = 'PASS') AS successful_inspections FROM vessel_performance JOIN safety_records ON vessel_performance.vessel_id = safety_records.vessel_id GROUP BY vessel_id;","CREATE VIEW vessel_summary AS SELECT vessel_id, AVG(avg_speed) AS average_speed, SUM(total_fuel_efficiency) AS total_fuel_efficiency, COUNT(*) FILTER (WHERE result = 'PASS') AS successful_inspections FROM vessel_performance;",0 What is Gene Sauers' to par?,"CREATE TABLE table_name_28 (to_par VARCHAR, player VARCHAR);","SELECT to_par FROM table_name_28 WHERE player = ""gene sauers"";","SELECT to_par FROM table_name_28 WHERE player = ""gene sauers"";",1 Delete all diversity and inclusion training records for employees who were hired before 2020 or have a salary less than 50000.,"CREATE TABLE employees (id INT, first_name VARCHAR(50), last_name VARCHAR(50), hire_date DATE, salary INT); CREATE TABLE diversity_training (id INT, employee_id INT, training_name VARCHAR(50), completed_date DATE);",DELETE dt FROM diversity_training dt WHERE dt.employee_id IN (SELECT e.id FROM employees e WHERE e.hire_date < '2020-01-01' OR e.salary < 50000);,DELETE FROM diversity_training WHERE employee_id IN (SELECT employee_id FROM employees WHERE hire_date '2020-01-01' OR salary 50000);,0 What is the engine configuration $notes 0-100km/h for the engine type b5244 t2?,"CREATE TABLE table_1147705_1 (engine_configuration_ VARCHAR, _notes_0_100km_h VARCHAR, engine_type VARCHAR);","SELECT engine_configuration_ & _notes_0_100km_h FROM table_1147705_1 WHERE engine_type = ""B5244 T2"";","SELECT engine_configuration_ $notes_0_100km_h FROM table_1147705_1 WHERE engine_type = ""B5244 T2"";",0 Who are the top 5 donors supporting the health sector in Afghanistan?,"CREATE TABLE countries (id INT, name VARCHAR(100)); CREATE TABLE sectors (id INT, name VARCHAR(50)); CREATE TABLE donors (id INT, name VARCHAR(100), country_id INT); CREATE TABLE donations (id INT, donor_id INT, sector_id INT, amount FLOAT); ","SELECT d.name, SUM(donations.amount) as total_donation FROM donors d INNER JOIN donations ON d.id = donations.donor_id INNER JOIN sectors ON donations.sector_id = sectors.id INNER JOIN countries ON d.country_id = countries.id WHERE sectors.name = 'Health' AND countries.name = 'Afghanistan' GROUP BY d.id ORDER BY total_donation DESC LIMIT 5;","SELECT donors.name, SUM(donations.amount) as total_donations FROM donors INNER JOIN countries ON donors.country_id = countries.id INNER JOIN sectors ON donations.sector_id = sectors.id WHERE sectors.name = 'Health' GROUP BY donors.name ORDER BY total_donations DESC LIMIT 5;",0 What was the record set during the game played at Hubert H. Humphrey Metrodome?,"CREATE TABLE table_13258851_2 (record VARCHAR, game_site VARCHAR);","SELECT record FROM table_13258851_2 WHERE game_site = ""Hubert H. Humphrey Metrodome"";","SELECT record FROM table_13258851_2 WHERE game_site = ""Hubert H. Humphrey Metrodome"";",1 Display case numbers and types for 'immigration' cases,"CREATE TABLE cases (id INT, case_number VARCHAR(20), case_type VARCHAR(20)); ","SELECT case_number, case_type FROM cases WHERE case_type = 'immigration';","SELECT case_number, case_type FROM cases WHERE case_type = 'immigration';",1 "After 1972, how many points did Marlboro Team Alfa Romeo have?","CREATE TABLE table_name_84 (points VARCHAR, year VARCHAR, entrant VARCHAR);","SELECT points FROM table_name_84 WHERE year > 1972 AND entrant = ""marlboro team alfa romeo"";","SELECT points FROM table_name_84 WHERE year > 1972 AND entrant = ""marlboro team alfa romeo"";",1 What was relegated in the 2006 season?,"CREATE TABLE table_name_48 (relegated VARCHAR, season VARCHAR);","SELECT relegated FROM table_name_48 WHERE season = ""2006"";",SELECT relegated FROM table_name_48 WHERE season = 2006;,0 "Which Tie #has an Attendance of 54,591?","CREATE TABLE table_name_16 (tie_no VARCHAR, attendance VARCHAR);","SELECT tie_no FROM table_name_16 WHERE attendance = ""54,591"";","SELECT tie_no FROM table_name_16 WHERE attendance = ""54,591"";",1 What is the total number of heritage sites in Indonesia?,"CREATE TABLE heritage_sites (site_id INT, site_name TEXT, country TEXT); ",SELECT COUNT(*) FROM heritage_sites WHERE country = 'Indonesia';,SELECT COUNT(*) FROM heritage_sites WHERE country = 'Indonesia';,1 What is the 2010 value in the Australian Open?,CREATE TABLE table_name_60 (tournament VARCHAR);,"SELECT 2010 FROM table_name_60 WHERE tournament = ""australian open"";","SELECT 2010 FROM table_name_60 WHERE tournament = ""australia open"";",0 The Le Mans Porsche team Joest Racing is in which class?,"CREATE TABLE table_name_53 (class VARCHAR, team VARCHAR);","SELECT class FROM table_name_53 WHERE team = ""le mans porsche team joest racing"";","SELECT class FROM table_name_53 WHERE team = ""joest racing"";",0 How many affordable housing units are available in each city?,"CREATE TABLE affordable_housing (id INT, city VARCHAR(50), num_units INT); ","SELECT city, SUM(num_units) FROM affordable_housing GROUP BY city;","SELECT city, SUM(num_units) FROM affordable_housing GROUP BY city;",1 "What is the minimum temperature recorded in the 'arctic_weather' table for each month in the year 2020, broken down by species ('species' column in the 'arctic_weather' table)?","CREATE TABLE arctic_weather (id INT, date DATE, temperature FLOAT, species VARCHAR(50));","SELECT MONTH(date) AS month, species, MIN(temperature) AS min_temp FROM arctic_weather WHERE YEAR(date) = 2020 GROUP BY month, species;","SELECT EXTRACT(MONTH FROM date) AS month, species, MIN(temperature) AS min_temperature FROM arctic_weather WHERE date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY month, species;",0 What is the maximum daily water consumption for commercial buildings in California?,"CREATE TABLE california_water_usage (id INT, building_type VARCHAR(20), water_consumption FLOAT, day VARCHAR(10)); ",SELECT MAX(water_consumption) FROM california_water_usage WHERE building_type = 'Commercial';,SELECT MAX(water_consumption) FROM california_water_usage WHERE building_type = 'Commercial';,1 What is the average date in January that the Rangers played against Chicago Black Hawks?,"CREATE TABLE table_name_92 (january INTEGER, opponent VARCHAR);","SELECT AVG(january) FROM table_name_92 WHERE opponent = ""chicago black hawks"";","SELECT AVG(january) FROM table_name_92 WHERE opponent = ""chicago black hawks"";",1 What is the average year for releases on Friday and weeks larger than 2 days?,"CREATE TABLE table_name_28 (year INTEGER, day_in_release VARCHAR, day_of_week VARCHAR);","SELECT AVG(year) FROM table_name_28 WHERE day_in_release = ""friday"" AND day_of_week > 2;","SELECT AVG(year) FROM table_name_28 WHERE day_in_release = ""friday"" AND day_of_week > 2;",1 when is the latest to join prsl when founded in 2007 and the stadium is roberto clemente stadium 1?,"CREATE TABLE table_name_31 (joined_prsl INTEGER, founded VARCHAR, stadium VARCHAR);","SELECT MAX(joined_prsl) FROM table_name_31 WHERE founded = 2007 AND stadium = ""roberto clemente stadium 1"";","SELECT MAX(joined_prsl) FROM table_name_31 WHERE founded = 2007 AND stadium = ""roberto clemente stadium 1"";",1 What was the outcome when the game was played on clay and on 2 May 2009?,"CREATE TABLE table_name_49 (outcome VARCHAR, surface VARCHAR, date VARCHAR);","SELECT outcome FROM table_name_49 WHERE surface = ""clay"" AND date = ""2 may 2009"";","SELECT outcome FROM table_name_49 WHERE surface = ""clay"" AND date = ""2 may 2009"";",1 How many unique services are provided by the government in 'Texas' and 'New York'?,"CREATE TABLE services (state VARCHAR(20), service VARCHAR(20)); ","SELECT COUNT(DISTINCT service) FROM services WHERE state IN ('Texas', 'New York');","SELECT COUNT(DISTINCT service) FROM services WHERE state IN ('Texas', 'New York');",1 Calculate the total sales for each day of the week,"CREATE TABLE sales (day VARCHAR(255), sales DECIMAL(10,2)); ","SELECT day, SUM(sales) as total_sales FROM sales GROUP BY day;","SELECT day, SUM(sales) FROM sales GROUP BY day;",0 What is the away team at victoria park?,"CREATE TABLE table_name_69 (away_team VARCHAR, venue VARCHAR);","SELECT away_team FROM table_name_69 WHERE venue = ""victoria park"";","SELECT away_team FROM table_name_69 WHERE venue = ""victoria park"";",1 What is home team Chelsea's Tie no?,"CREATE TABLE table_name_83 (tie_no VARCHAR, home_team VARCHAR);","SELECT tie_no FROM table_name_83 WHERE home_team = ""chelsea"";","SELECT tie_no FROM table_name_83 WHERE home_team = ""chelsea"";",1 When united arab emirates is the country what is the winning aircraft?,"CREATE TABLE table_26358264_2 (winning_aircraft VARCHAR, country VARCHAR);","SELECT winning_aircraft FROM table_26358264_2 WHERE country = ""United Arab Emirates"";","SELECT winning_aircraft FROM table_26358264_2 WHERE country = ""United Arab Emirates"";",1 "List the bottom 2 mental health providers with the lowest health equity metric scores, along with their corresponding scores.","CREATE TABLE MentalHealthProviders (ProviderID INT, HealthEquityMetricScore INT); ","SELECT ProviderID, HealthEquityMetricScore FROM (SELECT ProviderID, HealthEquityMetricScore, ROW_NUMBER() OVER (ORDER BY HealthEquityMetricScore ASC) as Rank FROM MentalHealthProviders) as RankedData WHERE Rank <= 2;","SELECT ProviderID, HealthEquityMetricScore FROM MentalHealthProviders ORDER BY HealthEquityMetricScore DESC LIMIT 2;",0 What was the total weight of cannabis vape cartridges sold by dispensaries in the city of Seattle in the month of April 2022?,"CREATE TABLE Dispensaries (id INT, name VARCHAR(255), city VARCHAR(255), state VARCHAR(255));CREATE TABLE Inventory (id INT, dispensary_id INT, weight DECIMAL(10, 2), product_type VARCHAR(255), month INT, year INT);","SELECT d.name, SUM(i.weight) as total_weight FROM Dispensaries d JOIN Inventory i ON d.id = i.dispensary_id WHERE d.city = 'Seattle' AND i.product_type = 'vape' AND i.month = 4 AND i.year = 2022 GROUP BY d.name;",SELECT SUM(i.weight) FROM Inventory i JOIN Dispensaries d ON i.dispensary_id = d.id WHERE d.city = 'Seattle' AND i.product_type = 'Vape Cartridge' AND i.month = 'April' AND i.year = 2022;,0 Name the country where % change on year is 21 and value is less than 86,"CREATE TABLE table_name_12 (country VARCHAR, debt_as__percentage_of_value VARCHAR, _percentage_change_on_year VARCHAR);","SELECT country FROM table_name_12 WHERE debt_as__percentage_of_value < 86 AND _percentage_change_on_year = ""21"";",SELECT country FROM table_name_12 WHERE debt_as__percentage_of_value 86 AND _percentage_change_on_year = 21;,0 "When volleyball has 2 bronze, what is the total number of silver?","CREATE TABLE table_name_28 (silver VARCHAR, bronze VARCHAR, sport VARCHAR);","SELECT COUNT(silver) FROM table_name_28 WHERE bronze = 2 AND sport = ""volleyball"";","SELECT COUNT(silver) FROM table_name_28 WHERE bronze = 2 AND sport = ""volleyball"";",1 Name the average DDR3 speed for model e-350,"CREATE TABLE table_name_15 (ddr3_speed INTEGER, model VARCHAR);","SELECT AVG(ddr3_speed) FROM table_name_15 WHERE model = ""e-350"";","SELECT AVG(ddr3_speed) FROM table_name_15 WHERE model = ""e-350"";",1 Which refugee camps in the Sahel region have a capacity greater than 500?,"CREATE TABLE region (region_id INT, name VARCHAR(255)); CREATE TABLE camp (camp_id INT, name VARCHAR(255), region_id INT, capacity INT); ",SELECT name FROM camp WHERE region_id = (SELECT region_id FROM region WHERE name = 'Sahel') AND capacity > 500;,SELECT camp.name FROM camp INNER JOIN region ON camp.region_id = region.region_id WHERE region.name = 'Sahel' AND camp.capacity > 500;,0 What's the record in the game in which Brad Miller (7) did the high rebounds?,"CREATE TABLE table_22669044_10 (record VARCHAR, high_rebounds VARCHAR);","SELECT record FROM table_22669044_10 WHERE high_rebounds = ""Brad Miller (7)"";","SELECT record FROM table_22669044_10 WHERE high_rebounds = ""Brad Miller (7)"";",1 What is the average water waste per household in New York City in 2021?,"CREATE TABLE wastewater_treatment (household_id INT, city VARCHAR(30), year INT, waste_amount FLOAT);",SELECT AVG(waste_amount) FROM wastewater_treatment WHERE city='New York City' AND year=2021;,SELECT AVG(waste_amount) FROM wastewater_treatment WHERE city = 'New York City' AND year = 2021;,0 what is the date where the constructor is ferrari and the location is anderstorp?,"CREATE TABLE table_1140085_2 (date VARCHAR, constructor VARCHAR, location VARCHAR);","SELECT date FROM table_1140085_2 WHERE constructor = ""Ferrari"" AND location = ""Anderstorp"";","SELECT date FROM table_1140085_2 WHERE constructor = ""Ferrari"" AND location = ""Anderstorp"";",1 What is the position for the university of akron michigan bucks affiliation ,"CREATE TABLE table_29626583_1 (position VARCHAR, affiliation VARCHAR);","SELECT position FROM table_29626583_1 WHERE affiliation = ""University of Akron Michigan Bucks"";","SELECT position FROM table_29626583_1 WHERE affiliation = ""University of Akron Michigan Bucks"";",1 What is the average cultural competency score for community health workers by age group?,"CREATE TABLE community_health_workers (worker_id INT, age INT, cultural_competency_score INT); ","SELECT age_group, AVG(cultural_competency_score) FROM (SELECT CASE WHEN age < 40 THEN 'Under 40' ELSE '40 and over' END AS age_group, cultural_competency_score FROM community_health_workers) AS subquery GROUP BY age_group;","SELECT age, AVG(cultural_competency_score) FROM community_health_workers GROUP BY age;",0 "What is the total CO2 emission of each material type, sorted by the highest emission first?","CREATE TABLE materials (material_id INT, material_name VARCHAR(255), co2_emission INT); ","SELECT material_name, SUM(co2_emission) as total_emission FROM materials GROUP BY material_name ORDER BY total_emission DESC;","SELECT material_name, SUM(co2_emission) as total_emission FROM materials GROUP BY material_name ORDER BY total_emission DESC;",1 Identify mines in Colorado with environmental impact scores above 75.,"CREATE TABLE mine_env_scores (id INT, name VARCHAR(50), location VARCHAR(50), environmental_score FLOAT); ","SELECT name, environmental_score FROM mine_env_scores WHERE location = 'Colorado' AND environmental_score > 75;",SELECT name FROM mine_env_scores WHERE location = 'Colorado' AND environmental_score > 75;,0 What is the total number of users who identify as 'transgender' and have made at least one post?,"CREATE TABLE user (id INT, name VARCHAR(50), age INT, gender VARCHAR(20), created_at TIMESTAMP); CREATE TABLE post (id INT, user_id INT, content TEXT, posted_at TIMESTAMP); ",SELECT COUNT(DISTINCT user.id) FROM user JOIN post ON user.id = post.user_id WHERE user.gender = 'transgender';,SELECT COUNT(DISTINCT user.id) FROM user INNER JOIN post ON user.id = post.user_id WHERE user.gender = 'transgender' AND post.posted_at >= NOW() - INTERVAL '1 year';,0 How many products in each category are made from recycled materials?,"CREATE TABLE products (product_id INT, category VARCHAR(50), recycled BOOLEAN); ","SELECT category, COUNT(*) AS product_count FROM products WHERE recycled = TRUE GROUP BY category;","SELECT category, COUNT(*) FROM products WHERE recycled = true GROUP BY category;",0 What is the total revenue for each line in the 'subway' system?,"CREATE TABLE station (station_id INT, name TEXT, line TEXT);CREATE TABLE trip (trip_id INT, start_station_id INT, end_station_id INT, revenue FLOAT);","SELECT s.line, SUM(t.revenue) FROM station s INNER JOIN trip t ON s.station_id = t.start_station_id GROUP BY s.line;","SELECT s.line, SUM(t.revenue) as total_revenue FROM station s JOIN trip t ON s.station_id = t.start_station_id GROUP BY s.line;",0 List all ports that have had cargo handled on a Sunday.,"CREATE TABLE ports (port_id INT, port_name VARCHAR(50), city VARCHAR(50), country VARCHAR(50)); CREATE TABLE cargo (cargo_id INT, port_id INT, weight FLOAT, handling_date DATE);",SELECT DISTINCT port_name FROM cargo c JOIN ports p ON c.port_id = p.port_id WHERE DAYOFWEEK(handling_date) = 1;,SELECT ports.port_name FROM ports INNER JOIN cargo ON ports.port_id = cargo.port_id WHERE cargo.handling_date BETWEEN '2022-01-01' AND '2022-01-31';,0 How many pallets were handled by 'Warehouse J' in 'June 2022'?,"CREATE TABLE Warehouse (name varchar(20), pallets_handled int, handling_date date); ",SELECT SUM(pallets_handled) FROM Warehouse WHERE name = 'Warehouse J' AND EXTRACT(MONTH FROM handling_date) = 6 AND EXTRACT(YEAR FROM handling_date) = 2022;,SELECT SUM(pallets_handled) FROM Warehouse WHERE name = 'Warehouse J' AND handling_date BETWEEN '2022-01-01' AND '2022-06-30';,0 What is the land area of Hopewell parish in km2?,"CREATE TABLE table_170958_2 (area_km_2 VARCHAR, official_name VARCHAR);","SELECT area_km_2 FROM table_170958_2 WHERE official_name = ""Hopewell"";","SELECT area_km_2 FROM table_170958_2 WHERE official_name = ""Hopewell Parish"";",0 Which Week has an Opponent of san francisco 49ers?,"CREATE TABLE table_name_46 (week INTEGER, opponent VARCHAR);","SELECT MAX(week) FROM table_name_46 WHERE opponent = ""san francisco 49ers"";","SELECT SUM(week) FROM table_name_46 WHERE opponent = ""san francisco 49ers"";",0 What is the minimum number of public health policy analyses conducted for historically underrepresented communities in urban areas?,"CREATE TABLE policy_analyses (id INT, community TEXT, location TEXT, analyses_count INT); ",SELECT MIN(analyses_count) FROM policy_analyses WHERE community LIKE '%underrepresented%' AND location = 'urban';,SELECT MIN(analyses_count) FROM policy_analyses WHERE community LIKE '%Historically Underrepresented%' AND location = 'Urban';,0 What's the Date of Issue for Design of Katalin Kovats?,"CREATE TABLE table_name_46 (date_of_issue VARCHAR, design VARCHAR);","SELECT date_of_issue FROM table_name_46 WHERE design = ""katalin kovats"";","SELECT date_of_issue FROM table_name_46 WHERE design = ""katalin kovats"";",1 List the average salary for each department in the 'UnionMembers' table,"CREATE TABLE UnionMembers (id INT, department VARCHAR(50), salary FLOAT); ","SELECT department, AVG(salary) as avg_salary FROM UnionMembers GROUP BY department;","SELECT department, AVG(salary) FROM UnionMembers GROUP BY department;",0 Who is the opponent when the record is 3-8?,"CREATE TABLE table_name_53 (opponent VARCHAR, record VARCHAR);","SELECT opponent FROM table_name_53 WHERE record = ""3-8"";","SELECT opponent FROM table_name_53 WHERE record = ""3-8"";",1 "What is the average transaction value (in USD) for the Bitcoin network, grouped by the day of the week?","CREATE TABLE bitcoin_transactions (transaction_id INT, transaction_value FLOAT, transaction_time DATETIME);","SELECT DATE_FORMAT(transaction_time, '%W') as day_of_week, AVG(transaction_value) as avg_transaction_value FROM bitcoin_transactions WHERE transaction_time > DATE_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 YEAR) GROUP BY day_of_week;","SELECT DATE_FORMAT(transaction_time, '%Y-%m') as day_of_week, AVG(transaction_value) as avg_transaction_value FROM bitcoin_transactions GROUP BY day_of_week;",0 "How many solar energy projects were completed in the Asia-Pacific region in the last 5 years, with a capacity greater than 10 MW?","CREATE TABLE solar_energy (project_id INT, project_name VARCHAR(255), region VARCHAR(255), completion_date DATE, installed_capacity FLOAT);","SELECT COUNT(*) FROM solar_energy WHERE region = 'Asia-Pacific' AND completion_date >= DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR) AND installed_capacity > 10000000;","SELECT COUNT(*) FROM solar_energy WHERE region = 'Asia-Pacific' AND completion_date >= DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR) AND installed_capacity > 10;",0 What was the result in the election where the date of first elected was 2000? ,"CREATE TABLE table_1805191_48 (results VARCHAR, first_elected VARCHAR);",SELECT results FROM table_1805191_48 WHERE first_elected = 2000;,SELECT results FROM table_1805191_48 WHERE first_elected = 2000;,1 "What is the minimum number of comments on a single post, from users in the 'activist' category who have posted more than 20 times?","CREATE TABLE posts (post_id INT, user_id INT, comment_count INT); ",SELECT MIN(comment_count) FROM posts JOIN users ON posts.user_id = users.user_id WHERE users.category = 'activist' AND users.post_count > 20;,SELECT MIN(comment_count) FROM posts WHERE user_id IN (SELECT user_id FROM users WHERE category = 'activist') AND comment_count > 20;,0 How many artists from underrepresented communities have had solo exhibitions in New York in the last 5 years?,"CREATE TABLE exhibitions_artists (id INT, city VARCHAR(20), year INT, type VARCHAR(10), community VARCHAR(20)); ","SELECT COUNT(*) FROM exhibitions_artists WHERE city = 'New York' AND community IN ('African American', 'Latinx', 'Native American') AND year BETWEEN 2017 AND 2021 AND type = 'modern art';",SELECT COUNT(*) FROM exhibitions_artists WHERE city = 'New York' AND type = 'Single' AND community = 'Underrepresented' AND year BETWEEN 2017 AND 2021;,0 Show the total cost of ingredients for vegan menu items in the North region.,"CREATE TABLE menu (menu_id INT, menu_name VARCHAR(255), is_vegan BOOLEAN, cost_ingredients DECIMAL(5,2)); CREATE TABLE inventory (menu_id INT, inventory_quantity INT); ",SELECT SUM(cost_ingredients * inventory_quantity) as total_cost FROM menu JOIN inventory ON menu.menu_id = inventory.menu_id WHERE is_vegan = TRUE AND region = 'North';,SELECT SUM(cost_ingredients) FROM menu JOIN inventory ON menu.menu_id = inventory.menu_id WHERE menu.is_vegan = true AND menu.region = 'North';,0 What format was conductor Erich Leinsdorf's album released on?,"CREATE TABLE table_name_34 (format VARCHAR, conductor VARCHAR);","SELECT format FROM table_name_34 WHERE conductor = ""erich leinsdorf"";","SELECT format FROM table_name_34 WHERE conductor = ""erich leinsdorf"";",1 What is the total number of police patrols and community outreach events in each district?,"CREATE TABLE districts (did INT, district_name TEXT); CREATE TABLE patrols (pid INT, district_id INT, patrol_date TEXT); CREATE TABLE outreach (oid INT, district_id INT, outreach_date TEXT); ","SELECT d.district_name, COUNT(p.pid) AS total_patrols, COUNT(o.oid) AS total_outreach FROM districts d LEFT JOIN patrols p ON d.did = p.district_id AND p.patrol_date >= DATEADD(month, -1, GETDATE()) LEFT JOIN outreach o ON d.did = o.district_id AND o.outreach_date >= DATEADD(month, -1, GETDATE()) GROUP BY d.district_name;","SELECT d.district_name, COUNT(p.pid) FROM districts d JOIN patrols p ON d.did = p.district_id JOIN outreach o ON p.district_id = o.district_id GROUP BY d.district_name;",0 "How many Wins have Losses larger than 2, and an Against of 73.3?","CREATE TABLE table_name_26 (wins INTEGER, loses VARCHAR, against VARCHAR);","SELECT SUM(wins) FROM table_name_26 WHERE loses > 2 AND against = ""73.3"";",SELECT SUM(wins) FROM table_name_26 WHERE loses > 2 AND against = 73.3;,0 "What is the minimum age of visitors who attended exhibitions in Rio de Janeiro, assuming each visitor is 35 years old?","CREATE TABLE Exhibitions (id INT, city VARCHAR(255), visitors INT, visitor_age INT); ",SELECT MIN(visitor_age) FROM Exhibitions WHERE city = 'Rio de Janeiro';,SELECT MIN(visitor_age) FROM Exhibitions WHERE city = 'Rio de Janeiro' AND visitors >= 35;,0 What is the total revenue generated from sales in the 'Cubism' genre and the average size of sculptures created by male artists from France?,"CREATE TABLE Artists (ArtistID INT, ArtistName VARCHAR(50), Gender VARCHAR(10), Nationality VARCHAR(20), BirthYear INT); CREATE TABLE Artworks (ArtworkID INT, ArtistID INT, ArtworkName VARCHAR(50), ArtworkType VARCHAR(20), Size FLOAT); CREATE TABLE Sales (SaleID INT, ArtworkID INT, Genre VARCHAR(20), Revenue FLOAT, Location VARCHAR(20)); ","SELECT SUM(Sales.Revenue), AVG(Artworks.Size) FROM Sales INNER JOIN Artworks ON Sales.ArtworkID = Artworks.ArtworkID INNER JOIN Artists ON Artworks.ArtistID = Artists.ArtistID WHERE Sales.Genre = 'Cubism' AND Artists.Gender = 'Male' AND Artists.Nationality = 'French';","SELECT SUM(Sales.Revenue) AS TotalRevenue, AVG(Artworks.Size) AS AvgSize FROM Sales INNER JOIN Artists ON Sales.ArtworkID = Artists.ArtistID INNER JOIN Artworks ON Artists.ArtistID = Artworks.ArtworkID INNER JOIN Sales ON Artworks.ArtworkID = Sales.ArtworkID WHERE Sales.Genre = 'Cubism' AND Artists.Gender = 'Male' AND Artists.Nationality = 'France';",0 Update the salary of all employees hired in the North America region in 2021 to 55000.,"CREATE TABLE employees (id INT, first_name VARCHAR(50), last_name VARCHAR(50), hire_date DATE, salary INT, country VARCHAR(50));",UPDATE employees SET salary = 55000 WHERE hire_date >= '2021-01-01' AND hire_date < '2022-01-01' AND country IN (SELECT region FROM regions WHERE region_name = 'North America');,UPDATE employees SET salary = 55000 WHERE hire_date BETWEEN '2021-01-01' AND '2021-12-31' AND country = 'North America';,0 "How many points are there when they have under 27 goals scored, conceded 24 goals, and lost less than 6 times?","CREATE TABLE table_name_40 (points INTEGER, lost VARCHAR, goals_scored VARCHAR, goals_conceded VARCHAR);",SELECT SUM(points) FROM table_name_40 WHERE goals_scored < 27 AND goals_conceded = 24 AND lost < 6;,SELECT AVG(points) FROM table_name_40 WHERE goals_scored 27 AND goals_conceded = 24 AND lost 6;,0 How many mental health facilities exist in each state that offer services in Spanish?,"CREATE TABLE mental_health_facilities (facility_id INT, state TEXT, languages TEXT); ","SELECT state, COUNT(*) FROM mental_health_facilities WHERE languages LIKE '%Spanish%' GROUP BY state;","SELECT state, COUNT(*) FROM mental_health_facilities WHERE languages = 'Spanish' GROUP BY state;",0 What percentage of products have recyclable packaging?,"CREATE TABLE packaging (package_id INT, product_id INT, material VARCHAR(20), recyclable BOOLEAN); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM packaging)) AS percentage FROM packaging WHERE recyclable = true;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM packaging WHERE recyclable = TRUE)) FROM packaging WHERE recyclable = TRUE;,0 Who are the suppliers in Germany with a sustainability rating above 4.5?,"CREATE TABLE suppliers (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), sustainability_rating FLOAT); ","SELECT s.name, s.sustainability_rating FROM suppliers s WHERE s.location = 'Germany' AND s.sustainability_rating > 4.5;",SELECT name FROM suppliers WHERE location = 'Germany' AND sustainability_rating > 4.5;,0 When was Alianza's first season in first division with a promotion after 1959?,"CREATE TABLE table_name_63 (first_season_in_first_division VARCHAR, first_season_after_most_recent_promotion VARCHAR, name VARCHAR);","SELECT first_season_in_first_division FROM table_name_63 WHERE first_season_after_most_recent_promotion = ""1959"" AND name = ""alianza"";","SELECT first_season_in_first_division FROM table_name_63 WHERE first_season_after_most_recent_promotion > 1959 AND name = ""alianza"";",0 List the departments with no research grants.,"CREATE TABLE Departments (DepartmentID INT, DepartmentName VARCHAR(50), ResearchGrants INT);",SELECT DepartmentName FROM Departments WHERE ResearchGrants = 0;,SELECT DepartmentName FROM Departments WHERE ResearchGrants = 0;,1 What was the away team that played at Princes Park?,"CREATE TABLE table_name_97 (away_team VARCHAR, venue VARCHAR);","SELECT away_team FROM table_name_97 WHERE venue = ""princes park"";","SELECT away_team FROM table_name_97 WHERE venue = ""princes park"";",1 "What is the total number of Losses, when Wins is ""16"", and when Against is less than 772?","CREATE TABLE table_name_22 (losses VARCHAR, wins VARCHAR, against VARCHAR);",SELECT COUNT(losses) FROM table_name_22 WHERE wins = 16 AND against < 772;,SELECT COUNT(losses) FROM table_name_22 WHERE wins = 16 AND against 772;,0 who was the winner of uci rating cn?,"CREATE TABLE table_27887723_1 (winner VARCHAR, uci_rating VARCHAR);","SELECT winner FROM table_27887723_1 WHERE uci_rating = ""CN"";","SELECT winner FROM table_27887723_1 WHERE uci_rating = ""Cn"";",0 How much money does the player with a 68-67-69-71=275 score have?,"CREATE TABLE table_name_62 (money___£__ VARCHAR, score VARCHAR);",SELECT money___£__ FROM table_name_62 WHERE score = 68 - 67 - 69 - 71 = 275;,SELECT money___£__ FROM table_name_62 WHERE score = 68 - 67 - 69 - 71 = 275;,1 What is the total quantity of minerals extracted in each quarter by Indonesia?,"CREATE TABLE quarterly_production (id INT, country VARCHAR(255), mineral VARCHAR(255), year INT, quarter INT, quantity INT); ","SELECT country, mineral, EXTRACT(QUARTER FROM DATE(year, 3, 1)) as quarter, SUM(quantity) as total_quantity_extracted FROM quarterly_production WHERE country = 'Indonesia' GROUP BY country, mineral, quarter;","SELECT quarter, SUM(quantity) FROM quarterly_production WHERE country = 'Indonesia' GROUP BY quarter;",0 what is mon 23 aug when fri 27 aug is 18' 59.25 119.226mph?,"CREATE TABLE table_26986076_2 (mon_23_aug VARCHAR, fri_27_aug VARCHAR);","SELECT mon_23_aug FROM table_26986076_2 WHERE fri_27_aug = ""18' 59.25 119.226mph"";","SELECT mon_23_aug FROM table_26986076_2 WHERE fri_27_aug = ""18' 59.25 119.226mph"";",1 "Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order.","CREATE TABLE manufacturers (name VARCHAR, headquarter VARCHAR, revenue VARCHAR);","SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC;","SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC;",1 What is the average success rate of cases handled by attorneys who identify as female?,"CREATE TABLE attorneys (attorney_id INT, name TEXT, years_of_experience INT, gender TEXT); CREATE TABLE cases (case_id INT, attorney_id INT, outcome TEXT);",SELECT AVG(CASE WHEN cases.outcome = 'Success' THEN 1.0 ELSE 0.0 END) AS success_rate FROM cases INNER JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.gender = 'Female';,SELECT AVG(cases.success_rate) FROM cases INNER JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.gender = 'Female';,0 What value in 2013 corresponds to Grand Slam Tournaments in 2012?,CREATE TABLE table_name_38 (Id VARCHAR);,"SELECT 2013 FROM table_name_38 WHERE 2012 = ""grand slam tournaments"";","SELECT 2013 FROM table_name_38 WHERE 2012 = ""grand slam tournaments"";",1 "What is the total number of S No(s), when the Margin is 16 runs?","CREATE TABLE table_name_88 (s_no VARCHAR, margin VARCHAR);","SELECT COUNT(s_no) FROM table_name_88 WHERE margin = ""16 runs"";","SELECT COUNT(s_no) FROM table_name_88 WHERE margin = ""16 runs"";",1 How many poor law unions have an area of 262 acres and is in drinagh civil parish?,"CREATE TABLE table_30121096_1 (poor_law_union VARCHAR, area__acres__ VARCHAR, civil_parish VARCHAR);","SELECT COUNT(poor_law_union) FROM table_30121096_1 WHERE area__acres__ = 262 AND civil_parish = ""Drinagh"";","SELECT COUNT(poor_law_union) FROM table_30121096_1 WHERE area__acres__ = 262 AND civil_parish = ""Drinagh"";",1 What is the average salinity in the Red Sea?,"CREATE TABLE sea_salinity (location VARCHAR(255), salinity FLOAT); ",SELECT AVG(salinity) FROM sea_salinity WHERE location = 'Red Sea';,SELECT AVG(salinity) FROM sea_salinity WHERE location = 'Red Sea';,1 What is the minimum age of members who joined in 2019?,"CREATE TABLE Members (MemberID INT, FirstName VARCHAR(50), LastName VARCHAR(50), DateJoined DATE, Age INT); ",SELECT MIN(Age) FROM Members WHERE YEAR(DateJoined) = 2019;,SELECT MIN(Age) FROM Members WHERE YEAR(DateJoined) = 2019;,1 "What are the total calories consumed by each customer for the 'Veggies Delight' restaurant in Sydney, Australia in the month of February 2022, ranked by consumption?","CREATE TABLE customer_meals (customer_id INTEGER, restaurant_name TEXT, city TEXT, calories INTEGER, meal_date DATE); ","SELECT customer_id, SUM(calories) as total_calories FROM customer_meals WHERE restaurant_name = 'Veggies Delight' AND city = 'Sydney' AND meal_date >= '2022-02-01' AND meal_date < '2022-03-01' GROUP BY customer_id ORDER BY total_calories DESC;","SELECT customer_id, SUM(calories) as total_calories FROM customer_meals WHERE restaurant_name = 'Veggies Delight' AND city = 'Sydney' AND meal_date BETWEEN '2022-02-01' AND '2022-02-28' GROUP BY customer_id ORDER BY total_calories DESC;",0 What is the total size of all green buildings in the USA with LEED certification?,"CREATE TABLE green_buildings (id INT, city VARCHAR(255), country VARCHAR(255), certification VARCHAR(255), size INT); ",SELECT SUM(size) as total_size FROM green_buildings WHERE country = 'USA' AND certification = 'LEED';,SELECT SUM(size) FROM green_buildings WHERE country = 'USA' AND certification = 'LEED';,0 The color diamond is assigned to which Terminus?,"CREATE TABLE table_name_46 (terminus VARCHAR, color VARCHAR);","SELECT terminus FROM table_name_46 WHERE color = ""diamond"";","SELECT terminus FROM table_name_46 WHERE color = ""diamond"";",1 "what is the listing for 1999 when 1990 is more than 0, 2003 is 3, 2007 is more than 1 and 1996 is more than 0?",CREATE TABLE table_name_27 (Id VARCHAR);,SELECT SUM(1999) FROM table_name_27 WHERE 1990 > 0 AND 2003 = 3 AND 2007 > 1 AND 1996 > 0;,SELECT 1999 FROM table_name_27 WHERE 1990 > 0 AND 2003 = 3 AND 2007 > 1 AND 1996 > 0;,0 How many art pieces were donated by each artist in the last 5 years?,"CREATE TABLE ArtDonations (artist_name VARCHAR(50), piece_count INT, donation_date DATE); ","SELECT artist_name, SUM(piece_count) FROM ArtDonations WHERE donation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR) GROUP BY artist_name;","SELECT artist_name, SUM(piece_count) FROM ArtDonations WHERE donation_date >= DATEADD(year, -5, GETDATE()) GROUP BY artist_name;",0 Which incumbent was first elected in 1936? ,"CREATE TABLE table_1341897_45 (incumbent VARCHAR, first_elected VARCHAR);",SELECT incumbent FROM table_1341897_45 WHERE first_elected = 1936;,SELECT incumbent FROM table_1341897_45 WHERE first_elected = 1936;,1 What is the L3 cache of the processor with a release price of $440?,"CREATE TABLE table_name_3 (l3_cache VARCHAR, release_price___usd__ VARCHAR);","SELECT l3_cache FROM table_name_3 WHERE release_price___usd__ = ""$440"";","SELECT l3_cache FROM table_name_3 WHERE release_price___usd__ = ""$440"";",1 What position is the player drafted with pick 34?,"CREATE TABLE table_16575609_5 (position VARCHAR, pick__number VARCHAR);",SELECT position FROM table_16575609_5 WHERE pick__number = 34;,SELECT position FROM table_16575609_5 WHERE pick__number = 34;,1 What is the average depth of all expeditions for the 'Ocean Explorer' organization?,"CREATE TABLE expedition (org VARCHAR(20), depth INT); ",SELECT AVG(depth) FROM expedition WHERE org = 'Ocean Explorer';,SELECT AVG(depth) FROM expedition WHERE org = 'Ocean Explorer';,1 What are the details of intelligence operations in the Middle East?,"CREATE TABLE intel_ops (id INT, region VARCHAR(255), operation VARCHAR(255), budget DECIMAL(10, 2)); ",SELECT * FROM intel_ops WHERE region = 'Middle East';,"SELECT region, operation, budget FROM intel_ops WHERE region = 'Middle East';",0 List all marine species that are not found in the oceanography table.,"CREATE TABLE marine_species (id INT, name VARCHAR(255), conservation_status VARCHAR(255)); CREATE TABLE oceanography (id INT, species_name VARCHAR(255), location VARCHAR(255)); ",SELECT name FROM marine_species WHERE name NOT IN (SELECT species_name FROM oceanography);,SELECT marine_species.name FROM marine_species INNER JOIN oceanography ON marine_species.id = oceanography.species_name WHERE oceanography.id IS NULL;,0 "Which record has an attendance larger than 28,459?","CREATE TABLE table_name_43 (record VARCHAR, attendance INTEGER);",SELECT record FROM table_name_43 WHERE attendance > 28 OFFSET 459;,SELECT record FROM table_name_43 WHERE attendance > 28 OFFSET 459;,1 What is the average age of readers who prefer articles about technology in the Midwest region?,"CREATE TABLE readers (id INT, age INT, region VARCHAR(20)); CREATE TABLE preferences (id INT, reader_id INT, category VARCHAR(20)); ",SELECT AVG(readers.age) FROM readers INNER JOIN preferences ON readers.id = preferences.reader_id WHERE readers.region = 'Midwest' AND preferences.category = 'technology';,SELECT AVG(readers.age) FROM readers INNER JOIN preferences ON readers.id = preferences.reader_id WHERE preferences.category = 'technology' AND readers.region = 'Midwest';,0 What is the lowest year with tyres in g and less than 0 points?,"CREATE TABLE table_name_32 (year INTEGER, tyres VARCHAR, points VARCHAR);","SELECT MIN(year) FROM table_name_32 WHERE tyres = ""g"" AND points < 0;","SELECT MIN(year) FROM table_name_32 WHERE tyres = ""g"" AND points 0;",0 Which regions are owned by estado de tabasco?,"CREATE TABLE table_2899987_2 (region VARCHAR, owner VARCHAR);","SELECT region FROM table_2899987_2 WHERE owner = ""Estado de Tabasco"";","SELECT region FROM table_2899987_2 WHERE owner = ""Estado de Tabasco"";",1 Tell me the total number of positions with goal difference more than -17 and played less than 38,"CREATE TABLE table_name_12 (position VARCHAR, goal_difference VARCHAR, played VARCHAR);",SELECT COUNT(position) FROM table_name_12 WHERE goal_difference > -17 AND played < 38;,SELECT COUNT(position) FROM table_name_12 WHERE goal_difference > -17 AND played 38;,0 Update the names of all agricultural projects in the 'Americas' region with the prefix 'Green',"CREATE TABLE AgriculturalProjects (id INT, name VARCHAR(50), location VARCHAR(20), budget FLOAT, completion_date DATE);","UPDATE AgriculturalProjects SET name = CONCAT('Green ', name) WHERE location LIKE '%Americas%';",UPDATE AgriculturalProjects SET name = 'Green' WHERE location = 'Americas';,0 What is the number of jurisdiction for 57.3 percent?,"CREATE TABLE table_120778_1 (jurisdiction VARCHAR, percent_for VARCHAR);","SELECT COUNT(jurisdiction) FROM table_120778_1 WHERE percent_for = ""57.3"";","SELECT COUNT(jurisdiction) FROM table_120778_1 WHERE percent_for = ""57.3"";",1 Which students with disabilities have attended more than 4 workshops in the last 6 months?,"CREATE TABLE Workshops (WorkshopID INT, Name VARCHAR(50), Date DATE, Description TEXT); CREATE TABLE StudentWorkshops (StudentID INT, WorkshopID INT); CREATE TABLE Students (StudentID INT, Disability VARCHAR(50), Name VARCHAR(50));","SELECT s.StudentID, s.Name, s.Disability FROM Students s JOIN StudentWorkshops sw ON s.StudentID = sw.StudentID JOIN Workshops w ON sw.WorkshopID = w.WorkshopID WHERE w.Date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) AND CURRENT_DATE GROUP BY s.StudentID HAVING COUNT(sw.WorkshopID) > 4;","SELECT Students.Disability, COUNT(StudentWorkshops.StudentID) FROM Students INNER JOIN StudentWorkshops ON Students.StudentID = StudentWorkshops.StudentID INNER JOIN Workshops ON StudentWorkshops.WorkshopID = Workshops.WorkshopID WHERE Workshops.Date >= DATEADD(month, -6, GETDATE()) GROUP BY Students.Disability HAVING COUNT(StudentWorkshops.StudentID) > 4;",0 List all social equity programs and their respective dispensary counts across the US.,"CREATE TABLE Dispensaries (id INT, name TEXT, state TEXT, social_equity_program TEXT); ","SELECT social_equity_program, COUNT(DISTINCT state) as dispensary_count FROM Dispensaries GROUP BY social_equity_program;","SELECT social_equity_program, COUNT(*) FROM Dispensaries WHERE state = 'US' GROUP BY social_equity_program;",0 What's the average ESG score for nonprofits in the 'Education' field?,"CREATE TABLE if not exists nonprofits (id INT PRIMARY KEY, name TEXT, field TEXT, location TEXT, annual_budget DECIMAL(10,2)); CREATE TABLE if not exists esg_factors (id INT PRIMARY KEY, nonprofit_id INT, environmental_score DECIMAL(3,2), social_score DECIMAL(3,2), governance_score DECIMAL(3,2)); ","SELECT AVG(environmental_score) AS avg_environmental_score, AVG(social_score) AS avg_social_score, AVG(governance_score) AS avg_governance_score FROM esg_factors WHERE nonprofit_id IN (SELECT id FROM nonprofits WHERE field = 'Education');",SELECT AVG(esg_factors.environmental_score) FROM esg_factors INNER JOIN nonprofits ON esg_factors.nonprofit_id = nonprofits.id WHERE nonprofits.field = 'Education';,0 "What is the maximum production capacity for chemical plants that use the 'Green Production' method, ordered by capacity?","CREATE TABLE plants (id INT, name TEXT, production_method TEXT, capacity INT); ",SELECT MAX(capacity) AS max_capacity FROM plants WHERE production_method = 'Green Production' ORDER BY capacity DESC;,SELECT MAX(capacity) FROM plants WHERE production_method = 'Green Production' ORDER BY capacity;,0 What is the total number of hours spent on open pedagogy projects by students in each country?,"CREATE TABLE projects (project_id INT, student_id INT, student_country VARCHAR(20), project_hours INT); ","SELECT student_country, SUM(project_hours) FROM projects GROUP BY student_country;","SELECT student_country, SUM(project_hours) FROM projects GROUP BY student_country;",1 "What is the total budget allocated for education in the state of ""New York"" in the year 2020?","CREATE TABLE budget_allocation (year INT, state TEXT, category TEXT, amount FLOAT); ",SELECT SUM(amount) FROM budget_allocation WHERE year = 2020 AND state = 'New York' AND category = 'Education';,SELECT SUM(amount) FROM budget_allocation WHERE state = 'New York' AND category = 'Education' AND year = 2020;,0 "Find the top 3 suppliers with the highest total quantity of Dysprosium sold to the US in Q1 2019, and the total quantity sold to the US in that time period.","CREATE TABLE suppliers (id INT, name TEXT, country TEXT); CREATE TABLE sales (id INT, supplier_id INT, element TEXT, quantity INT, sale_date DATE);","SELECT s.name, SUM(s.quantity) as total_quantity_sold FROM sales s JOIN suppliers supp ON s.supplier_id = supp.id WHERE s.element = 'Dysprosium' AND supp.country = 'US' AND EXTRACT(QUARTER FROM s.sale_date) = 1 AND EXTRACT(YEAR FROM s.sale_date) = 2019 GROUP BY s.supplier_id ORDER BY total_quantity_sold DESC LIMIT 3;","SELECT s.name, SUM(s.quantity) as total_quantity FROM suppliers s JOIN sales s ON s.id = s.supplier_id WHERE s.element = 'Dysprosium' AND s.sale_date BETWEEN '2019-01-01' AND '2019-03-31' GROUP BY s.name ORDER BY total_quantity DESC LIMIT 3;",0 Which African countries have the highest sustainable seafood production?,"CREATE TABLE African_Countries (country VARCHAR(20), production FLOAT); ","SELECT country, production FROM African_Countries WHERE production IN (SELECT MAX(production) FROM African_Countries WHERE production <= 650.3);","SELECT country, MAX(production) FROM African_Countries GROUP BY country;",0 "What is the Background of the contestant with a Hometown listed as Los Angeles, California?","CREATE TABLE table_name_71 (background VARCHAR, hometown VARCHAR);","SELECT background FROM table_name_71 WHERE hometown = ""los angeles, california"";","SELECT background FROM table_name_71 WHERE hometown = ""los angeles, california"";",1 "What is Top Division Debut, when Tournaments is ""12"", and when Name is ""Yamamotoyama""?","CREATE TABLE table_name_67 (top_division_debut VARCHAR, tournaments VARCHAR, name VARCHAR);","SELECT top_division_debut FROM table_name_67 WHERE tournaments = 12 AND name = ""yamamotoyama"";","SELECT top_division_debut FROM table_name_67 WHERE tournaments = ""12"" AND name = ""yamamotoyama"";",0 What is the final position for the season 2012?,"CREATE TABLE table_name_70 (final_position VARCHAR, season VARCHAR);","SELECT final_position FROM table_name_70 WHERE season = ""2012"";",SELECT final_position FROM table_name_70 WHERE season = 2012;,0 What is the average trip duration for eco-tourists from Canada?,"CREATE TABLE eco_tourists (id INT, name VARCHAR, country VARCHAR, trip_duration FLOAT); ",SELECT AVG(trip_duration) FROM eco_tourists WHERE country = 'Canada';,SELECT AVG(trip_duration) FROM eco_tourists WHERE country = 'Canada';,1 "How many donation records were inserted in the 'finance' schema's 'donations' table in the last 3 months, for amounts less than or equal to $50?","CREATE SCHEMA finance; CREATE TABLE finance.donations (donation_id INT, donor_name VARCHAR(100), donation_amount DECIMAL(10, 2), donation_date DATE); ","SELECT COUNT(*) FROM finance.donations WHERE donation_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH) AND donation_amount <= 50;","SELECT COUNT(*) FROM finance.donations WHERE donation_amount = 50 AND donation_date >= DATEADD(month, -3, GETDATE());",0 What's the lengths behind of Jockey Ramon A. Dominguez?,"CREATE TABLE table_name_63 (lengths_behind VARCHAR, jockey VARCHAR);","SELECT lengths_behind FROM table_name_63 WHERE jockey = ""ramon a. dominguez"";","SELECT lengths_behind FROM table_name_63 WHERE jockey = ""ramon a. dominguez"";",1 What is the rank of the nation with more than 0 silver medals and 38 bronze medals?,"CREATE TABLE table_name_97 (rank VARCHAR, silver VARCHAR, bronze VARCHAR);",SELECT rank FROM table_name_97 WHERE silver > 0 AND bronze = 38;,SELECT rank FROM table_name_97 WHERE silver > 0 AND bronze = 38;,1 What name has a population of 810?,"CREATE TABLE table_name_13 (name VARCHAR, population VARCHAR);","SELECT name FROM table_name_13 WHERE population = ""810"";",SELECT name FROM table_name_13 WHERE population = 810;,0 What is the college/junior/club team (league) of left wing Ondrej Roman?,"CREATE TABLE table_name_62 (college_junior_club_team__league_ VARCHAR, position VARCHAR, player VARCHAR);","SELECT college_junior_club_team__league_ FROM table_name_62 WHERE position = ""left wing"" AND player = ""ondrej roman"";","SELECT college_junior_club_team__league_ FROM table_name_62 WHERE position = ""left wing"" AND player = ""ondrej roman"";",1 What is the nationality of the person drafted to Position F from Kentucky State?,"CREATE TABLE table_name_7 (nationality VARCHAR, position VARCHAR, college_high_school_club VARCHAR);","SELECT nationality FROM table_name_7 WHERE position = ""f"" AND college_high_school_club = ""kentucky state"";","SELECT nationality FROM table_name_7 WHERE position = ""f"" AND college_high_school_club = ""kentucky state"";",1 What was the retention rate of volunteers who engaged in arts & culture programs in 2021?,"CREATE TABLE Volunteers (volunteer_id INT, volunteer_name VARCHAR(50), first_volunteer_date DATE, last_volunteer_date DATE); CREATE TABLE Volunteer_Hours (volunteer_id INT, program_id INT, hours DECIMAL(5,2), volunteer_date DATE);",SELECT 100.0 * COUNT(DISTINCT v1.volunteer_id) / COUNT(DISTINCT v2.volunteer_id) AS retention_rate FROM Volunteers v1 JOIN Volunteers v2 ON v1.volunteer_id = v2.volunteer_id WHERE v1.first_volunteer_date BETWEEN '2021-01-01' AND '2021-12-31' AND v2.last_volunteer_date BETWEEN '2021-01-01' AND '2021-12-31' AND v1.volunteer_id IN (SELECT volunteer_id FROM Volunteer_Hours WHERE program_id IN (SELECT program_id FROM Programs WHERE category = 'arts & culture')) AND v2.volunteer_id IN (SELECT volunteer_id FROM Volunteer_Hours WHERE program_id IN (SELECT program_id FROM Programs WHERE category = 'arts & culture') AND volunteer_date BETWEEN '2020-01-01' AND '2020-12-31');,"SELECT v.first_volunteer_date, v.last_volunteer_date, COUNT(vh.volunteer_id) as retention_rate FROM Volunteers v JOIN Volunteer_Hours vh ON v.volunteer_id = vh.volunteer_id WHERE v.first_volunteer_date BETWEEN '2021-01-01' AND '2021-12-31';",0 Delete all records in the 'ai_ethics' table where the 'developer' column is 'Microsoft',"CREATE TABLE ai_ethics (developer VARCHAR(255), principle VARCHAR(255)); ",DELETE FROM ai_ethics WHERE developer = 'Microsoft';,DELETE FROM ai_ethics WHERE developer = 'Microsoft';,1 In how many countries is Itaipu a supply point for electricity?,"CREATE TABLE table_19001916_2 (country VARCHAR, supply_point VARCHAR);","SELECT COUNT(country) FROM table_19001916_2 WHERE supply_point = ""Itaipu"";","SELECT COUNT(country) FROM table_19001916_2 WHERE supply_point = ""Itaipu"";",1 What is the total cost of all projects in the 'water_infrastructure' table?,"CREATE TABLE water_infrastructure (id INT, project_name VARCHAR(50), location VARCHAR(50), cost FLOAT); ",SELECT SUM(cost) FROM water_infrastructure;,SELECT SUM(cost) FROM water_infrastructure;,1 What is the Latin motto of the sign that translates to spouse?,"CREATE TABLE table_name_94 (latin_motto VARCHAR, translation VARCHAR);","SELECT latin_motto FROM table_name_94 WHERE translation = ""spouse"";","SELECT latin_motto FROM table_name_94 WHERE translation = ""spouse"";",1 Delete records of volunteers who have not volunteered in the last year?,"CREATE TABLE volunteer_hours (volunteer_id INT, hours INT, volunteer_date DATE); ",DELETE FROM volunteers WHERE volunteer_id NOT IN (SELECT volunteer_id FROM volunteer_hours WHERE volunteer_date >= (CURRENT_DATE - INTERVAL '1 year'));,"DELETE FROM volunteer_hours WHERE volunteer_date DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 Which community development initiatives have the lowest and highest economic diversification impact?,"CREATE TABLE initiative (id INT, name TEXT, location TEXT, economic_diversification_impact INT); ","SELECT name, economic_diversification_impact FROM (SELECT name, economic_diversification_impact, RANK() OVER (ORDER BY economic_diversification_impact ASC) as low_rank, RANK() OVER (ORDER BY economic_diversification_impact DESC) as high_rank FROM initiative) sub WHERE low_rank = 1 OR high_rank = 1;","SELECT name, economic_diversification_impact FROM initiative ORDER BY economic_diversification_impact DESC LIMIT 1;",0 "What team classification has alejandro valverde as points classification, with alejandro valverde as the winner, with 3 as the stage?","CREATE TABLE table_name_26 (team_classification VARCHAR, stage VARCHAR, points_classification VARCHAR, winner VARCHAR);","SELECT team_classification FROM table_name_26 WHERE points_classification = ""alejandro valverde"" AND winner = ""alejandro valverde"" AND stage = ""3"";","SELECT team_classification FROM table_name_26 WHERE points_classification = ""alexander valverde"" AND winner = ""alexander valverde"" AND stage = ""3"";",0 Where is the IHSAA Class of aaa school with more than 590 enrolled?,"CREATE TABLE table_name_1 (location VARCHAR, ihsaa_class VARCHAR, enrollment VARCHAR);","SELECT location FROM table_name_1 WHERE ihsaa_class = ""aaa"" AND enrollment > 590;","SELECT location FROM table_name_1 WHERE ihsaa_class = ""aaa"" AND enrollment > 590;",1 "What is the average rating for menu items in the ""vegan"" category?","CREATE TABLE Ratings (rating_id INT PRIMARY KEY, menu_item VARCHAR(50), rating DECIMAL(2,1)); CREATE TABLE Menu (menu_item VARCHAR(50) PRIMARY KEY, menu_item_category VARCHAR(50));",SELECT AVG(r.rating) FROM Ratings r JOIN Menu m ON r.menu_item = m.menu_item WHERE m.menu_item_category = 'vegan';,SELECT AVG(rating) FROM Ratings r JOIN Menu m ON r.menu_item = m.menu_item WHERE m.menu_item_category ='vegan';,0 What was their record on December 4?,"CREATE TABLE table_name_1 (record VARCHAR, date VARCHAR);","SELECT record FROM table_name_1 WHERE date = ""december 4"";","SELECT record FROM table_name_1 WHERE date = ""december 4"";",1 Create a table that stores the average number of trips per day for each mode of transportation in the 'daily_transportation_usage' table,"CREATE TABLE transportation.daily_transportation_usage (mode VARCHAR(50), trips_per_day INT);","CREATE TABLE transportation.average_trips_per_day AS SELECT mode, AVG(trips_per_day) FROM transportation.daily_transportation_usage GROUP BY mode;","CREATE TABLE transportation.daily_transportation_usage (mode VARCHAR(50), trips_per_day INT);",0 "Update the salaries of all employees in the 'IT' department to 85,000 who have been with the company for more than 1 year.","CREATE TABLE Employees (EmployeeID INT, Department VARCHAR(255), Gender VARCHAR(255), Salary DECIMAL(10,2), HireDate DATE); ","UPDATE Employees SET Salary = 85000.00 WHERE Department = 'IT' AND DATEDIFF(CURDATE(), HireDate) > 365;","UPDATE Employees SET Salary = 85,000 WHERE Department = 'IT' AND HireDate >= DATEADD(year, -1, GETDATE());",0 Which network broadcasted the cup after 2011?,"CREATE TABLE table_name_12 (network VARCHAR, year INTEGER);",SELECT network FROM table_name_12 WHERE year > 2011;,SELECT network FROM table_name_12 WHERE year > 2011;,1 "Which shipyard has a fleet that was laid down on April 21, 1962?","CREATE TABLE table_name_72 (shipyard VARCHAR, laid_down VARCHAR);","SELECT shipyard FROM table_name_72 WHERE laid_down = ""april 21, 1962"";","SELECT shipyard FROM table_name_72 WHERE laid_down = ""april 21, 1962"";",1 What is the maximum age of employees in the sales department who have not completed any training?,"CREATE TABLE employee_database (id INT, department TEXT, age INT, training_completed TEXT); ",SELECT MAX(age) as max_age FROM employee_database WHERE department = 'Sales' AND training_completed = 'None';,SELECT MAX(age) FROM employee_database WHERE department ='sales' AND training_completed IS NULL;,0 What is the recycling rate for each material in CityA?,"CREATE TABLE city_recycling (city_id INT, material VARCHAR(50), recycling_rate FLOAT); ","SELECT material, recycling_rate FROM city_recycling WHERE city_id = 1;","SELECT material, recycling_rate FROM city_recycling WHERE city_id = 1 GROUP BY material;",0 "Who are the top 10 users with the most followers in the ""beauty"" category as of January 1, 2023?","CREATE TABLE users (id INT, username VARCHAR(255), role VARCHAR(255), followers INT, created_at TIMESTAMP, category VARCHAR(255));",SELECT username FROM users WHERE category = 'beauty' ORDER BY followers DESC LIMIT 10;,"SELECT username, followers FROM users WHERE category = 'beauty' AND created_at BETWEEN '2023-01-01' AND '2023-01-31' GROUP BY username ORDER BY followers DESC LIMIT 10;",0 What is the average mass of space debris in different categories?,"CREATE TABLE space_debris (category TEXT, mass FLOAT); ","SELECT category, AVG(mass) AS avg_mass FROM space_debris GROUP BY category;","SELECT category, AVG(mass) FROM space_debris GROUP BY category;",0 What is the maximumum number of wins?,CREATE TABLE table_1507423_4 (wins INTEGER);,SELECT MIN(wins) FROM table_1507423_4;,SELECT MAX(wins) FROM table_1507423_4;,0 What is the preferred size of customers from Spain?,"CREATE TABLE CUSTOMER_SIZE (customer_id INT PRIMARY KEY, customer_name VARCHAR(50), preferred_size VARCHAR(10), country VARCHAR(50)); ",SELECT preferred_size FROM CUSTOMER_SIZE WHERE country = 'Spain';,SELECT preferred_size FROM CUSTOMER_SIZE WHERE country = 'Spain';,1 "What is the average number of points scored by each player in the players table, grouped by their team, and only for players who have scored more than 500 points in total?","CREATE TABLE teams (team_id INT PRIMARY KEY, team_name VARCHAR(255)); CREATE TABLE players (player_id INT PRIMARY KEY, player_name VARCHAR(255), team_id INT, points INT, FOREIGN KEY (team_id) REFERENCES teams(team_id));","SELECT t.team_name, AVG(p.points) as avg_points FROM players p JOIN teams t ON p.team_id = t.team_id GROUP BY t.team_name HAVING SUM(p.points) > 500;","SELECT t.team_name, AVG(p.points) as avg_points FROM players p JOIN teams t ON p.team_id = t.team_id WHERE p.points > 500 GROUP BY t.team_name;",0 What was the total water usage by month for all customers in 2020?,"CREATE TABLE customer_water_usage (customer_id INT, month TEXT, usage FLOAT); ","SELECT month, SUM(usage) as total_usage FROM customer_water_usage WHERE YEAR(STR_TO_DATE(month, '%b')) = 2020 GROUP BY month;","SELECT month, SUM(usage) FROM customer_water_usage WHERE YEAR(customer_id) = 2020 GROUP BY month;",0 Name the party for the pennsylvania 25,"CREATE TABLE table_1342013_37 (party VARCHAR, district VARCHAR);","SELECT party FROM table_1342013_37 WHERE district = ""Pennsylvania 25"";","SELECT party FROM table_1342013_37 WHERE district = ""Pennsylvania 25"";",1 What was the average investment in rural infrastructure projects in Africa from 2018-2020?,"CREATE TABLE infrastructure_projects (project_id INT, project_type VARCHAR(255), investment INT, country VARCHAR(255), year INT); ","SELECT AVG(investment) FROM infrastructure_projects WHERE country IN ('Kenya', 'Nigeria', 'South Africa') AND year BETWEEN 2018 AND 2020;",SELECT AVG(investment) FROM infrastructure_projects WHERE country = 'Africa' AND year BETWEEN 2018 AND 2020 AND project_type = 'Rural';,0 What is the rank of Israel?,"CREATE TABLE table_name_97 (rank INTEGER, country VARCHAR);","SELECT MAX(rank) FROM table_name_97 WHERE country = ""israel"";","SELECT SUM(rank) FROM table_name_97 WHERE country = ""israel"";",0 "Add a new entry to the 'virtual_reality_headsets' table with ID 5, name 'Oculus Rift S', and price 399","CREATE TABLE virtual_reality_headsets (id INT, name VARCHAR(255), price INT);","INSERT INTO virtual_reality_headsets (id, name, price) VALUES (5, 'Oculus Rift S', 399);","INSERT INTO virtual_reality_headsets (id, name, price) VALUES (5, 'Oculus Rift S', 399);",1 Name the score for record 33-47,"CREATE TABLE table_name_30 (score VARCHAR, record VARCHAR);","SELECT score FROM table_name_30 WHERE record = ""33-47"";","SELECT score FROM table_name_30 WHERE record = ""33-47"";",1 Name of the highest Pick is also a Round greater than 5 and Player as Tom Ivey?,"CREATE TABLE table_name_9 (pick INTEGER, round VARCHAR, player VARCHAR);","SELECT MAX(pick) FROM table_name_9 WHERE round > 5 AND player = ""tom ivey"";","SELECT MAX(pick) FROM table_name_9 WHERE round > 5 AND player = ""tom ivey"";",1 What is the circular economy rating of the 'Innovative Technologies' plant?,"CREATE TABLE Plants (id INT, name VARCHAR(255), circular_economy_rating DECIMAL(3, 2)); ",SELECT circular_economy_rating FROM Plants WHERE name = 'Innovative Technologies';,SELECT circular_economy_rating FROM Plants WHERE name = 'Innovative Technologies';,1 What were the top 3 military equipment types with the most sales in 2021?,"CREATE TABLE MilitaryEquipmentSales (Id INT, EquipmentType VARCHAR(255), Quantity INT, SaleDate DATE); ","SELECT EquipmentType, SUM(Quantity) as TotalSales, ROW_NUMBER() OVER (ORDER BY SUM(Quantity) DESC) as Rank FROM MilitaryEquipmentSales WHERE YEAR(SaleDate) = 2021 GROUP BY EquipmentType HAVING SUM(Quantity) >= (SELECT SUM(Quantity) FROM MilitaryEquipmentSales WHERE YEAR(SaleDate) = 2021 GROUP BY EquipmentType ORDER BY SUM(Quantity) DESC LIMIT 1 OFFSET 2) ORDER BY TotalSales DESC;","SELECT EquipmentType, SUM(Quantity) as TotalSales FROM MilitaryEquipmentSales WHERE YEAR(SaleDate) = 2021 GROUP BY EquipmentType ORDER BY TotalSales DESC LIMIT 3;",0 What is the sum of the assists kang jae-soon had in the k-league competition in ulsan?,"CREATE TABLE table_name_6 (assists INTEGER, name VARCHAR, venue VARCHAR, competition VARCHAR);","SELECT SUM(assists) FROM table_name_6 WHERE venue = ""ulsan"" AND competition = ""k-league"" AND name = ""kang jae-soon"";","SELECT SUM(assists) FROM table_name_6 WHERE venue = ""ulsan"" AND competition = ""k-league"" AND name = ""kang jae-soon"";",1 What is the total grant amount awarded to faculty members in the College of Education in the last 3 years?,"CREATE TABLE if not exists FACULTY(id INT, name TEXT, department TEXT, position TEXT, salary INT);CREATE TABLE if not exists GRANTS(id INT, faculty_id INT, grant_name TEXT, grant_amount INT, grant_date DATE, college TEXT);","SELECT SUM(grant_amount) FROM GRANTS WHERE college = 'College of Education' AND grant_date >= DATE('now','-3 year');","SELECT SUM(GRANTS.grant_amount) FROM GRANTS INNER JOIN FACULTY ON GRANTS.faculty_id = FACULTY.id WHERE FACULTY.department = 'Education' AND GRANTS.grant_date >= DATEADD(year, -3, GETDATE());",0 What was the listed attendance when north melbourne was the home team?,"CREATE TABLE table_name_71 (crowd VARCHAR, home_team VARCHAR);","SELECT crowd FROM table_name_71 WHERE home_team = ""north melbourne"";","SELECT crowd FROM table_name_71 WHERE home_team = ""north melbourne"";",1 In what season was 577 runs scored?,"CREATE TABLE table_name_33 (season VARCHAR, runs VARCHAR);","SELECT season FROM table_name_33 WHERE runs = ""577"";",SELECT season FROM table_name_33 WHERE runs = 577;,0 What is the minimum biomass of any whale species in the Arctic Ocean?,"CREATE TABLE whale_biomass (species TEXT, location TEXT, biomass INTEGER); ",SELECT MIN(biomass) FROM whale_biomass WHERE location = 'Arctic';,SELECT MIN(biomass) FROM whale_biomass WHERE location = 'Arctic Ocean';,0 List all surface mines with their corresponding environmental impact scores.,"CREATE TABLE mines (id INT, name VARCHAR(50), mine_type VARCHAR(20)); CREATE TABLE environmental_impact (mine_id INT, score INT); ","SELECT mines.name, environmental_impact.score FROM mines INNER JOIN environmental_impact ON mines.id = environmental_impact.mine_id WHERE mines.mine_type = 'Surface';","SELECT mines.name, environmental_impact.score FROM mines INNER JOIN environmental_impact ON mines.id = environmental_impact.mine_id WHERE mines.mine_type ='surface';",0 What's the location of the National event?,"CREATE TABLE table_name_97 (location VARCHAR, event VARCHAR);","SELECT location FROM table_name_97 WHERE event = ""the national"";","SELECT location FROM table_name_97 WHERE event = ""national"";",0 Display the names and fairness scores of models that do not have the same fairness score as any other model.,"CREATE TABLE model_fairness (model_id INT, fairness_score DECIMAL(3,2)); ","SELECT model_id, fairness_score FROM model_fairness WHERE fairness_score NOT IN (SELECT fairness_score FROM model_fairness GROUP BY fairness_score HAVING COUNT(*) > 1);","SELECT model_id, fairness_score FROM model_fairness WHERE fairness_score IS NULL;",0 Who are the top 5 police officers with the most traffic citations issued?,"CREATE TABLE officers (officer_id INT, name VARCHAR(255), rank VARCHAR(255)); CREATE TABLE traffic_citations (citation_id INT, officer_id INT, date DATE); ","SELECT officer_id, name, COUNT(*) as total_citations FROM traffic_citations tc JOIN officers o ON tc.officer_id = o.officer_id GROUP BY officer_id, name ORDER BY total_citations DESC LIMIT 5;","SELECT officers.name, COUNT(traffic_citations.citation_id) as num_citations FROM officers INNER JOIN traffic_citations ON officers.officer_id = traffic_citations.officer_id GROUP BY officers.name ORDER BY num_citations DESC LIMIT 5;",0 "Which High rebounds has a Game smaller than 9, and a Opponent of detroit?","CREATE TABLE table_name_94 (high_rebounds VARCHAR, game VARCHAR, opponent VARCHAR);","SELECT high_rebounds FROM table_name_94 WHERE game < 9 AND opponent = ""detroit"";","SELECT high_rebounds FROM table_name_94 WHERE game 9 AND opponent = ""detroit"";",0 What is the total number of digital assets created by developers from the US and Canada?,"CREATE TABLE developers (id INT, name TEXT, country TEXT); CREATE TABLE digital_assets (id INT, name TEXT, developer_id INT); ","SELECT COUNT(*) FROM digital_assets d JOIN developers dev ON d.developer_id = dev.id WHERE dev.country IN ('USA', 'Canada');","SELECT COUNT(*) FROM digital_assets JOIN developers ON digital_assets.developer_id = developers.id WHERE developers.country IN ('USA', 'Canada');",0 "What is the total number of containers shipped by company ""Oceanic Corp"" in the first quarter of 2020?","CREATE TABLE Shipments (id INT, company VARCHAR(255), quantity INT, time DATETIME); CREATE TABLE Time (id INT, date DATE, quarter INT); ",SELECT SUM(quantity) FROM Shipments S JOIN Time T ON S.time = T.date WHERE company = 'Oceanic Corp' AND quarter = 1;,SELECT SUM(quantity) FROM Shipments WHERE company = 'Oceanic Corp' AND time BETWEEN '2020-01-01' AND '2020-12-31';,0 What was the constructor of the car that Hermann Lang drove after 1935?,"CREATE TABLE table_name_89 (constructor VARCHAR, year VARCHAR, driver VARCHAR);","SELECT constructor FROM table_name_89 WHERE year > 1935 AND driver = ""hermann lang"";","SELECT constructor FROM table_name_89 WHERE year > 1935 AND driver = ""hermann lang"";",1 List the top 2 oxygen monitoring stations with the lowest average dissolved oxygen levels in the last 6 months?,"CREATE TABLE monitoring_stations (id INT, name TEXT, location TEXT); CREATE TABLE oxygen_readings (id INT, station_id INT, reading DATE, level DECIMAL(5,2)); ","SELECT station_id, AVG(level) avg_oxygen FROM oxygen_readings WHERE reading >= DATEADD(month, -6, CURRENT_DATE) GROUP BY station_id ORDER BY avg_oxygen ASC FETCH FIRST 2 ROWS ONLY;","SELECT monitoring_stations.name, AVG(oxygen_readings.level) as avg_dissolved_oxygen FROM monitoring_stations INNER JOIN oxygen_readings ON monitoring_stations.id = oxygen_readings.station_id WHERE oxygen_readings.reading >= DATEADD(month, -6, GETDATE()) GROUP BY monitoring_stations.name ORDER BY avg_dissolved_oxygen DESC LIMIT 2;",0 "Which driver has a # smaller than 40, less than 151 points, and Winnings of $84,400?","CREATE TABLE table_name_17 (make VARCHAR, winnings VARCHAR, car__number VARCHAR, points VARCHAR);","SELECT make FROM table_name_17 WHERE car__number < 40 AND points < 151 AND winnings = ""$84,400"";","SELECT make FROM table_name_17 WHERE car__number 40 AND points 151 AND winnings = ""$84,400"";",0 Add a new vessel 'Sea Turtle' to the 'Eco-friendly' fleet.,"CREATE TABLE Fleets (id INT, name VARCHAR(255)); CREATE TABLE Vessels (id INT, name VARCHAR(255), fleet_id INT); ","INSERT INTO Vessels (id, name, fleet_id) SELECT 2, 'Sea Turtle', id FROM Fleets WHERE name = 'Eco-friendly';","INSERT INTO Vessels (id, name, fleet_id) VALUES (1, 'Sea Turtle', 'Eco-friendly');",0 "What score in the final has hard as the surface, and june 13, 2011 as the date?","CREATE TABLE table_name_57 (score_in_the_final VARCHAR, surface VARCHAR, date VARCHAR);","SELECT score_in_the_final FROM table_name_57 WHERE surface = ""hard"" AND date = ""june 13, 2011"";","SELECT score_in_the_final FROM table_name_57 WHERE surface = ""hard"" AND date = ""june 13, 2011"";",1 What is the percentage of employees who identify as disabled and have completed accessibility training?,"CREATE TABLE Employees (EmployeeID INT, Disability VARCHAR(10), Training VARCHAR(30)); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Employees)) FROM Employees WHERE Disability = 'Yes' AND Training = 'Accessibility';,SELECT (COUNT(*) FILTER (WHERE Disability = 'Disabled')) * 100.0 / COUNT(*) FROM Employees WHERE Training = 'Accessibility';,0 "What is the average donation amount per region, ordered by the highest amount?","CREATE TABLE Donations (DonationID INT, DonationRegion TEXT, DonationAmount DECIMAL(10,2)); ","SELECT AVG(DonationAmount) AS AvgDonation, DonationRegion FROM Donations GROUP BY DonationRegion ORDER BY AvgDonation DESC;","SELECT DonationRegion, AVG(DonationAmount) as AvgDonationAmount FROM Donations GROUP BY DonationRegion ORDER BY AvgDonationAmount DESC;",0 What is the total with a 74 rank by average for 8th place?,"CREATE TABLE table_name_70 (total VARCHAR, rank_by_average VARCHAR, place VARCHAR);","SELECT total FROM table_name_70 WHERE rank_by_average = ""74"" AND place = ""8th"";","SELECT COUNT(total) FROM table_name_70 WHERE rank_by_average = 74 AND place = ""8th"";",0 what is the declination (j2000) when the ngc number is higher than 3593?,"CREATE TABLE table_name_90 (declination___j2000__ VARCHAR, ngc_number INTEGER);",SELECT declination___j2000__ FROM table_name_90 WHERE ngc_number > 3593;,SELECT declination___j2000__ FROM table_name_90 WHERE ngc_number > 3593;,1 What was arrows racing team's highest points after 1982?,"CREATE TABLE table_name_51 (points INTEGER, entrant VARCHAR, year VARCHAR);","SELECT MAX(points) FROM table_name_51 WHERE entrant = ""arrows racing team"" AND year > 1982;","SELECT MAX(points) FROM table_name_51 WHERE entrant = ""arrows racing team"" AND year > 1982;",1 What is the maximum revenue for a song in the Pop genre?,"CREATE TABLE Song (SongID INT, Title VARCHAR(50), GenreID INT, Revenue INT);",SELECT MAX(Song.Revenue) as MaxRevenue FROM Song WHERE Song.GenreID = (SELECT GenreID FROM Genre WHERE Name='Pop');,SELECT MAX(Revenue) FROM Song WHERE GenreID = (SELECT GenreID FROM Genre WHERE Genre = 'Pop');,0 What is the average billing amount for cases in the 'Civil' practice area?,"CREATE TABLE cases (id INT, practice_area VARCHAR(255), billing_amount DECIMAL(10,2)); ",SELECT AVG(billing_amount) FROM cases WHERE practice_area = 'Civil';,SELECT AVG(billing_amount) FROM cases WHERE practice_area = 'Civil';,1 What is the maximum cargo weight in the 'cargos' table?,"CREATE TABLE cargos (id INT PRIMARY KEY, name VARCHAR(50), weight INT);",SELECT MAX(weight) FROM cargos;,SELECT MAX(weight) FROM cargos;,1 Show the environmental impact of 'Ethyl Acetate' and 'Methyl Ethyl Ketone' in the environmental_impact_table,"CREATE TABLE environmental_impact_table (record_id INT, chemical_id INT, environmental_impact_float);","SELECT chemical_id, environmental_impact_float FROM environmental_impact_table WHERE chemical_id IN (1, 2);","SELECT chemical_id, environmental_impact_float FROM environmental_impact_table WHERE chemical_id IN ('Ethyl Acetate', 'Methyl Ethyl Ketone');",0 "Find the average travel speed for each vessel, grouped by vessel type and month.","CREATE TABLE vessels (vessel_id INT, vessel_name VARCHAR(50), flag_state VARCHAR(50), vessel_type VARCHAR(50)); CREATE TABLE voyages (id INT, vessel_id INT, start_port_id INT, end_port_id INT, distance FLOAT, travel_time FLOAT, voyage_date DATE);","SELECT v.vessel_type, DATE_FORMAT(voyages.voyage_date, '%Y-%m') as time_period, AVG(voyages.distance/voyages.travel_time*24) as avg_speed FROM vessels JOIN voyages ON vessels.vessel_id = voyages.vessel_id GROUP BY v.vessel_type, time_period;","SELECT v.vessel_type, v.month, AVG(v.travel_time) as avg_travel_speed FROM vessels v JOIN voyages v ON v.vessel_id = v.vessel_id GROUP BY v.vessel_type, v.month;",0 "What total number of opened has a stadium of stade de la mosson and is larger than 32,939 capacity?","CREATE TABLE table_name_49 (opened VARCHAR, stadium VARCHAR, capacity VARCHAR);","SELECT COUNT(opened) FROM table_name_49 WHERE stadium = ""stade de la mosson"" AND capacity > 32 OFFSET 939;","SELECT COUNT(opened) FROM table_name_49 WHERE stadium = ""stade de la mosson"" AND capacity > 32 OFFSET 939;",1 How many sustainable tourism initiatives are there in Canada and how many annual visitors do they have in total?,"CREATE TABLE SustainableTourism (InitiativeID INT, InitiativeName VARCHAR(255), Country VARCHAR(255)); CREATE TABLE VisitorCounts (InitiativeID INT, Year INT, VisitorCount INT); ","SELECT SustainableTourism.Country, COUNT(SustainableTourism.InitiativeName) AS InitiativeCount, SUM(VisitorCounts.VisitorCount) AS TotalVisitors FROM SustainableTourism INNER JOIN VisitorCounts ON SustainableTourism.InitiativeID = VisitorCounts.InitiativeID WHERE SustainableTourism.Country = 'Canada' GROUP BY SustainableTourism.Country;","SELECT COUNT(*), SUM(VisitorCounts.VisitorCount) FROM SustainableTourism INNER JOIN VisitorCounts ON SustainableTourism.InitiativeID = VisitorCounts.InitiativeID WHERE SustainableTourism.Country = 'Canada';",0 What is the total protein content in the smoothie_bar table?,"CREATE TABLE smoothie_bar (smoothie_name TEXT, protein INTEGER); ",SELECT SUM(protein) FROM smoothie_bar;,SELECT SUM(protein) FROM smoothie_bar;,1 Who is safe if John and Nicole are eliminated?,"CREATE TABLE table_12305325_4 (safe VARCHAR, eliminated VARCHAR);","SELECT safe FROM table_12305325_4 WHERE eliminated = ""John and Nicole"";","SELECT safe FROM table_12305325_4 WHERE eliminated = ""John and Nicole"";",1 How many heats does Julia Wilkinson have?,"CREATE TABLE table_name_88 (heat VARCHAR, name VARCHAR);","SELECT COUNT(heat) FROM table_name_88 WHERE name = ""julia wilkinson"";","SELECT COUNT(heat) FROM table_name_88 WHERE name = ""julie wilkinson"";",0 What is the total fare collected for each route type?,"CREATE TABLE trips (route_id INT, fare DECIMAL(5,2), date DATE); CREATE TABLE routes (route_id INT, type VARCHAR(50)); ","SELECT routes.type, SUM(trips.fare) FROM trips JOIN routes ON trips.route_id = routes.route_id GROUP BY routes.type;","SELECT r.type, SUM(t.fare) as total_fare FROM trips t JOIN routes r ON t.route_id = r.route_id GROUP BY r.type;",0 What is the minimum mental health score for students in the 'in_person' program?,"CREATE TABLE student_mental_health (student_id INT, program VARCHAR(20), score INT); ",SELECT MIN(score) FROM student_mental_health WHERE program = 'in_person';,SELECT MIN(score) FROM student_mental_health WHERE program = 'in_person';,1 What is the total quantity of Gold extracted in the USA in 2017?,"CREATE TABLE extraction_statistics (year INT, location VARCHAR(20), material VARCHAR(20), quantity FLOAT); ","SELECT material, SUM(quantity) as total_quantity FROM extraction_statistics WHERE location = 'USA' AND material = 'Gold' AND year = 2017;",SELECT SUM(quantity) FROM extraction_statistics WHERE year = 2017 AND location = 'USA' AND material = 'Gold';,0 Find the busiest destination airport that runs most number of routes in China.,"CREATE TABLE routes (dst_apid VARCHAR); CREATE TABLE airports (name VARCHAR, apid VARCHAR, country VARCHAR);",SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1;,SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T2.country = 'China' GROUP BY T1.apid ORDER BY COUNT(*) DESC LIMIT 1;,0 What are the top 3 most popular genres in the US?,"CREATE TABLE artists (id INT, name TEXT, genre TEXT, country TEXT); CREATE TABLE streams (id INT, song_id INT, artist_id INT, platform TEXT, streams INT); CREATE TABLE songs (id INT, title TEXT, artist_id INT); CREATE VIEW top_genres AS SELECT genre, SUM(streams) as total_streams FROM streams JOIN artists ON streams.artist_id = artists.id GROUP BY genre;","SELECT genre, total_streams FROM top_genres WHERE country = 'USA' ORDER BY total_streams DESC LIMIT 3;","SELECT genre, total_streams FROM top_genres JOIN artists ON top_genres.artist_id = artists.id JOIN streams ON top_genres.artist_id = streams.artist_id WHERE country = 'USA' GROUP BY genre ORDER BY total_streams DESC LIMIT 3;",0 Which Team has a Time of 1:14.51.73?,"CREATE TABLE table_name_31 (team VARCHAR, time VARCHAR);","SELECT team FROM table_name_31 WHERE time = ""1:14.51.73"";","SELECT team FROM table_name_31 WHERE time = ""1:14.51.73"";",1 What is the total number of 3-bedroom units in the green_apartments table?,"CREATE TABLE green_apartments (unit_id INT, num_bedrooms INT, square_footage FLOAT); ",SELECT SUM(CASE WHEN num_bedrooms = 3 THEN 1 ELSE 0 END) FROM green_apartments;,SELECT SUM(num_bedrooms) FROM green_apartments WHERE num_bedrooms >= 3;,0 What is the total funding amount for the 'Theater' category in 2022?,"CREATE TABLE funding_sources (funding_source_id INT, funding_category VARCHAR(255), year INT, amount INT); ",SELECT SUM(amount) as total_funding FROM funding_sources WHERE funding_category = 'Theater' AND year = 2022;,SELECT SUM(amount) FROM funding_sources WHERE funding_category = 'Theater' AND year = 2022;,0 Add a new attorney named 'Alex' to the 'attorneys' table,"CREATE TABLE attorneys (attorney_id INT PRIMARY KEY, attorney_name VARCHAR(50), experience INT, area_of_practice VARCHAR(50));","INSERT INTO attorneys (attorney_id, attorney_name, experience, area_of_practice) VALUES (4, 'Alex', 7, 'Civil Rights');","INSERT INTO attorneys (attorney_id, attorney_name, experience, area_of_practice) VALUES (1, 'Alex', 'Practice');",0 Which engine has a torgue of lb·ft (n·m)?,"CREATE TABLE table_name_67 (engine VARCHAR, torque VARCHAR);","SELECT engine FROM table_name_67 WHERE torque = ""lb·ft (n·m)"";","SELECT engine FROM table_name_67 WHERE torque = ""lbft (nm)"";",0 "What is the average age of pottery artifacts, grouped by excavation site?","CREATE TABLE ancient_artifacts (id INT, artifact_name VARCHAR(50), age INT, type VARCHAR(50), excavation_site VARCHAR(50));","SELECT excavation_site, AVG(age) OVER (PARTITION BY excavation_site) as avg_pottery_age FROM ancient_artifacts WHERE type = 'pottery';","SELECT excavation_site, AVG(age) as avg_age FROM ancient_artifacts WHERE type = 'pottery' GROUP BY excavation_site;",0 What is the total biomass of krill in the Arctic Ocean?,"CREATE TABLE Biomass (species VARCHAR(255), ocean VARCHAR(255), biomass FLOAT); ",SELECT SUM(biomass) FROM Biomass WHERE species = 'Krill' AND ocean = 'Arctic Ocean';,SELECT SUM(biomass) FROM Biomass WHERE species = 'Krill' AND ocean = 'Arctic Ocean';,1 What is the number of poles with 104 points?,"CREATE TABLE table_name_51 (poles VARCHAR, points VARCHAR);","SELECT poles FROM table_name_51 WHERE points = ""104"";",SELECT COUNT(poles) FROM table_name_51 WHERE points = 104;,0 What is the total amount donated to 'Arts & Culture' category in 'donation_summary' table?,"CREATE TABLE donation_summary (category VARCHAR(20), donation_amount INT); ",SELECT SUM(donation_amount) FROM donation_summary WHERE category = 'Arts & Culture';,SELECT SUM(donation_amount) FROM donation_summary WHERE category = 'Arts & Culture';,1 "What are the vocal types used in song ""Badlands""?",CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR);,"SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = ""Badlands"";","SELECT T1.songid FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE T2.songid = ""Badlands"";",0 What is the total number of crewed missions to the International Space Station?,"CREATE TABLE ISSMissions (id INT, mission_date DATE, crewed BOOLEAN);",SELECT COUNT(*) FROM ISSMissions WHERE crewed = TRUE;,SELECT COUNT(*) FROM ISSMissions WHERE crewed = TRUE;,1 Delete the record of the animal 'Bear' from the 'Rescue Center' table;,"CREATE TABLE rescue_center (id INT, animal_name VARCHAR(50), date_admitted DATE, region VARCHAR(20)); ",DELETE FROM rescue_center WHERE animal_name = 'Bear';,DELETE FROM rescue_center WHERE animal_name = 'Bear';,1 What is the invoice number and invoice date for the invoice with most number of transactions?,"CREATE TABLE Invoices (invoice_number VARCHAR, invoice_date VARCHAR); CREATE TABLE Financial_transactions (invoice_number VARCHAR);","SELECT T2.invoice_number, T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY COUNT(*) DESC LIMIT 1;","SELECT T1.invoice_number, T1.invoice_date FROM Invoices AS T1 JOIN Financial_transactions AS T2 ON T1.invoice_number = T2.invoice_number ORDER BY COUNT(*) DESC LIMIT 1;",0 How many matches did Serena Williams win in 2012?,"CREATE TABLE tennis_stats (player VARCHAR(255), year INT, wins INT); ",SELECT wins FROM tennis_stats WHERE player = 'Serena Williams' AND year = 2012;,SELECT SUM(wins) FROM tennis_stats WHERE player = 'Serena Williams' AND year = 2012;,0 What pens have a draw of 0 when the player is sione mafi pahulu?,"CREATE TABLE table_name_17 (pens VARCHAR, draw VARCHAR, player VARCHAR);","SELECT pens FROM table_name_17 WHERE draw = ""0"" AND player = ""sione mafi pahulu"";","SELECT pens FROM table_name_17 WHERE draw = 0 AND player = ""sione mafi pahulu"";",0 What is the maximum salary in each department?,"CREATE TABLE Employees (EmployeeID INT, Gender VARCHAR(10), Department VARCHAR(20), Salary FLOAT); ","SELECT Department, MAX(Salary) FROM Employees GROUP BY Department;","SELECT Department, MAX(Salary) FROM Employees GROUP BY Department;",1 Was it a win or a loss for Wanganui in Paeroa?,"CREATE TABLE table_26847237_1 (win_loss VARCHAR, location VARCHAR);","SELECT win_loss FROM table_26847237_1 WHERE location = ""Paeroa"";","SELECT win_loss FROM table_26847237_1 WHERE location = ""Paeroa"";",1 How many bridges are in the transport division?,"CREATE TABLE Projects (id INT, division VARCHAR(10)); CREATE TABLE TransportProjects (id INT, project_id INT, length DECIMAL(10,2)); ",SELECT COUNT(*) FROM TransportProjects tp JOIN Projects p ON tp.project_id = p.id WHERE p.division = 'transport';,SELECT COUNT(*) FROM TransportProjects tp JOIN Projects p ON tp.project_id = p.id WHERE p.division = 'Transport';,0 "What was the score of united center 22,097?","CREATE TABLE table_11960610_10 (score VARCHAR, location_attendance VARCHAR);","SELECT score FROM table_11960610_10 WHERE location_attendance = ""United Center 22,097"";","SELECT score FROM table_11960610_10 WHERE location_attendance = ""United Center 22,097"";",1 what is the score in february 12 of the boston celtics team,"CREATE TABLE table_17382360_7 (score VARCHAR, team VARCHAR);","SELECT score FROM table_17382360_7 WHERE team = ""Boston Celtics"";","SELECT score FROM table_17382360_7 WHERE team = ""Boston Celtics"";",1 What is the average number of passengers per train during rush hour on the Green Line?,"CREATE TABLE if not exists trains (train_id serial primary key,name varchar(255),line_id int);CREATE TABLE if not exists train_passengers (passenger_id serial primary key,train_id int,passengers int,time_of_day varchar(255));",SELECT AVG(passengers) FROM trains t JOIN train_passengers p ON t.train_id = p.train_id WHERE t.line_id = 4 AND time_of_day = 'rush hour';,SELECT AVG(passengers) FROM train_passengers WHERE time_of_day = 'rush hour' AND train_id IN (SELECT train_id FROM trains WHERE line_id = 1);,0 "Name how ashtagrama lyers say it for engal veetil, engal agathil","CREATE TABLE table_name_6 (how_ashtagrama_iyers_say_it VARCHAR, pure_tamil VARCHAR);","SELECT how_ashtagrama_iyers_say_it FROM table_name_6 WHERE pure_tamil = ""engal veetil, engal agathil"";","SELECT how_ashtagrama_iyers_say_it FROM table_name_6 WHERE pure_tamil = ""engal veetil, engal agathil"";",1 "Insert a new donor with donor_id 4, donation amount $8000 in 2021, and gender 'non-binary'.","CREATE TABLE donors (donor_id INT, donation_amount DECIMAL(10,2), donation_year INT, gender VARCHAR(10));","INSERT INTO donors (donor_id, donation_amount, donation_year, gender) VALUES (4, 8000.00, 2021, 'non-binary');","INSERT INTO donors (donor_id, donation_amount, donation_year, gender) VALUES (4, 'Non-binary', 8000, 2021);",0 What was the total amount donated in the 'Environment' category for the first half of 2020?,"CREATE TABLE donations (id INT, category VARCHAR(20), amount DECIMAL(10,2), donation_date DATE); ",SELECT SUM(amount) as total_donations FROM donations WHERE category = 'Environment' AND YEAR(donation_date) = 2020 AND MONTH(donation_date) <= 6;,SELECT SUM(amount) FROM donations WHERE category = 'Environment' AND donation_date BETWEEN '2020-01-01' AND '2020-12-31';,0 When was there a score of 7-1?,"CREATE TABLE table_name_71 (date VARCHAR, score VARCHAR);","SELECT date FROM table_name_71 WHERE score = ""7-1"";","SELECT date FROM table_name_71 WHERE score = ""7-1"";",1 Name the ERP W for frequency of 92.7,"CREATE TABLE table_name_66 (erp_w VARCHAR, frequency_mhz VARCHAR);",SELECT erp_w FROM table_name_66 WHERE frequency_mhz = 92.7;,"SELECT erp_w FROM table_name_66 WHERE frequency_mhz = ""92.7"";",0 "What is the maximum timber production in cubic meters for the last 5 years, for each timber production facility in the timber_production table?","CREATE TABLE timber_production (facility_id INT, year INT, production FLOAT);","SELECT facility_id, MAX(production) FROM timber_production WHERE year >= YEAR(CURRENT_DATE) - 5 GROUP BY facility_id;","SELECT facility_id, MAX(production) FROM timber_production WHERE year >= YEAR(CURRENT_DATE) - 5 GROUP BY facility_id;",1 What are all the instruments used?,CREATE TABLE Instruments (instrument VARCHAR);,SELECT DISTINCT instrument FROM Instruments;,SELECT instrument FROM Instruments;,0 Identify crime rates and response times for each district in London.,"CREATE TABLE crimes (id INT, crime_type VARCHAR(255), district VARCHAR(255), response_time INT); CREATE TABLE districts (district VARCHAR(255), city VARCHAR(255)); ","SELECT c.crime_type, d.district, COUNT(c.id) AS crime_count, AVG(c.response_time) AS response_time_avg FROM crimes c INNER JOIN districts d ON c.district = d.district WHERE d.city = 'London' GROUP BY c.crime_type, d.district;","SELECT d.district, c.crime_type, c.response_time FROM crimes c JOIN districts d ON c.district = d.district WHERE d.city = 'London' GROUP BY d.district;",0 What is the maximum temperature recorded during each space mission?,"CREATE TABLE TemperatureRecords (Id INT, Mission VARCHAR(50), Temperature INT); ","SELECT Mission, MAX(Temperature) FROM TemperatureRecords GROUP BY Mission","SELECT Mission, MAX(Temperature) FROM TemperatureRecords GROUP BY Mission;",0 "When the Away team was essendon, what was the Venue they played at?","CREATE TABLE table_name_14 (venue VARCHAR, away_team VARCHAR);","SELECT venue FROM table_name_14 WHERE away_team = ""essendon"";","SELECT venue FROM table_name_14 WHERE away_team = ""essendon"";",1 "How many public libraries are there in Ontario, and what is the total number of books in their collections?","CREATE TABLE public_libraries (name VARCHAR(255), province VARCHAR(255), books_count INT); ","SELECT COUNT(*) AS total_libraries, SUM(books_count) AS total_books FROM public_libraries WHERE province = 'Ontario';","SELECT COUNT(*), SUM(books_count) FROM public_libraries WHERE province = 'Ontario';",0 Who was the driver of the vehicle having class of CM22 and navigator of Macneall?,"CREATE TABLE table_name_86 (driver VARCHAR, class VARCHAR, navigator VARCHAR);","SELECT driver FROM table_name_86 WHERE class = ""cm22"" AND navigator = ""macneall"";","SELECT driver FROM table_name_86 WHERE class = ""cm22"" AND navigator = ""macneall"";",1 Delete dishes that have not been ordered in the past 30 days,"CREATE TABLE dishes (dish_id INT, dish_name VARCHAR(255), last_ordered_date DATE); ",DELETE FROM dishes WHERE last_ordered_date < NOW() - INTERVAL 30 DAY;,"DELETE FROM dishes WHERE last_ordered_date DATE_SUB(CURRENT_DATE, INTERVAL 30 DAY);",0 Which potential's period 5 is 4 and has an element of antimony?,"CREATE TABLE table_name_81 (potential VARCHAR, period VARCHAR, element VARCHAR);","SELECT potential FROM table_name_81 WHERE period = 5 AND element = ""antimony"";","SELECT potential FROM table_name_81 WHERE period = ""5"" AND element = ""antimony"";",0 Which To par has a Score of 78-74-71-75=298?,"CREATE TABLE table_name_52 (to_par INTEGER, score VARCHAR);",SELECT AVG(to_par) FROM table_name_52 WHERE score = 78 - 74 - 71 - 75 = 298;,SELECT MAX(to_par) FROM table_name_52 WHERE score = 78 - 74 - 71 - 75 = 298;,0 "What is the average monthly mobile data usage for the top 10 countries with the highest mobile network infrastructure investments, and the total investment amount for each country?","CREATE TABLE country_investment (country_name VARCHAR(50), investment_amount FLOAT, population INT); CREATE TABLE mobile_data_usage (customer_id INT, data_usage FLOAT, country_name VARCHAR(50));","SELECT sub.country_name, AVG(mobile_data_usage.data_usage) as avg_data_usage, country_investment.investment_amount as total_investment FROM (SELECT country_name FROM country_investment WHERE investment_amount = (SELECT MAX(investment_amount) FROM country_investment) GROUP BY country_name ORDER BY SUM(investment_amount) DESC LIMIT 10) as sub JOIN country_investment ON sub.country_name = country_investment.country_name LEFT JOIN mobile_data_usage ON sub.country_name = mobile_data_usage.country_name GROUP BY sub.country_name, country_investment.investment_amount;","SELECT country_name, AVG(data_usage) as avg_data_usage, SUM(investment_amount) as total_investment FROM country_investment JOIN mobile_data_usage ON country_investment.country_name = mobile_data_usage.country_name GROUP BY country_name ORDER BY total_investment DESC LIMIT 10;",0 Update the name of the developer for smart contract with id = 3 to 'Jamila Nguyen'.,"CREATE TABLE smart_contracts (id INT, name VARCHAR(255), developer VARCHAR(255), creation_date DATE, country VARCHAR(255)); ",UPDATE smart_contracts SET developer = 'Jamila Nguyen' WHERE id = 3;,UPDATE smart_contracts SET developer = 'Jamila Nguyen' WHERE id = 3;,1 "What is the average goals for with a position under 12, draws over 1, and goals against under 28?","CREATE TABLE table_name_49 (goals_for INTEGER, goals_against VARCHAR, position VARCHAR, draw VARCHAR);",SELECT AVG(goals_for) FROM table_name_49 WHERE position < 12 AND draw > 1 AND goals_against < 28;,SELECT AVG(goals_for) FROM table_name_49 WHERE position 12 AND draw > 1 AND goals_against 28;,0 What was the margin of victory when the winning score was −5 (69-69-73=211)?,"CREATE TABLE table_name_21 (margin_of_victory VARCHAR, winning_score VARCHAR);",SELECT margin_of_victory FROM table_name_21 WHERE winning_score = −5(69 - 69 - 73 = 211);,SELECT margin_of_victory FROM table_name_21 WHERE winning_score = 5 (69 - 69 - 73 = 211);,0 "List the top 10 most active users in terms of total number of posts, along with the number of followers they have, for users in India.","CREATE TABLE users (id INT, username VARCHAR(50), followers INT, country VARCHAR(50)); CREATE TABLE posts (id INT, user_id INT, content VARCHAR(500));","SELECT u.username, u.followers, COUNT(p.id) as total_posts FROM users u JOIN posts p ON u.id = p.user_id WHERE u.country = 'India' GROUP BY u.id ORDER BY total_posts DESC LIMIT 10;","SELECT u.username, SUM(p.content) as total_posts, SUM(p.followers) as total_followers FROM users u JOIN posts p ON u.id = p.user_id WHERE u.country = 'India' GROUP BY u.username ORDER BY total_followers DESC LIMIT 10;",0 "Update the mission status of all missions launched before 2000 in the space_missions table to ""Completed""","CREATE TABLE space_missions (id INT PRIMARY KEY, mission_name VARCHAR(100), launch_date DATE, mission_status VARCHAR(50));",UPDATE space_missions SET mission_status = 'Completed' WHERE launch_date < '2000-01-01';,UPDATE space_missions SET mission_status = 'Completed' WHERE launch_date '2000-01-01';,0 Display the top 5 donors who have made the largest total donations in the philanthropic trends sector.,"CREATE TABLE philanthropic_trends (donor_id INT, donation_amount DECIMAL(10,2), donation_date DATE); ","SELECT donor_id, SUM(donation_amount) as total_donation FROM philanthropic_trends GROUP BY donor_id ORDER BY total_donation DESC LIMIT 5;","SELECT donor_id, SUM(donation_amount) as total_donations FROM philanthropic_trends GROUP BY donor_id ORDER BY total_donations DESC LIMIT 5;",0 Which team scores 119 in round 4?,"CREATE TABLE table_name_1 (club_team VARCHAR, round VARCHAR, overall VARCHAR);",SELECT club_team FROM table_name_1 WHERE round = 4 AND overall = 119;,SELECT club_team FROM table_name_1 WHERE round = 4 AND overall = 119;,1 What is the minimum and maximum depth of the Atlantic Ocean?,"CREATE TABLE ocean_depths (ocean TEXT, min_depth FLOAT, max_depth FLOAT); ","SELECT ocean, MIN(min_depth) AS min_depth, MAX(max_depth) AS max_depth FROM ocean_depths GROUP BY ocean;","SELECT MIN(min_depth) AS min_depth, MAX(max_depth) AS max_depth FROM ocean_depths WHERE ocean = 'Atlantic Ocean';",0 What is the Record of the game on January 31 with Visitors Detroit Red Wings?,"CREATE TABLE table_name_74 (record VARCHAR, visitor VARCHAR, date VARCHAR);","SELECT record FROM table_name_74 WHERE visitor = ""detroit red wings"" AND date = ""january 31"";","SELECT record FROM table_name_74 WHERE visitor = ""detroit red wings"" AND date = ""january 31"";",1 "What was the venue before 2006, with the position of 10th?","CREATE TABLE table_name_26 (venue VARCHAR, year VARCHAR, position VARCHAR);","SELECT venue FROM table_name_26 WHERE year < 2006 AND position = ""10th"";","SELECT venue FROM table_name_26 WHERE year 2006 AND position = ""10th"";",0 List the co-owners and their respective properties in co_ownership table.,"CREATE TABLE co_ownership (owner_id INT, property_id INT, name VARCHAR(255)); ","SELECT owner_id, name, property_id FROM co_ownership;","SELECT owner_id, property_id, name FROM co_ownership;",0 When chris barnes is on team usa how many europe teams are there?,"CREATE TABLE table_19072602_3 (team_europe VARCHAR, team_usa VARCHAR);","SELECT COUNT(team_europe) FROM table_19072602_3 WHERE team_usa = ""Chris Barnes"";","SELECT COUNT(team_europe) FROM table_19072602_3 WHERE team_usa = ""Chris Barnes"";",1 What is the maximum billing amount for cases in Texas?,"CREATE TABLE cases (id INT, state VARCHAR(2), billing_amount DECIMAL(10,2)); ",SELECT MAX(billing_amount) FROM cases WHERE state = 'TX';,SELECT MAX(billing_amount) FROM cases WHERE state = 'Texas';,0 List all the autonomous driving research projects,"CREATE TABLE autonomous_projects (id INT, name VARCHAR(50), region VARCHAR(50), funding FLOAT); ",SELECT * FROM autonomous_projects;,SELECT * FROM autonomous_projects;,1 What is the total playtime for each player in February 2021 in 'player_daily_playtime_v4'?,"CREATE TABLE player_daily_playtime_v4 (player_id INT, play_date DATE, playtime INT); ","SELECT player_id, SUM(playtime) FROM player_daily_playtime_v4 WHERE play_date BETWEEN '2021-02-01' AND '2021-02-28' GROUP BY player_id;","SELECT player_id, SUM(playtime) as total_playtime FROM player_daily_playtime_v4 WHERE play_date BETWEEN '2021-02-01' AND '2021-02-28' GROUP BY player_id;",0 Update the email to 'john.doe@example.com' for policy_holder_id 1 in the policy_holder table,"CREATE TABLE policy_holder (policy_holder_id INT, first_name VARCHAR(50), last_name VARCHAR(50), email VARCHAR(50), phone VARCHAR(15), address VARCHAR(100), city VARCHAR(50), state VARCHAR(2), zip VARCHAR(10)); ",UPDATE policy_holder SET email = 'john.doe@example.com' WHERE policy_holder_id = 1;,UPDATE policy_holder SET email = 'john.doe@example.com' WHERE policy_holder_id = 1;,1 What is the location of Blanca Peak?,"CREATE TABLE table_name_77 (location VARCHAR, mountain_peak VARCHAR);","SELECT location FROM table_name_77 WHERE mountain_peak = ""blanca peak"";","SELECT location FROM table_name_77 WHERE mountain_peak = ""blanca peak"";",1 "Which Date has a Location of davos, and a Time of 45.7?","CREATE TABLE table_name_86 (date VARCHAR, location VARCHAR, time VARCHAR);","SELECT date FROM table_name_86 WHERE location = ""davos"" AND time = ""45.7"";","SELECT date FROM table_name_86 WHERE location = ""davos"" AND time = ""45.7"";",1 What is the overall total for players drafted from notre dame?,"CREATE TABLE table_name_25 (overall INTEGER, college VARCHAR);","SELECT SUM(overall) FROM table_name_25 WHERE college = ""notre dame"";","SELECT SUM(overall) FROM table_name_25 WHERE college = "" notre dame"";",0 What is the count of diverse founders by each industry category?,"CREATE TABLE Companies (CompanyID INT, CompanyName VARCHAR(50), Industry VARCHAR(30)); CREATE TABLE Founders (FounderID INT, FounderName VARCHAR(50), Ethnicity VARCHAR(20), CompanyID INT);","SELECT C.Industry, COUNT(DISTINCT F.FounderID) AS DiverseFoundersCount FROM Founders F JOIN Companies ON F.CompanyID = Companies.CompanyID WHERE F.Ethnicity IN ('African', 'Hispanic', 'Asian', 'Indigenous') GROUP BY C.Industry;","SELECT c.Industry, COUNT(DISTINCT f.FounderID) FROM Companies c INNER JOIN Founders f ON c.CompanyID = f.CompanyID GROUP BY c.Industry;",0 WHAT IS THE TRIES WITH POINTS 190?,"CREATE TABLE table_name_36 (tries_for VARCHAR, points_for VARCHAR);","SELECT tries_for FROM table_name_36 WHERE points_for = ""190"";",SELECT tries_for FROM table_name_36 WHERE points_for = 190;,0 What is the total volume of packages shipped to Canada in March 2021 from all warehouses?,"CREATE TABLE Warehouse (id INT, name VARCHAR(255)); CREATE TABLE Packages (id INT, weight FLOAT, volume FLOAT, warehouse_id INT, shipment_date DATE); ","SELECT SUM(volume) FROM Packages WHERE shipment_date BETWEEN '2021-03-01' AND '2021-03-31' AND warehouse_id IN (SELECT id FROM Warehouse WHERE name IN ('New York', 'Los Angeles'));",SELECT SUM(p.volume) FROM Packages p JOIN Warehouse w ON p.warehouse_id = w.id WHERE p.shipment_date BETWEEN '2021-03-01' AND '2021-03-31' AND w.name = 'Warehouse Canada';,0 What was the production code of the episode no. 55 in the series?,"CREATE TABLE table_27776266_1 (production_code VARCHAR, no_in_series VARCHAR);",SELECT production_code FROM table_27776266_1 WHERE no_in_series = 55;,SELECT production_code FROM table_27776266_1 WHERE no_in_series = 55;,1 "What is the total budget allocated for each disability program, ranked in descending order?","CREATE TABLE ProgramBudget (ProgramID INT, ProgramName VARCHAR(50), Budget DECIMAL(10,2)); ","SELECT ProgramName, SUM(Budget) as TotalBudget, ROW_NUMBER() OVER (ORDER BY SUM(Budget) DESC) as Rank FROM ProgramBudget GROUP BY ProgramName;","SELECT ProgramName, SUM(Budget) as TotalBudget FROM ProgramBudget GROUP BY ProgramName ORDER BY TotalBudget DESC;",0 Average water depth of wells in the Gulf of Guinea.,"CREATE TABLE well_info (id INT, location VARCHAR(50), water_depth FLOAT); ",SELECT AVG(water_depth) FROM well_info WHERE location = 'Gulf of Guinea';,SELECT AVG(water_depth) FROM well_info WHERE location = 'Gulf of Guinea';,1 What was the location and attendance for game 41?,"CREATE TABLE table_27539272_7 (location_attendance VARCHAR, game VARCHAR);",SELECT location_attendance FROM table_27539272_7 WHERE game = 41;,SELECT location_attendance FROM table_27539272_7 WHERE game = 41;,1 Insert a new customer record 'Juan Garcia' from 'Mexico' with a loyalty_score of 75 into the Customers table.,"CREATE TABLE Customers (customerID INT, customerName VARCHAR(50), loyalty_score INT, country VARCHAR(50)); ","INSERT INTO Customers (customerName, loyalty_score, country) VALUES ('Juan Garcia', 75, 'Mexico');","INSERT INTO Customers (customerID, customerName, loyalty_score, country) VALUES ('Juan Garcia', 75, 'Mexico');",0 List the stadium and number of people in attendance when the team record was 45-22.,"CREATE TABLE table_23284271_9 (location_attendance VARCHAR, record VARCHAR);","SELECT COUNT(location_attendance) FROM table_23284271_9 WHERE record = ""45-22"";","SELECT location_attendance FROM table_23284271_9 WHERE record = ""45-22"";",0 How many AI safety incidents were reported in the 'autonomous vehicles' application area in 2022?,"CREATE TABLE ai_safety_incidents (incident_id INT, incident_year INT, ai_application_area VARCHAR(50));",SELECT COUNT(*) FROM ai_safety_incidents WHERE ai_application_area = 'autonomous vehicles' AND incident_year = 2022;,SELECT COUNT(*) FROM ai_safety_incidents WHERE incident_year = 2022 AND ai_application_area = 'autonomous vehicles';,0 "Insert a new traditional art form, 'Inuit Tattooing', in the ArtForms table, assigning it a new ArtFormID.","CREATE TABLE ArtForms (ArtFormID INT PRIMARY KEY, ArtFormName VARCHAR(100));","INSERT INTO ArtForms (ArtFormID, ArtFormName) VALUES (nextval('artform_id_seq'), 'Inuit Tattooing');","INSERT INTO ArtForms (ArtFormID, ArtFormName) VALUES (4, 'Inuit Tattooing');",0 In the final against Ashley Harkleroad what was the score?,"CREATE TABLE table_name_21 (score VARCHAR, opponent_in_the_final VARCHAR);","SELECT score FROM table_name_21 WHERE opponent_in_the_final = ""ashley harkleroad"";","SELECT score FROM table_name_21 WHERE opponent_in_the_final = ""ashley harkleroad"";",1 what is the earliest winter olympics when the fis nordic world ski championships is 1976?,"CREATE TABLE table_name_39 (winter_olympics INTEGER, fis_nordic_world_ski_championships VARCHAR);","SELECT MIN(winter_olympics) FROM table_name_39 WHERE fis_nordic_world_ski_championships = ""1976"";",SELECT MIN(winter_olympics) FROM table_name_39 WHERE fis_nordic_world_ski_championships = 1976;,0 How many inspectors were involved in inspections at South African mines?,"CREATE TABLE mines (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255)); CREATE TABLE inspections (id INT PRIMARY KEY, mine_id INT, inspector_count INT, safety_rating INT); ",SELECT SUM(i.inspector_count) as total_inspector_count FROM inspections i JOIN mines m ON i.mine_id = m.id WHERE m.location = 'South Africa';,SELECT SUM(inspection_count) FROM inspections i JOIN mines m ON i.mine_id = m.id WHERE m.location = 'South Africa';,0 What is the trend of food waste in urban areas over the last 5 years?,"CREATE TABLE food_waste (year INT, location VARCHAR(255), waste INT);","SELECT year, AVG(waste) as avg_waste FROM food_waste WHERE location = 'urban' GROUP BY year ORDER BY year DESC LIMIT 5;","SELECT location, SUM(waste) as total_waste FROM food_waste WHERE location LIKE '%urban%' GROUP BY location;",0 What is the special when the challenger is dominique bouchet?,"CREATE TABLE table_23982399_12 (special VARCHAR, challenger VARCHAR);","SELECT special FROM table_23982399_12 WHERE challenger = ""Dominique Bouchet"";","SELECT special FROM table_23982399_12 WHERE challenger = ""Dominique Bouchet"";",1 Calculate the average weight of packages shipped from China to Beijing in the last month.,"CREATE TABLE shipments (id INT, source_country VARCHAR(20), destination_city VARCHAR(20), package_weight FLOAT, shipment_date DATE); ","SELECT AVG(package_weight) FROM shipments WHERE source_country = 'China' AND destination_city = 'Beijing' AND shipment_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);","SELECT AVG(package_weight) FROM shipments WHERE source_country = 'China' AND destination_city = 'Beijing' AND shipment_date >= DATEADD(month, -1, GETDATE());",0 List all the columns in table 'hotel_reservations',"CREATE TABLE hotel_reservations (reservation_id INT, hotel_id INT, guest_name TEXT, arrival_date DATE, departure_date DATE, num_guests INT, payment_amount FLOAT, is_cancelled BOOLEAN);",SELECT * FROM hotel_reservations;,SELECT * FROM hotel_reservations;,1 What is the maximum billing amount for cases handled by attorneys in the family law department?,"CREATE TABLE attorneys (attorney_id INT, name TEXT, department TEXT); CREATE TABLE cases (case_id INT, attorney_id INT, billing_amount INT); ",SELECT MAX(billing_amount) FROM cases WHERE attorney_id IN (SELECT attorney_id FROM attorneys WHERE department = 'Family Law'),SELECT MAX(billing_amount) FROM cases JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.department = 'Family Law';,0 "Find the total revenue for each game title, including those with zero revenue.","CREATE TABLE GameSales (GameTitle VARCHAR(255), UnitsSold INT, Revenue DECIMAL(10,2)); ","SELECT g.GameTitle, COALESCE(SUM(g.Revenue), 0) as TotalRevenue FROM GameSales g GROUP BY g.GameTitle;","SELECT GameTitle, SUM(Revenue) as TotalRevenue FROM GameSales WHERE Revenue = 0 GROUP BY GameTitle;",0 How many agencies are there in the city with the highest budget?,"CREATE TABLE City (id INT, name VARCHAR(255), budget INT); CREATE TABLE Agency (id INT, city_id INT, budget INT); ",SELECT COUNT(*) FROM Agency JOIN City ON Agency.city_id = City.id GROUP BY City.id HAVING MAX(City.budget);,SELECT COUNT(*) FROM Agency INNER JOIN City ON Agency.city_id = City.id WHERE City.budget = (SELECT MAX(budget) FROM City);,0 What is the average budget allocated for accessible technology projects per year?,"CREATE TABLE budgets(id INT, project TEXT, year INT, amount FLOAT); ",SELECT AVG(amount) FROM budgets WHERE project = 'Accessible Tech' GROUP BY year;,"SELECT year, AVG(amount) FROM budgets WHERE project LIKE '%accessible%' GROUP BY year;",0 What is the daily production quantity of the 'MOUNTAIN_OIL' well in the 'OIL_PRODUCTION' table?,"CREATE TABLE OIL_PRODUCTION (WELL_NAME VARCHAR(255), PRODUCTION_DATE DATE, QUANTITY INT);",SELECT QUANTITY FROM OIL_PRODUCTION WHERE WELL_NAME = 'MOUNTAIN_OIL' AND PRODUCTION_DATE = CURDATE();,"SELECT PRODUCTION_DATE, QUANTITY FROM OIL_PRODUCTION WHERE WELL_NAME = 'MOUNTAIN_OIL';",0 What was the score of the game on June 1?,"CREATE TABLE table_name_38 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_38 WHERE date = ""june 1"";","SELECT score FROM table_name_38 WHERE date = ""june 1"";",1 What is the average ocean acidification level per region?,"CREATE TABLE ocean_acidification (region VARCHAR(20), level FLOAT); ","SELECT region, AVG(level) FROM ocean_acidification GROUP BY region;","SELECT region, AVG(level) FROM ocean_acidification GROUP BY region;",1 What is the total number of alternative sentencing programs implemented in Illinois since 2017?,"CREATE TABLE alternative_sentencing_programs (program_id INT, year INT, state VARCHAR(20)); ",SELECT COUNT(*) FROM alternative_sentencing_programs WHERE year >= 2017 AND state = 'Illinois';,SELECT COUNT(*) FROM alternative_sentencing_programs WHERE state = 'Illinois' AND year >= 2017;,0 How many patients were diagnosed with PTSD in 2019 and 2020?,"CREATE TABLE diagnoses (id INT, patient_id INT, diagnosis VARCHAR(30), diagnosis_date DATE); ","SELECT YEAR(diagnosis_date) AS year, COUNT(*) FROM diagnoses WHERE diagnosis = 'PTSD' GROUP BY year;",SELECT COUNT(*) FROM diagnoses WHERE diagnosis = 'PTSD' AND diagnosis_date BETWEEN '2019-01-01' AND '2020-12-31';,0 "What is Agricultural Use (m 3 /p/yr)(in %), when Per Capita Withdrawal (m 3 /p/yr) is greater than 923, and when Domestic Use (m 3 /p/yr)(in %) is 73(7%)?","CREATE TABLE table_name_7 (agricultural_use__m_3__p_yr__in__percentage_ VARCHAR, per_capita_withdrawal__m_3__p_yr_ VARCHAR, domestic_use__m_3__p_yr__in__percentage_ VARCHAR);","SELECT agricultural_use__m_3__p_yr__in__percentage_ FROM table_name_7 WHERE per_capita_withdrawal__m_3__p_yr_ > 923 AND domestic_use__m_3__p_yr__in__percentage_ = ""73(7%)"";","SELECT agricultural_use__m_3__p_yr__in__percentage_ FROM table_name_7 WHERE per_capita_withdrawal__m_3__p_yr_ > 923 AND domestic_use__m_3__p_yr__in__percentage_ = ""73(7%)"";",1 "What is the total number of construction permits issued in Texas in the past 12 months, ranked by the permit value?","CREATE TABLE tx_permits (id INT, permit_id VARCHAR(50), permit_value FLOAT, permit_date DATE, city VARCHAR(50), state VARCHAR(50)); ","SELECT permit_id, permit_value, RANK() OVER (ORDER BY permit_value DESC) as rank FROM tx_permits WHERE state = 'TX' AND permit_date >= DATEADD(YEAR, -1, CURRENT_DATE) GROUP BY permit_id, permit_value ORDER BY permit_value DESC;","SELECT permit_value, COUNT(*) as total_permits FROM tx_permits WHERE permit_date >= DATEADD(month, -12, GETDATE()) GROUP BY permit_value ORDER BY total_permits DESC;",0 What is the total number of patients in 'RuralClinicB' and 'RuralClinicC'?,CREATE TABLE RuralClinicB (patient_id INT); CREATE TABLE RuralClinicC (patient_id INT); ,SELECT COUNT(*) FROM (SELECT * FROM RuralClinicB UNION ALL SELECT * FROM RuralClinicC) AS TotalPatients;,SELECT COUNT(*) FROM RuralClinicB INNER JOIN RuralClinicC ON RuralClinicB.patient_id = RuralClinicC.patient_id;,0 What is the lowest number of silvers for countries in rank 12 with more than 0 bronze?,"CREATE TABLE table_name_73 (silver INTEGER, rank VARCHAR, bronze VARCHAR);","SELECT MIN(silver) FROM table_name_73 WHERE rank = ""12"" AND bronze > 0;",SELECT MIN(silver) FROM table_name_73 WHERE rank = 12 AND bronze > 0;,0 What is the total number of multimodal trips taken in New York City?,"CREATE TABLE multimodal_trips (id INT, trips INT, city VARCHAR(50));",SELECT SUM(trips) FROM multimodal_trips WHERE city = 'New York City';,SELECT SUM(trips) FROM multimodal_trips WHERE city = 'New York City';,1 Name the guest 4 for 8 december,"CREATE TABLE table_20466963_13 (guest_4 VARCHAR, date VARCHAR);","SELECT guest_4 FROM table_20466963_13 WHERE date = ""8 December"";","SELECT guest_4 FROM table_20466963_13 WHERE date = ""8 December"";",1 What is the average number of visits per community event in Sydney?,"CREATE TABLE CommunityEventDetailsSydney (event_id INT, city VARCHAR(50), num_visits INT, num_events INT); ",SELECT AVG(num_visits/num_events) FROM CommunityEventDetailsSydney;,SELECT AVG(num_visits) FROM CommunityEventDetailsSydney WHERE city = 'Sydney';,0 What was the Vanwall time/retired with 49 laps?,"CREATE TABLE table_name_37 (time_retired VARCHAR, laps VARCHAR, constructor VARCHAR);","SELECT time_retired FROM table_name_37 WHERE laps = 49 AND constructor = ""vanwall"";","SELECT time_retired FROM table_name_37 WHERE laps = 49 AND constructor = ""vanwall"";",1 When did Mathieu play against Antonio Veić?,"CREATE TABLE table_name_60 (date VARCHAR, opponent_in_the_final VARCHAR);","SELECT date FROM table_name_60 WHERE opponent_in_the_final = ""antonio veić"";","SELECT date FROM table_name_60 WHERE opponent_in_the_final = ""antonio vei"";",0 What is the name and quantity of all cargo having a quantity greater than 5000 that is located in a port in Singapore?,"CREATE TABLE Cargo (CargoID INT, Name VARCHAR(255), Quantity INT, PortID INT); ","SELECT Cargo.Name, Cargo.Quantity FROM Cargo INNER JOIN Port ON Cargo.PortID = Port.PortID WHERE Port.Country = 'Singapore' AND Cargo.Quantity > 5000;","SELECT Name, Quantity FROM Cargo WHERE Quantity > 5000 AND PortID = 1;",0 Name the IATA with a City of budapest?,"CREATE TABLE table_name_3 (iata VARCHAR, city VARCHAR);","SELECT iata FROM table_name_3 WHERE city = ""budapest"";","SELECT iata FROM table_name_3 WHERE city = ""budapest"";",1 What is the average transportation cost for sustainable textiles imported from Europe?,"CREATE TABLE SustainableTextiles (id INT, textile VARCHAR(50), origin VARCHAR(50), transportation_cost DECIMAL(5,2)); ",SELECT AVG(transportation_cost) FROM SustainableTextiles WHERE origin = 'Europe';,SELECT AVG(transportation_cost) FROM SustainableTextiles WHERE origin = 'Europe';,1 How many stations have fox as the primary affiliation and have been owned since 1986?,"CREATE TABLE table_1353096_1 (station VARCHAR, primary_affiliation VARCHAR, owned_since VARCHAR);","SELECT COUNT(station) FROM table_1353096_1 WHERE primary_affiliation = ""Fox"" AND owned_since = ""1986"";","SELECT COUNT(station) FROM table_1353096_1 WHERE primary_affiliation = ""Fox"" AND owned_since = 1986;",0 What is the average CO2 emission for domestic flights in Brazil between 2019 and 2021?,"CREATE TABLE flights_brazil (id INT, type VARCHAR(50), country VARCHAR(50), co2_emission DECIMAL(5,2), flight_year INT); ",SELECT AVG(co2_emission) FROM flights_brazil WHERE type = 'Domestic' AND country = 'Brazil' AND flight_year BETWEEN 2019 AND 2021;,SELECT AVG(co2_emission) FROM flights_brazil WHERE type = 'Domestic' AND country = 'Brazil' AND flight_year BETWEEN 2019 AND 2021;,1 What is the number of unique games played by players from Europe?,"CREATE TABLE players (player_id INT, player_name TEXT, country TEXT); CREATE TABLE games (game_id INT, game_name TEXT, country TEXT); CREATE TABLE player_games (player_id INT, game_id INT); ","SELECT COUNT(DISTINCT player_games.game_id) FROM player_games JOIN players ON player_games.player_id = players.player_id JOIN games ON player_games.game_id = games.game_id WHERE players.country IN ('Germany', 'France', 'Sweden');",SELECT COUNT(DISTINCT player_games.player_id) FROM player_games INNER JOIN players ON player_games.player_id = players.player_id INNER JOIN games ON player_games.game_id = games.game_id INNER JOIN players ON player_games.player_id = players.player_id INNER JOIN players ON player_games.player_id = players.player_id WHERE players.country = 'Europe';,0 What was the total revenue for subway system in January 2020?,"CREATE TABLE subway_sales (sale_id INT, sale_date DATE, sale_revenue FLOAT, system_name VARCHAR(20));",SELECT SUM(sale_revenue) FROM subway_sales WHERE system_name = 'Subway' AND sale_date BETWEEN '2020-01-01' AND '2020-01-31';,SELECT SUM(sale_revenue) FROM subway_sales WHERE sale_date BETWEEN '2020-01-01' AND '2020-12-31' AND system_name = 'Subway';,0 "How many golds have a bronze less than 1, and a silver less than 1?","CREATE TABLE table_name_82 (gold VARCHAR, bronze VARCHAR, silver VARCHAR);",SELECT COUNT(gold) FROM table_name_82 WHERE bronze < 1 AND silver < 1;,SELECT COUNT(gold) FROM table_name_82 WHERE bronze 1 AND silver 1;,0 "What is the total area of drakenstein and a population less than 251,262?","CREATE TABLE table_name_32 (area__km_2__ VARCHAR, name VARCHAR, population__2011_ VARCHAR);","SELECT COUNT(area__km_2__) FROM table_name_32 WHERE name = ""drakenstein"" AND population__2011_ < 251 OFFSET 262;","SELECT COUNT(area__km_2__) FROM table_name_32 WHERE name = ""drakenstein"" AND population__2011_ 251,262;",0 "What is the maximum revenue generated in a single day for the ""Modern Art"" exhibition?","CREATE TABLE daily_revenue (date DATE, exhibition_id INT, revenue DECIMAL(5,2)); ",SELECT MAX(revenue) FROM daily_revenue WHERE exhibition_id = 9;,SELECT MAX(revenue) FROM daily_revenue WHERE exhibition_id = 1;,0 Which artists have had concerts in both New York and Los Angeles?,"CREATE TABLE concerts (id INT, artist_name VARCHAR(255), city VARCHAR(255), revenue FLOAT); ","SELECT artist_name FROM concerts WHERE city IN ('New York', 'Los Angeles') GROUP BY artist_name HAVING COUNT(DISTINCT city) = 2;","SELECT artist_name FROM concerts WHERE city IN ('New York', 'Los Angeles');",0 what is the score of the match with high points carlos boozer (20),"CREATE TABLE table_17355716_10 (score VARCHAR, high_points VARCHAR);","SELECT score FROM table_17355716_10 WHERE high_points = ""Carlos Boozer (20)"";","SELECT score FROM table_17355716_10 WHERE high_points = ""Carlos Bozer (20)"";",0 Insert new genetics research data for Q2 2022.,"CREATE TABLE genetics_research(id INT, project_name TEXT, budget DECIMAL(10,2), quarter INT, year INT);","INSERT INTO genetics_research (id, project_name, budget, quarter, year) VALUES (1, 'Genome Mapping', 450000, 2, 2022), (2, 'DNA Sequencing', 300000, 2, 2022), (3, 'CRISPR Therapy', 500000, 2, 2022);","INSERT INTO genetics_research (id, project_name, budget, quarter, year) VALUES (1, 'Genetics Research', 'Q2', 2022);",0 Add a new column 'match_date' to the 'esports_matches' table,"CREATE TABLE esports_matches (match_id INT, team_id INT, match_result VARCHAR(10));",ALTER TABLE esports_matches ADD COLUMN match_date DATE;,ALTER TABLE esports_matches ADD match_date VARCHAR(10);,0 What is Michigan State's position?,"CREATE TABLE table_name_59 (position VARCHAR, school_club_team VARCHAR);","SELECT position FROM table_name_59 WHERE school_club_team = ""michigan state"";","SELECT position FROM table_name_59 WHERE school_club_team = ""michigan state"";",1 Which Year has a Qual of 144.683 and Lap larger than 27?,"CREATE TABLE table_name_66 (year VARCHAR, laps VARCHAR, qual VARCHAR);","SELECT year FROM table_name_66 WHERE laps > 27 AND qual = ""144.683"";","SELECT year FROM table_name_66 WHERE laps > 27 AND qual = ""144.683"";",1 What's the race name that the driver Innes Ireland won?,"CREATE TABLE table_name_3 (race_name VARCHAR, winning_driver VARCHAR);","SELECT race_name FROM table_name_3 WHERE winning_driver = ""innes ireland"";","SELECT race_name FROM table_name_3 WHERE winning_driver = ""innes ireland"";",1 Get the types of autonomous vehicles in Mexico City and Sao Paulo with more than 20 trips.,"CREATE TABLE mexico_autonomous_vehicles (vehicle_id INT, type VARCHAR(20), trips INT); CREATE TABLE sao_paulo_autonomous_vehicles (vehicle_id INT, type VARCHAR(20), trips INT); ",SELECT DISTINCT type FROM mexico_autonomous_vehicles WHERE trips > 20 UNION SELECT DISTINCT type FROM sao_paulo_autonomous_vehicles WHERE trips > 20;,SELECT mexico_autonomous_vehicles.type FROM mexico_autonomous_vehicles INNER JOIN sao_paulo_autonomous_vehicles ON mexico_autonomous_vehicles.vehicle_id = sao_paulo_autonomous_vehicles.vehicle_id WHERE mexico_autonomous_vehicles.trips > 20;,0 What season did they play queensland at wicket 4?,"CREATE TABLE table_name_81 (season VARCHAR, opponent VARCHAR, wicket VARCHAR);","SELECT season FROM table_name_81 WHERE opponent = ""queensland"" AND wicket = ""4"";","SELECT season FROM table_name_81 WHERE opponent = ""queensland"" AND wicket = ""4"";",1 What is the number of electorates (2009) for Constituency number 182?,"CREATE TABLE table_name_13 (number_of_electorates__2009_ VARCHAR, constituency_number VARCHAR);","SELECT number_of_electorates__2009_ FROM table_name_13 WHERE constituency_number = ""182"";",SELECT number_of_electorates__2009_ FROM table_name_13 WHERE constituency_number = 182;,0 What is the average number of new species discovered per deep-sea expedition in the last 5 years?,"CREATE TABLE deep_sea_expeditions (expedition_name TEXT, year INT, new_species_discovered INT); ",SELECT AVG(new_species_discovered) FROM deep_sea_expeditions WHERE year >= 2017;,SELECT AVG(new_species_discovered) FROM deep_sea_expeditions WHERE year BETWEEN 2017 AND 2021;,0 Which cities have inclusive housing policies and the highest percentage of green spaces?,"CREATE TABLE City (id INT PRIMARY KEY, name VARCHAR(50), population INT, green_space_percentage DECIMAL(5,2), inclusive_housing BOOLEAN); CREATE VIEW Inclusive_Cities AS SELECT * FROM City WHERE inclusive_housing = true;","SELECT City.name, City.green_space_percentage FROM City INNER JOIN Inclusive_Cities ON City.id = Inclusive_Cities.id WHERE City.green_space_percentage = (SELECT MAX(green_space_percentage) FROM City WHERE inclusive_housing = true);","SELECT City.name, Inclusive_Cities.green_space_percentage FROM City INNER JOIN Inclusive_Cities ON City.id = Inclusive_Cities.id WHERE Inclusive_Cities.inclusive_housing = true AND Inclusive_Cities.green_space_percentage = (SELECT MAX(green_space_percentage) FROM Inclusive_Cities);",0 How many solar power plants are in South Africa?,"CREATE TABLE solar_plants (id INT PRIMARY KEY, country VARCHAR(50), name VARCHAR(50), capacity FLOAT); ",SELECT COUNT(*) FROM solar_plants WHERE country = 'South Africa';,SELECT COUNT(*) FROM solar_plants WHERE country = 'South Africa';,1 Which Brilliance Grade has a Benchmark of practical fine cut?,"CREATE TABLE table_name_69 (brilliance_grade VARCHAR, benchmark VARCHAR);","SELECT brilliance_grade FROM table_name_69 WHERE benchmark = ""practical fine cut"";","SELECT brilliance_grade FROM table_name_69 WHERE benchmark = ""practical fine cut"";",1 How many artworks were contributed by each artist?,"CREATE TABLE art_history (id INT, artist_name VARCHAR(50), art_form VARCHAR(20), contributed_works INT, contributed_years INT); ","SELECT artist_name, contributed_works, ROW_NUMBER() OVER(PARTITION BY artist_name ORDER BY contributed_works DESC) as ranking FROM art_history;","SELECT artist_name, SUM(participated_works) FROM art_history GROUP BY artist_name;",0 What is the average claim amount for policyholders in 'IL' or 'IN'?,"CREATE TABLE Policyholders (PolicyID INT, PolicyholderName TEXT, State TEXT); CREATE TABLE Claims (ClaimID INT, PolicyID INT, ClaimAmount INT); ","SELECT AVG(Claims.ClaimAmount) AS AvgClaimAmount FROM Policyholders INNER JOIN Claims ON Policyholders.PolicyID = Claims.PolicyID WHERE Policyholders.State IN ('IL', 'IN');","SELECT AVG(ClaimAmount) FROM Claims JOIN Policyholders ON Claims.PolicyID = Policyholders.PolicyID WHERE Policyholders.State IN ('IL', 'IN');",0 Insert new records for visitors from Japan and South Korea.,"CREATE TABLE Visitors (id INT, name VARCHAR(100), country VARCHAR(50), visit_date DATE);","INSERT INTO Visitors (id, name, country, visit_date) VALUES (1, 'Haruki Murakami', 'Japan', '2021-11-01'), (2, 'BTS', 'South Korea', '2021-12-01');","INSERT INTO Visitors (id, name, country, visit_date) VALUES ('Japan', 'South Korea');",0 What is the score for the date of December 7?,"CREATE TABLE table_23286112_7 (score VARCHAR, date VARCHAR);","SELECT score FROM table_23286112_7 WHERE date = ""December 7"";","SELECT score FROM table_23286112_7 WHERE date = ""December 7"";",1 How many individuals with visual impairments are enrolled in support programs in Texas?,"CREATE TABLE Individuals (id INT, impairment TEXT, location TEXT); ",SELECT COUNT(*) FROM Individuals WHERE impairment = 'Visual' AND location = 'Texas';,SELECT COUNT(*) FROM Individuals WHERE impairment = 'Visual Impairment' AND location = 'Texas';,0 Find the maximum number of articles published by a source in a day.,"CREATE TABLE articles (id INT, title VARCHAR(100), source VARCHAR(50), date DATE); ","SELECT source, MAX(COUNT(*)) as max_articles FROM articles GROUP BY source;","SELECT source, MAX(COUNT(*)) as max_articles FROM articles GROUP BY source;",1 What is the total number of facilities in City A?,"CREATE TABLE hospitals (id INT, name TEXT, location TEXT, type TEXT); CREATE TABLE clinics (id INT, name TEXT, location TEXT, type TEXT); CREATE TABLE long_term_care (id INT, name TEXT, location TEXT, type TEXT); ",SELECT type FROM hospitals WHERE location = 'City A' UNION SELECT type FROM clinics WHERE location = 'City A' UNION SELECT type FROM long_term_care WHERE location = 'City A';,SELECT COUNT(*) FROM hospitals JOIN long_term_care ON hospitals.id = long_term_care.id WHERE hospitals.location = 'City A';,0 What game was played at Philadelphia?,"CREATE TABLE table_name_36 (game INTEGER, team VARCHAR);","SELECT AVG(game) FROM table_name_36 WHERE team = ""philadelphia"";","SELECT SUM(game) FROM table_name_36 WHERE team = ""philadelphia"";",0 "List the AI safety scores for models deployed in the United States and Canada, along with their model types.","CREATE TABLE ai_models (model_id INT, model_name VARCHAR(255), country VARCHAR(255), safety_score FLOAT, model_type VARCHAR(255)); ","SELECT model_type, country, AVG(safety_score) as avg_safety_score FROM ai_models WHERE country IN ('USA', 'Canada') GROUP BY country, model_type;","SELECT model_type, safety_score FROM ai_models WHERE country IN ('USA', 'Canada') GROUP BY model_type;",0 What is the average Year when Australia was the runner-up at victoria golf club?,"CREATE TABLE table_name_8 (year INTEGER, runners_up VARCHAR, venue VARCHAR);","SELECT AVG(year) FROM table_name_8 WHERE runners_up = ""australia"" AND venue = ""victoria golf club"";","SELECT AVG(year) FROM table_name_8 WHERE runners_up = ""australia"" AND venue = ""victoria golf club"";",1 "Show the total production volume for each mine in the ""mine_production"" and ""mines"" tables","CREATE TABLE mines (id INT, name VARCHAR(20)); CREATE TABLE mine_production (mine_id INT, volume INT); ","SELECT m.name, SUM(mp.volume) as total_volume FROM mines m JOIN mine_production mp ON m.id = mp.mine_id GROUP BY m.name;","SELECT m.name, SUM(m.volume) as total_volume FROM mines m JOIN mine_production m ON m.id = m.mine_id GROUP BY m.name;",0 Get the total energy storage capacity (MWh) in the United Kingdom,"CREATE TABLE energy_storage (id INT, country VARCHAR(50), capacity FLOAT); ",SELECT SUM(capacity) FROM energy_storage WHERE country = 'United Kingdom';,SELECT SUM(capacity) FROM energy_storage WHERE country = 'United Kingdom';,1 Which operator has a Reserve of 100 bbbl?,"CREATE TABLE table_name_96 (operator_s_ VARCHAR, reserves VARCHAR);","SELECT operator_s_ FROM table_name_96 WHERE reserves = ""100 bbbl"";","SELECT operator_s_ FROM table_name_96 WHERE reserves = ""100 bbbl"";",1 what type over school is Clemson?,"CREATE TABLE table_28744929_1 (school_type VARCHAR, institution VARCHAR);","SELECT school_type FROM table_28744929_1 WHERE institution = ""Clemson"";","SELECT school_type FROM table_28744929_1 WHERE institution = ""Clemson"";",1 What district has 98 constituencies?,"CREATE TABLE table_name_54 (district VARCHAR, constituency_number VARCHAR);","SELECT district FROM table_name_54 WHERE constituency_number = ""98"";","SELECT district FROM table_name_54 WHERE constituency_number = ""98"";",1 "List all policy advocacy initiatives that impacted historically underrepresented communities, along with the number of students impacted, and show the top 5 initiatives with the highest number of students impacted?","CREATE TABLE initiatives (initiative_id INT, initiative_name VARCHAR(255), initiative_date DATE, community_type VARCHAR(255)); CREATE TABLE impact (initiative_id INT, student_id INT);","SELECT i.initiative_name, COUNT(DISTINCT imp.student_id) as students_impacted FROM initiatives i JOIN impact imp ON i.initiative_id = imp.initiative_id WHERE i.community_type = 'historically_underrepresented' GROUP BY i.initiative_name ORDER BY students_impacted DESC LIMIT 5;","SELECT i.initiative_name, COUNT(i.initiative_id) as student_count FROM initiatives i JOIN impact i ON i.initiative_id = i.initiative_id WHERE i.community_type = 'Underrepresented' GROUP BY i.initiative_name ORDER BY student_count DESC LIMIT 5;",0 How many incumbents are there in Pennsylvania 5?,"CREATE TABLE table_2668401_12 (incumbent VARCHAR, district VARCHAR);","SELECT COUNT(incumbent) FROM table_2668401_12 WHERE district = ""Pennsylvania 5"";","SELECT COUNT(incumbent) FROM table_2668401_12 WHERE district = ""Pennsylvania 5"";",1 What are the total sales and profits for ethical material types?,"CREATE TABLE materials (id INT, type VARCHAR(255), sales FLOAT, profits FLOAT); ","SELECT type, SUM(sales) as total_sales, SUM(profits) as total_profits FROM materials GROUP BY type;","SELECT type, SUM(sales) as total_sales, SUM(profits) as total_profits FROM materials GROUP BY type;",1 Who is the oldest female artist in the 'artists' table?,"CREATE TABLE artists (artist_id INT, name VARCHAR(50), age INT, gender VARCHAR(10));",SELECT name FROM artists WHERE gender = 'female' ORDER BY age DESC LIMIT 1;,"SELECT name, age FROM artists WHERE gender = 'Female' ORDER BY age DESC LIMIT 1;",0 What is the total number of peer-reviewed publications by graduate students in the Chemistry department?,"CREATE TABLE GraduateStudents(StudentID INT, Department VARCHAR(255)); CREATE TABLE Publications(PublicationID INT, StudentID INT, PublicationType VARCHAR(255)); ",SELECT COUNT(Publications.PublicationID) FROM GraduateStudents INNER JOIN Publications ON GraduateStudents.StudentID = Publications.StudentID WHERE GraduateStudents.Department = 'Chemistry' AND Publications.PublicationType = 'Peer-Reviewed';,SELECT COUNT(*) FROM Publications JOIN GraduateStudents ON Publications.StudentID = GraduateStudents.StudentID WHERE GraduateStudents.Department = 'Chemistry' AND Publications.PublicationType = 'Peer-Reviewed';,0 What is the average weight of packages delivered per day?,"CREATE TABLE Deliveries (id INT, delivered DATE, quantity INT, weight FLOAT); ",SELECT AVG(weight/quantity) FROM Deliveries,SELECT AVG(weight) FROM Deliveries;,0 On what Date is the Circuit at Sandown Raceway?,"CREATE TABLE table_name_37 (date VARCHAR, circuit VARCHAR);","SELECT date FROM table_name_37 WHERE circuit = ""sandown raceway"";","SELECT date FROM table_name_37 WHERE circuit = ""sandown raceway"";",1 Insert a new record into the 'biosensors' table for a glucose biosensor with a sensitivity of 0.001 mV/decade,"CREATE TABLE biosensors (biosensor_id INT PRIMARY KEY, biosensor_name VARCHAR(50), biosensor_sensitivity DECIMAL(5,3));","INSERT INTO biosensors (biosensor_name, biosensor_sensitivity) VALUES ('Glucose Biosensor', 0.001);","INSERT INTO biosensors (biosensor_id, biosensor_name, biosensor_sensitivity) VALUES (1, 'Glucose Biosensor', '0.001 mV/decade');",0 "What is the number of electorates (2009) for the Indore district, when reserved for (SC / ST /None) is none, and constituency number is 208?","CREATE TABLE table_name_21 (number_of_electorates__2009_ INTEGER, constituency_number VARCHAR, district VARCHAR, reserved_for___sc___st__none_ VARCHAR);","SELECT SUM(number_of_electorates__2009_) FROM table_name_21 WHERE district = ""indore"" AND reserved_for___sc___st__none_ = ""none"" AND constituency_number = ""208"";","SELECT SUM(number_of_electorates__2009_) FROM table_name_21 WHERE district = ""indore"" AND reserved_for___sc___st__none_ = ""none"" AND constituency_number = ""208"";",1 Who was Carlton's away team opponents?,"CREATE TABLE table_name_16 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team FROM table_name_16 WHERE home_team = ""carlton"";","SELECT away_team FROM table_name_16 WHERE home_team = ""carlton"";",1 What is the type for the Panionios moving to?,"CREATE TABLE table_name_91 (type VARCHAR, moving_to VARCHAR);","SELECT type FROM table_name_91 WHERE moving_to = ""panionios"";","SELECT type FROM table_name_91 WHERE moving_to = ""panionios"";",1 Show total earnings of each eSports team in the last 6 months,"CREATE TABLE esports_matches (team1 TEXT, team2 TEXT, prize_money INT, match_date DATETIME);","SELECT team1 AS team, SUM(prize_money) AS earnings FROM esports_matches WHERE match_date > NOW() - INTERVAL 6 MONTH GROUP BY team1 UNION ALL SELECT team2, SUM(prize_money) FROM esports_matches WHERE match_date > NOW() - INTERVAL 6 MONTH GROUP BY team2;","SELECT team1, SUM(prize_money) FROM esports_matches WHERE match_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) GROUP BY team1;",0 List the names of all startups that have exited through an IPO,"CREATE TABLE exit_strategies (company_name VARCHAR(100), exit_type VARCHAR(50), exit_year INT);",SELECT company_name FROM exit_strategies WHERE exit_type = 'IPO';,SELECT company_name FROM exit_strategies WHERE exit_type = 'IPO';,1 "What is the average co-ownership cost per square foot in the 'urban_sustainability' table, ordered by cost?","CREATE TABLE urban_sustainability (id INT, city VARCHAR(255), co_ownership_cost DECIMAL(10, 2), size INT); ",SELECT AVG(co_ownership_cost / size) OVER (ORDER BY co_ownership_cost) AS avg_cost_per_sqft FROM urban_sustainability;,SELECT AVG(co_ownership_cost) FROM urban_sustainability ORDER BY co_ownership_cost DESC;,0 What is the average hourly labor rate for contractors in California?,"CREATE TABLE Contractors (ContractorID INT, ContractorName VARCHAR(50), City VARCHAR(50), State VARCHAR(2), Country VARCHAR(50)); CREATE TABLE LaborStatistics (StatisticID INT, ContractorID INT, EmployeeCount INT, HourlyRate FLOAT, Date DATE); ",SELECT ContractorID FROM Contractors WHERE State = 'CA'; SELECT AVG(HourlyRate) FROM LaborStatistics WHERE ContractorID IN (SELECT ContractorID FROM Contractors WHERE State = 'CA');,SELECT AVG(LocalStatistics.HourlyRate) FROM Contractors INNER JOIN LaborStatistics ON Contractors.ContractorID = LaborStatistics.ContractorID WHERE Contractors.State = 'California';,0 What type is σαεπ?,"CREATE TABLE table_2538117_5 (type VARCHAR, letters VARCHAR);","SELECT type FROM table_2538117_5 WHERE letters = ""ΣΑΕΠ"";","SELECT type FROM table_2538117_5 WHERE letters = """";",0 Which Authority is set for Hauturu School?,"CREATE TABLE table_name_23 (authority VARCHAR, name VARCHAR);","SELECT authority FROM table_name_23 WHERE name = ""hauturu school"";","SELECT authority FROM table_name_23 WHERE name = ""hauturu school"";",1 "What is the total volume of timber harvested in 2020, grouped by species?","CREATE TABLE forests (id INT, species VARCHAR(255), year INT, volume FLOAT); ","SELECT species, SUM(volume) as total_volume FROM forests WHERE year = 2020 GROUP BY species;","SELECT species, SUM(volume) FROM forests WHERE year = 2020 GROUP BY species;",0 Who was the home team when the record was 36–21–8?,"CREATE TABLE table_name_23 (home VARCHAR, record VARCHAR);","SELECT home FROM table_name_23 WHERE record = ""36–21–8"";","SELECT home FROM table_name_23 WHERE record = ""36–21–8"";",1 What was the torque@rpm of the sl 65 amg?,"CREATE TABLE table_name_75 (torque VARCHAR, model VARCHAR);","SELECT torque AS @rpm FROM table_name_75 WHERE model = ""sl 65 amg"";","SELECT torque FROM table_name_75 WHERE model = ""sl 65 amg"";",0 Insert new records for climate adaptation projects in Southeast Asia into the climate_projects table.,"CREATE TABLE climate_projects (id INT, project_name VARCHAR(20), project_location VARCHAR(20), project_type VARCHAR(20));","INSERT INTO climate_projects (id, project_name, project_location, project_type) VALUES (4, 'Adaptation Project 2', 'Southeast Asia', 'Climate Adaptation'), (5, 'Adaptation Project 3', 'Southeast Asia', 'Climate Adaptation');","INSERT INTO climate_projects (id, project_name, project_location, project_type) VALUES (1, 'Climate Adaptation', 'Southeast Asia', 'Adaptation');",0 What is the total amount of pesticides used for corn fields in the US?,"CREATE TABLE Fields (id INT, country VARCHAR(255), crop_type VARCHAR(255)); CREATE TABLE Pesticide_Use (field_id INT, pesticide_amount INT); ",SELECT SUM(pu.pesticide_amount) FROM Pesticide_Use pu INNER JOIN Fields f ON pu.field_id = f.id WHERE f.crop_type = 'Corn' AND f.country = 'US';,SELECT SUM(p.pesticide_amount) FROM Pesticide_Use p JOIN Fields f ON p.field_id = f.id WHERE f.country = 'USA' AND f.crop_type = 'corn';,0 What is the total number of hours spent in community service by offenders in each state?,"CREATE TABLE CommunityService (CSID INT, State VARCHAR(10), Hours INT); ","SELECT State, SUM(Hours) FROM CommunityService GROUP BY State;","SELECT State, SUM(Hours) FROM CommunityService GROUP BY State;",1 WHAT IS NO TIE FROM brighton & hove albion?,"CREATE TABLE table_name_52 (tie_no VARCHAR, home_team VARCHAR);","SELECT tie_no FROM table_name_52 WHERE home_team = ""brighton & hove albion"";","SELECT tie_no FROM table_name_52 WHERE home_team = ""brighton & hove albion"";",1 What is the second-deepest marine trench?,"CREATE TABLE marine_trenches (name TEXT, depth FLOAT); ","SELECT name, depth FROM (SELECT name, depth, ROW_NUMBER() OVER (ORDER BY depth DESC) AS rn FROM marine_trenches) AS sub WHERE rn = 2;",SELECT name FROM marine_trenches ORDER BY depth DESC LIMIT 2;,0 What is the minimum delivery time for shipments to India?,"CREATE TABLE Shipments (id INT, delivery_time INT, destination VARCHAR(20)); ",SELECT MIN(delivery_time) FROM Shipments WHERE destination = 'India',SELECT MIN(delivery_time) FROM Shipments WHERE destination = 'India';,0 What is the tyres with a year earlier than 1961 for a climax l4 engine?,"CREATE TABLE table_name_33 (tyres VARCHAR, year VARCHAR, engine VARCHAR);","SELECT tyres FROM table_name_33 WHERE year < 1961 AND engine = ""climax l4"";","SELECT tyres FROM table_name_33 WHERE year 1961 AND engine = ""climax l4"";",0 What is the result for barney frank?,"CREATE TABLE table_1341598_22 (result VARCHAR, incumbent VARCHAR);","SELECT result FROM table_1341598_22 WHERE incumbent = ""Barney Frank"";","SELECT result FROM table_1341598_22 WHERE incumbent = ""Barney Frank"";",1 List the official names of cities that have not held any competition.,"CREATE TABLE farm_competition (Official_Name VARCHAR, City_ID VARCHAR, Host_city_ID VARCHAR); CREATE TABLE city (Official_Name VARCHAR, City_ID VARCHAR, Host_city_ID VARCHAR);",SELECT Official_Name FROM city WHERE NOT City_ID IN (SELECT Host_city_ID FROM farm_competition);,SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.City_ID JOIN city AS T3 ON T2.Host_city_ID = T3.Host_city_ID WHERE T3.Official_Name IS NULL;,0 List the total number of IoT devices deployed in each field in the 'PrecisionFarm' farm as of the end of 2021.,"CREATE TABLE IoTData (id INT, field VARCHAR(255), device_type VARCHAR(255), deployment_date DATE);","SELECT field, COUNT(DISTINCT device_type) FROM IoTData WHERE field IN ('PrecisionFarm1', 'PrecisionFarm2', 'PrecisionFarm3') AND YEAR(deployment_date) = 2021 AND MONTH(deployment_date) = 12 GROUP BY field;","SELECT field, COUNT(DISTINCT device_type) as total_devices FROM IoTData WHERE field = 'PrecisionFarm' AND deployment_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY field;",0 Show all game names played by at least 1000 hours.,CREATE TABLE Plays_games (gameid VARCHAR); CREATE TABLE Video_games (gameid VARCHAR);,SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid HAVING SUM(hours_played) >= 1000;,SELECT T1.gameid FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid HAVING COUNT(*) >= 1000;,0 How many reg GP for rick vaive in round 1?,"CREATE TABLE table_name_40 (reg_gp INTEGER, player VARCHAR, rd__number VARCHAR);","SELECT SUM(reg_gp) FROM table_name_40 WHERE player = ""rick vaive"" AND rd__number > 1;","SELECT SUM(reg_gp) FROM table_name_40 WHERE player = ""rick vaive"" AND rd__number = ""round 1"";",0 Name the venue for eng by 6 wkts,"CREATE TABLE table_name_46 (venue VARCHAR, result VARCHAR);","SELECT venue FROM table_name_46 WHERE result = ""eng by 6 wkts"";","SELECT venue FROM table_name_46 WHERE result = ""eng by 6 wkts"";",1 What is the total number of news articles published by women in a given year?,"CREATE TABLE news_articles (id INT, author VARCHAR, publish_date DATE, article_type VARCHAR); ","SELECT SUM(article_type = 'News') as total_news_articles FROM news_articles WHERE EXTRACT(YEAR FROM publish_date) = 2021 AND author IN ('Emily Lee', 'Sophia Kim', 'Nia Jackson');","SELECT COUNT(*) FROM news_articles WHERE author = 'Female' AND publish_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE;",0 What is the difference in delivery time between the earliest and latest deliveries for each supplier in the 'deliveries' table?,"CREATE TABLE deliveries (supplier VARCHAR(255), delivery_time INT, delivery_date DATE); ","SELECT supplier, MAX(delivery_time) - MIN(delivery_time) as delivery_time_difference FROM deliveries GROUP BY supplier;","SELECT supplier, MIN(delivery_time) - MAX(delivery_time) as delivery_time_difference FROM deliveries GROUP BY supplier;",0 What is the score of the game where the NY Islanders are the home team?,"CREATE TABLE table_name_10 (score VARCHAR, home VARCHAR);","SELECT score FROM table_name_10 WHERE home = ""ny islanders"";","SELECT score FROM table_name_10 WHERE home = ""ny islanders"";",1 What is the average size of habitats for endangered animal species?,"CREATE TABLE animals (id INT PRIMARY KEY, name VARCHAR(50), species VARCHAR(50), population INT, status VARCHAR(50)); CREATE TABLE habitats (id INT PRIMARY KEY, name VARCHAR(50), location VARCHAR(50), size FLOAT, animal_id INT);","SELECT animals.status, AVG(habitats.size) AS avg_size FROM animals INNER JOIN habitats ON animals.id = habitats.animal_id WHERE animals.status = 'Endangered' GROUP BY animals.status;",SELECT AVG(h.size) FROM habitats h JOIN animals a ON h.animal_id = a.id WHERE a.status = 'Endangered';,0 What is the total revenue generated by mobile games in 2022?,"CREATE TABLE game_sales (id INT, year INT, platform VARCHAR(20), revenue INT); ",SELECT SUM(revenue) FROM game_sales WHERE year = 2022 AND platform = 'mobile';,SELECT SUM(revenue) FROM game_sales WHERE year = 2022 AND platform = 'Mobile';,0 "What is the Name of the player with less than 342 Block, less than 87 Weight and Height more than 187?","CREATE TABLE table_name_50 (name VARCHAR, height VARCHAR, block VARCHAR, weight VARCHAR);",SELECT name FROM table_name_50 WHERE block < 342 AND weight < 87 AND height > 187;,SELECT name FROM table_name_50 WHERE block 342 AND weight 87 AND height > 187;,0 What is the total number of electric vehicles in 'vehicle_ownership' table for each city?,"CREATE TABLE vehicle_ownership (id INT, city VARCHAR(25), vehicle_type VARCHAR(20), ownership INT);","SELECT city, SUM(ownership) FROM vehicle_ownership WHERE vehicle_type = 'Electric Vehicle' GROUP BY city;","SELECT city, COUNT(*) FROM vehicle_ownership WHERE vehicle_type = 'Electric' GROUP BY city;",0 What is the average price of linen textiles sourced from France and Belgium?,"CREATE TABLE TextileSourcing (country VARCHAR(20), material VARCHAR(20), price DECIMAL(5,2)); ","SELECT AVG(price) FROM TextileSourcing WHERE country IN ('France', 'Belgium') AND material = 'Linen';","SELECT AVG(price) FROM TextileSourcing WHERE country IN ('France', 'Belgium');",0 Name the original air date for 3.04 production code,"CREATE TABLE table_2226817_4 (original_air_date VARCHAR, production_code VARCHAR);","SELECT original_air_date FROM table_2226817_4 WHERE production_code = ""3.04"";","SELECT original_air_date FROM table_2226817_4 WHERE production_code = ""3.04"";",1 What is the built data for number 34?,"CREATE TABLE table_12113888_1 (built VARCHAR, number VARCHAR);",SELECT built FROM table_12113888_1 WHERE number = 34;,SELECT built FROM table_12113888_1 WHERE number = 34;,1 What is the completion/attempts value for the year with an average per game of 36.5?,"CREATE TABLE table_name_10 (comp_att VARCHAR, avg_g VARCHAR);","SELECT comp_att FROM table_name_10 WHERE avg_g = ""36.5"";","SELECT comp_att FROM table_name_10 WHERE avg_g = ""36.5"";",1 What is the maximum amount of a research grant awarded to male faculty members in the Physics department?,"CREATE TABLE faculty (id INT, name VARCHAR(50), department VARCHAR(50), gender VARCHAR(10)); CREATE TABLE research_grants (id INT, faculty_id INT, amount DECIMAL(10,2), year INT); ",SELECT MAX(rg.amount) FROM research_grants rg JOIN faculty f ON rg.faculty_id = f.id WHERE f.department = 'Physics' AND f.gender = 'Male';,SELECT MAX(rg.amount) FROM research_grants rg JOIN faculty f ON rg.faculty_id = f.id WHERE f.department = 'Physics' AND f.gender = 'Male';,1 What is the total number of public transportation riders by city in the state of New York?,"CREATE TABLE transportation (id INT, city VARCHAR(50), state VARCHAR(50), riders INT); ","SELECT state, city, SUM(riders) as total_riders FROM transportation GROUP BY state, city;","SELECT city, SUM(riders) FROM transportation WHERE state = 'New York' GROUP BY city;",0 Which artifacts were found in the 'CeramicMound' site and have more than 500 pieces?,"CREATE TABLE Artifacts (id INT, excavation_site VARCHAR(20), artifact_name VARCHAR(30), pieces INT); ","SELECT artifact_name, pieces FROM Artifacts WHERE excavation_site = 'CeramicMound' AND pieces > 500;",SELECT artifact_name FROM Artifacts WHERE excavation_site = 'CeramicMound' AND pieces > 500;,0 What is the total quantity of 'Local Eggs' sold this month?,"CREATE TABLE produce (id INT, name VARCHAR(255), qty_sold INT); CREATE TABLE date (id INT, date DATE); ","SELECT SUM(qty_sold) AS total_qty_sold FROM produce WHERE name = 'Local Eggs' AND date IN (SELECT date FROM date WHERE date BETWEEN DATE_SUB(NOW(), INTERVAL 1 MONTH) AND NOW());","SELECT SUM(qty_sold) FROM produce JOIN date ON produce.id = date.id WHERE name = 'Local Eggs' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);",0 How many cultural heritage sites are there in Germany with more than 50 reviews?,"CREATE TABLE heritage_sites(id INT, name TEXT, country TEXT, num_reviews INT); ",SELECT COUNT(*) FROM heritage_sites WHERE country = 'Germany' AND num_reviews > 50;,SELECT COUNT(*) FROM heritage_sites WHERE country = 'Germany' AND num_reviews > 50;,1 Which cybersecurity strategies are located in the 'Europe' region from the 'Cyber_Strategies' table?,"CREATE TABLE Cyber_Strategies (id INT, name VARCHAR(50), location VARCHAR(20), type VARCHAR(20), budget INT); ",SELECT * FROM Cyber_Strategies WHERE location = 'Europe';,SELECT name FROM Cyber_Strategies WHERE location = 'Europe';,0 "What are the average delays in days for each space mission, calculated as the difference between the actual and planned launch date?","CREATE TABLE SpaceMissions (MissionID INT, MissionName VARCHAR(50), PlannedLaunchDate DATE, ActualLaunchDate DATE, Duration INT); ","SELECT MissionName, AVG(DATEDIFF(day, PlannedLaunchDate, ActualLaunchDate)) AS AverageDelay FROM SpaceMissions GROUP BY MissionName;","SELECT MissionName, AVG(Duration) - ActualLaunchDate FROM SpaceMissions GROUP BY MissionName;",0 "Give me a list of id and status of orders which belong to the customer named ""Jeramie"".","CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE orders (order_id VARCHAR, order_status VARCHAR, customer_id VARCHAR);","SELECT T2.order_id, T2.order_status FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = ""Jeramie"";","SELECT T1.customer_id, T1.order_status FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_name = ""Jeramie"";",0 How many times has the price of Dysprosium increased by more than 10% in the last 5 years?,"CREATE TABLE prices (element VARCHAR(10), date DATE, price DECIMAL(5,2)); ","SELECT COUNT(*) FROM (SELECT element, date, price, LAG(price) OVER (PARTITION BY element ORDER BY date) as previous_price FROM prices) t WHERE element = 'Dysprosium' AND price > 1.10 * previous_price;","SELECT COUNT(*) FROM prices WHERE element = 'Dysprosium' AND date >= DATEADD(year, -5, GETDATE());",0 What is the average project duration for residential permits?,"CREATE TABLE ProjectTimeline (permit_id INT, project_type VARCHAR(255), duration INT); ",SELECT AVG(duration) FROM ProjectTimeline WHERE project_type = 'residential';,SELECT AVG(duration) FROM ProjectTimeline WHERE project_type = 'Residential';,0 When marcus camby (15) has the highest amount of rebounds what is the date?,"CREATE TABLE table_23286158_10 (date VARCHAR, high_rebounds VARCHAR);","SELECT date FROM table_23286158_10 WHERE high_rebounds = ""Marcus Camby (15)"";","SELECT date FROM table_23286158_10 WHERE high_rebounds = ""Marcus Camby (15)"";",1 "Find the number of unique agricultural innovation projects implemented in each location, sorted by the number of projects in descending order.","CREATE TABLE agricultural_innovation (id INT, project_name VARCHAR(50), project_type VARCHAR(50), location VARCHAR(50), cost DECIMAL(10,2)); ","SELECT location, COUNT(DISTINCT project_name) AS projects_count FROM agricultural_innovation GROUP BY location ORDER BY projects_count DESC;","SELECT location, COUNT(DISTINCT project_name) as unique_projects FROM agricultural_innovation GROUP BY location ORDER BY unique_projects DESC;",0 "What is the average budget, in dollars, of economic diversification efforts in South Africa that were completed in 2017?","CREATE TABLE economic_diversification_efforts (id INT, name TEXT, completion_date DATE, budget FLOAT, country TEXT); ",SELECT AVG(budget) FROM economic_diversification_efforts WHERE YEAR(completion_date) = 2017 AND country = 'South Africa';,SELECT AVG(budget) FROM economic_diversification_efforts WHERE country = 'South Africa' AND completion_date BETWEEN '2017-01-01' AND '2017-12-31';,0 "Which rec has Yards of 192, and a Touchdown smaller than 1?","CREATE TABLE table_name_52 (rec INTEGER, yards VARCHAR, s_touchdown VARCHAR);",SELECT AVG(rec) FROM table_name_52 WHERE yards = 192 AND s_touchdown < 1;,SELECT SUM(rec) FROM table_name_52 WHERE yards = 192 AND s_touchdown 1;,0 What is the total number of police officers and firefighters in the city of Philadelphia?,"CREATE TABLE philadelphia_police_officers (id INT, officer_name VARCHAR(255), officer_type VARCHAR(255)); CREATE TABLE philadelphia_firefighters (id INT, firefighter_name VARCHAR(255), firefighter_type VARCHAR(255)); ",SELECT COUNT(*) FROM philadelphia_police_officers UNION ALL SELECT COUNT(*) FROM philadelphia_firefighters;,SELECT COUNT(*) FROM philadelphia_police_officers INNER JOIN philadelphia_firefighters ON philadelphia_police_officers.officer_type = philadelphia_firefighters.firefighter_type;,0 Update company location,"CREATE TABLE company (id INT, name VARCHAR(50), location VARCHAR(50), founding_year INT, founder_gender VARCHAR(10)); ",UPDATE company SET location = 'Mexico' WHERE id = 1;,UPDATE company SET location = 'New York' WHERE id = 1;,0 What's the subject of 20 questions in those issues where Jillian Grace is the centerfold model?,CREATE TABLE table_1566852_6 (centerfold_model VARCHAR);,"SELECT 20 AS _questions FROM table_1566852_6 WHERE centerfold_model = ""Jillian Grace"";","SELECT 20 AS _questions FROM table_1566852_6 WHERE centerfold_model = ""Jillian Grace"";",1 "Add a new mental health campaign in 'campaigns_2022' with id=5, name='Hope Rises', budget=10000, and region='Northeast'.","CREATE TABLE campaigns_2022 (campaign_id INT, name VARCHAR(50), budget INT, region VARCHAR(50));","INSERT INTO campaigns_2022 (campaign_id, name, budget, region) VALUES (5, 'Hope Rises', 10000, 'Northeast');","INSERT INTO campaigns_2022 (campaign_id, name, budget, region) VALUES (5, 'Hope Rises', 10000, 'Northeast');",1 What is the difference in energy efficiency improvement (in percentage) between the residential and commercial sectors in the US?,"CREATE TABLE us_energy_efficiency (id INT, sector VARCHAR(50), improvement FLOAT); ","SELECT a.sector, b.improvement FROM us_energy_efficiency a, us_energy_efficiency b WHERE a.sector = 'Residential' AND b.sector = 'Commercial';",SELECT (SUM(CASE WHEN sector = 'Residential' THEN improvement ELSE 0 END) - SUM(CASE WHEN sector = 'Commercial' THEN improvement ELSE 0 END)) - SUM(CASE WHEN sector = 'Residential' THEN improvement ELSE 0 END) FROM us_energy_efficiency;,0 What is the average number of hours volunteered by all volunteers?,"CREATE TABLE volunteers (id INT, name TEXT, program TEXT, hours INT); ",SELECT AVG(hours) FROM volunteers;,SELECT AVG(hours) FROM volunteers;,1 What's the German Pluperfect when the Macedonian is беше слушнал/-а/-о?,"CREATE TABLE table_name_85 (german VARCHAR, macedonian VARCHAR);","SELECT german FROM table_name_85 WHERE macedonian = ""беше слушнал/-а/-о"";","SELECT german FROM table_name_85 WHERE macedonian = ""ее слунал/-а/-о"";",0 "Which Weight (kg) has a Manufacturer of fujitsu, and a Model of lifebook p1610?","CREATE TABLE table_name_67 (weight__kg_ INTEGER, manufacturer VARCHAR, model VARCHAR);","SELECT AVG(weight__kg_) FROM table_name_67 WHERE manufacturer = ""fujitsu"" AND model = ""lifebook p1610"";","SELECT SUM(weight__kg_) FROM table_name_67 WHERE manufacturer = ""fujitsu"" AND model = ""lifebook p1610"";",0 "What is the location of the club named ""Tennis Club""?","CREATE TABLE club (clublocation VARCHAR, clubname VARCHAR);","SELECT clublocation FROM club WHERE clubname = ""Tennis Club"";","SELECT clublocation FROM club WHERE clubname = ""Tennis Club"";",1 Identify the most recent vulnerabilities for each software product.,"CREATE TABLE software (id INT, name VARCHAR(255)); CREATE TABLE vulnerabilities (id INT, software_id INT, discovered_on DATE, severity VARCHAR(255)); ","SELECT software.name, vulnerabilities.id, vulnerabilities.severity, vulnerabilities.discovered_on FROM software LEFT JOIN (SELECT *, ROW_NUMBER() OVER (PARTITION BY software_id ORDER BY discovered_on DESC) rn FROM vulnerabilities) vulnerabilities ON software.id = vulnerabilities.software_id WHERE vulnerabilities.rn = 1;","SELECT software.name, MAX(vulnerabilities.discovered_on) FROM software INNER JOIN vulnerabilities ON software.id = vulnerabilities.software_id GROUP BY software.name;",0 What is the local economic impact of tourism in Barcelona in 2021?,"CREATE TABLE local_economy (city VARCHAR(255), year INT, revenue FLOAT); ",SELECT revenue FROM local_economy WHERE city = 'Barcelona' AND year = 2021;,SELECT revenue FROM local_economy WHERE city = 'Barcelona' AND year = 2021;,1 How many patients have been treated using medication in the Southern region?,"CREATE TABLE treatment_summary (patient_id INT, region TEXT, treatment_type TEXT); ",SELECT COUNT(*) FROM treatment_summary WHERE region = 'Southern' AND treatment_type = 'Medication';,SELECT COUNT(*) FROM treatment_summary WHERE region = 'Southern' AND treatment_type = 'Medication';,1 Identify the common livestock raised in India and Argentina.,"CREATE TABLE livestock (country VARCHAR(20), animal VARCHAR(20)); ",SELECT animal FROM livestock WHERE country = 'India' INTERSECT SELECT animal FROM livestock WHERE country = 'Argentina',"SELECT country, animal FROM livestock WHERE country IN ('India', 'Argentina') GROUP BY country;",0 Add a new record to the 'menu_engineering' table for 'Appetizers' with a 'contribution_margin' of 0.35,"CREATE TABLE menu_engineering (category TEXT, contribution_margin DECIMAL(3,2));","INSERT INTO menu_engineering (category, contribution_margin) VALUES ('Appetizers', 0.35);","INSERT INTO menu_engineering (category, contribution_margin) VALUES ('Appetizers', 0.35);",1 What is the maximum number of packages delivered per day?,"CREATE TABLE Deliveries (id INT, delivered DATE, quantity INT); ",SELECT MAX(quantity) FROM Deliveries,"SELECT delivered, MAX(quantity) FROM Deliveries GROUP BY delivered;",0 What episode in the season was directed by Jeff Melman?,"CREATE TABLE table_11058032_1 (no_in_season INTEGER, directed_by VARCHAR);","SELECT MIN(no_in_season) FROM table_11058032_1 WHERE directed_by = ""Jeff Melman"";","SELECT MAX(no_in_season) FROM table_11058032_1 WHERE directed_by = ""Jeff Melman"";",0 What is the nationality of the player who went to college at Mississippi?,"CREATE TABLE table_name_74 (nationality VARCHAR, college_country_team VARCHAR);","SELECT nationality FROM table_name_74 WHERE college_country_team = ""mississippi"";","SELECT nationality FROM table_name_74 WHERE college_country_team = ""mississippi"";",1 "Name the title for total viewers on fx+ being 483,000","CREATE TABLE table_26493520_3 (title VARCHAR, total_viewers_on_fx VARCHAR);","SELECT title FROM table_26493520_3 WHERE total_viewers_on_fx = ""483,000"";","SELECT title FROM table_26493520_3 WHERE total_viewers_on_fx = ""483,000"";",1 Which drugs were approved by both the FDA and EMA in 2020?,"CREATE TABLE drug_agency_approval(drug_id INT, fda_approval_date DATE, ema_approval_date DATE); ",SELECT drug_id FROM drug_agency_approval WHERE YEAR(fda_approval_date) = 2020 AND YEAR(ema_approval_date) = 2020;,SELECT drug_id FROM drug_agency_approval WHERE fda_approval_date >= '2020-01-01' AND ema_approval_date '2020-12-31';,0 What is the total amount donated by each donor to each organization in 2020?,"CREATE TABLE Donors (DonorID INT, DonorName TEXT, DonationAmount INT, DonationYear INT); CREATE TABLE Organizations (OrganizationID INT, OrganizationName TEXT); CREATE TABLE Donations (DonorID INT, OrganizationID INT, DonationAmount INT, DonationYear INT); ","SELECT DonorName, OrganizationName, SUM(DonationAmount) as TotalDonation FROM Donors INNER JOIN Donations ON Donors.DonorID = Donations.DonorID INNER JOIN Organizations ON Donations.OrganizationID = Organizations.OrganizationID WHERE DonationYear = 2020 GROUP BY DonorName, OrganizationName;","SELECT o.OrganizationName, SUM(d.DonationAmount) as TotalDonated FROM Donors d JOIN Organizations o ON d.DonorID = o.OrganizationID JOIN Donations d ON d.DonorID = d.DonorID WHERE d.DonationYear = 2020 GROUP BY o.OrganizationName;",0 How many opponents were there when the record was 6-0?,"CREATE TABLE table_21197135_1 (date VARCHAR, record VARCHAR);","SELECT date FROM table_21197135_1 WHERE record = ""6-0"";","SELECT COUNT(date) FROM table_21197135_1 WHERE record = ""6-0"";",0 "What is Player, when Score is ""68-67-75-70=280""?","CREATE TABLE table_name_71 (player VARCHAR, score VARCHAR);",SELECT player FROM table_name_71 WHERE score = 68 - 67 - 75 - 70 = 280;,SELECT player FROM table_name_71 WHERE score = 68 - 67 - 75 - 70 = 280;,1 Who had a swimsuit score of 9.87?,"CREATE TABLE table_11690135_1 (country VARCHAR, swimsuit VARCHAR);","SELECT COUNT(country) FROM table_11690135_1 WHERE swimsuit = ""9.87"";","SELECT country FROM table_11690135_1 WHERE swimsuit = ""9.87"";",0 How many graduate students published papers in the Mathematics department each year?,"CREATE TABLE graduate_students (id INT, name VARCHAR(50), department VARCHAR(50), year INT); CREATE TABLE academic_publications (id INT, student_id INT, title VARCHAR(100), year INT); ","SELECT academic_publications.year, COUNT(DISTINCT academic_publications.student_id) FROM academic_publications JOIN graduate_students ON academic_publications.student_id = graduate_students.id WHERE graduate_students.department = 'Mathematics' GROUP BY academic_publications.year;","SELECT gs.year, COUNT(ap.student_id) FROM graduate_students gs JOIN academic_publications ap ON gs.id = ap.student_id WHERE gs.department = 'Mathematics' GROUP BY gs.year;",0 Which day of the week has the most signups?,"CREATE TABLE signups (id INT, signup_date DATE); ","SELECT DATE_FORMAT(signup_date, '%W') AS day_of_week, COUNT(*) AS signups_per_day FROM signups GROUP BY day_of_week ORDER BY signups_per_day DESC LIMIT 1;","SELECT DATE_FORMAT(signup_date, '%Y-%m') AS day_of_week, COUNT(*) AS signup_count FROM signups GROUP BY day_of_week ORDER BY signup_count DESC;",0 How many pallets were shipped from the EMEA region to the Americas via the ocean freight route in Q2 2022?,"CREATE TABLE Shipments (id INT, customer VARCHAR(255), region_origin VARCHAR(255), region_destination VARCHAR(255), route_type VARCHAR(255), quantity INT, quarter INT, year INT);",SELECT SUM(quantity) FROM Shipments WHERE (region_origin = 'EMEA' AND region_destination = 'Americas') AND route_type = 'ocean freight' AND quarter = 2 AND year = 2022;,SELECT SUM(quantity) FROM Shipments WHERE region_origin = 'EMEA' AND region_destination = 'Americas' AND route_type = 'Ocean Freight' AND quarter = 2 AND year = 2022;,0 What was the score of the game where the record was 2-2?,"CREATE TABLE table_name_76 (score VARCHAR, record VARCHAR);","SELECT score FROM table_name_76 WHERE record = ""2-2"";","SELECT score FROM table_name_76 WHERE record = ""2-2"";",1 How many suppliers are there in the 'circular_economy' schema for each region?,"CREATE TABLE circular_economy.suppliers (supplier_id INT, supplier_name VARCHAR(50), region VARCHAR(50)); ","SELECT region, COUNT(*) as total_suppliers FROM circular_economy.suppliers GROUP BY region;","SELECT region, COUNT(*) FROM circular_economy.suppliers GROUP BY region;",0 How many people did Mayor Olav Martin Vik preside over?,"CREATE TABLE table_name_87 (innhabitants INTEGER, mayor VARCHAR);","SELECT AVG(innhabitants) FROM table_name_87 WHERE mayor = ""olav martin vik"";","SELECT SUM(innhabitants) FROM table_name_87 WHERE mayor = ""olav martin vik"";",0 Delete all aircraft models of manufacturer 'Boeing' in the 'aircraft_models' table.,"CREATE TABLE aircraft_models (model VARCHAR(50), manufacturer VARCHAR(50), first_flight YEAR, production_status VARCHAR(50)); ",DELETE FROM aircraft_models WHERE manufacturer = 'Boeing';,DELETE FROM aircraft_models WHERE manufacturer = 'Boeing';,1 Which writer wrote episode 18-09 (652)?,"CREATE TABLE table_name_29 (writer_s_ VARCHAR, episode VARCHAR);","SELECT writer_s_ FROM table_name_29 WHERE episode = ""18-09 (652)"";","SELECT writer_s_ FROM table_name_29 WHERE episode = ""18-09 (652)"";",1 Name the most FA cup for championship of 18 and total of 19,"CREATE TABLE table_name_74 (fa_cup INTEGER, championship VARCHAR, total VARCHAR);",SELECT MAX(fa_cup) FROM table_name_74 WHERE championship = 18 AND total = 19;,SELECT MAX(fa_cup) FROM table_name_74 WHERE championship = 18 AND total = 19;,1 What are all the title directed by reginald hudlin,"CREATE TABLE table_21994729_3 (title VARCHAR, directed_by VARCHAR);","SELECT COUNT(title) FROM table_21994729_3 WHERE directed_by = ""Reginald Hudlin"";","SELECT title FROM table_21994729_3 WHERE directed_by = ""Reginald Hudlin"";",0 "Find the number of hospitals in the city of Chicago and New York, excluding any hospitals with a rating below 8.","CREATE TABLE Hospitals (name VARCHAR(50), city VARCHAR(20), rating INT); ","SELECT COUNT(*) FROM Hospitals WHERE city IN ('Chicago', 'New York') AND rating >= 8;","SELECT COUNT(*) FROM Hospitals WHERE city IN ('Chicago', 'New York') AND rating 8;",0 "How much Draw has a Rank of 3rd, and a Performer of noelle, and Points larger than 79?","CREATE TABLE table_name_92 (draw VARCHAR, points VARCHAR, rank VARCHAR, performer VARCHAR);","SELECT COUNT(draw) FROM table_name_92 WHERE rank = ""3rd"" AND performer = ""noelle"" AND points > 79;","SELECT COUNT(draw) FROM table_name_92 WHERE rank = ""3rd"" AND performer = ""noelle"" AND points > 79;",1 How many compliance violations occurred in each month of 2021?,"CREATE TABLE compliance_violations (id INT, dispensary_id INT, violation_date DATE, description TEXT); ","SELECT EXTRACT(MONTH FROM violation_date) AS month, COUNT(*) FROM compliance_violations WHERE violation_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY month;","SELECT DATE_FORMAT(violation_date, '%Y-%m') as month, COUNT(*) as num_violations FROM compliance_violations WHERE violation_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY month;",0 "What is the Away team at the game with a Score of 1 – 0 and Attendance of 1,791?","CREATE TABLE table_name_4 (away_team VARCHAR, score VARCHAR, attendance VARCHAR);","SELECT away_team FROM table_name_4 WHERE score = ""1 – 0"" AND attendance = ""1,791"";","SELECT away_team FROM table_name_4 WHERE score = ""1 – 0"" AND attendance = ""1,791"";",1 What is the average age of athletes in each wellbeing program by gender?,"CREATE TABLE athletes (athlete_id INT, program_id INT, age INT, gender VARCHAR(50)); CREATE TABLE programs (program_id INT, program_name VARCHAR(50)); ","SELECT p.program_name, f.gender, AVG(a.age) as avg_age FROM athletes a JOIN programs p ON a.program_id = p.program_id JOIN (SELECT 'Male' as gender UNION ALL SELECT 'Female' UNION ALL SELECT 'Non-binary') f ON f.gender = a.gender GROUP BY p.program_name, f.gender;","SELECT p.program_name, AVG(a.age) as avg_age FROM athletes a JOIN programs p ON a.program_id = p.program_id GROUP BY p.program_name;",0 How many streams did song 'Heat Waves' by Glass Animals get in Q1 2022?,"CREATE TABLE SongStreams (song VARCHAR(255), quarter INT, streams INT);",SELECT SUM(streams) FROM SongStreams WHERE song = 'Heat Waves' AND quarter = 1;,SELECT SUM(streams) FROM SongStreams WHERE song = 'Heat Waves' AND quarter = 1;,1 What date was Richmond the home team?,"CREATE TABLE table_name_17 (date VARCHAR, home_team VARCHAR);","SELECT date FROM table_name_17 WHERE home_team = ""richmond"";","SELECT date FROM table_name_17 WHERE home_team = ""richmond"";",1 Which rank has the smallest number of faculty members?,CREATE TABLE Faculty (rank VARCHAR);,SELECT rank FROM Faculty GROUP BY rank ORDER BY COUNT(*) LIMIT 1;,SELECT rank FROM Faculty ORDER BY COUNT(*) DESC LIMIT 1;,0 What is the average monthly data usage for customers in the 'rural' region?,"CREATE TABLE subscribers (id INT, name TEXT, data_usage FLOAT, region TEXT); ", SELECT AVG(data_usage) FROM subscribers WHERE region = 'rural'; ,SELECT AVG(data_usage) FROM subscribers WHERE region = 'rural';,0 What is the total fare collected for trams in Berlin?,"CREATE TABLE trams (id INT, city VARCHAR(50), fare DECIMAL(5,2)); ",SELECT SUM(fare) FROM trams WHERE city = 'Berlin';,SELECT SUM(fare) FROM trams WHERE city = 'Berlin';,1 What is the highest value under the column goals against?,CREATE TABLE table_1255110_7 (goals_against INTEGER);,SELECT MAX(goals_against) FROM table_1255110_7;,SELECT MAX(goals_against) FROM table_1255110_7;,1 What is the maximum pages per minute for the Xerox Travel Scanner 100?,"CREATE TABLE table_16409745_1 (pages_per_minute__color_ INTEGER, product VARCHAR);","SELECT MAX(pages_per_minute__color_) FROM table_16409745_1 WHERE product = ""Xerox Travel Scanner 100"";","SELECT MAX(pages_per_minute__color_) FROM table_16409745_1 WHERE product = ""Xerox Travel Scanner 100"";",1 What is the average funding amount for startups founded by people from underrepresented racial or ethnic backgrounds in the biotech sector?,"CREATE TABLE startups(id INT, name TEXT, industry TEXT, foundation_date DATE, founder_race TEXT, funding FLOAT); ","SELECT AVG(funding) FROM startups WHERE industry = 'Biotech' AND founder_race IN ('African American', 'Hispanic', 'Native American', 'Pacific Islander');","SELECT AVG(funding) FROM startups WHERE industry = 'Biotech' AND founder_race IN ('African American', 'Hispanic', 'Hispanic');",0 Who was third during round 6 in Rybinsk?,"CREATE TABLE table_name_73 (third VARCHAR, venue VARCHAR, round VARCHAR);","SELECT third FROM table_name_73 WHERE venue = ""rybinsk"" AND round = ""6"";","SELECT third FROM table_name_73 WHERE venue = ""rybinsk"" AND round = 6;",0 What is the total number of picks from the PBA team of purefoods tender juicy hotdogs?,"CREATE TABLE table_name_62 (pick VARCHAR, pba_team VARCHAR);","SELECT COUNT(pick) FROM table_name_62 WHERE pba_team = ""purefoods tender juicy hotdogs"";","SELECT COUNT(pick) FROM table_name_62 WHERE pba_team = ""purefoods tender juicy hotdogs"";",1 List the first and last name of the students who do not have any food type allergy.,"CREATE TABLE Student (fname VARCHAR, lname VARCHAR, StuID VARCHAR); CREATE TABLE Allergy_Type (Allergy VARCHAR, allergytype VARCHAR); CREATE TABLE Has_allergy (StuID VARCHAR, Allergy VARCHAR);","SELECT fname, lname FROM Student WHERE NOT StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = ""food"");","SELECT T1.fname, T1.lname FROM Student AS T1 JOIN Has_allergy AS T2 ON T1.StuID = T2.StuID WHERE T2.Allergy IS NULL;",0 How many new crop varieties were added in the past month?,"CREATE TABLE crop_variety (variety_id INT, add_date DATE); ","SELECT COUNT(*) FROM crop_variety WHERE add_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) AND add_date < CURDATE();","SELECT COUNT(*) FROM crop_variety WHERE add_date >= DATEADD(month, -1, GETDATE());",0 "List the name and cost of the top 2 most expensive agricultural projects in Rural Alaska, ordered by cost.","CREATE TABLE AgriculturalProjects (id INT, name VARCHAR(50), cost FLOAT, start_date DATE, end_date DATE, region VARCHAR(50)); ","SELECT name, cost FROM (SELECT name, cost, ROW_NUMBER() OVER (PARTITION BY region ORDER BY cost DESC) as Rank FROM AgriculturalProjects WHERE region = 'Rural Alaska') AS Subquery WHERE Rank <= 2 ORDER BY cost DESC;","SELECT name, cost FROM AgriculturalProjects WHERE region = 'Rural Alaska' ORDER BY cost DESC LIMIT 2;",0 Which renewable energy projects were completed in the Asia-Pacific region?,"CREATE TABLE renewable_projects (project_id INT, project_name TEXT, region TEXT, technology TEXT); ","SELECT project_name, region, technology FROM renewable_projects WHERE region = 'Asia-Pacific';",SELECT project_name FROM renewable_projects WHERE region = 'Asia-Pacific';,0 "In the match against Marcus Aurélio with a method of decision (unanimous), what was the results?","CREATE TABLE table_name_6 (res VARCHAR, method VARCHAR, opponent VARCHAR);","SELECT res FROM table_name_6 WHERE method = ""decision (unanimous)"" AND opponent = ""marcus aurélio"";","SELECT res FROM table_name_6 WHERE method = ""decision (unanimous)"" AND opponent = ""marcus aurélio"";",1 Which customers have investments worth more than $5000 in the Canadian stock market?,"CREATE TABLE Investments (CustomerID INT, Market VARCHAR(20), Value DECIMAL(10,2)); ",SELECT CustomerID FROM Investments WHERE Market = 'Canada' AND Value > 5000,SELECT CustomerID FROM Investments WHERE Market = 'Canadian Stock' AND Value > 5000.00;,0 How many rounds total were there on may 31?,"CREATE TABLE table_name_79 (round VARCHAR, date VARCHAR);","SELECT COUNT(round) FROM table_name_79 WHERE date = ""may 31"";","SELECT COUNT(round) FROM table_name_79 WHERE date = ""may 31"";",1 What is the average number of international tourists in the first quarter of each year?,"CREATE TABLE tourism_stats (country VARCHAR(50), visitors INT, year INT, quarter INT); ",SELECT AVG(visitors) as avg_visitors FROM tourism_stats WHERE quarter = 1;,"SELECT year, AVG(visitors) as avg_visitors FROM tourism_stats WHERE quarter = 1 GROUP BY year;",0 How many genetic research projects were completed in Africa?,"CREATE SCHEMA if not exists genetics; USE genetics; CREATE TABLE if not exists research_projects (id INT, name VARCHAR(255), country VARCHAR(255)); ",SELECT COUNT(*) FROM genetics.research_projects WHERE country = 'Africa' AND id IN (SELECT project_id FROM genetics.research_status WHERE status = 'Completed');,"SELECT COUNT(*) FROM genetics.research_projects WHERE country IN ('Egypt', 'South Africa');",0 What is the average population of the regions?,"CREATE TABLE regions (id INT PRIMARY KEY, region VARCHAR(50), population INT); ","SELECT region, AVG(population) as avg_population FROM regions GROUP BY region;",SELECT AVG(population) FROM regions;,0 When has a Site of tainan city and a Score of 8–6?,"CREATE TABLE table_name_21 (year VARCHAR, site VARCHAR, score VARCHAR);","SELECT year FROM table_name_21 WHERE site = ""tainan city"" AND score = ""8–6"";","SELECT year FROM table_name_21 WHERE site = ""tainan city"" AND score = ""8–6"";",1 What was the the total top attendance with a score of 0 – 4?,"CREATE TABLE table_name_93 (attendance INTEGER, score VARCHAR);","SELECT MAX(attendance) FROM table_name_93 WHERE score = ""0 – 4"";","SELECT SUM(attendance) FROM table_name_93 WHERE score = ""0 – 4"";",0 "For countries with total number of medals less than 5 and more than 2 bronze medals, what's the lowest number of gold medals?","CREATE TABLE table_name_92 (gold INTEGER, total VARCHAR, bronze VARCHAR);",SELECT MIN(gold) FROM table_name_92 WHERE total < 5 AND bronze > 2;,SELECT MIN(gold) FROM table_name_92 WHERE total 5 AND bronze > 2;,0 Insert a new record for a product that is not present in the database,"CREATE TABLE product (id INT, name TEXT, cruelty_free BOOLEAN, rating FLOAT);","INSERT INTO product (id, name, cruelty_free, rating) VALUES (5, 'Organic Lipstick', TRUE, 4.8);","INSERT INTO product (id, name, cruelty_free, rating) VALUES (1, 'Cruelty Free', TRUE);",0 What year was the total 9?,"CREATE TABLE table_name_9 (year VARCHAR, total VARCHAR);","SELECT year FROM table_name_9 WHERE total = ""9"";",SELECT year FROM table_name_9 WHERE total = 9;,0 What position is Sweden in round 2?,"CREATE TABLE table_name_55 (position VARCHAR, nationality VARCHAR, round VARCHAR);","SELECT position FROM table_name_55 WHERE nationality = ""sweden"" AND round = ""2"";","SELECT position FROM table_name_55 WHERE nationality = ""sweden"" AND round = 2;",0 what's the width with frame size being 4.5k,"CREATE TABLE table_1251878_1 (width VARCHAR, frame_size VARCHAR);","SELECT width FROM table_1251878_1 WHERE frame_size = ""4.5K"";","SELECT width FROM table_1251878_1 WHERE frame_size = ""4.5K"";",1 What is the maximum gas limit for a single transaction on the Solana network?,"CREATE TABLE solana_transactions (transaction_id INT, gas_limit INT);",SELECT MAX(gas_limit) FROM solana_transactions;,SELECT MAX(gas_limit) FROM solana_transactions;,1 What is the permitted length of stay in the Jersey territory?,"CREATE TABLE table_25965003_3 (length_of_stay_permitted VARCHAR, countries_and_territories VARCHAR);","SELECT length_of_stay_permitted FROM table_25965003_3 WHERE countries_and_territories = ""Jersey"";","SELECT length_of_stay_permitted FROM table_25965003_3 WHERE countries_and_territories = ""Jersey"";",1 What is the Year for Supplier Kooga?,"CREATE TABLE table_name_97 (year VARCHAR, supplier VARCHAR);","SELECT year FROM table_name_97 WHERE supplier = ""kooga"";","SELECT year FROM table_name_97 WHERE supplier = ""kosoga"";",0 "Which Body Width/mm has a Lead Pitch/mm smaller than 0.55, and a Body Length/mm larger than 18.4?","CREATE TABLE table_name_48 (body_width_mm INTEGER, lead_pitch_mm VARCHAR, body_length_mm VARCHAR);",SELECT MIN(body_width_mm) FROM table_name_48 WHERE lead_pitch_mm < 0.55 AND body_length_mm > 18.4;,SELECT SUM(body_width_mm) FROM table_name_48 WHERE lead_pitch_mm 0.55 AND body_length_mm > 18.4;,0 Which drugs have been tested in Phase III clinical trials but not yet approved in any country?,"CREATE TABLE drugs (id INT PRIMARY KEY, name VARCHAR(255), manufacturer VARCHAR(255), category VARCHAR(255)); CREATE TABLE clinical_trials (id INT PRIMARY KEY, name VARCHAR(255), drug_id INT, phase VARCHAR(10), start_date DATE, end_date DATE, FOREIGN KEY (drug_id) REFERENCES drugs(id)); CREATE TABLE market_access (id INT PRIMARY KEY, drug_id INT, country VARCHAR(255), approval_date DATE, FOREIGN KEY (drug_id) REFERENCES drugs(id));",SELECT drugs.name FROM drugs LEFT JOIN market_access ON drugs.id = market_access.drug_id WHERE drugs.id IN (SELECT clinical_trials.drug_id FROM clinical_trials WHERE clinical_trials.phase = 'Phase III') AND market_access.id IS NULL;,SELECT drugs.name FROM drugs INNER JOIN clinical_trials ON drugs.id = clinical_trials.drug_id INNER JOIN market_access ON drugs.id = market_access.drug_id WHERE clinical_trials.phase = 'phase III' AND market_access.approval_date IS NULL;,0 Which products have experienced a growth in trend score of at least 0.5 points compared to the previous month?,"CREATE TABLE products (id INT PRIMARY KEY, name VARCHAR(255), category VARCHAR(255)); CREATE TABLE product_trends (id INT PRIMARY KEY, product_id INT, trend_score FLOAT, date DATE, FOREIGN KEY (product_id) REFERENCES products(id)); ","SELECT p.name, pt1.trend_score AS prev_month_trend_score, pt2.trend_score AS this_month_trend_score FROM products p JOIN product_trends pt1 ON p.id = pt1.product_id JOIN product_trends pt2 ON p.id = pt2.product_id WHERE pt1.date = DATE_SUB(pt2.date, INTERVAL 1 MONTH) AND pt2.trend_score - pt1.trend_score >= 0.5;","SELECT products.name FROM products INNER JOIN product_trends ON products.id = product_trends.product_id WHERE product_trends.trend_score > (SELECT trend_score FROM product_trends WHERE date >= DATEADD(month, -1, GETDATE())) AND product_trends.trend_score > (SELECT trend_score FROM product_trends WHERE date >= DATEADD(month, -1, GETDATE())) GROUP BY products.id;",0 "Insert a new exit strategy into the ""exit_strategies"" table for 'India Inc.' with an acquisition price of $50M on 2021-10-01","CREATE TABLE exit_strategies (id INT, company_name VARCHAR(100), exit_type VARCHAR(50), acquisition_price FLOAT, exit_date DATE);","INSERT INTO exit_strategies (id, company_name, exit_type, acquisition_price, exit_date) VALUES (7, 'India Inc.', 'Acquisition', 50000000, '2021-10-01');","INSERT INTO exit_strategies (id, company_name, exit_type, acquisition_price, exit_date) VALUES (1, 'India Inc.', 50M, '2021-10-01');",0 "Update the ""cloud_cover"" in the ""satellite_image_analysis"" table where the ""image_timestamp"" is '2022-02-14 12:00:00' to 0.7","CREATE TABLE satellite_image_analysis (image_id INT, image_timestamp TIMESTAMP, cloud_cover FLOAT, rainfall_probability FLOAT);",UPDATE satellite_image_analysis SET cloud_cover = 0.7 WHERE image_timestamp = '2022-02-14 12:00:00';,UPDATE satellite_image_analysis SET cloud_cover = 0.7 WHERE image_timestamp = '2022-02-14 12:00:00';,1 Which year or years did a team win 174 games and had an assist number less than 17?,"CREATE TABLE table_name_40 (years VARCHAR, assist VARCHAR, games VARCHAR);",SELECT years FROM table_name_40 WHERE assist < 17 AND games = 174;,"SELECT years FROM table_name_40 WHERE assist 17 AND games = ""174"";",0 What is first names of the top 5 staff who have handled the greatest number of complaints?,"CREATE TABLE complaints (staff_id VARCHAR); CREATE TABLE staff (first_name VARCHAR, staff_id VARCHAR);",SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY COUNT(*) LIMIT 5;,SELECT T1.first_name FROM staff AS T1 JOIN complaints AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY COUNT(*) DESC LIMIT 5;,0 Who was the finals opponent on the hard surface tournament?,"CREATE TABLE table_name_11 (opponent_in_the_final VARCHAR, surface VARCHAR);","SELECT opponent_in_the_final FROM table_name_11 WHERE surface = ""hard"";","SELECT opponent_in_the_final FROM table_name_11 WHERE surface = ""hard"";",1 Show all advisors and corresponding number of students.,CREATE TABLE Student (advisor VARCHAR);,"SELECT advisor, COUNT(*) FROM Student GROUP BY advisor;","SELECT advisor, COUNT(*) FROM Student GROUP BY advisor;",1 Update the 'weight' column for the satellite 'Sentinel-2A',"CREATE TABLE satellite_deployment (id INT PRIMARY KEY, name VARCHAR(255), country VARCHAR(255), launch_date DATE, weight FLOAT); ",UPDATE satellite_deployment SET weight = 1234.5 WHERE name = 'Sentinel-2A';,UPDATE satellite_deployment SET weight = 'Sentinel-2A' WHERE name = 'Sentinel-2A';,0 What is the Finish for the 1950–51? season?,"CREATE TABLE table_name_22 (finish VARCHAR, season VARCHAR);","SELECT finish FROM table_name_22 WHERE season = ""1950–51"";","SELECT finish FROM table_name_22 WHERE season = ""1950–51"";",1 What is the average attendance after week 16?,"CREATE TABLE table_name_10 (attendance INTEGER, week INTEGER);",SELECT AVG(attendance) FROM table_name_10 WHERE week > 16;,SELECT AVG(attendance) FROM table_name_10 WHERE week > 16;,1 "Retrieve the names of agents, policy numbers, and coverage start dates for policies in the 'Illinois' region with a coverage start date before '2022-01-01'.","CREATE TABLE policies (policy_number INT, coverage_start_date DATE, agent_id INT, region VARCHAR(20)); CREATE TABLE agents (agent_id INT, name VARCHAR(50)); ","SELECT agents.name, policies.policy_number, policies.coverage_start_date FROM policies INNER JOIN agents ON policies.agent_id = agents.agent_id WHERE policies.region = 'Illinois' AND policies.coverage_start_date < '2022-01-01';","SELECT agents.name, policies.policy_number, policies.coverage_start_date FROM agents INNER JOIN policies ON agents.agent_id = policies.agent_id WHERE policies.region = 'Illinois' AND policies.coverage_start_date '2022-01-01';",0 What's the average number of played games from Rayo Vallecano with less than 12 wins?,"CREATE TABLE table_name_81 (played INTEGER, club VARCHAR, wins VARCHAR);","SELECT AVG(played) FROM table_name_81 WHERE club = ""rayo vallecano"" AND wins < 12;","SELECT AVG(played) FROM table_name_81 WHERE club = ""rayo valecano"" AND wins 12;",0 What is the average salary for workers in each department at factory 2?,"CREATE TABLE factories (factory_id INT, department VARCHAR(20));CREATE TABLE workers (worker_id INT, factory_id INT, salary DECIMAL(5,2), department VARCHAR(20)); ","SELECT f.department, AVG(w.salary) FROM workers w JOIN factories f ON w.factory_id = f.factory_id WHERE f.factory_id = 2 GROUP BY f.department;","SELECT f.department, AVG(w.salary) as avg_salary FROM factories f JOIN workers w ON f.factory_id = w.factory_id WHERE f.department = 'Factory 2' GROUP BY f.department;",0 What is the church in the Sub-Parish of Fresvik called?,"CREATE TABLE table_name_94 (church_name VARCHAR, sub_parish__sokn_ VARCHAR);","SELECT church_name FROM table_name_94 WHERE sub_parish__sokn_ = ""fresvik"";","SELECT church_name FROM table_name_94 WHERE sub_parish__sokn_ = ""fresvik"";",1 What was the total cost of space missions led by astronauts from the United States?,"CREATE TABLE Astronauts (AstronautID INT, Name VARCHAR(50), Nationality VARCHAR(50));CREATE TABLE SpaceMissions (MissionID INT, AstronautID INT, Name VARCHAR(50), Cost FLOAT); ",SELECT SUM(sm.Cost) FROM SpaceMissions sm INNER JOIN Astronauts a ON sm.AstronautID = a.AstronautID WHERE a.Nationality = 'USA';,SELECT SUM(Cost) FROM SpaceMissions JOIN Astronauts ON SpaceMissions.AstronautID = Astronauts.AstronautID WHERE Astronauts.Nationality = 'United States';,0 "What's the highest swimsuit for an average less than 8.073, evening gown less than 8.31, and an interview over 8.23 in georgia?","CREATE TABLE table_name_13 (swimsuit INTEGER, state VARCHAR, interview VARCHAR, average VARCHAR, evening_gown VARCHAR);","SELECT MAX(swimsuit) FROM table_name_13 WHERE average < 8.073 AND evening_gown < 8.31 AND interview > 8.23 AND state = ""georgia"";","SELECT MAX(swimsuit) FROM table_name_13 WHERE average 8.073 AND evening_gown 8.31 AND interview > 8.23 AND state = ""georgia"";",0 What is the percentage of registered voters in which the d-r spread is +10.4%?,"CREATE TABLE table_27003223_4 (registered_voters VARCHAR, d_r_spread VARCHAR);","SELECT registered_voters FROM table_27003223_4 WHERE d_r_spread = ""+10.4%"";","SELECT registered_voters FROM table_27003223_4 WHERE d_r_spread = ""+10.4%"";",1 "What is the total installed capacity of wind farms in GW, grouped by country?","CREATE TABLE wind_farms (id INT, country VARCHAR(50), name VARCHAR(50), capacity FLOAT); ","SELECT country, SUM(capacity) FROM wind_farms GROUP BY country;","SELECT country, SUM(capacity) FROM wind_farms GROUP BY country;",1 What was the lowest overall for Louis Coleman?,"CREATE TABLE table_name_91 (overall INTEGER, player VARCHAR);","SELECT MIN(overall) FROM table_name_91 WHERE player = ""louis coleman"";","SELECT MIN(overall) FROM table_name_91 WHERE player = ""louis coleman"";",1 What is the value for 2012 when the value for 2009 is 1R and the vale for 2007 is 2R?,CREATE TABLE table_name_51 (Id VARCHAR);,"SELECT 2012 FROM table_name_51 WHERE 2009 = ""1r"" AND 2007 = ""2r"";","SELECT 2012 FROM table_name_51 WHERE 2009 = ""1r"" AND 2007 = ""2r"";",1 What was the Christ made king date with a great tribulation in 1925?,"CREATE TABLE table_name_16 (christ_madeking VARCHAR, great_tribulation VARCHAR);","SELECT christ_madeking FROM table_name_16 WHERE great_tribulation = ""1925"";","SELECT christ_madeking FROM table_name_16 WHERE great_tribulation = ""1925"";",1 Which team has Yuriy Hruznov as coach?,"CREATE TABLE table_name_49 (team VARCHAR, coach VARCHAR);","SELECT team FROM table_name_49 WHERE coach = ""yuriy hruznov"";","SELECT team FROM table_name_49 WHERE coach = ""yuriy hruznov"";",1 "Identify the number of space missions that each country has participated in, according to the Space_Missions table.","CREATE TABLE Space_Missions (ID INT, Mission_Name VARCHAR(255), Country VARCHAR(255)); CREATE VIEW Mission_Country_Counts AS SELECT Country, COUNT(*) as Num_Missions FROM Space_Missions GROUP BY Country;","SELECT Country, Num_Missions FROM Mission_Country_Counts;","SELECT Country, COUNT(*) as Num_Missions FROM Mission_Country_Counts GROUP BY Country;",0 what is the pick for robert griffin iii?,"CREATE TABLE table_name_97 (pick VARCHAR, name VARCHAR);","SELECT pick FROM table_name_97 WHERE name = ""robert griffin iii"";","SELECT pick FROM table_name_97 WHERE name = ""robert griffin iii"";",1 What is the highest water temperature recorded in the Atlantic Shrimp Farms?,"CREATE TABLE AtlanticShrimpFarms (ID INT, Name TEXT, Location TEXT, WaterTemp DECIMAL(5,2)); ",SELECT MAX(WaterTemp) FROM AtlanticShrimpFarms WHERE Location LIKE '%Atlantic Ocean%';,SELECT MAX(WaterTemp) FROM AtlanticShrimpFarms;,0 what livery has a status of in service as coaching stock?,"CREATE TABLE table_name_74 (livery VARCHAR, status VARCHAR);","SELECT livery FROM table_name_74 WHERE status = ""in service as coaching stock"";","SELECT livery FROM table_name_74 WHERE status = ""in service as coaching stock"";",1 Calculate the total area of farmland for each crop type in the 'Central' region.,"CREATE TABLE Farmland (region VARCHAR(20), crop VARCHAR(20), area FLOAT);","SELECT crop, SUM(area) FROM Farmland WHERE region = 'Central' GROUP BY crop;","SELECT crop, SUM(area) FROM Farmland WHERE region = 'Central' GROUP BY crop;",1 What is the callsign when power kw is 25kw?,"CREATE TABLE table_23915973_1 (callsign VARCHAR, power_kw VARCHAR);","SELECT callsign FROM table_23915973_1 WHERE power_kw = ""25kW"";","SELECT callsign FROM table_23915973_1 WHERE power_kw = ""25kw"";",0 What is the Loss of the game at Nationwide Arena with a Score of 4–3?,"CREATE TABLE table_name_42 (loss VARCHAR, score VARCHAR, arena VARCHAR);","SELECT loss FROM table_name_42 WHERE score = ""4–3"" AND arena = ""nationwide arena"";","SELECT loss FROM table_name_42 WHERE score = ""4–3"" AND arena = ""nationwide arena"";",1 Whose Name has a Date of reclassification of 2003-04-01 (merge into shizuoka )?,"CREATE TABLE table_name_52 (name VARCHAR, date_of_reclassification VARCHAR);","SELECT name FROM table_name_52 WHERE date_of_reclassification = ""2003-04-01 (merge into shizuoka )"";","SELECT name FROM table_name_52 WHERE date_of_reclassification = ""2003-04-01 (merge into shizuoka )"";",1 Who are the top 3 property owners with the most properties in the United States?,"CREATE TABLE Property (id INT, address VARCHAR(255), city VARCHAR(255), state VARCHAR(255), country VARCHAR(255), price DECIMAL(10,2), size INT, sustainable_practices BOOLEAN, coop_owned BOOLEAN); CREATE TABLE PropertyOwner (id INT, property_id INT, owner_name VARCHAR(255), owner_email VARCHAR(255), owner_phone VARCHAR(20));","SELECT PropertyOwner.owner_name, COUNT(PropertyOwner.property_id) AS num_properties FROM PropertyOwner GROUP BY PropertyOwner.owner_name ORDER BY num_properties DESC LIMIT 3;","SELECT PropertyOwner.owner_name, COUNT(PropertyOwner.id) as num_properties FROM PropertyOwner INNER JOIN PropertyOwner ON PropertyOwner.property_id = PropertyOwner.property_id WHERE PropertyOwner.country = 'United States' GROUP BY PropertyOwner.owner_name ORDER BY num_properties DESC LIMIT 3;",0 What is the maximum number of satellites launched by a single country in a year?,"CREATE TABLE satellites_by_year (year INT, launch_country VARCHAR(50), num_satellites INT); ",SELECT MAX(num_satellites) FROM satellites_by_year;,"SELECT launch_country, MAX(num_satellites) FROM satellites_by_year GROUP BY launch_country;",0 How many users have a heart rate above 120 bpm for more than 30 minutes in a workout session?,"CREATE TABLE HeartRate (UserID INT, HeartRate INT, Minutes INT); ",SELECT COUNT(*) FROM HeartRate WHERE HeartRate > 120 AND Minutes > 30;,SELECT COUNT(*) FROM HeartRate WHERE HeartRate > 120 AND Minutes > 30;,1 Find the number of vessels and their corresponding safety inspection ratings in the 'vessel_safety' table,"CREATE TABLE vessel_safety (id INT, vessel_name VARCHAR(50), safety_rating INT);","SELECT vessel_name, safety_rating FROM vessel_safety;","SELECT COUNT(*), safety_rating FROM vessel_safety;",0 "What is Event, when Round is ""1"", when Location is ""Osaka , Japan"", and when Method is ""TKO (corner stoppage)""?","CREATE TABLE table_name_64 (event VARCHAR, method VARCHAR, round VARCHAR, location VARCHAR);","SELECT event FROM table_name_64 WHERE round = ""1"" AND location = ""osaka , japan"" AND method = ""tko (corner stoppage)"";","SELECT event FROM table_name_64 WHERE round = ""1"" AND location = ""osaka, japan"" AND method = ""tko (corner stoppage)"";",0 What is the percentage of students with disabilities who have completed a support program?,"CREATE TABLE students_disabilities (student_id INT, has_disability BOOLEAN, completed_support_program BOOLEAN); ",SELECT (COUNT(*) FILTER (WHERE has_disability = TRUE AND completed_support_program = TRUE)) * 100.0 / (SELECT COUNT(*) FROM students_disabilities WHERE has_disability = TRUE) AS percentage;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM students_disabilities)) FROM students_disabilities WHERE has_disability = TRUE AND completed_support_program = TRUE;,0 Find the total number of policies issued in 'California' having a claim amount greater than $1000.,"CREATE TABLE policies (id INT, policyholder_id INT, issue_date DATE); CREATE TABLE claims (id INT, policy_id INT, claim_amount FLOAT); ",SELECT COUNT(policies.id) FROM policies INNER JOIN claims ON policies.id = claims.policy_id WHERE policies.issue_date >= '2020-01-01' AND claims.claim_amount > 1000 AND policies.policyholder_id IN (SELECT id FROM policyholders WHERE state = 'CA');,SELECT COUNT(DISTINCT policies.id) FROM policies INNER JOIN claims ON policies.id = claims.policy_id WHERE policies.issue_date BETWEEN '2022-01-01' AND '2022-12-31' AND claims.claim_amount > 1000;,0 What is the series 3 with more than 4 seats?,"CREATE TABLE table_name_77 (series_3 VARCHAR, seat INTEGER);",SELECT series_3 FROM table_name_77 WHERE seat > 4;,SELECT series_3 FROM table_name_77 WHERE seat > 4;,1 What is the total funding received by startups founded by immigrants in the edtech industry?,"CREATE TABLE startup (id INT, name TEXT, industry TEXT, founder_citizenship TEXT); ",SELECT SUM(funding_amount) FROM investment_round ir JOIN startup s ON ir.startup_id = s.id WHERE s.industry = 'Edtech' AND s.founder_citizenship != 'US';,SELECT SUM(funding_amount) FROM funding JOIN startup ON funding.startup_id = startup.id WHERE startup.founder_citizenship = 'Immigrant' AND startup.industry = 'Edtech';,0 How many intelligence operations were conducted by the Australian government in 2019 and 2020?,"CREATE TABLE aus_intelligence_operations (id INT, year INT, operations_count INT); ","SELECT SUM(operations_count) FROM aus_intelligence_operations WHERE year IN (2019, 2020);","SELECT SUM(operations_count) FROM aus_intelligence_operations WHERE year IN (2019, 2020);",1 What was the result of Declan Donnellan's nomination?,"CREATE TABLE table_name_23 (result VARCHAR, nominee VARCHAR);","SELECT result FROM table_name_23 WHERE nominee = ""declan donnellan"";","SELECT result FROM table_name_23 WHERE nominee = ""declaran Donnellan"";",0 What is the average distance from the sun for each planet during their orbits?,"CREATE TABLE planet_orbits (id INT, planet VARCHAR, orbit_date DATE, distance FLOAT);","SELECT planet, AVG(distance) as avg_distance FROM planet_orbits GROUP BY planet;","SELECT planet, AVG(distance) FROM planet_orbits GROUP BY planet;",0 "On channel 32, when the power is 32 kW horizontal, what is the modulation?","CREATE TABLE table_name_91 (modulation VARCHAR, power VARCHAR, channel VARCHAR);","SELECT modulation FROM table_name_91 WHERE power = ""32 kw horizontal"" AND channel = 32;","SELECT modulation FROM table_name_91 WHERE power = ""32 kW horizontal"" AND channel = 32;",0 What is the average workout duration for users in the age group 25-34?,"CREATE TABLE UserData (UserID INT, Age INT); CREATE TABLE WorkoutData (UserID INT, WorkoutDuration INT); ",SELECT AVG(WorkoutDuration) FROM WorkoutData INNER JOIN UserData ON WorkoutData.UserID = UserData.UserID WHERE Age BETWEEN 25 AND 34;,SELECT AVG(WorkoutDuration) FROM WorkoutData JOIN UserData ON WorkoutData.UserID = UserData.UserID WHERE Age BETWEEN 25 AND 34;,0 "What city did an event have a prize of €288,180?","CREATE TABLE table_name_96 (city VARCHAR, prize VARCHAR);","SELECT city FROM table_name_96 WHERE prize = ""€288,180"";","SELECT city FROM table_name_96 WHERE prize = ""€288,180"";",1 What is the average lifespan for each country in the European Union?,"CREATE TABLE lifespan (country TEXT, lifespan INT); ","SELECT country, AVG(lifespan) AS avg_lifespan FROM lifespan GROUP BY country;","SELECT country, AVG(lifespan) FROM lifespan GROUP BY country;",0 How many unique customers have purchased size-diverse clothing in each region?,"CREATE TABLE Customers (CustomerID INT, CustomerName VARCHAR(50), Size VARCHAR(10), Region VARCHAR(50)); ","SELECT Region, COUNT(DISTINCT CustomerID) as UniqueCustomers FROM Customers WHERE Size IN ('XS', 'S', 'M', 'L', 'XL', 'XXL') GROUP BY Region;","SELECT Region, COUNT(DISTINCT CustomerID) FROM Customers WHERE Size = 'Diverse' GROUP BY Region;",0 What is the record when they played New York?,"CREATE TABLE table_name_64 (record VARCHAR, opponent VARCHAR);","SELECT record FROM table_name_64 WHERE opponent = ""new york"";","SELECT record FROM table_name_64 WHERE opponent = ""new york"";",1 What is the most common artifact material in the 'ArtifactMaterial' table?,"CREATE TABLE ArtifactMaterial (ArtifactID VARCHAR(10), Material VARCHAR(50));","SELECT Material, COUNT(*) FROM ArtifactMaterial GROUP BY Material ORDER BY COUNT(*) DESC LIMIT 1;","SELECT Material, COUNT(*) FROM ArtifactMaterial GROUP BY Material ORDER BY COUNT(*) DESC LIMIT 1;",1 What is the Term in office with an Order that is 9?,"CREATE TABLE table_name_21 (term_in_office VARCHAR, order VARCHAR);","SELECT term_in_office FROM table_name_21 WHERE order = ""9"";",SELECT term_in_office FROM table_name_21 WHERE order = 9;,0 What is the year when Scuderia Lancia Corse competed?,"CREATE TABLE table_name_51 (year VARCHAR, team VARCHAR);","SELECT COUNT(year) FROM table_name_51 WHERE team = ""scuderia lancia corse"";","SELECT year FROM table_name_51 WHERE team = ""scuderia lancia corse"";",0 Show the total amount of resources extracted by resource type,"CREATE TABLE resource_type (type VARCHAR(255), amount INT); ","SELECT rt.type, SUM(rt.amount) as total_resources_extracted FROM resource_type rt GROUP BY rt.type;","SELECT type, SUM(amount) FROM resource_type GROUP BY type;",0 What is the number of workers employed in factories that use renewable energy sources in Germany and France?,"CREATE TABLE factories (factory_id INT, country VARCHAR(50), energy_source VARCHAR(50)); CREATE TABLE workers (worker_id INT, factory_id INT, position VARCHAR(50)); ","SELECT COUNT(workers.worker_id) FROM workers INNER JOIN factories ON workers.factory_id = factories.factory_id WHERE factories.country IN ('Germany', 'France') AND factories.energy_source = 'renewable';","SELECT COUNT(*) FROM workers w JOIN factories f ON w.factory_id = f.factory_id WHERE f.country IN ('Germany', 'France') AND f.energy_source = 'Renewable';",0 List all unique countries from the 'PlayerData' table,"CREATE TABLE PlayerData (PlayerID INT, Name VARCHAR(50), Age INT, Country VARCHAR(50)); ",SELECT DISTINCT Country FROM PlayerData;,SELECT DISTINCT Country FROM PlayerData;,1 what is the score for the tournament cagnes-sur-mer?,"CREATE TABLE table_name_38 (score VARCHAR, tournament VARCHAR);","SELECT score FROM table_name_38 WHERE tournament = ""cagnes-sur-mer"";","SELECT score FROM table_name_38 WHERE tournament = ""cagnes-sur-mer"";",1 What was the average game with a record of 4-4-0?,"CREATE TABLE table_name_58 (game INTEGER, record VARCHAR);","SELECT AVG(game) FROM table_name_58 WHERE record = ""4-4-0"";","SELECT AVG(game) FROM table_name_58 WHERE record = ""4-4-0"";",1 "When Cancelable of yes, and a Type of drag, what was the Category?","CREATE TABLE table_name_72 (category VARCHAR, cancelable VARCHAR, type VARCHAR);","SELECT category FROM table_name_72 WHERE cancelable = ""yes"" AND type = ""drag"";","SELECT category FROM table_name_72 WHERE cancelable = ""yes"" AND type = ""drag"";",1 How many public libraries were operational in urban areas as of 2019?,"CREATE TABLE Libraries (Year INT, Area VARCHAR(10), Number INT); ",SELECT SUM(Number) FROM Libraries WHERE Year = 2019 AND Area = 'Urban';,SELECT SUM(Number) FROM Libraries WHERE Year = 2019 AND Area = 'Urban';,1 Identify the players with the most rebounds in a single game in the 'nba_games' table.,"CREATE TABLE nba_games (game_id INT, home_team_id INT, away_team_id INT); CREATE TABLE nba_game_scores (game_id INT, team_id INT, player_name VARCHAR(255), rebounds INT);","SELECT game_id, home_team_id AS team_id, player_name, rebounds FROM nba_game_scores WHERE rebounds = (SELECT MAX(rebounds) FROM nba_game_scores) UNION ALL SELECT game_id, away_team_id, player_name, rebounds FROM nba_game_scores WHERE rebounds = (SELECT MAX(rebounds) FROM nba_game_scores);","SELECT nba_games.home_team_id, nba_game_scores.player_name, SUM(nba_game_scores.rebounds) as total_rebounds FROM nba_games INNER JOIN nba_game_scores ON nba_games.home_team_id = nba_games.team_id GROUP BY nba_games.home_team_id ORDER BY total_rebounds DESC LIMIT 1;",0 Name the screening completed for screening started 23 january 2006,"CREATE TABLE table_name_22 (screening_completed VARCHAR, screening_started VARCHAR);","SELECT screening_completed FROM table_name_22 WHERE screening_started = ""23 january 2006"";","SELECT screening_completed FROM table_name_22 WHERE screening_started = ""23 january 2006"";",1 What was the maximum round where Marc Lieb Richard Lietz was on the GT2 Winning Team?,"CREATE TABLE table_24865763_2 (rnd INTEGER, gt2_winning_team VARCHAR);","SELECT MAX(rnd) FROM table_24865763_2 WHERE gt2_winning_team = ""Marc Lieb Richard Lietz"";","SELECT MAX(rnd) FROM table_24865763_2 WHERE gt2_winning_team = ""Marc Lieb Richard Lietz"";",1 What was the callsign in Zamboanga?,"CREATE TABLE table_12547903_3 (callsign VARCHAR, location VARCHAR);","SELECT callsign FROM table_12547903_3 WHERE location = ""Zamboanga"";","SELECT callsign FROM table_12547903_3 WHERE location = ""Zambianga"";",0 What is the average budget allocated for bioprocess engineering R&D in startups located in the Asia-Pacific region?,"CREATE TABLE startups (id INT, name VARCHAR(100), location VARCHAR(50), budget FLOAT); ",SELECT AVG(budget) FROM startups WHERE location LIKE '%Asia%' OR location LIKE '%Pacific%' AND category = 'bioprocess engineering';,SELECT AVG(budget) FROM startups WHERE location = 'Asia-Pacific';,0 What is the highest numbered pick from round 7?,"CREATE TABLE table_name_67 (pick INTEGER, round VARCHAR);",SELECT MAX(pick) FROM table_name_67 WHERE round = 7;,SELECT MAX(pick) FROM table_name_67 WHERE round = 7;,1 Insert a new record for recycling rate in Istanbul in 2021.,"CREATE TABLE recycling_rates (city VARCHAR(255), year INT, recycling_rate FLOAT);","INSERT INTO recycling_rates (city, year, recycling_rate) VALUES ('Istanbul', 2021, 25);","INSERT INTO recycling_rates (city, year, recycling_rate) VALUES ('Istanbul', 2021, 'Recycling');",0 List all menu items that contain 'salad' in their name from the 'Menu' table.,"CREATE TABLE Menu (id INT, name VARCHAR(255), price DECIMAL(5,2), vegetarian BOOLEAN); ",SELECT name FROM Menu WHERE name LIKE '%salad%';,SELECT * FROM Menu WHERE name LIKE '%salad%';,0 Compare the CO2 emissions of the power sector in Germany and the United Kingdom.,"CREATE TABLE co2_emissions (country VARCHAR(20), sector VARCHAR(20), co2_emissions INT); ",SELECT co2_emissions FROM co2_emissions WHERE country = 'Germany' INTERSECT SELECT co2_emissions FROM co2_emissions WHERE country = 'United Kingdom';,"SELECT country, sector, co2_emissions FROM co2_emissions WHERE country = 'Germany' AND sector = 'power';",0 "What is the total number of carbon offset initiatives in the 'carbon_offsets' table, by location?","CREATE TABLE if not exists carbon_offsets (initiative_id INT, initiative_name VARCHAR(255), location VARCHAR(255), offset_amount INT);","SELECT location, COUNT(*) as total_initiatives FROM carbon_offsets GROUP BY location;","SELECT location, COUNT(*) FROM carbon_offsets GROUP BY location;",0 What is the average size of traditional arts centers by city?,"CREATE TABLE traditional_arts_centers_city (id INT, center_name VARCHAR(100), size INT, city VARCHAR(50)); ","SELECT city, AVG(size) as avg_size FROM traditional_arts_centers_city GROUP BY city;","SELECT city, AVG(size) FROM traditional_arts_centers_city GROUP BY city;",0 What is the average water consumption of manufacturing processes using organic cotton?,"CREATE TABLE OrganicCottonManufacturing (id INT, water_consumption DECIMAL); ",SELECT AVG(water_consumption) FROM OrganicCottonManufacturing;,SELECT AVG(water_consumption) FROM OrganicCottonManufacturing;,1 Find the number of artworks in the 'impressionist' period and their respective artist's age,"ARTWORK(artwork_id, title, date_created, period, artist_id); ARTIST(artist_id, name, gender, birth_date)","SELECT COUNT(a.artwork_id), DATEDIFF(year, ar.birth_date, a.date_created) AS age FROM ARTWORK a INNER JOIN ARTIST ar ON a.artist_id = ar.artist_id WHERE a.period = 'impressionist' GROUP BY DATEDIFF(year, ar.birth_date, a.date_created);","SELECT COUNT(*), artist_id, date_created, period, artist_id, gender, birth_date FROM ARTWORK WHERE period = 'impressionist';",0 "What is the Money ($) when the Place is t6, and Player is chris dimarco?","CREATE TABLE table_name_40 (money___$__ VARCHAR, place VARCHAR, player VARCHAR);","SELECT money___$__ FROM table_name_40 WHERE place = ""t6"" AND player = ""chris dimarco"";","SELECT money___$__ FROM table_name_40 WHERE place = ""t6"" AND player = ""chris dimarco"";",1 List all habitats and the number of animals in each that are classified as endangered or critically endangered.,"CREATE TABLE animals (id INT PRIMARY KEY, name VARCHAR(50), species VARCHAR(50), population INT, conservation_status VARCHAR(50)); CREATE TABLE habitats (id INT PRIMARY KEY, name VARCHAR(50), location VARCHAR(50), size FLOAT); CREATE TABLE animals_in_habitats (animal_id INT, habitat_id INT);","SELECT habitats.name, COUNT(animals.id) AS num_endangered_animals FROM habitats INNER JOIN animals_in_habitats ON habitats.id = animals_in_habitats.habitat_id INNER JOIN animals ON animals_in_habitats.animal_id = animals.id WHERE animals.conservation_status IN ('Endangered', 'Critically Endangered') GROUP BY habitats.name;","SELECT habitats.name, COUNT(animals_in_habitats.animal_id) as num_animals FROM animals INNER JOIN habitats ON animals_in_habitats.habitat_id = habitats.id WHERE animals.conservation_status = 'Endangered' OR animals.conservation_status = 'Critically Endangered' GROUP BY habitats.name;",0 Who are the top 3 suppliers of organic cotton in India?,"CREATE TABLE Suppliers (id INT, name VARCHAR(255), material VARCHAR(255), quantity INT, country VARCHAR(255)); ","SELECT name, SUM(quantity) FROM Suppliers WHERE country = 'India' AND material = 'Organic Cotton' GROUP BY name ORDER BY SUM(quantity) DESC LIMIT 3","SELECT name, quantity FROM Suppliers WHERE material = 'Organic Cotton' AND country = 'India' ORDER BY quantity DESC LIMIT 3;",0 "Create a new table named ""vessel_movement"" with columns ""vessel_id"", ""timestamp"", and ""location"".","CREATE TABLE vessel_movement (vessel_id INT, timestamp TIMESTAMP, location VARCHAR(255));","CREATE TABLE vessel_movement (vessel_id INT, timestamp TIMESTAMP, location VARCHAR(255));","CREATE TABLE vessel_movement (vessel_id INT, timestamp TIMESTAMP, location VARCHAR(255));",1 What is the Round din Ullevaal?,"CREATE TABLE table_name_23 (round VARCHAR, venue VARCHAR);","SELECT round FROM table_name_23 WHERE venue = ""ullevaal"";","SELECT round FROM table_name_23 WHERE venue = ""din ullevaal"";",0 What is the maximum duration of a single workout?,"CREATE TABLE Workout (WorkoutID INT, MemberID INT, WorkoutType VARCHAR(30), Duration INT); ",SELECT MAX(Duration) FROM Workout;,SELECT MAX(Duration) FROM Workout;,1 What is the minimum altitude for satellites in the Iridium constellation?,"CREATE TABLE iridium_satellites (satellite_id INT, name VARCHAR(100), type VARCHAR(50), altitude INT);",SELECT MIN(altitude) FROM iridium_satellites WHERE type = 'Satellite';,SELECT MIN(altitude) FROM iridium_satellites;,0 Which Class has a Number at Lincoln smaller than 1 and a Wheel Arrangement of 0-6-0?,"CREATE TABLE table_name_60 (class VARCHAR, number_at_lincoln VARCHAR, wheel_arrangement VARCHAR);","SELECT class FROM table_name_60 WHERE number_at_lincoln < 1 AND wheel_arrangement = ""0-6-0"";","SELECT class FROM table_name_60 WHERE number_at_lincoln 1 AND wheel_arrangement = ""0-6-0"";",0 Name the most bits 14-12 for output from accumulator to character bus,"CREATE TABLE table_14249278_1 (bits_14_12 INTEGER, description VARCHAR);","SELECT MIN(bits_14_12) FROM table_14249278_1 WHERE description = ""Output from accumulator to character bus"";","SELECT MAX(bits_14_12) FROM table_14249278_1 WHERE description = ""Accumulator to Character Bus"";",0 "Which studios have produced more than 50 movies in the ""movies"" table?","CREATE TABLE movies (id INT, title VARCHAR(100), release_year INT, studio_country VARCHAR(50)); ","SELECT studio_country, COUNT(*) FROM movies GROUP BY studio_country HAVING COUNT(*) > 50;",SELECT studio_country FROM movies GROUP BY studio_country HAVING COUNT(*) > 50;,0 Insert a new record into the 'Donations' table for 'Parkview Library',"CREATE TABLE Donations (donation_id INT, donor_name VARCHAR(50), location VARCHAR(50), amount DECIMAL(10,2)); ","INSERT INTO Donations (donation_id, donor_name, location, amount) VALUES (2, 'James Chen', 'Parkview Library', 100.00);","INSERT INTO Donations (donation_id, donor_name, location, amount) VALUES (1, 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library'), (2, 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library'), (3, 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview Library', 'Parkview",0 "Show the number of volunteers, total hours contributed by volunteers, and the average donation amount for each organization in the 'organizations' table.","CREATE TABLE donors (donor_id INT, donor_name TEXT, donation_amount DECIMAL, org_id INT); CREATE TABLE volunteers (volunteer_id INT, volunteer_name TEXT, hours_contributed INT, org_id INT); CREATE TABLE organizations (org_id INT, org_name TEXT);","SELECT organizations.org_name, COUNT(volunteers.volunteer_id) as num_volunteers, SUM(volunteers.hours_contributed) as total_hours, AVG(donors.donation_amount) as avg_donation FROM volunteers INNER JOIN organizations ON volunteers.org_id = organizations.org_id INNER JOIN donors ON organizations.org_id = donors.org_id GROUP BY organizations.org_name;","SELECT o.org_name, COUNT(v.volunteer_id) as num_volunteers, SUM(v.hours_contributed) as total_hours_contributed, AVG(d.donation_amount) as avg_donation FROM donors d JOIN volunteers v ON d.org_id = v.org_id JOIN organizations o ON v.org_id = o.org_id GROUP BY o.org_name;",0 "What is the total R&D expenditure for each drug category in 2022, ordered by the highest expenditure first?","CREATE TABLE rd_expenses (drug_category VARCHAR(255), expense_date DATE, expenditure DECIMAL(10, 2)); ","SELECT drug_category, SUM(expenditure) as total_expenditure FROM rd_expenses WHERE expense_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY drug_category ORDER BY total_expenditure DESC;","SELECT drug_category, SUM(expenditure) as total_expenditure FROM rd_expenses WHERE expense_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY drug_category ORDER BY total_expenditure DESC;",1 What is the To par of the Player wtih Year(s) won of 1983?,"CREATE TABLE table_name_11 (to_par INTEGER, year_s__won VARCHAR);","SELECT AVG(to_par) FROM table_name_11 WHERE year_s__won = ""1983"";","SELECT SUM(to_par) FROM table_name_11 WHERE year_s__won = ""1983"";",0 What is the total number of patients diagnosed with cancer in rural areas of each state?,"CREATE TABLE patient (patient_id INT, age INT, gender TEXT, diagnosis TEXT, state TEXT, location TEXT);","SELECT state, SUM(CASE WHEN diagnosis = 'Cancer' THEN 1 ELSE 0 END) FROM patient WHERE location LIKE '%rural%' GROUP BY state;","SELECT state, COUNT(*) FROM patient WHERE diagnosis = 'Cancer' AND location = 'Rural' GROUP BY state;",0 What are the notes during 57 bc caesar?,"CREATE TABLE table_242785_3 (notes VARCHAR, date_founded__founder VARCHAR);","SELECT notes FROM table_242785_3 WHERE date_founded__founder = ""57 BC Caesar"";","SELECT notes FROM table_242785_3 WHERE date_founded__founder = ""57 BC Causar"";",0 How many students with learning disabilities have been served by support programs in Florida in the past year?,"CREATE TABLE students (id INT PRIMARY KEY, disability VARCHAR(255), served_by_support_program BOOLEAN); CREATE TABLE support_programs_students (student_id INT, program_id INT); CREATE TABLE support_programs (id INT PRIMARY KEY, state VARCHAR(255));","SELECT COUNT(*) FROM students JOIN support_programs_students ON students.id = support_programs_students.student_id JOIN support_programs ON support_programs_students.program_id = support_programs.id WHERE students.disability = 'learning disabilities' AND support_programs.state = 'Florida' AND students.served_by_support_program = TRUE AND date >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR);",SELECT COUNT(DISTINCT students.id) FROM students INNER JOIN support_programs_students ON students.id = support_programs_students.student_id INNER JOIN support_programs ON support_programs_students.program_id = support_programs.id WHERE students.disability = 'learning disability' AND support_programs.state = 'Florida' AND students.served_by_support_program = TRUE;,0 Update the safety protocols for the 'Europe' region with the new ones provided.,"CREATE TABLE safety_protocols (region varchar(20), protocol text);",UPDATE safety_protocols SET protocol = 'New Safety Protocols' WHERE region = 'Europe';,UPDATE safety_protocols SET protocol = 'New' WHERE region = 'Europe';,0 What is the maximum monthly data usage for postpaid mobile customers in the state of New York?,"CREATE TABLE mobile_subscribers (subscriber_id INT, data_usage FLOAT, state VARCHAR(20), subscription_type VARCHAR(20)); ",SELECT MAX(data_usage) FROM mobile_subscribers WHERE state = 'New York' AND subscription_type = 'postpaid';,SELECT MAX(data_usage) FROM mobile_subscribers WHERE state = 'New York' AND subscription_type = 'postpaid';,1 List all the programs that were started in the first half of 2021.,"CREATE TABLE programs (program_id INT, program_name VARCHAR(50), program_start_date DATE);","SELECT program_name, program_start_date FROM programs WHERE program_start_date >= '2021-01-01' AND program_start_date < '2021-07-01';",SELECT program_name FROM programs WHERE program_start_date BETWEEN '2021-01-01' AND '2021-06-30';,0 "If the player is Jasmine Wynne, what is the minimum number of steals?","CREATE TABLE table_23346303_5 (steals INTEGER, player VARCHAR);","SELECT MIN(steals) FROM table_23346303_5 WHERE player = ""Jasmine Wynne"";","SELECT MIN(steals) FROM table_23346303_5 WHERE player = ""Jasmine Wynne"";",1 "What is the average delivery time, in days, for orders placed with fair trade certified suppliers?","CREATE TABLE orders (id INT PRIMARY KEY, supplier_id INT, delivery_time INT, fair_trade_certified BOOLEAN); CREATE TABLE suppliers (id INT PRIMARY KEY, name VARCHAR(50), fair_trade_certified BOOLEAN); ",SELECT AVG(delivery_time) as avg_delivery_time FROM orders JOIN suppliers ON orders.supplier_id = suppliers.id WHERE fair_trade_certified = true;,SELECT AVG(delivery_time) FROM orders JOIN suppliers ON orders.supplier_id = suppliers.id WHERE suppliers.fair_trade_certified = true;,0 "What is the Outcome of the match with a Score of 6–3, 6–4?","CREATE TABLE table_name_2 (outcome VARCHAR, score VARCHAR);","SELECT outcome FROM table_name_2 WHERE score = ""6–3, 6–4"";","SELECT outcome FROM table_name_2 WHERE score = ""6–3, 6–4"";",1 What is the difference in delivery time between the first and last shipments for each warehouse?,"CREATE TABLE Warehouse (id INT, location VARCHAR(255), capacity INT); CREATE TABLE Shipment (id INT, warehouse_id INT, delivery_time INT); ","SELECT warehouse_id, MAX(delivery_time) - MIN(delivery_time) FROM Shipment GROUP BY warehouse_id;","SELECT Warehouse.location, Warehouse.capacity, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.delivery_time, Warehouse.",0 "Find the percentage of people without health insurance in each census tract, ordered from the highest to lowest?","CREATE TABLE census_data (id INT, tract TEXT, uninsured INT, population INT); ","SELECT tract, (SUM(uninsured) OVER (PARTITION BY tract)) * 100.0 / SUM(population) OVER (PARTITION BY tract) as pct_uninsured FROM census_data ORDER BY pct_uninsured DESC;","SELECT tract, (uninsured / population) * 100.0 / population FROM census_data GROUP BY tract ORDER BY uninsured DESC;",0 List the names of the top 5 most actively used decentralized applications in South America.,"CREATE TABLE dapps (id INT, name TEXT, active_users INT, region TEXT); ","SELECT name, active_users FROM dapps WHERE region = 'South America' ORDER BY active_users DESC LIMIT 5;","SELECT name, active_users FROM dapps WHERE region = 'South America' ORDER BY active_users DESC LIMIT 5;",1 On what day(s) did the Gophers play against Michigan?,"CREATE TABLE table_name_88 (date VARCHAR, opponent_number VARCHAR);","SELECT date FROM table_name_88 WHERE opponent_number = ""michigan"";","SELECT date FROM table_name_88 WHERE opponent_number = ""michigan"";",1 Delete all soccer matches that had less than 2 goals scored.,"CREATE TABLE matches (match_id INT, match_name VARCHAR(50), goals INT); ",DELETE FROM matches WHERE goals < 2;,DELETE FROM matches WHERE goals 2;,0 Name the lead with left bloc of 8.4%,"CREATE TABLE table_name_25 (lead VARCHAR, left_bloc VARCHAR);","SELECT lead FROM table_name_25 WHERE left_bloc = ""8.4%"";","SELECT lead FROM table_name_25 WHERE left_bloc = ""8.4%"";",1 "Identify the average attendance at events in ""Underprivileged Communities"" category and its standard deviation","CREATE TABLE events (event_id INT, event_name VARCHAR(50), event_type VARCHAR(30), city VARCHAR(30), attendance INT); ","SELECT AVG(attendance) as avg_attendance, STDDEV(attendance) as stddev_attendance FROM events WHERE city = 'Underprivileged Communities';","SELECT AVG(attendance) as avg_attendance, SUM(attendance) as standard_deviation FROM events WHERE event_type = 'Underprivileged Communities';",0 What team did the New York Rangers recruit a player from?,"CREATE TABLE table_2886617_4 (college_junior_club_team VARCHAR, nhl_team VARCHAR);","SELECT college_junior_club_team FROM table_2886617_4 WHERE nhl_team = ""New York Rangers"";","SELECT college_junior_club_team FROM table_2886617_4 WHERE nhl_team = ""New York Rangers"";",1 Display the total claim amounts and policy types for claims over $3000.,"CREATE TABLE claim_2 (claim_id INT, claim_type VARCHAR(20), claim_amount FLOAT, policy_type VARCHAR(20)); ","SELECT policy_type, SUM(claim_amount) FROM claim_2 WHERE claim_amount > 3000 GROUP BY policy_type;","SELECT policy_type, SUM(claim_amount) FROM claim_2 WHERE claim_amount > 3000 GROUP BY policy_type;",1 How many successful satellite deployments were there in China since 2010?,"CREATE TABLE SatelliteDeployments (id INT, country VARCHAR(255), year INT, success BOOLEAN); ",SELECT COUNT(*) FROM SatelliteDeployments WHERE country = 'China' AND success = true AND year >= 2010;,SELECT COUNT(*) FROM SatelliteDeployments WHERE country = 'China' AND year >= 2010 AND success = TRUE;,0 How many LOA metres were there when the skipper is lou abrahams?,"CREATE TABLE table_25594271_2 (loa__metres_ VARCHAR, skipper VARCHAR);","SELECT loa__metres_ FROM table_25594271_2 WHERE skipper = ""Lou Abrahams"";","SELECT COUNT(loa__metres_) FROM table_25594271_2 WHERE skipper = ""Lou Abrahams"";",0 How many votes did candice sjostrom receive?,"CREATE TABLE table_name_94 (popular_votes INTEGER, candidate VARCHAR);","SELECT AVG(popular_votes) FROM table_name_94 WHERE candidate = ""candice sjostrom"";","SELECT SUM(popular_votes) FROM table_name_94 WHERE candidate = ""candice sjostrom"";",0 What is the greatest total score received by aylar & egor when karianne Gulliksen gave an 8?,"CREATE TABLE table_28677723_16 (total INTEGER, couple VARCHAR, karianne_gulliksen VARCHAR);","SELECT MAX(total) FROM table_28677723_16 WHERE couple = ""Aylar & Egor"" AND karianne_gulliksen = 8;","SELECT MAX(total) FROM table_28677723_16 WHERE couple = ""Aylar & Egor"" AND karianne_gulliksen = ""8"";",0 What is the highest gold for Cambodia when the total is less than 1?,"CREATE TABLE table_name_94 (gold INTEGER, country VARCHAR, total VARCHAR);","SELECT MAX(gold) FROM table_name_94 WHERE country = ""cambodia"" AND total < 1;","SELECT MAX(gold) FROM table_name_94 WHERE country = ""cambodge"" AND total 1;",0 What was the series where a team scored 56 points?,"CREATE TABLE table_25369796_1 (series VARCHAR, points VARCHAR);","SELECT series FROM table_25369796_1 WHERE points = ""56"";","SELECT series FROM table_25369796_1 WHERE points = ""56"";",1 What is the average total medals of the nation with 4 bronze and more than 1 silver medals?,"CREATE TABLE table_name_94 (total INTEGER, bronze VARCHAR, silver VARCHAR);",SELECT AVG(total) FROM table_name_94 WHERE bronze = 4 AND silver > 1;,SELECT AVG(total) FROM table_name_94 WHERE bronze = 4 AND silver > 1;,1 Update the network_investments table to correct a typo for 'Rural' area in the 'North' region.,"CREATE TABLE network_investments (investment_id INT, region_varchar(255), area VARCHAR(255), investment_amount DECIMAL(10, 2), investment_date DATE); ",UPDATE network_investments SET area = 'Rural' WHERE investment_id = 1;,UPDATE network_investments SET area = 'Rural' WHERE region_name = 'North';,0 Delete all records in the 'winter 2021' collection with a production cost below 10.,"CREATE TABLE production_costs (item_type VARCHAR(20), collection VARCHAR(20), cost NUMERIC(10,2), quantity INT); ",DELETE FROM production_costs WHERE collection = 'winter 2021' AND cost < 10;,DELETE FROM production_costs WHERE collection = 'winter 2021' AND cost 10;,0 Where was the round 1 race?,"CREATE TABLE table_25773116_2 (location VARCHAR, round VARCHAR);",SELECT location FROM table_25773116_2 WHERE round = 1;,SELECT location FROM table_25773116_2 WHERE round = 1;,1 What is the total rainfall (in inches) for each region in Texas in the first half of 2022?,"CREATE TABLE regions (id INT, name VARCHAR(255)); CREATE TABLE rainfall (region_id INT, rainfall DECIMAL(5,2), date DATE); ","SELECT region_id, SUM(rainfall) as total_rainfall FROM rainfall WHERE date BETWEEN '2022-01-01' AND '2022-06-30' GROUP BY region_id;","SELECT r.name, SUM(r.rainfall) as total_rainfall FROM regions r JOIN rainfall r ON r.id = r.region_id WHERE r.name = 'Texas' AND r.date BETWEEN '2022-01-01' AND '2022-06-30' GROUP BY r.name;",0 What is the average age of military personnel in the 'Air Force'?,"CREATE TABLE MilitaryPersonnel (id INT, name VARCHAR(100), rank VARCHAR(50), service VARCHAR(50), age INT); ",SELECT AVG(age) FROM MilitaryPersonnel WHERE service = 'Air Force';,SELECT AVG(age) FROM MilitaryPersonnel WHERE service = 'Air Force';,1 Update the weight of the 'Elephant' in the 'Forest' habitat to 5500.0.,"CREATE TABLE animals (id INT, animal_name VARCHAR(255), habitat_type VARCHAR(255), weight DECIMAL(5,2)); ",UPDATE animals SET weight = 5500.0 WHERE animal_name = 'Elephant' AND habitat_type = 'Forest';,UPDATE animals SET weight = 5500.0 WHERE animal_name = 'Elephant' AND habitat_type = 'Forest';,1 "Determine the number of machines in each ethical manufacturing facility that use renewable energy sources and the percentage of machines using renewable energy, sorted by the percentage in descending order.","CREATE TABLE ethical_manufacturing_facilities (id INT PRIMARY KEY, facility_name VARCHAR(255), location VARCHAR(255), total_machines INT, renewable_energy BOOLEAN); ","SELECT facility_name, location, total_machines, 100.0 * SUM(renewable_energy) / COUNT(*) as percentage FROM ethical_manufacturing_facilities GROUP BY facility_name, location ORDER BY percentage DESC;","SELECT facility_name, SUM(total_machines) as total_machines, (SUM(total_machines) OVER (PARTITION BY facility_name ORDER BY SUM(total_machines) DESC)) as percentage FROM ethical_manufacturing_facilities WHERE renewable_energy = true GROUP BY facility_name ORDER BY percentage DESC;",0 What is the total inventory cost for the NY region?,"CREATE TABLE inventory (item_id INT, item_name TEXT, quantity INT, cost_per_unit DECIMAL(5,2), region TEXT); ",SELECT SUM(quantity * cost_per_unit) as total_inventory_cost FROM inventory WHERE region = 'NY';,SELECT SUM(cost_per_unit) FROM inventory WHERE region = 'NY';,0 Find the total amount of socially responsible loans issued in Europe in 2021.,"CREATE TABLE loans (id INT, type TEXT, value DECIMAL, issued_date DATE); ",SELECT SUM(value) FROM loans WHERE type = 'Socially Responsible' AND issued_date BETWEEN '2021-01-01' AND '2021-12-31';,SELECT SUM(value) FROM loans WHERE type = 'Socially Responsible' AND issued_date BETWEEN '2021-01-01' AND '2021-12-31';,1 What was the office up for election when Sylvia Weinstein ran under the Socialist Workers ticket?,"CREATE TABLE table_name_55 (office VARCHAR, socialist_workers_ticket VARCHAR);","SELECT office FROM table_name_55 WHERE socialist_workers_ticket = ""sylvia weinstein"";","SELECT office FROM table_name_55 WHERE socialist_workers_ticket = ""sylvia weinstein"";",1 Which players have a pick number of 27?,"CREATE TABLE table_10975034_4 (player VARCHAR, pick__number VARCHAR);",SELECT player FROM table_10975034_4 WHERE pick__number = 27;,SELECT player FROM table_10975034_4 WHERE pick__number = 27;,1 What is the total salary expense for each department?,"CREATE TABLE Employees (EmployeeID INT, Gender VARCHAR(10), Department VARCHAR(20), Salary FLOAT); ","SELECT Department, SUM(Salary) FROM Employees GROUP BY Department;","SELECT Department, SUM(Salary) FROM Employees GROUP BY Department;",1 "What is the college/junior/club team (league) of lw position player mark miller, from a round greater than 4?","CREATE TABLE table_name_7 (college_junior_club_team__league_ VARCHAR, player VARCHAR, round VARCHAR, position VARCHAR);","SELECT college_junior_club_team__league_ FROM table_name_7 WHERE round > 4 AND position = ""lw"" AND player = ""mark miller"";","SELECT college_junior_club_team__league_ FROM table_name_7 WHERE round > 4 AND position = ""lw"" AND player = ""mark miller"";",1 WHAT IS THE SCORE WITH $85 FOR CLARENCE HACKNEY?,"CREATE TABLE table_name_96 (score VARCHAR, money___$__ VARCHAR, player VARCHAR);","SELECT score FROM table_name_96 WHERE money___$__ = 85 AND player = ""clarence hackney"";","SELECT score FROM table_name_96 WHERE money___$__ = 85 AND player = ""clarence hackney"";",1 How big was the crowd at the game the away team geelong played at?,"CREATE TABLE table_name_31 (crowd INTEGER, away_team VARCHAR);","SELECT SUM(crowd) FROM table_name_31 WHERE away_team = ""geelong"";","SELECT SUM(crowd) FROM table_name_31 WHERE away_team = ""geelong"";",1 What is the maximum age of all employees?,"CREATE TABLE Employees (EmployeeID INT, Age INT); ",SELECT MAX(Age) FROM Employees;,SELECT MAX(Age) FROM Employees;,1 What is the total value of transactions processed in the European Union in the last week?,"CREATE TABLE transaction_processing (transaction_id INT, region TEXT, amount DECIMAL(10,2)); ","SELECT SUM(amount) FROM transaction_processing WHERE region = 'European Union' AND transaction_date BETWEEN DATE_SUB(NOW(), INTERVAL 1 WEEK) AND NOW();","SELECT SUM(amount) FROM transaction_processing WHERE region = 'European Union' AND transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK);",0 Which document type is described with the prefix 'Initial'?,"CREATE TABLE Document_Types (document_type_code VARCHAR, document_description VARCHAR);",SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%';,"SELECT document_type_code FROM Document_Types WHERE document_description = ""Initial"";",0 How many airports haven't the pilot 'Thompson' driven an aircraft?,"CREATE TABLE airport (id VARCHAR, airport_id VARCHAR, pilot VARCHAR); CREATE TABLE flight (id VARCHAR, airport_id VARCHAR, pilot VARCHAR);",SELECT COUNT(*) FROM airport WHERE NOT id IN (SELECT airport_id FROM flight WHERE pilot = 'Thompson');,SELECT COUNT(*) FROM airport AS T1 JOIN flight AS T2 ON T1.airport_id = T2.airport_id WHERE T2.pilot = 'Thompson';,0 What is the 1st leg where Team 1 is C.D. Plaza Amador?,CREATE TABLE table_name_12 (team_1 VARCHAR);,"SELECT 1 AS st_leg FROM table_name_12 WHERE team_1 = ""c.d. plaza amador"";","SELECT 1 AS st_leg FROM table_name_12 WHERE team_1 = ""c.d. plaza amador"";",1 "Insert a new cultural competency training in Chicago, IL on 2022-04-01.","CREATE TABLE cultural_competency_trainings (training_id INT, location VARCHAR(50), date DATE);","INSERT INTO cultural_competency_trainings (training_id, location, date) VALUES (4, 'Chicago, IL', '2022-04-01');","INSERT INTO cultural_competency_trainings (training_id, location, date) VALUES (1, 'Chicago, IL', '2022-04-01');",0 what is the tournament when in 2012 the performance was 2r?,CREATE TABLE table_name_38 (tournament VARCHAR);,"SELECT tournament FROM table_name_38 WHERE 2012 = ""2r"";","SELECT tournament FROM table_name_38 WHERE 2012 = ""2r"";",1 What is the distribution of employee salaries by gender?,"CREATE TABLE employees (id INT, name VARCHAR(255), gender VARCHAR(255), salary DECIMAL(10,2)); ","SELECT gender, AVG(salary) as avg_salary, MIN(salary) as min_salary, MAX(salary) as max_salary FROM employees GROUP BY gender;","SELECT gender, SUM(salary) as total_salary FROM employees GROUP BY gender;",0 What country has a place of 4?,"CREATE TABLE table_name_66 (country VARCHAR, place VARCHAR);","SELECT country FROM table_name_66 WHERE place = ""4"";","SELECT country FROM table_name_66 WHERE place = ""4"";",1 What position is the player Jordan Fransoo in?,"CREATE TABLE table_11803648_20 (position VARCHAR, player VARCHAR);","SELECT position FROM table_11803648_20 WHERE player = ""Jordan Fransoo"";","SELECT position FROM table_11803648_20 WHERE player = ""Jordan Fransoo"";",1 Find the average amount donated by donors in the 'Educational' program.,"CREATE TABLE Donations (donation_id INT PRIMARY KEY, donor_id INT, program TEXT, amount INT);",SELECT AVG(amount) FROM Donations WHERE program = 'Educational';,SELECT AVG(amount) FROM Donations WHERE program = 'Educational';,1 "WHAT IS THE HIGHEST WINS WITH A SERIES OF BRITISH FORMULA THREE, SEASON 2005, POLES SMALLER THAN 0?","CREATE TABLE table_name_89 (wins INTEGER, poles VARCHAR, series VARCHAR, season VARCHAR);","SELECT MAX(wins) FROM table_name_89 WHERE series = ""british formula three"" AND season = ""2005"" AND poles < 0;","SELECT MAX(wins) FROM table_name_89 WHERE series = ""britain formula three"" AND season = ""2005"" AND poles 0;",0 What is the minimum fare for trains in the 'west' region?,"CREATE TABLE train_fares (fare_id INT, region_id INT, fare DECIMAL(5,2)); ",SELECT MIN(tf.fare) FROM train_fares tf INNER JOIN regions r ON tf.region_id = r.region_id WHERE r.region_name = 'west';,SELECT MIN(fare) FROM train_fares WHERE region_id = 1;,0 How many donors have contributed over $5000 in the last 3 years?,"CREATE TABLE Donors (DonorID INT, DonationAmount DECIMAL(10,2), DonationDate DATE); ","SELECT COUNT(DISTINCT DonorID) FROM Donors WHERE DonationAmount > 5000 AND DonationDate >= DATE_SUB(CURDATE(), INTERVAL 3 YEAR);","SELECT COUNT(*) FROM Donors WHERE DonationAmount > 500 AND DonationDate >= DATEADD(year, -3, GETDATE());",0 List all unique mining operations in Africa.,"CREATE TABLE MiningOperations (Company VARCHAR(50), Operation VARCHAR(50), Location VARCHAR(10)); ",SELECT DISTINCT Operation FROM MiningOperations WHERE Location = 'Africa',SELECT DISTINCT Operation FROM MiningOperations WHERE Location = 'Africa';,0 What is the total number of security incidents reported in the APAC region in the last quarter?,"CREATE TABLE incident_reports (id INT, region VARCHAR(255), date DATE); ","SELECT COUNT(*) FROM incident_reports WHERE region = 'APAC' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 90 DAY);","SELECT COUNT(*) FROM incident_reports WHERE region = 'APAC' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH);",0 What is the Element when the Nuclide is 55 mn?,"CREATE TABLE table_name_79 (element VARCHAR, nuclide VARCHAR);","SELECT element FROM table_name_79 WHERE nuclide = ""55 mn"";","SELECT element FROM table_name_79 WHERE nuclide = ""55 mn"";",1 What are the top 3 beauty product categories with the highest sales in the Asian region?,"CREATE TABLE sales_data (sale_id INT, product_id INT, country VARCHAR(50), category VARCHAR(50), revenue DECIMAL(10,2), sale_date DATE);","SELECT category, SUM(revenue) as total_revenue FROM sales_data WHERE sale_date >= '2022-01-01' AND country LIKE 'Asia%' GROUP BY category ORDER BY total_revenue DESC LIMIT 3;","SELECT category, SUM(revenue) as total_revenue FROM sales_data WHERE country = 'Asia' GROUP BY category ORDER BY total_revenue DESC LIMIT 3;",0 Who are all the Moto2 winners when the grand prix was Shell Advance Malaysian Grand Prix?,"CREATE TABLE table_26781017_1 (moto2_winner VARCHAR, grand_prix VARCHAR);","SELECT moto2_winner FROM table_26781017_1 WHERE grand_prix = ""Shell Advance Malaysian grand_prix"";","SELECT moto2_winner FROM table_26781017_1 WHERE grand_prix = ""Shell Advance Malaysian Grand Prix"";",0 Identify the number of creative AI applications and their average satisfaction score for each country in the Americas.,"CREATE TABLE creative_ai (id INT, app_name VARCHAR(50), satisfaction_score INT, country VARCHAR(50)); CREATE TABLE countries (id INT, country VARCHAR(50), region VARCHAR(50)); ","SELECT c.region, c.country, AVG(creative_ai.satisfaction_score), COUNT(creative_ai.app_name) FROM creative_ai INNER JOIN countries c ON creative_ai.country = c.country WHERE c.region = 'Americas' GROUP BY c.region, c.country;","SELECT c.country, COUNT(c.id) as num_applications, AVG(c.satisfaction_score) as avg_satisfaction_score FROM creative_ai c JOIN countries c ON c.country = c.country WHERE c.region = 'Americas' GROUP BY c.country;",0 What is the name of the Guest Host for Episode Number of 5?,"CREATE TABLE table_name_73 (guest_host VARCHAR, episode_number VARCHAR);",SELECT guest_host FROM table_name_73 WHERE episode_number = 5;,SELECT guest_host FROM table_name_73 WHERE episode_number = 5;,1 What was Jack Brabham's highest grid when his laps were more than 90?,"CREATE TABLE table_name_76 (grid INTEGER, driver VARCHAR, laps VARCHAR);","SELECT MAX(grid) FROM table_name_76 WHERE driver = ""jack brabham"" AND laps > 90;","SELECT MAX(grid) FROM table_name_76 WHERE driver = ""jack brabham"" AND laps > 90;",1 "What is Surface, when Date is less than 1979, and when Opponent in the Final is ""Bill Scanlon""?","CREATE TABLE table_name_45 (surface VARCHAR, date VARCHAR, opponent_in_the_final VARCHAR);","SELECT surface FROM table_name_45 WHERE date < 1979 AND opponent_in_the_final = ""bill scanlon"";","SELECT surface FROM table_name_45 WHERE date 1979 AND opponent_in_the_final = ""bill scanlon"";",0 What is the percentage of total watch time that is spent on entertainment videos in each country?,"CREATE TABLE users (id INT, country VARCHAR(50)); CREATE TABLE videos (id INT, type VARCHAR(50)); CREATE TABLE user_video_view (user_id INT, video_id INT, watch_time INT);","SELECT u.country, 100.0 * SUM(CASE WHEN v.type = 'Entertainment' THEN uvv.watch_time ELSE 0 END) / SUM(uvv.watch_time) as pct FROM user_video_view uvv JOIN users u ON uvv.user_id = u.id JOIN videos v ON uvv.video_id = v.id GROUP BY u.country;","SELECT u.country, 100.0 * SUM(uv.watch_time) / (SELECT SUM(uv.watch_time) FROM user_video_view uv JOIN videos v ON uv.video_id = v.id WHERE v.type = 'Entertainment' GROUP BY u.country) as percentage FROM users u JOIN user_video_view uv ON u.id = uv.id GROUP BY u.country;",0 "What was the attendance at the game before week 8, held on October 25, 1981?","CREATE TABLE table_name_62 (attendance INTEGER, date VARCHAR, week VARCHAR);","SELECT SUM(attendance) FROM table_name_62 WHERE date = ""october 25, 1981"" AND week < 8;","SELECT AVG(attendance) FROM table_name_62 WHERE date = ""october 25, 1981"" AND week 8;",0 What is the total revenue for each category of dishes in Australia?,"CREATE TABLE sales (id INT, dish_id INT, date DATE, quantity INT, price DECIMAL(5,2));CREATE VIEW dishes_view AS SELECT d.id, d.name, c.category FROM dishes d JOIN categories c ON d.category_id = c.id;","SELECT c.category, SUM(s.quantity * s.price) AS total_revenue FROM sales s JOIN dishes_view d ON s.dish_id = d.id JOIN categories c ON d.category = c.id WHERE c.country = 'Australia' GROUP BY c.category;","SELECT c.category, SUM(s.quantity * s.price) as total_revenue FROM sales s JOIN dishes_view d ON s.dish_id = d.id WHERE d.country = 'Australia' GROUP BY c.category;",0 "List all cases with a 'Settled' outcome, their corresponding attorney's name, and the client's region.","CREATE TABLE Cases (CaseID INT, ClientID INT, Outcome TEXT); CREATE TABLE CaseAttorneys (CaseID INT, AttorneyID INT); CREATE TABLE Attorneys (AttorneyID INT, Name TEXT); CREATE TABLE Clients (ClientID INT, Region TEXT); ","SELECT Clients.Region, Attorneys.Name, Cases.Outcome FROM Cases INNER JOIN CaseAttorneys ON Cases.CaseID = CaseAttorneys.CaseID INNER JOIN Attorneys ON CaseAttorneys.AttorneyID = Attorneys.AttorneyID INNER JOIN Clients ON Cases.ClientID = Clients.ClientID WHERE Cases.Outcome = 'Settled';","SELECT Cases.Outcome, Attorneys.Name, Clients.Region FROM Cases INNER JOIN CaseAttorneys ON Cases.ClientID = CaseAttorneys.ClientID INNER JOIN Attorneys ON CaseAttorneys.AttorneyID = Attorneys.AttorneyID INNER JOIN Clients ON CaseAttorneys.ClientID = Clients.ClientID WHERE Cases.Outcome = 'Settled';",0 Identify the most cited creative AI application in the 'AI_Fairness' schema.,"CREATE SCHEMA AI_Fairness;CREATE TABLE Creative_AI (app_id INT, safety_score FLOAT, citations INT); ","SELECT app_id, MAX(citations) FROM AI_Fairness.Creative_AI GROUP BY app_id;","SELECT app_id, safety_score, citations FROM AI_Fairness.Creative_AI ORDER BY citations DESC LIMIT 1;",0 How many artworks were created each year by Asian artists?,"CREATE TABLE Artworks (id INT, artist VARCHAR(20), title VARCHAR(50), year INT, type VARCHAR(20)); ","SELECT year, COUNT(*) AS artworks_per_year FROM Artworks WHERE artist LIKE 'Asian Artist%' GROUP BY year ORDER BY year;","SELECT year, COUNT(*) FROM Artworks WHERE artist LIKE '%Asia%' GROUP BY year;",0 What is the total number of attendees at 'Art in the Park' events in the summer months?,"CREATE TABLE SeasonalAttendance (event_name VARCHAR(50), event_month INT, attendee_count INT); ",SELECT SUM(attendee_count) FROM SeasonalAttendance WHERE event_name = 'Art in the Park' AND event_month BETWEEN 6 AND 8;,SELECT SUM(attendee_count) FROM SeasonalAttendance WHERE event_name = 'Art in the Park' AND event_month ='summer';,0 "What is Born-Died, when Name is Maliq Bushati?","CREATE TABLE table_name_27 (born_died VARCHAR, name VARCHAR);","SELECT born_died FROM table_name_27 WHERE name = ""maliq bushati"";","SELECT born_died FROM table_name_27 WHERE name = ""maliq bushati"";",1 "How many League Cup Goals have Total Apps of 36, and Total Goals smaller than 1?","CREATE TABLE table_name_76 (league_cup_goals VARCHAR, total_apps VARCHAR, total_goals VARCHAR);","SELECT COUNT(league_cup_goals) FROM table_name_76 WHERE total_apps = ""36"" AND total_goals < 1;",SELECT COUNT(league_cup_goals) FROM table_name_76 WHERE total_apps = 36 AND total_goals 1;,0 What are the total transaction amounts for transactions that occurred in the last 30 days?,"CREATE TABLE Transactions (TransactionID INT, TransactionDate DATE, Amount DECIMAL(18,2));","SELECT SUM(Amount) FROM Transactions WHERE TransactionDate >= DATEADD(day,-30,GETDATE());","SELECT SUM(Amount) FROM Transactions WHERE TransactionDate >= DATEADD(day, -30, GETDATE());",0 Who are the top 3 users with the highest total workout duration in the month of February 2022?,"CREATE TABLE WorkoutData (UserID INT, WorkoutDate DATE, Duration INT); ","SELECT UserID, SUM(Duration) AS TotalDuration FROM WorkoutData WHERE WorkoutDate >= '2022-02-01' AND WorkoutDate <= '2022-02-28' GROUP BY UserID ORDER BY TotalDuration DESC LIMIT 3;","SELECT UserID, SUM(Duration) as TotalDuration FROM WorkoutData WHERE WorkoutDate BETWEEN '2022-02-01' AND '2022-02-28' GROUP BY UserID ORDER BY TotalDuration DESC LIMIT 3;",0 How many landfills are there in Africa with a capacity greater than 10000 tons as of 2021?',"CREATE TABLE landfills (country VARCHAR(50), capacity INT, year INT); ","SELECT COUNT(*) as num_landfills FROM landfills WHERE capacity > 10000 AND year = 2021 AND country IN ('Nigeria', 'Egypt', 'South Africa', 'Algeria', 'Morocco');",SELECT COUNT(*) FROM landfills WHERE country = 'Africa' AND capacity > 10000 AND year = 2021;,0 "What is the average water usage per day at each mine site in January 2020, only showing sites with usage over 5000 liters per day?","CREATE TABLE Water_Usage (Id INT, Mine_Site VARCHAR(50), Usage INT, Date DATE); ","SELECT Mine_Site, AVG(Usage) as Average_Water_Usage FROM Water_Usage WHERE Date >= '2020-01-01' AND Date < '2020-02-01' GROUP BY Mine_Site HAVING Average_Water_Usage > 5000;","SELECT Mine_Site, AVG(Usage) FROM Water_Usage WHERE Date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY Mine_Site;",0 Which Weekly Rank has an Official ratings (millions) of 11.58?,"CREATE TABLE table_name_82 (weekly_rank VARCHAR, official_ratings__millions_ VARCHAR);",SELECT weekly_rank FROM table_name_82 WHERE official_ratings__millions_ = 11.58;,"SELECT weekly_rank FROM table_name_82 WHERE official_ratings__millions_ = ""11.58"";",0 What day did the team play on week 8?,"CREATE TABLE table_name_55 (date VARCHAR, week VARCHAR);",SELECT date FROM table_name_55 WHERE week = 8;,SELECT date FROM table_name_55 WHERE week = 8;,1 What was the winning score for the Andy Williams-San Diego Open Invitational tournament?,"CREATE TABLE table_name_60 (winning_score VARCHAR, tournament VARCHAR);","SELECT winning_score FROM table_name_60 WHERE tournament = ""andy williams-san diego open invitational"";","SELECT winning_score FROM table_name_60 WHERE tournament = ""andy williams-san diego open invitational"";",1 Delete the record of 'Michael Brown' from 'clinic_CA'.,"CREATE TABLE clinic_CA (patient_id INT, name VARCHAR(50)); ",DELETE FROM clinic_CA WHERE name = 'Michael Brown';,DELETE FROM clinic_CA WHERE name = 'Michael Brown';,1 "List the top 3 donors by total donation amount to a disaster response in the Americas, with detailed information about the disaster and the recipient organizations?","CREATE TABLE disaster (disaster_id INT, name VARCHAR(255), location VARCHAR(255), start_date DATE); CREATE TABLE donation (donation_id INT, disaster_id INT, donor_id INT, amount DECIMAL(10,2)); CREATE TABLE donor (donor_id INT, name VARCHAR(255), type VARCHAR(255)); CREATE TABLE organization (org_id INT, name VARCHAR(255), type VARCHAR(255)); ","SELECT donor.name, SUM(donation.amount) as total_donation, disaster.name, organization.name as recipient FROM donation JOIN donor ON donation.donor_id = donor.donor_id JOIN disaster ON donation.disaster_id = disaster.disaster_id JOIN organization ON disaster.org_id = organization.org_id WHERE disaster.location = 'Americas' GROUP BY donor.name ORDER BY total_donation DESC LIMIT 3;","SELECT d.name, SUM(d.amount) as total_donation FROM disaster d JOIN donation d ON d.disaster_id = d.disaster_id JOIN donor d ON d.donor_id = d.donor_id JOIN organization o ON d.org_id = o.org_id WHERE d.location = 'Americas' GROUP BY d.name ORDER BY total_donation DESC LIMIT 3;",0 "What is the average total value locked in smart contracts for each blockchain platform, for the last month?","CREATE TABLE SmartContract (ContractID INT, ContractValue FLOAT, ContractPlatform VARCHAR(50), ContractDate DATE); ALTER TABLE SmartContract ADD COLUMN ContractDate DATE;","SELECT ContractPlatform, AVG(ContractValue) as AverageValue FROM SmartContract WHERE ContractDate >= DATEADD(month, -1, GETDATE()) GROUP BY ContractPlatform;","SELECT ContractPlatform, AVG(ContractValue) FROM SmartContract WHERE ContractDate >= DATEADD(month, -1, GETDATE()) GROUP BY ContractPlatform;",0 How many circular economy initiatives were implemented in the commercial sector in 2018?,"CREATE TABLE CircularEconomy (year INT, sector VARCHAR(20), initiatives INT); ",SELECT initiatives FROM CircularEconomy WHERE year = 2018 AND sector = 'commercial';,SELECT initiatives FROM CircularEconomy WHERE year = 2018 AND sector = 'Commercial';,0 What is the minimum balance for customers from France?,"CREATE TABLE customers (id INT, name VARCHAR(255), country VARCHAR(255)); CREATE TABLE accounts (id INT, customer_id INT, balance DECIMAL(10, 2)); ",SELECT MIN(a.balance) FROM accounts a JOIN customers c ON a.customer_id = c.id WHERE c.country = 'France';,SELECT MIN(accounts.balance) FROM accounts INNER JOIN customers ON accounts.customer_id = customers.id WHERE customers.country = 'France';,0 What is the change in property size for each property in the USA over time?,"CREATE TABLE property_sizes (id INT, size INT, property_id INT, measurement_time TIMESTAMP); ","SELECT property_id, size, measurement_time, LEAD(size) OVER (PARTITION BY property_id ORDER BY measurement_time) - size as size_change FROM property_sizes WHERE country = 'USA';","SELECT property_id, size, measurement_time, ROW_NUMBER() OVER (PARTITION BY property_id ORDER BY measurement_time DESC) as rn FROM property_sizes WHERE country = 'USA';",0 What is the Gold for the Nation in Rank 4 with less than 1 Silver?,"CREATE TABLE table_name_37 (gold INTEGER, rank VARCHAR, silver VARCHAR);",SELECT MIN(gold) FROM table_name_37 WHERE rank = 4 AND silver < 1;,SELECT SUM(gold) FROM table_name_37 WHERE rank = 4 AND silver 1;,0 What are the claim dates and settlement dates of all the settlements?,"CREATE TABLE Settlements (Date_Claim_Made VARCHAR, Date_Claim_Settled VARCHAR);","SELECT Date_Claim_Made, Date_Claim_Settled FROM Settlements;","SELECT Date_Claim_Made, Date_Claim_Settled FROM Settlements;",1 What are the years for Kawerau Putauaki School?,"CREATE TABLE table_name_98 (years VARCHAR, name VARCHAR);","SELECT years FROM table_name_98 WHERE name = ""kawerau putauaki school"";","SELECT years FROM table_name_98 WHERE name = ""kawerau putauaki school"";",1 "List all property co-ownerships in the ""InclusiveCity"" schema, including co-owners' names and contact information.","CREATE TABLE CoOwnership (id INT, property_id INT, coowner VARCHAR(30), contact_info VARCHAR(50)); CREATE TABLE Property (id INT, city VARCHAR(20)); ","SELECT CoOwnership.coowner, CoOwnership.contact_info, Property.city FROM CoOwnership INNER JOIN Property ON CoOwnership.property_id = Property.id WHERE Property.city = 'InclusiveCity';","SELECT CoOwnership.coowner, CoOwnership.contact_info FROM CoOwnership INNER JOIN Property ON CoOwnership.property_id = Property.id WHERE Property.city = 'InclusiveCity';",0 What was the final score when River Plate was the runner-up?,"CREATE TABLE table_2208838_2 (result VARCHAR, runner_up VARCHAR);","SELECT result FROM table_2208838_2 WHERE runner_up = ""River Plate"";","SELECT result FROM table_2208838_2 WHERE runner_up = ""River Plate"";",1 Which race number in the Indy F3 Challenge circuit had John Martin in pole position?,"CREATE TABLE table_15530244_2 (race VARCHAR, circuit VARCHAR, pole_position VARCHAR);","SELECT race FROM table_15530244_2 WHERE circuit = ""Indy F3 Challenge"" AND pole_position = ""John Martin"";","SELECT race FROM table_15530244_2 WHERE circuit = ""Indy F3 Challenge"" AND pole_position = ""John Martin"";",1 What is the average allocation for all climate initiatives in 'Asia'?,"CREATE TABLE climate_funding (id INT, allocation FLOAT, initiative_type TEXT, region_id INT); CREATE TABLE regions (id INT, region TEXT); ",SELECT AVG(allocation) FROM climate_funding INNER JOIN regions ON climate_funding.region_id = regions.id WHERE regions.region = 'Asia';,SELECT AVG(cf.allocation) FROM climate_funding cf INNER JOIN regions r ON cf.region_id = r.id WHERE r.region = 'Asia';,0 "Which Match Report has a Date of october 26, 2008?","CREATE TABLE table_name_83 (match_report VARCHAR, date VARCHAR);","SELECT match_report FROM table_name_83 WHERE date = ""october 26, 2008"";","SELECT match_report FROM table_name_83 WHERE date = ""october 26, 2008"";",1 what is the swimsuit score when the interview score is 8.626 (5)?,"CREATE TABLE table_name_19 (swimsuit VARCHAR, interview VARCHAR);","SELECT swimsuit FROM table_name_19 WHERE interview = ""8.626 (5)"";","SELECT swimsuit FROM table_name_19 WHERE interview = ""8.626 (5)"";",1 What Rating has Viewers (m) of 2.73?,"CREATE TABLE table_name_96 (rating VARCHAR, viewers__m_ VARCHAR);",SELECT rating FROM table_name_96 WHERE viewers__m_ = 2.73;,"SELECT rating FROM table_name_96 WHERE viewers__m_ = ""2.73"";",0 Which player is from Northern Ireland?,"CREATE TABLE table_name_42 (player VARCHAR, country VARCHAR);","SELECT player FROM table_name_42 WHERE country = ""northern ireland"";","SELECT player FROM table_name_42 WHERE country = ""northern ireland"";",1 What is the maximum emission level of ChemicalB in 2022?,"CREATE TABLE chemical (chemical_id INT, name TEXT); CREATE TABLE emission_log (log_id INT, chemical_id INT, emission_amount INT, emission_date DATE); ",SELECT MAX(emission_log.emission_amount) FROM emission_log JOIN chemical ON emission_log.chemical_id = chemical.chemical_id WHERE chemical.name = 'ChemicalB' AND YEAR(emission_date) = 2022;,SELECT MAX(emission_amount) FROM emission_log e JOIN chemical c ON e.chemical_id = c.chemical_id WHERE c.name = 'ChemicalB' AND YEAR(emission_date) = 2022;,0 What is the name and job title of the staff who was assigned the latest?,"CREATE TABLE staff (staff_name VARCHAR, staff_id VARCHAR); CREATE TABLE staff_department_assignments (job_title_code VARCHAR, staff_id VARCHAR, date_assigned_to VARCHAR);","SELECT T1.staff_name, T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1;","SELECT T1.staff_name, T1.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_to = (SELECT MAX(date_assigned_to) FROM staff);",0 Which manufacturer has the most number of shops? List its name and year of opening.,"CREATE TABLE manufacturer (open_year VARCHAR, name VARCHAR, num_of_shops VARCHAR);","SELECT open_year, name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1;","SELECT name, open_year FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1;",0 What are the names and locations of all factories with a workforce diversity score above 0.8?,"CREATE TABLE factories (factory_id INT, name TEXT, location TEXT, diversity_score DECIMAL(3,2)); ","SELECT name, location FROM factories WHERE diversity_score > 0.8;","SELECT name, location FROM factories WHERE diversity_score > 0.8;",1 What is the total number of followers for users who have used hashtag #travel?,"CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(255), registered_date DATETIME, followers INT);CREATE TABLE posts (id INT PRIMARY KEY, user_id INT, post_date DATETIME);CREATE TABLE hashtags (id INT PRIMARY KEY, post_id INT, name VARCHAR(255));",SELECT SUM(users.followers) FROM users JOIN posts ON users.id = posts.user_id JOIN hashtags ON posts.id = hashtags.post_id WHERE hashtags.name = '#travel';,SELECT SUM(users.followers) FROM users INNER JOIN posts ON users.id = posts.user_id INNER JOIN hashtags ON posts.id = hashtags.post_id WHERE hashtags.name = '#travel';,0 Which art programs received funding from the 'NEA' source since 2018?,"CREATE TABLE funding (id INT, program_id INT, source VARCHAR(255), amount DECIMAL(10, 2), date DATE);","SELECT f.program_id, p.name, f.source, f.amount FROM funding f INNER JOIN programs p ON f.program_id = p.id WHERE f.source = 'NEA' AND f.date >= '2018-01-01';",SELECT program_id FROM funding WHERE source = 'NEA' AND date >= '2018-01-01';,0 What are the top 3 streaming platforms by total plays for the pop genre in 2021?,"CREATE TABLE Plays (Platform VARCHAR(20), Genre VARCHAR(10), Plays INT); ","SELECT Platform, SUM(Plays) as TotalPlays FROM Plays WHERE Genre = 'Pop' AND YEAR(EventDate) = 2021 GROUP BY Platform ORDER BY TotalPlays DESC LIMIT 3;","SELECT Platform, SUM(Plays) as TotalPlays FROM Plays WHERE Genre = 'Pop' GROUP BY Platform ORDER BY TotalPlays DESC LIMIT 3;",0 What is the total weight of all shipments that were sent to the 'CA' warehouse and then returned?,"CREATE TABLE warehouse (id INT, name VARCHAR(20)); CREATE TABLE shipment (id INT, warehouse_from_id INT, warehouse_to_id INT, weight FLOAT, is_return BOOLEAN); ",SELECT SUM(shipment.weight) FROM shipment WHERE shipment.warehouse_to_id = (SELECT id FROM warehouse WHERE name = 'CA') AND shipment.is_return = TRUE;,SELECT SUM(weight) FROM shipment WHERE warehouse_from_id = (SELECT id FROM warehouse WHERE name = 'CA') AND is_return = TRUE;,0 "What is the total number of fire incidents in each neighborhood in the west region, sorted by the total count in descending order?","CREATE TABLE Regions (id INT, region_name VARCHAR(255)); CREATE TABLE Neighborhoods (id INT, region_id INT, neighborhood_name VARCHAR(255)); CREATE TABLE Incidents (id INT, neighborhood_id INT, incident_type VARCHAR(255), incident_date DATE); ","SELECT neighborhood_id, COUNT(*) as total_fire_incidents FROM Incidents WHERE incident_type = 'Fire' GROUP BY neighborhood_id ORDER BY total_fire_incidents DESC;","SELECT Neighborhoods.neighborhood_name, COUNT(Incidents.id) as total_incidents FROM Neighborhoods INNER JOIN Regions ON Neighborhoods.region_id = Regions.id INNER JOIN Incidents ON Neighborhoods.neighborhood_id = Incidents.neighborhood_id WHERE Regions.region_name = 'West' GROUP BY Neighborhoods.neighborhood_name ORDER BY total_incidents DESC;",0 Identify all decentralized applications ('dapps') that are associated with a specific developer in the 'dapps' and 'developers' tables.,"CREATE TABLE dapps (dapp_name VARCHAR(255), developer_id INT); CREATE TABLE developers (developer_id INT, developer_name VARCHAR(255));","SELECT d.dapp_name, d.developer_id, d.developer_name FROM dapps d INNER JOIN developers ON d.developer_id = developers.developer_id WHERE d.developer_id = 1;",SELECT dapps.dapp_name FROM dapps INNER JOIN developers ON dapps.developer_id = developers.developer_id;,0 "Add a new record into the 'autonomous_vehicles' table with 'model'='Baidu', 'year'=2022, 'top_speed'=65","CREATE TABLE autonomous_vehicles (model VARCHAR(255) PRIMARY KEY, year INT, top_speed FLOAT);","INSERT INTO autonomous_vehicles (model, year, top_speed) VALUES ('Baidu', 2022, 65);","INSERT INTO autonomous_vehicles (model, year, top_speed) VALUES ('Baidu', 2022, 65);",1 how many party with candidates being john m. vorys (r) 61.5% jacob f. myers (d) 38.5%,"CREATE TABLE table_1342013_34 (party VARCHAR, candidates VARCHAR);","SELECT COUNT(party) FROM table_1342013_34 WHERE candidates = ""John M. Vorys (R) 61.5% Jacob F. Myers (D) 38.5%"";","SELECT COUNT(party) FROM table_1342013_34 WHERE candidates = ""John M. Vorys (R) 61.5% Jacob F. Myers (D) 38.5%"";",1 Update the 'status' column for the 'equipment' table where 'equipment_id' is 201 to 'inactive',"CREATE TABLE equipment (equipment_id INT, name VARCHAR(50), status VARCHAR(20));",UPDATE equipment SET status = 'inactive' WHERE equipment_id = 201;,UPDATE equipment SET status = 'inactive' WHERE equipment_id = 201;,1 "Which total number of Week has an Opponent of at new orleans saints, and an Attendance larger than 53,448?","CREATE TABLE table_name_17 (week VARCHAR, opponent VARCHAR, attendance VARCHAR);","SELECT COUNT(week) FROM table_name_17 WHERE opponent = ""at new orleans saints"" AND attendance > 53 OFFSET 448;","SELECT COUNT(week) FROM table_name_17 WHERE opponent = ""at new orleans saints"" AND attendance > 53 OFFSET 448;",1 List the production batches for chemicals that have a safety stock level above 1000.,"CREATE TABLE ProductionBatches (BatchID INT, ChemicalID INT, ProductionDate DATE); ","SELECT ProductionBatches.BatchID, ProductionBatches.ChemicalID, ProductionBatches.ProductionDate FROM ProductionBatches INNER JOIN Chemicals ON ProductionBatches.ChemicalID = Chemicals.ChemicalID WHERE Chemicals.SafetyStockLevel > 1000;","SELECT ChemicalID, COUNT(*) FROM ProductionBatches WHERE ChemicalID IN (SELECT ChemicalID FROM Chemicals WHERE SafetyStockLevel > 1000);",0 What is the maximum number of marine species in each region?,"CREATE TABLE marine_species (name VARCHAR, region VARCHAR); ","SELECT region, MAX(COUNT(*)) OVER (PARTITION BY NULL) FROM marine_species GROUP BY region;","SELECT region, MAX(COUNT(*)) FROM marine_species GROUP BY region;",0 What is the average temperature for each station in the 'ClimateData' table for the year 2010 or later?,"CREATE TABLE ClimateData (station_id INT, year INT, temperature FLOAT); ","SELECT station_id, AVG(temperature) FROM ClimateData WHERE year >= 2010 GROUP BY station_id;","SELECT station_id, AVG(temperature) FROM ClimateData WHERE year >= 2010 GROUP BY station_id;",1 What was the total energy efficiency savings (in GWh) in Canada for the year 2020?,"CREATE TABLE energy_efficiency (country VARCHAR(50), year INT, savings_gwh FLOAT); ",SELECT SUM(savings_gwh) AS total_savings_gwh FROM energy_efficiency WHERE country = 'Canada' AND year = 2020;,SELECT SUM(savings_gwh) FROM energy_efficiency WHERE country = 'Canada' AND year = 2020;,0 What kind of Placement in Miss Universe that rosita cornell capuyon is in?,"CREATE TABLE table_name_4 (placement_in_miss_universe VARCHAR, delegate VARCHAR);","SELECT placement_in_miss_universe FROM table_name_4 WHERE delegate = ""rosita cornell capuyon"";","SELECT placement_in_miss_universe FROM table_name_4 WHERE delegate = ""rosita cornell capuyon"";",1 Delete records in the regulatory_compliance table where the vessel_id is 501 and compliance_status is 'Non-compliant',"CREATE TABLE regulatory_compliance (id INT, vessel_id INT, compliance_status VARCHAR(20));",DELETE FROM regulatory_compliance WHERE vessel_id = 501 AND compliance_status = 'Non-compliant';,DELETE FROM regulatory_compliance WHERE vessel_id = 501 AND compliance_status = 'Non-compliant';,1 What is the average number of podiums for drivers with under 12 finishes and under 1 start?,"CREATE TABLE table_name_24 (podiums INTEGER, finishes VARCHAR, starts VARCHAR);",SELECT AVG(podiums) FROM table_name_24 WHERE finishes < 12 AND starts < 1;,SELECT AVG(podiums) FROM table_name_24 WHERE finishes 12 AND starts 1;,0 Which date featured the Boston Patriots as the opponent?,"CREATE TABLE table_name_96 (date VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_96 WHERE opponent = ""boston patriots"";","SELECT date FROM table_name_96 WHERE opponent = ""boston patriots"";",1 Who are the artists who have created more than 3 artworks in the 'Sculpture' category?,"CREATE TABLE artworks (id INT, artist TEXT, category TEXT); ",SELECT artist FROM artworks WHERE category = 'Sculpture' GROUP BY artist HAVING COUNT(*) > 3;,SELECT artist FROM artworks WHERE category = 'Sculpture' GROUP BY artist HAVING COUNT(*) > 3;,1 "Determine the number of autonomous vehicles with a price above $50,000","CREATE TABLE vehicle_prices (id INT, make VARCHAR(50), model VARCHAR(50), price INT, is_autonomous BOOLEAN); ",SELECT COUNT(*) as count FROM vehicle_prices WHERE price > 50000 AND is_autonomous = true;,SELECT COUNT(*) FROM vehicle_prices WHERE is_autonomous = true AND price > 50000;,0 What venue was essendon the away team?,"CREATE TABLE table_name_20 (venue VARCHAR, away_team VARCHAR);","SELECT venue FROM table_name_20 WHERE away_team = ""essendon"";","SELECT venue FROM table_name_20 WHERE away_team = ""essendon"";",1 list the names of the companies with more than 200 sales in the descending order of sales and profits.,"CREATE TABLE company (name VARCHAR, Sales_in_Billion INTEGER, Profits_in_Billion VARCHAR);","SELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion, Profits_in_Billion DESC;",SELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion DESC;,0 During what Championship was the Opponent Jeff Borowiak?,"CREATE TABLE table_name_53 (championship VARCHAR, opponent VARCHAR);","SELECT championship FROM table_name_53 WHERE opponent = ""jeff borowiak"";","SELECT championship FROM table_name_53 WHERE opponent = ""jeff borowiak"";",1 What is the minimum sleep duration for each user in the last week?,"CREATE TABLE sleep (id INT, user_id INT, sleep_duration INT, sleep_date DATE); ","SELECT user_id, MIN(sleep_duration) FROM sleep WHERE sleep_date BETWEEN DATE_SUB(CURRENT_DATE(), INTERVAL 1 WEEK) AND CURRENT_DATE() GROUP BY user_id;","SELECT user_id, MIN(sleep_duration) as min_sleep_duration FROM sleep WHERE sleep_date >= DATEADD(week, -1, GETDATE()) GROUP BY user_id;",0 What college was the defensive end pick that was picked in round 2?,"CREATE TABLE table_name_72 (college VARCHAR, position VARCHAR, round VARCHAR);","SELECT college FROM table_name_72 WHERE position = ""defensive end"" AND round = 2;","SELECT college FROM table_name_72 WHERE position = ""defensive end"" AND round = 2;",1 What are the recycling rates for each material in the 'waste_stream' table?,"CREATE TABLE waste_stream (material VARCHAR(50), recycling_rate DECIMAL(5,2));","SELECT material, AVG(recycling_rate) as avg_recycling_rate FROM waste_stream GROUP BY material;","SELECT material, recycling_rate FROM waste_stream GROUP BY material;",0 On what date did James II take a consort?,"CREATE TABLE table_name_16 (became_consort VARCHAR, spouse VARCHAR);","SELECT became_consort FROM table_name_16 WHERE spouse = ""james ii"";","SELECT became_consort FROM table_name_16 WHERE spouse = ""james ii"";",1 "Find the number of researchers who have worked on both deep-sea exploration and marine conservation, and the number of publications they have produced in each area.","CREATE TABLE Researchers ( id INT PRIMARY KEY, name VARCHAR(50), specialization VARCHAR(50), affiliation VARCHAR(50)); CREATE TABLE Publications ( id INT PRIMARY KEY, title VARCHAR(50), year INT, researchers_id INT, publication_type VARCHAR(50)); CREATE TABLE Projects ( id INT PRIMARY KEY, name VARCHAR(50), start_date DATE, end_date DATE, researchers_id INT);","SELECT Researchers.name, COUNT(CASE WHEN Projects.name = 'Deep-Sea Exploration' THEN 1 END) AS exploration_count, COUNT(CASE WHEN Projects.name = 'Marine Conservation' THEN 1 END) AS conservation_count FROM Researchers INNER JOIN Publications ON Researchers.id = Publications.researchers_id INNER JOIN Projects ON Publications.id = Projects.id GROUP BY Researchers.name;","SELECT r.specialization, r.name, COUNT(p.id) as num_researchers, COUNT(p.id) as num_publications FROM Researchers r INNER JOIN Publications p ON r.id = p.researchers_id INNER JOIN Projects p ON p.project_id = p.id WHERE p.publication_type IN ('deep-sea exploration','marine conservation') GROUP BY r.specialization;",0 "Show the number of users who have mentioned 'climate change' or '#climatechange' on any social media platform in the past year, broken down by country.","CREATE TABLE mentions (mention_id INT, user_id INT, country VARCHAR(20), platform VARCHAR(20), mention_text VARCHAR(100), mention_date DATE); ","SELECT m.country, COUNT(DISTINCT m.user_id) as num_users FROM mentions m WHERE m.mention_text IN ('climate change', '#climatechange') AND m.mention_date >= DATEADD(year, -1, GETDATE()) GROUP BY m.country;","SELECT country, COUNT(*) FROM mentions WHERE mention_text IN ('climate change', '#climatechange') AND mention_date >= DATEADD(year, -1, GETDATE()) GROUP BY country;",0 What is the difference associated with more than 2 losses and more than 1 point?,"CREATE TABLE table_name_45 (points_difference VARCHAR, lost VARCHAR, points VARCHAR);",SELECT points_difference FROM table_name_45 WHERE lost > 2 AND points > 1;,SELECT points_difference FROM table_name_45 WHERE lost > 2 AND points > 1;,1 "Show the names of aircrafts that are associated with both an airport named ""London Heathrow"" and an airport named ""London Gatwick""","CREATE TABLE airport (Airport_ID VARCHAR, Airport_Name VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR); CREATE TABLE airport_aircraft (Aircraft_ID VARCHAR, Airport_ID VARCHAR);","SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = ""London Heathrow"" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = ""London Gatwick"";","SELECT T1.Aircraft FROM airport AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport_aircraft AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = ""London Heathrow"" INTERSECT SELECT T3.Aircraft FROM airport AS T1 JOIN airport AS T2 ON T1.Airport_ID = T2.Airport_ID WHERE T2.Airport_Name = ""London Gatwick"";",0 What is the average labor productivity by mine site?,"CREATE TABLE mine_site (site_id INT, location VARCHAR(255), labor_force INT, productivity FLOAT); ",SELECT AVG(productivity) FROM mine_site;,"SELECT location, AVG(productivity) as avg_productivity FROM mine_site GROUP BY location;",0 Who were Dürr's opponents in the final on year 1968?,"CREATE TABLE table_2112025_3 (opponents_in_the_final VARCHAR, year VARCHAR);",SELECT opponents_in_the_final FROM table_2112025_3 WHERE year = 1968;,SELECT opponents_in_the_final FROM table_2112025_3 WHERE year = 1968;,1 Who was the writer when Parkville Pictures Ltd was the recipient?,"CREATE TABLE table_name_57 (writer_s_ VARCHAR, recipient VARCHAR);","SELECT writer_s_ FROM table_name_57 WHERE recipient = ""parkville pictures ltd"";","SELECT writer_s_ FROM table_name_57 WHERE recipient = ""parkville pictures ltd"";",1 List the top 3 most requested accommodations for students with visual impairments.,"CREATE TABLE accommodation (student_id INT, accommodation_type TEXT, accommodation_date DATE); CREATE TABLE student (student_id INT, disability TEXT); ","SELECT accommodation_type, COUNT(*) as count FROM accommodation WHERE student_id IN (SELECT student_id FROM student WHERE disability = 'Visual Impairment') GROUP BY accommodation_type ORDER BY count DESC LIMIT 3;","SELECT a.accommodation_type, COUNT(a.student_id) as num_requests FROM accommodation a JOIN student s ON a.student_id = s.student_id WHERE s.disability = 'Visual Impairment' GROUP BY a.accommodation_type ORDER BY num_requests DESC LIMIT 3;",0 "What is the total billing amount per case, ordered by case open date?","CREATE TABLE CaseBilling (CaseID int, OpenDate date, BillingAmount decimal(10,2)); ","SELECT CaseID, OpenDate, BillingAmount, ROW_NUMBER() OVER (ORDER BY OpenDate) AS RowNum, SUM(BillingAmount) OVER (ORDER BY OpenDate) AS RunningTotal FROM CaseBilling;","SELECT CaseID, OpenDate, SUM(BillingAmount) as TotalBillingAmount FROM CaseBilling GROUP BY CaseID, OpenDate ORDER BY CaseID, OpenDate;",0 Who were the winners if the Mountain Classification award was given to Oscar Solis and Team Classification was given to EPM-Une?,"CREATE TABLE table_28853064_15 (winner VARCHAR, mountains_classification VARCHAR, team_classification VARCHAR);","SELECT winner FROM table_28853064_15 WHERE mountains_classification = ""Oscar Solis"" AND team_classification = ""EPM-UNE"";","SELECT winner FROM table_28853064_15 WHERE mountains_classification = ""Oscar Solis"" AND team_classification = ""EPM-Une"";",0 What is the total biomass of fish in farms located in the Pacific Ocean and using recirculating aquaculture systems?,"CREATE TABLE Farm (farm_id INT, location VARCHAR(255), system_type VARCHAR(255), PRIMARY KEY(farm_id)); CREATE TABLE Fish (fish_id INT, farm_id INT, biomass FLOAT), (4, 1, 500), (5, 1, 600), (6, 3, 700);",SELECT SUM(f.biomass) FROM Fish f INNER JOIN Farm ff ON f.farm_id = ff.farm_id WHERE ff.location = 'Pacific Ocean' AND ff.system_type = 'Recirculating';,SELECT SUM(Fish.biomass) FROM Fish INNER JOIN Farm ON Fish.farm_id = Farm.farm_id WHERE Farm.location = 'Pacific Ocean' AND Farm.system_type = 'Recirculating Aquaculture';,0 "List the vessels arriving in Havana, ordered by their arrival date and then average speed?","CREATE TABLE VesselArrivals (ID INT, VesselName VARCHAR(50), ArrivalPort VARCHAR(50), ArrivalDate DATE, AverageSpeed DECIMAL(5,2)); ","SELECT VesselName, ArrivalDate, AverageSpeed FROM VesselArrivals WHERE ArrivalPort = 'Havana' ORDER BY ArrivalDate, AverageSpeed;","SELECT VesselName, ArrivalPort, ArrivalDate, AverageSpeed FROM VesselArrivals WHERE ArrivalPort = 'Havana' ORDER BY ArrivalDate, AverageSpeed;",0 Find underrepresented communities with cultural competency scores above 80 in NJ.,"CREATE TABLE healthcare_providers (provider_id INT, name TEXT, state TEXT); CREATE TABLE cultural_competency (provider_id INT, score INT, community TEXT);","SELECT c.community, AVG(c.score) AS avg_score FROM cultural_competency c INNER JOIN healthcare_providers h ON c.provider_id = h.provider_id WHERE h.state = 'NJ' AND c.community IN ('Underrepresented') GROUP BY c.community HAVING avg_score > 80;",SELECT c.community FROM cultural_competency c JOIN healthcare_providers hp ON c.provider_id = hp.provider_id WHERE hp.state = 'NJ' AND c.score > 80;,0 List all financial institutions in Africa offering Shariah-compliant finance.,"CREATE TABLE shariah_compliant_finance (institution_id INT, institution_name TEXT, country TEXT, shariah_compliant BOOLEAN); ",SELECT institution_name FROM shariah_compliant_finance WHERE country IN ('Africa') AND shariah_compliant = TRUE;,SELECT institution_name FROM shariah_compliant_finance WHERE country = 'Africa' AND shariah_compliant = true;,0 What is the date of the game where Collingwood was the home team?,"CREATE TABLE table_name_31 (date VARCHAR, home_team VARCHAR);","SELECT date FROM table_name_31 WHERE home_team = ""collingwood"";","SELECT date FROM table_name_31 WHERE home_team = ""collingwood"";",1 What is the average price of fair trade coffee beans sold by roasters in the Western region?,"CREATE TABLE CoffeeRoasters (id INT, name VARCHAR(50), region VARCHAR(50)); CREATE TABLE CoffeeBeans (id INT, name VARCHAR(50), isFairTrade BOOLEAN, price FLOAT);",SELECT AVG(price) FROM CoffeeBeans INNER JOIN CoffeeRoasters ON CoffeeBeans.name = CoffeeRoasters.name WHERE CoffeeBeans.isFairTrade = TRUE AND CoffeeRoasters.region = 'Western';,SELECT AVG(price) FROM CoffeeBeans JOIN CoffeeRoasters ON CoffeeBeans.name = CoffeeRoasters.name WHERE CoffeeRoasters.region = 'Western' AND CoffeeBeans.isFairTrade = true;,0 "What is the season # for the episode with air date february 2, 1970?","CREATE TABLE table_25800134_14 (season__number INTEGER, airdate VARCHAR);","SELECT MAX(season__number) FROM table_25800134_14 WHERE airdate = ""February 2, 1970"";","SELECT MAX(season__number) FROM table_25800134_14 WHERE airdate = ""February 2, 1970"";",1 "What is the result of the game when the attendance is 75,466?","CREATE TABLE table_name_43 (result VARCHAR, attendance VARCHAR);","SELECT result FROM table_name_43 WHERE attendance = ""75,466"";","SELECT result FROM table_name_43 WHERE attendance = ""75,466"";",1 Capital of brześć nad bugiem has what area (1930) in 1000skm?,"CREATE TABLE table_name_72 (area__1930__in_1 VARCHAR, capital VARCHAR);","SELECT area__1930__in_1, 000 AS skm_2 FROM table_name_72 WHERE capital = ""brześć nad bugiem"";","SELECT area__1930__in_1 FROM table_name_72 WHERE capital = ""brze nad bugiem"";",0 "What is the maximum transaction amount for each digital asset in the 'crypto_transactions' table, ordered by the maximum transaction amount in descending order?","CREATE TABLE crypto_transactions (transaction_id INT, digital_asset VARCHAR(20), transaction_amount DECIMAL(10,2), transaction_time DATETIME);","SELECT digital_asset, MAX(transaction_amount) as max_transaction_amount FROM crypto_transactions GROUP BY digital_asset ORDER BY max_transaction_amount DESC;","SELECT digital_asset, MAX(transaction_amount) as max_transaction_amount FROM crypto_transactions GROUP BY digital_asset ORDER BY max_transaction_amount DESC;",1 Who is the pitcher from the 1983 season in location Kingdome?,"CREATE TABLE table_name_40 (pitcher VARCHAR, location VARCHAR, season VARCHAR);","SELECT pitcher FROM table_name_40 WHERE location = ""kingdome"" AND season = ""1983"";","SELECT pitcher FROM table_name_40 WHERE location = ""kingdome"" AND season = 1983;",0 What is the total revenue generated by virtual tours in India in 2022?,"CREATE TABLE revenue (tour_id INT, name VARCHAR(255), country VARCHAR(255), price FLOAT, year INT, month INT, day INT); ",SELECT SUM(price) FROM revenue WHERE country = 'India' AND year = 2022;,SELECT SUM(price) FROM revenue WHERE country = 'India' AND year = 2022;,1 What is the least amount of silver for Italy with a total less than 5?,"CREATE TABLE table_name_83 (silver INTEGER, nation VARCHAR, total VARCHAR);","SELECT MIN(silver) FROM table_name_83 WHERE nation = ""italy"" AND total < 5;","SELECT MIN(silver) FROM table_name_83 WHERE nation = ""italy"" AND total 5;",0 What is the average number of games played by players from the United States?,"CREATE TABLE Players (PlayerID INT, PlayerName VARCHAR(50), Age INT, Country VARCHAR(50)); ",SELECT AVG(Age) FROM Players WHERE Country = 'USA';,SELECT AVG(COUNT(*)) FROM Players WHERE Country = 'United States';,0 What College/Junior/Club Team (League) from Canada has a round smaller than 3?,"CREATE TABLE table_name_52 (college_junior_club_team__league_ VARCHAR, nationality VARCHAR, round VARCHAR);","SELECT college_junior_club_team__league_ FROM table_name_52 WHERE nationality = ""canada"" AND round < 3;","SELECT college_junior_club_team__league_ FROM table_name_52 WHERE nationality = ""canada"" AND round 3;",0 "Which Position has an Against larger than 17, and a Team of juventus, and a Drawn smaller than 4?","CREATE TABLE table_name_50 (position INTEGER, drawn VARCHAR, against VARCHAR, team VARCHAR);","SELECT MIN(position) FROM table_name_50 WHERE against > 17 AND team = ""juventus"" AND drawn < 4;","SELECT SUM(position) FROM table_name_50 WHERE against > 17 AND team = ""juventus"" AND drawn 4;",0 "If the year is 2007, what is the top ten?","CREATE TABLE table_22838521_3 (top_10s VARCHAR, year VARCHAR);",SELECT top_10s FROM table_22838521_3 WHERE year = 2007;,SELECT top_10s FROM table_22838521_3 WHERE year = 2007;,1 what is the attendance where the game site is kingdome?,"CREATE TABLE table_16729076_1 (attendance INTEGER, game_site VARCHAR);","SELECT MIN(attendance) FROM table_16729076_1 WHERE game_site = ""Kingdome"";","SELECT MAX(attendance) FROM table_16729076_1 WHERE game_site = ""Kingdome"";",0 What episode number was written by Gregg Hurwitz?,"CREATE TABLE table_24938621_3 (no VARCHAR, written_by VARCHAR);","SELECT no FROM table_24938621_3 WHERE written_by = ""Gregg Hurwitz"";","SELECT no FROM table_24938621_3 WHERE written_by = ""Greg Hurwitz"";",0 What was the score of the game against Minnesota?,"CREATE TABLE table_name_55 (score VARCHAR, opponent VARCHAR);","SELECT score FROM table_name_55 WHERE opponent = ""minnesota"";","SELECT score FROM table_name_55 WHERE opponent = ""minnesota"";",1 "What is the highest position the album Where we belong, which had an issue date higher than 9, had?","CREATE TABLE table_name_14 (highest_position VARCHAR, issue_date VARCHAR, album_title VARCHAR);","SELECT COUNT(highest_position) FROM table_name_14 WHERE issue_date < 9 AND album_title = ""where we belong"";","SELECT highest_position FROM table_name_14 WHERE issue_date > 9 AND album_title = ""where we belong"";",0 What is the maximum transaction amount per user for each country?,"CREATE TABLE Transactions_Country (id INT PRIMARY KEY, transaction_id INT, user_id INT, country VARCHAR(50)); ","SELECT t.country, MAX(t.amount) FROM Transactions t INNER JOIN Users u ON t.user_id = u.id INNER JOIN Transactions_Country tc ON t.id = tc.transaction_id GROUP BY t.country;","SELECT country, MAX(amount) FROM Transactions_Country GROUP BY country;",0 On what date was Motherwell the opponent at Fir Park?,"CREATE TABLE table_name_77 (date VARCHAR, opponent VARCHAR, venue VARCHAR);","SELECT date FROM table_name_77 WHERE opponent = ""motherwell"" AND venue = ""fir park"";","SELECT date FROM table_name_77 WHERE opponent = ""motherwell"" AND venue = ""fir park"";",1 "What are the number of international and domestic passengers of the airport named London ""Heathrow""?","CREATE TABLE airport (International_Passengers VARCHAR, Domestic_Passengers VARCHAR, Airport_Name VARCHAR);","SELECT International_Passengers, Domestic_Passengers FROM airport WHERE Airport_Name = ""London Heathrow"";","SELECT International_Passengers, Domestic_Passengers FROM airport WHERE Airport_Name = ""London Heathrow"";",1 Which city has a frequency of 104.5 fm?,"CREATE TABLE table_name_1 (city_of_license VARCHAR, frequency_mhz VARCHAR);","SELECT city_of_license FROM table_name_1 WHERE frequency_mhz = ""104.5 fm"";","SELECT city_of_license FROM table_name_1 WHERE frequency_mhz = ""104.5 fm"";",1 "Insert a new record for 'Grilled Tofu Sandwich' with revenue 27.50 on March 1, 2022?","CREATE TABLE restaurant_revenue (item VARCHAR(50), revenue NUMERIC(10,2), sales_date DATE);","INSERT INTO restaurant_revenue (item, revenue, sales_date) VALUES ('Grilled Tofu Sandwich', 27.50, '2022-03-01');","INSERT INTO restaurant_revenue (item, revenue, sales_date) VALUES ('Grilled Tofu Sandwich', 27.50, '2022-03-01');",1 What is the highest lost that has 6 for points?,"CREATE TABLE table_name_63 (lost INTEGER, points VARCHAR);",SELECT MAX(lost) FROM table_name_63 WHERE points = 6;,SELECT MAX(lost) FROM table_name_63 WHERE points = 6;,1 What is the result of the ceremony in 2006 (79th)?,"CREATE TABLE table_name_1 (result VARCHAR, year__ceremony_ VARCHAR);","SELECT result FROM table_name_1 WHERE year__ceremony_ = ""2006 (79th)"";","SELECT result FROM table_name_1 WHERE year__ceremony_ = ""2006 (79th)"";",1 What is the total quantity of fabric used by each supplier?,"CREATE TABLE FabricSuppliers (SupplierID INT, SupplierName TEXT, FabricType TEXT, Quantity INT); ","SELECT SupplierName, SUM(Quantity) as TotalQuantity FROM FabricSuppliers GROUP BY SupplierName;","SELECT SupplierName, SUM(Quantity) FROM FabricSuppliers GROUP BY SupplierName;",0 What is the average water consumption per household in the city of Seattle?,"CREATE TABLE Household (ID INT, City VARCHAR(20), Consumption FLOAT); ",SELECT AVG(Consumption) FROM Household WHERE City = 'Seattle';,SELECT AVG(Consumption) FROM Household WHERE City = 'Seattle';,1 What is the length in feet of the Jiangzhou arch?,"CREATE TABLE table_name_7 (length___ft__ VARCHAR, name VARCHAR);","SELECT length___ft__ FROM table_name_7 WHERE name = ""jiangzhou arch"";","SELECT length___ft__ FROM table_name_7 WHERE name = ""jiangzhou arch"";",1 "Insert a new record into the 'IrrigationProjects' table: ProjectID 201, ProjectName 'Drip Irrigation System', ProjectCost 50000","CREATE TABLE IrrigationProjects(ProjectID INT, ProjectName VARCHAR(50), ProjectCost INT);","INSERT INTO IrrigationProjects(ProjectID, ProjectName, ProjectCost) VALUES (201, 'Drip Irrigation System', 50000);","INSERT INTO IrrigationProjects (ProjectID, ProjectName, ProjectCost) VALUES (201, 'Drip Irrigation System', 50000);",0 What is the average ocean acidification level in the Arctic Ocean?,"CREATE TABLE ocean_acidification (id INT, location TEXT, avg_level FLOAT); ",SELECT avg_level FROM ocean_acidification WHERE location = 'Arctic Ocean';,SELECT AVG(avg_level) FROM ocean_acidification WHERE location = 'Arctic Ocean';,0 What is the university where the soccer stadium is terrain #2 of complexe sportif claude-robillard?,"CREATE TABLE table_27369069_4 (university VARCHAR, soccer_stadium VARCHAR);","SELECT university FROM table_27369069_4 WHERE soccer_stadium = ""terrain #2 of Complexe sportif Claude-Robillard"";","SELECT university FROM table_27369069_4 WHERE soccer_stadium = ""Terre #2 of Complexe sportif Claude-Robillard"";",0 How many losses did the Golden rivers of hay have?,"CREATE TABLE table_name_2 (losses INTEGER, golden_rivers VARCHAR);","SELECT AVG(losses) FROM table_name_2 WHERE golden_rivers = ""hay"";","SELECT SUM(losses) FROM table_name_2 WHERE golden_rivers = ""hay"";",0 List all research papers published on AI for social good in 2020.,"CREATE TABLE AI_Social_Good_Papers (ID INT, Title VARCHAR(100), Published_Year INT, Author VARCHAR(50)); ","SELECT Title, Author FROM AI_Social_Good_Papers WHERE Published_Year = 2020 AND Title LIKE '%AI%Social%Good%';",SELECT Title FROM AI_Social_Good_Papers WHERE Published_Year = 2020;,0 What is the maximum funding amount received by a female-founded company?,"CREATE TABLE companies (id INT, name TEXT, founder TEXT, founding_year INT, funding FLOAT); ",SELECT MAX(funding) FROM companies WHERE founder = 'Jane Smith';,SELECT MAX(funding) FROM companies WHERE founder = 'Female';,0 What is the maximum number of workplace injuries for each month in the year 2021?,"CREATE TABLE injuries (id INT, injury_date DATE, injury_count INT); ","SELECT EXTRACT(MONTH FROM injury_date) as month, MAX(injury_count) as max_injuries FROM injuries WHERE YEAR(injury_date) = 2021 GROUP BY month;","SELECT DATE_FORMAT(injury_date, '%Y-%m') as month, MAX(injury_count) as max_injury_count FROM injuries WHERE YEAR(injury_date) = 2021 GROUP BY month;",0 Which Wednesday has a Saturday of གཟའ་སྤེན་པ།?,"CREATE TABLE table_name_23 (wednesday VARCHAR, saturday VARCHAR);","SELECT wednesday FROM table_name_23 WHERE saturday = ""གཟའ་སྤེན་པ།"";","SELECT wednesday FROM table_name_23 WHERE saturday = """";",0 What are the names of drugs with phase 1 clinical trials in the rare diseases therapeutic area?,"CREATE TABLE clinical_trials (drug_name TEXT, phase TEXT); CREATE TABLE therapeutic_areas (drug_name TEXT, therapeutic_area TEXT); ",SELECT DISTINCT drug_name FROM clinical_trials INNER JOIN therapeutic_areas ON clinical_trials.drug_name = therapeutic_areas.drug_name WHERE phase = 'phase 1' AND therapeutic_area = 'rare diseases';,SELECT drug_name FROM clinical_trials WHERE phase = 1 AND therapeutic_area = 'Rare Diseases';,0 What is the total number of sustainable materials used by companies in France?,"CREATE TABLE materials (material_id INT, name TEXT, company_id INT, country TEXT); ",SELECT COUNT(name) FROM materials WHERE country = 'France';,SELECT COUNT(*) FROM materials WHERE country = 'France' AND company_id IN (SELECT company_id FROM companies WHERE country = 'France');,0 What is the average timeline for green building projects in Washington state?,"CREATE TABLE GreenBuildingProjects (id INT, projectName TEXT, state TEXT, timeline FLOAT);",SELECT AVG(timeline) FROM GreenBuildingProjects WHERE state = 'Washington' AND projectName LIKE '%green%';,SELECT AVG(timeline) FROM GreenBuildingProjects WHERE state = 'Washington';,0 Which New/Returning/Same Network has a Last Aired of 1982?,"CREATE TABLE table_name_29 (new_returning_same_network VARCHAR, last_aired VARCHAR);",SELECT new_returning_same_network FROM table_name_29 WHERE last_aired = 1982;,SELECT new_returning_same_network FROM table_name_29 WHERE last_aired = 1982;,1 How many art pieces were created by female artists in each medium?,"CREATE SCHEMA art; CREATE TABLE art_pieces (art_id INT, art_name VARCHAR(255), artist_name VARCHAR(255), artist_gender VARCHAR(10), medium VARCHAR(50), creation_date DATE); ","SELECT medium, COUNT(*) as count FROM art.art_pieces WHERE artist_gender = 'Female' GROUP BY medium;","SELECT medium, COUNT(*) FROM art.art_pieces WHERE artist_gender = 'Female' GROUP BY medium;",0 Find the top 3 states with the highest number of hospitals.,"CREATE TABLE Hospitals (HospitalID INT, HospitalName VARCHAR(50), State VARCHAR(20), NumberOfBeds INT); ","SELECT State, COUNT(*) AS NumberOfHospitals FROM Hospitals GROUP BY State ORDER BY NumberOfHospitals DESC LIMIT 3;","SELECT State, COUNT(*) as HospitalCount FROM Hospitals GROUP BY State ORDER BY HospitalCount DESC LIMIT 3;",0 How many cultural heritage sites are in Rome and have more than 3 stars?,"CREATE TABLE cultural_heritage_sites (site_id INT, site_name TEXT, city TEXT, rating INT); ",SELECT COUNT(*) FROM cultural_heritage_sites WHERE city = 'Rome' AND rating > 3;,SELECT COUNT(*) FROM cultural_heritage_sites WHERE city = 'Rome' AND rating > 3;,1 what is the least different holders when the country is ireland and giro wins is less than 1?,"CREATE TABLE table_name_93 (different_holders INTEGER, country VARCHAR, giro_wins VARCHAR);","SELECT MIN(different_holders) FROM table_name_93 WHERE country = ""ireland"" AND giro_wins < 1;","SELECT MIN(different_holders) FROM table_name_93 WHERE country = ""ireland"" AND giro_wins 1;",0 Find public services that do not have any feedback.,"CREATE TABLE citizen_feedback (id INT PRIMARY KEY, city VARCHAR(255), age INT, feedback TEXT); CREATE TABLE public_services (id INT PRIMARY KEY, service VARCHAR(255), location VARCHAR(255), budget DECIMAL(10, 2), provider VARCHAR(255));",SELECT p.* FROM public_services p LEFT JOIN citizen_feedback f ON p.location = f.city WHERE f.id IS NULL;,SELECT ps.service FROM public_services ps JOIN citizen_feedback cf ON ps.location = cf.city WHERE cf.feedback IS NULL;,0 What is the total energy generated by solar farms in Texas and New York?,"CREATE TABLE solar_farms (id INT, state VARCHAR(255), energy_generated FLOAT); ","SELECT SUM(energy_generated) FROM solar_farms WHERE state IN ('Texas', 'New York');","SELECT SUM(energy_generated) FROM solar_farms WHERE state IN ('Texas', 'New York');",1 Who are the top 3 contributors to food justice initiatives in Africa?,"CREATE TABLE food_justice_contributors (id INT, name TEXT, contributions FLOAT); ","SELECT name, contributions FROM (SELECT name, contributions, ROW_NUMBER() OVER (ORDER BY contributions DESC) as rank FROM food_justice_contributors WHERE country = 'Africa') as ranked_contributors WHERE rank <= 3;","SELECT name, contributions FROM food_justice_contributors ORDER BY contributions DESC LIMIT 3;",0 List all mechanical failures of aircraft manufactured in Brazil.,"CREATE TABLE Incidents (IncidentID INT, ReportDate DATE, Location VARCHAR(50), Type VARCHAR(50), Description TEXT, Manufacturer VARCHAR(50)); ","SELECT IncidentID, ReportDate, Location FROM Incidents WHERE Type = 'Mechanical Failure' AND Manufacturer = 'Embraer';",SELECT * FROM Incidents WHERE Location = 'Brazil' AND Type = 'Mechanical Failure';,0 What is the minimum carbon sequestration value recorded?,"CREATE TABLE carbon_sequestration (id INT, region VARCHAR(50), value FLOAT); ",SELECT MIN(value) FROM carbon_sequestration;,SELECT MIN(value) FROM carbon_sequestration;,1 I want the standing for january 29 and finished of 3rd and total points less than 248,"CREATE TABLE table_name_59 (standing VARCHAR, date VARCHAR, total_points VARCHAR, finished VARCHAR);","SELECT standing FROM table_name_59 WHERE total_points < 248 AND finished = ""3rd"" AND date = ""january 29"";","SELECT standing FROM table_name_59 WHERE total_points 248 AND finished = ""3rd"" AND date = ""january 29"";",0 What is the total number of veteran and non-veteran job applicants for each job category in California?,"CREATE TABLE JobApplicants (ApplicantID int, JobCategory varchar(50), JobLocation varchar(50), ApplicantType varchar(50)); ","SELECT JobCategory, COUNT(*) FILTER (WHERE ApplicantType = 'Veteran') as VeteranApplicants, COUNT(*) FILTER (WHERE ApplicantType = 'Non-Veteran') as NonVeteranApplicants FROM JobApplicants WHERE JobLocation = 'California' GROUP BY JobCategory;","SELECT JobCategory, COUNT(*) FROM JobApplicants WHERE JobLocation = 'California' GROUP BY JobCategory;",0 What is the description of the license for GNU GPL v2 or Ruby license?,"CREATE TABLE table_25474825_1 (description VARCHAR, license VARCHAR);","SELECT description FROM table_25474825_1 WHERE license = ""GNU GPL v2 or Ruby license"";","SELECT description FROM table_25474825_1 WHERE license = ""GNU GPL v2 or Ruby"";",0 Update security policies' category,"CREATE TABLE security_policies (id INT, policy_id VARCHAR(255), policy_name VARCHAR(255), category VARCHAR(255), last_updated DATETIME); ",UPDATE security_policies SET category = 'Monitoring' WHERE policy_id = 'POL-002';,UPDATE security_policies SET category = 'Category' WHERE policy_id = 1;,0 What is the average ESG score of companies in the energy sector?,"CREATE TABLE companies (id INT, sector VARCHAR(255), ESG_score FLOAT); ",SELECT AVG(ESG_score) FROM companies WHERE sector = 'energy';,SELECT AVG(ESG_score) FROM companies WHERE sector = 'energy';,1 What is the total number of marine species in the ocean acidification study?,CREATE TABLE ocean_acidification_study (species TEXT); ,SELECT COUNT(*) FROM ocean_acidification_study;,SELECT COUNT(*) FROM ocean_acidification_study;,1 Find the top 3 police stations with the highest number of citizen feedbacks in the last 6 months.,"CREATE TABLE police_stations (station_id INT, station_name VARCHAR(50), district_id INT); CREATE TABLE citizen_feedbacks (feedback_id INT, station_id INT, feedback_date DATE); ","SELECT station_name, COUNT(*) as feedback_count FROM citizen_feedbacks JOIN police_stations ON citizen_feedbacks.station_id = police_stations.station_id WHERE feedback_date >= DATEADD(month, -6, GETDATE()) GROUP BY station_name ORDER BY feedback_count DESC LIMIT 3;","SELECT ps.station_name, COUNT(cf.feedback_id) as num_feedbacks FROM police_stations ps JOIN citizen_feedbacks cf ON ps.station_id = cf.station_id WHERE cf.feedback_date >= DATEADD(month, -6, GETDATE()) GROUP BY ps.station_name ORDER BY num_feedbacks DESC LIMIT 3;",0 "Which customers in Canada have a savings account balance greater than their total loan amount, and what is the difference between their savings account balance and their total loan amount?","CREATE TABLE customer_data (id INT, name VARCHAR(255), age INT, gender VARCHAR(255), financial_institution_id INT); CREATE TABLE savings (id INT, customer_id INT, account_type VARCHAR(255), balance DECIMAL(10, 2), date_opened DATE); CREATE TABLE loans (id INT, customer_id INT, loan_type VARCHAR(255), loan_amount DECIMAL(10, 2), date_granted DATE); ","SELECT customer_data.name, savings.balance - SUM(loans.loan_amount) as difference FROM customer_data INNER JOIN savings ON customer_data.id = savings.customer_id INNER JOIN loans ON customer_data.id = loans.customer_id WHERE customer_data.country = 'Canada' GROUP BY customer_data.name, savings.balance HAVING difference > 0;","SELECT cd.name, SUM(s.balance) - SUM(l.loan_amount) as difference FROM customer_data cd INNER JOIN savings s ON cd.customer_id = s.customer_id INNER JOIN loans l ON cd.customer_id = l.customer_id WHERE cd.country = 'Canada' GROUP BY cd.name;",0 "Which Home team has a Score of 1–1, and an Away team of tottenham hotspur?","CREATE TABLE table_name_68 (home_team VARCHAR, score VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_68 WHERE score = ""1–1"" AND away_team = ""tottenham hotspur"";","SELECT home_team FROM table_name_68 WHERE score = ""1–1"" AND away_team = ""tottenham hotspur"";",1 What is the percentage of patients who improved after taking medication in Japan?,"CREATE TABLE patients (patient_id INT, improvement_after_treatment BOOLEAN, treatment_type VARCHAR(50), country VARCHAR(50)); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM patients WHERE country = 'Japan' AND treatment_type = 'Medication')) AS percentage FROM patients WHERE country = 'Japan' AND treatment_type = 'Medication' AND improvement_after_treatment = TRUE;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM patients WHERE country = 'Japan')) FROM patients WHERE improvement_after_treatment = TRUE AND country = 'Japan';,0 What is the total number of visitors who attended exhibitions in Los Angeles in 2020 and identified as male?,"CREATE TABLE Visitors (id INT, city VARCHAR(50), visit_year INT, gender VARCHAR(10));",SELECT COUNT(*) FROM Visitors WHERE city = 'Los Angeles' AND gender = 'Male' AND visit_year = 2020;,SELECT COUNT(*) FROM Visitors WHERE city = 'Los Angeles' AND visit_year = 2020 AND gender = 'Male';,0 What's the GPU frequency that has ultra-low power in cores?,"CREATE TABLE table_name_87 (gpu_frequency VARCHAR, cores VARCHAR);","SELECT gpu_frequency FROM table_name_87 WHERE cores = ""ultra-low power"";","SELECT gpu_frequency FROM table_name_87 WHERE cores = ""ultra-low power"";",1 Which traditional dances in the Caribbean region have more than 2000 annual participants?,"CREATE TABLE DanceForms (id INT, name VARCHAR(50), region VARCHAR(50)); CREATE TABLE Dancers (id INT, dance_form_id INT, name VARCHAR(50), annual_participants INT); ","SELECT df.name, df.region FROM DanceForms df JOIN Dancers d ON df.id = d.dance_form_id WHERE d.annual_participants > 2000;",SELECT DanceForms.name FROM DanceForms INNER JOIN Dancers ON DanceForms.id = Dancers.dance_form_id WHERE DanceForms.region = 'Caribbean' AND Dancers.annual_participants > 2000;,0 What is the total revenue generated from sustainable fashion sales in Africa?,"CREATE TABLE Sales (id INT, garmentID INT, quantity INT, saleDate DATE, isSustainable BOOLEAN); CREATE TABLE Garments (id INT, garmentID INT, price DECIMAL(5,2), country VARCHAR(50)); CREATE TABLE Countries (id INT, country VARCHAR(50), continent VARCHAR(50)); ",SELECT SUM(quantity * price) FROM Sales INNER JOIN Garments ON Sales.garmentID = Garments.garmentID INNER JOIN Countries ON Garments.country = Countries.country WHERE isSustainable = true AND Countries.continent = 'Africa';,SELECT SUM(Sales.quantity) FROM Sales INNER JOIN Garments ON Sales.garmentID = Garments.garmentID INNER JOIN Countries ON Garments.country = Countries.country WHERE Sales.isSustainable = TRUE AND Countries.continent = 'Africa';,0 Delete records from the 'algorithmic_fairness' table where 'bias_type' is 'Not Specified',"CREATE TABLE algorithmic_fairness (id INT, algorithm VARCHAR(20), bias_type VARCHAR(30), dataset VARCHAR(20)); ",DELETE FROM algorithmic_fairness WHERE bias_type = 'Not Specified';,DELETE FROM algorithmic_fairness WHERE bias_type = 'Not Specified';,1 What is the largest and smallest customer codes?,CREATE TABLE Customers (customer_code INTEGER);,"SELECT MAX(customer_code), MIN(customer_code) FROM Customers;","SELECT MAX(customer_code) AS max_customer_code, MIN(customer_code) AS min_customer_code FROM Customers;",0 What are the sales figures for product 'ProdE' in Q3 2021?,"CREATE TABLE sales_data (product_id VARCHAR(10), sale_date DATE, revenue DECIMAL(10,2)); ",SELECT SUM(revenue) FROM sales_data WHERE product_id = 'ProdE' AND sale_date BETWEEN '2021-07-01' AND '2021-09-30';,SELECT SUM(revenue) FROM sales_data WHERE product_id = 'ProdE' AND sale_date BETWEEN '2021-04-01' AND '2021-06-30';,0 What is the total number of security incidents by severity level in the 'security_incidents' table?,"CREATE TABLE security_incidents (id INT, severity VARCHAR(255), incidents INT);","SELECT severity, SUM(incidents) as total_incidents FROM security_incidents GROUP BY severity;","SELECT severity, SUM(incidents) FROM security_incidents GROUP BY severity;",0 "Insert new records into the models table for AI models, ""ModelG"" and ""ModelH"", both Generative models, developed in Brazil and Indonesia respectively, with safety scores of 88.00 and 89.00, and explainability scores of 85.00 and 86.00.","CREATE TABLE models (model_id INT, model_name VARCHAR(50), model_type VARCHAR(50), country VARCHAR(50), safety_score DECIMAL(5,2), explainability_score DECIMAL(5,2));","INSERT INTO models (model_name, model_type, country, safety_score, explainability_score) VALUES ('ModelG', 'Generative', 'Brazil', 88.00, 85.00), ('ModelH', 'Generative', 'Indonesia', 89.00, 86.00);","INSERT INTO models (model_name, model_type, country, safety_score, explainability_score) VALUES ('ModelG', 'ModelH', 88.00, 89.00, 86.00);",0 Which news articles were published in Spanish?,"CREATE TABLE news_articles (id INT, title VARCHAR(100), content TEXT, publication_date DATE, language VARCHAR(20)); ",SELECT * FROM news_articles WHERE language = 'Spanish';,SELECT title FROM news_articles WHERE language = 'Spanish';,0 "What tournament was being played on August 11, 1984?","CREATE TABLE table_name_86 (tournament VARCHAR, date VARCHAR);","SELECT tournament FROM table_name_86 WHERE date = ""august 11, 1984"";","SELECT tournament FROM table_name_86 WHERE date = ""august 11, 1984"";",1 What is the total budget allocated for education and healthcare services in the state of New York?,"CREATE TABLE ny_budget (service_type VARCHAR(50), budget_allocation FLOAT); ","SELECT SUM(budget_allocation) FROM ny_budget WHERE service_type IN ('education', 'healthcare');","SELECT SUM(budget_allocation) FROM ny_budget WHERE service_type IN ('Education', 'Healthcare');",0 Delete all smart contracts for a specific user '0xabc...'.,"CREATE TABLE smart_contracts (contract_address VARCHAR(64), user_address VARCHAR(64));",DELETE FROM smart_contracts WHERE user_address = '0xabc...';,DELETE FROM smart_contracts WHERE user_address = '0xabc...';,1 for the position of rb what is the name?,"CREATE TABLE table_name_67 (name VARCHAR, position VARCHAR);","SELECT name FROM table_name_67 WHERE position = ""rb"";","SELECT name FROM table_name_67 WHERE position = ""rb"";",1 How many autonomous vehicle research papers were published by authors from the United States and China in 2021?,"CREATE TABLE Research_Papers (id INT, title VARCHAR(255), author_country VARCHAR(50), publication_year INT); ","SELECT COUNT(*) FROM Research_Papers WHERE author_country IN ('USA', 'China') AND publication_year = 2021;","SELECT COUNT(*) FROM Research_Papers WHERE author_country IN ('USA', 'China') AND publication_year = 2021;",1 "Which Opponents have a Score of 1–2, and a Team of arsenal, and Progress of first round?","CREATE TABLE table_name_82 (opponents VARCHAR, progress VARCHAR, score VARCHAR, team VARCHAR);","SELECT opponents FROM table_name_82 WHERE score = ""1–2"" AND team = ""arsenal"" AND progress = ""first round"";","SELECT opponents FROM table_name_82 WHERE score = ""1–2"" AND team = ""arsenal"" AND progress = ""first round"";",1 "What is the average Year, when Position is 9th, when Event is 100 m, and when Venue is Munich, Germany?","CREATE TABLE table_name_66 (year INTEGER, venue VARCHAR, position VARCHAR, event VARCHAR);","SELECT AVG(year) FROM table_name_66 WHERE position = ""9th"" AND event = ""100 m"" AND venue = ""munich, germany"";","SELECT AVG(year) FROM table_name_66 WHERE position = ""9th"" AND event = ""100 m"" AND venue = ""munich, germany"";",1 What is the total number of properties with green building certifications in each borough?,"CREATE TABLE Boroughs (BoroughID INT, BoroughName VARCHAR(255)); CREATE TABLE Properties (PropertyID INT, BoroughID INT, GreenBuildingCertification VARCHAR(50));","SELECT B.BoroughName, COUNT(P.PropertyID) as TotalCertifiedProperties FROM Boroughs B JOIN Properties P ON B.BoroughID = P.BoroughID WHERE P.GreenBuildingCertification IS NOT NULL GROUP BY B.BoroughName;","SELECT b.BoroughName, COUNT(p.PropertyID) FROM Boroughs b INNER JOIN Properties p ON b.BoroughID = p.BoroughID WHERE p.GreenBuildingCertification = 'Yes' GROUP BY b.BoroughName;",0 What is the height of Anthony Crater? ,"CREATE TABLE table_29418619_1 (height VARCHAR, name VARCHAR);","SELECT height FROM table_29418619_1 WHERE name = ""Anthony Crater"";","SELECT height FROM table_29418619_1 WHERE name = ""Anthony Crater"";",1 What was the result of the election of incumbent john shelley?,"CREATE TABLE table_1341973_6 (result VARCHAR, incumbent VARCHAR);","SELECT result FROM table_1341973_6 WHERE incumbent = ""John Shelley"";","SELECT result FROM table_1341973_6 WHERE incumbent = ""John Shelley"";",1 What is the total fare collected by wheelchair-accessible vehicles in the last quarter?,"CREATE TABLE Fares (FareID INT, TripID INT, PaymentMethod VARCHAR(50), FareAmount FLOAT, VehicleType VARCHAR(50)); CREATE TABLE Dates (DateID INT, Date DATE); ","SELECT P.VehicleType, SUM(F.FareAmount) AS TotalFare FROM Fares F JOIN Dates D ON F.TripDateTime >= D.Date AND F.TripDateTime < DATEADD(QUARTER, 1, D.Date) WHERE F.VehicleType = 'Wheelchair Accessible' GROUP BY P.VehicleType;","SELECT SUM(FareAmount) FROM Fares INNER JOIN Dates ON Fares.TripID = Dates.DateID WHERE VehicleType = 'Wheelchair-Accessible' AND Dates.Date >= DATEADD(quarter, -1, GETDATE());",0 Which Venue has a Result of 2–0?,"CREATE TABLE table_name_2 (venue VARCHAR, result VARCHAR);","SELECT venue FROM table_name_2 WHERE result = ""2–0"";","SELECT venue FROM table_name_2 WHERE result = ""2–0"";",1 What is the name of the race won by driver Carlos Reutemann?,"CREATE TABLE table_name_72 (race_name VARCHAR, winning_driver VARCHAR);","SELECT race_name FROM table_name_72 WHERE winning_driver = ""carlos reutemann"";","SELECT race_name FROM table_name_72 WHERE winning_driver = ""carlos reutemann"";",1 What is the name of the race held most recently?,"CREATE TABLE races (name VARCHAR, date VARCHAR);",SELECT name FROM races ORDER BY date DESC LIMIT 1;,SELECT name FROM races ORDER BY date DESC LIMIT 1;,1 List the top 3 technology accessibility initiatives by budget?,"CREATE TABLE tech_accessibility (initiative VARCHAR(255), budget FLOAT); ","SELECT initiative, budget FROM (SELECT initiative, budget, RANK() OVER (ORDER BY budget DESC) AS rank FROM tech_accessibility) WHERE rank <= 3;","SELECT initiative, budget FROM tech_accessibility ORDER BY budget DESC LIMIT 3;",0 Find the number of Mars rovers with a mass greater than 500 kg,"CREATE TABLE rovers (id INT, name VARCHAR(50), mass INT, manufacturer VARCHAR(50));",SELECT COUNT(*) FROM rovers WHERE mass > 500 AND planet = 'Mars';,SELECT COUNT(*) FROM rovers WHERE mass > 500;,0 What is the total number of posts made by users from the United States?,"CREATE TABLE users (id INT, name VARCHAR(100), country VARCHAR(50)); CREATE TABLE posts (id INT, user_id INT, content TEXT); ",SELECT COUNT(*) FROM posts JOIN users ON posts.user_id = users.id WHERE users.country = 'USA';,SELECT COUNT(*) FROM posts JOIN users ON posts.user_id = users.id WHERE users.country = 'United States';,0 Identify maintenance costs per equipment type and military unit,"CREATE TABLE Maintenance (MaintenanceId INT, EquipmentId INT, MaintenanceType VARCHAR(255), MaintenanceCost FLOAT, FOREIGN KEY (EquipmentId) REFERENCES Equipment(EquipmentId));","SELECT Equipment.EquipmentName, MilitaryUnits.MilitaryUnitName, AVG(MaintenanceCost) as AvgMaintenanceCost FROM Maintenance","SELECT Equipment.EquipmentType, Maintenance.MilitaryUnit, Maintenance.MaintenanceCost FROM Maintenance JOIN Equipment ON Maintenance.EquipmentId = Equipment.EquipmentId GROUP BY Equipment.EquipmentType, Maintenance.MilitaryUnit;",0 Which Nationality has a Player of rudy poeschek?,"CREATE TABLE table_name_51 (nationality VARCHAR, player VARCHAR);","SELECT nationality FROM table_name_51 WHERE player = ""rudy poeschek"";","SELECT nationality FROM table_name_51 WHERE player = ""rudy poeschek"";",1 What is the average number of goals scored per match for each soccer team?,"CREATE TABLE Matches (team_name TEXT, goals INTEGER); ","SELECT team_name, AVG(goals) FROM Matches GROUP BY team_name;","SELECT team_name, AVG(goals) FROM Matches GROUP BY team_name;",1 What is the Pashto word for the Somali word talaado?,"CREATE TABLE table_name_24 (pashto VARCHAR, somali VARCHAR);","SELECT pashto FROM table_name_24 WHERE somali = ""talaado"";","SELECT pashto FROM table_name_24 WHERE somali = ""talaado"";",1 What Team was in 2005?,"CREATE TABLE table_name_92 (team VARCHAR, year VARCHAR);",SELECT team FROM table_name_92 WHERE year = 2005;,SELECT team FROM table_name_92 WHERE year = 2005;,1 List all the unique soil types and their corresponding pH values in the 'Midwest' region.,"CREATE TABLE soil_data (soil_type VARCHAR(20), ph FLOAT, region VARCHAR(20)); ","SELECT DISTINCT soil_type, ph FROM soil_data WHERE region = 'Midwest'","SELECT DISTINCT soil_type, ph FROM soil_data WHERE region = 'Midwest';",0 How many police officers are there in total in Chicago?,"CREATE TABLE police_officers (id INT, district INT, city VARCHAR(255), role VARCHAR(255)); ",SELECT COUNT(id) as total_officers FROM police_officers WHERE city = 'Chicago' AND role = 'Police Officer';,SELECT COUNT(*) FROM police_officers WHERE city = 'Chicago';,0 List the names of the animals that have a higher population than lions.,"CREATE TABLE AnimalPopulation (animal VARCHAR(255), population INT);",SELECT animal FROM AnimalPopulation WHERE population > (SELECT population FROM AnimalPopulation WHERE animal = 'lions');,SELECT animal FROM AnimalPopulation WHERE population > (SELECT population FROM AnimalPopulation WHERE animal = 'lion');,0 "How many cases were handled by each legal aid organization, in the last year?","CREATE TABLE cases (id INT, date DATE, legal_aid_org_id INT);CREATE VIEW latest_year AS SELECT EXTRACT(YEAR FROM date) as year, EXTRACT(MONTH FROM date) as month FROM cases;","SELECT legal_aid_org_id, COUNT(*) as cases_handled FROM cases INNER JOIN latest_year ON EXTRACT(YEAR FROM cases.date) = latest_year.year GROUP BY legal_aid_org_id;","SELECT legal_aid_org_id, COUNT(*) FROM cases WHERE date >= DATEADD(year, -1, GETDATE()) GROUP BY legal_aid_org_id;",0 What is the average R&D expenditure for 'CompanyZ' between 2017 and 2019?,"CREATE TABLE rd_expenditures (company varchar(20), year int, amount int); ",SELECT AVG(amount) FROM rd_expenditures WHERE company = 'CompanyZ' AND year BETWEEN 2017 AND 2019;,SELECT AVG(amount) FROM rd_expenditures WHERE company = 'CompanyZ' AND year BETWEEN 2017 AND 2019;,1 "What is Upstream, when Price is ""14 EUR""?","CREATE TABLE table_name_25 (upstream VARCHAR, price VARCHAR);","SELECT upstream FROM table_name_25 WHERE price = ""14 eur"";","SELECT downstream FROM table_name_25 WHERE price = ""14 euro"";",0 Which countries have the highest average age of players participating in ESports events on PC platforms?,"CREATE TABLE Players (PlayerID INT, Age INT, GamePlatform VARCHAR(10), Country VARCHAR(20));CREATE TABLE ESportsEvents (EventID INT, PlayerID INT);","SELECT ev.Country, AVG(p.Age) as AvgAge FROM Players p INNER JOIN ESportsEvents e ON p.PlayerID = e.PlayerID WHERE p.GamePlatform = 'PC' GROUP BY ev.Country ORDER BY AvgAge DESC LIMIT 3;","SELECT Country, AVG(Age) as AvgAge FROM Players JOIN ESportsEvents ON Players.PlayerID = ESportsEvents.PlayerID WHERE GamePlatform = 'PC' GROUP BY Country ORDER BY AvgAge DESC LIMIT 1;",0 what is the average salary of employees in the Research department compared to the Safety department?,"CREATE TABLE Employees (EmployeeID INT PRIMARY KEY, FirstName VARCHAR(50), LastName VARCHAR(50), Department VARCHAR(50), Salary DECIMAL(10,2)); ","SELECT AVG(Research.Salary) AS ResearchAverage, AVG(Safety.Salary) AS SafetyAverage FROM Employees AS Research, Employees AS Safety WHERE Research.Department = 'Research' AND Safety.Department = 'Safety';",SELECT AVG(Salary) FROM Employees WHERE Department = 'Research' AND Department = 'Safety';,0 what is the title when the writer(s) is jack turley?,"CREATE TABLE table_21146729_6 (title VARCHAR, writer_s_ VARCHAR);","SELECT title FROM table_21146729_6 WHERE writer_s_ = ""Jack Turley"";","SELECT title FROM table_21146729_6 WHERE writer_s_ = ""Jack Turley"";",1 How many items appear in the population 2011 column for the krčedin settlement?,"CREATE TABLE table_2562572_54 (population__2011_ VARCHAR, settlement VARCHAR);","SELECT COUNT(population__2011_) FROM table_2562572_54 WHERE settlement = ""Krčedin"";","SELECT COUNT(population__2011_) FROM table_2562572_54 WHERE settlement = ""Kredin"";",0 What is the average population of all shark species in the Atlantic Ocean?,"CREATE TABLE shark_species (species_name TEXT, population INTEGER, ocean TEXT);",SELECT AVG(population) FROM shark_species WHERE ocean = 'Atlantic Ocean';,SELECT AVG(population) FROM shark_species WHERE ocean = 'Atlantic';,0 What was the lowest Attendance during Week 12?,"CREATE TABLE table_name_90 (attendance INTEGER, week VARCHAR);",SELECT MIN(attendance) FROM table_name_90 WHERE week = 12;,SELECT MIN(attendance) FROM table_name_90 WHERE week = 12;,1 Show the names of members and the location of performances they attended in ascending alphabetical order of their names.,"CREATE TABLE performance (Location VARCHAR, Performance_ID VARCHAR); CREATE TABLE member (Name VARCHAR, Member_ID VARCHAR); CREATE TABLE member_attendance (Member_ID VARCHAR, Performance_ID VARCHAR);","SELECT T2.Name, T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T2.Name;","SELECT T1.Name, T1.Location FROM member AS T1 JOIN member_attendance AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T3.Name;",0 "In grid 15, how many laps were there before ending with a time of exhaust?","CREATE TABLE table_name_40 (laps INTEGER, time_retired VARCHAR, grid VARCHAR);","SELECT SUM(laps) FROM table_name_40 WHERE time_retired = ""exhaust"" AND grid < 15;","SELECT SUM(laps) FROM table_name_40 WHERE time_retired = ""exhaust"" AND grid = 15;",0 "what is the English meaning of the old English name ""sæturnesdæg""?","CREATE TABLE table_2624098_1 (english_day_name_meaning VARCHAR, old_english_day_name VARCHAR);","SELECT english_day_name_meaning FROM table_2624098_1 WHERE old_english_day_name = ""Sæturnesdæg"";","SELECT english_day_name_meaning FROM table_2624098_1 WHERE old_english_day_name = ""Sturnesdg"";",0 "What's the result for the clay surface edition on july 17, 1992?","CREATE TABLE table_name_97 (result VARCHAR, surface VARCHAR, date VARCHAR);","SELECT result FROM table_name_97 WHERE surface = ""clay"" AND date = ""july 17, 1992"";","SELECT result FROM table_name_97 WHERE surface = ""clay"" AND date = ""july 17, 1992"";",1 Who had the high points while Dirk Nowitzki (13) had the high rebounds?,"CREATE TABLE table_17288869_7 (high_points VARCHAR, high_rebounds VARCHAR);","SELECT high_points FROM table_17288869_7 WHERE high_rebounds = ""Dirk Nowitzki (13)"";","SELECT high_points FROM table_17288869_7 WHERE high_rebounds = ""Dirk Nowitzki (13)"";",1 List all circular economy initiatives that were launched in the past year.,"CREATE TABLE initiatives(initiative_id INT, name TEXT, launch_date DATE);","SELECT name FROM initiatives WHERE launch_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT name FROM initiatives WHERE launch_date >= DATEADD(year, -1, GETDATE());",0 What is the total weight of packages shipped to each state from the 'east' region?,"CREATE TABLE warehouses (id INT, name TEXT, region TEXT); CREATE TABLE packages (id INT, warehouse_id INT, weight FLOAT, state TEXT); ","SELECT state, SUM(weight) FROM packages p JOIN warehouses w ON p.warehouse_id = w.id WHERE w.region = 'east' GROUP BY state;","SELECT p.state, SUM(p.weight) FROM packages p JOIN warehouses w ON p.warehouse_id = w.id WHERE w.region = 'east' GROUP BY p.state;",0 "How many draws, more than 6, does Newcastle Knights have with a record (%) larger than 25?","CREATE TABLE table_name_59 (draws INTEGER, matches VARCHAR, club VARCHAR, record___percentage__ VARCHAR, draw_ VARCHAR, _05_wins VARCHAR);","SELECT MAX(draws) FROM table_name_59 WHERE matches > 6 AND club = ""newcastle knights"" AND record___percentage__[draw_ = _05_wins] > 25;","SELECT SUM(draws) FROM table_name_59 WHERE draw_ > 6 AND _05_wins = ""newcastle knights"" AND record___percentage__ > 25;",0 How many safety incidents have occurred at each manufacturing site in the past six months?,"CREATE TABLE manufacturing_sites (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255)); CREATE TABLE safety_incidents (id INT PRIMARY KEY, site_id INT, incident_type VARCHAR(255), date DATE, FOREIGN KEY (site_id) REFERENCES manufacturing_sites(id));","SELECT manufacturing_sites.name, COUNT(safety_incidents.id) AS incident_count FROM manufacturing_sites INNER JOIN safety_incidents ON manufacturing_sites.id = safety_incidents.site_id WHERE safety_incidents.date >= DATEADD(month, -6, GETDATE()) GROUP BY manufacturing_sites.id;","SELECT ms.name, COUNT(s.id) FROM manufacturing_sites ms JOIN safety_incidents s ON ms.id = s.site_id WHERE s.date >= DATEADD(month, -6, GETDATE()) GROUP BY ms.name;",0 What is the status of the match between Scotland v Northern Ireland?,"CREATE TABLE table_name_70 (status_of_match VARCHAR, fixture VARCHAR);","SELECT status_of_match FROM table_name_70 WHERE fixture = ""scotland v northern ireland"";","SELECT status_of_match FROM table_name_70 WHERE fixture = ""scotland v northern ireland"";",1 "How many year was the venue in stockholm, sweden used?","CREATE TABLE table_name_65 (year VARCHAR, venue VARCHAR);","SELECT COUNT(year) FROM table_name_65 WHERE venue = ""stockholm, sweden"";","SELECT COUNT(year) FROM table_name_65 WHERE venue = ""stockholm, sweden"";",1 how many times is the country united states and the score 72-71-73-73=289?,"CREATE TABLE table_name_93 (to_par VARCHAR, country VARCHAR, score VARCHAR);","SELECT COUNT(to_par) FROM table_name_93 WHERE country = ""united states"" AND score = 72 - 71 - 73 - 73 = 289;","SELECT COUNT(to_par) FROM table_name_93 WHERE country = ""united states"" AND score = 72 - 71 - 73 - 73 = 289;",1 What is the count of military technologies for each type in the 'military_tech' table?,"CREATE TABLE military_tech (code INT, name VARCHAR(50), type VARCHAR(50), manufacturer VARCHAR(50), last_updated TIMESTAMP);","SELECT type, COUNT(type) AS count FROM military_tech GROUP BY type;","SELECT type, COUNT(*) FROM military_tech GROUP BY type;",0 Find the name of airports whose altitude is between -50 and 50.,"CREATE TABLE airports (name VARCHAR, elevation INTEGER);",SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50;,SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50;,1 What was the lowest pick number for a united states player picked before round 7?,"CREATE TABLE table_name_91 (pick INTEGER, round VARCHAR, nationality VARCHAR);","SELECT MIN(pick) FROM table_name_91 WHERE round > 7 AND nationality = ""united states"";","SELECT MIN(pick) FROM table_name_91 WHERE round 7 AND nationality = ""united states"";",0 What is the total number of packages received at each warehouse in Canada?,"CREATE TABLE Warehouse (id INT, country VARCHAR(255), city VARCHAR(255), number_of_packages INT); ","SELECT country, city, SUM(number_of_packages) FROM Warehouse WHERE country = 'Canada' GROUP BY country, city","SELECT country, SUM(number_of_packages) FROM Warehouse WHERE country = 'Canada' GROUP BY country;",0 List the names and research interests of all faculty members in the 'Social Sciences' department,"CREATE TABLE faculty (id INT, name VARCHAR(30), department VARCHAR(20), research_interest TEXT); ","SELECT name, research_interest FROM faculty WHERE department = 'Social Sciences';","SELECT name, research_interest FROM faculty WHERE department = 'Social Sciences';",1 What is the average year of construction for vessels that have reported incidents of ocean acidification in the Atlantic Ocean?,"CREATE TABLE vessels (id INT, name VARCHAR(255), year_built INT, incidents INT, region VARCHAR(255)); ",SELECT AVG(year_built) FROM vessels WHERE region = 'Atlantic' AND incidents > 0;,SELECT AVG(year_built) FROM vessels WHERE incidents = 'Acidification' AND region = 'Atlantic Ocean';,0 Where is Interlake located?,"CREATE TABLE table_13759592_2 (location VARCHAR, institution VARCHAR);","SELECT location FROM table_13759592_2 WHERE institution = ""Interlake"";","SELECT location FROM table_13759592_2 WHERE institution = ""Interlake"";",1 "How many students have personal names that contain the word ""son""?",CREATE TABLE Students (personal_name VARCHAR);,"SELECT COUNT(*) FROM Students WHERE personal_name LIKE ""%son%"";",SELECT COUNT(*) FROM Students WHERE personal_name LIKE '%son%';,0 "What is the total rank with a total larger than 2, and less than 0 gold","CREATE TABLE table_name_86 (rank INTEGER, total VARCHAR, gold VARCHAR);",SELECT SUM(rank) FROM table_name_86 WHERE total > 2 AND gold < 0;,SELECT SUM(rank) FROM table_name_86 WHERE total > 2 AND gold 0;,0 "How many employees were paid overtime at each position in the first week of 2020, if any position had over 10 employees with overtime, exclude it from the results?","CREATE TABLE Wages (Id INT, Employee_Id INT, Position VARCHAR(50), Hourly_Rate DECIMAL(5,2), Overtime_Rate DECIMAL(5,2), Date DATE); ","SELECT Position, COUNT(*) as Overtime_Employees FROM Wages WHERE Date >= '2020-01-01' AND Date < '2020-01-08' AND Overtime_Rate > 0 GROUP BY Position HAVING Overtime_Employees < 10;","SELECT Position, COUNT(*) FROM Wages WHERE Overtime_Rate > 10 AND Date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY Position;",0 How many union members work in each industry?,"CREATE TABLE union_rosters (roster_id INT, member_id INT, industry VARCHAR(15)); ","SELECT industry, COUNT(*) as num_members FROM union_rosters GROUP BY industry;","SELECT industry, COUNT(DISTINCT member_id) FROM union_rosters GROUP BY industry;",0 What is the most common nationality of tourists visiting Tokyo?,"CREATE TABLE demographics (id INT, city VARCHAR(20), country VARCHAR(10), language VARCHAR(10)); ","SELECT country, COUNT(*) AS count FROM demographics WHERE city = 'Tokyo' GROUP BY country ORDER BY count DESC LIMIT 1;","SELECT country, COUNT(*) FROM demographics WHERE city = 'Tokyo' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1;",0 List all the timber production entries from the 'eastern_region',"CREATE TABLE timber_production (id INT, region VARCHAR(50), volume FLOAT); ",SELECT * FROM timber_production WHERE region = 'Eastern Region';,SELECT * FROM timber_production WHERE region = 'eastern_region';,0 Which professional development courses were completed by the most teachers in the past year?,"CREATE TABLE teachers (teacher_id INT, teacher_name TEXT); CREATE TABLE courses (course_id INT, course_name TEXT, year INT); CREATE TABLE teacher_courses (teacher_id INT, course_id INT, completion_date DATE); ","SELECT c.course_name, COUNT(tc.teacher_id) as num_teachers FROM teacher_courses tc JOIN courses c ON tc.course_id = c.course_id WHERE c.year = 2021 GROUP BY c.course_name ORDER BY num_teachers DESC LIMIT 1;","SELECT courses.course_name, COUNT(teacher_courses.teacher_id) as num_teachers FROM teachers INNER JOIN teacher_courses ON teachers.teacher_id = teacher_courses.teacher_id INNER JOIN courses ON teacher_courses.course_id = courses.course_id WHERE teacher_courses.completion_date >= DATEADD(year, -1, GETDATE()) GROUP BY courses.course_name ORDER BY num_teachers DESC LIMIT 1;",0 How many countries have been part of humanitarian assistance programs in the last 5 years?,"CREATE TABLE Humanitarian_Assistance (id INT, country VARCHAR(50), year INT); ",SELECT COUNT(DISTINCT country) FROM Humanitarian_Assistance WHERE year BETWEEN YEAR(CURRENT_DATE)-5 AND YEAR(CURRENT_DATE);,SELECT COUNT(*) FROM Humanitarian_Assistance WHERE year >= YEAR(CURRENT_DATE) - 5;,0 "Which Rank has a Club of zulte waregem, and Points larger than 22?","CREATE TABLE table_name_93 (rank VARCHAR, club VARCHAR, points VARCHAR);","SELECT COUNT(rank) FROM table_name_93 WHERE club = ""zulte waregem"" AND points > 22;","SELECT rank FROM table_name_93 WHERE club = ""zulte waregem"" AND points > 22;",0 What is the HDTV when documentaries are the content?,"CREATE TABLE table_name_84 (hdtv VARCHAR, content VARCHAR);","SELECT hdtv FROM table_name_84 WHERE content = ""documentaries"";","SELECT hdtv FROM table_name_84 WHERE content = ""documentaries"";",1 Show all drought-impacted areas in 'StateY' since 2015,"CREATE TABLE Drought_Impact_Area (id INT, area VARCHAR(30), year INT, impact FLOAT, state VARCHAR(20)); ",SELECT DISTINCT area FROM Drought_Impact_Area WHERE state = 'StateY' AND year >= 2015;,SELECT area FROM Drought_Impact_Area WHERE state = 'StateY' AND year >= 2015;,0 Which Programming has a Video of audio only?,"CREATE TABLE table_name_62 (programming VARCHAR, video VARCHAR);","SELECT programming FROM table_name_62 WHERE video = ""audio only"";","SELECT programming FROM table_name_62 WHERE video = ""audio only"";",1 "What surface was played on on October 3, 2010?","CREATE TABLE table_name_42 (surface VARCHAR, date VARCHAR);","SELECT surface FROM table_name_42 WHERE date = ""october 3, 2010"";","SELECT surface FROM table_name_42 WHERE date = ""october 3, 2010"";",1 "What is the newest Season in which had 0 Podiums, and having 1 total of Races, as well as total wins larger than 0?","CREATE TABLE table_name_65 (season INTEGER, wins VARCHAR, podiums VARCHAR, races VARCHAR);",SELECT MAX(season) FROM table_name_65 WHERE podiums = 0 AND races = 1 AND wins > 0;,SELECT MAX(season) FROM table_name_65 WHERE podiums = 0 AND races = 1 AND wins > 0;,1 What is the average price of non-vegetarian menu items with a high carbon footprint?,"CREATE TABLE menus (menu_id INT, menu_name VARCHAR(50), menu_type VARCHAR(20), price DECIMAL(5,2), carbon_footprint DECIMAL(5,2)); ",SELECT AVG(price) FROM menus WHERE menu_type = 'Non-vegetarian' AND carbon_footprint > 5;,SELECT AVG(price) FROM menus WHERE menu_type = 'Non-Vegetarian' AND carbon_footprint = (SELECT MAX(carbon_footprint) FROM menus);,0 "What are the top 5 most mentioned brands by users from the United States, in the sports industry, in the past month?","CREATE TABLE users (id INT, country VARCHAR(255), industry VARCHAR(255)); CREATE TABLE posts (id INT, user_id INT, brand_mentioned VARCHAR(255), post_time DATETIME);","SELECT brand_mentioned FROM posts INNER JOIN users ON posts.user_id = users.id WHERE country = 'United States' AND industry = 'sports' AND post_time > DATE_SUB(NOW(), INTERVAL 1 MONTH) GROUP BY brand_mentioned LIMIT 5;","SELECT brand_mentioned, COUNT(*) as num_posts FROM posts JOIN users ON posts.user_id = users.id WHERE users.country = 'United States' AND users.industry = 'Sports' AND posts.post_time >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY brand_mentioned ORDER BY num_posts DESC LIMIT 5;",0 List all the founders who have not yet founded a company.,"CREATE TABLE founders (id INT, name TEXT, gender TEXT, company_id INT); CREATE TABLE companies (id INT, name TEXT); ",SELECT name FROM founders WHERE company_id IS NULL;,SELECT founders.name FROM founders INNER JOIN companies ON founders.company_id = companies.id WHERE founders.id IS NULL;,0 What is the most common type of crime reported in London?,"CREATE TABLE crimes (id INT, report_date DATE, type TEXT, city TEXT); ","SELECT crimes.type, COUNT(*) FROM crimes WHERE crimes.city = 'London' GROUP BY crimes.type ORDER BY COUNT(*) DESC LIMIT 1;","SELECT type, COUNT(*) as count FROM crimes WHERE city = 'London' GROUP BY type ORDER BY count DESC LIMIT 1;",0 What venue is home for the Melbourne team?,"CREATE TABLE table_name_60 (venue VARCHAR, home_team VARCHAR);","SELECT venue FROM table_name_60 WHERE home_team = ""melbourne"";","SELECT venue FROM table_name_60 WHERE home_team = ""melbourne"";",1 "What year was ""moped girls"" released?","CREATE TABLE table_18710512_3 (date VARCHAR, single VARCHAR);","SELECT date FROM table_18710512_3 WHERE single = ""Moped Girls"";","SELECT date FROM table_18710512_3 WHERE single = ""Moped Girls"";",1 What is the average explainability score for each AI model?,"CREATE TABLE ai_models (model_name TEXT, explainability_score FLOAT); ","SELECT model_name, AVG(explainability_score) FROM ai_models GROUP BY model_name;","SELECT model_name, AVG(explainability_score) FROM ai_models GROUP BY model_name;",1 Who was the home team for the game played at Lake Oval?,"CREATE TABLE table_name_77 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_77 WHERE venue = ""lake oval"";","SELECT home_team FROM table_name_77 WHERE venue = ""lake oval"";",1 What is the average production of all copper mines in 'Country Y'?,"CREATE TABLE copper_mines (id INT, name TEXT, location TEXT, production INT); ",SELECT AVG(production) FROM copper_mines WHERE location = 'Country Y';,SELECT AVG(production) FROM copper_mines WHERE location = 'Country Y';,1 "Which Pick has a Position of offensive guard, a Player of reggie mckenzie, and a Round larger than 2?","CREATE TABLE table_name_96 (pick VARCHAR, round VARCHAR, position VARCHAR, player VARCHAR);","SELECT COUNT(pick) FROM table_name_96 WHERE position = ""offensive guard"" AND player = ""reggie mckenzie"" AND round > 2;","SELECT pick FROM table_name_96 WHERE position = ""offensive guard"" AND player = ""reggie mckenzie"" AND round > 2;",0 What is the maximum speed of the Chevrolet Corvette?,"CREATE TABLE sports_cars_2 (make VARCHAR(255), model VARCHAR(255), max_speed INT); ",SELECT max_speed FROM sports_cars_2 WHERE make = 'Chevrolet' AND model = 'Corvette';,SELECT max_speed FROM sports_cars_2 WHERE make = 'Chevrolet Corvette';,0 What school did the player who was with the grizzles in 2011 attend?,"CREATE TABLE table_16494599_3 (school_club_team VARCHAR, years_for_grizzlies VARCHAR);","SELECT school_club_team FROM table_16494599_3 WHERE years_for_grizzlies = ""2011"";",SELECT school_club_team FROM table_16494599_3 WHERE years_for_grizzlies = 2011;,0 What was the average temperature in field 6 over the last month?,"CREATE TABLE field_temperature (field_id INT, date DATE, temperature FLOAT); ","SELECT AVG(temperature) FROM field_temperature WHERE field_id = 6 AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);","SELECT AVG(temperature) FROM field_temperature WHERE field_id = 6 AND date >= DATEADD(month, -1, GETDATE());",0 Which countries have the most blockchain nodes and what is their average uptime?,"CREATE TABLE blockchain_nodes (node_id INT, node_address VARCHAR(50), country VARCHAR(50), uptime DECIMAL(5,2), last_updated TIMESTAMP);","SELECT country, COUNT(node_id) as node_count, AVG(uptime) as avg_uptime FROM blockchain_nodes WHERE last_updated > '2021-06-01 00:00:00' GROUP BY country ORDER BY node_count DESC;","SELECT country, AVG(uptime) as avg_uptime FROM blockchain_nodes GROUP BY country ORDER BY avg_uptime DESC;",0 List the names and purchase dates of all machines that were purchased before the 'MachineA'.,"CREATE TABLE Machines (MachineID INT, MachineName VARCHAR(50), PurchaseDate DATE); ","SELECT MachineName, PurchaseDate FROM Machines WHERE PurchaseDate < (SELECT PurchaseDate FROM Machines WHERE MachineName = 'MachineA');","SELECT MachineName, PurchaseDate FROM Machines WHERE PurchaseDate 'MachineA';",0 What is the number of space missions launched by private companies between 2010 and 2020?,"CREATE TABLE space_missions (id INT, name VARCHAR(50), company VARCHAR(50), launch_date DATE);",SELECT COUNT(*) as number_of_missions FROM space_missions JOIN company ON space_missions.company = company.name WHERE company.type = 'private' AND space_missions.launch_date BETWEEN '2010-01-01' AND '2020-12-31';,SELECT COUNT(*) FROM space_missions WHERE company = 'Private' AND launch_date BETWEEN '2010-01-01' AND '2020-12-31';,0 What shows for monounsaturated fat when the saturated fat is 39g?,"CREATE TABLE table_name_32 (monounsaturated_fat VARCHAR, saturated_fat VARCHAR);","SELECT monounsaturated_fat FROM table_name_32 WHERE saturated_fat = ""39g"";","SELECT monounsaturated_fat FROM table_name_32 WHERE saturated_fat = ""39g"";",1 Which NFL team has a player that came from a college in Washington?,"CREATE TABLE table_name_33 (nfl_team VARCHAR, college VARCHAR);","SELECT nfl_team FROM table_name_33 WHERE college = ""washington"";","SELECT nfl_team FROM table_name_33 WHERE college = ""washington"";",1 "What is the total revenue generated from VIP tickets for the ""Dallas Mavericks"" team in the last year?","CREATE TABLE revenue(id INT, team VARCHAR(50), game_date DATE, ticket_type VARCHAR(10), price DECIMAL(10, 2), quantity INT);","SELECT SUM(price * quantity) FROM revenue WHERE team = 'Dallas Mavericks' AND ticket_type = 'VIP' AND game_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT SUM(price * quantity) FROM revenue WHERE team = 'Dallas Mavericks' AND ticket_type = 'VIP' AND game_date >= DATEADD(year, -1, GETDATE());",0 Retrieve the names and maintenance dates of structures in Texas with a resilience score greater than 85,"CREATE TABLE Infrastructure (id INT, name VARCHAR(255), type VARCHAR(255), location VARCHAR(255), resilience_score INT); CREATE TABLE Maintenance (id INT, infrastructure_id INT, maintenance_date DATE); ","SELECT Infrastructure.name, Maintenance.maintenance_date FROM Infrastructure INNER JOIN Maintenance ON Infrastructure.id = Maintenance.infrastructure_id WHERE Infrastructure.location = 'Texas' AND Infrastructure.resilience_score > 85;","SELECT Infrastructure.name, Maintenance.maintenance_date FROM Infrastructure INNER JOIN Maintenance ON Infrastructure.id = Maintenance.infrastructure_id WHERE Infrastructure.location = 'Texas' AND Infrastructure.resilience_score > 85;",1 What's the minimum heart rate during yoga for each member?,"CREATE TABLE YogaHeartRate (MemberID INT, HeartRate INT); ","SELECT MemberID, MIN(HeartRate) FROM YogaHeartRate GROUP BY MemberID;","SELECT MemberID, MIN(HeartRate) FROM YogaHeartRate GROUP BY MemberID;",1 Name the broadcast network for saitama prefecture,"CREATE TABLE table_21076286_2 (broadcast_network VARCHAR, broadcast_scope VARCHAR);","SELECT broadcast_network FROM table_21076286_2 WHERE broadcast_scope = ""Saitama Prefecture"";","SELECT broadcast_network FROM table_21076286_2 WHERE broadcast_scope = ""Satoma Prefecture"";",0 Which threat actors have targeted systems with a CVE score greater than 7 in the last year?,"CREATE TABLE threat_actors (threat_actor_id INT, threat_actor_name VARCHAR(255));CREATE TABLE targeted_systems (system_id INT, system_name VARCHAR(255), sector VARCHAR(255), threat_actor_id INT);CREATE TABLE cve_scores (system_id INT, score INT, scan_date DATE);CREATE TABLE scan_dates (scan_date DATE, system_id INT);","SELECT ta.threat_actor_name FROM threat_actors ta INNER JOIN targeted_systems ts ON ta.threat_actor_id = ts.threat_actor_id INNER JOIN cve_scores c ON ts.system_id = c.system_id INNER JOIN scan_dates sd ON ts.system_id = sd.system_id WHERE c.score > 7 AND sd.scan_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT threat_actors.threat_actor_name FROM threat_actors INNER JOIN targeted_systems ON threat_actors.threat_actor_id = targeted_systems.threat_actor_id INNER JOIN cve_scores ON targeted_systems.system_id = cve_scores.system_id WHERE cve_score > 7 AND scan_dates.scan_date >= DATEADD(year, -1, GETDATE());",0 "How many patients have received both therapy and medication management in Brazil, Russia, and China?","CREATE TABLE patients (id INT, name TEXT); CREATE TABLE therapy_sessions (id INT, patient_id INT); CREATE TABLE medication_management (id INT, patient_id INT); ","SELECT COUNT(*) FROM patients INNER JOIN therapy_sessions ON patients.id = therapy_sessions.patient_id INNER JOIN medication_management ON patients.id = medication_management.patient_id WHERE patients.name IN ('Pedro Almeida', 'Anastasia Kuznetsova', 'Li Wen');","SELECT COUNT(DISTINCT patients.id) FROM patients INNER JOIN therapy_sessions ON patients.id = therapy_sessions.patient_id INNER JOIN medication_management ON patients.id = medication_management.patient_id WHERE patients.name IN ('Brazil', 'Russia', 'China');",0 "Add a new cargo handling operation to the ""cargo_operations"" table","CREATE TABLE cargo_operations (id INT PRIMARY KEY, vessel_id INT, port_id INT, operation_type VARCHAR(255), amount INT, timestamp TIMESTAMP);","INSERT INTO cargo_operations (id, vessel_id, port_id, operation_type, amount, timestamp) VALUES (1, 1, 2, 'Loading', 10000, '2022-01-01 10:00:00');","INSERT INTO cargo_operations (id, vessel_id, port_id, operation_type, amount, timestamp) VALUES (1, 'Transportation', 'Transportation', 'Transportation', 'Transportation'), (2, 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation'), (3, 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation', 'Transportation'));",0 "Display the names of biosensors, their types, and the date of development from the 'biosensor_development' table for biosensors developed on or after 'January 1, 2023'.","CREATE TABLE biosensor_development (id INT, biosensor_name VARCHAR(50), sensor_type VARCHAR(50), data TEXT, date DATE); ","SELECT biosensor_name, sensor_type, date FROM biosensor_development WHERE date >= '2023-01-01';","SELECT biosensor_name, sensor_type, date FROM biosensor_development WHERE date >= '2023-01-01';",1 What is the source on 6 September?,"CREATE TABLE table_name_27 (source VARCHAR, date VARCHAR);","SELECT source FROM table_name_27 WHERE date = ""6 september"";","SELECT source FROM table_name_27 WHERE date = ""6 september"";",1 What is the minimum number of streams for any artist from the UK?,"CREATE TABLE Streaming (id INT, artist VARCHAR(50), streams INT, country VARCHAR(50)); ",SELECT MIN(streams) FROM Streaming WHERE country = 'UK';,SELECT MIN(streams) FROM Streaming WHERE country = 'UK';,1 What is the frequency of the station owned by the Canadian Broadcasting Corporation and branded as CBC Radio One?,"CREATE TABLE table_name_49 (frequency VARCHAR, owner VARCHAR, branding VARCHAR);","SELECT frequency FROM table_name_49 WHERE owner = ""canadian broadcasting corporation"" AND branding = ""cbc radio one"";","SELECT frequency FROM table_name_49 WHERE owner = ""canadian broadcasting corporation"" AND branding = ""cbc radio one"";",1 What is the highest overall number for someone from round 16?,"CREATE TABLE table_name_51 (overall INTEGER, round VARCHAR);",SELECT MAX(overall) FROM table_name_51 WHERE round = 16;,SELECT MAX(overall) FROM table_name_51 WHERE round = 16;,1 List defense projects with timelines exceeding 18 months,"CREATE TABLE defense_projects (id INT, project_name VARCHAR, start_date DATE, end_date DATE);","SELECT project_name FROM defense_projects WHERE DATEDIFF(end_date, start_date) > 18*30;","SELECT project_name FROM defense_projects WHERE start_date >= DATE_SUB(CURRENT_DATE, INTERVAL 18 MONTH);",0 "List all state classes when successors were formally installed on June 22, 1868.","CREATE TABLE table_2417340_3 (state__class_ VARCHAR, date_of_successors_formal_installation VARCHAR);","SELECT state__class_ FROM table_2417340_3 WHERE date_of_successors_formal_installation = ""June 22, 1868"";","SELECT state__class_ FROM table_2417340_3 WHERE date_of_successors_formal_installation = ""June 22, 1868"";",1 List all unique soil types and their corresponding ph levels in descending order of ph level,"CREATE TABLE soil (soil_type VARCHAR(255), ph DECIMAL(3,1)); ","SELECT DISTINCT soil_type, ph FROM soil ORDER BY ph DESC;","SELECT DISTINCT soil_type, ph FROM soil ORDER BY ph DESC;",1 Who had third place when the champions is baník ostrava (1)?,"CREATE TABLE table_2429942_2 (third_place VARCHAR, champions VARCHAR);","SELECT third_place FROM table_2429942_2 WHERE champions = ""Baník Ostrava (1)"";","SELECT third_place FROM table_2429942_2 WHERE champions = ""Bank Ostrava (1)"";",0 How many teams came in fourth when Otsuka Pharmaceuticals won?,"CREATE TABLE table_29446183_2 (fourth_place VARCHAR, winner VARCHAR);","SELECT COUNT(fourth_place) FROM table_29446183_2 WHERE winner = ""Otsuka Pharmaceuticals"";","SELECT COUNT(fourth_place) FROM table_29446183_2 WHERE winner = ""OTSUKA Pharmaceuticals"";",0 Update the safety AI model 'Criticality Safety' with a new method,"CREATE TABLE safety_models (id INT, name VARCHAR(255), type VARCHAR(255), method VARCHAR(255)); ",UPDATE safety_models SET method = 'Consequence Analysis' WHERE name = 'Criticality Safety';,UPDATE safety_models SET method = 'Criticality Safety' WHERE name = 'Criticality Safety';,0 How many pages associated with isbn 91-7713-035-9?,"CREATE TABLE table_name_75 (pages INTEGER, isbn VARCHAR);","SELECT SUM(pages) FROM table_name_75 WHERE isbn = ""isbn 91-7713-035-9"";","SELECT SUM(pages) FROM table_name_75 WHERE isbn = ""91-7713-035-9"";",0 What place in the United States having a score of 67-75-68=210?,"CREATE TABLE table_name_10 (place VARCHAR, country VARCHAR, score VARCHAR);","SELECT place FROM table_name_10 WHERE country = ""united states"" AND score = 67 - 75 - 68 = 210;","SELECT place FROM table_name_10 WHERE country = ""united states"" AND score = 67 - 75 - 68 = 210;",1 List all circular economy initiatives,CREATE VIEW circular_economy_initiatives AS SELECT * FROM waste_generation_metrics WHERE generation_metric < 100;,SELECT * FROM circular_economy_initiatives;,SELECT * FROM circular_economy_initiatives;,1 What was the tie no when Wrexham was the away team?,"CREATE TABLE table_name_97 (tie_no VARCHAR, away_team VARCHAR);","SELECT tie_no FROM table_name_97 WHERE away_team = ""wrexham"";","SELECT tie_no FROM table_name_97 WHERE away_team = ""wrexham"";",1 How many traditional dances from the Andes region are documented in the database?,"CREATE TABLE traditional_dances (id INT, name VARCHAR(255), region VARCHAR(255)); ",SELECT COUNT(*) FROM traditional_dances WHERE region = 'Andes';,SELECT COUNT(*) FROM traditional_dances WHERE region = 'Andes';,1 What is the average donation amount per donor in the last year?,"CREATE TABLE Donors (DonorID INT, DonationDate DATE, DonationAmount DECIMAL(10,2)); ","SELECT DonorID, AVG(DonationAmount) as AvgDonationPerDonor FROM Donors WHERE DonationDate >= DATE_TRUNC('year', CURRENT_DATE - INTERVAL '1 year') AND DonationDate < DATE_TRUNC('year', CURRENT_DATE) GROUP BY DonorID;","SELECT AVG(DonationAmount) FROM Donors WHERE DonationDate >= DATEADD(year, -1, GETDATE());",0 In what state did Jing have the title of Marquis?,"CREATE TABLE table_name_2 (state VARCHAR, title VARCHAR, name VARCHAR);","SELECT state FROM table_name_2 WHERE title = ""marquis"" AND name = ""jing"";","SELECT state FROM table_name_2 WHERE title = ""marquis"" AND name = ""jing"";",1 "What is Year(s) Won, when Finish is ""T31"", and when Player is ""Nick Price""?","CREATE TABLE table_name_65 (year_s__won VARCHAR, finish VARCHAR, player VARCHAR);","SELECT year_s__won FROM table_name_65 WHERE finish = ""t31"" AND player = ""nick price"";","SELECT year_s__won FROM table_name_65 WHERE finish = ""t31"" AND player = ""nick price"";",1 What is the name of the AI safety officer with the highest number of reported incidents in the 'safety_officers' table?,"CREATE TABLE safety_officers (officer_id INT, name TEXT, incident_count INT); ",SELECT name FROM safety_officers ORDER BY incident_count DESC LIMIT 1;,SELECT name FROM safety_officers ORDER BY incident_count DESC LIMIT 1;,1 What is the earliest release date for a game with a genre of 'Role-playing' and the number of players who have played it?,"CREATE TABLE GamePlay (PlayerID INT, GameID INT); CREATE TABLE Games (GameID INT, Name VARCHAR(50), Genre VARCHAR(20), ReleaseDate DATETIME, Publisher VARCHAR(50)); ","SELECT MIN(ReleaseDate) AS Earliest_Release_Date, COUNT(DISTINCT gp.PlayerID) FROM Games g INNER JOIN GamePlay gp ON g.GameID = gp.GameID WHERE g.Genre = 'Role-playing';","SELECT MIN(ReleaseDate), COUNT(DISTINCT PlayerID) FROM GamePlay JOIN Games ON GamePlay.GameID = Games.GameID WHERE Genre = 'Role-playing';",0 Calculate the average age of players who play FPS games,"CREATE TABLE Players (PlayerID INT, PlayerName VARCHAR(50), GameType VARCHAR(50), Age INT); ",SELECT AVG(Age) FROM Players WHERE GameType = 'FPS';,SELECT AVG(Age) FROM Players WHERE GameType = 'FPS';,1 Which loss has a Date of april 26?,"CREATE TABLE table_name_30 (loss VARCHAR, date VARCHAR);","SELECT loss FROM table_name_30 WHERE date = ""april 26"";","SELECT loss FROM table_name_30 WHERE date = ""april 26"";",1 What is the number of employees by ethnicity and their average salary in the Mining department?,"CREATE TABLE Employees (EmployeeID INT, Department VARCHAR(20), Position VARCHAR(20), Salary INT, Ethnicity VARCHAR(20), IsFullTime BOOLEAN);","SELECT Ethnicity, AVG(Salary) FROM Employees WHERE Department = 'Mining' AND IsFullTime = TRUE GROUP BY Ethnicity;","SELECT Ethnicity, COUNT(*) as NumberOfEmployees, AVG(Salary) as AvgSalary FROM Employees WHERE Department = 'Mining' GROUP BY Ethnicity;",0 What is the name of the airport with an ICAO of ULLI?,"CREATE TABLE table_name_40 (airport VARCHAR, icao VARCHAR);","SELECT airport FROM table_name_40 WHERE icao = ""ulli"";","SELECT airport FROM table_name_40 WHERE icao = ""ulli"";",1 What is the migration rating when trade is 5.7?,"CREATE TABLE table_13677808_1 (migration VARCHAR, trade VARCHAR);","SELECT migration FROM table_13677808_1 WHERE trade = ""5.7"";","SELECT migration FROM table_13677808_1 WHERE trade = ""5.7"";",1 Which European cities have the most luxury hotels?,"CREATE TABLE europe_cities (city VARCHAR(50), luxury_hotels INT); ",SELECT city FROM europe_cities ORDER BY luxury_hotels DESC LIMIT 3;,"SELECT city, SUM(luxury_hotels) FROM europe_cities GROUP BY city ORDER BY SUM(luxury_hotels) DESC;",0 List the names of all countries that have sent rovers to Mars and the launch dates of their rovers.,"CREATE TABLE mars_rovers (id INT, name VARCHAR(255), type VARCHAR(255), operational BOOLEAN, launch_country VARCHAR(255), launch_date DATE); ","SELECT launch_country, launch_date FROM mars_rovers;","SELECT launch_country, launch_date FROM mars_rovers;",1 How many artworks are in the 'Modern Art' gallery?,"CREATE TABLE Artworks (artwork_id INT, gallery_name VARCHAR(50)); ",SELECT COUNT(*) FROM Artworks WHERE gallery_name = 'Modern Art';,SELECT COUNT(*) FROM Artworks WHERE gallery_name = 'Modern Art';,1 What country has Dave Barr as a player?,"CREATE TABLE table_name_45 (country VARCHAR, player VARCHAR);","SELECT country FROM table_name_45 WHERE player = ""dave barr"";","SELECT country FROM table_name_45 WHERE player = ""dave barr"";",1 What is the maximum carbon price in each region?,"CREATE TABLE carbon_prices_by_region (id INT, region VARCHAR(255), price DECIMAL(5,2)); ","SELECT region, MAX(price) FROM carbon_prices_by_region;","SELECT region, MAX(price) FROM carbon_prices_by_region GROUP BY region;",0 "What is the average donation amount by donor type, excluding the top and bottom 5%?","CREATE SCHEMA if not exists arts_culture;CREATE TABLE if not exists arts_culture.donors (donor_id INT PRIMARY KEY, name VARCHAR(255), type VARCHAR(255), donation DECIMAL(10,2));","SELECT type, AVG(donation) as avg_donation FROM (SELECT donation, type, NTILE(100) OVER (ORDER BY donation) as percentile FROM arts_culture.donors) d WHERE percentile NOT IN (1, 2, 99, 100) GROUP BY type;","SELECT type, AVG(donation) as avg_donation FROM arts_culture.donors GROUP BY type;",0 "Determine the percentage of hair care products that contain sulfates, based on the current inventory.","CREATE TABLE inventory (product_id INT, product_name TEXT, product_type TEXT, contains_sulfates BOOLEAN); ",SELECT 100.0 * COUNT(*) / (SELECT COUNT(*) FROM inventory WHERE product_type = 'Hair Care') AS pct_sulfates FROM inventory WHERE product_type = 'Hair Care' AND contains_sulfates = true;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM inventory WHERE product_type = 'Hair Care')) FROM inventory WHERE contains_sulfates = true;,0 What is the name and number of participants for restorative justice programs in the Southern region?,"CREATE TABLE programs (id INT, program_name VARCHAR(30), participants INT, region VARCHAR(20)); ","SELECT programs.program_name, programs.participants FROM programs WHERE programs.region = 'Southern';","SELECT program_name, participants FROM programs WHERE region = 'Southern';",0 "Which Points is the highest one that has a Game smaller than 43, and a January larger than 8?","CREATE TABLE table_name_64 (points INTEGER, game VARCHAR, january VARCHAR);",SELECT MAX(points) FROM table_name_64 WHERE game < 43 AND january > 8;,SELECT MAX(points) FROM table_name_64 WHERE game 43 AND january > 8;,0 Find the daily oil production for platform 2 in March 2020,"CREATE TABLE daily_oil_production (platform_id INT, production_date DATE, oil_production FLOAT); ",SELECT oil_production FROM daily_oil_production WHERE platform_id = 2 AND production_date BETWEEN '2020-03-01' AND '2020-03-03';,SELECT oil_production FROM daily_oil_production WHERE platform_id = 2 AND production_date BETWEEN '2020-03-01' AND '2020-03-31';,0 What are the top 5 most mentioned 'electronics' brands in user posts from users aged 31-35 in the 'United States'?,"CREATE TABLE user_posts (user_id INT, age INT, country VARCHAR(255), brand VARCHAR(255));","SELECT brand, COUNT(*) AS mentions FROM user_posts WHERE age BETWEEN 31 AND 35 AND country = 'United States' AND brand IN ('brand1', 'brand2', 'brand3', 'brand4', 'brand5') GROUP BY brand LIMIT 5;","SELECT brand, COUNT(*) as count FROM user_posts WHERE age BETWEEN 31 AND 35 AND country = 'United States' GROUP BY brand ORDER BY count DESC LIMIT 5;",0 What day was the complete 2nd series: volume one released?,"CREATE TABLE table_17798548_4 (date_released VARCHAR, season VARCHAR);","SELECT date_released FROM table_17798548_4 WHERE season = ""The Complete 2nd Series: Volume One"";","SELECT date_released FROM table_17798548_4 WHERE season = ""2nd Series: Volume One"";",0 What is the average delivery time for shipments that were delayed due to customs issues?,"CREATE TABLE Shipments (id INT, weight INT, delay_reason VARCHAR(50), delivery_date DATE, shipped_date DATE); ","SELECT AVG(DATEDIFF(delivery_date, shipped_date)) AS avg_delivery_time FROM Shipments WHERE delay_reason = 'Customs';","SELECT AVG(DATEDIFF(shipped_date, delivery_date)) FROM Shipments WHERE delay_reason = 'Customs';",0 when was the last performance of the first performance on 11/15/1909,"CREATE TABLE table_19189856_1 (last_performance VARCHAR, first_performance VARCHAR);","SELECT last_performance FROM table_19189856_1 WHERE first_performance = ""11/15/1909"";","SELECT last_performance FROM table_19189856_1 WHERE first_performance = ""11/15/1909"";",1 "List forests, their managed methods, and associated carbon sequestration.","CREATE TABLE Forests ( ForestID INT PRIMARY KEY, Name VARCHAR(50), Country VARCHAR(50), Hectares FLOAT ); CREATE TABLE Management ( ManagementID INT PRIMARY KEY, Method VARCHAR(50), ForestID INT, FOREIGN KEY (ForestID) REFERENCES Forests(ForestID)); CREATE TABLE Harvest ( HarvestID INT PRIMARY KEY, Volume FLOAT, ForestID INT, HarvestDate DATE, FOREIGN KEY (ForestID) REFERENCES Forests(ForestID)); CREATE TABLE Carbon ( CarbonID INT PRIMARY KEY, Sequestration FLOAT, HarvestID INT, FOREIGN KEY (HarvestID) REFERENCES Harvest(HarvestID));","SELECT Forests.Name, Management.Method, Carbon.Sequestration FROM Forests INNER JOIN Management ON Forests.ForestID = Management.ForestID INNER JOIN Harvest ON Forests.ForestID = Harvest.ForestID INNER JOIN Carbon ON Harvest.HarvestID = Carbon.HarvestID;","SELECT Forests.Name, Forests.Country, Forests.Hectares FROM Forests INNER JOIN Management ON Forests.ForestID = Management.ForestID INNER JOIN Harvest ON Management.ForestID = Harvest.ForestID INNER JOIN Carbon ON Harvest.HarvestID = Carbon.HarvestID;",0 What is the average coins earned per game by players from the United States?,"CREATE TABLE Players (PlayerID INT, PlayerName TEXT, Country TEXT, CoinsEarned INT); ",SELECT AVG(CoinsEarned) FROM Players WHERE Country = 'USA';,SELECT AVG(CoinsEarned) FROM Players WHERE Country = 'United States';,0 How many ships are there?,CREATE TABLE ship (Id VARCHAR);,SELECT COUNT(*) FROM ship;,SELECT COUNT(*) FROM ship;,1 "What is GPU Frequency, when Model Number is Atom N435?","CREATE TABLE table_name_18 (gpu_frequency VARCHAR, model_number VARCHAR);","SELECT gpu_frequency FROM table_name_18 WHERE model_number = ""atom n435"";","SELECT gpu_frequency FROM table_name_18 WHERE model_number = ""atom n435"";",1 What is the average landfill tipping fee per state?,"CREATE TABLE landfill (state VARCHAR(2), tipping_fee DECIMAL(5,2)); ",SELECT AVG(tipping_fee) FROM landfill GROUP BY state;,"SELECT state, AVG(tipping_fee) as avg_tipping_fee FROM landfill GROUP BY state;",0 "Which tournament was played on September 25, 1995?","CREATE TABLE table_name_46 (tournament VARCHAR, date VARCHAR);","SELECT tournament FROM table_name_46 WHERE date = ""september 25, 1995"";","SELECT tournament FROM table_name_46 WHERE date = ""september 25, 1995"";",1 List all military innovation projects and their start dates.,"CREATE TABLE Military_Innovation (Project_ID INT, Project_Name VARCHAR(50), Start_Date DATE); ",SELECT * FROM Military_Innovation;,"SELECT Project_Name, Start_Date FROM Military_Innovation;",0 What are all values for 'to par' for the winning score of 67-67-69-69=272?,"CREATE TABLE table_1507431_1 (to_par VARCHAR, winning_score VARCHAR);",SELECT to_par FROM table_1507431_1 WHERE winning_score = 67 - 67 - 69 - 69 = 272;,SELECT to_par FROM table_1507431_1 WHERE winning_score = 67 - 67 - 69 - 69 = 272;,1 Create a table named 'ocean_health_metrics',"CREATE TABLE ocean_health_indicators (indicator_id INT PRIMARY KEY, indicator_name VARCHAR(255));","CREATE TABLE ocean_health_metrics (metric_id INT PRIMARY KEY, location_id INT, indicator_id INT, year INT, value FLOAT, FOREIGN KEY (location_id) REFERENCES farm_locations(location_id), FOREIGN KEY (indicator_id) REFERENCES ocean_health_indicators(indicator_id));","CREATE TABLE ocean_health_metrics (indicator_id INT PRIMARY KEY, indicator_name VARCHAR(255));",0 How many songs were released by female artists in the Pop genre between 2015 and 2020?,"CREATE TABLE artists (id INT, name VARCHAR, gender VARCHAR, genre VARCHAR); CREATE TABLE songs (id INT, artist_id INT, title VARCHAR, release_year INT); ",SELECT COUNT(songs.id) FROM songs JOIN artists ON songs.artist_id = artists.id WHERE artists.gender = 'Female' AND artists.genre = 'Pop' AND songs.release_year BETWEEN 2015 AND 2020;,SELECT COUNT(*) FROM songs JOIN artists ON songs.artist_id = artists.id WHERE artists.gender = 'Female' AND artists.genre = 'Pop' AND songs.release_year BETWEEN 2015 AND 2020;,0 "What are the names of the stations which serve both ""Ananthapuri Express"" and ""Guruvayur Express"" trains?","CREATE TABLE station (name VARCHAR, station_id VARCHAR); CREATE TABLE train (train_id VARCHAR, Name VARCHAR); CREATE TABLE train_station (station_id VARCHAR, train_id VARCHAR);","SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T3.Name = ""Ananthapuri Express"" INTERSECT SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T3.Name = ""Guruvayur Express"";","SELECT T1.name FROM station AS T1 JOIN train AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T2.train_id = T3.train_id WHERE T3.Name = ""Ananthapuri Express"" INTERSECT SELECT T3.name FROM train AS T1 JOIN train AS T2 ON T1.train_id = T2.train_id WHERE T2.Name = ""Guruvayur Express"";",0 How many marine species have been researched in the 'MarineSpecies' schema?,"CREATE SCHEMA MarineSpecies; CREATE TABLE Species (species_id INT, species_name VARCHAR(50)); ",SELECT COUNT(*) FROM MarineSpecies.Species;,SELECT COUNT(*) FROM MarineSpecies.Species;,1 What is the IEF 2011 of the country with an FSI 2012 of 99.2?,"CREATE TABLE table_name_96 (ief_2011 VARCHAR, fsi_2012 VARCHAR);","SELECT ief_2011 FROM table_name_96 WHERE fsi_2012 = ""99.2"";","SELECT ief_2011 FROM table_name_96 WHERE fsi_2012 = ""99.2"";",1 What is the average severity score of vulnerabilities for the financial services industry?,"create table vulnerabilities (id int, industry varchar(255), severity int); insert into vulnerabilities values (1, 'financial services', 7); insert into vulnerabilities values (2, 'financial services', 5); insert into vulnerabilities values (3, 'healthcare', 8);",SELECT AVG(severity) FROM vulnerabilities WHERE industry = 'financial services';,SELECT AVG(severity) as avg_severity_score FROM vulnerabilities WHERE industry = 'financial services';,0 Which call sign has a frequency greater than 98.5MHz and ERP W under 155?,"CREATE TABLE table_name_41 (call_sign VARCHAR, frequency_mhz VARCHAR, erp_w VARCHAR);",SELECT call_sign FROM table_name_41 WHERE frequency_mhz > 98.5 AND erp_w < 155;,SELECT call_sign FROM table_name_41 WHERE frequency_mhz > 98.5 AND erp_w 155;,0 Name the game coast for chicago and north western,"CREATE TABLE table_243664_1 (game_cost VARCHAR, railroad VARCHAR);","SELECT game_cost FROM table_243664_1 WHERE railroad = ""Chicago and North Western"";","SELECT game_cost FROM table_243664_1 WHERE railroad = ""Chicago and North Western"";",1 What is the minimum age of an astronaut when they first flew in space?,"CREATE TABLE Astronauts(ID INT, Name VARCHAR(50), Age INT, FirstMissionDate DATE);",SELECT MIN(Age) FROM Astronauts INNER JOIN (SELECT MIN(FirstMissionDate) AS FirstMission FROM Astronauts) AS Subquery ON Astronauts.FirstMissionDate = Subquery.FirstMission;,"SELECT MIN(Age) FROM Astronauts WHERE FirstMissionDate >= DATEADD(year, -1, GETDATE());",0 What is the average listening time per user in each genre?,"CREATE TABLE users (user_id INT, user_name VARCHAR(255)); ALTER TABLE music_streams ADD COLUMN user_id INT; ALTER TABLE music_streams ADD FOREIGN KEY (user_id) REFERENCES users(user_id);"," SELECT genre, AVG(listening_time) as avg_listening_time FROM music_streams GROUP BY genre; ","SELECT music_streams.genre, AVG(listening_time) as avg_listening_time FROM music_streams INNER JOIN users ON music_streams.user_id = users.user_id GROUP BY music_streams.genre;",0 What is the name and location of the rural clinic with the most medical professionals in the state of New York?,"CREATE TABLE medical_professionals (id INT, name VARCHAR(50), clinic_id INT); CREATE TABLE clinics (id INT, name VARCHAR(50), location VARCHAR(50)); ","SELECT clinics.name, clinics.location FROM clinics JOIN (SELECT clinic_id, COUNT(*) as num_of_professionals FROM medical_professionals GROUP BY clinic_id ORDER BY num_of_professionals DESC LIMIT 1) AS subquery ON clinics.id = subquery.clinic_id;","SELECT c.name, c.location FROM medical_professionals m JOIN clinics c ON m.clinic_id = c.id WHERE m.state = 'New York' GROUP BY c.name ORDER BY COUNT(m.id) DESC LIMIT 1;",0 Who is the player from a round larger than 5 and the college/junior/club team of Leningrad SKA (russia)?,"CREATE TABLE table_name_94 (player VARCHAR, round VARCHAR, college_junior_club_team VARCHAR);","SELECT player FROM table_name_94 WHERE round > 5 AND college_junior_club_team = ""leningrad ska (russia)"";","SELECT player FROM table_name_94 WHERE round > 5 AND college_junior_club_team = ""leningrad ska (russia)"";",1 How many accessible taxi trips were there in the 'east' region in January 2022?,"CREATE TABLE taxi_trips (trip_id INT, region_id INT, trip_date DATE, is_accessible BOOLEAN); ",SELECT COUNT(*) FROM taxi_trips t WHERE t.region_id = (SELECT region_id FROM regions WHERE region_name = 'east') AND t.trip_date BETWEEN '2022-01-01' AND '2022-01-31' AND t.is_accessible = true;,SELECT COUNT(*) FROM taxi_trips WHERE region_id = 1 AND trip_date BETWEEN '2022-01-01' AND '2022-01-31' AND is_accessible = true;,0 Which building has most faculty members?,CREATE TABLE Faculty (building VARCHAR);,SELECT building FROM Faculty GROUP BY building ORDER BY COUNT(*) DESC LIMIT 1;,SELECT building FROM Faculty GROUP BY building ORDER BY COUNT(*) DESC LIMIT 1;,1 "How many debut years have Years at club of 1950–1951, and Games larger than 14?","CREATE TABLE table_name_39 (debut_year INTEGER, years_at_club VARCHAR, games VARCHAR);","SELECT SUM(debut_year) FROM table_name_39 WHERE years_at_club = ""1950–1951"" AND games > 14;","SELECT SUM(debut_year) FROM table_name_39 WHERE years_at_club = ""1950–1951"" AND games > 14;",1 List the names of hosts who did not serve as a host of any party in our record.,"CREATE TABLE HOST (Name VARCHAR, Host_ID VARCHAR); CREATE TABLE party_host (Name VARCHAR, Host_ID VARCHAR);",SELECT Name FROM HOST WHERE NOT Host_ID IN (SELECT Host_ID FROM party_host);,SELECT T1.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID WHERE T2.Host_ID IS NULL;,0 What was the latest year with an edition of 14?,"CREATE TABLE table_name_7 (year INTEGER, edition VARCHAR);",SELECT MAX(year) FROM table_name_7 WHERE edition = 14;,SELECT MAX(year) FROM table_name_7 WHERE edition = 14;,1 Which Lead has Hans Frauenlob as a Third?,"CREATE TABLE table_name_62 (lead VARCHAR, third VARCHAR);","SELECT lead FROM table_name_62 WHERE third = ""hans frauenlob"";","SELECT lead FROM table_name_62 WHERE third = ""hans frauslob"";",0 Identify the top 3 countries with the highest average donation amounts in 2022.,"CREATE TABLE Donations (id INT, donor_name TEXT, country TEXT, donation_amount DECIMAL(10, 2), donation_date DATE);","SELECT country, AVG(donation_amount) AS avg_donation FROM Donations WHERE EXTRACT(YEAR FROM donation_date) = 2022 GROUP BY country ORDER BY avg_donation DESC LIMIT 3;","SELECT country, AVG(donation_amount) as avg_donation FROM Donations WHERE YEAR(donation_date) = 2022 GROUP BY country ORDER BY avg_donation DESC LIMIT 3;",0 What is the giant slalom with a 37 super g?,"CREATE TABLE table_name_94 (Giant VARCHAR, super_g VARCHAR);","SELECT Giant AS slalom FROM table_name_94 WHERE super_g = ""37"";","SELECT Giant FROM table_name_94 WHERE super_g = ""37"";",0 "What are the points against for 2001, and games won of 5 (3)?","CREATE TABLE table_name_16 (points_against___tests__ VARCHAR, year_s_ VARCHAR, games_won___tests__ VARCHAR);","SELECT points_against___tests__ FROM table_name_16 WHERE year_s_ = 2001 AND games_won___tests__ = ""5 (3)"";","SELECT points_against___tests__ FROM table_name_16 WHERE year_s_ = 2001 AND games_won___tests__ = ""5 (3)"";",1 How many ethical and non-ethical products are sold by each retailer?,"CREATE TABLE Retailer (id INT, name VARCHAR(255), type VARCHAR(255)); CREATE TABLE Product (id INT, name VARCHAR(255), retailer_id INT, ethical BOOLEAN);","SELECT r.name, COUNT(p.id) FILTER (WHERE p.ethical) as ethical_products_count, COUNT(p.id) FILTER (WHERE NOT p.ethical) as non_ethical_products_count FROM Retailer r JOIN Product p ON r.id = p.retailer_id GROUP BY r.name;","SELECT r.name, COUNT(p.id) as ethical_products, COUNT(p.id) as non_ethical_products FROM Retailer r JOIN Product p ON r.id = p.retailer_id GROUP BY r.name;",0 What is the minimum amount of grant funding received by a single faculty member in the Biology department in a single year?,"CREATE TABLE grants (id INT, faculty_id INT, year INT, amount DECIMAL(10,2)); CREATE TABLE faculty (id INT, name VARCHAR(50), department VARCHAR(50)); ",SELECT MIN(g.amount) FROM grants g JOIN faculty f ON g.faculty_id = f.id WHERE f.department = 'Biology';,SELECT MIN(grants.amount) FROM grants INNER JOIN faculty ON grants.faculty_id = faculty.id WHERE faculty.department = 'Biology';,0 Which Graded Hammer (Non GH3) has a Model of cvp501?,"CREATE TABLE table_name_44 (graded_hammer__non_gh3_ VARCHAR, model VARCHAR);","SELECT graded_hammer__non_gh3_ FROM table_name_44 WHERE model = ""cvp501"";","SELECT graded_hammer__non_gh3_ FROM table_name_44 WHERE model = ""cvp501"";",1 What is the average defense diplomacy budget for Southeast Asian countries from 2017 to 2021?,"CREATE TABLE defense_diplomacy_sea (country VARCHAR(50), year INT, budget INT); ","SELECT country, AVG(budget) avg_budget FROM defense_diplomacy_sea WHERE country IN ('Indonesia', 'Singapore', 'Malaysia') GROUP BY country;",SELECT AVG(budget) FROM defense_diplomacy_sea WHERE year BETWEEN 2017 AND 2021;,0 What team had a qual 2 time of 58.385?,"CREATE TABLE table_name_92 (team VARCHAR, qual_2 VARCHAR);","SELECT team FROM table_name_92 WHERE qual_2 = ""58.385"";","SELECT team FROM table_name_92 WHERE qual_2 = ""58.385"";",1 "What is the maximum number of reindeer in the 'arctic_reindeer' table, grouped by year?","CREATE TABLE arctic_reindeer (year INT, count INT);","SELECT year, MAX(count) FROM arctic_reindeer GROUP BY year;","SELECT year, MAX(count) FROM arctic_reindeer GROUP BY year;",1 "What is the total revenue of cosmetics sold in the US in Q1 2022, grouped by brand?","CREATE TABLE sales (id INT, brand VARCHAR(255), country VARCHAR(255), sales_amount DECIMAL(10, 2), sale_date DATE);","SELECT brand, SUM(sales_amount) FROM sales WHERE country = 'US' AND sale_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY brand;","SELECT brand, SUM(sales_amount) as total_revenue FROM sales WHERE country = 'USA' AND sale_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY brand;",0 What is the home team score when st kilda is the away team?,"CREATE TABLE table_name_51 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team AS score FROM table_name_51 WHERE away_team = ""st kilda"";","SELECT home_team AS score FROM table_name_51 WHERE away_team = ""st kilda"";",1 Find the number of marine species in each continent.,"CREATE TABLE marine_species (name VARCHAR(255), continent VARCHAR(255), species_count INT); ","SELECT continent, species_count, COUNT(*) OVER (PARTITION BY continent) as total_species_count FROM marine_species;","SELECT continent, species_count FROM marine_species GROUP BY continent;",0 Which result has a Score of 1–1?,"CREATE TABLE table_name_23 (result VARCHAR, score VARCHAR);","SELECT result FROM table_name_23 WHERE score = ""1–1"";","SELECT result FROM table_name_23 WHERE score = ""1–1"";",1 Name the malayalam name for leo,"CREATE TABLE table_20354_7 (malayalam_name VARCHAR, zodiac_sign VARCHAR);","SELECT malayalam_name FROM table_20354_7 WHERE zodiac_sign = ""Leo"";","SELECT malayalam_name FROM table_20354_7 WHERE zodiac_sign = ""Leo"";",1 How many submission of the night occurred when the fighter was matt wiman?,"CREATE TABLE table_21114902_1 (submissions_of_the_night INTEGER, fighter VARCHAR);","SELECT MAX(submissions_of_the_night) FROM table_21114902_1 WHERE fighter = ""Matt Wiman"";","SELECT MAX(submissions_of_the_night) FROM table_21114902_1 WHERE fighter = ""Matt Wright"";",0 "What is the average safety stock level for each chemical category, for chemical manufacturing in the Asia Pacific region?","CREATE TABLE chemicals (id INT, name VARCHAR(255), category VARCHAR(255), safety_stock_level FLOAT, region VARCHAR(255));","SELECT category, AVG(safety_stock_level) as avg_level FROM chemicals WHERE region = 'Asia Pacific' GROUP BY category;","SELECT category, AVG(safety_stock_level) as avg_safety_stock_level FROM chemicals WHERE region = 'Asia Pacific' GROUP BY category;",0 What is the primary language used in the film title Nynke?,"CREATE TABLE table_name_86 (main_language_s_ VARCHAR, original_title VARCHAR);","SELECT main_language_s_ FROM table_name_86 WHERE original_title = ""nynke"";","SELECT main_language_s_ FROM table_name_86 WHERE original_title = ""nynke"";",1 "What is the title of every song, and how many weeks was each song at #1 for Rihanna in 2012?","CREATE TABLE table_19542477_9 (song_s__—_weeks VARCHAR, issue_years VARCHAR, artist_s_ VARCHAR);","SELECT song_s__—_weeks FROM table_19542477_9 WHERE issue_years = 2012 AND artist_s_ = ""Rihanna"";","SELECT song_s__—_weeks FROM table_19542477_9 WHERE issue_years = ""2012"" AND artist_s_ = ""Rihanna"";",0 What is the total transaction value for social impact investments in specific ESG categories?,"CREATE TABLE social_impact_investments (id INT, country VARCHAR(50), category VARCHAR(50), transaction_value FLOAT); CREATE TABLE esg_categories (id INT, category VARCHAR(50)); ",SELECT SUM(transaction_value) FROM social_impact_investments JOIN esg_categories ON social_impact_investments.category = esg_categories.category;,SELECT SUM(transaction_value) FROM social_impact_investments INNER JOIN esg_categories ON social_impact_investments.category = esg_categories.category;,0 How many refugees were supported in each country?,"CREATE TABLE RefugeeCountry (RefugeeID INT, Country VARCHAR(50)); ","SELECT Country, COUNT(RefugeeID) as NumRefugees FROM RefugeeCountry GROUP BY Country;","SELECT Country, COUNT(*) FROM RefugeeCountry GROUP BY Country;",0 Find the maximum salary for players in the NBA's Eastern Conference.,"CREATE TABLE nba_players_ec (id INT, name VARCHAR(100), team VARCHAR(100), conference VARCHAR(50), salary DECIMAL(10, 2)); ",SELECT MAX(salary) FROM nba_players_ec WHERE conference = 'Eastern';,SELECT MAX(salary) FROM nba_players_ec WHERE conference = 'Eastern';,1 What is the total funding for social good projects in the technology domain?,"CREATE TABLE social_funding (project_id INT, project_name VARCHAR(255), funding DECIMAL(10,2)); ",SELECT SUM(funding) as total_funding FROM social_funding WHERE project_name LIKE '%social good%' AND project_name LIKE '%technology%';,SELECT SUM(funding) FROM social_funding WHERE project_name LIKE '%technology%';,0 Determine the total funds raised by each program in the last financial year.,"CREATE TABLE ProgramFunds (FundID int, ProgramID int, FundsRaised money, FundDate date);","SELECT ProgramID, SUM(FundsRaised) as TotalFundsRaised FROM ProgramFunds WHERE FundDate >= DATEADD(YEAR, -1, DATEADD(DAY, DATEDIFF(DAY, 0, GETDATE()), 0)) GROUP BY ProgramID;","SELECT ProgramID, SUM(FundsRaised) as TotalFunds FROM ProgramFunds WHERE FundDate >= DATEADD(year, -1, GETDATE()) GROUP BY ProgramID;",0 Which artifacts were found in more than 3 excavation sites?,"CREATE TABLE Artifacts (id INT, excavation_site VARCHAR(20), artifact_name VARCHAR(30), pieces INT); ",SELECT artifact_name FROM Artifacts GROUP BY artifact_name HAVING COUNT(DISTINCT excavation_site) > 3;,SELECT artifact_name FROM Artifacts WHERE excavation_site > 3;,0 What is the name of the diety for the river of sone?,"CREATE TABLE table_name_16 (name_of_deity VARCHAR, name_of_the_river VARCHAR);","SELECT name_of_deity FROM table_name_16 WHERE name_of_the_river = ""sone"";","SELECT name_of_deity FROM table_name_16 WHERE name_of_the_river = ""sone"";",1 Name the lowest rank for red chillies entertainment for 2013,"CREATE TABLE table_name_99 (rank INTEGER, year VARCHAR, studio_s_ VARCHAR);","SELECT MIN(rank) FROM table_name_99 WHERE year = 2013 AND studio_s_ = ""red chillies entertainment"";","SELECT MIN(rank) FROM table_name_99 WHERE year = 2013 AND studio_s_ = ""red chillies entertainment"";",1 HOW MANY SILVER METALS DOES SOUTH KOREA HAVE WITH 2 GOLD METALS?,"CREATE TABLE table_name_43 (silver INTEGER, nation VARCHAR, gold VARCHAR);","SELECT MAX(silver) FROM table_name_43 WHERE nation = ""south korea"" AND gold > 2;","SELECT SUM(silver) FROM table_name_43 WHERE nation = ""south korea"" AND gold = 2;",0 What was the round number when Michael Hjalm played?,"CREATE TABLE table_name_27 (round VARCHAR, player VARCHAR);","SELECT round FROM table_name_27 WHERE player = ""michael hjalm"";","SELECT round FROM table_name_27 WHERE player = ""michael hjalm"";",1 "In 1879-81 with number built 4, what is the LMS nos?","CREATE TABLE table_name_63 (lms_nos VARCHAR, date VARCHAR, no_built VARCHAR);","SELECT lms_nos FROM table_name_63 WHERE date = ""1879-81"" AND no_built = 4;","SELECT lms_nos FROM table_name_63 WHERE date = ""1879-81"" AND no_built = ""4"";",0 List the names and number of open records requests for each agency in the city of New York for the year 2019,"CREATE TABLE city_agencies (agency_id INT, agency_name VARCHAR(50), city VARCHAR(20), year INT, requests_open INT); ","SELECT agency_name, requests_open FROM city_agencies WHERE city = 'New York' AND year = 2019;","SELECT agency_name, requests_open FROM city_agencies WHERE city = 'New York' AND year = 2019;",1 "What were the average production figures for wells in the North Sea, grouped by quarter, for the years 2019 and 2020?","CREATE TABLE wells (well_id INT, well_name VARCHAR(255), location VARCHAR(255), production_figures DECIMAL(10,2)); ","SELECT EXTRACT(QUARTER FROM date) AS quarter, AVG(production_figures) AS avg_production FROM wells WHERE location = 'North Sea' AND EXTRACT(YEAR FROM date) IN (2019, 2020) GROUP BY quarter;","SELECT DATE_FORMAT(production_figures, '%Y-%m') AS quarter, AVG(production_figures) AS avg_production FROM wells WHERE location = 'North Sea' AND YEAR(well_id) IN (2019, 2020) GROUP BY quarter;",0 "Identify the top 3 most vulnerable software vendors, ranked by the total number of high risk vulnerabilities, in the past year.","CREATE TABLE vulnerabilities (id INT, detection_date DATE, software_vendor VARCHAR(255), risk_score INT); ","SELECT software_vendor, SUM(CASE WHEN risk_score >= 8 THEN 1 ELSE 0 END) as high_risk_vulnerabilities, RANK() OVER (ORDER BY SUM(CASE WHEN risk_score >= 8 THEN 1 ELSE 0 END) DESC) as rank FROM vulnerabilities WHERE detection_date >= DATE(NOW()) - INTERVAL '1 year' GROUP BY software_vendor HAVING rank <= 3;","SELECT software_vendor, SUM(risk_score) as total_high_risk_vulnerabilities FROM vulnerabilities WHERE detection_date >= DATEADD(year, -1, GETDATE()) GROUP BY software_vendor ORDER BY total_high_risk_vulnerabilities DESC LIMIT 3;",0 What is the average speed of electric buses in the City of Los Angeles?,"CREATE TABLE electric_buses (bus_id int, city varchar(20), avg_speed decimal(5,2)); ",SELECT AVG(avg_speed) FROM electric_buses WHERE city = 'Los Angeles' AND bus_id <> 2;,SELECT AVG(avg_speed) FROM electric_buses WHERE city = 'Los Angeles';,0 "What is the total funding received by companies founded in 2017, ordered by the amount of funding?","CREATE TABLE Funding (company_id INT, funding_year INT, amount INT); ","SELECT company_id, SUM(amount) as total_funding FROM Funding WHERE funding_year = 2017 GROUP BY company_id ORDER BY total_funding DESC;",SELECT SUM(amount) FROM Funding WHERE funding_year = 2017 ORDER BY SUM(amount) DESC;,0 How many space missions have had at least one astronaut from Russia?,"CREATE TABLE Astronauts(id INT, name VARCHAR(50), nationality VARCHAR(50)); CREATE TABLE SpaceMissions(id INT, mission VARCHAR(50), astronaut_id INT); ",SELECT COUNT(*) FROM SpaceMissions INNER JOIN Astronauts ON SpaceMissions.astronaut_id = Astronauts.id WHERE Astronauts.nationality = 'Russia';,SELECT COUNT(*) FROM SpaceMissions JOIN Astronauts ON SpaceMissions.astronaut_id = Astronauts.id WHERE Astronauts.nationality = 'Russia';,0 What was the attendance on October 6?,"CREATE TABLE table_name_78 (attendance VARCHAR, date VARCHAR);","SELECT attendance FROM table_name_78 WHERE date = ""october 6"";","SELECT attendance FROM table_name_78 WHERE date = ""october 6"";",1 Add new employee to the IT department,"CREATE TABLE Employees (EmployeeID INT, FirstName VARCHAR(50), LastName VARCHAR(50), Department VARCHAR(50), Salary DECIMAL(10,2), LeftCompany BOOLEAN);","INSERT INTO Employees (EmployeeID, FirstName, LastName, Department, Salary, LeftCompany) VALUES (1, 'John', 'Doe', 'IT', 70000, FALSE);","INSERT INTO Employees (EmployeeID, FirstName, LastName, Department, Salary, LeftCompany = TRUE);",0 What are the names and types of rovers that landed on Mars before 2010?,"CREATE TABLE Mars_Rovers (Rover_ID INT PRIMARY KEY, Name VARCHAR(100), Type VARCHAR(50), Landing_Date DATE, Agency VARCHAR(50)); ","SELECT Name, Type FROM Mars_Rovers WHERE Landing_Date < '2010-01-01';","SELECT Name, Type FROM Mars_Rovers WHERE Landing_Date '2010-01-01';",0 How many pollution incidents occurred in the Pacific Ocean by country?,"CREATE TABLE pollution_incidents (country VARCHAR(255), ocean VARCHAR(255), incident_count INT); ","SELECT country, SUM(incident_count) FROM pollution_incidents WHERE ocean = 'Pacific Ocean' GROUP BY country","SELECT country, SUM(incidents) FROM pollution_incidents WHERE ocean = 'Pacific' GROUP BY country;",0 What is the maximum cost of providing accommodations for students with disabilities in the last month?,"CREATE TABLE accommodation_costs (cost DECIMAL(5,2), accommodation_type VARCHAR(50), date_provided DATE); ","SELECT MAX(cost) FROM accommodation_costs WHERE date_provided >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH);","SELECT MAX(cost) FROM accommodation_costs WHERE accommodation_type = 'Disability' AND date_provided >= DATEADD(month, -1, GETDATE());",0 How big (in km2) is the voivodenship also known by the abbreviation KN?,"CREATE TABLE table_11656578_2 (area_km²__1998_ VARCHAR, abbreviation VARCHAR);","SELECT area_km²__1998_ FROM table_11656578_2 WHERE abbreviation = ""kn"";","SELECT area_km2__1998_ FROM table_11656578_2 WHERE abbreviation = ""KN"";",0 Which film title used in nomination has vinterkyss as the original title?,"CREATE TABLE table_21655290_1 (film_title_used_in_nomination VARCHAR, original_title VARCHAR);","SELECT film_title_used_in_nomination FROM table_21655290_1 WHERE original_title = ""Vinterkyss"";","SELECT film_title_used_in_nomination FROM table_21655290_1 WHERE original_title = ""Vinterkyss"";",1 "Which urban farms in Albuquerque, NM have the lowest yield per acre?","CREATE TABLE urban_farms_nm (name TEXT, city TEXT, state TEXT, acres NUMERIC, yield NUMERIC); ","SELECT name, acres, yield, ROW_NUMBER() OVER (ORDER BY yield/acres ASC) as rank FROM urban_farms_nm WHERE city = 'Albuquerque' AND state = 'NM';",SELECT name FROM urban_farms_nm WHERE city = 'Albuquerque' AND state = 'NM' AND acres = (SELECT MIN(yield) FROM urban_farms_nm);,0 What is the minimum yield per acre for each crop type in urban agriculture?,"CREATE TABLE crop_types_min (crop_type TEXT, acres NUMERIC, yield NUMERIC); ","SELECT crop_type, MIN(yield/acres) as min_yield_per_acre FROM crop_types_min GROUP BY crop_type;","SELECT crop_type, MIN(yield) FROM crop_types_min GROUP BY crop_type;",0 "What is the average number of comments on posts by users from Japan, for posts containing the hashtag #technology, in the last month?","CREATE TABLE users (id INT, country VARCHAR(255)); CREATE TABLE posts (id INT, user_id INT, comments INT, hashtags TEXT, post_date DATE);",SELECT AVG(comments) FROM posts INNER JOIN users ON posts.user_id = users.id WHERE users.country = 'Japan' AND hashtags LIKE '%#technology%' AND post_date >= DATE(NOW()) - INTERVAL 1 MONTH;,"SELECT AVG(posts.comments) FROM posts INNER JOIN users ON posts.user_id = users.id WHERE users.country = 'Japan' AND posts.hashtags LIKE '%#technology%' AND posts.post_date >= DATEADD(month, -1, GETDATE());",0 What was the score on January 14 when the Chicago Black Hawks were home against the New York Rangers?,"CREATE TABLE table_name_18 (score VARCHAR, date VARCHAR, home VARCHAR, visitor VARCHAR);","SELECT score FROM table_name_18 WHERE home = ""chicago black hawks"" AND visitor = ""new york rangers"" AND date = ""january 14"";","SELECT score FROM table_name_18 WHERE home = ""chicago black hawks"" AND visitor = ""new york rangers"" AND date = ""january 14"";",1 What are the names of the legal technology companies that have partnerships with courts in California and New York?,"CREATE TABLE legal_tech_ca (company_name VARCHAR(50), partnership BOOLEAN); CREATE TABLE legal_tech_ny (company_name VARCHAR(50), partnership BOOLEAN); ",SELECT company_name FROM legal_tech_ca WHERE partnership = TRUE UNION ALL SELECT company_name FROM legal_tech_ny WHERE partnership = TRUE;,SELECT company_name FROM legal_tech_ca WHERE partnership = TRUE INTERSECT SELECT company_name FROM legal_tech_ny WHERE partnership = TRUE;,0 Delete companies founded before a specific year,"CREATE TABLE companies (id INT, name TEXT, founded DATE); ",DELETE FROM companies WHERE founded < '2018-01-01';,"DELETE FROM companies WHERE founded DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 List first name and last name of customers lived in city Lockmanfurt.,"CREATE TABLE Customers (first_name VARCHAR, last_name VARCHAR, customer_address_id VARCHAR); CREATE TABLE Addresses (address_id VARCHAR, city VARCHAR);","SELECT T1.first_name, T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = ""Lockmanfurt"";","SELECT T1.first_name, T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = ""Lockmanfurt"";",1 " what's the position where player is williams, bernie bernie williams","CREATE TABLE table_11734041_20 (position VARCHAR, player VARCHAR);","SELECT position FROM table_11734041_20 WHERE player = ""Williams, Bernie Bernie Williams"";","SELECT position FROM table_11734041_20 WHERE player = ""Williams, Bernie Williams"";",0 Name the females when males are 1 548,"CREATE TABLE table_name_60 (females VARCHAR, males VARCHAR);","SELECT females FROM table_name_60 WHERE males = ""1 548"";","SELECT females FROM table_name_60 WHERE males = ""1 548"";",1 "Which Game is the average one that has a February larger than 20, and a Record of 41–17–4, and Points smaller than 86?","CREATE TABLE table_name_23 (game INTEGER, points VARCHAR, february VARCHAR, record VARCHAR);","SELECT AVG(game) FROM table_name_23 WHERE february > 20 AND record = ""41–17–4"" AND points < 86;","SELECT AVG(game) FROM table_name_23 WHERE february > 20 AND record = ""41–17–4"" AND points 86;",0 what is the score for the dams?,"CREATE TABLE table_10705060_1 (points VARCHAR, team_name VARCHAR);","SELECT points FROM table_10705060_1 WHERE team_name = ""DAMS"";","SELECT points FROM table_10705060_1 WHERE team_name = ""Dams"";",0 "Which Points have Goals against of 32, and Played larger than 38?","CREATE TABLE table_name_30 (points INTEGER, goals_against VARCHAR, played VARCHAR);",SELECT MAX(points) FROM table_name_30 WHERE goals_against = 32 AND played > 38;,SELECT SUM(points) FROM table_name_30 WHERE goals_against = 32 AND played > 38;,0 What was the series score on april 17 with minnesota at home?,"CREATE TABLE table_name_52 (series VARCHAR, home VARCHAR, date VARCHAR);","SELECT series FROM table_name_52 WHERE home = ""minnesota"" AND date = ""april 17"";","SELECT series FROM table_name_52 WHERE home = ""minnesota"" AND date = ""april 17"";",1 What date after Week 6 was a Bye?,"CREATE TABLE table_name_34 (date VARCHAR, week VARCHAR, attendance VARCHAR);","SELECT date FROM table_name_34 WHERE week > 6 AND attendance = ""bye"";","SELECT date FROM table_name_34 WHERE week > 6 AND attendance = ""bye"";",1 What are the average speeds of vessels in the 'Container Ship' category in the last month?,"CREATE TABLE vessels (id INT, name TEXT, type TEXT);CREATE TABLE trips (id INT, vessel_id INT, departure_date DATE, arrival_date DATE); ","SELECT vessels.type, AVG(DATEDIFF('day', departure_date, arrival_date) * 1.0 / (DATEDIFF('day', departure_date, arrival_date) + 1)) FROM trips JOIN vessels ON trips.vessel_id = vessels.id WHERE vessels.type = 'Container Ship' AND departure_date >= DATEADD('month', -1, CURRENT_DATE) GROUP BY vessels.type;","SELECT AVG(t.speed) FROM trips t JOIN vessels v ON t.vessel_id = v.id WHERE v.type = 'Container Ship' AND t.departure_date >= DATEADD(month, -1, GETDATE());",0 Who won the womens singles in the 1958/1959 season?,"CREATE TABLE table_12266757_1 (womens_singles VARCHAR, season VARCHAR);","SELECT womens_singles FROM table_12266757_1 WHERE season = ""1958/1959"";","SELECT womens_singles FROM table_12266757_1 WHERE season = ""1958/1959"";",1 "What was the vote tally on the episode aired May 5, 2005?","CREATE TABLE table_1272844_2 (vote VARCHAR, air_date VARCHAR);","SELECT vote FROM table_1272844_2 WHERE air_date = ""May 5, 2005"";","SELECT vote FROM table_1272844_2 WHERE air_date = ""May 5, 2005"";",1 In what week was the Result L 15-13?,"CREATE TABLE table_name_91 (week INTEGER, result VARCHAR);","SELECT AVG(week) FROM table_name_91 WHERE result = ""l 15-13"";","SELECT AVG(week) FROM table_name_91 WHERE result = ""l 15-13"";",1 What was the result of the match played on 13 October 1993?,"CREATE TABLE table_name_93 (result VARCHAR, date VARCHAR);","SELECT result FROM table_name_93 WHERE date = ""13 october 1993"";","SELECT result FROM table_name_93 WHERE date = ""13 october 1993"";",1 what is the location when the year is before 1979 and the result is 19-17?,"CREATE TABLE table_name_68 (location VARCHAR, year VARCHAR, result VARCHAR);","SELECT location FROM table_name_68 WHERE year < 1979 AND result = ""19-17"";","SELECT location FROM table_name_68 WHERE year 1979 AND result = ""19-17"";",0 What is the maximum safety violation count for each employee?,"CREATE TABLE safety_violations (employee_id INT, department VARCHAR(255), violation_count INT); ","SELECT employee_id, department, MAX(violation_count) OVER (PARTITION BY employee_id) AS max_violations_per_employee FROM safety_violations;","SELECT employee_id, MAX(violation_count) FROM safety_violations GROUP BY employee_id;",0 "What is the average billing amount per case, partitioned by attorney?","CREATE TABLE CaseBilling (CaseID int, AttorneyID int, BillingAmount decimal(10,2)); ","SELECT AttorneyID, AVG(BillingAmount) OVER (PARTITION BY AttorneyID) AS AvgBillingPerCase FROM CaseBilling;","SELECT AttorneyID, AVG(BillingAmount) as AvgBillingAmount FROM CaseBilling GROUP BY AttorneyID;",0 "How many Bronze medals were received by the nation that Ranked less than 5 and received more than 2 Gold medals, less than 4 Silver medals with a Total of 9 medals?","CREATE TABLE table_name_70 (bronze INTEGER, silver VARCHAR, total VARCHAR, rank VARCHAR, gold VARCHAR);",SELECT AVG(bronze) FROM table_name_70 WHERE rank < 5 AND gold > 2 AND total = 9 AND silver < 4;,SELECT SUM(bronze) FROM table_name_70 WHERE rank 5 AND gold > 2 AND silver 4 AND total = 9;,0 What is the parent magazine for Dengeki 5pb.?,"CREATE TABLE table_name_42 (parent_magazine VARCHAR, title VARCHAR);","SELECT parent_magazine FROM table_name_42 WHERE title = ""dengeki 5pb."";","SELECT parent_magazine FROM table_name_42 WHERE title = ""dengeki 5pb."";",1 What surface was played on when Piet Norval was a partner?,"CREATE TABLE table_name_24 (surface VARCHAR, partner VARCHAR);","SELECT surface FROM table_name_24 WHERE partner = ""piet norval"";","SELECT surface FROM table_name_24 WHERE partner = ""piet norval"";",1 What was the total spending on environmental initiatives in the West region in 2022?,"CREATE TABLE Spending (year INT, region VARCHAR(255), initiative VARCHAR(255), amount INT); ",SELECT SUM(amount) FROM Spending WHERE year = 2022 AND region = 'West' AND initiative = 'Environment';,SELECT SUM(amount) FROM Spending WHERE year = 2022 AND region = 'West' AND initiative = 'Environmental';,0 What is the average daily revenue for OTAs in 'New York' in 2023?,"CREATE TABLE ota_revenue (ota_id INT, city TEXT, daily_revenue FLOAT, year INT); ",SELECT AVG(daily_revenue) FROM ota_revenue WHERE city = 'New York' AND year = 2023;,SELECT AVG(daily_revenue) FROM ota_revenue WHERE city = 'New York' AND year = 2023;,1 "Name of clem hill, and Inns larger than 126 has the lowest runs?","CREATE TABLE table_name_83 (runs INTEGER, name VARCHAR, inns VARCHAR);","SELECT MIN(runs) FROM table_name_83 WHERE name = ""clem hill"" AND inns > 126;","SELECT MIN(runs) FROM table_name_83 WHERE name = ""clem hill"" AND inns > 126;",1 Calculate the average salary of data scientists and engineers working in ethical AI projects.,"CREATE TABLE Employees (EmployeeID INT, EmployeeName VARCHAR(50), Department VARCHAR(50), Salary INT); ",SELECT AVG(Salary) FROM Employees WHERE Department LIKE '%Ethical AI%';,"SELECT AVG(Salary) FROM Employees WHERE Department IN ('Data Science', 'Engineering');",0 what's the cylinders/ valves with model being 1.8 20v,"CREATE TABLE table_1176162_3 (cylinders__valves VARCHAR, model VARCHAR);","SELECT cylinders__valves FROM table_1176162_3 WHERE model = ""1.8 20V"";","SELECT cylinders__valves FROM table_1176162_3 WHERE model = ""1.8 20V"";",1 "With more than 1 Gold and Silver and Total Sport, what is the Total?","CREATE TABLE table_name_86 (total INTEGER, gold VARCHAR, silver VARCHAR, sport VARCHAR);","SELECT AVG(total) FROM table_name_86 WHERE silver > 1 AND sport = ""total"" AND gold > 1;","SELECT SUM(total) FROM table_name_86 WHERE silver > 1 AND sport = ""total"";",0 "Number of community development initiatives, by region and gender, for the year 2021?","CREATE TABLE community_development (id INT, region VARCHAR(255), gender VARCHAR(255), initiative_count INT, year INT); ","SELECT region, gender, SUM(initiative_count) as total_initiative_count FROM community_development WHERE year = 2021 GROUP BY region, gender;","SELECT region, gender, initiative_count FROM community_development WHERE year = 2021 GROUP BY region, gender;",0 Insert a new record for a bridge named 'Akashi Kaikyō Bridge' in the 'East Asia' region with a 'resilience_score' of 96.2 and a 'year_built' of 1998.,"CREATE TABLE bridges (id INT, name TEXT, region TEXT, resilience_score FLOAT, year_built INT);","INSERT INTO bridges (name, region, resilience_score, year_built) VALUES ('Akashi Kaikyō Bridge', 'East Asia', 96.2, 1998);","INSERT INTO bridges (name, region, resilience_score, year_built) VALUES ('Akashi Kaiky Bridge', 'East Asia', 96.2, 1998);",0 "What is the total number of losses for less than 48 games, and less than 7 draws?","CREATE TABLE table_name_56 (loss VARCHAR, total_games VARCHAR, draw VARCHAR);",SELECT COUNT(loss) FROM table_name_56 WHERE total_games < 48 AND draw < 7;,SELECT COUNT(loss) FROM table_name_56 WHERE total_games 48 AND draw 7;,0 What is the Name of ङ ng/na?,"CREATE TABLE table_name_87 (name VARCHAR, pada_3 VARCHAR);","SELECT name FROM table_name_87 WHERE pada_3 = ""ङ ng/na"";","SELECT name FROM table_name_87 WHERE pada_3 = "" ng/na"";",0 List the rider for the doncaster handicap compeition.,"CREATE TABLE table_30098144_2 (jockey VARCHAR, race VARCHAR);","SELECT jockey FROM table_30098144_2 WHERE race = ""Doncaster Handicap"";","SELECT jockey FROM table_30098144_2 WHERE race = ""Doncaster handicap compeition"";",0 Update AI safety incidents for algorithm 'ALG6' in 2022,"CREATE TABLE unsafe_ai_algorithms (algorithm_name VARCHAR(255), incidents INT, year INT); ",UPDATE unsafe_ai_algorithms SET incidents = 220 WHERE algorithm_name = 'ALG6' AND year = 2022;,UPDATE unsafe_ai_algorithms SET incidents = 1 WHERE algorithm_name = 'ALG6' AND year = 2022;,0 What is the average water temperature in the Indian Ocean Monitoring Station for each month?,"CREATE TABLE indian_ocean_monitoring_station (date DATE, temperature FLOAT);","SELECT EXTRACT(MONTH FROM date) AS month, AVG(temperature) AS avg_temperature FROM indian_ocean_monitoring_station GROUP BY month;","SELECT EXTRACT(MONTH FROM date) AS month, AVG(temperature) FROM indian_ocean_monitoring_station GROUP BY month;",0 Count the number of unique agricultural innovation initiatives in the 'Europe' region.,"CREATE TABLE agri_innovation_initiatives (initiative VARCHAR(50), region VARCHAR(20)); ",SELECT COUNT(DISTINCT initiative) FROM agri_innovation_initiatives WHERE region = 'Europe';,SELECT COUNT(DISTINCT initiative) FROM agri_innovation_initiatives WHERE region = 'Europe';,1 Which region has the highest percentage of tech jobs held by women?,"CREATE TABLE global_tech_workforce (region VARCHAR(20), gender VARCHAR(10), jobs INT); ","SELECT region, (SUM(CASE WHEN gender = 'Women' THEN jobs ELSE 0 END) / SUM(jobs)) * 100 as women_percentage FROM global_tech_workforce GROUP BY region ORDER BY women_percentage DESC LIMIT 1;","SELECT region, SUM(jobs) as total_jobs FROM global_tech_workforce WHERE gender = 'Female' GROUP BY region ORDER BY total_jobs DESC LIMIT 1;",0 What is the average number of therapy sessions attended by patients with depression?,"CREATE TABLE patients (id INT, name TEXT, age INT, condition TEXT, therapy_sessions INT);",SELECT AVG(therapy_sessions) FROM patients WHERE condition = 'depression';,SELECT AVG(therapy_sessions) FROM patients WHERE condition = 'Depression';,0 I want to know the 2001 that has a 2004 of a and 2003 of a with 2012 of 3r,CREATE TABLE table_name_53 (Id VARCHAR);,"SELECT 2001 FROM table_name_53 WHERE 2004 = ""a"" AND 2003 = ""a"" AND 2012 = ""3r"";","SELECT 2001 FROM table_name_53 WHERE 2004 = ""a"" AND 2003 = ""a"" AND 2012 = ""3r"";",1 Find the top 5 best-selling garment types by sales volume.,"CREATE TABLE sales (sale_id INT, garment_type VARCHAR(30), quantity_sold INT); CREATE TABLE garments (garment_type VARCHAR(30), garment_name VARCHAR(50));","SELECT garment_type, SUM(quantity_sold) AS total_sold FROM sales INNER JOIN garments ON sales.garment_type = garments.garment_type GROUP BY garment_type ORDER BY total_sold DESC LIMIT 5;","SELECT garment_type, SUM(quantity_sold) as total_sales FROM sales GROUP BY garment_type ORDER BY total_sales DESC LIMIT 5;",0 What is the height of the school club team members in clemson?,"CREATE TABLE table_11734041_7 (height_in_ft VARCHAR, school_club_team_country VARCHAR);","SELECT height_in_ft FROM table_11734041_7 WHERE school_club_team_country = ""Clemson"";","SELECT height_in_ft FROM table_11734041_7 WHERE school_club_team_country = ""Clemson"";",1 What was the result in the game broadcast on the SEC Network? ,"CREATE TABLE table_26842217_12 (result VARCHAR, broadcast VARCHAR);","SELECT result FROM table_26842217_12 WHERE broadcast = ""SEC Network"";","SELECT result FROM table_26842217_12 WHERE broadcast = ""SEC Network"";",1 What is the lengtho f track 16?,"CREATE TABLE table_name_88 (length VARCHAR, track VARCHAR);","SELECT length FROM table_name_88 WHERE track = ""16"";","SELECT length FROM table_name_88 WHERE track = ""16"";",1 How many burglary crimes were committed if the forcible rapes were 1233?,"CREATE TABLE table_26060884_2 (burglary VARCHAR, forcible_rape VARCHAR);",SELECT burglary FROM table_26060884_2 WHERE forcible_rape = 1233;,SELECT COUNT(burglary) FROM table_26060884_2 WHERE forcible_rape = 1233;,0 Show the distinct themes of journals.,CREATE TABLE journal (Theme VARCHAR);,SELECT DISTINCT Theme FROM journal;,SELECT DISTINCT Theme FROM journal;,1 How many pollution incidents have been reported in the Mediterranean sea?,"CREATE TABLE Pollution_reports (report_id INTEGER, incident_location TEXT, reported_date DATE); ",SELECT COUNT(*) FROM Pollution_reports WHERE incident_location = 'Mediterranean Sea';,SELECT COUNT(*) FROM Pollution_reports WHERE incident_location = 'Mediterranean Sea';,1 What is the To Par for Player Chris Riley?,"CREATE TABLE table_name_62 (to_par VARCHAR, player VARCHAR);","SELECT to_par FROM table_name_62 WHERE player = ""chris riley"";","SELECT to_par FROM table_name_62 WHERE player = ""chris ryan"";",0 Tell me the opponents for score of 6-1 2-6 7-10,"CREATE TABLE table_name_90 (opponents_in_the_final VARCHAR, score VARCHAR);","SELECT opponents_in_the_final FROM table_name_90 WHERE score = ""6-1 2-6 7-10"";","SELECT opponents_in_the_final FROM table_name_90 WHERE score = ""6-1 2-6 7-10"";",1 What is the maximum number of emergency calls received by the fire department in the city of Chicago?,"CREATE TABLE emergency_calls (id INT, department VARCHAR(20), city VARCHAR(20), number_of_calls INT); ",SELECT MAX(number_of_calls) FROM emergency_calls WHERE department = 'Fire' AND city = 'Chicago';,SELECT MAX(number_of_calls) FROM emergency_calls WHERE department = 'Fire' AND city = 'Chicago';,1 How many numbers were listed under losing bonus when there were 68 tries for?,"CREATE TABLE table_13399573_3 (losing_bonus VARCHAR, tries_for VARCHAR);","SELECT COUNT(losing_bonus) FROM table_13399573_3 WHERE tries_for = ""68"";",SELECT COUNT(losing_bonus) FROM table_13399573_3 WHERE tries_for = 68;,0 What is the maximum number of creative AI applications developed in a single country?,"CREATE TABLE ai_applications (app_id INT, name TEXT, country TEXT, category TEXT); ",SELECT MAX(count_per_country) FROM (SELECT COUNT(*) AS count_per_country FROM ai_applications GROUP BY country);,"SELECT country, MAX(COUNT(*)) FROM ai_applications GROUP BY country;",0 How many different engines are there for the model with model designation 97G00?,"CREATE TABLE table_20866024_2 (engine VARCHAR, model_designation VARCHAR);","SELECT COUNT(engine) FROM table_20866024_2 WHERE model_designation = ""97G00"";","SELECT COUNT(engine) FROM table_20866024_2 WHERE model_designation = ""97G00"";",1 Show the total number of cases handled by each court in the justice system,"CREATE TABLE courts (court_id INT, court_name VARCHAR(255), PRIMARY KEY (court_id)); CREATE TABLE court_cases (court_id INT, case_id INT, PRIMARY KEY (court_id, case_id), FOREIGN KEY (court_id) REFERENCES courts(court_id), FOREIGN KEY (case_id) REFERENCES cases(case_id)); ","SELECT c.court_name, COUNT(cc.court_id) FROM courts c INNER JOIN court_cases cc ON c.court_id = cc.court_id GROUP BY c.court_name;","SELECT c.court_name, COUNT(cc.court_id) as total_cases FROM courts c JOIN court_cases cc ON c.court_id = cc.court_id GROUP BY c.court_name;",0 "What was the amount of loans received with a total debt of $169,256?","CREATE TABLE table_name_24 (loans_received VARCHAR, _3q VARCHAR, total_debt VARCHAR);","SELECT loans_received, _3q FROM table_name_24 WHERE total_debt = ""$169,256"";","SELECT loans_received FROM table_name_24 WHERE _3q = ""$169,256"" AND total_debt = ""$169,256"";",0 What is the maximum depth of all marine protected areas in the Atlantic region?,"CREATE TABLE marine_protected_areas (name TEXT, region TEXT, max_depth FLOAT); ",SELECT MAX(max_depth) FROM marine_protected_areas WHERE region = 'Atlantic';,SELECT MAX(max_depth) FROM marine_protected_areas WHERE region = 'Atlantic';,1 Delete all records from the 'sustainable_sourcing' table where the 'supplier_name' is 'Eco Farms',"CREATE TABLE sustainable_sourcing (supplier_name TEXT, supplier_country TEXT, sustainable_practices BOOLEAN);",DELETE FROM sustainable_sourcing WHERE supplier_name = 'Eco Farms';,DELETE FROM sustainable_sourcing WHERE supplier_name = 'Eco Farms';,1 What is the average number of penalty minutes served by a hockey player in a season?,"CREATE TABLE season_penalties (id INT, player_name VARCHAR(50), team VARCHAR(50), season VARCHAR(10), penalty_minutes INT);","SELECT AVG(penalty_minutes) FROM season_penalties WHERE sport = 'Hockey' GROUP BY player_name, season;",SELECT AVG(penalty_minutes) FROM season_penalties WHERE team = 'Hockey';,0 Insert new public health policy analysis data for a specific policy,"CREATE TABLE public_health_policy_analysis_v2 (id INT, policy_name VARCHAR(30), impact_score INT);","INSERT INTO public_health_policy_analysis_v2 (id, policy_name, impact_score) VALUES (4, 'Policy B', 87);","INSERT INTO public_health_policy_analysis_v2 (id, policy_name, impact_score) VALUES (1, 'Public Health', 'Public Health'), (2, 'Public Health', 'Public Health', 'Public Health'), (3, 'Public Health', 'Public Health', 'Public Health'), (4, 'Public Health', 'Public Health', 'Public Health'), (5, 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', 'Public Health', '",0 "What is the average Goals for team Kairat, in the 2002 season with more than 29 apps?","CREATE TABLE table_name_81 (goals INTEGER, apps VARCHAR, team VARCHAR, season VARCHAR);","SELECT AVG(goals) FROM table_name_81 WHERE team = ""kairat"" AND season = ""2002"" AND apps > 29;","SELECT AVG(goals) FROM table_name_81 WHERE team = ""kairat"" AND season = ""2002"" AND apps > 29;",1 Update the diplomacy status for a specific country in the Defense Diplomacy table.,"CREATE TABLE Defense_Diplomacy (id INT, country VARCHAR(255), status VARCHAR(255), last_update DATE);","UPDATE Defense_Diplomacy SET status = 'Active', last_update = CURDATE() WHERE country = 'Brazil';",UPDATE Defense_Diplomacy SET status = 'Diplomacy' WHERE country = 'USA';,0 What is the highest copper deposit size in South America?,"CREATE TABLE geological_survey (mineral VARCHAR(50), country VARCHAR(50), deposit_size INT, PRIMARY KEY (mineral, country));","SELECT sql.mineral, sql.country, sql.deposit_size FROM geological_survey sql WHERE sql.mineral = 'Copper' AND sql.country = 'Chile' AND sql.deposit_size = (SELECT MAX(deposit_size) FROM geological_survey WHERE mineral = 'Copper')",SELECT MAX(deposit_size) FROM geological_survey WHERE mineral = 'Copper' AND country = 'South America';,0 What was the number of race that Kevin Curtain won?,"CREATE TABLE table_10083598_1 (no VARCHAR, pole_position VARCHAR);","SELECT COUNT(no) FROM table_10083598_1 WHERE pole_position = ""Kevin Curtain"";","SELECT no FROM table_10083598_1 WHERE pole_position = ""Kevin Curtain"";",0 How many dates are associated with a guest 4 being Jim Jeffries (debut)?,"CREATE TABLE table_20466963_4 (date VARCHAR, guest_4 VARCHAR);","SELECT COUNT(date) FROM table_20466963_4 WHERE guest_4 = ""Jim Jeffries (debut)"";","SELECT COUNT(date) FROM table_20466963_4 WHERE guest_4 = ""Jim Jeffries (debut)"";",1 "What is the total amount of pollution for each pollutant, and the average concentration for each pollutant?","CREATE TABLE Pollution (id INT PRIMARY KEY, location VARCHAR(255), pollutant VARCHAR(255), concentration FLOAT);","SELECT p.pollutant, COUNT(*) as total_pollution, AVG(concentration) as avg_concentration FROM Pollution p GROUP BY p.pollutant;","SELECT pollutant, SUM(concentration) as total_pollution, AVG(concentration) as avg_concentration FROM Pollution GROUP BY pollutant;",0 "Can you tell me the County that has the Year Joined of 1964, and the Location of montezuma?","CREATE TABLE table_name_24 (county VARCHAR, year_joined VARCHAR, location VARCHAR);","SELECT county FROM table_name_24 WHERE year_joined = 1964 AND location = ""montezuma"";","SELECT county FROM table_name_24 WHERE year_joined = 1964 AND location = ""montezuma"";",1 What is the average bioprocess engineering project budget for projects funded in the last 3 years?,"CREATE TABLE projects (id INT, name VARCHAR(50), budget FLOAT, funding_date DATE); ","SELECT AVG(budget) FROM projects WHERE funding_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR);","SELECT AVG(budget) FROM projects WHERE funding_date >= DATEADD(year, -3, GETDATE());",0 Delete all records from the marine_protected_areas table where the location is 'Pacific Ocean',"CREATE TABLE marine_protected_areas (name VARCHAR(255), depth FLOAT, location VARCHAR(255)); ",DELETE FROM marine_protected_areas WHERE location = 'Pacific Ocean';,DELETE FROM marine_protected_areas WHERE location = 'Pacific Ocean';,1 What's the location when the branding is 1116 DXAS Zamboanga?,"CREATE TABLE table_name_89 (location VARCHAR, branding VARCHAR);","SELECT location FROM table_name_89 WHERE branding = ""1116 dxas zamboanga"";","SELECT location FROM table_name_89 WHERE branding = ""1116 dxas zamboanga"";",1 what is the latitude when water (sqmi) is 0.058 and the ansi code is less than 1759683?,"CREATE TABLE table_name_57 (latitude INTEGER, water__sqmi_ VARCHAR, ansi_code VARCHAR);",SELECT AVG(latitude) FROM table_name_57 WHERE water__sqmi_ = 0.058 AND ansi_code < 1759683;,"SELECT AVG(latitude) FROM table_name_57 WHERE water__sqmi_ = ""0.058"" AND ansi_code 1759683;",0 "How many points did lech piasecki, stephen roche, and carrera jeans-vagabond have?","CREATE TABLE table_name_55 (points_classification VARCHAR, winner VARCHAR, young_rider_classification VARCHAR, general_classification VARCHAR);","SELECT points_classification FROM table_name_55 WHERE young_rider_classification = ""lech piasecki"" AND general_classification = ""stephen roche"" AND winner = ""carrera jeans-vagabond"";","SELECT points_classification FROM table_name_55 WHERE young_rider_classification = ""lech piasecki"" AND general_classification = ""stephen roche"" AND winner = ""carrera jeans-vagabond"";",1 Minimum Shariah-compliant account balance in the Central region,"CREATE TABLE shariah_compliant_accounts (id INT, balance FLOAT, region VARCHAR(255));",SELECT MIN(balance) FROM shariah_compliant_accounts WHERE region = 'Central';,SELECT MIN(balance) FROM shariah_compliant_accounts WHERE region = 'Central';,1 Which team has a home field at Glenferrie Oval?,"CREATE TABLE table_name_48 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_48 WHERE venue = ""glenferrie oval"";","SELECT home_team FROM table_name_48 WHERE venue = ""glenferrie oval"";",1 Which bridges in Spain have a total length greater than 500 meters and were constructed after 1990?,"CREATE TABLE Bridges (BridgeID INT, Name TEXT, Length FLOAT, ConstructionYear INT, Country TEXT); ",SELECT Bridges.Name FROM Bridges WHERE Bridges.Length > 500.0 AND Bridges.Country = 'Spain' AND Bridges.ConstructionYear > 1990,SELECT Name FROM Bridges WHERE Length > 500 AND ConstructionYear > 1990 AND Country = 'Spain';,0 "Which Laps have a Time of +23.002, and a Grid smaller than 11?","CREATE TABLE table_name_5 (laps INTEGER, time VARCHAR, grid VARCHAR);","SELECT AVG(laps) FROM table_name_5 WHERE time = ""+23.002"" AND grid < 11;","SELECT SUM(laps) FROM table_name_5 WHERE time = ""+23.002"" AND grid 11;",0 What is the total number of packages received by the 'Seattle' warehouse?,"CREATE TABLE Warehouse (id INT, name VARCHAR(20), city VARCHAR(20)); CREATE TABLE Packages (id INT, warehouse_id INT, status VARCHAR(20)); ",SELECT COUNT(*) FROM Packages WHERE warehouse_id = (SELECT id FROM Warehouse WHERE city = 'Seattle');,SELECT COUNT(*) FROM Packages p JOIN Warehouse w ON p.warehouse_id = w.id WHERE w.city = 'Seattle';,0 Calculate the percentage of hotels that meet the accessibility criteria for each country in the 'hotels' table.,"CREATE TABLE hotels (id INT, country VARCHAR(255), accessible BOOLEAN); ","SELECT country, ROUND(COUNT(accessible)*100.0 / SUM(COUNT(accessible)) OVER (PARTITION BY country), 2) AS accessibility_percentage FROM hotels GROUP BY country;","SELECT country, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM hotels WHERE accessible = true GROUP BY country) as accessibility_percentage FROM hotels GROUP BY country;",0 "Which location had a round of 3, and an Opponent of matt horwich?","CREATE TABLE table_name_9 (location VARCHAR, round VARCHAR, opponent VARCHAR);","SELECT location FROM table_name_9 WHERE round < 3 AND opponent = ""matt horwich"";","SELECT location FROM table_name_9 WHERE round = 3 AND opponent = ""matt horwich"";",0 Find the difference in the number of public universities between New York and Texas.,"CREATE TABLE universities (name VARCHAR(255), state VARCHAR(255)); ",SELECT (SELECT COUNT(*) FROM universities WHERE state = 'New York') - (SELECT COUNT(*) FROM universities WHERE state = 'Texas');,SELECT COUNT(*) FROM universities WHERE state = 'New York' INTERSECT SELECT COUNT(*) FROM universities WHERE state = 'Texas';,0 What is the Place of the Player with a To par of +1 and Score of 74-70-69-72=285?,"CREATE TABLE table_name_97 (place VARCHAR, to_par VARCHAR, score VARCHAR);","SELECT place FROM table_name_97 WHERE to_par = ""+1"" AND score = 74 - 70 - 69 - 72 = 285;","SELECT place FROM table_name_97 WHERE to_par = ""+1"" AND score = 74 - 70 - 69 - 72 = 285;",1 What is the Place of the Player with a Score of 69-72-72=213?,"CREATE TABLE table_name_63 (place VARCHAR, score VARCHAR);",SELECT place FROM table_name_63 WHERE score = 69 - 72 - 72 = 213;,SELECT place FROM table_name_63 WHERE score = 69 - 72 - 72 = 213;,1 What are the top 3 heritage sites with the most number of artifacts?,"CREATE TABLE Site (SiteID INT, SiteName VARCHAR(50), Country VARCHAR(50)); CREATE TABLE Artifact (ArtifactID INT, ArtifactName VARCHAR(50), SiteID INT); ","SELECT s.SiteName, COUNT(a.ArtifactID) as ArtifactCount FROM Site s JOIN Artifact a ON s.SiteID = a.SiteID GROUP BY s.SiteName ORDER BY ArtifactCount DESC LIMIT 3;","SELECT SiteName, COUNT(*) as ArtifactCount FROM Site JOIN Artifact ON Site.SiteID = Artifact.SiteID GROUP BY SiteName ORDER BY ArtifactCount DESC LIMIT 3;",0 Name the family for uk31,"CREATE TABLE table_19897294_8 (family_families VARCHAR, no_overall VARCHAR);","SELECT family_families FROM table_19897294_8 WHERE no_overall = ""UK31"";","SELECT family_families FROM table_19897294_8 WHERE no_overall = ""UK31"";",1 Which amount of lost had an against of more than 22 and 9 points?,"CREATE TABLE table_name_30 (lost VARCHAR, against VARCHAR, points VARCHAR);",SELECT lost FROM table_name_30 WHERE against > 22 AND points = 9;,SELECT lost FROM table_name_30 WHERE against > 22 AND points = 9;,1 What time does lane 7 have?,"CREATE TABLE table_name_56 (time VARCHAR, lane VARCHAR);",SELECT time FROM table_name_56 WHERE lane = 7;,SELECT time FROM table_name_56 WHERE lane = 7;,1 Which pests were most commonly reported in urban gardens in Q3 2021?,"CREATE TABLE pests (id INT, name VARCHAR(255)); ","SELECT pest_id, COUNT(*) FROM urban_gardens WHERE QUARTER(date) = 3 AND YEAR(date) = 2021 GROUP BY pest_id ORDER BY COUNT(*) DESC;","SELECT name, COUNT(*) as count FROM pests WHERE QUARTER(id) = 3 AND YEAR(id) = 2021 GROUP BY name ORDER BY count DESC LIMIT 1;",0 What is the total investment and investment rank for companies in the 'USA'?,"CREATE TABLE company (id INT, name VARCHAR(50), founding_year INT, industry VARCHAR(50), country VARCHAR(50)); CREATE TABLE investment (id INT, company_id INT, investment_amount INT, investment_round VARCHAR(50), investment_date DATE); ","SELECT company_id, SUM(investment_amount) as total_investment, RANK() OVER (PARTITION BY company_id ORDER BY SUM(investment_amount) DESC) as investment_rank FROM investment WHERE (SELECT country FROM company WHERE id = company_id) = 'USA' GROUP BY company_id;","SELECT c.country, SUM(i.investment_amount) as total_investment, SUM(i.investment_amount) as total_investment FROM company c JOIN investment i ON c.id = i.company_id WHERE c.country = 'USA' GROUP BY c.country;",0 display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara.,"CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR, department_id VARCHAR);","SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = ""Clara"");","SELECT first_name, last_name, hire_date FROM employees WHERE department_id = ""clara"";",0 What is the average altitude of satellites launched by Indian Space Research Organisation (ISRO)?,"CREATE TABLE Satellites (SatelliteID INT, Name VARCHAR(50), Manufacturer VARCHAR(50), LaunchDate DATE, Orbit VARCHAR(50), Altitude INT, Status VARCHAR(50)); ",SELECT AVG(Altitude) AS AvgAltitude FROM Satellites WHERE Manufacturer = 'ISRO';,SELECT AVG(Altitude) FROM Satellites WHERE Manufacturer = 'ISRO';,0 What is the average delivery time for recycled packaging orders?,"CREATE TABLE OrderDetails (order_id INT, product_id INT, delivery_date DATE, packaging_type VARCHAR(255)); CREATE TABLE PackagingInfo (packaging_id INT, packaging_type VARCHAR(255), is_recycled BOOLEAN, avg_delivery_time INT); ",SELECT AVG(PackagingInfo.avg_delivery_time) FROM PackagingInfo INNER JOIN OrderDetails ON PackagingInfo.packaging_type = OrderDetails.packaging_type WHERE PackagingInfo.is_recycled = true;,SELECT AVG(avg_delivery_time) FROM PackagingInfo JOIN OrderDetails ON PackagingInfo.packaging_id = OrderDetails.product_id WHERE is_recycled = true;,0 What is the maximum pressure recorded for each process in the chemical_processes table?,"CREATE TABLE chemical_processes (process_id INTEGER, pressure FLOAT);","SELECT process_id, MAX(pressure) FROM chemical_processes GROUP BY process_id;","SELECT process_id, MAX(pressure) FROM chemical_processes GROUP BY process_id;",1 Which 1999 has 2000 as the year-end championship?,CREATE TABLE table_name_40 (Id VARCHAR);,"SELECT 1999 FROM table_name_40 WHERE 2000 = ""year-end championship"";","SELECT 1999 FROM table_name_40 WHERE 2000 = ""year-end championship"";",1 Title of the angry brigade involves which lowest year?,"CREATE TABLE table_name_49 (year INTEGER, title VARCHAR);","SELECT MIN(year) FROM table_name_49 WHERE title = ""the angry brigade"";","SELECT MIN(year) FROM table_name_49 WHERE title = ""angry brigade"";",0 "List all urban gardens in the 'food_justice' schema, along with their associated community organization names.","CREATE SCHEMA if not exists food_justice; use food_justice; CREATE TABLE urban_gardens (id INT, name TEXT, location TEXT); CREATE TABLE community_orgs (id INT, name TEXT, garden_id INT); ","SELECT urban_gardens.name, community_orgs.name FROM food_justice.urban_gardens INNER JOIN food_justice.community_orgs ON urban_gardens.id = community_orgs.garden_id;","SELECT urban_gardens.name, community_orgs.name FROM food_justice.urban_gardens INNER JOIN community_orgs ON urban_gardens.id = community_orgs.garden_id;",0 What is the make and model of the safest vehicle in the 'safety_test_results' table?,"CREATE TABLE safety_test_results (make VARCHAR(50), model VARCHAR(50), rating FLOAT);","SELECT make, model FROM safety_test_results ORDER BY rating DESC LIMIT 1;","SELECT make, model FROM safety_test_results ORDER BY rating DESC LIMIT 1;",1 What is the percentage of voters in each state who voted for a particular political party in the last election?,"CREATE TABLE election_data (state VARCHAR(255), voter VARCHAR(255), party VARCHAR(255)); ","SELECT s1.state, s1.party, (COUNT(s1.voter) * 100.0 / (SELECT COUNT(s2.voter) FROM election_data s2 WHERE s2.state = s1.state)) as pct_party FROM election_data s1 GROUP BY s1.state, s1.party;","SELECT state, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM election_data)) as percentage FROM election_data GROUP BY state;",0 What is the maximum mental health score for students in the 'remote_learning' program?,"CREATE TABLE student_mental_health (student_id INT, program VARCHAR(20), score INT); ",SELECT MAX(score) FROM student_mental_health WHERE program = 'remote_learning';,SELECT MAX(score) FROM student_mental_health WHERE program ='remote_learning';,0 Minimum budget for AI safety projects related to 'Secure AI' and 'Robust AI'.,"CREATE TABLE safety_projects_budget (id INT PRIMARY KEY, project_name VARCHAR(50), category VARCHAR(50), budget FLOAT); ","SELECT MIN(budget) FROM safety_projects_budget WHERE category IN ('Secure AI', 'Robust AI');","SELECT MIN(budget) FROM safety_projects_budget WHERE category IN ('Secure AI', 'Robust AI');",1 How many items were under ranking l.a.(2) when the world ranking was 21st?,"CREATE TABLE table_19948664_2 (ranking_la__2_ VARCHAR, world_ranking__1_ VARCHAR);","SELECT COUNT(ranking_la__2_) FROM table_19948664_2 WHERE world_ranking__1_ = ""21st"";","SELECT COUNT(ranking_la__2_) FROM table_19948664_2 WHERE world_ranking__1_ = ""21st"";",1 "Name the team for chris duhon , nate robinson , david lee (3)","CREATE TABLE table_17060277_7 (team VARCHAR, high_assists VARCHAR);","SELECT team FROM table_17060277_7 WHERE high_assists = ""Chris Duhon , Nate Robinson , David Lee (3)"";","SELECT team FROM table_17060277_7 WHERE high_assists = ""Chris Duhon, Nate Robinson, David Lee (3)"";",0 List the defense contractors who have not made any military equipment sales in the year 2019.,"CREATE TABLE ContractorSales (contractor_id INT, sale_year INT, sales_count INT);",SELECT DISTINCT contractor_id FROM ContractorSales WHERE sale_year = 2019 AND sales_count = 0;,SELECT contractor_id FROM ContractorSales WHERE sale_year = 2019 AND sales_count IS NULL;,0 "What is the average salary for employees who identify as female, hired between 2019 and 2021, and work in the IT department?",SAME AS ABOVE,SELECT AVG(Salary) FROM Employees WHERE Gender = 'Female' AND HireYear BETWEEN 2019 AND 2021 AND Department = 'IT';,SELECT AVG(Salary) FROM (SELECT AVG(Salary) FROM employees WHERE gender = 'Female' AND YEAR(hired) BETWEEN 2019 AND 2021 AND work in the IT department) AS subquery WHERE gender = 'Female' AND YEAR(hired) BETWEEN 2019 AND 2021 AND YEAR(hired) BETWEEN 2019 AND 2021 AND YEAR(hired) BETWEEN 2019 AND 2021 AND YEAR(hired) BETWEEN 2019 AND 2021 AND YEAR(hired) BETWEEN 2019 AND 2021 AND YEAR(hired) BETWEEN 2019 AND YEAR(hired) BETWEEN 2019 AND YEAR(hired),0 "What is the percentage of hotels in London, UK that have adopted AI technology?","CREATE TABLE hotel_tech_adoptions (id INT, hotel_id INT, tech_type TEXT, installed_date DATE); CREATE TABLE hotels (id INT, name TEXT, city TEXT, country TEXT, has_ai_tech BOOLEAN);",SELECT 100.0 * COUNT(hta.hotel_id) / (SELECT COUNT(*) FROM hotels WHERE city = 'London' AND country = 'UK') FROM hotel_tech_adoptions hta INNER JOIN hotels h ON hta.hotel_id = h.id WHERE h.city = 'London' AND h.country = 'UK' AND tech_type = 'AI';,SELECT 100.0 * COUNT(*) / (SELECT COUNT(*) FROM hotel_tech_adoptions WHERE city = 'London' AND country = 'UK') AS percentage FROM hotel_tech_adoptions WHERE tech_type = 'AI';,0 What percentage of visitors identified as 'transgender' out of total visitors?,"CREATE TABLE Visitors (visitor_id INT, exhibition_id INT, age INT, gender VARCHAR(50));",SELECT (COUNT(CASE WHEN gender = 'transgender' THEN 1 END)/COUNT(*))*100 as percentage FROM Visitors;,SELECT (COUNT(*) FILTER (WHERE gender = 'transgender')) * 100.0 / COUNT(*) FROM Visitors;,0 Which virtual tour received the most engagement from users in the 'Americas' region?,"CREATE TABLE virtual_tours (tour_id INT, name TEXT, region TEXT, engagement INT); ","SELECT name, MAX(engagement) FROM virtual_tours WHERE region = 'Americas';","SELECT name, SUM(engagement) FROM virtual_tours WHERE region = 'Americas' GROUP BY name ORDER BY SUM(engagement) DESC LIMIT 1;",0 How many spacecraft components were manufactured in each country in 2021?,"CREATE TABLE SpacecraftComponents (id INT, country TEXT, year INT, quantity INT);","SELECT country, year, SUM(quantity) FROM SpacecraftComponents WHERE year = 2021 GROUP BY country;","SELECT country, SUM(quantity) FROM SpacecraftComponents WHERE year = 2021 GROUP BY country;",0 What is the average length of the ships at each location?,"CREATE TABLE port (id INT PRIMARY KEY, name VARCHAR(50), location VARCHAR(50), capacity INT); CREATE TABLE ship (id INT PRIMARY KEY, name VARCHAR(50), type VARCHAR(50), length INT, port_id INT, FOREIGN KEY (port_id) REFERENCES port(id)); ","SELECT p.location as location, AVG(s.length) as avg_length FROM ship s JOIN port p ON s.port_id = p.id GROUP BY p.location;","SELECT p.location, AVG(s.length) as avg_length FROM ship s JOIN port p ON s.port_id = p.id GROUP BY p.location;",0 What are the names and production quantities of all gas wells in the 'gulf' region?,"CREATE TABLE gas_wells (well_name TEXT, region TEXT, production_quantity INT); ","SELECT well_name, production_quantity FROM gas_wells WHERE region = 'gulf';","SELECT well_name, production_quantity FROM gas_wells WHERE region = 'gulf';",1 List all contractors who have completed projects in both 'California' and 'Texas',"CREATE TABLE contractors (contractor_id INT, name VARCHAR(50), state VARCHAR(2)); CREATE TABLE projects (project_id INT, contractor_id INT, state VARCHAR(2)); ","SELECT c.name FROM contractors c JOIN projects p ON c.contractor_id = p.contractor_id WHERE c.state IN ('CA', 'TX') GROUP BY c.name HAVING COUNT(DISTINCT c.state) = 2;","SELECT contractors.name FROM contractors INNER JOIN projects ON contractors.contractor_id = projects.contractor_id WHERE projects.state IN ('California', 'Texas') GROUP BY contractors.name HAVING COUNT(DISTINCT projects.state) = 2;",0 Update the painting 'The Starry Night' to be created in 1888.,"CREATE TABLE Paintings (PaintingID INT, Title VARCHAR(50), ArtistID INT, YearCreated INT); ",UPDATE Paintings SET YearCreated = 1888 WHERE Title = 'The Starry Night';,UPDATE Paintings SET YearCreated = 1888 WHERE Title = 'The Starry Night';,1 Identify the hotels in the Asia-Pacific region with the highest local economic impact.,"CREATE TABLE impact_asia (impact_id INT, hotel_name VARCHAR(255), region VARCHAR(255), impact INT); ","SELECT hotel_name, impact FROM impact_asia WHERE region = 'Asia-Pacific' ORDER BY impact DESC;","SELECT hotel_name, impact FROM impact_asia WHERE region = 'Asia-Pacific' ORDER BY impact DESC LIMIT 1;",0 Delete all rural development projects in Nepal in 2018.,"CREATE TABLE rural_development (country VARCHAR(255), year INT, num_projects INT); ",DELETE FROM rural_development WHERE country = 'Nepal' AND year = 2018;,DELETE FROM rural_development WHERE country = 'Nepal' AND year = 2018;,1 "What was the final score agains Dynamo Kyiv, when the group position was 1st?","CREATE TABLE table_name_39 (result_f___a VARCHAR, group_position VARCHAR, opponents VARCHAR);","SELECT result_f___a FROM table_name_39 WHERE group_position = ""1st"" AND opponents = ""dynamo kyiv"";","SELECT result_f___a FROM table_name_39 WHERE group_position = ""1st"" AND opponents = ""dynamo kyiv"";",1 Add data to 'drought_impact' table,"CREATE TABLE drought_impact (id INT PRIMARY KEY, region VARCHAR(50), drought_duration INT);","INSERT INTO drought_impact (id, region, drought_duration) VALUES (1, 'Central Valley', 36);","INSERT INTO drought_impact (id, region, drought_duration) VALUES (1, 'North America', 'South America', 'South America');",0 List the teams that have a higher number of ticket sales than the average number of ticket sales for all teams.,"CREATE TABLE sales (team TEXT, quantity INTEGER); ",SELECT team FROM sales WHERE quantity > (SELECT AVG(quantity) FROM sales);,SELECT team FROM sales WHERE quantity > (SELECT AVG(quantity) FROM sales);,1 What's the frequency of the call sign DYFR with 10KW of power?,"CREATE TABLE table_name_50 (frequency VARCHAR, power__kw_ VARCHAR, call_sign VARCHAR);","SELECT frequency FROM table_name_50 WHERE power__kw_ = ""10kw"" AND call_sign = ""dyfr"";","SELECT frequency FROM table_name_50 WHERE power__kw_ = ""10kw"" AND call_sign = ""dyfr"";",1 "What is the total number of mental health parity violations recorded in the 'violations' table, for providers serving primarily patients who identify as LGBTQ+?","CREATE TABLE providers (id INT, name VARCHAR(50), language VARCHAR(50), parity_violations INT); CREATE TABLE violations (id INT, provider_id INT, date DATE); CREATE TABLE patients (id INT, name VARCHAR(50), gender VARCHAR(50)); ",SELECT SUM(v.parity_violations) FROM providers p JOIN violations v ON p.id = v.provider_id JOIN patients patient ON p.id = patient.id WHERE patient.gender LIKE '%Transgender%';,SELECT SUM(parity_violations) FROM providers JOIN violations ON providers.id = violations.provider_id JOIN patients ON violations.patient_id = patients.id WHERE patients.gender = 'LGBTQ+';,0 What is the maximum depth of the Galathea Trench in the Indian Ocean?,"CREATE TABLE marine_trenches (ocean TEXT, trench TEXT, max_depth INTEGER);","SELECT ocean, trench, max_depth FROM marine_trenches WHERE ocean = 'Indian' AND trench = 'Galathea Trench' AND max_depth = (SELECT MAX(max_depth) FROM marine_trenches WHERE ocean = 'Indian');",SELECT MAX(max_depth) FROM marine_trenches WHERE ocean = 'Indian Ocean' AND trench = 'Galathea Trench';,0 How many airlines are from USA?,CREATE TABLE AIRLINES (Country VARCHAR);,"SELECT COUNT(*) FROM AIRLINES WHERE Country = ""USA"";",SELECT COUNT(*) FROM AIRLINES WHERE Country = 'USA';,0 Who corned the most points for the game that ended with a score of l 85–94 (ot)?,"CREATE TABLE table_27734577_2 (high_points VARCHAR, score VARCHAR);","SELECT high_points FROM table_27734577_2 WHERE score = ""L 85–94 (OT)"";","SELECT high_points FROM table_27734577_2 WHERE score = ""L 85–94 (OT)"";",1 How many mental health parity cases were reported in each region?,"CREATE TABLE MentalHealthParity (CaseID INT, Region VARCHAR(25)); ","SELECT Region, COUNT(*) as NumCases FROM MentalHealthParity GROUP BY Region;","SELECT Region, COUNT(*) FROM MentalHealthParity GROUP BY Region;",0 Identify the number of tunnels in the city of London that have been built in the last 5 years and their respective construction companies.,"CREATE TABLE tunnel (id INT, name TEXT, city TEXT, construction_date DATE, construction_company TEXT); ","SELECT COUNT(*), construction_company FROM tunnel WHERE city = 'London' AND construction_date >= '2016-01-01' GROUP BY construction_company;","SELECT COUNT(*), construction_company FROM tunnel WHERE city = 'London' AND construction_date >= DATEADD(year, -5, GETDATE());",0 Which venue does Fitzroy play as an away team?,"CREATE TABLE table_name_57 (venue VARCHAR, away_team VARCHAR);","SELECT venue FROM table_name_57 WHERE away_team = ""fitzroy"";","SELECT venue FROM table_name_57 WHERE away_team = ""fitzroy"";",1 What is the total number of parks in each city?,"CREATE TABLE cities (id INT, name TEXT);CREATE TABLE parks (id INT, park_name TEXT, city_id INT);","SELECT city_id, COUNT(*) FROM parks GROUP BY city_id;","SELECT c.name, COUNT(p.id) FROM cities c JOIN parks p ON c.id = p.city_id GROUP BY c.name;",0 Identify indigenous communities facing severe impacts from climate change,"CREATE TABLE CommunityImpacts (community TEXT, year INT, impact_level TEXT); ","SELECT community, STRING_AGG(DISTINCT impact_level, ', ') AS impact_levels FROM CommunityImpacts WHERE year >= 2015 GROUP BY community HAVING COUNT(DISTINCT impact_level) > 2;",SELECT community FROM CommunityImpacts WHERE impact_level = 'Severe';,0 Show the number of renewable energy sources and the total energy generated by those sources for each region,"CREATE TABLE renewable_energy (region VARCHAR(20), source VARCHAR(20), energy_generated INT);","SELECT region, COUNT(source) AS num_sources, SUM(energy_generated) AS total_energy FROM renewable_energy GROUP BY region;","SELECT region, COUNT(source) as source_count, SUM(energy_generated) as total_energy FROM renewable_energy GROUP BY region;",0 "What is the total losses for the player with fewer than 51 pens, 3 tries and 45 starts?","CREATE TABLE table_name_19 (lost VARCHAR, start VARCHAR, pens VARCHAR, tries VARCHAR);",SELECT COUNT(lost) FROM table_name_19 WHERE pens < 51 AND tries = 3 AND start = 45;,SELECT COUNT(lost) FROM table_name_19 WHERE pens 51 AND tries = 3 AND start = 45;,0 Name the 2009 for 2007 of 2r and tournament of wimbledon,CREATE TABLE table_name_35 (tournament VARCHAR);,"SELECT 2009 FROM table_name_35 WHERE 2007 = ""2r"" AND tournament = ""wimbledon"";","SELECT 2009 FROM table_name_35 WHERE 2007 = ""2r"" AND tournament = ""wimbledon"";",1 What is the Player for Orlando in 1989–1991?,"CREATE TABLE table_name_77 (player VARCHAR, years_in_orlando VARCHAR);","SELECT player FROM table_name_77 WHERE years_in_orlando = ""1989–1991"";","SELECT player FROM table_name_77 WHERE years_in_orlando = ""1989–1991"";",1 "What is Type, when Works Number is 75823?","CREATE TABLE table_name_16 (type VARCHAR, works_number VARCHAR);","SELECT type FROM table_name_16 WHERE works_number = ""75823"";",SELECT type FROM table_name_16 WHERE works_number = 75823;,0 What is the ICT when education is 1.73 and KI is ag 1.99? ,"CREATE TABLE table_23050383_1 (ict VARCHAR, education VARCHAR, ki VARCHAR);","SELECT ict FROM table_23050383_1 WHERE education = ""1.73"" AND ki = ""1.99"";","SELECT ict FROM table_23050383_1 WHERE education = ""1.73"" AND ki = ""AG 1.99"";",0 What is the total salary cost for employees in the IT and HR departments?,"CREATE TABLE Employees (EmployeeID INT, Department VARCHAR(20), Salary INT); ","SELECT SUM(Salary) FROM Employees WHERE Department IN ('IT', 'HR');","SELECT SUM(Salary) FROM Employees WHERE Department IN ('IT', 'HR');",1 What is the total humanitarian aid provided by USAID in Latin America and the Caribbean in 2020?,"CREATE TABLE Humanitarian_Aid (donor VARCHAR(255), region VARCHAR(255), year INT, amount FLOAT); ",SELECT SUM(amount) FROM Humanitarian_Aid WHERE donor = 'USAID' AND region = 'Latin America' AND year = 2020;,"SELECT SUM(amount) FROM Humanitarian_Aid WHERE donor = 'USAID' AND region IN ('Latin America', 'Caribbean') AND year = 2020;",0 "Which cities have a population greater than 5,000,000 in 'Africa'?","CREATE TABLE cities (id INT PRIMARY KEY, name VARCHAR(50), country VARCHAR(50), population INT, continent VARCHAR(50)); ","SELECT cities.name, cities.population FROM cities WHERE cities.continent = 'Africa' AND cities.population > 5000000;",SELECT name FROM cities WHERE population > 5000000 AND continent = 'Africa';,0 What are the top 3 most popular dishes among vegetarian customers?,"CREATE TABLE dishes (dish_id INT, dish_name TEXT, is_vegetarian BOOLEAN); CREATE TABLE orders (order_id INT, customer_id INT, dish_id INT); ","SELECT d.dish_name, COUNT(o.order_id) as order_count FROM dishes d INNER JOIN orders o ON d.dish_id = o.dish_id WHERE d.is_vegetarian = true GROUP BY d.dish_name ORDER BY order_count DESC LIMIT 3;","SELECT d.dish_name, COUNT(o.order_id) as total_orders FROM dishes d JOIN orders o ON d.dish_id = o.dish_id WHERE d.is_vegetarian = true GROUP BY d.dish_name ORDER BY total_orders DESC LIMIT 3;",0 Delete the records of players who have not played any VR games in the last 3 months.,"CREATE TABLE PlayerVR (PlayerID INT, VRSessionDate DATE); ","DELETE FROM PlayerVR WHERE PlayerID IN (SELECT PlayerID FROM PlayerVR WHERE VRSessionDate < DATE_SUB(CURDATE(), INTERVAL 3 MONTH));","DELETE FROM PlayerVR WHERE PlayerID NOT IN (SELECT PlayerID FROM PlayerVR WHERE VRSessionDate DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH);",0 "Find the average donation amount per month for the last 12 months, starting from the current month?","CREATE TABLE Donations (DonationID INT, DonorID INT, DonationAmount DECIMAL(10,2), DonationDate DATE); ","SELECT EXTRACT(MONTH FROM DonationDate) as Month, AVG(DonationAmount) as AvgDonation FROM Donations WHERE DonationDate BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 12 MONTH) AND CURRENT_DATE GROUP BY Month ORDER BY Month;","SELECT DATE_FORMAT(DonationDate, '%Y-%m') AS Month, AVG(DonationAmount) AS AvgDonationPerMonth FROM Donations WHERE DATE_FORMAT(DonationDate, '%Y-%m') >= DATE_SUB(CURRENT_DATE, INTERVAL 12 MONTH) GROUP BY Month;",0 Find the number of accessible and non-accessible vehicles in the fleet,"CREATE TABLE vehicle_accessibility (vehicle_id INT, vehicle_type VARCHAR(10), accessible BOOLEAN); ","SELECT vehicle_type, SUM(accessible) as number_of_accessible_vehicles, SUM(NOT accessible) as number_of_non_accessible_vehicles FROM vehicle_accessibility GROUP BY vehicle_type;","SELECT vehicle_type, COUNT(*) FROM vehicle_accessibility WHERE accessible = true GROUP BY vehicle_type;",0 What is the average order value for orders placed in the United States and shipped via ground shipping?,"CREATE TABLE orders (order_id INT, order_date DATE, order_value DECIMAL(10,2), country VARCHAR(50), shipping_method VARCHAR(50)); ",SELECT AVG(order_value) FROM orders WHERE country = 'USA' AND shipping_method = 'ground';,SELECT AVG(order_value) FROM orders WHERE country = 'United States' AND shipping_method = 'ground shipping';,0 Find genetic research data related to rare genetic disorders in indigenous communities.,"CREATE TABLE genetic_research (id INT, title VARCHAR(100), focus VARCHAR(100), community VARCHAR(50)); ",SELECT * FROM genetic_research WHERE community = 'Indigenous';,SELECT * FROM genetic_research WHERE focus = 'Rare Genetic Disorders' AND community = 'Indigenous';,0 What is the maximum number of passengers for each aircraft model?,"CREATE TABLE aircraft_specs (id INT, model VARCHAR(50), max_passengers INT); ","SELECT model, MAX(max_passengers) as max_passengers FROM aircraft_specs GROUP BY model;","SELECT model, MAX(max_passengers) FROM aircraft_specs GROUP BY model;",0 Find the top 3 unsafe AI algorithms by their total number of incidents,"CREATE TABLE unsafe_ai_algorithms (ai_algorithm VARCHAR(255), incidents INT); ","SELECT ai_algorithm, SUM(incidents) AS total_incidents FROM unsafe_ai_algorithms GROUP BY ai_algorithm ORDER BY total_incidents DESC LIMIT 3;","SELECT ai_algorithm, SUM(incidents) as total_incidents FROM unsafe_ai_algorithms GROUP BY ai_algorithm ORDER BY total_incidents DESC LIMIT 3;",0 "Which cultural heritage sites in Tokyo have more than 5,000 monthly visitors?","CREATE TABLE cultural_sites (site_id INT, site_name TEXT, city TEXT, monthly_visitors INT); ","SELECT site_name, monthly_visitors FROM cultural_sites WHERE city = 'Tokyo' AND monthly_visitors > 5000;",SELECT site_name FROM cultural_sites WHERE city = 'Tokyo' AND monthly_visitors > 5000;,0 Who are the founders of companies with a diversity score greater than 80 that have received Series A funding?,"CREATE TABLE company (id INT PRIMARY KEY, name VARCHAR(100), founding_year INT, industry VARCHAR(50), diversity_score FLOAT); CREATE TABLE investment (id INT PRIMARY KEY, company_id INT, round_type VARCHAR(50), invested_amount INT, investment_date DATE); CREATE TABLE founder (id INT PRIMARY KEY, company_id INT, founder_name VARCHAR(100), gender VARCHAR(10), race VARCHAR(50));",SELECT DISTINCT founder.founder_name FROM company INNER JOIN investment ON company.id = investment.company_id INNER JOIN founder ON company.id = founder.company_id WHERE company.diversity_score > 80 AND investment.round_type = 'Series A';,SELECT f.founder_name FROM founder f JOIN company c ON f.company_id = c.id JOIN investment i ON c.id = i.company_id WHERE c.diversity_score > 80 AND i.round_type = 'Series A';,0 What is the total transaction amount by customer demographic category?,"CREATE TABLE customer_demographics (id INT, category VARCHAR(50), sub_category VARCHAR(50)); CREATE TABLE transactions (customer_id INT, transaction_amount DECIMAL(10,2)); ","SELECT c.category, c.sub_category, SUM(t.transaction_amount) as total_transaction_amount FROM customer_demographics c JOIN transactions t ON 1=1 GROUP BY c.category, c.sub_category;","SELECT cd.category, SUM(t.transaction_amount) as total_transaction_amount FROM customer_demographics cd INNER JOIN transactions t ON cd.id = t.customer_id GROUP BY cd.category;",0 What party does the incumbent from the Ohio 7 district belong to? ,"CREATE TABLE table_1342218_35 (party VARCHAR, district VARCHAR);","SELECT party FROM table_1342218_35 WHERE district = ""Ohio 7"";","SELECT party FROM table_1342218_35 WHERE district = ""Ohio 7"";",1 Find the name and salary of instructors who are advisors of the students from the Math department.,"CREATE TABLE instructor (name VARCHAR, salary VARCHAR, id VARCHAR); CREATE TABLE advisor (i_id VARCHAR, s_id VARCHAR); CREATE TABLE student (id VARCHAR, dept_name VARCHAR);","SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math';","SELECT T1.name, T1.salary FROM instructor AS T1 JOIN advisor AS T2 ON T1.i_id = T2.i_id JOIN student AS T3 ON T1.id = T3.id WHERE T3.dept_name = ""Mathematics"";",0 How many marine research projects were conducted in the Indian Ocean by each organization?,"CREATE TABLE IndianOceanProjects (organization TEXT, project_name TEXT); CREATE TABLE Organizations (organization TEXT, research_count INTEGER); ","SELECT Organizations.organization, Organizations.research_count FROM Organizations INNER JOIN IndianOceanProjects ON Organizations.organization = IndianOceanProjects.organization WHERE IndianOceanProjects.project_name LIKE '%Indian Ocean%';","SELECT Organizations.organization, SUM(Organisations.research_count) FROM IndianOceanProjects INNER JOIN Organizations ON IndianOceanProjects.organization = Organizations.organization GROUP BY Organizations.organization;",0 Name the winner with mountains classification of franco pellizotti and combativity award of martijn maaskant,"CREATE TABLE table_name_5 (winner VARCHAR, mountains_classification VARCHAR, combativity_award VARCHAR);","SELECT winner FROM table_name_5 WHERE mountains_classification = ""franco pellizotti"" AND combativity_award = ""martijn maaskant"";","SELECT winner FROM table_name_5 WHERE mountains_classification = ""franco pellizotti"" AND combativity_award = ""martijn maaskant"";",1 Find the number of fish species that were introduced in the fish_introduction table after 2010.,"CREATE TABLE fish_introduction (species VARCHAR(255), year INT);",SELECT COUNT(*) FROM fish_introduction WHERE year > 2010;,SELECT COUNT(*) FROM fish_introduction WHERE year > 2010;,1 "Name of gilmar, and a Caps smaller than 94 had how many highest goals?","CREATE TABLE table_name_18 (goals INTEGER, name VARCHAR, caps VARCHAR);","SELECT MAX(goals) FROM table_name_18 WHERE name = ""gilmar"" AND caps < 94;","SELECT MAX(goals) FROM table_name_18 WHERE name = ""gilmar"" AND caps 94;",0 What is the total revenue of hotels in London?,"CREATE TABLE hotel_revenue (hotel_id INT, name TEXT, city TEXT, country TEXT, daily_revenue DECIMAL(5,2)); ",SELECT SUM(daily_revenue) FROM hotel_revenue WHERE city = 'London';,SELECT SUM(daily_revenue) FROM hotel_revenue WHERE city = 'London';,1 "What is the transfer fee of assoumani, who has a summer transfer window?","CREATE TABLE table_name_70 (transfer_fee VARCHAR, transfer_window VARCHAR, name VARCHAR);","SELECT transfer_fee FROM table_name_70 WHERE transfer_window = ""summer"" AND name = ""assoumani"";","SELECT transfer_fee FROM table_name_70 WHERE transfer_window = ""summer"" AND name = ""assoumani"";",1 List the branding name for channel tv-62.,"CREATE TABLE table_2523809_1 (branding VARCHAR, channel VARCHAR);","SELECT branding FROM table_2523809_1 WHERE channel = ""TV-62"";","SELECT branding FROM table_2523809_1 WHERE channel = ""TV-62"";",1 What is the maximum number of food safety violations recorded for a single inspection?,"CREATE TABLE RestaurantInspections (inspection_id INT, restaurant_id INT, violation_count INT); ",SELECT MAX(violation_count) FROM RestaurantInspections;,SELECT MAX(violation_count) FROM RestaurantInspections;,1 Name the first broadcast for trisha goddard and glenn wool,"CREATE TABLE table_23292220_5 (first_broadcast VARCHAR, jasons_team VARCHAR);","SELECT first_broadcast FROM table_23292220_5 WHERE jasons_team = ""Trisha Goddard and Glenn Wool"";","SELECT first_broadcast FROM table_23292220_5 WHERE jasons_team = ""Trisha Goddard and Glenn Wool"";",1 What is the name of the Deputy when the Name was elizabeth black?,"CREATE TABLE table_name_88 (deputy VARCHAR, name VARCHAR);","SELECT deputy FROM table_name_88 WHERE name = ""elizabeth black"";","SELECT deputy FROM table_name_88 WHERE name = ""elizabeth black"";",1 The astronaut who was 37y 8m 4d when making a first step on the moon was in which service?,"CREATE TABLE table_name_65 (service VARCHAR, age_at_first_step VARCHAR);","SELECT service FROM table_name_65 WHERE age_at_first_step = ""37y 8m 4d"";","SELECT service FROM table_name_65 WHERE age_at_first_step = ""37y 8m 4d"";",1 What is the total number of eco-friendly accommodations in Europe?,"CREATE TABLE eco_accommodations (id INT, country VARCHAR(255), type VARCHAR(255)); ",SELECT COUNT(*) FROM eco_accommodations WHERE country IN ('Europe');,"SELECT COUNT(*) FROM eco_accommodations WHERE type = 'Eco-friendly' AND country IN ('Germany', 'France');",0 What is the minimum population of any animal in the 'animal_population' table?,"CREATE TABLE animal_population (animal_id INT, animal_name VARCHAR(50), population INT); ",SELECT MIN(population) FROM animal_population;,SELECT MIN(population) FROM animal_population;,1 When hayden roulston is the winner what is the stage?,"CREATE TABLE table_28298471_14 (stage VARCHAR, winner VARCHAR);","SELECT stage FROM table_28298471_14 WHERE winner = ""Hayden Roulston"";","SELECT stage FROM table_28298471_14 WHERE winner = ""Hayden Roulston"";",1 Name the race caller for jim mckay and howard cosell and eddie arcaro,"CREATE TABLE table_22514845_5 (race_caller VARCHAR, s_analyst VARCHAR, trophy_presentation VARCHAR, reporters VARCHAR);","SELECT race_caller FROM table_22514845_5 WHERE trophy_presentation = ""Jim McKay and Howard Cosell"" AND reporters = ""Howard Cosell"" AND s_analyst = ""Eddie Arcaro"";","SELECT race_caller FROM table_22514845_5 WHERE trophy_presentation = ""Jim McKay"" AND reporters = ""Howard Cosell and Eddie Arcaro"";",0 What is the total number of community engagement events in Oceania with more than 500 participants?,"CREATE TABLE CommunityEngagement (id INT, name TEXT, region TEXT, participants INT); ",SELECT SUM(*) FROM CommunityEngagement WHERE region = 'Oceania' AND participants > 500,SELECT COUNT(*) FROM CommunityEngagement WHERE region = 'Oceania' AND participants > 500;,0 What is the maximum sustainability score for hotels in each city?,"CREATE TABLE hotel_ratings (hotel_id INT, sustainability_rating FLOAT); ","SELECT hi.city, MAX(st.sustainability_score) FROM sustainable_tourism st INNER JOIN hotel_info hi ON st.hotel_id = hi.hotel_id GROUP BY hi.city;","SELECT city, MAX(sustainability_rating) FROM hotel_ratings GROUP BY city;",0 What is the success rate of agricultural innovation projects in each country?,"CREATE TABLE project (project_id INT, name VARCHAR(50), location VARCHAR(50), success_rate FLOAT); CREATE TABLE country (country_id INT, name VARCHAR(50), description TEXT); CREATE TABLE location (location_id INT, name VARCHAR(50), country_id INT);","SELECT l.name, AVG(p.success_rate) FROM project p JOIN location l ON p.location = l.name JOIN country c ON l.country_id = c.country_id GROUP BY l.name;","SELECT country.name, SUM(project.success_rate) as total_success_rate FROM project INNER JOIN country ON project.country_id = country.country_id INNER JOIN location ON country.country_id = location.country_id GROUP BY country.name;",0 "What is Population density (per km²), when Name is Antigua and Barbuda, and when Capital is St. John's?","CREATE TABLE table_name_81 (population_density__per_km²_ VARCHAR, name VARCHAR, capital VARCHAR);","SELECT population_density__per_km²_ FROM table_name_81 WHERE name = ""antigua and barbuda"" AND capital = ""st. john's"";","SELECT population_density__per_km2_ FROM table_name_81 WHERE name = ""antigua and barbuda"" AND capital = ""st. john's"";",0 "Which record has 64,053 as the attendance?","CREATE TABLE table_name_51 (record VARCHAR, attendance VARCHAR);","SELECT record FROM table_name_51 WHERE attendance = ""64,053"";","SELECT record FROM table_name_51 WHERE attendance = ""64,053"";",1 List the top 3 states with the highest claim amounts?,"CREATE TABLE Claims (ClaimID int, PolicyID int, State varchar(50), ClaimAmount decimal(10, 2)); ","SELECT State, SUM(ClaimAmount) AS TotalClaimAmount FROM Claims GROUP BY State ORDER BY TotalClaimAmount DESC LIMIT 3","SELECT State, ClaimAmount FROM Claims ORDER BY ClaimAmount DESC LIMIT 3;",0 List the hosts of performances in ascending order of attendance.,"CREATE TABLE performance (HOST VARCHAR, Attendance VARCHAR);",SELECT HOST FROM performance ORDER BY Attendance;,SELECT HOST FROM performance ORDER BY Attendance ASC;,0 What is the policy retention rate by policy type and region?,"CREATE TABLE PolicyHistory (PolicyID INT, PolicyType VARCHAR(20), Region VARCHAR(20), Renewal BOOLEAN); ","SELECT PolicyType, Region, COUNT(*) OVER (PARTITION BY PolicyType, Region) AS TotalPolicies, COUNT(*) FILTER (WHERE Renewal = TRUE) OVER (PARTITION BY PolicyType, Region) AS RenewedPolicies, ROUND(COUNT(*) FILTER (WHERE Renewal = TRUE) OVER (PARTITION BY PolicyType, Region) * 100.0 / COUNT(*) OVER (PARTITION BY PolicyType, Region), 2) AS RenewalRate FROM PolicyHistory;","SELECT PolicyType, Region, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM PolicyHistory WHERE Renewal = TRUE) as RetentionRate FROM PolicyHistory GROUP BY PolicyType, Region;",0 List all building permits issued for sustainable projects in the state of Washington.,"CREATE TABLE building_permits (id INT, project_name VARCHAR(50), project_type VARCHAR(20), state VARCHAR(20)); ",SELECT * FROM building_permits WHERE project_type = 'Sustainable' AND state = 'Washington';,SELECT * FROM building_permits WHERE project_type = 'Sustainable' AND state = 'Washington';,1 What is the result against Clemson?,"CREATE TABLE table_name_86 (result VARCHAR, opponent VARCHAR);","SELECT result FROM table_name_86 WHERE opponent = ""clemson"";","SELECT result FROM table_name_86 WHERE opponent = ""clemson"";",1 What are the types of all heritage sites?,"CREATE TABLE Heritage_Sites (Site_ID INT PRIMARY KEY, Name VARCHAR(100), Country VARCHAR(50), Type VARCHAR(50)); ",SELECT Type FROM Heritage_Sites;,SELECT Type FROM Heritage_Sites;,1 What is the NHL team that has Peter Strom?,"CREATE TABLE table_1013129_8 (nhl_team VARCHAR, player VARCHAR);","SELECT nhl_team FROM table_1013129_8 WHERE player = ""Peter Strom"";","SELECT nhl_team FROM table_1013129_8 WHERE player = ""Peter Strom"";",1 What is the name for the locomotive n474?,"CREATE TABLE table_name_9 (name VARCHAR, locomotive VARCHAR);","SELECT name FROM table_name_9 WHERE locomotive = ""n474"";","SELECT name FROM table_name_9 WHERE locomotive = ""n474"";",1 When is the last episode air date for season 3?,"CREATE TABLE table_name_2 (last_air_date VARCHAR, season VARCHAR);",SELECT last_air_date FROM table_name_2 WHERE season = 3;,SELECT last_air_date FROM table_name_2 WHERE season = 3;,1 number of missions for each spacecraft,"CREATE TABLE Spacecraft_Manufacturing(name VARCHAR(50), mass FLOAT, country VARCHAR(50));","CREATE VIEW Spacecraft_Missions AS SELECT name, COUNT(*) as missions FROM Spacecraft_Manufacturing JOIN Missions ON Spacecraft_Manufacturing.name = Missions.spacecraft;SELECT country, SUM(missions) FROM Spacecraft_Missions GROUP BY country;","SELECT name, COUNT(*) FROM Spacecraft_Manufacturing GROUP BY name;",0 "What was the score of the game attended by 50,200?","CREATE TABLE table_name_2 (score VARCHAR, attendance VARCHAR);","SELECT score FROM table_name_2 WHERE attendance = ""50,200"";","SELECT score FROM table_name_2 WHERE attendance = ""50,200"";",1 How many community policing events occurred in the 'city' schema by month in 2022?,"CREATE SCHEMA if not exists city; CREATE TABLE if not exists city.community_policing (id INT, event_date DATE); ","SELECT MONTH(event_date), COUNT(*) FROM city.community_policing WHERE YEAR(event_date) = 2022 GROUP BY MONTH(event_date);","SELECT EXTRACT(MONTH FROM event_date) AS month, COUNT(*) FROM city.community_policing WHERE EXTRACT(YEAR FROM event_date) = 2022 GROUP BY month;",0 "who wrote with original air date being september23,1995","CREATE TABLE table_14637853_3 (written_by VARCHAR, original_air_date VARCHAR);","SELECT written_by FROM table_14637853_3 WHERE original_air_date = ""September23,1995"";","SELECT written_by FROM table_14637853_3 WHERE original_air_date = ""September23,1995"";",1 List all customers with fraudulent transactions in Q2 2022.,"CREATE TABLE customers (customer_id INT, customer_name TEXT); CREATE TABLE transactions (transaction_id INT, customer_id INT, transaction_date DATE, is_fraudulent BOOLEAN);","SELECT c.customer_id, c.customer_name FROM customers c JOIN transactions t ON c.customer_id = t.customer_id WHERE t.transaction_date BETWEEN '2022-04-01' AND '2022-06-30' AND t.is_fraudulent = TRUE;",SELECT customers.customer_name FROM customers INNER JOIN transactions ON customers.customer_id = transactions.customer_id WHERE transactions.is_fraudulent = true AND transactions.transaction_date BETWEEN '2022-04-01' AND '2022-06-30';,0 "What is the number of patients who improved after therapy and medication, separated by gender?","CREATE TABLE patients (patient_id INT, name VARCHAR(50), gender VARCHAR(10), therapy_completed BOOLEAN, medication_completed BOOLEAN, therapy_outcome INT, medication_outcome INT);","SELECT gender, SUM(CASE WHEN therapy_outcome > 0 THEN 1 ELSE 0 END) AS improved_therapy, SUM(CASE WHEN medication_outcome > 0 THEN 1 ELSE 0 END) AS improved_medication FROM patients WHERE therapy_completed = TRUE AND medication_completed = TRUE GROUP BY gender;","SELECT gender, COUNT(*) FROM patients WHERE therapy_completed = TRUE AND medication_completed = TRUE GROUP BY gender;",0 How many regions are affected?,CREATE TABLE affected_region (region_id VARCHAR);,SELECT COUNT(DISTINCT region_id) FROM affected_region;,SELECT COUNT(*) FROM affected_region;,0 Display decentralized applications and their developers who have collaborated on projects in the same country.,"CREATE TABLE DApps (DAppId INT, DAppName VARCHAR(50), DeveloperId INT); CREATE TABLE Developers (DeveloperId INT, DeveloperName VARCHAR(50), Country VARCHAR(50)); ","SELECT d1.DAppName, d1.DeveloperName, d2.DeveloperName FROM DApps d1 INNER JOIN Developers d1d ON d1.DeveloperId = d1d.DeveloperId INNER JOIN DApps d2 ON d1.DAppId = d2.DAppId INNER JOIN Developers d2d ON d2.DeveloperId = d2d.DeveloperId WHERE d1d.Country = d2d.Country AND d1.DAppId <> d2.DAppId;","SELECT DApps.DAppName, Developers.DeveloperName FROM DApps INNER JOIN Developers ON DApps.DeveloperId = Developers.DeveloperId WHERE Developers.Country = 'USA';",0 Which player had an opponent of Blackburn Rovers?,"CREATE TABLE table_24765815_1 (player VARCHAR, opponent VARCHAR);","SELECT player FROM table_24765815_1 WHERE opponent = ""Blackburn Rovers"";","SELECT player FROM table_24765815_1 WHERE opponent = ""Blackburn Rovers"";",1 "Which situation has an original u.s. airdate of December 5, 2007?","CREATE TABLE table_14570857_1 (situation VARCHAR, original_us_airdate VARCHAR);","SELECT situation FROM table_14570857_1 WHERE original_us_airdate = ""December 5, 2007"";","SELECT situation FROM table_14570857_1 WHERE original_us_airdate = ""December 5, 2007"";",1 What MLB Drafts have the position pitcher/infielder? ,"CREATE TABLE table_11677100_16 (mlb_draft VARCHAR, position VARCHAR);","SELECT mlb_draft FROM table_11677100_16 WHERE position = ""Pitcher/Infielder"";","SELECT mlb_draft FROM table_11677100_16 WHERE position = ""Pitcher/Infielder"";",1 What's the average donation amount for each program category?,"CREATE TABLE ProgramCategories (CategoryID INT, Category VARCHAR(20)); CREATE TABLE Programs (ProgramID INT, CategoryID INT, ProgramName VARCHAR(50)); CREATE TABLE Donations (DonationID INT, ProgramID INT, DonationAmount DECIMAL(10,2)); ","SELECT pc.Category, AVG(d.DonationAmount) AS AverageDonationAmount FROM ProgramCategories pc JOIN Programs p ON pc.CategoryID = p.CategoryID JOIN Donations d ON p.ProgramID = d.ProgramID GROUP BY pc.Category;","SELECT ProgramCategories.Category, AVG(Donations.DonationAmount) as AvgDonationAmount FROM ProgramCategories INNER JOIN Programs ON ProgramCategories.CategoryID = Programs.CategoryID INNER JOIN Donations ON ProgramCategories.CategoryID = Donations.ProgramID GROUP BY ProgramCategories.Category;",0 "What is the maximum biosensor reading per sensor type and per day, ordered by day?","CREATE SCHEMA if not exists biosensors;CREATE TABLE if not exists biosensors.readings (id INT PRIMARY KEY, sensor_id INT, sensor_type VARCHAR(50), reading DECIMAL(10, 2), read_date DATE); ","SELECT sensor_type, MAX(reading) AS max_reading, read_date FROM biosensors.readings WINDOW W AS (PARTITION BY sensor_type, read_date ORDER BY reading ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) GROUP BY sensor_type, W.read_date ORDER BY read_date;","SELECT sensor_type, DATE_FORMAT(read_date, '%Y-%m') as day, MAX(reading) as max_reading FROM biosensors.readings GROUP BY sensor_type, day ORDER BY day;",0 "What is the minimum number of days taken to resolve cybersecurity incidents in Africa, grouped by severity level, for the year 2020?","CREATE TABLE CybersecurityIncidents (id INT, region VARCHAR(20), severity VARCHAR(10), resolution_date DATE, incident_date DATE); ","SELECT severity, MIN(DATEDIFF(resolution_date, incident_date)) as min_days_to_resolve FROM CybersecurityIncidents WHERE region = 'Africa' AND incident_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY severity;","SELECT severity, MIN(resolution_date) as min_days FROM CybersecurityIncidents WHERE region = 'Africa' AND YEAR(resolution_date) = 2020 GROUP BY severity;",0 What percentage of customers in Tokyo wear size XS?,"CREATE TABLE CUSTOMERS(city VARCHAR(20), size VARCHAR(5)); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM CUSTOMERS WHERE city = 'Tokyo')) FROM CUSTOMERS WHERE city = 'Tokyo' AND size = 'XS';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM CUSTOMERS WHERE city = 'Tokyo')) FROM CUSTOMERS WHERE city = 'Tokyo' AND size = 'XS';,1 Name the average year with Laps of 6,"CREATE TABLE table_name_11 (year INTEGER, laps VARCHAR);",SELECT AVG(year) FROM table_name_11 WHERE laps = 6;,SELECT AVG(year) FROM table_name_11 WHERE laps = 6;,1 How many cultural events took place in each city?,"CREATE TABLE CulturalEvents (id INT, city VARCHAR(50), date DATE); ","SELECT city, COUNT(*) FROM CulturalEvents GROUP BY city;","SELECT city, COUNT(*) FROM CulturalEvents GROUP BY city;",1 What was the location and attendance at the game where the final score is w 118-112?,"CREATE TABLE table_17382360_9 (location_attendance VARCHAR, score VARCHAR);","SELECT location_attendance FROM table_17382360_9 WHERE score = ""W 118-112"";","SELECT location_attendance FROM table_17382360_9 WHERE score = ""W 118-112"";",1 "What is the End of term of the President with an Age at inauguration of 78years, 160days?","CREATE TABLE table_name_89 (end_of_term VARCHAR, age_at_inauguration VARCHAR);","SELECT end_of_term FROM table_name_89 WHERE age_at_inauguration = ""78years, 160days"";","SELECT end_of_term FROM table_name_89 WHERE age_at_inauguration = ""78years, 160days"";",1 what is the result for 11 august 2010?,"CREATE TABLE table_name_94 (result VARCHAR, date VARCHAR);","SELECT result FROM table_name_94 WHERE date = ""11 august 2010"";","SELECT result FROM table_name_94 WHERE date = ""11 august 2010"";",1 What are the top 10 most common threat types in the last month?,"CREATE TABLE threat_occurrences (id INT, threat_type VARCHAR(50), occurrence_count INT, occurrence_date DATE);","SELECT threat_type, SUM(occurrence_count) as total_occurrences FROM threat_occurrences WHERE occurrence_date >= DATEADD(month, -1, GETDATE()) GROUP BY threat_type ORDER BY total_occurrences DESC LIMIT 10;","SELECT threat_type, COUNT(*) as occurrence_count FROM threat_occurrences WHERE occurrence_date >= DATEADD(month, -1, GETDATE()) GROUP BY threat_type ORDER BY occurrence_count DESC LIMIT 10;",0 "Identify the top 3 threat actors with the most successful attacks against financial institutions in the past year, along with the number of successful attacks.","CREATE TABLE threat_actors (id INT PRIMARY KEY, name VARCHAR(50), target_sector VARCHAR(50), success_count INT); ","SELECT name, success_count FROM threat_actors WHERE target_sector = 'Finance' ORDER BY success_count DESC LIMIT 3;","SELECT name, success_count FROM threat_actors WHERE target_sector = 'Financial Institutions' AND success_count >= (SELECT MAX(success_count) FROM threat_actors WHERE target_sector = 'Financial Institutions') AND success_count >= (SELECT MAX(success_count) FROM threat_actors WHERE target_sector = 'Financial Institutions') AND success_count >= (SELECT MAX(success_count) FROM threat_actors WHERE target_sector = 'Financial Institutions') GROUP BY name ORDER BY success_count DESC LIMIT 3;",0 "On average, how many Starts have Wins that are smaller than 0?","CREATE TABLE table_name_86 (starts INTEGER, wins INTEGER);",SELECT AVG(starts) FROM table_name_86 WHERE wins < 0;,SELECT AVG(starts) FROM table_name_86 WHERE wins 0;,0 What is the average monthly data usage for the top 10% of customers in each country?,"CREATE TABLE data_usage (customer_id INT, data_usage_bytes BIGINT, country VARCHAR(50), usage_date DATE); ","SELECT country, NTILE(100) OVER (PARTITION BY country ORDER BY data_usage_bytes DESC) as tier, AVG(data_usage_bytes) as avg_data_usage FROM data_usage GROUP BY country, tier HAVING tier <= 10;","SELECT country, AVG(data_usage_bytes) as avg_data_usage FROM data_usage GROUP BY country ORDER BY avg_data_usage DESC LIMIT 10;",0 "Which country is Pete Cooper, who made $816, from?","CREATE TABLE table_name_32 (country VARCHAR, money___$__ VARCHAR, player VARCHAR);","SELECT country FROM table_name_32 WHERE money___$__ = 816 AND player = ""pete cooper"";","SELECT country FROM table_name_32 WHERE money___$__ = ""$816"" AND player = ""pete cooper"";",0 Identify mines with labor productivity below the industry average,"CREATE TABLE mine (id INT, name TEXT, location TEXT, labor_productivity INT); CREATE TABLE industry_average (year INT, avg_labor_productivity INT); ","SELECT name, labor_productivity FROM mine WHERE labor_productivity < (SELECT avg_labor_productivity FROM industry_average WHERE year = 2022);",SELECT mine.name FROM mine INNER JOIN industry_average ON mine.location = industry_average.year WHERE industry_average.avg_labor_productivity (SELECT AVG(industry_average.avg_labor_productivity) FROM industry_average);,0 List military equipment types and their maintenance frequency for the Navy.,"CREATE TABLE equipment (equipment_id INT, equipment_type TEXT); CREATE TABLE maintenance (maintenance_id INT, equipment_id INT, last_maintenance_date DATE, next_maintenance_date DATE, servicing_branch TEXT); ","SELECT equipment_type, TIMESTAMPDIFF(MONTH, last_maintenance_date, next_maintenance_date) AS maintenance_frequency FROM equipment INNER JOIN maintenance ON equipment.equipment_id = maintenance.equipment_id WHERE servicing_branch = 'Navy';","SELECT equipment.equipment_type, maintenance.maintenance_frequency FROM equipment INNER JOIN maintenance ON equipment.equipment_id = maintenance.equipment_id WHERE maintenance.services_branch = 'Navy';",0 Compare the number of wells drilled in the USA and Canada.,"CREATE TABLE wells (well_id INT, country VARCHAR(50)); ","SELECT 'Canada' as country, COUNT(*) as num_wells FROM wells WHERE country = 'Canada' UNION ALL SELECT 'USA' as country, COUNT(*) as num_wells FROM wells WHERE country = 'USA';","SELECT COUNT(*) FROM wells WHERE country IN ('USA', 'Canada');",0 What is the total number of products that contain at least one ingredient sourced from a specific country for cruelty-free products in the database?,"CREATE TABLE Ingredient_Source_CF (id INT, product VARCHAR(255), ingredient VARCHAR(255), sourcing_country VARCHAR(255), cruelty_free BOOLEAN); ","SELECT sourcing_country, COUNT(DISTINCT product) as total_products FROM Ingredient_Source_CF WHERE cruelty_free = true GROUP BY sourcing_country HAVING COUNT(DISTINCT product) > 0;",SELECT COUNT(*) FROM Ingredient_Source_CF WHERE sourcing_country = 'USA' AND cruelty_free = true;,0 Who is the player with a t8 place and a 74-74-76-77=301 score?,"CREATE TABLE table_name_16 (player VARCHAR, place VARCHAR, score VARCHAR);","SELECT player FROM table_name_16 WHERE place = ""t8"" AND score = 74 - 74 - 76 - 77 = 301;","SELECT player FROM table_name_16 WHERE place = ""t8"" AND score = 74 - 74 - 76 - 77 = 301;",1 What is the average project timeline for sustainable building projects in the state of Washington?,"CREATE TABLE ProjectTimeline (ProjectID INT, State TEXT, Timeline INT); ",SELECT AVG(Timeline) FROM ProjectTimeline WHERE State = 'WA' AND ProjectID IN (SELECT ProjectID FROM SustainableProjects);,SELECT AVG(Timeline) FROM ProjectTimeline WHERE State = 'Washington';,0 Tell me the lowest ties played with a debut of 1936,"CREATE TABLE table_name_15 (ties_played INTEGER, debut VARCHAR);",SELECT MIN(ties_played) FROM table_name_15 WHERE debut = 1936;,"SELECT MIN(ties_played) FROM table_name_15 WHERE debut = ""1936"";",0 How many Rare earth elements were produced in 2018?,"CREATE TABLE RareEarthElements_Production (Year INT, Element VARCHAR(10), Quantity INT); ",SELECT SUM(Quantity) FROM RareEarthElements_Production WHERE Year = 2018;,SELECT SUM(Quantity) FROM RareEarthElements_Production WHERE Year = 2018;,1 Insert a new record into the 'habitat_preservation' table,"CREATE TABLE habitat_preservation (id INT PRIMARY KEY, location VARCHAR(50), size_acres FLOAT, preservation_status VARCHAR(50), protected_species VARCHAR(50));","INSERT INTO habitat_preservation (id, location, size_acres, preservation_status, protected_species) VALUES (1, 'Amazon Rainforest', 21000000.0, 'Vulnerable', 'Jaguar');","INSERT INTO habitat_preservation (id, location, size_acres, preservation_status, protected_species) VALUES (1, 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island'), (2, 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island'), (3, 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', 'Castle Island', '",0 What is the distribution of security incidents by type in the past month?,"CREATE TABLE incident_types (id INT, incident_type VARCHAR(50), incidents INT, timestamp TIMESTAMP); ","SELECT incident_type, SUM(incidents) as total_incidents FROM incident_types WHERE timestamp >= '2022-02-01' GROUP BY incident_type;","SELECT incident_type, COUNT(*) as incidents_count FROM incident_types WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY incident_type;",0 "Tell me what was commissioned december 30, 1965","CREATE TABLE table_name_12 (commissioned VARCHAR, launched VARCHAR);","SELECT commissioned FROM table_name_12 WHERE launched = ""december 30, 1965"";","SELECT commissioned FROM table_name_12 WHERE launched = ""december 30, 1965"";",1 What position does Neil Komadoski play?,"CREATE TABLE table_1213511_4 (position VARCHAR, player VARCHAR);","SELECT position FROM table_1213511_4 WHERE player = ""Neil Komadoski"";","SELECT position FROM table_1213511_4 WHERE player = ""Neil Komadoski"";",1 What is the total number of factories using sustainable materials in Germany?,"CREATE TABLE factories (id INT, name VARCHAR(50), location VARCHAR(50), sustainable_materials BOOLEAN); ",SELECT COUNT(*) FROM factories WHERE location = 'Germany' AND sustainable_materials = TRUE;,SELECT COUNT(*) FROM factories WHERE location = 'Germany' AND sustainable_materials = TRUE;,1 What is the cross-code debut later than 1958 for Dick Thornett?,"CREATE TABLE table_name_87 (cross_code_debut VARCHAR, year VARCHAR, player VARCHAR);","SELECT cross_code_debut FROM table_name_87 WHERE year > 1958 AND player = ""dick thornett"";","SELECT cross_code_debut FROM table_name_87 WHERE year > 1958 AND player = ""dick thornett"";",1 What was the total donation amount by organizations in India in Q3 2021?,"CREATE TABLE Donations (id INT, donor_name VARCHAR(255), donation_amount DECIMAL(10,2), donation_date DATE); ",SELECT SUM(donation_amount) FROM Donations WHERE donor_name LIKE '%India%' AND donation_date BETWEEN '2021-07-01' AND '2021-09-30';,SELECT SUM(donation_amount) FROM Donations WHERE donation_date BETWEEN '2021-04-01' AND '2021-06-30' AND country = 'India';,0 "What is the total quantity of garments sold by each store, sorted by the greatest total quantity?","CREATE TABLE Stores (StoreID INT, StoreName VARCHAR(50), City VARCHAR(50), Country VARCHAR(50)); CREATE TABLE Sales (SaleID INT, StoreID INT, ProductID INT, QuantitySold INT, SalesDate DATE); ","SELECT StoreID, SUM(QuantitySold) AS TotalQuantitySold FROM Sales GROUP BY StoreID ORDER BY TotalQuantitySold DESC;","SELECT s.StoreName, SUM(s.QuantitySold) as TotalQuantitySold FROM Stores s JOIN Sales s ON s.StoreID = s.StoreID GROUP BY s.StoreName ORDER BY TotalQuantitySold DESC;",0 What is the maximum year of conservation efforts in the 'conservation_efforts' table?,"CREATE TABLE conservation_efforts (effort_id INT, species_name VARCHAR(50), year INT, description TEXT); ",SELECT MAX(year) FROM conservation_efforts;,SELECT MAX(year) FROM conservation_efforts;,1 Find the total number of investment transactions for clients with high net worth in the last 6 months.,"CREATE TABLE clients (client_id INT, name VARCHAR(50), net_worth DECIMAL(15, 2)); CREATE TABLE transactions (transaction_id INT, client_id INT, transaction_type VARCHAR(50), transaction_date DATE); ","SELECT COUNT(*) FROM transactions WHERE transaction_type = 'Investment' AND client_id IN (SELECT client_id FROM clients WHERE net_worth > 500000.00) AND transaction_date >= DATE_SUB(NOW(), INTERVAL 6 MONTH);","SELECT COUNT(*) FROM transactions t JOIN clients c ON t.client_id = c.client_id WHERE c.net_worth > 100 AND t.transaction_date >= DATEADD(month, -6, GETDATE());",0 How many job applications were received for the Data Scientist position?,"CREATE TABLE Job_Applications (Application_ID INT, Applicant_Name VARCHAR(50), Job_Title VARCHAR(50), Application_Date DATE, Interview_Date DATE, Hired BOOLEAN); CREATE TABLE Jobs (Job_ID INT, Job_Title VARCHAR(50), Department VARCHAR(50), Location VARCHAR(50), Salary DECIMAL(10,2));",SELECT COUNT(*) as 'Number of Applications' FROM Job_Applications WHERE Job_Title = 'Data Scientist';,SELECT COUNT(*) FROM Job_Applications JOIN Jobs ON Job_Applications.Job_Title = Jobs.Job_Title WHERE Job_Title = 'Data Scientist';,0 How many Inhabitants were there after 2009 in the Municipality with a Party of union for trentino?,"CREATE TABLE table_name_7 (inhabitants INTEGER, party VARCHAR, election VARCHAR);","SELECT AVG(inhabitants) FROM table_name_7 WHERE party = ""union for trentino"" AND election > 2009;","SELECT SUM(inhabitants) FROM table_name_7 WHERE party = ""union for trentino"" AND election > 2009;",0 Which Power has Location in metro manila,"CREATE TABLE table_name_75 (power__kw_ VARCHAR, location VARCHAR);","SELECT power__kw_ FROM table_name_75 WHERE location = ""metro manila"";","SELECT power__kw_ FROM table_name_75 WHERE location = ""metro manila"";",1 What is the average labor cost for construction projects in Texas?,"CREATE TABLE Construction_Projects (id INT, project_name TEXT, state TEXT, labor_cost INT);",SELECT AVG(labor_cost) FROM Construction_Projects WHERE state = 'Texas';,SELECT AVG(labor_cost) FROM Construction_Projects WHERE state = 'Texas';,1 what are the seasons for no 3?,"CREATE TABLE table_23886181_1 (seasons VARCHAR, no VARCHAR);","SELECT seasons FROM table_23886181_1 WHERE no = ""3"";",SELECT seasons FROM table_23886181_1 WHERE no = 3;,0 What is the average carbon offset per project for renewable energy projects in the European Union?,"CREATE TABLE carbon_offsets (project_id INT, country_name VARCHAR(50), carbon_offset INT); CREATE TABLE eu_projects (project_id INT, project_name VARCHAR(100)); ","SELECT AVG(carbon_offset) FROM carbon_offsets JOIN eu_projects ON carbon_offsets.project_id = eu_projects.project_id WHERE country_name IN ('Germany', 'France', 'Spain');",SELECT AVG(carbon_offset) FROM carbon_offsets INNER JOIN eu_projects ON carbon_offsets.project_id = eu_projects.project_id;,0 What is the average rating of TV shows produced in Germany?,"CREATE TABLE tv_shows (title VARCHAR(255), rating FLOAT, production_country VARCHAR(64));",SELECT AVG(rating) FROM tv_shows WHERE production_country = 'Germany';,SELECT AVG(rating) FROM tv_shows WHERE production_country = 'Germany';,1 What is the age distribution of visitors to historical sites by region?,"CREATE TABLE HistoricalSites (id INT, name VARCHAR(50), region VARCHAR(50)); CREATE TABLE HistoricalSiteVisitors (id INT, site_id INT, age INT, gender VARCHAR(10), date DATE); ","SELECT region, AVG(age) as avg_age FROM HistoricalSiteVisitors h JOIN HistoricalSites s ON h.site_id = s.id GROUP BY region;","SELECT hs.region, COUNT(hv.age) as num_visitors FROM HistoricalSites hs JOIN HistoricalSiteVisitors hv ON hs.id = hv.site_id GROUP BY hs.region;",0 I want to know the highest rank with placings more than 123 and points greater than 88.06,"CREATE TABLE table_name_75 (rank INTEGER, placings VARCHAR, points VARCHAR);",SELECT MAX(rank) FROM table_name_75 WHERE placings > 123 AND points > 88.06;,SELECT MAX(rank) FROM table_name_75 WHERE placings > 123 AND points > 88.06;,1 List the top 3 countries with the highest social impact investments in 2021?,"CREATE TABLE investments (id INT, year INT, country VARCHAR(50), amount FLOAT); ","SELECT country, SUM(amount) as total_investment FROM investments WHERE year = 2021 GROUP BY country ORDER BY total_investment DESC LIMIT 3;","SELECT country, SUM(amount) as total_investments FROM investments WHERE year = 2021 GROUP BY country ORDER BY total_investments DESC LIMIT 3;",0 What To par scored 72-71-68=211?,"CREATE TABLE table_name_29 (to_par VARCHAR, score VARCHAR);",SELECT to_par FROM table_name_29 WHERE score = 72 - 71 - 68 = 211;,SELECT to_par FROM table_name_29 WHERE score = 72 - 71 - 68 = 211;,1 What is the maximum number of followers for users in 'LATAM' region?,"CREATE TABLE followers (id INT, user_id INT, follower_count INT); ",SELECT MAX(follower_count) FROM followers JOIN users ON followers.user_id = users.id WHERE users.region = 'LATAM';,SELECT MAX(follower_count) FROM followers WHERE user_id IN (SELECT user_id FROM users WHERE region = 'LATAM');,0 What was the average travel expenditure for US tourists visiting Costa Rica in 2019?,"CREATE TABLE tourists (id INT, country VARCHAR(255), destination VARCHAR(255), year INT, expenditure DECIMAL(10,2)); ",SELECT AVG(expenditure) FROM tourists WHERE country = 'USA' AND destination = 'Costa Rica' AND year = 2019;,SELECT AVG(expenditure) FROM tourists WHERE country = 'USA' AND destination = 'Costa Rica' AND year = 2019;,1 Find the top 3 cities with the highest total budget allocation for public services in the state of California.,"CREATE SCHEMA gov_data;CREATE TABLE gov_data.budget_allocation (city VARCHAR(20), state VARCHAR(20), budget INT); ","SELECT city, SUM(budget) as total_budget FROM gov_data.budget_allocation WHERE state = 'California' GROUP BY city ORDER BY total_budget DESC LIMIT 3;","SELECT city, SUM(budget) as total_budget FROM gov_data.budget_allocation WHERE state = 'California' GROUP BY city ORDER BY total_budget DESC LIMIT 3;",1 How many days on average does it take for a returned item to be restocked in the Tokyo warehouse?,"CREATE TABLE return_data (return_id INT, item_id INT, return_date DATE); CREATE TABLE restock_data (restock_id INT, item_id INT, restock_date DATE); ","SELECT AVG(DATEDIFF(day, return_date, restock_date)) FROM return_data JOIN restock_data ON return_data.item_id = restock_data.item_id WHERE restock_data.restock_location = 'Tokyo';","SELECT AVG(DATEDIFF(day, return_date, restock_date)) FROM return_data JOIN restock_data ON return_data.item_id = restock_data.item_id WHERE restock_data.restock_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) AND restock_data.restock_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) AND restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_data.restock_date;",0 What is the average labor cost for each type of construction work?,"CREATE TABLE Work_Type (id INT, type VARCHAR(20)); CREATE TABLE Labor (work_type_id INT, cost INT);","SELECT Work_Type.type, AVG(Labor.cost) AS avg_cost FROM Work_Type INNER JOIN Labor ON Work_Type.id = Labor.work_type_id GROUP BY Work_Type.type;","SELECT Work_Type.type, AVG(Labor.cost) FROM Work_Type INNER JOIN Labor ON Work_Type.id = Labor.work_type_id GROUP BY Work_Type.type;",0 On what day of January was the record 10-29-2?,"CREATE TABLE table_27539272_7 (january INTEGER, record VARCHAR);","SELECT MAX(january) FROM table_27539272_7 WHERE record = ""10-29-2"";","SELECT MAX(january) FROM table_27539272_7 WHERE record = ""10-29-2"";",1 "When Team 2 was USL Dunkerque (D2), what was the score","CREATE TABLE table_name_75 (score VARCHAR, team_2 VARCHAR);","SELECT score FROM table_name_75 WHERE team_2 = ""usl dunkerque (d2)"";","SELECT score FROM table_name_75 WHERE team_2 = ""usl dunkerque (d2)"";",1 What is the billing amount for cases grouped by attorney and case outcome?,"CREATE TABLE CaseBilling (CaseBillingID int, CaseID int, AttorneyID int, Amount decimal(10,2)); ","SELECT A.Name, C.Outcome, SUM(CB.Amount) as TotalBilling FROM CaseBilling CB JOIN Attorneys A ON CB.AttorneyID = A.AttorneyID JOIN Cases C ON CB.CaseID = C.CaseID GROUP BY A.Name, C.Outcome;","SELECT AttorneyID, Amount FROM CaseBilling GROUP BY AttorneyID, Amount;",0 The record of 9-4 was against which opponent?,"CREATE TABLE table_10361453_2 (opponent VARCHAR, record VARCHAR);","SELECT opponent FROM table_10361453_2 WHERE record = ""9-4"";","SELECT opponent FROM table_10361453_2 WHERE record = ""9-4"";",1 What was the result of Game 3 of this searson?,"CREATE TABLE table_name_95 (result VARCHAR, game VARCHAR);","SELECT result FROM table_name_95 WHERE game = ""game 3"";",SELECT result FROM table_name_95 WHERE game = 3;,0 Who was the winner for the Rome to Teramo course?,"CREATE TABLE table_name_97 (winner VARCHAR, course VARCHAR);","SELECT winner FROM table_name_97 WHERE course = ""rome to teramo"";","SELECT winner FROM table_name_97 WHERE course = ""rome to teramo"";",1 Show the details of all virtual tours in Japan and South Korea that are free of charge.,"CREATE TABLE virtual_tours (tour_id INT, tour_name TEXT, location TEXT, price DECIMAL(5,2)); ","SELECT * FROM virtual_tours WHERE location IN ('Japan', 'South Korea') AND price = 0;","SELECT tour_name, location, price FROM virtual_tours WHERE location IN ('Japan', 'South Korea') AND price IS NOT NULL;",0 What is the total number of tourists who visited Canada in 2021 and 2022?,"CREATE TABLE visitor_stats (country VARCHAR(20), visit_year INT); ",SELECT SUM(visits) FROM (SELECT COUNT(*) AS visits FROM visitor_stats WHERE country = 'Canada' AND visit_year = 2021 UNION ALL SELECT COUNT(*) FROM visitor_stats WHERE country = 'Canada' AND visit_year = 2022) AS subquery;,"SELECT COUNT(*) FROM visitor_stats WHERE country = 'Canada' AND visit_year IN (2021, 2022);",0 "During melbourne's home game, who was the away team?","CREATE TABLE table_name_51 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team FROM table_name_51 WHERE home_team = ""melbourne"";","SELECT away_team FROM table_name_51 WHERE home_team = ""melbourne"";",1 What is the maximum number of absences for a student in the mental health program in the past month?,"CREATE TABLE students (id INT, name VARCHAR(50), program VARCHAR(50), absences INT, last_visit DATE);","SELECT MAX(absences) FROM students WHERE program = 'mental health' AND last_visit >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH);","SELECT MAX(absences) FROM students WHERE program = 'Mental Health' AND last_visit >= DATEADD(month, -1, GETDATE());",0 When FA Cup Apps is 9 what is the smallest number of FA Cup Goals?,"CREATE TABLE table_10240125_1 (fa_cup_goals INTEGER, fa_cup_apps VARCHAR);",SELECT MIN(fa_cup_goals) FROM table_10240125_1 WHERE fa_cup_apps = 9;,SELECT MIN(fa_cup_goals) FROM table_10240125_1 WHERE fa_cup_apps = 9;,1 "Name the total number of Round in liverpool , england?","CREATE TABLE table_name_73 (round VARCHAR, location VARCHAR);","SELECT COUNT(round) FROM table_name_73 WHERE location = ""liverpool , england"";","SELECT COUNT(round) FROM table_name_73 WHERE location = ""liverpool, england"";",0 What is McMaster College's pick number?,"CREATE TABLE table_10960039_1 (pick__number INTEGER, college VARCHAR);","SELECT MIN(pick__number) FROM table_10960039_1 WHERE college = ""McMaster"";","SELECT MAX(pick__number) FROM table_10960039_1 WHERE college = ""McMaster College"";",0 What is the average speed of shared electric scooters in San Francisco?,"CREATE TABLE shared_scooters (id INT, make VARCHAR(255), model VARCHAR(255), battery_level INT, speed FLOAT, city VARCHAR(255)); ",SELECT AVG(speed) FROM shared_scooters WHERE city = 'San Francisco';,SELECT AVG(speed) FROM shared_scooters WHERE city = 'San Francisco';,1 Drop the space_debris table,"CREATE TABLE space_debris (id INT PRIMARY KEY, debris_name VARCHAR(100), launch_date DATE, type VARCHAR(50));",DROP TABLE space_debris;,DROP TABLE space_debris;,1 What is the total number of medals when there are 18 gold medals?,"CREATE TABLE table_name_83 (total INTEGER, gold VARCHAR);",SELECT SUM(total) FROM table_name_83 WHERE gold = 18;,SELECT SUM(total) FROM table_name_83 WHERE gold = 18;,1 What is the total installed capacity (in MW) for all wind projects in the 'renewable_projects' table?,"CREATE TABLE renewable_projects (project_id INT, project_name VARCHAR(100), project_type VARCHAR(50), installed_capacity FLOAT); ",SELECT SUM(installed_capacity) FROM renewable_projects WHERE project_type = 'Wind';,SELECT SUM(installed_capacity) FROM renewable_projects WHERE project_type = 'Wind';,1 What are the explainable AI techniques used in AI applications for healthcare?,"CREATE TABLE if not exists eai_techniques (technique_id INT PRIMARY KEY, name TEXT); CREATE TABLE if not exists ai_applications (app_id INT PRIMARY KEY, name TEXT, technique_id INT, industry TEXT); ",SELECT DISTINCT eai_techniques.name FROM eai_techniques JOIN ai_applications ON eai_techniques.technique_id = ai_applications.technique_id WHERE ai_applications.industry = 'Healthcare';,SELECT eai_techniques.name FROM eai_techniques INNER JOIN ai_applications ON eai_techniques.technique_id = ai_applications.technique_id WHERE ai_applications.industry = 'Healthcare';,0 What is the average number of hours spent on mental health support sessions per student in each department?,"CREATE TABLE departments (department_id INT, department_name TEXT); CREATE TABLE teachers (teacher_id INT, teacher_name TEXT, department_id INT); CREATE TABLE sessions (session_id INT, teacher_id INT, student_id INT, session_date DATE, support_type TEXT, hours_spent INT); ","SELECT d.department_name, AVG(s.hours_spent) FROM departments d INNER JOIN teachers t ON d.department_id = t.department_id INNER JOIN sessions s ON t.teacher_id = s.teacher_id WHERE s.support_type = 'mental health' GROUP BY d.department_id;","SELECT d.department_name, AVG(s.hours_spent) as avg_hours_spent FROM departments d JOIN teachers t ON d.department_id = t.department_id JOIN sessions s ON t.teacher_id = s.teacher_id GROUP BY d.department_name;",0 Delete records of waste generation in Miami in 2021,"CREATE TABLE waste_generation (year INT, location VARCHAR(255), material VARCHAR(255), weight_tons INT); ",DELETE FROM waste_generation WHERE year = 2021 AND location = 'Miami';,DELETE FROM waste_generation WHERE location = 'Miami' AND year = 2021;,0 How many streams were there for the Reggae genre in 2020?,"CREATE TABLE music_streams (stream_id INT, genre VARCHAR(10), year INT, streams INT); CREATE VIEW genre_streams AS SELECT genre, SUM(streams) as total_streams FROM music_streams GROUP BY genre;",SELECT total_streams FROM genre_streams WHERE genre = 'Reggae' AND year = 2020;,SELECT SUM(total_streams) FROM genre_streams WHERE genre = 'Reggae' AND year = 2020;,0 Who was the opponent for game 73?,"CREATE TABLE table_name_10 (opponent VARCHAR, game VARCHAR);","SELECT opponent FROM table_name_10 WHERE game = ""73"";",SELECT opponent FROM table_name_10 WHERE game = 73;,0 How many containers were shipped from the Port of Singapore to India in Q2 of 2020?,"CREATE TABLE ports (port_id INT, port_name TEXT, country TEXT);CREATE TABLE shipments (shipment_id INT, shipment_weight INT, ship_date DATE, port_id INT); ",SELECT COUNT(*) FROM shipments JOIN ports ON shipments.port_id = ports.port_id WHERE ports.country = 'India' AND ports.port_name = 'Port of Mumbai' AND ship_date BETWEEN '2020-04-01' AND '2020-06-30';,SELECT COUNT(*) FROM shipments JOIN ports ON shipments.port_id = ports.port_id WHERE ports.port_name = 'Port of Singapore' AND ports.country = 'India' AND ship_date BETWEEN '2020-04-01' AND '2020-06-30';,0 What is the average number of subway routes per region?,"CREATE TABLE subway_routes (region VARCHAR(10), num_routes INT); ",SELECT AVG(num_routes) FROM subway_routes;,"SELECT region, AVG(num_routes) FROM subway_routes GROUP BY region;",0 Calculate the average donation amount and average number of volunteers per month in the year 2018.,"CREATE TABLE Donors (DonorID INT, DonorName TEXT, VolunteerID INT); CREATE TABLE Donations (DonationID INT, DonorID INT, DonationDate DATE, DonationAmount DECIMAL);","SELECT AVG(D.DonationAmount) as AvgDonation, AVG(COUNT(DISTINCT DON.VolunteerID)) as AvgVolunteers FROM Donors D JOIN Donations DON ON D.DonorID = DON.DonorID WHERE YEAR(DonationDate) = 2018 GROUP BY EXTRACT(MONTH FROM DonationDate);","SELECT EXTRACT(MONTH FROM DonationDate) AS Month, AVG(DonationAmount) AS AvgDonation, COUNT(DISTINCT VolunteerID) AS AvgVolunteers FROM Donations JOIN Donors ON Donations.DonorID = Donors.DonorID WHERE YEAR(DonationDate) = 2018 GROUP BY Month;",0 Name the total number of laps for 23rd position,"CREATE TABLE table_name_17 (laps VARCHAR, pos VARCHAR);","SELECT COUNT(laps) FROM table_name_17 WHERE pos = ""23rd"";","SELECT COUNT(laps) FROM table_name_17 WHERE pos = ""23rd"";",1 What is the average risk assessment for policies in 'New Mexico' and 'Oklahoma' by 'Global' teams?,"CREATE TABLE UnderwritingData (PolicyID INT, Team VARCHAR(20), RiskAssessment DECIMAL(5,2), State VARCHAR(20)); ","SELECT Team, AVG(RiskAssessment) FROM UnderwritingData WHERE State IN ('New Mexico', 'Oklahoma') AND Team LIKE 'Global%' GROUP BY Team;","SELECT AVG(RiskAssessment) FROM UnderwritingData WHERE Team IN ('Global', 'New Mexico') AND State IN ('New Mexico', 'Oklahoma');",0 What episode aired on 18 April 2007?,"CREATE TABLE table_10749367_3 (_number INTEGER, air_date VARCHAR);","SELECT MIN(_number) FROM table_10749367_3 WHERE air_date = ""18 April 2007"";","SELECT MAX(_number) FROM table_10749367_3 WHERE air_date = ""18 April 2007"";",0 How many picks did Central State have before round 2?,"CREATE TABLE table_name_29 (pick VARCHAR, school VARCHAR, round VARCHAR);","SELECT COUNT(pick) FROM table_name_29 WHERE school = ""central state"" AND round < 2;","SELECT COUNT(pick) FROM table_name_29 WHERE school = ""central state"" AND round 2;",0 List all timber production facilities in the state of Oregon and their respective production capacities in cubic meters.,"CREATE TABLE facilities_or (id INT, name VARCHAR(50), state VARCHAR(50), capacity FLOAT); ","SELECT f.name, f.capacity FROM facilities_or f WHERE f.state = 'Oregon';","SELECT name, capacity FROM facilities_or WHERE state = 'Oregon';",0 What is the total revenue of accessible technology products in Africa?,"CREATE TABLE Revenue (id INT, product VARCHAR(50), revenue DECIMAL(5,2), country VARCHAR(50)); ","SELECT SUM(revenue) FROM Revenue WHERE country IN ('Kenya', 'Nigeria', 'South Africa') AND product LIKE '%accessible%';",SELECT SUM(revenue) FROM Revenue WHERE product LIKE '%accessible%' AND country = 'Africa';,0 Who are the top 3 actors with the highest number of movies in the 'Sci-Fi' genre?,"CREATE TABLE movies (id INT, title VARCHAR(100), genre VARCHAR(50), release_year INT, actor_id INT); ","SELECT actor_id, COUNT(*) AS num_movies FROM movies WHERE genre = 'Sci-Fi' GROUP BY actor_id ORDER BY num_movies DESC LIMIT 3;","SELECT actor_id, COUNT(*) as movie_count FROM movies WHERE genre = 'Sci-Fi' GROUP BY actor_id ORDER BY movie_count DESC LIMIT 3;",0 Delete the workout_equipment table,"CREATE TABLE workout_equipment (id INT, member_id INT, equipment_name VARCHAR(50));",DROP TABLE workout_equipment;,DELETE FROM workout_equipment;,0 What was the lowest squad with 0 goals?,"CREATE TABLE table_name_81 (squad_no INTEGER, goals INTEGER);",SELECT MIN(squad_no) FROM table_name_81 WHERE goals < 0;,SELECT MIN(squad_no) FROM table_name_81 WHERE goals 0;,0 What is the total amount of funding allocated to minority-owned businesses in the Technology sector?,"CREATE TABLE businesses (id INT, name TEXT, industry TEXT, ownership TEXT, funding FLOAT); ",SELECT SUM(funding) FROM businesses WHERE industry = 'Technology' AND ownership = 'Minority';,SELECT SUM(funding) FROM businesses WHERE industry = 'Technology' AND ownership = 'Minority';,1 What is the total billing amount for cases handled by attorneys who have been with their law firm for less than 3 years and have a win rate of at least 50%?,"CREATE TABLE attorneys (attorney_id INT, name VARCHAR(50), law_firm VARCHAR(50), joined_date DATE, win_rate DECIMAL(5, 2)); CREATE TABLE cases (case_id INT, attorney_id INT, billing_amount DECIMAL(10, 2), case_outcome VARCHAR(10)); ","SELECT SUM(billing_amount) FROM cases JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.joined_date > DATE_SUB(CURDATE(), INTERVAL 3 YEAR) AND attorneys.win_rate >= 0.5;","SELECT SUM(cases.billing_amount) FROM cases INNER JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.law_firm = 'Law' AND attorneys.joined_date DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR) AND attorneys.win_rate >= 50;",0 "What is the total cost of sustainable construction materials used in Illinois, grouped by material type?","CREATE TABLE material_costs (material_id INT, state VARCHAR(2), material_type VARCHAR(20), cost DECIMAL(5,2)); ","SELECT material_type, SUM(cost) FROM material_costs WHERE state = 'IL' GROUP BY material_type;","SELECT material_type, SUM(cost) FROM material_costs WHERE state = 'Illinois' GROUP BY material_type;",0 How many peacekeeping operations were conducted by each region in 2021?,"CREATE TABLE peacekeeping_operations (region VARCHAR(255), operation_name VARCHAR(255), year INT); ","SELECT region, COUNT(operation_name) FROM peacekeeping_operations WHERE year = 2021 GROUP BY region;","SELECT region, COUNT(*) FROM peacekeeping_operations WHERE year = 2021 GROUP BY region;",0 What is the Sign-in/Bicker at wash50 on washington rd?,"CREATE TABLE table_name_27 (sign_in_bicker VARCHAR, location VARCHAR);","SELECT sign_in_bicker FROM table_name_27 WHERE location = ""wash50 on washington rd"";","SELECT sign_in_bicker FROM table_name_27 WHERE location = ""wash50 on washington rd"";",1 What are the total number of transactions for each decentralized application in 'Q3 2022'?,"CREATE TABLE decentralized_apps (id INT, name TEXT, transactions INT); CREATE TABLE dates (date DATE, quarter TEXT, year INT); ","SELECT decentralized_apps.name, SUM(decentralized_apps.transactions) AS total_transactions FROM decentralized_apps INNER JOIN dates ON decentralized_apps.id = dates.date WHERE dates.quarter = 'Q3' AND dates.year = 2022 GROUP BY decentralized_apps.name;","SELECT decentralized_apps.name, SUM(decentralized_apps.transactions) as total_transactions FROM decentralized_apps INNER JOIN dates ON decentralized_apps.id = dates.id WHERE dates.quarter = 'Q3' AND dates.year = 2022 GROUP BY decentralized_apps.name;",0 Partner Aurelija Misevičiūtė had an outcome of runner-up in what tournament?,"CREATE TABLE table_name_82 (tournament VARCHAR, outcome VARCHAR, partner VARCHAR);","SELECT tournament FROM table_name_82 WHERE outcome = ""runner-up"" AND partner = ""aurelija misevičiūtė"";","SELECT tournament FROM table_name_82 WHERE outcome = ""runner-up"" AND partner = ""aurelija miseviit"";",0 What is the maximum depth of the deepest marine trench in each ocean?,"CREATE TABLE marine_trenches (ocean TEXT, trench TEXT, max_depth INTEGER);","SELECT ocean, MAX(max_depth) FROM marine_trenches GROUP BY ocean;","SELECT ocean, MAX(max_depth) FROM marine_trenches GROUP BY ocean;",1 "Which Week has an Air Date of august 2, 2008?","CREATE TABLE table_name_62 (week VARCHAR, air_date VARCHAR);","SELECT week FROM table_name_62 WHERE air_date = ""august 2, 2008"";","SELECT week FROM table_name_62 WHERE air_date = ""august 2, 2008"";",1 Find the top 3 most visited cultural heritage sites in Mexico for 2023.,"CREATE TABLE site_visits (id INT, name TEXT, country TEXT, year INT, visitor_count INT); ","SELECT name, visitor_count FROM (SELECT name, visitor_count, ROW_NUMBER() OVER (ORDER BY visitor_count DESC) AS rank FROM site_visits WHERE country = 'Mexico' AND year = 2023) AS ranked_sites WHERE rank <= 3;","SELECT name, visitor_count FROM site_visits WHERE country = 'Mexico' AND year = 2023 ORDER BY visitor_count DESC LIMIT 3;",0 Delete records of defense diplomacy events with a specific event_type in the defense_diplomacy table.,"CREATE TABLE defense_diplomacy (id INT PRIMARY KEY, event_name VARCHAR(50), event_type VARCHAR(50), country VARCHAR(50)); ",WITH del_data AS (DELETE FROM defense_diplomacy WHERE event_type = 'Training' RETURNING *) DELETE FROM defense_diplomacy WHERE id IN (SELECT id FROM del_data);,DELETE FROM defense_diplomacy WHERE event_type = 'Event';,0 "Which stadium is located in Adelaide, South Australia? ","CREATE TABLE table_28885977_1 (stadium VARCHAR, location VARCHAR);","SELECT stadium FROM table_28885977_1 WHERE location = ""Adelaide, South Australia"";","SELECT stadium FROM table_28885977_1 WHERE location = ""Adelaide, South Australia"";",1 What are the waste generation metrics for the newest eco-districts?,"CREATE TABLE eco_districts(district_name TEXT, created_at DATE); CREATE TABLE district_waste(district_name TEXT, total_waste_gen FLOAT); ","SELECT district_name, total_waste_gen FROM district_waste INNER JOIN eco_districts ON district_waste.district_name = eco_districts.district_name ORDER BY created_at DESC;","SELECT e.district_name, SUM(dw.total_waste_gen) as total_waste_gen FROM eco_districts e JOIN district_waste dw ON e.district_name = dw.district_name GROUP BY e.district_name ORDER BY total_waste_gen DESC LIMIT 1;",0 "What are the total sales for each drug in the 'drugs' table, grouped by drug name, including drugs with no sales?","CREATE TABLE drugs (drug_id INT, drug_name TEXT, sales INT); ","SELECT d.drug_name, COALESCE(SUM(s.sales), 0) AS total_sales FROM drugs d LEFT JOIN sales s ON d.drug_id = s.drug_id GROUP BY d.drug_name;","SELECT drug_name, SUM(sales) FROM drugs GROUP BY drug_name;",0 When was petter ronnquist picked?,"CREATE TABLE table_name_49 (overall VARCHAR, player VARCHAR);","SELECT overall FROM table_name_49 WHERE player = ""petter ronnquist"";","SELECT overall FROM table_name_49 WHERE player = ""petter ronnquist"";",1 List all unique job titles and their corresponding departments.,"CREATE TABLE Employees (Employee_ID INT, First_Name VARCHAR(50), Last_Name VARCHAR(50), Department VARCHAR(50), Job_Title VARCHAR(50)); ","SELECT DISTINCT Job_Title, Department FROM Employees","SELECT DISTINCT Job_Title, Department FROM Employees;",0 How many clinical trials were conducted in Canada between 2018 and 2020?,"CREATE TABLE clinical_trials (country VARCHAR(255), year INT); ",SELECT COUNT(*) as total_trials FROM clinical_trials WHERE country = 'Canada' AND year BETWEEN 2018 AND 2020;,SELECT COUNT(*) FROM clinical_trials WHERE country = 'Canada' AND year BETWEEN 2018 AND 2020;,0 How many fb players were drafted?,"CREATE TABLE table_10960039_6 (pick__number VARCHAR, position VARCHAR);","SELECT COUNT(pick__number) FROM table_10960039_6 WHERE position = ""FB"";","SELECT COUNT(pick__number) FROM table_10960039_6 WHERE position = ""FB"";",1 "List the names and regions of all rural infrastructure projects with budgets over $500,000 in the 'infrastructure' schema.","CREATE SCHEMA infrastructure; CREATE TABLE projects (project_id INT, name VARCHAR(50), region VARCHAR(50), budget INT); ","SELECT name, region FROM infrastructure.projects WHERE budget > 500000;","SELECT name, region FROM infrastructure.projects WHERE budget > 500000;",1 Tell me the wkts for econ of 4.23,"CREATE TABLE table_name_13 (wkts VARCHAR, econ VARCHAR);","SELECT wkts FROM table_name_13 WHERE econ = ""4.23"";","SELECT wkts FROM table_name_13 WHERE econ = ""4.23"";",1 How many electric vehicle charging stations were installed in the city of Toronto between 2018 and 2020?,"CREATE TABLE ev_charging_stations (id INT, name VARCHAR(255), city VARCHAR(255), installation_date DATE, number_of_chargers INT);",SELECT COUNT(*) AS total_stations FROM ev_charging_stations WHERE city = 'Toronto' AND YEAR(installation_date) BETWEEN 2018 AND 2020;,SELECT COUNT(*) FROM ev_charging_stations WHERE city = 'Toronto' AND installation_date BETWEEN '2018-01-01' AND '2020-12-31';,0 What is the distribution of token holdings for the smart contract with the address '0xAbCdEfGhIjKlMnOpQrStUvWxYz01' on the Ethereum blockchain?,"CREATE TABLE ether_tokens (token_id INT, contract_address VARCHAR(42), holder_address VARCHAR(42), balance INT);","SELECT holder_address, SUM(balance) FROM ether_tokens WHERE contract_address = '0xAbCdEfGhIjKlMnOpQrStUvWxYz01' GROUP BY holder_address ORDER BY SUM(balance) DESC;",SELECT COUNT(*) FROM ether_tokens WHERE contract_address = '0xAbCdEfGhIjKlMnOpQrStUvWxYz01';,0 When did the episode with production code 410 air?,"CREATE TABLE table_11630008_6 (original_air_date VARCHAR, production_code VARCHAR);",SELECT original_air_date FROM table_11630008_6 WHERE production_code = 410;,SELECT original_air_date FROM table_11630008_6 WHERE production_code = 410;,1 What is the total billing amount for cases handled by attorneys in the 'Boston' region?,"CREATE TABLE attorneys (id INT, name TEXT, region TEXT); CREATE TABLE cases (id INT, attorney_id INT, billing_amount INT); ",SELECT SUM(billing_amount) FROM cases INNER JOIN attorneys ON cases.attorney_id = attorneys.id WHERE attorneys.region = 'Boston';,SELECT SUM(billing_amount) FROM cases JOIN attorneys ON cases.attorney_id = attorneys.id WHERE attorneys.region = 'Boston';,0 Add a new court named 'High Court of New Zealand' located in 'Wellington',"CREATE TABLE courts (id INT, name VARCHAR(50), location VARCHAR(50));","INSERT INTO courts (id, name, location) VALUES (3, 'High Court of New Zealand', 'Wellington');","INSERT INTO courts (name, location) VALUES ('High Court of New Zealand', 'Wellington');",0 What is the total transaction fee for all gold transactions?,"CREATE TABLE transactions (transaction_id INT, transaction_type VARCHAR(20), transaction_fee DECIMAL(10,2)); ",SELECT SUM(transaction_fee) FROM transactions WHERE transaction_type = 'Gold';,SELECT SUM(transaction_fee) FROM transactions WHERE transaction_type = 'Gold';,1 How many autonomous driving research papers were published in each year?,"CREATE TABLE ResearchPaperYears (Paper VARCHAR(255), Published DATE); ","SELECT YEAR(Published) AS Year, COUNT(*) AS Count FROM ResearchPaperYears GROUP BY Year;","SELECT Year, COUNT(*) FROM ResearchPaperYears GROUP BY Year;",0 How many military equipment maintenance requests have been submitted by each country in the past month?,"CREATE TABLE maintenance_requests (mr_id INT, mr_equipment VARCHAR(50), mr_country VARCHAR(50), mr_date DATE); ","SELECT mr_country, COUNT(*) FROM maintenance_requests WHERE mr_date BETWEEN DATEADD(month, -1, GETDATE()) AND GETDATE() GROUP BY mr_country;","SELECT mr_country, COUNT(*) FROM maintenance_requests WHERE mr_date >= DATEADD(month, -1, GETDATE()) GROUP BY mr_country;",0 "Which Total has a Nation of japan, and a Silver larger than 2?","CREATE TABLE table_name_55 (total INTEGER, nation VARCHAR, silver VARCHAR);","SELECT MIN(total) FROM table_name_55 WHERE nation = ""japan"" AND silver > 2;","SELECT SUM(total) FROM table_name_55 WHERE nation = ""japan"" AND silver > 2;",0 "What is the average yield of crops for each farm type, ranked by the highest average yield?","CREATE TABLE Farm (FarmID int, FarmType varchar(20), Yield int); ","SELECT FarmType, AVG(Yield) as AvgYield FROM Farm GROUP BY FarmType ORDER BY AvgYield DESC;","SELECT FarmType, AVG(Yield) as AvgYield FROM Farm GROUP BY FarmType ORDER BY AvgYield DESC;",1 List the fields that were put into production in 2020,"CREATE TABLE field_start_date (field VARCHAR(50), start_date DATE); ",SELECT field FROM field_start_date WHERE YEAR(start_date) = 2020;,SELECT field FROM field_start_date WHERE start_date BETWEEN '2020-01-01' AND '2020-12-31';,0 Which smart contracts have been deployed on the 'Tezos' network with more than 5000 transactions?,"CREATE TABLE tezos_contracts (contract_id INT, contract_address VARCHAR(40), network VARCHAR(10)); CREATE TABLE contract_transactions (transaction_id INT, contract_id INT, block_number INT); ","SELECT c.contract_address, COUNT(t.transaction_id) as transaction_count FROM tezos_contracts c JOIN contract_transactions t ON c.contract_id = t.contract_id WHERE c.network = 'Tezos' GROUP BY c.contract_address HAVING transaction_count > 5000;",SELECT tezos_contracts.contract_address FROM tezos_contracts INNER JOIN contract_transactions ON tezos_contracts.contract_id = contract_transactions.contract_id WHERE tezos_contracts.network = 'Tezos' AND contract_transactions.block_number > 5000;,0 What time did the game start during week 1?,"CREATE TABLE table_name_9 (time___et__ VARCHAR, week VARCHAR);",SELECT time___et__ FROM table_name_9 WHERE week = 1;,SELECT time___et__ FROM table_name_9 WHERE week = 1;,1 Delete menu items that were not sold in any restaurant in the state of California during the month of August 2021.,"CREATE TABLE Restaurants (RestaurantID int, Name varchar(50), Location varchar(50)); CREATE TABLE Menu (MenuID int, ItemName varchar(50), Category varchar(50)); CREATE TABLE MenuSales (MenuID int, RestaurantID int, QuantitySold int, Revenue decimal(5,2), SaleDate date);",DELETE M FROM Menu M LEFT JOIN MenuSales MS ON M.MenuID = MS.MenuID WHERE MS.MenuID IS NULL AND M.Location LIKE '%California%' AND MS.SaleDate >= '2021-08-01' AND MS.SaleDate <= '2021-08-31';,DELETE FROM Menu WHERE NOT RestaurantID IN (SELECT RestaurantID FROM Restaurants WHERE Location = 'California') AND SaleDate BETWEEN '2021-08-01' AND '2021-08-30';,0 Name the indianapolis concerts for les minski,"CREATE TABLE table_17085724_1 (indianapolis_concerts VARCHAR, sarasota VARCHAR);","SELECT indianapolis_concerts FROM table_17085724_1 WHERE sarasota = ""Les Minski"";","SELECT indianapolis_concerts FROM table_17085724_1 WHERE sarasota = ""Les Minski"";",1 List all cities with their total attendance and average attendance per event,"CREATE TABLE events (event_id INT, event_name VARCHAR(50), city VARCHAR(30), attendance INT); ","SELECT city, SUM(attendance) as total_attendance, AVG(attendance) as avg_attendance_per_event FROM events GROUP BY city;","SELECT city, SUM(attendance) as total_attendance, AVG(attendance) as avg_attendance FROM events GROUP BY city;",0 What game has a 6-12-8 record?,"CREATE TABLE table_name_65 (game VARCHAR, record VARCHAR);","SELECT game FROM table_name_65 WHERE record = ""6-12-8"";","SELECT game FROM table_name_65 WHERE record = ""6-12-8"";",1 What round was Nick Gillis?,"CREATE TABLE table_name_32 (round VARCHAR, player VARCHAR);","SELECT round FROM table_name_32 WHERE player = ""nick gillis"";","SELECT round FROM table_name_32 WHERE player = ""nick gillis"";",1 who is the the mens doubles with mens singles being jürgen koch and womens singles being sabine ploner,"CREATE TABLE table_15002265_1 (mens_doubles VARCHAR, mens_singles VARCHAR, womens_singles VARCHAR);","SELECT mens_doubles FROM table_15002265_1 WHERE mens_singles = ""Jürgen Koch"" AND womens_singles = ""Sabine Ploner"";","SELECT mens_doubles FROM table_15002265_1 WHERE mens_singles = ""Jürgen Koch"" AND womens_singles = ""Sabine Plotner"";",0 What's the highest Year with the Record of 18-12?,"CREATE TABLE table_name_23 (year INTEGER, record VARCHAR);","SELECT MAX(year) FROM table_name_23 WHERE record = ""18-12"";","SELECT MAX(year) FROM table_name_23 WHERE record = ""18-12"";",1 How many fatalities does Italy have?,"CREATE TABLE table_name_50 (fatalities VARCHAR, country VARCHAR);","SELECT fatalities FROM table_name_50 WHERE country = ""italy"";","SELECT fatalities FROM table_name_50 WHERE country = ""italy"";",1 What's the average ESG rating for companies in the 'technology' sector?,"CREATE TABLE companies (id INT, sector VARCHAR(20), ESG_rating INT); ",SELECT AVG(ESG_rating) FROM companies WHERE sector = 'technology';,SELECT AVG(ESG_rating) FROM companies WHERE sector = 'technology';,1 Who's the incumbent in Florida 6?,"CREATE TABLE table_1341453_11 (incumbent VARCHAR, district VARCHAR);","SELECT incumbent FROM table_1341453_11 WHERE district = ""Florida 6"";","SELECT incumbent FROM table_1341453_11 WHERE district = ""Florida 6"";",1 Name the average apps for smederevo,"CREATE TABLE table_name_73 (apps INTEGER, team VARCHAR);","SELECT AVG(apps) FROM table_name_73 WHERE team = ""smederevo"";","SELECT AVG(apps) FROM table_name_73 WHERE team = ""smederevo"";",1 What is the minimum cost of healthcare services in rural areas of Montana?,"CREATE TABLE healthcare_services (id INT, name TEXT, state TEXT, location TEXT, cost FLOAT);",SELECT MIN(cost) FROM healthcare_services WHERE state = 'Montana' AND location = 'rural';,SELECT MIN(cost) FROM healthcare_services WHERE state = 'Montana' AND location = 'Rural';,0 What is the minimum rating for any documentary about climate change?,"CREATE TABLE climate_change_docs (id INT, title VARCHAR(255), rating FLOAT); ",SELECT MIN(rating) FROM climate_change_docs;,SELECT MIN(rating) FROM climate_change_docs;,1 Which game had a kickoff at 1:00 and a record of 3-7?,"CREATE TABLE table_name_53 (opponent VARCHAR, record VARCHAR, kickoff_ VARCHAR, a_ VARCHAR);","SELECT opponent FROM table_name_53 WHERE kickoff_[a_] = ""1:00"" AND record = ""3-7"";","SELECT opponent FROM table_name_53 WHERE kickoff__, a_ = ""1:00"" AND record = ""3-7"";",0 Add a new record for a staff member into the 'staff' table,"CREATE TABLE staff (id INT PRIMARY KEY, first_name VARCHAR(50), last_name VARCHAR(50), role VARCHAR(50), hire_date DATE);","INSERT INTO staff (id, first_name, last_name, role, hire_date) VALUES (1, 'John', 'Doe', 'Wildlife Biologist', '2020-01-01');","INSERT INTO staff (id, first_name, last_name, role, hire_date) VALUES (1, 'Jane', 'Jane', 'Jane', '2022-01-01');",0 Delete ingredients that make up less than 0.1% of the product.,"CREATE TABLE ingredients (id INT PRIMARY KEY, product_id INT, name VARCHAR(255), percentage DECIMAL(5,2)); CREATE VIEW ingredient_summary AS SELECT product_id, SUM(percentage) as total_percentage FROM ingredients GROUP BY product_id;",DELETE FROM ingredients WHERE percentage < 0.001;,DELETE FROM ingredient_summary WHERE total_percentage 0.1%;,0 Which materials are used by 'FairTradeFashions' but not by 'EcoFriendlyFashions'?,"CREATE TABLE SupplierMaterials (SupplierName TEXT, Material TEXT); ","SELECT s1.SupplierName, s1.Material FROM SupplierMaterials s1 LEFT JOIN SupplierMaterials s2 ON s1.Material = s2.Material AND s2.SupplierName = 'EcoFriendlyFashions' WHERE s2.SupplierName IS NULL AND s1.SupplierName = 'FairTradeFashions';",SELECT Material FROM SupplierMaterials WHERE SupplierName = 'FairTradeFashions' AND Material!= 'EcoFriendlyFashions';,0 What is number 4's title?,"CREATE TABLE table_name_36 (title VARCHAR, number VARCHAR);",SELECT title FROM table_name_36 WHERE number = 4;,SELECT title FROM table_name_36 WHERE number = 4;,1 What is the average rank of a player with fewer than 3 matches?,"CREATE TABLE table_name_38 (rank INTEGER, matches INTEGER);",SELECT AVG(rank) FROM table_name_38 WHERE matches < 3;,SELECT AVG(rank) FROM table_name_38 WHERE matches 3;,0 What is the total fish weight and growth rate for each species?,"CREATE TABLE Species_Growth (Species_Name TEXT, Year INT, Fish_Weight FLOAT, Growth_Rate FLOAT); ","SELECT Species_Name, SUM(Fish_Weight) OVER (PARTITION BY Species_Name) AS Total_Fish_Weight, Growth_Rate FROM Species_Growth;","SELECT Species_Name, SUM(Fish_Weight) as Total_Fish_Weight, SUM(Growth_Rate) as Total_Growth FROM Species_Growth GROUP BY Species_Name;",0 Update the number of employees for hotel with ID 105 to 25.,"CREATE TABLE hotels (hotel_id INT, name VARCHAR(50), number_of_employees INT); ",UPDATE hotels SET number_of_employees = 25 WHERE hotel_id = 105;,UPDATE hotels SET number_of_employees = 25 WHERE hotel_id = 105;,1 "For all directors who directed more than one movie, return the titles of all movies directed by them, along with the director name. Sort by director name, then movie title.","CREATE TABLE Movie (title VARCHAR, director VARCHAR); CREATE TABLE Movie (director VARCHAR, title VARCHAR);","SELECT T1.title, T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title ORDER BY T1.director, T1.title;","SELECT T1.title, T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director GROUP BY T1.director HAVING COUNT(*) > 1;",0 What engine scored 17 points?,"CREATE TABLE table_name_86 (engine VARCHAR, points VARCHAR);","SELECT engine FROM table_name_86 WHERE points = ""17"";",SELECT engine FROM table_name_86 WHERE points = 17;,0 "WHAT EPISODE HAS A REGION NUMBER BIGGER THAN 1, AND 32 DVDS?","CREATE TABLE table_name_58 (episode_no VARCHAR, region_no VARCHAR, no_of_dvds VARCHAR);","SELECT episode_no FROM table_name_58 WHERE region_no > 1 AND no_of_dvds = ""32"";",SELECT episode_no FROM table_name_58 WHERE region_no > 1 AND no_of_dvds = 32;,0 What is the count of soil moisture measurements in Argentina in the last month?,"CREATE TABLE if NOT EXISTS soil_moisture_measurements (id int, location varchar(50), moisture float, measurement_date datetime); ","SELECT COUNT(*) FROM soil_moisture_measurements WHERE location = 'Argentina' AND measurement_date >= DATE_SUB(NOW(), INTERVAL 1 MONTH);","SELECT COUNT(*) FROM soil_moisture_measurements WHERE location = 'Argentina' AND measurement_date >= DATEADD(month, -1, GETDATE());",0 What is the date of the match when Phoenix is the home team?,"CREATE TABLE table_name_75 (date VARCHAR, home VARCHAR);","SELECT date FROM table_name_75 WHERE home = ""phoenix"";","SELECT date FROM table_name_75 WHERE home = ""phoenix"";",1 What is the Margin of victory at the Bob Hope Desert Classic Tournament?,"CREATE TABLE table_name_54 (margin_of_victory VARCHAR, tournament VARCHAR);","SELECT margin_of_victory FROM table_name_54 WHERE tournament = ""bob hope desert classic"";","SELECT margin_of_victory FROM table_name_54 WHERE tournament = ""bob hope desert classic"";",1 What is Date when Runner-up is Sofía Mulánovich ( per )?,"CREATE TABLE table_name_92 (date VARCHAR, runner_up VARCHAR);","SELECT date FROM table_name_92 WHERE runner_up = ""sofía mulánovich ( per )"";","SELECT date FROM table_name_92 WHERE runner_up = ""sofa mulánovich ( per )"";",0 WHO WAS THE SEMIFINALISTS FOR THE HAMBURG TOURNAMENT?,"CREATE TABLE table_name_82 (semifinalists VARCHAR, tournament VARCHAR);","SELECT semifinalists FROM table_name_82 WHERE tournament = ""hamburg"";","SELECT semifinalists FROM table_name_82 WHERE tournament = ""hamburg"";",1 What is the number of events organized by nonprofits focused on disaster relief in the US by quarter?,"CREATE TABLE event_quarters (event_quarter_id INT, quarter INT); ","SELECT e.quarter, COUNT(*) as num_events FROM nonprofit_events ne JOIN events e ON ne.event_id = e.event_id JOIN nonprofits n ON ne.nonprofit_id = n.nonprofit_id JOIN event_quarters eq ON e.quarter = eq.quarter WHERE n.sector = 'disaster relief' GROUP BY e.quarter;","SELECT quarter, COUNT(*) FROM event_quarters GROUP BY quarter;",0 "List the top 3 mental health providers with the lowest health equity metric scores, along with their corresponding scores.","CREATE TABLE MentalHealthProviders (ProviderID INT, HealthEquityMetricScore INT); ","SELECT ProviderID, HealthEquityMetricScore FROM (SELECT ProviderID, HealthEquityMetricScore, ROW_NUMBER() OVER (ORDER BY HealthEquityMetricScore ASC) as Rank FROM MentalHealthProviders) as RankedData WHERE Rank <= 3;","SELECT ProviderID, HealthEquityMetricScore FROM MentalHealthProviders ORDER BY HealthEquityMetricScore DESC LIMIT 3;",0 Name the latitude for 3809935740,"CREATE TABLE table_18600760_8 (latitude VARCHAR, geo_id VARCHAR);",SELECT latitude FROM table_18600760_8 WHERE geo_id = 3809935740;,SELECT latitude FROM table_18600760_8 WHERE geo_id = 3809935740;,1 Which 1st Party has an election in 1847?,CREATE TABLE table_name_28 (election VARCHAR);,"SELECT 1 AS st_party FROM table_name_28 WHERE election = ""1847"";","SELECT 1 AS st_party FROM table_name_28 WHERE election = ""1847"";",1 Which Attendance has a Date of september 7?,"CREATE TABLE table_name_84 (attendance INTEGER, date VARCHAR);","SELECT MIN(attendance) FROM table_name_84 WHERE date = ""september 7"";","SELECT SUM(attendance) FROM table_name_84 WHERE date = ""september 7"";",0 "I want the tsongas of may 22, 2007","CREATE TABLE table_name_45 (tsongas__d_ VARCHAR, date VARCHAR);","SELECT tsongas__d_ FROM table_name_45 WHERE date = ""may 22, 2007"";","SELECT tsongas__d_ FROM table_name_45 WHERE date = ""may 22, 2007"";",1 What is the total duration of all films directed by women in Latin America between 1980 and 2009?,"CREATE TABLE Films (id INT, name TEXT, year INT, director TEXT, duration FLOAT, location TEXT); ",SELECT SUM(duration) FROM Films WHERE location IN ('LatinAmerica') AND year BETWEEN 1980 AND 2009 AND director IN (SELECT DISTINCT director FROM Films WHERE gender = 'female');,SELECT SUM(duration) FROM Films WHERE director LIKE '%Female%' AND location LIKE '%Latin America%' AND year BETWEEN 1980 AND 2009;,0 How many spacecraft were manufactured by SpaceY in the year 2022?,"CREATE TABLE spacecraft_manufacturing (id INT, company TEXT, year INT, quantity INT); ",SELECT quantity FROM spacecraft_manufacturing WHERE company = 'SpaceY' AND year = 2022;,SELECT SUM(quantity) FROM spacecraft_manufacturing WHERE company = 'SpaceY' AND year = 2022;,0 Who was the partner when the championship was us open on a hard surface?,"CREATE TABLE table_name_30 (partner VARCHAR, surface VARCHAR, championship VARCHAR);","SELECT partner FROM table_name_30 WHERE surface = ""hard"" AND championship = ""us open"";","SELECT partner FROM table_name_30 WHERE surface = ""hard"" AND championship = ""us open"";",1 "What is Home Team, when Date is 18 February 1956, and when Tie No is 3?","CREATE TABLE table_name_69 (home_team VARCHAR, date VARCHAR, tie_no VARCHAR);","SELECT home_team FROM table_name_69 WHERE date = ""18 february 1956"" AND tie_no = ""3"";","SELECT home_team FROM table_name_69 WHERE date = ""18 february 1956"" AND tie_no = ""3"";",1 What is the difference in carbon pricing (in USD/ton) between countries in Europe and North America?,"CREATE TABLE carbon_pricing (id INT, country VARCHAR(50), price FLOAT); ","SELECT country, price FROM carbon_pricing WHERE country IN ('Germany', 'France', 'US', 'Canada') ORDER BY country;","SELECT country, price, ROW_NUMBER() OVER (ORDER BY price DESC) as rn FROM carbon_pricing WHERE country IN ('Europe', 'North America') GROUP BY country;",0 What is points sgsinst when points diff is +96?,"CREATE TABLE table_name_70 (points_against VARCHAR, points_diff VARCHAR);","SELECT points_against FROM table_name_70 WHERE points_diff = ""+96"";","SELECT points_against FROM table_name_70 WHERE points_diff = ""+96"";",1 "How many weight stats are there for players from San Francisco, CA?","CREATE TABLE table_22496374_1 (weight VARCHAR, home_town VARCHAR);","SELECT COUNT(weight) FROM table_22496374_1 WHERE home_town = ""San Francisco, CA"";","SELECT COUNT(weight) FROM table_22496374_1 WHERE home_town = ""San Francisco, CA"";",1 "What is the percentage of cases that were resolved through mediation, out of all cases closed in the past year?","CREATE TABLE Cases (ID INT, CaseNumber INT, DateOpened DATE, DateClosed DATE, Resolution VARCHAR(255)); ","SELECT (SUM(CASE WHEN Resolution = 'Mediation' THEN 1 ELSE 0 END) * 100.0 / COUNT(*)) as PercentageResolvedThroughMediation FROM Cases WHERE DateClosed IS NOT NULL AND DateClosed >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Cases WHERE DateOpened >= DATEADD(year, -1, GETDATE()))) AS Percentage FROM Cases WHERE DateClosed >= DATEADD(year, -1, GETDATE());",0 Which arctic research stations have observed more than 50 unique species?,"CREATE TABLE arctic_research_stations (id INT, name TEXT, location TEXT); CREATE TABLE species_observations (station_id INT, species_name TEXT); ","SELECT station_id, COUNT(DISTINCT species_name) as species_count FROM species_observations GROUP BY station_id HAVING species_count > 50;",SELECT arctic_research_stations.name FROM arctic_research_stations INNER JOIN species_observations ON arctic_research_stations.id = species_observations.station_id GROUP BY arctic_research_stations.name HAVING COUNT(DISTINCT species_name) > 50;,0 How many people directed episode 2?,"CREATE TABLE table_29545336_2 (directed_by VARCHAR, no VARCHAR);",SELECT COUNT(directed_by) FROM table_29545336_2 WHERE no = 2;,SELECT COUNT(directed_by) FROM table_29545336_2 WHERE no = 2;,1 Find the daily transaction volume for the top 5 customers with the highest transaction values in the last quarter.,"CREATE TABLE customers (customer_id INT, name VARCHAR(255)); CREATE TABLE transactions (transaction_id INT, customer_id INT, transaction_date DATE, amount DECIMAL(10,2));","SELECT c.customer_id, c.name, DATE(t.transaction_date) as transaction_date, SUM(t.amount) as daily_transaction_volume FROM customers c INNER JOIN transactions t ON c.customer_id = t.customer_id WHERE c.customer_id IN (SELECT t2.customer_id FROM transactions t2 GROUP BY t2.customer_id ORDER BY SUM(t2.amount) DESC LIMIT 5) AND t.transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH) GROUP BY c.customer_id, DATE(t.transaction_date);","SELECT customers.name, SUM(transactions.amount) as daily_volume FROM customers INNER JOIN transactions ON customers.customer_id = transactions.customer_id WHERE transactions.transaction_date >= DATEADD(quarter, -1, GETDATE()) GROUP BY customers.name ORDER BY daily_volume DESC LIMIT 5;",0 "What is the total number of packages shipped from the 'LA' warehouse to 'NY' in January 2021, grouped by delivery date?","CREATE TABLE warehouse (id INT, name VARCHAR(20)); CREATE TABLE shipment (id INT, warehouse_id INT, delivery_location VARCHAR(20), shipped_date DATE); ","SELECT shipped_date, COUNT(*) AS total_packages FROM shipment WHERE warehouse_id = 1 AND delivery_location = 'NY' AND shipped_date >= '2021-01-01' AND shipped_date < '2021-02-01' GROUP BY shipped_date;","SELECT shipped_date, COUNT(*) FROM shipment JOIN warehouse ON shipment.warehouse_id = warehouse.id WHERE warehouse.name = 'LA' AND delivery_location = 'NY' AND shipped_date BETWEEN '2021-01-01' AND '2021-01-31' GROUP BY shipped_date;",0 Which forests in Indonesia have teak trees older than 100 years?,"CREATE TABLE forests (id INT PRIMARY KEY, name VARCHAR(50), country VARCHAR(50), hectares DECIMAL(10,2)); CREATE TABLE trees (id INT PRIMARY KEY, species VARCHAR(50), age INT, forest_id INT, FOREIGN KEY (forest_id) REFERENCES forests(id)); ",SELECT forests.name FROM forests INNER JOIN trees ON forests.id = trees.forest_id WHERE forests.country = 'Indonesia' AND trees.species = 'Teak' AND trees.age > 100;,SELECT forests.name FROM forests INNER JOIN trees ON forests.id = trees.forest_id WHERE forests.country = 'Indonesia' AND trees.age > 100;,0 What was Hawthorn's score as the home team?,CREATE TABLE table_name_94 (home_team VARCHAR);,"SELECT home_team AS score FROM table_name_94 WHERE home_team = ""hawthorn"";","SELECT home_team AS score FROM table_name_94 WHERE home_team = ""hawthorn"";",1 "Name the opponents for outcome of runner-up and date of august 7, 2011","CREATE TABLE table_name_19 (opponents_in_the_final VARCHAR, outcome VARCHAR, date VARCHAR);","SELECT opponents_in_the_final FROM table_name_19 WHERE outcome = ""runner-up"" AND date = ""august 7, 2011"";","SELECT opponents_in_the_final FROM table_name_19 WHERE outcome = ""runner-up"" AND date = ""august 7, 2011"";",1 "If the points were 0, what was the losing bonus?","CREATE TABLE table_name_32 (losing_bonus VARCHAR, points VARCHAR);","SELECT losing_bonus FROM table_name_32 WHERE points = ""0"";","SELECT losing_bonus FROM table_name_32 WHERE points = ""0"";",1 How many unique investors participated in Series A rounds for startups in the e-commerce sector?,"CREATE TABLE IF NOT EXISTS investment_rounds(id INT, startup_id INT, round_type TEXT, investor_id INT); ",SELECT COUNT(DISTINCT investor_id) FROM investment_rounds WHERE round_type = 'Series A' AND startup_id IN (SELECT id FROM startups WHERE industry = 'E-commerce');,SELECT COUNT(DISTINCT investor_id) FROM investment_rounds WHERE round_type = 'Series A' AND startup_id IN (SELECT startup_id FROM startups WHERE sector = 'e-commerce');,0 when was the first elected when the candidates is thomas lawyer (dr) 54.9% william beekman (f) 45.1%?,"CREATE TABLE table_2668347_14 (first_elected VARCHAR, candidates VARCHAR);","SELECT first_elected FROM table_2668347_14 WHERE candidates = ""Thomas Lawyer (DR) 54.9% William Beekman (F) 45.1%"";","SELECT first_elected FROM table_2668347_14 WHERE candidates = ""Thomas Lawyer (DR) 54.9% William Beekman (F) 45.1%"";",1 who was the incoming manager for the 12th position in the table,"CREATE TABLE table_26914759_3 (incoming_manager VARCHAR, position_in_table VARCHAR);","SELECT incoming_manager FROM table_26914759_3 WHERE position_in_table = ""12th"";","SELECT incoming_manager FROM table_26914759_3 WHERE position_in_table = ""12th"";",1 "Find the number of public schools in the state of California and Texas, excluding any schools with a rating below 7.","CREATE TABLE Schools (name VARCHAR(50), state VARCHAR(20), rating INT); ","SELECT COUNT(*) FROM Schools WHERE state IN ('California', 'Texas') AND rating >= 7;","SELECT COUNT(*) FROM Schools WHERE state IN ('California', 'Texas') AND rating 7;",0 List all video titles with a duration greater than 30 minutes.,"CREATE TABLE videos (id INT, title VARCHAR(255), duration INT, category VARCHAR(255), date DATE);",SELECT title FROM videos WHERE duration > 30 AND category='documentary';,SELECT title FROM videos WHERE duration > 30;,0 "Who was the winner at the track where Roberval Andrade won pole, Felipe Giaffone had the fastest lap, and RVR Corinthians Motorsport was the winning team?","CREATE TABLE table_29361707_2 (winning_driver VARCHAR, winning_team VARCHAR, pole_position VARCHAR, fastest_lap VARCHAR);","SELECT winning_driver FROM table_29361707_2 WHERE pole_position = ""Roberval Andrade"" AND fastest_lap = ""Felipe Giaffone"" AND winning_team = ""RVR Corinthians Motorsport"";","SELECT winning_driver FROM table_29361707_2 WHERE pole_position = ""Roberval Andrade"" AND fastest_lap = ""Felipe Giaffone"" AND winning_team = ""RVR Corinthians Motorsport"";",1 What is the maximum budget for rural infrastructure projects in 2019?,"CREATE TABLE rural_infrastructure (id INT, year INT, project VARCHAR(50), budget FLOAT); ",SELECT MAX(budget) FROM rural_infrastructure WHERE year = 2019;,SELECT MAX(budget) FROM rural_infrastructure WHERE year = 2019;,1 What are the top 2 most common types of military equipment in the 'MilitaryEquipment' table?,"CREATE TABLE MilitaryEquipment (equipment_type VARCHAR(50), country VARCHAR(50), quantity INT); ","SELECT equipment_type, COUNT(*) FROM MilitaryEquipment GROUP BY equipment_type ORDER BY COUNT(*) DESC LIMIT 2;","SELECT equipment_type, COUNT(*) as count FROM MilitaryEquipment GROUP BY equipment_type ORDER BY count DESC LIMIT 2;",0 "Show the average maximum depth (in meters) for each species in the 'species_oceanic_data' table, including the species name.","CREATE TABLE species_oceanic_data (species_id INT, species_name VARCHAR(50), max_depth INT);","SELECT species_name, AVG(max_depth) FROM species_oceanic_data GROUP BY species_id;","SELECT species_name, AVG(max_depth) FROM species_oceanic_data GROUP BY species_name;",0 Who wrote the sorry of the episode directed by Dan Attias? ,"CREATE TABLE table_13755296_1 (story_by VARCHAR, directed_by VARCHAR);","SELECT story_by FROM table_13755296_1 WHERE directed_by = ""Dan Attias"";","SELECT story_by FROM table_13755296_1 WHERE directed_by = ""Dan Attias"";",1 What was the attendance that had a loss of Ponson (1-5)?,"CREATE TABLE table_name_58 (attendance VARCHAR, loss VARCHAR);","SELECT attendance FROM table_name_58 WHERE loss = ""ponson (1-5)"";","SELECT attendance FROM table_name_58 WHERE loss = ""ponson (1-5)"";",1 What is the cons for lib dem of 8% and a lead of 27%,"CREATE TABLE table_name_19 (cons VARCHAR, lib_dem VARCHAR, lead VARCHAR);","SELECT cons FROM table_name_19 WHERE lib_dem = ""8%"" AND lead = ""27%"";","SELECT cons FROM table_name_19 WHERE lib_dem = ""8%"" AND lead = ""27%"";",1 which team#2 played against poseidon neoi porroi,"CREATE TABLE table_21434618_1 (team__number2 VARCHAR, team__number1 VARCHAR);","SELECT team__number2 FROM table_21434618_1 WHERE team__number1 = ""Poseidon Neoi Porroi"";","SELECT team__number2 FROM table_21434618_1 WHERE team__number1 = ""Poseidon Neoi Porroi"";",1 What are the top 5 most viewed TV shows in descending order?,"CREATE TABLE tv_show (id INT, title VARCHAR(50), viewers INT); ",SELECT title FROM tv_show ORDER BY viewers DESC LIMIT 5;,"SELECT title, viewers FROM tv_show ORDER BY viewers DESC LIMIT 5;",0 what is the iata when the city is leipzig?,"CREATE TABLE table_name_91 (iata VARCHAR, city VARCHAR);","SELECT iata FROM table_name_91 WHERE city = ""leipzig"";","SELECT iata FROM table_name_91 WHERE city = ""leipzig"";",1 What is the total weight of seafood deliveries from local suppliers in the Pacific Northwest region?,"CREATE TABLE Suppliers (SupplierID INT, SupplierName VARCHAR(50), Region VARCHAR(50)); CREATE TABLE Deliveries (DeliveryID INT, SupplierID INT, DeliveryDate DATE, Weight FLOAT); ",SELECT SUM(Weight) AS TotalWeight FROM Deliveries D INNER JOIN Suppliers S ON D.SupplierID = S.SupplierID WHERE S.Region = 'Pacific Northwest' AND D.DeliveryDate >= '2022-01-01' AND D.DeliveryDate < '2022-02-01' AND S.SupplierName IN ('Ocean Bounty');,SELECT SUM(Weight) FROM Deliveries JOIN Suppliers ON Deliveries.SupplierID = Suppliers.SupplierID WHERE Suppliers.Region = 'Pacific Northwest';,0 What were the July (°C) temperatures when the July (°F) temperatures were 71/55?,"CREATE TABLE table_21980_1 (july__°c_ VARCHAR, july__°f_ VARCHAR);","SELECT july__°c_ FROM table_21980_1 WHERE july__°f_ = ""71/55"";","SELECT july__°c_ FROM table_21980_1 WHERE july__°f_ = ""71/55"";",1 "What is the number of silver when rank was 5, and a bronze was smaller than 14?","CREATE TABLE table_name_69 (silver INTEGER, rank VARCHAR, bronze VARCHAR);","SELECT SUM(silver) FROM table_name_69 WHERE rank = ""5"" AND bronze < 14;",SELECT SUM(silver) FROM table_name_69 WHERE rank = 5 AND bronze 14;,0 What is the region of the Catalog that is in cd format and has a label a&m/canyon?,"CREATE TABLE table_name_49 (region VARCHAR, format VARCHAR, label VARCHAR);","SELECT region FROM table_name_49 WHERE format = ""cd"" AND label = ""a&m/canyon"";","SELECT region FROM table_name_49 WHERE format = ""cd"" AND label = ""a&m/canyon"";",1 Find the total number of tours for each ranking date.,"CREATE TABLE rankings (ranking_date VARCHAR, tours INTEGER);","SELECT SUM(tours), ranking_date FROM rankings GROUP BY ranking_date;","SELECT ranking_date, SUM(tours) FROM rankings GROUP BY ranking_date;",0 List all countries with deep-sea exploration programs and their budgets?,"CREATE TABLE countries (country_id INT, name VARCHAR(255), deep_sea_program BOOLEAN); CREATE TABLE budgets (country_id INT, amount FLOAT);","SELECT countries.name, budgets.amount FROM countries INNER JOIN budgets ON countries.country_id = budgets.country_id WHERE countries.deep_sea_program = TRUE;","SELECT c.name, b.amount FROM countries c INNER JOIN budgets b ON c.country_id = b.country_id WHERE c.deep_sea_program = TRUE;",0 What is the trend of defense project timelines in the African continent over the last 3 years?,"CREATE TABLE Project_Timelines (project_id INT, project_start_date DATE, project_end_date DATE, project_region VARCHAR(50));","SELECT project_region, DATEPART(year, project_start_date) as project_year, AVG(DATEDIFF(day, project_start_date, project_end_date)) as avg_project_duration FROM Project_Timelines WHERE project_region = 'African continent' AND project_start_date >= DATEADD(year, -3, GETDATE()) GROUP BY project_region, project_year;","SELECT project_region, project_start_date, project_end_date, ROW_NUMBER() OVER (ORDER BY project_start_date DESC) as rn FROM Project_Timelines WHERE project_region = 'Africa' AND project_start_date >= DATEADD(year, -3, GETDATE()) GROUP BY project_region, project_start_date, project_end_date;",0 How many unique users have interacted with Decentralized Application C?,"CREATE TABLE Users (user_id INTEGER, app_used TEXT); ",SELECT COUNT(DISTINCT user_id) FROM Users WHERE app_used = 'App C';,SELECT COUNT(DISTINCT user_id) FROM Users WHERE app_used = 'Decentralized Application C';,0 What circuit has volvo cars australia as the team?,"CREATE TABLE table_name_15 (circuit VARCHAR, team VARCHAR);","SELECT circuit FROM table_name_15 WHERE team = ""volvo cars australia"";","SELECT circuit FROM table_name_15 WHERE team = ""volvo cars australia"";",1 List all the cruelty-free skincare products sold in Germany with a price above 20 euros.,"CREATE TABLE SkincareProducts (productID INT, productName VARCHAR(50), category VARCHAR(50), country VARCHAR(50), isCrueltyFree BOOLEAN, price DECIMAL(5,2)); ",SELECT * FROM SkincareProducts WHERE country = 'Germany' AND isCrueltyFree = TRUE AND price > 20;,SELECT productName FROM SkincareProducts WHERE isCrueltyFree = true AND country = 'Germany' AND price > 20;,0 Who is the home team when the san francisco 49ers are visiting with a result of 42-14?,"CREATE TABLE table_name_92 (home_team VARCHAR, visiting_team VARCHAR, result VARCHAR);","SELECT home_team FROM table_name_92 WHERE visiting_team = ""san francisco 49ers"" AND result = ""42-14"";","SELECT home_team FROM table_name_92 WHERE visiting_team = ""san francisco 49ers"" AND result = ""42-14"";",1 What is the maximum depth in the Mariana Trench?,"CREATE TABLE ocean_floors (name TEXT, max_depth REAL); ",SELECT MAX(max_depth) FROM ocean_floors WHERE name = 'Mariana Trench';,SELECT MAX(max_depth) FROM ocean_floors WHERE name = 'Mariana Trench';,1 "What is Time, when Event is ""GCM: Demolition 1""?","CREATE TABLE table_name_85 (time VARCHAR, event VARCHAR);","SELECT time FROM table_name_85 WHERE event = ""gcm: demolition 1"";","SELECT time FROM table_name_85 WHERE event = ""gcm: demolition 1"";",1 Insert new records into the museum_operations table for a new exhibit.,"CREATE TABLE museum_operations (exhibit_id INT, exhibit_name TEXT, start_date DATE, end_date DATE, daily_visitors INT);","INSERT INTO museum_operations (exhibit_id, exhibit_name, start_date, end_date, daily_visitors) VALUES (1001, 'Contemporary Art from Japan', '2023-03-01', '2023-05-31', 500);","INSERT INTO museum_operations (exhibit_id, exhibit_name, start_date, end_date, daily_visitors) VALUES (1, 'Male', '2022-01-01', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31');",0 "what is the competing entities when the age group is 18 or younger, held every is one year and the sport is table tennis?","CREATE TABLE table_name_37 (competing_entities VARCHAR, sport VARCHAR, age_groups VARCHAR, held_every VARCHAR);","SELECT competing_entities FROM table_name_37 WHERE age_groups = ""18 or younger"" AND held_every = ""one year"" AND sport = ""table tennis"";","SELECT competing_entities FROM table_name_37 WHERE age_groups = ""18 or younger"" AND held_every = ""one year"" AND sport = ""table tennis"";",1 Tell me the college that paul davis went to,"CREATE TABLE table_name_32 (college VARCHAR, player VARCHAR);","SELECT college FROM table_name_32 WHERE player = ""paul davis"";","SELECT college FROM table_name_32 WHERE player = ""paul davis"";",1 What is the total number of overall figures when duke was the college and the round was higher than 7?,"CREATE TABLE table_name_99 (overall INTEGER, college VARCHAR, round VARCHAR);","SELECT SUM(overall) FROM table_name_99 WHERE college = ""duke"" AND round > 7;","SELECT SUM(overall) FROM table_name_99 WHERE college = ""duke"" AND round > 7;",1 What is the minimum size of fish farms in 'reservoirs' schema?,"CREATE SCHEMA reservoirs; CREATE TABLE fish_farms (id INT, size FLOAT, location VARCHAR(20)); ",SELECT MIN(size) FROM reservoirs.fish_farms;,SELECT MIN(size) FROM reservoirs.fish_farms;,1 On April 22 when the Los Angeles Kings where visitors what was the record?,"CREATE TABLE table_name_59 (record VARCHAR, visitor VARCHAR, date VARCHAR);","SELECT record FROM table_name_59 WHERE visitor = ""los angeles kings"" AND date = ""april 22"";","SELECT record FROM table_name_59 WHERE visitor = ""los angeles kings"" AND date = ""april 22"";",1 What is the average customer size by gender for the past 12 months?,"CREATE TABLE customer (id INT, size FLOAT, gender TEXT, date DATE);","SELECT gender, AVG(size) FROM customer WHERE date >= DATE_SUB(CURDATE(), INTERVAL 12 MONTH) GROUP BY gender;","SELECT gender, AVG(size) as avg_size FROM customer WHERE date >= DATEADD(month, -12, GETDATE()) GROUP BY gender;",0 What is the highest draws when more than 6 are played and the points against are 54?,"CREATE TABLE table_name_92 (drawn INTEGER, against VARCHAR, played VARCHAR);",SELECT MAX(drawn) FROM table_name_92 WHERE against = 54 AND played > 6;,SELECT MAX(drawn) FROM table_name_92 WHERE against = 54 AND played > 6;,1 Which player is featured for 2001-2002?,"CREATE TABLE table_name_28 (player VARCHAR, year VARCHAR);","SELECT player FROM table_name_28 WHERE year = ""2001-2002"";","SELECT player FROM table_name_28 WHERE year = ""2001-2002"";",1 Name the highest Against on 21 november 1978?,"CREATE TABLE table_name_30 (against INTEGER, date VARCHAR);","SELECT MAX(against) FROM table_name_30 WHERE date = ""21 november 1978"";","SELECT MAX(against) FROM table_name_30 WHERE date = ""21 november 1978"";",1 What district has benjamin eggleston for incumbent?,"CREATE TABLE table_name_52 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_name_52 WHERE incumbent = ""benjamin eggleston"";","SELECT district FROM table_name_52 WHERE incumbent = ""benjamin eggleston"";",1 How many companies are there in total?,"CREATE TABLE companies (id INT, name TEXT, sector TEXT); ",SELECT COUNT(*) FROM companies;,SELECT COUNT(*) FROM companies;,1 How many f/laps when he finished 8th?,"CREATE TABLE table_24491017_1 (f_laps INTEGER, position VARCHAR);","SELECT MAX(f_laps) FROM table_24491017_1 WHERE position = ""8th"";","SELECT SUM(f_laps) FROM table_24491017_1 WHERE position = ""8th"";",0 When did South Melbourne play as the home team?,"CREATE TABLE table_name_66 (date VARCHAR, home_team VARCHAR);","SELECT date FROM table_name_66 WHERE home_team = ""south melbourne"";","SELECT date FROM table_name_66 WHERE home_team = ""south melbourne"";",1 "Update the ""city_council_meetings"" table to change the date of the meeting with the ID 12 to 2023-04-03","CREATE TABLE city_council_meetings (meeting_id INT, meeting_date DATE, agenda VARCHAR(255));",UPDATE city_council_meetings SET meeting_date = '2023-04-03' WHERE meeting_id = 12;,UPDATE city_council_meetings SET meeting_date = '2023-04-03' WHERE meeting_id = 12;,1 "What is the maximum and minimum elevation, in meters, of mountain forests in the Himalayas?","CREATE TABLE mountain_forests (forest_type VARCHAR(30), elevation FLOAT); ","SELECT MIN(elevation), MAX(elevation) FROM mountain_forests WHERE forest_type = 'Mountain Forest - Himalayas';","SELECT MAX(altitude), MIN(altitude) FROM mountain_forests WHERE forest_type = 'Mountain Forest';",0 How many production codes had a total number in the season of 8?,"CREATE TABLE table_27988382_1 (production_code VARCHAR, no_in_season VARCHAR);",SELECT COUNT(production_code) FROM table_27988382_1 WHERE no_in_season = 8;,SELECT COUNT(production_code) FROM table_27988382_1 WHERE no_in_season = 8;,1 How many car insurance policies were sold in 'TX'?,"CREATE TABLE policies (id INT, policy_type VARCHAR(10), state VARCHAR(2)); ",SELECT COUNT(*) FROM policies WHERE policy_type = 'car' AND state = 'TX';,SELECT COUNT(*) FROM policies WHERE policy_type = 'Car' AND state = 'TX';,0 How many unique vessels visited each country?,"CREATE TABLE ports (port_id INT, port_name TEXT, country TEXT); CREATE TABLE visits (visit_id INT, vessel_id INT, port_id INT); ","SELECT countries, COUNT(DISTINCT vessels.vessel_id) FROM ports JOIN visits ON ports.port_id = visits.port_id JOIN (SELECT DISTINCT vessel_id, port_id FROM visits) AS vessels ON visits.vessel_id = vessels.vessel_id GROUP BY countries;","SELECT p.country, COUNT(DISTINCT v.vessel_id) FROM ports p JOIN visits v ON p.port_id = v.port_id GROUP BY p.country;",0 Who is the player with a t6 place?,"CREATE TABLE table_name_99 (player VARCHAR, place VARCHAR);","SELECT player FROM table_name_99 WHERE place = ""t6"";","SELECT player FROM table_name_99 WHERE place = ""t6"";",1 Which Team 2 had a Team 1 of montreal impact?,"CREATE TABLE table_name_81 (team_2 VARCHAR, team_1 VARCHAR);","SELECT team_2 FROM table_name_81 WHERE team_1 = ""montreal impact"";","SELECT team_2 FROM table_name_81 WHERE team_1 = ""montreal impact"";",1 Find the total number of projects in the 'public_works' table.,"CREATE TABLE public_works (id INT, project_name VARCHAR(50), location VARCHAR(50)); ",SELECT COUNT(*) FROM public_works;,SELECT COUNT(*) FROM public_works;,1 Name the total number of area for 775927 population,"CREATE TABLE table_1307842_7 (area__km²_ VARCHAR, population VARCHAR);",SELECT COUNT(area__km²_) FROM table_1307842_7 WHERE population = 775927;,SELECT COUNT(area__km2_) FROM table_1307842_7 WHERE population = 775927;,0 What is the total budget of the department of education in the city of Los Angeles in 2021?,"CREATE TABLE budgets (id INT, city VARCHAR, department VARCHAR, year INT, budget FLOAT); ",SELECT SUM(budget) FROM budgets WHERE city = 'Los Angeles' AND department = 'Education' AND year = 2021;,SELECT SUM(budget) FROM budgets WHERE city = 'Los Angeles' AND department = 'Education' AND year = 2021;,1 What is the total quantity of mineral X extracted in Year 2010?,"CREATE TABLE extraction (id INT, year INT, mineral TEXT, quantity INT); ",SELECT SUM(quantity) FROM extraction WHERE year = 2010 AND mineral = 'Mineral X';,SELECT SUM(quantity) FROM extraction WHERE mineral = 'Mineral X' AND year = 2010;,0 Find the average number of factories for the manufacturers that have more than 20 shops.,"CREATE TABLE manufacturer (Num_of_Factories INTEGER, num_of_shops INTEGER);",SELECT AVG(Num_of_Factories) FROM manufacturer WHERE num_of_shops > 20;,SELECT AVG(Num_of_Factories) FROM manufacturer WHERE num_of_shops > 20;,1 List all sustainable materials used in the manufacturing process with their associated production costs.,"CREATE TABLE sustainable_materials (material_id INT, material VARCHAR(20), production_cost DECIMAL(10,2));",SELECT * FROM sustainable_materials;,"SELECT material, production_cost FROM sustainable_materials;",0 What month is the Paris 20k Road Race held?,"CREATE TABLE table_26166836_3 (month_held VARCHAR, location VARCHAR);","SELECT month_held FROM table_26166836_3 WHERE location = ""Paris"";","SELECT month_held FROM table_26166836_3 WHERE location = ""Paris 20k Road Race"";",0 List all financial capability programs offered by the XYZ Foundation.,"CREATE TABLE financial_programs (organization VARCHAR(50), program VARCHAR(50)); ",SELECT program FROM financial_programs WHERE organization = 'XYZ Foundation';,SELECT program FROM financial_programs WHERE organization = 'XYZ Foundation';,1 Name the number of district for tom marino,"CREATE TABLE table_25030512_41 (district VARCHAR, incumbent VARCHAR);","SELECT COUNT(district) FROM table_25030512_41 WHERE incumbent = ""Tom Marino"";","SELECT COUNT(district) FROM table_25030512_41 WHERE incumbent = ""Tom Marino"";",1 "What is the total funding received by startups in the 'bioprocess engineering' sector, excluding 'BioVentures'?","CREATE TABLE startups (id INT, name VARCHAR(50), sector VARCHAR(50), funding FLOAT); ",SELECT SUM(funding) FROM startups WHERE sector = 'bioprocess engineering' AND name != 'BioVentures';,SELECT SUM(funding) FROM startups WHERE sector = 'bioprocess engineering' AND name!= 'BioVentures';,0 Which Score has a Date of july 20?,"CREATE TABLE table_name_2 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_2 WHERE date = ""july 20"";","SELECT score FROM table_name_2 WHERE date = ""july 20"";",1 "What are the songs in album ""A Kiss Before You Go: Live in Hamburg""?","CREATE TABLE songs (title VARCHAR, songid VARCHAR); CREATE TABLE albums (aid VARCHAR, title VARCHAR); CREATE TABLE tracklists (albumid VARCHAR, songid VARCHAR);","SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE T1.title = ""A Kiss Before You Go: Live in Hamburg"";","SELECT T1.title FROM tracks AS T1 JOIN albums AS T2 ON T1.aid = T2.aid JOIN tracklists AS T3 ON T3.albumid = T3.albumid JOIN songs AS T4 ON T3.songid = T4.songid WHERE T4.title = ""A Kiss Before You Go: Live in Hamburg"";",0 What is the total number of basketball games played by each team?,"CREATE TABLE teams (team_id INT, team_name VARCHAR(255), sport VARCHAR(255)); CREATE TABLE games (team_id INT, sport VARCHAR(255), game_id INT); ","SELECT t.team_name, COUNT(g.game_id) games_played FROM teams t JOIN games g ON t.team_id = g.team_id WHERE t.sport = 'Basketball' GROUP BY t.team_name;","SELECT t.team_name, COUNT(g.game_id) as total_games FROM teams t JOIN games g ON t.team_id = g.team_id WHERE t.sport = 'Basketball' GROUP BY t.team_name;",0 "Which Position has Goals against smaller than 59, and Goals for larger than 32, and Draws larger than 9, and Points larger than 35?","CREATE TABLE table_name_90 (position INTEGER, points VARCHAR, draws VARCHAR, goals_against VARCHAR, goals_for VARCHAR);",SELECT AVG(position) FROM table_name_90 WHERE goals_against < 59 AND goals_for > 32 AND draws > 9 AND points > 35;,SELECT AVG(position) FROM table_name_90 WHERE goals_against 59 AND goals_for > 32 AND draws > 9 AND points > 35;,0 What is the home team's score when st kilda is away?,"CREATE TABLE table_name_23 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team AS score FROM table_name_23 WHERE away_team = ""st kilda"";","SELECT home_team AS score FROM table_name_23 WHERE away_team = ""st kilda"";",1 Which date has a Record of 22-22?,"CREATE TABLE table_name_24 (date VARCHAR, record VARCHAR);","SELECT date FROM table_name_24 WHERE record = ""22-22"";","SELECT date FROM table_name_24 WHERE record = ""22-22"";",1 What is the total funding amount for companies founded by immigrants in the biotech sector?,"CREATE TABLE funding_records (id INT, company_id INT, funding_amount INT, funding_date DATE); CREATE TABLE companies (id INT, name TEXT, industry TEXT, founding_date DATE, founder_immigrant TEXT);",SELECT SUM(funding_amount) FROM funding_records JOIN companies ON funding_records.company_id = companies.id WHERE companies.industry = 'Biotech' AND founder_immigrant = 'Yes';,SELECT SUM(funding_records.funding_amount) FROM funding_records INNER JOIN companies ON funding_records.company_id = companies.id WHERE companies.industry = 'Biotech' AND companies.founder_immigrant = 'Hispanic';,0 How many artists are above age 46 and joined after 1990?,"CREATE TABLE artist (age VARCHAR, year_join VARCHAR);",SELECT COUNT(*) FROM artist WHERE age > 46 AND year_join > 1990;,SELECT COUNT(*) FROM artist WHERE age > 46 AND year_join > 1990;,1 "What are the total items shipped between Canada and India, excluding items shipped in January 2021?","CREATE TABLE Shipment (id INT, source_country VARCHAR(255), destination_country VARCHAR(255), items_quantity INT, shipment_date DATE); ",SELECT SUM(items_quantity) FROM Shipment WHERE (source_country = 'Canada' AND destination_country = 'India') OR (source_country = 'India' AND destination_country = 'Canada') AND shipment_date NOT BETWEEN '2021-01-01' AND '2021-01-31';,SELECT SUM(items_quantity) FROM Shipment WHERE source_country = 'Canada' AND destination_country = 'India' AND shipment_date = '2021-01-01';,0 What is the average number of research papers published per graduate student in the Physics department?,"CREATE TABLE students (id INT, name VARCHAR(50), department VARCHAR(50)); CREATE TABLE publications (student_id INT, year INT, title VARCHAR(100), department VARCHAR(50)); ",SELECT AVG(pubs_per_student) FROM (SELECT COUNT(p.id) AS pubs_per_student FROM students s JOIN publications p ON s.id = p.student_id WHERE s.department = 'Physics' GROUP BY s.id) t;,SELECT AVG(COUNT(*)) FROM publications JOIN students ON publications.student_id = students.id WHERE students.department = 'Physics';,0 Which MLS Team's pick number was 31?,"CREATE TABLE table_name_69 (mls_team VARCHAR, pick__number VARCHAR);",SELECT mls_team FROM table_name_69 WHERE pick__number = 31;,SELECT mls_team FROM table_name_69 WHERE pick__number = 31;,1 Who are the journalists with the most articles published in the last month?,"CREATE TABLE articles (id INT, title VARCHAR(255), publication_date DATE, author VARCHAR(255)); ","SELECT author, COUNT(*) as articles_count FROM articles WHERE publication_date >= NOW() - INTERVAL 1 MONTH GROUP BY author;","SELECT author, COUNT(*) as article_count FROM articles WHERE publication_date >= DATEADD(month, -1, GETDATE()) GROUP BY author ORDER BY article_count DESC LIMIT 1;",0 What coutry had a rampaged killing 14 in 1965?,"CREATE TABLE table_name_29 (country VARCHAR, killed VARCHAR, year VARCHAR);","SELECT country FROM table_name_29 WHERE killed = ""14"" AND year = 1965;","SELECT country FROM table_name_29 WHERE killed = ""14"" AND year = 1965;",1 Which tribunal had a total of 4167?,"CREATE TABLE table_name_34 (tribunal VARCHAR, total VARCHAR);","SELECT tribunal FROM table_name_34 WHERE total = ""4167"";",SELECT tribunal FROM table_name_34 WHERE total = 4167;,0 How many defense contracts were awarded to companies in California in 2020?,"CREATE TABLE Contracts (ID INT, Company TEXT, State TEXT, Year INT, Value INT); ",SELECT COUNT(*) FROM Contracts WHERE State = 'California' AND Year = 2020;,SELECT COUNT(*) FROM Contracts WHERE State = 'California' AND Year = 2020;,1 "What is the total number of investigative journalism projects conducted in the US, Canada, and Mexico, between 2018 and 2022?","CREATE TABLE projects (id INT, title TEXT, location TEXT, start_date DATE, end_date DATE); ","SELECT SUM(DATEDIFF(end_date, start_date) + 1) FROM projects WHERE location IN ('US', 'Canada', 'Mexico') AND start_date BETWEEN '2018-01-01' AND '2022-12-31';","SELECT COUNT(*) FROM projects WHERE location IN ('USA', 'Canada', 'Mexico') AND start_date BETWEEN '2018-01-01' AND '2022-12-31';",0 What is the average mass of exoplanets discovered by the Galactic Observatory?,"CREATE TABLE AstrophysicsResearchData (research_institute VARCHAR(20), exoplanet_name VARCHAR(30), mass FLOAT); ",SELECT AVG(mass) FROM AstrophysicsResearchData WHERE research_institute = 'Galactic Observatory';,SELECT AVG(mass) FROM AstrophysicsResearchData WHERE research_institute = 'Galactic Observatory';,1 What was the result of the game with more than 12 goals at Pasadena?,"CREATE TABLE table_name_80 (result VARCHAR, goal VARCHAR, venue VARCHAR);","SELECT result FROM table_name_80 WHERE goal > 12 AND venue = ""pasadena"";","SELECT result FROM table_name_80 WHERE goal > 12 AND venue = ""pasadena"";",1 "What is Built, when Works Number is ""717""?","CREATE TABLE table_name_42 (built VARCHAR, works_number VARCHAR);","SELECT built FROM table_name_42 WHERE works_number = ""717"";",SELECT built FROM table_name_42 WHERE works_number = 717;,0 List all IoT sensors in field 1 and field 2,"CREATE TABLE field_sensors (field_id TEXT, sensor_id TEXT); ","SELECT DISTINCT sensor_id FROM field_sensors WHERE field_id IN ('Field 1', 'Field 2');","SELECT * FROM field_sensors WHERE field_id IN (1, 2) AND sensor_id IN (1, 2);",0 "Which Position has a Round larger than 6, and a Player of neil pilon?","CREATE TABLE table_name_97 (position VARCHAR, round VARCHAR, player VARCHAR);","SELECT position FROM table_name_97 WHERE round > 6 AND player = ""neil pilon"";","SELECT position FROM table_name_97 WHERE round > 6 AND player = ""neil pilon"";",1 What is the average funding received by companies founded by women in the agriculture sector?,"CREATE TABLE companies (id INT, name TEXT, industry TEXT, founders_gender TEXT, funding FLOAT);",SELECT AVG(funding) FROM companies WHERE founders_gender = 'female' AND industry = 'agriculture';,SELECT AVG(funding) FROM companies WHERE industry = 'Agriculture' AND founders_gender = 'Female';,0 "Where week is greater than 7 and attendance is 66,251 what is the result?","CREATE TABLE table_name_31 (result VARCHAR, week VARCHAR, attendance VARCHAR);","SELECT result FROM table_name_31 WHERE week > 7 AND attendance = ""66,251"";","SELECT result FROM table_name_31 WHERE week > 7 AND attendance = ""66,251"";",1 Display total funding amounts for companies founded before 2010,"CREATE TABLE companies (id INT, name VARCHAR(50), founding_year INT); CREATE TABLE funds (id INT, company_id INT, funding_amount DECIMAL(10,2)); ",SELECT SUM(funds.funding_amount) FROM companies INNER JOIN funds ON companies.id = funds.company_id WHERE companies.founding_year < 2010;,SELECT SUM(funds.funding_amount) FROM funds INNER JOIN companies ON funds.company_id = companies.id WHERE companies.founding_year 2010;,0 "What is 2004, when 2007 is ""A"", and when 1997 is ""A""?",CREATE TABLE table_name_36 (Id VARCHAR);,"SELECT 2004 FROM table_name_36 WHERE 2007 = ""a"" AND 1997 = ""a"";","SELECT 2004 FROM table_name_36 WHERE 2007 = ""a"" AND 1997 = ""a"";",1 Who's the player eliminated on episode 8 of Fresh Meat?,"CREATE TABLE table_name_59 (player VARCHAR, original_season VARCHAR, eliminated VARCHAR);","SELECT player FROM table_name_59 WHERE original_season = ""fresh meat"" AND eliminated = ""episode 8"";","SELECT player FROM table_name_59 WHERE original_season = 8 AND eliminated = ""fresh meat"";",0 What is the average health equity metric score for each hospital in the southeast region?,"CREATE TABLE Hospitals (HospitalID INT, Name VARCHAR(255), Region VARCHAR(25), HealthEquityMetricScore INT); ","SELECT Region, AVG(HealthEquityMetricScore) as AverageScore FROM Hospitals WHERE Region = 'Southeast' GROUP BY Region;","SELECT Name, AVG(HealthEquityMetricScore) FROM Hospitals WHERE Region = 'Southeast' GROUP BY Name;",0 What was the game edition when they played on the clay (i) surface and the outcome was a winner?,"CREATE TABLE table_18183850_12 (edition VARCHAR, surface VARCHAR, outcome VARCHAR);","SELECT edition FROM table_18183850_12 WHERE surface = ""Clay (i)"" AND outcome = ""Winner"";","SELECT edition FROM table_18183850_12 WHERE surface = ""Clay (I)"" AND outcome = ""Winner"";",0 Name the average Played with a Points of 0*?,"CREATE TABLE table_name_72 (played INTEGER, points VARCHAR);","SELECT AVG(played) FROM table_name_72 WHERE points = ""0*"";","SELECT AVG(played) FROM table_name_72 WHERE points = ""0*"";",1 What is the time/retired when there are less than 22 laps and honda is the manufacturer?,"CREATE TABLE table_name_67 (time_retired VARCHAR, laps VARCHAR, manufacturer VARCHAR);","SELECT time_retired FROM table_name_67 WHERE laps < 22 AND manufacturer = ""honda"";","SELECT time_retired FROM table_name_67 WHERE laps 22 AND manufacturer = ""honda"";",0 "Find the total number of bookings for each hotel in the ""Paris"" city","CREATE TABLE hotels (hotel_id INT, hotel_name VARCHAR(50), city VARCHAR(50)); CREATE TABLE bookings (booking_id INT, hotel_id INT, guest_name VARCHAR(50), checkin_date DATE, checkout_date DATE, price DECIMAL(10,2));","SELECT h.hotel_id, h.hotel_name, COUNT(b.booking_id) AS booking_count FROM hotels h INNER JOIN bookings b ON h.hotel_id = b.hotel_id WHERE h.city = 'Paris' GROUP BY h.hotel_id, h.hotel_name;","SELECT h.hotel_name, COUNT(b.booking_id) as total_bookings FROM hotels h JOIN bookings b ON h.hotel_id = b.hotel_id WHERE h.city = 'Paris' GROUP BY h.hotel_name;",0 "List the number of satellites in orbit around Mars, grouped by the country that launched each satellite, and show the total number of satellites in orbit around Mars.","CREATE TABLE Satellites ( id INT, country VARCHAR(255), orbiting_body VARCHAR(255) );","SELECT country, COUNT(*) as total_satellites FROM Satellites WHERE orbiting_body = 'Mars' GROUP BY country; SELECT COUNT(*) as total_satellites_around_mars FROM Satellites WHERE orbiting_body = 'Mars';","SELECT country, COUNT(*) FROM Satellites WHERE orbiting_body = 'Mars' GROUP BY country;",0 Insert new records into the workforce_diversity table,"CREATE TABLE workforce_diversity (id INT, department VARCHAR(255), gender VARCHAR(6), employment_status VARCHAR(255), count INT);","INSERT INTO workforce_diversity (department, gender, employment_status, count) VALUES ('IT', 'Female', 'Full-time', 30), ('Engineering', 'Male', 'Part-time', 15), ('Operations', 'Non-binary', 'Contractor', 5);","INSERT INTO workforce_diversity (id, department, gender, employment_status, count) VALUES (1, 'Male', 'Hispanic', 'Hispanic', 'Hispanic');",0 "How many wastewater treatment plants are in the province of Quebec, Canada, that were built before 1990?","CREATE TABLE wastewater_treatment_plants (id INT, province VARCHAR(255), build_year INT); ",SELECT COUNT(*) FROM wastewater_treatment_plants WHERE province = 'Quebec' AND build_year < 1990;,SELECT COUNT(*) FROM wastewater_treatment_plants WHERE province = 'Quebec' AND build_year 1990;,0 When was the Carysfort launched?,"CREATE TABLE table_24496403_1 (launched VARCHAR, ship VARCHAR);","SELECT launched FROM table_24496403_1 WHERE ship = ""Carysfort"";","SELECT launched FROM table_24496403_1 WHERE ship = ""Carysfort"";",1 Name the rank world for 7 rank subcontinent,"CREATE TABLE table_2248784_3 (rank_world VARCHAR, rank_subcontinent VARCHAR);",SELECT rank_world FROM table_2248784_3 WHERE rank_subcontinent = 7;,"SELECT rank_world FROM table_2248784_3 WHERE rank_subcontinent = ""7"";",0 "What is Members of Parliament, when Trailing Party is ""Bharatiya Lok Dal""?","CREATE TABLE table_name_97 (members_of_parliament VARCHAR, trailing_party VARCHAR);","SELECT members_of_parliament FROM table_name_97 WHERE trailing_party = ""bharatiya lok dal"";","SELECT members_of_parliament FROM table_name_97 WHERE trailing_party = ""bharatiya lok dal"";",1 Which broadcast date has 6.8 million viewers?,"CREATE TABLE table_2114238_1 (broadcast_date VARCHAR, viewers__in_millions_ VARCHAR);","SELECT broadcast_date FROM table_2114238_1 WHERE viewers__in_millions_ = ""6.8"";","SELECT broadcast_date FROM table_2114238_1 WHERE viewers__in_millions_ = ""6.8"";",1 What are the top 5 lipsticks sold in the USA in terms of revenue?,"CREATE TABLE Lipsticks (product_id INT, product_name TEXT, price DECIMAL(5,2), quantity_sold INT, country TEXT); ","SELECT product_name, SUM(price * quantity_sold) AS revenue FROM Lipsticks WHERE country = 'USA' GROUP BY product_name ORDER BY revenue DESC LIMIT 5;","SELECT product_name, SUM(quantity_sold) as total_revenue FROM Lipsticks WHERE country = 'USA' GROUP BY product_name ORDER BY total_revenue DESC LIMIT 5;",0 What is the total quantity of sustainable fabric sourced from Indian suppliers?,"CREATE TABLE SustainableFabric (Brand VARCHAR(255), Supplier VARCHAR(255), Quantity INT); ","SELECT SUM(Quantity) FROM SustainableFabric WHERE Supplier IN ('SupplierD', 'SupplierE', 'SupplierF');",SELECT SUM(Quantity) FROM SustainableFabric WHERE Supplier LIKE '%India%';,0 Which tourist attractions does the visitor with detail 'Vincent' visit?,"CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR); CREATE TABLE VISITORS (Tourist_ID VARCHAR, Tourist_Details VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR);","SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = ""Vincent"";",SELECT T1.Name FROM VISITORS AS T1 JOIN Tourist_Attractions AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Tourist_Details = 'Vincent';,0 What is the average delivery time for each mode of transportation?,"CREATE TABLE deliveries (id INT, order_id INT, delivery_time INT, transportation_mode VARCHAR(50)); ","SELECT transportation_mode, AVG(delivery_time) as avg_delivery_time FROM deliveries GROUP BY transportation_mode;","SELECT transportation_mode, AVG(delivery_time) as avg_delivery_time FROM deliveries GROUP BY transportation_mode;",1 What is the average food safety score for restaurants in 'Texas' and 'Florida'?,"CREATE TABLE inspection_scores (restaurant_name TEXT, location TEXT, score INTEGER); ","SELECT AVG(score) FROM inspection_scores WHERE location IN ('Texas', 'Florida');","SELECT AVG(score) FROM inspection_scores WHERE location IN ('Texas', 'Florida');",1 What's the C_{low} value when C_{high} is 12.0?,"CREATE TABLE table_1942366_9 (low VARCHAR, high VARCHAR);","SELECT STRUCT(low) FROM table_1942366_9 WHERE STRUCT(high) = ""12.0"";","SELECT low FROM table_1942366_9 WHERE high = ""12.0"";",0 Which sites have exceeded their annual emission limits?,"CREATE TABLE sites (id INT, name VARCHAR(255), annual_emission_limit INT); ","SELECT name FROM (SELECT name, yearly_emissions, annual_emission_limit, ROW_NUMBER() OVER (PARTITION BY name ORDER BY yearly_emissions DESC) as row_num FROM sites) subquery WHERE row_num = 1 AND yearly_emissions > annual_emission_limit;",SELECT name FROM sites WHERE annual_emission_limit > (SELECT annual_emission_limit FROM sites);,0 What is the name of the recipient when the director was Susan Jacobson?,"CREATE TABLE table_name_31 (recipient VARCHAR, director_s_ VARCHAR);","SELECT recipient FROM table_name_31 WHERE director_s_ = ""susan jacobson"";","SELECT recipient FROM table_name_31 WHERE director_s_ = ""susan jacobson"";",1 Create a view for sustainable urbanism initiatives by year,"CREATE TABLE SustainableUrbanismByYear (id INT PRIMARY KEY, city VARCHAR(50), state VARCHAR(50), initiative VARCHAR(100), year INT); ","CREATE VIEW SustainableUrbanismByYearView AS SELECT * FROM SustainableUrbanismByYear WHERE state IN ('WA', 'TX');","CREATE VIEW SustainableUrbanismByYear AS SELECT initiative, year FROM SustainableUrbanismByYear;",0 Delete all records related to climate adaptation projects in the Pacific Islands from the climate_projects table.,"CREATE TABLE climate_projects (id INT, project_name VARCHAR(20), project_location VARCHAR(20), project_type VARCHAR(20)); ",DELETE FROM climate_projects WHERE project_location = 'Pacific Islands' AND project_type = 'Climate Adaptation';,DELETE FROM climate_projects WHERE project_type = 'climate adaptation' AND project_location = 'Pacific Islands';,0 What is the capacity for dundee united?,"CREATE TABLE table_26980923_2 (capacity VARCHAR, team VARCHAR);","SELECT capacity FROM table_26980923_2 WHERE team = ""Dundee United"";","SELECT capacity FROM table_26980923_2 WHERE team = ""Dundee United"";",1 What are the positions in the college of Alberta?,"CREATE TABLE table_15817998_5 (position VARCHAR, college VARCHAR);","SELECT position FROM table_15817998_5 WHERE college = ""Alberta"";","SELECT position FROM table_15817998_5 WHERE college = ""Alberta"";",1 What is the total installed capacity of solar energy projects in the 'renewables' schema?,"CREATE SCHEMA if not exists renewables; CREATE TABLE if not exists renewables.solar_projects (project_id int, name varchar(255), location varchar(255), installed_capacity float); ",SELECT SUM(installed_capacity) FROM renewables.solar_projects;,SELECT SUM(installed_capacity) FROM renewables.solar_projects;,1 how many times did debbie black block,"CREATE TABLE table_19722233_5 (blocks VARCHAR, player VARCHAR);","SELECT blocks FROM table_19722233_5 WHERE player = ""Debbie Black"";","SELECT blocks FROM table_19722233_5 WHERE player = ""Debbie Black"";",1 "Update the round type to 'Series D' in the ""investment_rounds"" table for the record with id 7","CREATE TABLE investment_rounds (id INT, company_name VARCHAR(100), round_type VARCHAR(50), raised_amount FLOAT, round_date DATE); ",UPDATE investment_rounds SET round_type = 'Series D' WHERE id = 7;,UPDATE investment_rounds SET round_type = 'Series D' WHERE id = 7;,1 what's the acronym with department being department of finance kagawaran ng pananalapi,"CREATE TABLE table_1331313_1 (acronym VARCHAR, department VARCHAR);","SELECT acronym FROM table_1331313_1 WHERE department = ""department of Finance Kagawaran ng Pananalapi"";","SELECT acronym FROM table_1331313_1 WHERE department = ""Department of Finance Kagawaran ng Pananalapi"";",0 "What is the average played for entries with fewer than 65 goals against, points 1 of 19 2, and a position higher than 15?","CREATE TABLE table_name_89 (played INTEGER, goals_against VARCHAR, position VARCHAR, points_1 VARCHAR);","SELECT AVG(played) FROM table_name_89 WHERE position < 15 AND points_1 = ""19 2"" AND goals_against < 65;","SELECT AVG(played) FROM table_name_89 WHERE position > 15 AND points_1 = ""19 2"" AND goals_against 65;",0 What is the name of the manager for the 'engineering' department?,"CREATE TABLE departments (id INT, name TEXT, manager TEXT); ",SELECT manager FROM departments WHERE name = 'engineering';,SELECT manager FROM departments WHERE name = 'engineering';,1 What is the number of primary care physicians per capita?,"CREATE TABLE population (county_id INT, county_name TEXT, population_count INT); CREATE TABLE physicians (physician_id INT, physician_name TEXT, county_id INT, specialty TEXT); ","SELECT p.county_name, COUNT(*) FILTER (WHERE p.specialty = 'Primary Care') * 1.0 / p.population_count as ratio FROM physicians p INNER JOIN population pop ON p.county_id = pop.county_id GROUP BY p.county_id;",SELECT COUNT(*) FROM population JOIN physicians ON population.county_id = physicians.county_id WHERE specialty = 'Primary Care';,0 What is the lowest population in 2011 for the settlement of čortanovci?,"CREATE TABLE table_2562572_54 (population__2011_ INTEGER, settlement VARCHAR);","SELECT MIN(population__2011_) FROM table_2562572_54 WHERE settlement = ""Čortanovci"";","SELECT MIN(population__2011_) FROM table_2562572_54 WHERE settlement = ""ortanovci"";",0 What lane is from Great Britain and a 57.78 time?,"CREATE TABLE table_name_95 (lane VARCHAR, nationality VARCHAR, time VARCHAR);","SELECT COUNT(lane) FROM table_name_95 WHERE nationality = ""great britain"" AND time > 57.78;","SELECT lane FROM table_name_95 WHERE nationality = ""great britain"" AND time = ""57.78"";",0 What is the maximum number of employees in a single mine?,"CREATE TABLE mine_staff (id INT, mine_id INT, employees INT); ","SELECT mine_id, MAX(employees) as max_employees FROM mine_staff GROUP BY mine_id;","SELECT mine_id, MAX(employees) FROM mine_staff GROUP BY mine_id;",0 List the name of artworks in ascending alphabetical order.,CREATE TABLE artwork (Name VARCHAR);,SELECT Name FROM artwork ORDER BY Name;,SELECT Name FROM artwork ORDER BY Name;,1 what is the score on march 8?,"CREATE TABLE table_name_40 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_40 WHERE date = ""march 8"";","SELECT score FROM table_name_40 WHERE date = ""march 8"";",1 What is the maximum drought impact score for each region?,"CREATE TABLE regional_drought (region VARCHAR(255), year INT, score INT); ","SELECT region, MAX(score) FROM regional_drought GROUP BY region;","SELECT region, MAX(score) FROM regional_drought GROUP BY region;",1 Which consumers prefer 'cruelty-free' products in 'France'?,"CREATE TABLE consumer_preferences (consumer_id INT, country VARCHAR(50), favorite_product VARCHAR(100), is_cruelty_free BOOLEAN); ",SELECT consumer_id FROM consumer_preferences WHERE country = 'France' AND is_cruelty_free = true;,"SELECT consumer_id, favorite_product FROM consumer_preferences WHERE country = 'France' AND is_cruelty_free = true;",0 What is the average grid for Clay Regazzoni?,"CREATE TABLE table_name_29 (grid INTEGER, driver VARCHAR);","SELECT AVG(grid) FROM table_name_29 WHERE driver = ""clay regazzoni"";","SELECT AVG(grid) FROM table_name_29 WHERE driver = ""clay regazzoni"";",1 "Which player was from Western Washington University, played midfield, and was from years after 2009?","CREATE TABLE table_name_90 (player VARCHAR, year VARCHAR, school VARCHAR, position VARCHAR);","SELECT player FROM table_name_90 WHERE school = ""western washington university"" AND position = ""midfield"" AND year > 2009;","SELECT player FROM table_name_90 WHERE school = ""western washington university"" AND position = ""midfield"" AND year > 2009;",1 What are the names of the fields that had the highest gas production in Q3 2020?,"CREATE TABLE east_coast_fields (field_id INT, field_name VARCHAR(50), gas_production FLOAT, datetime DATETIME); ",SELECT field_name FROM east_coast_fields WHERE gas_production = (SELECT MAX(gas_production) FROM east_coast_fields WHERE QUARTER(datetime) = 3 AND YEAR(datetime) = 2020) AND QUARTER(datetime) = 3 AND YEAR(datetime) = 2020;,SELECT field_name FROM east_coast_fields WHERE gas_production = (SELECT MAX(gas_production) FROM east_coast_fields WHERE datetime >= '2020-04-01' AND datetime '2020-04-01' GROUP BY field_name);,0 What is the number of unloading operations in India?,"CREATE TABLE ports (port_id INT, port_name VARCHAR(50), country VARCHAR(50)); CREATE TABLE cargo_handling (handling_id INT, port_id INT, operation_type VARCHAR(50), operation_date DATE); ",SELECT COUNT(*) FROM cargo_handling JOIN ports ON cargo_handling.port_id = ports.port_id WHERE ports.country = 'India' AND cargo_handling.operation_type = 'unloading';,SELECT COUNT(*) FROM cargo_handling JOIN ports ON cargo_handling.port_id = ports.port_id WHERE ports.country = 'India' AND cargo_handling.operation_type = 'Unloading';,0 Insert a new record of water usage in the industrial sector in Florida in 2020 with a usage of 9.2.,"CREATE TABLE industrial_water_usage (state VARCHAR(20), year INT, usage FLOAT);","INSERT INTO industrial_water_usage (state, year, usage) VALUES ('Florida', 2020, 9.2);","INSERT INTO industrial_water_usage (state, year, usage) VALUES ('Florida', 2020, 9.2);",1 What is the average revenue for traditional art forms in each country?,"CREATE TABLE art_forms (id INT, name TEXT, type TEXT, country TEXT, revenue INT); ","SELECT country, AVG(revenue) FROM art_forms GROUP BY country;","SELECT country, AVG(revenue) FROM art_forms WHERE type = 'Traditional' GROUP BY country;",0 What was the total budget allocated for healthcare in the East region in the first half of 2022?,"CREATE TABLE Budget (half INT, region VARCHAR(255), service VARCHAR(255), amount INT); ","SELECT SUM(amount) FROM Budget WHERE half IN (1, 2) AND region = 'East' AND service = 'Healthcare';",SELECT SUM(amount) FROM Budget WHERE region = 'East' AND service = 'Healthcare' AND half = 1;,0 "List all pollution sources from the 'PollutionSources' table, ordered by the date they were added to the database.","CREATE TABLE PollutionSources (SourceID INT PRIMARY KEY, SourceName TEXT, AddedDate DATE);",SELECT SourceName FROM PollutionSources ORDER BY AddedDate;,"SELECT SourceName, AddedDate FROM PollutionSources ORDER BY AddedDate;",0 List all biotech startups that received funding in the last 6 months.,"CREATE SCHEMA if not exists biotech;CREATE TABLE biotech.startups_funding (id INT, startup_name VARCHAR(50), funding_date DATE, funding_amount DECIMAL(10,2));","SELECT * FROM biotech.startups_funding WHERE funding_date >= DATE_SUB(CURDATE(), INTERVAL 6 MONTH);","SELECT startup_name FROM biotech.startups_funding WHERE funding_date >= DATEADD(month, -6, GETDATE());",0 "How many bridges in Texas have a length greater than 500 meters and were built after 1990, along with their average maintenance cost?","CREATE TABLE Bridges (id INT, state VARCHAR(2), length FLOAT, build_year INT, maintenance_cost FLOAT); ","SELECT COUNT(*), AVG(maintenance_cost) FROM Bridges WHERE state = 'TX' AND length > 500 AND build_year > 1990;","SELECT COUNT(*), AVG(maintenance_cost) FROM Bridges WHERE state = 'Texas' AND length > 500 AND build_year > 1990;",0 What is the most common mental health condition among patients in Texas?,"CREATE TABLE patients (id INT, name TEXT, condition TEXT, state TEXT);","SELECT patients.condition, COUNT(patients.condition) FROM patients WHERE patients.state = 'Texas' GROUP BY patients.condition ORDER BY COUNT(patients.condition) DESC LIMIT 1;","SELECT condition, COUNT(*) as count FROM patients WHERE state = 'Texas' GROUP BY condition ORDER BY count DESC LIMIT 1;",0 "Who is Charleston Southerns head coach where the result is L, 56-6?-","CREATE TABLE table_26240481_1 (charleston_southerns_head_coach VARCHAR, result VARCHAR);","SELECT charleston_southerns_head_coach FROM table_26240481_1 WHERE result = ""L, 56-6"";","SELECT charleston_southerns_head_coach FROM table_26240481_1 WHERE result = ""L, 56-6"";",1 Which class has a rank of 5th?,"CREATE TABLE table_name_79 (class VARCHAR, rank VARCHAR);","SELECT class FROM table_name_79 WHERE rank = ""5th"";","SELECT class FROM table_name_79 WHERE rank = ""5th"";",1 List all classical music concerts in Paris.,"CREATE TABLE Concerts (id INT, city VARCHAR(30), genre VARCHAR(20)); ",SELECT * FROM Concerts WHERE city = 'Paris' AND genre = 'Classical';,SELECT * FROM Concerts WHERE city = 'Paris' AND genre = 'Classical';,1 Who was the away team when Geelong was the home team?,"CREATE TABLE table_name_41 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team FROM table_name_41 WHERE home_team = ""geelong"";","SELECT away_team FROM table_name_41 WHERE home_team = ""geelong"";",1 What type of race took place on the course Orta San Giulio to Milan?,"CREATE TABLE table_name_14 (type VARCHAR, course VARCHAR);","SELECT type FROM table_name_14 WHERE course = ""orta san giulio to milan"";","SELECT type FROM table_name_14 WHERE course = ""orta san giovani to milan"";",0 Who are the top 3 authors with the most articles on disinformation detection?,"CREATE TABLE articles (id INT, author_id INT, title TEXT, topic TEXT); CREATE TABLE authors (id INT, name TEXT); ","SELECT a.name, COUNT(*) as article_count FROM authors a JOIN articles ar ON a.id = ar.author_id WHERE ar.topic = 'Disinformation Detection' GROUP BY a.name ORDER BY article_count DESC LIMIT 3;","SELECT authors.name, COUNT(articles.id) as articles_count FROM articles INNER JOIN authors ON articles.author_id = authors.id WHERE articles.topic = 'disinformation detection' GROUP BY authors.name ORDER BY articles_count DESC LIMIT 3;",0 List the range distroration for the ramsan-630,"CREATE TABLE table_27615520_1 (form_factor VARCHAR, product_name VARCHAR);","SELECT form_factor FROM table_27615520_1 WHERE product_name = ""RamSan-630"";","SELECT form_factor FROM table_27615520_1 WHERE product_name = ""Ramsan-630"";",0 What are the top 10 suppliers with the highest revenue from defense contracts?,"CREATE TABLE supplier_contracts (id INT, contract_id VARCHAR(50), supplier_id VARCHAR(50), contract_amount DECIMAL(10,2)); CREATE TABLE suppliers (id INT, supplier_id VARCHAR(50), supplier_name VARCHAR(100), industry VARCHAR(50));","SELECT s.supplier_name, SUM(sc.contract_amount) AS revenue FROM supplier_contracts sc INNER JOIN suppliers s ON sc.supplier_id = s.supplier_id WHERE s.industry = 'Defense' GROUP BY s.supplier_name ORDER BY revenue DESC LIMIT 10;","SELECT s.supplier_name, SUM(s.contract_amount) as total_revenue FROM supplier_contracts s JOIN suppliers s ON s.supplier_id = s.supplier_id WHERE s.industry = 'defense' GROUP BY s.supplier_name ORDER BY total_revenue DESC LIMIT 10;",0 What is the average mental health score for all students?,"CREATE TABLE mental_health (student_id INT, course_name TEXT, score INT); ",SELECT AVG(score) FROM mental_health;,SELECT AVG(score) FROM mental_health;,1 List all Mars rovers and their launch dates.,"CREATE TABLE rovers (name VARCHAR(50), mission_name VARCHAR(50), launch_date DATE); ","SELECT name, launch_date FROM rovers;","SELECT name, launch_date FROM rovers WHERE mission_name = 'Mars';",0 What is the average property price for buildings with a green certification in each city?,"CREATE TABLE cities (id INT, name VARCHAR(30)); CREATE TABLE properties (id INT, city VARCHAR(20), price INT, green_certified BOOLEAN); ","SELECT cities.name, AVG(properties.price) FROM cities INNER JOIN properties ON cities.name = properties.city WHERE properties.green_certified = true GROUP BY cities.name;","SELECT c.name, AVG(p.price) as avg_price FROM properties p JOIN cities c ON p.city = c.id WHERE p.green_certified = true GROUP BY c.name;",0 "List all digital assets with their respective smart contract names and the number of transactions, sorted by the total transaction count in descending order. If there is no associated smart contract, display 'N/A'.","CREATE TABLE smart_contracts (contract_id INT, contract_name VARCHAR(255), total_transactions INT); CREATE TABLE assets_contracts (asset_id INT, contract_id INT); CREATE TABLE assets (asset_id INT, asset_name VARCHAR(255));","SELECT a.asset_name, sc.contract_name, SUM(sc.total_transactions) as total_transactions FROM assets a LEFT JOIN assets_contracts ac ON a.asset_id = ac.asset_id LEFT JOIN smart_contracts sc ON ac.contract_id = sc.contract_id GROUP BY a.asset_id, sc.contract_name ORDER BY total_transactions DESC;","SELECT assets.asset_name, SUM(smart_contracts.total_transactions) as total_transactions FROM assets JOIN assets ON assets.asset_id = assets.asset_id JOIN smart_contracts ON assets.contract_id = smart_contracts.contract_id GROUP BY assets.asset_name ORDER BY total_transactions DESC;",0 Which team has points less than 6 in a year after 1969?,"CREATE TABLE table_name_81 (team VARCHAR, points VARCHAR, year VARCHAR);",SELECT team FROM table_name_81 WHERE points < 6 AND year > 1969;,SELECT team FROM table_name_81 WHERE points 6 AND year > 1969;,0 List the names and completion dates for projects in the 'public_works' schema where the completion date is after the start date,"CREATE SCHEMA IF NOT EXISTS public_works; CREATE TABLE public_works.projects (id INT, name VARCHAR(100), start_date DATE, completed_date DATE); ","SELECT name, completed_date FROM public_works.projects WHERE completed_date > start_date;","SELECT name, completed_date FROM public_works.projects WHERE completed_date > start_date;",1 What is the name of the spacecraft that had the highest average speed?,"CREATE TABLE SpacecraftSpeed (Id INT, Spacecraft VARCHAR(50), AverageSpeed FLOAT); ","SELECT Spacecraft FROM (SELECT Spacecraft, ROW_NUMBER() OVER (ORDER BY AverageSpeed DESC) AS Rank FROM SpacecraftSpeed) AS Subquery WHERE Rank = 1",SELECT Spacecraft FROM SpacecraftSpeed ORDER BY AverageSpeed DESC LIMIT 1;,0 What is the distribution of decentralized finance (DeFi) protocols by platform type in Southeast Asia?,"CREATE TABLE defi (id INT, name VARCHAR(50), platform VARCHAR(50), country VARCHAR(50)); ","SELECT platform, COUNT(*) as defi_count FROM defi WHERE country IN ('Singapore', 'Malaysia', 'Thailand') GROUP BY platform;","SELECT platform, COUNT(*) as num_protocols FROM defi WHERE country IN ('Southeast Asia') GROUP BY platform;",0 Who is the top supplier of military equipment to the Pacific Islands in H2 of 2021?,"CREATE TABLE Military_Equipment_Sales(sale_id INT, sale_date DATE, equipment_type VARCHAR(50), supplier VARCHAR(50), region VARCHAR(50), sale_value DECIMAL(10,2));","SELECT supplier, SUM(sale_value) FROM Military_Equipment_Sales WHERE region = 'Pacific Islands' AND sale_date BETWEEN '2021-07-01' AND '2021-12-31' GROUP BY supplier ORDER BY SUM(sale_value) DESC LIMIT 1;","SELECT supplier, SUM(sale_value) as total_sale_value FROM Military_Equipment_Sales WHERE region = 'Pacific Islands' AND sale_date BETWEEN '2021-01-01' AND '2021-06-30' GROUP BY supplier ORDER BY total_sale_value DESC LIMIT 1;",0 Delete all environmental incidents related to 'Operation A' before 2021.,"CREATE TABLE EnvironmentalIncidents (Operation VARCHAR(50), IncidentDate DATE); ",DELETE FROM EnvironmentalIncidents WHERE Operation = 'Operation A' AND IncidentDate < '2021-01-01';,DELETE FROM EnvironmentalIncidents WHERE Operation = 'Operation A' AND IncidentDate '2021-01-01';,0 "What average city has a total less than 2, with a borough greater than 0?","CREATE TABLE table_name_70 (city INTEGER, total VARCHAR, borough VARCHAR);",SELECT AVG(city) FROM table_name_70 WHERE total < 2 AND borough > 0;,SELECT AVG(city) FROM table_name_70 WHERE total 2 AND borough > 0;,0 List all the auto shows in Germany and France.,"CREATE TABLE European_Auto_Shows (id INT, name TEXT, exhibitors INT, country TEXT); ","SELECT name FROM European_Auto_Shows WHERE country IN ('Germany', 'France');","SELECT name FROM European_Auto_Shows WHERE country IN ('Germany', 'France');",1 How many items of each type were shipped via each transportation mode?,"CREATE TABLE shipments (id INT, order_id INT, item_type VARCHAR(50), transportation_mode VARCHAR(50), quantity INT); ","SELECT item_type, transportation_mode, SUM(quantity) as total_quantity FROM shipments GROUP BY item_type, transportation_mode;","SELECT transportation_mode, item_type, SUM(quantity) as total_quantity FROM shipments GROUP BY transportation_mode, item_type;",0 What is the average rating of songs given by fans who have given an above average rating to at least one song?,"CREATE TABLE fans (id INT PRIMARY KEY, name VARCHAR(100), rating_average DECIMAL(3,2)); ",SELECT AVG(f.rating_average) FROM fans f WHERE f.rating_average > (SELECT AVG(rating_average) FROM fans);,SELECT AVG(rating_average) FROM fans WHERE rating_average > (SELECT AVG(rating_average) FROM fans);,0 What is the graduation rate for the school district with headquarters located in Sydney?,"CREATE TABLE table_21514460_1 (graduation_rate__2011_12_ VARCHAR, headquarters VARCHAR);","SELECT graduation_rate__2011_12_ FROM table_21514460_1 WHERE headquarters = ""Sydney"";","SELECT graduation_rate__2011_12_ FROM table_21514460_1 WHERE headquarters = ""Sydney"";",1 What is the average number of participants in community development initiatives led by Indigenous women in Canada?,"CREATE TABLE Community_Development_Initiatives (id INT, initiative_name TEXT, participants INT, leader_gender TEXT, location TEXT); ",SELECT AVG(participants) FROM Community_Development_Initiatives WHERE leader_gender = 'Indigenous' AND location = 'Canada';,SELECT AVG(participants) FROM Community_Development_Initiatives WHERE leader_gender = 'Indigenous' AND location = 'Canada';,1 "What is the average Played, when Club is ""Burgos CF"", and when Draws is less than 7?","CREATE TABLE table_name_32 (played INTEGER, club VARCHAR, draws VARCHAR);","SELECT AVG(played) FROM table_name_32 WHERE club = ""burgos cf"" AND draws < 7;","SELECT AVG(played) FROM table_name_32 WHERE club = ""burgos cf"" AND draws 7;",0 "Insert new records into the 'veteran_employment' table for 'company_name' 'BlueSky' with 'job_title' 'Software Engineer', 'employment_status' 'full-time' and 'start_date' '2022-07-01'","CREATE TABLE veteran_employment (company_name VARCHAR(255), job_title VARCHAR(255), employment_status VARCHAR(255), start_date DATE);","INSERT INTO veteran_employment (company_name, job_title, employment_status, start_date) VALUES ('BlueSky', 'Software Engineer', 'full-time', '2022-07-01');","INSERT INTO veteran_employment (company_name, job_title, employment_status, start_date) VALUES ('BlueSky', 'Software Engineer', 'full-time', '2022-07-01');",1 "What is the maximum number of points scored by a player in a single NBA game, and who was the player?","CREATE TABLE games (game_id INT, date DATE, team1 TEXT, team2 TEXT, player TEXT, points INT);","SELECT player, MAX(points) FROM games;","SELECT player, MAX(points) FROM games GROUP BY player;",0 What is the total number of autonomous driving research papers published in 2021 and 2022?,"CREATE TABLE ResearchPapers (id INT, title VARCHAR(255), publication_year INT, autonomous_driving BOOLEAN); ","SELECT COUNT(*) FROM ResearchPapers WHERE publication_year IN (2021, 2022) AND autonomous_driving = TRUE;","SELECT COUNT(*) FROM ResearchPapers WHERE publication_year IN (2021, 2022) AND autonomous_driving = TRUE;",1 What is the combined of Crowd when richmond played at home?,"CREATE TABLE table_name_91 (crowd VARCHAR, home_team VARCHAR);","SELECT COUNT(crowd) FROM table_name_91 WHERE home_team = ""richmond"";","SELECT COUNT(crowd) FROM table_name_91 WHERE home_team = ""richmond"";",1 Name the total number of date for l 85–86 (ot),"CREATE TABLE table_22654073_6 (date VARCHAR, score VARCHAR);","SELECT COUNT(date) FROM table_22654073_6 WHERE score = ""L 85–86 (OT)"";","SELECT COUNT(date) FROM table_22654073_6 WHERE score = ""L 85–86 (OT)"";",1 "Find the total investment in rural infrastructure projects in the Caribbean, excluding the Bahamas and Haiti.","CREATE TABLE InfrastructureProjects (id INT, project_name TEXT, location TEXT, investment FLOAT); ","SELECT SUM(investment) FROM InfrastructureProjects WHERE location NOT IN ('Bahamas', 'Haiti') AND location LIKE '%Caribbean%';","SELECT SUM(investment) FROM InfrastructureProjects WHERE location NOT IN ('Bahamas', 'Haiti');",0 What was the total budget for education programs in Q1 2023?,"CREATE TABLE Programs (id INT, program_id INT, program_name VARCHAR(100), budget DECIMAL(10, 2), start_date DATE, end_date DATE); ",SELECT SUM(budget) FROM Programs WHERE program_id BETWEEN 301 AND 310 AND start_date <= '2023-03-31' AND end_date >= '2023-01-01';,SELECT SUM(budget) FROM Programs WHERE program_name = 'Education' AND start_date BETWEEN '2023-01-01' AND '2023-03-31';,0 What is the minimum age of attendees who visited the museum last year?,"CREATE TABLE MuseumAttendees (attendeeID INT, visitDate DATE, age INT); ",SELECT MIN(age) FROM MuseumAttendees WHERE visitDate >= '2022-01-01' AND visitDate <= '2022-12-31';,"SELECT MIN(age) FROM MuseumAttendees WHERE visitDate >= DATEADD(year, -1, GETDATE());",0 What was the Winter Olympics was Japan as the country?,"CREATE TABLE table_name_38 (winter_olympics VARCHAR, country VARCHAR);","SELECT winter_olympics FROM table_name_38 WHERE country = ""japan"";","SELECT winter_olympics FROM table_name_38 WHERE country = ""japan"";",1 "If the channels is wxyzuv, what is the number of channels?","CREATE TABLE table_233830_1 (number_of_channels VARCHAR, channels VARCHAR);","SELECT number_of_channels FROM table_233830_1 WHERE channels = ""WXYZUV"";","SELECT number_of_channels FROM table_233830_1 WHERE channels = ""WXYZUV"";",1 What is the minimum number of hours worked per week by workers in the 'workforce_diversity' table by gender?,"CREATE TABLE workforce_diversity (id INT, name VARCHAR(50), position VARCHAR(50), gender VARCHAR(50), hours_worked INT);","SELECT gender, MIN(hours_worked) FROM workforce_diversity WHERE position = 'worker' GROUP BY gender;","SELECT gender, MIN(hours_worked) FROM workforce_diversity GROUP BY gender;",0 "What is Player, when Country is ""England"", and when Place is ""T7""?","CREATE TABLE table_name_50 (player VARCHAR, country VARCHAR, place VARCHAR);","SELECT player FROM table_name_50 WHERE country = ""england"" AND place = ""t7"";","SELECT player FROM table_name_50 WHERE country = ""england"" AND place = ""t7"";",1 Which customers have investments in the technology sector?,"CREATE TABLE Investments (CustomerID INT, Sector VARCHAR(50), Value DECIMAL(10,2)); ",SELECT CustomerID FROM Investments WHERE Sector = 'Technology',SELECT CustomerID FROM Investments WHERE Sector = 'Technology';,0 "For the verb dhoa, what is the 2VF?",CREATE TABLE table_name_75 (verb VARCHAR);,"SELECT 2 AS __vf_ FROM table_name_75 WHERE verb = ""dhoa"";","SELECT 2 AS fvv FROM table_name_75 WHERE verb = ""dhoa"";",0 Show military spending by each country in the last 5 years,"CREATE TABLE military_spending (country VARCHAR(50), year INT, amount FLOAT); ","SELECT country, year, amount FROM military_spending WHERE year >= (YEAR(CURDATE()) - 5);","SELECT country, amount FROM military_spending WHERE year BETWEEN (YEAR(CURRENT_DATE) - 5) AND YEAR(CURRENT_DATE) GROUP BY country;",0 "What time/retired for a grid less than 19, under 21 laps, and made by aprilia?","CREATE TABLE table_name_38 (time_retired VARCHAR, laps VARCHAR, grid VARCHAR, manufacturer VARCHAR);","SELECT time_retired FROM table_name_38 WHERE grid < 19 AND manufacturer = ""aprilia"" AND laps < 21;","SELECT time_retired FROM table_name_38 WHERE grid 19 AND manufacturer = ""aprilia"" AND laps 21;",0 Identify the most common disinformation topics in the past month.,"CREATE TABLE Disinformation (ID INT, Topic TEXT, Date DATE); ","SELECT Topic, COUNT(*) as Count FROM Disinformation WHERE Date >= DATEADD(month, -1, CURRENT_DATE) GROUP BY Topic ORDER BY Count DESC LIMIT 1;","SELECT Topic, COUNT(*) FROM Disinformation WHERE Date >= DATEADD(month, -1, GETDATE()) GROUP BY Topic ORDER BY COUNT(*) DESC LIMIT 1;",0 What time for the entrant weighing 54.4kg?,"CREATE TABLE table_20626467_1 (time VARCHAR, weight__kg_ VARCHAR);","SELECT time FROM table_20626467_1 WHERE weight__kg_ = ""54.4kg"";","SELECT time FROM table_20626467_1 WHERE weight__kg_ = ""54.4"";",0 Calculate the total duration of successful authentications for the user 'jane.doe'.,"CREATE TABLE AuthenticationLogs (id INT PRIMARY KEY, username VARCHAR(255), login_time TIMESTAMP, logout_time TIMESTAMP, authentication_status VARCHAR(50)); ","SELECT username, SUM(TIMESTAMPDIFF(MINUTE, login_time, logout_time)) FROM AuthenticationLogs WHERE username = 'jane.doe' AND authentication_status = 'Success' GROUP BY username;",SELECT SUM(duration) FROM AuthenticationLogs WHERE username = 'jane.doe' AND authentication_status = 'Successful';,0 What is the result for the Call to Arms I event?,"CREATE TABLE table_name_98 (res VARCHAR, event VARCHAR);","SELECT res FROM table_name_98 WHERE event = ""call to arms i"";","SELECT res FROM table_name_98 WHERE event = ""call to arms i"";",1 What is the total number of hotels with sustainable practices in Rio de Janeiro?,"CREATE TABLE hotels (id INT, name VARCHAR(255), city VARCHAR(255), sustainable BOOLEAN); ",SELECT COUNT(*) FROM hotels WHERE city = 'Rio de Janeiro' AND sustainable = TRUE;,SELECT COUNT(*) FROM hotels WHERE city = 'Rio de Janeiro' AND sustainable = true;,0 How many different curators participated in art exhibitions in 2019?,"CREATE TABLE Curators (id INT, name VARCHAR(50), exhibition_id INT);",SELECT COUNT(DISTINCT name) FROM Curators C INNER JOIN Exhibitions E ON C.exhibition_id = E.id WHERE E.year = 2019;,SELECT COUNT(DISTINCT name) FROM Curators WHERE YEAR(exhibition_id) = 2019;,0 Rank military equipment maintenance requests by the number of requests per month in descending order.,"CREATE TABLE Maintenance_Requests (Equipment VARCHAR(50), Request_Month DATE, Quantity INT); ","SELECT Equipment, ROW_NUMBER() OVER (ORDER BY SUM(Quantity) DESC) as Rank FROM Maintenance_Requests GROUP BY Equipment;","SELECT Equipment, Request_Month, Quantity, RANK() OVER (ORDER BY Request_Month DESC) as Rank FROM Maintenance_Requests;",0 What is the average claim amount for policies in 'FL'?,"CREATE TABLE policyholders (id INT, name TEXT, city TEXT, state TEXT); CREATE TABLE claims (id INT, policyholder_id INT, amount INT); CREATE TABLE policy_claims (policyholder_id INT, total_claims INT); ","SELECT AVG(claims) FROM (SELECT policyholder_id, SUM(amount) AS claims FROM claims JOIN policyholders ON claims.policyholder_id = policyholders.id WHERE policyholders.state = 'FL' GROUP BY policyholder_id) AS subquery;",SELECT AVG(claims.amount) FROM claims INNER JOIN policy_claims ON claims.policyholder_id = policy_claims.policyholder_id WHERE policyholders.state = 'FL';,0 Compare the number of sustainable fabric types used by brands 'Green Visions' and 'Ethical Fashions' in the 'Textiles' table.,"CREATE TABLE Textiles (brand VARCHAR(20), fabric_type VARCHAR(20)); ",SELECT COUNT(DISTINCT fabric_type) FROM Textiles WHERE brand = 'Green Visions' INTERSECT SELECT COUNT(DISTINCT fabric_type) FROM Textiles WHERE brand = 'Ethical Fashions';,"SELECT COUNT(*) FROM Textiles WHERE brand IN ('Green Visions', 'Ethical Fashions');",0 What is the Point of Chassis of Lancia d50 in 1954,"CREATE TABLE table_name_91 (points VARCHAR, chassis VARCHAR, year VARCHAR);","SELECT points FROM table_name_91 WHERE chassis = ""lancia d50"" AND year = 1954;","SELECT points FROM table_name_91 WHERE chassis = ""lancia d50"" AND year = 1954;",1 What are the LOA (metres) of boat with sail number M10?,"CREATE TABLE table_20854943_2 (loa__metres_ VARCHAR, sail_number VARCHAR);","SELECT loa__metres_ FROM table_20854943_2 WHERE sail_number = ""M10"";","SELECT loa__metres_ FROM table_20854943_2 WHERE sail_number = ""M10"";",1 Which organizations have the highest total donations?,"CREATE TABLE organization (id INT PRIMARY KEY, name VARCHAR(255));CREATE TABLE donation (id INT PRIMARY KEY, organization_id INT, amount DECIMAL(10,2));","SELECT o.name, SUM(d.amount) AS total_donations FROM organization o JOIN donation d ON o.id = d.organization_id GROUP BY o.id ORDER BY total_donations DESC LIMIT 10;","SELECT o.name, SUM(d.amount) as total_donations FROM organization o JOIN donation d ON o.id = d.organization_id GROUP BY o.name ORDER BY total_donations DESC LIMIT 1;",0 Identify zip codes with high health equity scores.,"CREATE TABLE health_equity_metrics (id INT PRIMARY KEY, zip_code VARCHAR(10), population INT, health_score INT); CREATE VIEW zip_health_avg AS SELECT zip_code, AVG(health_score) as avg_health_score FROM health_equity_metrics GROUP BY zip_code;","SELECT zip_code, AVG(health_score) as avg_health_score FROM health_equity_metrics GROUP BY zip_code HAVING AVG(health_score) > 80;","SELECT zip_code, AVG(avg_health_score) as avg_health_score FROM zip_health_avg GROUP BY zip_code;",0 Calculate the total premium for policyholders living in 'WA' and 'OR'.,"CREATE TABLE policyholders (id INT, name TEXT, state TEXT, policy_type TEXT, premium FLOAT); ","SELECT state, SUM(premium) as total_premium FROM policyholders WHERE state IN ('WA', 'OR') GROUP BY state;","SELECT SUM(premium) FROM policyholders WHERE state IN ('WA', 'OR');",0 What was the date of the home game against Accrington?,"CREATE TABLE table_name_65 (date VARCHAR, team VARCHAR, venue VARCHAR);","SELECT date FROM table_name_65 WHERE team = ""accrington"" AND venue = ""home"";","SELECT date FROM table_name_65 WHERE team = ""accrington"" AND venue = ""home"";",1 What is the ratio of Promethium to Holmium production in 2020?,"CREATE TABLE Promethium_Production (year INT, production FLOAT); CREATE TABLE Holmium_Production (year INT, production FLOAT); ",SELECT production[year=2020]/(SELECT production FROM Holmium_Production WHERE year = 2020) FROM Promethium_Production WHERE year = 2020;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Promethium_Production WHERE year = 2020)) AS ratio FROM Promethium_Production WHERE year = 2020;,0 What is the average number of military innovation projects completed per year in 'innovation_table'?,"CREATE TABLE innovation_table (id INT, project_name VARCHAR(100), country VARCHAR(50), status VARCHAR(20), year INT); ",SELECT AVG(num_projects_per_year) FROM (SELECT YEAR(CURDATE()) - year AS num_projects_per_year FROM innovation_table) AS innovation_years;,SELECT AVG(year) FROM innovation_table WHERE status = 'Completed';,0 List donors who have not donated in the last 6 months,"CREATE TABLE donors (id INT, last_donation DATE); INSERT INTO donors VALUES (1, '2021-06-01')","SELECT d.id, d.last_donation FROM donors d WHERE d.last_donation < DATE_SUB(CURDATE(), INTERVAL 6 MONTH);","SELECT donors.id FROM donors INNER JOIN donors ON donors.id = donors.id WHERE donors.last_donation DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",0 What is the average attendance at dance performances in Rio de Janeiro in 2019?,"CREATE TABLE performance_attendance (id INT, city VARCHAR(20), year INT, genre VARCHAR(20), attendance INT); ",SELECT AVG(attendance) FROM performance_attendance WHERE city = 'Rio de Janeiro' AND genre = 'dance' AND year = 2019;,SELECT AVG(attendance) FROM performance_attendance WHERE city = 'Rio de Janeiro' AND year = 2019 AND genre = 'Dance';,0 What is the year of introduction for the Electro-Diesel locomotive?,"CREATE TABLE table_name_64 (introduced VARCHAR, type VARCHAR);","SELECT introduced FROM table_name_64 WHERE type = ""electro-diesel locomotive"";","SELECT introduced FROM table_name_64 WHERE type = ""electron-diesel"";",0 How many Mountains Classifications were in the race with Mike Northey as Youth Classification?,"CREATE TABLE table_23157997_13 (mountains_classification VARCHAR, youth_classification VARCHAR);","SELECT COUNT(mountains_classification) FROM table_23157997_13 WHERE youth_classification = ""Mike Northey"";","SELECT COUNT(mountains_classification) FROM table_23157997_13 WHERE youth_classification = ""Mike Northey"";",1 How many points did the Weslake v12 get in 1966?,"CREATE TABLE table_name_28 (points INTEGER, engine VARCHAR, year VARCHAR);","SELECT MAX(points) FROM table_name_28 WHERE engine = ""weslake v12"" AND year < 1966;","SELECT SUM(points) FROM table_name_28 WHERE engine = ""weslake v12"" AND year = 1966;",0 What was the result in the event 1 medley for the man with a 4 (6 in 31.85s) in the event 3 squat lift?,"CREATE TABLE table_24302700_2 (event_1_medley VARCHAR, event_3_squat_lift VARCHAR);","SELECT event_1_medley FROM table_24302700_2 WHERE event_3_squat_lift = ""4 (6 in 31.85s)"";","SELECT event_1_medley FROM table_24302700_2 WHERE event_3_squat_lift = ""4 (6 in 31.85s)"";",1 Name the type for headquarters principal activites.,"CREATE TABLE table_name_53 (type VARCHAR, principal_activities VARCHAR);","SELECT type FROM table_name_53 WHERE principal_activities = ""headquarters"";","SELECT type FROM table_name_53 WHERE principal_activities = ""quartermaster"";",0 "When curtis strange had a to par +1, what was his score?","CREATE TABLE table_name_42 (score VARCHAR, to_par VARCHAR, player VARCHAR);","SELECT score FROM table_name_42 WHERE to_par = ""+1"" AND player = ""curtis strange"";","SELECT score FROM table_name_42 WHERE to_par = ""+1"" AND player = ""curtis strange"";",1 What is the maximum budget spent on disability support programs in each country?,"CREATE TABLE Country (id INT, name TEXT, budget DECIMAL(10,2)); ","SELECT name, MAX(budget) FROM Country GROUP BY name;","SELECT name, MAX(budget) FROM Country GROUP BY name;",1 Which biosensors were developed in '2021'?,"CREATE TABLE Biosensor (biosensor_id INT, name TEXT, year INT); ",SELECT name FROM Biosensor WHERE year = 2021;,SELECT name FROM Biosensor WHERE year = 2021;,1 "Which race was in Sydney, New South Wales?","CREATE TABLE table_name_37 (race_name VARCHAR, city_state VARCHAR);","SELECT race_name FROM table_name_37 WHERE city_state = ""sydney, new south wales"";","SELECT race_name FROM table_name_37 WHERE city_state = ""sydney, new south wales"";",1 How many unique artifact types are present in the 'Artifact_Inventory' table?,"CREATE TABLE Artifact_Inventory (id INT, artifact_name VARCHAR(50), artifact_type VARCHAR(50)); ",SELECT COUNT(DISTINCT artifact_type) FROM Artifact_Inventory;,SELECT COUNT(DISTINCT artifact_type) FROM Artifact_Inventory;,1 What is the 1st round with a team 2 paris sg (d1)?,CREATE TABLE table_name_91 (team_2 VARCHAR);,"SELECT 1 AS st_round FROM table_name_91 WHERE team_2 = ""paris sg (d1)"";","SELECT 1 AS st_round FROM table_name_91 WHERE team_2 = ""paris sg (d1)"";",1 What is the total sales of refillable cosmetic products by month?,"CREATE TABLE months (month_id INT, month_name VARCHAR(255)); CREATE TABLE products (product_id INT, product_name VARCHAR(255), is_refillable BOOLEAN, sales INT, month_id INT);","SELECT m.month_name, SUM(p.sales) as total_sales FROM months m INNER JOIN products p ON m.month_id = p.month_id WHERE p.is_refillable = TRUE GROUP BY m.month_name;","SELECT m.month_name, SUM(p.sales) as total_sales FROM months m JOIN products p ON m.month_id = p.month_id WHERE p.is_refillable = true GROUP BY m.month_name;",0 What is the average donation amount from donors in California?,"CREATE TABLE donors (id INT, name TEXT, state TEXT, donation_amount DECIMAL); ",SELECT AVG(donation_amount) FROM donors WHERE state = 'California';,SELECT AVG(donation_amount) FROM donors WHERE state = 'California';,1 Calculate the percentage of male and female employees from the 'employee' table,"CREATE TABLE employee (id INT, name VARCHAR(50), gender VARCHAR(50), department_id INT);","SELECT (COUNT(CASE WHEN gender = 'male' THEN 1 END) / COUNT(*) * 100) AS male_percentage, (COUNT(CASE WHEN gender = 'female' THEN 1 END) / COUNT(*) * 100) AS female_percentage FROM employee;","SELECT gender, (COUNT(*) FILTER (WHERE gender = 'Male')) * 100.0 / COUNT(*) FROM employee GROUP BY gender;",0 "Show the top 5 astronauts with the highest number of spacewalks, displaying their astronaut names and the spacewalk counts.","CREATE TABLE Astronauts (Name VARCHAR(50), Spacewalks INT); ","SELECT Name, Spacewalks FROM (SELECT Name, Spacewalks, RANK() OVER (ORDER BY Spacewalks DESC) as Ranking FROM Astronauts) as SubQuery WHERE Ranking <= 5;","SELECT Name, Spacewalks FROM Astronauts ORDER BY Spacewalks DESC LIMIT 5;",0 What are the average prices for items in the appetizer category?,"CREATE TABLE Menu (menu_id INT PRIMARY KEY, item_name VARCHAR(255), category VARCHAR(255), price DECIMAL(5,2));",SELECT AVG(price) FROM Menu WHERE category = 'appetizer';,SELECT AVG(price) FROM Menu WHERE category = 'Appetizer';,0 How many clean energy policies have been implemented in each state?,"CREATE TABLE clean_energy_policies (id INT, state VARCHAR(255), policy_name VARCHAR(255), policy_type VARCHAR(255), year INT);","SELECT state, COUNT(*) FROM clean_energy_policies GROUP BY state;","SELECT state, COUNT(*) FROM clean_energy_policies GROUP BY state;",1 Who was North Melbourne's home opponent?,"CREATE TABLE table_name_33 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_33 WHERE away_team = ""north melbourne"";","SELECT home_team FROM table_name_33 WHERE away_team = ""north melbourne"";",1 Identify the unique treatments for PTSD and OCD,"CREATE TABLE treatments (treatment_id INT, condition VARCHAR(20)); ",SELECT DISTINCT condition FROM treatments;,"SELECT DISTINCT treatment_id FROM treatments WHERE condition IN ('PTSD', 'OCD');",0 What is the highest year that a candidate was first elected?,CREATE TABLE table_1341738_11 (first_elected INTEGER);,SELECT MAX(first_elected) FROM table_1341738_11;,SELECT MAX(first_elected) FROM table_1341738_11;,1 "What is the average income by occupation and gender, and how does it compare to the overall average income?","CREATE TABLE OccupationGenderData (Occupation VARCHAR(255), Gender VARCHAR(10), AvgIncome DECIMAL(10,2)); CREATE TABLE OverallData (OverallAvgIncome DECIMAL(10,2)); ","SELECT Occupation, Gender, AvgIncome, AvgIncome * 100.0 / (SELECT OverallAvgIncome FROM OverallData) AS Percentage FROM OccupationGenderData;","SELECT Occupation, Gender, AvgIncome, AVG(OverallAvgIncome) as AvgIncome FROM OccupationGenderData GROUP BY Occupation, Gender;",0 "With a date of May 1262 under elevated, Guillaume de Bray as the elector, what is the order and title?","CREATE TABLE table_name_78 (order_and_title VARCHAR, elevated VARCHAR, elector VARCHAR);","SELECT order_and_title FROM table_name_78 WHERE elevated = ""may 1262"" AND elector = ""guillaume de bray"";","SELECT order_and_title FROM table_name_78 WHERE elevated = ""may 1262"" AND elector = ""william de bray"";",0 Loss of willis has what record?,"CREATE TABLE table_name_52 (record VARCHAR, loss VARCHAR);","SELECT record FROM table_name_52 WHERE loss = ""willis"";","SELECT record FROM table_name_52 WHERE loss = ""willis"";",1 Calculate the minimum heart rate recorded for users living in Florida on weekends.,"CREATE TABLE users (id INT, state VARCHAR(20)); CREATE TABLE workout_data (id INT, user_id INT, hr INT, date DATE);",SELECT MIN(hr) FROM workout_data w JOIN users u ON w.user_id = u.id WHERE u.state = 'Florida' AND (DAYOFWEEK(w.date) = 1 OR DAYOFWEEK(w.date) = 7);,SELECT MIN(hr) FROM workout_data JOIN users ON workout_data.user_id = users.id WHERE users.state = 'Florida' AND workout_data.date BETWEEN '2022-01-01' AND '2022-01-31';,0 "How many points have 500cc for the class, a win greater than 0, with a year after 1974?","CREATE TABLE table_name_77 (points INTEGER, year VARCHAR, class VARCHAR, wins VARCHAR);","SELECT SUM(points) FROM table_name_77 WHERE class = ""500cc"" AND wins > 0 AND year > 1974;","SELECT SUM(points) FROM table_name_77 WHERE class = ""500cc"" AND wins > 0 AND year > 1974;",1 What is the original air date for episode 4? ,"CREATE TABLE table_23399481_3 (original_air_date VARCHAR, season__number VARCHAR);",SELECT original_air_date FROM table_23399481_3 WHERE season__number = 4;,SELECT original_air_date FROM table_23399481_3 WHERE season__number = 4;,1 How many rounds was the fight when the record was 4-0?,"CREATE TABLE table_name_74 (round VARCHAR, record VARCHAR);","SELECT COUNT(round) FROM table_name_74 WHERE record = ""4-0"";","SELECT round FROM table_name_74 WHERE record = ""4-0"";",0 What is the total number of public transportation users in Sydney?,"CREATE TABLE public_transportation (id INT, users INT, city VARCHAR(20)); ",SELECT SUM(users) FROM public_transportation WHERE city = 'Sydney';,SELECT SUM(users) FROM public_transportation WHERE city = 'Sydney';,1 What is the average heart rate of users aged 25-30 during their workouts?,"CREATE TABLE users (id INT, age INT, gender VARCHAR(10)); CREATE TABLE workouts (id INT, user_id INT, heart_rate INT); ",SELECT AVG(heart_rate) FROM workouts JOIN users ON workouts.user_id = users.id WHERE users.age BETWEEN 25 AND 30;,SELECT AVG(heart_rate) FROM workouts w JOIN users u ON w.user_id = u.id WHERE u.age BETWEEN 25 AND 30;,0 Find the percentage change in water usage from the year 2018 to 2019,"CREATE TABLE water_usage (year INT, usage FLOAT); ","SELECT ((usage_2019.usage - usage_2018.usage) / usage_2018.usage * 100) FROM (SELECT usage FROM water_usage WHERE year = 2018) AS usage_2018, (SELECT usage FROM water_usage WHERE year = 2019) AS usage_2019;",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM water_usage WHERE year = 2018)) * 100.0 / (SELECT COUNT(*) FROM water_usage WHERE year = 2019)) AS percentage_change FROM water_usage WHERE year = 2018;,0 Update the 'game_reviews' table to set the 'rating' column as 5 for the game 'Game1' in the 'Europe' region,"CREATE TABLE game_reviews (review_id INT, player_id INT, game_name VARCHAR(100), rating INT, region VARCHAR(50), date DATE);",UPDATE game_reviews SET rating = 5 WHERE game_name = 'Game1' AND region = 'Europe';,UPDATE game_reviews SET rating = 5 WHERE game_name = 'Game1' AND region = 'Europe';,1 Which date has a Tournament of la quinta?,"CREATE TABLE table_name_14 (date VARCHAR, tournament VARCHAR);","SELECT date FROM table_name_14 WHERE tournament = ""la quinta"";","SELECT date FROM table_name_14 WHERE tournament = ""la quinta"";",1 List all the unique crime types reported in the Riverside district.,"CREATE TABLE CrimeTypes (crime_type TEXT, district TEXT); ",SELECT DISTINCT crime_type FROM CrimeTypes WHERE district = 'Riverside';,SELECT DISTINCT crime_type FROM CrimeTypes WHERE district = 'Riverside';,1 "What is the address, city, and state of properties in 'SustainableCity' with no green certifications?","CREATE TABLE properties (id INT, address VARCHAR(255), city VARCHAR(255), state VARCHAR(255), price INT); CREATE TABLE green_certifications (property_id INT, certification_type VARCHAR(255)); ","SELECT properties.address, properties.city, properties.state FROM properties LEFT JOIN green_certifications ON properties.id = green_certifications.property_id WHERE properties.city = 'SustainableCity' AND green_certifications.property_id IS NULL;","SELECT properties.address, properties.city, properties.state FROM properties INNER JOIN green_certifications ON properties.id = green_certifications.property_id WHERE properties.city = 'SustainableCity' AND green_certifications.certification_type IS NULL;",0 what is the public vote on graeme & kristina,"CREATE TABLE table_19744915_3 (public_vote VARCHAR, couple VARCHAR);","SELECT public_vote FROM table_19744915_3 WHERE couple = ""Graeme & Kristina"";","SELECT public_vote FROM table_19744915_3 WHERE couple = ""Graeme & Kristina"";",1 "List all characteristics of product named ""sesame"" with type code ""Grade"".","CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR, characteristic_id VARCHAR, characteristic_type_code VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR);","SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = ""sesame"" AND t3.characteristic_type_code = ""Grade"";","SELECT T1.characteristic_name FROM products AS T1 JOIN product_characteristics AS T2 ON T1.product_id = T2.product_id JOIN CHARACTERISTICS AS T3 ON T2.characteristic_id = T3.characteristic_id WHERE T3.product_name = ""sesame"" AND T3.characteristic_type_code = ""Grade"";",0 Who was the shooter with a score of 686.4?,"CREATE TABLE table_name_59 (shooter VARCHAR, score VARCHAR);","SELECT shooter FROM table_name_59 WHERE score = ""686.4"";","SELECT shooter FROM table_name_59 WHERE score = ""686.4"";",1 "What is the average number of labor rights violations per month for the year 2020, for each union?","CREATE TABLE labor_rights_violations (union_name TEXT, violation_date DATE); ","SELECT union_name, AVG(EXTRACT(MONTH FROM violation_date)) as avg_violations_per_month FROM labor_rights_violations WHERE EXTRACT(YEAR FROM violation_date) = 2020 GROUP BY union_name;","SELECT union_name, AVG(COUNT(*)) as avg_violations_per_month FROM labor_rights_violations WHERE violation_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY union_name;",0 What special notes are included for the windfarm with a capacity (MW) of 343?,"CREATE TABLE table_name_86 (notes VARCHAR, capacity__mw_ VARCHAR);",SELECT notes FROM table_name_86 WHERE capacity__mw_ = 343;,SELECT notes FROM table_name_86 WHERE capacity__mw_ = 343;,1 What was the average donation amount for each program type in 2022?,"CREATE TABLE Donations (DonationID INT, DonationAmount DECIMAL(10,2), DonationDate DATE, ProgramID INT); CREATE TABLE Programs (ProgramID INT, ProgramType TEXT); ","SELECT ProgramType, AVG(DonationAmount) as AverageDonation FROM Donations INNER JOIN Programs ON Donations.ProgramID = Programs.ProgramID GROUP BY ProgramType;","SELECT Programs.ProgramType, AVG(Donations.DonationAmount) as AvgDonationAmount FROM Donations INNER JOIN Programs ON Donations.ProgramID = Programs.ProgramID WHERE YEAR(DonationDate) = 2022 GROUP BY Programs.ProgramType;",0 What is the Team with a venue of Anyang Stadium?,"CREATE TABLE table_name_96 (team VARCHAR, home_venue VARCHAR);","SELECT team FROM table_name_96 WHERE home_venue = ""anyang stadium"";","SELECT team FROM table_name_96 WHERE home_venue = ""anyang stadium"";",1 What is the total wastewater production (in gallons) per district in Texas for the year 2021?,"CREATE TABLE districts (id INT, name VARCHAR(255)); CREATE TABLE wastewater_production (district_id INT, production INT, date DATE); ","SELECT d.name, SUM(wp.production) as total_production FROM wastewater_production wp JOIN districts d ON wp.district_id = d.id WHERE wp.date BETWEEN '2021-01-01' AND '2021-12-31' AND d.name IN ('DistrictX', 'DistrictY', 'DistrictZ') GROUP BY d.name;","SELECT d.name, SUM(wp.production) as total_production FROM districts d JOIN wastewater_production wp ON d.id = wp.district_id WHERE d.name = 'Texas' AND wp.date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY d.name;",0 How many ends lost when shot % is 88 and ends won are 31?,"CREATE TABLE table_name_72 (ends_lost VARCHAR, shot_pct VARCHAR, ends_won VARCHAR);",SELECT COUNT(ends_lost) FROM table_name_72 WHERE shot_pct = 88 AND ends_won = 31;,"SELECT ends_lost FROM table_name_72 WHERE shot_pct = ""88"" AND ends_won = ""31"";",0 "What is the average duration of successful agricultural innovation projects in South America, rounded to the nearest day?","CREATE TABLE innovation_projects (id INT, project_status TEXT, start_date DATE, end_date DATE, country TEXT); ","SELECT ROUND(AVG(DATEDIFF(end_date, start_date))) FROM innovation_projects WHERE project_status = 'successful' AND country IN ('South America');","SELECT AVG(DATEDIFF(end_date, start_date)) FROM innovation_projects WHERE project_status = 'Successful' AND country = 'South America';",0 Name the successor for james noble died in previous congress,"CREATE TABLE table_225198_3 (successor VARCHAR, reason_for_change VARCHAR);","SELECT successor FROM table_225198_3 WHERE reason_for_change = ""James Noble died in previous Congress"";","SELECT successor FROM table_225198_3 WHERE reason_for_change = ""James Noble died in previous congress"";",0 What is the total weight of all aircraft manufactured by Boeing?,"CREATE TABLE Aircraft (AircraftID INT, Name VARCHAR(100), Manufacturer VARCHAR(50), Weight FLOAT);",SELECT SUM(Weight) FROM Aircraft WHERE Manufacturer = 'Boeing';,SELECT SUM(Weight) FROM Aircraft WHERE Manufacturer = 'Boeing';,1 What is the average number of physiotherapists in rural areas in South Africa?,"CREATE TABLE SouthAfricanHealthcare (Province VARCHAR(20), Location VARCHAR(50), ProviderType VARCHAR(30), NumberOfProviders INT); ","SELECT AVG(NumberOfProviders) FROM SouthAfricanHealthcare WHERE Province IN ('Province A', 'Province B') AND Location LIKE '%Rural Area%' AND ProviderType = 'Physiotherapist';",SELECT AVG(NumberOfProviders) FROM SouthAfricanHealthcare WHERE Province = 'Rural' AND ProviderType = 'Physiotherapist';,0 "Determine the monthly sales trend for sustainable products, along with the overall sales trend.","CREATE TABLE products (id INT PRIMARY KEY, name VARCHAR(255), price DECIMAL(5,2), manufacturer_id INT, is_sustainable BOOLEAN, FOREIGN KEY (manufacturer_id) REFERENCES manufacturers(id)); CREATE TABLE sales (id INT PRIMARY KEY, product_id INT, quantity INT, sale_date DATE, FOREIGN KEY (product_id) REFERENCES products(id));","SELECT EXTRACT(MONTH FROM sale_date) as month, SUM(quantity) FILTER (WHERE is_sustainable) as sustainable_sales, SUM(quantity) as total_sales FROM sales JOIN products ON sales.product_id = products.id GROUP BY month ORDER BY month;","SELECT p.name, s.quantity, s.sale_date, SUM(s.quantity) as total_sales FROM sales s JOIN products p ON s.product_id = p.id WHERE p.is_sustainable = true GROUP BY p.name, s.sale_date;",0 What was the Attendance on April 28?,"CREATE TABLE table_name_40 (attendance INTEGER, date VARCHAR);","SELECT SUM(attendance) FROM table_name_40 WHERE date = ""april 28"";","SELECT SUM(attendance) FROM table_name_40 WHERE date = ""april 28"";",1 Which Class has a Frequency MHz of 107.5?,"CREATE TABLE table_name_76 (class VARCHAR, frequency_mhz VARCHAR);",SELECT class FROM table_name_76 WHERE frequency_mhz = 107.5;,"SELECT class FROM table_name_76 WHERE frequency_mhz = ""107.5"";",0 What is the average production rate of chemical X in the southeast region?,"CREATE TABLE ChemicalProduction (id INT, chemical VARCHAR(255), region VARCHAR(255), production_rate FLOAT); ",SELECT AVG(production_rate) FROM ChemicalProduction WHERE chemical = 'chemical X' AND region = 'southeast';,SELECT AVG(production_rate) FROM ChemicalProduction WHERE chemical = 'chemical X' AND region = 'Southeast';,0 where democratic coalition is eduardo frei ( pdc ) what are all the alliance,"CREATE TABLE table_2651755_2 (alliance VARCHAR, democratic_coalition VARCHAR);","SELECT alliance FROM table_2651755_2 WHERE democratic_coalition = ""Eduardo Frei ( PDC )"";","SELECT alliance FROM table_2651755_2 WHERE democratic_coalition = ""Eduardo Frei ( PDC )"";",1 What was the total cost of manufacturing spacecrafts in the year 2025?,"CREATE TABLE spacecraft_manufacturing(id INT, cost FLOAT, year INT, manufacturer VARCHAR(20)); ",SELECT SUM(cost) FROM spacecraft_manufacturing WHERE year = 2025;,SELECT SUM(cost) FROM spacecraft_manufacturing WHERE year = 2025;,1 What is the total number of military bases located in 'Asia' and 'Africa'?,"CREATE TABLE MilitaryBases (ID INT, BaseName VARCHAR(50), Country VARCHAR(50)); ","SELECT COUNT(*) FROM MilitaryBases WHERE Country IN ('Asia', 'Africa');","SELECT COUNT(*) FROM MilitaryBases WHERE Country IN ('Asia', 'Africa');",1 What is the maximum salary of employees working in social good organizations?,"CREATE TABLE employees (id INT, salary FLOAT, organization_type VARCHAR(255)); ",SELECT MAX(salary) FROM employees WHERE organization_type = 'social good';,SELECT MAX(salary) FROM employees WHERE organization_type = 'Social Good';,0 What are the names of clients who have had cases in the same regions as the client with the highest billing amount?,"CREATE TABLE Clients (ClientID INT, Name TEXT, Region TEXT); CREATE TABLE Cases (CaseID INT, ClientID INT, Hours DECIMAL, HourlyRate DECIMAL); ",SELECT c2.Name FROM Clients c1 INNER JOIN Clients c2 ON c1.Region = c2.Region WHERE c1.ClientID = (SELECT ClientID FROM Clients c INNER JOIN Cases ca ON c.ClientID = ca.ClientID GROUP BY c.ClientID ORDER BY SUM(ca.Hours * ca.HourlyRate) DESC LIMIT 1);,SELECT Clients.Name FROM Clients INNER JOIN Cases ON Clients.ClientID = Cases.ClientID WHERE Cases.Hours = (SELECT MAX(Hours.Hours) FROM Cases);,0 What is the total quantity of products sold by retailers located in the US and Canada?,"CREATE TABLE retailers (id INT, name TEXT, country TEXT); CREATE TABLE sales (id INT, retailer_id INT, product TEXT, quantity INT); ","SELECT SUM(quantity) FROM sales INNER JOIN retailers ON sales.retailer_id = retailers.id WHERE country IN ('USA', 'Canada');","SELECT SUM(sales.quantity) FROM sales INNER JOIN retailers ON sales.retailer_id = retailers.id WHERE retailers.country IN ('USA', 'Canada');",0 What penalties has P.I.M. of 34.5?,"CREATE TABLE table_name_88 (penalties VARCHAR, pim VARCHAR);","SELECT penalties FROM table_name_88 WHERE pim = ""34.5"";","SELECT penalties FROM table_name_88 WHERE pim = ""34.5"";",1 "What is the total distance walked by members with a step count greater than 10,000 in 2021?","CREATE TABLE wearable_data (member_id INT, step_count INT, distance FLOAT, record_date DATE); ",SELECT SUM(distance) FROM wearable_data WHERE step_count > 10000 AND record_date >= '2021-01-01' AND record_date < '2022-01-01';,SELECT SUM(distance) FROM wearable_data WHERE step_count > 10000 AND record_date BETWEEN '2021-01-01' AND '2021-12-31';,0 Name the least first elected,CREATE TABLE table_2668352_11 (first_elected INTEGER);,SELECT MIN(first_elected) FROM table_2668352_11;,SELECT MIN(first_elected) FROM table_2668352_11;,1 Which marine species were found in 'Antarctica' or 'Africa' in 2020?,"CREATE TABLE Species_2 (id INT, name VARCHAR(255), region VARCHAR(255), year INT); ",SELECT name FROM Species_2 WHERE region = 'Antarctica' UNION SELECT name FROM Species_2 WHERE region = 'Africa';,"SELECT name FROM Species_2 WHERE region IN ('Antarctica', 'Africa') AND year = 2020;",0 "Venue of klfa stadium, cheras, and a Score of 3-3 had what competition?","CREATE TABLE table_name_71 (competition VARCHAR, venue VARCHAR, score VARCHAR);","SELECT competition FROM table_name_71 WHERE venue = ""klfa stadium, cheras"" AND score = ""3-3"";","SELECT competition FROM table_name_71 WHERE venue = ""klfa stadium, cheras"" AND score = ""3-3"";",1 "In the circuit Showevent Olympiastadion München, where the winning driver is Bruno Spengler, what is the pole position?","CREATE TABLE table_26267607_2 (pole_position VARCHAR, winning_driver VARCHAR, circuit VARCHAR);","SELECT pole_position FROM table_26267607_2 WHERE winning_driver = ""Bruno Spengler"" AND circuit = ""Showevent Olympiastadion München"";","SELECT pole_position FROM table_26267607_2 WHERE winning_driver = ""Bruno Spengler"" AND circuit = ""Showevent Olympiastadion München"";",1 "How many customers in each age group have made a purchase in the past year, grouped by their preferred sustainable fabric type?","CREATE TABLE Customers (CustomerID INT, Age INT, PreferredFabric TEXT); ","SELECT PreferredFabric, Age, COUNT(DISTINCT Customers.CustomerID) FROM Customers INNER JOIN Purchases ON Customers.CustomerID = Purchases.CustomerID WHERE Purchases.PurchaseDate BETWEEN '2021-01-01' AND '2022-12-31' GROUP BY PreferredFabric, Age;","SELECT Age, PreferredFabric, COUNT(*) FROM Customers WHERE PreferredFabric = 'Sustainable' AND PurchaseDate >= DATEADD(year, -1, GETDATE()) GROUP BY Age, PreferredFabric;",0 Which Call sign has an ERP W of 75?,"CREATE TABLE table_name_23 (call_sign VARCHAR, erp_w VARCHAR);",SELECT call_sign FROM table_name_23 WHERE erp_w = 75;,SELECT call_sign FROM table_name_23 WHERE erp_w = 75;,1 What is the total number of steps taken by each member on the third day of 2022?,"CREATE TABLE member (id INT, name VARCHAR(50), age INT, city VARCHAR(50)); CREATE TABLE wearable_tech (id INT, member_id INT, date DATE, steps INT, heart_rate INT); ","SELECT member_id, SUM(steps) as total_steps FROM wearable_tech WHERE date = '2022-01-03' GROUP BY member_id;","SELECT m.name, SUM(w.steps) as total_steps FROM member m JOIN wearable_tech w ON m.id = w.member_id WHERE w.date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY m.name;",0 What is the average age of players who prefer FPS games?,"CREATE TABLE Players (PlayerID INT, Name VARCHAR(50), Age INT, PreferredGame VARCHAR(50)); ",SELECT AVG(Age) FROM Players WHERE PreferredGame = 'FPS';,SELECT AVG(Age) FROM Players WHERE PreferredGame = 'FPS';,1 How many public parks are there in each region?,"CREATE TABLE Parks (region_id INT, num_parks INT); CREATE TABLE Regions (id INT, name VARCHAR(50)); ","SELECT R.name, SUM(P.num_parks) as Total_Parks FROM Parks P JOIN Regions R ON P.region_id = R.id GROUP BY R.name;","SELECT r.name, SUM(p.num_parks) as total_parks FROM Parks p JOIN Regions r ON p.region_id = r.id GROUP BY r.name;",0 Who was the Ottoman Sultan where the treaty at the end of the war was the Treaty of Constantinople (1590)?,"CREATE TABLE table_24706337_1 (ottoman_sultan VARCHAR, treaty_at_the_end_of_the_war VARCHAR);","SELECT ottoman_sultan FROM table_24706337_1 WHERE treaty_at_the_end_of_the_war = ""Treaty of Constantinople (1590)"";","SELECT ottoman_sultan FROM table_24706337_1 WHERE treaty_at_the_end_of_the_war = ""Traity of Constantinople (1590)"";",0 What is the total number of disaster preparedness kits remaining in each region?,"CREATE TABLE regions (name VARCHAR(255)); CREATE TABLE disaster_preparedness_kits (id INT, region VARCHAR(255), quantity INT, distributed INT); ","SELECT region, SUM(quantity - distributed) as total_kits_remaining FROM disaster_preparedness_kits GROUP BY region;","SELECT r.name, SUM(dpk.quantity) as total_kits FROM regions r JOIN disaster_preparedness_kits dpk ON r.name = dpk.region GROUP BY r.name;",0 What is the total funding amount received by biotech startups in 'Boston' from the 'startup_funding' database?,"CREATE TABLE startup_funding (id INT, startup_name VARCHAR(50), city VARCHAR(50), funding_year INT, amount FLOAT); ",SELECT SUM(amount) FROM startup_funding WHERE city = 'Boston';,SELECT SUM(amount) FROM startup_funding WHERE city = 'Boston';,1 List the titles of the books in ascending order of issues.,"CREATE TABLE book (Title VARCHAR, Issues VARCHAR);",SELECT Title FROM book ORDER BY Issues;,SELECT Title FROM book ORDER BY Issues ASC;,0 How many units of each fabric type were used in manufacturing for the Spring 2022 collection?,"CREATE TABLE manufacturing (manufacturing_id INT, fabric_type VARCHAR(50), collection VARCHAR(50), units_used INT);","SELECT fabric_type, SUM(units_used) FROM manufacturing WHERE collection = 'Spring 2022' GROUP BY fabric_type;","SELECT fabric_type, SUM(units_used) FROM manufacturing WHERE collection = 'Spring 2022' GROUP BY fabric_type;",1 Who are the top 5 actors by the number of movies they have acted in?,"CREATE TABLE actors (id INT, name VARCHAR(255), movies INT); ","SELECT name, movies FROM actors ORDER BY movies DESC LIMIT 5;","SELECT name, movies FROM actors ORDER BY movies DESC LIMIT 5;",1 "Which Opponent has a Result of 1–1, and a Date of 28 november 1998?","CREATE TABLE table_name_30 (opponent VARCHAR, result VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_30 WHERE result = ""1–1"" AND date = ""28 november 1998"";","SELECT opponent FROM table_name_30 WHERE result = ""1–1"" AND date = ""28 november 1998"";",1 What is thurs 26 aug when wed 25 aug is 19' 59.98 113.192mph?,"CREATE TABLE table_26986076_2 (thurs_26_aug VARCHAR, wed_25_aug VARCHAR);","SELECT thurs_26_aug FROM table_26986076_2 WHERE wed_25_aug = ""19' 59.98 113.192mph"";","SELECT thurs_26_aug FROM table_26986076_2 WHERE wed_25_aug = ""19' 59.98 113.192mph"";",1 What is the percentage of sustainable material usage across all clothing items in the database?,"CREATE TABLE clothing_items (item_id INT, material VARCHAR(255), sustainable BOOLEAN); ",SELECT 100.0 * SUM(sustainable) / COUNT(*) AS percentage FROM clothing_items;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM clothing_items)) AS percentage FROM clothing_items WHERE sustainable = true;,0 What is the average monthly data usage for postpaid mobile customers in the 'rural' region?,"CREATE TABLE subscribers (id INT, type VARCHAR(10), region VARCHAR(10)); CREATE TABLE usage (subscriber_id INT, monthly_data_usage INT); ",SELECT AVG(monthly_data_usage) FROM usage JOIN subscribers ON usage.subscriber_id = subscribers.id WHERE subscribers.type = 'postpaid' AND subscribers.region = 'rural';,SELECT AVG(usage.monthly_data_usage) FROM usage INNER JOIN subscribers ON usage.subscriber_id = subscribers.id WHERE subscribers.type = 'postpaid' AND subscribers.region = 'rural';,0 Update the launch_status to 'successful' for all records in the satellite_deployment table where the launch_date is on or after 2015-01-01,"CREATE TABLE satellite_deployment (id INT PRIMARY KEY, satellite_name VARCHAR(100), launch_date DATE, launch_status VARCHAR(20));",UPDATE satellite_deployment SET launch_status = 'successful' WHERE launch_date >= '2015-01-01';,UPDATE satellite_deployment SET launch_status ='successful' WHERE launch_date >= '2015-01-01';,0 "What is the average clinic capacity per province, excluding the top 25% of clinics?","CREATE TABLE ClinicCapacity (ProvinceName VARCHAR(50), ClinicName VARCHAR(50), Capacity INT); ","SELECT ProvinceName, AVG(Capacity) AS AvgCapacity FROM (SELECT ProvinceName, Capacity, NTILE(4) OVER (ORDER BY Capacity DESC) AS Quartile FROM ClinicCapacity) AS Subquery WHERE Quartile < 4 GROUP BY ProvinceName","SELECT ProvinceName, AVG(Capacity) FROM ClinicCapacity GROUP BY ProvinceName HAVING COUNT(DISTINCT Capacity) >= 25 GROUP BY ProvinceName;",0 Update the 'HabitatSize' column in the 'HabitatPreservation' table with new data.,"CREATE TABLE HabitatPreservation (AnimalID int, HabitatSize int); ",UPDATE HabitatPreservation SET HabitatSize = CASE AnimalID WHEN 1 THEN 400 WHEN 2 THEN 500 END;,UPDATE HabitatPreservation SET HabitatSize = 1 WHERE AnimalID = 1;,0 "What is the average Money ( $ ), when Country is ""United States"", and when To par is ""+3""?","CREATE TABLE table_name_14 (money___ INTEGER, country VARCHAR, to_par VARCHAR);","SELECT AVG(money___) AS $__ FROM table_name_14 WHERE country = ""united states"" AND to_par = ""+3"";","SELECT AVG(money___) FROM table_name_14 WHERE country = ""united states"" AND to_par = ""+3"";",0 Time of 10.82 has what location?,"CREATE TABLE table_name_84 (location VARCHAR, time VARCHAR);",SELECT location FROM table_name_84 WHERE time = 10.82;,"SELECT location FROM table_name_84 WHERE time = ""10.82"";",0 Who is the mInister who left office during 1960?,"CREATE TABLE table_name_58 (minister VARCHAR, left_office VARCHAR);","SELECT minister FROM table_name_58 WHERE left_office = ""1960"";","SELECT minister FROM table_name_58 WHERE left_office = ""1960"";",1 What is the total capacity of all landfills in Australia?,"CREATE TABLE landfills (name TEXT, country TEXT, capacity INTEGER); ",SELECT SUM(capacity) FROM landfills WHERE country = 'Australia';,SELECT SUM(capacity) FROM landfills WHERE country = 'Australia';,1 Which Score has a Record of 0-1?,"CREATE TABLE table_name_61 (score VARCHAR, record VARCHAR);","SELECT score FROM table_name_61 WHERE record = ""0-1"";","SELECT score FROM table_name_61 WHERE record = ""0-1"";",1 What is the total number of hospital beds in the rural health database?,"CREATE TABLE RuralHospitals (HospitalID INT, Name VARCHAR(100), Location VARCHAR(100), NumberBeds INT); ",SELECT SUM(NumberBeds) FROM RuralHospitals;,SELECT SUM(NumberBeds) FROM RuralHospitals;,1 "Show the total number of players who play 'MOBA' or 'FPS' games, excluding those who play both.","CREATE TABLE Players (player_id INT, name VARCHAR(255), age INT, game_genre VARCHAR(255)); ","SELECT COUNT(*) FROM Players WHERE game_genre IN ('MOBA', 'FPS') GROUP BY game_genre HAVING COUNT(*) = 1;","SELECT COUNT(*) FROM Players WHERE game_genre IN ('MOBA', 'FPS');",0 Which award did Scream receive a nomination and/or win for in 1997?,"CREATE TABLE table_name_27 (award VARCHAR, work VARCHAR, year VARCHAR);","SELECT award FROM table_name_27 WHERE work = ""scream"" AND year = 1997;","SELECT award FROM table_name_27 WHERE work = ""scream"" AND year = 1997;",1 What's the pick for the New York jets with a defensive end?,"CREATE TABLE table_name_54 (pick VARCHAR, position VARCHAR, team VARCHAR);","SELECT pick FROM table_name_54 WHERE position = ""defensive end"" AND team = ""new york jets"";","SELECT pick FROM table_name_54 WHERE position = ""defensive end"" AND team = ""new york jets"";",1 "When Cleveland was 2nd, great lakes in the regular season what did they get to in the playoffs?","CREATE TABLE table_2357201_1 (playoffs VARCHAR, regular_season VARCHAR);","SELECT playoffs FROM table_2357201_1 WHERE regular_season = ""2nd, Great Lakes"";","SELECT playoffs FROM table_2357201_1 WHERE regular_season = ""2nd, Great Lakes"";",1 What is the dominant religion in 2002 for the population of 2337 in 2011?,"CREATE TABLE table_2562572_54 (dominant_religion__2002_ VARCHAR, population__2011_ VARCHAR);",SELECT dominant_religion__2002_ FROM table_2562572_54 WHERE population__2011_ = 2337;,SELECT dominant_religion__2002_ FROM table_2562572_54 WHERE population__2011_ = 2337;,1 What is the average speed of spaceships that landed on Mars?,"CREATE TABLE spaceships (id INT, name VARCHAR(50), max_speed FLOAT, launch_date DATE); ","SELECT AVG(max_speed) FROM spaceships WHERE name IN ('Viking 1', 'Curiosity Rover') AND launch_date LIKE '19__-__-__' OR launch_date LIKE '20__-__-__';",SELECT AVG(max_speed) FROM spaceships WHERE launch_date BETWEEN '2022-01-01' AND '2022-12-31';,0 What is the average number of home runs hit by each player in the MLB?,"CREATE TABLE Players (PlayerID INT, PlayerName VARCHAR(100), Team VARCHAR(100), HomeRuns INT); ","SELECT Team, AVG(HomeRuns) as AvgHomeRuns FROM Players GROUP BY Team;","SELECT PlayerName, AVG(HomeRuns) FROM Players GROUP BY PlayerName;",0 Find the number of unique donors from each country in the last quarter of 2022?,"CREATE TABLE DonorCountry (DonorID INT, DonorName TEXT, DonationAmount DECIMAL(10,2), Country TEXT, DonationDate DATE); ","SELECT Country, COUNT(DISTINCT DonorID) FROM DonorCountry WHERE DonationDate BETWEEN '2022-10-01' AND '2022-12-31' GROUP BY Country;","SELECT Country, COUNT(DISTINCT DonorID) FROM DonorCountry WHERE DonationDate BETWEEN '2022-04-01' AND '2022-03-31' GROUP BY Country;",0 What is the maximum square footage of a Green-Star certified building in the 'GreenBuildings' table?,"CREATE TABLE GreenBuildings ( id INT, name VARCHAR(50), squareFootage INT, certification VARCHAR(10) ); ",SELECT MAX(squareFootage) FROM GreenBuildings WHERE certification = 'Green-Star';,SELECT MAX(squareFootage) FROM GreenBuildings WHERE certification = 'Green-Star';,1 What is the total amount of Shariah-compliant loans issued by Zakat Bank in 2021?,"CREATE TABLE ZakatBank (id INT, loan_type VARCHAR(20), amount INT, issue_date DATE); ",SELECT SUM(amount) FROM ZakatBank WHERE loan_type = 'ShariahCompliant' AND YEAR(issue_date) = 2021;,SELECT SUM(amount) FROM ZakatBank WHERE loan_type = 'Shariah-compliant' AND issue_date BETWEEN '2021-01-01' AND '2021-12-31';,0 Which Total has a Finish of t59?,"CREATE TABLE table_name_81 (total INTEGER, finish VARCHAR);","SELECT MIN(total) FROM table_name_81 WHERE finish = ""t59"";","SELECT SUM(total) FROM table_name_81 WHERE finish = ""t59"";",0 What is the total number of assists for players with under 55 games and over 6 assists per game average?,"CREATE TABLE table_name_11 (total_assists INTEGER, ast_avg VARCHAR, games VARCHAR);",SELECT SUM(total_assists) FROM table_name_11 WHERE ast_avg > 6 AND games < 55;,SELECT SUM(total_assists) FROM table_name_11 WHERE ast_avg > 6 AND games 55;,0 What is the maximum number of views for articles published in 'asia' region?,"CREATE TABLE views (id INT, article_id INT, region VARCHAR(30), views INT); ",SELECT MAX(views) FROM views WHERE region = 'asia';,SELECT MAX(views) FROM views WHERE region = 'asia';,1 What city was the circuit of mallala motor sport park?,"CREATE TABLE table_name_48 (city___state VARCHAR, circuit VARCHAR);","SELECT city___state FROM table_name_48 WHERE circuit = ""mallala motor sport park"";","SELECT city___state FROM table_name_48 WHERE circuit = ""mallala motor sport park"";",1 "Update the duration of the training with id 1 in the ""training"" table to 3","CREATE TABLE training (id INT PRIMARY KEY, employee_id INT, training_type VARCHAR(50), duration INT); ",UPDATE training SET duration = 3 WHERE id = 1;,UPDATE training SET duration = 3 WHERE id = 1;,1 What is the Year of the Film Belle of the Nineties?,"CREATE TABLE table_name_22 (year VARCHAR, film VARCHAR);","SELECT year FROM table_name_22 WHERE film = ""belle of the nineties"";","SELECT year FROM table_name_22 WHERE film = ""belle of the nineties"";",1 Name the episode for run time in 24:44,"CREATE TABLE table_2105721_1 (episode VARCHAR, run_time VARCHAR);","SELECT episode FROM table_2105721_1 WHERE run_time = ""24:44"";","SELECT episode FROM table_2105721_1 WHERE run_time = ""24:44"";",1 Delete all flight safety records before 2000,"CREATE TABLE flight_safety (id INT PRIMARY KEY, incident VARCHAR(50), year INT); ",DELETE FROM flight_safety WHERE year < 2000;,DELETE FROM flight_safety WHERE year 2000;,0 How many grower licenses have been issued in Oregon since 2020?,"CREATE TABLE GrowerLicenses (IssueDate DATE, LicenseNumber INTEGER); ",SELECT COUNT(*) FROM GrowerLicenses WHERE IssueDate >= '2020-01-01';,SELECT SUM(LicenseNumber) FROM GrowerLicenses WHERE IssueDate >= '2020-01-01' AND State = 'Oregon';,0 Identify the community engagement programs in countries with the highest number of endangered languages.,"CREATE TABLE programs (name VARCHAR(255), location VARCHAR(255), endangered_languages INTEGER); ","SELECT programs.name, programs.location FROM programs JOIN (SELECT location, MAX(endangered_languages) AS max_endangered_languages FROM programs GROUP BY location) AS max_endangered_locations ON programs.location = max_endangered_locations.location AND programs.endangered_languages = max_endangered_locations.max_endangered_languages;","SELECT name, location, endangered_languages FROM programs ORDER BY endangered_languages DESC LIMIT 1;",0 "How many employees of each gender work in mining operations, for operations with more than 100 employees?","CREATE TABLE workforce (workforce_id INT, mine_id INT, employee_name VARCHAR(50), gender VARCHAR(10)); ","SELECT mine_id, gender, COUNT(*) as employee_count FROM workforce WHERE (SELECT COUNT(*) FROM workforce w WHERE w.mine_id = workforce.mine_id) > 100 GROUP BY mine_id, gender;","SELECT gender, COUNT(*) FROM workforce GROUP BY gender HAVING COUNT(*) > 100;",0 "Who directed the episode that aired November 21, 2003?","CREATE TABLE table_28859177_2 (directed_by VARCHAR, original_air_date VARCHAR);","SELECT directed_by FROM table_28859177_2 WHERE original_air_date = ""November 21, 2003"";","SELECT directed_by FROM table_28859177_2 WHERE original_air_date = ""November 21, 2003"";",1 What is the average rating of games released by publishers located in the UK?,"CREATE TABLE Publishers (publisher_id INT, name VARCHAR(100), country VARCHAR(50)); CREATE TABLE Games (game_id INT, title VARCHAR(100), rating DECIMAL(3,2), publisher_id INT); ",SELECT AVG(g.rating) FROM Games g INNER JOIN Publishers p ON g.publisher_id = p.publisher_id WHERE p.country = 'United Kingdom';,SELECT AVG(Games.rating) FROM Games INNER JOIN Publishers ON Games.publisher_id = Publishers.publisher_id WHERE Publishers.country = 'UK';,0 Which brands offer the most vegan-friendly products?,"CREATE TABLE brands (brand_id INT PRIMARY KEY, brand_name VARCHAR(50)); CREATE TABLE products (product_id INT, brand_id INT, PRIMARY KEY (product_id, brand_id), FOREIGN KEY (brand_id) REFERENCES brands(brand_id)); CREATE TABLE vegan_products (product_id INT, brand_id INT, PRIMARY KEY (product_id, brand_id), FOREIGN KEY (product_id) REFERENCES products(product_id), FOREIGN KEY (brand_id) REFERENCES brands(brand_id)); ","SELECT brand_name, COUNT(*) as product_count FROM vegan_products JOIN brands ON vegan_products.brand_id = brands.brand_id GROUP BY brand_id ORDER BY product_count DESC;","SELECT brands.brand_name, COUNT(products.product_id) as vegan_product_count FROM brands INNER JOIN vegan_products ON brands.brand_id = vegan_products.brand_id GROUP BY brands.brand_name ORDER BY vegan_product_count DESC LIMIT 1;",0 "What is the maximum number of likes a post received in the past month, that contains the hashtag #climatechange, for accounts located in the United States?","CREATE TABLE accounts (id INT, name VARCHAR(255), location VARCHAR(255)); CREATE TABLE posts (id INT, account_id INT, content TEXT, likes INT, timestamp TIMESTAMP); ",SELECT MAX(likes) FROM posts JOIN accounts ON posts.account_id = accounts.id WHERE posts.timestamp >= NOW() - INTERVAL '1 month' AND posts.content LIKE '%#climatechange%' AND accounts.location = 'USA';,"SELECT MAX(posts.likes) FROM posts JOIN accounts ON posts.account_id = accounts.id WHERE posts.timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) AND posts.content LIKE '%#climatechange%';",0 Find the total number of players who played more than 50% of the game time in the last 6 months.,"CREATE TABLE GameEvents (PlayerID INT, EventTimestamp DATETIME, EventType VARCHAR(255)); ","SELECT COUNT(DISTINCT PlayerID) as TotalPlayers FROM GameEvents WHERE EventType = 'GameStart' AND EventTimestamp BETWEEN DATEADD(month, -6, CURRENT_DATE) AND CURRENT_DATE AND (SELECT COUNT(*) FROM GameEvents as GE2 WHERE GE2.PlayerID = GameEvents.PlayerID AND GE2.EventType IN ('GameStart', 'GameEnd') AND GE2.EventTimestamp BETWEEN GameEvents.EventTimestamp AND DATEADD(month, 6, GameEvents.EventTimestamp)) > (SELECT COUNT(*) FROM GameEvents as GE3 WHERE GE3.PlayerID = GameEvents.PlayerID AND GE3.EventType = 'GameStart' AND GE3.EventTimestamp BETWEEN DATEADD(month, -6, CURRENT_DATE) AND GameEvents.EventTimestamp);","SELECT COUNT(DISTINCT PlayerID) FROM GameEvents WHERE EventTimestamp >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) AND EventType = 'Game' GROUP BY PlayerID HAVING COUNT(DISTINCT EventType) > 50;",0 When Lincoln City was the away team what is the tie number?,"CREATE TABLE table_name_21 (tie_no VARCHAR, away_team VARCHAR);","SELECT tie_no FROM table_name_21 WHERE away_team = ""lincoln city"";","SELECT tie_no FROM table_name_21 WHERE away_team = ""lincoln city"";",1 What is the maximum soil pH level for sustainable farms in Mexico and Colombia?,"CREATE TABLE SustainableFarm (id INT, country VARCHAR(50), soil_pH DECIMAL(3,2)); ","SELECT MAX(soil_pH) FROM SustainableFarm WHERE country IN ('Mexico', 'Colombia');","SELECT MAX(soil_pH) FROM SustainableFarm WHERE country IN ('Mexico', 'Colombia');",1 What is the total number of size 8 and size 10 garments in stock?,"CREATE TABLE GarmentInventory (garment_id INT, size INT, quantity INT); ","SELECT SUM(quantity) FROM GarmentInventory WHERE size IN (8, 10);","SELECT SUM(quantity) FROM GarmentInventory WHERE size IN (8, 10);",1 What album has the title I Need A Life with the label of warp records / paper bag records?,"CREATE TABLE table_name_18 (album VARCHAR, label VARCHAR, title VARCHAR);","SELECT album FROM table_name_18 WHERE label = ""warp records / paper bag records"" AND title = ""i need a life"";","SELECT album FROM table_name_18 WHERE label = ""warp records / paper bag records"" AND title = ""i need a life"";",1 "Update the records in supplier_table where supplier_id = 1001, increasing the 'annual_revenue' by 15%","CREATE TABLE supplier_table (supplier_id INT, annual_revenue FLOAT, country VARCHAR(50), supplier_type VARCHAR(20));",UPDATE supplier_table SET annual_revenue = annual_revenue * 1.15 WHERE supplier_id = 1001;,UPDATE supplier_table SET annual_revenue = annual_revenue * 100.0 WHERE supplier_id = 1001;,0 What is the total quantity of Lutetium extracted in Brazil and Argentina between 2015 and 2017?,"CREATE TABLE Lutetium_Production (id INT, year INT, country VARCHAR(255), quantity FLOAT);","SELECT SUM(quantity) FROM Lutetium_Production WHERE year BETWEEN 2015 AND 2017 AND country IN ('Brazil', 'Argentina');","SELECT SUM(quantity) FROM Lutetium_Production WHERE country IN ('Brazil', 'Argentina') AND year BETWEEN 2015 AND 2017;",0 How many digital exhibitions were launched by museums in Seoul in the last three years?,"CREATE TABLE SeoulDigitalExhibitions (id INT, exhibition_name VARCHAR(30), city VARCHAR(20), launch_date DATE); ","SELECT COUNT(*) FROM SeoulDigitalExhibitions WHERE city = 'Seoul' AND launch_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR) AND CURRENT_DATE;","SELECT COUNT(*) FROM SeoulDigitalExhibitions WHERE city = 'Seoul' AND launch_date >= DATEADD(year, -3, GETDATE());",0 What is the away team score when the home team is Geelong?,"CREATE TABLE table_name_25 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team AS score FROM table_name_25 WHERE home_team = ""geelong"";","SELECT away_team AS score FROM table_name_25 WHERE home_team = ""geelong"";",1 What is the average time between metro arrivals for a given line in New York?,"CREATE TABLE metro_lines (line_id INT, city VARCHAR(50), avg_time_between_arrivals TIME); ",SELECT AVG(avg_time_between_arrivals) FROM metro_lines WHERE city = 'New York';,SELECT AVG(avg_time_between_arrivals) FROM metro_lines WHERE city = 'New York';,1 What's season 3's premiere date?,"CREATE TABLE table_1949994_7 (premiere_air_dates VARCHAR, no VARCHAR);",SELECT premiere_air_dates FROM table_1949994_7 WHERE no = 3;,SELECT premiere_air_dates FROM table_1949994_7 WHERE no = 3;,1 What order has the title Deacon of SS. Cosma E Damiano?,"CREATE TABLE table_name_18 (order VARCHAR, title VARCHAR);","SELECT order FROM table_name_18 WHERE title = ""deacon of ss. cosma e damiano"";","SELECT order FROM table_name_18 WHERE title = ""deacon of ss. cosma e damiano"";",1 What is the highest number of laps when the Time/Retired is differential?,"CREATE TABLE table_name_76 (laps INTEGER, time_retired VARCHAR);","SELECT MAX(laps) FROM table_name_76 WHERE time_retired = ""differential"";","SELECT MAX(laps) FROM table_name_76 WHERE time_retired = ""difference"";",0 What is the game number when the record is 30-22?,"CREATE TABLE table_name_77 (game INTEGER, record VARCHAR);","SELECT AVG(game) FROM table_name_77 WHERE record = ""30-22"";","SELECT SUM(game) FROM table_name_77 WHERE record = ""30-22"";",0 "What was the Score on November 10, 2007?","CREATE TABLE table_name_76 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_76 WHERE date = ""november 10, 2007"";","SELECT score FROM table_name_76 WHERE date = ""november 10, 2007"";",1 How many songs were released by independent artists in the Jazz genre in 2018?,"CREATE TABLE Labels (LabelID INT, Name VARCHAR(100), Type VARCHAR(50)); CREATE TABLE Artists (ArtistID INT, Name VARCHAR(100), LabelID INT); CREATE TABLE Songs (SongID INT, Title VARCHAR(100), ReleaseYear INT, ArtistID INT, Genre VARCHAR(20)); ",SELECT COUNT(*) FROM Songs WHERE Genre = 'Jazz' AND Type = 'Independent' AND ReleaseYear = 2018;,SELECT COUNT(*) FROM Songs JOIN Artists ON Songs.ArtistID = Artists.ArtistID JOIN Labels ON Artists.LabelID = Labels.LabelID WHERE Artists.Genre = 'Jazz' AND ReleaseYear = 2018;,0 What are the unique threat intelligence sources and their respective counts?,"CREATE TABLE threat_intel (id INT, source TEXT); ","SELECT source, COUNT(*) as count FROM threat_intel GROUP BY source;","SELECT source, COUNT(*) FROM threat_intel GROUP BY source;",0 What is the greatest Wins with Losses larger than 1?,"CREATE TABLE table_name_48 (wins INTEGER, losses INTEGER);",SELECT MAX(wins) FROM table_name_48 WHERE losses > 1;,SELECT MAX(wins) FROM table_name_48 WHERE losses > 1;,1 How many hotels in Canada adopted AI-powered chatbots in each year?,"CREATE TABLE hotel_tech (hotel_id INT, hotel_name TEXT, country TEXT, chatbot BOOLEAN, year_adopted INT);","SELECT year_adopted, COUNT(*) FROM hotel_tech WHERE country = 'Canada' AND chatbot = TRUE GROUP BY year_adopted;","SELECT year_adopted, COUNT(*) FROM hotel_tech WHERE country = 'Canada' AND chatbot = TRUE GROUP BY year_adopted;",1 Update the 'decentralized_applications' table to set the app_category to 'Lending' for all records where the app_name is 'Aave',"CREATE TABLE decentralized_applications (app_id INT PRIMARY KEY, app_name VARCHAR(100), app_category VARCHAR(50));",UPDATE decentralized_applications SET app_category = 'Lending' WHERE app_name = 'Aave';,UPDATE decentralized_applications SET app_category = 'Lending' WHERE app_name = 'Aave';,1 "Who is the opponent with a save of ||33,453||36–27?","CREATE TABLE table_name_39 (opponent VARCHAR, save VARCHAR);","SELECT opponent FROM table_name_39 WHERE save = ""||33,453||36–27"";","SELECT opponent FROM table_name_39 WHERE save = ""||33,453||36–27"";",1 How many projects were completed by each organization in 'Q1'?,"CREATE TABLE Organizations (OrgID INT, OrgName TEXT, ProjectID INT, ProjectCompletionDate DATE);","SELECT OrgName, COUNT(DISTINCT ProjectID) FROM Organizations WHERE QUARTER(ProjectCompletionDate) = 1 GROUP BY OrgName;","SELECT OrgName, COUNT(*) FROM Organizations WHERE ProjectCompletionDate >= '2022-07-01' AND ProjectCompletionDate '2022-09-30' GROUP BY OrgName;",0 "Which policies have been updated in the last 30 days? Provide the output in the format: policy_name, last_updated_date.","CREATE TABLE policies (id INT, policy_name VARCHAR(255), last_updated_date DATE); ","SELECT policy_name, last_updated_date FROM policies WHERE last_updated_date >= DATE(NOW()) - INTERVAL 30 DAY;","SELECT policy_name, last_updated_date FROM policies WHERE last_updated_date >= DATEADD(day, -30, GETDATE());",0 "Show the total value of defense contracts awarded to each contractor in the defense_contracts view, ordered by the contract value in descending order.","CREATE VIEW defense_contracts AS SELECT contractor_name, contract_value FROM military_contracts;","SELECT contractor_name, SUM(contract_value) AS total_contract_value FROM defense_contracts GROUP BY contractor_name ORDER BY total_contract_value DESC;","SELECT contractor_name, SUM(contract_value) as total_contract_value FROM defense_contracts GROUP BY contractor_name ORDER BY total_contract_value DESC;",0 What is the maximum cargo weight for vessels that docked in the Port of Seattle in the past month?,"CREATE TABLE port_seattle_vessels (vessel_id INT, docking_date DATE, cargo_weight INT);","SELECT MAX(cargo_weight) FROM port_seattle_vessels WHERE docking_date >= DATEADD(month, -1, GETDATE());","SELECT MAX(cargo_weight) FROM port_seattle_vessels WHERE docking_date >= DATEADD(month, -1, GETDATE());",1 How many bridges and tunnels are there in total in the 'infrastructure' schema?,"CREATE TABLE bridges (id INT, name VARCHAR(50), span_length FLOAT, material VARCHAR(20)); CREATE TABLE tunnels (id INT, name VARCHAR(50), length FLOAT); ",SELECT COUNT(*) FROM bridges UNION ALL SELECT COUNT(*) FROM tunnels;,SELECT COUNT(*) FROM bridges; SELECT COUNT(*) FROM tunnels;,0 What is the nationality of the play for New Jersey from 2007-2009?,"CREATE TABLE table_name_62 (nationality VARCHAR, years_in_new_jersey VARCHAR);","SELECT nationality FROM table_name_62 WHERE years_in_new_jersey = ""2007-2009"";","SELECT nationality FROM table_name_62 WHERE years_in_new_jersey = ""2007-2009"";",1 What is the distribution of news channels by genre in the 'news_channels' table?,"CREATE TABLE news_channels (channel_name VARCHAR(50), country VARCHAR(50), genre VARCHAR(50)); ","SELECT genre, COUNT(*) as channel_count FROM news_channels GROUP BY genre;","SELECT genre, COUNT(channel_name) as channel_count FROM news_channels GROUP BY genre;",0 What is the total number of top-25 that has a top-10 smaller than 4 with 0 cuts?,"CREATE TABLE table_name_95 (top_25 VARCHAR, top_10 VARCHAR, cuts_made VARCHAR);",SELECT COUNT(top_25) FROM table_name_95 WHERE top_10 < 4 AND cuts_made > 0;,SELECT COUNT(top_25) FROM table_name_95 WHERE top_10 4 AND cuts_made = 0;,0 Find the number of marine species found in each country.,"CREATE TABLE marine_species (name VARCHAR(255), country VARCHAR(255), species_count INT); ","SELECT country, species_count, COUNT(*) OVER (PARTITION BY country) as total_species_count FROM marine_species;","SELECT country, species_count FROM marine_species GROUP BY country;",0 What were the runs for the opponent from the West Indies?,"CREATE TABLE table_name_64 (runs VARCHAR, opponent VARCHAR);","SELECT runs FROM table_name_64 WHERE opponent = ""west indies"";","SELECT runs FROM table_name_64 WHERE opponent = ""west indies"";",1 How many companies have been founded by individuals who identify as LGBTQ+ in the renewable energy sector?,"CREATE TABLE companies (id INT, name TEXT, industry TEXT, founder_identity TEXT); ",SELECT COUNT(*) FROM companies WHERE industry = 'Renewable Energy' AND founder_identity = 'LGBTQ+';,SELECT COUNT(*) FROM companies WHERE industry = 'Renewable Energy' AND founder_identity = 'LGBTQ+';,1 What was Olazabal's winning score in the German Masters?,"CREATE TABLE table_name_62 (winning_score VARCHAR, tournament VARCHAR);","SELECT winning_score FROM table_name_62 WHERE tournament = ""german masters"";","SELECT winning_score FROM table_name_62 WHERE tournament = ""german masters"";",1 "Update the 'energy_efficiency' table, setting the 'rating' value to 90 for all 'SuperLED' bulbs","CREATE TABLE energy_efficiency (id INT PRIMARY KEY, product VARCHAR(255), rating INT);",UPDATE energy_efficiency SET rating = 90 WHERE product = 'SuperLED';,UPDATE energy_efficiency SET rating = 90 WHERE product = 'SuperLED';,1 "What is the total number of satellites for each country, based on the SpaceLaunchs and SatelliteOrbits tables?","CREATE TABLE SpaceLaunchs (LaunchID INT, Country VARCHAR(50), SatelliteID INT); CREATE TABLE SatelliteOrbits (SatelliteID INT, OrbitType VARCHAR(50), OrbitHeight INT); ","SELECT s.Country, COUNT(so.SatelliteID) AS TotalSatellites FROM SpaceLaunchs s JOIN SatelliteOrbits so ON s.SatelliteID = so.SatelliteID GROUP BY s.Country;","SELECT SpaceLaunchs.Country, COUNT(SatelliteOrbits.SatelliteID) as TotalSatellites FROM SpaceLaunchs INNER JOIN SatelliteOrbits ON SpaceLaunchs.SatelliteID = SatelliteOrbits.SatelliteID GROUP BY SpaceLaunchs.Country;",0 Delete records with a status of 'cancelled' in the infrastructure_projects table,"CREATE TABLE infrastructure_projects (id INT PRIMARY KEY, name VARCHAR(255), description TEXT, status VARCHAR(50), start_date DATE, end_date DATE);",WITH cte AS (DELETE FROM infrastructure_projects WHERE status = 'cancelled') SELECT * FROM cte;,DELETE FROM infrastructure_projects WHERE status = 'cancelled';,0 What was the team's record when they played minnesota?,"CREATE TABLE table_27700530_9 (record VARCHAR, team VARCHAR);","SELECT record FROM table_27700530_9 WHERE team = ""Minnesota"";","SELECT record FROM table_27700530_9 WHERE team = ""Minnesota"";",1 Delete all records from the 'ocean_temperature' table where the temperature is below -2°C.,"CREATE TABLE ocean_temperature (temperature REAL, depth INTEGER); ",DELETE FROM ocean_temperature WHERE temperature < -2;,DELETE FROM ocean_temperature WHERE temperature -2;,0 What is the total amount donated by new and returning donors in Q3 of 2022?,"CREATE TABLE Donors (DonorID INT, DonorType VARCHAR(50), Amount DECIMAL(10,2), DonationDate DATE); ","SELECT DonorType, SUM(Amount) as TotalDonated FROM Donors WHERE YEAR(DonationDate) = 2022 AND MONTH(DonationDate) BETWEEN 7 AND 9 GROUP BY DonorType;","SELECT SUM(Amount) FROM Donors WHERE DonorType IN ('New', 'Returning') AND QUARTER(DonationDate) = 3 AND YEAR(DonationDate) = 2022;",0 "Which Seatshave a Share of votes of 18%, and a Share of seats of 3%, and a General election smaller than 1992?","CREATE TABLE table_name_6 (seats INTEGER, general_election VARCHAR, share_of_votes VARCHAR, share_of_seats VARCHAR);","SELECT MIN(seats) FROM table_name_6 WHERE share_of_votes = ""18%"" AND share_of_seats = ""3%"" AND general_election < 1992;","SELECT SUM(seats) FROM table_name_6 WHERE share_of_votes = ""18%"" AND share_of_seats = ""3%"" AND general_election 1992;",0 Which rating larger than 5 have the lowest amount of views in #3 rank with a share of 9?,"CREATE TABLE table_name_11 (viewers__millions_ INTEGER, rating VARCHAR, weekly_rank VARCHAR, share VARCHAR);","SELECT MIN(viewers__millions_) FROM table_name_11 WHERE weekly_rank = ""#3"" AND share = 9 AND rating > 5;",SELECT MIN(viewers__millions_) FROM table_name_11 WHERE weekly_rank > 5 AND share = 9 AND rating > 5;,0 What is the average cost of climate adaptation projects in Latin America over the last 5 years?,"CREATE TABLE climate_adaptation (id INT, project_name VARCHAR(50), country VARCHAR(50), year INT, cost FLOAT); ",SELECT AVG(cost) FROM climate_adaptation WHERE country LIKE '%Latin%' AND year BETWEEN (YEAR(CURRENT_DATE) - 5) AND YEAR(CURRENT_DATE);,"SELECT AVG(cost) FROM climate_adaptation WHERE country IN ('Argentina', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia', 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colombia, 'Colomb",0 What is the score of the game with a record of 12–8–3?,"CREATE TABLE table_name_98 (score VARCHAR, record VARCHAR);","SELECT score FROM table_name_98 WHERE record = ""12–8–3"";","SELECT score FROM table_name_98 WHERE record = ""12–8–3"";",1 "Which Outcome has a Year larger than 1939, and an Opponent in the final of frank kovacs?","CREATE TABLE table_name_44 (outcome VARCHAR, year VARCHAR, opponent_in_the_final VARCHAR);","SELECT outcome FROM table_name_44 WHERE year > 1939 AND opponent_in_the_final = ""frank kovacs"";","SELECT outcome FROM table_name_44 WHERE year > 1939 AND opponent_in_the_final = ""frank kovacs"";",1 What is the percentage of smokers in Chicago in 2020?,"CREATE TABLE Smoking (ID INT, Smoker BOOLEAN, Age INT, City VARCHAR(50), Year INT); ",SELECT (SUM(Smoker) * 100.0 / COUNT(*)) FROM Smoking WHERE City = 'Chicago' AND Year = 2020;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Smoking WHERE City = 'Chicago' AND Year = 2020)) * 100.0 / (SELECT COUNT(*) FROM Smoking WHERE City = 'Chicago' AND Year = 2020) FROM Smoking WHERE City = 'Chicago' AND Year = 2020;,0 How many threat intelligence indicators are associated with the 'APT33' group and are of type 'IP address'?,"CREATE TABLE threat_intelligence (id INT, group_name VARCHAR(255), indicator VARCHAR(255), indicator_type VARCHAR(255)); ",SELECT COUNT(*) FROM threat_intelligence WHERE group_name = 'APT33' AND indicator_type = 'IP address';,SELECT COUNT(*) FROM threat_intelligence WHERE group_name = 'APT33' AND indicator_type = 'IP address';,1 average retail price of garments in the 'Dresses' category that are made of 'Silk' fabric,"CREATE TABLE Fabrics (fabric_id INT, fabric_type VARCHAR(25)); CREATE TABLE Garments (garment_id INT, price DECIMAL(5,2), fabric_id INT, category VARCHAR(25)); ",SELECT AVG(price) FROM Garments INNER JOIN Fabrics ON Garments.fabric_id = Fabrics.fabric_id WHERE category = 'Dresses' AND fabric_type = 'Silk';,SELECT AVG(g.price) FROM Garments g INNER JOIN Fabrics f ON g.fabric_id = f.fabric_id WHERE f.fabric_type = 'Silk' AND g.category = 'Dresses';,0 What are the total emissions for coal mines in Colombia?,"CREATE TABLE emissions (mine_id INT, mine_name TEXT, country TEXT, emissions_kg INT); ",SELECT SUM(emissions_kg) FROM emissions WHERE country = 'Colombia' AND mineral = 'Coal';,SELECT SUM(emissions_kg) FROM emissions WHERE country = 'Colombia' AND mine_name LIKE '%Coal%';,0 List the name and cost of all procedures sorted by the cost from the highest to the lowest.,"CREATE TABLE procedures (name VARCHAR, cost VARCHAR);","SELECT name, cost FROM procedures ORDER BY cost DESC;","SELECT name, cost FROM procedures ORDER BY cost DESC;",1 How many hometowns does the catcher have?,"CREATE TABLE table_11677100_15 (hometown VARCHAR, position VARCHAR);","SELECT COUNT(hometown) FROM table_11677100_15 WHERE position = ""Catcher"";","SELECT COUNT(hometown) FROM table_11677100_15 WHERE position = ""catcher"";",0 Update satellite launch date if it was postponed,"CREATE TABLE satellites (satellite_id INT PRIMARY KEY, name VARCHAR(100), country VARCHAR(50), launch_date DATETIME, launch_failure BOOLEAN);",UPDATE satellites SET launch_date = launch_date + INTERVAL 1 MONTH WHERE name = 'Sentinel-6';,"UPDATE satellites SET launch_date = DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) WHERE launch_failure = TRUE;",0 "Gold of 0, and a Silver smaller than 3, and a Rank larger than 9, and a Total of 1 has how many numbers of bronze?","CREATE TABLE table_name_1 (bronze VARCHAR, total VARCHAR, rank VARCHAR, gold VARCHAR, silver VARCHAR);",SELECT COUNT(bronze) FROM table_name_1 WHERE gold = 0 AND silver < 3 AND rank > 9 AND total = 1;,SELECT COUNT(bronze) FROM table_name_1 WHERE gold = 0 AND silver 3 AND rank > 9 AND total = 1;,0 What is the maximum number of successful cases handled by attorneys who identify as African?,"CREATE TABLE attorneys (attorney_id INT, ethnicity VARCHAR(20), successful_cases INT); ",SELECT MAX(successful_cases) FROM attorneys WHERE ethnicity = 'African';,SELECT MAX(successful_cases) FROM attorneys WHERE ethnicity = 'African';,1 "If the episode was directed by Michael Offer, what was the episode number?","CREATE TABLE table_25084227_1 (no INTEGER, directed_by VARCHAR);","SELECT MIN(no) FROM table_25084227_1 WHERE directed_by = ""Michael Offer"";","SELECT MAX(no) FROM table_25084227_1 WHERE directed_by = ""Michael Offer"";",0 How many graduate students are enrolled in the Mathematics department?,"CREATE TABLE students (id INT, name VARCHAR(50), department VARCHAR(50), enrollment_status VARCHAR(50)); ",SELECT COUNT(*) FROM students WHERE department = 'Mathematics' AND enrollment_status = 'Enrolled';,SELECT COUNT(*) FROM students WHERE department = 'Mathematics' AND enrollment_status = 'Enrollment';,0 what is the notes for the time 6:05.21?,"CREATE TABLE table_name_77 (notes VARCHAR, time VARCHAR);","SELECT notes FROM table_name_77 WHERE time = ""6:05.21"";","SELECT notes FROM table_name_77 WHERE time = ""6:05.21"";",1 Which Points have an Opponent of vancouver canucks?,"CREATE TABLE table_name_91 (points INTEGER, opponent VARCHAR);","SELECT AVG(points) FROM table_name_91 WHERE opponent = ""vancouver canucks"";","SELECT SUM(points) FROM table_name_91 WHERE opponent = ""vancouver canucks"";",0 Which away team has a venue of Arden Street Oval?,"CREATE TABLE table_name_76 (away_team VARCHAR, venue VARCHAR);","SELECT away_team FROM table_name_76 WHERE venue = ""arden street oval"";","SELECT away_team FROM table_name_76 WHERE venue = ""arden street oval"";",1 Name the lelast decile for roll of 428,"CREATE TABLE table_name_63 (decile INTEGER, roll VARCHAR);",SELECT MIN(decile) FROM table_name_63 WHERE roll = 428;,SELECT MAX(decile) FROM table_name_63 WHERE roll = 428;,0 Get the number of baseball games played in 2022,"CREATE TABLE baseball_games (game_date DATE, home_team VARCHAR(255), away_team VARCHAR(255)); ",SELECT COUNT(*) FROM baseball_games WHERE YEAR(game_date) = 2022;,SELECT COUNT(*) FROM baseball_games WHERE game_date BETWEEN '2022-01-01' AND '2022-12-31';,0 What is the average fare for ferries in the 'Oceanview' region?,"CREATE TABLE Ferries (ferry_id INT, region VARCHAR(20), fare DECIMAL(5,2)); ",SELECT AVG(fare) FROM Ferries WHERE region = 'Oceanview';,SELECT AVG(fare) FROM Ferries WHERE region = 'Oceanview';,1 "Which countries have the highest number of esports event viewers, and what is their age distribution?","CREATE TABLE events (id INT, game VARCHAR(30), viewers INT, country VARCHAR(20)); CREATE TABLE players (id INT, age INT, country VARCHAR(20)); ","SELECT e.country, COUNT(e.id) AS viewers, AVG(p.age) AS avg_age FROM events e JOIN players p ON e.country = p.country GROUP BY e.country ORDER BY viewers DESC;","SELECT e.country, SUM(e.viewers) as total_viewers FROM events e JOIN players p ON e.country = p.country GROUP BY e.country ORDER BY total_viewers DESC;",0 Which species were part of the Asian habitat preservation efforts in 2022?,"CREATE TABLE habitat_preservation (preservation_id INT, preservation_region VARCHAR(255), preservation_year INT); CREATE TABLE animal_species (species_id INT, species_region VARCHAR(255)); ",SELECT s.species_name FROM animal_species s JOIN habitat_preservation h ON s.species_region = h.preservation_region WHERE h.preservation_year = 2022;,SELECT a.species_region FROM animal_species a JOIN habitat_preservation hp ON a.species_id = hp.species_id WHERE hp.preservation_region = 'Asia' AND hp.preservation_year = 2022;,0 What is the average labor cost per square foot for sustainable building projects in Texas?,"CREATE TABLE sustainable_buildings (id INT, state VARCHAR(2), cost DECIMAL(5,2)); ",SELECT AVG(cost) FROM sustainable_buildings WHERE state = 'TX';,SELECT AVG(cost) FROM sustainable_buildings WHERE state = 'Texas';,0 Calculate the average visitor spending in Asia in the last 3 years.,"CREATE TABLE spending (year INT, continent TEXT, spending DECIMAL(10,2)); ",SELECT AVG(spending) as avg_spending FROM spending WHERE continent = 'Asia' AND year >= (SELECT MAX(year) - 3);,SELECT AVG(spending) FROM spending WHERE continent = 'Asia' AND year BETWEEN 2019 AND 2021;,0 What is the percentage of each animal type in each sanctuary?,"CREATE TABLE sanctuary_data (sanctuary_id INT, sanctuary_name VARCHAR(255), animal_type VARCHAR(255), animal_count INT); ","SELECT sanctuary_name, animal_type, (animal_count::float/SUM(animal_count) OVER (PARTITION BY sanctuary_name))*100 AS animal_percentage FROM sanctuary_data;","SELECT sanctuary_name, animal_type, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM sanctuary_data)) as percentage FROM sanctuary_data GROUP BY sanctuary_name, animal_type;",0 "Display the financial wellbeing scores and their corresponding rank for each individual, ordered by the rank.","CREATE TABLE financial_wellbeing (individual_id INT, financial_wellbeing_score DECIMAL(5, 2)); ","SELECT individual_id, financial_wellbeing_score, ROW_NUMBER() OVER (ORDER BY financial_wellbeing_score DESC) AS rank FROM financial_wellbeing ORDER BY rank;","SELECT individual_id, financial_wellbeing_score, RANK() OVER (ORDER BY financial_wellbeing_score DESC) as rank FROM financial_wellbeing;",0 What is the attendance of tie no. 23?,"CREATE TABLE table_name_34 (attendance VARCHAR, tie_no VARCHAR);","SELECT attendance FROM table_name_34 WHERE tie_no = ""23"";","SELECT attendance FROM table_name_34 WHERE tie_no = ""23"";",1 How many policy advocacy events were held in each region?,"CREATE TABLE Advocacy(advocacy_id INT, region TEXT);CREATE TABLE Policy_Advocacy(policy_id INT, advocacy_id INT);","SELECT a.region, COUNT(pa.policy_id) FROM Advocacy a INNER JOIN Policy_Advocacy pa ON a.advocacy_id = pa.advocacy_id GROUP BY a.region;","SELECT Advocacy.region, COUNT(Policy_Advocacy.policy_id) FROM Advocacy INNER JOIN Policy_Advocacy ON Advocacy.advocacy_id = Policy_Advocacy.advocacy_id GROUP BY Advocacy.region;",0 What is the maximum salary for nurses in the 'hospital_database' database?,"CREATE TABLE nurses (id INT, name VARCHAR(50), salary DECIMAL(10, 2)); ",SELECT MAX(salary) FROM nurses WHERE name = 'nurse';,SELECT MAX(salary) FROM nurses;,0 "Delete records from the ""satellite_image_analysis"" table where the ""image_timestamp"" is before '2022-01-01'","CREATE TABLE satellite_image_analysis (image_id INT, image_timestamp TIMESTAMP, cloud_cover FLOAT, rainfall_probability FLOAT);",DELETE FROM satellite_image_analysis WHERE image_timestamp < '2022-01-01';,DELETE FROM satellite_image_analysis WHERE image_timestamp '2022-01-01';,0 Identify the number of users who have streamed music from both the Pop and Hip Hop genres.,"CREATE TABLE MultiGenreUsers (UserID INT, Genre VARCHAR(20)); ",SELECT COUNT(DISTINCT UserID) FROM (SELECT UserID FROM MultiGenreUsers WHERE Genre = 'Pop' INTERSECT SELECT UserID FROM MultiGenreUsers WHERE Genre = 'Hip Hop') T;,"SELECT COUNT(*) FROM MultiGenreUsers WHERE Genre IN ('Pop', 'Hip Hop');",0 What is the most popular music festival by ticket sales?,"CREATE TABLE Festivals (FestivalID INT, FestivalName VARCHAR(100), Location VARCHAR(50), Date DATE, TicketSales INT); ","SELECT FestivalName, MAX(TicketSales) FROM Festivals;","SELECT FestivalName, TicketSales FROM Festivals ORDER BY TicketSales DESC LIMIT 1;",0 "How many news articles were published in the ""NewYorkTimes"" in January 2022?","CREATE TABLE Articles (id INT, publication DATE, newspaper VARCHAR(20)); ",SELECT COUNT(*) FROM Articles WHERE newspaper = 'NewYorkTimes' AND publication BETWEEN '2022-01-01' AND '2022-01-31';,SELECT COUNT(*) FROM Articles WHERE publication BETWEEN '2022-01-01' AND '2022-01-31' AND newspaper = 'NewYorkTimes';,0 what is the total biomass of fish in the North Atlantic?,"CREATE TABLE FishBiomass (Region TEXT, Species TEXT, Biomass FLOAT); ",SELECT SUM(Biomass) FROM FishBiomass WHERE Region = 'North Atlantic';,SELECT SUM(Biomass) FROM FishBiomass WHERE Region = 'North Atlantic';,1 Which date has 3 as the goal?,"CREATE TABLE table_name_55 (date VARCHAR, goal VARCHAR);",SELECT date FROM table_name_55 WHERE goal = 3;,"SELECT date FROM table_name_55 WHERE goal = ""3"";",0 How many virtual tours were engaged in 'New York' hotels last month?,"CREATE TABLE virtual_tours (tour_id INT, hotel_id INT, date DATE); ","SELECT COUNT(*) FROM virtual_tours WHERE hotel_id IN (SELECT hotel_id FROM hotels WHERE city = 'New York') AND date >= DATEADD(month, -1, GETDATE());","SELECT COUNT(*) FROM virtual_tours WHERE hotel_id IN (SELECT hotel_id FROM hotels WHERE name = 'New York') AND date >= DATEADD(month, -1, GETDATE());",0 "Display the total number of manufacturing jobs for each sector, ordered from the sector with the most jobs to the sector with the least jobs.","CREATE TABLE sector_jobs (id INT, sector VARCHAR(50), job VARCHAR(50)); ","SELECT sector, COUNT(*) as total_jobs FROM sector_jobs GROUP BY sector ORDER BY total_jobs DESC;","SELECT sector, COUNT(*) as total_jobs FROM sector_jobs GROUP BY sector ORDER BY total_jobs DESC;",1 Name the D 45 O with D 44 O majority →,"CREATE TABLE table_name_5 (d_45_o VARCHAR, d_44_o VARCHAR);","SELECT d_45_o FROM table_name_5 WHERE d_44_o = ""majority →"";","SELECT d_45_o FROM table_name_5 WHERE d_44_o = ""majority "";",0 What was Britain's (2013) birthstone when the U.S (2013) birthstone was ruby?,"CREATE TABLE table_name_1 (britain__2013_ VARCHAR, us__2013_ VARCHAR);","SELECT britain__2013_ FROM table_name_1 WHERE us__2013_ = ""ruby"";","SELECT britain__2013_ FROM table_name_1 WHERE us__2013_ = ""ruby"";",1 What are the Poles for Season 2006,"CREATE TABLE table_name_91 (poles VARCHAR, season VARCHAR);",SELECT poles FROM table_name_91 WHERE season = 2006;,SELECT poles FROM table_name_91 WHERE season = 2006;,1 "What is the average word count for articles published in French in the 'news' schema, grouped by author?","CREATE TABLE news.articles (article_id INT, title VARCHAR(100), author VARCHAR(100), language VARCHAR(10), word_count INT); ","SELECT author, AVG(word_count) FROM news.articles WHERE language = 'Français' GROUP BY author;","SELECT author, AVG(word_count) FROM news.articles WHERE language = 'French' GROUP BY author;",0 What is the total word count of articles written by John Doe?,"CREATE TABLE Articles (id INT, title VARCHAR(255), word_count INT, author VARCHAR(255)); ",SELECT SUM(word_count) FROM Articles WHERE author = 'John Doe';,SELECT SUM(word_count) FROM Articles WHERE author = 'John Doe';,1 "Show the name, phone, and payment method code for all customers in descending order of customer number.","CREATE TABLE customers (customer_name VARCHAR, customer_phone VARCHAR, payment_method_code VARCHAR, customer_number VARCHAR);","SELECT customer_name, customer_phone, payment_method_code FROM customers ORDER BY customer_number DESC;","SELECT customer_name, customer_phone, payment_method_code FROM customers ORDER BY customer_number DESC;",1 What is the average number of building permits issued per year in the city of New York?,"CREATE TABLE building_permits (permit_id INT, city VARCHAR(20), year INT, permits_issued INT); ","SELECT city, AVG(permits_issued) FROM building_permits WHERE city = 'New York' GROUP BY city;",SELECT AVG(permits_issued) FROM building_permits WHERE city = 'New York';,0 Which cultural heritage sites in Japan have more than 3 virtual tours?,"CREATE TABLE cultural_sites (site_id INT, site_name TEXT, country TEXT, num_virtual_tours INT); ","SELECT site_name, country FROM cultural_sites WHERE country = 'Japan' AND num_virtual_tours > 3;",SELECT site_name FROM cultural_sites WHERE country = 'Japan' AND num_virtual_tours > 3;,0 Identify the agricultural innovation projects in 'RuralDev' database with a status of 'Active' or 'Pilot'.,"CREATE TABLE agricultural_innovation_status_2 (id INT, name VARCHAR(255), status VARCHAR(255)); ","SELECT * FROM agricultural_innovation_status_2 WHERE status IN ('Active', 'Pilot');","SELECT name FROM agricultural_innovation_status_2 WHERE status IN ('Active', 'Pilot');",0 Which country had the highest production of Dysprosium in 2020?,"CREATE TABLE yearly_dysprosium_production (country VARCHAR(255), year INT, production INT); ","SELECT country, MAX(production) as max_production FROM yearly_dysprosium_production WHERE year = 2020 GROUP BY country;","SELECT country, MAX(production) FROM yearly_dysprosium_production WHERE year = 2020 GROUP BY country;",0 Who is the oldest journalist in the database?,"CREATE TABLE journalists (id INT, name VARCHAR(50), age INT); ","SELECT name, MAX(age) FROM journalists;",SELECT name FROM journalists ORDER BY age DESC LIMIT 1;,0 "In the Tennis Masters Cup, how did Jiří Novák do in 1997?",CREATE TABLE table_name_75 (tournament VARCHAR);,"SELECT 1997 FROM table_name_75 WHERE tournament = ""tennis masters cup"";","SELECT 1997 FROM table_name_75 WHERE tournament = ""tennis masters cup"";",1 Find the number of tourists from Canada in each destination in 2021?,"CREATE TABLE tourism_stats (visitor_country VARCHAR(20), destination VARCHAR(20), year INT, tourists INT); ","SELECT destination, tourists FROM tourism_stats WHERE visitor_country = 'Canada' AND year = 2021;","SELECT destination, SUM(tourists) FROM tourism_stats WHERE visitor_country = 'Canada' AND year = 2021 GROUP BY destination;",0 What city is located in Oklahoma?,"CREATE TABLE table_name_67 (city VARCHAR, state VARCHAR);","SELECT city FROM table_name_67 WHERE state = ""oklahoma"";","SELECT city FROM table_name_67 WHERE state = ""oklahoma"";",1 What is the minimum donation amount for any campaign in the giving_trends table?,"CREATE TABLE giving_trends (campaign_id INT, donation_amount DECIMAL(10,2)); ",SELECT MIN(donation_amount) as min_donation FROM giving_trends;,SELECT MIN(donation_amount) FROM giving_trends;,0 What is the average GPA of graduate students in the 'cs' program?,"CREATE TABLE student (id INT, program TEXT, gpa REAL); ",SELECT AVG(gpa) FROM student WHERE program = 'cs';,SELECT AVG(gpa) FROM student WHERE program = 'cs';,1 What is the minimum investment required for smart city projects in the top 5 most populous cities in the world?,"CREATE TABLE smart_city_projects_investment (id INT, city VARCHAR(255), investment FLOAT); CREATE VIEW city_populations AS SELECT city, population FROM city_data;","SELECT city, MIN(investment) FROM smart_city_projects_investment JOIN city_populations ON smart_city_projects_investment.city = city_populations.city WHERE population IN (SELECT population FROM (SELECT city, population FROM city_data ORDER BY population DESC LIMIT 5) subquery) GROUP BY city;",SELECT MIN(investment) FROM smart_city_projects_investment WHERE city IN (SELECT city FROM city_populations);,0 Insert records for new electric vehicle models launched in 2022.,"CREATE TABLE vehicle (id INT PRIMARY KEY, name VARCHAR(255), production_date DATE, model_year INT); ","INSERT INTO vehicle (name, production_date, model_year) VALUES ('Hyundai Ioniq 5', '2022-09-01', 2022), ('Kia EV6', '2022-11-01', 2022);","INSERT INTO vehicle (id, name, production_date, model_year) VALUES (1, 'Electric', '2022-01-01', '2022-12-31');",0 "What is the average water pressure by city and location, per day?","CREATE TABLE water_pressure_2 (id INT, city VARCHAR(255), location VARCHAR(255), pressure FLOAT, pressure_date DATE); ","SELECT city, location, AVG(pressure) FROM water_pressure_2 GROUP BY city, location, DATE(pressure_date);","SELECT city, location, AVG(pressure) as avg_pressure FROM water_pressure_2 GROUP BY city, location;",0 When 4744 is the avg. trips per mile (x1000) what is the current stock?,"CREATE TABLE table_17839_1 (current_stock VARCHAR, avg_trips_per_mile__×1000_ VARCHAR);",SELECT current_stock FROM table_17839_1 WHERE avg_trips_per_mile__×1000_ = 4744;,SELECT current_stock FROM table_17839_1 WHERE avg_trips_per_mile__1000_ = 4744;,0 what is the name of the role that has co-protagonist in the notes field and the years of 2008-2009?,"CREATE TABLE table_name_8 (role VARCHAR, notes VARCHAR, year VARCHAR);","SELECT role FROM table_name_8 WHERE notes = ""co-protagonist"" AND year = ""2008-2009"";","SELECT role FROM table_name_8 WHERE notes = ""co-protagonist"" AND year = ""2008-2009"";",1 Insert new records for products made with recycled materials and their corresponding retail prices.,"CREATE TABLE products (product_id INT, product_name VARCHAR(50), uses_recycled_materials BIT); CREATE TABLE pricing (product_id INT, retail_price DECIMAL(5, 2)); ","INSERT INTO pricing (product_id, retail_price) SELECT 4 as product_id, 29.99 as retail_price WHERE EXISTS (SELECT 1 FROM products WHERE product_id = 4 AND uses_recycled_materials = 1);","INSERT INTO products (product_id, product_name, uses_recycled_materials) VALUES ('Recycled Products', 'Recycled Products'); INSERT INTO pricing (product_id, retail_price) VALUES ('Recycled Products', 'Recycled Products');",0 How many rare earth elements were produced in total in 2020?,"CREATE TABLE rare_earth_production (element VARCHAR(255), year INT, quantity INT); ",SELECT SUM(quantity) FROM rare_earth_production WHERE year = 2020;,SELECT SUM(quantity) FROM rare_earth_production WHERE year = 2020;,1 How many citizen complaints were there in Texas for transportation and utilities in 2020?,"CREATE TABLE CitizenComplaints (state VARCHAR(20), year INT, service VARCHAR(30), complaints INT); ","SELECT SUM(complaints) FROM CitizenComplaints WHERE state = 'Texas' AND service IN ('Transportation', 'Utilities') AND year = 2020;","SELECT SUM(complaints) FROM CitizenComplaints WHERE state = 'Texas' AND year = 2020 AND service IN ('Transportation', 'Utility');",0 List all the community policing initiatives in the southern and eastern regions.,"CREATE TABLE regions (region_id INT, region_name VARCHAR(255)); CREATE TABLE community_policing (initiative_id INT, region_id INT, initiative_name VARCHAR(255));","SELECT r.region_name, c.initiative_name FROM community_policing c INNER JOIN regions r ON c.region_id = r.region_id WHERE r.region_name IN ('Southern', 'Eastern');","SELECT r.region_name FROM regions r JOIN community_policing cp ON r.region_id = cp.region_id WHERE r.region_name IN ('Southern', 'Eastern');",0 How many people attended the game on May 10?,"CREATE TABLE table_name_44 (attendance VARCHAR, date VARCHAR);","SELECT COUNT(attendance) FROM table_name_44 WHERE date = ""may 10"";","SELECT attendance FROM table_name_44 WHERE date = ""may 10"";",0 What is the maximum hourly wage paid to workers in the 'mining' department?',"CREATE TABLE wages (id INT, department TEXT, worker INT, hourly_wage REAL); ",SELECT MAX(hourly_wage) FROM wages WHERE department = 'mining';,SELECT MAX(hourly_wage) FROM wages WHERE department ='mining';,0 Determine the total revenue for each cuisine type in a given city.,"CREATE TABLE restaurants (restaurant_id INT, city VARCHAR(255), cuisine VARCHAR(255), revenue INT); ","SELECT cuisine, SUM(revenue) FROM restaurants WHERE city = 'New York' GROUP BY cuisine;","SELECT cuisine, SUM(revenue) as total_revenue FROM restaurants GROUP BY cuisine;",0 Find the total cost of all ocean floor mapping projects in the Arctic region,"CREATE TABLE ocean_floor_mapping (project_name VARCHAR(255), region VARCHAR(255), cost DECIMAL(10,2)); ",SELECT SUM(cost) FROM ocean_floor_mapping WHERE region = 'Arctic';,SELECT SUM(cost) FROM ocean_floor_mapping WHERE region = 'Arctic';,1 "Which location belongs to the website, http://www.mudgeerabasoccer.com/?","CREATE TABLE table_11365528_2 (location VARCHAR, website VARCHAR);","SELECT location FROM table_11365528_2 WHERE website = ""http://www.mudgeerabasoccer.com/"";","SELECT location FROM table_11365528_2 WHERE website = ""http://www.mudgeerabasoccer.com/"";",1 "Name the l3 cache for core i7-2xxxqe, i7-26xxqm, i7-27xxqm","CREATE TABLE table_24538587_13 (l3_cache VARCHAR, brand_name__list_ VARCHAR);","SELECT l3_cache FROM table_24538587_13 WHERE brand_name__list_ = ""Core i7-2xxxQE, i7-26xxQM, i7-27xxQM"";","SELECT l3_cache FROM table_24538587_13 WHERE brand_name__list_ = ""Core i7-2xxxqe, i7-26xxqm, i7-27xxqm"";",0 Which underwater volcanoes have been explored in the Arctic Ocean?,"CREATE TABLE arctic_ocean (id INT, name VARCHAR(100), region VARCHAR(50)); CREATE TABLE underwater_volcanoes (id INT, name VARCHAR(100), depth FLOAT, ocean_id INT); ",SELECT name FROM underwater_volcanoes uv INNER JOIN arctic_ocean a ON uv.ocean_id = a.id;,SELECT underwater_volcanoes.name FROM underwater_volcanoes INNER JOIN arctic_ocean ON underwater_volcanoes.ocean_id = arctic_ocean.id WHERE arctic_ocean.region = 'Arctic Ocean';,0 What is the average price of cotton textiles in the 'textiles' table?,"CREATE TABLE textiles (id INT, type VARCHAR(20), price DECIMAL(5,2)); ",SELECT AVG(price) FROM textiles WHERE type = 'cotton';,SELECT AVG(price) FROM textiles WHERE type = 'cotton';,1 List all the wells in the Niobrara region with their respective production figures for 2020,"CREATE TABLE if not exists wells (well_id int, region varchar(50), production_year int, oil_production int, gas_production int);",SELECT * FROM wells WHERE region = 'Niobrara' AND production_year = 2020;,"SELECT well_id, region, production_year, oil_production, gas_production FROM wells WHERE region = 'Niobrara' AND production_year = 2020;",0 "What are the total amounts of coal and iron mined by each mine, sorted by the most mined resource?","CREATE TABLE mine (id INT, name VARCHAR(50), location VARCHAR(50));CREATE TABLE coal_mine (mine_id INT, amount INT);CREATE TABLE iron_mine (mine_id INT, amount INT);","SELECT m.name, SUM(c.amount) AS coal, SUM(i.amount) AS iron FROM mine m LEFT JOIN coal_mine c ON m.id = c.mine_id LEFT JOIN iron_mine i ON m.id = i.mine_id GROUP BY m.id, m.name ORDER BY coal + iron DESC;","SELECT mine.name, SUM(coal_mine.amount) as total_coal_amount, SUM(iron_mine.amount) as total_iron_amount FROM mine INNER JOIN coal_mine ON mine.id = coal_mine.mine_id INNER JOIN iron_mine ON mine.id = iron_mine.mine_id GROUP BY mine.name ORDER BY total_iron_amount DESC;",0 "Who are the top 3 artists with the highest number of streams in the ""Jazz"" genre?","CREATE TABLE music_streaming (id INT, artist VARCHAR(50), song VARCHAR(50), genre VARCHAR(20), streamed_on DATE, revenue DECIMAL(10,2), streams INT); CREATE VIEW artist_streams AS SELECT artist, genre, SUM(streams) AS total_streams FROM music_streaming GROUP BY artist, genre;","SELECT artist, total_streams FROM artist_streams WHERE genre = 'Jazz' ORDER BY total_streams DESC LIMIT 3;","SELECT artist, total_streams FROM artist_streams WHERE genre = 'Jazz' ORDER BY total_streams DESC LIMIT 3;",1 What was the total revenue from the 'Art Exhibition' event?,"CREATE TABLE Events (event_name VARCHAR(255), revenue INT); ",SELECT revenue FROM Events WHERE event_name = 'Art Exhibition';,SELECT SUM(revenue) FROM Events WHERE event_name = 'Art Exhibition';,0 "Identify the top 3 countries with the highest concert ticket sales in Q2 of 2022, ordered by sales amount.","CREATE TABLE ticket_sales (ticket_id INT, price DECIMAL(10,2), country VARCHAR(50), concert_date DATE);","SELECT country, SUM(price) as total_sales FROM ticket_sales WHERE EXTRACT(MONTH FROM concert_date) BETWEEN 4 AND 6 GROUP BY country ORDER BY total_sales DESC LIMIT 3;","SELECT country, SUM(price) as total_sales FROM ticket_sales WHERE concert_date BETWEEN '2022-04-01' AND '2022-06-30' GROUP BY country ORDER BY total_sales DESC LIMIT 3;",0 What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?,"CREATE TABLE TOURIST_ATTRACTIONS (Name VARCHAR, Opening_Hours VARCHAR, How_to_Get_There VARCHAR);","SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = ""bus"" OR How_to_Get_There = ""walk"";","SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = ""Bus"" OR How_to_Get_There = ""Walk"";",0 What is the market share of electric vehicles in the United States as of 2021?,"CREATE TABLE SalesData (id INT, year INT, country VARCHAR(50), vehicle_type VARCHAR(50), market_share FLOAT);",SELECT market_share FROM SalesData WHERE year = 2021 AND country = 'United States' AND vehicle_type = 'Electric';,SELECT market_share FROM SalesData WHERE country = 'United States' AND vehicle_type = 'Electric' AND year = 2021;,0 what is the party when the incumbent is sidney r. yates?,"CREATE TABLE table_1341718_14 (party VARCHAR, incumbent VARCHAR);","SELECT party FROM table_1341718_14 WHERE incumbent = ""Sidney R. Yates"";","SELECT party FROM table_1341718_14 WHERE incumbent = ""Sidney R. Yates"";",1 Which average Points has a Lost higher than 20?,"CREATE TABLE table_name_78 (points INTEGER, lost INTEGER);",SELECT AVG(points) FROM table_name_78 WHERE lost > 20;,SELECT AVG(points) FROM table_name_78 WHERE lost > 20;,1 "Which explainable AI techniques were applied in the past year for natural language processing tasks, in the Explainable AI database?","CREATE TABLE techniques (id INT, name VARCHAR(255), domain VARCHAR(255), published_date DATE);",SELECT name FROM techniques WHERE domain = 'Natural Language Processing' AND YEAR(published_date) = YEAR(CURRENT_DATE());,"SELECT name FROM techniques WHERE domain = 'Natural Language Processing' AND published_date >= DATEADD(year, -1, GETDATE());",0 How many people had high rebounds in game 14?,"CREATE TABLE table_28220778_21 (high_rebounds VARCHAR, game VARCHAR);",SELECT COUNT(high_rebounds) FROM table_28220778_21 WHERE game = 14;,SELECT COUNT(high_rebounds) FROM table_28220778_21 WHERE game = 14;,1 What year did the finish of 15 happen in?,"CREATE TABLE table_name_16 (year VARCHAR, finish VARCHAR);","SELECT year FROM table_name_16 WHERE finish = ""15"";","SELECT year FROM table_name_16 WHERE finish = ""15"";",1 What Chassis had a Weslake v12 in it?,"CREATE TABLE table_name_30 (chassis VARCHAR, engine VARCHAR);","SELECT chassis FROM table_name_30 WHERE engine = ""weslake v12"";","SELECT chassis FROM table_name_30 WHERE engine = ""weslake v12"";",1 What is the average production cost for Chemical F?,"CREATE TABLE costs (id INT, product VARCHAR(255), cost FLOAT); CREATE VIEW avg_cost AS SELECT product, AVG(cost) as avg_cost FROM costs GROUP BY product;",SELECT avg_cost FROM avg_cost WHERE product = 'Chemical F',SELECT AVG(avg_cost) FROM avg_cost WHERE product = 'Chemical F';,0 List all unique sports in 'team_performances_table',"CREATE TABLE team_performances_table (team_id INT, team_name VARCHAR(50), sport VARCHAR(20), wins INT, losses INT); ",SELECT DISTINCT sport FROM team_performances_table;,SELECT DISTINCT sport FROM team_performances_table;,1 "What is the total number of shared bicycles available in Madrid, Spain?","CREATE TABLE shared_bicycles (bicycle_id INT, dock_id INT, dock_status TEXT, city TEXT);",SELECT COUNT(*) FROM shared_bicycles WHERE city = 'Madrid' AND dock_status = 'available';,SELECT COUNT(*) FROM shared_bicycles WHERE city = 'Madrid';,0 Find the number of tickets sold per game for the home_team in the ticket_sales table.,"CREATE TABLE ticket_sales (ticket_id INT, game_id INT, home_team VARCHAR(20), away_team VARCHAR(20), price DECIMAL(5,2), quantity INT);","SELECT home_team, COUNT(*) as num_tickets_sold FROM ticket_sales GROUP BY home_team;","SELECT home_team, home_team, SUM(quantity) as total_tickets_sold FROM ticket_sales GROUP BY home_team, away_team;",0 What is the average temperature in the 'Greenhouse1' for the month of June?,"CREATE TABLE Greenhouse1 (date DATE, temperature FLOAT);",SELECT AVG(temperature) FROM Greenhouse1 WHERE EXTRACT(MONTH FROM date) = 6 AND greenhouse_id = 1;,SELECT AVG(temperature) FROM Greenhouse1 WHERE date BETWEEN '2022-06-01' AND '2022-06-30';,0 When westcott 1935 is in division two how many leagues are in division three?,"CREATE TABLE table_24575253_4 (division_three VARCHAR, division_two VARCHAR);","SELECT COUNT(division_three) FROM table_24575253_4 WHERE division_two = ""Westcott 1935"";","SELECT COUNT(division_three) FROM table_24575253_4 WHERE division_two = ""Westcott 1935"";",1 What is the maximum efficiency achieved by each energy project in a given year?,"CREATE TABLE efficiency_stats (id INT PRIMARY KEY, project_id INT, year INT, efficiency FLOAT, FOREIGN KEY (project_id) REFERENCES projects(id)); ","SELECT project_id, MAX(efficiency) FROM efficiency_stats GROUP BY project_id;","SELECT project_id, MAX(efficiency) FROM efficiency_stats GROUP BY project_id;",1 "What is the number of new membership signups per month, comparing 2021 and 2022?","CREATE TABLE Memberships (MembershipID INT, UserID INT, SignUpDate DATE); ","SELECT EXTRACT(YEAR FROM SignUpDate) as Year, EXTRACT(MONTH FROM SignUpDate) as Month, COUNT(*) as Count FROM Memberships GROUP BY Year, Month ORDER BY Year, Month;","SELECT DATE_FORMAT(SignUpDate, '%Y-%m') AS Month, COUNT(*) AS NewSignups FROM Memberships WHERE YEAR(SignUpDate) = 2021 GROUP BY Month;",0 "List the hardware model name for the phones that were produced by ""Nokia Corporation"" or whose screen mode type is ""Graphics.""","CREATE TABLE phone (Hardware_Model_name VARCHAR, screen_mode VARCHAR); CREATE TABLE screen_mode (Graphics_mode VARCHAR, Type VARCHAR);","SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = ""Graphics"" OR t2.Company_name = ""Nokia Corporation"";","SELECT T1.Hardware_Model_name FROM phone AS T1 JOIN screen_mode AS T2 ON T1.Graphics_mode = T2.Graphics_mode WHERE T2.Type = ""Graphics"";",0 "Display the usernames of users who have posted about traveling in the past month and have more than 5,000 followers, sorted by the number of followers in ascending order.","CREATE TABLE users (user_id INT, user_name VARCHAR(50), join_date DATE, follower_count INT);CREATE TABLE posts (post_id INT, user_id INT, post_content TEXT, post_date DATE);","SELECT u.user_name FROM users u JOIN posts p ON u.user_id = p.user_id WHERE p.post_content LIKE '%travel%' AND p.post_date >= DATEADD(month, -1, GETDATE()) AND u.follower_count > 5000 ORDER BY u.follower_count ASC;","SELECT u.user_name, u.follower_count FROM users u JOIN posts p ON u.user_id = p.user_id WHERE p.post_content LIKE '%travel%' AND p.post_date >= DATEADD(month, -1, GETDATE()) GROUP BY u.user_name ORDER BY u.follower_count DESC;",0 Name the number of players for field goals being 25 and blocks is 6,"CREATE TABLE table_23184448_4 (player VARCHAR, field_goals VARCHAR, blocks VARCHAR);",SELECT COUNT(player) FROM table_23184448_4 WHERE field_goals = 25 AND blocks = 6;,SELECT COUNT(player) FROM table_23184448_4 WHERE field_goals = 25 AND blocks = 6;,1 List the top 3 producing countries of Dysprosium in 2019 from the 'supply_chain' table.,"CREATE TABLE supply_chain (country VARCHAR(50), element VARCHAR(10), year INT, production INT); ","SELECT country, SUM(production) as total_production FROM supply_chain WHERE element = 'Dysprosium' AND year = 2019 GROUP BY country ORDER BY total_production DESC LIMIT 3;","SELECT country, production FROM supply_chain WHERE element = 'Dysprosium' AND year = 2019 ORDER BY production DESC LIMIT 3;",0 How many artworks are there in 'Museum X'?,"CREATE TABLE MuseumX (artwork VARCHAR(50), artist VARCHAR(50)); ",SELECT COUNT(artwork) FROM MuseumX;,SELECT COUNT(*) FROM MuseumX;,0 What is the total revenue of recycled products sold in Asia in Q4 2022?,"CREATE TABLE RecycledProductSales (product_id INT, sale_date DATE, revenue DECIMAL(10,2));",SELECT SUM(revenue) FROM RecycledProductSales WHERE sale_date BETWEEN '2022-10-01' AND '2022-12-31' AND country = 'Asia';,SELECT SUM(revenue) FROM RecycledProductSales WHERE sale_date BETWEEN '2022-04-01' AND '2022-06-30' AND region = 'Asia';,0 What is the total number of ingredients used in all products?,"CREATE TABLE product_ingredients (product_id INT, ingredient VARCHAR(255), percentage FLOAT, PRIMARY KEY (product_id, ingredient));",SELECT COUNT(DISTINCT ingredient) FROM product_ingredients;,SELECT SUM(percentage) FROM product_ingredients;,0 What is the minimum playtime for any VR game in Africa?,"CREATE TABLE Games (GameID INT, GameType VARCHAR(255), ReleaseCountry VARCHAR(255), Playtime INT); ",SELECT MIN(Playtime) FROM Games WHERE ReleaseCountry LIKE '%Africa%';,SELECT MIN(Playtime) FROM Games WHERE GameType = 'VR' AND ReleaseCountry = 'Africa';,0 What is the style for Giuseppe Bausilio?,"CREATE TABLE table_name_31 (style VARCHAR, name VARCHAR);","SELECT style FROM table_name_31 WHERE name = ""giuseppe bausilio"";","SELECT style FROM table_name_31 WHERE name = ""giuseppe bausilio"";",1 "List the total number of 5G base stations in the ""urban"" region, grouped by state.","CREATE TABLE infrastructure (id INT, technology VARCHAR(10), region VARCHAR(10), state VARCHAR(10)); ","SELECT state, COUNT(*) FROM infrastructure WHERE technology = '5G' AND region = 'urban' GROUP BY state;","SELECT state, COUNT(*) FROM infrastructure WHERE technology = '5G' AND region = 'urban' GROUP BY state;",1 "What is the average response time for fire departments in urban areas with a population greater than 500,000?","CREATE TABLE fire_departments (id INT, department_name VARCHAR(50), location VARCHAR(50), population INT, average_response_time FLOAT);",SELECT AVG(average_response_time) FROM fire_departments WHERE population > 500000 AND location = 'urban';,SELECT AVG(average_response_time) FROM fire_departments WHERE location LIKE '%urban%' AND population > 500000;,0 What's the f/laps count for the team with 8 podiums?,"CREATE TABLE table_27571406_1 (f_laps VARCHAR, podiums VARCHAR);",SELECT f_laps FROM table_27571406_1 WHERE podiums = 8;,SELECT f_laps FROM table_27571406_1 WHERE podiums = 8;,1 Which party had Clair Engle as an incumbent?,"CREATE TABLE table_1342149_6 (party VARCHAR, incumbent VARCHAR);","SELECT party FROM table_1342149_6 WHERE incumbent = ""Clair Engle"";","SELECT party FROM table_1342149_6 WHERE incumbent = ""Clair Engle"";",1 What date was the week 17 game played on?,"CREATE TABLE table_name_62 (date VARCHAR, week VARCHAR);","SELECT date FROM table_name_62 WHERE week = ""17"";",SELECT date FROM table_name_62 WHERE week = 17;,0 What is the minimum number of bikes available in 'station3' on weekdays?,"CREATE TABLE bike_availability (location VARCHAR(20), day_of_week VARCHAR(10), bikes_available INT); ","SELECT MIN(bikes_available) FROM bike_availability WHERE location = 'station3' AND day_of_week IN ('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday');",SELECT MIN(bikes_available) FROM bike_availability WHERE location ='station3' AND day_of_week = 'weekday';,0 Name the start for finish being 21st,"CREATE TABLE table_name_39 (start VARCHAR, finish VARCHAR);","SELECT start FROM table_name_39 WHERE finish = ""21st"";","SELECT start FROM table_name_39 WHERE finish = ""21st"";",1 Who is the husband of the image of renata of lorraine?,"CREATE TABLE table_name_87 (husband VARCHAR, image VARCHAR);","SELECT husband FROM table_name_87 WHERE image = ""renata of lorraine"";","SELECT husband FROM table_name_87 WHERE image = ""renata of lorraine"";",1 Which departments have the highest percentage of female employees?,"CREATE TABLE departments (id INT, department_name VARCHAR(50), gender VARCHAR(10));","SELECT department_name, (SUM(CASE WHEN gender = 'female' THEN 1 ELSE 0 END) / COUNT(*)) * 100 AS percentage FROM departments GROUP BY department_name ORDER BY percentage DESC;","SELECT department_name, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM departments WHERE gender = 'Female') AS female_percentage FROM departments GROUP BY department_name ORDER BY female_percentage DESC;",0 I want the manner of departure for 1 june 2007,"CREATE TABLE table_name_2 (manner_of_departure VARCHAR, date_of_appointment VARCHAR);","SELECT manner_of_departure FROM table_name_2 WHERE date_of_appointment = ""1 june 2007"";","SELECT manner_of_departure FROM table_name_2 WHERE date_of_appointment = ""1 june 2007"";",1 What is the average economic impact of cultural events in Canada?,"CREATE TABLE countries (country_id INT, country TEXT); CREATE TABLE cultural_events (event_id INT, country_id INT, economic_impact FLOAT); ",SELECT AVG(economic_impact) FROM cultural_events WHERE country_id = (SELECT country_id FROM countries WHERE country = 'Canada');,SELECT AVG(cultural_events.economic_impact) FROM cultural_events INNER JOIN countries ON cultural_events.country_id = countries.country_id WHERE countries.country = 'Canada';,0 Which Airport has a Carrier of malaysia airlines?,"CREATE TABLE table_name_52 (airport VARCHAR, carriers VARCHAR);","SELECT airport FROM table_name_52 WHERE carriers = ""malaysia airlines"";","SELECT airport FROM table_name_52 WHERE carriers = ""malaysia airlines"";",1 Delete records in the 'algorithmic_fairness' table where the 'impact' column is 'Minimal',"CREATE TABLE algorithmic_fairness (method TEXT, technique TEXT, dataset TEXT, impact TEXT); ",DELETE FROM algorithmic_fairness WHERE impact = 'Minimal';,DELETE FROM algorithmic_fairness WHERE impact = 'Minimal';,1 What's the smallest pick number of a player playing in Minnesota North Stars?,"CREATE TABLE table_1965650_4 (pick__number INTEGER, nhl_team VARCHAR);","SELECT MIN(pick__number) FROM table_1965650_4 WHERE nhl_team = ""Minnesota North Stars"";","SELECT MIN(pick__number) FROM table_1965650_4 WHERE nhl_team = ""Minnesota North Stars"";",1 What is the round for the qualifying phase with a draw date on 16 July 2010?,"CREATE TABLE table_name_42 (round VARCHAR, phase VARCHAR, draw_date VARCHAR);","SELECT round FROM table_name_42 WHERE phase = ""qualifying"" AND draw_date = ""16 july 2010"";","SELECT round FROM table_name_42 WHERE phase = ""qualifying"" AND draw_date = ""16 july 2010"";",1 Which is the highest silver that has a gold less than 0?,"CREATE TABLE table_name_40 (silver INTEGER, gold INTEGER);",SELECT MAX(silver) FROM table_name_40 WHERE gold < 0;,SELECT MAX(silver) FROM table_name_40 WHERE gold 0;,0 Calculate the total population of caribou and musk oxen in each Arctic country.,"CREATE TABLE Biodiversity (id INT PRIMARY KEY, species VARCHAR(255), location VARCHAR(255), population INT); ","SELECT location, SUM(CASE WHEN species IN ('caribou', 'musk oxen') THEN population ELSE 0 END) as total_population FROM Biodiversity GROUP BY location;","SELECT location, SUM(population) FROM Biodiversity WHERE species IN ('Caribou', 'Musk Oxen') GROUP BY location;",0 What is the average budget for all infrastructure projects in 'Paris'?,"CREATE TABLE InfrastructureC(id INT, city VARCHAR(20), project VARCHAR(30), budget DECIMAL(10,2)); ",SELECT AVG(budget) FROM InfrastructureC WHERE city = 'Paris';,SELECT AVG(budget) FROM InfrastructureC WHERE city = 'Paris';,1 How many votes for brown in the place that had 84.1% for coakley?,"CREATE TABLE table_24115349_6 (brown_votes INTEGER, coakley__percentage VARCHAR);","SELECT MAX(brown_votes) FROM table_24115349_6 WHERE coakley__percentage = ""84.1%"";","SELECT MAX(brown_votes) FROM table_24115349_6 WHERE coakley__percentage = ""84.1%"";",1 What game was in 2005?,"CREATE TABLE table_name_85 (game VARCHAR, year VARCHAR);",SELECT game FROM table_name_85 WHERE year = 2005;,SELECT game FROM table_name_85 WHERE year = 2005;,1 What is the average hourly wage for construction laborers in Illinois?,"CREATE TABLE ConstructionLaborers (id INT, name TEXT, state TEXT, hourlyWage FLOAT);",SELECT AVG(hourlyWage) FROM ConstructionLaborers WHERE state = 'Illinois';,SELECT AVG(hourlyWage) FROM ConstructionLaborers WHERE state = 'Illinois';,1 What was the total rare earth element production in 2020?,"CREATE TABLE production (country VARCHAR(255), year INT, amount INT); ",SELECT SUM(amount) AS total_production FROM production WHERE year = 2020;,SELECT SUM(amount) FROM production WHERE year = 2020;,0 Which restaurants have had a food safety violation in the past year?,"CREATE TABLE restaurants(id INT, name VARCHAR(255), last_inspection_date DATE); ","SELECT name FROM restaurants WHERE last_inspection_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE AND FIND_IN_SET('violation', inspection_details) > 0;","SELECT name FROM restaurants WHERE last_inspection_date >= DATEADD(year, -1, GETDATE());",0 What was the total financial contribution by each department for Q1 2023?,"CREATE TABLE departments (department_id INT, department_name TEXT); CREATE TABLE financials (financial_id INT, department_id INT, financial_date DATE, financial_amount FLOAT); ","SELECT department_name, SUM(financial_amount) as total_financial_contribution FROM financials f JOIN departments d ON f.department_id = d.department_id WHERE financial_date BETWEEN '2023-01-01' AND '2023-01-31' GROUP BY department_name;","SELECT d.department_name, SUM(f.financial_amount) as total_financial_contribution FROM departments d JOIN financials f ON d.department_id = f.department_id WHERE f.financial_date BETWEEN '2023-01-01' AND '2023-03-31' GROUP BY d.department_name;",0 "What role did John Wayne play in The Lawless Frontier, with Sheila Terry as the leading lady?","CREATE TABLE table_name_42 (role VARCHAR, leading_lady VARCHAR, title VARCHAR);","SELECT role FROM table_name_42 WHERE leading_lady = ""sheila terry"" AND title = ""the lawless frontier"";","SELECT role FROM table_name_42 WHERE leading_lady = ""sheila terry"" AND title = ""the lawless frontier"";",1 "What is the total cargo weight handled by port employees for each port, including those with no weight?","CREATE TABLE ports (port_id INT, port_name VARCHAR(50)); CREATE TABLE port_employees (employee_id INT, employee_name VARCHAR(50), port_id INT); CREATE TABLE cargo (cargo_id INT, cargo_weight INT, employee_id INT);","SELECT p.port_name, COALESCE(SUM(c.cargo_weight), 0) as total_weight FROM ports p LEFT JOIN port_employees pe ON p.port_id = pe.port_id LEFT JOIN cargo c ON pe.employee_id = c.employee_id GROUP BY p.port_name;","SELECT p.port_name, SUM(c.cargo_weight) as total_weight FROM ports p JOIN port_employees p ON p.port_id = p.port_id JOIN cargo c ON p.employee_id = c.employee_id GROUP BY p.port_name;",0 who had high rebounds when score is w 111–92 (ot),"CREATE TABLE table_13762472_4 (high_rebounds VARCHAR, score VARCHAR);","SELECT high_rebounds FROM table_13762472_4 WHERE score = ""W 111–92 (OT)"";","SELECT high_rebounds FROM table_13762472_4 WHERE score = ""W 111–92 (OT)"";",1 What year was Sam Kazman a producer?,"CREATE TABLE table_name_35 (year VARCHAR, producer VARCHAR);","SELECT year FROM table_name_35 WHERE producer = ""sam kazman"";","SELECT year FROM table_name_35 WHERE producer = ""sam kasman"";",0 "What is the average attendnace for seasons before 1986, a margin of 6, and a Score of 13.16 (94) – 13.10 (88)?","CREATE TABLE table_name_10 (attendance INTEGER, score VARCHAR, season VARCHAR, margin VARCHAR);","SELECT AVG(attendance) FROM table_name_10 WHERE season < 1986 AND margin = 6 AND score = ""13.16 (94) – 13.10 (88)"";","SELECT AVG(attendance) FROM table_name_10 WHERE season 1986 AND margin = 6 AND score = ""13.16 (94) – 13.10 (88)"";",0 "When the año was 2012, who was the county?","CREATE TABLE table_27501971_2 (country VARCHAR, año VARCHAR);",SELECT country FROM table_27501971_2 WHERE año = 2012;,SELECT country FROM table_27501971_2 WHERE ao = 2012;,0 Which countries in the Asia-Pacific region have recycling rates above 50%?,"CREATE TABLE RecyclingRatesByRegion (country VARCHAR(50), region VARCHAR(20), rate DECIMAL(5,2)); ",SELECT country FROM RecyclingRatesByRegion WHERE region = 'Asia-Pacific' AND rate > 50;,SELECT country FROM RecyclingRatesByRegion WHERE region = 'Asia-Pacific' AND rate > 50;,1 What is the total number of shelters in 'west_africa' region?,"CREATE TABLE region (region_id INT, name VARCHAR(255)); CREATE TABLE shelter (shelter_id INT, name VARCHAR(255), region_id INT, capacity INT); ",SELECT COUNT(*) FROM shelter WHERE region_id = (SELECT region_id FROM region WHERE name = 'west_africa');,SELECT COUNT(*) FROM shelter WHERE region_id = (SELECT region_id FROM region WHERE name = 'west_africa');,1 Who is the creator of the smart contract '0xabc...' in the 'contracts' table?,"CREATE TABLE contracts (id INT, contract_address VARCHAR(50), contract_name VARCHAR(50), creator VARCHAR(50), language VARCHAR(20), platform VARCHAR(20)); ",SELECT creator FROM contracts WHERE contract_address = '0xabc...';,SELECT creator FROM contracts WHERE contract_name = '0xabc...';,0 How many unique mental health conditions are in the conditions table?,"CREATE TABLE conditions (id INT, patient_id INT, condition TEXT);",SELECT COUNT(DISTINCT condition) FROM conditions;,SELECT COUNT(DISTINCT condition) FROM conditions;,1 What is the total quantity of each garment type sold in the global market?,"CREATE TABLE sales (id INT, garment TEXT, quantity_sold INT); ","SELECT garment, SUM(quantity_sold) as total_quantity FROM sales GROUP BY garment;","SELECT garment, SUM(quantity_sold) FROM sales GROUP BY garment;",0 "List all job titles and the number of employees who identify as a racial or ethnic minority, for jobs in the IT department.","CREATE TABLE Employees (EmployeeID INT, Gender VARCHAR(10), JobTitle VARCHAR(50), Department VARCHAR(50)); CREATE TABLE MinorityStatus (EmployeeID INT, Minority VARCHAR(10)); ","SELECT e.JobTitle, COUNT(m.EmployeeID) as NumMinorityEmployees FROM Employees e INNER JOIN MinorityStatus m ON e.EmployeeID = m.EmployeeID WHERE e.Department = 'IT' AND m.Minority = 'Yes' GROUP BY e.JobTitle;","SELECT JobTitle, COUNT(*) FROM Employees e JOIN MinorityStatus ms ON e.EmployeeID = ms.EmployeeID WHERE e.Department = 'IT' AND ms.Minority = 'Racial' OR ms.Minority = 'Ethnic' GROUP BY JobTitle;",0 "What is the record for the game that shows the Rose Garden 20,126 as attendance?","CREATE TABLE table_name_96 (record VARCHAR, attendance VARCHAR);","SELECT record FROM table_name_96 WHERE attendance = ""rose garden 20,126"";","SELECT record FROM table_name_96 WHERE attendance = ""rose garden 20,126"";",1 How much does number 26 weigh?,"CREATE TABLE table_name_31 (weight VARCHAR, number VARCHAR);","SELECT weight FROM table_name_31 WHERE number = ""26"";",SELECT weight FROM table_name_31 WHERE number = 26;,0 What is the average water consumption per day for the last week in the state of Florida?,"CREATE TABLE DailyWaterUsage (Date DATE, State VARCHAR(20), Usage FLOAT); ","SELECT AVG(Usage) FROM DailyWaterUsage WHERE State = 'Florida' AND Date >= DATEADD(WEEK, -1, GETDATE());","SELECT AVG(Usage) FROM DailyWaterUsage WHERE State = 'Florida' AND Date >= DATEADD(week, -1, GETDATE());",0 Identify cities with the highest number of infectious disease cases.,"CREATE TABLE infectious_diseases (city VARCHAR(255), cases INT, disease VARCHAR(255)); CREATE TABLE cities (name VARCHAR(255)); ","SELECT city, SUM(cases) FROM infectious_diseases GROUP BY city ORDER BY SUM(cases) DESC;",SELECT c.name FROM infectious_diseases i JOIN cities c ON i.city = c.name WHERE i.cases = (SELECT MAX(cases) FROM infectious_diseases i WHERE i.disease = 'Infectious Disease') GROUP BY c.name;,0 What is the minimum severity of a high-priority vulnerability in the transportation sector?,"CREATE TABLE high_priority_vulnerabilities (id INT, sector VARCHAR(255), severity FLOAT, priority VARCHAR(255)); ",SELECT MIN(severity) FROM high_priority_vulnerabilities WHERE sector = 'transportation' AND priority = 'high';,SELECT MIN(severity) FROM high_priority_vulnerabilities WHERE sector = 'Transportation';,0 Which Points against has a Lost of lost?,CREATE TABLE table_name_97 (points_against VARCHAR);,"SELECT points_against FROM table_name_97 WHERE ""lost"" = ""lost"";","SELECT points_against FROM table_name_97 WHERE lost = ""lost"";",0 Determine the number of unique public transportation users per day,"CREATE TABLE user (user_id INT, user_type VARCHAR(10), registration_date DATE); CREATE TABLE ride (ride_id INT, ride_date DATE, user_id INT);","SELECT ride_date, COUNT(DISTINCT user_id) AS unique_users FROM ride JOIN user ON ride.user_id = user.user_id GROUP BY ride_date;","SELECT DATE_FORMAT(ride_date, '%Y-%m') AS day, COUNT(DISTINCT user_id) AS unique_users FROM ride GROUP BY day;",0 who scored highest points on the game with record 27–5,"CREATE TABLE table_17190012_7 (high_points VARCHAR, record VARCHAR);","SELECT high_points FROM table_17190012_7 WHERE record = ""27–5"";","SELECT high_points FROM table_17190012_7 WHERE record = ""27–5"";",1 Which PFF NMCC has a AFC PC of dnq?,"CREATE TABLE table_name_50 (pff_nmcc VARCHAR, afc_pc VARCHAR);","SELECT pff_nmcc FROM table_name_50 WHERE afc_pc = ""dnq"";","SELECT pff_nmcc FROM table_name_50 WHERE afc_pc = ""dnq"";",1 Where is the game site for the game that had a packers record of 2-3?,"CREATE TABLE table_name_29 (game_site VARCHAR, record VARCHAR);","SELECT game_site FROM table_name_29 WHERE record = ""2-3"";","SELECT game_site FROM table_name_29 WHERE record = ""1-2"";",0 What is the average speed of vessels that carried dangerous goods in the Mediterranean region in 2020?,"CREATE TABLE Vessels (ID INT, Name TEXT, Speed FLOAT, Year INT, Dangerous_Goods BOOLEAN);CREATE VIEW Mediterranean_Voyages AS SELECT * FROM Vessels WHERE Region = 'Mediterranean';",SELECT AVG(Speed) FROM Mediterranean_Voyages WHERE Dangerous_Goods = 1 AND Year = 2020;,SELECT AVG(Speed) FROM Mediterranean_Voyages WHERE Year = 2020 AND Dangerous_Goods = TRUE;,0 List all sustainable building projects in Texas with a cost greater than $5 million.,"CREATE TABLE Sustainable_Projects (project_id INT, project_name VARCHAR(50), location VARCHAR(50), cost FLOAT); ","SELECT project_id, project_name, location, cost FROM Sustainable_Projects WHERE location = 'Texas' AND cost > 5000000;",SELECT * FROM Sustainable_Projects WHERE location = 'Texas' AND cost > 5000000;,0 What is the minimum claim amount and corresponding policy type for policyholders from Florida?,"CREATE TABLE policyholders (id INT, age INT, gender VARCHAR(10), policy_type VARCHAR(20), premium FLOAT, state VARCHAR(20)); CREATE TABLE claims (id INT, policyholder_id INT, claim_amount FLOAT, claim_date DATE); ","SELECT policy_type, MIN(claim_amount) FROM claims JOIN policyholders ON claims.policyholder_id = policyholders.id WHERE policyholders.state = 'Florida' GROUP BY policy_type;","SELECT p.policy_type, MIN(c.claim_amount) as min_claim_amount FROM policyholders p JOIN claims c ON p.id = c.policyholder_id WHERE p.state = 'Florida' GROUP BY p.policy_type;",0 Which driver has a Time/Retired of +1 lap?,"CREATE TABLE table_name_66 (driver VARCHAR, time_retired VARCHAR);","SELECT driver FROM table_name_66 WHERE time_retired = ""+1 lap"";","SELECT driver FROM table_name_66 WHERE time_retired = ""+1 lap"";",1 Identify the total production of oil wells in California and New York,"CREATE TABLE wells (id INT, state VARCHAR(10), well_type VARCHAR(10), oil_production FLOAT); ","SELECT SUM(oil_production) FROM wells WHERE state IN ('California', 'New York') AND well_type = 'Oil';","SELECT SUM(oil_production) FROM wells WHERE state IN ('California', 'New York');",0 "What is Gold, when Total is less than 4, when Silver is 1, and when Bronze is 1?","CREATE TABLE table_name_71 (gold VARCHAR, bronze VARCHAR, total VARCHAR, silver VARCHAR);","SELECT gold FROM table_name_71 WHERE total < 4 AND silver = ""1"" AND bronze = ""1"";",SELECT gold FROM table_name_71 WHERE total 4 AND silver = 1 AND bronze = 1;,0 Update the quantity of item_id 100 to 500 in the item_inventory table,"CREATE TABLE item_inventory (item_id INT, item_name VARCHAR(50), quantity INT, warehouse_id INT);",UPDATE item_inventory SET quantity = 500 WHERE item_id = 100;,UPDATE item_inventory SET quantity = 500 WHERE item_id = 100;,1 List the names and locations of all geothermal power plants in Nevada,"CREATE TABLE Infrastructure (id INT, name VARCHAR(100), type VARCHAR(50), location VARCHAR(100), state VARCHAR(50)); ","SELECT name, location FROM Infrastructure WHERE type = 'Geothermal Power Plant' AND state = 'Nevada';","SELECT name, location FROM Infrastructure WHERE type = 'Geothermal' AND state = 'Nevada';",0 What is the percentage of women in the workforce of each mining operation?,"CREATE TABLE workforce (id INT, mining_operation_id INT, gender VARCHAR(50), role VARCHAR(50)); ","SELECT mining_operation_id, ROUND(100.0 * SUM(CASE WHEN gender = 'Female' THEN 1 ELSE 0 END) / COUNT(*), 2) as percentage FROM workforce GROUP BY mining_operation_id;","SELECT mining_operation_id, (COUNT(*) FILTER (WHERE gender = 'Female')) * 100.0 / COUNT(*) FROM workforce GROUP BY mining_operation_id;",0 Name the result for 2000 afc asian cup qualification,"CREATE TABLE table_name_14 (result VARCHAR, competition VARCHAR);","SELECT result FROM table_name_14 WHERE competition = ""2000 afc asian cup qualification"";","SELECT result FROM table_name_14 WHERE competition = ""2000 afc asian cup qualification"";",1 What is the highest points value for the 500cc class in years after 1962 with 0 wins?,"CREATE TABLE table_name_71 (points INTEGER, wins VARCHAR, class VARCHAR, year VARCHAR);","SELECT MAX(points) FROM table_name_71 WHERE class = ""500cc"" AND year > 1962 AND wins < 0;","SELECT MAX(points) FROM table_name_71 WHERE class = ""500cc"" AND year > 1962 AND wins 0;",0 Who was Judge Jack Edward Tanner's chief judge?,"CREATE TABLE table_name_37 (Chief VARCHAR, judge VARCHAR);","SELECT Chief AS judge FROM table_name_37 WHERE judge = ""jack edward tanner"";","SELECT Chief FROM table_name_37 WHERE judge = ""jack edward tanner"";",0 What is the maximum number of astronauts that have been on a single space mission for each space agency?,"CREATE TABLE Space_Missions (id INT, mission_name VARCHAR(50), agency VARCHAR(50), num_astronauts INT); ","SELECT agency, MAX(num_astronauts) as max_num_astronauts FROM Space_Missions GROUP BY agency;","SELECT agency, MAX(num_astronauts) FROM Space_Missions GROUP BY agency;",0 Update the harvest table to reflect a timber volume of 950 cubic meters for oak in the region 'Central' for the year 2017,"CREATE TABLE harvest (year INT, region VARCHAR(255), timber_type VARCHAR(255), volume FLOAT);",UPDATE harvest SET volume = 950 WHERE year = 2017 AND region = 'Central' AND timber_type = 'Oak';,UPDATE harvest SET volume = 950 WHERE year = 2017 AND timber_type = 'Oak' AND region = 'Central';,0 List the regulatory frameworks in place for the 'DeFi' sector.,"CREATE TABLE regulatory_frameworks (framework_id INT, framework_name VARCHAR(255), sector VARCHAR(255)); ",SELECT framework_name FROM regulatory_frameworks WHERE sector = 'DeFi';,SELECT framework_name FROM regulatory_frameworks WHERE sector = 'DeFi';,1 "Name the sum of inversions for opened of april 20, 2002","CREATE TABLE table_name_89 (inversions INTEGER, opened VARCHAR);","SELECT SUM(inversions) FROM table_name_89 WHERE opened = ""april 20, 2002"";","SELECT SUM(inversions) FROM table_name_89 WHERE opened = ""april 20, 2002"";",1 What is the total revenue for the month of January 2022?,"CREATE TABLE sales_data_2 (sale_id INT, location_id INT, item_id INT, quantity_sold INT, sale_price DECIMAL(5, 2), sale_date DATE); ",SELECT SUM(quantity_sold * sale_price) FROM sales_data_2 WHERE EXTRACT(MONTH FROM sale_date) = 1 AND EXTRACT(YEAR FROM sale_date) = 2022;,SELECT SUM(quantity_sold * sale_price) FROM sales_data_2 WHERE sale_date BETWEEN '2022-01-01' AND '2022-01-31';,0 Where is the headquarters of the getinge group located?,"CREATE TABLE table_name_26 (headquarters VARCHAR, company VARCHAR);","SELECT headquarters FROM table_name_26 WHERE company = ""getinge group"";","SELECT headquarters FROM table_name_26 WHERE company = ""getinge group"";",1 Tiger Woods has played less than 21 events and is what rank?,"CREATE TABLE table_name_90 (rank VARCHAR, player VARCHAR, events VARCHAR);","SELECT COUNT(rank) FROM table_name_90 WHERE player = ""tiger woods"" AND events < 21;","SELECT rank FROM table_name_90 WHERE player = ""tiger woods"" AND events 21;",0 Who made high points on games of score w 106–104 (ot),"CREATE TABLE table_17340355_6 (high_assists VARCHAR, score VARCHAR);","SELECT high_assists FROM table_17340355_6 WHERE score = ""W 106–104 (OT)"";","SELECT high_assists FROM table_17340355_6 WHERE score = ""W 106–104 (OT)"";",1 What is the maximum number of steps taken by a member in a day in the last month?,"CREATE TABLE Members (MemberID INT, Name VARCHAR(50), Age INT, Membership VARCHAR(20)); CREATE TABLE Steps (StepID INT, MemberID INT, Steps INT, Date DATE); ","SELECT MemberID, MAX(Steps) FROM Members JOIN Steps ON Members.MemberID = Steps.MemberID WHERE Date >= DATEADD(MONTH, -1, GETDATE()) GROUP BY MemberID;","SELECT MAX(Steps) FROM Steps JOIN Members ON Steps.MemberID = Members.MemberID WHERE Date >= DATEADD(month, -1, GETDATE());",0 What is the total number of tickets sold for each venue?,"CREATE TABLE venues (id INT, name VARCHAR(255), capacity INT); ","SELECT v.name, COUNT(t.id) AS tickets_sold FROM tickets t JOIN games g ON t.game_id = g.id JOIN venues v ON g.venue_id = v.id GROUP BY v.name;","SELECT name, SUM(capacity) FROM venues GROUP BY name;",0 What is the average monthly production of Neodymium from 2015 to 2020 in the Asia region?,"CREATE TABLE production (element VARCHAR(10), year INT, region VARCHAR(10), quantity INT); ",SELECT AVG(quantity) FROM production WHERE element = 'Neodymium' AND region = 'Asia' AND year BETWEEN 2015 AND 2020;,SELECT AVG(quantity) FROM production WHERE element = 'Neodymium' AND year BETWEEN 2015 AND 2020 AND region = 'Asia';,0 What is the lowest total number of wins in a season before 1989 with tianjin as the runners-up and more than 8 clubs?,"CREATE TABLE table_name_92 (total_wins INTEGER, number_of_clubs VARCHAR, season VARCHAR, runners_up VARCHAR);","SELECT MIN(total_wins) FROM table_name_92 WHERE season < 1989 AND runners_up = ""tianjin"" AND number_of_clubs > 8;","SELECT MIN(total_wins) FROM table_name_92 WHERE season 1989 AND runners_up = ""tianjin"" AND number_of_clubs > 8;",0 Which menu items have the lowest food cost for gluten-free dishes?,"CREATE TABLE gluten_free_menu_items (menu_item_id INT, dish_type VARCHAR(255), food_cost DECIMAL(5,2)); ","SELECT dish_type, MIN(food_cost) FROM gluten_free_menu_items WHERE dish_type = 'Gluten-free';","SELECT menu_item_id, dish_type, food_cost FROM gluten_free_menu_items ORDER BY food_cost DESC LIMIT 1;",0 What was the Opponent in the game with a Result of W 23-7?,"CREATE TABLE table_name_30 (opponent VARCHAR, result VARCHAR);","SELECT opponent FROM table_name_30 WHERE result = ""w 23-7"";","SELECT opponent FROM table_name_30 WHERE result = ""w 23-7"";",1 How many cases were won or lost by attorneys in the last 3 months?,"CREATE TABLE Cases (CaseID int, AttorneyID int, Outcome varchar(10), CaseDate date); ","SELECT A.Name, COUNT(*) as Cases, Outcome FROM Attorneys A JOIN Cases C ON A.AttorneyID = C.AttorneyID WHERE CaseDate >= DATEADD(month, -3, GETDATE()) GROUP BY A.Name, Outcome;","SELECT COUNT(*) FROM Cases WHERE Outcome = 'Won' OR Outcome = 'Lost' AND CaseDate >= DATEADD(month, -3, GETDATE());",0 What size was the biggest crowd that watched the home team Hawthorn play?,"CREATE TABLE table_name_95 (crowd INTEGER, home_team VARCHAR);","SELECT MAX(crowd) FROM table_name_95 WHERE home_team = ""hawthorn"";","SELECT MAX(crowd) FROM table_name_95 WHERE home_team = ""hawthorn"";",1 How many projects in 'Texas' and 'California' have a cost less than $5 million?,"CREATE TABLE Infrastructure_Projects (id INT, name VARCHAR(100), state VARCHAR(50), cost FLOAT); ","SELECT COUNT(*) FROM Infrastructure_Projects WHERE state IN ('Texas', 'California') AND cost < 5000000;","SELECT COUNT(*) FROM Infrastructure_Projects WHERE state IN ('Texas', 'California') AND cost 5000000;",0 Which Plautdietsch has Dutch of maken?,"CREATE TABLE table_name_61 (plautdietsch VARCHAR, dutch VARCHAR);","SELECT plautdietsch FROM table_name_61 WHERE dutch = ""maken"";","SELECT plautdietsch FROM table_name_61 WHERE dutch = ""maken"";",1 Name the start of an event in Catagory 2 of the year 1947.,"CREATE TABLE table_name_40 (start VARCHAR, category VARCHAR, year VARCHAR);","SELECT start FROM table_name_40 WHERE category = ""2"" AND year = 1947;","SELECT start FROM table_name_40 WHERE category = ""2"" AND year = 1947;",1 "What is the Surface of the match with a Score in the final of 5–7, 6–7 (2–7)?","CREATE TABLE table_name_86 (surface VARCHAR, score_in_the_final VARCHAR);","SELECT surface FROM table_name_86 WHERE score_in_the_final = ""5–7, 6–7 (2–7)"";","SELECT surface FROM table_name_86 WHERE score_in_the_final = ""5–7, 6–7 (2–7)"";",1 What Score has an Opponent of nina bratchikova?,"CREATE TABLE table_name_58 (score VARCHAR, opponent VARCHAR);","SELECT score FROM table_name_58 WHERE opponent = ""nina bratchikova"";","SELECT score FROM table_name_58 WHERE opponent = ""nina bratchikova"";",1 Name the party with edward boland,"CREATE TABLE table_1341865_23 (party VARCHAR, incumbent VARCHAR);","SELECT party FROM table_1341865_23 WHERE incumbent = ""Edward Boland"";","SELECT party FROM table_1341865_23 WHERE incumbent = ""Edward Boland"";",1 What is the draw record (%) total for clubs with more than 3 wins with 10 matches and more than 1 draw?,"CREATE TABLE table_name_91 (record___percentage__ VARCHAR, draw_ VARCHAR, _05_wins VARCHAR, draws VARCHAR, wins VARCHAR, matches VARCHAR);",SELECT COUNT(record___percentage__)[draw_ = _05_wins] FROM table_name_91 WHERE wins > 3 AND matches = 10 AND draws > 1;,SELECT COUNT(record___percentage__) FROM table_name_91 WHERE wins > 3 AND matches = 10 AND draws > 1;,0 Display the total value of assets for each portfolio manager who manages at least one portfolio with a value greater than $10 million.,"CREATE TABLE portfolio_managers (manager_id INT, portfolio_id INT, manager_name VARCHAR(30), portfolio_value DECIMAL(12,2)); ","SELECT manager_name, SUM(portfolio_value) FROM portfolio_managers WHERE portfolio_value > 10000000 GROUP BY manager_name;","SELECT manager_name, SUM(portfolio_value) as total_value FROM portfolio_managers WHERE portfolio_value > 10000000 GROUP BY manager_name HAVING COUNT(DISTINCT portfolio_id) > 1;",0 Who was the high scorer and how much did they score in the game on May 3? ,"CREATE TABLE table_11963601_11 (high_points VARCHAR, date VARCHAR);","SELECT high_points FROM table_11963601_11 WHERE date = ""May 3"";","SELECT high_points FROM table_11963601_11 WHERE date = ""May 3"";",1 "Display all organizations with a social impact score above 80, along with their respective scores.","CREATE TABLE Organizations (id INT, name TEXT, social_impact_score INT); ","SELECT name, social_impact_score FROM Organizations WHERE social_impact_score > 80;","SELECT name, social_impact_score FROM Organizations WHERE social_impact_score > 80;",1 "How many AI safety incidents have been recorded for each AI application domain, in descending order of frequency?","CREATE TABLE ai_safety_incidents (incident_id INT, incident_description TEXT, domain_id INT);CREATE TABLE ai_application_domains (domain_id INT, domain VARCHAR(255));","SELECT aad.domain, COUNT(asi.incident_id) AS incident_count FROM ai_safety_incidents asi INNER JOIN ai_application_domains aad ON asi.domain_id = aad.domain_id GROUP BY asi.domain_id ORDER BY incident_count DESC;","SELECT ai_application_domains.domain, COUNT(ai_safety_incidents.incident_id) as incident_count FROM ai_application_domains INNER JOIN ai_safety_incidents ON ai_application_domains.domain_id = ai_safety_incidents.domain_id GROUP BY ai_application_domains.domain ORDER BY incident_count DESC;",0 Determine virtual reality games that have more than 800 players and released in 2019,"CREATE TABLE vr_games (game VARCHAR(20), players INT, release_year INT); ",SELECT game FROM vr_games WHERE players > 800 AND release_year = 2019;,SELECT game FROM vr_games WHERE players > 800 AND release_year = 2019;,1 Show all records from the electric vehicle sales table,"CREATE TABLE ev_sales (id INT PRIMARY KEY, year INT, make VARCHAR(255), model VARCHAR(255), country VARCHAR(255), units_sold INT); ",SELECT * FROM ev_sales;,SELECT * FROM ev_sales;,1 "Which Chassis has an Entrant of cooper car company, and a Year of 1963?","CREATE TABLE table_name_26 (chassis VARCHAR, entrant VARCHAR, year VARCHAR);","SELECT chassis FROM table_name_26 WHERE entrant = ""cooper car company"" AND year = 1963;","SELECT chassis FROM table_name_26 WHERE entrant = ""cooper car company"" AND year = 1963;",1 What is the Total of Set 2 of 24:22?,"CREATE TABLE table_name_86 (total VARCHAR, set_2 VARCHAR);","SELECT total FROM table_name_86 WHERE set_2 = ""24:22"";","SELECT total FROM table_name_86 WHERE set_2 = ""24:22"";",1 What is the total workout duration for a specific member last week?,"CREATE TABLE Workouts (WorkoutID INT, MemberID INT, WorkoutDate DATE, Duration INT); ","SELECT SUM(Duration) FROM Workouts WHERE MemberID = 1 AND WorkoutDate BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 7 DAY) AND CURRENT_DATE;","SELECT MemberID, SUM(Duration) as TotalDuration FROM Workouts WHERE WorkoutDate >= DATEADD(week, -1, GETDATE()) GROUP BY MemberID;",0 List all safety issues for products certified as cruelty-free.,"CREATE TABLE products(id INT, name TEXT, cruelty_free BOOLEAN, safety_issue TEXT); ","SELECT name, safety_issue FROM products WHERE cruelty_free = true AND safety_issue IS NOT NULL;",SELECT safety_issue FROM products WHERE cruelty_free = true;,0 Delete all records from the Employees table where the employee has been with the company for more than 2 years,"CREATE TABLE Employees (EmployeeID INT, FirstName VARCHAR(50), LastName VARCHAR(50), Department VARCHAR(50), StartDate DATE, YearsAtCompany INT); ",DELETE FROM Employees WHERE YearsAtCompany > 2;,DELETE FROM Employees WHERE YearsAtCompany > 2;,1 What is the earliest first elected for district georgia 1?,"CREATE TABLE table_1341640_11 (first_elected INTEGER, district VARCHAR);","SELECT MIN(first_elected) FROM table_1341640_11 WHERE district = ""Georgia 1"";","SELECT MIN(first_elected) FROM table_1341640_11 WHERE district = ""Georgia 1"";",1 What is the cable rank for episode no. 4?,"CREATE TABLE table_24399615_3 (cable_rank VARCHAR, episode_no VARCHAR);",SELECT cable_rank FROM table_24399615_3 WHERE episode_no = 4;,SELECT cable_rank FROM table_24399615_3 WHERE episode_no = 4;,1 What are the names of the drugs that were not approved in any country?,"CREATE TABLE drug_approval (drug_name VARCHAR(255), approval_year INT, country VARCHAR(255)); ",SELECT drug_name FROM drug_approval WHERE approval_year IS NULL AND country IS NULL;,SELECT drug_name FROM drug_approval WHERE country NOT IN (SELECT country FROM drug_approval);,0 What is the total number of exoplanets discovered by the Kepler space telescope?,"CREATE TABLE exoplanets (id INT, name VARCHAR(255), discovery_method VARCHAR(255), discovery_date DATE, telescope VARCHAR(255));",SELECT COUNT(*) FROM exoplanets WHERE telescope = 'Kepler';,SELECT COUNT(*) FROM exoplanets WHERE telescope = 'Kepler';,1 "What is the average word count of articles related to social justice issues in the United States, published in 2021 and 2022, partitioned by quarter?","CREATE TABLE articles (id INT, title TEXT, category TEXT, publish_date DATE, location TEXT, word_count INT); ",SELECT AVG(word_count) OVER (PARTITION BY EXTRACT(YEAR_QUARTER FROM publish_date)) AS avg_word_count FROM articles WHERE category = 'social_justice' AND location = 'USA' AND YEAR(publish_date) BETWEEN 2021 AND 2022;,"SELECT DATE_FORMAT(publish_date, '%Y-%m') AS quarter, AVG(word_count) AS avg_word_count FROM articles WHERE category ='social justice' AND location = 'United States' AND YEAR(publish_date) = 2021 AND YEAR(publish_date) = 2022 GROUP BY quarter;",0 How many yards were averaged by the player that had a higher than 13 average with less than 18 long?,"CREATE TABLE table_name_94 (yards INTEGER, long VARCHAR, avg VARCHAR);",SELECT AVG(yards) FROM table_name_94 WHERE long < 18 AND avg > 13;,SELECT AVG(yards) FROM table_name_94 WHERE long 18 AND avg > 13;,0 What is the total water consumption for the state of California in the last month?,"CREATE TABLE DailyWaterUsage (Date DATE, State VARCHAR(20), Usage FLOAT); ","SELECT SUM(Usage) FROM DailyWaterUsage WHERE State = 'California' AND Date >= DATEADD(MONTH, -1, GETDATE());","SELECT SUM(Usage) FROM DailyWaterUsage WHERE State = 'California' AND Date >= DATEADD(month, -1, GETDATE());",0 "Calculate the maximum daily production quantity of copper for mining sites in Africa, for the year 2018, with over 50 employees.","CREATE TABLE copper_mine (site_id INT, country VARCHAR(50), num_employees INT, extraction_date DATE, quantity INT); ","SELECT country, MAX(quantity) as max_daily_copper_prod FROM copper_mine WHERE num_employees > 50 AND country = 'Africa' AND extraction_date >= '2018-01-01' AND extraction_date <= '2018-12-31' GROUP BY country;",SELECT MAX(quantity) FROM copper_mine WHERE country = 'Africa' AND extraction_date BETWEEN '2018-01-01' AND '2018-12-31' AND num_employees > 50;,0 What is the lowest Draw when the Artist is Stine Findsen and the Points are larger than 42?,"CREATE TABLE table_name_95 (draw INTEGER, artist VARCHAR, points VARCHAR);","SELECT MIN(draw) FROM table_name_95 WHERE artist = ""stine findsen"" AND points > 42;","SELECT MIN(draw) FROM table_name_95 WHERE artist = ""steine findsen"" AND points > 42;",0 "What was the total budget for policy advocacy in ""Northeast"" region in 2019?","CREATE TABLE Policy_Advocacy (advocacy_id INT, region VARCHAR(20), budget DECIMAL(10, 2), year INT); ",SELECT SUM(budget) FROM Policy_Advocacy WHERE region = 'Northeast' AND year = 2019;,SELECT SUM(budget) FROM Policy_Advocacy WHERE region = 'Northeast' AND year = 2019;,1 Which cruelty-free skincare brands have the highest average revenue in the Midwest?,"CREATE TABLE skincare_revenue(brand VARCHAR(255), region VARCHAR(255), revenue FLOAT); CREATE TABLE skincare_type(brand VARCHAR(255), type VARCHAR(255)); ","SELECT skincare_revenue.brand, AVG(skincare_revenue.revenue) AS avg_revenue FROM skincare_revenue INNER JOIN skincare_type ON skincare_revenue.brand = skincare_type.brand WHERE skincare_revenue.region = 'Midwest' AND skincare_type.type = 'cruelty-free' GROUP BY skincare_revenue.brand ORDER BY avg_revenue DESC;","SELECT brand, AVG(revenue) as avg_revenue FROM skincare_revenue JOIN skincare_type ON skincare_revenue.brand = skincare_type.brand WHERE skincare_type.type = 'cruelty-free' AND skincare_revenue.region = 'Midwest' GROUP BY brand ORDER BY avg_revenue DESC LIMIT 1;",0 On what date was the opponent the Green Bay Packers?,"CREATE TABLE table_name_43 (date VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_43 WHERE opponent = ""green bay packers"";","SELECT date FROM table_name_43 WHERE opponent = ""green bay packers"";",1 What are the first names of the professors who do not teach a class.,"CREATE TABLE employee (emp_fname VARCHAR, emp_jobcode VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR);",SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num;,SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num JOIN employee AS T3 ON T1.emp_jobcode = T3.emp_jobcode WHERE T3.emp_num IS NULL;,0 "What day was the score for tournament of alcobaça 6–3, 2–6, 7–5?","CREATE TABLE table_name_21 (date VARCHAR, tournament VARCHAR, score VARCHAR);","SELECT date FROM table_name_21 WHERE tournament = ""alcobaça"" AND score = ""6–3, 2–6, 7–5"";","SELECT date FROM table_name_21 WHERE tournament = ""alcobaça 6–3, 2–6, 7–5"";",0 What is the position of the player with a pick less than 3 from team san diego?,"CREATE TABLE table_name_82 (position VARCHAR, pick VARCHAR, team VARCHAR);","SELECT position FROM table_name_82 WHERE pick < 3 AND team = ""san diego"";","SELECT position FROM table_name_82 WHERE pick 3 AND team = ""san diego"";",0 What is the total number of unique digital assets by network?,"CREATE TABLE digital_assets (id INT, name VARCHAR(255), network VARCHAR(255)); ","SELECT network, COUNT(DISTINCT name) as unique_assets FROM digital_assets GROUP BY network;","SELECT network, COUNT(DISTINCT name) as unique_assets FROM digital_assets GROUP BY network;",1 Which freight forwarders have not shipped any units to Canada?,"CREATE TABLE Freight_Forwarders (forwarder_id INT, name TEXT); CREATE TABLE Shipments (shipment_id INT, forwarder_id INT, units_shipped INT, destination_country TEXT); ",SELECT f.name FROM Freight_Forwarders f LEFT JOIN Shipments s ON f.forwarder_id = s.forwarder_id AND s.destination_country = 'Canada' WHERE s.shipment_id IS NULL;,SELECT Freight_Forwarders.name FROM Freight_Forwarders INNER JOIN Shipments ON Freight_Forwarders.forwarder_id = Shipments.forwarder_id WHERE Shipments.destination_country = 'Canada' AND Shipments.units_shipped IS NULL;,0 What is the total number of streams for each artist in descending order?,"CREATE TABLE artist_streams (stream_id INT, artist_id INT, streams_amount INT); CREATE TABLE artist (artist_id INT, artist_name VARCHAR(255));","SELECT artist_name, SUM(streams_amount) FROM artist_streams JOIN artist ON artist_streams.artist_id = artist.artist_id GROUP BY artist_name ORDER BY SUM(streams_amount) DESC;","SELECT a.artist_name, SUM(a.streams_amount) as total_streams FROM artist_streams a JOIN artist a ON a.artist_id = a.artist_id GROUP BY a.artist_name ORDER BY total_streams DESC;",0 What was the method of resolution when Mikhail Ilyukhin's record was 4-0?,"CREATE TABLE table_name_92 (method VARCHAR, record VARCHAR);","SELECT method FROM table_name_92 WHERE record = ""4-0"";","SELECT method FROM table_name_92 WHERE record = ""4-0"";",1 Which Historical Photos were taken at prospect 43 prospect ave?,"CREATE TABLE table_name_46 (historical_photos VARCHAR, location VARCHAR);","SELECT historical_photos FROM table_name_46 WHERE location = ""prospect 43 prospect ave"";","SELECT historical_photos FROM table_name_46 WHERE location = ""prospect 43 prospect ave"";",1 "SELECT DISTINCT MemberID, Gender FROM Members WHERE State = 'CA';","CREATE TABLE Members (MemberID INT, Name VARCHAR(50), Age INT, Gender VARCHAR(10), City VARCHAR(50), State VARCHAR(20)); ","SELECT MemberID, WorkoutType, DATE_TRUNC('month', Date) as Month FROM Workouts GROUP BY MemberID, WorkoutType, Month ORDER BY Month DESC;","SELECT MemberID, Gender FROM Members WHERE State = 'CA';",0 Who has a height of 2.16?,"CREATE TABLE table_name_41 (player VARCHAR, height VARCHAR);",SELECT player FROM table_name_41 WHERE height = 2.16;,"SELECT player FROM table_name_41 WHERE height = ""2.16"";",0 Who is the opponent of the team with a 1-1-0 record?,"CREATE TABLE table_name_53 (opponent VARCHAR, record VARCHAR);","SELECT opponent FROM table_name_53 WHERE record = ""1-1-0"";","SELECT opponent FROM table_name_53 WHERE record = ""1-1-0"";",1 What is the example of the Early Modern English ( [x] → /f/) /ɔf/?,"CREATE TABLE table_28177800_5 (example VARCHAR, early_modern_english VARCHAR);","SELECT example FROM table_28177800_5 WHERE early_modern_english = ""( [x] → /f/) /ɔf/"";","SELECT example FROM table_28177800_5 WHERE early_modern_english = ""[x] /f/) /f/"";",0 Which teams have the highest and lowest average ticket prices for VIP seats?,"CREATE TABLE Teams (TeamID INT, TeamName VARCHAR(50), AvgVIPTicketPrice DECIMAL(5,2));",SELECT TeamName FROM Teams WHERE AvgVIPTicketPrice = (SELECT MAX(AvgVIPTicketPrice) FROM Teams) OR AvgVIPTicketPrice = (SELECT MIN(AvgVIPTicketPrice) FROM Teams);,"SELECT TeamName, AvgVIPTicketPrice FROM Teams ORDER BY AvgVIPTicketPrice DESC LIMIT 1;",0 What is the average number of three-point field goals made per game by the Milwaukee Bucks in their playoff games during the 2020-2021 NBA season?,"CREATE TABLE matches (team VARCHAR(50), opponent VARCHAR(50), three_pointers INTEGER, points_team INTEGER, points_opponent INTEGER, season VARCHAR(10)); ",SELECT AVG(three_pointers) FROM matches WHERE team = 'Milwaukee Bucks' AND season = '2020-2021' AND points_team > points_opponent;,SELECT AVG(three_pointers) FROM matches WHERE team = 'Milwaukee Bucks' AND season = '2020-2021';,0 What's the result for the category of best actor in a supporting role?,"CREATE TABLE table_name_34 (result VARCHAR, category VARCHAR);","SELECT result FROM table_name_34 WHERE category = ""best actor in a supporting role"";","SELECT result FROM table_name_34 WHERE category = ""best actor in a supporting role"";",1 Remove records where prevalence > 1000 from 'disease_data',"CREATE TABLE if not exists 'disease_data' (id INT, state TEXT, disease TEXT, prevalence INT, PRIMARY KEY(id));",DELETE FROM 'disease_data' WHERE prevalence > 1000;,DELETE FROM 'disease_data' WHERE prevalence > 1000;,1 What is the unemployment rate for veterans in California as of March 2022?,"CREATE TABLE veteran_unemployment (state varchar(255), unemployment_date date, unemployment_rate decimal(5,2));",SELECT unemployment_rate FROM veteran_unemployment WHERE state = 'California' AND MONTH(unemployment_date) = 3 AND YEAR(unemployment_date) = 2022;,SELECT unemployment_rate FROM veteran_unemployment WHERE state = 'California' AND unemployment_date BETWEEN '2022-03-01' AND '2022-03-31';,0 What is the average age of female offenders in the justice_data schema's adult_offenders table?,"CREATE TABLE justice_data.adult_offenders (id INT, name VARCHAR(50), age INT, gender VARCHAR(10), offense VARCHAR(50));",SELECT AVG(age) FROM justice_data.adult_offenders WHERE gender = 'female';,SELECT AVG(age) FROM justice_data.adult_offenders WHERE gender = 'Female';,0 "What is the record of the game with 18,084 in attendance?","CREATE TABLE table_name_1 (record VARCHAR, attendance VARCHAR);","SELECT record FROM table_name_1 WHERE attendance = ""18,084"";","SELECT record FROM table_name_1 WHERE attendance = ""18,084"";",1 What is Block A when Prince Devitt is Devitt (9:53)?,"CREATE TABLE table_name_49 (block_a VARCHAR, prince_devitt VARCHAR);","SELECT block_a FROM table_name_49 WHERE prince_devitt = ""devitt (9:53)"";","SELECT block_a FROM table_name_49 WHERE prince_devitt = ""devitt (9:53)"";",1 What is the system called that is named ELKJS?,"CREATE TABLE table_name_56 (system VARCHAR, name VARCHAR);","SELECT system FROM table_name_56 WHERE name = ""elkjs"";","SELECT system FROM table_name_56 WHERE name = ""elkjs"";",1 Which Goals have a Ratio of 0.29?,"CREATE TABLE table_name_16 (goals VARCHAR, ratio VARCHAR);",SELECT goals FROM table_name_16 WHERE ratio = 0.29;,"SELECT goals FROM table_name_16 WHERE ratio = ""0.29"";",0 What is the total revenue generated by hotels in the Americas that have adopted AI concierge services in Q3 2022?,"CREATE TABLE hotel_services (hotel_id INT, hotel_name TEXT, country TEXT, revenue FLOAT, ai_concierge INT); ","SELECT SUM(revenue) FROM hotel_services WHERE country IN ('USA', 'Canada', 'Brazil', 'Mexico') AND ai_concierge = 1 AND quarter = 3 AND year = 2022;",SELECT SUM(revenue) FROM hotel_services WHERE country = 'Americas' AND ai_concierge = 'AI' AND QUARTER(ai_concierge) = 3 AND YEAR(ai_concierge) = 2022;,0 Which communities have the highest engagement levels in language preservation in South Asia?,"CREATE TABLE Communities (community_id INT PRIMARY KEY, community_name VARCHAR(255), region VARCHAR(255), engagement_level INT); ","SELECT c.community_name, c.region, l.language, l.script, l.speakers, c.engagement_level FROM Communities c INNER JOIN Languages l ON c.region = l.region WHERE c.engagement_level = (SELECT MAX(engagement_level) FROM Communities WHERE region = 'South Asia');","SELECT community_name, engagement_level FROM Communities WHERE region = 'South Asia' ORDER BY engagement_level DESC LIMIT 1;",0 What is the average monthly naval equipment spending for new customers in H1 2022?,"CREATE TABLE NewCustomerNavalSpending (customer_name TEXT, purchase_month DATE, amount INTEGER); ",SELECT AVG(amount) FROM NewCustomerNavalSpending WHERE purchase_month BETWEEN '2022-01-01' AND '2022-06-30';,SELECT AVG(amount) FROM NewCustomerNavalSpending WHERE purchase_month BETWEEN '2022-01-01' AND '2022-06-30';,1 What is the capital (endonym) where Douglas is the Capital (exonym)?,"CREATE TABLE table_1008653_9 (capital___endonym__ VARCHAR, capital___exonym__ VARCHAR);","SELECT capital___endonym__ FROM table_1008653_9 WHERE capital___exonym__ = ""Douglas"";","SELECT capital___endonym__ FROM table_1008653_9 WHERE capital___exonym__ = ""Douglas"";",1 The winner and nominee 'Hidden Agenda' is from which country?,"CREATE TABLE table_name_69 (country VARCHAR, winner_and_nominees VARCHAR);","SELECT country FROM table_name_69 WHERE winner_and_nominees = ""hidden agenda"";","SELECT country FROM table_name_69 WHERE winner_and_nominees = ""hidden agenda"";",1 What is the Location of the Stadium where Job Dragtsma is Manager?,"CREATE TABLE table_name_5 (location VARCHAR, manager VARCHAR);","SELECT location FROM table_name_5 WHERE manager = ""job dragtsma"";","SELECT location FROM table_name_5 WHERE manager = ""job dragtsma"";",1 What is the average energy consumption per unit of product in the energy_consumption table?,"CREATE TABLE energy_consumption (product VARCHAR(255), energy_consumption FLOAT);","SELECT product, AVG(energy_consumption) FROM energy_consumption GROUP BY product;",SELECT AVG(energy_consumption) FROM energy_consumption;,0 "Which round had Michael Schumacher in the pole position, David Coulthard with the fastest lap, and McLaren - Mercedes as the winning constructor?","CREATE TABLE table_1132600_3 (round VARCHAR, winning_constructor VARCHAR, pole_position VARCHAR, fastest_lap VARCHAR);","SELECT COUNT(round) FROM table_1132600_3 WHERE pole_position = ""Michael Schumacher"" AND fastest_lap = ""David Coulthard"" AND winning_constructor = ""McLaren - Mercedes"";","SELECT round FROM table_1132600_3 WHERE pole_position = ""Michael Schumacher"" AND fastest_lap = ""David Coulthard"" AND winning_constructor = ""McLaren - Mercedes"";",0 List the names of esports events with the highest total prize money and the corresponding prize money.,"CREATE TABLE EsportsEvents (EventID INT, EventName VARCHAR(20), PrizeMoney INT); ","SELECT EventName, PrizeMoney FROM EsportsEvents ORDER BY PrizeMoney DESC LIMIT 1;","SELECT EventName, PrizeMoney FROM EsportsEvents ORDER BY PrizeMoney DESC LIMIT 1;",1 Name the mountains classification for team columbia,"CREATE TABLE table_19115414_4 (mountains_classification VARCHAR, team_classification VARCHAR);","SELECT mountains_classification FROM table_19115414_4 WHERE team_classification = ""Team Columbia"";","SELECT mountains_classification FROM table_19115414_4 WHERE team_classification = ""Columbia"";",0 "How much Silver has a Rank of 1, and a Bronze smaller than 3?","CREATE TABLE table_name_29 (silver INTEGER, rank VARCHAR, bronze VARCHAR);","SELECT SUM(silver) FROM table_name_29 WHERE rank = ""1"" AND bronze < 3;",SELECT SUM(silver) FROM table_name_29 WHERE rank = 1 AND bronze 3;,0 How many wind turbines are installed in China as of 2021?,"CREATE TABLE wind_turbines (country VARCHAR(50), year INT, number_of_turbines INT); ",SELECT number_of_turbines FROM wind_turbines WHERE country = 'China' AND year = 2021;,SELECT SUM(number_of_turbines) FROM wind_turbines WHERE country = 'China' AND year = 2021;,0 "What are the date of ceremony of music festivals with category ""Best Song"" and result ""Awarded""?","CREATE TABLE music_festival (Date_of_ceremony VARCHAR, Category VARCHAR, RESULT VARCHAR);","SELECT Date_of_ceremony FROM music_festival WHERE Category = ""Best Song"" AND RESULT = ""Awarded"";","SELECT Date_of_ceremony FROM music_festival WHERE Category = ""Best Song"" AND RESULT = ""Awarded"";",1 What's the quantity preserved when the fleet number was 700?,"CREATE TABLE table_name_57 (quantity_preserved VARCHAR, fleet_number_s_ VARCHAR);","SELECT quantity_preserved FROM table_name_57 WHERE fleet_number_s_ = ""700"";",SELECT quantity_preserved FROM table_name_57 WHERE fleet_number_s_ = 700;,0 "How many goals were conceded by teams with 32 points, more than 2 losses and more than 22 goals scored?","CREATE TABLE table_name_75 (goals_conceded VARCHAR, goals_scored VARCHAR, points VARCHAR, lost VARCHAR);",SELECT COUNT(goals_conceded) FROM table_name_75 WHERE points = 32 AND lost > 2 AND goals_scored > 22;,SELECT goals_conceded FROM table_name_75 WHERE points = 32 AND lost > 2 AND goals_scored > 22;,0 What was the record in the game where McWilliams (8) did the most high rebounds?,"CREATE TABLE table_19789597_6 (record VARCHAR, high_rebounds VARCHAR);","SELECT record FROM table_19789597_6 WHERE high_rebounds = ""McWilliams (8)"";","SELECT record FROM table_19789597_6 WHERE high_rebounds = ""McWilliams (8)"";",1 Which organizations have the highest average donation amount in the Southeast region?,"CREATE TABLE organizations (org_id INT, org_name TEXT, region TEXT, avg_donation FLOAT); ","SELECT org_name, AVG(avg_donation) as avg_donation FROM organizations WHERE region = 'Southeast' GROUP BY org_name ORDER BY avg_donation DESC;","SELECT org_name, AVG(avg_donation) as avg_donation FROM organizations WHERE region = 'Southeast' GROUP BY org_name ORDER BY avg_donation DESC LIMIT 1;",0 "Which Draws have a Lexton Plains of skipton, and an Against larger than 1212?","CREATE TABLE table_name_85 (draws INTEGER, lexton_plains VARCHAR, against VARCHAR);","SELECT MAX(draws) FROM table_name_85 WHERE lexton_plains = ""skipton"" AND against > 1212;","SELECT SUM(draws) FROM table_name_85 WHERE lexton_plains = ""skipton"" AND against > 1212;",0 Calculate the total number of female and male farmers in the 'agriculture_innovation' table,"CREATE TABLE agriculture_innovation (farmer_id INT, farmer_name VARCHAR(50), gender VARCHAR(10), age INT, innovation_id INT);","SELECT SUM(CASE WHEN gender = 'Female' THEN 1 ELSE 0 END) AS total_female, SUM(CASE WHEN gender = 'Male' THEN 1 ELSE 0 END) AS total_male FROM agriculture_innovation;",SELECT COUNT(*) FROM agriculture_innovation WHERE gender = 'Female' INTERSECT SELECT COUNT(*) FROM agriculture_innovation WHERE gender = 'Male';,0 How many clinical trials were conducted for drug 'LMN-789'?,"CREATE TABLE clinical_trials (trial_id INTEGER, drug_name TEXT, year INTEGER);",SELECT COUNT(*) FROM clinical_trials WHERE drug_name = 'LMN-789';,SELECT COUNT(*) FROM clinical_trials WHERE drug_name = 'LMN-789';,1 Update the safety rating for 'Waymo' in the 'autonomous_driving_tests' table,"CREATE TABLE autonomous_driving_tests (id INT PRIMARY KEY, company VARCHAR(255), test_location VARCHAR(255), test_date DATE, safety_rating INT);",UPDATE autonomous_driving_tests SET safety_rating = 97 WHERE company = 'Waymo';,UPDATE autonomous_driving_tests SET safety_rating = 1 WHERE company = 'Waymo';,0 What player had the position guard/forward?,"CREATE TABLE table_name_83 (player VARCHAR, position VARCHAR);","SELECT player FROM table_name_83 WHERE position = ""guard/forward"";","SELECT player FROM table_name_83 WHERE position = ""guard/forward"";",1 What is the maximum satisfaction rating for VR games in the 'Education' category?,"CREATE TABLE GameSatisfaction (game VARCHAR(100), category VARCHAR(50), satisfaction FLOAT);",SELECT MAX(satisfaction) FROM GameSatisfaction WHERE category = 'Education';,SELECT MAX(satisfaction) FROM GameSatisfaction WHERE category = 'Education' AND game = 'VR';,0 How many silver medals does Cuba have?,"CREATE TABLE table_name_15 (silver INTEGER, nation VARCHAR);","SELECT SUM(silver) FROM table_name_15 WHERE nation = ""cuba"";","SELECT SUM(silver) FROM table_name_15 WHERE nation = ""cuba"";",1 "What is the total sales amount of cosmetics sold in Germany in Q3 2022, grouped by week?","CREATE TABLE sales (id INT, brand VARCHAR(255), country VARCHAR(255), sales_amount DECIMAL(10, 2), sale_date DATE);","SELECT DATE_TRUNC('week', sale_date) as week, SUM(sales_amount) FROM sales WHERE country = 'Germany' AND sale_date BETWEEN '2022-07-01' AND '2022-09-30' GROUP BY week;","SELECT EXTRACT(WEEK FROM sale_date) AS week, SUM(sales_amount) AS total_sales FROM sales WHERE country = 'Germany' AND sale_date BETWEEN '2022-04-01' AND '2022-06-30' GROUP BY week;",0 What courses have been added in the last 6 months?,"CREATE TABLE courses (course_id INT, course_name TEXT, added_date DATE); ","SELECT * FROM courses WHERE added_date >= DATEADD(month, -6, GETDATE());","SELECT course_name FROM courses WHERE added_date >= DATEADD(month, -6, GETDATE());",0 Update the warehouse location for item XYZ,"CREATE TABLE inventory(item VARCHAR(255), warehouse VARCHAR(255)); ",UPDATE inventory SET warehouse = 'B02' WHERE item = 'XYZ';,UPDATE inventory SET warehouse = 'XYZ' WHERE item = 'XYZ';,0 What is Davide Rebellin' UCI ProTour Points?,"CREATE TABLE table_name_33 (uci_protour_points VARCHAR, cyclist VARCHAR);","SELECT uci_protour_points FROM table_name_33 WHERE cyclist = ""davide rebellin"";","SELECT uci_protour_points FROM table_name_33 WHERE cyclist = ""davide rebellin"";",1 How many animals are there in each habitat?,"CREATE TABLE Animals_Per_Habitat AS SELECT 'Habitat_C' AS habitat, 55 AS animal_count UNION SELECT 'Habitat_D', 65;","SELECT habitat, AVG(animal_count) FROM Animals_Per_Habitat GROUP BY habitat;","SELECT habitat, 55 AS habitat, SUM(animal_count) AS total_animal_count FROM Animals_Per_Habitat GROUP BY habitat;",0 What was 2003's To Par?,"CREATE TABLE table_name_31 (to_par VARCHAR, year VARCHAR);",SELECT to_par FROM table_name_31 WHERE year = 2003;,SELECT to_par FROM table_name_31 WHERE year = 2003;,1 "Insert a new record for the 'train' service with a fare of $3.00 on January 1, 2023.","CREATE TABLE fares (service text, date date, fare decimal);","INSERT INTO fares (service, date, fare) VALUES ('train', '2023-01-01', 3.00);","INSERT INTO fares (service, date, fare) VALUES ('train', '2023-01-01', 3.00);",1 What is the total number of VR games in the 'Simulation' category that have a satisfaction rating above 4.5?,"CREATE TABLE VRGames (id INT, name VARCHAR(100), category VARCHAR(50), satisfaction FLOAT);",SELECT COUNT(*) FROM VRGames WHERE category = 'Simulation' AND satisfaction > 4.5;,SELECT COUNT(*) FROM VRGames WHERE category = 'Simulation' AND satisfaction > 4.5;,1 Name the most races for flaps larger than 2.0,"CREATE TABLE table_24466191_1 (races INTEGER, flaps INTEGER);",SELECT MAX(races) FROM table_24466191_1 WHERE flaps > 2.0;,SELECT MAX(races) FROM table_24466191_1 WHERE flaps > 2.0;,1 "Name the being for having things of language, religions, work, customs, values, norms?","CREATE TABLE table_name_52 (being__qualities_ VARCHAR, having__things_ VARCHAR);","SELECT being__qualities_ FROM table_name_52 WHERE having__things_ = ""language, religions, work, customs, values, norms"";","SELECT being__qualities_ FROM table_name_52 WHERE having__things_ = ""language, religions, work, customs, values, norms"";",1 "What is the average first round for Utah Jazz team, with a weight smaller than 229?","CREATE TABLE table_name_29 (first_round INTEGER, weight VARCHAR, team VARCHAR);","SELECT AVG(first_round) FROM table_name_29 WHERE weight < 229 AND team = ""utah jazz"";","SELECT AVG(first_round) FROM table_name_29 WHERE weight 229 AND team = ""utah jazz"";",0 Identify cruelty-free products with a safety issue.,"CREATE TABLE products(id INT, name TEXT, cruelty_free BOOLEAN, safety_issue TEXT); ",SELECT name FROM products WHERE cruelty_free = true AND safety_issue IS NOT NULL;,SELECT name FROM products WHERE cruelty_free = true AND safety_issue = true;,0 List all the unique types of renewable energy sources used in projects globally.,"CREATE TABLE renewable_projects (project_id INT, energy_source VARCHAR(30)); ",SELECT DISTINCT energy_source FROM renewable_projects;,SELECT DISTINCT energy_source FROM renewable_projects;,1 What is the total number of male and female beneficiaries served by the organization?,"CREATE TABLE org_beneficiaries (gender VARCHAR(6), count INT); ","SELECT gender, SUM(count) FROM org_beneficiaries GROUP BY gender;","SELECT gender, SUM(count) FROM org_beneficiaries GROUP BY gender;",1 What is the average donation amount for each cause in Sub-Saharan Africa?,"CREATE TABLE cause_average (cause VARCHAR(50), country VARCHAR(50), donation DECIMAL(10,2)); ","SELECT cause, AVG(donation) FROM cause_average WHERE country IN ('Nigeria', 'South Africa', 'Kenya', 'Tanzania') GROUP BY cause;","SELECT cause, AVG(donation) as avg_donation FROM cause_average WHERE country IN ('South Africa', 'Egypt') GROUP BY cause;",0 List the names of all countries with space agencies in the Asia-Pacific region.,"CREATE TABLE Countries (Country VARCHAR(100), Region VARCHAR(100), Space_Agency BOOLEAN); ",SELECT Country FROM Countries WHERE Region = 'Asia-Pacific' AND Space_Agency = TRUE;,SELECT Country FROM Countries WHERE Region = 'Asia-Pacific' AND Space_Agency = TRUE;,1 Which farmers in Argentina have more than 50 irrigation events?,"CREATE TABLE Irrigation (id INT, farm_id INT, date DATE, duration INT); ",SELECT f.name FROM Farmers f JOIN Irrigation i ON f.id = i.farm_id WHERE f.country = 'Argentina' GROUP BY f.name HAVING COUNT(i.id) > 50;,SELECT farm_id FROM Irrigation WHERE country = 'Argentina' GROUP BY farm_id HAVING COUNT(*) > 50;,0 What was the title in season #8?,"CREATE TABLE table_21146729_6 (title VARCHAR, season__number VARCHAR);",SELECT title FROM table_21146729_6 WHERE season__number = 8;,SELECT title FROM table_21146729_6 WHERE season__number = 8;,1 What is the top rank with a time of 2:19.86?,"CREATE TABLE table_name_25 (rank INTEGER, time VARCHAR);","SELECT MAX(rank) FROM table_name_25 WHERE time = ""2:19.86"";","SELECT MAX(rank) FROM table_name_25 WHERE time = ""2:19.86"";",1 What is the Gaelic name for an area less than 127 in Kintyre?,"CREATE TABLE table_name_63 (gaelic_name VARCHAR, area___ha__ VARCHAR, location VARCHAR);","SELECT gaelic_name FROM table_name_63 WHERE area___ha__ < 127 AND location = ""kintyre"";","SELECT gaelic_name FROM table_name_63 WHERE area___ha__ 127 AND location = ""kintyre"";",0 What is the total fare collected on weekdays?,"CREATE TABLE Fares(id INT, fare FLOAT, collection_date DATE); CREATE TABLE Dates(id INT, date DATE, is_weekday BOOLEAN);",SELECT SUM(Fares.fare) FROM Fares JOIN Dates ON Fares.collection_date = Dates.date WHERE Dates.is_weekday = TRUE;,SELECT SUM(Fares.fare) FROM Fares INNER JOIN Dates ON Fares.collection_date = Dates.date WHERE Dates.is_weekday = true;,0 Show the names of members in ascending order of their rank in rounds.,"CREATE TABLE member (Name VARCHAR, Member_ID VARCHAR); CREATE TABLE round (Member_ID VARCHAR);",SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round;,SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY T2.Rank ASC;,0 What is the number of mobile customers who have not made any voice calls in the last month in the 'coastal' region?,"CREATE TABLE subscribers (id INT, type VARCHAR(10), region VARCHAR(10)); CREATE TABLE calls (subscriber_id INT, call_date DATE); ",SELECT COUNT(*) FROM subscribers LEFT JOIN calls ON subscribers.id = calls.subscriber_id WHERE subscribers.region = 'coastal' AND calls.call_date IS NULL;,"SELECT COUNT(*) FROM subscribers JOIN calls ON subscribers.id = calls.subscriber_id WHERE subscribers.region = 'coastal' AND calls.call_date DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);",0 "If seed number is 2, what is the maximum amount of points?","CREATE TABLE table_23501776_18 (points INTEGER, seed VARCHAR);",SELECT MAX(points) FROM table_23501776_18 WHERE seed = 2;,SELECT MAX(points) FROM table_23501776_18 WHERE seed = 2;,1 What day did Footscray play as the home team?,"CREATE TABLE table_name_20 (date VARCHAR, home_team VARCHAR);","SELECT date FROM table_name_20 WHERE home_team = ""footscray"";","SELECT date FROM table_name_20 WHERE home_team = ""footscray"";",1 What álbum was in the year 1996?,"CREATE TABLE table_name_65 (álbum VARCHAR, year VARCHAR);",SELECT álbum FROM table_name_65 WHERE year = 1996;,SELECT álbum FROM table_name_65 WHERE year = 1996;,1 Which retailers have carried products from more than two different countries of origin?,"CREATE TABLE retailers (retailer_id INT, retailer_name TEXT);CREATE TABLE products (product_id INT, product_name TEXT, country_of_origin TEXT);CREATE TABLE inventory (retailer_id INT, product_id INT);",SELECT retailers.retailer_name FROM retailers JOIN inventory ON retailers.retailer_id = inventory.retailer_id JOIN products ON inventory.product_id = products.product_id GROUP BY retailers.retailer_name HAVING COUNT(DISTINCT products.country_of_origin) > 2;,SELECT r.retailer_name FROM retailers r INNER JOIN inventory i ON r.retailer_id = i.retailer_id INNER JOIN products p ON i.product_id = p.product_id WHERE p.country_of_origin > 2;,0 How many total visitors did the museum have from countries with more than 100 million population?,"CREATE TABLE Countries (CountryName VARCHAR(50), Population INT); ",SELECT COUNT(v.VisitorID) FROM Visitors v JOIN Countries c ON v.Country = c.CountryName WHERE c.Population > 100000000;,SELECT SUM(Population) FROM Countries WHERE CountryName = 'Museum' AND Population > 1000000;,0 What is the percentage of sustainable fabrics in our inventory?,"CREATE TABLE inventory (id INT, fabric VARCHAR(50), sustainable BOOLEAN); ","SELECT ROUND(COUNT(sustainable) * 100.0 / (SELECT COUNT(*) FROM inventory), 2) FROM inventory WHERE sustainable = true;",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM inventory)) FROM inventory WHERE sustainable = true;,0 "Which DOB has Bats of s, and a Position of inf?","CREATE TABLE table_name_8 (dob VARCHAR, bats VARCHAR, position VARCHAR);","SELECT dob FROM table_name_8 WHERE bats = ""s"" AND position = ""inf"";","SELECT dob FROM table_name_8 WHERE bats = ""s"" AND position = ""inf"";",1 "How many gold when silver is less than 32, bronze is 25, and overall is less than 67?","CREATE TABLE table_name_17 (gold INTEGER, overall VARCHAR, silver VARCHAR, bronze VARCHAR);",SELECT SUM(gold) FROM table_name_17 WHERE silver < 32 AND bronze = 25 AND overall < 67;,SELECT SUM(gold) FROM table_name_17 WHERE silver 32 AND bronze = 25 AND overall 67;,0 What is the distribution of security incident types in the last quarter by country?,"CREATE TABLE security_incidents (id INT, timestamp TIMESTAMP, country VARCHAR(255), incident_type VARCHAR(255)); ","SELECT country, incident_type, COUNT(*) as num_incidents FROM security_incidents WHERE timestamp >= NOW() - INTERVAL 3 MONTH GROUP BY country, incident_type;","SELECT country, incident_type, COUNT(*) as incident_count FROM security_incidents WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 MONTH) GROUP BY country, incident_type;",0 Which public transportation system has the highest ridership in 'New York'?,"CREATE TABLE public.public_transit_ridership(id serial PRIMARY KEY, system varchar(255), location varchar(255), ridership int);","SELECT system, MAX(ridership) FROM public.public_transit_ridership WHERE location = 'New York' GROUP BY system;","SELECT system, MAX(ridership) FROM public.public_transit_ridership WHERE location = 'New York' GROUP BY system;",1 Which technology for social good projects have the highest budgets?,"CREATE TABLE social_good_projects (id INT, project_name TEXT, budget INT); ","SELECT project_name, budget FROM social_good_projects ORDER BY budget DESC LIMIT 2;","SELECT project_name, budget FROM social_good_projects ORDER BY budget DESC LIMIT 1;",0 Delete all records from the 'cultural_competency' table where 'cultural_competency_score' is less than 70,"CREATE TABLE cultural_competency (id INT, hospital_name VARCHAR(255), cultural_competency_score INT);",DELETE FROM cultural_competency WHERE cultural_competency_score < 70;,DELETE FROM cultural_competency WHERE cultural_competency_score 70;,0 Identify the 10 ships with the highest average cargo weight per voyage in 2022.,"CREATE TABLE voyage (voyage_id INT, ship_id INT, voyage_date DATE, total_cargo_weight INT); CREATE TABLE ship_capacity (ship_id INT, max_cargo_capacity INT); ","SELECT s.ship_name, AVG(v.total_cargo_weight) as avg_cargo_weight FROM ship s JOIN ship_capacity sc ON s.ship_id = sc.ship_id JOIN voyage v ON s.ship_id = v.ship_id WHERE v.voyage_date >= '2022-01-01' AND v.voyage_date < '2023-01-01' GROUP BY s.ship_name ORDER BY avg_cargo_weight DESC LIMIT 10;","SELECT ship_id, AVG(total_cargo_weight) as avg_cargo_weight FROM voyage JOIN ship_capacity ON voyage.ship_id = ship_capacity.ship_id WHERE voyage_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY ship_id ORDER BY avg_cargo_weight DESC LIMIT 10;",0 calculate the total claim amount and average claim amount for policyholders who live in California and have an auto policy,"CREATE TABLE Policyholder (PolicyholderID INT, State VARCHAR(255), PolicyType VARCHAR(255), ClaimAmount DECIMAL(10,2)); ","SELECT SUM(ClaimAmount) as TotalClaimAmount, AVG(ClaimAmount) as AvgClaimAmount FROM Policyholder WHERE State = 'CA' AND PolicyType = 'Auto';","SELECT SUM(ClaimAmount), AVG(ClaimAmount) FROM Policyholder WHERE State = 'California' AND PolicyType = 'Auto';",0 Who is the top-performing port in terms of cargo handling?,"CREATE TABLE ports (port_id INT, port_name VARCHAR(50), total_cargo INT); ","SELECT port_name, ROW_NUMBER() OVER (ORDER BY total_cargo DESC) as rank FROM ports WHERE row_number() = 1;","SELECT port_name, total_cargo FROM ports ORDER BY total_cargo DESC LIMIT 1;",0 What is the minimum revenue generated from any eco-friendly tour in Mexico?,"CREATE TABLE mexico_tours (id INT, type VARCHAR(255), revenue FLOAT); ",SELECT MIN(revenue) FROM mexico_tours WHERE type = 'Eco-friendly';,SELECT MIN(revenue) FROM mexico_tours WHERE type = 'Eco-friendly';,1 What is the average age of fans for each team?,"CREATE TABLE teams (team_id INT, team_name VARCHAR(255)); CREATE TABLE fan_demographics (fan_id INT, team_id INT, age INT); ","SELECT t.team_name, AVG(fd.age) as avg_age FROM teams t INNER JOIN fan_demographics fd ON t.team_id = fd.team_id GROUP BY t.team_name;","SELECT t.team_name, AVG(f.age) as avg_age FROM teams t JOIN fan_demographics f ON t.team_id = f.team_id GROUP BY t.team_name;",0 What is the average occupancy rate of hotels in Paris and Rome?,"CREATE TABLE hotels (hotel_id INT, city VARCHAR(50), occupancy_rate DECIMAL(5,2)); ","SELECT AVG(occupancy_rate) FROM hotels WHERE city IN ('Paris', 'Rome');","SELECT AVG(occupancy_rate) FROM hotels WHERE city IN ('Paris', 'Rome');",1 What is the number of tuberculosis cases for each country in the tuberculosis_cases table?,"CREATE TABLE tuberculosis_cases (country TEXT, num_cases INT); ","SELECT country, num_cases FROM tuberculosis_cases;","SELECT country, SUM(num_cases) FROM tuberculosis_cases GROUP BY country;",0 Who are the clients that have made donations in Indonesia and have also invested in stocks?,"CREATE TABLE donations (id INT, client_name VARCHAR(50), country VARCHAR(50), amount DECIMAL(10,2), date DATE); CREATE TABLE investments (id INT, client_name VARCHAR(50), country VARCHAR(50), type VARCHAR(50), value DECIMAL(10,2), date DATE); ",SELECT client_name FROM donations WHERE country = 'Indonesia' INTERSECT SELECT client_name FROM investments WHERE type = 'stocks';,SELECT d.client_name FROM donations d JOIN investments i ON d.country = i.country WHERE d.country = 'Indonesia' AND i.type = 'Stocks';,0 Show the sum of investment amounts for startups founded by 'Jane Doe',"CREATE TABLE company (id INT, name TEXT, founding_year INT, founder_name TEXT); ",SELECT SUM(investment_amount) FROM investment_rounds ir INNER JOIN company c ON ir.company_id = c.id WHERE c.founder_name = 'Jane Doe';,SELECT SUM(investment_amount) FROM company WHERE founder_name = 'Jane Doe';,0 Update the soil moisture for 'Field_4' to 50 in the 'soil_moisture' table.,"CREATE TABLE soil_moisture (field VARCHAR(255), moisture FLOAT, timestamp TIMESTAMP);",UPDATE soil_moisture SET moisture = 50 WHERE field = 'Field_4';,UPDATE soil_moisture SET moisture = 50 WHERE field = 'Field_4';,1 "Insert a new record into the ""mining_operations"" table for a new gold mine in Ontario, Canada","CREATE TABLE mining_operations (id INT PRIMARY KEY, mine_name VARCHAR(255), location VARCHAR(255), resource VARCHAR(255), open_date DATE);","INSERT INTO mining_operations (id, mine_name, location, resource, open_date) VALUES (1, 'Golden Promise', 'Kirkland Lake, Ontario, Canada', 'Gold', '2022-05-01');","INSERT INTO mining_operations (id, mine_name, location, resource, open_date) VALUES (1, 'Gold Mine', 'Ontario', 'Canada', '2022-01-01');",0 What is the total of the points for wins under 6 and a rank of 2nd?,"CREATE TABLE table_name_59 (points INTEGER, rank VARCHAR, wins VARCHAR);","SELECT SUM(points) FROM table_name_59 WHERE rank = ""2nd"" AND wins < 6;","SELECT SUM(points) FROM table_name_59 WHERE rank = ""2nd"" AND wins 6;",0 What was the average financial wellbeing score for customers of WISE Bank in Q1 2021?,"CREATE TABLE WISE_Bank (id INT, customer_id INT, score INT, score_date DATE); ",SELECT AVG(score) FROM WISE_Bank WHERE QUARTER(score_date) = 1 AND YEAR(score_date) = 2021;,SELECT AVG(score) FROM WISE_Bank WHERE score_date BETWEEN '2021-01-01' AND '2021-06-30';,0 What is the total energy consumption (in kWh) for the state of Texas for the year 2019?,"CREATE TABLE state_energy (state VARCHAR(255), year INT, energy_consumption FLOAT);",SELECT SUM(energy_consumption) FROM state_energy WHERE state = 'Texas' AND year = 2019;,SELECT SUM(energy_consumption) FROM state_energy WHERE state = 'Texas' AND year = 2019;,1 Who was the original artist for week number Top 16 (8 women)?,"CREATE TABLE table_15796072_1 (original_artist VARCHAR, week__number VARCHAR);","SELECT original_artist FROM table_15796072_1 WHERE week__number = ""Top 16 (8 Women)"";","SELECT original_artist FROM table_15796072_1 WHERE week__number = ""Top 16 (8 women)"";",0 What are the transactions related to High risk level accounts?,"CREATE TABLE Accounts (AccountId INT, AccountType VARCHAR(20), Balance DECIMAL(10,2)); CREATE TABLE Risk (RiskId INT, AccountId INT, RiskLevel VARCHAR(20)); CREATE TABLE Transactions (TransactionId INT, AccountId INT, TransactionType VARCHAR(20), Amount DECIMAL(10,2)); ","SELECT T.TransactionId, T.AccountId, T.TransactionType, T.Amount FROM Transactions T JOIN Accounts A ON T.AccountId = A.AccountId JOIN Risk R ON A.AccountId = R.AccountId WHERE R.RiskLevel = 'High';",SELECT Transactions.TransactionType FROM Transactions INNER JOIN Risk ON Transactions.AccountId = Risk.AccountId INNER JOIN Accounts ON Transactions.AccountId = Accounts.AccountId WHERE Risk.RiskLevel = 'High';,0 Delete all records from 'mine_sites' table where 'region' is 'Appalachian',"CREATE TABLE mine_sites (site_id INT PRIMARY KEY, site_name VARCHAR(255), region VARCHAR(255));",DELETE FROM mine_sites WHERE region = 'Appalachian';,DELETE FROM mine_sites WHERE region = 'Appalachian';,1 What was the total amount of donations received by NGOs in Haiti in 2020?,"CREATE TABLE ngo_donations (ngo_name VARCHAR(255), country VARCHAR(255), amount DECIMAL(10,2), donation_year INT);",SELECT SUM(amount) FROM ngo_donations WHERE country = 'Haiti' AND donation_year = 2020;,SELECT SUM(amount) FROM ngo_donations WHERE country = 'Haiti' AND donation_year = 2020;,1 What is the highest cr number?,CREATE TABLE table_1886270_1 (cr_no INTEGER);,SELECT MAX(cr_no) FROM table_1886270_1;,SELECT MAX(cr_no) FROM table_1886270_1;,1 What digital channel does Three Angels Broadcasting Network own?,"CREATE TABLE table_name_16 (Digital VARCHAR, owner VARCHAR);","SELECT Digital AS channel FROM table_name_16 WHERE owner = ""three angels broadcasting network"";","SELECT Digital FROM table_name_16 WHERE owner = ""three angels broadcasting network"";",0 What is the average confidence score for fairness-related predictions made by model 'Fairlearn' in the 'model_performance' table?,"CREATE TABLE model_performance (model_name VARCHAR(20), prediction VARCHAR(20), confidence FLOAT); ",SELECT AVG(confidence) FROM model_performance WHERE model_name = 'Fairlearn' AND prediction LIKE '%fairness%';,SELECT AVG(confidence) FROM model_performance WHERE model_name = 'Fairlearn' AND prediction LIKE '%fairness%';,1 "Calculate the average daily production quantity of gold for mining sites in Canada with over 75 employees, for the year 2016.","CREATE TABLE gold_mine (site_id INT, country VARCHAR(50), num_employees INT, extraction_date DATE, quantity INT); ","SELECT country, AVG(quantity) as avg_daily_gold_prod FROM gold_mine WHERE num_employees > 75 AND country = 'Canada' AND extraction_date >= '2016-01-01' AND extraction_date <= '2016-12-31' GROUP BY country;",SELECT AVG(quantity) FROM gold_mine WHERE country = 'Canada' AND num_employees > 75 AND extraction_date BETWEEN '2016-01-01' AND '2016-12-31';,0 Who is the attorney with the highest billing amount in the 'New York' office?,"CREATE TABLE attorneys (attorney_id INT, office VARCHAR(50)); CREATE TABLE cases (case_id INT, attorney_id INT, billing_amount DECIMAL(10,2));","SELECT attorneys.name, MAX(billing_amount) FROM attorneys INNER JOIN cases ON attorneys.attorney_id = cases.attorney_id WHERE attorneys.office = 'New York' GROUP BY attorneys.name;","SELECT attorneys.attorney_id, attorneys.office, MAX(cases.billing_amount) as max_billing_amount FROM attorneys INNER JOIN cases ON attorneys.attorney_id = cases.attorney_id WHERE attorneys.office = 'New York' GROUP BY attorneys.attorney_id, attorneys.office;",0 What is the largest pick in round 8?,"CREATE TABLE table_name_82 (pick INTEGER, round VARCHAR);",SELECT MAX(pick) FROM table_name_82 WHERE round = 8;,SELECT MAX(pick) FROM table_name_82 WHERE round = 8;,1 Who is the winner where the losing hand is Ah 7s?,"CREATE TABLE table_12454156_1 (winner VARCHAR, losing_hand VARCHAR);","SELECT winner FROM table_12454156_1 WHERE losing_hand = ""Ah 7s"";","SELECT winner FROM table_12454156_1 WHERE losing_hand = ""Ah 7s"";",1 "What is the total number of military innovation projects initiated by the Association of Southeast Asian Nations (ASEAN) that involve unmanned aerial vehicles (UAVs) between 2017 and 2021, inclusive?","CREATE TABLE military_innovation_projects(id INT, organization VARCHAR(255), project VARCHAR(255), start_year INT, technology VARCHAR(255)); ",SELECT COUNT(*) FROM military_innovation_projects WHERE organization = 'ASEAN' AND technology = 'UAVs' AND start_year BETWEEN 2017 AND 2021;,SELECT COUNT(*) FROM military_innovation_projects WHERE organization = 'Association of Southeast Asian Nations (ASEAN) AND technology = 'Unmanned Aerial Vehicles' AND start_year BETWEEN 2017 AND 2021;,0 Discover customers who made purchases from both local and overseas suppliers.,"CREATE TABLE customers (customer_id INT, customer_name VARCHAR(50), local_supplier BOOLEAN, overseas_supplier BOOLEAN); CREATE TABLE purchases (purchase_id INT, customer_id INT, supplier_country VARCHAR(50)); ",SELECT COUNT(DISTINCT customer_id) FROM (SELECT customer_id FROM purchases p JOIN customers c ON p.customer_id = c.customer_id WHERE c.local_supplier = TRUE INTERSECT SELECT customer_id FROM purchases p JOIN customers c ON p.customer_id = c.customer_id WHERE c.overseas_supplier = TRUE);,SELECT c.customer_name FROM customers c INNER JOIN purchases p ON c.customer_id = p.customer_id WHERE c.local_supplier = TRUE AND p.overnight_supplier = TRUE;,0 What is the percentage of total donations coming from recurring donors in the last 3 years?,"CREATE TABLE donor_type (donor_id INT, recurring BOOLEAN, donation_year INT); ",SELECT 100.0 * SUM(CASE WHEN recurring THEN 1 ELSE 0 END) / COUNT(*) AS percentage_recurring FROM donor_type WHERE donation_year BETWEEN YEAR(CURRENT_DATE) - 3 AND YEAR(CURRENT_DATE);,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM donor_type WHERE recurring = true AND donation_year BETWEEN YEAR(CURRENT_DATE) - 3 AND YEAR(CURRENT_DATE))) AS percentage FROM donor_type WHERE recurring = true AND donation_year BETWEEN YEAR(CURRENT_DATE) - 3 AND YEAR(CURRENT_DATE);,0 "What national league has limoges csp, and french basketball cup?","CREATE TABLE table_name_80 (national_league VARCHAR, club VARCHAR, national_cup VARCHAR);","SELECT national_league FROM table_name_80 WHERE club = ""limoges csp"" AND national_cup = ""french basketball cup"";","SELECT national_league FROM table_name_80 WHERE club = ""limoges csp"" AND national_cup = ""french basketball cup"";",1 Create a view with the total number of electric vehicle charging stations by country,"CREATE TABLE charging_stations (id INT PRIMARY KEY, station_name VARCHAR(255), location VARCHAR(255), num_charging_ports INT, country VARCHAR(255));","CREATE VIEW total_charging_stations AS SELECT country, COUNT(*) as total_stations FROM charging_stations GROUP BY country;",CREATE VIEW SUM(num_charging_ports) AS total_stations_by_country FROM charging_stations GROUP BY country;,0 What is the date of the circuit of Monaco?,"CREATE TABLE table_name_97 (date VARCHAR, circuit VARCHAR);","SELECT date FROM table_name_97 WHERE circuit = ""monaco"";","SELECT date FROM table_name_97 WHERE circuit = ""monaco"";",1 "What is the total CO2 emissions reduction (in metric tons) achieved by carbon offset programs in Australia, and how many of them achieved a reduction of over 5000 metric tons?","CREATE TABLE australia_offset_programs (name TEXT, co2_reduction_tons INT); ","SELECT SUM(co2_reduction_tons) AS total_reduction, COUNT(*) FILTER (WHERE co2_reduction_tons > 5000) AS num_programs_over_5000 FROM australia_offset_programs;",SELECT COUNT(*) FROM australia_offset_programs WHERE co2_reduction_tons > 5000;,0 What is the average number of fans attending games in Asia?,"CREATE TABLE games (id INT, team TEXT, location TEXT, attendees INT, year INT); ","SELECT location, AVG(attendees) FROM games WHERE location LIKE '%Asia%' GROUP BY location;",SELECT AVG(attendees) FROM games WHERE location = 'Asia';,0 Show the names and ages of farmers in the 'farmers' table,"CREATE TABLE farmers (id INT PRIMARY KEY, name VARCHAR(50), age INT, gender VARCHAR(10), location VARCHAR(50)); ","SELECT name, age FROM farmers;","SELECT name, age FROM farmers;",1 What are the ids and names of the architects who built at least 3 bridges ?,"CREATE TABLE architect (id VARCHAR, name VARCHAR); CREATE TABLE bridge (architect_id VARCHAR);","SELECT T1.id, T1.name FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING COUNT(*) >= 3;","SELECT t1.id, t1.name FROM architect AS t1 JOIN bridge AS t2 ON t1.id = t2.architect_id GROUP BY t1.id HAVING COUNT(*) >= 3;",0 What is the American locations with less than 114 years and more than 1 tied with more than 1022 total games?,"CREATE TABLE table_name_36 (the_american VARCHAR, total_games VARCHAR, years VARCHAR, tied VARCHAR);",SELECT the_american FROM table_name_36 WHERE years < 114 AND tied > 1 AND total_games > 1022;,SELECT the_american FROM table_name_36 WHERE years 114 AND tied > 1 AND total_games > 1022;,0 What was the result in round qf?,"CREATE TABLE table_name_56 (result VARCHAR, round VARCHAR);","SELECT result FROM table_name_56 WHERE round = ""qf"";","SELECT result FROM table_name_56 WHERE round = ""qf"";",1 What was the location and attendance for the game after game 36 against Atlanta?,"CREATE TABLE table_name_1 (location_attendance VARCHAR, game VARCHAR, team VARCHAR);","SELECT location_attendance FROM table_name_1 WHERE game > 36 AND team = ""atlanta"";","SELECT location_attendance FROM table_name_1 WHERE game > 36 AND team = ""atlanta"";",1 Find the destination with the lowest carbon footprint in Asia.,"CREATE TABLE IF NOT EXISTS carbon_footprint (id INT PRIMARY KEY, name TEXT, region TEXT, carbon_footprint FLOAT); ",SELECT name FROM carbon_footprint WHERE region = 'Asia' ORDER BY carbon_footprint ASC LIMIT 1;,SELECT name FROM carbon_footprint WHERE region = 'Asia' ORDER BY carbon_footprint LIMIT 1;,0 What is the sum of production in 'FieldI' for the second half of 2021?,"CREATE TABLE wells (well_id varchar(10), field varchar(10), production int, datetime date); ",SELECT SUM(production) FROM wells WHERE field = 'FieldI' AND YEAR(datetime) = 2021 AND MONTH(datetime) >= 7 AND MONTH(datetime) <= 12;,SELECT SUM(production) FROM wells WHERE field = 'FieldI' AND datetime BETWEEN '2021-01-01' AND '2021-06-30';,0 List the top 3 graduate students with the highest number of research publications in descending order.,"CREATE TABLE GraduateStudents (StudentID int, StudentName varchar(255), UniversityID int); CREATE TABLE Publications (PublicationID int, StudentID int, Title varchar(255));","SELECT StudentName, COUNT(*) as NumPublications FROM Publications p JOIN GraduateStudents gs ON p.StudentID = gs.StudentID GROUP BY StudentName ORDER BY NumPublications DESC LIMIT 3;","SELECT GraduateStudents.StudentName, COUNT(Publications.PublicationID) as NumberOfPublications FROM GraduateStudents INNER JOIN Publications ON GraduateStudents.StudentID = Publications.StudentID GROUP BY GraduateStudents.StudentName ORDER BY NumberOfPublications DESC LIMIT 3;",0 "If the equation is (10 times 8) + 4, what would be the 2nd throw?",CREATE TABLE table_17265535_6 (equation VARCHAR);,"SELECT MAX(2 AS nd_throw) FROM table_17265535_6 WHERE equation = ""(10 times 8) + 4"";","SELECT 2 AS nd_throw FROM table_17265535_6 WHERE equation = ""10 times 8) + 4"";",0 "How many goals against were scored when the points were smaller than 13, the wins were smaller than 3, and the goals for were smaller than 15?","CREATE TABLE table_name_73 (goals_against INTEGER, goals_for VARCHAR, points VARCHAR, wins VARCHAR);",SELECT SUM(goals_against) FROM table_name_73 WHERE points < 13 AND wins < 3 AND goals_for < 15;,SELECT SUM(goals_against) FROM table_name_73 WHERE points 13 AND wins 3 AND goals_for 15;,0 How many companies are headquartered in the US?,CREATE TABLE company (Headquarters VARCHAR);,SELECT COUNT(*) FROM company WHERE Headquarters = 'USA';,"SELECT COUNT(*) FROM company WHERE Headquarters = ""US"";",0 What is the average transaction amount for customers in the West region in the first quarter of 2022?,"CREATE TABLE transactions (transaction_id INT, customer_id INT, transaction_date DATE, transaction_amount DECIMAL(10,2)); CREATE TABLE customers (customer_id INT, name VARCHAR(100), region VARCHAR(50)); ",SELECT AVG(transaction_amount) FROM transactions WHERE customer_id IN (SELECT customer_id FROM customers WHERE region = 'West') AND transaction_date BETWEEN '2022-01-01' AND '2022-03-31';,SELECT AVG(transaction_amount) FROM transactions JOIN customers ON transactions.customer_id = customers.customer_id WHERE customers.region = 'West' AND transaction_date BETWEEN '2022-01-01' AND '2022-03-31';,0 What is the maximum property tax rate for properties in each neighborhood?,"CREATE TABLE Neighborhoods (NeighborhoodID INT, NeighborhoodName VARCHAR(255)); CREATE TABLE PropertyTaxRates (PropertyTaxRateID INT, NeighborhoodID INT, Rate DECIMAL(5,2));","SELECT N.NeighborhoodName, MAX(PTR.Rate) as MaxRate FROM Neighborhoods N JOIN PropertyTaxRates PTR ON N.NeighborhoodID = PTR.NeighborhoodID GROUP BY N.NeighborhoodName;","SELECT Neighborhoods.NeighborhoodName, MAX(PropertyTaxRates.Rate) as MaxRate FROM Neighborhoods INNER JOIN PropertyTaxRates ON Neighborhoods.NeighborhoodID = PropertyTaxRates.NeighborhoodID GROUP BY Neighborhoods.NeighborhoodName;",0 Which organizations have the most volunteers?,"CREATE TABLE organization (id INT PRIMARY KEY, name VARCHAR(255));CREATE TABLE volunteer (id INT PRIMARY KEY, organization_id INT);","SELECT o.name, COUNT(v.id) AS total_volunteers FROM organization o JOIN volunteer v ON o.id = v.organization_id GROUP BY o.id ORDER BY total_volunteers DESC LIMIT 10;","SELECT o.name, COUNT(v.id) as num_volunteers FROM volunteer v JOIN organization o ON v.organization_id = o.id GROUP BY o.name ORDER BY num_volunteers DESC;",0 What is the average monthly data usage for postpaid mobile customers in New York?,"CREATE TABLE mobile_customers (customer_id INT, name VARCHAR(50), data_usage FLOAT, state VARCHAR(20)); ",SELECT AVG(data_usage) FROM mobile_customers WHERE state = 'New York' AND payment_type = 'postpaid';,SELECT AVG(data_usage) FROM mobile_customers WHERE state = 'New York' AND data_usage = (SELECT data_usage FROM mobile_customers WHERE state = 'New York');,0 Name the total number of races for 15th position,"CREATE TABLE table_24466191_1 (races VARCHAR, position VARCHAR);","SELECT COUNT(races) FROM table_24466191_1 WHERE position = ""15th"";","SELECT COUNT(races) FROM table_24466191_1 WHERE position = ""15th"";",1 "How many satellites were launched in each year, with a running total?","CREATE TABLE satellite_launches (year INT, satellite_name VARCHAR(50), country VARCHAR(50)); ","SELECT year, COUNT(satellite_name) OVER (PARTITION BY year ORDER BY year ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS running_total FROM satellite_launches;","SELECT year, COUNT(*) as num_satellites, SUM(running_total) as total_running FROM satellite_launches GROUP BY year;",0 What is the total number of vulnerabilities found in systems with outdated software?,"CREATE TABLE systems (id INT, software_version VARCHAR(255), vulnerabilities INT); ",SELECT SUM(vulnerabilities) FROM systems WHERE software_version = 'outdated';,SELECT SUM(vulnerabilities) FROM systems WHERE software_version = 'Old';,0 On what day was game 2 played?,"CREATE TABLE table_name_56 (date VARCHAR, game VARCHAR);",SELECT date FROM table_name_56 WHERE game = 2;,SELECT date FROM table_name_56 WHERE game = 2;,1 How many units of a specific fabric were used in garment manufacturing for the Spring 2022 season?,"CREATE TABLE fabric_usage (usage_id INT, fabric VARCHAR(255), garment_type VARCHAR(255), usage_quantity INT, usage_date DATE); CREATE TABLE garment_info (garment_id INT, garment_type VARCHAR(255), season VARCHAR(255));",SELECT usage_quantity FROM fabric_usage JOIN garment_info ON fabric_usage.garment_type = garment_info.garment_type WHERE fabric = 'silk' AND season = 'Spring 2022';,"SELECT fabric, SUM(usage_quantity) FROM fabric_usage JOIN garment_info ON fabric_usage.garment_type = garment_info.garment_type WHERE garment_info.season = 'Spring 2022' GROUP BY fabric;",0 Who was teh rider with 18 laps and a grid of 25?,"CREATE TABLE table_name_43 (rider VARCHAR, laps VARCHAR, grid VARCHAR);",SELECT rider FROM table_name_43 WHERE laps = 18 AND grid = 25;,SELECT rider FROM table_name_43 WHERE laps = 18 AND grid = 25;,1 What is the earliest launch date for a spacecraft that has discovered exoplanets?,"CREATE TABLE spacecraft (id INT PRIMARY KEY, name VARCHAR(255), country VARCHAR(255), launch_date DATE, discovered_exoplanets BOOLEAN);","SELECT name, MIN(launch_date) FROM spacecraft WHERE discovered_exoplanets = TRUE GROUP BY name;",SELECT MIN(launch_date) FROM spacecraft WHERE discovered_exoplanets = true;,0 Which ingredients are sourced from countries with high safety records?,"CREATE TABLE ingredients (ingredient_id INT, ingredient_name VARCHAR(100)); CREATE TABLE sources (source_id INT, ingredient_id INT, country VARCHAR(100), safety_record INT); ","SELECT ingredient_name, country FROM ingredients INNER JOIN sources ON ingredients.ingredient_id = sources.ingredient_id WHERE safety_record > 8;",SELECT ingredients.ingredient_name FROM ingredients INNER JOIN sources ON ingredients.ingredient_id = sources.ingredient_id WHERE sources.safety_record = (SELECT MAX(safety_record) FROM sources);,0 what is the lowest number of blocks,CREATE TABLE table_19722233_5 (blocks INTEGER);,SELECT MIN(blocks) FROM table_19722233_5;,SELECT MIN(blocks) FROM table_19722233_5;,1 What is the maximum inference time for models that use explainable AI techniques?," CREATE TABLE ai_models (id INT, name VARCHAR(50), explainability_technique VARCHAR(50), inference_time FLOAT); ", SELECT MAX(inference_time) FROM ai_models WHERE explainability_technique IS NOT NULL;,SELECT MAX(inference_time) FROM ai_models WHERE explainability_technique = 'AI';,0 Calculate the average fare per trip and number of trips per route,"CREATE TABLE fare_distribution (route_id INT, trips_taken INT, fare_collected DECIMAL(5,2)); ","SELECT route_id, AVG(fare_collected / trips_taken) as average_fare_per_trip, AVG(trips_taken) as average_trips_per_route FROM fare_distribution GROUP BY route_id;","SELECT route_id, AVG(fare_collected) as avg_fare, COUNT(trips_taken) as num_trips FROM fare_distribution GROUP BY route_id;",0 "Which countries had zero production of Dysprosium in 2019, from the 'production' and 'countries' tables?","CREATE TABLE production ( id INT PRIMARY KEY, country_id INT, element VARCHAR(10), year INT, quantity INT); CREATE TABLE countries ( id INT PRIMARY KEY, name VARCHAR(255)); ",SELECT countries.name FROM production INNER JOIN countries ON production.country_id = countries.id WHERE element = 'Dysprosium' AND year = 2019 AND quantity = 0;,SELECT c.name FROM countries c JOIN production p ON c.id = p.country_id WHERE p.element = 'Dysprosium' AND p.year = 2019 AND p.quantity = 0;,0 What is the average mental health rating of courses for each teacher?,"CREATE TABLE course_ratings (course_id INT, teacher_id INT, mental_health_rating FLOAT); ","SELECT teacher_id, AVG(mental_health_rating) FROM course_ratings GROUP BY teacher_id;","SELECT teacher_id, AVG(mental_health_rating) FROM course_ratings GROUP BY teacher_id;",1 What is the width feet in meeters for the truss with a source of nbi (2009)?,"CREATE TABLE table_name_63 (width_feet__m_ VARCHAR, source__year_ VARCHAR);","SELECT width_feet__m_ FROM table_name_63 WHERE source__year_ = ""nbi (2009)"";","SELECT width_feet__m_ FROM table_name_63 WHERE source__year_ = ""nbi (2009)"";",1 When 2005 is the season how many drivers are there?,"CREATE TABLE table_1771753_3 (driver VARCHAR, season VARCHAR);","SELECT COUNT(driver) FROM table_1771753_3 WHERE season = ""2005"";","SELECT COUNT(driver) FROM table_1771753_3 WHERE season = ""2005"";",1 Tell me the years competed for panthers,"CREATE TABLE table_name_97 (years_competed VARCHAR, nickname VARCHAR);","SELECT years_competed FROM table_name_97 WHERE nickname = ""panthers"";","SELECT years_competed FROM table_name_97 WHERE nickname = ""panthers"";",1 Which wells are located in the Gulf of Mexico and have a production figure greater than 3000?,"CREATE TABLE wells (well_id varchar(10), region varchar(20), production_figures int); ","SELECT well_id, production_figures FROM wells WHERE region = 'Gulf of Mexico' AND production_figures > 3000;","SELECT well_id, region, production_figures FROM wells WHERE region = 'Gulf of Mexico' AND production_figures > 3000;",0 What is the total mass of all spacecraft built for astrophysics research?,"CREATE TABLE Spacecraft (type VARCHAR(20), name VARCHAR(30), mass FLOAT); ",SELECT SUM(mass) FROM Spacecraft WHERE type = 'Astrophysics';,SELECT SUM(mass) FROM Spacecraft WHERE type = 'Astrophysics';,1 Which countries have the highest and lowest number of flight accidents in the last 5 years?,"CREATE TABLE flight_safety (id INT, country VARCHAR(255), accident_date DATE, accident_type VARCHAR(255));","SELECT country, COUNT(*) as num_accidents FROM flight_safety WHERE accident_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 5 YEAR) GROUP BY country ORDER BY num_accidents DESC;","SELECT country, COUNT(*) as accident_count FROM flight_safety WHERE accident_date >= DATEADD(year, -5, GETDATE()) GROUP BY country ORDER BY accident_count DESC LIMIT 1;",0 What is the name and description of the oldest accommodation provided?,"CREATE TABLE Accommodations (Id INT, StudentId INT, AccommodationType VARCHAR(50), Description TEXT, DateProvided DATETIME); ","SELECT AccommodationType, Description FROM Accommodations ORDER BY DateProvided ASC LIMIT 1;","SELECT AccommodationType, Description FROM Accommodations ORDER BY DateProvided DESC LIMIT 1;",0 What are the average ingredient costs for lipsticks produced in the US?,"CREATE TABLE product (product_id INT, product_name VARCHAR(255), production_country VARCHAR(255)); CREATE TABLE ingredient_cost (ingredient_id INT, product_id INT, cost DECIMAL(10,2)); ",SELECT AVG(ingredient_cost.cost) as avg_cost FROM ingredient_cost JOIN product ON ingredient_cost.product_id = product.product_id WHERE product.production_country = 'USA' AND product_name = 'Lipstick';,SELECT AVG(i.cost) FROM ingredient_cost i JOIN product p ON i.product_id = p.product_id WHERE p.production_country = 'USA' AND p.product_name = 'Lipstick';,0 "What is TV Time, when Opponent is At Cincinnati Bengals?","CREATE TABLE table_name_89 (tv_time VARCHAR, opponent VARCHAR);","SELECT tv_time FROM table_name_89 WHERE opponent = ""at cincinnati bengals"";","SELECT tv_time FROM table_name_89 WHERE opponent = ""at cincinnati bengals"";",1 What are the distinct unit prices of all tracks?,CREATE TABLE TRACK (UnitPrice VARCHAR);,SELECT DISTINCT (UnitPrice) FROM TRACK;,SELECT DISTINCT UnitPrice FROM TRACK;,0 what is the number of times that the heat is 3 and the name is cxhristy ekpukhon ihunaegbo?,"CREATE TABLE table_name_29 (lane VARCHAR, heat VARCHAR, name VARCHAR);","SELECT COUNT(lane) FROM table_name_29 WHERE heat = 3 AND name = ""cxhristy ekpukhon ihunaegbo"";","SELECT COUNT(lane) FROM table_name_29 WHERE heat = 3 AND name = ""cxhristy ekpukhon ihunaegbo"";",1 What was the score of the Kings game when they had a record of 8–11–1?,"CREATE TABLE table_name_27 (score VARCHAR, record VARCHAR);","SELECT score FROM table_name_27 WHERE record = ""8–11–1"";","SELECT score FROM table_name_27 WHERE record = ""8–11–1"";",1 "What is the average age of attendees who have participated in dance programs, and how many unique programs have they attended?","CREATE TABLE Attendees (AttendeeID INT, Age INT, Gender VARCHAR(10));CREATE TABLE DancePrograms (ProgramID INT, ProgramName VARCHAR(20));CREATE TABLE Attendance (AttendeeID INT, ProgramID INT);","SELECT AVG(A.Age) AS Avg_Age, COUNT(DISTINCT A.ProgramID) AS Num_Unique_Programs FROM Attendees A INNER JOIN Attendance AT ON A.AttendeeID = AT.AttendeeID INNER JOIN DancePrograms DP ON AT.ProgramID = DP.ProgramID;","SELECT AVG(Attendees.Age), COUNT(DISTINCT Attendance.ProgramID) FROM Attendees INNER JOIN DancePrograms ON Attendance.ProgramID = DancePrograms.ProgramID INNER JOIN Attendance ON DancePrograms.ProgramID = Attendance.ProgramID GROUP BY DancePrograms.ProgramName;",0 What Season is listed for the Player of Jon Stefansson?,"CREATE TABLE table_name_82 (season VARCHAR, player VARCHAR);","SELECT season FROM table_name_82 WHERE player = ""jon stefansson"";","SELECT season FROM table_name_82 WHERE player = ""jon stefansson"";",1 In 1987 who was the mens singles,"CREATE TABLE table_15001681_1 (mens_singles VARCHAR, year VARCHAR);",SELECT mens_singles FROM table_15001681_1 WHERE year = 1987;,SELECT mens_singles FROM table_15001681_1 WHERE year = 1987;,1 What was the largest capacity when the club was F.C. Igea Virtus Barcellona?,"CREATE TABLE table_name_30 (capacity INTEGER, club VARCHAR);","SELECT MAX(capacity) FROM table_name_30 WHERE club = ""f.c. igea virtus barcellona"";","SELECT MAX(capacity) FROM table_name_30 WHERE club = ""f.c. igea virtues barcellona"";",0 What is the combined sales of all drugs approved in 'Year1'?,"CREATE TABLE drug_sales (drug_name TEXT, sales INTEGER, approval_year TEXT); ",SELECT SUM(sales) FROM drug_sales WHERE approval_year = 'Year1';,SELECT SUM(sales) FROM drug_sales WHERE approval_year = 1;,0 What is the minimum age of offenders who have participated in traditional programs?,"CREATE TABLE offenders (offender_id INT, age INT, program_type VARCHAR(20)); ",SELECT MIN(age) FROM offenders WHERE program_type = 'Traditional';,SELECT MIN(age) FROM offenders WHERE program_type = 'Traditional';,1 "How many languages are spoken at each heritage site, grouped by language family, and only showing families with more than 5 languages?","CREATE TABLE HeritageSites (id INT, name VARCHAR(255), location VARCHAR(255), type VARCHAR(255), year_established INT, UNIQUE(id)); CREATE TABLE Languages (id INT, name VARCHAR(255), language_family VARCHAR(255), num_speakers INT, HeritageSite_id INT, PRIMARY KEY(id), FOREIGN KEY(HeritageSite_id) REFERENCES HeritageSites(id)); CREATE VIEW HeritageSitesWithLanguages AS SELECT HeritageSites.name, Languages.language_family, COUNT(Languages.id) as num_languages FROM HeritageSites INNER JOIN Languages ON HeritageSites.id = Languages.HeritageSite_id GROUP BY HeritageSites.name, Languages.language_family;","SELECT HeritageSitesWithLanguages.language_family, SUM(HeritageSitesWithLanguages.num_languages) as total_languages FROM HeritageSitesWithLanguages GROUP BY HeritageSitesWithLanguages.language_family HAVING total_languages > 5;","SELECT HeritageSites.name, HeritageSites.language_family, COUNT(*) FROM HeritageSites INNER JOIN HeritageSitesWithLanguages ON HeritageSites.id = HeritageSitesWithLanguages.HeritageSite_id GROUP BY HeritageSites.name, HeritageSites.language_family HAVING COUNT(*) > 5;",0 What is the total number of military equipment sales in the year 2022?,"CREATE TABLE military_equipment_sales (id INT, sale_date DATE, quantity INT); ",SELECT SUM(quantity) FROM military_equipment_sales WHERE YEAR(sale_date) = 2022;,SELECT SUM(quantity) FROM military_equipment_sales WHERE YEAR(sale_date) = 2022;,1 "Identify the number of research grants and total grant amount awarded to each department in the last five years, accounting for grants awarded to faculty members who have not published in the last three years.","CREATE TABLE departments (department VARCHAR(50), total_grant_amount FLOAT); CREATE TABLE grants (grant_id INT, department VARCHAR(50), year INT, amount FLOAT, faculty_published BOOLEAN); ","SELECT d.department, COUNT(g.grant_id) AS num_grants, SUM(g.amount) AS total_grant_amount FROM departments d LEFT JOIN grants g ON d.department = g.department AND g.faculty_published = true AND g.year BETWEEN YEAR(CURRENT_DATE) - 5 AND YEAR(CURRENT_DATE) GROUP BY d.department;","SELECT d.department, COUNT(g.grant_id) as num_grants, SUM(g.amount) as total_grant_amount FROM departments d JOIN grants g ON d.department = g.department WHERE g.faculty_published = false AND g.year BETWEEN 2017 AND 2021 GROUP BY d.department;",0 What is the maximum data usage for a single mobile customer in the city of Sydney for the year 2022?,"CREATE TABLE mobile_usage (customer_id INT, data_usage FLOAT, city VARCHAR(20), year INT); ",SELECT MAX(data_usage) FROM mobile_usage WHERE city = 'Sydney' AND year = 2022;,SELECT MAX(data_usage) FROM mobile_usage WHERE city = 'Sydney' AND year = 2022;,1 What is the average number of hospital beds in rural areas of each state?,"CREATE TABLE hospital (hospital_id INT, name TEXT, location TEXT, beds INT, state TEXT);","SELECT state, AVG(beds) FROM hospital WHERE location LIKE '%rural%' GROUP BY state;","SELECT state, AVG(beds) FROM hospital WHERE location LIKE '%rural%' GROUP BY state;",1 What is the total number of crimes committed in each category in the last year?,"CREATE TABLE crime_categories (id INT, name TEXT);CREATE TABLE crimes (id INT, category_id INT, date DATE);","SELECT c.name, COUNT(cr.id) FROM crime_categories c JOIN crimes cr ON c.id = cr.category_id WHERE cr.date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) GROUP BY c.id;","SELECT c.category_id, COUNT(c.id) as total_crimes FROM crime_categories c JOIN crimes c ON c.id = c.category_id WHERE c.date >= DATEADD(year, -1, GETDATE()) GROUP BY c.category_id;",0 What is the name of the episode told by Kiki and directed by Will Dixon?,"CREATE TABLE table_10470082_6 (title VARCHAR, storyteller VARCHAR, director VARCHAR);","SELECT title FROM table_10470082_6 WHERE storyteller = ""Kiki"" AND director = ""Will Dixon"";","SELECT title FROM table_10470082_6 WHERE storyteller = ""Kiki"" AND director = ""Will Dixon"";",1 Add data to the open pedagogy courses table,"CREATE TABLE OpenPedagogyCourses (CourseID INT PRIMARY KEY, CourseName VARCHAR(100), StartDate DATE, EndDate DATE, Enrollment INT);","INSERT INTO OpenPedagogyCourses (CourseID, CourseName, StartDate, EndDate, Enrollment) VALUES (1, 'Open Pedagogy 101', '2022-06-01', '2022-07-31', 50), (2, 'Collaborative Learning', '2022-07-01', '2022-08-31', 30), (3, 'Learning Analytics', '2022-05-01', '2022-06-30', 40);","INSERT INTO OpenPedagogyCourses (CourseID, CourseName, StartDate, EndDate, Enrollment) VALUES (1, 'OpenPedagogyCourses', '2022-03-01', '2022-03-31', '2022-03-31'), (2, 'OpenPedagogyCourses', '2022-03-31', '2022-03-31'), (3, 'OpenPedagogyCourses', '2022-03-31', '2022-03-31', '2022-03-31');",0 What date was the venue at VFL park?,"CREATE TABLE table_name_97 (date VARCHAR, venue VARCHAR);","SELECT date FROM table_name_97 WHERE venue = ""vfl park"";","SELECT date FROM table_name_97 WHERE venue = ""vfl park"";",1 What is the most laps with a qualification of 106.185?,"CREATE TABLE table_name_38 (laps INTEGER, qual VARCHAR);","SELECT MAX(laps) FROM table_name_38 WHERE qual = ""106.185"";","SELECT MAX(laps) FROM table_name_38 WHERE qual = ""106.185"";",1 What is the total number of properties in Seattle with a co-housing model?,"CREATE TABLE property_type (property_id INT, city VARCHAR(50), model VARCHAR(50)); ",SELECT COUNT(*) FROM property_type WHERE city = 'Seattle' AND model = 'co-housing';,SELECT COUNT(*) FROM property_type WHERE city = 'Seattle' AND model = 'Co-housing';,0 What player was born in 1978 and smaller than 1.92?,"CREATE TABLE table_name_31 (current_club VARCHAR, height VARCHAR, year_born VARCHAR);",SELECT current_club FROM table_name_31 WHERE height < 1.92 AND year_born > 1978;,SELECT current_club FROM table_name_31 WHERE height 1.92 AND year_born = 1978;,0 How many legal technology patents were filed in total in India in 2019?,"CREATE TABLE patents (patent_id INT, filing_date DATE, country VARCHAR(20)); ",SELECT COUNT(*) FROM patents WHERE filing_date BETWEEN '2019-01-01' AND '2019-12-31' AND country = 'India';,SELECT COUNT(*) FROM patents WHERE country = 'India' AND YEAR(filing_date) = 2019;,0 What are the total assets of customers who don't have a savings account?,"CREATE TABLE Accounts (CustomerID INT, AccountType VARCHAR(50), Balance DECIMAL(10,2)); ",SELECT SUM(Balance) FROM Accounts WHERE AccountType != 'Savings',SELECT SUM(Balance) FROM Accounts WHERE AccountType!= 'Savings';,0 Delete paintings from artist 'Pablo Picasso' in 'Artwork' table.,"CREATE TABLE Artists (id INT, name TEXT); CREATE TABLE Artwork (id INT, title TEXT, artist_id INT); ",DELETE FROM Artwork WHERE artist_id = (SELECT id FROM Artists WHERE name = 'Pablo Picasso');,DELETE FROM Artwork WHERE artist_id = (SELECT id FROM Artists WHERE name = 'Pablo Picasso');,1 "Update the ""price"" of the virtual tour located in 'Rome' to 15.99","CREATE TABLE virtual_tours (tour_id INT, location VARCHAR(50), description TEXT, price DECIMAL(5,2)); ",UPDATE virtual_tours SET price = 15.99 WHERE location = 'Rome';,UPDATE virtual_tours SET price = 15.99 WHERE location = 'Rome';,1 Which marine mammal species have been observed in the 'Indian Ocean'?',"CREATE TABLE marine_mammals (name TEXT, region TEXT); ",SELECT name FROM marine_mammals WHERE region = 'Indian Ocean';,SELECT name FROM marine_mammals WHERE region = 'Indian Ocean';,1 What is the maximum depth (in meters) of all marine trenches in the North Pacific Ocean?,"CREATE TABLE marine_trenches (id INT, name TEXT, region TEXT, depth FLOAT); ",SELECT MAX(depth) FROM marine_trenches WHERE region = 'North Pacific Ocean';,SELECT MAX(depth) FROM marine_trenches WHERE region = 'North Pacific Ocean';,1 What is the maximum square footage of a green-certified building in Toronto?,"CREATE TABLE toronto_buildings (certification VARCHAR(20), sqft INT); ",SELECT MAX(sqft) FROM toronto_buildings WHERE certification = 'LEED';,SELECT MAX(sqft) FROM toronto_buildings WHERE certification = 'Green';,0 What was the maximum amount of funding for 'Education' initiatives provided by the EU in 2019?,"CREATE TABLE Funding (Funder VARCHAR(50), Sector VARCHAR(50), FundingAmount NUMERIC(15,2), Year INT); ",SELECT MAX(FundingAmount) FROM Funding WHERE Sector = 'Education' AND Year = 2019 AND Funder = 'EU';,SELECT MAX(FundingAmount) FROM Funding WHERE Sector = 'Education' AND Year = 2019;,0 Who are the top 3 mobile data users in the East region?,"CREATE TABLE subscribers (subscriber_id INT, name VARCHAR(255), region_id INT); CREATE TABLE mobile (mobile_id INT, subscriber_id INT, data_usage INT); ","SELECT s.name, SUM(m.data_usage) as total_data_usage FROM subscribers AS s JOIN mobile AS m ON s.subscriber_id = m.subscriber_id WHERE s.region_id = 3 GROUP BY s.name ORDER BY total_data_usage DESC LIMIT 3;","SELECT s.name, SUM(m.data_usage) as total_data_usage FROM subscribers s JOIN mobile m ON s.subscriber_id = m.subscriber_id WHERE s.region_id = 3 GROUP BY s.name ORDER BY total_data_usage DESC LIMIT 3;",0 What was the result for the role of Ellie Greenwich in 2005?,"CREATE TABLE table_name_73 (result VARCHAR, role VARCHAR, year VARCHAR);","SELECT result FROM table_name_73 WHERE role = ""ellie greenwich"" AND year = ""2005"";","SELECT result FROM table_name_73 WHERE role = ""ellie greenwich"" AND year = 2005;",0 What is the blocks total number if the points is 4?,"CREATE TABLE table_23346303_5 (blocks VARCHAR, points VARCHAR);",SELECT COUNT(blocks) FROM table_23346303_5 WHERE points = 4;,SELECT COUNT(blocks) FROM table_23346303_5 WHERE points = 4;,1 How many episodes were directed by Tim Matheson?,"CREATE TABLE table_25740548_2 (original_air_date VARCHAR, directed_by VARCHAR);","SELECT COUNT(original_air_date) FROM table_25740548_2 WHERE directed_by = ""Tim Matheson"";","SELECT COUNT(original_air_date) FROM table_25740548_2 WHERE directed_by = ""Tim Matheson"";",1 Get the names of the top 5 cities with the highest average CO2 emissions for their buildings in the 'smart_cities' schema.,"CREATE TABLE smart_cities.buildings (id INT, city VARCHAR(255), co2_emissions INT); CREATE VIEW smart_cities.buildings_view AS SELECT id, city, co2_emissions FROM smart_cities.buildings;"," SELECT city FROM ( SELECT city, AVG(co2_emissions) as avg_emissions, ROW_NUMBER() OVER (ORDER BY AVG(co2_emissions) DESC) as rn FROM smart_cities.buildings_view GROUP BY city ) as subquery WHERE rn <= 5; ","SELECT city, AVG(co2_emissions) as avg_co2_emissions FROM smart_cities.buildings_view GROUP BY city ORDER BY avg_co2_emissions DESC LIMIT 5;",0 "How many education projects were carried out in 'community_development' table, grouped by location?","CREATE TABLE community_development (id INT, project_type VARCHAR(50), location VARCHAR(50), start_date DATE, end_date DATE); ","SELECT location, COUNT(*) FROM community_development WHERE project_type = 'Education' GROUP BY location;","SELECT location, COUNT(*) FROM community_development WHERE project_type = 'Education' GROUP BY location;",1 What is the 2011 value with a 2008 value of 0.3 and is a member state of the European Union?,CREATE TABLE table_name_64 (member_state VARCHAR);,"SELECT 2011 FROM table_name_64 WHERE 2008 = ""0.3"" AND member_state = ""european union"";","SELECT 2011 FROM table_name_64 WHERE 2008 = ""0.3"" AND member_state = ""european union"";",1 What is the total funding received by arts organizations in Texas and Florida?,"CREATE TABLE funding (id INT, state VARCHAR(2), org_name VARCHAR(20), amount INT); ","SELECT SUM(f.amount) FROM funding f WHERE f.state IN ('TX', 'FL');","SELECT SUM(amount) FROM funding WHERE state IN ('Texas', 'Florida');",0 Where was the game played where Collingwood was the away team?,"CREATE TABLE table_name_99 (venue VARCHAR, away_team VARCHAR);","SELECT venue FROM table_name_99 WHERE away_team = ""collingwood"";","SELECT venue FROM table_name_99 WHERE away_team = ""collingwood"";",1 What is the maximum funding received by biotech startups in the UK?,"CREATE TABLE startups (id INT, name TEXT, industry TEXT, funding_source TEXT, funding_amount INT); ",SELECT MAX(funding_amount) FROM startups WHERE industry = 'Biotech' AND country = 'UK';,SELECT MAX(funding_amount) FROM startups WHERE industry = 'Biotech' AND country = 'UK';,1 Which container ships have had their capacity updated in the last month?,"CREATE TABLE ship_updates (update_id INT, ship_name VARCHAR(50), capacity INT, update_date DATE); ","SELECT ship_name, update_date FROM ship_updates WHERE update_date > DATEADD(MONTH, -1, GETDATE());","SELECT ship_name FROM ship_updates WHERE update_date >= DATEADD(month, -1, GETDATE());",0 What is the NTSC M for Pal M 525/60?,"CREATE TABLE table_name_23 (ntsc_m VARCHAR, pal_m VARCHAR);","SELECT ntsc_m FROM table_name_23 WHERE pal_m = ""525/60"";","SELECT ntsc_m FROM table_name_23 WHERE pal_m = ""525/60"";",1 What is the Home Team Score at Windy Hill?,"CREATE TABLE table_name_64 (home_team VARCHAR, venue VARCHAR);","SELECT home_team AS score FROM table_name_64 WHERE venue = ""windy hill"";","SELECT home_team AS score FROM table_name_64 WHERE venue = ""windy hill"";",1 Which exaltation has a detriment of Saturn and Cancer as a sign?,"CREATE TABLE table_name_75 (exaltation VARCHAR, detriment VARCHAR, sign VARCHAR);","SELECT exaltation FROM table_name_75 WHERE detriment = ""saturn"" AND sign = ""cancer"";","SELECT exaltation FROM table_name_75 WHERE detriment = ""saturn"" AND sign = ""cancer"";",1 "List the names of vessels that have traveled to the port of Dar es Salaam, Tanzania in the last 3 months.","CREATE TABLE vessels (id INT, name TEXT, last_port TEXT, last_port_date DATE); ","SELECT DISTINCT name FROM vessels WHERE last_port = 'Dar es Salaam' AND last_port_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH);","SELECT name FROM vessels WHERE last_port = 'Dar es Salaam' AND last_port_date >= DATEADD(month, -3, GETDATE());",0 What is the value for 2008 for the US Open Tournament?,CREATE TABLE table_name_84 (tournament VARCHAR);,"SELECT 2008 FROM table_name_84 WHERE tournament = ""us open"";","SELECT 2008 FROM table_name_84 WHERE tournament = ""us open"";",1 List all routes with fare collections on weekends.,"CREATE TABLE route (route_id INT, route_name VARCHAR(50)); CREATE TABLE fare (fare_id INT, route_id INT, fare_amount DECIMAL(5,2), collection_date DATE); ","SELECT route_name FROM route JOIN fare ON route.route_id = fare.route_id WHERE DATEPART(dw, collection_date) IN (1, 7);",SELECT r.route_name FROM route r JOIN fare f ON r.route_id = f.route_id WHERE f.collection_date BETWEEN '2022-01-01' AND '2022-01-31';,0 Which Winner has a Last 16 of £400?,"CREATE TABLE table_name_4 (winner VARCHAR, last_16 VARCHAR);","SELECT winner FROM table_name_4 WHERE last_16 = ""£400"";","SELECT winner FROM table_name_4 WHERE last_16 = ""£400"";",1 What was the total revenue for the 2020 NBA season?,"CREATE TABLE nba_seasons (season_year INT, total_revenue FLOAT);",SELECT total_revenue FROM nba_seasons WHERE season_year = 2020;,SELECT SUM(total_revenue) FROM nba_seasons WHERE season_year = 2020;,0 Which ship was sunk at 01:00?,"CREATE TABLE table_name_96 (name_of_ship VARCHAR, fate VARCHAR, time VARCHAR);","SELECT name_of_ship FROM table_name_96 WHERE fate = ""sunk at"" AND time = ""01:00"";","SELECT name_of_ship FROM table_name_96 WHERE fate = ""sunk"" AND time = ""01:00"";",0 "Add a new record to the 'football_stadiums' table for a stadium with a capacity of 70000 located in 'Los Angeles', 'USA'","CREATE TABLE football_stadiums (stadium_id INT, stadium_name VARCHAR(50), capacity INT, city VARCHAR(50), country VARCHAR(50));","INSERT INTO football_stadiums (stadium_id, stadium_name, capacity, city, country) VALUES (1, 'Los Angeles Stadium', 70000, 'Los Angeles', 'USA');","INSERT INTO football_stadiums (stadium_id, stadium_name, capacity, city, country) VALUES ('Los Angeles', 70000, 'USA');",0 Show the total wastewater production in cubic meters for the city of New York in the last week of April 2021,"CREATE TABLE wastewater_production (id INT, city VARCHAR(50), production FLOAT, date DATE); ",SELECT SUM(production) FROM wastewater_production WHERE city = 'New York' AND date >= '2021-04-25' AND date <= '2021-04-30';,SELECT SUM(production) FROM wastewater_production WHERE city = 'New York' AND date >= '2021-04-01' AND date '2021-04-01';,0 What is the average landfill capacity in the 'Residential' area?,"CREATE TABLE ResidentialLandfills (id INT, area VARCHAR(20), capacity INT); ",SELECT AVG(capacity) FROM ResidentialLandfills WHERE area = 'Residential';,SELECT AVG(capacity) FROM ResidentialLandfills WHERE area = 'Residential';,1 What's the English name of the county with a postcode 246400?,"CREATE TABLE table_1976898_1 (english_name VARCHAR, post_code VARCHAR);",SELECT english_name FROM table_1976898_1 WHERE post_code = 246400;,SELECT english_name FROM table_1976898_1 WHERE post_code = 246400;,1 "What is the muzzle energy with grains (g) bullet weight and a max pressure of 35,000 psi?","CREATE TABLE table_name_67 (muzzle_energy VARCHAR, bullet_weight VARCHAR, max_pressure VARCHAR);","SELECT muzzle_energy FROM table_name_67 WHERE bullet_weight = ""grains (g)"" AND max_pressure = ""35,000 psi"";","SELECT muzzle_energy FROM table_name_67 WHERE bullet_weight = ""grains (g)"" AND max_pressure = ""35,000 psi"";",1 What is the call sign for country station fm 93.1?,"CREATE TABLE table_name_34 (call_sign VARCHAR, format VARCHAR, frequency VARCHAR);","SELECT call_sign FROM table_name_34 WHERE format = ""country"" AND frequency = ""fm 93.1"";","SELECT call_sign FROM table_name_34 WHERE format = ""country station"" AND frequency = ""fm 93.1"";",0 "What is Home, when Time is 18:00, and when Geust is Servette FC (CHL)?","CREATE TABLE table_name_49 (home VARCHAR, time VARCHAR, geust VARCHAR);","SELECT home FROM table_name_49 WHERE time = ""18:00"" AND geust = ""servette fc (chl)"";","SELECT home FROM table_name_49 WHERE time = ""18:00"" AND geust = ""servette fc (chl)"";",1 How many startups were founded in the technology sector in the last 5 years?,"CREATE TABLE startups(id INT, name TEXT, industry TEXT, founding_date DATE); ","SELECT COUNT(*) FROM startups WHERE industry = 'Technology' AND founding_date >= DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR);","SELECT COUNT(*) FROM startups WHERE industry = 'Technology' AND founding_date >= DATEADD(year, -5, GETDATE());",0 What is the average survival rate for marine shrimp farms in Thailand in Q3 2022?,"CREATE TABLE marine_shrimp_farms (farm_id INT, country VARCHAR(50), date DATE, survival_rate FLOAT);",SELECT AVG(survival_rate) FROM marine_shrimp_farms WHERE country = 'Thailand' AND date BETWEEN '2022-07-01' AND '2022-09-30' GROUP BY country;,SELECT AVG(survival_rate) FROM marine_shrimp_farms WHERE country = 'Thailand' AND date BETWEEN '2022-04-01' AND '2022-06-30';,0 How many hospitals in the rural Midwest have less than 100 beds and offer maternity care?,"CREATE TABLE hospitals (id INT, beds INT, location VARCHAR(20), maternity_care BOOLEAN); ",SELECT COUNT(*) FROM hospitals WHERE beds < 100 AND location LIKE '%rural midwest%' AND maternity_care = true;,SELECT COUNT(*) FROM hospitals WHERE location = 'Rural Midwest' AND beds 100 AND maternity_care = TRUE;,0 "What was the final score with Guillermo Vilas as the opponent in the final, that happened after 1972?","CREATE TABLE table_name_81 (score_in_the_final VARCHAR, opponent_in_the_final VARCHAR, date VARCHAR);","SELECT score_in_the_final FROM table_name_81 WHERE opponent_in_the_final = ""guillermo vilas"" AND date > 1972;","SELECT score_in_the_final FROM table_name_81 WHERE opponent_in_the_final = ""guillermo vilas"" AND date > 1972;",1 What is the total amount of food aid provided to displaced people in Somalia since 2018?,"CREATE TABLE food_aid (id INT, recipient VARCHAR(50), aid_type VARCHAR(50), amount FLOAT, date DATE); ","SELECT recipient, SUM(amount) as total_food_aid FROM food_aid WHERE recipient = 'displaced people' AND date >= '2018-01-01' GROUP BY recipient;",SELECT SUM(amount) FROM food_aid WHERE recipient LIKE '%displaced%' AND date >= '2018-01-01';,0 What country won in 1977?,"CREATE TABLE table_name_46 (country VARCHAR, year_s__won VARCHAR);","SELECT country FROM table_name_46 WHERE year_s__won = ""1977"";","SELECT country FROM table_name_46 WHERE year_s__won = ""1977"";",1 "With the official name Quispamsis, what is the census ranking?","CREATE TABLE table_171236_1 (census_ranking VARCHAR, official_name VARCHAR);","SELECT census_ranking FROM table_171236_1 WHERE official_name = ""Quispamsis"";","SELECT census_ranking FROM table_171236_1 WHERE official_name = ""Quispamsis"";",1 What was the Winning score for the Mynavi ABC Championship Tournament?,"CREATE TABLE table_name_55 (winning_score VARCHAR, tournament VARCHAR);","SELECT winning_score FROM table_name_55 WHERE tournament = ""mynavi abc championship"";","SELECT winning_score FROM table_name_55 WHERE tournament = ""mynavi abc championship"";",1 How many broadband subscribers have there been in each country in the past month?,"CREATE TABLE broadband_subscribers (subscriber_id INT, subscriber_name VARCHAR(255), subscribe_date DATE, country VARCHAR(255));","SELECT country, COUNT(subscriber_id) as total_subscribers FROM broadband_subscribers WHERE subscribe_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) GROUP BY country;","SELECT country, COUNT(*) FROM broadband_subscribers WHERE subscribe_date >= DATEADD(month, -1, GETDATE()) GROUP BY country;",0 How many games lost for team(s) with less than 4 paints and against total of over 340?,"CREATE TABLE table_name_65 (lost VARCHAR, points VARCHAR, against VARCHAR);",SELECT COUNT(lost) FROM table_name_65 WHERE points < 4 AND against > 340;,SELECT lost FROM table_name_65 WHERE points 4 AND against > 340;,0 where did glenn greenough come from,"CREATE TABLE table_2850912_8 (college_junior_club_team VARCHAR, player VARCHAR);","SELECT college_junior_club_team FROM table_2850912_8 WHERE player = ""Glenn Greenough"";","SELECT college_junior_club_team FROM table_2850912_8 WHERE player = ""Glenn Greenough"";",1 What is the earliest issue date for policies in Florida?,"CREATE TABLE policyholders (id INT, name TEXT, state TEXT, policy_type TEXT, issue_date DATE); ",SELECT MIN(issue_date) FROM policyholders WHERE state = 'FL';,SELECT MIN(issue_date) FROM policyholders WHERE state = 'Florida';,0 "Show the veteran employment ratio for each defense contractor, and rank them based on their ratios.","CREATE TABLE defense_contractors(contractor_id INT, contractor_name VARCHAR(50), num_veterans INT, total_employees INT); ","SELECT contractor_id, contractor_name, num_veterans * 1.0 / total_employees as veteran_ratio, RANK() OVER (ORDER BY num_veterans * 1.0 / total_employees DESC) as ranking FROM defense_contractors;","SELECT contractor_name, num_veterans, total_employees, RANK() OVER (ORDER BY num_veterans DESC) as rank FROM defense_contractors;",0 Name the least purse for 2011,"CREATE TABLE table_15618241_1 (purse___us INTEGER, year VARCHAR);",SELECT MIN(purse___us) AS $__ FROM table_15618241_1 WHERE year = 2011;,SELECT MIN(purse___us) FROM table_15618241_1 WHERE year = 2011;,0 Identify the states with the highest drought frequency that also have the lowest per capita water consumption in the industrial sector.,"CREATE TABLE drought_states (state TEXT, drought_frequency INTEGER); CREATE TABLE industrial_water_usage (state TEXT, population INTEGER, consumption INTEGER); ","SELECT ds.state FROM drought_states ds JOIN industrial_water_usage iwu ON ds.state = iwu.state ORDER BY drought_frequency, (iwu.consumption / iwu.population);","SELECT drought_states.state, drought_frequency FROM drought_states INNER JOIN industrial_water_usage ON drought_states.state = industrial_water_usage.state WHERE industrial_water_usage.consumption = (SELECT MIN(consumption) FROM industrial_water_usage);",0 Who are the researchers that have published papers in AI conferences held in the USA?,"CREATE TABLE ai_conferences(id INT PRIMARY KEY, name VARCHAR(50), location VARCHAR(50)); CREATE TABLE ai_papers(id INT PRIMARY KEY, title VARCHAR(50), researcher_id INT, conference_id INT); CREATE TABLE researcher_conferences(researcher_id INT, conference_id INT); ",SELECT DISTINCT r.name FROM ai_researcher r INNER JOIN researcher_conferences rc ON r.id = rc.researcher_id INNER JOIN ai_conferences c ON rc.conference_id = c.id WHERE c.location = 'USA';,"SELECT rc.researcher_id, rc.conference_id FROM researcher_conferences rc JOIN ai_papers ap ON rc.researcher_id = ap.researcher_id JOIN researcher_conferences rc ON rc.conference_id = rc.conference_id WHERE rc.location = 'USA';",0 Which country has the highest average CO2 emission per garment?,"CREATE TABLE garment (garment_id INT, country VARCHAR(50), co2_emission INT);","SELECT country, AVG(co2_emission) AS avg_co2_emission FROM garment GROUP BY country ORDER BY avg_co2_emission DESC LIMIT 1;","SELECT country, AVG(co2_emission) as avg_co2_emission FROM garment GROUP BY country ORDER BY avg_co2_emission DESC LIMIT 1;",0 "How many AI-powered hotel recommendations were made in the past year, grouped by quarter?","CREATE TABLE ai_recommendations (id INT, recommendation_type TEXT, recommendation_date DATE); ","SELECT QUARTER(recommendation_date) AS quarter, COUNT(*) FROM ai_recommendations WHERE recommendation_type = 'AI Hotel' AND recommendation_date >= DATE_SUB(NOW(), INTERVAL 1 YEAR) GROUP BY quarter;","SELECT DATE_FORMAT(recommendation_date, '%Y-%m') as quarter, COUNT(*) as num_recommendations FROM ai_recommendations WHERE recommendation_type = 'AI-powered' AND recommendation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) GROUP BY quarter;",0 Which race ended with a time of 01:46:59.69?,"CREATE TABLE table_name_13 (race VARCHAR, time VARCHAR);","SELECT race FROM table_name_13 WHERE time = ""01:46:59.69"";","SELECT race FROM table_name_13 WHERE time = ""01:46:59.69"";",1 Find the top 2 states with the lowest number of COVID-19 cases?,"CREATE TABLE covid_data (state VARCHAR(255), cases INT); ","SELECT state, cases, RANK() OVER (ORDER BY cases ASC) as rank FROM covid_data WHERE rank <= 2;","SELECT state, cases FROM covid_data ORDER BY cases DESC LIMIT 2;",0 How many volunteers engaged in environmental programs in 2021?,"CREATE TABLE Volunteers (id INT, user_id INT, program_id INT, volunteer_date DATE); ",SELECT COUNT(*) FROM Volunteers WHERE program_id BETWEEN 101 AND 110 AND volunteer_date >= '2021-01-01' AND volunteer_date < '2022-01-01';,SELECT COUNT(*) FROM Volunteers WHERE program_id IN (SELECT program_id FROM Programs WHERE YEAR(volunteer_date) = 2021);,0 What is the Average annual output for Culligran power station with an Installed capacity less than 19?,"CREATE TABLE table_name_12 (average_annual_output__million_kwh_ INTEGER, name VARCHAR, installed_capacity__megawatts_ VARCHAR);","SELECT AVG(average_annual_output__million_kwh_) FROM table_name_12 WHERE name = ""culligran"" AND installed_capacity__megawatts_ < 19;","SELECT AVG(average_annual_output__million_kwh_) FROM table_name_12 WHERE name = ""culligran"" AND installed_capacity__megawatts_ 19;",0 "What is the total number of language preservation programs in Africa, grouped by country?","CREATE TABLE LanguagePreservation (Country VARCHAR(255), Programs INT); ","SELECT Country, SUM(Programs) FROM LanguagePreservation WHERE Country = 'Africa' GROUP BY Country;","SELECT Country, SUM(Programs) FROM LanguagePreservation GROUP BY Country;",0 What is the distribution of security incidents by region in the past month?,"CREATE TABLE incident_regions (id INT, region VARCHAR(50), incidents INT, timestamp TIMESTAMP); ","SELECT region, SUM(incidents) as total_incidents FROM incident_regions WHERE timestamp >= '2022-02-01' GROUP BY region;","SELECT region, SUM(incidents) as total_incidents FROM incident_regions WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY region;",0 What is the col location for the location of france / italy?,"CREATE TABLE table_2731431_1 (col_location VARCHAR, location VARCHAR);","SELECT col_location FROM table_2731431_1 WHERE location = ""France / Italy"";","SELECT col_location FROM table_2731431_1 WHERE location = ""France / Italy"";",1 "List the programs that have received donations in the last 3 months but have not yet reached their budgeted amount, and their respective budgets and total donations received.","CREATE TABLE programs(id INT, name TEXT, budget FLOAT);CREATE TABLE donations(id INT, program_id INT, amount FLOAT, donation_date DATE);","SELECT programs.name, programs.budget, SUM(donations.amount) as total_donations FROM programs JOIN donations ON programs.id = donations.program_id WHERE donations.donation_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 3 MONTH) AND CURDATE() AND programs.budget > (SELECT SUM(donations.amount) FROM donations WHERE donations.program_id = programs.id) GROUP BY programs.id;","SELECT p.name, p.budget, SUM(d.amount) as total_donations FROM programs p JOIN donations d ON p.id = d.program_id WHERE d.donation_date >= DATEADD(month, -3, GETDATE()) GROUP BY p.name, p.budget;",0 What chassis recorded 5 points?,"CREATE TABLE table_name_68 (chassis VARCHAR, points VARCHAR);",SELECT chassis FROM table_name_68 WHERE points = 5;,SELECT chassis FROM table_name_68 WHERE points = 5;,1 What is the total carbon sequestration potential for each forest type in the 'forest_type_sequestration' table?,"CREATE TABLE forest_type_sequestration (id INT, forest_type VARCHAR(255), total_sequestration FLOAT); ","SELECT forest_type, SUM(total_sequestration) FROM forest_type_sequestration GROUP BY forest_type;","SELECT forest_type, SUM(total_sequestration) FROM forest_type_sequestration GROUP BY forest_type;",1 "What is the total budget allocated for education in each province, with a ranking of the top 3 provinces?","CREATE TABLE provinces (province_name VARCHAR(50), budget_allocation INT); ","SELECT province_name, budget_allocation, ROW_NUMBER() OVER (ORDER BY budget_allocation DESC) as rank FROM provinces WHERE rank <= 3;","SELECT province_name, SUM(budget_allocation) as total_budget FROM provinces GROUP BY province_name ORDER BY total_budget DESC LIMIT 3;",0 Who took the loss in the game that ended with a 54-61 record?,"CREATE TABLE table_name_29 (loss VARCHAR, record VARCHAR);","SELECT loss FROM table_name_29 WHERE record = ""54-61"";","SELECT loss FROM table_name_29 WHERE record = ""54-61"";",1 "If the poverty rate is 12.9%, what is the county?","CREATE TABLE table_22815568_6 (county VARCHAR, poverty_rate VARCHAR);","SELECT county FROM table_22815568_6 WHERE poverty_rate = ""12.9%"";","SELECT county FROM table_22815568_6 WHERE poverty_rate = ""12.9%"";",1 Show the total number of users from Europe who have posted more than 100 messages in the last 30 days.,"CREATE TABLE users (id INT, region VARCHAR(255), messages INT, post_date DATE); ","SELECT SUM(messages) AS total_messages, region FROM users WHERE region LIKE 'Europe%' AND post_date >= DATE(NOW()) - INTERVAL 30 DAY GROUP BY region HAVING total_messages > 100;","SELECT COUNT(*) FROM users WHERE region = 'Europe' AND messages > 100 AND post_date >= DATEADD(day, -30, GETDATE());",0 What is the margin of victory of the gna/glendale federal classic?,"CREATE TABLE table_name_8 (margin_of_victory VARCHAR, tournament VARCHAR);","SELECT margin_of_victory FROM table_name_8 WHERE tournament = ""gna/glendale federal classic"";","SELECT margin_of_victory FROM table_name_8 WHERE tournament = ""gna/glendale federal classic"";",1 Calculate the average daily production of oil in the North Sea for the last 3 months,"CREATE TABLE production (id INT, region VARCHAR(255), date DATE, oil_production INT); ","SELECT region, AVG(oil_production) as avg_daily_production FROM production WHERE region = 'North Sea' AND date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH) GROUP BY region;","SELECT AVG(oil_production) FROM production WHERE region = 'North Sea' AND date >= DATEADD(month, -3, GETDATE());",0 What is the average donation amount from donors in each country?,"CREATE TABLE Donors (DonorID int, DonorName varchar(50), Country varchar(50)); CREATE TABLE Donations (DonationID int, DonorID int, DonationAmount decimal(10,2)); ","SELECT Country, AVG(DonationAmount) FROM Donations JOIN Donors ON Donations.DonorID = Donors.DonorID GROUP BY Country;","SELECT d.Country, AVG(d.DonationAmount) as AvgDonation FROM Donors d JOIN Donations d ON d.DonorID = d.DonorID GROUP BY d.Country;",0 What is the away team's score at princes park?,"CREATE TABLE table_name_49 (away_team VARCHAR, venue VARCHAR);","SELECT away_team AS score FROM table_name_49 WHERE venue = ""princes park"";","SELECT away_team AS score FROM table_name_49 WHERE venue = ""princes park"";",1 What human gene has a yeast ortholog of RAD26?,"CREATE TABLE table_name_41 (human_gene__protein_ VARCHAR, yeast_ortholog VARCHAR);","SELECT human_gene__protein_ FROM table_name_41 WHERE yeast_ortholog = ""rad26"";","SELECT human_gene__protein_ FROM table_name_41 WHERE yeast_ortholog = ""rad26"";",1 What's the smallest number of games for the fenerbahçe team?,"CREATE TABLE table_name_84 (games INTEGER, team VARCHAR);","SELECT MIN(games) FROM table_name_84 WHERE team = ""fenerbahçe"";","SELECT MIN(games) FROM table_name_84 WHERE team = ""fenerbahçe"";",1 What is the average budget for agricultural innovation projects in Peru?,"CREATE TABLE agri_innovation (id INT, name TEXT, location TEXT, budget FLOAT); ",SELECT AVG(budget) FROM agri_innovation WHERE location = 'Peru';,SELECT AVG(budget) FROM agri_innovation WHERE location = 'Peru';,1 Who is the officer who has handled the most emergency calls in the last week?,"CREATE TABLE officers (id INT, name VARCHAR(255), division VARCHAR(255)); CREATE TABLE emergency_calls (id INT, officer_id INT, call_time TIMESTAMP); ","SELECT o.name, COUNT(ec.id) as total_calls FROM emergency_calls ec JOIN officers o ON ec.officer_id = o.id WHERE ec.call_time >= DATEADD(week, -1, CURRENT_TIMESTAMP) GROUP BY o.name ORDER BY total_calls DESC;","SELECT o.name, COUNT(ec.id) as num_calls FROM officers o JOIN emergency_calls ec ON o.id = ec.officer_id WHERE ec.call_time >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 WEEK) GROUP BY o.name ORDER BY num_calls DESC;",0 What are the revenues for ōoka tadayoshi (2nd) (大岡忠愛)?,"CREATE TABLE table_name_15 (revenues VARCHAR, name VARCHAR);","SELECT revenues FROM table_name_15 WHERE name = ""ōoka tadayoshi (2nd) (大岡忠愛)"";","SELECT revenues FROM table_name_15 WHERE name = ""oka tadayoshi (2nd) ()"";",0 Which Giant Slalom was obtained in the 1997 season?,"CREATE TABLE table_name_29 (Giant VARCHAR, season VARCHAR);",SELECT Giant AS slalom FROM table_name_29 WHERE season = 1997;,SELECT Giant FROM table_name_29 WHERE season = 1997;,0 "How many players' hometown was Akron, Ohio?","CREATE TABLE table_11677691_4 (school VARCHAR, hometown VARCHAR);","SELECT COUNT(school) FROM table_11677691_4 WHERE hometown = ""Akron, Ohio"";","SELECT COUNT(school) FROM table_11677691_4 WHERE hometown = ""Akron, Ohio"";",1 Which airports and their corresponding lengths are located in California and were constructed before 1970?,"CREATE TABLE airports (id INT, name TEXT, location TEXT, length INT, type TEXT, year INT); ","SELECT name, location, length FROM airports WHERE location LIKE '%CA%' AND type = 'International' AND year < 1970;","SELECT name, length FROM airports WHERE location = 'California' AND year 1970;",0 How many policy advocacy initiatives were launched per year?,"CREATE TABLE Advocacy (AdvocacyID INT, InitiativeName VARCHAR(50), LaunchDate DATE); ","SELECT EXTRACT(YEAR FROM LaunchDate) as Year, COUNT(*) as InitiativeCount FROM Advocacy GROUP BY Year;","SELECT EXTRACT(YEAR FROM LaunchDate) AS Year, COUNT(*) FROM Advocacy GROUP BY Year;",0 What is the total CO2 emission from aquaculture in the top 3 emitting countries?,"CREATE TABLE country_emission (id INT, country VARCHAR(20), co2_emission DECIMAL(10,2)); CREATE TABLE country (id INT, name VARCHAR(20), emission_id INT); ",SELECT SUM(ce.co2_emission) FROM country_emission ce INNER JOIN country c ON ce.id = c.emission_id WHERE c.name IN (SELECT name FROM (SELECT * FROM country LIMIT 3) t);,"SELECT country, SUM(co2_emission) as total_co2_emission FROM country_emission JOIN country ON country_emission.emission_id = country.id GROUP BY country ORDER BY total_co2_emission DESC LIMIT 3;",0 What's the sum of all phil mickelson's game scores?,"CREATE TABLE table_name_36 (score INTEGER, player VARCHAR);","SELECT SUM(score) FROM table_name_36 WHERE player = ""phil mickelson"";","SELECT SUM(score) FROM table_name_36 WHERE player = ""phil mickelson"";",1 What is the average year Rich Beem had a to par less than 17?,"CREATE TABLE table_name_20 (year_won INTEGER, player VARCHAR, to_par VARCHAR);","SELECT AVG(year_won) FROM table_name_20 WHERE player = ""rich beem"" AND to_par < 17;","SELECT AVG(year_won) FROM table_name_20 WHERE player = ""rich beem"" AND to_par 17;",0 "What is the location of fightfest 2, which has 3 rounds?","CREATE TABLE table_name_46 (location VARCHAR, round VARCHAR, event VARCHAR);","SELECT location FROM table_name_46 WHERE round = 3 AND event = ""fightfest 2"";","SELECT location FROM table_name_46 WHERE round = ""3"" AND event = ""fightfest 2"";",0 "Insert the following records into the 'autonomous_driving_research' table: 'Baidu' with 'China', 'NVIDIA' with 'USA', 'Tesla' with 'USA'","CREATE TABLE autonomous_driving_research (id INT PRIMARY KEY, company VARCHAR(255), country VARCHAR(255));","INSERT INTO autonomous_driving_research (company, country) VALUES ('Baidu', 'China'), ('NVIDIA', 'USA'), ('Tesla', 'USA');","INSERT INTO autonomous_driving_research (company, country) VALUES ('Baidu', 'China', 'NVIDIA', 'USA', 'Tesla', 'USA');",0 What team owns the car owned by chip ganassi?,"CREATE TABLE table_2503102_2 (team VARCHAR, listed_owner_s_ VARCHAR);","SELECT team FROM table_2503102_2 WHERE listed_owner_s_ = ""Chip Ganassi"";","SELECT team FROM table_2503102_2 WHERE listed_owner_s_ = ""Chips Ganassi"";",0 List the companies that have not received any funding.,"CREATE TABLE companies (id INT, name TEXT); CREATE TABLE fundings (id INT, company_id INT, round TEXT); ",SELECT companies.name FROM companies LEFT JOIN fundings ON companies.id = fundings.company_id WHERE fundings.id IS NULL;,SELECT companies.name FROM companies INNER JOIN fundings ON companies.id = fundings.company_id WHERE fundings.round IS NULL;,0 What is the livery of the locomotive with a serial number 83-1010?,"CREATE TABLE table_name_33 (livery VARCHAR, serial_no VARCHAR);","SELECT livery FROM table_name_33 WHERE serial_no = ""83-1010"";","SELECT livery FROM table_name_33 WHERE serial_no = ""83-1010"";",1 What is the average price of Italian paintings sold at Sotheby's in the last 5 years?,"CREATE TABLE Artworks (artwork_id INT, name VARCHAR(255), artist_id INT, date_sold DATE, price DECIMAL(10,2)); CREATE TABLE Artists (artist_id INT, name VARCHAR(255), nationality VARCHAR(255));","SELECT AVG(Artworks.price) FROM Artworks INNER JOIN Artists ON Artworks.artist_id = Artists.artist_id WHERE Artists.nationality = 'Italian' AND Artworks.date_sold BETWEEN DATE_SUB(NOW(), INTERVAL 5 YEAR) AND NOW();","SELECT AVG(Artworks.price) FROM Artworks INNER JOIN Artists ON Artworks.artist_id = Artists.artist_id WHERE Artists.nationality = 'Italian' AND Artworks.date_sold >= DATEADD(year, -5, GETDATE());",0 What is the average number of virtual tours per hotel in Italy for hotels that have adopted AI-based customer service?,"CREATE TABLE hotels (hotel_id INT, hotel_name TEXT, country TEXT, num_virtual_tours INT, ai_customer_service BOOLEAN); ",SELECT AVG(num_virtual_tours) FROM hotels WHERE country = 'Italy' AND ai_customer_service = TRUE;,SELECT AVG(num_virtual_tours) FROM hotels WHERE country = 'Italy' AND ai_customer_service = TRUE;,1 What is the earliest production year for machines of type 'Large'?,"CREATE TABLE machines (machine_id INT, machine_type VARCHAR(50), manufacturer VARCHAR(50), production_year INT); ",SELECT MIN(production_year) FROM machines WHERE machine_type = 'Large';,SELECT MIN(production_year) FROM machines WHERE machine_type = 'Large';,1 How many workers were involved in each construction project in the 'Projects' and 'Workforce' tables?,"CREATE TABLE Projects (projectID INT, projectName VARCHAR(50));CREATE TABLE Workforce (workerID INT, workerStartDate DATE, workerEndDate DATE, projectID INT);","SELECT P.projectName, COUNT(W.workerID) AS Workers FROM Projects P INNER JOIN Workforce W ON P.projectID = W.projectID GROUP BY P.projectName;","SELECT Projects.projectName, COUNT(Workforce.workerID) FROM Projects INNER JOIN Workforce ON Projects.projectID = Workforce.projectID GROUP BY Projects.projectName;",0 "List all the dams with their height and the name of the river they are located in, sorted by the dam's height in descending order.","CREATE TABLE Dams (id INT, name TEXT, height INT, river_id INT); CREATE TABLE Rivers (id INT, name TEXT); ","SELECT Dams.name, Dams.height, Rivers.name AS river_name FROM Dams INNER JOIN Rivers ON Dams.river_id = Rivers.id ORDER BY Dams.height DESC;","SELECT Dams.name, Dams.height, Rivers.name FROM Dams INNER JOIN Rivers ON Dams.river_id = Rivers.id ORDER BY Dams.height DESC;",0 "What is the maximum transaction amount for each customer in the ""Customers"" table?","CREATE TABLE Customers (CustomerID INT, TransactionDate DATE, TransactionAmount DECIMAL(10,2));","SELECT CustomerID, MAX(TransactionAmount) as MaxTransactionAmount FROM Customers GROUP BY CustomerID;","SELECT CustomerID, MAX(TransactionAmount) FROM Customers GROUP BY CustomerID;",0 Who are the top 3 farmers in India by total area of crops?,"CREATE TABLE Farmers (id INT, name VARCHAR(255), location VARCHAR(255)); CREATE TABLE Farmer_Crops (farmer_id INT, crop_type VARCHAR(255), area FLOAT); ","SELECT f.name, SUM(fc.area) as total_area FROM Farmers f INNER JOIN Farmer_Crops fc ON f.id = fc.farmer_id GROUP BY f.name ORDER BY total_area DESC LIMIT 3;","SELECT Farmers.name, SUM(Farmer_Crops.area) as total_area FROM Farmers INNER JOIN Farmer_Crops ON Farmers.id = Farmer_Crops.farmer_id WHERE Farmers.location = 'India' GROUP BY Farmers.name ORDER BY total_area DESC LIMIT 3;",0 "Name all the candidates listed in the race where the incumbent is Prince Hulon Preston, Jr.","CREATE TABLE table_1342013_10 (candidates VARCHAR, incumbent VARCHAR);","SELECT candidates FROM table_1342013_10 WHERE incumbent = ""Prince Hulon Preston, Jr."";","SELECT candidates FROM table_1342013_10 WHERE incumbent = ""Prince Hulon Preston, Jr."";",1 List all policies with a premium greater than $2000 for policyholders living in 'California' or 'New York'.,"CREATE TABLE Policies (PolicyID INT, Premium DECIMAL(10, 2), PolicyholderState VARCHAR(10)); ","SELECT * FROM Policies WHERE PolicyholderState IN ('California', 'New York') AND Premium > 2000;","SELECT PolicyID, Premium FROM Policies WHERE Premium > 2000 AND PolicyholderState IN ('California', 'New York');",0 How many cybersecurity trainings were conducted in the 'West' region this year?,"CREATE TABLE trainings (region TEXT, training_date DATE); ",SELECT COUNT(*) FROM trainings WHERE region = 'West' AND EXTRACT(YEAR FROM training_date) = EXTRACT(YEAR FROM CURRENT_DATE);,"SELECT COUNT(*) FROM trainings WHERE region = 'West' AND training_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 "What is the highest lost with a drawn more than 11, a position lower than 17 and more than 61 goals?","CREATE TABLE table_name_75 (lost INTEGER, goals_for VARCHAR, drawn VARCHAR, position VARCHAR);",SELECT MAX(lost) FROM table_name_75 WHERE drawn > 11 AND position < 17 AND goals_for > 61;,SELECT MAX(lost) FROM table_name_75 WHERE drawn > 11 AND position 17 AND goals_for > 61;,0 Find the number of policyholders from a specific state,"CREATE TABLE policyholders (id INT, name TEXT, dob DATE, gender TEXT, state TEXT); ",SELECT COUNT(*) FROM policyholders WHERE state = 'NY';,"SELECT state, COUNT(*) FROM policyholders GROUP BY state;",0 What is the brand in Metro Manila?,"CREATE TABLE table_19215259_1 (branding VARCHAR, location VARCHAR);","SELECT branding FROM table_19215259_1 WHERE location = ""Metro Manila"";","SELECT branding FROM table_19215259_1 WHERE location = ""Metro Manila"";",1 What is the category that came before 2011?,"CREATE TABLE table_name_44 (category VARCHAR, year INTEGER);",SELECT category FROM table_name_44 WHERE year < 2011;,SELECT category FROM table_name_44 WHERE year 2011;,0 What is the Record with a Leading scorer with andrew bogut (29)?,"CREATE TABLE table_name_49 (record VARCHAR, leading_scorer VARCHAR);","SELECT record FROM table_name_49 WHERE leading_scorer = ""andrew bogut (29)"";","SELECT record FROM table_name_49 WHERE leading_scorer = ""andrew bogut (29)"";",1 What are the manuals with an opus of 147?,"CREATE TABLE table_name_2 (manuals VARCHAR, opus VARCHAR);","SELECT manuals FROM table_name_2 WHERE opus = ""147"";",SELECT manuals FROM table_name_2 WHERE opus = 147;,0 In which competition or tour was nordsjælland the opponent with a hr Ground?,"CREATE TABLE table_name_73 (competition_or_tour VARCHAR, ground VARCHAR, opponent VARCHAR);","SELECT competition_or_tour FROM table_name_73 WHERE ground = ""hr"" AND opponent = ""nordsjælland"";","SELECT competition_or_tour FROM table_name_73 WHERE ground = ""hr"" AND opponent = ""nordsjlland"";",0 What is the average number of endangered languages in Southeast Asian countries?,"CREATE TABLE Countries (id INT, name VARCHAR(50), region VARCHAR(50)); CREATE TABLE EndangeredLanguages (id INT, country_id INT, name VARCHAR(50)); ",SELECT AVG(e.count) as avg_endangered_languages FROM (SELECT COUNT(*) as count FROM EndangeredLanguages WHERE country_id = Countries.id GROUP BY country_id) e JOIN Countries ON e.country_id = Countries.id WHERE Countries.region = 'Southeast Asia';,SELECT AVG(EndangeredLanguages.number) FROM Countries INNER JOIN EndangeredLanguages ON Countries.id = EndangeredLanguages.country_id WHERE Countries.region = 'Southeast Asia';,0 Which school did Dahntay Jones graduate from?,"CREATE TABLE table_name_24 (school_club_team VARCHAR, player VARCHAR);","SELECT school_club_team FROM table_name_24 WHERE player = ""dahntay jones"";","SELECT school_club_team FROM table_name_24 WHERE player = ""dahntay jones"";",1 What is the date with the catalogue # cocy-80093?,"CREATE TABLE table_name_37 (date VARCHAR, catalogue__number VARCHAR);","SELECT date FROM table_name_37 WHERE catalogue__number = ""cocy-80093"";","SELECT date FROM table_name_37 WHERE catalogue__number = ""cocy-80093"";",1 What is the total quantity of minerals extracted by small-scale mines in Zambia in 2022?,"CREATE TABLE MineTypes (MineID int, MineType varchar(50)); CREATE TABLE ExtractionData (MineID int, ExtractionDate date, Material varchar(10), Quantity int); ","SELECT mt.MineType, SUM(ed.Quantity) as TotalExtraction FROM ExtractionData ed JOIN MineTypes mt ON ed.MineID = mt.MineID WHERE ed.ExtractionDate BETWEEN '2022-01-01' AND '2022-12-31' AND mt.MineType = 'Small-scale Mine' AND ed.Material = 'Gold' GROUP BY mt.MineType;",SELECT SUM(Quantity) FROM ExtractionData INNER JOIN MineTypes ON ExtractionData.MineID = MineTypes.MineID WHERE MineTypes.MineType = 'Small-Scale' AND ExtractionData.ExtractionDate BETWEEN '2022-01-01' AND '2022-12-31';,0 "How many patients have received more than one vaccination, and what are their patient IDs?","CREATE TABLE vaccinations (id INT PRIMARY KEY, patient_id INT, vaccine VARCHAR(255), date DATE); ","SELECT patient_id, COUNT(patient_id) FROM vaccinations GROUP BY patient_id HAVING COUNT(patient_id) > 1;","SELECT COUNT(*), patient_id FROM vaccinations GROUP BY patient_id HAVING COUNT(*) > 1;",0 Determine the average daily production quantity for each well in the Eastern region,"CREATE TABLE daily_production (well_id INT, date DATE, type VARCHAR(10), quantity INT, region VARCHAR(50)); ","SELECT well_id, AVG(quantity) as avg_daily_production FROM daily_production WHERE region = 'Eastern' GROUP BY well_id;","SELECT well_id, AVG(quantity) FROM daily_production WHERE region = 'Eastern' GROUP BY well_id;",0 Find the difference in data usage between consecutive months for subscriber_id 43 in the 'Asia-Pacific' region.,"CREATE TABLE subscriber_data (subscriber_id INT, data_usage FLOAT, month DATE); ","SELECT subscriber_id, LAG(data_usage) OVER (PARTITION BY subscriber_id ORDER BY month) as prev_data_usage, data_usage, month FROM subscriber_data WHERE subscriber_id = 43 AND region = 'Asia-Pacific' ORDER BY month;",SELECT DIFF(data_usage) FROM subscriber_data WHERE subscriber_id = 43 AND region = 'Asia-Pacific';,0 What was the game record if Marcus Camby (13) got the high rebounds?,"CREATE TABLE table_27734769_9 (record VARCHAR, high_rebounds VARCHAR);","SELECT record FROM table_27734769_9 WHERE high_rebounds = ""Marcus Camby (13)"";","SELECT record FROM table_27734769_9 WHERE high_rebounds = ""Marcus Camby (13)"";",1 "Which countries have the highest average player scores in the game ""Galactic Guardians""?","CREATE TABLE Countries (Country VARCHAR(255), AvgScore FLOAT); ",SELECT Country FROM Countries ORDER BY AvgScore DESC LIMIT 3;,"SELECT Country, AvgScore FROM Countries ORDER BY AvgScore DESC LIMIT 1;",0 What is the total number of tickets sold for sports_events in '2017'?,"CREATE TABLE sports_events (event_id INT, year INT, tickets_sold INT); ",SELECT SUM(tickets_sold) FROM sports_events WHERE year = 2017;,SELECT SUM(tickets_sold) FROM sports_events WHERE year = 2017;,1 What is the average water temperature in the Atlantic Ocean for salmon farms in March?,"CREATE TABLE Atlantic_Ocean (temperature FLOAT, month DATE); CREATE TABLE Salmon_Farms (id INT, ocean VARCHAR(10)); ",SELECT AVG(temperature) FROM Atlantic_Ocean INNER JOIN Salmon_Farms ON Atlantic_Ocean.month = '2022-03-01' WHERE Salmon_Farms.ocean = 'Atlantic';,SELECT AVG(temperature) FROM Atlantic_Ocean WHERE month = 'March';,0 What circuit did rick kelly win on?,"CREATE TABLE table_20884163_2 (circuit VARCHAR, winner VARCHAR);","SELECT circuit FROM table_20884163_2 WHERE winner = ""Rick Kelly"";","SELECT circuit FROM table_20884163_2 WHERE winner = ""Rick Kelly"";",1 What is the percentage of endangered languages in South America?,"CREATE TABLE languages (language_id INT, country_id INT, language_name VARCHAR(255), status VARCHAR(255)); ",SELECT (COUNT(CASE WHEN status = 'Endangered' THEN 1 ELSE NULL END)/COUNT(*))*100 AS endangered_percentage FROM languages WHERE country_id IN (SELECT country_id FROM countries WHERE continent = 'South America');,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM languages WHERE status = 'Endangered')) AS percentage FROM languages WHERE status = 'Endangered';,0 "Which Pick has an Overall larger than 308, and a Position of rb?","CREATE TABLE table_name_21 (pick INTEGER, overall VARCHAR, position VARCHAR);","SELECT MAX(pick) FROM table_name_21 WHERE overall > 308 AND position = ""rb"";","SELECT SUM(pick) FROM table_name_21 WHERE overall > 308 AND position = ""rb"";",0 What is the latest design standard in the Engineering_Design table?,"CREATE TABLE Engineering_Design (id INT, project_name VARCHAR(50), design_standard VARCHAR(50)); ",SELECT MAX(design_standard) FROM Engineering_Design;,"SELECT design_standard, MAX(design_standard) FROM Engineering_Design GROUP BY design_standard;",0 What are the names and types of all sensors in the 'Field1' that have recorded data after '2021-06-01'?,"CREATE TABLE Field1 (sensor_id INT, sensor_name VARCHAR(50), sensor_type VARCHAR(50), data DATETIME); ","SELECT DISTINCT sensor_name, sensor_type FROM Field1 WHERE data > '2021-06-01';","SELECT sensor_name, sensor_type FROM Field1 WHERE data > '2021-06-01';",0 "What is the total number of families assisted by each program, for programs that have assisted more than 50 families?","CREATE TABLE programs (id INT, name TEXT);CREATE TABLE families (id INT, program_id INT, number INTEGER); ","SELECT p.name, SUM(f.number) FROM programs p INNER JOIN families f ON p.id = f.program_id GROUP BY p.id HAVING SUM(f.number) > 50;","SELECT p.name, SUM(f.number) FROM programs p JOIN families f ON p.id = f.program_id GROUP BY p.name HAVING COUNT(f.id) > 50;",0 What is the total number of security incidents caused by outdated software in the first half of 2021?,"CREATE TABLE SecurityIncidents (id INT, incident_name VARCHAR(255), cause VARCHAR(255), date DATE); ",SELECT SUM(incidents) FROM (SELECT COUNT(*) AS incidents FROM SecurityIncidents WHERE cause = 'Outdated Software' AND date >= '2021-01-01' AND date < '2021-07-01' GROUP BY cause) AS subquery;,SELECT COUNT(*) FROM SecurityIncidents WHERE cause = 'Old Software' AND date BETWEEN '2021-01-01' AND '2021-06-30';,0 What is the total number of earnings for golfers who have 28 events and more than 2 wins?,"CREATE TABLE table_name_94 (earnings___ VARCHAR, events VARCHAR, wins VARCHAR);",SELECT COUNT(earnings___) AS $__ FROM table_name_94 WHERE events = 28 AND wins > 2;,SELECT COUNT(earnings___) FROM table_name_94 WHERE events = 28 AND wins > 2;,0 At what venue is the margin of victory 7 strokes?,"CREATE TABLE table_name_82 (venue VARCHAR, margin_of_victory VARCHAR);","SELECT venue FROM table_name_82 WHERE margin_of_victory = ""7 strokes"";","SELECT venue FROM table_name_82 WHERE margin_of_victory = ""7 strokes"";",1 "What is Class Pos., when Year is before 2013, and when Laps is greater than 175?","CREATE TABLE table_name_72 (class VARCHAR, year VARCHAR, laps VARCHAR);",SELECT class AS pos FROM table_name_72 WHERE year < 2013 AND laps > 175;,SELECT class FROM table_name_72 WHERE year 2013 AND laps > 175;,0 What is the team with position G?,"CREATE TABLE table_name_94 (team VARCHAR, position VARCHAR);","SELECT team FROM table_name_94 WHERE position = ""g"";","SELECT team FROM table_name_94 WHERE position = ""g"";",1 What is the ethnic majority in the only town?,"CREATE TABLE table_2562572_11 (largest_ethnic_group__2002_ VARCHAR, type VARCHAR);","SELECT largest_ethnic_group__2002_ FROM table_2562572_11 WHERE type = ""town"";","SELECT largest_ethnic_group__2002_ FROM table_2562572_11 WHERE type = ""Only Town"";",0 What is the average donation amount per donor for 2022?,"CREATE TABLE donations (donation_id INT, donor_id INT, donation_amount DECIMAL(10,2), donation_date DATE);","SELECT AVG(donation_amount) FROM (SELECT donation_amount, donor_id FROM donations WHERE YEAR(donation_date) = 2022 GROUP BY donor_id) AS donation_summary;","SELECT donor_id, AVG(donation_amount) as avg_donation FROM donations WHERE YEAR(donation_date) = 2022 GROUP BY donor_id;",0 What is the total revenue and quantity of garments sold by country in Q2 2022?,"CREATE TABLE sales_q2_2022 (sale_date DATE, country VARCHAR(50), quantity INT, sales DECIMAL(10,2));","SELECT country, SUM(quantity) AS total_quantity, SUM(sales) AS total_revenue FROM sales_q2_2022 WHERE sale_date >= '2022-04-01' AND sale_date < '2022-07-01' GROUP BY country;","SELECT country, SUM(quantity) as total_revenue, SUM(quantity) as total_quantity FROM sales_q2_2022 WHERE sale_date BETWEEN '2022-04-01' AND '2022-03-31' GROUP BY country;",0 What was the score in a place of t5 in the United States?,"CREATE TABLE table_name_25 (score VARCHAR, place VARCHAR, nation VARCHAR);","SELECT score FROM table_name_25 WHERE place = ""t5"" AND nation = ""united states"";","SELECT score FROM table_name_25 WHERE place = ""t5"" AND nation = ""united states"";",1 "What is Event, when Round is ""1"", when Location is ""New Town, North Dakota , United States"" and when Time is ""4:12""?","CREATE TABLE table_name_9 (event VARCHAR, time VARCHAR, round VARCHAR, location VARCHAR);","SELECT event FROM table_name_9 WHERE round = 1 AND location = ""new town, north dakota , united states"" AND time = ""4:12"";","SELECT event FROM table_name_9 WHERE round = ""1"" AND location = ""new town, north dakota, united states"" AND time = ""4:12"";",0 Where was the match held that lasted 3:24?,"CREATE TABLE table_name_90 (location VARCHAR, time VARCHAR);","SELECT location FROM table_name_90 WHERE time = ""3:24"";","SELECT location FROM table_name_90 WHERE time = ""3:24"";",1 How many non-profit organizations are there in the 'impact_investing' table?,"CREATE TABLE impact_investing (id INT, name TEXT, sector TEXT, country TEXT, assets FLOAT); ",SELECT COUNT(*) FROM impact_investing WHERE sector = 'Non-profit';,SELECT COUNT(*) FROM impact_investing WHERE sector = 'Non-Profit';,0 Select records from 'ai_safety' table where 'Scenario' is 'Ethical AI' and 'Risk' is 'High',"CREATE TABLE ai_safety (scenario TEXT, risk TEXT, description TEXT, mitigation TEXT); ",SELECT * FROM ai_safety WHERE scenario = 'Ethical AI' AND risk = 'High';,SELECT * FROM ai_safety WHERE scenario = 'Ethical AI' AND risk = 'High';,1 Determine the number of shipments from South America to Oceania in December 2022 that had a weight greater than 500,"CREATE TABLE Shipments (id INT, source VARCHAR(50), destination VARCHAR(50), weight FLOAT, ship_date DATE); ",SELECT COUNT(*) FROM Shipments WHERE (source = 'Brazil' OR source = 'Argentina' OR source = 'Colombia') AND (destination = 'Australia' OR destination = 'New Zealand' OR destination = 'Fiji') AND weight > 500 AND ship_date BETWEEN '2022-12-01' AND '2022-12-31';,SELECT COUNT(*) FROM Shipments WHERE source = 'South America' AND destination = 'Oceania' AND ship_date BETWEEN '2022-03-01' AND '2022-03-31' AND weight > 500;,0 How many maac are there that have 14th as the ncaa and the overall is 20-10?,"CREATE TABLE table_21756039_1 (maac VARCHAR, ncaa_seed VARCHAR, overall VARCHAR);","SELECT COUNT(maac) FROM table_21756039_1 WHERE ncaa_seed = ""14th"" AND overall = ""20-10"";","SELECT COUNT(maac) FROM table_21756039_1 WHERE ncaa_seed = ""14th"" AND overall = ""20-10"";",1 When james rutherford is the incumbent how many dates are there?,"CREATE TABLE table_28898974_3 (date VARCHAR, incumbent VARCHAR);","SELECT COUNT(date) FROM table_28898974_3 WHERE incumbent = ""James Rutherford"";","SELECT COUNT(date) FROM table_28898974_3 WHERE incumbent = ""James Rutherford"";",1 How many 'ferry' vehicles were serviced in May 2022?,"CREATE TABLE public.vehicle (vehicle_id SERIAL PRIMARY KEY, vehicle_type VARCHAR(20), station_id INTEGER, FOREIGN KEY (station_id) REFERENCES public.station(station_id)); CREATE TABLE public.service (service_id SERIAL PRIMARY KEY, service_type VARCHAR(20), service_date DATE, vehicle_id INTEGER, FOREIGN KEY (vehicle_id) REFERENCES public.vehicle(vehicle_id)); ",SELECT COUNT(*) FROM public.service INNER JOIN public.vehicle ON public.service.vehicle_id = public.vehicle.vehicle_id WHERE vehicle_type = 'ferry' AND service_date >= '2022-05-01' AND service_date <= '2022-05-31',SELECT COUNT(*) FROM public.service JOIN public.vehicle ON public.vehicle.vehicle_id = public.vehicle.vehicle_id WHERE vehicle_type = 'ferry' AND service_date BETWEEN '2022-05-01' AND '2022-05-30';,0 What is the interview score when the preliminaries score is 8.400?,"CREATE TABLE table_12094300_1 (interview VARCHAR, preliminaries VARCHAR);","SELECT interview FROM table_12094300_1 WHERE preliminaries = ""8.400"";","SELECT interview FROM table_12094300_1 WHERE preliminaries = ""8.400"";",1 What are the points if the goals against were 260?,"CREATE TABLE table_name_95 (points VARCHAR, goals_against VARCHAR);","SELECT points FROM table_name_95 WHERE goals_against = ""260"";","SELECT points FROM table_name_95 WHERE goals_against = ""260"";",1 What is the home team at princes park?,"CREATE TABLE table_name_54 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_54 WHERE venue = ""princes park"";","SELECT home_team FROM table_name_54 WHERE venue = ""princes park"";",1 Who is the founder of Sony?,"CREATE TABLE manufacturers (founder VARCHAR, name VARCHAR);",SELECT founder FROM manufacturers WHERE name = 'Sony';,"SELECT founder FROM manufacturers WHERE name = ""Sony"";",0 Show all origins and the number of flights from each origin.,CREATE TABLE Flight (origin VARCHAR);,"SELECT origin, COUNT(*) FROM Flight GROUP BY origin;","SELECT origin, COUNT(*) FROM Flight GROUP BY origin;",1 "Update the 'capacity' of the recycling facility in 'Toronto', 'Ontario', 'Canada' to 200,000 tons","CREATE TABLE recycling_facilities (id INT, city VARCHAR(255), state VARCHAR(255), country VARCHAR(255), type VARCHAR(255), capacity INT);",UPDATE recycling_facilities SET capacity = 200000 WHERE city = 'Toronto' AND state = 'Ontario' AND country = 'Canada';,"UPDATE recycling_facilities SET capacity = 200000 WHERE city IN ('Toronto', 'Ontario', 'Canada');",0 What is the total number of hours played by all esports players in 'CS:GO' tournaments?,"CREATE TABLE esports_players (player_id INT, player_name TEXT, hours_played INT, game TEXT); CREATE TABLE games (game_id INT, game TEXT, genre TEXT); ",SELECT SUM(esports_players.hours_played) FROM esports_players JOIN games ON esports_players.game = games.game WHERE games.game = 'CS:GO';,SELECT SUM(hours_played) FROM esports_players INNER JOIN games ON esports_players.game = games.game WHERE games.genre = 'CS:GO';,0 Show the average price of hotels for each star rating code.,"CREATE TABLE HOTELS (star_rating_code VARCHAR, price_range INTEGER);","SELECT star_rating_code, AVG(price_range) FROM HOTELS GROUP BY star_rating_code;","SELECT star_rating_code, AVG(price_range) FROM HOTELS GROUP BY star_rating_code;",1 Who was the away team at MCG?,"CREATE TABLE table_name_12 (away_team VARCHAR, venue VARCHAR);","SELECT away_team FROM table_name_12 WHERE venue = ""mcg"";","SELECT away_team FROM table_name_12 WHERE venue = ""mcg"";",1 Which threat intelligence sources reported the lowest severity threats in the last month?,"CREATE TABLE threat_intelligence (id INT, source TEXT, severity TEXT, reported_date DATE); ","SELECT source, severity FROM threat_intelligence WHERE reported_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) AND severity = (SELECT MIN(severity) FROM threat_intelligence WHERE reported_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH));","SELECT source, MIN(severity) FROM threat_intelligence WHERE reported_date >= DATEADD(month, -1, GETDATE()) GROUP BY source;",0 Find the number of public schools in each city from the 'education' database.,"CREATE TABLE cities (id INT PRIMARY KEY, name VARCHAR(255));CREATE TABLE schools (id INT PRIMARY KEY, name VARCHAR(255), type VARCHAR(255), city_id INT, FOREIGN KEY (city_id) REFERENCES cities(id)); ","SELECT cities.name, COUNT(schools.id) as school_count FROM cities INNER JOIN schools ON cities.id = schools.city_id GROUP BY cities.name;","SELECT c.name, COUNT(s.id) FROM cities c JOIN schools s ON c.id = s.city_id GROUP BY c.name;",0 What language is spoken after 2007 for the role of urvashi mathur?,"CREATE TABLE table_name_56 (language VARCHAR, year VARCHAR, role VARCHAR);","SELECT language FROM table_name_56 WHERE year > 2007 AND role = ""urvashi mathur"";","SELECT language FROM table_name_56 WHERE year > 2007 AND role = ""urvashi mathur"";",1 Create view 'animal_population_summary' based on 'animal_population' table,"CREATE TABLE animal_population (id INT, animal_name VARCHAR(50), population INT, birth_rate DECIMAL(4,2), death_rate DECIMAL(4,2));","CREATE VIEW animal_population_summary AS SELECT animal_name, population, (population * birth_rate) - (population * death_rate) AS net_change FROM animal_population;",CREATE VIEW animal_population_summary AS SELECT * FROM animal_population;,0 "On how many different dates did the team play a game in Cedar Falls, Iowa?","CREATE TABLE table_23184448_3 (date VARCHAR, location VARCHAR);","SELECT COUNT(date) FROM table_23184448_3 WHERE location = ""Cedar Falls, Iowa"";","SELECT COUNT(date) FROM table_23184448_3 WHERE location = ""Cedar Falls, Iowa"";",1 Add a new open pedagogy resource,"CREATE TABLE if not exists open_pedagogy_resources (id INT, course_id INT, type VARCHAR(50), link VARCHAR(100)); ","INSERT INTO open_pedagogy_resources (id, course_id, type, link) VALUES (3, 3, 'Podcast', 'https://edunova.podbean.com/e/episode-1-open-pedagogy-and-the-future-of-education/');","INSERT INTO open_pedagogy_resources (id, course_id, type, link) VALUES (1, 'Open Pedagogy', 'Open', 'Open');",0 "How many jobs have been created by virtual tourism in India, Japan, and Brazil?","CREATE TABLE VirtualTourism (TourismID int, Location varchar(50), JobsCreated int); ","SELECT SUM(JobsCreated) FROM VirtualTourism WHERE Location IN ('India', 'Japan', 'Brazil')","SELECT SUM(JobsCreated) FROM VirtualTourism WHERE Location IN ('India', 'Japan', 'Brazil');",0 "Update the ""UnionName"" to ""United Labor Union"" in the ""Unions"" table where the ""UnionID"" is 2.","CREATE TABLE Unions (UnionID INT, UnionName TEXT);",UPDATE Unions SET UnionName = 'United Labor Union' WHERE UnionID = 2;,UPDATE Unions SET UnionName = 'United Labor Union' WHERE UnionID = 2;,1 "What country was the Pegasus, build by Royal Dockyard, from?","CREATE TABLE table_name_41 (country VARCHAR, builder VARCHAR, ship VARCHAR);","SELECT country FROM table_name_41 WHERE builder = ""royal dockyard"" AND ship = ""pegasus"";","SELECT country FROM table_name_41 WHERE builder = ""royal dockyard"" AND ship = ""pegasus"";",1 Name the team for school of milford,"CREATE TABLE table_name_44 (team VARCHAR, school VARCHAR);","SELECT team FROM table_name_44 WHERE school = ""milford"";","SELECT team FROM table_name_44 WHERE school = ""milford"";",1 Update the 'description' of the record with an id of 3 in the 'digital_divide' table to 'Limited digital literacy and skills among older adults',"CREATE TABLE digital_divide (id INT PRIMARY KEY, problem VARCHAR(50), description TEXT); ",UPDATE digital_divide SET description = 'Limited digital literacy and skills among older adults' WHERE id = 3;,UPDATE digital_divide SET description = 'Limited digital literacy and skills among older adults' WHERE id = 3;,1 Calculate the average age of bioprocess engineers in the engineers table,"CREATE TABLE engineers (id INT, name VARCHAR(50), age INT, country VARCHAR(50), specialization VARCHAR(50)); ",SELECT AVG(age) FROM engineers WHERE specialization = 'Bioprocess Engineering';,SELECT AVG(age) FROM engineers WHERE specialization = 'Bioprocess';,0 Rank the mining sites by the percentage of waste material reused in the past year.,"CREATE TABLE WasteMaterial (SiteID INT, Date DATE, Material VARCHAR(255), Weight INT); ","SELECT SiteID, SUM(CASE WHEN Material = 'Rock' THEN Weight ELSE 0 END) / SUM(Weight) OVER (PARTITION BY SiteID) as Percentage_Reused FROM WasteMaterial WHERE Date >= DATEADD(YEAR, -1, GETDATE()) GROUP BY SiteID, Material, Date;","SELECT SiteID, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM WasteMaterial WHERE Date >= DATEADD(year, -1, GETDATE())) AS Percentage FROM WasteMaterial WHERE Date >= DATEADD(year, -1, GETDATE()) GROUP BY SiteID;",0 "What is the series number for the episode directed by jay sandrich that aired October 23, 1986?","CREATE TABLE table_2818164_4 (no_in_series INTEGER, directed_by VARCHAR, original_air_date VARCHAR);","SELECT MIN(no_in_series) FROM table_2818164_4 WHERE directed_by = ""Jay Sandrich"" AND original_air_date = ""October 23, 1986"";","SELECT MAX(no_in_series) FROM table_2818164_4 WHERE directed_by = ""Jay Sandrich"" AND original_air_date = ""October 23, 1986"";",0 "Which website includes a webcast of listen live, a frequency under 680, and was licensed in the city of San Antonio.","CREATE TABLE table_name_53 (website VARCHAR, frequency VARCHAR, city_of_license VARCHAR, webcast VARCHAR);","SELECT website FROM table_name_53 WHERE city_of_license = ""san antonio"" AND webcast = ""listen live"" AND frequency = 680;","SELECT website FROM table_name_53 WHERE city_of_license = ""san antonio"" AND webcast = ""listen live"" AND frequency 680;",0 "How many wins have a year after 1976, and 350cc as the class?","CREATE TABLE table_name_21 (wins INTEGER, year VARCHAR, class VARCHAR);","SELECT SUM(wins) FROM table_name_21 WHERE year > 1976 AND class = ""350cc"";","SELECT SUM(wins) FROM table_name_21 WHERE year > 1976 AND class = ""350cc"";",1 Who won the US Open in 1937?,"CREATE TABLE table_197638_6 (player VARCHAR, us_open VARCHAR);",SELECT player FROM table_197638_6 WHERE us_open = 1937;,SELECT player FROM table_197638_6 WHERE us_open = 1937;,1 Insert a new 'perfume' product from 'Italy' with a sustainability rating of 4.2 into the 'products' table?,"CREATE TABLE products (product_id INT, product_category VARCHAR(50), sustainability_rating FLOAT, country VARCHAR(50));","INSERT INTO products (product_id, product_category, sustainability_rating, country) VALUES (4, 'perfume', 4.2, 'Italy');","INSERT INTO products (product_id, product_category, sustainability_rating, country) VALUES ('perfume', 4.2, 'Italy');",0 In 1990-2005 what is the lowest Start with Convs smaller than 2?,"CREATE TABLE table_name_93 (start INTEGER, span VARCHAR, conv VARCHAR);","SELECT MIN(start) FROM table_name_93 WHERE span = ""1990-2005"" AND conv < 2;","SELECT MIN(start) FROM table_name_93 WHERE span = ""1990-2005"" AND conv 2;",0 "List the ids, names and market shares of all browsers.","CREATE TABLE browser (id VARCHAR, name VARCHAR, market_share VARCHAR);","SELECT id, name, market_share FROM browser;","SELECT id, name, market_share FROM browser;",1 Get the total number of wins for each game category in the 'GameCategoriesWon' table,"CREATE TABLE GameCategoriesWon (PlayerID INT, GameCategory VARCHAR(255), GameWon BOOLEAN);","SELECT GameCategory, SUM(GameWon) as TotalWins FROM GameCategoriesWon WHERE GameWon = TRUE GROUP BY GameCategory;","SELECT GameCategory, COUNT(*) as TotalWins FROM GameCategoriesWon GROUP BY GameCategory;",0 "What is the total number of players who play ""Virtual Reality Chess"" or ""Racing Simulator 2022""?","CREATE TABLE Players (PlayerID INT, PlayerName VARCHAR(50), Game VARCHAR(50)); ","SELECT COUNT(*) FROM Players WHERE Game IN ('Virtual Reality Chess', 'Racing Simulator 2022');","SELECT COUNT(*) FROM Players WHERE Game IN ('Virtual Reality Chess', 'Racing Simulator 2022');",1 What is the average fare amount for each route type?,"CREATE TABLE route_types (route_type_id SERIAL PRIMARY KEY, route_type_name VARCHAR(255)); CREATE TABLE fares (fare_id SERIAL PRIMARY KEY, route_id VARCHAR(255), fare_amount DECIMAL(10,2), route_type_id INTEGER, effective_date DATE);","SELECT rt.route_type_name, AVG(f.fare_amount) avg_fare_amount FROM fares f JOIN route_types rt ON f.route_type_id = rt.route_type_id GROUP BY rt.route_type_name;","SELECT rt.route_type_name, AVG(f.fare_amount) as avg_fare_amount FROM route_types rt JOIN fares f ON rt.route_type_id = f.route_type_id GROUP BY rt.route_type_name;",0 What is the maximum depth of the ocean floor in the Atlantic Ocean?,"CREATE TABLE ocean_floor_mapping (id INT, location VARCHAR(50), ocean VARCHAR(50), depth INT);","SELECT ocean, MAX(depth) FROM ocean_floor_mapping WHERE ocean = 'Atlantic Ocean' GROUP BY ocean;",SELECT MAX(depth) FROM ocean_floor_mapping WHERE ocean = 'Atlantic Ocean';,0 What is the total sales for each menu item by day of the week?,"CREATE TABLE sales_by_day (menu_item VARCHAR(255), sales DECIMAL(10,2), day_of_week VARCHAR(10)); ","SELECT menu_item, day_of_week, SUM(sales) FROM sales_by_day GROUP BY menu_item, day_of_week;","SELECT menu_item, day_of_week, SUM(sales) FROM sales_by_day GROUP BY menu_item, day_of_week;",1 What is the average response time for medical emergencies in the East End district?,"CREATE TABLE emergency_responses (id INT, district VARCHAR(20), type VARCHAR(20), response_time INT); ",SELECT AVG(response_time) FROM emergency_responses WHERE district = 'East End' AND type = 'Medical';,SELECT AVG(response_time) FROM emergency_responses WHERE district = 'East End' AND type = 'Medical';,1 "List all sculptures from the 20th century with their material and the name of the museum they are exhibited in, if available, sorted by the sculpture's creation date. If no museum is available, order by material.","CREATE TABLE Sculptures (SculptureID INT, Title VARCHAR(50), CreationDate DATE, Material VARCHAR(50), MuseumID INT); CREATE TABLE Museums (MuseumID INT, Name VARCHAR(50)); ","SELECT s.Title, s.CreationDate, s.Material, m.Name FROM Sculptures s LEFT JOIN Museums m ON s.MuseumID = m.MuseumID WHERE YEAR(s.CreationDate) >= 1900 ORDER BY s.CreationDate, s.Material;","SELECT Sculptures.Title, Sculptures.CreationDate, Sculptures.Material, Sculptures.Name FROM Sculptures INNER JOIN Museums ON Sculptures.MuseumID = Museums.MuseumID WHERE Sculptures.CreationDate >= '20th Century' ORDER BY Sculptures.CreationDate;",0 What is the total number of employees working in mining operations in the Oceanian region?,"CREATE TABLE Employees (EmployeeID INT, Name VARCHAR(50), OperationID INT, Department VARCHAR(50)); ",SELECT COUNT(DISTINCT Employees.EmployeeID) FROM Employees INNER JOIN MiningOperations ON Employees.OperationID = MiningOperations.OperationID WHERE Employees.Department = 'Mining' AND MiningOperations.Country IN (SELECT Country FROM Countries WHERE Region = 'Oceania');,SELECT COUNT(*) FROM Employees WHERE Department = 'Mining' AND Region = 'Oceania';,0 How many totals does Chile have when the number of silvers is more than 0?,"CREATE TABLE table_name_73 (total VARCHAR, nation VARCHAR, silver VARCHAR);","SELECT COUNT(total) FROM table_name_73 WHERE nation = ""chile"" AND silver > 0;","SELECT COUNT(total) FROM table_name_73 WHERE nation = ""chile"" AND silver > 0;",1 What was the max character (per page row) of the encoding with a bit rate of 6.203?,"CREATE TABLE table_1926240_1 (max_characters__per_page_row_ INTEGER, bit_rate_ VARCHAR, _mbit_s_ VARCHAR);","SELECT MAX(max_characters__per_page_row_) FROM table_1926240_1 WHERE bit_rate_[_mbit_s_] = ""6.203"";","SELECT MAX(max_characters__per_page_row_) FROM table_1926240_1 WHERE bit_rate_ = 6.203 AND _mbit_s_ = ""6.203"";",0 "List all volunteers who have participated in programs in both New York and California, along with their contact information.","CREATE TABLE Volunteers (VolunteerID INT, FirstName TEXT, LastName TEXT, Country TEXT); CREATE TABLE VolunteerPrograms (VolunteerID INT, ProgramID INT, Location TEXT); ","SELECT V.FirstName, V.LastName, V.Country FROM Volunteers V INNER JOIN VolunteerPrograms VP1 ON V.VolunteerID = VP1.VolunteerID AND VP1.Location = 'NY' INNER JOIN VolunteerPrograms VP2 ON V.VolunteerID = VP2.VolunteerID AND VP2.Location = 'CA';","SELECT Volunteers.FirstName, Volunteers.LastName, Volunteers.Country FROM Volunteers INNER JOIN VolunteerPrograms ON Volunteers.VolunteerID = VolunteerPrograms.VolunteerID WHERE VolunteerPrograms.Location IN ('New York', 'California');",0 What is the average sea surface temperature in the South Pacific Ocean in the last 5 years?,"CREATE TABLE sea_temperature (id INT, year INT, month INT, region TEXT, temperature FLOAT); ",SELECT AVG(temperature) FROM sea_temperature WHERE region = 'South Pacific Ocean' AND year BETWEEN 2017 AND 2021;,SELECT AVG(temperature) FROM sea_temperature WHERE region = 'South Pacific Ocean' AND year BETWEEN 2019 AND 2021;,0 "What is the catalog of the release from January 23, 2002?","CREATE TABLE table_name_59 (catalog VARCHAR, date VARCHAR);","SELECT catalog FROM table_name_59 WHERE date = ""january 23, 2002"";","SELECT catalog FROM table_name_59 WHERE date = ""january 23, 2002"";",1 What is the maximum financial wellbeing score for users in the West?,"CREATE TABLE financial_wellbeing(id INT, user_id INT, region VARCHAR(50), score INT); ",SELECT MAX(score) FROM financial_wellbeing WHERE region = 'West';,SELECT MAX(score) FROM financial_wellbeing WHERE region = 'West';,1 "Add a new record to the ""physician_practices"" table for a practice in ""CA"" with 30 total doctors","CREATE TABLE physician_practices (id INT PRIMARY KEY, name TEXT, state TEXT, total_doctors INT); ","INSERT INTO physician_practices (name, state, total_doctors) VALUES ('Practice CA', 'CA', 30);","INSERT INTO physician_practices (id, name, state, total_doctors) VALUES (1, 'CA', 30);",0 "How many tourists visited Australia in 2018 from Asia, Oceania, and Africa?","CREATE TABLE tourism_data (visitor_country VARCHAR(50), destination_country VARCHAR(50), visit_year INT); ",SELECT SUM(*) FROM tourism_data WHERE visitor_country LIKE 'Asia%' OR visitor_country LIKE 'Oceania%' OR visitor_country LIKE 'Africa%' AND visit_year = 2018 AND destination_country = 'Australia';,"SELECT COUNT(*) FROM tourism_data WHERE visitor_country IN ('Australia', 'Oceania', 'Africa') AND visit_year = 2018;",0 What is the average age of volunteers in the volunteers table who have completed exactly 3 training sessions?,"CREATE TABLE volunteers (id INT, name VARCHAR(50), age INT, sessions_completed INT);",SELECT AVG(age) FROM volunteers WHERE sessions_completed = 3;,SELECT AVG(age) FROM volunteers WHERE sessions_completed = 3;,1 Who are the top 3 donors by total donation amount for the 'Health' program?,"CREATE TABLE donors (id INT, name VARCHAR(255)); CREATE TABLE donations (id INT, donor_id INT, program_id INT, donation_amount DECIMAL(10,2)); CREATE TABLE programs (id INT, name VARCHAR(255)); ","SELECT d.donor_id, d.name, SUM(d.donation_amount) as total_donation_amount FROM donations d JOIN donors don ON d.donor_id = don.id WHERE d.program_id = 2 GROUP BY d.donor_id ORDER BY total_donation_amount DESC LIMIT 3;","SELECT donors.name, SUM(donations.donation_amount) as total_donation FROM donors INNER JOIN donations ON donors.id = donations.donor_id INNER JOIN programs ON donations.program_id = programs.id WHERE programs.name = 'Health' GROUP BY donors.name ORDER BY total_donation DESC LIMIT 3;",0 What is the week 13 result where the week 14 resulted in Maryland (10-1)?,"CREATE TABLE table_name_18 (week_13_nov_26 VARCHAR, week_14_dec_3 VARCHAR);","SELECT week_13_nov_26 FROM table_name_18 WHERE week_14_dec_3 = ""maryland (10-1)"";","SELECT week_13_nov_26 FROM table_name_18 WHERE week_14_dec_3 = ""maryland (10-1)"";",1 What is the total number of clients from 'Asia' who have had 'civil law' cases?,"CREATE TABLE Clients (ClientID int, Age int, Gender varchar(10), Region varchar(50)); CREATE TABLE Cases (CaseID int, ClientID int, Category varchar(50)); ",SELECT COUNT(DISTINCT C.ClientID) as TotalClients FROM Clients C INNER JOIN Cases CA ON C.ClientID = CA.ClientID WHERE C.Region = 'Asia' AND CA.Category = 'Civil Law';,SELECT COUNT(*) FROM Clients INNER JOIN Cases ON Clients.ClientID = Cases.ClientID WHERE Clients.Region = 'Asia' AND Cases.Category = 'civil law';,0 What is the average attendance of the match with arlesey town as the home team?,"CREATE TABLE table_name_68 (attendance INTEGER, home_team VARCHAR);","SELECT AVG(attendance) FROM table_name_68 WHERE home_team = ""arlesey town"";","SELECT AVG(attendance) FROM table_name_68 WHERE home_team = ""arlesey town"";",1 What is the favorite game genre of players from Japan?,"CREATE TABLE PlayerDemographics (PlayerID INT, Age INT, Country VARCHAR(50), Genre VARCHAR(20)); ","SELECT Genre, COUNT(*) as Count FROM PlayerDemographics WHERE Country = 'Japan' GROUP BY Genre ORDER BY Count DESC LIMIT 1;",SELECT Genre FROM PlayerDemographics WHERE Country = 'Japan' ORDER BY Genre DESC LIMIT 1;,0 Count the number of articles published by each author in the 'politics' section.,"CREATE TABLE articles (id INT, author VARCHAR(255), title VARCHAR(255), section VARCHAR(255), date DATE);","SELECT author, COUNT(*) FROM articles WHERE section='politics' GROUP BY author;","SELECT author, COUNT(*) FROM articles WHERE section = 'politics' GROUP BY author;",0 What's the English name for the month with พ.ย. abbreviation? ,"CREATE TABLE table_180802_2 (english_name VARCHAR, abbr VARCHAR);","SELECT english_name FROM table_180802_2 WHERE abbr = ""พ.ย."";","SELECT english_name FROM table_180802_2 WHERE abbr = "".."";",0 What was the total attendance for a result of 7-23 before 1960?,"CREATE TABLE table_name_19 (attendance INTEGER, result VARCHAR, year VARCHAR);","SELECT SUM(attendance) FROM table_name_19 WHERE result = ""7-23"" AND year < 1960;","SELECT SUM(attendance) FROM table_name_19 WHERE result = ""7-23"" AND year 1960;",0 What is the size of the crowd for the home team of Footscray?,"CREATE TABLE table_name_28 (crowd VARCHAR, home_team VARCHAR);","SELECT crowd FROM table_name_28 WHERE home_team = ""footscray"";","SELECT crowd FROM table_name_28 WHERE home_team = ""footscray"";",1 How many games does the player with 1 (0) finals and a w-league of 28 (1) have?,"CREATE TABLE table_name_12 (games VARCHAR, finals VARCHAR, w_league VARCHAR);","SELECT games FROM table_name_12 WHERE finals = ""1 (0)"" AND w_league = ""28 (1)"";","SELECT games FROM table_name_12 WHERE finals = ""1 (0)"" AND w_league = ""28 (1)"";",1 What is the Team with a Player that is david cooper?,"CREATE TABLE table_name_86 (team VARCHAR, player VARCHAR);","SELECT team FROM table_name_86 WHERE player = ""david cooper"";","SELECT team FROM table_name_86 WHERE player = ""david cooper"";",1 List the names of all space missions and their launch dates led by astronauts from underrepresented communities.,"CREATE TABLE space_missions (id INT, mission_name VARCHAR(255), launch_date DATE, lead_astronaut VARCHAR(255)); ","SELECT mission_name, launch_date FROM space_missions WHERE lead_astronaut IN ('AstronautC', 'AstronautD', 'AstronautE');","SELECT mission_name, launch_date FROM space_missions WHERE lead_astronaut IN (SELECT lead_astronaut FROM space_missions WHERE lead_astronaut IN (SELECT lead_astronaut FROM space_missions WHERE lead_astronaut IN (SELECT lead_astronaut FROM space_missions WHERE lead_astronaut IN (SELECT lead_astronaut FROM space_missions WHERE lead_astronaut IN (SELECT lead_astronaut FROM space_missions WHERE lead_astronaut IN (SELECT lead_astronaut FROM space_missions WHERE lead_astronaut IN (SELECT lead_astronaut FROM space_missions WHERE lead_astronaut FROM space_missions WHERE lead_astronaut FROM space_missions WHERE lead_astronaut FROM space_missions WHERE lead_astronaut FROM space_missions WHERE lead_astronaut FROM space_missions WHERE lead_astronaut FROM space_missions WHERE lead_astronaut FROM space_missions WHERE lead_astronaut FROM space_missions WHERE lead_astronaut FROM space_missions WHERE lead_astronaut FROM space_missions WHERE lead_astronaut FROM space_missions WHERE lead_astronaut FROM space_missions);",0 "What is the total amount donated by individual donors who have donated more than once in the last 12 months, and their names?","CREATE TABLE donors(id INT, name TEXT, total_donation FLOAT);CREATE TABLE donations(id INT, donor_id INT, amount FLOAT, donation_date DATE);","SELECT d.name, SUM(donations.amount) as total_donation FROM donations JOIN donors ON donations.donor_id = donors.id WHERE donations.donation_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 12 MONTH) AND CURDATE() GROUP BY donors.id HAVING COUNT(donations.id) > 1;","SELECT donors.name, SUM(donations.amount) FROM donors INNER JOIN donations ON donors.id = donations.donor_id WHERE donations.donation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 12 MONTH) GROUP BY donors.name HAVING COUNT(DISTINCT donations.id) > 1;",0 "Show fan demographics from the ""fans"" table for fans who bought tickets for events in California","CREATE TABLE fans (id INT PRIMARY KEY, name VARCHAR(50), age INT, gender VARCHAR(10), state VARCHAR(50));",SELECT * FROM fans WHERE state = 'California';,SELECT * FROM fans WHERE state = 'California';,1 How many users have created a post in the last week in each country?,"CREATE TABLE posts (id INT, user_id INT, post_date DATE); CREATE TABLE users (id INT, country VARCHAR(255)); ","SELECT users.country, COUNT(DISTINCT users.id) FROM posts INNER JOIN users ON posts.user_id = users.id WHERE posts.post_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) GROUP BY users.country;","SELECT u.country, COUNT(DISTINCT p.user_id) FROM posts p JOIN users u ON p.user_id = u.id WHERE p.post_date >= DATEADD(week, -1, GETDATE()) GROUP BY u.country;",0 Which Surface has a Place of lappeenranta?,"CREATE TABLE table_name_54 (surface VARCHAR, place VARCHAR);","SELECT surface FROM table_name_54 WHERE place = ""lappeenranta"";","SELECT surface FROM table_name_54 WHERE place = ""lappeenranta"";",1 "What is the rank of Etihad Tower 5, with less than 62 floors?","CREATE TABLE table_name_90 (rank INTEGER, floors VARCHAR, name VARCHAR);","SELECT MIN(rank) FROM table_name_90 WHERE floors < 62 AND name = ""etihad tower 5"";","SELECT SUM(rank) FROM table_name_90 WHERE floors 62 AND name = ""ethihad tower 5"";",0 List the names of restaurants in the 'food_trucks' schema that do not have a sustainable sourcing certification.,"CREATE TABLE food_trucks.restaurants (restaurant_id INT, name TEXT, sustainable_certification BOOLEAN); ",SELECT name FROM food_trucks.restaurants WHERE sustainable_certification = false;,SELECT name FROM food_trucks.restaurants WHERE sustainable_certification = FALSE;,0 Fulham as Team 1 has the 2nd leg score of what?,CREATE TABLE table_name_44 (team_1 VARCHAR);,"SELECT 2 AS nd_leg FROM table_name_44 WHERE team_1 = ""fulham"";","SELECT team_1 FROM table_name_44 WHERE 2 = ""nd leg score"";",0 Which wearable technology devices are most popular among members?,"CREATE TABLE member_wearables (member_id INT, device_id INT, device_name VARCHAR(25)); ","SELECT device_name, COUNT(*) FROM member_wearables GROUP BY device_name ORDER BY COUNT(*) DESC;","SELECT device_name, COUNT(*) as num_members FROM member_wearables GROUP BY device_name ORDER BY num_members DESC LIMIT 1;",0 Which college/junior/team has defence as the position with canada as the nationality and the pick # is less than 61.0?,"CREATE TABLE table_2897457_3 (college_junior_club_team VARCHAR, pick__number VARCHAR, position VARCHAR, nationality VARCHAR);","SELECT college_junior_club_team FROM table_2897457_3 WHERE position = ""Defence"" AND nationality = ""Canada"" AND pick__number < 61.0;","SELECT college_junior_club_team FROM table_2897457_3 WHERE position = ""Defense"" AND nationality = ""Canada"" AND pick__number 61.0;",0 Update the name of the menu item with ID 1 to 'Veggie Burger',"CREATE TABLE menu_items (menu_item_id INT, name VARCHAR(50), category VARCHAR(50), price DECIMAL(5,2)); ",UPDATE menu_items SET name = 'Veggie Burger' WHERE menu_item_id = 1;,UPDATE menu_items SET name = 'Veggie Burger' WHERE menu_item_id = 1;,1 "Income poverty f smaller than 13.6, and a Mining b of 1, and a Structural poverty g smaller than 7.8, so what is the total number of agriculture?","CREATE TABLE table_name_10 (agri_culture_b VARCHAR, structural_poverty_g VARCHAR, income_poverty_f VARCHAR, mining_b VARCHAR);",SELECT COUNT(agri_culture_b) FROM table_name_10 WHERE income_poverty_f < 13.6 AND mining_b = 1 AND structural_poverty_g < 7.8;,SELECT COUNT(agri_culture_b) FROM table_name_10 WHERE income_poverty_f 13.6 AND mining_b = 1 AND structural_poverty_g 7.8;,0 Delete the row with the highest Dysprosium production in 2020.,"CREATE TABLE dysprosium_production (id INT, year INT, producer VARCHAR(255), dysprosium_prod FLOAT); ","DELETE FROM dysprosium_production WHERE (producer, dysprosium_prod) IN (SELECT producer, MAX(dysprosium_prod) FROM dysprosium_production WHERE year = 2020 GROUP BY producer);",DELETE FROM dysprosium_production WHERE year = 2020 AND dysprosium_prod = (SELECT MAX(dysprosium_prod) FROM dysprosium_production WHERE year = 2020);,0 What is the maximum production of wheat per hectare in Germany?,"CREATE TABLE wheat_production (id INT, quantity INT, yield_per_hectare DECIMAL(5,2), country VARCHAR(255)); ",SELECT MAX(yield_per_hectare) FROM wheat_production WHERE country = 'Germany';,SELECT MAX(quantity * yield_per_hectare) FROM wheat_production WHERE country = 'Germany';,0 "What is the Week when anke huber chanda rubin shows for Semi finalists, and the Runner-up is meredith mcgrath larisa savchenko?","CREATE TABLE table_name_2 (week_of VARCHAR, semi_finalists VARCHAR, runner_up VARCHAR);","SELECT week_of FROM table_name_2 WHERE semi_finalists = ""anke huber chanda rubin"" AND runner_up = ""meredith mcgrath larisa savchenko"";","SELECT week_of FROM table_name_2 WHERE semi_finalists = ""anke huber chanda rubin"" AND runner_up = ""meredith mcgrath larisa savchenko"";",1 "What is the percentage of users who have posted a tweet in the past month and who are located in a country with a population of over 100 million, out of all users located in a country with a population of over 100 million?","CREATE TABLE tweets (tweet_id INT, user_id INT, tweet_date DATE);CREATE TABLE users (user_id INT, country VARCHAR(50), registration_date DATE);CREATE TABLE country_populations (country VARCHAR(50), population INT);",SELECT 100.0 * COUNT(DISTINCT t.user_id) / (SELECT COUNT(DISTINCT u.user_id) FROM users u JOIN country_populations cp ON u.country = cp.country WHERE cp.population > 100000000) as pct_users FROM tweets t JOIN users u ON t.user_id = u.user_id JOIN country_populations cp ON u.country = cp.country WHERE t.tweet_date >= DATE(NOW()) - INTERVAL 1 MONTH AND cp.population > 100000000;,"SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM tweets WHERE tweet_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH))) AS percentage FROM tweets JOIN users ON tweets.user_id = users.user_id JOIN country_populations ON users.country = country_populations.country WHERE country_populations.population > 100000000;",0 What is the ratio of protected habitats to total habitats per region?,"CREATE TABLE habitats (id INT, name VARCHAR(50), region VARCHAR(50), protected BOOLEAN); ","SELECT region, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM habitats WHERE region = h.region) as ratio FROM habitats h WHERE protected = TRUE GROUP BY region;","SELECT region, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM habitats WHERE protected = true GROUP BY region) as ratio FROM habitats WHERE protected = true GROUP BY region;",0 What year did the season finale have a total of 10.29 million viewers?,"CREATE TABLE table_1348989_2 (season VARCHAR, viewers__in_millions_ VARCHAR);","SELECT season AS Finale FROM table_1348989_2 WHERE viewers__in_millions_ = ""10.29"";","SELECT season FROM table_1348989_2 WHERE viewers__in_millions_ = ""10.29"";",0 "What is the average mental health score for students in each grade level, by gender?","CREATE TABLE student_mental_health (student_id INT, grade INT, score INT, gender TEXT); ","SELECT grade, gender, AVG(score) FROM student_mental_health GROUP BY grade, gender;","SELECT grade, gender, AVG(score) FROM student_mental_health GROUP BY grade, gender;",1 "How many unique volunteers have participated in events organized by the ""Youth Empowerment"" department in the last 6 months?","CREATE TABLE Volunteers (VolunteerID INT, Name VARCHAR(50), Department VARCHAR(50), EventDate DATE);","SELECT COUNT(DISTINCT VolunteerID) FROM Volunteers WHERE Department = 'Youth Empowerment' AND EventDate > DATE_SUB(CURDATE(), INTERVAL 6 MONTH);","SELECT COUNT(DISTINCT VolunteerID) FROM Volunteers WHERE Department = 'Youth Empowerment' AND EventDate >= DATEADD(month, -6, GETDATE());",0 Delete the record with ID 1 from the prison table.,"CREATE TABLE prison (id INT, name TEXT, security_level TEXT, age INT); ",DELETE FROM prison WHERE id = 1;,DELETE FROM prison WHERE id = 1;,1 What is the total revenue generated by FPS games?,"CREATE TABLE GameSales (SaleID INT, GameID INT, Quantity INT, Revenue DECIMAL(10,2)); ",SELECT SUM(Revenue) FROM GameSales JOIN Games ON GameSales.GameID = Games.GameID WHERE Genre = 'FPS';,SELECT SUM(Revenue) FROM GameSales WHERE GameID IN (SELECT GameID FROM GameSales WHERE GameType = 'FPS');,0 What was the total revenue for the state of California in 2021?,"CREATE TABLE sales (id INT, dispensary_name TEXT, state TEXT, revenue INT, date DATE); ",SELECT SUM(revenue) FROM sales WHERE state = 'California' AND date BETWEEN '2021-01-01' AND '2021-12-31';,SELECT SUM(revenue) FROM sales WHERE state = 'California' AND date BETWEEN '2021-01-01' AND '2021-12-31';,1 What is the minimum donation amount given on Giving Tuesday from donors in the Technology industry?,"CREATE TABLE donations(id INT, donor_name TEXT, donation_amount FLOAT, donation_date DATE, industry TEXT); ",SELECT MIN(donation_amount) FROM donations WHERE donation_date = '2022-11-29' AND industry = 'Technology';,SELECT MIN(donation_amount) FROM donations WHERE donation_date BETWEEN '2022-01-01' AND '2022-12-31' AND industry = 'Technology';,0 "Which Pos has a Car # smaller than 18, and a Driver of mike skinner?","CREATE TABLE table_name_91 (pos INTEGER, car__number VARCHAR, driver VARCHAR);","SELECT AVG(pos) FROM table_name_91 WHERE car__number < 18 AND driver = ""mike skinner"";","SELECT SUM(pos) FROM table_name_91 WHERE car__number 18 AND driver = ""mike skinner"";",0 The year 1972 has what written in Height column?,"CREATE TABLE table_name_40 (height VARCHAR, year VARCHAR);",SELECT height FROM table_name_40 WHERE year = 1972;,SELECT height FROM table_name_40 WHERE year = 1972;,1 Find the number of contracts awarded to Service-Disabled Veteran-Owned Small Businesses (SDVOSB) in the last 2 years,"CREATE TABLE contracts (contract_id INT, contract_value FLOAT, contract_date DATE, business_type VARCHAR(20)); ","SELECT COUNT(*) FROM contracts WHERE business_type = 'SDVOSB' AND contract_date >= DATE_SUB(CURRENT_DATE, INTERVAL 2 YEAR);","SELECT COUNT(*) FROM contracts WHERE business_type = 'Service-Disabled Veteran-Owned Small Business' AND contract_date >= DATEADD(year, -2, GETDATE());",0 "WHAT IS THE TYPE OF LAND WITH A 2010 POPULATION GREATER THAN 2539, A RURAL AREA, AND A 2007 POPULATION OF 2572?","CREATE TABLE table_name_69 (geographic_character VARCHAR, population__2007_ VARCHAR, population__2010_ VARCHAR, urban_rural VARCHAR);","SELECT geographic_character FROM table_name_69 WHERE population__2010_ > 2539 AND urban_rural = ""rural"" AND population__2007_ = 2572;","SELECT geographic_character FROM table_name_69 WHERE population__2010_ > 2539 AND urban_rural = ""rural"" AND population__2007_ = 2572;",1 What's the general classification of stage 3 with David Loosli as the mountains classification?,"CREATE TABLE table_name_74 (general_classification VARCHAR, mountains_classification VARCHAR, stage VARCHAR);","SELECT general_classification FROM table_name_74 WHERE mountains_classification = ""david loosli"" AND stage = ""3"";","SELECT general_classification FROM table_name_74 WHERE mountains_classification = ""david loosli"" AND stage = ""3"";",1 What is the average weight of packages shipped to India from the Mumbai warehouse?,"CREATE TABLE warehouses (warehouse_id INT, warehouse_name VARCHAR(50), city VARCHAR(50), country VARCHAR(50)); CREATE TABLE packages (package_id INT, package_weight DECIMAL(5,2), warehouse_id INT, destination_country VARCHAR(50)); ",SELECT AVG(package_weight) FROM packages WHERE warehouse_id = 2 AND destination_country = 'India';,SELECT AVG(package_weight) FROM packages p JOIN warehouses w ON p.warehouse_id = w.warehouse_id WHERE w.city = 'Mumbai' AND p.destination_country = 'India';,0 What is the district for the party federalist and the candidates are william craik (f) 51.0% benjamin edwards 49.0%?,"CREATE TABLE table_2668416_7 (district VARCHAR, party VARCHAR, candidates VARCHAR);","SELECT district FROM table_2668416_7 WHERE party = ""Federalist"" AND candidates = ""William Craik (F) 51.0% Benjamin Edwards 49.0%"";","SELECT district FROM table_2668416_7 WHERE party = ""Federalist"" AND candidates = ""William Craig (F) 51.0% Benjamin Edwards 49.0%"";",0 What is the away team playing at Everton?,"CREATE TABLE table_name_88 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team FROM table_name_88 WHERE home_team = ""everton"";","SELECT away_team FROM table_name_88 WHERE home_team = ""everton"";",1 Which New council has an Election result larger than 24?,"CREATE TABLE table_name_33 (new_council INTEGER, election_result INTEGER);",SELECT AVG(new_council) FROM table_name_33 WHERE election_result > 24;,SELECT AVG(new_council) FROM table_name_33 WHERE election_result > 24;,1 "Which sequence identity to human protein has a divergence from human lineage (MYA) larger than 8.8, and a sequence length (aa) larger than 1587, and a protein name of soga2?","CREATE TABLE table_name_51 (sequence_identity_to_human_protein VARCHAR, protein_name VARCHAR, divergence_from_human_lineage__mya_ VARCHAR, sequence_length__aa_ VARCHAR);","SELECT sequence_identity_to_human_protein FROM table_name_51 WHERE divergence_from_human_lineage__mya_ > 8.8 AND sequence_length__aa_ > 1587 AND protein_name = ""soga2"";","SELECT sequence_identity_to_human_protein FROM table_name_51 WHERE divergence_from_human_lineage__mya_ > 8.8 AND sequence_length__aa_ > 1587 AND protein_name = ""soga2"";",1 "What is the average daily transaction volume for each customer in the past month, along with their primary investment advisor's name?","CREATE TABLE customer (customer_id INT, primary_advisor VARCHAR(255)); CREATE TABLE transaction (transaction_date DATE, customer_id INT, transaction_volume DECIMAL(10,2));","SELECT c.customer_id, c.primary_advisor, AVG(t.transaction_volume) as avg_daily_volume FROM customer c JOIN transaction t ON c.customer_id = t.customer_id WHERE t.transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY c.customer_id, c.primary_advisor;","SELECT c.customer_id, c.primary_advisor, AVG(t.transaction_volume) as avg_daily_volume FROM customer c JOIN transaction t ON c.customer_id = t.customer_id WHERE t.transaction_date >= DATEADD(month, -1, GETDATE()) GROUP BY c.customer_id, c.primary_advisor;",0 How many Carbon Pricing schemes are there in the EU?,"CREATE TABLE CarbonPricing ( SchemeID INT, Name VARCHAR(255), Country VARCHAR(255), StartDate DATE );",SELECT COUNT(*) FROM CarbonPricing WHERE Country = 'European Union';,SELECT COUNT(*) FROM CarbonPricing WHERE Country = 'EU';,0 What is the IHSAA Football class at Culver?,"CREATE TABLE table_name_93 (ihsaa_football_class VARCHAR, location VARCHAR);","SELECT ihsaa_football_class FROM table_name_93 WHERE location = ""culver"";","SELECT ihsaa_football_class FROM table_name_93 WHERE location = ""culver"";",1 who lost on august 21?,"CREATE TABLE table_name_10 (loss VARCHAR, date VARCHAR);","SELECT loss FROM table_name_10 WHERE date = ""august 21"";","SELECT loss FROM table_name_10 WHERE date = ""august 21"";",1 What is the average response time for emergency calls in the 'Urban' district?,"CREATE TABLE District (district_id INT, district_name VARCHAR(20)); CREATE TABLE EmergencyCalls (call_id INT, district_id INT, response_time INT);",SELECT AVG(response_time) FROM EmergencyCalls WHERE district_id = (SELECT district_id FROM District WHERE district_name = 'Urban');,SELECT AVG(response_time) FROM EmergencyCalls ec JOIN District d ON ec.district_id = d.district_id WHERE d.district_name = 'Urban';,0 How many self-driving taxis are in operation in San Francisco?,"CREATE TABLE taxis (taxi_id INT, taxi_type VARCHAR(20)); ",SELECT COUNT(*) as num_taxis FROM taxis WHERE taxi_type = 'Self-driving';,SELECT COUNT(*) FROM taxis WHERE taxi_type ='self-driving' AND city = 'San Francisco';,0 "What is the percentage of players who are female or male, for each platform?","CREATE TABLE players (player_id INT, gender VARCHAR(6), platform VARCHAR(10));","SELECT platform, gender, COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (PARTITION BY platform) as percentage FROM players GROUP BY platform, gender;","SELECT platform, gender, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM players WHERE gender = 'Female' OR gender = 'Male') as female_percentage FROM players GROUP BY platform, gender;",0 Which mean total had Tim Sills as a player?,"CREATE TABLE table_name_26 (total INTEGER, player VARCHAR);","SELECT AVG(total) FROM table_name_26 WHERE player = ""tim sills"";","SELECT SUM(total) FROM table_name_26 WHERE player = ""tim sills"";",0 "What is the total number of Year, when Result is ""Nominated"", when Category is ""Outstanding Actor in a Musical"", and when Award is ""Drama Desk Award""?","CREATE TABLE table_name_68 (year VARCHAR, award VARCHAR, result VARCHAR, category VARCHAR);","SELECT COUNT(year) FROM table_name_68 WHERE result = ""nominated"" AND category = ""outstanding actor in a musical"" AND award = ""drama desk award"";","SELECT COUNT(year) FROM table_name_68 WHERE result = ""nominated"" AND category = ""outstanding actor in a musical"" AND award = ""drama desk award"";",1 How many 1st prizes have a Date of aug 17?,CREATE TABLE table_name_69 (date VARCHAR);,"SELECT COUNT(1 AS st_prize___) AS $__ FROM table_name_69 WHERE date = ""aug 17"";","SELECT COUNT(1 AS st_prizes) FROM table_name_69 WHERE date = ""aug 17"";",0 What is the maximum pollution level in each ocean region?,"CREATE TABLE pollution (id INT, region TEXT, level FLOAT); ","SELECT region, MAX(level) max_level FROM pollution GROUP BY region;","SELECT region, MAX(level) FROM pollution GROUP BY region;",0 What date was Chester the away team?,"CREATE TABLE table_name_67 (date VARCHAR, away_team VARCHAR);","SELECT date FROM table_name_67 WHERE away_team = ""chester"";","SELECT date FROM table_name_67 WHERE away_team = ""chester"";",1 How many cases were handled by attorney 'Jane Smith'?,"CREATE TABLE attorneys (id INT, name VARCHAR(50), department VARCHAR(20)); CREATE TABLE cases (id INT, attorney_id INT, case_number VARCHAR(20)); ",SELECT COUNT(*) FROM cases WHERE attorney_id = (SELECT id FROM attorneys WHERE name = 'Jane Smith');,SELECT COUNT(*) FROM cases JOIN attorneys ON cases.attorney_id = attorneys.id WHERE attorneys.name = 'Jane Smith';,0 What is the maximum carbon sequestration observed in a year in Greenland?,"CREATE TABLE CarbonSequestration (ID INT, Location TEXT, Year INT, Sequestration INT); ","SELECT MAX(Year) as Max_Year, MAX(Sequestration) as Max_Sequestration FROM CarbonSequestration WHERE Location = 'Greenland';",SELECT MAX(Sequestration) FROM CarbonSequestration WHERE Location = 'Greenland';,0 What is the artist with less than a 2 draw?,"CREATE TABLE table_name_88 (artist VARCHAR, draw INTEGER);",SELECT artist FROM table_name_88 WHERE draw < 2;,SELECT artist FROM table_name_88 WHERE draw 2;,0 What is the total number of news articles and opinion pieces published by News Source A and News Source B?,"CREATE TABLE NewsSourceA (title VARCHAR(255), type VARCHAR(50)); CREATE TABLE NewsSourceB (title VARCHAR(255), type VARCHAR(50)); ",SELECT COUNT(*) FROM (SELECT * FROM NewsSourceA UNION SELECT * FROM NewsSourceB) AS combined_sources;,SELECT COUNT(*) FROM NewsSourceA WHERE type = 'Opinion' UNION ALL SELECT COUNT(*) FROM NewsSourceB WHERE type = 'Opinion';,0 Display the names and countries of excavation sites without artifacts,"CREATE TABLE ExcavationSites (SiteID int, Name varchar(50), Country varchar(50), StartDate date); CREATE TABLE Artifacts (ArtifactID int, SiteID int, Name varchar(50), Description text, DateFound date);","SELECT es.Name, es.Country FROM ExcavationSites es LEFT JOIN Artifacts a ON es.SiteID = a.SiteID WHERE a.ArtifactID IS NULL;","SELECT ExcavationSites.Name, ExcavationSites.Country FROM ExcavationSites INNER JOIN Artifacts ON ExcavationSites.SiteID = Artifacts.SiteID WHERE Artifacts.Name IS NULL;",0 "What is the total number of publications authored by faculty members from India, ranked by the total number in descending order?","CREATE TABLE faculty_publications (faculty_id INT, faculty_name VARCHAR(255), publication_year INT, is_first_author BOOLEAN, country_of_origin VARCHAR(255)); ","SELECT faculty_name, COUNT(*) AS total_publications FROM faculty_publications WHERE country_of_origin = 'India' GROUP BY faculty_name ORDER BY total_publications DESC;",SELECT COUNT(*) FROM faculty_publications WHERE country_of_origin = 'India' ORDER BY COUNT(*) DESC;,0 What year was the player David Rose?,"CREATE TABLE table_name_97 (year INTEGER, player VARCHAR);","SELECT SUM(year) FROM table_name_97 WHERE player = ""david rose"";","SELECT SUM(year) FROM table_name_97 WHERE player = ""david rose"";",1 What is the height if ot is the position?,"CREATE TABLE table_20871703_1 (height VARCHAR, position VARCHAR);","SELECT height FROM table_20871703_1 WHERE position = ""OT"";","SELECT height FROM table_20871703_1 WHERE position = ""OT"";",1 How many legal technology grants were awarded to organizations in 'North Valley' justice district?,"CREATE TABLE LegalTechnologyGrants (ID INT, GrantID VARCHAR(20), District VARCHAR(20), Amount INT, Year INT); ",SELECT COUNT(*) FROM LegalTechnologyGrants WHERE District = 'North Valley';,SELECT COUNT(*) FROM LegalTechnologyGrants WHERE District = 'North Valley';,1 "Identify vessels that have visited the port of 'Chennai', India at least once, partitioned by year and month.","CREATE TABLE vessels (vessel_id INT, vessel_name VARCHAR(50), type VARCHAR(50)); CREATE TABLE cargo (cargo_id INT, vessel_id INT, port_id INT, weight FLOAT, handling_date DATE); CREATE TABLE ports (port_id INT, port_name VARCHAR(50), city VARCHAR(50), country VARCHAR(50));","SELECT DISTINCT v.vessel_name, YEAR(c.handling_date) AS handling_year, MONTH(c.handling_date) AS handling_month FROM cargo c JOIN vessels v ON c.vessel_id = v.vessel_id JOIN ports p ON c.port_id = p.port_id WHERE p.port_name = 'Chennai' AND p.country = 'India' GROUP BY v.vessel_name, YEAR(c.handling_date), MONTH(c.handling_date);","SELECT v.vessel_name, v.type FROM vessels v JOIN cargo c ON v.vessel_id = c.vessel_id JOIN ports p ON c.port_id = p.port_id WHERE p.port_name = 'Chennai' AND c.handling_date >= DATEADD(year, -1, GETDATE()) GROUP BY v.vessel_name, v.type;",0 Which post had the horse named chocolate candy?,"CREATE TABLE table_22517564_3 (post VARCHAR, horse_name VARCHAR);","SELECT post FROM table_22517564_3 WHERE horse_name = ""Chocolate Candy"";","SELECT post FROM table_22517564_3 WHERE horse_name = ""Chocolate Candy"";",1 The record of 11-1 used what method?,"CREATE TABLE table_name_35 (method VARCHAR, record VARCHAR);","SELECT method FROM table_name_35 WHERE record = ""11-1"";","SELECT method FROM table_name_35 WHERE record = ""11-1"";",1 "Who was the opponent before week 5 that played on September 23, 2001?","CREATE TABLE table_name_99 (opponent VARCHAR, week VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_99 WHERE week < 5 AND date = ""september 23, 2001"";","SELECT opponent FROM table_name_99 WHERE week 5 AND date = ""september 23, 2001"";",0 What is the language of the malacca fm station?,"CREATE TABLE table_1601792_3 (language VARCHAR, station VARCHAR);","SELECT language FROM table_1601792_3 WHERE station = ""Malacca FM"";","SELECT language FROM table_1601792_3 WHERE station = ""Malacca FM"";",1 "What were the results for november 25, 1973?","CREATE TABLE table_name_36 (result VARCHAR, date VARCHAR);","SELECT result FROM table_name_36 WHERE date = ""november 25, 1973"";","SELECT result FROM table_name_36 WHERE date = ""november 25, 1973"";",1 "What is Run 2, when Run 1 is 2:09.09?","CREATE TABLE table_name_84 (run_2 VARCHAR, run_1 VARCHAR);","SELECT run_2 FROM table_name_84 WHERE run_1 = ""2:09.09"";","SELECT run_2 FROM table_name_84 WHERE run_1 = ""2:09.09"";",1 How many wins does Benelli have before 1962?,"CREATE TABLE table_name_43 (wins VARCHAR, team VARCHAR, year VARCHAR);","SELECT COUNT(wins) FROM table_name_43 WHERE team = ""benelli"" AND year < 1962;","SELECT wins FROM table_name_43 WHERE team = ""benelli"" AND year 1962;",0 What is the total production quantity of dysprosium in 2018 for mines located in China or the United States?,"CREATE TABLE mines (id INT, name TEXT, location TEXT, production_quantity INT, year INT, element TEXT); ",SELECT SUM(production_quantity) FROM mines WHERE (location = 'China' OR location = 'United States') AND year = 2018 AND element = 'dysprosium';,"SELECT SUM(production_quantity) FROM mines WHERE element = 'Dysprosium' AND year = 2018 AND location IN ('China', 'United States');",0 Which cities have a higher number of COVID-19 cases than the average number of cases across all cities?,"CREATE TABLE covid_cases (id INT, city TEXT, state TEXT, cases INT); ","SELECT city, cases FROM covid_cases WHERE cases > (SELECT AVG(cases) FROM covid_cases);","SELECT city, AVG(cases) FROM covid_cases GROUP BY city HAVING AVG(cases) > (SELECT AVG(cases) FROM covid_cases);",0 What are all the operating systems for sbagen?,"CREATE TABLE table_15038373_1 (operating_systems VARCHAR, software VARCHAR);","SELECT operating_systems FROM table_15038373_1 WHERE software = ""SBaGen"";","SELECT operating_systems FROM table_15038373_1 WHERE software = ""Sbagen"";",0 "List the language preservation initiatives for Indigenous communities in North America, ordered by the initiative start date in ascending order.","CREATE TABLE Initiatives (InitiativeID INT, InitiativeName TEXT, InitiativeType TEXT, StartDate DATE, EndDate DATE); ","SELECT InitiativeName, StartDate FROM Initiatives WHERE InitiativeType = 'Language Preservation' AND Location IN ('North America', 'USA', 'Canada') ORDER BY StartDate ASC;","SELECT InitiativeName, InitiativeType, StartDate, EndDate FROM Initiatives WHERE InitiativeType = 'Language Preservation' AND Region = 'North America' ORDER BY StartDate ASC;",0 WHAT IS THE FLAPS WITH PODIUMS OF 24 AND RACES BIGGER THAN 143?,"CREATE TABLE table_name_2 (flaps INTEGER, podiums VARCHAR, races VARCHAR);",SELECT MAX(flaps) FROM table_name_2 WHERE podiums = 24 AND races > 143;,SELECT SUM(flaps) FROM table_name_2 WHERE podiums = 24 AND races > 143;,0 How many investigative journalism projects were completed in the first half of 2023?,"CREATE TABLE investigative_projects (id INT, title VARCHAR(100), category VARCHAR(50), completed_date DATE); ",SELECT COUNT(*) FROM investigative_projects WHERE MONTH(completed_date) <= 6 AND YEAR(completed_date) = 2023;,SELECT COUNT(*) FROM investigative_projects WHERE completed_date BETWEEN '2023-01-01' AND '2023-06-30';,0 What is the result when the candidates are alexander smyth (dr) 100%,"CREATE TABLE table_2668336_24 (result VARCHAR, candidates VARCHAR);","SELECT result FROM table_2668336_24 WHERE candidates = ""Alexander Smyth (DR) 100%"";","SELECT result FROM table_2668336_24 WHERE candidates = ""Alexander Smyth (DR) 100%"";",1 In what event was the technical decision (split) method used?,"CREATE TABLE table_name_8 (event VARCHAR, method VARCHAR);","SELECT event FROM table_name_8 WHERE method = ""technical decision (split)"";","SELECT event FROM table_name_8 WHERE method = ""technical decision (split)"";",1 List all ships that have visited a port in the USA.,"CREATE TABLE ships (id INT, name VARCHAR(50)); CREATE TABLE ports (id INT, name VARCHAR(50), country VARCHAR(50)); CREATE TABLE visits (ship_id INT, port_id INT, visit_date DATE); ",SELECT ships.name FROM ships INNER JOIN visits ON ships.id = visits.ship_id INNER JOIN ports ON visits.port_id = ports.id WHERE ports.country = 'USA';,SELECT ships.name FROM ships INNER JOIN visits ON ships.id = visits.ship_id INNER JOIN ports ON visits.port_id = ports.id WHERE ports.country = 'USA';,1 What is the total number of medical and food supply shipments in 'aid_shipments' table?,"CREATE TABLE aid_shipments (id INT, shipment_type VARCHAR(255), quantity INT, country VARCHAR(255)); ","SELECT SUM(CASE WHEN shipment_type IN ('medical_supplies', 'food_supplies') THEN quantity ELSE 0 END) as total_shipments FROM aid_shipments;","SELECT SUM(quantity) FROM aid_shipments WHERE shipment_type IN ('Medical', 'Food Supply');",0 How many military innovation projects were completed by each division in Q3 of 2019?,"CREATE TABLE MilitaryInnovation (Quarter VARCHAR(10), Division VARCHAR(50), Projects INT); ","SELECT Division, COUNT(Projects) FROM MilitaryInnovation WHERE Quarter = 'Q3 2019' GROUP BY Division;","SELECT Division, SUM(Projects) FROM MilitaryInnovation WHERE Quarter = 'Q3' GROUP BY Division;",0 "What is the average Grid, when Time is +45.855?","CREATE TABLE table_name_87 (grid INTEGER, time VARCHAR);","SELECT AVG(grid) FROM table_name_87 WHERE time = ""+45.855"";","SELECT AVG(grid) FROM table_name_87 WHERE time = ""+45.855"";",1 "Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id.","CREATE TABLE Students (first_name VARCHAR, middle_name VARCHAR, last_name VARCHAR, student_id VARCHAR); CREATE TABLE Student_Enrolment (student_id VARCHAR);","SELECT T1.first_name, T1.middle_name, T1.last_name, T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) = 2;","SELECT T1.first_name, T1.mid_name, T1.last_name, T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2;",0 What was Laurel's division record?,"CREATE TABLE table_name_63 (division_record VARCHAR, school VARCHAR);","SELECT division_record FROM table_name_63 WHERE school = ""laurel"";","SELECT division_record FROM table_name_63 WHERE school = ""laurel"";",1 How did the manager replaced by Wolfgang Frank depart?,"CREATE TABLE table_name_93 (manner_of_departure VARCHAR, replaced_by VARCHAR);","SELECT manner_of_departure FROM table_name_93 WHERE replaced_by = ""wolfgang frank"";","SELECT manner_of_departure FROM table_name_93 WHERE replaced_by = ""wolffrank"";",0 What was the score of the away team in the match at Princes Park?,"CREATE TABLE table_name_59 (away_team VARCHAR, venue VARCHAR);","SELECT away_team AS score FROM table_name_59 WHERE venue = ""princes park"";","SELECT away_team AS score FROM table_name_59 WHERE venue = ""princes park"";",1 What was the total cost of rural infrastructure projects in Pakistan in 2021?,"CREATE TABLE rural_infrastructure (id INT, country VARCHAR(255), project VARCHAR(255), cost FLOAT, year INT); ",SELECT SUM(cost) FROM rural_infrastructure WHERE country = 'Pakistan' AND year = 2021;,SELECT SUM(cost) FROM rural_infrastructure WHERE country = 'Pakistan' AND year = 2021;,1 How many Big 12 teams made it to the Final Four?,"CREATE TABLE table_name_1 (final_four VARCHAR, conference VARCHAR);","SELECT final_four FROM table_name_1 WHERE conference = ""big 12"";","SELECT COUNT(final_four) FROM table_name_1 WHERE conference = ""big 12"";",0 Which countries have the lowest average sustainability scores for fabrics and what are their corresponding manufacturing costs?,"CREATE TABLE fabrics (id INT PRIMARY KEY, name VARCHAR(255), country VARCHAR(255), sustainability_score INT); CREATE TABLE manufacturing (id INT PRIMARY KEY, date DATE, fabric_id INT, cost INT); ","SELECT f.country, AVG(f.sustainability_score) AS avg_sustainability_score, m.manufacturing_cost FROM fabrics f CROSS JOIN (SELECT '2022-01-01' AS date, SUM(cost) AS manufacturing_cost FROM manufacturing WHERE fabric_id = f.id) m GROUP BY f.country HAVING AVG(f.sustainability_score) = (SELECT MIN(avg_sustainability_score) FROM (SELECT AVG(sustainability_score) AS avg_sustainability_score FROM fabrics GROUP BY country) t);","SELECT f.country, AVG(f.sustainability_score) as avg_sustainability_score, m.cost FROM fabrics f INNER JOIN manufacturing m ON f.id = m.fabric_id GROUP BY f.country ORDER BY avg_sustainability_score DESC;",0 "What is the sum of the final for finland, who placed greater than 2 and had an all around larger than 18.9?","CREATE TABLE table_name_26 (final INTEGER, all_around VARCHAR, place VARCHAR, nation VARCHAR);","SELECT SUM(final) FROM table_name_26 WHERE place > 2 AND nation = ""finland"" AND all_around > 18.9;","SELECT SUM(final) FROM table_name_26 WHERE place > 2 AND nation = ""finland"" AND all_around > 18.9;",1 Update the 'status' field for a habitat preservation project in the 'habitat' table,"CREATE TABLE habitat (id INT PRIMARY KEY, name VARCHAR(50), location VARCHAR(50), size FLOAT, status VARCHAR(50));",UPDATE habitat SET status = 'Completed' WHERE name = 'Galapagos Islands Protection';,UPDATE habitat SET status = 'Project' WHERE name = 'Habitat Preservation';,0 What is the percentage of fans who prefer soccer over other sports in South America?,"CREATE TABLE fan_preferences (id INT, name VARCHAR(50), age INT, country VARCHAR(50), sport_preference VARCHAR(50));","SELECT (COUNT(*) FILTER (WHERE sport_preference = 'soccer')) * 100.0 / COUNT(*) FROM fan_preferences WHERE country IN ('Argentina', 'Brazil', 'Colombia', 'Chile', 'Peru');",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM fan_preferences WHERE country = 'South America')) AS percentage FROM fan_preferences WHERE sport_preference = 'Soccer';,0 Delete the membership of user with ID 001,"CREATE TABLE memberships (id INT, user_id INT); ",DELETE FROM memberships WHERE user_id = 1;,DELETE FROM memberships WHERE user_id = 001;,0 what year was cryptogramophon released,"CREATE TABLE table_name_11 (year VARCHAR, label VARCHAR);","SELECT year FROM table_name_11 WHERE label = ""cryptogramophon"";","SELECT year FROM table_name_11 WHERE label = ""cryptogramophon"";",1 "How many reported theft incidents were there in the state of New York and California in the year 2019, combined?","CREATE TABLE crime_incidents (id INT, incident_type VARCHAR(255), state VARCHAR(255), report_date DATE); ","SELECT incident_type, COUNT(*) FROM crime_incidents WHERE (state = 'New York' OR state = 'California') AND incident_type = 'Theft' AND YEAR(report_date) = 2019;","SELECT COUNT(*) FROM crime_incidents WHERE state IN ('New York', 'California') AND report_date BETWEEN '2019-01-01' AND '2019-12-31';",0 Get veteran employment stats for Q1 2022 where the unemployment rate is above 5%,"CREATE TABLE veteran_employment (quarter VARCHAR(10), total_veterans INT, unemployed_veterans INT);",SELECT * FROM veteran_employment WHERE quarter = 'Q1 2022' AND unemployed_veterans/total_veterans > 0.05;,"SELECT quarter, total_veterans, unemployed_veterans FROM veteran_employment WHERE quarter = 'Q1 2022' AND unemployed_veterans > 5%;",0 List the military technologies with their corresponding intelligence operations.,"CREATE TABLE military_tech (tech VARCHAR(255)); CREATE TABLE intel_ops (op VARCHAR(255)); CREATE VIEW tech_ops AS SELECT mt.tech, io.op FROM military_tech mt CROSS JOIN intel_ops io;","SELECT t.tech, t.op FROM tech_ops t;","SELECT mt.tech, io.op FROM tech_ops;",0 What is the rank for less than 6 plays?,"CREATE TABLE table_name_47 (rank INTEGER, played INTEGER);",SELECT SUM(rank) FROM table_name_47 WHERE played < 6;,SELECT SUM(rank) FROM table_name_47 WHERE played 6;,0 What was the rank (week) for episode number 34?,"CREATE TABLE table_26199130_1 (rank__week_ VARCHAR, no VARCHAR);",SELECT rank__week_ FROM table_26199130_1 WHERE no = 34;,SELECT rank__week_ FROM table_26199130_1 WHERE no = 34;,1 What is the local economic impact of tourism in London in 2020?,"CREATE TABLE tourism_impact (city VARCHAR(100), year INT, local_economic_impact INT); ",SELECT local_economic_impact FROM tourism_impact WHERE city = 'London' AND year = 2020;,SELECT local_economic_impact FROM tourism_impact WHERE city = 'London' AND year = 2020;,1 Tell me the sum of Gross Tonnage for isis ship on date commisioned less than 1842,"CREATE TABLE table_name_94 (gross_tonnage INTEGER, ship VARCHAR, date_commissioned VARCHAR);","SELECT SUM(gross_tonnage) FROM table_name_94 WHERE ship = ""isis"" AND date_commissioned < 1842;","SELECT SUM(gross_tonnage) FROM table_name_94 WHERE ship = ""isis"" AND date_commissioned 1842;",0 "Who are the investors that have invested more than $20,000 in the 'Environmental Sustainability' field?","CREATE TABLE if not exists investors (id INT PRIMARY KEY, name TEXT, location TEXT, investment_goal TEXT); CREATE TABLE if not exists investments (id INT PRIMARY KEY, investor_id INT, nonprofit_id INT, amount DECIMAL(10,2), investment_date DATE); ",SELECT i.name FROM investors i JOIN investments investment ON i.id = investment.investor_id WHERE investment.amount > 20000 AND i.investment_goal = 'Environmental Sustainability';,SELECT i.name FROM investors i JOIN investments i ON i.id = i.investor_id WHERE i.investment_goal = 'Environmental Sustainability' AND i.amount > 20000;,0 "Find the top 5 goal scorers in the 2022 UEFA Champions League group stage, including their team names.","CREATE TABLE ucl_players (player_id INT, player_name VARCHAR(255), team_id INT); CREATE TABLE ucl_matches (match_id INT, home_team_id INT, away_team_id INT, goals_home INT, goals_away INT); ","SELECT p.player_name, t.team_name, SUM(m.goals_home + m.goals_away) AS total_goals FROM ucl_players p JOIN (SELECT home_team_id AS team_id, SUM(goals_home) AS goals FROM ucl_matches GROUP BY home_team_id UNION ALL SELECT away_team_id, SUM(goals_away) FROM ucl_matches GROUP BY away_team_id) t ON p.team_id = t.team_id JOIN ucl_matches m ON p.team_id IN (m.home_team_id, m.away_team_id) WHERE m.match_id IN (SELECT match_id FROM ucl_matches WHERE (home_team_id = p.team_id OR away_team_id = p.team_id) AND match_id <= 6) GROUP BY p.player_id, t.team_name ORDER BY total_goals DESC LIMIT 5;","SELECT ucl_players.player_name, ucl_players.team_id, ucl_players.player_name FROM ucl_players INNER JOIN ucl_matches ON ucl_players.team_id = ucl_matches.home_team_id INNER JOIN ucl_matches ON ucl_players.team_id = ucl_matches.away_team_id GROUP BY ucl_players.player_name ORDER BY goals_scoring DESC LIMIT 5;",0 What is the number of marine protected areas in the Atlantic Ocean and Indian Ocean?,"CREATE TABLE marine_protected_areas (name TEXT, avg_depth REAL, ocean TEXT); ","SELECT ocean, COUNT(*) FROM marine_protected_areas WHERE ocean IN ('Atlantic', 'Indian') GROUP BY ocean;","SELECT COUNT(*) FROM marine_protected_areas WHERE ocean IN ('Atlantic Ocean', 'Indian Ocean');",0 "Which indigenous languages in the African culture domain have more than 100,000 speakers and are in danger of extinction?","CREATE TABLE Languages (LanguageID int, LanguageName varchar(255), SpeakersCount int, CultureDomain varchar(255), Endangered int); ","SELECT LanguageName, SpeakersCount FROM Languages WHERE CultureDomain = 'African' AND Endangered = 1 AND SpeakersCount > 100000;",SELECT LanguageName FROM Languages WHERE CultureDomain = 'African' AND SpeakersCount > 100000 AND Endangered = 1;,0 How many artworks were created by female artists in each country?,"CREATE TABLE artworks (id INT, name TEXT, artist TEXT, country TEXT); ","SELECT country, COUNT(*) as num_artworks FROM artworks WHERE artist LIKE '%female%' GROUP BY country;","SELECT country, COUNT(*) FROM artworks WHERE artist LIKE '%Female%' GROUP BY country;",0 What are the allergies and their types that the student with first name Lisa has? And order the result by name of allergies.,"CREATE TABLE Has_allergy (Allergy VARCHAR, StuID VARCHAR); CREATE TABLE Student (StuID VARCHAR, Fname VARCHAR); CREATE TABLE Allergy_type (Allergy VARCHAR, AllergyType VARCHAR);","SELECT T1.Allergy, T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = ""Lisa"" ORDER BY T1.Allergy;","SELECT T1.Allergy, T1.AllergyType FROM Has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID JOIN Allergy_type AS T3 ON T1.StuID = T3.StuID WHERE T3.Fname = ""Lisa"" ORDER BY T3.Allergy;",0 How many autonomous vehicles were sold in the 'sales_data' table by manufacturer?,"CREATE TABLE sales_data (id INT PRIMARY KEY, manufacturer VARCHAR(50), model VARCHAR(50), year INT, is_autonomous BOOLEAN, quantity INT);","SELECT manufacturer, COUNT(*) as total_sales FROM sales_data WHERE is_autonomous = TRUE GROUP BY manufacturer;","SELECT manufacturer, SUM(quantity) FROM sales_data WHERE is_autonomous = true GROUP BY manufacturer;",0 What is the total number of tourists who visited New Zealand in 2020 and 2021?,"CREATE TABLE visitor_stats (destination VARCHAR(20), visit_year INT); ",SELECT SUM(visits) FROM (SELECT COUNT(*) AS visits FROM visitor_stats WHERE destination = 'New Zealand' AND visit_year = 2020 UNION ALL SELECT COUNT(*) FROM visitor_stats WHERE destination = 'New Zealand' AND visit_year = 2021) AS subquery;,"SELECT COUNT(*) FROM visitor_stats WHERE destination = 'New Zealand' AND visit_year IN (2020, 2021);",0 "Before round 7, what is the greatest Pick # for a player that plays defensive tackle?","CREATE TABLE table_name_5 (pick__number INTEGER, position VARCHAR, round VARCHAR);","SELECT MAX(pick__number) FROM table_name_5 WHERE position = ""defensive tackle"" AND round < 7;","SELECT MAX(pick__number) FROM table_name_5 WHERE position = ""defensive tackle"" AND round 7;",0 List all information regarding the basketball match.,CREATE TABLE basketball_match (Id VARCHAR);,SELECT * FROM basketball_match;,SELECT * FROM basketball_match;,1 List the top 5 most read news articles in descending order by views.,"CREATE TABLE articles (id INT, title VARCHAR(100), content TEXT, views INT);","SELECT title FROM (SELECT title, ROW_NUMBER() OVER (ORDER BY views DESC) as rn FROM articles) tmp WHERE rn <= 5;","SELECT title, views FROM articles ORDER BY views DESC LIMIT 5;",0 What is the number of aquaculture farms in each country in the AquacultureFarms table that do not have a sustainable seafood certification in the SeafoodCertifications table?,"CREATE TABLE AquacultureFarms (Country VARCHAR(50), FarmName VARCHAR(50)); CREATE TABLE SeafoodCertifications (Country VARCHAR(50), Certification BOOLEAN); ","SELECT AquacultureFarms.Country, COUNT(AquacultureFarms.Country) FROM AquacultureFarms LEFT JOIN SeafoodCertifications ON AquacultureFarms.Country = SeafoodCertifications.Country WHERE SeafoodCertifications.Certification IS NULL GROUP BY AquacultureFarms.Country;","SELECT af.Country, COUNT(af.FarmName) FROM AquacultureFarms af INNER JOIN SeafoodCertifications sc ON af.Country = sc.Country WHERE sc.Certification = FALSE GROUP BY af.Country;",0 What is the total of 2013 with 6th?,CREATE TABLE table_name_87 (total INTEGER);,"SELECT MAX(total) FROM table_name_87 WHERE 2013 = ""6th"";","SELECT SUM(total) FROM table_name_87 WHERE 2013 = ""6th"";",0 What is the percentage of security incidents in the last year that involved a user from the IT department?,"CREATE TABLE security_incidents (incident_id INT, incident_date DATE, user_id INT);CREATE TABLE users (user_id INT, user_name VARCHAR(255), department VARCHAR(255));","SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM security_incidents WHERE incident_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR))) as percentage FROM security_incidents si JOIN users u ON si.user_id = u.user_id WHERE u.department = 'IT' AND incident_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM security_incidents WHERE incident_date >= DATEADD(year, -1, GETDATE()))) AS percentage FROM security_incidents WHERE incident_date >= DATEADD(year, -1, GETDATE()) AND user_id IN (SELECT user_id FROM users WHERE department = 'IT');",0 "what is the television order of the episode directed by ben jones, written by j. m. dematteis and originally aired on february6,2009","CREATE TABLE table_20360535_2 (television_order VARCHAR, original_air_date VARCHAR, directed_by VARCHAR, written_by VARCHAR);","SELECT television_order FROM table_20360535_2 WHERE directed_by = ""Ben Jones"" AND written_by = ""J. M. DeMatteis"" AND original_air_date = ""February6,2009"";","SELECT television_order FROM table_20360535_2 WHERE directed_by = ""Ben Jones"" AND written_by = ""J. M. Dematteis"" AND original_air_date = ""February6,2009"";",0 What is Loris Capirossi's time?,"CREATE TABLE table_name_30 (time VARCHAR, rider VARCHAR);","SELECT time FROM table_name_30 WHERE rider = ""loris capirossi"";","SELECT time FROM table_name_30 WHERE rider = ""loris capirossi"";",1 How many employees work in mining operations in Australia and what are their roles?,"CREATE TABLE australian_states (id INT, name VARCHAR(50)); CREATE TABLE mining_operations (id INT, state_id INT, region VARCHAR(20)); CREATE TABLE employees (id INT, operation_id INT, role VARCHAR(20)); ","SELECT e.role, COUNT(DISTINCT e.id) as total_employees FROM employees e INNER JOIN mining_operations m ON e.operation_id = m.id INNER JOIN australian_states s ON m.state_id = s.id WHERE s.name IN ('Queensland', 'New South Wales');","SELECT e.role, COUNT(e.id) FROM employees e JOIN mining_operations m ON e.operation_id = m.state_id JOIN australian_states s ON e.id = s.id JOIN mining_operations m ON e.operation_id = m.state_id WHERE s.name = 'Australia' GROUP BY e.role;",0 "Show the unique species of trees in the 'sustainable_forestry' table, in alphabetical order.","CREATE TABLE sustainable_forestry (id INT, location VARCHAR(255), species VARCHAR(255)); ",SELECT DISTINCT species FROM sustainable_forestry ORDER BY species ASC;,SELECT DISTINCT species FROM sustainable_forestry ORDER BY species;,0 "Which Joined has an Institution of abraham baldwin agricultural college, and an Enrollment smaller than 3,284?","CREATE TABLE table_name_96 (joined INTEGER, institution VARCHAR, enrollment VARCHAR);","SELECT MAX(joined) FROM table_name_96 WHERE institution = ""abraham baldwin agricultural college"" AND enrollment < 3 OFFSET 284;","SELECT SUM(joined) FROM table_name_96 WHERE institution = ""abraham baldwin agricultural college"" AND enrollment 3 OFFSET 284;",0 What is the field of the game on July 22?,"CREATE TABLE table_name_7 (field VARCHAR, date VARCHAR);","SELECT field FROM table_name_7 WHERE date = ""july 22"";","SELECT field FROM table_name_7 WHERE date = ""july 22"";",1 What year for the legatum institute?,"CREATE TABLE table_name_79 (year VARCHAR, organization VARCHAR);","SELECT year FROM table_name_79 WHERE organization = ""legatum institute"";","SELECT year FROM table_name_79 WHERE organization = ""relidum institute"";",0 "What Release date has a Version of 1.0, a Category of utilities, a Developer of microsoft, and a Title of msn money?","CREATE TABLE table_name_36 (release_date VARCHAR, title VARCHAR, developer VARCHAR, version VARCHAR, category VARCHAR);","SELECT release_date FROM table_name_36 WHERE version = ""1.0"" AND category = ""utilities"" AND developer = ""microsoft"" AND title = ""msn money"";","SELECT release_date FROM table_name_36 WHERE version = ""1.0"" AND category = ""utilities"" AND developer = ""microsoft"" AND title = ""msn money"";",1 Name the date for turco decision and home of st. louis,"CREATE TABLE table_name_5 (date VARCHAR, decision VARCHAR, home VARCHAR);","SELECT date FROM table_name_5 WHERE decision = ""turco"" AND home = ""st. louis"";","SELECT date FROM table_name_5 WHERE decision = ""turko"" AND home = ""st. louis"";",0 What are the highest point in latvia,"CREATE TABLE table_24285393_1 (highest_point VARCHAR, country_or_region VARCHAR);","SELECT highest_point FROM table_24285393_1 WHERE country_or_region = ""Latvia"";","SELECT highest_point FROM table_24285393_1 WHERE country_or_region = ""Latvia"";",1 What is the average water temperature in farms that grow sturgeon?,"CREATE TABLE farm_data (id INT, farm_name VARCHAR(50), species VARCHAR(50), water_temperature FLOAT); ",SELECT AVG(water_temperature) as avg_temp FROM farm_data WHERE species = 'Sturgeon';,SELECT AVG(water_temperature) FROM farm_data WHERE species = 'Sturgeon';,0 Who had highest rebounds during game on March 12?,"CREATE TABLE table_27744976_10 (high_rebounds VARCHAR, date VARCHAR);","SELECT high_rebounds FROM table_27744976_10 WHERE date = ""March 12"";","SELECT high_rebounds FROM table_27744976_10 WHERE date = ""March 12"";",1 What is the name and interests of all audience members aged 40 or older in the 'audience' table?,"CREATE TABLE audience (id INT, gender VARCHAR(10), age INT, location VARCHAR(50), interests VARCHAR(100)); ","SELECT name, interests FROM audience WHERE age >= 40;","SELECT name, interests FROM audience WHERE age >= 40;",1 What is the total budget allocated for habitat preservation in 'Africa'?,"CREATE TABLE Habitat_Preservation (PreservationID INT, Habitat VARCHAR(20), Budget DECIMAL(10, 2)); ",SELECT SUM(Budget) FROM Habitat_Preservation WHERE Habitat = 'Africa';,SELECT SUM(Budget) FROM Habitat_Preservation WHERE Habitat = 'Africa';,1 "If the till aligarh is 150, what the mac till mathura?","CREATE TABLE table_19787093_1 (till_mathura INTEGER, till_aligarh VARCHAR);",SELECT MAX(till_mathura) FROM table_19787093_1 WHERE till_aligarh = 150;,SELECT MAX(till_mathura) FROM table_19787093_1 WHERE till_aligarh = 150;,1 What home team has a record of 4-3?,"CREATE TABLE table_name_7 (home VARCHAR, record VARCHAR);","SELECT home FROM table_name_7 WHERE record = ""4-3"";","SELECT home FROM table_name_7 WHERE record = ""4-3"";",1 What was the total production of surface mining operations in 2021?,"CREATE TABLE MiningOperations (OperationID INT, OperationType VARCHAR(50), StartDate DATE, EndDate DATE, TotalProduction DECIMAL(10,2)); ",SELECT SUM(TotalProduction) FROM MiningOperations WHERE OperationType = 'Surface' AND YEAR(StartDate) = 2021;,SELECT SUM(TotalProduction) FROM MiningOperations WHERE OperationType = 'Surface' AND YEAR(StartDate) = 2021;,1 What is the maximum number of community health workers serving a single zip code who identify as disabled?,"CREATE TABLE community_health_workers (worker_id INT, zip_code VARCHAR(10), disability_identification VARCHAR(10)); ","SELECT zip_code, MAX(cnt) as max_workers FROM (SELECT zip_code, disability_identification, COUNT(*) as cnt FROM community_health_workers GROUP BY zip_code, disability_identification) as subquery WHERE disability_identification = 'Yes' GROUP BY zip_code;","SELECT zip_code, MAX(COUNT(*)) FROM community_health_workers WHERE disability_identification = 'Disabled' GROUP BY zip_code;",0 What name has gen et sp nov as the novelty?,"CREATE TABLE table_name_56 (name VARCHAR, novelty VARCHAR);","SELECT name FROM table_name_56 WHERE novelty = ""gen et sp nov"";","SELECT name FROM table_name_56 WHERE novelty = ""gen et sp nov"";",1 "Who has the title and rank 14, and a worldwide gross of $202,292,902?","CREATE TABLE table_name_83 (title VARCHAR, rank VARCHAR, worldwide_gross VARCHAR);","SELECT title FROM table_name_83 WHERE rank > 14 AND worldwide_gross = ""$202,292,902"";","SELECT title FROM table_name_83 WHERE rank = ""14"" AND worldwide_gross = ""$202,292,902"";",0 List all energy efficiency programs in the 'carbon_pricing' schema,"CREATE SCHEMA carbon_pricing; CREATE TABLE efficiency_programs (program_id INT, program_name VARCHAR(50)); ",SELECT program_name FROM carbon_pricing.efficiency_programs;,SELECT * FROM carbon_pricing.efficiency_programs;,0 What is the average data usage for each mobile plan in GB?,"CREATE TABLE mobile_plans (plan_id INT, plan_name VARCHAR(255), data_limit DECIMAL(10,2)); ","SELECT plan_name, data_limit/1024 AS data_usage_gb FROM mobile_plans;","SELECT plan_name, AVG(data_limit) as avg_data_usage FROM mobile_plans GROUP BY plan_name;",0 "What is KK -1 if KK -3 is 1,100?","CREATE TABLE table_name_79 (kk___1 VARCHAR, kk___3 VARCHAR);","SELECT kk___1 FROM table_name_79 WHERE kk___3 = ""1,100"";","SELECT kk___1 FROM table_name_79 WHERE kk___3 = ""1,100"";",1 Which tournament has the highest number of cuts while also having 4 top 25 appearances?,"CREATE TABLE table_name_54 (cuts_made INTEGER, top_25 VARCHAR);",SELECT MAX(cuts_made) FROM table_name_54 WHERE top_25 = 4;,SELECT MAX(cuts_made) FROM table_name_54 WHERE top_25 = 4;,1 Identify the number of water conservation initiatives in the 'conservation_initiatives' table,"CREATE TABLE conservation_initiatives (initiative_id INT, initiative_name VARCHAR(100), budget FLOAT);",SELECT COUNT(*) as num_conservation_initiatives FROM conservation_initiatives;,SELECT COUNT(*) FROM conservation_initiatives;,0 What is the total billing amount for cases handled by attorney John Doe?,"CREATE TABLE attorneys (attorney_id INT, name VARCHAR(50)); CREATE TABLE cases (case_id INT, attorney_id INT, billing_amount DECIMAL(10,2)); ",SELECT SUM(billing_amount) FROM cases WHERE attorney_id IN (SELECT attorney_id FROM attorneys WHERE name = 'John Doe');,SELECT SUM(billing_amount) FROM cases JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.name = 'John Doe';,0 Name the replaced by for august 9 ,"CREATE TABLE table_25361570_2 (replaced_by VARCHAR, date_of_vacancy VARCHAR, date_of_appointment VARCHAR);","SELECT replaced_by FROM table_25361570_2 WHERE date_of_vacancy = ""August 9"" AND date_of_appointment = ""August 9"";","SELECT replaced_by FROM table_25361570_2 WHERE date_of_vacancy = ""August 9"" AND date_of_appointment = ""August 9"";",1 What is the average depth of all deep-sea expeditions?,"CREATE TABLE deep_sea_expeditions (expedition_name VARCHAR(255), depth FLOAT);",SELECT AVG(depth) FROM deep_sea_expeditions;,SELECT AVG(depth) FROM deep_sea_expeditions;,1 "Delete the funding record for ""EcoInnovations"" with id 3","CREATE TABLE funding (id INT PRIMARY KEY AUTO_INCREMENT, company_id INT, amount FLOAT, funding_date DATE);",DELETE FROM funding WHERE id = 3 AND company_id IN (SELECT id FROM company WHERE name = 'EcoInnovations');,DELETE FROM funding WHERE company_id = 3;,0 How many millions of total viewers watched series #57?,"CREATE TABLE table_12419515_4 (total_viewers__in_millions_ VARCHAR, series__number VARCHAR);",SELECT COUNT(total_viewers__in_millions_) FROM table_12419515_4 WHERE series__number = 57;,SELECT total_viewers__in_millions_ FROM table_12419515_4 WHERE series__number = 57;,0 Create a table for storing climate adaptation projects and insert records for coastal resilience projects,"CREATE TABLE climate_adaptation_projects (project_name VARCHAR(255), type VARCHAR(100), cost INT, location VARCHAR(100));","INSERT INTO climate_adaptation_projects (project_name, type, cost, location) VALUES ('Mangrove Restoration A', 'Mangrove', 2000000, 'Bangladesh'), ('Sea Wall Construction B', 'Sea Wall', 5000000, 'India'), ('Beach Nourishment C', 'Beach Nourishment', 3000000, 'Sri Lanka'), ('Oyster Reef Restoration D', 'Oyster Reef', 1000000, 'United States'), ('Coral Reef Restoration E', 'Coral Reef', 4000000, 'Australia');","CREATE TABLE climate_adaptation_projects (project_name VARCHAR(255), type VARCHAR(100), cost INT, location VARCHAR(100));",0 On what Date was the Venue Los Angeles?,"CREATE TABLE table_name_90 (date VARCHAR, venue VARCHAR);","SELECT date FROM table_name_90 WHERE venue = ""los angeles"";","SELECT date FROM table_name_90 WHERE venue = ""los angeles"";",1 What is the average energy efficiency rating for residential buildings in Brazil?,"CREATE TABLE brazil_energy_efficiency (state VARCHAR(50), building_type VARCHAR(50), energy_efficiency_rating FLOAT); ",SELECT AVG(energy_efficiency_rating) FROM brazil_energy_efficiency WHERE building_type = 'Residential';,SELECT AVG(energy_efficiency_rating) FROM brazil_energy_efficiency WHERE state = 'Brazil' AND building_type = 'Residential';,0 "For what current streak is KU, 8-2 under last 10 meetings?","CREATE TABLE table_name_28 (current_streak VARCHAR, last_10_meetings VARCHAR);","SELECT current_streak FROM table_name_28 WHERE last_10_meetings = ""ku, 8-2"";","SELECT current_streak FROM table_name_28 WHERE last_10_meetings = ""8-2"";",0 what's the points with driver  mark martin,"CREATE TABLE table_10160447_1 (points VARCHAR, driver VARCHAR);","SELECT points FROM table_10160447_1 WHERE driver = ""Mark Martin"";","SELECT points FROM table_10160447_1 WHERE driver = ""Mark Martin"";",1 How many episodes were viewed by 1.29 million people?,"CREATE TABLE table_23918997_1 (no VARCHAR, us_viewers__million_ VARCHAR);","SELECT COUNT(no) FROM table_23918997_1 WHERE us_viewers__million_ = ""1.29"";","SELECT COUNT(no) FROM table_23918997_1 WHERE us_viewers__million_ = ""1.99"";",0 How many deep-sea expeditions were conducted in the Mediterranean Sea between 2015 and 2020?,"CREATE TABLE deep_sea_expeditions (year INT, region VARCHAR(255), number_of_expeditions INT);",SELECT number_of_expeditions FROM deep_sea_expeditions WHERE region = 'Mediterranean Sea' AND year BETWEEN 2015 AND 2020;,SELECT SUM(number_of_expeditions) FROM deep_sea_expeditions WHERE region = 'Mediterranean Sea' AND year BETWEEN 2015 AND 2020;,0 Which date did South Melbourne play as the away team?,"CREATE TABLE table_name_74 (date VARCHAR, away_team VARCHAR);","SELECT date FROM table_name_74 WHERE away_team = ""south melbourne"";","SELECT date FROM table_name_74 WHERE away_team = ""south melbourne"";",1 Get the average population of 'tiger' and 'lion' species in the 'animal_population' table,"CREATE TABLE animal_population (species VARCHAR(10), population INT); ","SELECT AVG(population) FROM animal_population WHERE species IN ('tiger', 'lion');","SELECT AVG(population) FROM animal_population WHERE species IN ('tiger', 'lion');",1 How many documents are using the template with type code 'PPT'?,"CREATE TABLE Templates (Template_ID VARCHAR, Template_Type_Code VARCHAR); CREATE TABLE Documents (Template_ID VARCHAR);",SELECT COUNT(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT';,SELECT COUNT(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT';,1 How many employees work in the 'Diversity and Inclusion' department in the 'human_resources' table?,"CREATE TABLE human_resources (id INT, name VARCHAR(50), role VARCHAR(50), department VARCHAR(50)); ",SELECT COUNT(*) FROM human_resources WHERE department = 'Diversity and Inclusion';,SELECT COUNT(*) FROM human_resources WHERE department = 'Diversity and Inclusion';,1 Which fair trade organizations are involved in shoe production in Portugal?,"CREATE TABLE Shoes (id INT, name VARCHAR(255), style VARCHAR(255), price DECIMAL(10, 2), country VARCHAR(255), fair_trade_org VARCHAR(255)); ",SELECT DISTINCT fair_trade_org FROM Shoes WHERE country = 'Portugal' AND fair_trade_org IS NOT NULL,SELECT fair_trade_org FROM Shoes WHERE country = 'Portugal';,0 What is the percentage of financially capable individuals in each region of the country?,"CREATE TABLE financial_capability_regions (region TEXT, capable BOOLEAN); ","SELECT region, (COUNT(*) FILTER (WHERE capable = TRUE)) * 100.0 / COUNT(*) AS percentage FROM financial_capability_regions GROUP BY region;","SELECT region, (COUNT(*) FILTER (WHERE capable = TRUE)) * 100.0 / COUNT(*) FROM financial_capability_regions GROUP BY region;",0 "Name the republican steve sauerberg where dates administered september 15-september 18, 2008","CREATE TABLE table_16751596_2 (republican VARCHAR, dates_administered VARCHAR);","SELECT republican AS :_steve_sauerberg FROM table_16751596_2 WHERE dates_administered = ""September 15-September 18, 2008"";","SELECT republican FROM table_16751596_2 WHERE dates_administered = ""September 15-September 18, 2008"";",0 In what tournament was the winning score 68-67-65-66=266?,"CREATE TABLE table_1615980_4 (tournament VARCHAR, winning_score VARCHAR);",SELECT tournament FROM table_1615980_4 WHERE winning_score = 68 - 67 - 65 - 66 = 266;,SELECT tournament FROM table_1615980_4 WHERE winning_score = 68 - 67 - 65 - 66 = 266;,1 Which Tournament has a Semi finalists of monica seles sandrine testud?,"CREATE TABLE table_name_76 (tournament VARCHAR, semi_finalists VARCHAR);","SELECT tournament FROM table_name_76 WHERE semi_finalists = ""monica seles sandrine testud"";","SELECT tournament FROM table_name_76 WHERE semi_finalists = ""monica seles sandrine testud"";",1 "Identify the total count of cases and total billable hours for attorneys in the 'billing' and 'cases' tables, grouped by attorney disability status.","CREATE TABLE attorney_disability (attorney_id INT, disability_status VARCHAR(20)); CREATE TABLE billing (attorney_id INT, hours DECIMAL(5,2)); CREATE TABLE cases (case_id INT, attorney_id INT);","SELECT d.disability_status, COUNT(c.attorney_id) AS total_cases, SUM(b.hours) AS total_hours FROM attorney_disability d JOIN billing b ON d.attorney_id = b.attorney_id JOIN cases c ON d.attorney_id = c.attorney_id GROUP BY d.disability_status;","SELECT ad.disability_status, COUNT(c.case_id) as total_cases, SUM(b.hours) as total_hours FROM attorney_disability ad JOIN billing b ON ad.attorney_id = b.attorney_id JOIN cases c ON ad.attorney_id = c.attorney_id GROUP BY ad.disability_status;",0 "When the Crowd is larger than 23,327, what Home team is playing?","CREATE TABLE table_name_65 (home_team VARCHAR, crowd INTEGER);",SELECT home_team FROM table_name_65 WHERE crowd > 23 OFFSET 327;,SELECT home_team FROM table_name_65 WHERE crowd > 23 OFFSET 327;,1 How many broadband subscribers does the company have in 'Suburban' areas?,"CREATE TABLE subscribers (id INT, subscriber_type VARCHAR(20), location VARCHAR(20)); ",SELECT COUNT(*) FROM subscribers WHERE subscriber_type = 'Broadband' AND location = 'Suburban';,SELECT COUNT(*) FROM subscribers WHERE subscriber_type = 'Broadband' AND location = 'Suburban';,1 How many fans attended TeamB's away games?,"CREATE TABLE attendance (id INT, team VARCHAR(50), location VARCHAR(50), fans INT); ",SELECT SUM(fans) FROM attendance WHERE team = 'TeamB' AND location = 'Away';,SELECT SUM(fans) FROM attendance WHERE team = 'TeamB' AND location = 'away';,0 Find the total budget for each department in the year 2021.,"CREATE TABLE Budget (id INT, department TEXT, year INT, amount INT); ","SELECT department, SUM(amount) FROM Budget WHERE year = 2021 GROUP BY department;","SELECT department, SUM(amount) FROM Budget WHERE year = 2021 GROUP BY department;",1 What is gunfire victim Maria Cecilia Rosa with 6 years of Tenure Date of Death?,"CREATE TABLE table_name_47 (date_of_death VARCHAR, name VARCHAR, cause_of_death VARCHAR, tenure VARCHAR);","SELECT date_of_death FROM table_name_47 WHERE cause_of_death = ""gunfire"" AND tenure = ""6 years"" AND name = ""maria cecilia rosa"";","SELECT date_of_death FROM table_name_47 WHERE cause_of_death = ""gunfire"" AND tenure = ""6 years"" AND name = ""maria cecilia rosa"";",1 What is the total number of startups founded by individuals who identify as LGBTQ+?,"CREATE TABLE companies (id INT, name TEXT, founding_year INT, founder_identifies_as_lgbtq BOOLEAN); ",SELECT COUNT(*) FROM companies WHERE founder_identifies_as_lgbtq = true;,SELECT COUNT(*) FROM companies WHERE founder_identifies_as_lgbtq = true;,1 "What is the maximum productivity for each mine, by mineral type, in 2019?","CREATE TABLE MineProductivity (mine_name VARCHAR(50), country VARCHAR(50), mineral VARCHAR(50), productivity INT); ","SELECT context.mineral, MAX(context.productivity) as max_productivity FROM context WHERE context.year = 2019 GROUP BY context.mineral;","SELECT mine_name, mineral, MAX(productivity) as max_productivity FROM MineProductivity WHERE year = 2019 GROUP BY mine_name, mineral;",0 What position did the kr team player play?,"CREATE TABLE table_name_15 (position VARCHAR, team VARCHAR);","SELECT position FROM table_name_15 WHERE team = ""kr"";","SELECT position FROM table_name_15 WHERE team = ""kr"";",1 What is the maximum safety score of vessels that have a safety score?,"CREATE TABLE VesselSafety (VesselID INT, SafetyScore DECIMAL(3,1)); ",SELECT MAX(SafetyScore) FROM VesselSafety WHERE SafetyScore IS NOT NULL;,SELECT MAX(SafetyScore) FROM VesselSafety;,0 Find the smart contract with the highest number of transactions for each decentralized application in descending order.,"CREATE TABLE Transactions (TransactionID int, ContractAddress varchar(50), DAppName varchar(50)); CREATE TABLE SmartContracts (ContractAddress varchar(50), DAppName varchar(50), Transactions int); ","SELECT DAppName, ContractAddress, MAX(Transactions) as MaxTransactions FROM SmartContracts GROUP BY DAppName ORDER BY MaxTransactions DESC;","SELECT DAppName, ContractAddress, COUNT(*) as TotalTransactions FROM SmartContracts GROUP BY DAppName ORDER BY TotalTransactions DESC;",0 Show all customer ids and the number of cards owned by each customer.,CREATE TABLE Customers_cards (customer_id VARCHAR);,"SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id;","SELECT customer_id, COUNT(*) FROM Customers_cards GROUP BY customer_id;",1 What are the names of the autonomous driving research papers with a publication date in the first half of 2021?,"CREATE TABLE ResearchPapers (ID INT, Title TEXT, Author TEXT, PublicationDate DATE); ",SELECT Title FROM ResearchPapers WHERE PublicationDate BETWEEN '2021-01-01' AND '2021-06-30';,SELECT Title FROM ResearchPapers WHERE PublicationDate BETWEEN '2021-01-01' AND '2021-06-30';,1 Which artifacts were found between two specific dates?,"CREATE TABLE Dates (DateID INT, MinDate DATE, MaxDate DATE); ","SELECT A.ArtifactID, A.SiteID, A.ArtifactType, A.DateFound FROM Artifacts A INNER JOIN Dates D ON A.DateFound BETWEEN D.MinDate AND D.MaxDate;",SELECT Artifacts.ArtifactID FROM Artifacts INNER JOIN Dates ON Artifacts.ArtifactID = Dates.ArtifactID WHERE Artifacts.ArtifactID IN (SELECT ArtifactID FROM Artifacts WHERE Artifacts.ArtifactID IN (SELECT ArtifactID FROM Artifacts WHERE Artifacts.ArtifactID IN (SELECT ArtifactID FROM Artifacts.Artifacts WHERE Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifacts.Artifact,0 Identify the top 3 states with the highest number of medical visits in rural areas in the last month.,"CREATE TABLE medical_visits (id INT, visit_date DATE, state CHAR(2), rural BOOLEAN); ","SELECT state, COUNT(*) as visits FROM medical_visits WHERE rural = true AND visit_date >= DATEADD(month, -1, CURRENT_DATE) GROUP BY state ORDER BY visits DESC LIMIT 3;","SELECT state, COUNT(*) as num_visits FROM medical_visits WHERE rural = true AND visit_date >= DATEADD(month, -1, GETDATE()) GROUP BY state ORDER BY num_visits DESC LIMIT 3;",0 What is the average cost of materials for bridges in California?,"CREATE TABLE Bridge (id INT, name VARCHAR(50), material_cost FLOAT, state VARCHAR(50)); ",SELECT AVG(material_cost) FROM Bridge WHERE state = 'California' AND type = 'Bridge';,SELECT AVG(material_cost) FROM Bridge WHERE state = 'California';,0 Name the nominating festival for director of 2004,"CREATE TABLE table_name_1 (nominating_festival VARCHAR, director_s_ VARCHAR);","SELECT nominating_festival FROM table_name_1 WHERE director_s_ = ""2004"";",SELECT nominating_festival FROM table_name_1 WHERE director_s_ = 2004;,0 Show the percentage of defense contracts awarded to companies headquartered in each state.,"CREATE TABLE company (company_id INT, company_name VARCHAR(50), state VARCHAR(50)); CREATE TABLE contract (contract_id INT, company_id INT, contract_value DECIMAL(10, 2)); ","SELECT state, 100.0 * COUNT(contract_id) / (SELECT COUNT(*) FROM contract) as percentage_of_contracts FROM contract INNER JOIN company ON contract.company_id = company.company_id GROUP BY state;","SELECT c.state, COUNT(c.contract_id) * 100.0 / (SELECT COUNT(c.contract_id) FROM contract c JOIN company c ON c.company_id = c.company_id GROUP BY c.state) as percentage FROM contract c JOIN company c ON c.company_id = c.company_id GROUP BY c.state;",0 Who is the opponent of the game with a game number larger than 5 on June 22?,"CREATE TABLE table_name_85 (opponent VARCHAR, game VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_85 WHERE game > 5 AND date = ""june 22"";","SELECT opponent FROM table_name_85 WHERE game > 5 AND date = ""june 22"";",1 What is the name of the employee with the lowest salary in each department?,"CREATE TABLE Employees (EmployeeID INT, Name VARCHAR(50), Department VARCHAR(50), Salary FLOAT); ","SELECT Name, Department FROM (SELECT Name, Department, Salary, RANK() OVER (PARTITION BY Department ORDER BY Salary ASC) AS Rank FROM Employees) AS EmployeesRanked WHERE Rank = 1;",SELECT Name FROM Employees WHERE Salary = (SELECT MIN(Salary) FROM Employees GROUP BY Department);,0 What is the average number of losses for teams with under 16 points and under 3 draws?,"CREATE TABLE table_name_8 (losses INTEGER, points VARCHAR, draws VARCHAR);",SELECT AVG(losses) FROM table_name_8 WHERE points < 16 AND draws < 3;,SELECT AVG(losses) FROM table_name_8 WHERE points 16 AND draws 3;,0 Who is the athlete who's rank is 8 and competed in the olympics during 1948–1952?,"CREATE TABLE table_22355_20 (athlete VARCHAR, rank VARCHAR, olympics VARCHAR);","SELECT athlete FROM table_22355_20 WHERE rank = 8 AND olympics = ""1948–1952"";","SELECT athlete FROM table_22355_20 WHERE rank = 8 AND olympics = ""1948–1952"";",1 Tell me the tournament for opponents of andrei pavel rogier wassen,"CREATE TABLE table_name_53 (tournament VARCHAR, opponents_in_the_final VARCHAR);","SELECT tournament FROM table_name_53 WHERE opponents_in_the_final = ""andrei pavel rogier wassen"";","SELECT tournament FROM table_name_53 WHERE opponents_in_the_final = ""andrei pavel rogier wassen"";",1 "What is the total number of news articles published about politics in the last month, broken down by country?","CREATE TABLE articles (id INT, title VARCHAR(100), topic VARCHAR(50), publish_date DATE); CREATE VIEW article_summary AS SELECT topic, COUNT(*) as num_articles, YEAR(publish_date) as year, MONTH(publish_date) as month FROM articles GROUP BY topic, year, month;","SELECT article_summary.topic as country, SUM(article_summary.num_articles) FROM article_summary INNER JOIN articles ON article_summary.topic = articles.topic WHERE articles.topic IN ('USA', 'Canada', 'Mexico') AND YEAR(publish_date) = YEAR(CURRENT_DATE) AND MONTH(publish_date) = MONTH(CURRENT_DATE) GROUP BY country;","SELECT country, SUM(num_articles) as total_articles FROM article_summary WHERE topic = 'politics' AND YEAR(publish_date) >= DATEADD(month, -1, GETDATE()) GROUP BY country;",0 Which Record has an Event of cage rage 23?,"CREATE TABLE table_name_35 (record VARCHAR, event VARCHAR);","SELECT record FROM table_name_35 WHERE event = ""cage rage 23"";","SELECT record FROM table_name_35 WHERE event = ""cage rage 23"";",1 Which ERP W has a Frequency MHz of 89.3 fm?,"CREATE TABLE table_name_98 (erp_w INTEGER, frequency_mhz VARCHAR);","SELECT MAX(erp_w) FROM table_name_98 WHERE frequency_mhz = ""89.3 fm"";","SELECT MAX(erp_w) FROM table_name_98 WHERE frequency_mhz = ""89.3 fm"";",1 Find the names and maintenance dates of public works projects in Texas with a resilience score below 60,"CREATE TABLE Infrastructure (id INT, name VARCHAR(255), type VARCHAR(255), location VARCHAR(255), is_public_works BOOLEAN, resilience_score INT); CREATE TABLE Maintenance (id INT, infrastructure_id INT, maintenance_date DATE); ","SELECT Infrastructure.name, Maintenance.maintenance_date FROM Infrastructure INNER JOIN Maintenance ON Infrastructure.id = Maintenance.infrastructure_id WHERE Infrastructure.location = 'Texas' AND Infrastructure.is_public_works = TRUE AND Infrastructure.resilience_score < 60;","SELECT Infrastructure.name, Maintenance.maintenance_date FROM Infrastructure INNER JOIN Maintenance ON Infrastructure.id = Maintenance.infrastructure_id WHERE Infrastructure.location = 'Texas' AND Infrastructure.is_public_works = TRUE AND Infrastructure.resilience_score 60;",0 "What is the total number of scientific instruments on all spacecraft currently in orbit around Jupiter, and what are their names?","CREATE TABLE jupiter_spacecraft(id INT, spacecraft_name VARCHAR(255), in_orbit BOOLEAN, number_of_instruments INT);","SELECT spacecraft_name, number_of_instruments FROM jupiter_spacecraft WHERE in_orbit = TRUE; SELECT SUM(number_of_instruments) FROM jupiter_spacecraft WHERE in_orbit = TRUE;","SELECT spacecraft_name, SUM(number_of_instruments) FROM jupiter_spacecraft WHERE in_orbit = true GROUP BY spacecraft_name;",0 "For teams with 22 matches played, a losing bonus of 3, and 45 tries against, what was the number of points against?","CREATE TABLE table_name_10 (points_against VARCHAR, tries_against VARCHAR, played VARCHAR, losing_bonus VARCHAR);","SELECT points_against FROM table_name_10 WHERE played = ""22"" AND losing_bonus = ""3"" AND tries_against = ""45"";","SELECT points_against FROM table_name_10 WHERE played = ""22"" AND losing_bonus = ""3"" AND tries_against = ""45"";",1 Find the number of games played and the number of games won by each NBA team in the current season.,"CREATE TABLE teams (team_id INT, team_name VARCHAR(50), season_id INT); CREATE TABLE games (game_id INT, home_team_id INT, away_team_id INT, home_team_score INT, away_team_score INT, season_id INT);","SELECT home_team_id, COUNT(*) AS games_played, SUM(CASE WHEN home_team_score > away_team_score THEN 1 ELSE 0 END) + SUM(CASE WHEN away_team_score > home_team_score THEN 0 ELSE 1 END) AS games_won FROM games JOIN teams ON home_team_id = teams.team_id WHERE season_id = (SELECT MAX(season_id) FROM teams) GROUP BY home_team_id;","SELECT t.team_name, COUNT(g.game_id) as games_played, COUNT(g.game_id) as games_won FROM teams t JOIN games g ON t.team_id = g.home_team_id JOIN games g ON g.home_team_id = g.away_team_id WHERE g.season_id = 1 GROUP BY t.team_name;",0 "Insert a new research grant with an ID of 4, a grant amount of 4000.00, and a faculty member with an ID of 4 who identifies as genderqueer into the Research Grants table.","CREATE TABLE faculty (id INT, name VARCHAR(50), department VARCHAR(50), gender VARCHAR(50), sexual_orientation VARCHAR(50)); CREATE TABLE research_grants (id INT, faculty_id INT, grant_amount DECIMAL(10,2)); ","INSERT INTO research_grants (id, faculty_id, grant_amount) VALUES (4, 4, 4000.00);","INSERT INTO research_grants (id, faculty_id, grant_amount) VALUES (4, 4000.00, 4); INSERT INTO faculty (id, name, department, gender, sexual_orientation) VALUES (4, 4);",0 What is the name where p is mf?,"CREATE TABLE table_11891841_2 (name VARCHAR, p VARCHAR);","SELECT name FROM table_11891841_2 WHERE p = ""MF"";","SELECT name FROM table_11891841_2 WHERE p = ""MF"";",1 "What is the largest total with a Silver of 1, and a Rank larger than 7?","CREATE TABLE table_name_73 (total INTEGER, silver VARCHAR, rank VARCHAR);",SELECT MAX(total) FROM table_name_73 WHERE silver = 1 AND rank > 7;,SELECT MAX(total) FROM table_name_73 WHERE silver = 1 AND rank > 7;,1 How many space missions have been conducted by each space organization?,"CREATE TABLE SpaceOrganizations (id INT, name VARCHAR(255), country VARCHAR(255)); CREATE TABLE SpaceMissions (id INT, organization_id INT, mission VARCHAR(255));","SELECT SpaceOrganizations.name, COUNT(SpaceMissions.id) FROM SpaceOrganizations INNER JOIN SpaceMissions ON SpaceOrganizations.id = SpaceMissions.organization_id GROUP BY SpaceOrganizations.name;","SELECT SpaceOrganizations.name, COUNT(SpaceMissions.id) FROM SpaceOrganizations INNER JOIN SpaceMissions ON SpaceOrganizations.id = SpaceMissions.organization_id GROUP BY SpaceOrganizations.name;",1 Which fans are from Texas and have attended more than 3 events?,"CREATE TABLE fans (fan_id INT, state VARCHAR(255)); CREATE TABLE events (fan_id INT, event_id INT); ","SELECT f.state, COUNT(e.event_id) as event_count FROM fans f JOIN events e ON f.fan_id = e.fan_id WHERE f.state = 'Texas' GROUP BY f.fan_id HAVING event_count > 3;",SELECT fans.fan_id FROM fans INNER JOIN events ON fans.fan_id = events.fan_id WHERE fans.state = 'Texas' GROUP BY fans.fan_id HAVING COUNT(events.fan_id) > 3;,0 what is the nation when the height (m) is 1.91 and the weight (kg) is 99?,"CREATE TABLE table_name_83 (nation VARCHAR, height__m_ VARCHAR, weight__kg_ VARCHAR);","SELECT nation FROM table_name_83 WHERE height__m_ = ""1.91"" AND weight__kg_ = ""99"";",SELECT nation FROM table_name_83 WHERE height__m_ = 1.91 AND weight__kg_ = 99;,0 What is the shield animal of knight phil?,"CREATE TABLE table_name_57 (shield_animal VARCHAR, knight VARCHAR);","SELECT shield_animal FROM table_name_57 WHERE knight = ""phil"";","SELECT shield_animal FROM table_name_57 WHERE knight = ""phil"";",1 What is the Chinese name of the episode with 1.97 million Hong Kong viewers?,"CREATE TABLE table_24856090_1 (chinese_title VARCHAR, hk_viewers VARCHAR);","SELECT chinese_title FROM table_24856090_1 WHERE hk_viewers = ""1.97 million"";","SELECT chinese_title FROM table_24856090_1 WHERE hk_viewers = ""1.97 million"";",1 How many debris objects are in geosynchronous orbits?,"CREATE TABLE debris (id INT, object_name VARCHAR(255), orbit_type VARCHAR(255));",SELECT COUNT(*) FROM debris WHERE orbit_type = 'geosynchronous';,SELECT COUNT(*) FROM debris WHERE orbit_type = 'Geosynchronous';,0 What is the total number of organic meals by category in the organic_meals table?,"CREATE TABLE organic_meals (meal_id INT, meal_name VARCHAR(50), category VARCHAR(20), calories INT); ","SELECT category, SUM(calories) FROM organic_meals GROUP BY category;","SELECT category, SUM(calories) FROM organic_meals GROUP BY category;",1 What is the average construction labor cost for carpenters in Florida?,"CREATE TABLE Labor_Costs (WorkerID INT, State VARCHAR(50), JobTitle VARCHAR(50), HourlyRate FLOAT);",SELECT AVG(HourlyRate) FROM Labor_Costs WHERE State = 'Florida' AND JobTitle = 'Carpenter';,SELECT AVG(HourlyRate) FROM Labor_Costs WHERE State = 'Florida' AND JobTitle = 'Carpenter';,1 List all the unique vessels that have been involved in illegal fishing activities in the Indian Ocean in the past year.,"CREATE TABLE illegal_fishing_activities (id INT, vessel_name VARCHAR(50), region VARCHAR(50), date DATE); ","SELECT DISTINCT vessel_name FROM illegal_fishing_activities WHERE region = 'Indian Ocean' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT DISTINCT vessel_name FROM illegal_fishing_activities WHERE region = 'Indian Ocean' AND date >= DATEADD(year, -1, GETDATE());",0 Witch opponent has a loss of Glynn (0-2)?,"CREATE TABLE table_name_51 (opponent VARCHAR, loss VARCHAR);","SELECT opponent FROM table_name_51 WHERE loss = ""glynn (0-2)"";","SELECT opponent FROM table_name_51 WHERE loss = ""glynn (0-2)"";",1 List all clients with their average billing per case,"CREATE TABLE client_billing (client_id INT, case_id INT, hours_billed INT, PRIMARY KEY (client_id, case_id)); CREATE TABLE client_demographics (client_id INT, client_name VARCHAR(255), PRIMARY KEY (client_id));","SELECT client_name, AVG(hours_billed) as avg_billing_per_case FROM client_billing JOIN client_demographics ON client_billing.client_id = client_demographics.client_id GROUP BY client_name;","SELECT client_name, AVG(hours_billed) as avg_hours_billed FROM client_billing JOIN client_demographics ON client_billing.client_id = client_demographics.client_id GROUP BY client_name;",0 Who was the home team in the game played at arden street oval?,"CREATE TABLE table_name_42 (home_team VARCHAR, venue VARCHAR);","SELECT home_team AS score FROM table_name_42 WHERE venue = ""arden street oval"";","SELECT home_team FROM table_name_42 WHERE venue = ""arden street oval"";",0 How many assists did the player who had 863 minutes have? ,"CREATE TABLE table_24850487_5 (assists INTEGER, minutes VARCHAR);",SELECT MIN(assists) FROM table_24850487_5 WHERE minutes = 863;,SELECT MAX(assists) FROM table_24850487_5 WHERE minutes = 863;,0 What if the description of a ch-47d chinook?,"CREATE TABLE table_10006830_1 (description VARCHAR, aircraft VARCHAR);","SELECT description FROM table_10006830_1 WHERE aircraft = ""CH-47D Chinook"";","SELECT description FROM table_10006830_1 WHERE aircraft = ""Ch-47D Chinook"";",0 What is the total investment in companies with female founders in 2020?,"CREATE TABLE Company (id INT, name VARCHAR(50), founder VARCHAR(50), HQ VARCHAR(50), founding_date DATE); CREATE TABLE Investment (id INT, company_id INT, investor VARCHAR(50), investment_amount FLOAT, investment_date DATE); ",SELECT SUM(Investment.investment_amount) as total_investment FROM Company JOIN Investment ON Company.id = Investment.company_id WHERE YEAR(Investment.investment_date) = 2020 AND Company.founder LIKE '%female%';,SELECT SUM(Investment.investment_amount) FROM Company INNER JOIN Investment ON Company.id = Investment.company_id WHERE Company.founder LIKE '%Female%' AND YEAR(Investment.investment_date) = 2020;,0 "What is the sum of Magnitude on february 12, 1953?","CREATE TABLE table_name_44 (magnitude INTEGER, date VARCHAR);","SELECT SUM(magnitude) FROM table_name_44 WHERE date = ""february 12, 1953"";","SELECT SUM(magnitude) FROM table_name_44 WHERE date = ""february 12, 1953"";",1 Update the department of employee with ID 3 to 'HR',"CREATE TABLE Employees (Employee_ID INT, Name VARCHAR(100), Department VARCHAR(50), Salary DECIMAL(10,2), Hire_Date DATE, Program VARCHAR(50)); ",UPDATE Employees SET Department = 'HR' WHERE Employee_ID = 3;,UPDATE Employees SET Department = 'HR' WHERE Employee_ID = 3;,1 What is the total cost of materials for the project with id 3?,"CREATE TABLE construction_material (id INT, material_name VARCHAR(255), quantity INT, unit_price DECIMAL(5,2)); CREATE TABLE project_material (project_id INT, material_id INT); ",SELECT SUM(construction_material.quantity * construction_material.unit_price) FROM construction_material JOIN project_material ON construction_material.id = project_material.material_id WHERE project_material.project_id = 3;,SELECT SUM(quantity * unit_price) FROM construction_material JOIN project_material ON construction_material.material_id = project_material.material_id WHERE project_material.id = 3;,0 What is the total revenue for each collection in the sales table?,"CREATE TABLE sales (collection VARCHAR(20), revenue INT); ","SELECT collection, SUM(revenue) FROM sales GROUP BY collection;","SELECT collection, SUM(revenue) FROM sales GROUP BY collection;",1 What is the number of climate mitigation projects completed by each organization in 2019?,"CREATE TABLE org_mitigation_projects (org_name VARCHAR(50), year INT, status VARCHAR(50)); ","SELECT org_name, SUM(CASE WHEN status = 'Completed' THEN 1 ELSE 0 END) as completed_projects FROM org_mitigation_projects WHERE year = 2019 GROUP BY org_name;","SELECT org_name, COUNT(*) FROM org_mitigation_projects WHERE year = 2019 AND status = 'Completed' GROUP BY org_name;",0 What is the donation retention rate by age group?,"CREATE TABLE donor_retention_data (id INT, age INT, donor INT, retained INT); ","SELECT age_group, AVG(retained/donor*100) as retention_rate FROM (SELECT CASE WHEN age < 30 THEN 'Under 30' WHEN age < 50 THEN '30-49' ELSE '50+' END as age_group, donor, retained FROM donor_retention_data) AS subquery GROUP BY age_group;","SELECT age, SUM(retained) as total_retention FROM donor_retention_data GROUP BY age;",0 How many grids did Shinichi Nakatomi ride in?,"CREATE TABLE table_name_46 (grid INTEGER, rider VARCHAR);","SELECT SUM(grid) FROM table_name_46 WHERE rider = ""shinichi nakatomi"";","SELECT SUM(grid) FROM table_name_46 WHERE rider = ""shinji nakatomi"";",0 Insert a new record of a worker who has worked 80 hours on a sustainable project in Texas.,"CREATE TABLE construction_labor (id INT, worker_name VARCHAR(50), hours_worked INT, project_type VARCHAR(20), state VARCHAR(20)); CREATE TABLE building_permits (id INT, project_name VARCHAR(50), project_type VARCHAR(20), state VARCHAR(20)); ","INSERT INTO construction_labor (id, worker_name, hours_worked, project_type, state) VALUES (2, 'Jim Brown', 80, 'Sustainable', 'Texas');","INSERT INTO construction_labor (id, worker_name, hours_worked, project_type, state) VALUES (1, 'Madison', 80, 'Texas');",0 Which excavation sites have no public outreach records?,"CREATE TABLE site_l (site_id INT); CREATE TABLE public_outreach (site_id INT, outreach_type VARCHAR(255)); ",SELECT context FROM (SELECT 'site_l' AS context EXCEPT SELECT site_id FROM public_outreach) AS subquery;,SELECT site_l.site_id FROM site_l INNER JOIN public_outreach ON site_l.site_id = public_outreach.site_id WHERE public_outreach.site_id IS NULL;,0 Insert records for 3 new subsidies into the 'housing_subsidies' table.,"CREATE TABLE housing_subsidies (id INT, policy_name TEXT, start_date DATE, end_date DATE);","INSERT INTO housing_subsidies (id, policy_name, start_date, end_date) VALUES (1, 'Policy 1', '2022-01-01', '2023-12-31'), (2, 'Policy 2', '2022-01-01', '2025-12-31'), (3, 'Policy 3', '2024-01-01', '2026-12-31');","INSERT INTO housing_subsidies (id, policy_name, start_date, end_date) VALUES (3, 'New Subventions', '2022-03-01', '2022-03-31');",0 Who is in class during 1995-96?,"CREATE TABLE table_15315103_1 (class_aAAAA VARCHAR, school_year VARCHAR);","SELECT class_aAAAA FROM table_15315103_1 WHERE school_year = ""1995-96"";","SELECT class_aAAAA FROM table_15315103_1 WHERE school_year = ""1995-96"";",1 What was the total sustainable sourcing spending for 'Green Organics' in the first quarter of 2022?,"CREATE TABLE sustainable_sourcing (restaurant_id INT, sourcing_date DATE, spending DECIMAL(10,2)); CREATE TABLE restaurants (restaurant_id INT, name VARCHAR(50), location VARCHAR(50)); ",SELECT SUM(spending) as total_spending FROM sustainable_sourcing INNER JOIN restaurants ON sustainable_sourcing.restaurant_id = restaurants.restaurant_id WHERE restaurants.name = 'Green Organics' AND sustainable_sourcing.sourcing_date BETWEEN '2022-01-01' AND '2022-03-31';,SELECT SUM(spending) FROM sustainable_sourcing JOIN restaurants ON sustainable_sourcing.restaurant_id = restaurants.restaurant_id WHERE restaurants.name = 'Green Organics' AND sourcing_date BETWEEN '2022-01-01' AND '2022-03-31';,0 What is the average tour duration for sustainable tours in Brazil?,"CREATE TABLE tours (tour_id INT, type TEXT, country TEXT, duration INT); ",SELECT AVG(duration) FROM tours WHERE type = 'Sustainable' AND country = 'Brazil';,SELECT AVG(duration) FROM tours WHERE type = 'Sustainable' AND country = 'Brazil';,1 "List all the distinct marine species and their observation counts in the Arctic Ocean, excluding fish and birds.","CREATE TABLE arctic_marine_life (species VARCHAR(255), count INT); ","SELECT species, count FROM arctic_marine_life WHERE species NOT IN ('Fish', 'Puffin');","SELECT species, count FROM arctic_marine_life WHERE species!= 'fish' OR species!= 'bird';",0 How many members joined in Q1 2021 who have not attended any class yet?,"CREATE TABLE Members (MemberID int, JoinDate date); CREATE TABLE Classes (ClassID int, ClassDate date, MemberID int); ",SELECT COUNT(MemberID) FROM Members m WHERE YEAR(m.JoinDate) = 2021 AND QUARTER(m.JoinDate) = 1 AND m.MemberID NOT IN (SELECT MemberID FROM Classes);,SELECT COUNT(*) FROM Members JOIN Classes ON Members.MemberID = Classes.MemberID WHERE Classes.ClassDate BETWEEN '2021-01-01' AND '2021-03-31';,0 What was the average number of strikeouts per game for Team G in the 2018 season?,"CREATE TABLE games (id INT, team TEXT, location TEXT, strikeouts INT); ",SELECT AVG(strikeouts) FROM games WHERE team = 'Team G' AND year = 2018;,SELECT AVG(strikeouts) FROM games WHERE team = 'Team G' AND year = 2018;,1 "For the game that had an end record of 2-4, who was the high points scorer?","CREATE TABLE table_name_69 (high_points VARCHAR, record VARCHAR);","SELECT high_points FROM table_name_69 WHERE record = ""2-4"";","SELECT high_points FROM table_name_69 WHERE record = ""2-4"";",1 What is the maximum budget for projects addressing technology accessibility?,"CREATE TABLE projects_2 (id INT, name VARCHAR, type VARCHAR, budget FLOAT); ",SELECT MAX(budget) FROM projects_2 WHERE type = 'Accessibility';,SELECT MAX(budget) FROM projects_2 WHERE type = 'Accessibility';,1 What is the total cost of all lifelong learning programs offered in the region of Paris?,"CREATE TABLE regions (region_name VARCHAR(255), region_id INT); CREATE TABLE lifelong_learning_programs (program_id INT, program_name VARCHAR(255), region_id INT, program_cost DECIMAL(10,2), PRIMARY KEY (program_id), FOREIGN KEY (region_id) REFERENCES regions(region_id));",SELECT SUM(lifelong_learning_programs.program_cost) FROM lifelong_learning_programs INNER JOIN regions ON lifelong_learning_programs.region_id = regions.region_id WHERE regions.region_name = 'Paris';,SELECT SUM(program_cost) FROM lifelong_learning_programs WHERE region_id = (SELECT region_id FROM regions WHERE region_name = 'Paris');,0 Which Home team has a Game of game 5?,"CREATE TABLE table_name_85 (home_team VARCHAR, game VARCHAR);","SELECT home_team FROM table_name_85 WHERE game = ""game 5"";","SELECT home_team FROM table_name_85 WHERE game = ""game 5"";",1 What is the total budget for agricultural innovation projects in the 'rural_innovation' table?,"CREATE TABLE rural_innovation (id INT, project_name VARCHAR(50), budget FLOAT); ",SELECT SUM(budget) FROM rural_innovation WHERE project_name LIKE 'agricultural%';,SELECT SUM(budget) FROM rural_innovation;,0 Find total cost of accommodations per disability type for students in Texas.,"CREATE TABLE Accommodations (id INT, student_id INT, disability_type VARCHAR(50), cost FLOAT);","SELECT d.disability_type, SUM(a.cost) as total_cost FROM Accommodations a JOIN Students s ON a.student_id = s.id JOIN Disabilities d ON a.disability_type = d.type WHERE s.state = 'TX' GROUP BY d.disability_type;","SELECT disability_type, SUM(cost) FROM Accommodations WHERE state = 'Texas' GROUP BY disability_type;",0 What is the number of carbon offset programs implemented in 'South America'?,"CREATE TABLE carbon_offset_programs (program_id INT, program_name VARCHAR(255), location VARCHAR(255)); ",SELECT COUNT(*) FROM carbon_offset_programs WHERE location = 'South America';,SELECT COUNT(*) FROM carbon_offset_programs WHERE location = 'South America';,1 What is the average number of positive reviews received by virtual tour companies in Canada for the year 2022?,"CREATE TABLE VirtualTourCompanies (name VARCHAR(50), location VARCHAR(20), year INT, reviews INT, rating INT);",SELECT AVG(rating) FROM VirtualTourCompanies WHERE location = 'Canada' AND year = 2022 AND reviews > 0;,SELECT AVG(reviews) FROM VirtualTourCompanies WHERE location = 'Canada' AND year = 2022;,0 "What are the number of unique threat actors that have targeted systems with a CVE score greater than 7 in the last year, and their names?","CREATE TABLE threat_actors (threat_actor_id INT, threat_actor_name VARCHAR(255));CREATE TABLE targeted_systems (system_id INT, system_name VARCHAR(255), sector VARCHAR(255), threat_actor_id INT);CREATE TABLE cve_scores (system_id INT, score INT, scan_date DATE);CREATE TABLE scan_dates (scan_date DATE, system_id INT);","SELECT COUNT(DISTINCT ta.threat_actor_id) as num_actors, STRING_AGG(ta.threat_actor_name, ', ') as actor_names FROM threat_actors ta INNER JOIN targeted_systems ts ON ta.threat_actor_id = ts.threat_actor_id INNER JOIN cve_scores c ON ts.system_id = c.system_id INNER JOIN scan_dates sd ON ts.system_id = sd.system_id WHERE c.score > 7 AND sd.scan_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT DISTINCT threat_actors.threat_actor_name, COUNT(DISTINCT targeted_systems.threat_actor_id) as unique_actors FROM threat_actors INNER JOIN targeted_systems ON threat_actors.threat_actor_id = targeted_systems.threat_actor_id INNER JOIN cve_scores ON targeted_systems.system_id = cve_scores.system_id INNER JOIN scan_dates ON targeted_systems.system_id = scan_dates.system_id WHERE scan_dates.scan_date > 7 AND scan_dates.scan_date >= DATEADD(year, -1, GETDATE());",0 Identify the top 3 heaviest non-organic products and their suppliers.,"CREATE TABLE suppliers (id INT, name VARCHAR(255), country VARCHAR(255)); CREATE TABLE products (id INT, name VARCHAR(255), organic BOOLEAN, weight FLOAT, supplier_id INT);","SELECT p.name, s.name as supplier, p.weight FROM suppliers s INNER JOIN products p ON s.id = p.supplier_id WHERE p.organic = 'f' ORDER BY p.weight DESC LIMIT 3;","SELECT p.name, s.name, p.weight FROM products p JOIN suppliers s ON p.supplier_id = s.id WHERE p.organic = TRUE GROUP BY p.name, s.name ORDER BY p.weight DESC LIMIT 3;",0 What is the distribution of criminal justice data case types by case outcome and data source?,"CREATE TABLE criminal_justice_data (case_id INT, case_type VARCHAR(20), case_outcome VARCHAR(20), data_source VARCHAR(20)); ","SELECT case_type, case_outcome, data_source, COUNT(*) as total_cases FROM criminal_justice_data GROUP BY case_type, case_outcome, data_source;","SELECT case_type, case_outcome, data_source, COUNT(*) as count FROM criminal_justice_data GROUP BY case_type, case_outcome, data_source;",0 Find all dishes in the menu and dish_allergens tables that contain peanuts.,"CREATE TABLE menu (menu_id INT, dish_name TEXT); CREATE TABLE dish_allergens (dish_id INT, allergen TEXT);",SELECT menu.dish_name FROM menu INNER JOIN dish_allergens ON menu.menu_id = dish_allergens.dish_id WHERE dish_allergens.allergen = 'peanuts';,SELECT menu.dish_name FROM menu INNER JOIN dish_allergens ON menu.menu_id = dish_allergens.dish_id WHERE dish_allergens.allergen = 'Peanuts';,0 Find the exhibition with the highest average rating,"CREATE TABLE Exhibition (id INT, name TEXT, rating INT); ",SELECT name FROM Exhibition WHERE rating = (SELECT MAX(rating) FROM Exhibition);,"SELECT name, AVG(rating) as avg_rating FROM Exhibition GROUP BY name ORDER BY avg_rating DESC LIMIT 1;",0 "What is the first prize amount of the person who has a score of 207 (-9) and a purse amount of more than 800,000?","CREATE TABLE table_name_54 (score VARCHAR, purse__$__ VARCHAR);","SELECT COUNT(1 AS st_prize__) AS $__ FROM table_name_54 WHERE score = ""207 (-9)"" AND purse__$__ > 800 OFFSET 000;",SELECT score FROM table_name_54 WHERE purse__$__ > 800000;,0 What was the method in the fight against Chris Myers?,"CREATE TABLE table_name_15 (method VARCHAR, opponent VARCHAR);","SELECT method FROM table_name_15 WHERE opponent = ""chris myers"";","SELECT method FROM table_name_15 WHERE opponent = ""chris myers"";",1 What did the home team at Brunswick Street Oval score?,"CREATE TABLE table_name_89 (home_team VARCHAR, venue VARCHAR);","SELECT home_team AS score FROM table_name_89 WHERE venue = ""brunswick street oval"";","SELECT home_team AS score FROM table_name_89 WHERE venue = ""brunswick street oval"";",1 Which military bases have the most number of military personnel in the 'military_bases' and 'base_personnel' tables?,"CREATE TABLE military_bases (base_id INT, base_name VARCHAR(50)); CREATE TABLE base_personnel (base_id INT, base_name VARCHAR(50), personnel_count INT); ","SELECT m.base_name, SUM(bp.personnel_count) as total_personnel FROM military_bases m JOIN base_personnel bp ON m.base_id = bp.base_id GROUP BY m.base_name ORDER BY total_personnel DESC;","SELECT military_bases.base_name, SUM(base_personnel.personnel_count) as total_personnel FROM military_bases INNER JOIN base_personnel ON military_bases.base_id = base_personnel.base_id GROUP BY military_bases.base_name ORDER BY total_personnel DESC;",0 "List the number of safety incidents for each chemical type, partitioned by quarter and year?","CREATE TABLE safety_incidents (chemical_type VARCHAR(255), incident_date DATE); ","SELECT chemical_type, TO_CHAR(incident_date, 'YYYY-Q') as incident_quarter, COUNT(*) as incident_count FROM safety_incidents GROUP BY chemical_type, incident_quarter ORDER BY incident_quarter","SELECT chemical_type, DATE_FORMAT(incident_date, '%Y-%m') as quarter, YEAR(incident_date) as year, COUNT(*) as incidents FROM safety_incidents GROUP BY chemical_type, quarter, year;",0 What is the distribution of military spending by continent?,"CREATE TABLE MilitarySpending (Continent VARCHAR(50), Spending DECIMAL(10,2)); ","SELECT Continent, Spending, RANK() OVER (ORDER BY Spending DESC) as Rank FROM MilitarySpending;","SELECT Continent, SUM(Spending) as TotalSpending FROM MilitarySpending GROUP BY Continent;",0 What is the average attendance rate for open pedagogy courses in 'Metro District'?,"CREATE TABLE MetroDistrictCourses (courseID INT, instructorName VARCHAR(50), attendanceRate DECIMAL(3,2)); ",SELECT AVG(attendanceRate) FROM MetroDistrictCourses WHERE courseType = 'open pedagogy';,SELECT AVG(attendanceRate) FROM MetroDistrictCourses WHERE instructorName LIKE '%open pedagogy%';,0 How many volunteers signed up in each country in 2021?,"CREATE TABLE volunteer_signups (volunteer_id INT, country VARCHAR(50), signup_date DATE); ","SELECT country, COUNT(volunteer_id) as total_volunteers FROM volunteer_signups WHERE YEAR(signup_date) = 2021 GROUP BY country;","SELECT country, COUNT(*) FROM volunteer_signups WHERE signup_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY country;",0 What place was Bill Glasson in?,"CREATE TABLE table_name_49 (place VARCHAR, player VARCHAR);","SELECT place FROM table_name_49 WHERE player = ""bill glasson"";","SELECT place FROM table_name_49 WHERE player = ""bill glasson"";",1 Who is the opponent in the final of the match on 26 March 2006?,"CREATE TABLE table_name_49 (opponent_in_the_final VARCHAR, date VARCHAR);","SELECT opponent_in_the_final FROM table_name_49 WHERE date = ""26 march 2006"";","SELECT opponent_in_the_final FROM table_name_49 WHERE date = ""26 march 2006"";",1 How many animals have been de-listed from the endangered species list in Australia?,"CREATE TABLE DeListing (AnimalID INT, AnimalName VARCHAR(50), DeListed INT, Location VARCHAR(50)); ",SELECT SUM(DeListed) FROM DeListing WHERE Location = 'Australia';,SELECT COUNT(*) FROM DeListing WHERE DeListed = 'Endangered' AND Location = 'Australia';,0 What loss was against the angels with a 50-31 record?,"CREATE TABLE table_name_84 (loss VARCHAR, opponent VARCHAR, record VARCHAR);","SELECT loss FROM table_name_84 WHERE opponent = ""angels"" AND record = ""50-31"";","SELECT loss FROM table_name_84 WHERE opponent = ""angels"" AND record = ""50-31"";",1 "If the English translation is hello girl, what was the language?","CREATE TABLE table_19249824_1 (language VARCHAR, english_translation VARCHAR);","SELECT language FROM table_19249824_1 WHERE english_translation = ""Hello girl"";","SELECT language FROM table_19249824_1 WHERE english_translation = ""Hello Girl"";",0 "Calculate the percentage of employees who have completed diversity and inclusion training, by department, in the last 6 months.","CREATE TABLE Employees (EmployeeID INT, Department VARCHAR(30), CompletedDiversityTraining BOOLEAN, EmploymentDate DATE); ","SELECT Department, COUNT(CASE WHEN CompletedDiversityTraining THEN 1 ELSE NULL END) * 100.0 / COUNT(*) AS Percentage_Completed_DiversityTraining FROM Employees WHERE EmploymentDate >= CURDATE() - INTERVAL 6 MONTH GROUP BY Department;","SELECT Department, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Employees WHERE CompletedDiversityTraining = TRUE AND EmploymentDate >= DATEADD(month, -6, GETDATE()) GROUP BY Department) as Percentage FROM Employees WHERE CompletedDiversityTraining = TRUE AND EmploymentDate >= DATEADD(month, -6, GETDATE()) GROUP BY Department;",0 Update the vessel_performance table to set the fuel_efficiency as 4.5 for the vessel with id 2,"CREATE TABLE vessel_performance (id INT, vessel_name VARCHAR(50), fuel_efficiency DECIMAL(3,2));",UPDATE vessel_performance SET fuel_efficiency = 4.5 WHERE id = 2;,UPDATE vessel_performance SET fuel_efficiency = 4.5 WHERE id = 2;,1 What is the total number of biosensor technology development projects?,"CREATE SCHEMA if not exists biosensors;CREATE TABLE if not exists biosensors.projects (id INT PRIMARY KEY, name VARCHAR(100), country VARCHAR(50)); ",SELECT COUNT(*) FROM biosensors.projects;,SELECT COUNT(*) FROM biosensors.projects;,1 What is the average funding raised by startups founded by women?,"CREATE TABLE startups(id INT, name TEXT, founder_gender TEXT); CREATE TABLE funding_rounds(startup_id INT, amount_raised INT); ",SELECT AVG(funding_rounds.amount_raised) FROM startups INNER JOIN funding_rounds ON startups.id = funding_rounds.startup_id WHERE startups.founder_gender = 'Female';,SELECT AVG(funding_rounds.amount_raised) FROM startups INNER JOIN funding_rounds ON startups.id = funding_rounds.startup_id WHERE startups.founder_gender = 'Female';,1 What are the top 3 most common types of threats in 'Europe'?,"CREATE TABLE threats (id INT, threat_name VARCHAR(255), region VARCHAR(255), frequency INT); ","SELECT threat_name, frequency FROM threats WHERE region = 'Europe' ORDER BY frequency DESC LIMIT 3;","SELECT threat_name, frequency FROM threats WHERE region = 'Europe' ORDER BY frequency DESC LIMIT 3;",1 What is the average response time for emergency incidents per borough?,"CREATE TABLE borough (id INT, name VARCHAR(50)); CREATE TABLE incident (id INT, borough_id INT, response_time INT);","SELECT borough_id, AVG(response_time) as avg_response_time FROM incident GROUP BY borough_id;","SELECT b.name, AVG(i.response_time) as avg_response_time FROM incident i JOIN borough b ON i.borough_id = b.id GROUP BY b.name;",0 What is the average number of public participation events attended by citizens in each district for the year 2021?,"CREATE TABLE district (id INT, name VARCHAR); CREATE TABLE participation (id INT, district_id INT, event_id INT, date DATE); ","SELECT district_id, AVG(total_events) as avg_events FROM (SELECT district_id, event_id, COUNT(*) as total_events FROM participation WHERE date >= '2021-01-01' AND date < '2022-01-01' GROUP BY district_id, event_id) as subquery GROUP BY district_id;","SELECT d.name, AVG(p.event_count) as avg_events FROM district d JOIN participation p ON d.id = p.district_id WHERE YEAR(p.date) = 2021 GROUP BY d.name;",0 How many times did Silas leave as a team manager?,"CREATE TABLE table_29414946_3 (manner_of_departure VARCHAR, outgoing_manager VARCHAR);","SELECT COUNT(manner_of_departure) FROM table_29414946_3 WHERE outgoing_manager = ""Silas"";","SELECT COUNT(manner_of_departure) FROM table_29414946_3 WHERE outgoing_manager = ""Silas"";",1 Which title is in Portuguese?,"CREATE TABLE table_name_28 (title VARCHAR, language VARCHAR);","SELECT title FROM table_name_28 WHERE language = ""portuguese"";","SELECT title FROM table_name_28 WHERE language = ""portuguese"";",1 Determine the difference in average transaction amounts between customers from 'North America' and 'Asia'.,"CREATE TABLE transaction_amounts (customer_id INT, region VARCHAR(20), transaction_amount NUMERIC(12,2)); ",SELECT AVG(transaction_amount) as avg_asia FROM transaction_amounts WHERE region = 'Asia' INTERSECT SELECT AVG(transaction_amount) as avg_north_america FROM transaction_amounts WHERE region = 'North America';,SELECT AVG(transaction_amount) - AVG(transaction_amount) FROM transaction_amounts WHERE region = 'North America';,0 What is the total number of players who had a money list rank of 96?,"CREATE TABLE table_20590020_2 (best_finish VARCHAR, money_list_rank VARCHAR);",SELECT COUNT(best_finish) FROM table_20590020_2 WHERE money_list_rank = 96;,SELECT COUNT(best_finish) FROM table_20590020_2 WHERE money_list_rank = 96;,1 Update the sale quantity of 'Armored Vehicles' sold by 'Red Arsenal' in 'North America' to 250 if the current quantity is less than 250.,"CREATE TABLE RedArsenalSales(id INT, contractor VARCHAR(255), region VARCHAR(255), equipment VARCHAR(255), quantity INT);",UPDATE RedArsenalSales SET quantity = 250 WHERE contractor = 'Red Arsenal' AND region = 'North America' AND equipment = 'Armored Vehicles' AND quantity < 250;,UPDATE RedArsenalSales SET quantity = 250 WHERE contractor = 'Red Arsenal' AND region = 'North America' AND equipment = 'Armored Vehicles';,0 Who had the most assists in the game that led to a 3-7 record?,"CREATE TABLE table_name_63 (high_assists VARCHAR, record VARCHAR);","SELECT high_assists FROM table_name_63 WHERE record = ""3-7"";","SELECT high_assists FROM table_name_63 WHERE record = ""3-7"";",1 "What player had a pick higher than 53, and a position of defensive tackle?","CREATE TABLE table_name_35 (player VARCHAR, pick VARCHAR, position VARCHAR);","SELECT player FROM table_name_35 WHERE pick > 53 AND position = ""defensive tackle"";","SELECT player FROM table_name_35 WHERE pick > 53 AND position = ""defensive tackle"";",1 What is the total number of hospital beds in rural areas of each state?,"CREATE TABLE beds (bed_id INT, hospital_id INT, location VARCHAR(20));","SELECT hospital_id, COUNT(*) FROM beds WHERE location = 'Rural' GROUP BY hospital_id;","SELECT state, COUNT(*) FROM beds WHERE location LIKE '%rural%' GROUP BY state;",0 Update email of players from 'US' to 'new_email@usa.com',"player (player_id, name, email, age, gender, country, total_games_played)",UPDATE player SET email = 'new_email@usa.com' WHERE country = 'US',UPDATE player SET email = 'new_email@usa.com' WHERE country = 'US';,0 In what Event did Dorcus Inzikuru compete?,"CREATE TABLE table_name_86 (event VARCHAR, name VARCHAR);","SELECT event FROM table_name_86 WHERE name = ""dorcus inzikuru"";","SELECT event FROM table_name_86 WHERE name = ""dorcus inzikuru"";",1 Which regulatory frameworks were adopted in 2022?,"CREATE TABLE regulatory_frameworks (framework_id INT PRIMARY KEY, country VARCHAR(255), name VARCHAR(255), framework TEXT, adoption_date TIMESTAMP); ","SELECT country, name, framework FROM regulatory_frameworks WHERE adoption_date BETWEEN '2022-01-01' AND '2022-12-31';",SELECT framework FROM regulatory_frameworks WHERE adoption_date BETWEEN '2022-01-01' AND '2022-12-31';,0 How many object dates have origin in Samoa?,"CREATE TABLE table_29635868_1 (object_date VARCHAR, origin VARCHAR);","SELECT COUNT(object_date) FROM table_29635868_1 WHERE origin = ""Samoa"";","SELECT COUNT(object_date) FROM table_29635868_1 WHERE origin = ""Samoa"";",1 What diagram built in 1962 has a lot number smaller than 30702?,"CREATE TABLE table_name_4 (diagram INTEGER, built VARCHAR, lot_no VARCHAR);","SELECT MIN(diagram) FROM table_name_4 WHERE built = ""1962"" AND lot_no < 30702;",SELECT SUM(diagram) FROM table_name_4 WHERE built = 1962 AND lot_no 30702;,0 Which constructor had laps amounting to more than 21 where the driver was John Surtees?,"CREATE TABLE table_name_14 (constructor VARCHAR, laps VARCHAR, driver VARCHAR);","SELECT constructor FROM table_name_14 WHERE laps > 21 AND driver = ""john surtees"";","SELECT constructor FROM table_name_14 WHERE laps > 21 AND driver = ""john surtees"";",1 What is the total number of trips taken on public transportation in New York and Chicago?,"CREATE TABLE public_transportation (trip_id INT, city VARCHAR(20), trips INT); ","SELECT city, SUM(trips) FROM public_transportation GROUP BY city;","SELECT SUM(trips) FROM public_transportation WHERE city IN ('New York', 'Chicago');",0 Name the highest laps for maserati and +6 laps for grid more than 11,"CREATE TABLE table_name_33 (laps INTEGER, grid VARCHAR, constructor VARCHAR, time_retired VARCHAR);","SELECT MAX(laps) FROM table_name_33 WHERE constructor = ""maserati"" AND time_retired = ""+6 laps"" AND grid > 11;","SELECT MAX(laps) FROM table_name_33 WHERE constructor = ""maserati"" AND time_retired = ""+6 laps"" AND grid > 11;",1 How many food safety violations did 'Asian Bistro' have in 2020?,"CREATE TABLE food_safety_records (restaurant_name VARCHAR(255), violations INT, year INT); ",SELECT SUM(violations) FROM food_safety_records WHERE restaurant_name = 'Asian Bistro' AND year = 2020;,SELECT SUM(violations) FROM food_safety_records WHERE restaurant_name = 'Asian Bistro' AND year = 2020;,1 "How many broadband subscribers are there where the population is ~3,644,070?","CREATE TABLE table_name_24 (number_of_broadband_subscribers VARCHAR, population VARCHAR);","SELECT number_of_broadband_subscribers FROM table_name_24 WHERE population = ""~3,644,070"";","SELECT number_of_broadband_subscribers FROM table_name_24 WHERE population = ""3,644,070"";",0 Show the number of properties in each city that have a sustainable urbanism rating above 80.,"CREATE TABLE properties (id INT, city VARCHAR(255), sustainability_rating INT); ","SELECT city, COUNT(*) FROM properties WHERE sustainability_rating > 80 GROUP BY city;","SELECT city, COUNT(*) FROM properties WHERE sustainability_rating > 80 GROUP BY city;",1 What was the time when his opponent was Rudy Martin?,"CREATE TABLE table_name_5 (time VARCHAR, opponent VARCHAR);","SELECT time FROM table_name_5 WHERE opponent = ""rudy martin"";","SELECT time FROM table_name_5 WHERE opponent = ""rudy martin"";",1 Delete students with less than 5 mental health check-ins in the last month,"CREATE TABLE students (id INT, name VARCHAR(20), last_checkin DATE); ","DELETE FROM students WHERE last_checkin < DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) AND DATEDIFF(last_checkin, CURRENT_DATE) < 5;","DELETE FROM students WHERE last_checkin DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);",0 "What is the number of research publications for each student, with a rank based on the number of publications?","CREATE TABLE GraduateStudents (StudentID int, StudentName varchar(255)); CREATE TABLE Publications (PublicationID int, StudentID int, Title varchar(255));","SELECT StudentName, COUNT(*) as NumPublications, RANK() OVER (ORDER BY COUNT(*) DESC) as PublicationRank FROM Publications p JOIN GraduateStudents gs ON p.StudentID = gs.StudentID GROUP BY StudentName;","SELECT GraduateStudents.StudentName, COUNT(Publications.PublicationID) as NumberOfPublications FROM GraduateStudents INNER JOIN Publications ON GraduateStudents.StudentID = Publications.StudentID GROUP BY GraduateStudents.StudentName ORDER BY NumberOfPublications DESC;",0 What is the total mass of aircraft manufactured by Airbus?,"CREATE TABLE aircraft (maker TEXT, model TEXT, mass INTEGER); ",SELECT SUM(mass) FROM aircraft WHERE maker = 'Airbus';,SELECT SUM(mass) FROM aircraft WHERE maker = 'Airbus';,1 "Get the number of employees in each department and the percentage of the total workforce, sorted by the number of employees","CREATE TABLE Departments (id INT, department_name VARCHAR(50), employee_id INT); CREATE TABLE Employees (id INT, salary DECIMAL(10, 2));","SELECT Departments.department_name, COUNT(*) AS employees_count, (COUNT(*) / (SELECT COUNT(*) FROM Employees JOIN Departments ON Employees.id = Departments.employee_id) * 100) AS percentage FROM Departments JOIN Employees ON Departments.employee_id = Employees.id GROUP BY department_name ORDER BY employees_count DESC;","SELECT d.department_name, COUNT(e.id) as employee_count, (COUNT(e.id) * 100.0 / COUNT(e.id)) as employee_percentage FROM Departments d JOIN Employees e ON d.employee_id = e.id GROUP BY d.department_name ORDER BY employee_count DESC;",0 What is the total weight of ingredients sourced from a certain country?,"CREATE TABLE product (product_id INT, product_name TEXT); CREATE TABLE ingredient (ingredient_id INT, product_id INT, weight FLOAT, country TEXT); ",SELECT SUM(i.weight) FROM ingredient i WHERE i.country = 'CA';,SELECT SUM(weight) FROM ingredient i JOIN product p ON i.product_id = p.product_id WHERE p.country = 'USA';,0 how many times is the cyrillic name сибач?,"CREATE TABLE table_2562572_52 (dominant_religion__2002_ VARCHAR, cyrillic_name VARCHAR);","SELECT COUNT(dominant_religion__2002_) FROM table_2562572_52 WHERE cyrillic_name = ""Сибач"";","SELECT COUNT(dominant_religion__2002_) FROM table_2562572_52 WHERE cyrillic_name = ""сиа"";",0 Insert data for a recent grant from the National Endowment for the Arts,"CREATE TABLE FundingSources (FundingSourceID INT PRIMARY KEY, Name VARCHAR(100), Amount FLOAT, Date DATE);","INSERT INTO FundingSources (FundingSourceID, Name, Amount, Date) VALUES (1, 'National Endowment for the Arts', 50000, '2021-12-15');","INSERT INTO FundingSources (FundingSourceID, Name, Amount, Date) VALUES (1, 'National Endowment for the Arts', '2022-03-01');",0 "What is the number of union members who have participated in labor rights advocacy events, by union?","CREATE TABLE labor_rights_advocacy_events (event_id INTEGER, union_name TEXT); ","SELECT union_name, COUNT(*) as num_participants FROM labor_rights_advocacy_events GROUP BY union_name;","SELECT union_name, COUNT(*) FROM labor_rights_advocacy_events GROUP BY union_name;",0 What team name belongs to Seaford?,"CREATE TABLE table_name_57 (team VARCHAR, school VARCHAR);","SELECT team FROM table_name_57 WHERE school = ""seaford"";","SELECT team FROM table_name_57 WHERE school = ""seaford"";",1 What was the constructor when riccardo patrese was the winning driver?,"CREATE TABLE table_name_88 (winning_constructor VARCHAR, winning_driver VARCHAR);","SELECT winning_constructor FROM table_name_88 WHERE winning_driver = ""riccardo patrese"";","SELECT winning_constructor FROM table_name_88 WHERE winning_driver = ""riccardo patrese"";",1 Which home team score occurred at Victoria Park?,"CREATE TABLE table_name_42 (home_team VARCHAR, venue VARCHAR);","SELECT home_team AS score FROM table_name_42 WHERE venue = ""victoria park"";","SELECT home_team AS score FROM table_name_42 WHERE venue = ""victoria park"";",1 How many pages does the edition with a volume # smaller than 8 and an ISBM of 1-40122-892-5 have?,"CREATE TABLE table_name_30 (pages INTEGER, vol__number VARCHAR, isbn VARCHAR);","SELECT SUM(pages) FROM table_name_30 WHERE vol__number < 8 AND isbn = ""1-40122-892-5"";","SELECT SUM(pages) FROM table_name_30 WHERE vol__number 8 AND isbn = ""1-40122-892-5"";",0 What was the away team score for the game played at the Brunswick Street Oval?,"CREATE TABLE table_name_15 (away_team VARCHAR, venue VARCHAR);","SELECT away_team AS score FROM table_name_15 WHERE venue = ""brunswick street oval"";","SELECT away_team AS score FROM table_name_15 WHERE venue = ""brunswick street oval"";",1 What is the total installed capacity of renewable energy projects for each city?,"CREATE TABLE Cities (CityID INT, CityName VARCHAR(50));CREATE TABLE RenewableEnergyProjects (ProjectID INT, CityID INT, InstalledCapacity INT);","SELECT Cities.CityName, SUM(RenewableEnergyProjects.InstalledCapacity) FROM Cities INNER JOIN RenewableEnergyProjects ON Cities.CityID = RenewableEnergyProjects.CityID GROUP BY Cities.CityName;","SELECT Cities.CityName, SUM(RenewableEnergyProjects.InstalledCapacity) FROM Cities INNER JOIN RenewableEnergyProjects ON Cities.CityID = RenewableEnergyProjects.CityID GROUP BY Cities.CityName;",1 "What is the time for a grid greater than 20, fewer than 26 laps, and the Aprilia manufacturer?","CREATE TABLE table_name_86 (time_retired VARCHAR, manufacturer VARCHAR, grid VARCHAR, laps VARCHAR);","SELECT time_retired FROM table_name_86 WHERE grid > 20 AND laps < 26 AND manufacturer = ""aprilia"";","SELECT time_retired FROM table_name_86 WHERE grid > 20 AND laps 26 AND manufacturer = ""aprilia"";",0 How many autonomous driving research projects were completed in '2022' in the 'autonomous_driving' schema?,"CREATE TABLE autonomous_driving (id INT, project_name VARCHAR(50), start_date DATE, end_date DATE); ",SELECT COUNT(*) FROM autonomous_driving WHERE YEAR(start_date) = 2022 AND YEAR(end_date) = 2022;,SELECT COUNT(*) FROM autonomous_driving WHERE YEAR(start_date) = 2022 AND YEAR(end_date) = 2022;,1 Update the jerseyNumber of athletes who have changed their jersey numbers in the last week in the Athletes table.,"CREATE TABLE JerseyChanges (ChangeID INT, AthleteID INT, OldJerseyNumber INT, NewJerseyNumber INT, ChangeDate DATE); CREATE TABLE Athletes (AthleteID INT, AthleteName VARCHAR(100), JerseyNumber INT);","UPDATE Athletes SET JerseyNumber = jc.NewJerseyNumber FROM Athletes a JOIN JerseyChanges jc ON a.AthleteID = jc.AthleteID WHERE jc.ChangeDate > DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK);","UPDATE JerseyChanges SET JerseyNumber = JerseyNumber WHERE ChangeDate >= DATEADD(week, -1, GETDATE());",0 List all routes that serve the station with station_id 1.,CREATE VIEW stations_detailed AS SELECT * FROM stations s JOIN routes r ON s.station_id = r.stations_served; SELECT name FROM stations_detailed WHERE station_id = 1;,CREATE VIEW stations_detailed AS SELECT * FROM stations s JOIN routes r ON s.station_id = r.stations_served; SELECT name FROM stations_detailed WHERE station_id = 1;,SELECT * FROM stations_detailed;,0 What is the part 3 with *hegait in part 2?,"CREATE TABLE table_name_31 (part_3 VARCHAR, part_2 VARCHAR);","SELECT part_3 FROM table_name_31 WHERE part_2 = ""*hegait"";","SELECT part_3 FROM table_name_31 WHERE part_2 = ""*hegait"";",1 Who are the cybersecurity analysts working in a specific department?,"CREATE TABLE Employee (ID INT, Name VARCHAR(50), Position VARCHAR(50), Department VARCHAR(50)); ","SELECT Name, Position FROM Employee WHERE Department = 'Intelligence Agency A' AND Position = 'Cybersecurity Analyst';",SELECT Name FROM Employee WHERE Department = 'Cybersecurity Analyst';,0 How many years did the team that has a Singles win-Loss of 4-9 and first played before 1999?,"CREATE TABLE table_name_28 (years_played INTEGER, singles_win_loss VARCHAR, first_year_played VARCHAR);","SELECT SUM(years_played) FROM table_name_28 WHERE singles_win_loss = ""4-9"" AND first_year_played < 1999;","SELECT SUM(years_played) FROM table_name_28 WHERE singles_win_loss = ""4-9"" AND first_year_played 1999;",0 What was the time of round 2 against Taylor Mccorriston?,"CREATE TABLE table_name_69 (time VARCHAR, round VARCHAR, opponent VARCHAR);","SELECT time FROM table_name_69 WHERE round = ""2"" AND opponent = ""taylor mccorriston"";","SELECT time FROM table_name_69 WHERE round = 2 AND opponent = ""taylor mccorriston"";",0 "Delete the row with id 3 from the ""wastewater_treatment_plants"" table","CREATE TABLE wastewater_treatment_plants (id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255), location VARCHAR(255), capacity INT);",DELETE FROM wastewater_treatment_plants WHERE id = 3;,DELETE FROM wastewater_treatment_plants WHERE id = 3;,1 What is the average production quantity (in metric tons) of Neodymium from mines located in Australia?,"CREATE TABLE mines (id INT, name TEXT, location TEXT, production_quantity INT); ",SELECT AVG(production_quantity) FROM mines WHERE location = 'Australia' AND element = 'Neodymium';,SELECT AVG(production_quantity) FROM mines WHERE location = 'Australia' AND name LIKE '%Neodymium%';,0 What was the time for the match that resulted in a loss in less than 3 rounds?,"CREATE TABLE table_name_84 (time VARCHAR, res VARCHAR, round VARCHAR);","SELECT time FROM table_name_84 WHERE res = ""loss"" AND round < 3;","SELECT time FROM table_name_84 WHERE res = ""loss"" AND round 3;",0 "How many Golds did Rank 10 get, with a Bronze larger than 2?","CREATE TABLE table_name_99 (gold VARCHAR, rank VARCHAR, bronze VARCHAR);","SELECT COUNT(gold) FROM table_name_99 WHERE rank = ""10"" AND bronze > 2;",SELECT COUNT(gold) FROM table_name_99 WHERE rank = 10 AND bronze > 2;,0 "Calculate the average daily sales of each menu item, over the last 30 days.","CREATE TABLE Sales (SaleID INT, MenuID INT, QuantitySold INT, SaleDate DATE);CREATE TABLE Menu (MenuID INT, MenuItem VARCHAR(50), Price DECIMAL(5,2));","SELECT MenuItem, AVG(QuantitySold) AS AvgDailySales FROM Sales JOIN Menu ON Sales.MenuID = Menu.MenuID WHERE SaleDate BETWEEN DATEADD(DAY, -30, GETDATE()) AND GETDATE() GROUP BY MenuItem;","SELECT MenuItem, AVG(QuantitySold) as AvgDailySales FROM Sales JOIN Menu ON Sales.MenuID = Menu.MenuID WHERE SaleDate >= DATEADD(day, -30, GETDATE()) GROUP BY MenuItem;",0 "What is the nationality with less than 9 heat, and a time of 1:01.87?","CREATE TABLE table_name_3 (nationality VARCHAR, heat VARCHAR, time VARCHAR);","SELECT nationality FROM table_name_3 WHERE heat < 9 AND time = ""1:01.87"";","SELECT nationality FROM table_name_3 WHERE heat 9 AND time = ""1:01.87"";",0 How many matches have 0 as the lost?,"CREATE TABLE table_name_32 (match VARCHAR, lost VARCHAR);",SELECT COUNT(match) FROM table_name_32 WHERE lost = 0;,SELECT COUNT(match) FROM table_name_32 WHERE lost = 0;,1 Find the temperature difference between the highest and lowest temperature records for each farm.,"CREATE TABLE Satellite_Imagery (id INT, farm_id INT, date DATE, moisture INT, temperature INT); ","SELECT farm_id, MAX(temperature) - MIN(temperature) FROM Satellite_Imagery GROUP BY farm_id;","SELECT farm_id, MAX(temperature) - MIN(temperature) FROM Satellite_Imagery GROUP BY farm_id;",1 List all housing policies for co-ownership properties.,"CREATE TABLE housing_policy (policy_id INT, property_id INT, policy_description TEXT); ",SELECT hp.policy_description FROM housing_policy hp JOIN property_coowners pc ON hp.property_id = pc.property_id WHERE pc.property_id IN (SELECT property_id FROM property_coowners);,SELECT policy_description FROM housing_policy WHERE property_id IN (SELECT property_id FROM co-ownership properties);,0 What was the attendance for the North Melbourne's home game?,"CREATE TABLE table_name_31 (crowd VARCHAR, home_team VARCHAR);","SELECT crowd FROM table_name_31 WHERE home_team = ""north melbourne"";","SELECT crowd FROM table_name_31 WHERE home_team = ""north melbourne"";",1 I want to know the sum of fa cup goals for david mirfin and total goals less than 1,"CREATE TABLE table_name_59 (fa_cup_goals INTEGER, name VARCHAR, total_goals VARCHAR);","SELECT SUM(fa_cup_goals) FROM table_name_59 WHERE name = ""david mirfin"" AND total_goals < 1;","SELECT SUM(fa_cup_goals) FROM table_name_59 WHERE name = ""david mirfin"" AND total_goals 1;",0 "What is the total number of games played of the club with less than 40 goals scored, 9 losses, 39 goals conceded, and more than 2 draws?","CREATE TABLE table_name_33 (games_played VARCHAR, draws VARCHAR, goals_conceded VARCHAR, goals_scored VARCHAR, loses VARCHAR);",SELECT COUNT(games_played) FROM table_name_33 WHERE goals_scored < 40 AND loses = 9 AND goals_conceded = 39 AND draws > 2;,SELECT COUNT(games_played) FROM table_name_33 WHERE goals_scored 40 AND loses = 9 AND goals_conceded = 39 AND draws > 2;,0 What are the notes of the number 1 rank?,"CREATE TABLE table_name_52 (notes VARCHAR, rank VARCHAR);",SELECT notes FROM table_name_52 WHERE rank = 1;,"SELECT notes FROM table_name_52 WHERE rank = ""number 1"";",0 What was the maximum cost of a rural infrastructure project in the state of Odisha in 2019?,"CREATE TABLE rural_infrastructure (id INT, state VARCHAR(50), cost FLOAT, project_type VARCHAR(50), start_date DATE); ",SELECT MAX(cost) FROM rural_infrastructure WHERE state = 'Odisha' AND start_date >= '2019-01-01' AND start_date < '2020-01-01' AND project_type = 'Bridge Construction';,SELECT MAX(cost) FROM rural_infrastructure WHERE state = 'Odisha' AND YEAR(start_date) = 2019;,0 "List the number of unique attendees for each program category's events, excluding repeating attendees.","CREATE TABLE program_events (id INT, program_category VARCHAR(15), attendee_id INT);","SELECT program_category, COUNT(DISTINCT attendee_id) AS unique_attendees FROM program_events GROUP BY program_category;","SELECT program_category, COUNT(DISTINCT attendee_id) as unique_attendees FROM program_events GROUP BY program_category;",0 Find the number of visitors who attended exhibitions in Tokyo or New York.,"CREATE TABLE Visitors (id INT, city VARCHAR(20)); ","SELECT COUNT(*) FROM Visitors WHERE city IN ('Tokyo', 'New York');","SELECT COUNT(*) FROM Visitors WHERE city IN ('Tokyo', 'New York');",1 "What is Speed, when Time is 1:24.23.0?","CREATE TABLE table_name_98 (speed VARCHAR, time VARCHAR);","SELECT speed FROM table_name_98 WHERE time = ""1:24.23.0"";","SELECT speed FROM table_name_98 WHERE time = ""1:24.23.0"";",1 Update the production of Dysprosium in the Brazilian mine for March 2021 to 95.0.,"CREATE TABLE mine (id INT, name TEXT, location TEXT, Dysprosium_monthly_production FLOAT, timestamp TIMESTAMP); ",UPDATE mine SET Dysprosium_monthly_production = 95.0 WHERE name = 'Brazilian Mine' AND EXTRACT(MONTH FROM timestamp) = 3 AND EXTRACT(YEAR FROM timestamp) = 2021;,UPDATE mine SET Dysprosium_monthly_production = 95.0 WHERE location = 'Brazil' AND timestamp BETWEEN '2021-03-01' AND '2021-03-31';,0 "What is the average fare for each route in the 'route' table, grouped by route type?","CREATE TABLE route (id INT, name TEXT, type TEXT, length FLOAT, fare FLOAT); ","SELECT type, AVG(fare) as avg_fare FROM route GROUP BY type;","SELECT type, AVG(fare) FROM route GROUP BY type;",0 How many ships were involved in maritime accidents in the Pacific Ocean in 2020?,"CREATE TABLE maritime_accidents (ocean TEXT, year INT, ships_involved INT); ",SELECT ships_involved FROM maritime_accidents WHERE ocean = 'Pacific' AND year = 2020;,SELECT ships_involved FROM maritime_accidents WHERE ocean = 'Pacific Ocean' AND year = 2020;,0 What are the Asian countries which have a population larger than that of any country in Africa?,"CREATE TABLE country (Name VARCHAR, Continent VARCHAR, population INTEGER);","SELECT Name FROM country WHERE Continent = ""Asia"" AND population > (SELECT MIN(population) FROM country WHERE Continent = ""Africa"");",SELECT Name FROM country WHERE Continent = 'Asia' AND population > (SELECT MAX(population) FROM country WHERE Continent = 'Africa');,0 Which state in the USA has the highest energy storage capacity?,"CREATE TABLE energy_storage (state VARCHAR(255), source_type VARCHAR(255), capacity INT); ","SELECT state, MAX(capacity) FROM energy_storage GROUP BY state;","SELECT state, MAX(capacity) FROM energy_storage GROUP BY state;",1 What is the total number of visitors who attended exhibitions in Mumbai with an entry fee below 5?,"CREATE TABLE Exhibitions (exhibition_id INT, location VARCHAR(20), entry_fee INT); CREATE TABLE Visitors (visitor_id INT, exhibition_id INT); ",SELECT COUNT(DISTINCT visitor_id) FROM Visitors v JOIN Exhibitions e ON v.exhibition_id = e.exhibition_id WHERE e.location = 'Mumbai' AND e.entry_fee < 5;,SELECT COUNT(DISTINCT Visitors.visitor_id) FROM Visitors INNER JOIN Exhibitions ON Visitors.exhibition_id = Exhibitions.exhibition_id WHERE Exhibitions.location = 'Mumbai' AND Visitors.entry_fee 5;,0 What is the total quantity of sustainable fabric used by each designer?,"CREATE TABLE Designers (DesignerID INT, DesignerName TEXT, IsSustainableFabric BOOLEAN); CREATE TABLE FabricUsage (DesignerID INT, Fabric TEXT, Quantity INT); ","SELECT DesignerName, SUM(Quantity) as TotalSustainableQuantity FROM Designers JOIN FabricUsage ON Designers.DesignerID = FabricUsage.DesignerID WHERE IsSustainableFabric = true GROUP BY DesignerName;","SELECT DesignerName, SUM(Quantity) FROM FabricUsage JOIN Designers ON FabricUsage.DesignerID = Designers.DesignerID WHERE IsSustainableFabric = TRUE GROUP BY DesignerName;",0 What are the names and severity levels of all high priority vulnerabilities?,"CREATE TABLE vulnerabilities (id INT, name VARCHAR, severity VARCHAR); ","SELECT name, severity FROM vulnerabilities WHERE severity = 'High';","SELECT name, severity FROM vulnerabilities WHERE severity = ""high priority"";",0 how many candidates with result being new seat democratic gain,"CREATE TABLE table_1341604_10 (candidates VARCHAR, result VARCHAR);","SELECT COUNT(candidates) FROM table_1341604_10 WHERE result = ""New seat Democratic gain"";","SELECT COUNT(candidates) FROM table_1341604_10 WHERE result = ""New Seat Democratic Gain"";",0 "What is the total number of hospitals and clinics in each state, including those without any healthcare workers?","CREATE TABLE healthcare_facilities (id INT, name TEXT, state TEXT, workers INT); ","SELECT state, COUNT(*) FROM healthcare_facilities GROUP BY state;","SELECT state, SUM(workers) FROM healthcare_facilities GROUP BY state;",0 What country scored 71-66-66-71=274?,"CREATE TABLE table_name_32 (country VARCHAR, score VARCHAR);",SELECT country FROM table_name_32 WHERE score = 71 - 66 - 66 - 71 = 274;,SELECT country FROM table_name_32 WHERE score = 71 - 66 - 66 - 71 = 274;,1 what's party with district being tennessee 3,"CREATE TABLE table_1341865_44 (party VARCHAR, district VARCHAR);","SELECT party FROM table_1341865_44 WHERE district = ""Tennessee 3"";","SELECT party FROM table_1341865_44 WHERE district = ""Tennessee 3"";",1 "Which Bronze has a Nation of austria, and a Total larger than 6?","CREATE TABLE table_name_21 (bronze INTEGER, nation VARCHAR, total VARCHAR);","SELECT MAX(bronze) FROM table_name_21 WHERE nation = ""austria"" AND total > 6;","SELECT AVG(bronze) FROM table_name_21 WHERE nation = ""austria"" AND total > 6;",0 Which is the total number in the 2010 Census in Oconee County where the area in square miles was less than 674?,"CREATE TABLE table_name_9 (county VARCHAR, area__sq_mi_ VARCHAR);","SELECT SUM(2010 AS _census_population) FROM table_name_9 WHERE county = ""oconee county"" AND area__sq_mi_ < 674;",SELECT COUNT(county) FROM table_name_9 WHERE area__sq_mi_ 674;,0 What is the minimum age of unvaccinated patients against measles in Florida?,"CREATE TABLE Patients (PatientID INT, Age INT, Gender TEXT, VaccinationStatus TEXT, State TEXT); ",SELECT MIN(Age) FROM Patients WHERE VaccinationStatus = 'Not Vaccinated' AND State = 'Florida' AND Disease = 'Measles';,SELECT MIN(Age) FROM Patients WHERE VaccinationStatus = 'Unvaccinated' AND State = 'Florida';,0 Identify the top 3 customers with the highest total freight costs in Africa.,"CREATE TABLE Customer_Freight_Costs (id INT, freight_date DATETIME, freight_country VARCHAR(50), customer_id INT, freight_cost DECIMAL(10, 2)); ","SELECT customer_id, SUM(freight_cost) AS total_cost FROM Customer_Freight_Costs WHERE freight_country IN ('South Africa', 'Egypt', 'Nigeria', 'Algeria', 'Morocco') GROUP BY customer_id ORDER BY total_cost DESC LIMIT 3;","SELECT customer_id, SUM(freight_cost) as total_cost FROM Customer_Freight_Costs WHERE freight_country = 'Africa' GROUP BY customer_id ORDER BY total_cost DESC LIMIT 3;",0 "What is the average depth of all marine protected areas in the Atlantic Ocean, ranked by depth?","CREATE TABLE atlantic_protected_areas (id INT, name VARCHAR(255), depth FLOAT, area_size FLOAT); ","SELECT depth, name FROM (SELECT depth, name, ROW_NUMBER() OVER (ORDER BY depth DESC) AS rn FROM atlantic_protected_areas) t WHERE rn = 1;","SELECT AVG(depth) as avg_depth, RANK() OVER (ORDER BY depth DESC) as rank FROM atlantic_protected_areas;",0 What is the price of eco-friendly garments made with hemp?,"CREATE TABLE garments (id INT, style VARCHAR(255), material VARCHAR(255), price DECIMAL(5,2), sustainable BOOLEAN); ","SELECT style, price FROM garments WHERE sustainable = true AND material = 'Hemp';",SELECT price FROM garments WHERE material = 'Hemp' AND sustainable = TRUE;,0 What is the difference in revenue between ethical and non-ethical products in each country?,"CREATE TABLE product_revenue (product_id int, is_ethical boolean, revenue decimal, country varchar);","SELECT country, (SUM(CASE WHEN is_ethical THEN revenue ELSE 0 END) - SUM(CASE WHEN NOT is_ethical THEN revenue ELSE 0 END)) AS revenue_difference FROM product_revenue GROUP BY country;","SELECT country, SUM(revenue) - SUM(revenue) as total_revenue FROM product_revenue GROUP BY country;",0 What is the Grid for Rider Ruben Xaus?,"CREATE TABLE table_name_22 (grid INTEGER, rider VARCHAR);","SELECT MIN(grid) FROM table_name_22 WHERE rider = ""ruben xaus"";","SELECT SUM(grid) FROM table_name_22 WHERE rider = ""ruben xaus"";",0 What are the titles of episodes with 5.66 million US viewers?,"CREATE TABLE table_2866514_1 (title VARCHAR, us_viewers__million_ VARCHAR);","SELECT title FROM table_2866514_1 WHERE us_viewers__million_ = ""5.66"";","SELECT title FROM table_2866514_1 WHERE us_viewers__million_ = ""5.66"";",1 What is the number of vaccines administered per state?,"CREATE TABLE states (state_id INT PRIMARY KEY, state_name VARCHAR(255)); CREATE TABLE vaccinations (state_id INT, vaccine_count INT); ","SELECT s.state_name, v.vaccine_count FROM states s JOIN vaccinations v ON s.state_id = v.state_id;","SELECT s.state_name, SUM(i.vaccine_count) as total_vaccinations FROM states s JOIN vaccinations i ON s.state_id = i.state_id GROUP BY s.state_name;",0 Name the Player who has a Place of t7 in Country of united states?,"CREATE TABLE table_name_45 (player VARCHAR, place VARCHAR, country VARCHAR);","SELECT player FROM table_name_45 WHERE place = ""t7"" AND country = ""united states"";","SELECT player FROM table_name_45 WHERE place = ""t7"" AND country = ""united states"";",1 What is the total revenue by food category for a specific restaurant in March 2021?,"CREATE TABLE restaurant (restaurant_id INT, name TEXT); CREATE TABLE menu (menu_id INT, restaurant_id INT, food_category TEXT, price DECIMAL(5,2)); ","SELECT m.food_category, SUM(m.price) AS total_revenue FROM menu m JOIN restaurant r ON m.restaurant_id = r.restaurant_id WHERE r.name = 'Restaurant A' AND m.food_category IS NOT NULL AND m.price > 0 AND EXTRACT(MONTH FROM m.order_date) = 3 AND EXTRACT(YEAR FROM m.order_date) = 2021 GROUP BY m.food_category;","SELECT m.food_category, SUM(m.price) as total_revenue FROM menu m JOIN restaurant r ON m.restaurant_id = r.restaurant_id WHERE r.name = 'Restaurant A' GROUP BY m.food_category;",0 Which Congress has a # of cosponsors of 19?,"CREATE TABLE table_name_51 (congress VARCHAR, _number_of_cosponsors VARCHAR);",SELECT congress FROM table_name_51 WHERE _number_of_cosponsors = 19;,"SELECT congress FROM table_name_51 WHERE _number_of_cosponsors = ""19"";",0 What is the distribution of startups by founding year?,"CREATE TABLE company (id INT, name TEXT, founding_year INT); ","SELECT founding_year, COUNT(*) as count FROM company GROUP BY founding_year;","SELECT founding_year, COUNT(*) as startup_count FROM company GROUP BY founding_year;",0 "What is the average number of hours contributed per volunteer, for each organization?","CREATE TABLE volunteers (vol_id INT, org_id INT, hours_contributed INT, volunteer_name TEXT);CREATE TABLE organizations (org_id INT, org_name TEXT); ","SELECT organizations.org_name, AVG(volunteers.hours_contributed) AS avg_hours_per_volunteer FROM organizations INNER JOIN volunteers ON organizations.org_id = volunteers.org_id GROUP BY organizations.org_name;","SELECT o.org_name, AVG(v.hours_contributed) as avg_hours_per_volunteer FROM volunteers v JOIN organizations o ON v.org_id = o.org_id GROUP BY o.org_name;",0 Identify dispensaries in California with the highest total sales in Q2 2022?,"CREATE TABLE sales (date DATE, dispensary VARCHAR(255), total_sales DECIMAL(10,2)); CREATE TABLE dispensaries (name VARCHAR(255), state VARCHAR(2)); ","SELECT dispensary, SUM(total_sales) as total_sales FROM sales JOIN dispensaries ON sales.dispensary = dispensaries.name WHERE EXTRACT(QUARTER FROM date) = 2 AND EXTRACT(YEAR FROM date) = 2022 AND state = 'CA' GROUP BY dispensary ORDER BY total_sales DESC LIMIT 1;","SELECT dispensary, SUM(total_sales) as total_sales FROM sales WHERE date BETWEEN '2022-04-01' AND '2022-06-30' AND state = 'California' GROUP BY dispensary ORDER BY total_sales DESC LIMIT 1;",0 List the number of hours played by the top 10 players in 'World of Warcraft',"CREATE TABLE player_stats (player_id INT, game_id INT, hours_played INT, PRIMARY KEY (player_id, game_id)); CREATE TABLE game_titles (game_id INT, title VARCHAR(50), PRIMARY KEY (game_id)); ","SELECT player_id, SUM(hours_played) as total_hours_played FROM player_stats ps INNER JOIN game_titles gt ON ps.game_id = gt.game_id WHERE gt.title = 'World of Warcraft' GROUP BY player_id ORDER BY total_hours_played DESC LIMIT 10;","SELECT p.player_id, SUM(ps.hours_played) as total_hours_played FROM player_stats ps JOIN game_titles gt ON ps.game_id = gt.game_id WHERE gt.title = 'World of Warcraft' GROUP BY p.player_id ORDER BY total_hours_played DESC LIMIT 10;",0 Find the three most expensive procedures.,"CREATE TABLE procedures (name VARCHAR, cost VARCHAR);",SELECT name FROM procedures ORDER BY cost LIMIT 3;,SELECT name FROM procedures ORDER BY cost DESC LIMIT 3;,0 Who is every name for time(cet) of 09:03?,"CREATE TABLE table_21536557_2 (name VARCHAR, time__cet_ VARCHAR);","SELECT name FROM table_21536557_2 WHERE time__cet_ = ""09:03"";","SELECT name FROM table_21536557_2 WHERE time__cet_ = ""09:03"";",1 What is the total revenue for basketball ticket sales?,"CREATE TABLE ticket_sales (sport VARCHAR(50), revenue DECIMAL(10, 2)); ",SELECT SUM(revenue) FROM ticket_sales WHERE sport = 'Basketball';,SELECT SUM(revenue) FROM ticket_sales WHERE sport = 'Basketball';,1 Find the total installed energy storage capacity in Texas and Ontario.,"CREATE TABLE energy_storage (id INT, state VARCHAR(255), name VARCHAR(255), capacity FLOAT); ","SELECT SUM(capacity) FROM energy_storage WHERE state IN ('Texas', 'Ontario');","SELECT SUM(capacity) FROM energy_storage WHERE state IN ('Texas', 'Ontario');",1 What is the average revenue per restaurant in 'California'?,"CREATE TABLE restaurants (name TEXT, revenue FLOAT, location TEXT); ",SELECT AVG(revenue) FROM restaurants WHERE location = 'California';,SELECT AVG(revenue) FROM restaurants WHERE location = 'California';,1 How many high-risk customers have had transactions exceeding $1000 in the past week?,"CREATE TABLE customers (customer_id INT, name VARCHAR(50), risk_level VARCHAR(10)); CREATE TABLE transactions (transaction_id INT, customer_id INT, amount DECIMAL(10, 2), transaction_date DATE); ","SELECT COUNT(c.customer_id) AS high_risk_customers FROM customers c INNER JOIN transactions t ON c.customer_id = t.customer_id WHERE c.risk_level = 'high' AND t.amount > 1000 AND t.transaction_date >= DATE_SUB(CURDATE(), INTERVAL 1 WEEK);","SELECT COUNT(DISTINCT customers.customer_id) FROM customers INNER JOIN transactions ON customers.customer_id = transactions.customer_id WHERE customers.risk_level = 'high' AND transactions.amount > 1000 AND transactions.transaction_date >= DATEADD(week, -1, GETDATE());",0 What is the percentage of factories meeting the living wage standard by country?,"CREATE TABLE Factories (id INT, name TEXT, country TEXT, living_wage_standard BOOLEAN); ","SELECT country, 100.0 * COUNT(*) FILTER (WHERE living_wage_standard) / COUNT(*) AS percentage FROM Factories GROUP BY country;","SELECT country, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Factories WHERE living_wage_standard = true GROUP BY country) as percentage FROM Factories WHERE living_wage_standard = true GROUP BY country;",0 What is the type of electronic with the Gamecube Platform?,"CREATE TABLE table_name_10 (type VARCHAR, platform VARCHAR);","SELECT type FROM table_name_10 WHERE platform = ""gamecube"";","SELECT type FROM table_name_10 WHERE platform = ""gamecube"";",1 What is the name before 1954 with more than 15 floors?,"CREATE TABLE table_name_61 (name VARCHAR, year VARCHAR, floors VARCHAR);",SELECT name FROM table_name_61 WHERE year < 1954 AND floors > 15;,SELECT name FROM table_name_61 WHERE year 1954 AND floors > 15;,0 Who was the visitor on november 14 with leclaire recording the decision?,"CREATE TABLE table_name_43 (visitor VARCHAR, decision VARCHAR, date VARCHAR);","SELECT visitor FROM table_name_43 WHERE decision = ""leclaire"" AND date = ""november 14"";","SELECT visitor FROM table_name_43 WHERE decision = ""leclaire"" AND date = ""november 14"";",1 What is the average revenue of products made from 'Recycled Paper' in each country?,"CREATE TABLE products (product_id INT, name TEXT, revenue FLOAT, material TEXT, country TEXT); CREATE TABLE materials (material TEXT, type TEXT); ","SELECT materials.material, AVG(products.revenue) FROM products INNER JOIN materials ON products.material = materials.material WHERE materials.type = 'Paper' GROUP BY materials.material;","SELECT country, AVG(revenue) FROM products JOIN materials ON products.material = materials.material WHERE materials.type = 'Recycled Paper' GROUP BY country;",0 What is the total quantity of sustainable materials used in textile production in the Middle East?,"CREATE TABLE TextileProduction (id INT, material VARCHAR(255), region VARCHAR(255), quantity INT); ","SELECT SUM(quantity) FROM TextileProduction WHERE material IN ('Organic Cotton', 'Recycled Polyester') AND region = 'Middle East';",SELECT SUM(quantity) FROM TextileProduction WHERE region = 'Middle East';,0 Add the following new rare earth element to the production_data table: Gadolinium with a quantity of 450 from 2020,"CREATE TABLE production_data ( id INT PRIMARY KEY, year INT, refined_rare_earth_element TEXT, quantity INT );","INSERT INTO production_data (id, year, refined_rare_earth_element, quantity) VALUES (5, 2020, 'Gadolinium', 450);","INSERT INTO production_data (id, year, refined_rare_earth_element, quantity) VALUES ('Gadolinium', 2020, 450);",0 What is the trend in soil moisture for each crop type over the past 5 years?,"CREATE TABLE SoilMoisture (date DATE, soil_moisture INT, crop_type VARCHAR(20));","SELECT crop_type, soil_moisture, ROW_NUMBER() OVER(PARTITION BY crop_type ORDER BY date DESC) as rank, AVG(soil_moisture) OVER(PARTITION BY crop_type ORDER BY date ROWS BETWEEN 3 PRECEDING AND CURRENT ROW) as avg_soil_moisture FROM SoilMoisture WHERE date >= DATEADD(year, -5, CURRENT_DATE);","SELECT crop_type, SUM(soil_moisture) as total_moisture FROM SoilMoisture WHERE date >= DATEADD(year, -5, GETDATE()) GROUP BY crop_type;",0 How many players are active in each region?,"CREATE TABLE Players (PlayerID INT, Name VARCHAR(50), Region VARCHAR(50));","SELECT p.Region, COUNT(*) as ActivePlayers FROM Players p GROUP BY p.Region;","SELECT Region, COUNT(*) FROM Players GROUP BY Region;",0 What was the score of the game in which the Toronto Maple Leafs were visitors?,"CREATE TABLE table_name_97 (score VARCHAR, visitor VARCHAR);","SELECT score FROM table_name_97 WHERE visitor = ""toronto maple leafs"";","SELECT score FROM table_name_97 WHERE visitor = ""toronto maple leafs"";",1 Name the driver for june 23 and team of penske racing,"CREATE TABLE table_16493961_1 (driver VARCHAR, date VARCHAR, team VARCHAR);","SELECT driver FROM table_16493961_1 WHERE date = ""June 23"" AND team = ""Penske Racing"";","SELECT driver FROM table_16493961_1 WHERE date = ""June 23"" AND team = ""Penske Racing"";",1 What is the total training cost for each department in the last quarter?,"CREATE TABLE Trainings (TrainingID int, Department varchar(20), Cost int, Date datetime); ","SELECT Department, SUM(Cost) FROM Trainings WHERE Date >= '2022-01-01' AND Date < '2022-04-01' GROUP BY Department;","SELECT Department, SUM(Cost) as TotalCost FROM Trainings WHERE Date >= DATEADD(quarter, -1, GETDATE()) GROUP BY Department;",0 What was the average citizen feedback score for public parks in Melbourne in 2022?,"CREATE TABLE citizen_feedback (year INT, city VARCHAR(20), service VARCHAR(20), score INT); ",SELECT AVG(score) FROM citizen_feedback WHERE city = 'Melbourne' AND service = 'Public Parks' AND year = 2022;,SELECT AVG(score) FROM citizen_feedback WHERE city = 'Melbourne' AND service = 'Public Parks' AND year = 2022;,1 "What are the top 5 most common issues in technology for social good, and how many projects address each issue?","CREATE TABLE issues (id INT, issue VARCHAR(50), project_count INT); ","SELECT issue, project_count FROM issues ORDER BY project_count DESC LIMIT 5;","SELECT issue, project_count FROM issues ORDER BY project_count DESC LIMIT 5;",1 Name the period for appearances being 380,"CREATE TABLE table_24565004_2 (period VARCHAR, appearances¹ VARCHAR);",SELECT period FROM table_24565004_2 WHERE appearances¹ = 380;,SELECT period FROM table_24565004_2 WHERE appearances1 = 380;,0 "What is the Name, when the Time is 8:10.1?","CREATE TABLE table_name_92 (name VARCHAR, time VARCHAR);","SELECT name FROM table_name_92 WHERE time = ""8:10.1"";","SELECT name FROM table_name_92 WHERE time = ""8:10.1"";",1 What is the sum of Artist Steve Hepburn's Mintage?,"CREATE TABLE table_name_75 (mintage INTEGER, artist VARCHAR);","SELECT SUM(mintage) FROM table_name_75 WHERE artist = ""steve hepburn"";","SELECT SUM(mintage) FROM table_name_75 WHERE artist = ""steve hepburn"";",1 "What Label released on October 25, 1984, in the format of Stereo LP?","CREATE TABLE table_name_79 (label VARCHAR, date VARCHAR, format VARCHAR);","SELECT label FROM table_name_79 WHERE date = ""october 25, 1984"" AND format = ""stereo lp"";","SELECT label FROM table_name_79 WHERE date = ""october 25, 1984"" AND format = ""stereo lp"";",1 "what is the date when ramon sessions (8) had the high assists, richard jefferson (29) had the high points and the score was w 107–78 (ot)?","CREATE TABLE table_name_32 (date VARCHAR, score VARCHAR, high_assists VARCHAR, high_points VARCHAR);","SELECT date FROM table_name_32 WHERE high_assists = ""ramon sessions (8)"" AND high_points = ""richard jefferson (29)"" AND score = ""w 107–78 (ot)"";","SELECT date FROM table_name_32 WHERE high_assists = ""ramon sessions (8)"" AND high_points = ""richard jefferson (29)"" AND score = ""w 107–78 (ot)"";",1 "What is the entry for Upper index Kcal/ Nm 3 for the row with an entry that has a Lower index MJ/ Nm 3 of 47.91, and an Upper index MJ/ Nm 3 larger than 53.28?","CREATE TABLE table_name_93 (upper_index_kcal__nm_3 INTEGER, lower_index_mj__nm_3 VARCHAR, upper_index_mj__nm_3 VARCHAR);",SELECT SUM(upper_index_kcal__nm_3) FROM table_name_93 WHERE lower_index_mj__nm_3 = 47.91 AND upper_index_mj__nm_3 > 53.28;,SELECT AVG(upper_index_kcal__nm_3) FROM table_name_93 WHERE lower_index_mj__nm_3 = 47.91 AND upper_index_mj__nm_3 > 53.28;,0 Delete the record with ID 3 from the 'Staff' table.,"CREATE TABLE Staff (StaffID INT, FirstName VARCHAR(50), LastName VARCHAR(50), Position VARCHAR(50)); ",DELETE FROM Staff WHERE StaffID = 3;,DELETE FROM Staff WHERE StaffID = 3;,1 which Score has a Competition of match reports?,"CREATE TABLE table_name_81 (score VARCHAR, competition VARCHAR);","SELECT score FROM table_name_81 WHERE competition = ""match reports"";","SELECT score FROM table_name_81 WHERE competition = ""match reports"";",1 What is the average donation amount from donors in Japan in 2022?,"CREATE TABLE donors (id INT, name TEXT, country TEXT, donation_amount DECIMAL, donation_year INT); ",SELECT AVG(donation_amount) FROM donors WHERE country = 'Japan' AND donation_year = 2022;,SELECT AVG(donation_amount) FROM donors WHERE country = 'Japan' AND donation_year = 2022;,1 Which Suburb was First Settled as a Suburb in 1962?,"CREATE TABLE table_name_54 (suburb VARCHAR, date_first_settled_as_a_suburb VARCHAR);",SELECT suburb FROM table_name_54 WHERE date_first_settled_as_a_suburb = 1962;,"SELECT suburb FROM table_name_54 WHERE date_first_settled_as_a_suburb = ""1962"";",0 How many students enrolled in class ACCT-211?,"CREATE TABLE enroll (class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR);",SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211';,"SELECT COUNT(*) FROM enroll AS T1 JOIN CLASS AS T2 ON T1.class_code = T2.class_code WHERE T2.crs_code = ""ACCT-211"";",0 "Update peacekeeping units with unit_id 104, 105, and 106 with commanding officers ""Officer D"", ""Officer E"", and ""Officer F""","CREATE TABLE peacekeeping_units (unit_id INT, commanding_officer VARCHAR(20));","UPDATE peacekeeping_units SET commanding_officer = CASE unit_id WHEN 104 THEN 'Officer D' WHEN 105 THEN 'Officer E' WHEN 106 THEN 'Officer F' ELSE commanding_officer END WHERE unit_id IN (104, 105, 106);","UPDATE peacekeeping_units SET commanding_officer = 'Officer D', commanding_officer = 'Officer E', commanding_officer = 'Officer F' WHERE unit_id IN (104, 105, 106);",0 Insert a new patient 'Alice' with age 30 and diagnosis 'hypertension' into 'RuralHealthFacility2' table.,"CREATE TABLE RuralHealthFacility2 (patient_id INT, patient_name VARCHAR(50), age INT, diagnosis VARCHAR(20));","INSERT INTO RuralHealthFacility2 (patient_id, patient_name, age, diagnosis) VALUES (4, 'Alice', 30, 'hypertension');","INSERT INTO RuralHealthFacility2 (patient_id, patient_name, age, diagnosis) VALUES (30, 'Alice', 30);",0 Calculate the total budget for food justice initiatives in each state.,"CREATE TABLE food_justice_initiatives (initiative_name VARCHAR(255), state VARCHAR(255), budget FLOAT);","SELECT state, SUM(budget) as total_budget FROM food_justice_initiatives GROUP BY state;","SELECT state, SUM(budget) FROM food_justice_initiatives GROUP BY state;",0 "What director ranked higher than 1 from Universal Studios and grossed $201,957,688?","CREATE TABLE table_name_17 (director VARCHAR, gross VARCHAR, rank VARCHAR, studio VARCHAR);","SELECT director FROM table_name_17 WHERE rank > 1 AND studio = ""universal"" AND gross = ""$201,957,688"";","SELECT director FROM table_name_17 WHERE rank > 1 AND studio = ""universal studios"" AND gross = ""$201,957,688"";",0 Find the number of volunteers who joined in Q1 2021 from 'Asia'?,"CREATE TABLE volunteers (volunteer_id INT, volunteer_name TEXT, volunteer_region TEXT, volunteer_join_date DATE); ",SELECT COUNT(*) FROM volunteers WHERE EXTRACT(QUARTER FROM volunteer_join_date) = 1 AND volunteer_region = 'Asia';,SELECT COUNT(*) FROM volunteers WHERE volunteer_region = 'Asia' AND volunteer_join_date BETWEEN '2021-01-01' AND '2021-03-31';,0 Who is the opponent for the game that occurred after week 13?,"CREATE TABLE table_name_12 (opponent VARCHAR, week INTEGER);",SELECT opponent FROM table_name_12 WHERE week > 13;,SELECT opponent FROM table_name_12 WHERE week > 13;,1 What constructor has a grid less than 13 with under 9 laps?,"CREATE TABLE table_name_19 (constructor VARCHAR, grid VARCHAR, laps VARCHAR);",SELECT constructor FROM table_name_19 WHERE grid < 13 AND laps < 9;,SELECT constructor FROM table_name_19 WHERE grid 13 AND laps 9;,0 What is the average dissolved oxygen level in the Atlantic Ocean?,"CREATE TABLE OceanHealth (location VARCHAR(255), dissolved_oxygen DECIMAL(5,2)); ",SELECT AVG(dissolved_oxygen) FROM OceanHealth WHERE location = 'Atlantic Ocean';,SELECT AVG(dissolved_oxygen) FROM OceanHealth WHERE location = 'Atlantic Ocean';,1 How many successors are from the georgia 2nd district?,"CREATE TABLE table_1446600_4 (successor VARCHAR, district VARCHAR);","SELECT COUNT(successor) FROM table_1446600_4 WHERE district = ""Georgia 2nd"";","SELECT COUNT(successor) FROM table_1446600_4 WHERE district = ""Georgia 2nd"";",1 How many consecutive days has each employee been late to work?,"CREATE TABLE EmployeeAttendance (employee_id INT, attendance_date DATE); ","SELECT employee_id, attendance_date, DATEDIFF(day, LAG(attendance_date) OVER (PARTITION BY employee_id ORDER BY attendance_date), attendance_date) AS days_late FROM EmployeeAttendance;","SELECT employee_id, COUNT(*) FROM EmployeeAttendance WHERE attendance_date >= DATEADD(day, -1, GETDATE()) GROUP BY employee_id;",0 What is the number of customers in each region?,"CREATE TABLE customers (customer_id INT, name VARCHAR(50), region VARCHAR(50)); ","SELECT region, COUNT(*) FROM customers GROUP BY region;","SELECT region, COUNT(*) FROM customers GROUP BY region;",1 List all public awareness campaigns in Asia related to depression.,"CREATE TABLE campaigns (id INT, name VARCHAR(50), region VARCHAR(50)); ",SELECT campaigns.name FROM campaigns WHERE campaigns.region = 'Asia' AND campaigns.name LIKE '%depression%';,SELECT name FROM campaigns WHERE region = 'Asia' AND name LIKE '%Depression%';,0 "Which Test Standard has a Usage of secondary filters, and a Class of f5? Question 4","CREATE TABLE table_name_28 (test_standard VARCHAR, usage VARCHAR, class VARCHAR);","SELECT test_standard FROM table_name_28 WHERE usage = ""secondary filters"" AND class = ""f5"";","SELECT test_standard FROM table_name_28 WHERE usage = ""secondary filters"" AND class = ""f5"";",1 What is the order number that has Aretha Franklin as the original artist?,"CREATE TABLE table_name_97 (order__number VARCHAR, original_artist VARCHAR);","SELECT order__number FROM table_name_97 WHERE original_artist = ""aretha franklin"";","SELECT order__number FROM table_name_97 WHERE original_artist = ""aretha franklin"";",1 How many IoT soil moisture sensors are active in region 'West'?,"CREATE TABLE IoTDevices (device_id INT, device_type VARCHAR(20), region VARCHAR(10)); ",SELECT COUNT(*) FROM IoTDevices WHERE device_type = 'Soil Moisture Sensor' AND region = 'West';,SELECT COUNT(*) FROM IoTDevices WHERE device_type = 'Soil Moisture Sensor' AND region = 'West';,1 On what day was Game 48 played?,"CREATE TABLE table_name_39 (date VARCHAR, game VARCHAR);",SELECT date FROM table_name_39 WHERE game = 48;,SELECT date FROM table_name_39 WHERE game = 48;,1 How many tree species have a total volume greater than 1000 cubic meters in the boreal forest?,"CREATE TABLE biomes (biome_id INT PRIMARY KEY, name VARCHAR(50), area_km2 FLOAT); CREATE TABLE trees (tree_id INT PRIMARY KEY, species VARCHAR(50), biome_id INT, volume FLOAT, FOREIGN KEY (biome_id) REFERENCES biomes(biome_id)); ",SELECT COUNT(DISTINCT species) FROM trees JOIN biomes ON trees.biome_id = biomes.biome_id GROUP BY biomes.name HAVING SUM(trees.volume) > 1000;,SELECT COUNT(*) FROM trees WHERE volume > 1000 AND biome_id IN (SELECT biome_id FROM biomes WHERE name = 'Boreal Forest');,0 "Update the 'solar_panels' table, setting the 'efficiency' value to 20.5% for all 'GreenTech' panels","CREATE TABLE solar_panels (id INT PRIMARY KEY, manufacturer VARCHAR(255), efficiency FLOAT);",UPDATE solar_panels SET efficiency = 0.205 WHERE manufacturer = 'GreenTech';,UPDATE solar_panels SET efficiency = 20.5% WHERE manufacturer = 'GreenTech';,0 How many parking tickets were issued by gender in San Francisco?,"CREATE TABLE ParkingTickets (ID INT, Gender VARCHAR(50), City VARCHAR(50)); ","SELECT Gender, COUNT(*) OVER (PARTITION BY Gender) AS Count FROM ParkingTickets WHERE City = 'San Francisco';","SELECT Gender, COUNT(*) FROM ParkingTickets WHERE City = 'San Francisco' GROUP BY Gender;",0 Find the average water depth for all platforms in the Caspian Sea,"CREATE TABLE platforms (platform_id INT, platform_name TEXT, region TEXT, water_depth FLOAT); ","SELECT platform_name, AVG(water_depth) AS avg_water_depth FROM platforms WHERE region = 'Caspian Sea' GROUP BY platform_id;",SELECT AVG(water_depth) FROM platforms WHERE region = 'Caspian Sea';,0 "Insert new records for two baseball players, 'Luis' from 'Dominican Republic' with jersey_number 17 and 'Hideki' from 'Japan' with jersey_number 55.","CREATE TABLE players (player_name VARCHAR(50), jersey_number INT, country_name VARCHAR(50));","INSERT INTO players (player_name, jersey_number, country_name) VALUES ('Luis', 17, 'Dominican Republic'), ('Hideki', 55, 'Japan');","INSERT INTO players (player_name, jersey_number, country_name) VALUES ('Luis', 17; INSERT INTO players (player_name, jersey_number, country_name) VALUES ('Hideki', 55);",0 What clu was in toronto 1995-96,"CREATE TABLE table_10015132_16 (school_club_team VARCHAR, years_in_toronto VARCHAR);","SELECT school_club_team FROM table_10015132_16 WHERE years_in_toronto = ""1995-96"";","SELECT school_club_team FROM table_10015132_16 WHERE years_in_toronto = ""1995-96"";",1 What is the average number of accommodations per student?,"CREATE TABLE Students (student_id INT, department VARCHAR(255)); CREATE TABLE Accommodations (accommodation_id INT, student_id INT, accommodation_type VARCHAR(255));","SELECT AVG(accommodation_count) as average_accommodations FROM ( SELECT student_id, COUNT(accommodation_id) as accommodation_count FROM Accommodations GROUP BY student_id ) as subquery;",SELECT AVG(accommodation_count) FROM Accommodations JOIN Students ON Accommodations.student_id = Students.student_id GROUP BY Students.student_id;,0 "What is the maximum gas fee for smart contracts on the Binance Smart Chain, and which contract has the highest fee?","CREATE TABLE binance_smart_chain_contracts (contract_id INT, gas_fee DECIMAL(10, 2), name VARCHAR(255)); ","SELECT MAX(gas_fee), name FROM binance_smart_chain_contracts GROUP BY name;","SELECT MAX(gas_fee) as max_gas_fee, name FROM binance_smart_chain_contracts;",0 Find the total assets of all customers who have invested in stock 'AAPL',"CREATE TABLE customers (customer_id INT, total_assets DECIMAL(10,2)); CREATE TABLE investments (customer_id INT, stock_symbol VARCHAR(5), investment_amount DECIMAL(10,2)); ",SELECT SUM(total_assets) FROM customers INNER JOIN investments ON customers.customer_id = investments.customer_id WHERE investments.stock_symbol = 'AAPL';,SELECT SUM(customers.total_assets) FROM customers INNER JOIN investments ON customers.customer_id = investments.customer_id WHERE investments.stock_symbol = 'AAPL';,0 What is the average depth of the top 3 deepest marine protected areas?,"CREATE TABLE marine_protected_areas (area_name TEXT, max_depth INTEGER); ",SELECT AVG(max_depth) FROM (SELECT max_depth FROM marine_protected_areas ORDER BY max_depth DESC LIMIT 3) AS top_3_deepest;,SELECT AVG(max_depth) FROM marine_protected_areas ORDER BY max_depth DESC LIMIT 3;,0 Who has points larger than 167.5?,"CREATE TABLE table_name_51 (name VARCHAR, points INTEGER);",SELECT name FROM table_name_51 WHERE points > 167.5;,SELECT name FROM table_name_51 WHERE points > 167.5;,1 What is the total number of hours spent by indigenous communities on AI training programs in universities in Oceania?,"CREATE TABLE communities_indigenous (community_id INT, community_name VARCHAR(100), region VARCHAR(50)); CREATE TABLE university_programs (program_id INT, program_name VARCHAR(100), community_id INT); CREATE TABLE participation (participation_id INT, participant_id INT, program_id INT, hours DECIMAL(5,2)); ",SELECT SUM(hours) FROM participation INNER JOIN university_programs ON participation.program_id = university_programs.program_id INNER JOIN communities_indigenous ON university_programs.community_id = communities_indigenous.community_id WHERE communities_indigenous.region = 'Oceania';,SELECT SUM(hours) FROM participation JOIN communities_indigenous ON participation.community_id = communities_indigenous.community_id JOIN university_programs ON community_indigenous.community_id = university_programs.community_id WHERE region = 'Oceania';,0 What is the variance of billing amounts for clients in the 'seattle' region?,"CREATE TABLE clients (id INT, name TEXT, region TEXT, billing_amount DECIMAL(10, 2)); ",SELECT VARIANCE(billing_amount) FROM clients WHERE region = 'seattle';,SELECT AVG(billing_amount) FROM clients WHERE region ='seattle';,0 What is the average age of female artists in the 'ArtistDemographics' table?,"CREATE TABLE ArtistDemographics (ArtistID INT, ArtistAge INT, ArtistGender VARCHAR(10)); ",SELECT AVG(ArtistAge) AS AvgFemaleArtistAge FROM ArtistDemographics WHERE ArtistGender = 'Female';,SELECT AVG(ArtistAge) FROM ArtistDemographics WHERE ArtistGender = 'Female';,0 What is the total number of emergency responses for each disaster type?,"CREATE TABLE emergency_responses (id INT PRIMARY KEY, disaster_id INT, response_type VARCHAR(50), FOREIGN KEY (disaster_id) REFERENCES disasters(id));","SELECT response_type, COUNT(*) as total_responses FROM emergency_responses er JOIN disasters d ON er.disaster_id = d.id GROUP BY response_type;","SELECT disaster_id, response_type, COUNT(*) FROM emergency_responses GROUP BY disaster_id, response_type;",0 List the number of patents granted to each company,"CREATE TABLE companies (id INT, name VARCHAR(255), num_patents INT); ","SELECT name, num_patents FROM companies;","SELECT name, SUM(num_patents) FROM companies GROUP BY name;",0 What place did the person who left on day 3 finish in?,"CREATE TABLE table_name_54 (finished VARCHAR, exited VARCHAR);","SELECT finished FROM table_name_54 WHERE exited = ""day 3"";","SELECT finished FROM table_name_54 WHERE exited = ""day 3"";",1 Display the number of space missions and their types for astronauts who have flown on at least 3 missions.,"CREATE TABLE AstronautMissions (AstronautName TEXT, MissionType TEXT);","SELECT MissionType, COUNT(*) FROM AstronautMissions GROUP BY MissionType HAVING COUNT(*) >= 3;","SELECT COUNT(*), MissionType FROM AstronautMissions GROUP BY MissionType HAVING COUNT(*) >= 3;",0 What is every entry for Friday August 26 if the entry for Monday August 22 is 32' 25.72 69.809mph?,"CREATE TABLE table_30058355_3 (fri_26_aug VARCHAR, mon_22_aug VARCHAR);","SELECT fri_26_aug FROM table_30058355_3 WHERE mon_22_aug = ""32' 25.72 69.809mph"";","SELECT fri_26_aug FROM table_30058355_3 WHERE mon_22_aug = ""32' 25.72 69.809mph"";",1 "What is the average speed in km/h for electric trains in Madrid, during trips with a duration greater than 60 minutes?","CREATE TABLE electric_trains (train_id INT, journey_start_time TIMESTAMP, journey_end_time TIMESTAMP, journey_distance_km DECIMAL(5,2), journey_duration_minutes INT); ",SELECT AVG(journey_distance_km/journey_duration_minutes*60) FROM electric_trains WHERE journey_duration_minutes > 60;,SELECT AVG(travel_distance_km * journey_duration_minutes) FROM electric_trains WHERE journey_start_time >= NOW() - INTERVAL '2022-01-01' AND journey_end_time NOW() - INTERVAL '2022-01-01' AND journey_duration_minutes > 60;,0 "What score did Goodman give to all songs with safe results, which received a 7 from Horwood and have a total score of 31?","CREATE TABLE table_1014319_1 (goodman VARCHAR, result VARCHAR, total VARCHAR, horwood VARCHAR);","SELECT goodman FROM table_1014319_1 WHERE total = ""31"" AND horwood = ""7"" AND result = ""Safe"";","SELECT goodman FROM table_1014319_1 WHERE total = 31 AND horwood = ""7"" AND result = ""Safe"";",0 What was the total number of citizens in the world in 2016?,"CREATE TABLE world_population (id INT PRIMARY KEY, year INT, num_citizens INT); ",SELECT num_citizens FROM world_population WHERE year = 2016;,SELECT SUM(num_citizens) FROM world_population WHERE year = 2016;,0 "what is the venue when the competition is asian games, the event is 4x400 m relay and the year is 2002?","CREATE TABLE table_name_93 (venue VARCHAR, year VARCHAR, competition VARCHAR, event VARCHAR);","SELECT venue FROM table_name_93 WHERE competition = ""asian games"" AND event = ""4x400 m relay"" AND year = 2002;","SELECT venue FROM table_name_93 WHERE competition = ""asian games"" AND event = ""4x400 m relay"" AND year = 2002;",1 What college did Marcus Wilson attend?,"CREATE TABLE table_name_45 (college VARCHAR, player VARCHAR);","SELECT college FROM table_name_45 WHERE player = ""marcus wilson"";","SELECT college FROM table_name_45 WHERE player = ""marcus wilson"";",1 WHAT TEAM HAS A PICK LARGER THAN 29?,"CREATE TABLE table_name_59 (team VARCHAR, pick INTEGER);",SELECT team FROM table_name_59 WHERE pick > 29;,SELECT team FROM table_name_59 WHERE pick > 29;,1 Which parts have more than 2 faults? Show the part name and id.,"CREATE TABLE Parts (part_name VARCHAR, part_id VARCHAR); CREATE TABLE Part_Faults (part_id VARCHAR);","SELECT T1.part_name, T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_id HAVING COUNT(*) > 2;","SELECT T1.part_name, T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_id HAVING COUNT(*) > 2;",1 How many nationalities does athlete Casey Jacobsen have?,"CREATE TABLE table_16494599_10 (nationality VARCHAR, player VARCHAR);","SELECT COUNT(nationality) FROM table_16494599_10 WHERE player = ""Casey Jacobsen"";","SELECT COUNT(nationality) FROM table_16494599_10 WHERE player = ""Casey Jacobsen"";",1 What is the total revenue generated from vegetarian dishes in the last six months?,"CREATE TABLE Restaurant (id INT, dish_name VARCHAR(255), dish_type VARCHAR(255), price DECIMAL(10,2), sale_date DATE); ","SELECT SUM(price) FROM Restaurant WHERE dish_type = 'Vegetarian' AND sale_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 6 MONTH) AND CURDATE();","SELECT SUM(price) FROM Restaurant WHERE dish_type = 'Vegetarian' AND sale_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",0 How many unions are there in the 'transportation' sector?,"CREATE TABLE union_profiles (union_name VARCHAR(30), sector VARCHAR(20)); ",SELECT COUNT(*) FROM union_profiles WHERE sector = 'Transportation';,SELECT COUNT(*) FROM union_profiles WHERE sector = 'transportation';,0 How many acres of corn has a farmer in Canada planted?,"CREATE TABLE Farmers (id INT PRIMARY KEY, name VARCHAR(255), age INT, gender VARCHAR(10), location VARCHAR(255), farmer_id INT); CREATE TABLE Fields (id INT PRIMARY KEY, acres FLOAT, crop VARCHAR(255), farmer_id INT, FOREIGN KEY (farmer_id) REFERENCES Farmers(farmer_id));",SELECT SUM(Fields.acres) AS total_acres FROM Fields INNER JOIN Farmers ON Fields.farmer_id = Farmers.farmer_id WHERE Farmers.name = 'Emily Chen' AND Fields.crop = 'corn';,SELECT SUM(Foots.acres) FROM Farmers INNER JOIN Fields ON Farmers.farmer_id = Fields.farmer_id WHERE Farmers.location = 'Canada' AND Fields.crop = 'Corn';,0 "What is the most elevated Played that has a Lost smaller than 12, and a Name of ec amberg (n), and a Position smaller than 4?","CREATE TABLE table_name_59 (played INTEGER, position VARCHAR, lost VARCHAR, name VARCHAR);","SELECT MAX(played) FROM table_name_59 WHERE lost < 12 AND name = ""ec amberg (n)"" AND position < 4;","SELECT MAX(played) FROM table_name_59 WHERE lost 12 AND name = ""ec amberg (n)"" AND position 4;",0 How many total points belong to the team with a goal difference of 8?,"CREATE TABLE table_name_94 (points INTEGER, goal_difference VARCHAR);",SELECT SUM(points) FROM table_name_94 WHERE goal_difference = 8;,SELECT SUM(points) FROM table_name_94 WHERE goal_difference = 8;,1 What is the total budget allocated for 'Green Spaces' maintenance?,"CREATE TABLE City_Budget (budget_id INT, category VARCHAR(50), allocated_amount DECIMAL(10,2), PRIMARY KEY (budget_id)); ",SELECT SUM(allocated_amount) FROM City_Budget WHERE category = 'Green Spaces';,SELECT SUM(allocated_amount) FROM City_Budget WHERE category = 'Green Spaces';,1 Which indigenous communities live in the coldest climates?,"CREATE TABLE Climate (id INT PRIMARY KEY, location VARCHAR(255), temperature DECIMAL(5,2)); CREATE TABLE IndigenousCommunities (id INT PRIMARY KEY, name VARCHAR(255), climate_id INT, FOREIGN KEY (climate_id) REFERENCES Climate(id));",SELECT IndigenousCommunities.name FROM IndigenousCommunities INNER JOIN Climate ON IndigenousCommunities.climate_id = Climate.id WHERE Climate.temperature = (SELECT MIN(temperature) FROM Climate);,SELECT IndigenousCommunities.name FROM IndigenousCommunities INNER JOIN Climate ON IndigenousCommunities.climate_id = Climate.id WHERE Climate.temperature = (SELECT MIN(Climate.temperature) FROM Climate);,0 Who was the runner up for the Nagapattinam constituency?,"CREATE TABLE table_22756549_1 (runner_up_a VARCHAR, constituency VARCHAR);","SELECT runner_up_a FROM table_22756549_1 WHERE constituency = ""Nagapattinam"";","SELECT runner_up_a FROM table_22756549_1 WHERE constituency = ""Nagapattinam"";",1 When east carolina university is the school what is the highest year founded?,"CREATE TABLE table_2076516_1 (founded INTEGER, school VARCHAR);","SELECT MAX(founded) FROM table_2076516_1 WHERE school = ""East Carolina University"";","SELECT MAX(founded) FROM table_2076516_1 WHERE school = ""East Carolina University"";",1 Which venue had more than 9 goals and a final result of 4-1?,"CREATE TABLE table_name_82 (venue VARCHAR, goal VARCHAR, result VARCHAR);","SELECT venue FROM table_name_82 WHERE goal > 9 AND result = ""4-1"";","SELECT venue FROM table_name_82 WHERE goal > 9 AND result = ""4-1"";",1 Which Score has a Total of 80–72?,"CREATE TABLE table_name_55 (score VARCHAR, total VARCHAR);","SELECT score FROM table_name_55 WHERE total = ""80–72"";","SELECT score FROM table_name_55 WHERE total = ""80–72"";",1 How many bids were there for the .500 win percentage in the Ohio Valley conference?,"CREATE TABLE table_name_7 (_number_of_bids INTEGER, win__percentage VARCHAR, conference VARCHAR);","SELECT SUM(_number_of_bids) FROM table_name_7 WHERE win__percentage = "".500"" AND conference = ""ohio valley"";","SELECT SUM(_number_of_bids) FROM table_name_7 WHERE win__percentage = "".500"" AND conference = ""ohio valley"";",1 Which region had the highest sales in Q3 2022?,"CREATE TABLE sales_by_region (region VARCHAR(20), quarter VARCHAR(2), year INT, sales_amount FLOAT); ","SELECT region, MAX(sales_amount) FROM sales_by_region WHERE quarter = 'Q3' AND year = 2022 GROUP BY region;","SELECT region, MAX(sales_amount) FROM sales_by_region WHERE quarter = 'Q3' AND year = 2022 GROUP BY region;",1 What region has a bronze label and a catalogue of 202 876-270?,"CREATE TABLE table_name_82 (region VARCHAR, label VARCHAR, catalogue VARCHAR);","SELECT region FROM table_name_82 WHERE label = ""bronze"" AND catalogue = ""202 876-270"";","SELECT region FROM table_name_82 WHERE label = ""bronze"" AND catalogue = ""202 876-270"";",1 What number of attempts were recorded when the completions were 223?,"CREATE TABLE table_name_17 (attempts VARCHAR, completions VARCHAR);","SELECT attempts FROM table_name_17 WHERE completions = ""223"";",SELECT COUNT(attempts) FROM table_name_17 WHERE completions = 223;,0 How many supplies were delivered to 'Rural Development' projects in '2021' by the 'UNDP'?,"CREATE TABLE Supplies (supply_id INT, supply_name VARCHAR(255), quantity INT, delivery_date DATE, service_area VARCHAR(255), agency VARCHAR(255)); ",SELECT SUM(Supplies.quantity) FROM Supplies WHERE Supplies.service_area = 'Rural Development' AND Supplies.agency = 'UNDP' AND YEAR(Supplies.delivery_date) = 2021;,SELECT SUM(quantity) FROM Supplies WHERE service_area = 'Rural Development' AND agency = 'UNDP' AND delivery_date BETWEEN '2021-01-01' AND '2021-12-31';,0 What is the total number of doctors and nurses in rural Mexico?,"CREATE TABLE healthcare_providers (id INT, name VARCHAR(50), role VARCHAR(20), location VARCHAR(50)); ","SELECT COUNT(*) FROM healthcare_providers WHERE location = 'Rural Mexico' AND role IN ('Doctor', 'Nurse');","SELECT COUNT(*) FROM healthcare_providers WHERE role IN ('Doctor', 'Nurse') AND location = 'Rural Mexico';",0 Name the date for game site of riverfront stadium,"CREATE TABLE table_name_31 (date VARCHAR, game_site VARCHAR);","SELECT date FROM table_name_31 WHERE game_site = ""riverfront stadium"";","SELECT date FROM table_name_31 WHERE game_site = ""riverfront stadium"";",1 Tell me the format with year more than 2000 and label of myuzyk with catalog number of mzykn08,"CREATE TABLE table_name_48 (format VARCHAR, catalog_number VARCHAR, year VARCHAR, label VARCHAR);","SELECT format FROM table_name_48 WHERE year > 2000 AND label = ""myuzyk"" AND catalog_number = ""mzykn08"";","SELECT format FROM table_name_48 WHERE year > 2000 AND label = ""myuzyk"" AND catalog_number = ""mzykn08"";",1 "What is the total number of ad clicks and impressions for each platform, for users from India, grouped by age and gender?","CREATE TABLE ads (ad_id INT, user_id INT, ad_category VARCHAR(20), clicked BOOLEAN, impressions INT, platform VARCHAR(20)); CREATE TABLE users (user_id INT, age INT, gender VARCHAR(10), country VARCHAR(10)); ","SELECT u.age, u.gender, p.platform, SUM(clicked) AS total_clicks, SUM(impressions) AS total_impressions FROM users u INNER JOIN ads p ON u.user_id = p.user_id WHERE u.country = 'India' GROUP BY u.age, u.gender, p.platform;","SELECT a.platform, u.age, u.gender, SUM(a.clicked) as total_clicks, SUM(a.impressions) as total_impressions FROM ads a JOIN users u ON a.user_id = u.user_id WHERE u.country = 'India' GROUP BY a.platform, u.age, u.gender;",0 What is the total quantity of chemicals produced by manufacturer 'X'?,"CREATE TABLE production_rates (rate_id INT, manufacturer VARCHAR(20), production_rate INT, measurement_date DATE); ",SELECT SUM(production_rate) FROM production_rates WHERE manufacturer = 'X';,SELECT SUM(production_rate) FROM production_rates WHERE manufacturer = 'X';,1 Who made the highest assist in the game that scored 79-88?,"CREATE TABLE table_17103645_9 (high_assists VARCHAR, score VARCHAR);","SELECT high_assists FROM table_17103645_9 WHERE score = ""79-88"";","SELECT high_assists FROM table_17103645_9 WHERE score = ""79-88"";",1 What is the total amount of research grants awarded to female faculty members in the College of Engineering for each year since 2017?,"CREATE TABLE College_of_Engineering_Grants (faculty_gender VARCHAR(10), grant_year INT, grant_amount INT); ","SELECT grant_year, SUM(grant_amount) as total_grant_amount FROM College_of_Engineering_Grants WHERE faculty_gender = 'Female' GROUP BY grant_year;","SELECT grant_year, SUM(grant_amount) FROM College_of_Engineering_Grants WHERE faculty_gender = 'Female' AND grant_year >= 2017 GROUP BY grant_year;",0 Which Pavilion depth has a Brilliance Grade of 100% and a Pavilion angle of n/a?,"CREATE TABLE table_name_36 (pavilion_depth VARCHAR, brilliance_grade VARCHAR, pavilion_angle VARCHAR);","SELECT pavilion_depth FROM table_name_36 WHERE brilliance_grade = ""100%"" AND pavilion_angle = ""n/a"";","SELECT pavilion_depth FROM table_name_36 WHERE brilliance_grade = ""100%"" AND pavilion_angle = ""n/a"";",1 Identify employees who have not received any training in the last year.,"CREATE TABLE EmployeeTrainings (EmployeeID INT, Training VARCHAR(50), TrainingDate DATE); ","SELECT EmployeeID FROM EmployeeTrainings WHERE TrainingDate < DATEADD(year, -1, GETDATE()) GROUP BY EmployeeID HAVING COUNT(*) = 0;","SELECT EmployeeID FROM EmployeeTrainings WHERE Training IS NULL AND TrainingDate >= DATEADD(year, -1, GETDATE());",0 What are the names of players who have not participated in esports events?,"CREATE TABLE players (id INT, name VARCHAR(50), age INT, game_preference VARCHAR(20)); CREATE TABLE esports_events (id INT, event_name VARCHAR(50), date DATE, player_id INT); ",SELECT players.name FROM players LEFT JOIN esports_events ON players.id = esports_events.player_id WHERE esports_events.player_id IS NULL;,SELECT players.name FROM players INNER JOIN esports_events ON players.id = esports_events.player_id WHERE players.id IS NULL;,0 On what date the footscray's away game?,"CREATE TABLE table_name_81 (date VARCHAR, away_team VARCHAR);","SELECT date FROM table_name_81 WHERE away_team = ""footscray"";","SELECT date FROM table_name_81 WHERE away_team = ""footscray"";",1 In how many district has a politician took office on 1844-10-14?,"CREATE TABLE table_26362472_1 (district VARCHAR, took_office VARCHAR);","SELECT district FROM table_26362472_1 WHERE took_office = ""1844-10-14"";","SELECT COUNT(district) FROM table_26362472_1 WHERE took_office = ""1844-10-14"";",0 What are the possible multipliers for 1900MHz processors?,"CREATE TABLE table_27277284_27 (mult_1 VARCHAR, frequency VARCHAR);","SELECT mult_1 FROM table_27277284_27 WHERE frequency = ""1900MHz"";","SELECT mult_1 FROM table_27277284_27 WHERE frequency = ""1900MHz"";",1 What is the starting weight if weight lost is 54.6?,"CREATE TABLE table_24370270_10 (starting_weight__kg_ VARCHAR, weight_lost__kg_ VARCHAR);","SELECT starting_weight__kg_ FROM table_24370270_10 WHERE weight_lost__kg_ = ""54.6"";","SELECT starting_weight__kg_ FROM table_24370270_10 WHERE weight_lost__kg_ = ""54.6"";",1 "Show the number of threat intelligence reports issued per month in 2021, sorted by the total number of reports in descending order.","CREATE TABLE threat_intelligence(report_date DATE, report_type VARCHAR(20)); ","SELECT EXTRACT(MONTH FROM report_date) as month, COUNT(*) as total_reports FROM threat_intelligence WHERE EXTRACT(YEAR FROM report_date) = 2021 GROUP BY month ORDER BY total_reports DESC;","SELECT EXTRACT(MONTH FROM report_date) AS month, COUNT(*) AS total_reports FROM threat_intelligence WHERE report_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY month ORDER BY total_reports DESC;",0 Which Result has an Opponent of minnesota vikings?,"CREATE TABLE table_name_85 (result VARCHAR, opponent VARCHAR);","SELECT result FROM table_name_85 WHERE opponent = ""minnesota vikings"";","SELECT result FROM table_name_85 WHERE opponent = ""minnesota vikings"";",1 What is the average monthly data usage for mobile customers in each age group?,"CREATE TABLE age_groups (subscriber_id INT, data_usage_gb FLOAT, age_group VARCHAR(25));","SELECT age_group, AVG(data_usage_gb) FROM age_groups GROUP BY age_group;","SELECT age_group, AVG(data_usage_gb) FROM age_groups GROUP BY age_group;",1 What is the frequency of WMAD?,"CREATE TABLE table_name_21 (frequency VARCHAR, call_letters VARCHAR);","SELECT frequency FROM table_name_21 WHERE call_letters = ""wmad"";","SELECT frequency FROM table_name_21 WHERE call_letters = ""wmd"";",0 What was the Loser of the Game with a Result of 35-27?,"CREATE TABLE table_name_32 (loser VARCHAR, result VARCHAR);","SELECT loser FROM table_name_32 WHERE result = ""35-27"";","SELECT loser FROM table_name_32 WHERE result = ""35-27"";",1 What is the success rate of biotech startups founded in 2020?,"CREATE SCHEMA if not exists biotech;CREATE TABLE if not exists biotech.startups (id INT, name VARCHAR(255), founded_year INT, funding FLOAT, is_successful BOOLEAN); ",SELECT COUNT(*) FILTER (WHERE is_successful = true) / COUNT(*) FROM biotech.startups WHERE founded_year = 2020;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM biotech.startups WHERE founded_year = 2020)) FROM biotech.startups WHERE is_successful = true;,0 What is the total budget for climate projects in Asia that were started after 2015?,"CREATE TABLE climate_projects (project_name VARCHAR(50), location VARCHAR(50), start_year INT, budget INT, sector VARCHAR(50)); ",SELECT SUM(budget) FROM climate_projects WHERE location IN ('Asia') AND start_year > 2015;,SELECT SUM(budget) FROM climate_projects WHERE location = 'Asia' AND start_year > 2015;,0 What is the lowest position for a driver with 2 points?,"CREATE TABLE table_23385853_19 (pos INTEGER, points VARCHAR);",SELECT MAX(pos) FROM table_23385853_19 WHERE points = 2;,SELECT MIN(pos) FROM table_23385853_19 WHERE points = 2;,0 Name the womens doubles when mixed doubles is potten ruth scott,"CREATE TABLE table_14903881_1 (womens_doubles VARCHAR, mixed_doubles VARCHAR);","SELECT womens_doubles FROM table_14903881_1 WHERE mixed_doubles = ""Potten Ruth Scott"";","SELECT womens_doubles FROM table_14903881_1 WHERE mixed_doubles = ""Potten Ruth Scott"";",1 "Who has high points when verizon center 17,152 is location attendance?","CREATE TABLE table_23286112_7 (high_points VARCHAR, location_attendance VARCHAR);","SELECT high_points FROM table_23286112_7 WHERE location_attendance = ""Verizon Center 17,152"";","SELECT high_points FROM table_23286112_7 WHERE location_attendance = ""Verizon Center 17,152"";",1 Which community development initiatives in 'RuralDev' database have been completed in the last two years?,"CREATE TABLE community_initiatives (id INT, name VARCHAR(255), completion_date DATE); ","SELECT * FROM community_initiatives WHERE completion_date >= DATEADD(year, -2, GETDATE());","SELECT name FROM community_initiatives WHERE completion_date >= DATE_SUB(CURRENT_DATE, INTERVAL 2 YEAR);",0 List policyholders who have a policy in Florida but live outside of Florida.,"CREATE TABLE policyholders (id INT, name VARCHAR(100), state VARCHAR(20)); CREATE TABLE policies (id INT, policy_number VARCHAR(50), policyholder_id INT, state VARCHAR(20)); ",SELECT DISTINCT policyholders.name FROM policyholders JOIN policies ON policyholders.id = policies.policyholder_id WHERE policies.state = 'FL' AND policyholders.state != 'FL';,SELECT p.name FROM policyholders p INNER JOIN policies p ON p.id = p.policyholder_id WHERE p.state = 'Florida' AND p.state = 'Florida';,0 Name the team for 19-34,"CREATE TABLE table_23274514_7 (team VARCHAR, record VARCHAR);","SELECT team FROM table_23274514_7 WHERE record = ""19-34"";","SELECT team FROM table_23274514_7 WHERE record = ""19-34"";",1 What score has 15.0% as the 2012?,CREATE TABLE table_name_16 (score VARCHAR);,"SELECT score FROM table_name_16 WHERE 2012 = ""15.0%"";","SELECT score FROM table_name_16 WHERE 2012 = ""15.0%"";",1 What is the total number of articles published in the 'politics' category after January 2022?,"CREATE TABLE news_articles (id INT, category VARCHAR(20), publication_date DATE); ",SELECT COUNT(*) FROM news_articles WHERE category = 'politics' AND publication_date > '2022-01-31';,SELECT COUNT(*) FROM news_articles WHERE category = 'politics' AND publication_date > '2022-01-01';,0 "What was the result of the game in Stuttgart, West Germany and a goal number of less than 9?","CREATE TABLE table_name_12 (result VARCHAR, venue VARCHAR, goal VARCHAR);","SELECT result FROM table_name_12 WHERE venue = ""stuttgart, west germany"" AND goal < 9;","SELECT result FROM table_name_12 WHERE venue = ""stuttgart, west germany"" AND goal 9;",0 What is the carbon sequestration for each forest plot?,"CREATE TABLE ForestPlots (PlotID int, PlotName varchar(50)); CREATE TABLE CarbonSequestration (PlotID int, Sequestration float); ","SELECT ForestPlots.PlotName, CarbonSequestration.Sequestration FROM ForestPlots INNER JOIN CarbonSequestration ON ForestPlots.PlotID = CarbonSequestration.PlotID;","SELECT ForestPlots.PlotName, CarbonSequestration.Sequestration FROM ForestPlots INNER JOIN CarbonSequestration ON ForestPlots.PlotID = CarbonSequestration.PlotID GROUP BY ForestPlots.PlotName;",0 How many headphone classes have a US MSRP of $150?,"CREATE TABLE table_1601027_1 (headphone_class VARCHAR, us_msrp VARCHAR);","SELECT COUNT(headphone_class) FROM table_1601027_1 WHERE us_msrp = ""$150"";","SELECT COUNT(headphone_class) FROM table_1601027_1 WHERE us_msrp = ""$150"";",1 What are the names of body builders whose total score is higher than 300?,"CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE body_builder (People_ID VARCHAR, Total INTEGER);",SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300;,SELECT T1.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Total > 300;,0 Who is the farmer with the highest yield of tomatoes?,"CREATE TABLE farmers (id INT, name VARCHAR(50), location VARCHAR(50), crops VARCHAR(50)); CREATE TABLE crops (id INT, name VARCHAR(50), yield INT); CREATE TABLE sales (id INT, farmer_id INT, crop_name VARCHAR(50), quantity INT, price DECIMAL(5,2)); ",SELECT name FROM farmers INNER JOIN crops ON farmers.crops = crops.name WHERE crops.name = 'Tomatoes' AND crops.yield = (SELECT MAX(yield) FROM crops);,"SELECT f.name, MAX(c.yield) as max_yield FROM farmers f INNER JOIN crops c ON f.id = c.id INNER JOIN sales s ON f.id = s.farmer_id WHERE c.name = 'Tomattox' GROUP BY f.name;",0 How many silvers did Turkey get?,"CREATE TABLE table_name_78 (silver VARCHAR, nation VARCHAR);","SELECT silver FROM table_name_78 WHERE nation = ""turkey"";","SELECT silver FROM table_name_78 WHERE nation = ""turkey"";",1 How many disability accommodations were provided to students in California last year?,"CREATE TABLE accommodations (id INT, student_id INT, accommodation_date DATE, accommodation_type TEXT); ",SELECT COUNT(*) FROM accommodations WHERE accommodation_date BETWEEN '2020-01-01' AND '2020-12-31' AND student_id IN (SELECT student_id FROM students WHERE state = 'California');,"SELECT COUNT(*) FROM accommodations WHERE accommodation_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE AND student_id IN (SELECT student_id FROM students WHERE state = 'California');",0 "What country has an Elevation less than 1833 and an Isolation (km) larger than 18, and a Peak of store lenangstind?","CREATE TABLE table_name_64 (county VARCHAR, peak VARCHAR, elevation__m_ VARCHAR, isolation__km_ VARCHAR);","SELECT county FROM table_name_64 WHERE elevation__m_ < 1833 AND isolation__km_ > 18 AND peak = ""store lenangstind"";","SELECT county FROM table_name_64 WHERE elevation__m_ 1833 AND isolation__km_ > 18 AND peak = ""store lenangstind"";",0 What is the maximum conservation effort duration for species in the 'Coral Reef' habitat?,"CREATE TABLE marine_species (id INT, species VARCHAR(255), population INT, habitat VARCHAR(255));CREATE TABLE conservation_efforts (id INT, species VARCHAR(255), effort VARCHAR(255), start_date DATE, end_date DATE);CREATE VIEW species_by_habitat AS SELECT habitat, species FROM marine_species;","SELECT MAX(DATEDIFF(end_date, start_date)) FROM conservation_efforts JOIN species_by_habitat ON conservation_efforts.species = species_by_habitat.species WHERE species_by_habitat.habitat = 'Coral Reef';",SELECT MAX(effort) FROM conservation_efforts JOIN species_by_habitat ON conservation_efforts.species = species_by_habitat.species WHERE species_by_habitat.habitat = 'Coral Reef';,0 What's LSU's overall record/,"CREATE TABLE table_22993636_2 (overall_record VARCHAR, team VARCHAR);","SELECT overall_record FROM table_22993636_2 WHERE team = ""LSU"";","SELECT overall_record FROM table_22993636_2 WHERE team = ""LSU"";",1 "Find the maximum sales revenue for a drug in France and Italy, for each drug.","CREATE TABLE sales_revenue (drug_name TEXT, country TEXT, sales_revenue NUMERIC, month DATE); ","SELECT drug_name, MAX(sales_revenue) FROM sales_revenue WHERE country IN ('France', 'Italy') GROUP BY drug_name;","SELECT drug_name, MAX(sales_revenue) FROM sales_revenue WHERE country IN ('France', 'Italy') GROUP BY drug_name;",1 What is the position of the player with a round less than 8 and an overall of 48?,"CREATE TABLE table_name_81 (position VARCHAR, round VARCHAR, overall VARCHAR);",SELECT position FROM table_name_81 WHERE round < 8 AND overall = 48;,SELECT position FROM table_name_81 WHERE round 8 AND overall = 48;,0 How many policy advocacy initiatives were implemented in the Middle East in 2020?,"CREATE TABLE policy_advocacy (id INT, initiative TEXT, region TEXT, year INT); ",SELECT COUNT(*) FROM policy_advocacy WHERE region = 'Middle East' AND year = 2020;,SELECT COUNT(*) FROM policy_advocacy WHERE region = 'Middle East' AND year = 2020;,1 What is the success rate of cases in which attorney Maria Lopez was involved?,"CREATE TABLE attorneys (attorney_id INT, name TEXT); CREATE TABLE cases (case_id INT, attorney_id INT, outcome TEXT);",SELECT AVG(CASE WHEN cases.outcome = 'Success' THEN 1.0 ELSE 0.0 END) AS success_rate FROM cases INNER JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.name = 'Maria Lopez';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM cases)) AS success_rate FROM cases JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.name = 'Maria Lopez';,0 What is the maximum duration of space missions for each spacecraft model?,"CREATE TABLE SpacecraftModels (id INT, model VARCHAR, duration FLOAT); CREATE TABLE SpaceMissions (id INT, spacecraft_model VARCHAR, mission_duration FLOAT);","SELECT model, MAX(mission_duration) FROM SpacecraftModels sm JOIN SpaceMissions sm2 ON sm.model = sm2.spacecraft_model GROUP BY model;","SELECT SpacecraftModels.model, MAX(SpaceMissions.mission_duration) FROM SpacecraftModels INNER JOIN SpaceMissions ON SpacecraftModels.model = SpaceMissions.spacecraft_model GROUP BY SpacecraftModels.model;",0 What famous paintings were created in France between 1850 and 1900?,"CREATE TABLE Art (id INT, title VARCHAR(255), creation_date DATE, country VARCHAR(50)); ",SELECT title FROM Art WHERE country = 'France' AND creation_date BETWEEN '1850-01-01' AND '1900-12-31';,SELECT title FROM Art WHERE country = 'France' AND creation_date BETWEEN '1850-01-01' AND '1900-12-31';,1 What School is the Center from?,"CREATE TABLE table_name_97 (school VARCHAR, position VARCHAR);","SELECT school FROM table_name_97 WHERE position = ""center"";","SELECT school FROM table_name_97 WHERE position = ""center"";",1 What was the highest scoring game for Team B in the 2019 season?,"CREATE TABLE games (id INT, team_a TEXT, team_b TEXT, location TEXT, score_team_a INT, score_team_b INT); ",SELECT MAX(score_team_b) FROM games WHERE team_b = 'Team B' AND year = 2019;,"SELECT team_a, MAX(score_team_a) FROM games WHERE team_b = 'Team B' AND season = 2019 GROUP BY team_a;",0 Count the number of users who joined in the year 2021 and have a membership longer than 6 months.,"CREATE TABLE Members (UserID INT, MemberSince DATE, MembershipLength INT); ",SELECT COUNT(*) FROM Members WHERE YEAR(MemberSince) = 2021 AND MembershipLength > 6;,SELECT COUNT(*) FROM Members WHERE MemberSince BETWEEN '2021-01-01' AND '2021-12-31' AND MembershipLength > 6;,0 What's Dorain Anneck's pick number?,"CREATE TABLE table_1013129_3 (pick VARCHAR, player VARCHAR);","SELECT pick FROM table_1013129_3 WHERE player = ""Dorain Anneck"";","SELECT pick FROM table_1013129_3 WHERE player = ""Dorain Anneck"";",1 What is the record on Sept 22?,"CREATE TABLE table_23624542_4 (record VARCHAR, date VARCHAR);","SELECT record FROM table_23624542_4 WHERE date = ""Sept 22"";","SELECT record FROM table_23624542_4 WHERE date = ""September 22"";",0 Where did the cable-stayed Badong Bridge open in 2005?,"CREATE TABLE table_name_18 (location VARCHAR, name VARCHAR, type VARCHAR, opened VARCHAR);","SELECT location FROM table_name_18 WHERE type = ""cable-stayed"" AND opened = 2005 AND name = ""badong bridge"";","SELECT location FROM table_name_18 WHERE type = ""cable-stayed"" AND opened = ""badong bridge"" AND name = ""2005"";",0 What's the whole range of united states where road race is ottawa marathon,"CREATE TABLE table_26166836_2 (country VARCHAR, road_race VARCHAR);","SELECT COUNT(country) FROM table_26166836_2 WHERE road_race = ""Ottawa Marathon"";","SELECT COUNT(country) FROM table_26166836_2 WHERE road_race = ""Ottawa Marathon"";",1 "What is the average land area with a density of 815.48, and a Population larger than 411?","CREATE TABLE table_name_29 (land_area__hectares_ INTEGER, density__inh_km²_ VARCHAR, population VARCHAR);",SELECT AVG(land_area__hectares_) FROM table_name_29 WHERE density__inh_km²_ = 815.48 AND population > 411;,SELECT AVG(land_area__hectares_) FROM table_name_29 WHERE density__inh_km2_ = 815.48 AND population > 411;,0 What is the average revenue per song for each genre?,"CREATE TABLE Genre (GenreID INT, Name VARCHAR(50), Revenue INT);","SELECT Genre.Name, AVG(Genre.Revenue) as AvgRevenuePerSong FROM Genre GROUP BY Genre.Name;","SELECT GenreID, Name, AVG(Revenue) as AvgRevenuePerSong FROM Genre GROUP BY GenreID, Name;",0 Insert new record of carbon sequestration data for Brazil in 2023,"CREATE TABLE carbon_sequestration (country_code CHAR(3), year INT, sequestration FLOAT); ","INSERT INTO carbon_sequestration (country_code, year, sequestration) VALUES ('BRA', 2023, 3.7);","INSERT INTO carbon_sequestration (country_code, year, sequestration) VALUES ('Brazil', 2023, 'Sequestration');",0 how many high assbeingts with score being l 90–98 (ot),"CREATE TABLE table_13557843_7 (high_assists VARCHAR, score VARCHAR);","SELECT COUNT(high_assists) FROM table_13557843_7 WHERE score = ""L 90–98 (OT)"";","SELECT COUNT(high_assists) FROM table_13557843_7 WHERE score = ""L 90–98 (OT)"";",1 The venue of Brunswick Street Oval was used on what date?,"CREATE TABLE table_name_53 (date VARCHAR, venue VARCHAR);","SELECT date FROM table_name_53 WHERE venue = ""brunswick street oval"";","SELECT date FROM table_name_53 WHERE venue = ""brunswick street oval"";",1 "Where did the player place who is from the United States, who made more than $216, and whose score was 74-70-71-69=284?","CREATE TABLE table_name_71 (place VARCHAR, country VARCHAR, money___$__ VARCHAR, score VARCHAR);","SELECT place FROM table_name_71 WHERE country = ""united states"" AND money___$__ > 216 AND score = 74 - 70 - 71 - 69 = 284;","SELECT place FROM table_name_71 WHERE money___$__ > 216 AND score = 74 - 70 - 71 - 69 = 284 AND country = ""united states"";",0 How many electric vehicles were sold in the United States by quarter in 2021?,"CREATE TABLE Sales (Id INT, VehicleId INT, Quantity INT, SaleDate DATE); CREATE TABLE ElectricVehicles (Id INT, Name VARCHAR(100), Type VARCHAR(50)); ","SELECT DATE_TRUNC('quarter', SaleDate) AS Quarter, COUNT(*) FROM Sales INNER JOIN ElectricVehicles ON Sales.VehicleId = ElectricVehicles.Id WHERE Type = 'Electric' AND EXTRACT(YEAR FROM SaleDate) = 2021 GROUP BY Quarter;","SELECT DATE_FORMAT(SaleDate, '%Y-%m') AS Quarter, SUM(Quantity) AS TotalSold FROM Sales JOIN ElectricVehicles ON Sales.VehicleId = ElectricVehicles.Id WHERE SaleDate BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY Quarter;",0 What was the date of appointment for paco chaparro's replacement?,"CREATE TABLE table_name_12 (date_of_appointment VARCHAR, outgoing_manager VARCHAR);","SELECT date_of_appointment FROM table_name_12 WHERE outgoing_manager = ""paco chaparro"";","SELECT date_of_appointment FROM table_name_12 WHERE outgoing_manager = ""paco chaparro"";",1 What is the total funding awarded for research grants in the field of Chemistry over the past 10 years?,"CREATE TABLE grants (grant_id INT, field VARCHAR(50), amount FLOAT, grant_date DATE);","SELECT SUM(g.amount) FROM grants g WHERE g.field = 'Chemistry' AND g.grant_date >= DATE_SUB(CURRENT_DATE, INTERVAL 10 YEAR);","SELECT SUM(amount) FROM grants WHERE field = 'Chemistry' AND grant_date >= DATEADD(year, -10, GETDATE());",0 What country has a finish of 59?,"CREATE TABLE table_name_34 (country VARCHAR, finish VARCHAR);","SELECT country FROM table_name_34 WHERE finish = ""59"";","SELECT country FROM table_name_34 WHERE finish = ""59"";",1 What is the score of the game on May 5?,"CREATE TABLE table_name_50 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_50 WHERE date = ""may 5"";","SELECT score FROM table_name_50 WHERE date = ""may 5"";",1 Which Championship has a League Cup smaller than 0?,"CREATE TABLE table_name_14 (championship INTEGER, league_cup INTEGER);",SELECT AVG(championship) FROM table_name_14 WHERE league_cup < 0;,SELECT AVG(championship) FROM table_name_14 WHERE league_cup 0;,0 What is the total word count of articles written by Maria Garcia?,"CREATE TABLE Articles (id INT, title VARCHAR(255), word_count INT, author VARCHAR(255)); ",SELECT SUM(word_count) FROM Articles WHERE author = 'Maria Garcia';,SELECT SUM(word_count) FROM Articles WHERE author = 'Maria Garcia';,1 Name the catalogue that has tracks less than 13 and the release date of 10/31/72,"CREATE TABLE table_name_28 (catalogue VARCHAR, track VARCHAR, release_date VARCHAR);","SELECT catalogue FROM table_name_28 WHERE track < 13 AND release_date = ""10/31/72"";","SELECT catalogue FROM table_name_28 WHERE track 13 AND release_date = ""10/31/72"";",0 Find the names of stadiums which have never had any event.,"CREATE TABLE stadium (name VARCHAR, id VARCHAR, stadium_id VARCHAR); CREATE TABLE event (name VARCHAR, id VARCHAR, stadium_id VARCHAR);",SELECT name FROM stadium WHERE NOT id IN (SELECT stadium_id FROM event);,SELECT T1.name FROM stadium AS T1 JOIN event AS T2 ON T1.id = T2.stadium_id WHERE T2.id IS NULL;,0 "Which Floors have a Location of ljubljana, and a Name of tr3?","CREATE TABLE table_name_61 (floors VARCHAR, location VARCHAR, name VARCHAR);","SELECT floors FROM table_name_61 WHERE location = ""ljubljana"" AND name = ""tr3"";","SELECT floors FROM table_name_61 WHERE location = ""ljubljana"" AND name = ""tr3"";",1 What nationality is listed when the college/junior/club team is oshawa generals (ohl)?,"CREATE TABLE table_2850912_7 (nationality VARCHAR, college_junior_club_team VARCHAR);","SELECT nationality FROM table_2850912_7 WHERE college_junior_club_team = ""Oshawa Generals (OHL)"";","SELECT nationality FROM table_2850912_7 WHERE college_junior_club_team = ""Oshawa Generals (OHL)"";",1 What is the Japanese title with an average rating of 11.6%?,"CREATE TABLE table_18540104_1 (japanese_title VARCHAR, average_ratings VARCHAR);","SELECT japanese_title FROM table_18540104_1 WHERE average_ratings = ""11.6%"";","SELECT japanese_title FROM table_18540104_1 WHERE average_ratings = ""11.6%"";",1 "Who was the opponent with the loss in Westbury, NY?","CREATE TABLE table_name_37 (opponent VARCHAR, result VARCHAR, location VARCHAR);","SELECT opponent FROM table_name_37 WHERE result = ""loss"" AND location = ""westbury, ny"";","SELECT opponent FROM table_name_37 WHERE result = ""loss"" AND location = ""westbury, new york"";",0 What team is sponsored by d3 Outdoors?,"CREATE TABLE table_19908313_2 (team VARCHAR, primary_sponsor_s_ VARCHAR);","SELECT team FROM table_19908313_2 WHERE primary_sponsor_s_ = ""D3 Outdoors"";","SELECT team FROM table_19908313_2 WHERE primary_sponsor_s_ = ""D3 Outdoors"";",1 What is the name of the submarine base located in Connecticut in the 'North_American_Naval_Bases' table?,"CREATE SCHEMA IF NOT EXISTS defense_security;CREATE TABLE IF NOT EXISTS defense_security.North_American_Naval_Bases (id INT PRIMARY KEY, base_name VARCHAR(255), location VARCHAR(255), type VARCHAR(255));",SELECT base_name FROM defense_security.North_American_Naval_Bases WHERE location = 'Connecticut';,SELECT base_name FROM defense_security.North_American_Naval_Bases WHERE location = 'Connecticut' AND type = 'Submarine';,0 "What is the average price of artworks created by each artist in the 'Artworks' table, ordered by the average price in descending order?","CREATE TABLE Artworks (id INT, art_category VARCHAR(255), artist_name VARCHAR(255), year INT, art_medium VARCHAR(255), price DECIMAL(10,2));","SELECT artist_name, AVG(price) as avg_price FROM Artworks GROUP BY artist_name ORDER BY avg_price DESC;","SELECT artist_name, AVG(price) as avg_price FROM Artworks GROUP BY artist_name ORDER BY avg_price DESC;",1 Which score has a Decision of johnson?,"CREATE TABLE table_name_29 (score VARCHAR, decision VARCHAR);","SELECT score FROM table_name_29 WHERE decision = ""johnson"";","SELECT score FROM table_name_29 WHERE decision = ""johnson"";",1 What are the names and reviews of eco-friendly accommodations in Canada?,"CREATE TABLE countries (id INT PRIMARY KEY, name VARCHAR(255));CREATE TABLE accommodations (id INT PRIMARY KEY, name VARCHAR(255), country_id INT, eco_friendly BOOLEAN);CREATE TABLE reviews (id INT PRIMARY KEY, accommodation_id INT, review TEXT, FOREIGN KEY (accommodation_id) REFERENCES accommodations(id));","SELECT accommodations.name, reviews.review FROM accommodations JOIN reviews ON accommodations.id = reviews.accommodation_id WHERE accommodations.eco_friendly = true AND accommodations.country_id = (SELECT id FROM countries WHERE name = 'Canada');","SELECT a.name, r.review FROM accommodations a JOIN reviews r ON a.accommodation_id = r.accommodation_id WHERE a.eco_friendly = true AND a.country_id IN (SELECT id FROM countries WHERE name = 'Canada');",0 What is the average ticket price for Jazz concerts?,"CREATE TABLE Concerts (id INT, genre VARCHAR(20), price DECIMAL(5,2)); ",SELECT AVG(price) FROM Concerts WHERE genre = 'Jazz';,SELECT AVG(price) FROM Concerts WHERE genre = 'Jazz';,1 What is the average age of football players in the 'players' table?,"CREATE TABLE players (player_id INT, name VARCHAR(50), position VARCHAR(50), team VARCHAR(50), age INT); ",SELECT AVG(age) FROM players WHERE position = 'Goalkeeper' OR position = 'Defender';,SELECT AVG(age) FROM players WHERE position = 'Football';,0 How many artifacts are there in total for each period?,"CREATE TABLE ExcavationSites (site_id INT, site_name TEXT, period TEXT); CREATE TABLE Artifacts (artifact_id INT, site_id INT, artifact_name TEXT, period TEXT); ","SELECT period, COUNT(*) as total_artifacts FROM Artifacts GROUP BY period;","SELECT period, COUNT(*) FROM Artifacts GROUP BY period;",0 Which bioprocess engineering companies have received funding in Spain?,"CREATE SCHEMA if not exists biotech; CREATE TABLE if not exists biotech.startups (id INT PRIMARY KEY, name VARCHAR(255), country VARCHAR(255), total_funding FLOAT); CREATE TABLE if not exists biotech.funding (id INT PRIMARY KEY, startup_id INT, type VARCHAR(255), amount FLOAT); ",SELECT s.name FROM biotech.startups s JOIN biotech.funding f ON s.id = f.startup_id WHERE s.country = 'Spain' AND f.type = 'Bioprocess Engineering';,SELECT s.name FROM biotech.startups s INNER JOIN biotech.funding f ON s.id = f.startup_id WHERE s.country = 'Spain' AND f.type = 'Bioprocess Engineering';,0 Delete the record for the sale of 'Artillery Systems' to 'Asia' by 'Red Shield LLC' if the sale quantity is less than 50.,"CREATE TABLE RedShieldSales(id INT, contractor VARCHAR(255), region VARCHAR(255), equipment VARCHAR(255), quantity INT);",DELETE FROM RedShieldSales WHERE contractor = 'Red Shield LLC' AND region = 'Asia' AND equipment = 'Artillery Systems' AND quantity < 50;,DELETE FROM RedShieldSales WHERE contractor = 'Red Shield LLC' AND region = 'Asia' AND equipment = 'Artillery Systems' AND quantity 50;,0 Get the number of products shipped to each country.,"CREATE TABLE supply_chain (id INTEGER, product_id VARCHAR(10), shipped_date DATE, shipped_to VARCHAR(50));","SELECT shipped_to, COUNT(DISTINCT product_id) FROM supply_chain GROUP BY shipped_to;","SELECT country, COUNT(*) FROM supply_chain GROUP BY country;",0 "Calculate the percentage of graduate students per department who have published at least one paper, in descending order of percentage.","CREATE TABLE students (student_id INT, dept_id INT, graduated BOOLEAN, num_publications INT);CREATE TABLE departments (dept_id INT, dept_name VARCHAR(255));","SELECT dept_name, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM students s WHERE s.dept_id = f.dept_id) AS percentage FROM students f WHERE num_publications > 0 GROUP BY dept_name ORDER BY percentage DESC;","SELECT d.dept_name, COUNT(s.student_id) * 100.0 / (SELECT COUNT(s.student_id) FROM students s JOIN departments d ON s.dept_id = d.dept_id GROUP BY d.dept_name) as percentage FROM students s JOIN departments d ON s.dept_id = d.dept_id GROUP BY d.dept_name ORDER BY percentage DESC;",0 "How many track numbers were recorded on November 16, 1959 for the title of I Couldn't Hear Nobody Pray?","CREATE TABLE table_name_58 (track_number VARCHAR, recording_date VARCHAR, title VARCHAR);","SELECT COUNT(track_number) FROM table_name_58 WHERE recording_date = ""november 16, 1959"" AND title = ""i couldn't hear nobody pray"";","SELECT COUNT(track_number) FROM table_name_58 WHERE recording_date = ""november 16, 1959"" AND title = ""i couldn't hear nobody pray"";",1 How many marine research projects have been conducted in the Arctic and Antarctic Oceans?,"CREATE TABLE research_projects (ocean TEXT, project_count INT); ","SELECT SUM(project_count) FROM research_projects WHERE ocean IN ('Arctic', 'Antarctic');","SELECT SUM(project_count) FROM research_projects WHERE ocean IN ('Arctic', 'Antarctic');",1 What is the average property size in inclusive housing areas?,"CREATE TABLE Inclusive_Housing (Property_ID INT, Inclusive VARCHAR(10), Property_Size INT); ",SELECT AVG(Property_Size) FROM Inclusive_Housing WHERE Inclusive = 'Yes';,SELECT AVG(Property_Size) FROM Inclusive_Housing;,0 "Insert data into the ""animals"" table from the previous row","CREATE TABLE animals (animal_id SERIAL PRIMARY KEY, name VARCHAR(255));","INSERT INTO animals (name) VALUES ('Lion'), ('Tiger'), ('Bear');","INSERT INTO animals (animal_id, name) VALUES (1, 'David', 'David');",0 What are the names of all the buses that have had maintenance work in the past month?,"CREATE TABLE bus_maintenance (id INT, bus_name VARCHAR(255), maintenance_date DATE); ","SELECT bus_name FROM bus_maintenance WHERE maintenance_date >= DATEADD(month, -1, GETDATE());","SELECT bus_name FROM bus_maintenance WHERE maintenance_date >= DATEADD(month, -1, GETDATE());",1 What is the average points scored by player 'Michael Jordan' in the 'NBA'?,"CREATE TABLE players (player_id INT, player_name TEXT, team TEXT, position TEXT, points_per_game FLOAT); ",SELECT AVG(points_per_game) FROM players WHERE player_name = 'Michael Jordan' AND team = 'Chicago Bulls';,SELECT AVG(points_per_game) FROM players WHERE player_name = 'Michael Jordan' AND team = 'NBA';,0 "Update all records in the ""company_founding"" table, setting the founding date to 2017-01-01 for the company 'Kilo Ltd.'","CREATE TABLE company_founding (id INT, company_name VARCHAR(100), founding_date DATE); ",UPDATE company_founding SET founding_date = '2017-01-01' WHERE company_name = 'Kilo Ltd.';,UPDATE company_founding SET founding_date = '2017-01-01' WHERE company_name = 'Kilo Ltd.';,1 What is the total revenue for each station in the 'subway' system?,"CREATE TABLE station (station_id INT, name TEXT, line TEXT);CREATE TABLE trip (trip_id INT, start_station_id INT, end_station_id INT, revenue FLOAT);","SELECT s.name, SUM(t.revenue) FROM station s INNER JOIN trip t ON s.station_id = t.start_station_id GROUP BY s.name;","SELECT station.name, SUM(trip.revenue) as total_revenue FROM station INNER JOIN trip ON station.station_id = trip.start_station_id INNER JOIN trip ON trip.end_station_id = trip.end_station_id GROUP BY station.name;",0 What is the sum of all mintage created by Pierre Leduc?,"CREATE TABLE table_name_61 (mintage INTEGER, artist VARCHAR);","SELECT SUM(mintage) FROM table_name_61 WHERE artist = ""pierre leduc"";","SELECT SUM(mintage) FROM table_name_61 WHERE artist = ""pierre leduc"";",1 What is the total quantity of item 'Headphones' in all warehouses?,"CREATE TABLE warehouses (id VARCHAR(10), name VARCHAR(20), city VARCHAR(10), country VARCHAR(10)); CREATE TABLE inventory (item VARCHAR(10), warehouse_id VARCHAR(10), quantity INT); ",SELECT SUM(quantity) FROM inventory WHERE item = 'Headphones';,SELECT SUM(quantity) FROM inventory WHERE item = 'Headphones';,1 What is the Date for the wgc-accenture match play championship?,"CREATE TABLE table_name_83 (date VARCHAR, tournament VARCHAR);","SELECT date FROM table_name_83 WHERE tournament = ""wgc-accenture match play championship"";","SELECT date FROM table_name_83 WHERE tournament = ""wgc-accenture match play championship"";",1 Which hospitals in Mumbai have a capacity greater than 500 and have reported COVID-19 cases?,"CREATE TABLE hospitals (id INT, name VARCHAR(50), location VARCHAR(50), capacity INT); CREATE TABLE infections (id INT, patient_id INT, infection VARCHAR(50), date DATE, hospital_id INT); ","SELECT hospitals.name, hospitals.capacity FROM hospitals INNER JOIN infections ON hospitals.id = infections.hospital_id WHERE hospitals.location = 'Mumbai' AND hospitals.capacity > 500;",SELECT hospitals.name FROM hospitals INNER JOIN infections ON hospitals.id = infections.hospital_id WHERE hospitals.location = 'Mumbai' AND hospitals.capacity > 500 AND infections.infection = 'COVID-19';,0 What is the Location of the Old Bedians Pitch?,"CREATE TABLE table_name_97 (location VARCHAR, pitch VARCHAR);","SELECT location FROM table_name_97 WHERE pitch = ""old bedians"";","SELECT location FROM table_name_97 WHERE pitch = ""old bedians"";",1 Show the names of companies and the number of employees they have,"CREATE TABLE company (Name VARCHAR, Company_ID VARCHAR); CREATE TABLE people (People_ID VARCHAR); CREATE TABLE employment (People_ID VARCHAR, Company_ID VARCHAR);","SELECT T3.Name, COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID GROUP BY T3.Name;","SELECT T2.Name, COUNT(*) FROM employment AS T1 JOIN company AS T2 ON T1.People_ID = T2.Company_ID GROUP BY T2.Name;",0 Delete all records from the broadband_subscribers table where the subscription_date is older than 1 year,"CREATE TABLE broadband_subscribers (subscriber_id INT, subscriber_name VARCHAR(50), subscription_date DATE);",DELETE FROM broadband_subscribers WHERE subscription_date < (CURRENT_DATE - INTERVAL '1' YEAR);,"DELETE FROM broadband_subscribers WHERE subscription_date DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 What is the average population of marine species in the Mediterranean Sea?,"CREATE TABLE Mediterranean_Marine_Species (species_name TEXT, population INT); ",SELECT AVG(population) FROM Mediterranean_Marine_Species;,SELECT AVG(population) FROM Mediterranean_Marine_Species;,1 Find the total quantity of items in the 'warehouse_inventory' table for all items that have a 'reorder_level' greater than 50.,"CREATE TABLE warehouse_inventory (item_id INT, item_name VARCHAR(50), quantity INT, reorder_level INT);",SELECT SUM(quantity) FROM warehouse_inventory WHERE reorder_level > 50;,SELECT SUM(quantity) FROM warehouse_inventory WHERE reorder_level > 50;,1 How many players from Japan and China scored more than 500 points in the 2019 season?,"CREATE TABLE players (player_id INT, name TEXT, nationality TEXT, points INT, season INT); ",SELECT COUNT(*) FROM players WHERE (nationality = 'Japan' OR nationality = 'China') AND points > 500 AND season = 2019;,"SELECT COUNT(*) FROM players WHERE nationality IN ('Japan', 'China') AND points > 500 AND season = 2019;",0 "Identify the top 5 countries with the highest total donations from the 'Donations' table, grouped by Country.","CREATE TABLE Donations (DonationID INT, DonorID INT, Amount DECIMAL(10, 2), Country VARCHAR(50));","SELECT Country, SUM(Amount) AS TotalDonations FROM Donations GROUP BY Country ORDER BY TotalDonations DESC LIMIT 5;","SELECT Country, SUM(Amount) as TotalDonations FROM Donations GROUP BY Country ORDER BY TotalDonations DESC LIMIT 5;",0 How many volunteers are registered in 'tech_volunteers' and 'non_tech_volunteers' tables?,"CREATE TABLE tech_volunteers (volunteer_id INT, volunteer_name VARCHAR(20), skill VARCHAR(20)); CREATE TABLE non_tech_volunteers (volunteer_id INT, volunteer_name VARCHAR(20), skill VARCHAR(20)); ",SELECT COUNT(*) FROM tech_volunteers; SELECT COUNT(*) FROM non_tech_volunteers;,SELECT COUNT(DISTINCT t.volunteer_id) FROM tech_volunteers t JOIN non_tech_volunteers n ON t.volunteer_id = n.volunteer_id;,0 What is the average bias score for AI models in the 'ai_safety' table that have a safety rating greater than 0.8?,"CREATE TABLE ai_safety (app_id INT, app_name TEXT, safety_rating FLOAT, bias_score FLOAT);",SELECT AVG(bias_score) FROM ai_safety WHERE safety_rating > 0.8;,SELECT AVG(bias_score) FROM ai_safety WHERE safety_rating > 0.8;,1 What was the score of the Red Wings game when Vancouver was the home team?,"CREATE TABLE table_name_71 (score VARCHAR, home VARCHAR);","SELECT score FROM table_name_71 WHERE home = ""vancouver"";","SELECT score FROM table_name_71 WHERE home = ""vancouver"";",1 Delete marine species records from 'Antarctica' before 2019.,"CREATE TABLE Species_4 (id INT, name VARCHAR(255), region VARCHAR(255), year INT); ",DELETE FROM Species_4 WHERE region = 'Antarctica' AND year < 2019;,DELETE FROM Species_4 WHERE region = 'Antarctica' AND year 2019;,0 What was the score when York City was home?,"CREATE TABLE table_name_89 (score VARCHAR, home_team VARCHAR);","SELECT score FROM table_name_89 WHERE home_team = ""york city"";","SELECT score FROM table_name_89 WHERE home_team = ""york city"";",1 What is the competition on 23 February 1929?,"CREATE TABLE table_name_27 (competition VARCHAR, date VARCHAR);","SELECT competition FROM table_name_27 WHERE date = ""23 february 1929"";","SELECT competition FROM table_name_27 WHERE date = ""23 february 1929"";",1 "What is the total number of maintenance requests for naval vessels, submitted in the last quarter?","CREATE TABLE Vessels (id INT, name VARCHAR(100), type VARCHAR(50), status VARCHAR(50));CREATE TABLE Maintenance (id INT, vessel_id INT, request_date DATE); ","SELECT COUNT(*) FROM Maintenance m JOIN Vessels v ON m.vessel_id = v.id WHERE m.request_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH) AND v.type LIKE '%Naval%';","SELECT COUNT(*) FROM Maintenance JOIN Vessels ON Maintenance.vessel_id = Vessels.id WHERE Vessels.type = 'Naval' AND Maintenance.request_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH);",0 How many in attendance when Penguins were home with a record of 14–19–6 with less than 34 points?,"CREATE TABLE table_name_98 (attendance VARCHAR, points VARCHAR, home VARCHAR, record VARCHAR);","SELECT COUNT(attendance) FROM table_name_98 WHERE home = ""penguins"" AND record = ""14–19–6"" AND points < 34;","SELECT COUNT(attendance) FROM table_name_98 WHERE home = ""penguins"" AND record = ""14–19–6"" AND points 34;",0 "What is the average word count of blog posts written by authors from Asia and Africa, in the last month?","CREATE TABLE blog_posts (id INT, title VARCHAR(50), word_count INT, author_name VARCHAR(50), author_region VARCHAR(50)); ","SELECT author_region, AVG(word_count) as avg_word_count FROM blog_posts WHERE author_region IN ('Asia', 'Africa') AND post_date >= NOW() - INTERVAL 30 DAY GROUP BY author_region;","SELECT AVG(word_count) FROM blog_posts WHERE author_region IN ('Asia', 'Africa') AND post_date >= DATEADD(month, -1, GETDATE());",0 "WHAT IS TOTAL NUMBER OF PR TOP-UPS THAT HAVE A PERCENTAGE OF 0.8%, TOTAL LARGER THAN 1?","CREATE TABLE table_name_92 (pr_top_up VARCHAR, percentage VARCHAR, total VARCHAR);","SELECT COUNT(pr_top_up) FROM table_name_92 WHERE percentage = ""0.8%"" AND total > 1;","SELECT COUNT(pr_top_up) FROM table_name_92 WHERE percentage = ""0.8%"" AND total > 1;",1 What are the top 3 defense contractors in terms of total defense contracts awarded in the Asia-Pacific region?,"CREATE TABLE defense_contracts (id INT, contractor VARCHAR(50), region VARCHAR(20), contract_value DECIMAL(10,2));","SELECT contractor, SUM(contract_value) AS total_contracts FROM defense_contracts WHERE region = 'Asia-Pacific' GROUP BY contractor ORDER BY total_contracts DESC LIMIT 3;","SELECT contractor, SUM(contract_value) as total_contracts FROM defense_contracts WHERE region = 'Asia-Pacific' GROUP BY contractor ORDER BY total_contracts DESC LIMIT 3;",0 What date had a result of 8-0?,"CREATE TABLE table_name_40 (date VARCHAR, result VARCHAR);","SELECT date FROM table_name_40 WHERE result = ""8-0"";","SELECT date FROM table_name_40 WHERE result = ""8-0"";",1 Find the number of endangered species in the 'endangered_animals' view,"CREATE TABLE animals (id INT, name VARCHAR(255), conservation_status VARCHAR(255)); CREATE VIEW endangered_animals AS SELECT * FROM animals WHERE conservation_status = 'Endangered';",SELECT COUNT(*) FROM endangered_animals;,SELECT COUNT(*) FROM endangered_animals;,1 What is the total water consumption by all sectors in 2015 and 2016?,"CREATE TABLE total_consumption (year INT, sector TEXT, consumption FLOAT); ","SELECT consumption FROM total_consumption WHERE year IN (2015, 2016)","SELECT sector, SUM(consumption) FROM total_consumption WHERE year IN (2015, 2016) GROUP BY sector;",0 What is the sum of againsts the team with less than 38 played had?,"CREATE TABLE table_name_86 (against INTEGER, played INTEGER);",SELECT SUM(against) FROM table_name_86 WHERE played < 38;,SELECT SUM(against) FROM table_name_86 WHERE played 38;,0 What warship has horse-power of 1500?,"CREATE TABLE table_23614702_1 (warship VARCHAR, horse__power VARCHAR);",SELECT warship FROM table_23614702_1 WHERE horse__power = 1500;,SELECT warship FROM table_23614702_1 WHERE horse__power = 1500;,1 What is the average training time in hours for models that passed safety tests?,"CREATE TABLE model_data (id INT, model_name VARCHAR(50), training_time FLOAT, safety_test BOOLEAN);",SELECT AVG(training_time) FROM model_data WHERE safety_test = TRUE;,SELECT AVG(training_time) FROM model_data WHERE safety_test = TRUE;,1 "Calculate the percentage of employees who are male and female in each department in the ""employee"", ""department"", and ""gender"" tables","CREATE TABLE employee (id INT, department_id INT, gender_id INT); CREATE TABLE department (id INT, name TEXT); CREATE TABLE gender (id INT, name TEXT);","SELECT d.name, (COUNT(CASE WHEN g.name = 'male' THEN 1 END) / COUNT(*)) * 100 AS pct_male, (COUNT(CASE WHEN g.name = 'female' THEN 1 END) / COUNT(*)) * 100 AS pct_female FROM department d JOIN employee e ON d.id = e.department_id JOIN gender g ON e.gender_id = g.id GROUP BY d.name;","SELECT e.department_id, COUNT(e.id) * 100.0 / (SELECT COUNT(*) FROM employee e JOIN department d ON e.department_id = d.id GROUP BY e.department_id) as percentage FROM employee e JOIN gender g ON e.gender_id = g.id GROUP BY e.department_id;",0 What is the total mass of all the Hubble Space Telescope parts?,"CREATE TABLE hubble_parts (id INT, part_name VARCHAR(50), mass DECIMAL(10,2), launch_date DATE);",SELECT SUM(mass) FROM hubble_parts;,SELECT SUM(mass) FROM hubble_parts;,1 "What is the highest round of the match with Rene Rooze as the opponent in Saitama, Japan?","CREATE TABLE table_name_91 (round INTEGER, opponent VARCHAR, location VARCHAR);","SELECT MAX(round) FROM table_name_91 WHERE opponent = ""rene rooze"" AND location = ""saitama, japan"";","SELECT MAX(round) FROM table_name_91 WHERE opponent = ""rene rooze"" AND location = ""saitama, japan"";",1 What lane number was Hungary and had a heat of 4?,"CREATE TABLE table_name_22 (lane VARCHAR, heat VARCHAR, nationality VARCHAR);","SELECT COUNT(lane) FROM table_name_22 WHERE heat = 4 AND nationality = ""hungary"";","SELECT lane FROM table_name_22 WHERE heat = 4 AND nationality = ""hungary"";",0 Who's average is 24.8?,"CREATE TABLE table_16912000_13 (player VARCHAR, kr_avg VARCHAR);","SELECT player FROM table_16912000_13 WHERE kr_avg = ""24.8"";","SELECT player FROM table_16912000_13 WHERE kr_avg = ""24.8"";",1 "What is the total quantity of organic cotton garments produced, by size, for the Autumn 2022 season?","CREATE TABLE Fabrics (FabricID INT, FabricType VARCHAR(50), Sustainable BOOLEAN); CREATE TABLE Sizes (SizeID INT, Size VARCHAR(10)); CREATE TABLE Production (ProductionID INT, FabricID INT, SizeID INT, Quantity INT, Season VARCHAR(20)); ","SELECT s.Size, SUM(p.Quantity) as TotalQuantity FROM Fabrics f INNER JOIN Production p ON f.FabricID = p.FabricID INNER JOIN Sizes s ON p.SizeID = s.SizeID WHERE f.Sustainable = true AND p.Season = 'Autumn 2022' GROUP BY s.Size;","SELECT s.Size, SUM(p.Quantity) as TotalQuantity FROM Production p JOIN Fabrics f ON p.FabricID = f.FabricID JOIN Sizes s ON p.SizeID = s.SizeID WHERE f.Sustainable = TRUE AND s.Season = 'Autumn 2022' GROUP BY s.Size;",0 Delete all shipments that were handled by the 'Houston' warehouse.,"CREATE TABLE Warehouse (id INT, name VARCHAR(20), city VARCHAR(20)); CREATE TABLE Handling (id INT, shipment_id INT, warehouse_id INT, pallets INT); ",DELETE FROM Shipment WHERE id IN (SELECT Handling.shipment_id FROM Handling JOIN Warehouse ON Handling.warehouse_id = Warehouse.id WHERE Warehouse.city = 'Houston');,DELETE FROM Handling WHERE warehouse_id = (SELECT id FROM Warehouse WHERE name = 'Houston');,0 "What is the percentage of tickets sold for each event type, for events in Los Angeles?","CREATE TABLE Events (id INT, event_name VARCHAR(100), event_type VARCHAR(50), location VARCHAR(100), start_time TIMESTAMP); CREATE TABLE Tickets (id INT, ticket_number INT, event_id INT, purchaser_name VARCHAR(100), purchase_date DATE);","SELECT event_type, 100.0 * COUNT(ticket_number) / SUM(COUNT(ticket_number)) OVER (PARTITION BY NULL) as percentage FROM Events JOIN Tickets ON Events.id = Tickets.event_id WHERE location LIKE '%Los Angeles%' GROUP BY event_type;","SELECT e.event_type, COUNT(t.ticket_number) * 100.0 / (SELECT COUNT(*) FROM Events e JOIN Tickets t ON e.id = t.event_id WHERE e.location = 'Los Angeles' GROUP BY e.event_type) as percentage FROM Events e JOIN Tickets t ON e.id = t.event_id WHERE e.location = 'Los Angeles';",0 Show top 3 most mentioned brands in India in 2022,"CREATE TABLE posts (post_id INT, post_text TEXT, brand_mentioned TEXT, post_date DATE); ","SELECT brand_mentioned, COUNT(*) as mention_count FROM posts WHERE YEAR(post_date) = 2022 AND country = 'India' GROUP BY brand_mentioned ORDER BY mention_count DESC LIMIT 3;","SELECT brand_mentioned, COUNT(*) as num_posts FROM posts WHERE post_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY brand_mentioned ORDER BY num_posts DESC LIMIT 3;",0 Find the phone number of all the customers and staff.,CREATE TABLE staff (phone_number VARCHAR); CREATE TABLE customers (phone_number VARCHAR);,SELECT phone_number FROM customers UNION SELECT phone_number FROM staff;,SELECT T1.phone_number FROM customers AS T1 JOIN staff AS T2 ON T1.phone_number = T2.phone_number;,0 Name the location attendance for score of 65-72,"CREATE TABLE table_17103645_10 (location_attendance VARCHAR, score VARCHAR);","SELECT location_attendance FROM table_17103645_10 WHERE score = ""65-72"";","SELECT location_attendance FROM table_17103645_10 WHERE score = ""65-72"";",1 What is the difference between the maximum and minimum close price for each stock?,"CREATE TABLE stocks (stock_symbol TEXT, date DATE, open_price FLOAT, close_price FLOAT); ","SELECT stock_symbol, MAX(close_price) OVER (PARTITION BY stock_symbol ORDER BY stock_symbol) - MIN(close_price) OVER (PARTITION BY stock_symbol ORDER BY stock_symbol) as price_difference FROM stocks;","SELECT stock_symbol, MAX(open_price) - MIN(close_price) FROM stocks GROUP BY stock_symbol;",0 Who was seat no 6 when seat no 1 and seat no 5 were jacques lachapelle and donald s. dutton,"CREATE TABLE table_2231241_1 (seat_no_6 VARCHAR, seat_no_1 VARCHAR, seat_no_5 VARCHAR);","SELECT seat_no_6 FROM table_2231241_1 WHERE seat_no_1 = ""Jacques Lachapelle"" AND seat_no_5 = ""Donald S. Dutton"";","SELECT seat_no_6 FROM table_2231241_1 WHERE seat_no_1 = ""Jacques Lachapelle"" AND seat_no_5 = ""Donald S. Dutton"";",1 "What is the total number of hospital beds in rural areas, excluding clinic beds?","CREATE TABLE hospitals (id INT, name TEXT, location TEXT, num_beds INT); CREATE TABLE clinics (id INT, name TEXT, location TEXT, num_doctors INT, num_beds INT); ",SELECT SUM(h.num_beds) AS total_hospital_beds FROM hospitals h WHERE h.location NOT IN (SELECT c.location FROM clinics c);,SELECT SUM(h.num_beds) FROM hospitals h INNER JOIN clinics c ON h.location = c.location WHERE c.num_beds IS NULL;,0 What is the percentage of employees of color in the HR department?,"CREATE TABLE Employees (EmployeeID INT, Ethnicity VARCHAR(20), Department VARCHAR(20)); ","SELECT (COUNT(*) FILTER (WHERE Ethnicity IN ('Asian', 'Black', 'Latino')) * 100.0 / COUNT(*)) AS Percentage FROM Employees WHERE Department = 'HR';",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Employees WHERE Department = 'HR')) AS Percentage FROM Employees WHERE Department = 'HR' AND Ethnicity = 'African American';,0 How many games were played when the record was 26-21?,"CREATE TABLE table_13619135_6 (game VARCHAR, record VARCHAR);","SELECT COUNT(game) FROM table_13619135_6 WHERE record = ""26-21"";","SELECT COUNT(game) FROM table_13619135_6 WHERE record = ""26-21"";",1 What is the total ratings on share less than 4?,"CREATE TABLE table_name_66 (rating VARCHAR, share INTEGER);",SELECT COUNT(rating) FROM table_name_66 WHERE share < 4;,SELECT COUNT(rating) FROM table_name_66 WHERE share 4;,0 "What is the minimum mental health parity violation cost in the 'MentalHealthParity' table, where the violation type is 'Service'?","CREATE TABLE MentalHealthParity (ViolationID INT, ViolationType VARCHAR(255), ViolationCost FLOAT);",SELECT MIN(ViolationCost) as Min_Cost FROM MentalHealthParity WHERE ViolationType = 'Service';,SELECT MIN(ViolationCost) FROM MentalHealthParity WHERE ViolationType = 'Service';,0 When the division is Division 2 men what is the champion score?,"CREATE TABLE table_15161170_1 (champion_score VARCHAR, division VARCHAR);","SELECT champion_score FROM table_15161170_1 WHERE division = ""division 2 Men"";","SELECT champion_score FROM table_15161170_1 WHERE division = ""2 Men"";",0 Display the total number of properties and the total area in square meters for each city in the 'Cities' table.,"CREATE TABLE cities (id INT, name VARCHAR(255), num_properties INT, total_area INT); ","SELECT name, SUM(num_properties), SUM(total_area) FROM cities GROUP BY name;","SELECT name, SUM(num_properties) as total_properties, SUM(total_area) as total_area FROM cities GROUP BY name;",0 What is the total annual production of Terbium from all mines in 2020?,"CREATE TABLE mine (id INT, name TEXT, location TEXT, Terbium_annual_production FLOAT, timestamp TIMESTAMP); ",SELECT SUM(Terbium_annual_production) FROM mine WHERE EXTRACT(YEAR FROM timestamp) = 2020;,SELECT SUM(terbium_annual_production) FROM mine WHERE YEAR(timestamp) = 2020;,0 What is the total revenue for the 'Pop' genre in the first half of 2020?,"CREATE TABLE genres (id INT, genre VARCHAR(255)); CREATE TABLE sales (id INT, genre_id INT, revenue DECIMAL(10,2), sale_date DATE);",SELECT SUM(sales.revenue) FROM sales JOIN genres ON sales.genre_id = genres.id WHERE genres.genre = 'Pop' AND sale_date BETWEEN '2020-01-01' AND '2020-06-30';,SELECT SUM(sales.revenue) FROM sales JOIN genres ON sales.genre_id = genres.id WHERE genres.genre = 'Pop' AND sales.sale_date BETWEEN '2020-01-01' AND '2020-12-31';,0 Who is the manufacturer when 150.088 is the average speed (mph)?,"CREATE TABLE table_2226343_1 (manufacturer VARCHAR, average_speed__mph_ VARCHAR);","SELECT manufacturer FROM table_2226343_1 WHERE average_speed__mph_ = ""150.088"";","SELECT manufacturer FROM table_2226343_1 WHERE average_speed__mph_ = ""150.088"";",1 What is the average fare for bus routes that have more than 10 stops?,"CREATE TABLE BusRoutes (RouteID INT, Stops INT, Fare DECIMAL(5,2)); ",SELECT AVG(Fare) FROM BusRoutes WHERE Stops > 10;,SELECT AVG(Fare) FROM BusRoutes WHERE Stops > 10;,1 Who had the high rebounds on February 24?,"CREATE TABLE table_name_36 (high_rebounds VARCHAR, date VARCHAR);","SELECT high_rebounds FROM table_name_36 WHERE date = ""february 24"";","SELECT high_rebounds FROM table_name_36 WHERE date = ""february 24"";",1 In which year(s) did the person who has a total of 291 win?,"CREATE TABLE table_name_69 (year_s__won VARCHAR, total VARCHAR);",SELECT year_s__won FROM table_name_69 WHERE total = 291;,SELECT year_s__won FROM table_name_69 WHERE total = 291;,1 What is the total number of military vehicles in the 'military_vehicles' table by type?,"CREATE TABLE military_vehicles (vehicle_type VARCHAR(20), vehicle_count INT); ","SELECT vehicle_type, SUM(vehicle_count) FROM military_vehicles GROUP BY vehicle_type;","SELECT vehicle_type, SUM(vehicle_count) FROM military_vehicles GROUP BY vehicle_type;",1 What is the name of the marketing region that the store Rob Dinning belongs to?,"CREATE TABLE Marketing_Regions (Marketing_Region_Name VARCHAR, Marketing_Region_Code VARCHAR); CREATE TABLE Stores (Marketing_Region_Code VARCHAR, Store_Name VARCHAR);","SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = ""Rob Dinning"";","SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = ""Rob Dinning"";",1 "How many building permits were issued between January 1st, 2021, and June 30th, 2021?","CREATE TABLE building_permits (permit_id INT, building_type TEXT, issue_date DATE, expiration_date DATE); ",SELECT COUNT(permit_id) FROM building_permits WHERE issue_date BETWEEN '2021-01-01' AND '2021-06-30';,SELECT COUNT(*) FROM building_permits WHERE issue_date BETWEEN '2021-01-01' AND '2021-06-30';,0 What was the score when the way team was Wrexham?,"CREATE TABLE table_name_12 (score VARCHAR, away_team VARCHAR);","SELECT score FROM table_name_12 WHERE away_team = ""wrexham"";","SELECT score FROM table_name_12 WHERE away_team = ""wrexham"";",1 What is the minimum number of followers for users in India?,"CREATE TABLE users (id INT, country VARCHAR(255), followers INT); ",SELECT MIN(followers) FROM users WHERE country = 'India';,SELECT MIN(followers) FROM users WHERE country = 'India';,1 What is the rank of the player with less than 34 points?,"CREATE TABLE table_name_95 (rank INTEGER, points INTEGER);",SELECT SUM(rank) FROM table_name_95 WHERE points < 34;,SELECT AVG(rank) FROM table_name_95 WHERE points 34;,0 "What is the Portuguese name of the film who's English title is, Belle Toujours? ","CREATE TABLE table_22118197_1 (portuguese_title VARCHAR, english_title VARCHAR);","SELECT portuguese_title FROM table_22118197_1 WHERE english_title = ""Belle Toujours"";","SELECT portuguese_title FROM table_22118197_1 WHERE english_title = ""Belle Toujours"";",1 What is the original air date for episode graeme clifford directed and lindsay sturman wrote?,"CREATE TABLE table_28859177_3 (original_air_date VARCHAR, directed_by VARCHAR, written_by VARCHAR);","SELECT original_air_date FROM table_28859177_3 WHERE directed_by = ""Graeme Clifford"" AND written_by = ""Lindsay Sturman"";","SELECT original_air_date FROM table_28859177_3 WHERE directed_by = ""Graeme Clifford"" AND written_by = ""Lindsay Sturman"";",1 Name the least podiums for 0 wins and 2005 season for 321 points,"CREATE TABLE table_20398823_1 (podiums INTEGER, points VARCHAR, wins VARCHAR, season VARCHAR);","SELECT MIN(podiums) FROM table_20398823_1 WHERE wins = 0 AND season = 2005 AND points = ""321"";","SELECT MIN(podiums) FROM table_20398823_1 WHERE wins = 0 AND season = ""2005"" AND points = 321;",0 What are the average minimum storage temperatures for chemicals produced in the APAC region?,"CREATE TABLE storage_temperature (id INT PRIMARY KEY, chemical_name VARCHAR(50), region VARCHAR(50), minimum_temperature INT); ","SELECT region, AVG(minimum_temperature) as avg_min_temperature FROM storage_temperature WHERE region = 'APAC' GROUP BY region;",SELECT AVG(minimum_temperature) FROM storage_temperature WHERE region = 'APAC';,0 Which Away team has Carlton for it's Home team?,"CREATE TABLE table_name_96 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team FROM table_name_96 WHERE home_team = ""carlton"";","SELECT away_team FROM table_name_96 WHERE home_team = ""carlton"";",1 What is the total billing amount for criminal cases in 2022?,"CREATE TABLE CivilCases (CaseID INT, CaseType VARCHAR(20), CaseYear INT); CREATE TABLE Billing (BillingID INT, CaseID INT, Amount DECIMAL(10,2)); ",SELECT SUM(Billing.Amount) FROM Billing INNER JOIN CivilCases ON Billing.CaseID = CivilCases.CaseID WHERE CivilCases.CaseType = 'Criminal' AND CivilCases.CaseYear = 2022;,SELECT SUM(Billing.Amount) FROM Billing INNER JOIN CivilCases ON Billing.CaseID = CivilCases.CaseID WHERE CivilCases.CaseType = 'Criminal' AND CivilCases.CaseYear = 2022;,1 How many space missions have been launched by each space agency?,"CREATE TABLE space_missions (id INT, agency VARCHAR(255), mission_year INT); ","SELECT agency, COUNT(*) AS num_missions FROM space_missions GROUP BY agency;","SELECT agency, COUNT(*) FROM space_missions GROUP BY agency;",0 Find the change in biosensor production between 2021 and 2022 in Japan.,"CREATE TABLE biosensor_production (id INT, year INT, location TEXT, quantity INT); ","SELECT location, (SELECT quantity FROM biosensor_production WHERE location = 'Japan' AND year = 2022) - (SELECT quantity FROM biosensor_production WHERE location = 'Japan' AND year = 2021) as change FROM biosensor_production WHERE location = 'Japan';","SELECT location, SUM(quantity) OVER (PARTITION BY location ORDER BY year) as change FROM biosensor_production WHERE location = 'Japan' AND year BETWEEN 2021 AND 2022;",0 "What season began on december 5, 1953?","CREATE TABLE table_15824796_3 (season__number INTEGER, original_air_date VARCHAR);","SELECT MAX(season__number) FROM table_15824796_3 WHERE original_air_date = ""December 5, 1953"";","SELECT MAX(season__number) FROM table_15824796_3 WHERE original_air_date = ""December 5, 1953"";",1 Find the number of sustainable tourism businesses in New Zealand in 2020.,"CREATE TABLE sustainable_tourism (country VARCHAR(20), year INT, num_businesses INT); ",SELECT num_businesses FROM sustainable_tourism WHERE country = 'New Zealand' AND year = 2020;,SELECT SUM(num_businesses) FROM sustainable_tourism WHERE country = 'New Zealand' AND year = 2020;,0 What is the minimum salary of community health workers who identify as Caucasian or Latino?,"CREATE TABLE CommunityHealthWorkers (Id INT, Race VARCHAR(25), Salary DECIMAL(10,2)); ","SELECT MIN(Salary) as MinSalary FROM CommunityHealthWorkers WHERE Race IN ('Caucasian', 'Latino');","SELECT MIN(Salary) FROM CommunityHealthWorkers WHERE Race IN ('Caucasian', 'Latino');",0 What is the recycling rate of paper in the residential sector?,"CREATE TABLE recycling_rates_state (sector VARCHAR(20), state VARCHAR(20), material VARCHAR(20), recycling_rate DECIMAL(5,2)); ",SELECT recycling_rate FROM recycling_rates_state WHERE sector = 'residential' AND material = 'paper';,SELECT recycling_rate FROM recycling_rates_state WHERE sector = 'Residential' AND material = 'Paper';,0 What is the average humidity recorded for sensor 007 in the 'HumidityData' table?,"CREATE TABLE HumidityData (date DATE, humidity FLOAT); CREATE TABLE SensorData (sensor_id INT, humidity_data_id INT, FOREIGN KEY (humidity_data_id) REFERENCES HumidityData(humidity_data_id));",SELECT AVG(HumidityData.humidity) FROM HumidityData JOIN SensorData ON HumidityData.humidity_data_id = SensorData.humidity_data_id WHERE SensorData.sensor_id = 7;,SELECT AVG(HumidityData.humidity) FROM HumidityData INNER JOIN SensorData ON HumidityData.humidity_data_id = SensorData.humidity_data_id WHERE SensorData.sensor_id = 007;,0 How many people attended the game that had the Clippers as visiting team?,"CREATE TABLE table_name_47 (attendance VARCHAR, visitor VARCHAR);","SELECT attendance FROM table_name_47 WHERE visitor = ""clippers"";","SELECT attendance FROM table_name_47 WHERE visitor = ""clippers"";",1 What is the total number of sustainable products manufactured in each factory?,"CREATE TABLE factories (factory_id INT, factory_name VARCHAR(50), sustainable BOOLEAN); CREATE TABLE production (product_id INT, factory_id INT, sustainable BOOLEAN); ","SELECT factory_name, COUNT(*) FROM factories JOIN production ON factories.factory_id = production.factory_id WHERE sustainable = true GROUP BY factory_name;","SELECT f.factory_name, COUNT(p.product_id) as total_sustainable_products FROM factories f INNER JOIN production p ON f.factory_id = p.factory_id WHERE f.sustainable = TRUE GROUP BY f.factory_name;",0 "What is the total number of policies and total claim amount for policies issued in the last month, grouped by underwriter?","CREATE TABLE policy (policy_id INT, underwriter_id INT, issue_date DATE, zip_code INT, risk_score INT); CREATE TABLE claim (claim_id INT, policy_id INT, claim_amount INT);","SELECT underwriter_id, COUNT(policy_id) as policy_count, SUM(claim_amount) as total_claim_amount FROM claim JOIN policy ON claim.policy_id = policy.policy_id WHERE policy.issue_date >= DATEADD(MONTH, -1, GETDATE()) GROUP BY underwriter_id;","SELECT underwriter_id, COUNT(policy.policy_id) as total_policy_count, SUM(claim.claim_amount) as total_claim_amount FROM policy JOIN claim ON policy.policy_id = claim.policy_id WHERE policy.issue_date >= DATEADD(month, -1, GETDATE()) GROUP BY underwriter_id;",0 What is the total carbon offset of projects in the 'CarbonOffsetProjects' table?,"CREATE TABLE CarbonOffsetProjects (id INT, name VARCHAR(100), location VARCHAR(100), type VARCHAR(50), carbon_offset FLOAT);",SELECT SUM(carbon_offset) FROM CarbonOffsetProjects;,SELECT SUM(carbon_offset) FROM CarbonOffsetProjects;,1 Which regulatory frameworks are most frequently used in blockchain projects based in the United States?,"CREATE TABLE blockchain_projects (project_id INT, jurisdiction VARCHAR, regulatory_framework VARCHAR);","SELECT regulatory_framework, COUNT(project_id) FROM blockchain_projects WHERE jurisdiction = 'United States' GROUP BY regulatory_framework ORDER BY COUNT(project_id) DESC;","SELECT regulatory_framework, COUNT(*) FROM blockchain_projects WHERE jurisdiction = 'United States' GROUP BY regulatory_framework ORDER BY COUNT(*) DESC LIMIT 1;",0 Determine the total waste generation for the year 2020 for all cities,"CREATE TABLE waste_generation (city VARCHAR(20), year INT, daily_waste_generation FLOAT);",SELECT SUM(daily_waste_generation * 365) FROM waste_generation WHERE year = 2020;,SELECT SUM(daily_waste_generation) FROM waste_generation WHERE year = 2020;,0 Which player was picked after 23?,"CREATE TABLE table_name_89 (player VARCHAR, pick INTEGER);",SELECT player FROM table_name_89 WHERE pick > 23;,SELECT player FROM table_name_89 WHERE pick > 23;,1 "Which Airline has a Fleet size larger than 17, and a IATA of pr?","CREATE TABLE table_name_98 (airline VARCHAR, fleet_size VARCHAR, iata VARCHAR);","SELECT airline FROM table_name_98 WHERE fleet_size > 17 AND iata = ""pr"";","SELECT airline FROM table_name_98 WHERE fleet_size > 17 AND iata = ""pr"";",1 What shows for Set 5 when the Total was 77 - 65?,"CREATE TABLE table_name_85 (set_5 VARCHAR, total VARCHAR);","SELECT set_5 FROM table_name_85 WHERE total = ""77 - 65"";","SELECT set_5 FROM table_name_85 WHERE total = ""77 - 65"";",1 Delete records from sustainable tourism practices table with id greater than 2,"CREATE TABLE sustainable_practices (id INT PRIMARY KEY, country VARCHAR(50), practice VARCHAR(100));",WITH cte AS (DELETE FROM sustainable_practices WHERE id > 2 RETURNING *) SELECT * FROM cte;,DELETE FROM sustainable_practices WHERE id > 2;,0 Who was the top donor in Q1 2021?,"CREATE TABLE donations (id INT, donor_name TEXT, amount DECIMAL(10,2)); ",SELECT donor_name FROM donations WHERE amount = (SELECT MAX(amount) FROM donations WHERE donation_date BETWEEN '2021-01-01' AND '2021-03-31'),"SELECT donor_name, SUM(amount) as total_donations FROM donations WHERE QUARTER(donation_date) = 1 AND YEAR(donation_date) = 2021 GROUP BY donor_name ORDER BY total_donations DESC LIMIT 1;",0 Insert a record into 'ethical_ai_research' table,"CREATE TABLE ethical_ai_research (id INT PRIMARY KEY, title VARCHAR(255), abstract TEXT, author_name VARCHAR(255), author_affiliation VARCHAR(255), publication_date DATETIME);","INSERT INTO ethical_ai_research (id, title, abstract, author_name, author_affiliation, publication_date) VALUES (1, 'Bias in AI Algorithms', 'Exploring causes and potential solutions...', 'Dr. Jane Smith', 'MIT', '2023-03-15 14:30:00');","INSERT INTO ethical_ai_research (id, title, abstract, author_name, author_affiliation, publication_date) VALUES (1, 'Anthology of Biotechnology', 'Anthology of Biotechnology', '2022-01-01'), (2, 'Anthology of Biotechnology', '2022-12-31'), (3, 'Anthology of Biotechnology', '2022-12-31'), (4, 'Anthology of Biotechnology', 'Anthology of Biotechnology', '2022-12-31');",0 Which country has the lowest sales revenue for natural haircare products in Q3 2022?,"CREATE TABLE HaircareSales (product_id INT, product_name VARCHAR(20), country VARCHAR(20), total_sales DECIMAL(5,2)); ","SELECT country, MIN(total_sales) as lowest_q3_sales FROM HaircareSales WHERE product_name LIKE '%haircare%' AND sale_date BETWEEN '2022-07-01' AND '2022-09-30' GROUP BY country;","SELECT country, MIN(total_sales) FROM HaircareSales WHERE product_name LIKE '%natural%' AND product_name LIKE '%natural%' AND product_date BETWEEN '2022-04-01' AND '2022-06-30' GROUP BY country;",0 How many rebounds per game did he have at the 2006 fiba world championship?,"CREATE TABLE table_2761641_1 (rebounds_per_game VARCHAR, tournament VARCHAR);","SELECT rebounds_per_game FROM table_2761641_1 WHERE tournament = ""2006 FIBA World Championship"";","SELECT rebounds_per_game FROM table_2761641_1 WHERE tournament = ""2006 Fiba World Championship"";",0 Delete records with landfill capacity below 50000 in 'landfill_capacity' table for 2019.,"CREATE TABLE landfill_capacity (year INT, location TEXT, capacity INT); ",DELETE FROM landfill_capacity WHERE year = 2019 AND capacity < 50000;,DELETE FROM landfill_capacity WHERE year = 2019 AND capacity 50000;,0 Get the details of production lines that have waste disposal methods marked as 'Donation'.,"CREATE TABLE Production (ProductionID INT PRIMARY KEY, ProductionLine VARCHAR(50), WasteID INT, FOREIGN KEY (WasteID) REFERENCES Waste(WasteID)); CREATE TABLE Waste (WasteID INT PRIMARY KEY, WasteType VARCHAR(50), DisposalMethod VARCHAR(50)); ",SELECT Production.ProductionLine FROM Production INNER JOIN Waste ON Production.WasteID = Waste.WasteID WHERE Waste.DisposalMethod = 'Donation';,SELECT ProductionLine FROM Production INNER JOIN Waste ON Production.WasteID = Waste.WasteID WHERE Waste.WasteType = 'Donation' AND Waste.DisposalMethod = 'Donation';,0 What is the average production cost of sustainable fabrics with a rating above 4?,"CREATE TABLE fabric_costs (id INT, fabric_id INT, production_cost FLOAT); ",SELECT AVG(production_cost) FROM fabric_costs fc JOIN fabrics f ON fc.fabric_id = f.id WHERE f.sustainability_rating > 4;,SELECT AVG(production_cost) FROM fabric_costs WHERE fabric_id IN (SELECT fabric_id FROM fabric_costs WHERE rating > 4);,0 "What is the number of posts related to veganism in the United Kingdom, published by users with more than 10,000 followers, in the past week?","CREATE TABLE posts (post_id INT, user_id INT, followers INT, post_date DATE, content TEXT);","SELECT COUNT(*) FROM posts p WHERE p.followers > 10000 AND p.content LIKE '%vegan%' AND p.post_date >= DATEADD(day, -7, GETDATE()) AND p.country = 'United Kingdom';","SELECT COUNT(*) FROM posts WHERE content LIKE '%vegan%' AND followers > 10000 AND post_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK);",0 Which coal mines in China have safety scores below 75?,"CREATE TABLE mine_sites (id INT, name VARCHAR, type VARCHAR, location VARCHAR, PRIMARY KEY (id)); CREATE TABLE safety_inspections (id INT, mine_id INT, safety_score INT, PRIMARY KEY (id), FOREIGN KEY (mine_id) REFERENCES mine_sites(id)); ","SELECT ms.name, si.safety_score FROM mine_sites ms JOIN safety_inspections si ON ms.id = si.mine_id WHERE ms.type = 'Coal' AND si.safety_score < 75;",SELECT ms.name FROM mine_sites ms INNER JOIN safety_inspections si ON ms.id = si.mine_id WHERE ms.type = 'Coal' AND ms.location = 'China' AND si.safety_score 75;,0 What place did the golfer take whose country is South Africa?,"CREATE TABLE table_name_72 (place VARCHAR, country VARCHAR);","SELECT place FROM table_name_72 WHERE country = ""south africa"";","SELECT place FROM table_name_72 WHERE country = ""south africa"";",1 "Name the Runs which has Venue of adelaide oval , adelaide?","CREATE TABLE table_name_47 (runs VARCHAR, venue VARCHAR);","SELECT runs FROM table_name_47 WHERE venue = ""adelaide oval , adelaide"";","SELECT runs FROM table_name_47 WHERE venue = ""adelaide oval, adelaide"";",0 What is the average attendance of the game where the home team was the Blues?,"CREATE TABLE table_name_40 (attendance INTEGER, home VARCHAR);","SELECT AVG(attendance) FROM table_name_40 WHERE home = ""blues"";","SELECT AVG(attendance) FROM table_name_40 WHERE home = ""blues"";",1 Who played in Maryland the same year that Deep Run Valley LL Hilltown played in Pennsylvania?,"CREATE TABLE table_13012165_1 (maryland VARCHAR, pennsylvania VARCHAR);","SELECT maryland FROM table_13012165_1 WHERE pennsylvania = ""Deep Run Valley LL Hilltown"";","SELECT maryland FROM table_13012165_1 WHERE pennsylvania = ""Deep Run Valley LL Hilltown"";",1 what is the average carbon sequestration per forest area in each country?,"CREATE TABLE forests (id INT, country VARCHAR(255), area_ha INT, year INT);","SELECT country, AVG(sequestration_tons / area_ha) as avg_sequestration FROM forests JOIN carbon_sequestration ON forests.country = carbon_sequestration.country GROUP BY country;","SELECT country, AVG(area_ha) as avg_sequestration FROM forests GROUP BY country;",0 How many new entries this round have clubs 2 → 1?,"CREATE TABLE table_name_58 (new_entries_this_round VARCHAR, clubs VARCHAR);","SELECT new_entries_this_round FROM table_name_58 WHERE clubs = ""2 → 1"";","SELECT COUNT(new_entries_this_round) FROM table_name_58 WHERE clubs = ""2 1"";",0 What is the number of job offers extended to female candidates in the last 6 months?,"CREATE TABLE JobOffers (OfferID INT, JobCategory VARCHAR(20), Gender VARCHAR(10), OfferDate DATE); ","SELECT JobCategory, COUNT(*) FROM JobOffers WHERE Gender = 'Female' AND OfferDate BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) AND CURRENT_DATE GROUP BY JobCategory;","SELECT COUNT(*) FROM JobOffers WHERE Gender = 'Female' AND OfferDate >= DATEADD(month, -6, GETDATE());",0 What is the total quantity of items with type 'C' in warehouse K and warehouse L?,"CREATE TABLE warehouse_k(item_id INT, item_type VARCHAR(10), quantity INT);CREATE TABLE warehouse_l(item_id INT, item_type VARCHAR(10), quantity INT);",SELECT quantity FROM warehouse_k WHERE item_type = 'C' UNION ALL SELECT quantity FROM warehouse_l WHERE item_type = 'C';,SELECT SUM(quantity) FROM warehouse_k WHERE item_type = 'C' INTERSECT SELECT SUM(quantity) FROM warehouse_l WHERE item_type = 'C';,0 "Count the number of sign language interpreters in the ""service_providers"" table","CREATE TABLE service_providers (id INT, service_type VARCHAR(255), quantity INT); ",SELECT COUNT(*) FROM service_providers WHERE service_type = 'sign_language_interpreters';,SELECT COUNT(*) FROM service_providers WHERE service_type = 'Sign Language Interpreter';,0 What is the total quantity of 'Cerium' produced by 'South Africa' before 2018?,"CREATE TABLE production (element VARCHAR(10), country VARCHAR(20), quantity INT, year INT); ",SELECT SUM(quantity) FROM production WHERE element = 'Cerium' AND country = 'South Africa' AND year < 2018;,SELECT SUM(quantity) FROM production WHERE element = 'Cerium' AND country = 'South Africa' AND year 2018;,0 "How many safety incidents occurred for each AI model, ordered by the number of incidents in descending order?","CREATE TABLE safety_incidents (incident_id INT PRIMARY KEY, model_id INT, incident_date DATE, FOREIGN KEY (model_id) REFERENCES ai_models(model_id)); ","SELECT model_id, COUNT(*) as num_incidents FROM safety_incidents GROUP BY model_id ORDER BY num_incidents DESC;","SELECT model_id, COUNT(*) as incident_count FROM safety_incidents GROUP BY model_id ORDER BY incident_count DESC;",0 Which car won the same award in 2000 that the ferrari f133 5.5l v12 456 / 550 won in 2001?,CREATE TABLE table_name_13 (Id VARCHAR);,"SELECT 2000 FROM table_name_13 WHERE 2001 = ""ferrari f133 5.5l v12 456 / 550"";","SELECT 2000 FROM table_name_13 WHERE 2001 = ""ferrari f133 5.5l v12 456 / 550"";",1 List all hospitals in rural areas,"CREATE TABLE rural_hospitals( hospital_id INT PRIMARY KEY, name VARCHAR(255), bed_count INT, rural_urban_classification VARCHAR(50))",SELECT * FROM rural_hospitals WHERE rural_urban_classification = 'Rural',SELECT * FROM rural_hospitals WHERE rural_urban_classification = 'Rural';,0 What is the SDLP of Belfast?,"CREATE TABLE table_28005809_2 (sdlp INTEGER, council VARCHAR);","SELECT MAX(sdlp) FROM table_28005809_2 WHERE council = ""Belfast"";","SELECT MAX(sdlp) FROM table_28005809_2 WHERE council = ""Belfast"";",1 "What is the average number of livestock per farm in the 'rural_farms' table, grouped by farm type and region, having more than 50 animals?","CREATE TABLE rural_farms (id INT, type VARCHAR(20), animals INT, region VARCHAR(30));","SELECT type, region, AVG(animals) FROM rural_farms WHERE animals > 50 GROUP BY type, region;","SELECT type, region, AVG(animals) as avg_animal_count FROM rural_farms GROUP BY type, region HAVING avg_animal_count > 50 GROUP BY type, region;",0 "What was the Company or Product name where Entrepreneurs Geoff and Colette Bell requested £75,000?","CREATE TABLE table_name_25 (company_or_product_name VARCHAR, money_requested__£_ VARCHAR, entrepreneur_s_ VARCHAR);","SELECT company_or_product_name FROM table_name_25 WHERE money_requested__£_ = ""75,000"" AND entrepreneur_s_ = ""geoff and colette bell"";","SELECT company_or_product_name FROM table_name_25 WHERE money_requested__£_ = ""£75,000"" AND entrepreneur_s_ = ""geoff and colette bell"";",0 What is the sum of Kilometers that has a Station Code of KGQ?,"CREATE TABLE table_name_43 (kilometers VARCHAR, station_code VARCHAR);","SELECT COUNT(kilometers) FROM table_name_43 WHERE station_code = ""kgq"";","SELECT COUNT(kilometers) FROM table_name_43 WHERE station_code = ""kgq"";",1 How many points did Connaught Type A chassis earn on average before 1955?,"CREATE TABLE table_name_32 (points INTEGER, year VARCHAR, chassis VARCHAR);","SELECT AVG(points) FROM table_name_32 WHERE year < 1955 AND chassis = ""connaught type a"";","SELECT AVG(points) FROM table_name_32 WHERE year 1955 AND chassis = ""connaught type a"";",0 "Which Surface has a Score of 6–4, 6–2?","CREATE TABLE table_name_65 (surface VARCHAR, score VARCHAR);","SELECT surface FROM table_name_65 WHERE score = ""6–4, 6–2"";","SELECT surface FROM table_name_65 WHERE score = ""6–4, 6–2"";",1 What was the 4th day in the year before 2012 that the finish is 33rd?,"CREATE TABLE table_name_52 (year VARCHAR, finish_position VARCHAR);","SELECT 4 AS th_day FROM table_name_52 WHERE year < 2012 AND finish_position = ""33rd"";","SELECT 4 AS th_day FROM table_name_52 WHERE year 2012 AND finish_position = ""33rd"";",0 "Loss of wilcox, and a Date of jun 18 had what opponent?","CREATE TABLE table_name_95 (opponent VARCHAR, loss VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_95 WHERE loss = ""wilcox"" AND date = ""jun 18"";","SELECT opponent FROM table_name_95 WHERE loss = ""wilcox"" AND date = ""jun 18"";",1 How many different combinations of scores by individual judges were given to the contestant competing against Mukul Dev?,"CREATE TABLE table_18278508_6 (scores_by_each_individual_judge VARCHAR, co_contestant__yaar_vs_pyaar_ VARCHAR);","SELECT COUNT(scores_by_each_individual_judge) FROM table_18278508_6 WHERE co_contestant__yaar_vs_pyaar_ = ""Mukul Dev"";","SELECT COUNT(scores_by_each_individual_judge) FROM table_18278508_6 WHERE co_contestant__yaar_vs_pyaar_ = ""Mukul Dev"";",1 "What is the average salary of workers per manufacturing site, ranked by the highest average salary?","CREATE TABLE sites (site_id INT, site_name VARCHAR(50), country VARCHAR(50), worker_count INT);CREATE TABLE worker_salaries (worker_id INT, site_id INT, salary DECIMAL(10, 2));","SELECT site_name, AVG(salary) as avg_salary FROM worker_salaries ws JOIN sites s ON ws.site_id = s.site_id GROUP BY site_id ORDER BY avg_salary DESC;","SELECT s.site_name, AVG(ws.salary) as avg_salary FROM sites s JOIN worker_salaries ws ON s.site_id = ws.site_id GROUP BY s.site_name ORDER BY avg_salary DESC;",0 What player from the United States played for the Grizzlies from 1997-1998?,"CREATE TABLE table_name_83 (player VARCHAR, nationality VARCHAR, years_for_grizzlies VARCHAR);","SELECT player FROM table_name_83 WHERE nationality = ""united states"" AND years_for_grizzlies = ""1997-1998"";","SELECT player FROM table_name_83 WHERE nationality = ""united states"" AND years_for_grizzlies = ""1997-1998"";",1 What is the maximum billing amount for each attorney?,"CREATE TABLE attorneys (attorney_id INT, name VARCHAR(50), start_date DATE); CREATE TABLE billing (billing_id INT, attorney_id INT, amount DECIMAL(10, 2), bill_date DATE); ","SELECT attorney_id, MAX(amount) as max_amount FROM billing GROUP BY attorney_id;","SELECT attorneys.name, MAX(billing.amount) FROM attorneys INNER JOIN billing ON attorneys.attorney_id = billing.attorney_id GROUP BY attorneys.name;",0 Find the average temperature for each month in 2022 in the 'temperature' table.,"CREATE TABLE temperature (year INT, month INT, avg_temp FLOAT); ","SELECT month, AVG(avg_temp) as avg_temp FROM temperature WHERE year = 2022 GROUP BY month;","SELECT month, AVG(avg_temp) as avg_temp FROM temperature WHERE year = 2022 GROUP BY month;",1 List the total waste produced by each waste category in the waste_categories_data table.,"CREATE TABLE waste_categories_data (waste_category VARCHAR(255), waste_amount INT); ","SELECT waste_category, SUM(waste_amount) FROM waste_categories_data GROUP BY waste_category;","SELECT waste_category, SUM(waste_amount) FROM waste_categories_data GROUP BY waste_category;",1 What are the total production figures for wells in Oklahoma?,"CREATE TABLE wells (well_id INT, well_name VARCHAR(50), location VARCHAR(50), production FLOAT); ","SELECT location, SUM(production) FROM wells WHERE location = 'Oklahoma' GROUP BY location;",SELECT SUM(production) FROM wells WHERE location = 'Oklahoma';,0 Find the number of co-owned properties by each gender.,"CREATE TABLE properties (property_id INT, price FLOAT, owner_id INT); CREATE TABLE owners (owner_id INT, name VARCHAR(255), gender VARCHAR(6)); ","SELECT owners.gender, COUNT(properties.property_id) FROM properties INNER JOIN owners ON properties.owner_id = owners.owner_id GROUP BY owners.gender;","SELECT owners.gender, COUNT(properties.property_id) FROM owners INNER JOIN properties ON owners.owner_id = properties.owner_id GROUP BY owners.gender;",0 What team had a qual 1 of 1:02.755?,"CREATE TABLE table_name_78 (team VARCHAR, qual_1 VARCHAR);","SELECT team FROM table_name_78 WHERE qual_1 = ""1:02.755"";","SELECT team FROM table_name_78 WHERE qual_1 = ""1:02.755"";",1 "What is the sum of FA cups of club Stalybridge Celtic, which has more than 0 FA trophies and a total less than 20?","CREATE TABLE table_name_50 (fa_cup INTEGER, total VARCHAR, fa_trophy VARCHAR, club VARCHAR);","SELECT SUM(fa_cup) FROM table_name_50 WHERE fa_trophy > 0 AND club = ""stalybridge celtic"" AND total < 20;","SELECT SUM(fa_cup) FROM table_name_50 WHERE fa_trophy > 0 AND club = ""stalybridge celtic"" AND total 20;",0 What is the minimum salinity level in the Pacific Ocean in February?,"CREATE TABLE pacific_ocean_salinity (id INT, date DATE, salinity FLOAT); ",SELECT MIN(salinity) FROM pacific_ocean_salinity WHERE EXTRACT(MONTH FROM date) = 2 AND EXTRACT(YEAR FROM date) = 2021 AND ocean_name = 'Pacific Ocean';,SELECT MIN(salinity) FROM pacific_ocean_salinity WHERE date BETWEEN '2022-02-01' AND '2022-02-28';,0 What was the total revenue for 'ClinicalTech' from drug sales in 2019?,"CREATE TABLE ClinicalTech_DrugSales(company VARCHAR(20), year INT, revenue DECIMAL(10,2));",SELECT SUM(revenue) FROM ClinicalTech_DrugSales WHERE company = 'ClinicalTech' AND year = 2019;,SELECT SUM(revenue) FROM ClinicalTech_DrugSales WHERE company = 'ClinicalTech' AND year = 2019;,1 What was the total revenue for each bus route in the month of January 2022?,"CREATE TABLE route (route_id INT, route_name TEXT);CREATE TABLE fare (fare_id INT, route_id INT, fare_amount DECIMAL, collection_date DATE); ","SELECT r.route_name, SUM(f.fare_amount) as total_revenue FROM route r JOIN fare f ON r.route_id = f.route_id WHERE f.collection_date BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY r.route_name;","SELECT route_name, SUM(fare_amount) as total_revenue FROM route JOIN fare ON route.route_id = fare.route_id WHERE collection_date BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY route_name;",0 "What is the average salary of construction workers in California, grouped by occupation?","CREATE TABLE Construction_Labor (worker_id INT, occupation VARCHAR(50), state VARCHAR(50), salary FLOAT); ","SELECT occupation, AVG(salary) FROM Construction_Labor WHERE state = 'California' GROUP BY occupation;","SELECT occupation, AVG(salary) FROM Construction_Labor WHERE state = 'California' GROUP BY occupation;",1 "What was the total amount of funding received by agricultural projects in Guatemala in 2019, led by either women or Indigenous communities?","CREATE TABLE Agricultural_Projects (Project_ID INT, Project_Name TEXT, Location TEXT, Funding_Received DECIMAL, Led_By TEXT, Year INT); ",SELECT SUM(Funding_Received) FROM Agricultural_Projects WHERE (Led_By = 'Women' OR Led_By = 'Indigenous') AND Year = 2019 AND Location = 'Guatemala';,"SELECT SUM(Funding_Received) FROM Agricultural_Projects WHERE Location = 'Guatemala' AND Led_By IN ('Female', 'Indigenous') AND Year = 2019;",0 What is the total number of James Bond 007: Everything or Nothing for each system?,"CREATE TABLE table_10875694_11 (system VARCHAR, title VARCHAR);","SELECT COUNT(system) FROM table_10875694_11 WHERE title = ""James Bond 007: Everything or Nothing"";","SELECT system FROM table_10875694_11 WHERE title = ""James Bond 007: Everything or Nothing"";",0 "Which result has a Location of canada, and a Record of 3-3?","CREATE TABLE table_name_77 (res VARCHAR, location VARCHAR, record VARCHAR);","SELECT res FROM table_name_77 WHERE location = ""canada"" AND record = ""3-3"";","SELECT res FROM table_name_77 WHERE location = ""canada"" AND record = ""3-3"";",1 Update the 'expertise' of instructor 'Jane Smith' to 'Ethical AI',"CREATE TABLE instructors (id INT, name VARCHAR(50), country VARCHAR(50), expertise VARCHAR(50)); ",UPDATE instructors SET expertise = 'Ethical AI' WHERE name = 'Jane Smith';,UPDATE instructors SET expertise = 'Ethical AI' WHERE name = 'Jane Smith';,1 What is the lowest draw with rank 4?,"CREATE TABLE table_name_94 (draw INTEGER, rank VARCHAR);",SELECT MIN(draw) FROM table_name_94 WHERE rank = 4;,SELECT MIN(draw) FROM table_name_94 WHERE rank = 4;,1 Which agricultural innovations received funding in the last three years?,"CREATE TABLE AgriculturalInnovations (innovation VARCHAR(50), funding_date DATE, funding_amount FLOAT);","SELECT innovation FROM (SELECT innovation, ROW_NUMBER() OVER(PARTITION BY YEAR(funding_date) ORDER BY funding_date DESC) as rn FROM AgriculturalInnovations) WHERE rn <= 3;","SELECT innovation FROM AgriculturalInnovations WHERE funding_date >= DATEADD(year, -3, GETDATE());",0 "What is the average teaching experience for teachers who teach each subject, grouped by years of experience?","CREATE TABLE teachers (id INT, name VARCHAR(50), subject VARCHAR(50), experience INT); ","SELECT subject, experience, AVG(experience) as avg_experience FROM teachers GROUP BY subject, (experience);","SELECT subject, AVG(experience) as avg_experience FROM teachers GROUP BY subject;",0 Tell me the discovery/publication for still living,"CREATE TABLE table_name_55 (discovery___publication_of_name VARCHAR, fossil_record VARCHAR);","SELECT discovery___publication_of_name FROM table_name_55 WHERE fossil_record = ""still living"";","SELECT discovery___publication_of_name FROM table_name_55 WHERE fossil_record = ""still living"";",1 What is the average number of meals served daily in refugee camps during Ramadan?,"CREATE TABLE meals_served (id INT PRIMARY KEY, camp VARCHAR(50), month VARCHAR(20), day INT, number INT); ",SELECT AVG(number) FROM meals_served WHERE month = 'Ramadan';,SELECT AVG(number) FROM meals_served WHERE camp = 'Refugee Camp' AND month = 'Ramadan';,0 List the name and count of each product in all orders.,"CREATE TABLE orders (order_id VARCHAR); CREATE TABLE products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR);","SELECT T3.product_name, COUNT(*) FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id;","SELECT T1.product_name, COUNT(*) FROM orders AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id;",0 Name the steals for season 2007/2008,"CREATE TABLE table_17309500_1 (steals VARCHAR, season VARCHAR);","SELECT steals FROM table_17309500_1 WHERE season = ""2007/2008"";","SELECT steals FROM table_17309500_1 WHERE season = ""2007/2008"";",1 Who is the oldest visitor from Sydney?,"CREATE TABLE Visitors (id INT, name VARCHAR(20), age INT, city VARCHAR(20)); ","SELECT name, MAX(age) as max_age FROM Visitors WHERE city = 'Sydney'","SELECT name, age FROM Visitors WHERE city = 'Sydney' ORDER BY age DESC LIMIT 1;",0 What is the total number of cultural heritage sites in the Middle Eastern region?,"CREATE TABLE sites_me (site_id INT, site_name VARCHAR(255), country_name VARCHAR(255), region VARCHAR(255)); ",SELECT COUNT(*) FROM sites_me WHERE region = 'Middle East';,SELECT COUNT(*) FROM sites_me WHERE region = 'Middle Eastern';,0 What is the standard deviation of carbon offset values for projects in the 'carbon_offset' table?,"CREATE TABLE carbon_offset (id INT, project_name TEXT, location TEXT, carbon_offset_value FLOAT); ",SELECT STDDEV(carbon_offset_value) FROM carbon_offset;,SELECT SUM(carbon_offset_value) FROM carbon_offset;,0 Name the transfer fee for transfer status for fra,"CREATE TABLE table_name_24 (transfer_fee VARCHAR, status VARCHAR, country VARCHAR);","SELECT transfer_fee FROM table_name_24 WHERE status = ""transfer"" AND country = ""fra"";","SELECT transfer_fee FROM table_name_24 WHERE status = ""transfer"" AND country = ""fra"";",1 Name the engine with rounds of 11 and teams of 25,"CREATE TABLE table_name_29 (engine VARCHAR, rounds VARCHAR, teams VARCHAR);","SELECT engine FROM table_name_29 WHERE rounds = ""11"" AND teams = ""25"";",SELECT engine FROM table_name_29 WHERE rounds = 11 AND teams = 25;,0 Who played on clay on 3 march 2012?,"CREATE TABLE table_name_16 (opponent VARCHAR, surface VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_16 WHERE surface = ""clay"" AND date = ""3 march 2012"";","SELECT opponent FROM table_name_16 WHERE surface = ""clay"" AND date = ""3 march 2012"";",1 What is the largest mass(kg)?,CREATE TABLE table_1558077_2 (mass__kg_ INTEGER);,SELECT MAX(mass__kg_) FROM table_1558077_2;,SELECT MAX(mass__kg_) FROM table_1558077_2;,1 What was the highest number of lose for a player named Santos with more than 45 points?,"CREATE TABLE table_name_88 (lose INTEGER, name VARCHAR, point VARCHAR);","SELECT MAX(lose) FROM table_name_88 WHERE name = ""santos"" AND point > 45;","SELECT MAX(lose) FROM table_name_88 WHERE name = ""santos"" AND point > 45;",1 Who are the male founders that have not received any funding?,"CREATE TABLE founders(id INT, name VARCHAR(50), gender VARCHAR(10), industry VARCHAR(20)); CREATE TABLE funding(id INT, founder_id INT, amount INT); ",SELECT founders.name FROM founders LEFT JOIN funding ON founders.id = funding.founder_id WHERE founders.gender = 'Male' AND funding.id IS NULL;,SELECT founders.name FROM founders INNER JOIN funding ON founders.id = funding.founder_id WHERE founders.gender = 'Male' AND funding.id IS NULL;,0 Insert new smart city districts with ID and population.,"CREATE TABLE Smart_City_Districts (id INT, district VARCHAR(50), population INT);","INSERT INTO Smart_City_Districts (id, district, population) VALUES (4, 'Westside', 700000), (5, 'Northeast', 900000), (6, 'Southeast', 600000);","INSERT INTO Smart_City_Districts (id, district, population) VALUES (1, 'Smart City District', 'Smart City District', 'Smart City District'), (2, 'Smart City District', 'Smart City District', 'Smart City District'), (3, 'Smart City District', 'Smart City District', 'Smart City District'), (4, 'Smart City District', 'Smart City District', 'Smart City District');",0 Which artists from Asia have their artwork displayed in galleries located in New York?,"CREATE TABLE Artists (ArtistID INT, Name TEXT, Nationality TEXT);CREATE TABLE Artworks (ArtworkID INT, Title TEXT, ArtistID INT);CREATE TABLE GalleryLocations (GalleryID INT, Location TEXT);CREATE TABLE GalleryArtworks (GalleryID INT, ArtworkID INT);",SELECT Artists.Name FROM Artists INNER JOIN Artworks ON Artists.ArtistID = Artworks.ArtistID INNER JOIN GalleryArtworks ON Artworks.ArtworkID = GalleryArtworks.ArtworkID INNER JOIN GalleryLocations ON GalleryArtworks.GalleryID = GalleryLocations.GalleryID WHERE Artists.Nationality = 'Asia' AND GalleryLocations.Location = 'New York';,SELECT Artists.Name FROM Artists INNER JOIN Artworks ON Artists.ArtistID = Artworks.ArtistID INNER JOIN GalleryArtworks ON Artworks.ArtworkID = GalleryArtworks.ArtworkID INNER JOIN GalleryLocations ON GalleryArtworks.GalleryID = GalleryLocations.GalleryID WHERE Artists.Nationality = 'Asia' AND GalleryLocations.Location = 'New York';,1 How many graduate students in the Law department have published more than 2 papers in the year 2020?,"CREATE TABLE GraduateStudents (StudentID INT, Name VARCHAR(50), Department VARCHAR(50), Publications INT, PublicationYear INT);",SELECT COUNT(StudentID) FROM GraduateStudents WHERE Department = 'Law' AND Publications > 2 AND PublicationYear = 2020;,SELECT COUNT(*) FROM GraduateStudents WHERE Department = 'Law' AND Publications > 2 AND PublicationYear = 2020;,0 Find the number of farmers in each country and the total revenue for each country?,"CREATE TABLE Farmers (id INT, name TEXT, revenue REAL, country TEXT);","SELECT country, COUNT(DISTINCT id) as num_farmers, SUM(revenue) as total_revenue FROM Farmers GROUP BY country;","SELECT country, COUNT(*) as num_farmers, SUM(revenue) as total_revenue FROM Farmers GROUP BY country;",0 "Identify the number of IoT devices in the 'Sensors' table, partitioned by device type.","CREATE TABLE Sensors (id INT, device_type VARCHAR(50), location VARCHAR(50)); ","SELECT device_type, COUNT(*) as DeviceCount FROM Sensors GROUP BY device_type;","SELECT device_type, COUNT(*) FROM Sensors GROUP BY device_type;",0 What is the maximum number of volunteer hours in a single day?,"CREATE TABLE Volunteers (VolunteerID INT, Name TEXT, Hours FLOAT, VolunteerDate DATE); ",SELECT MAX(Hours) as MaxHours FROM Volunteers;,SELECT MAX(Hours) FROM Volunteers;,0 List policy numbers and claim amounts for policyholders living in 'California' who have not filed a claim.,"CREATE TABLE Policies (PolicyNumber INT, PolicyholderID INT, PolicyState VARCHAR(20)); CREATE TABLE Claims (PolicyholderID INT, ClaimAmount DECIMAL(10,2), PolicyState VARCHAR(20)); ","SELECT Policies.PolicyNumber, NULL AS ClaimAmount FROM Policies LEFT JOIN Claims ON Policies.PolicyholderID = Claims.PolicyholderID WHERE Policies.PolicyState = 'California' AND Claims.PolicyholderID IS NULL;","SELECT Policies.PolicyNumber, Claims.ClaimAmount FROM Policies INNER JOIN Claims ON Policies.PolicyholderID = Claims.PolicyholderID WHERE Policies.PolicyState = 'California' AND Claims.PolicyState IS NULL;",0 How many customers in each size category have made a purchase in the past year?,"CREATE TABLE Purchases (PurchaseID INT, CustomerID INT, PurchaseDate DATE); ","SELECT Customers.Size, COUNT(DISTINCT Customers.CustomerID) FROM Customers INNER JOIN Purchases ON Customers.CustomerID = Purchases.CustomerID WHERE Purchases.PurchaseDate BETWEEN '2020-01-01' AND '2021-12-31' GROUP BY Customers.Size;","SELECT SizeCategory, COUNT(DISTINCT CustomerID) FROM Purchases WHERE PurchaseDate >= DATEADD(year, -1, GETDATE()) GROUP BY SizeCategory;",0 What is the total number of shared e-scooters available in Paris?,"CREATE TABLE shared_vehicles (id INT, type VARCHAR(20), availability INT, city VARCHAR(20)); ",SELECT SUM(availability) FROM shared_vehicles WHERE type = 'E-scooter' AND city = 'Paris';,SELECT SUM(availability) FROM shared_vehicles WHERE type = 'e-scooter' AND city = 'Paris';,0 Who was the away team playing the home team North Melbourne?,"CREATE TABLE table_name_88 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team FROM table_name_88 WHERE home_team = ""north melbourne"";","SELECT away_team FROM table_name_88 WHERE home_team = ""north melbourne"";",1 What is the average round of the match with kevin manderson as the opponent?,"CREATE TABLE table_name_18 (round INTEGER, opponent VARCHAR);","SELECT AVG(round) FROM table_name_18 WHERE opponent = ""kevin manderson"";","SELECT AVG(round) FROM table_name_18 WHERE opponent = ""kevin manderson"";",1 What is the total salary paid by job role?,"CREATE TABLE Employees (EmployeeID int, FirstName varchar(50), LastName varchar(50), JobRole varchar(50), Ethnicity varchar(50), Salary decimal(10,2)); ","SELECT JobRole, SUM(Salary) as TotalSalary FROM Employees GROUP BY JobRole;","SELECT JobRole, SUM(Salary) as TotalSalary FROM Employees GROUP BY JobRole;",1 Name the torque for 1986,"CREATE TABLE table_20007413_3 (torque VARCHAR, year VARCHAR);","SELECT torque FROM table_20007413_3 WHERE year = ""1986"";",SELECT torque FROM table_20007413_3 WHERE year = 1986;,0 How many dominant religions are in đala?,"CREATE TABLE table_2562572_30 (dominant_religion__2002_ VARCHAR, settlement VARCHAR);","SELECT COUNT(dominant_religion__2002_) FROM table_2562572_30 WHERE settlement = ""Đala"";","SELECT COUNT(dominant_religion__2002_) FROM table_2562572_30 WHERE settlement = ""ala"";",0 "What is the total number of community centers and schools in Palestine, ordered by center/school type?","CREATE TABLE Palestine (id INT, name TEXT, type TEXT, location TEXT); ","SELECT type, COUNT(*) AS center_or_school_count FROM Palestine GROUP BY type ORDER BY type;","SELECT type, COUNT(*) FROM Palestine GROUP BY type ORDER BY type;",0 How many sustainable fabric types are sourced from each country in 2022?,"CREATE TABLE sourcing (year INT, country VARCHAR(20), fabric_type VARCHAR(20), quantity INT); ","SELECT country, COUNT(DISTINCT fabric_type) as num_sustainable_types FROM sourcing WHERE year = 2022 AND fabric_type LIKE 'sustainable%' GROUP BY country;","SELECT country, SUM(quantity) as total_quantity FROM sourcing WHERE year = 2022 GROUP BY country;",0 Which Goals have a Date of 7 february 2010?,"CREATE TABLE table_name_45 (goals INTEGER, date VARCHAR);","SELECT MAX(goals) FROM table_name_45 WHERE date = ""7 february 2010"";","SELECT SUM(goals) FROM table_name_45 WHERE date = ""7 february 2010"";",0 "In what language is the Lyrics of the release on August 10, 2005 with Catalog number of TOCP-66427?","CREATE TABLE table_name_48 (lyrics VARCHAR, date VARCHAR, catalog_number VARCHAR);","SELECT lyrics FROM table_name_48 WHERE date = ""august 10, 2005"" AND catalog_number = ""tocp-66427"";","SELECT lyrics FROM table_name_48 WHERE date = ""august 10, 2005"" AND catalog_number = ""tocp-66427"";",1 What is the total number of crimes committed in the state of New York in the past month?,"CREATE TABLE Crimes (id INT, state VARCHAR(20), date DATE, number_of_crimes INT);","SELECT SUM(number_of_crimes) FROM Crimes WHERE state = 'New York' AND date >= DATEADD(month, -1, GETDATE());","SELECT SUM(number_of_crimes) FROM Crimes WHERE state = 'New York' AND date >= DATEADD(month, -1, GETDATE());",1 What was the total budget for each program in 2019?,"CREATE TABLE Budget (ProgramID INT, Year INT, Budget DECIMAL(10,2)); CREATE TABLE Programs (ProgramID INT, ProgramName VARCHAR(255)); ","SELECT p.ProgramName, SUM(b.Budget) as TotalBudget FROM Budget b JOIN Programs p ON b.ProgramID = p.ProgramID WHERE b.Year = 2019 GROUP BY p.ProgramName;","SELECT p.ProgramName, SUM(b.Budget) as TotalBudget FROM Budget b JOIN Programs p ON b.ProgramID = p.ProgramID WHERE b.Year = 2019 GROUP BY p.ProgramName;",1 What is the average lifespan (in years) of a satellite in medium Earth orbit?,"CREATE TABLE satellites (id INT, name VARCHAR(255), launch_date DATE, decommission_date DATE, orbit VARCHAR(255));","SELECT AVG(lifespan) FROM (SELECT name, (JULIANDAY(decommission_date) - JULIANDAY(launch_date)) / 365.25 as lifespan FROM satellites WHERE orbit = 'medium Earth orbit') as subquery;","SELECT AVG(DATEDIFF(year, launch_date, decommission_date)) FROM satellites WHERE orbit = 'Medium Earth';",0 "Where was the game site on October 29, 1989?","CREATE TABLE table_16028499_2 (game_site VARCHAR, date VARCHAR);","SELECT game_site FROM table_16028499_2 WHERE date = ""October 29, 1989"";","SELECT game_site FROM table_16028499_2 WHERE date = ""October 29, 1989"";",1 what is the object type when the right ascension (j2000) is 11h10m42.8s?,"CREATE TABLE table_name_77 (object_type VARCHAR, right_ascension___j2000__ VARCHAR);","SELECT object_type FROM table_name_77 WHERE right_ascension___j2000__ = ""11h10m42.8s"";","SELECT object_type FROM table_name_77 WHERE right_ascension___j2000__ = ""11h10m42.8s"";",1 How many electric vehicles were adopted in each country in 'EV Adoption Statistics' table?,"CREATE TABLE EV_Adoption_Statistics (country VARCHAR(50), vehicle_type VARCHAR(20), num_adopted INT);","SELECT country, COUNT(*) FROM EV_Adoption_Statistics WHERE vehicle_type = 'Electric' GROUP BY country;","SELECT country, SUM(num_adopted) FROM EV_Adoption_Statistics GROUP BY country;",0 What is the depth at the UTC time of 12:19:36?,"CREATE TABLE table_26950408_1 (depth VARCHAR, time___utc__ VARCHAR);","SELECT depth FROM table_26950408_1 WHERE time___utc__ = ""12:19:36"";","SELECT depth FROM table_26950408_1 WHERE time___utc__ = ""12:19:36"";",1 What is the minimum depth of all trenches in the Pacific Ocean?,"CREATE TABLE ocean_trenches_2 (trench_name TEXT, location TEXT, minimum_depth NUMERIC); ",SELECT MIN(minimum_depth) FROM ocean_trenches_2 WHERE location = 'Pacific Ocean';,SELECT MIN(minimum_depth) FROM ocean_trenches_2 WHERE location = 'Pacific Ocean';,1 Who was on the pole at Chicagoland?,"CREATE TABLE table_16099880_5 (pole_position VARCHAR, race VARCHAR);","SELECT pole_position FROM table_16099880_5 WHERE race = ""Chicagoland"";","SELECT pole_position FROM table_16099880_5 WHERE race = ""Chicagoland"";",1 Which organizations have provided support in both the education and health sectors?,"CREATE TABLE organizations (id INT, name TEXT, sector TEXT); ",SELECT name FROM organizations WHERE sector = 'Education' INTERSECT SELECT name FROM organizations WHERE sector = 'Health';,"SELECT name FROM organizations WHERE sector IN ('Education', 'Health');",0 What is the country of player curtis strange?,"CREATE TABLE table_name_33 (country VARCHAR, player VARCHAR);","SELECT country FROM table_name_33 WHERE player = ""curtis strange"";","SELECT country FROM table_name_33 WHERE player = ""curtis strange"";",1 What is the maximum number of followers for Latin music artists on Spotify?,"CREATE TABLE artists (artist_id INT, genre VARCHAR(10), followers INT); ",SELECT MAX(followers) FROM artists WHERE genre = 'Latin';,SELECT MAX(followers) FROM artists WHERE genre = 'Latin';,1 "What are the R&D expenditures for a specific drug in a given year, compared to the average R&D expenditures for other drugs in the same year?","CREATE TABLE r_and_d_data (drug_name TEXT, expenditure INTEGER, year TEXT); ",SELECT expenditure FROM r_and_d_data WHERE drug_name = 'DrugA' AND year = '2020' INTERSECT SELECT AVG(expenditure) FROM r_and_d_data WHERE drug_name != 'DrugA' AND year = '2020';,"SELECT drug_name, AVG(expenditure) as avg_expenditure FROM r_and_d_data WHERE year = 2021 GROUP BY drug_name;",0 "What's the court ranking of 5th son of tadayori and has revenues of 10,000 koku?","CREATE TABLE table_name_32 (court_rank VARCHAR, revenues VARCHAR, lineage VARCHAR);","SELECT court_rank FROM table_name_32 WHERE revenues = ""10,000 koku"" AND lineage = ""5th son of tadayori"";","SELECT court_rank FROM table_name_32 WHERE revenues = ""10,000 koku"" AND lineage = ""5th son of tadayori"";",1 What is the total caloric intake for users in the vegetarian meal plan?,"CREATE TABLE Meals (UserID INT, MealPlan VARCHAR(20), Calories INT); ",SELECT SUM(Calories) FROM Meals WHERE MealPlan = 'Vegetarian';,SELECT SUM(Calories) FROM Meals WHERE MealPlan = 'Vegetarian';,1 What is the total number of impact investments made by donors from the United States?,"CREATE TABLE donors (donor_id INT, donor_name TEXT, country TEXT); CREATE TABLE impact_investments (investment_id INT, donor_id INT, investment_amount FLOAT); ",SELECT SUM(investment_amount) FROM impact_investments JOIN donors ON donors.donor_id = impact_investments.donor_id WHERE donors.country = 'United States';,SELECT COUNT(*) FROM impact_investments INNER JOIN donors ON impact_investments.donor_id = donors.donor_id WHERE donors.country = 'United States';,0 How many genetic research projects are ongoing in each country in the Asia-Pacific region?,"CREATE SCHEMA if not exists genetics_research;CREATE TABLE if not exists genetics_research.projects (id INT, name VARCHAR(100), country VARCHAR(50));","SELECT country, COUNT(*) FROM genetics_research.projects GROUP BY country;","SELECT country, COUNT(*) FROM genetics_research.projects WHERE region = 'Asia-Pacific' GROUP BY country;",0 What Points for has a Try bonus of 140?,"CREATE TABLE table_name_26 (points_for VARCHAR, try_bonus VARCHAR);","SELECT points_for FROM table_name_26 WHERE try_bonus = ""140"";",SELECT points_for FROM table_name_26 WHERE try_bonus = 140;,0 Name the Player who has a To par of –2 and a Score of 69-73=142?,"CREATE TABLE table_name_74 (player VARCHAR, to_par VARCHAR, score VARCHAR);","SELECT player FROM table_name_74 WHERE to_par = ""–2"" AND score = 69 - 73 = 142;","SELECT player FROM table_name_74 WHERE to_par = ""–2"" AND score = 69 - 73 = 142;",1 How many network devices were installed per country?,"CREATE TABLE network_devices (device_id INT, country VARCHAR(50));","SELECT country, COUNT(device_id) FROM network_devices GROUP BY country;","SELECT country, COUNT(*) FROM network_devices GROUP BY country;",0 What's the total investment in renewable energy projects?,"CREATE TABLE renewable_energy_investments (id INT, name VARCHAR(255), investment FLOAT);",SELECT SUM(investment) FROM renewable_energy_investments;,SELECT SUM(investment) FROM renewable_energy_investments;,1 "Station Ownership of eicb tv, and a Call sign of ktcj-ld is what virtual network?","CREATE TABLE table_name_25 (virtual_channel VARCHAR, station_ownership VARCHAR, call_sign VARCHAR);","SELECT virtual_channel FROM table_name_25 WHERE station_ownership = ""eicb tv"" AND call_sign = ""ktcj-ld"";","SELECT virtual_channel FROM table_name_25 WHERE station_ownership = ""eicb tv"" AND call_sign = ""ktcj-ld"";",1 What was the latest year that resulted in won?,"CREATE TABLE table_name_17 (year INTEGER, result VARCHAR);","SELECT MAX(year) FROM table_name_17 WHERE result = ""won"";","SELECT MAX(year) FROM table_name_17 WHERE result = ""won"";",1 What are the most common types of security incidents in the 'finance' sector in the last month?,"CREATE TABLE sector_incidents (id INT, sector VARCHAR(255), incident_time TIMESTAMP, incident_type VARCHAR(255));","SELECT incident_type, COUNT(*) as incident_count FROM sector_incidents WHERE sector = 'finance' AND incident_time >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY incident_type ORDER BY incident_count DESC LIMIT 5;","SELECT incident_type, COUNT(*) as count FROM sector_incidents WHERE sector = 'finance' AND incident_time >= DATEADD(month, -1, GETDATE()) GROUP BY incident_type ORDER BY count DESC LIMIT 1;",0 Who are the top 5 authors with the highest number of published articles on media ethics in the last year?,"CREATE TABLE authors (id INT, name VARCHAR(255), articles_written INT); CREATE TABLE articles_authors (article_id INT, author_id INT); CREATE VIEW articles_view AS SELECT a.id, a.title, a.publish_date, aa.author_id FROM articles a JOIN articles_authors aa ON a.id = aa.article_id WHERE a.publish_date >= DATE_SUB(NOW(), INTERVAL 1 YEAR);","SELECT a.name, COUNT(av.article_id) AS articles_count FROM authors a JOIN articles_view av ON a.id = av.author_id GROUP BY a.id ORDER BY articles_count DESC LIMIT 5;","SELECT authors.name, COUNT(articles_view.article_id) as article_count FROM authors INNER JOIN articles_view ON authors.id = articles_view.author_id INNER JOIN articles_authors ON articles_view.author_id = articles_authors.author_id WHERE articles_view.publish_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) GROUP BY authors.name ORDER BY article_count DESC LIMIT 5;",0 Insert a new donor from Egypt with a donation amount of 5500,"CREATE TABLE Donors (Donor_ID int, Name varchar(50), Donation_Amount int, Country varchar(50));","INSERT INTO Donors (Donor_ID, Name, Donation_Amount, Country) VALUES (6, 'Ahmed Hussein', 5500, 'Egypt');","INSERT INTO Donors (Donor_ID, Name, Donation_Amount, Country) VALUES (5500, 'Egypt');",0 "How many movies and TV shows were released per year, in which Latin American country?","CREATE TABLE MovieTVShows (title VARCHAR(255), release_year INT, country VARCHAR(255)); ","SELECT release_year, country, COUNT(*) FROM MovieTVShows GROUP BY release_year, country;","SELECT release_year, COUNT(*) as num_movies, COUNT(*) as num_TVShows FROM MovieTVShows WHERE country IN ('Latin America', 'Argentina') GROUP BY release_year;",0 "What is the total amount of funding received by each organization for disaster response in Latin America, for the last 5 years, and the average response time?","CREATE TABLE disaster_response (response_id INT, ngo_id INT, disaster_id INT, funding DECIMAL(10,2), response_time INT); ","SELECT ngo.name as organization, SUM(funding) as total_funding, AVG(response_time) as avg_response_time FROM disaster_response JOIN ngo ON disaster_response.ngo_id = ngo.ngo_id WHERE ngo.region = 'Latin America' AND disaster_response.response_time >= DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR) GROUP BY ngo.name;","SELECT ngo_id, SUM(funding) as total_funding, AVG(response_time) as avg_response_time FROM disaster_response WHERE disaster_id IN (SELECT ngo_id FROM disaster_response WHERE region = 'Latin America') AND response_time >= (SELECT AVG(response_time) FROM disaster_response WHERE region = 'Latin America' GROUP BY ngo_id) GROUP BY ngo_id;",0 Get the number of unique attendees for each event in the 'Theater' category.,"CREATE TABLE Attendance (attendance_id INT PRIMARY KEY, event_id INT, attendee_id INT, attendee_age INT);","SELECT event_id, COUNT(DISTINCT attendee_id) FROM Attendance JOIN Events ON Attendance.event_id = Events.event_id WHERE Events.category = 'Theater' GROUP BY event_id;","SELECT event_id, COUNT(DISTINCT attendee_id) as unique_attendees FROM Attendance WHERE category = 'Theater' GROUP BY event_id;",0 Name the party for massachusetts 3,"CREATE TABLE table_1341897_23 (party VARCHAR, district VARCHAR);","SELECT party FROM table_1341897_23 WHERE district = ""Massachusetts 3"";","SELECT party FROM table_1341897_23 WHERE district = ""Massachusetts 3"";",1 What is the average dissolved oxygen level for fish farms in the 'Pacific Ocean' region?,"CREATE TABLE fish_farms (id INT, name TEXT, region TEXT); CREATE TABLE readings (id INT, farm_id INT, dissolved_oxygen FLOAT); ",SELECT AVG(readings.dissolved_oxygen) FROM readings INNER JOIN fish_farms ON readings.farm_id = fish_farms.id WHERE fish_farms.region = 'Pacific Ocean';,SELECT AVG(readings.dissolved_oxygen) FROM readings INNER JOIN fish_farms ON readings.farm_id = fish_farms.id WHERE fish_farms.region = 'Pacific Ocean';,1 "Find the total energy consumption (in kWh) for each building in the 'green_buildings' table, sorted by the highest consumption first.","CREATE TABLE green_buildings (id INT, building_name VARCHAR(255), total_energy_consumption FLOAT); ","SELECT building_name, total_energy_consumption FROM green_buildings ORDER BY total_energy_consumption DESC;","SELECT building_name, total_energy_consumption FROM green_buildings ORDER BY total_energy_consumption DESC;",1 How many ties were there for game 36 started?,"CREATE TABLE table_14389782_2 (ties VARCHAR, games_started VARCHAR);",SELECT COUNT(ties) FROM table_14389782_2 WHERE games_started = 36;,SELECT COUNT(ties) FROM table_14389782_2 WHERE games_started = 36;,1 How many workers in the electronics industry are part of ethical manufacturing initiatives?,"CREATE TABLE electronics_workers (id INT, name VARCHAR(50), industry VARCHAR(50), ethical_manufacturing VARCHAR(50)); ",SELECT COUNT(*) FROM electronics_workers WHERE industry = 'Electronics' AND ethical_manufacturing IS NOT NULL;,SELECT COUNT(*) FROM electronics_workers WHERE industry = 'Electronics' AND ethical_manufacturing = 'Ethical Manufacturing';,0 What are the average population sizes of animals in the 'animal_population' table that are also present in the 'endangered_animals' table?,"CREATE TABLE animal_population (id INT, animal_name VARCHAR(50), population INT); CREATE TABLE endangered_animals (id INT, animal_name VARCHAR(50));",SELECT AVG(a.population) FROM animal_population a INNER JOIN endangered_animals e ON a.animal_name = e.animal_name;,SELECT AVG(animal_population.population) FROM animal_population INNER JOIN endangered_animals ON animal_population.animal_name = endangered_animals.animal_name;,0 Name the location of ufc 98,"CREATE TABLE table_name_51 (location VARCHAR, event VARCHAR);","SELECT location FROM table_name_51 WHERE event = ""ufc 98"";","SELECT location FROM table_name_51 WHERE event = ""ufc 98"";",1 Who were the top 5 donors in terms of total donation amount for 2021?,"CREATE TABLE donations (donation_id INT, donor_id INT, donation_amount DECIMAL(10,2), donation_date DATE);","SELECT donor_id, SUM(donation_amount) AS total_donation_amount FROM donations WHERE YEAR(donation_date) = 2021 GROUP BY donor_id ORDER BY total_donation_amount DESC LIMIT 5;","SELECT donor_id, SUM(donation_amount) as total_donation FROM donations WHERE donation_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY donor_id ORDER BY total_donation DESC LIMIT 5;",0 What is the total cost of mining equipment for mines in Canada?,"CREATE TABLE mines (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), year_opened INT, total_employees INT); CREATE TABLE mining_equipment (id INT PRIMARY KEY, mine_id INT, equipment_type VARCHAR(255), year_purchased INT, cost FLOAT); ",SELECT SUM(mining_equipment.cost) as total_cost FROM mining_equipment JOIN mines ON mining_equipment.mine_id = mines.id WHERE mines.location = 'Canada';,SELECT SUM(mining_equipment.cost) FROM mining_equipment INNER JOIN mines ON mining_equipment.mine_id = mines.id WHERE mines.location = 'Canada';,0 "If the team is Worcestershire and the Matched had were 5, what is the highest score?","CREATE TABLE table_27268238_4 (highest_score VARCHAR, matches VARCHAR, team VARCHAR);","SELECT highest_score FROM table_27268238_4 WHERE matches = 5 AND team = ""Worcestershire"";","SELECT highest_score FROM table_27268238_4 WHERE matches = 5 AND team = ""Worcestershire"";",1 "Show the annual CO2 emissions reduction achieved by renewable energy projects in the province of Ontario, Canada","CREATE TABLE co2_emissions_reduction (project_id INT, project_name VARCHAR(255), co2_reduction FLOAT, reduction_year INT, province VARCHAR(255));","SELECT reduction_year, SUM(co2_reduction) as annual_reduction FROM co2_emissions_reduction WHERE province = 'Ontario' GROUP BY reduction_year;","SELECT reduction_year, co2_reduction FROM co2_emissions_reduction WHERE province = 'Ontario';",0 Who was the iron chef when herb Faust was the challenger?,"CREATE TABLE table_29281529_2 (iron_chef VARCHAR, challenger VARCHAR);","SELECT iron_chef FROM table_29281529_2 WHERE challenger = ""Herb Faust"";","SELECT iron_chef FROM table_29281529_2 WHERE challenger = ""Herb Faust"";",1 Show the inclusion efforts in the Business faculty that are not offered in the Health faculty.,"CREATE TABLE BusinessInclusion (EffortID INT, Effort VARCHAR(50)); CREATE TABLE HealthInclusion (EffortID INT, Effort VARCHAR(50)); ",SELECT Effort FROM BusinessInclusion WHERE Effort NOT IN (SELECT Effort FROM HealthInclusion);,SELECT b.Effort FROM BusinessInclusion b INNER JOIN HealthInclusion h ON b.Effort = h.Effort WHERE b.Effort IS NULL;,0 What is the geo id for malcolm township?,"CREATE TABLE table_18600760_13 (geo_id VARCHAR, township VARCHAR);","SELECT COUNT(geo_id) FROM table_18600760_13 WHERE township = ""Malcolm"";","SELECT geo_id FROM table_18600760_13 WHERE township = ""Malcolm"";",0 "What is the place of birth when the elevator is Nicholas IV, and elector is Napoleone Orsini Frangipani?","CREATE TABLE table_name_7 (place_of_birth VARCHAR, elevator VARCHAR, elector VARCHAR);","SELECT place_of_birth FROM table_name_7 WHERE elevator = ""nicholas iv"" AND elector = ""napoleone orsini frangipani"";","SELECT place_of_birth FROM table_name_7 WHERE elevator = ""nicholas iv"" AND elector = ""napoleone orsini frangipani"";",1 Name the transfer wind for giuly,"CREATE TABLE table_name_15 (transfer_window VARCHAR, name VARCHAR);","SELECT transfer_window FROM table_name_15 WHERE name = ""giuly"";","SELECT transfer_window FROM table_name_15 WHERE name = ""giuly"";",1 What is the sum of sales for each salesperson in the month of May 2021 for sustainable fashion items?,"CREATE TABLE SalesData (SalesID INT, Salesperson TEXT, ItemName TEXT, SalesDate DATE, Sustainable BOOLEAN); ","SELECT Salesperson, SUM(SalesData.Sustainable::INT * SalesData.SalesID) as SumOfSales FROM SalesData WHERE SalesDate BETWEEN '2021-05-01' AND '2021-05-31' AND Sustainable = true GROUP BY Salesperson;","SELECT Salesperson, SUM(SalesData.SalesDate) as TotalSales FROM SalesData WHERE SalesData.SalesDate BETWEEN '2021-05-01' AND '2021-05-30' AND SalesData.Sustainable = TRUE GROUP BY Salesperson;",0 "Who was the opponent on September 17, 1995?","CREATE TABLE table_name_63 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_63 WHERE date = ""september 17, 1995"";","SELECT opponent FROM table_name_63 WHERE date = ""september 17, 1995"";",1 Where was September 5?,"CREATE TABLE table_name_25 (location VARCHAR, date VARCHAR);","SELECT location FROM table_name_25 WHERE date = ""september 5"";","SELECT location FROM table_name_25 WHERE date = ""september 5"";",1 What's the maximum ESG rating for companies in the 'finance' sector?,"CREATE TABLE companies (id INT, sector VARCHAR(20), ESG_rating INT); ",SELECT MAX(ESG_rating) FROM companies WHERE sector = 'finance';,SELECT MAX(ESG_rating) FROM companies WHERE sector = 'finance';,1 How many times was incumbent onzlee ware elected?,"CREATE TABLE table_13618584_2 (elected VARCHAR, incumbent VARCHAR);","SELECT COUNT(elected) FROM table_13618584_2 WHERE incumbent = ""Onzlee Ware"";","SELECT COUNT(elected) FROM table_13618584_2 WHERE incumbent = ""Onzlee Ware"";",1 What is the maximum budget allocated for public parks in urban areas?,"CREATE TABLE parks (id INT, name TEXT, area TEXT, type TEXT, budget FLOAT); ",SELECT MAX(budget) FROM parks WHERE area = 'urban' AND type = 'public';,SELECT MAX(budget) FROM parks WHERE type = 'Public' AND area = 'Urban';,0 What are the average and minimum age of captains in different class?,"CREATE TABLE captain (CLASS VARCHAR, age INTEGER);","SELECT AVG(age), MIN(age), CLASS FROM captain GROUP BY CLASS;","SELECT CLASS, AVG(age) as avg_age, MIN(age) as min_age FROM captain GROUP BY CLASS;",0 "What is the Birthdate for the person with a height less than 191, and weight of 84 kg?","CREATE TABLE table_name_23 (birthdate VARCHAR, height__cm_ VARCHAR, weight__kg_ VARCHAR);",SELECT birthdate FROM table_name_23 WHERE height__cm_ < 191 AND weight__kg_ = 84;,SELECT birthdate FROM table_name_23 WHERE height__cm_ 191 AND weight__kg_ = 84;,0 What is the market share of electric vehicles in the US over time?,"CREATE TABLE VehicleSales(id INT, type VARCHAR(20), country VARCHAR(20), year INT, quantity INT);","SELECT type, country, AVG(quantity*100.0/SUM(quantity)) OVER (PARTITION BY type ORDER BY year ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) as market_share FROM VehicleSales WHERE country = 'US' AND type IN ('Electric', 'Gasoline') ORDER BY year;","SELECT year, SUM(quantity) as total_quantity FROM VehicleSales WHERE type = 'Electric' AND country = 'USA' GROUP BY year;",0 How many trees are there in the young_forest table for the species 'Maple'?,"CREATE TABLE young_forest (id INT, species VARCHAR(255), age INT); ",SELECT COUNT(*) FROM young_forest WHERE species = 'Maple';,SELECT COUNT(*) FROM young_forest WHERE species = 'Maple';,1 What year did he start at 13?,"CREATE TABLE table_name_6 (year VARCHAR, start VARCHAR);","SELECT year FROM table_name_6 WHERE start = ""13"";","SELECT year FROM table_name_6 WHERE start = ""13"";",1 "Update the ""citizen_feedback"" table to mark feedback with the ID 34 as ""resolved""","CREATE TABLE citizen_feedback (feedback_id INT, feedback_text VARCHAR(255), status VARCHAR(20));",UPDATE citizen_feedback SET status = 'resolved' WHERE feedback_id = 34;,UPDATE citizen_feedback SET status ='resolved' WHERE feedback_id = 34;,0 Which event shows Matt St. Louis in second and a skip of John Morris?,"CREATE TABLE table_name_24 (event VARCHAR, skip VARCHAR, second VARCHAR);","SELECT event FROM table_name_24 WHERE skip = ""john morris"" AND second = ""matt st. louis"";","SELECT event FROM table_name_24 WHERE skip = ""john morris"" AND second = ""matt st. louis"";",1 Who was the opponent when Steven Smith had 3.3 overs?,"CREATE TABLE table_name_45 (opponent VARCHAR, overs VARCHAR);",SELECT opponent FROM table_name_45 WHERE overs = 3.3;,"SELECT opponent FROM table_name_45 WHERE overs = ""3.3"";",0 When el cibao is the geographical region and the height is 1.80 who is the contestant?,"CREATE TABLE table_18618707_1 (contestant VARCHAR, height VARCHAR, geographical_regions VARCHAR);","SELECT contestant FROM table_18618707_1 WHERE height = ""1.80"" AND geographical_regions = ""El Cibao"";","SELECT contestant FROM table_18618707_1 WHERE height = ""1.80"" AND geographical_regions = ""El Cibao"";",1 What is the total number of opponents for the game recorded as 1-3?,"CREATE TABLE table_16710971_2 (opponent VARCHAR, record VARCHAR);","SELECT COUNT(opponent) FROM table_16710971_2 WHERE record = ""1-3"";","SELECT COUNT(opponent) FROM table_16710971_2 WHERE record = ""1-3"";",1 which team #1 played again chalkida,"CREATE TABLE table_21434618_1 (team__number1 VARCHAR, team__number2 VARCHAR);","SELECT team__number1 FROM table_21434618_1 WHERE team__number2 = ""Chalkida"";","SELECT team__number1 FROM table_21434618_1 WHERE team__number2 = ""Clarkida"";",0 Generate a table 'equipment_maintenance_schedule' to store scheduled maintenance for military equipment,"CREATE TABLE equipment_maintenance_schedule (id INT PRIMARY KEY, equipment_id INT, schedule_date DATE, schedule_type VARCHAR(50));","CREATE TABLE equipment_maintenance_schedule (id INT PRIMARY KEY, equipment_id INT, schedule_date DATE, schedule_type VARCHAR(50));","CREATE TABLE equipment_maintenance_schedule (id INT PRIMARY KEY, equipment_id INT, schedule_date DATE, schedule_type VARCHAR(50));",1 "Find the number of articles published on investigative journalism topics in the last 6 months, grouped by month.","CREATE TABLE articles (id INT, title VARCHAR(255), publish_date DATE, topic VARCHAR(255)); ","SELECT COUNT(*), DATE_FORMAT(publish_date, '%Y-%m') AS Month FROM articles WHERE topic = 'investigative' AND publish_date >= DATE_SUB(NOW(), INTERVAL 6 MONTH) GROUP BY Month;","SELECT month, COUNT(*) FROM articles WHERE topic = 'investigative journalism' AND publish_date >= DATEADD(month, -6, GETDATE()) GROUP BY month;",0 What was the issue price in the year 2008?,"CREATE TABLE table_name_29 (issue_price INTEGER, year VARCHAR);",SELECT SUM(issue_price) FROM table_name_29 WHERE year = 2008;,SELECT SUM(issue_price) FROM table_name_29 WHERE year = 2008;,1 Name the least dismissals for sammy carter,"CREATE TABLE table_23316034_23 (dismissals INTEGER, player VARCHAR);","SELECT MIN(dismissals) FROM table_23316034_23 WHERE player = ""Sammy Carter"";","SELECT MIN(dismissals) FROM table_23316034_23 WHERE player = ""Sammy Cartier"";",0 What is the qual with a rank 9?,"CREATE TABLE table_name_9 (qual VARCHAR, rank VARCHAR);","SELECT qual FROM table_name_9 WHERE rank = ""9"";",SELECT qual FROM table_name_9 WHERE rank = 9;,0 Name the artist of 2 draw,"CREATE TABLE table_14977252_2 (artist VARCHAR, draw VARCHAR);",SELECT artist FROM table_14977252_2 WHERE draw = 2;,SELECT artist FROM table_14977252_2 WHERE draw = 2;,1 "What is the total number of mining sites and the total quantity of copper extracted for sites located in Peru, having a production date on or after 2015-01-01?","CREATE TABLE copper_mine (site_id INT, country VARCHAR(50), production_date DATE, quantity INT); ","SELECT country, COUNT(DISTINCT site_id) as num_sites, SUM(quantity) as total_copper FROM copper_mine WHERE country = 'Peru' AND production_date >= '2015-01-01' GROUP BY country;","SELECT COUNT(*), SUM(quantity) FROM copper_mine WHERE country = 'Peru' AND production_date >= '2015-01-01';",0 "What is the R&D expenditure for each drug in the 'drugs' table, grouped by drug name, including drugs with no expenditure in Africa?","CREATE TABLE drugs (drug_id INT, drug_name TEXT, rd_expenditure INT, region TEXT); ","SELECT d.drug_name, COALESCE(SUM(d.rd_expenditure), 0) AS total_expenditure FROM drugs d WHERE d.region = 'Africa' GROUP BY d.drug_name;","SELECT drug_name, rd_expenditure FROM drugs WHERE region = 'Africa' GROUP BY drug_name;",0 Insert records for new financial wellbeing programs focusing on mental health and wellness.,"CREATE TABLE financial_wellbeing_programs (program VARCHAR(50), category VARCHAR(50));","INSERT INTO financial_wellbeing_programs (program, category) VALUES ('Mental Health Matters', 'Mental Health'), ('Mindful Money', 'Wellness');","INSERT INTO financial_wellbeing_programs (program, category) VALUES ('Mental Health', 'Wellbeing');",0 How many workers in the 'Manufacturing' industry have a 'Part-time' status?,"CREATE TABLE Workers (id INT, industry VARCHAR(20), employment_status VARCHAR(20)); ",SELECT COUNT(*) FROM Workers WHERE industry = 'Manufacturing' AND employment_status = 'Part-time';,SELECT COUNT(*) FROM Workers WHERE industry = 'Manufacturing' AND employment_status = 'Part-time';,1 Calculate the average duration spent on exhibitions by age group.,"CREATE TABLE exhibition_visits (id INT, visitor_id INT, exhibition_id INT, duration_mins INT, age_group TEXT); ","SELECT exhibition_id, age_group, AVG(duration_mins) FROM exhibition_visits GROUP BY exhibition_id, age_group;","SELECT age_group, AVG(duration_mins) FROM exhibition_visits GROUP BY age_group;",0 What is the IATA code for the city with ICAO code of RCMQ?,"CREATE TABLE table_name_98 (iata VARCHAR, icao VARCHAR);","SELECT iata FROM table_name_98 WHERE icao = ""rcmq"";","SELECT iata FROM table_name_98 WHERE icao = ""rcmq"";",1 "How many Februarys have montreal canadiens as the opponent, and 18-25-10 as the record, with a game greater than 53?","CREATE TABLE table_name_32 (february VARCHAR, game VARCHAR, opponent VARCHAR, record VARCHAR);","SELECT COUNT(february) FROM table_name_32 WHERE opponent = ""montreal canadiens"" AND record = ""18-25-10"" AND game > 53;","SELECT COUNT(february) FROM table_name_32 WHERE opponent = ""montreal canadiens"" AND record = ""18-25-10"" AND game > 53;",1 What is the average wildlife habitat size in mangrove forests?,"CREATE TABLE wildlife_habitat (id INT, forest_type VARCHAR(255), area FLOAT);",SELECT AVG(area) FROM wildlife_habitat WHERE forest_type = 'Mangrove';,SELECT AVG(area) FROM wildlife_habitat WHERE forest_type = 'Mangrove';,1 How many employees of each gender work at each mining site?,"CREATE TABLE mining_sites (id INT, site_name TEXT, num_employees INT);CREATE TABLE employees (id INT, site_id INT, gender TEXT);","SELECT s.site_name, e.gender, COUNT(*) as total FROM employees e JOIN mining_sites s ON e.site_id = s.id GROUP BY s.site_name, e.gender;","SELECT mining_sites.site_name, employees.gender, COUNT(employees.id) FROM mining_sites INNER JOIN employees ON mining_sites.id = employees.site_id GROUP BY mining_sites.site_name, employees.gender;",0 Name the max top 5 for avg finish being 27.6,"CREATE TABLE table_2181798_1 (top_5 INTEGER, avg_finish VARCHAR);","SELECT MAX(top_5) FROM table_2181798_1 WHERE avg_finish = ""27.6"";","SELECT MAX(top_5) FROM table_2181798_1 WHERE avg_finish = ""27.6"";",1 Delete expired threat intelligence data,"CREATE TABLE threat_intelligence (id INT, threat_type VARCHAR(255), source VARCHAR(255), last_seen DATETIME); ",DELETE FROM threat_intelligence WHERE last_seen < '2021-05-01';,DELETE FROM threat_intelligence WHERE last_seen IS NULL;,0 Update the safety_rating of 'Methyl Ethyl Ketone' to 3 in the chemical_table,"CREATE TABLE chemical_table (chemical_id INT, chemical_name VARCHAR(50), safety_rating INT);",UPDATE chemical_table SET safety_rating = 3 WHERE chemical_name = 'Methyl Ethyl Ketone';,UPDATE chemical_table SET safety_rating = 3 WHERE chemical_name = 'Methyl Ethyl Ketone';,1 "What is the name of the player with a transfer window in summer, an undisclosed transfer fee, and is moving from brussels?","CREATE TABLE table_name_15 (name VARCHAR, moving_from VARCHAR, transfer_window VARCHAR, transfer_fee VARCHAR);","SELECT name FROM table_name_15 WHERE transfer_window = ""summer"" AND transfer_fee = ""undisclosed"" AND moving_from = ""brussels"";","SELECT name FROM table_name_15 WHERE transfer_window = ""summer"" AND transfer_fee = ""undisclosed"" AND moving_from = ""brussels"";",1 What is the average carbon price (in USD) for each region in the world?,"CREATE TABLE carbon_prices (region VARCHAR(50), carbon_price FLOAT); ","SELECT c.region, AVG(c.carbon_price) FROM carbon_prices c GROUP BY c.region;","SELECT region, AVG(carbon_price) FROM carbon_prices GROUP BY region;",0 Who is the community member with the second-highest engagement in language preservation?,"CREATE TABLE community_members (id INT, name TEXT, engagement INT, language TEXT); ","SELECT name FROM (SELECT name, engagement, DENSE_RANK() OVER (ORDER BY engagement DESC) AS rank FROM community_members) WHERE rank = 2","SELECT name, engagement FROM community_members ORDER BY engagement DESC LIMIT 1;",0 What was album of the year after 2009?,"CREATE TABLE table_name_99 (result VARCHAR, year VARCHAR, category VARCHAR);","SELECT result FROM table_name_99 WHERE year > 2009 AND category = ""album of the year"";","SELECT result FROM table_name_99 WHERE year > 2009 AND category = ""album"";",0 How many water conservation initiatives were implemented in Canada between 2015 and 2018?,"CREATE TABLE conservation_initiatives (country VARCHAR(20), start_year INT, end_year INT, num_initiatives INT); ",SELECT num_initiatives FROM conservation_initiatives WHERE country = 'Canada' AND start_year <= 2018 AND end_year >= 2015;,SELECT SUM(num_initiatives) FROM conservation_initiatives WHERE country = 'Canada' AND start_year BETWEEN 2015 AND 2018;,0 "Update the equipment_name of records with member_id 21, 23, 24 to 'treadmill', 'dumbbells', 'stationary_bike' respectively in the workout_equipment table","CREATE TABLE workout_equipment (id INT, member_id INT, equipment_name VARCHAR(50));",UPDATE workout_equipment SET equipment_name = 'treadmill' WHERE member_id = 21; UPDATE workout_equipment SET equipment_name = 'dumbbells' WHERE member_id = 23; UPDATE workout_equipment SET equipment_name = 'stationary_bike' WHERE member_id = 24;,"UPDATE workout_equipment SET equipment_name = 'treadmill', 'dumbbells','stationary_bike' WHERE member_id = 21;",0 Name the label with catalog of mhcl-20005,"CREATE TABLE table_name_88 (label VARCHAR, catalog VARCHAR);","SELECT label FROM table_name_88 WHERE catalog = ""mhcl-20005"";","SELECT label FROM table_name_88 WHERE catalog = ""mhcl-20005"";",1 What's team #2 in the round where team $1 is Ilisiakos?,"CREATE TABLE table_19130829_4 (team__number2 VARCHAR, team__number1 VARCHAR);","SELECT team__number2 FROM table_19130829_4 WHERE team__number1 = ""Ilisiakos"";","SELECT team__number2 FROM table_19130829_4 WHERE team__number1 = ""Ilisiakos"";",1 List the teams with their total wins and losses,"CREATE TABLE team_stats (team VARCHAR(50), wins INT, losses INT);","INSERT INTO team_stats (team, wins, losses) SELECT t.team, SUM(CASE WHEN s.result = 'win' THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN s.result = 'loss' THEN 1 ELSE 0 END) AS losses FROM team_roster tr JOIN team_data t ON tr.team_id = t.team_id JOIN game_stats s ON tr.team_id = s.team_id GROUP BY t.team;","SELECT team, SUM(wins) as total_wins, SUM(losses) as total_losses FROM team_stats GROUP BY team;",0 What is the total claim amount for policyholders in the Midwest region in the last quarter?,"CREATE TABLE Policyholders (PolicyID INT, Region VARCHAR(10)); CREATE TABLE Claims (ClaimID INT, PolicyID INT, ClaimAmount DECIMAL(10,2), ClaimDate DATE); CREATE TABLE Calendar (Date DATE); CREATE TABLE FiscalQuarter (StartDate DATE, EndDate DATE); ",SELECT SUM(c.ClaimAmount) as TotalClaimAmount FROM Claims c INNER JOIN Policyholders p ON c.PolicyID = p.PolicyID INNER JOIN Calendar cal ON c.ClaimDate = cal.Date INNER JOIN FiscalQuarter fq ON cal.Date BETWEEN fq.StartDate AND fq.EndDate WHERE p.Region = 'Midwest';,"SELECT SUM(ClaimAmount) FROM Claims JOIN Policyholders ON Claims.PolicyID = Policyholders.PolicyID JOIN FiscalQuarter ON Claims.ClaimDate = FiscalQuarter.StartDate WHERE Policyholders.Region = 'Midwest' AND Claims.ClaimDate >= DATEADD(quarter, -1, GETDATE());",0 What is the average income of fans by age group?,"CREATE TABLE fan_data (fan_id INT, age_group VARCHAR(20), income INT);","SELECT age_group, AVG(income) as avg_income FROM fan_data GROUP BY age_group;","SELECT age_group, AVG(income) FROM fan_data GROUP BY age_group;",0 "Who is the opponent of the match with a H/A of h, Beguiristain Iceta as the referee, and a kick off at 1993-04-18 17:00?","CREATE TABLE table_name_50 (opponents VARCHAR, kick_off VARCHAR, h___a VARCHAR, referee VARCHAR);","SELECT opponents FROM table_name_50 WHERE h___a = ""h"" AND referee = ""beguiristain iceta"" AND kick_off = ""1993-04-18 17:00"";","SELECT opponents FROM table_name_50 WHERE h___a = ""h"" AND referee = ""beguiristain iceta"" AND kick_off = ""1993-04-18 17:00"";",1 What is the average speed of vessels that transported dangerous goods in the Pacific Ocean in H1 2021?,"CREATE TABLE vessels (id INT, name TEXT, type TEXT, safety_score FLOAT, average_speed FLOAT);CREATE TABLE cargos (id INT, vessel_id INT, material TEXT, destination TEXT, date DATE, weight FLOAT); ",SELECT AVG(v.average_speed) FROM vessels v JOIN cargos c ON v.id = c.vessel_id WHERE v.safety_score > 70 AND c.material = 'Dangerous' AND c.destination = 'Pacific' AND c.date BETWEEN '2021-01-01' AND '2021-06-30';,SELECT AVG(vessels.average_speed) FROM vessels INNER JOIN cargos ON vessels.id = cargos.vessel_id WHERE cargos.material = 'Dangerous' AND cargos.destination = 'Pacific Ocean' AND cargos.date BETWEEN '2021-01-01' AND '2021-06-30';,0 Determine the total amount of research grants awarded to graduate students in the 'grad_students' and 'research_grants' tables,"CREATE TABLE grad_students (student_id INT, name VARCHAR(50), gender VARCHAR(10), department VARCHAR(50)); CREATE TABLE research_grants (student_id INT, grant_date DATE, grant_amount FLOAT); ",SELECT SUM(rg.grant_amount) FROM grad_students gs INNER JOIN research_grants rg ON gs.student_id = rg.student_id;,SELECT SUM(grant_amount) FROM grad_students INNER JOIN research_grants ON grad_students.student_id = research_grants.student_id;,0 What is the average number of attendees per event in Spain?,"CREATE TABLE Events (EventID INT, Country TEXT, Attendees INT); ",SELECT AVG(Attendees) FROM Events WHERE Country = 'Spain';,SELECT AVG(Attendees) FROM Events WHERE Country = 'Spain';,1 What is the total CO2 emission of fossil fuel vehicles in Canada?,"CREATE TABLE Fossil_Fuel_Vehicles (Id INT, Vehicle VARCHAR(50), CO2_Emission DECIMAL(5,2), Country VARCHAR(50)); ",SELECT SUM(CO2_Emission) FROM Fossil_Fuel_Vehicles WHERE Country = 'Canada';,SELECT SUM(CO2_Emission) FROM Fossil_Fuel_Vehicles WHERE Country = 'Canada';,1 List all climate mitigation projects in Southeast Asia that have been completed.,"CREATE TABLE climate_mitigation (project_id INT, project_name VARCHAR(100), start_year INT, end_year INT, region VARCHAR(50), status VARCHAR(50));","SELECT project_id, project_name FROM climate_mitigation WHERE region = 'Southeast Asia' AND end_year IS NOT NULL;",SELECT project_name FROM climate_mitigation WHERE region = 'Southeast Asia' AND status = 'Completed';,0 Update excavation notes for site 789,"CREATE TABLE excavations (id INT PRIMARY KEY, site_id INT, date DATE, notes TEXT);",UPDATE excavations SET notes = 'Extensive water damage observed' WHERE site_id = 789 AND date = '2022-05-15';,UPDATE excavations SET notes = notes WHERE site_id = 789;,0 Which rank has a s wicket at 40 and 28.42 is the average?,"CREATE TABLE table_name_66 (rank VARCHAR, s_wicket VARCHAR, average VARCHAR);","SELECT rank FROM table_name_66 WHERE s_wicket = ""40"" AND average = ""28.42"";","SELECT rank FROM table_name_66 WHERE s_wicket = ""40"" AND average = ""28.42"";",1 "What is Attendance, when Week is 5?","CREATE TABLE table_name_95 (attendance VARCHAR, week VARCHAR);",SELECT attendance FROM table_name_95 WHERE week = 5;,SELECT attendance FROM table_name_95 WHERE week = 5;,1 Who directed the episode that was viewed by 2.50 million people in the U.S.?,"CREATE TABLE table_11820086_1 (directed_by VARCHAR, us_viewers__millions_ VARCHAR);","SELECT directed_by FROM table_11820086_1 WHERE us_viewers__millions_ = ""2.50"";","SELECT directed_by FROM table_11820086_1 WHERE us_viewers__millions_ = ""2.50"";",1 What is the area of the city in the Sargodha district?,"CREATE TABLE table_18425346_2 (city_area_km_2__ VARCHAR, district VARCHAR);","SELECT COUNT(city_area_km_2__) FROM table_18425346_2 WHERE district = ""Sargodha district"";","SELECT city_area_km_2__ FROM table_18425346_2 WHERE district = ""Sargodha"";",0 what is the date for the tournament acapulco?,"CREATE TABLE table_name_94 (date VARCHAR, tournament VARCHAR);","SELECT date FROM table_name_94 WHERE tournament = ""acapulco"";","SELECT date FROM table_name_94 WHERE tournament = ""acapulco"";",1 What is the lowest number of Against that Lake Wendouree had when they had more than 7 Losses?,"CREATE TABLE table_name_74 (against INTEGER, ballarat_fl VARCHAR, losses VARCHAR);","SELECT MIN(against) FROM table_name_74 WHERE ballarat_fl = ""lake wendouree"" AND losses > 7;","SELECT MIN(against) FROM table_name_74 WHERE ballarat_fl = ""lake wendouree"" AND losses > 7;",1 What is the maximum revenue of restaurants in Austin?,"CREATE TABLE Restaurants (id INT, name VARCHAR(50), city VARCHAR(20), revenue DECIMAL(10,2)); ",SELECT MAX(revenue) FROM Restaurants WHERE city = 'Austin';,SELECT MAX(revenue) FROM Restaurants WHERE city = 'Austin';,1 Who was the 20 Questions section aimed at when Cover Model was Kimberley Conrad Hefner?,CREATE TABLE table_name_21 (cover_model VARCHAR);,"SELECT 20 AS _questions FROM table_name_21 WHERE cover_model = ""kimberley conrad hefner"";","SELECT 20 AS _questions FROM table_name_21 WHERE cover_model = ""kimberley conrad hefner"";",1 Find the total hectares of forests in Africa with koala populations.,"CREATE TABLE forests (id INT PRIMARY KEY, name VARCHAR(50), country VARCHAR(50), hectares DECIMAL(10,2)); CREATE TABLE animals (id INT PRIMARY KEY, species VARCHAR(50), population INT, forest_id INT, FOREIGN KEY (forest_id) REFERENCES forests(id)); ",SELECT SUM(hectares) FROM forests INNER JOIN animals ON forests.id = animals.forest_id WHERE forests.country = 'Africa' AND animals.species = 'Koala';,SELECT SUM(forests.hectares) FROM forests INNER JOIN animals ON forests.id = animals.forest_id WHERE animals.species = 'Koala' AND forests.country = 'Africa';,0 "List all articles published before January 1, 2010, in reverse chronological order from the 'news_articles' table","CREATE TABLE news_articles (article_id INT, author_name VARCHAR(50), title VARCHAR(100), published_date DATE);",SELECT * FROM news_articles WHERE published_date < '2010-01-01' ORDER BY published_date DESC;,SELECT * FROM news_articles WHERE published_date '2010-01-01' ORDER BY published_date;,0 What is the average length of high-speed rail in Japan and China?,"CREATE TABLE high_speed_rail (id INT, name TEXT, country TEXT, length INT); ","SELECT AVG(length) FROM high_speed_rail WHERE country IN ('JP', 'CN');","SELECT AVG(length) FROM high_speed_rail WHERE country IN ('Japan', 'China');",0 "How many students are enrolled in each graduate program, ranked by the number of students?","CREATE TABLE GraduatePrograms(ProgramID INT, ProgramName VARCHAR(50), Enrollment INT); ","SELECT ProgramName, ROW_NUMBER() OVER(ORDER BY Enrollment DESC) AS Rank, Enrollment FROM GraduatePrograms;","SELECT ProgramName, SUM(Enrollment) as Total_Students FROM GraduatePrograms GROUP BY ProgramName ORDER BY Total_Students DESC;",0 What is the IHSAA class for Crown Point?,"CREATE TABLE table_name_98 (ihsaa_class VARCHAR, school VARCHAR);","SELECT ihsaa_class FROM table_name_98 WHERE school = ""crown point"";","SELECT ihsaa_class FROM table_name_98 WHERE school = ""crown point"";",1 what is the country when the bie recognised is no and years(s) is 2014?,"CREATE TABLE table_name_83 (country VARCHAR, bie_recognised VARCHAR, year_s_ VARCHAR);","SELECT country FROM table_name_83 WHERE bie_recognised = ""no"" AND year_s_ = ""2014"";","SELECT country FROM table_name_83 WHERE bie_recognised = ""no"" AND year_s_ = ""2014"";",1 What is the total number of volunteers from urban areas who have volunteered in the last 6 months?,"CREATE TABLE volunteers (id INT, name VARCHAR(50), reg_date DATE, location VARCHAR(30)); ","SELECT COUNT(*) FROM volunteers WHERE location = 'urban' AND reg_date >= DATEADD(month, -6, GETDATE());","SELECT COUNT(*) FROM volunteers WHERE location LIKE '%urban%' AND reg_date >= DATEADD(month, -6, GETDATE());",0 What was the released date of Polarium?,"CREATE TABLE table_1616608_2 (released_date VARCHAR, western_title VARCHAR);","SELECT released_date FROM table_1616608_2 WHERE western_title = ""Polarium"";","SELECT released_date FROM table_1616608_2 WHERE western_title = ""Polarium"";",1 What is the total number of units of organic food items served in all cafeterias in the Midwest?,"CREATE TABLE Cafeteria (CafeteriaID INT, Location VARCHAR(20), OrganicMeal BOOLEAN); CREATE TABLE Meal (MealID INT, CaloricContent INT, MealType VARCHAR(10), Organic BOOLEAN); CREATE TABLE CafeteriaMeal (CafeteriaID INT, MealID INT, Units INT); ",SELECT SUM(Units) FROM CafeteriaMeal cm JOIN Meal m ON cm.MealID = m.MealID JOIN Cafeteria c ON cm.CafeteriaID = c.CafeteriaID WHERE m.Organic = true AND c.Location = 'Midwest';,SELECT SUM(CafeteriaMeal.Units) FROM Cafeteria INNER JOIN Meal ON CafeteriaMeal.MealID = Meal.MealID INNER JOIN CafeteriaMeal ON Meal.MealID = CafeteriaMeal.MealID WHERE Cafeteria.Location = 'Midwest' AND Meal.Organic = true;,0 Who's the incumbent of Indiana 4 district?,"CREATE TABLE table_1341843_15 (incumbent VARCHAR, district VARCHAR);","SELECT incumbent FROM table_1341843_15 WHERE district = ""Indiana 4"";","SELECT incumbent FROM table_1341843_15 WHERE district = ""Indiana 4"";",1 What was the lowest postion of ehc straubing ii when they played less than 10 games?,"CREATE TABLE table_name_70 (position INTEGER, name VARCHAR, played VARCHAR);","SELECT MIN(position) FROM table_name_70 WHERE name = ""ehc straubing ii"" AND played < 10;","SELECT MIN(position) FROM table_name_70 WHERE name = ""ehc straubing ii"" AND played 10;",0 "What is the trend of mining activity in Canada over the past 5 years, and what is the projected trend for the next 5 years?","CREATE TABLE canada_mining_activity (id INT, year INT, activity_level INT);","SELECT year, activity_level FROM canada_mining_activity WHERE year BETWEEN 2016 AND 2021 OR year BETWEEN 2026 AND 2031;","SELECT year, activity_level, SUM(activity_level) as total_activity FROM canada_mining_activity GROUP BY year, activity_level;",0 What is the minimum wage for male workers in the 'Retail' industry?,"CREATE TABLE Wages (EmployeeID INT, Gender VARCHAR(10), Industry VARCHAR(20), HourlyWage DECIMAL(10, 2)); ",SELECT MIN(HourlyWage) FROM Wages WHERE Gender = 'Male' AND Industry = 'Retail';,SELECT MIN(HourlyWage) FROM Wages WHERE Gender = 'Male' AND Industry = 'Retail';,1 What was the season number episode directed by John David Coles?,"CREATE TABLE table_21781578_2 (season_no VARCHAR, directed_by VARCHAR);","SELECT season_no FROM table_21781578_2 WHERE directed_by = ""John David Coles"";","SELECT season_no FROM table_21781578_2 WHERE directed_by = ""John David Coles"";",1 Identify the number of fish species farmed in Chile and Indonesia using non-organic methods.,"CREATE TABLE FarmE (species VARCHAR(20), country VARCHAR(20), farming_method VARCHAR(20)); ","SELECT COUNT(DISTINCT species) FROM FarmE WHERE country IN ('Chile', 'Indonesia') AND farming_method != 'Organic';","SELECT COUNT(*) FROM FarmE WHERE country IN ('Chile', 'Indonesia') AND farming_method NOT IN ('organic');",0 Calculate the total number of military personnel in Europe,"CREATE TABLE military_personnel (id INT, name TEXT, rank TEXT, region TEXT); ",SELECT COUNT(*) FROM military_personnel WHERE region = 'Europe';,SELECT COUNT(*) FROM military_personnel WHERE region = 'Europe';,1 Which writer worked for Intrepido LTD for a film on 17/03/04?,"CREATE TABLE table_name_35 (writer_s_ VARCHAR, recipient VARCHAR, date VARCHAR);","SELECT writer_s_ FROM table_name_35 WHERE recipient = ""intrepido ltd"" AND date = ""17/03/04"";","SELECT writer_s_ FROM table_name_35 WHERE recipient = ""intrepido ltd"" AND date = ""17/03/04"";",1 What is the minimum depth in the Southern Ocean among all marine research stations?,"CREATE TABLE ocean_depths (station_name VARCHAR(50), southern_depth FLOAT); ","SELECT MIN(southern_depth) FROM ocean_depths WHERE station_name IN ('Australian Antarctic Division', 'Scott Polar Research Institute');",SELECT MIN(southern_depth) FROM ocean_depths;,0 What district did Joe Waggonner belong to?,"CREATE TABLE table_1341738_19 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_1341738_19 WHERE incumbent = ""Joe Waggonner"";","SELECT district FROM table_1341738_19 WHERE incumbent = ""Joe Waggonner"";",1 What is the average salary of workers in the 'Agriculture' industry who are not part of a union?,"CREATE TABLE workers (id INT, industry VARCHAR(255), salary FLOAT, union_member BOOLEAN); ",SELECT AVG(salary) FROM workers WHERE industry = 'Agriculture' AND union_member = false;,SELECT AVG(salary) FROM workers WHERE industry = 'Agriculture' AND union_member = false;,1 Update the average speed of vessel V004 to 18 knots,"vessel_performance(vessel_id, max_speed, average_speed)",UPDATE vessel_performance SET average_speed = 18 WHERE vessel_id = 'V004';,UPDATE vessel_performance SET average_speed = 18 WHERE vessel_id = 004;,0 What is the most streamed song in the US?,"CREATE TABLE StreamingData (StreamID INT, SongID INT, StreamDate DATE, Genre VARCHAR(50), SongName VARCHAR(100), StreamCount INT, Country VARCHAR(50)); ","SELECT SongName, StreamCount FROM StreamingData WHERE Country = 'US' AND StreamCount = (SELECT MAX(StreamCount) FROM StreamingData WHERE Country = 'US');","SELECT SongName, MAX(StreamCount) FROM StreamingData WHERE Country = 'USA' GROUP BY SongName;",0 List marine life species with their population counts in regions having strict pollution control laws.,"CREATE SCHEMA MarineLife; CREATE TABLE Species (id INT, name TEXT, population INT); CREATE SCHEMA PollutionControl; CREATE TABLE Regions (id INT, name TEXT, strictness TEXT);","SELECT s.name, s.population FROM MarineLife.Species s JOIN PollutionControl.Regions r ON s.id = r.id WHERE r.strictness = 'strict';","SELECT Species.name, Species.population FROM MarineLife.Species INNER JOIN PollutionControl.Regions ON MarineLife.id = Regions.id WHERE Regions.strictness = 'Strict';",0 What was the score for the game played at Sarge Frye Field?,"CREATE TABLE table_name_15 (score VARCHAR, site_stadium VARCHAR);","SELECT score FROM table_name_15 WHERE site_stadium = ""sarge frye field"";","SELECT score FROM table_name_15 WHERE site_stadium = ""sarge frye field"";",1 What is the english transliteration of late dew?,"CREATE TABLE table_name_60 (english_transliteration VARCHAR, english_translation VARCHAR);","SELECT english_transliteration FROM table_name_60 WHERE english_translation = ""late dew"";","SELECT english_transliteration FROM table_name_60 WHERE english_translation = ""late dew"";",1 How many Spanish word is there for the Portuguese bem-vindo?,"CREATE TABLE table_26614365_5 (spanish VARCHAR, portuguese VARCHAR);","SELECT COUNT(spanish) FROM table_26614365_5 WHERE portuguese = ""Bem-vindo"";","SELECT COUNT(spanish) FROM table_26614365_5 WHERE portuguese = ""Bem-Vindo"";",0 When 7th is the position and 15 is the race who is the team?,"CREATE TABLE table_25352318_1 (team VARCHAR, races VARCHAR, position VARCHAR);","SELECT team FROM table_25352318_1 WHERE races = 15 AND position = ""7th"";","SELECT team FROM table_25352318_1 WHERE races = ""15"" AND position = ""7th"";",0 "What are the building full names that contain the word ""court""?",CREATE TABLE Apartment_Buildings (building_full_name VARCHAR);,"SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE ""%court%"";","SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE ""%court%"";",1 Calculate the average speed of vessels that have a maximum speed greater than 25 knots,"CREATE TABLE Vessels (VesselID INT, VesselName VARCHAR(100), MaxSpeed FLOAT); ",SELECT AVG(MaxSpeed) FROM Vessels WHERE MaxSpeed > 25;,SELECT AVG(MaxSpeed) FROM Vessels WHERE MaxSpeed > 25;,1 Name the saka era for malayalam മിഥുനം,"CREATE TABLE table_169955_1 (saka_era VARCHAR, in_malayalam VARCHAR);","SELECT saka_era FROM table_169955_1 WHERE in_malayalam = ""മിഥുനം"";","SELECT saka_era FROM table_169955_1 WHERE in_malayalam = """";",0 "Which is the highest Gold that has a total smaller than 4 and a silver of 1, and a bronze smaller than 2, and a rank of 13?","CREATE TABLE table_name_94 (gold INTEGER, rank VARCHAR, bronze VARCHAR, total VARCHAR, silver VARCHAR);","SELECT MAX(gold) FROM table_name_94 WHERE total < 4 AND silver = 1 AND bronze < 2 AND rank = ""13"";",SELECT MAX(gold) FROM table_name_94 WHERE total 4 AND silver = 1 AND bronze 2 AND rank = 13;,0 Find the number of unique attendees in each cultural event.,"CREATE TABLE Cultural_Events (event_id INT, event_name VARCHAR(100), event_date DATE, location VARCHAR(100), PRIMARY KEY (event_id));CREATE TABLE Event_Attendees (attendee_id INT, attendee_name VARCHAR(100), event_id INT, PRIMARY KEY (attendee_id), FOREIGN KEY (event_id) REFERENCES Cultural_Events(event_id));","SELECT event_id, COUNT(DISTINCT attendee_id) FROM Event_Attendees GROUP BY event_id;","SELECT Cultural_Events.event_name, COUNT(DISTINCT Event_Attendees.attendee_id) as unique_attendees FROM Cultural_Events INNER JOIN Event_Attendees ON Cultural_Events.event_id = Event_Attendees.event_id GROUP BY Cultural_Events.event_name;",0 Which Score has a To Par of –1?,"CREATE TABLE table_name_59 (score INTEGER, to_par VARCHAR);","SELECT MIN(score) FROM table_name_59 WHERE to_par = ""–1"";","SELECT SUM(score) FROM table_name_59 WHERE to_par = ""–1"";",0 What is the total quantity of cotton textiles sourced from the USA and Canada?,"CREATE TABLE sourcing (country VARCHAR(10), material VARCHAR(10), quantity INT); ","SELECT SUM(quantity) FROM sourcing WHERE country IN ('USA', 'Canada') AND material = 'cotton';","SELECT SUM(quantity) FROM sourcing WHERE country IN ('USA', 'Canada') AND material = 'cotton';",1 What is the maximum budget allocated to any transportation project in the state of New York in the year 2021?,"CREATE TABLE TransportationProjects (ProjectID INT, Name VARCHAR(100), Budget DECIMAL(10,2), Year INT, State VARCHAR(50)); ",SELECT MAX(Budget) FROM TransportationProjects WHERE Year = 2021 AND State = 'New York' AND Name LIKE '%transportation%';,SELECT MAX(Budget) FROM TransportationProjects WHERE State = 'New York' AND Year = 2021;,0 Identify the most expensive artwork by a Canadian artist.,"CREATE TABLE ArtWorks (ArtworkID int, Title varchar(100), Value int, ArtistID int);","SELECT Title, Value FROM ArtWorks","SELECT Title, Value FROM ArtWorks WHERE ArtistID = (SELECT ArtistID FROM Artists WHERE Country = 'Canada') ORDER BY Value DESC LIMIT 1;",0 "What is the shirt no with a position of setter, a nationality of Italy, and height larger than 172?","CREATE TABLE table_name_11 (shirt_no INTEGER, height VARCHAR, position VARCHAR, nationality VARCHAR);","SELECT SUM(shirt_no) FROM table_name_11 WHERE position = ""setter"" AND nationality = ""italy"" AND height > 172;","SELECT SUM(shirt_no) FROM table_name_11 WHERE position = ""setter"" AND nationality = ""italy"" AND height > 172;",1 "How many graduate students have published in academic journals in the past year, and what is the distribution of publications by department?","CREATE TABLE graduate_students (student_id INT, dept_name VARCHAR(50)); CREATE TABLE publications (publication_id INT, student_id INT, pub_date DATE);","SELECT g.dept_name, COUNT(p.publication_id) as num_publications FROM graduate_students g INNER JOIN publications p ON g.student_id = p.student_id WHERE p.pub_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 YEAR) GROUP BY g.dept_name;","SELECT gs.dept_name, COUNT(gs.student_id) as num_students, COUNT(ps.publication_id) as num_publications FROM graduate_students gs JOIN publications p ON gs.student_id = p.student_id WHERE ps.pub_date >= DATEADD(year, -1, GETDATE()) GROUP BY gs.dept_name;",0 what position did the player play who had a number of 15 who played in 1987?,"CREATE TABLE table_name_88 (position VARCHAR, jersey_number_s_ VARCHAR, years VARCHAR);","SELECT position FROM table_name_88 WHERE jersey_number_s_ = ""15"" AND years = ""1987"";","SELECT position FROM table_name_88 WHERE jersey_number_s_ = ""15"" AND years = ""1987"";",1 What are the names and vulnerabilities of systems with a high severity rating?,"CREATE TABLE SystemVulnerabilities (SystemName VARCHAR(255), Vulnerability VARCHAR(255), Severity RATING); ","SELECT SystemName, Vulnerability FROM SystemVulnerabilities WHERE Severity = 'HIGH'","SELECT SystemName, Vulnerability FROM SystemVulnerabilities WHERE Severity = (SELECT MAX(Severity) FROM SystemVulnerabilities);",0 Delete all records from the disaster_preparedness table for the 'Flood' disaster type,"CREATE TABLE disaster_preparedness (disaster_type VARCHAR(255), preparedness_level VARCHAR(255)); ",DELETE FROM disaster_preparedness WHERE disaster_type = 'Flood';,DELETE FROM disaster_preparedness WHERE disaster_type = 'Flood';,1 What was the maximum burglary statistics if the property crimes is 168630?,"CREATE TABLE table_26060884_2 (burglary INTEGER, property_crimes VARCHAR);",SELECT MAX(burglary) FROM table_26060884_2 WHERE property_crimes = 168630;,"SELECT MAX(burglary) FROM table_26060884_2 WHERE property_crimes = ""168630"";",0 What is the average trip duration for electric vehicles in 'trip_data' table?,"CREATE TABLE trip_data (id INT, vehicle_type VARCHAR(20), trip_duration FLOAT);",SELECT AVG(trip_duration) FROM trip_data WHERE vehicle_type = 'Electric Vehicle';,SELECT AVG(trip_duration) FROM trip_data WHERE vehicle_type = 'Electric';,0 Name the record for august 28,"CREATE TABLE table_name_24 (record VARCHAR, date VARCHAR);","SELECT record FROM table_name_24 WHERE date = ""august 28"";","SELECT record FROM table_name_24 WHERE date = ""august 28"";",1 Which Partner has Opponents in the final of john bromwich frank sedgman?,"CREATE TABLE table_name_20 (partner VARCHAR, opponents_in_the_final VARCHAR);","SELECT partner FROM table_name_20 WHERE opponents_in_the_final = ""john bromwich frank sedgman"";","SELECT partner FROM table_name_20 WHERE opponents_in_the_final = ""john bromwich frank sedgman"";",1 "Attendance of 30,335 had what record?","CREATE TABLE table_name_74 (record VARCHAR, attendance VARCHAR);","SELECT record FROM table_name_74 WHERE attendance = ""30,335"";","SELECT record FROM table_name_74 WHERE attendance = ""30,335"";",1 What is the difference in funding between the most and least funded startup per country?,"CREATE SCHEMA if not exists biotech;CREATE TABLE if not exists biotech.startups(id INT, name VARCHAR(50), country VARCHAR(50), funding DECIMAL(10,2));","SELECT s1.country, s1.funding - s2.funding diff FROM biotech.startups s1 JOIN (SELECT country, MAX(funding) max_funding, MIN(funding) min_funding FROM biotech.startups GROUP BY country) s2 ON s1.country = s2.country WHERE s1.funding = s2.max_funding OR s1.funding = s2.min_funding;","SELECT country, MAX(funding) - MIN(funding) as funding_difference FROM biotech.startups GROUP BY country;",0 What is the location and what was the attendance on those days when the score was 3-5-1?,"CREATE TABLE table_27537870_3 (location_attendance VARCHAR, record VARCHAR);","SELECT location_attendance FROM table_27537870_3 WHERE record = ""3-5-1"";","SELECT location_attendance FROM table_27537870_3 WHERE record = ""3-5-1"";",1 What's the total revenue of organic hair care products?,"CREATE TABLE sales (id INT, product_id INT, quantity INT, sale_price DECIMAL); CREATE TABLE products (id INT, name TEXT, is_organic BOOLEAN, product_type TEXT, sale_price DECIMAL);",SELECT SUM(sales.quantity * sales.sale_price) FROM sales JOIN products ON sales.product_id = products.id WHERE products.is_organic = true AND products.product_type = 'hair care';,SELECT SUM(quantity * sale_price) FROM sales JOIN products ON sales.product_id = products.id WHERE products.is_organic = true AND products.product_type = 'hair care';,0 Which warehouse has the highest inventory value for item 'Thingamajig'?,"CREATE TABLE Inventory (id INT, item VARCHAR(50), quantity INT, purchase_price DECIMAL(10, 2)); ","SELECT item, MAX(quantity * purchase_price) FROM Inventory WHERE item = 'Thingamajig' GROUP BY item;","SELECT warehouse, MAX(quantity * purchase_price) FROM Inventory WHERE item = 'Thingamajig' GROUP BY warehouse;",0 "Name the successor for elected january 26, 1837","CREATE TABLE table_225200_3 (successor VARCHAR, date_of_successors_formal_installation VARCHAR);","SELECT COUNT(successor) FROM table_225200_3 WHERE date_of_successors_formal_installation = ""Elected January 26, 1837"";","SELECT successor FROM table_225200_3 WHERE date_of_successors_formal_installation = ""January 26, 1837"";",0 Name the 2006 with 2008 of 1r and 2004 of 1r,CREATE TABLE table_name_22 (Id VARCHAR);,"SELECT 2006 FROM table_name_22 WHERE 2008 = ""1r"" AND 2004 = ""1r"";","SELECT 2006 FROM table_name_22 WHERE 2008 = ""1r"" AND 2004 = ""1r"";",1 What are the names of all faculty members who have not received any research grants?,"CREATE SCHEMA research;CREATE TABLE grants(faculty_name TEXT,department TEXT,amount INTEGER);",SELECT faculty_name FROM research.grants WHERE amount=0;,SELECT faculty_name FROM research.grants WHERE department NOT IN (SELECT department FROM research.grants);,0 What is the number of women-led businesses in the agricultural sector in each country?,"CREATE TABLE women_businesses (country VARCHAR(50), business_count INT); ","SELECT country, business_count FROM women_businesses;","SELECT country, SUM(business_count) FROM women_businesses GROUP BY country;",0 What is the average duration of songs in 'Hip Hop' and 'R&B' genres combined?,"CREATE TABLE songs (song_id INT, song VARCHAR(50), genre VARCHAR(10), duration FLOAT); ","SELECT AVG(s.duration) as avg_duration FROM songs s WHERE s.genre IN ('Hip Hop', 'R&B');","SELECT AVG(duration) FROM songs WHERE genre IN ('Hip Hop', 'R&B');",0 What is the percentage change in average temperature for each region compared to the previous month?,"CREATE TABLE monthly_temp (region VARCHAR(255), temperature INT, month INT); ","SELECT region, ((current_temp - prev_temp) * 100.0 / prev_temp) as pct_change FROM (SELECT region, temperature as current_temp, LAG(temperature) OVER (PARTITION BY region ORDER BY month) as prev_temp FROM monthly_temp) subquery;","SELECT region, AVG(temperature) OVER (PARTITION BY region ORDER BY month) - AVG(temperature) OVER (PARTITION BY region ORDER BY month) as percentage_change FROM monthly_temp;",0 What is the average budget allocated per service category in the Health department?,"CREATE TABLE Health_Dept (ID INT, Service VARCHAR(255), Budget FLOAT); ",SELECT AVG(Budget) FROM Health_Dept GROUP BY Service;,"SELECT Service, AVG(Budget) FROM Health_Dept GROUP BY Service;",0 "What is the Competition where the Score was 3–0, and the was Goal larger than 4?","CREATE TABLE table_name_59 (competition VARCHAR, score VARCHAR, goal VARCHAR);","SELECT competition FROM table_name_59 WHERE score = ""3–0"" AND goal > 4;","SELECT competition FROM table_name_59 WHERE score = ""3–0"" AND goal > 4;",1 How many unique disaster types occurred in 'europe' region from the 'disaster_response' table in the year 2019?,"CREATE TABLE disaster_response (id INT, disaster_type TEXT, location TEXT, response INT, year INT);",SELECT COUNT(DISTINCT disaster_type) FROM disaster_response WHERE location = 'europe' AND year = 2019;,SELECT COUNT(DISTINCT disaster_type) FROM disaster_response WHERE location = 'europe' AND year = 2019;,1 What is the final score if the partner is Woodforde?,"CREATE TABLE table_22597626_2 (score_in_the_final VARCHAR, partner VARCHAR);","SELECT score_in_the_final FROM table_22597626_2 WHERE partner = ""Woodforde"";","SELECT score_in_the_final FROM table_22597626_2 WHERE partner = ""Woodforde"";",1 What is the title of the exhibition featuring the art collection 'Guggenheim'?,"CREATE TABLE art_exhibitions (id INT, title VARCHAR(255), art_collection_id INT, start_date DATE, end_date DATE); ",SELECT e.title FROM art_exhibitions e INNER JOIN art_collections c ON e.art_collection_id = c.id WHERE c.name = 'Guggenheim';,SELECT title FROM art_exhibitions WHERE art_collection_id = (SELECT id FROM art_collections WHERE name = 'Guggenheim');,0 Name the number of games on june 12,"CREATE TABLE table_11965481_13 (game VARCHAR, date VARCHAR);","SELECT COUNT(game) FROM table_11965481_13 WHERE date = ""June 12"";","SELECT COUNT(game) FROM table_11965481_13 WHERE date = ""June 12"";",1 What was the maximum weight of shipments from Japan to the United Kingdom in a single day in March 2021?,"CREATE TABLE shipments (id INT, weight FLOAT, origin VARCHAR(255), destination VARCHAR(255), shipped_at TIMESTAMP); ",SELECT MAX(weight) FROM shipments WHERE origin = 'Japan' AND destination = 'United Kingdom' AND shipped_at >= '2021-03-01' AND shipped_at < '2021-03-02' GROUP BY DATE(shipped_at);,SELECT MAX(weight) FROM shipments WHERE origin = 'Japan' AND destination = 'United Kingdom' AND shipped_at BETWEEN '2021-03-01' AND '2021-03-31';,0 Which countries have the least and most number of female producers in the producers table?,"CREATE TABLE producers (id INT, name VARCHAR(50), gender VARCHAR(10), country VARCHAR(50));","SELECT country, gender, COUNT(*) as count FROM producers GROUP BY country, gender ORDER BY country, count DESC;","SELECT country, COUNT(*) FROM producers WHERE gender = 'Female' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1;",0 What is the total value of Impressionist art exhibited in Paris in the 19th century?,"CREATE TABLE Artworks (artwork_id INT, name VARCHAR(255), artist_id INT, date_sold DATE, price DECIMAL(10,2), exhibition_id INT); CREATE TABLE Artists (artist_id INT, name VARCHAR(255), nationality VARCHAR(255)); CREATE TABLE Exhibitions (exhibition_id INT, city VARCHAR(255), start_date DATE, end_date DATE, art_movement VARCHAR(255));",SELECT SUM(Artworks.price) FROM Artworks INNER JOIN Exhibitions ON Artworks.exhibition_id = Exhibitions.exhibition_id INNER JOIN Artists ON Artworks.artist_id = Artists.artist_id WHERE Artists.nationality = 'Impressionist' AND Exhibitions.city = 'Paris' AND Exhibitions.start_date < '1900-01-01' AND Exhibitions.end_date > '1800-01-01';,SELECT SUM(Artworks.price) FROM Artworks INNER JOIN Artists ON Artworks.artist_id = Artists.artist_id INNER JOIN Exhibitions ON Artworks.exhibition_id = Exhibitions.exhibition_id WHERE Exhibitions.city = 'Paris' AND Exhibitions.art_movement = 'Impressionist' AND Exhibitions.start_date BETWEEN '2022-01-01' AND '2022-12-31';,0 "What Team has a Class of 350cc, with less than 13 points in 1959?","CREATE TABLE table_name_93 (team VARCHAR, year VARCHAR, class VARCHAR, points VARCHAR);","SELECT team FROM table_name_93 WHERE class = ""350cc"" AND points < 13 AND year = 1959;","SELECT team FROM table_name_93 WHERE class = ""350cc"" AND points 13 AND year = 1959;",0 What type has song as the name?,"CREATE TABLE table_name_7 (type VARCHAR, name VARCHAR);","SELECT type FROM table_name_7 WHERE name = ""song"";","SELECT type FROM table_name_7 WHERE name = ""song"";",1 What is the maximum budget allocated for healthcare services in New York State for the year 2021?,"CREATE TABLE service_budget (state VARCHAR(50), service VARCHAR(50), budget INT, budget_year INT); ",SELECT MAX(budget) FROM service_budget WHERE state = 'New York' AND service = 'Healthcare' AND budget_year = 2021;,SELECT MAX(budget) FROM service_budget WHERE state = 'New York' AND service = 'Healthcare' AND budget_year = 2021;,1 What is the maximum allowed noise level for ships in the Mediterranean Sea?,"CREATE TABLE maritime_laws (law_id INT, law_name VARCHAR(255), region VARCHAR(255), noise_limit DECIMAL(3,1), PRIMARY KEY(law_id)); ",SELECT noise_limit FROM maritime_laws WHERE region = 'Mediterranean Sea';,SELECT MAX(noise_limit) FROM maritime_laws WHERE region = 'Mediterranean Sea';,0 What is the total revenue generated from roaming fees for each mobile network operator in the past year?,"CREATE TABLE roaming_fees (fee_id INT, fee_amount NUMERIC, operator_name VARCHAR(50), fee_date DATE); ","SELECT operator_name, SUM(fee_amount) as total_roaming_fees, ROW_NUMBER() OVER (ORDER BY SUM(fee_amount) DESC) as roaming_fees_rank FROM roaming_fees WHERE fee_date >= CURRENT_DATE - INTERVAL '1 year' GROUP BY operator_name;","SELECT operator_name, SUM(fee_amount) as total_revenue FROM roaming_fees WHERE fee_date >= DATEADD(year, -1, GETDATE()) GROUP BY operator_name;",0 What is the total associated with Bronzes over 35?,"CREATE TABLE table_name_15 (total VARCHAR, bronze INTEGER);",SELECT total FROM table_name_15 WHERE bronze > 35;,SELECT total FROM table_name_15 WHERE bronze > 35;,1 How many satellites were deployed by SpaceX and Rocket Lab?,"CREATE TABLE satellites (id INT PRIMARY KEY, company VARCHAR(50), launch_year INT); ",SELECT COUNT(*) FROM satellites WHERE company = 'SpaceX' OR company = 'Rocket Lab';,"SELECT COUNT(*) FROM satellites WHERE company IN ('SpaceX', 'Rocket Lab');",0 Which team was the away team when the game was at punt road oval?,"CREATE TABLE table_name_6 (away_team VARCHAR, venue VARCHAR);","SELECT away_team FROM table_name_6 WHERE venue = ""punt road oval"";","SELECT away_team FROM table_name_6 WHERE venue = ""punt road oval"";",1 What are the Japanese characters for the Chinese word 叉焼?,"CREATE TABLE table_name_28 (japanese VARCHAR, chinese VARCHAR);","SELECT japanese FROM table_name_28 WHERE chinese = ""叉焼"";","SELECT japanese FROM table_name_28 WHERE chinese = """";",0 "What is the total number of weeks where games were on November 5, 1973 and the attendance was larger than 49,220?","CREATE TABLE table_name_81 (week VARCHAR, date VARCHAR, attendance VARCHAR);","SELECT COUNT(week) FROM table_name_81 WHERE date = ""november 5, 1973"" AND attendance > 49 OFFSET 220;","SELECT COUNT(week) FROM table_name_81 WHERE date = ""november 5, 1973"" AND attendance > 49 OFFSET 220;",1 "What were the total sales revenues for the drug ""Humira"" by company in 2019?","CREATE TABLE pharmaceutical_sales (company VARCHAR(255), drug VARCHAR(255), qty_sold INT, sales_revenue FLOAT, sale_date DATE); ","SELECT company, SUM(sales_revenue) FROM pharmaceutical_sales WHERE drug = 'Humira' AND sale_date BETWEEN '2019-01-01' AND '2019-12-31' GROUP BY company;","SELECT company, SUM(sales_revenue) FROM pharmaceutical_sales WHERE drug = 'Humira' AND YEAR(sale_date) = 2019 GROUP BY company;",0 What is the total number of DApps launched in the 'polygon' network?,"CREATE TABLE dapps (id INT, network VARCHAR(20), dapp_count INT); ",SELECT SUM(dapp_count) FROM dapps WHERE network = 'polygon';,SELECT SUM(dapp_count) FROM dapps WHERE network = 'polygon';,1 "What was the total donation amount for each program in Q2 2022, and how many unique volunteers signed up for each program?","CREATE TABLE Programs (ProgramID INT, ProgramName TEXT); CREATE TABLE Donations (DonationID INT, ProgramID INT, DonationAmount DECIMAL(10,2), DonationDate DATE); CREATE TABLE ProgramVolunteers (ProgramID INT, VolunteerID INT); ","SELECT ProgramName, SUM(DonationAmount) as TotalDonation, COUNT(DISTINCT VolunteerID) as NumVolunteers FROM Programs JOIN Donations ON Programs.ProgramID = Donations.ProgramID JOIN ProgramVolunteers ON Programs.ProgramID = ProgramVolunteers.ProgramID WHERE DonationDate BETWEEN '2022-04-01' AND '2022-06-30' GROUP BY ProgramName;","SELECT Programs.ProgramName, SUM(Donations.DonationAmount) AS TotalDonation, COUNT(DISTINCT ProgramVolunteers.VolunteerID) AS UniqueVolunteers FROM Programs INNER JOIN Donations ON Programs.ProgramID = Donations.ProgramID WHERE Donations.DonationDate BETWEEN '2022-04-01' AND '2022-06-30' GROUP BY Programs.ProgramName;",0 What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome.,"CREATE TABLE customers (customer_name VARCHAR, payment_method VARCHAR, customer_id VARCHAR); CREATE TABLE mailshot_customers (customer_id VARCHAR, outcome_code VARCHAR);","SELECT T2.customer_name, T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'Order' INTERSECT SELECT T2.customer_name, T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'No Response';","SELECT T1.customer_name, T1.payment_method FROM customers AS T1 JOIN mailshot_customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.outcome_code = 'Order' AND T2.outcome_code = 'No Response';",0 What is the total funding received by companies founded by people who identify as LGBTQ+ in the biotech sector?,"CREATE TABLE companies (id INT, name TEXT, industry TEXT, founders_lgbtq BOOLEAN, funding FLOAT);",SELECT SUM(funding) FROM companies WHERE founders_lgbtq = true AND industry = 'biotech';,SELECT SUM(funding) FROM companies WHERE industry = 'Biotech' AND founders_lgbtq = true;,0 "Who is from italy has 0 giro wins, 0 young rider and less than 3 maglia rosa?","CREATE TABLE table_name_92 (name VARCHAR, maglia_rosa VARCHAR, young_rider VARCHAR, country VARCHAR, giro_wins VARCHAR);","SELECT name FROM table_name_92 WHERE country = ""italy"" AND giro_wins = 0 AND young_rider = 0 AND maglia_rosa < 3;","SELECT name FROM table_name_92 WHERE country = ""italy"" AND giro_wins = ""0"" AND young_rider = ""0"" AND maglia_rosa 3;",0 "What is the average carbon offset per renewable energy project in the state of California, grouped by project type?","CREATE TABLE ca_projects (project_id INT, project_name VARCHAR(100), state VARCHAR(50), project_type VARCHAR(50), carbon_offset INT); ","SELECT project_type, AVG(carbon_offset) FROM ca_projects WHERE state = 'California' GROUP BY project_type;","SELECT project_type, AVG(carbon_offset) as avg_carbon_offset FROM ca_projects WHERE state = 'California' GROUP BY project_type;",0 "What is the total construction cost and the number of permits issued for each project type per month in the 'Projects', 'BuildingPermits', and 'GreenBuildings' tables?","CREATE TABLE Projects (projectID INT, projectType VARCHAR(50), totalCost DECIMAL(10,2), sqft DECIMAL(10,2));CREATE TABLE BuildingPermits (permitID INT, projectID INT, permitDate DATE);CREATE TABLE GreenBuildings (projectID INT, sustainableMaterial VARCHAR(50), sustainableMaterialCost DECIMAL(10,2));","SELECT P.projectType, DATE_FORMAT(permitDate, '%Y-%m') AS Month, SUM(P.totalCost)/SUM(P.sqft) AS CostPerSqft, COUNT(B.permitID) AS PermitsIssued FROM Projects P INNER JOIN BuildingPermits B ON P.projectID = B.projectID LEFT JOIN GreenBuildings GB ON P.projectID = GB.projectID GROUP BY P.projectType, Month;","SELECT Projects.projectType, EXTRACT(MONTH FROM Projects.permitDate) AS month, SUM(Projects.totalCost) AS totalCost, COUNT(GreenBuildings.permitID) AS permits FROM Projects INNER JOIN BuildingPermits ON Projects.projectID = BuildingPermits.projectID INNER JOIN GreenBuildings ON Projects.projectID = GreenBuildings.projectID GROUP BY Projects.projectType, EXTRACT(MONTH FROM Projects.permitDate);",0 What year did Coenraad Breytenbach have their Int'l Debut?,"CREATE TABLE table_name_92 (year VARCHAR, player VARCHAR);","SELECT year FROM table_name_92 WHERE player = ""coenraad breytenbach"";","SELECT year FROM table_name_92 WHERE player = ""coenraad breytenbach"";",1 "Which % GDP has a Year smaller than 2011, and an Expenditure larger than 41.3, and an Income smaller than 48, and a Surplus(Deficit) of (24.6)?","CREATE TABLE table_name_19 (_percentage_gdp VARCHAR, surplus_deficit_ VARCHAR, income VARCHAR, year VARCHAR, expenditure VARCHAR);","SELECT _percentage_gdp FROM table_name_19 WHERE year < 2011 AND expenditure > 41.3 AND income < 48 AND surplus_deficit_ = ""(24.6)"";","SELECT _percentage_gdp FROM table_name_19 WHERE year 2011 AND expenditure > 41.3 AND income 48 AND surplus_deficit_ = ""24.6"";",0 "If the location attendance is the Verizon Center 20,173, what is the date?","CREATE TABLE table_23211041_7 (date VARCHAR, location_attendance VARCHAR);","SELECT date FROM table_23211041_7 WHERE location_attendance = ""Verizon Center 20,173"";","SELECT date FROM table_23211041_7 WHERE location_attendance = ""Viagra Center 20,173"";",0 "What are the total quantities of items in the warehouse_inventory table, grouped by their item_type?","CREATE TABLE warehouse_inventory (item_id INT, item_type VARCHAR(255), quantity INT); ","SELECT item_type, SUM(quantity) FROM warehouse_inventory GROUP BY item_type;","SELECT item_type, SUM(quantity) FROM warehouse_inventory GROUP BY item_type;",1 "What is the average number played that has fewer than 11 wins, more than 42 goals, more than 22 points, and 11 losses?","CREATE TABLE table_name_91 (played INTEGER, losses VARCHAR, points VARCHAR, wins VARCHAR, goals_for VARCHAR);",SELECT AVG(played) FROM table_name_91 WHERE wins < 11 AND goals_for > 42 AND points > 22 AND losses = 11;,SELECT AVG(played) FROM table_name_91 WHERE wins 11 AND goals_for > 42 AND points > 22 AND losses = 11;,0 What episode had 6.71 viewers?,"CREATE TABLE table_name_97 (episode VARCHAR, viewers VARCHAR);",SELECT episode FROM table_name_97 WHERE viewers = 6.71;,"SELECT episode FROM table_name_97 WHERE viewers = ""6.71"";",0 What is the total number of units in green-certified buildings?,"CREATE TABLE green_buildings (building_id INT, num_units INT, is_green_certified BOOLEAN); ",SELECT SUM(num_units) FROM green_buildings WHERE is_green_certified = true;,SELECT SUM(num_units) FROM green_buildings WHERE is_green_certified = true;,1 "What is the highest Points when the record was 12–2, and the Points Against are larger than 6?","CREATE TABLE table_name_25 (points_for INTEGER, record VARCHAR, points_against VARCHAR);","SELECT MAX(points_for) FROM table_name_25 WHERE record = ""12–2"" AND points_against > 6;","SELECT MAX(points_for) FROM table_name_25 WHERE record = ""12–2"" AND points_against > 6;",1 What is the longitude of Taurus?,"CREATE TABLE table_name_98 (longitude_အင်္သာ VARCHAR, latin VARCHAR);","SELECT longitude_အင်္သာ FROM table_name_98 WHERE latin = ""taurus"";","SELECT longitude_ FROM table_name_98 WHERE latin = ""taurus"";",0 List the top 5 diseases by prevalence in rural areas of India and Pakistan.,"CREATE TABLE diseases (name TEXT, location TEXT, prevalence INTEGER); ","SELECT name, SUM(prevalence) AS total_prevalence FROM diseases WHERE location IN ('Rural India', 'Rural Pakistan') GROUP BY name ORDER BY total_prevalence DESC LIMIT 5;","SELECT name, prevalence FROM diseases WHERE location IN ('India', 'Pakistan') ORDER BY prevalence DESC LIMIT 5;",0 Find the total renewable energy consumption in Australia and Japan?,"CREATE TABLE renewable_energy (country VARCHAR(20), consumption DECIMAL(10,2)); ","SELECT SUM(consumption) FROM renewable_energy WHERE country IN ('Australia', 'Japan');","SELECT SUM(consumption) FROM renewable_energy WHERE country IN ('Australia', 'Japan');",1 "List the cybersecurity incidents that occurred in the last month, including their details and the countermeasures taken.","CREATE TABLE cybersecurity_incidents (id INT, title VARCHAR(255), description TEXT, incident_date DATE, countermeasure TEXT);","SELECT * FROM cybersecurity_incidents WHERE incident_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);","SELECT title, description, incident_date, countermeasure FROM cybersecurity_incidents WHERE incident_date >= DATEADD(month, -1, GETDATE());",0 "What is the language, when ""what"" is ""ango""?","CREATE TABLE table_name_32 (english VARCHAR, what VARCHAR);","SELECT english FROM table_name_32 WHERE what = ""ango"";","SELECT english FROM table_name_32 WHERE what = ""ango"";",1 List the names and funding amounts for the top 2 biotech startups founded by women.,"CREATE SCHEMA if not exists biotech; CREATE TABLE if not exists biotech.startups (id INT, name VARCHAR(100), founder_gender VARCHAR(10), funding FLOAT); ","SELECT name, funding FROM (SELECT name, funding, ROW_NUMBER() OVER (PARTITION BY founder_gender ORDER BY funding DESC) as rn FROM biotech.startups WHERE founder_gender = 'Female') t WHERE rn <= 2;","SELECT name, funding FROM biotech.startups WHERE founder_gender = 'Female' ORDER BY funding DESC LIMIT 2;",0 What is the grid of pkv racing with the driver oriol servià?,"CREATE TABLE table_name_56 (grid INTEGER, team VARCHAR, driver VARCHAR);","SELECT SUM(grid) FROM table_name_56 WHERE team = ""pkv racing"" AND driver = ""oriol servià"";","SELECT SUM(grid) FROM table_name_56 WHERE team = ""pkv racing"" AND driver = ""oriol servià"";",1 What is the total number of hotel rooms in Tokyo that are in 5-star hotels?,"CREATE TABLE hotels (hotel_id INT, name TEXT, city TEXT, stars INT, rooms INT); ",SELECT SUM(rooms) FROM hotels WHERE city = 'Tokyo' AND stars = 5;,SELECT SUM(rooms) FROM hotels WHERE city = 'Tokyo' AND stars = 5;,1 What place did Jerry Barber of the United States come in at?,"CREATE TABLE table_name_92 (place VARCHAR, country VARCHAR, player VARCHAR);","SELECT place FROM table_name_92 WHERE country = ""united states"" AND player = ""jerry barber"";","SELECT place FROM table_name_92 WHERE country = ""united states"" AND player = ""jerry barber"";",1 what's the byu-uu score with uu-usu score being 44–16,"CREATE TABLE table_13665809_2 (byu_uu_score VARCHAR, uu_usu_score VARCHAR);","SELECT byu_uu_score FROM table_13665809_2 WHERE uu_usu_score = ""44–16"";","SELECT byu_uu_score FROM table_13665809_2 WHERE uu_usu_score = ""44–16"";",1 Identify the number of continents without any eco-friendly accommodations data.,"CREATE TABLE Accommodations (id INT, continent VARCHAR(50), category VARCHAR(50), PRIMARY KEY(id)); CREATE TABLE Continents (id INT, name VARCHAR(50), PRIMARY KEY(id)); ",SELECT COUNT(DISTINCT Continents.name) - COUNT(DISTINCT Accommodations.continent) FROM Continents LEFT JOIN Accommodations ON Continents.name = Accommodations.continent WHERE Accommodations.continent IS NULL;,SELECT COUNT(DISTINCT Continents.name) FROM Accommodations INNER JOIN Continents ON Accommodations.continent = Continents.name WHERE Accommodations.category = 'Eco-friendly';,0 Which communities have more than 1000 members?,"CREATE TABLE Community (name VARCHAR(255), members INT); ",SELECT name FROM Community WHERE members > 1000;,SELECT name FROM Community WHERE members > 1000;,1 Which state has a 2010-05-01 (saa) association agreement?,"CREATE TABLE table_name_36 (state VARCHAR, association_agreement VARCHAR);","SELECT state FROM table_name_36 WHERE association_agreement = ""2010-05-01 (saa)"";","SELECT state FROM table_name_36 WHERE association_agreement = ""2010-05-01 (saa)"";",1 "What is the maximum number of followers for users in the 'celebrity' category from the 'users' table, who have posted in the 'music' category from the 'posts' table, in the past 90 days?","CREATE TABLE users (user_id INT, user_category VARCHAR(20), user_followers INT); CREATE TABLE posts (post_id INT, user_id INT, post_category VARCHAR(20), post_date DATE);",SELECT MAX(user_followers) FROM (SELECT user_followers FROM users WHERE user_category = 'celebrity' AND user_id IN (SELECT user_id FROM posts WHERE post_category = 'music' AND post_date >= CURDATE() - INTERVAL 90 DAY)) AS subquery;,"SELECT MAX(user_followers) FROM users JOIN posts ON users.user_id = posts.user_id WHERE users.user_category = 'celebrity' AND posts.post_category ='music' AND posts.post_date >= DATE_SUB(CURRENT_DATE, INTERVAL 90 DAY);",0 What is the number of sustainable building projects per month in the last year?,"CREATE TABLE sustainable_projects (project_id SERIAL PRIMARY KEY, start_date DATE, end_date DATE, is_sustainable BOOLEAN); ","SELECT TO_CHAR(start_date, 'Month') AS month, COUNT(project_id) AS sustainable_projects_count FROM sustainable_projects WHERE is_sustainable = true AND start_date >= NOW() - INTERVAL '1 year' GROUP BY month ORDER BY TO_DATE(month, 'Month') ASC;","SELECT EXTRACT(MONTH FROM start_date) AS month, COUNT(*) FROM sustainable_projects WHERE is_sustainable = true AND end_date >= DATEADD(year, -1, GETDATE()) GROUP BY month;",0 Which title has xbox as the platform with a year prior to 2006?,"CREATE TABLE table_name_85 (title VARCHAR, platform VARCHAR, year VARCHAR);","SELECT title FROM table_name_85 WHERE platform = ""xbox"" AND year < 2006;","SELECT title FROM table_name_85 WHERE platform = ""xbox"" AND year 2006;",0 Update the recycling rate for 'paper' to 48% in 'recycling_rates' table for Q3 2022.,"CREATE TABLE recycling_rates (quarter TEXT, material TEXT, rate DECIMAL(3,2)); ",UPDATE recycling_rates SET rate = 0.48 WHERE quarter = 'Q3 2022' AND material = 'paper';,UPDATE recycling_rates SET rate = 48% WHERE quarter = 3 AND material = 'paper';,0 What is the immunization rate in India for children under 5?,"CREATE TABLE countries (id INT PRIMARY KEY, name VARCHAR(255), continent VARCHAR(255)); CREATE TABLE immunizations (id INT PRIMARY KEY, country_id INT, age_group VARCHAR(255), immunization_rate DECIMAL(3,2)); ",SELECT immunization_rate FROM immunizations WHERE age_group = 'Under 5' AND country_id = (SELECT id FROM countries WHERE name = 'India');,SELECT immunizations.immunization_rate FROM immunizations INNER JOIN countries ON immunizations.country_id = countries.id WHERE countries.continent = 'India' AND immunizations.age_group 5;,0 What was the minimum score for r2?,CREATE TABLE table_18812411_3 (r2 INTEGER);,SELECT MIN(r2) FROM table_18812411_3;,SELECT MIN(r2) FROM table_18812411_3;,1 Identify faculty members who have not received any research grants and their corresponding departments.,"CREATE TABLE faculty (id INT, name VARCHAR(50), department VARCHAR(20)); CREATE TABLE research_grants (faculty_id INT, grant_amount DECIMAL(10,2)); ","SELECT f.name, f.department FROM faculty f LEFT JOIN research_grants rg ON f.id = rg.faculty_id WHERE rg.grant_amount IS NULL;","SELECT f.name, f.department FROM faculty f INNER JOIN research_grants rg ON f.id = rg.faculty_id WHERE rg.grant_amount IS NULL;",0 What is the maximum and minimum number of materials used in public works projects?,"CREATE TABLE project_material_counts (id INT, project_type VARCHAR(255), material_count INT); ","SELECT MIN(material_count) as min_count, MAX(material_count) as max_count FROM project_material_counts;","SELECT MAX(material_count), MIN(material_count) FROM project_material_counts WHERE project_type = 'Public Works';",0 What years was soc a client?,"CREATE TABLE table_name_88 (years_of_operation VARCHAR, client VARCHAR);","SELECT years_of_operation FROM table_name_88 WHERE client = ""soc"";","SELECT years_of_operation FROM table_name_88 WHERE client = ""soc"";",1 "When the Total is less than 1, how many Bronze medals are won?","CREATE TABLE table_name_27 (bronze INTEGER, total INTEGER);",SELECT MIN(bronze) FROM table_name_27 WHERE total < 1;,SELECT SUM(bronze) FROM table_name_27 WHERE total 1;,0 What is the maximum number of containers handled in a single day by cranes in the Port of Long Beach in January 2021?,"CREATE TABLE Port_Long_Beach_Crane_Stats (crane_name TEXT, handling_date DATE, containers_handled INTEGER); ",SELECT MAX(containers_handled) FROM Port_Long_Beach_Crane_Stats WHERE handling_date >= '2021-01-01' AND handling_date <= '2021-01-31';,SELECT MAX(containers_handled) FROM Port_Long_Beach_Crane_Stats WHERE handling_date BETWEEN '2021-01-01' AND '2021-01-31';,0 I want the date with the venue of mcalpine stadium,"CREATE TABLE table_name_68 (date VARCHAR, venue VARCHAR);","SELECT date FROM table_name_68 WHERE venue = ""mcalpine stadium"";","SELECT date FROM table_name_68 WHERE venue = ""mcalpine stadium"";",1 What is the maximum revenue generated from any virtual tour conducted in Italy in the year 2022?,"CREATE TABLE italy_virtual_tours (id INT, year INT, revenue FLOAT); ",SELECT MAX(revenue) FROM italy_virtual_tours WHERE year = 2022;,SELECT MAX(revenue) FROM italy_virtual_tours WHERE year = 2022;,1 Which April has a Game of 84,"CREATE TABLE table_name_54 (april INTEGER, game VARCHAR);",SELECT MAX(april) FROM table_name_54 WHERE game = 84;,SELECT AVG(april) FROM table_name_54 WHERE game = 84;,0 How many garments made of recycled polyester were sold in the United States in the last year?,"CREATE TABLE RecycledPolyesterGarments (id INT PRIMARY KEY, production_date DATE, sale_date DATE, sale_location VARCHAR(20)); ","SELECT COUNT(*) FROM RecycledPolyesterGarments WHERE sale_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND sale_location = 'United States';","SELECT COUNT(*) FROM RecycledPolyesterGarments WHERE sale_location = 'United States' AND production_date >= DATEADD(year, -1, GETDATE());",0 Name the condition with platelet count of unaffected and bleeding time of unaffected with prothrombin time of prolonged and partial thromboplastin time of prolonged,"CREATE TABLE table_name_52 (condition VARCHAR, partial_thromboplastin_time VARCHAR, prothrombin_time VARCHAR, platelet_count VARCHAR, bleeding_time VARCHAR);","SELECT condition FROM table_name_52 WHERE platelet_count = ""unaffected"" AND bleeding_time = ""unaffected"" AND prothrombin_time = ""prolonged"" AND partial_thromboplastin_time = ""prolonged"";","SELECT condition FROM table_name_52 WHERE platelet_count = ""unaffected"" AND bleeding_time = ""unaffected"" AND prothrombin_time = ""prolonged"" AND partial_thromboplastin_time = ""prolonged"";",1 "What shows for traditional when the population was 44,803?","CREATE TABLE table_name_14 (traditional VARCHAR, population VARCHAR);","SELECT traditional FROM table_name_14 WHERE population = ""44,803"";","SELECT traditional FROM table_name_14 WHERE population = ""44,803"";",1 What was the method when the time was 1:01?,"CREATE TABLE table_name_51 (method VARCHAR, time VARCHAR);","SELECT method FROM table_name_51 WHERE time = ""1:01"";","SELECT method FROM table_name_51 WHERE time = ""1:01"";",1 Who directed episode number 179 in the series?,"CREATE TABLE table_2409041_9 (directed_by VARCHAR, no_in_series VARCHAR);",SELECT directed_by FROM table_2409041_9 WHERE no_in_series = 179;,SELECT directed_by FROM table_2409041_9 WHERE no_in_series = 179;,1 Name the cfl team for robert beveridge,"CREATE TABLE table_28059992_2 (cfl_team VARCHAR, player VARCHAR);","SELECT cfl_team FROM table_28059992_2 WHERE player = ""Robert Beveridge"";","SELECT cfl_team FROM table_28059992_2 WHERE player = ""Robert Beveridge"";",1 What is the average experience of counselors in Texas?,"CREATE TABLE counselors (id INT, name TEXT, specialization TEXT, experience INT, patients INT, state TEXT); ",SELECT AVG(experience) FROM counselors WHERE state = 'Texas';,SELECT AVG(experience) FROM counselors WHERE state = 'Texas';,1 What is the average number of followers for users who engaged with at least 10 advertisements in the past month?,"CREATE TABLE user_ads (user_id INT, ad_date DATE); CREATE TABLE users (id INT, followers INT);",SELECT AVG(f.followers) FROM users f JOIN (SELECT user_id FROM user_ads WHERE ad_date >= CURRENT_DATE - INTERVAL '1 month' GROUP BY user_id HAVING COUNT(*) >= 10) t ON f.id = t.user_id;,"SELECT AVG(users.followers) FROM users INNER JOIN user_ads ON users.id = user_ads.user_id WHERE user_ads.ad_date >= DATEADD(month, -1, GETDATE());",0 What is the round number for the venue of Stade de la Méditerranée?,"CREATE TABLE table_21311525_1 (round VARCHAR, venue VARCHAR);","SELECT round FROM table_21311525_1 WHERE venue = ""Stade de la Méditerranée"";","SELECT round FROM table_21311525_1 WHERE venue = ""Stade de la Méditerranée"";",1 What governments did the minister with a term start on 24 September 1984 have?,"CREATE TABLE table_name_43 (governments VARCHAR, term_start VARCHAR);","SELECT governments FROM table_name_43 WHERE term_start = ""24 september 1984"";","SELECT governments FROM table_name_43 WHERE term_start = ""24 september 1984"";",1 "What is the total number of trips taken on public transportation in Seoul, South Korea?","CREATE TABLE public_transportation_trips_seoul (trip_id INT, transportation_id INT, city VARCHAR(50), date DATE);","CREATE TABLE public_transportation_trips_seoul (trip_id INT, transportation_id INT, city VARCHAR(50), date DATE);",SELECT COUNT(*) FROM public_transportation_trips_seoul WHERE city = 'Seoul';,0 Find the total funding received by programs in the 'Arts Education' category.,"CREATE TABLE programs (program_id INT, program_name VARCHAR(50), program_category VARCHAR(50), funding_amount INT); ",SELECT SUM(funding_amount) FROM programs WHERE program_category = 'Arts Education';,SELECT SUM(funding_amount) FROM programs WHERE program_category = 'Arts Education';,1 wich spokesperson talked on luxembourg,"CREATE TABLE table_184803_4 (spokespersons VARCHAR, country VARCHAR);","SELECT spokespersons FROM table_184803_4 WHERE country = ""Luxembourg"";","SELECT spokespersons FROM table_184803_4 WHERE country = ""Luxembourg"";",1 What are the names of astronauts who have piloted spacecrafts produced by different companies?,"CREATE TABLE Astronauts (id INT, name VARCHAR(255), age INT); CREATE TABLE SpacecraftManufacturing (id INT, company VARCHAR(255), spacecraft VARCHAR(255)); CREATE TABLE SpacecraftPilots (id INT, astronaut_id INT, spacecraft VARCHAR(255));",SELECT DISTINCT Astronauts.name FROM Astronauts INNER JOIN SpacecraftPilots ON Astronauts.id = SpacecraftPilots.astronaut_id INNER JOIN SpacecraftManufacturing ON SpacecraftPilots.spacecraft = SpacecraftManufacturing.spacecraft GROUP BY Astronauts.name HAVING COUNT(DISTINCT SpacecraftManufacturing.company) > 1;,SELECT Astronauts.name FROM Astronauts INNER JOIN SpacecraftPilots ON Astronauts.id = SpacecraftPilots.astronaut_id INNER JOIN SpacecraftManufacturing ON SpacecraftPilots.spacecraft = SpacecraftManufacturing.spacecraft WHERE SpacecraftManufacturing.company = 'SpacecraftManufacturing';,0 How many properties are there in the 'affordable_housing' table for each city?,"CREATE TABLE affordable_housing (id INT, address VARCHAR(255), city VARCHAR(255), state VARCHAR(255)); ","SELECT city, COUNT(*) FROM affordable_housing GROUP BY city;","SELECT city, COUNT(*) FROM affordable_housing GROUP BY city;",1 "Delete records in the ""player_scores"" table where the score is below 500","CREATE TABLE player_scores (player_id INT, game_name VARCHAR(255), score INT, date DATE);",DELETE FROM player_scores WHERE score < 500;,DELETE FROM player_scores WHERE score 500;,0 How many authors or editors are there for the book title elf child?,"CREATE TABLE table_20193855_2 (author_s__or_editor_s_ VARCHAR, book_title VARCHAR);","SELECT COUNT(author_s__or_editor_s_) FROM table_20193855_2 WHERE book_title = ""Elf Child"";","SELECT COUNT(author_s__or_editor_s_) FROM table_20193855_2 WHERE book_title = ""Elf Child"";",1 Delete records of tourists who visited Europe in 2019.,"CREATE TABLE tourism_stats (country VARCHAR(255), year INT, visitors INT, continent VARCHAR(255)); ",DELETE FROM tourism_stats WHERE continent = 'Europe' AND year = 2019;,DELETE FROM tourism_stats WHERE year = 2019 AND continent = 'Europe';,0 What are the names and launch dates of all satellites launched by the European Space Agency?,"CREATE TABLE esa_satellites (id INT, name VARCHAR(255), launch_date DATE); ","SELECT name, launch_date FROM esa_satellites;","SELECT name, launch_date FROM esa_satellites;",1 What District has a Location of villupuram?,"CREATE TABLE table_name_53 (district VARCHAR, location VARCHAR);","SELECT district FROM table_name_53 WHERE location = ""villupuram"";","SELECT district FROM table_name_53 WHERE location = ""villupuram"";",1 Delete records of Carp species from the fish_species table,"CREATE TABLE fish_species (id INT PRIMARY KEY, species VARCHAR(255), scientific_name VARCHAR(255));",DELETE FROM fish_species WHERE species = 'Carp';,DELETE FROM fish_species WHERE species = 'Carp';,1 List all species and their conservation status from the 'arctic_biodiversity' and 'iucn_redlist' tables.,"CREATE TABLE arctic_biodiversity (species_id INT, species_name VARCHAR(255), population INT, region VARCHAR(255)); CREATE TABLE iucn_redlist (species_id INT, conservation_status VARCHAR(255));","SELECT a.species_name, r.conservation_status FROM arctic_biodiversity a INNER JOIN iucn_redlist r ON a.species_id = r.species_id;","SELECT a.species_name, i.conservation_status FROM arctic_biodiversity a INNER JOIN iucn_redlist i ON a.species_id = i.species_id;",0 What is the designation for the m.tech (e.c.e) qualification?,"CREATE TABLE table_name_86 (designation VARCHAR, qualification VARCHAR);","SELECT designation FROM table_name_86 WHERE qualification = ""m.tech (e.c.e)"";","SELECT designation FROM table_name_86 WHERE qualification = ""m.tech (e.c.e)"";",1 What is the maximum account balance for customers in London?,"CREATE TABLE customer (id INT, name VARCHAR(255), address VARCHAR(255), account_balance DECIMAL(10, 2)); ",SELECT MAX(account_balance) FROM customer WHERE address = 'London';,SELECT MAX(account_balance) FROM customer WHERE address = 'London';,1 "Update the ""score"" for the ""Amazon"" record in the ""social_impact_scores"" table to 80 for the year 2021","CREATE TABLE social_impact_scores (company TEXT, score INTEGER, year INTEGER); ",UPDATE social_impact_scores SET score = 80 WHERE company = 'Amazon' AND year = 2021;,UPDATE social_impact_scores SET score = 80 WHERE company = 'Amazon' AND year = 2021;,1 what is the region when the location is 49.7462°n 117.1419°w?,"CREATE TABLE table_name_96 (region VARCHAR, location VARCHAR);","SELECT region FROM table_name_96 WHERE location = ""49.7462°n 117.1419°w"";","SELECT region FROM table_name_96 WHERE location = ""49.7462°n 117.1419°w"";",1 "What is the sum of week number(s) had an attendance of 61,985?","CREATE TABLE table_name_95 (week VARCHAR, attendance VARCHAR);",SELECT COUNT(week) FROM table_name_95 WHERE attendance = 61 OFFSET 985;,"SELECT COUNT(week) FROM table_name_95 WHERE attendance = ""61,985"";",0 What is the 2010 Lukoil oil prodroduction when in 2009 oil production 21.662 million tonnes?,CREATE TABLE table_name_25 (Id VARCHAR);,"SELECT 2010 FROM table_name_25 WHERE 2009 = ""21.662"";","SELECT 2010 FROM table_name_25 WHERE 2009 = ""21.662 million tonnes"";",0 What is the moving from with a transfer and the nationality of Bra?,"CREATE TABLE table_name_22 (moving_from VARCHAR, type VARCHAR, nat VARCHAR);","SELECT moving_from FROM table_name_22 WHERE type = ""transfer"" AND nat = ""bra"";","SELECT moving_from FROM table_name_22 WHERE type = ""transfer"" AND nat = ""bra"";",1 What is the total number of art pieces donated by female artists in the last 5 years?,"CREATE TABLE ArtDonations (donation_date DATE, artist_gender VARCHAR(10), num_pieces INT); ","SELECT SUM(num_pieces) FROM ArtDonations WHERE artist_gender = 'Female' AND donation_date >= DATEADD(YEAR, -5, GETDATE());","SELECT SUM(num_pieces) FROM ArtDonations WHERE artist_gender = 'Female' AND donation_date >= DATEADD(year, -5, GETDATE());",0 Which periods have more than 3 excavation sites?,"CREATE TABLE ExcavationSites (site_id INT, site_name TEXT, period TEXT); ","SELECT period, COUNT(*) as num_sites FROM ExcavationSites GROUP BY period HAVING COUNT(*) > 3;",SELECT period FROM ExcavationSites GROUP BY period HAVING COUNT(*) > 3;,0 Which countries does the 'peacekeeping_operations' table contain data for?,"CREATE TABLE peacekeeping_operations (id INT PRIMARY KEY, country VARCHAR(100), start_date DATE, end_date DATE); ",SELECT DISTINCT country FROM peacekeeping_operations;,SELECT country FROM peacekeeping_operations;,0 What was the score when the series was 3-2?,"CREATE TABLE table_name_7 (score VARCHAR, series VARCHAR);","SELECT score FROM table_name_7 WHERE series = ""3-2"";","SELECT score FROM table_name_7 WHERE series = ""3-2"";",1 Calculate the average word count for articles in the Politics and Sports sections.,"CREATE TABLE articles_data (article_id INT, section VARCHAR(255), word_count INT); ","SELECT section, AVG(word_count) as avg_word_count FROM articles_data WHERE section IN ('Politics', 'Sports') GROUP BY section;","SELECT AVG(word_count) FROM articles_data WHERE section IN ('Politics', 'Sports');",0 "Who is the captain for the manufacturer Pony, and the manager Harry Redknapp?","CREATE TABLE table_name_59 (captain VARCHAR, kit_manufacturer VARCHAR, manager VARCHAR);","SELECT captain FROM table_name_59 WHERE kit_manufacturer = ""pony"" AND manager = ""harry redknapp"";","SELECT captain FROM table_name_59 WHERE kit_manufacturer = ""pony"" AND manager = ""harry redknapp"";",1 How many parties is Tom Foley a member of?,"CREATE TABLE table_1341568_48 (party VARCHAR, incumbent VARCHAR);","SELECT COUNT(party) FROM table_1341568_48 WHERE incumbent = ""Tom Foley"";","SELECT COUNT(party) FROM table_1341568_48 WHERE incumbent = ""Tom Foley"";",1 Find the recycling rate for the city of Rio de Janeiro in 2019,"CREATE TABLE recycling_rates (city VARCHAR(20), year INT, recycling_rate FLOAT);",SELECT recycling_rate FROM recycling_rates WHERE city = 'Rio de Janeiro' AND year = 2019;,SELECT recycling_rate FROM recycling_rates WHERE city = 'Rio de Janeiro' AND year = 2019;,1 What is the total quantity of coal mined by each mine in the North region?,"CREATE TABLE mines (id INT, name TEXT, region TEXT); CREATE TABLE coal_mine_stats (mine_id INT, year INT, quantity INT); ","SELECT m.name, SUM(c.quantity) as total_quantity FROM mines m JOIN coal_mine_stats c ON m.id = c.mine_id WHERE m.region = 'North' GROUP BY m.name;","SELECT mines.name, SUM(coal_mine_stats.quantity) FROM mines INNER JOIN coal_mine_stats ON mines.id = coal_mine_stats.mine_id WHERE mines.region = 'North' GROUP BY mines.name;",0 "Name the vacator for took seat being january 29, 1813","CREATE TABLE table_15572443_1 (vacator VARCHAR, took_seat VARCHAR);","SELECT vacator FROM table_15572443_1 WHERE took_seat = ""January 29, 1813"";","SELECT vacator FROM table_15572443_1 WHERE took_seat = ""January 29, 1813"";",1 What is the total data usage for each mobile plan by region?,"CREATE TABLE mobile_usage (usage_id INT, plan_id INT, region VARCHAR(255), data_used DECIMAL(10,2)); CREATE TABLE mobile_plans (plan_id INT, plan_name VARCHAR(255), data_limit DECIMAL(10,2)); ","SELECT plan_name, region, SUM(data_used) AS total_data_usage FROM mobile_plans INNER JOIN mobile_usage ON mobile_plans.plan_id = mobile_usage.plan_id GROUP BY plan_name, region;","SELECT m.region, SUM(m.data_used) as total_data_usage FROM mobile_usage m JOIN mobile_plans m ON m.plan_id = m.plan_id GROUP BY m.region;",0 How many drought impacts were reported for the Clear Water Plant in the month of January 2022?,"CREATE TABLE WastewaterTreatmentFacilities (FacilityID INT, FacilityName VARCHAR(255), Address VARCHAR(255), City VARCHAR(255), State VARCHAR(255), ZipCode VARCHAR(10)); CREATE TABLE DroughtImpact (ImpactID INT, FacilityID INT, ImpactDate DATE, ImpactDescription VARCHAR(255)); ",SELECT COUNT(*) FROM DroughtImpact WHERE FacilityID = 1 AND ImpactDate BETWEEN '2022-01-01' AND '2022-01-31';,SELECT COUNT(*) FROM DroughtImpact INNER JOIN WastewaterTreatmentFacilities ON DroughtImpact.FacilityID = WastewaterTreatmentFacilities.FacilityID WHERE FacilityName = 'Clear Water Plant' AND ImpactDate BETWEEN '2022-01-01' AND '2022-01-31';,0 The Empty House audiobook has what #?,"CREATE TABLE table_2950964_5 (_number VARCHAR, title VARCHAR);","SELECT _number FROM table_2950964_5 WHERE title = ""The Empty House"";","SELECT _number FROM table_2950964_5 WHERE title = ""The Empty House"";",1 What is the total amount of Shariah-compliant loans issued by the bank?,"CREATE TABLE shariah_loans (id INT PRIMARY KEY, customer_id INT, amount DECIMAL(10,2), date DATE);",SELECT SUM(amount) FROM shariah_loans;,SELECT SUM(amount) FROM shariah_loans;,1 "What is the average CO2 emission per MWh for each country, sorted by the highest average emission?","CREATE TABLE country (name VARCHAR(50), co2_emission_mwh DECIMAL(5,2)); ","SELECT name, AVG(co2_emission_mwh) OVER (PARTITION BY name) AS avg_emission FROM country ORDER BY avg_emission DESC;","SELECT name, AVG(co2_emission_mwh) as avg_co2_emission_per_MWh FROM country GROUP BY name ORDER BY avg_co2_emission_per_MWh DESC;",0 How many wins do the Red Deer Rebels have? ,"CREATE TABLE table_17751942_4 (wins INTEGER, team VARCHAR);","SELECT MAX(wins) FROM table_17751942_4 WHERE team = ""Red Deer Rebels"";","SELECT SUM(wins) FROM table_17751942_4 WHERE team = ""Red Deer Rebels"";",0 List the cybersecurity strategies in the 'cybersecurity_strategies' table and the respective strategy categories.,"CREATE TABLE cybersecurity_strategies (id INT, strategy_name VARCHAR(50), strategy_category VARCHAR(50)); ","SELECT strategy_name, strategy_category FROM cybersecurity_strategies;","SELECT strategy_name, strategy_category FROM cybersecurity_strategies;",1 "What's the lowest average for a swimsuit over 6.89, evening gown over 7.76, and an interview over 8.57 in illinois?","CREATE TABLE table_name_29 (average INTEGER, interview VARCHAR, state VARCHAR, swimsuit VARCHAR, evening_gown VARCHAR);","SELECT MIN(average) FROM table_name_29 WHERE swimsuit > 6.89 AND evening_gown > 7.76 AND state = ""illinois"" AND interview > 8.57;","SELECT MIN(average) FROM table_name_29 WHERE swimsuit > 6.89 AND evening_gown > 7.76 AND interview > 8.57 AND state = ""illinois"";",0 What is the score for set 2 when set 3 was 15–6?,"CREATE TABLE table_name_61 (set_2 VARCHAR, set_3 VARCHAR);","SELECT set_2 FROM table_name_61 WHERE set_3 = ""15–6"";","SELECT set_2 FROM table_name_61 WHERE set_3 = ""15–6"";",1 "In 1937, what was the finish?","CREATE TABLE table_name_37 (finish VARCHAR, year VARCHAR);","SELECT finish FROM table_name_37 WHERE year = ""1937"";",SELECT finish FROM table_name_37 WHERE year = 1937;,0 Display the lowest score for candidate Mir-Hossein Mousavi when candidate Mohsen Rezaee scored 44809 votes,"CREATE TABLE table_23390604_1 (mir_hossein_mousavi INTEGER, mohsen_rezaee VARCHAR);",SELECT MIN(mir_hossein_mousavi) FROM table_23390604_1 WHERE mohsen_rezaee = 44809;,SELECT MIN(mir_hossein_mousavi) FROM table_23390604_1 WHERE mohsen_rezaee = 44809;,1 "What are the details of the most recent cargo inspections, including the cargo type, vessel name, and inspection date?","CREATE TABLE cargo_inspections (inspection_id INT, cargo_id INT, vessel_id INT, inspection_date DATE); CREATE TABLE cargo (cargo_id INT, cargo_type VARCHAR(50)); CREATE TABLE vessels (vessel_id INT, vessel_name VARCHAR(100)); ","SELECT cargo.cargo_type, vessels.vessel_name, MAX(cargo_inspections.inspection_date) as latest_inspection_date FROM cargo_inspections INNER JOIN cargo ON cargo_inspections.cargo_id = cargo.cargo_id INNER JOIN vessels ON cargo_inspections.vessel_id = vessels.vessel_id GROUP BY cargo.cargo_type, vessels.vessel_name;","SELECT c.cargo_type, v.vessel_name, c.inspection_date FROM cargo_inspections c INNER JOIN cargo c ON c.cargo_id = c.cargo_id INNER JOIN vessels v ON c.vessel_id = v.vessel_id GROUP BY c.cargo_type, v.vessel_name ORDER BY c.inspection_date DESC LIMIT 1;",0 What date has 3 as the round (leg)?,"CREATE TABLE table_name_88 (date VARCHAR, round__leg_ VARCHAR);","SELECT date FROM table_name_88 WHERE round__leg_ = ""3"";","SELECT date FROM table_name_88 WHERE round__leg_ = ""3"";",1 What is the average attendance for home games?,"CREATE TABLE Teams (TeamID INT, TeamName VARCHAR(50)); CREATE TABLE Games (GameID INT, TeamID INT, HomeAway VARCHAR(5), Attendance INT); ","SELECT TeamID, AVG(Attendance) AS AvgHomeAttendance FROM Games WHERE HomeAway = 'Home' GROUP BY TeamID;",SELECT AVG(Attendance) FROM Games WHERE HomeAway = 'Home';,0 what is the number of lane with a rank more than 2 for Louise ørnstedt?,"CREATE TABLE table_name_86 (lane VARCHAR, rank VARCHAR, name VARCHAR);","SELECT COUNT(lane) FROM table_name_86 WHERE rank > 2 AND name = ""louise ørnstedt"";","SELECT COUNT(lane) FROM table_name_86 WHERE rank > 2 AND name = ""louise rnstedt"";",0 What is the to par for the 69-70-72=211 score?,"CREATE TABLE table_name_56 (to_par VARCHAR, score VARCHAR);",SELECT to_par FROM table_name_56 WHERE score = 69 - 70 - 72 = 211;,SELECT to_par FROM table_name_56 WHERE score = 69 - 70 - 72 = 211;,1 What is the nickname of the team that has the colors blue and gold?,"CREATE TABLE table_name_42 (nickname VARCHAR, colors VARCHAR);","SELECT nickname FROM table_name_42 WHERE colors = ""blue and gold"";","SELECT nickname FROM table_name_42 WHERE colors = ""blue and gold"";",1 "For each zip code, return how many times max wind speed reached 25?","CREATE TABLE weather (zip_code VARCHAR, max_wind_Speed_mph VARCHAR);","SELECT zip_code, COUNT(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code;","SELECT zip_code, COUNT(*) FROM weather WHERE max_wind_Speed_mph = 25 GROUP BY zip_code;",0 "Who is the player that has scored more than 0 league cup goals, but has than 13 total goals, and 4 league cup appearances total?","CREATE TABLE table_name_74 (name VARCHAR, league_cup_apps VARCHAR, league_cup_goals VARCHAR, total_goals VARCHAR);","SELECT name FROM table_name_74 WHERE league_cup_goals > 0 AND total_goals < 13 AND league_cup_apps = ""4"";",SELECT name FROM table_name_74 WHERE league_cup_goals > 0 AND total_goals > 13 AND league_cup_apps = 4;,0 Update the address of a customer in the 'customers' table,"CREATE TABLE customers (customer_id INT, first_name VARCHAR(255), last_name VARCHAR(255), email VARCHAR(255), address VARCHAR(255));","UPDATE customers SET address = '123 Maple Street, Apt. 4' WHERE customer_id = 1001;",UPDATE customers SET address = '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.,0 "Update the sustainable_sourcing table, setting the organic_certified flag to 1 where the country_of_origin is 'Spain'","CREATE TABLE sustainable_sourcing (ingredient_name VARCHAR(50), country_of_origin VARCHAR(50), organic_certified INT);",UPDATE sustainable_sourcing SET organic_certified = 1 WHERE country_of_origin = 'Spain';,UPDATE sustainable_sourcing SET organic_certified = 1 WHERE country_of_origin = 'Spain';,1 How many destinations are marketed by each destination marketing organization?,"CREATE TABLE dmo (id INT, name TEXT, region TEXT); CREATE TABLE dmo_markets (id INT, dmo_id INT, destination TEXT); ","SELECT dmo.name, COUNT(dmo_markets.destination) FROM dmo INNER JOIN dmo_markets ON dmo.id = dmo_markets.dmo_id GROUP BY dmo.name;","SELECT dmo.name, COUNT(dmo_markets.id) FROM dmo INNER JOIN dmo_markets ON dmo.id = dmo_markets.dmo_id GROUP BY dmo.name;",0 What is the total CO2 emission reduction in metric tons by project?,"CREATE TABLE co2_emission_reduction (id INT, project VARCHAR(255), reduction INT, reduction_unit VARCHAR(10));","SELECT project, SUM(reduction) as total_co2_reduction FROM co2_emission_reduction WHERE reduction_unit = 'metric tons' GROUP BY project HAVING total_co2_reduction > 1000;","SELECT project, SUM(reduction) as total_reduction FROM co2_emission_reduction GROUP BY project;",0 which number lists the production code as 2j5809,"CREATE TABLE table_27403436_1 (no VARCHAR, production_code VARCHAR);","SELECT no FROM table_27403436_1 WHERE production_code = ""2J5809"";","SELECT no FROM table_27403436_1 WHERE production_code = ""2J5809"";",1 Find the name and level of catalog structure with level between 5 and 10.,"CREATE TABLE Catalog_Structure (catalog_level_name VARCHAR, catalog_level_number INTEGER);","SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10;","SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10;",1 Insert new records into the 'wellness_trends' table for the month of January 2023 with a value of 50 for 'meditation_minutes',"CREATE TABLE wellness_trends (month VARCHAR(7), meditation_minutes INT, yoga_minutes INT);","INSERT INTO wellness_trends (month, meditation_minutes, yoga_minutes) VALUES ('January 2023', 50, 0);","INSERT INTO wellness_trends (month, meditation_minutes, yoga_minutes) VALUES ('January 2023', 50);",0 Show the average amount of transactions for different lots.,"CREATE TABLE TRANSACTIONS (transaction_id VARCHAR); CREATE TABLE Transactions_Lots (lot_id VARCHAR, transaction_id VARCHAR);","SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id;","SELECT T1.lot_id, AVG(T2.amount) FROM Transactions_Lots AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id;",0 What is the sum number of year when Call of Duty 4: Modern Warfare was the game?,"CREATE TABLE table_name_55 (year VARCHAR, game VARCHAR);","SELECT COUNT(year) FROM table_name_55 WHERE game = ""call of duty 4: modern warfare"";","SELECT COUNT(year) FROM table_name_55 WHERE game = ""call of duty 4: modern warfare"";",1 what is the number of animals by species in the 'animal_population' table?,"CREATE TABLE animal_population (species VARCHAR(50), population INT); ","SELECT species, SUM(population) FROM animal_population GROUP BY species;","SELECT species, SUM(population) FROM animal_population GROUP BY species;",1 What was Spring Creek School's area when the decile was 4?,"CREATE TABLE table_name_67 (area VARCHAR, decile VARCHAR, name VARCHAR);","SELECT area FROM table_name_67 WHERE decile = 4 AND name = ""spring creek school"";","SELECT area FROM table_name_67 WHERE decile = 4 AND name = ""spring creek school"";",1 What is the total inventory cost for the gluten-free items in the inventory?,"CREATE TABLE inventory (item_id INT, item_name TEXT, quantity INT, cost_per_unit DECIMAL(5,2), is_gluten_free BOOLEAN, region TEXT); ",SELECT SUM(quantity * cost_per_unit) as total_inventory_cost FROM inventory WHERE is_gluten_free = true;,SELECT SUM(cost_per_unit) FROM inventory WHERE is_gluten_free = true;,0 Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in.,"CREATE TABLE trained_in (physician VARCHAR, treatment VARCHAR); CREATE TABLE procedures (name VARCHAR, cost INTEGER); CREATE TABLE physician (employeeid VARCHAR, name VARCHAR); CREATE TABLE procedures (name VARCHAR, code VARCHAR);","SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = ""John Wen"";","SELECT T1.name FROM procedures AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN physician AS T3 ON T2.employeeid = T3.employeeid JOIN trained_in AS T4 ON T3.treatment = T4.treatment WHERE T4.cost 5000 AND T4.name = ""John Wen"";",0 What is the maximum miles per gallon of the car with 8 cylinders or produced before 1980 ?,"CREATE TABLE cars_data (mpg INTEGER, cylinders VARCHAR, year VARCHAR);",SELECT MAX(mpg) FROM cars_data WHERE cylinders = 8 OR year < 1980;,SELECT MAX(mpg) FROM cars_data WHERE cylinders = 8 AND year 1980;,0 What is the total energy consumption of green buildings in the 'green_buildings' table?,"CREATE TABLE green_buildings (building_id INT, city VARCHAR(255), energy_consumption FLOAT);",SELECT SUM(energy_consumption) FROM green_buildings WHERE city IN (SELECT city FROM (SELECT DISTINCT city FROM green_buildings) AS unique_cities);,SELECT SUM(energy_consumption) FROM green_buildings;,0 What is the total revenue for each supplier in 2022?,"CREATE TABLE suppliers (id INT PRIMARY KEY, name VARCHAR(255), country VARCHAR(255), sustainability_score INT); CREATE TABLE suppliers_revenue (supplier_id INT, year INT, revenue INT, PRIMARY KEY (supplier_id, year), FOREIGN KEY (supplier_id) REFERENCES suppliers(id));","SELECT suppliers.name, suppliers_revenue.revenue FROM suppliers JOIN suppliers_revenue ON suppliers.id = suppliers_revenue.supplier_id WHERE suppliers_revenue.year = 2022 GROUP BY suppliers.name;","SELECT s.name, SUM(sr.revenue) as total_revenue FROM suppliers s JOIN suppliers_revenue sr ON s.id = sr.supplier_id WHERE sr.year = 2022 GROUP BY s.name;",0 What is the fewest amendments sponsored associated with 150 bills originally cosponsored and over 247 bills cosponsored?,"CREATE TABLE table_name_52 (all_amendments_sponsored INTEGER, bills_originally_cosponsored VARCHAR, all_bills_cosponsored VARCHAR);",SELECT MIN(all_amendments_sponsored) FROM table_name_52 WHERE bills_originally_cosponsored = 150 AND all_bills_cosponsored > 247;,SELECT MIN(all_amendments_sponsored) FROM table_name_52 WHERE bills_originally_cosponsored = 150 AND all_bills_cosponsored > 247;,1 Which constructor was there for the race with 25 laps?,"CREATE TABLE table_name_31 (constructor VARCHAR, laps VARCHAR);",SELECT constructor FROM table_name_31 WHERE laps = 25;,SELECT constructor FROM table_name_31 WHERE laps = 25;,1 "List the unique economic diversification initiatives from the 'diversification_projects' table, excluding those that have a budget less than 25000 or are located in 'Asia'.","CREATE TABLE diversification_projects (id INT, initiative_name VARCHAR(50), budget INT, location VARCHAR(50)); ",SELECT DISTINCT initiative_name FROM diversification_projects WHERE budget > 25000 AND location != 'Asia';,SELECT DISTINCT initiative_name FROM diversification_projects WHERE budget 25000 AND location = 'Asia';,0 "How many space missions have been completed by each organization, with their respective success rates?","CREATE TABLE SpaceMissions (Id INT, Name VARCHAR(50), Organization VARCHAR(50), Year INT, Success BOOLEAN); ","SELECT Organization, COUNT(*) AS Total_Missions, SUM(Success) AS Successful_Missions, AVG(Success) AS Success_Rate FROM SpaceMissions GROUP BY Organization;","SELECT Organization, COUNT(*) as TotalMissions, SUM(Success) as TotalSuccess FROM SpaceMissions GROUP BY Organization;",0 Find the average number of papers in all AI safety conferences.,"CREATE TABLE aisafety_conferences (conference VARCHAR(255), num_papers INT); ",SELECT AVG(num_papers) FROM aisafety_conferences,SELECT AVG(num_papers) FROM aisafety_conferences;,0 Tell me the lowest pick number for columbus crew,"CREATE TABLE table_name_15 (pick__number INTEGER, mls_team VARCHAR);","SELECT MIN(pick__number) FROM table_name_15 WHERE mls_team = ""columbus crew"";","SELECT MIN(pick__number) FROM table_name_15 WHERE mls_team = ""columbus crew"";",1 What is the total weight of imported plant-based protein?,"CREATE TABLE imports (id INT, product TEXT, quantity INT, country TEXT); ","SELECT SUM(quantity) FROM imports WHERE product LIKE '%plant-based%' AND country NOT IN ('United States', 'Mexico');",SELECT SUM(quantity) FROM imports WHERE product = 'plant-based protein';,0 Name the series for april 30,"CREATE TABLE table_name_2 (series VARCHAR, date VARCHAR);","SELECT series FROM table_name_2 WHERE date = ""april 30"";","SELECT series FROM table_name_2 WHERE date = ""april 30"";",1 Who was in the South when EV Bad Wörishofen was in the West?,"CREATE TABLE table_name_10 (south VARCHAR, west VARCHAR);","SELECT south FROM table_name_10 WHERE west = ""ev bad wörishofen"";","SELECT south FROM table_name_10 WHERE west = ""ev bad wörishofen"";",1 What is the distribution of professional development course topics for teachers?,"CREATE TABLE course_topics (course_id INT, course_name VARCHAR(50), topic VARCHAR(50)); CREATE TABLE teacher_development_history (teacher_id INT, course_id INT, completion_date DATE); ","SELECT topic, COUNT(DISTINCT teacher_id) AS num_teachers FROM course_topics JOIN teacher_development_history ON course_topics.course_id = teacher_development_history.course_id GROUP BY topic;","SELECT course_topics.topic, COUNT(teacher_development_history.teacher_id) as num_topics FROM course_topics INNER JOIN teacher_development_history ON course_topics.course_id = teacher_development_history.course_id GROUP BY course_topics.topic;",0 What is the 3rd participle of the verb whose 2nd participle is band?,"CREATE TABLE table_1745843_5 (part_3 VARCHAR, part_2 VARCHAR);","SELECT part_3 FROM table_1745843_5 WHERE part_2 = ""band"";","SELECT part_3 FROM table_1745843_5 WHERE part_2 = ""Band"";",0 "What is the weight(lbs) when born is april 6, 1954 detroit, mi?","CREATE TABLE table_1198175_1 (weight_lbs_ VARCHAR, born VARCHAR);","SELECT weight_lbs_ FROM table_1198175_1 WHERE born = ""April 6, 1954 Detroit, MI"";","SELECT weight_lbs_ FROM table_1198175_1 WHERE born = ""April 6, 1954 Detroit, MI"";",1 "What is the total number of military technology patents filed by each country in the last 5 years, and what are the names of those technologies?","CREATE TABLE military_tech_patents (id INT, country VARCHAR(50), tech VARCHAR(50), year INT, patent_number INT); ","SELECT country, tech, SUM(patent_number) as total_patents FROM military_tech_patents WHERE year BETWEEN 2017 AND 2021 GROUP BY country, tech;","SELECT country, tech, SUM(patent_number) as total_patents FROM military_tech_patents WHERE year >= YEAR(CURRENT_DATE) - 5 GROUP BY country, tech;",0 Which states have renewable electricity equal to 9667 (gw×h)?,"CREATE TABLE table_25244412_1 (state VARCHAR, renewable_electricity__gw•h_ VARCHAR);",SELECT state FROM table_25244412_1 WHERE renewable_electricity__gw•h_ = 9667;,"SELECT state FROM table_25244412_1 WHERE renewable_electricity__gw•h_ = ""9667 (gwh)"";",0 "How many artifacts were found in the last 3 months, categorized by excavation site and artifact type?","CREATE TABLE Dates (DateID INT, ExcavationDate DATE); CREATE TABLE ArtifactsDates (ArtifactID INT, DateID INT); ","SELECT Dates.ExcavationDate, Sites.SiteName, Artifacts.ArtifactName, COUNT(ArtifactsDates.ArtifactID) AS Quantity FROM Dates INNER JOIN ArtifactsDates ON Dates.DateID = ArtifactsDates.DateID INNER JOIN Artifacts ON ArtifactsDates.ArtifactID = Artifacts.ArtifactID INNER JOIN Sites ON Artifacts.SiteID = Sites.SiteID WHERE Dates.ExcavationDate >= DATEADD(month, -3, GETDATE()) GROUP BY Dates.ExcavationDate, Sites.SiteName, Artifacts.ArtifactName;","SELECT ExcavationSite, ArtifactType, COUNT(*) FROM ArtifactsDates JOIN Dates ON ArtifactsDates.DateID = Dates.DateID WHERE Dates.ExcavationDate >= DATEADD(month, -3, GETDATE()) GROUP BY ExcavationSite, ArtifactType;",0 Which vulnerabilities were reported after a specific date in the 'vulnerabilities' table?,"CREATE TABLE vulnerabilities (id INT, name VARCHAR(255), severity VARCHAR(50), reported_date DATE);",SELECT * FROM vulnerabilities WHERE reported_date > '2022-01-01';,"SELECT name FROM vulnerabilities WHERE reported_date > (SELECT DATE_FORMAT(reported_date, '%Y-%m') FROM vulnerabilities);",0 "What is the total number of animals in the 'animal_population' table, grouped by species, that were part of community education programs?","CREATE TABLE animal_population (animal_id INT, species VARCHAR(50), num_animals INT, education_program BOOLEAN);","SELECT species, SUM(num_animals) FROM animal_population WHERE education_program = TRUE GROUP BY species;","SELECT species, SUM(num_animals) FROM animal_population WHERE education_program = TRUE GROUP BY species;",1 Which fair trade certified factories have produced the fewest garments in the last year?,"CREATE TABLE FairTradeProduction (id INT, factory_id INT, num_garments INT, production_date DATE); CREATE TABLE FairTradeFactories (id INT, factory_name TEXT); ","SELECT f.factory_name, SUM(p.num_garments) FROM FairTradeProduction p JOIN FairTradeFactories f ON p.factory_id = f.id GROUP BY p.factory_id ORDER BY SUM(p.num_garments) ASC;","SELECT FairTradeFactories.factory_name, MIN(FairTradeProduction.num_garments) as min_garments FROM FairTradeProduction INNER JOIN FairTradeFactories ON FairTradeProduction.factory_id = FairTradeFactories.id WHERE FairTradeProduction.production_date >= DATEADD(year, -1, GETDATE()) GROUP BY FairTradeProduction.factory_name ORDER BY min_garments DESC;",0 What is the lowest Grid with fewer than 65 Laps and with Driver Tim Schenken?,"CREATE TABLE table_name_32 (grid INTEGER, laps VARCHAR, driver VARCHAR);","SELECT MIN(grid) FROM table_name_32 WHERE laps < 65 AND driver = ""tim schenken"";","SELECT MIN(grid) FROM table_name_32 WHERE laps 65 AND driver = ""tim schenken"";",0 List the number of renewable energy projects for each type in 'Canada',"CREATE TABLE RenewableEnergyProjects (id INT, project_name VARCHAR(100), project_type VARCHAR(50), city VARCHAR(50), country VARCHAR(50), capacity INT);","SELECT project_type, COUNT(*) FROM RenewableEnergyProjects WHERE country = 'Canada' GROUP BY project_type;","SELECT project_type, COUNT(*) FROM RenewableEnergyProjects WHERE country = 'Canada' GROUP BY project_type;",1 what is the college for keenan robinson when overall is more than 102?,"CREATE TABLE table_name_55 (college VARCHAR, overall VARCHAR, name VARCHAR);","SELECT college FROM table_name_55 WHERE overall > 102 AND name = ""keenan robinson"";","SELECT college FROM table_name_55 WHERE overall > 102 AND name = ""joinan robinson"";",0 Calculate the maximum temperature difference between consecutive days for 'Field_8' in the 'temperature_data' table.,"CREATE TABLE temperature_data (field VARCHAR(255), temperature FLOAT, timestamp TIMESTAMP);","SELECT field, MAX(temperature - LAG(temperature) OVER (PARTITION BY field ORDER BY timestamp)) as max_diff FROM temperature_data WHERE field = 'Field_8';",SELECT MAX(temperature) - (SELECT MAX(temperature) FROM temperature_data WHERE field = 'Field_8') FROM temperature_data WHERE field = 'Field_8';,0 What is the average attendance against the expos?,"CREATE TABLE table_name_57 (attendance INTEGER, opponent VARCHAR);","SELECT AVG(attendance) FROM table_name_57 WHERE opponent = ""expos"";","SELECT AVG(attendance) FROM table_name_57 WHERE opponent = ""expos"";",1 List the number of products in each subcategory of makeup.,"CREATE TABLE makeup_products (product_id INTEGER, product_subcategory VARCHAR(20)); ","SELECT product_subcategory, COUNT(*) FROM makeup_products GROUP BY product_subcategory;","SELECT product_subcategory, COUNT(*) FROM makeup_products GROUP BY product_subcategory;",1 Who is the captain of the 2012 NRL season competition?,"CREATE TABLE table_name_75 (captain_s_ VARCHAR, competition VARCHAR);","SELECT captain_s_ FROM table_name_75 WHERE competition = ""2012 nrl season"";","SELECT captain_s_ FROM table_name_75 WHERE competition = ""2012 nrl season"";",1 "How many episodes were released on DVD in the US on October 13, 2009?","CREATE TABLE table_14855908_3 (episodes VARCHAR, region_1__us_ VARCHAR);","SELECT episodes FROM table_14855908_3 WHERE region_1__us_ = ""October 13, 2009"";","SELECT COUNT(episodes) FROM table_14855908_3 WHERE region_1__us_ = ""October 13, 2009"";",0 What is the average sale value of military equipment sales to Indonesia and Malaysia combined from 2017 to 2020?,"CREATE TABLE MilitaryEquipmentSales (id INT PRIMARY KEY, sale_year INT, equipment_type VARCHAR(50), country VARCHAR(50), sale_value FLOAT); ",SELECT AVG(sale_value) FROM MilitaryEquipmentSales WHERE (country = 'Indonesia' OR country = 'Malaysia') AND sale_year BETWEEN 2017 AND 2020;,"SELECT AVG(sale_value) FROM MilitaryEquipmentSales WHERE country IN ('Indonesia', 'Malaysia') AND sale_year BETWEEN 2017 AND 2020;",0 What is the mental health score of the student with the highest ID who has not participated in open pedagogy?,"CREATE TABLE students (student_id INT, mental_health_score INT, participated_in_open_pedagogy BOOLEAN); ",SELECT mental_health_score FROM students WHERE student_id = (SELECT MAX(student_id) FROM students WHERE participated_in_open_pedagogy = FALSE);,SELECT MAX(mental_health_score) FROM students WHERE participated_in_open_pedagogy = FALSE;,0 "For the constellation scorpius and object of planetary nebula, what was the declination (J2000)?","CREATE TABLE table_name_53 (declination___j2000__ VARCHAR, constellation VARCHAR, object_type VARCHAR);","SELECT declination___j2000__ FROM table_name_53 WHERE constellation = ""scorpius"" AND object_type = ""planetary nebula"";","SELECT declination___j2000__ FROM table_name_53 WHERE constellation = ""scorpius"" AND object_type = ""planetary nebula"";",1 Find volunteers who have donated more than the average donation amount.,"CREATE TABLE volunteer_donations (volunteer_id INT, donation DECIMAL(10, 2)); ",SELECT DISTINCT volunteers.name FROM volunteers JOIN volunteer_donations ON volunteers.id = volunteer_donations.volunteer_id WHERE volunteer_donations.donation > (SELECT AVG(donation) FROM volunteer_donations);,"SELECT volunteer_id, donation FROM volunteer_donations WHERE donation > (SELECT AVG(donation) FROM volunteer_donations);",0 Which Ratio has a Similar ISO A size of a3?,"CREATE TABLE table_name_76 (ratio INTEGER, similar_iso_a_size VARCHAR);","SELECT AVG(ratio) FROM table_name_76 WHERE similar_iso_a_size = ""a3"";","SELECT SUM(ratio) FROM table_name_76 WHERE similar_iso_a_size = ""a3"";",0 "I want the constructor for winning driver of jim clark, pole position of graham hill and dutch grand prix","CREATE TABLE table_name_34 (constructor VARCHAR, race VARCHAR, winning_driver VARCHAR, pole_position VARCHAR);","SELECT constructor FROM table_name_34 WHERE winning_driver = ""jim clark"" AND pole_position = ""graham hill"" AND race = ""dutch grand prix"";","SELECT constructor FROM table_name_34 WHERE winning_driver = ""jim clark"" AND pole_position = ""graham hill"" AND race = ""dutch grand prix"";",1 Which Fencing Victories (pts) has a Shooting Score (pts) of 187 (1180) and a Total smaller than 5640? Question 1,"CREATE TABLE table_name_61 (fencing_victories__pts_ VARCHAR, shooting_score__pts_ VARCHAR, total VARCHAR);","SELECT fencing_victories__pts_ FROM table_name_61 WHERE shooting_score__pts_ = ""187 (1180)"" AND total < 5640;","SELECT fencing_victories__pts_ FROM table_name_61 WHERE shooting_score__pts_ = ""187 (1180)"" AND total 5640;",0 What is the total revenue for each menu category in restaurant H for the month of July 2021?,"CREATE TABLE Restaurants (RestaurantID int, Name varchar(50));CREATE TABLE Menus (MenuID int, RestaurantID int, MenuCategory varchar(50), TotalRevenue decimal(10,2));","SELECT M.MenuCategory, SUM(M.TotalRevenue) as TotalRevenuePerCategory FROM Menus M INNER JOIN Restaurants R ON M.RestaurantID = R.RestaurantID WHERE R.Name = 'H' AND MONTH(M.OrderDate) = 7 AND YEAR(M.OrderDate) = 2021 GROUP BY M.MenuCategory;","SELECT m.MenuCategory, SUM(m.TotalRevenue) as TotalRevenue FROM Menus m JOIN Restaurants r ON m.RestaurantID = r.RestaurantID WHERE r.Name = 'Restaurant H' AND m.Month = 7 GROUP BY m.MenuCategory;",0 What are the top 5 cruelty-free certified products with the highest sales revenue?,"CREATE TABLE product_sales (product_id INT, revenue FLOAT, is_cruelty_free BOOLEAN); ","SELECT product_id, revenue FROM product_sales WHERE is_cruelty_free = true ORDER BY revenue DESC LIMIT 5;","SELECT product_id, revenue FROM product_sales WHERE is_cruelty_free = true ORDER BY revenue DESC LIMIT 5;",1 When were the Brewers 27-31?,"CREATE TABLE table_name_43 (date VARCHAR, record VARCHAR);","SELECT date FROM table_name_43 WHERE record = ""27-31"";","SELECT date FROM table_name_43 WHERE record = ""27-31"";",1 what type of organization is sigma phi omega?,"CREATE TABLE table_2538117_2 (type VARCHAR, organization VARCHAR);","SELECT type FROM table_2538117_2 WHERE organization = ""Sigma Phi Omega"";","SELECT type FROM table_2538117_2 WHERE organization = ""Sigma Phi Omega"";",1 What is the fewest losses that Ballarat FL of Lake Wendouree has when the wins are smaller than 9?,"CREATE TABLE table_name_9 (losses INTEGER, ballarat_fl VARCHAR, wins VARCHAR);","SELECT MIN(losses) FROM table_name_9 WHERE ballarat_fl = ""lake wendouree"" AND wins < 9;","SELECT MIN(losses) FROM table_name_9 WHERE ballarat_fl = ""lake wendouree"" AND wins 9;",0 Find the top 3 countries with the highest average soil temperature in May.,"CREATE TABLE WeatherStats (id INT, country VARCHAR(50), month VARCHAR(10), avg_temp DECIMAL(5,2)); ","SELECT country, AVG(avg_temp) as AvgTemp FROM WeatherStats WHERE month = 'May' GROUP BY country ORDER BY AvgTemp DESC LIMIT 3;","SELECT country, AVG(avg_temp) as avg_temp FROM WeatherStats WHERE month = 'May' GROUP BY country ORDER BY avg_temp DESC LIMIT 3;",0 "How many unique species of mammals are present in the 'arctic_mammals' table, with a population greater than 1000?","CREATE TABLE arctic_mammals (species VARCHAR(50), population INT);",SELECT COUNT(DISTINCT species) FROM arctic_mammals WHERE population > 1000;,SELECT COUNT(DISTINCT species) FROM arctic_mammals WHERE population > 1000;,1 Delete all records from the 'suppliers' table where the 'certification' is 'None' and the 'country' is 'China',"CREATE TABLE suppliers(id INT, name VARCHAR(255), country VARCHAR(255), certification VARCHAR(255)); ",DELETE FROM suppliers WHERE certification = 'None' AND country = 'China';,DELETE FROM suppliers WHERE certification = 'None' AND country = 'China';,1 What are the distinct grant amount for the grants where the documents were sent before '1986-08-26 20:49:27' and grant were ended after '1989-03-16 18:27:16'?,"CREATE TABLE grants (grant_amount VARCHAR, grant_end_date INTEGER); CREATE TABLE Grants (grant_amount VARCHAR, grant_id VARCHAR); CREATE TABLE Documents (grant_id VARCHAR, sent_date INTEGER);",SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16';,SELECT DISTINCT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date '1986-08-26 20:49:27' AND T2.grant_end_date > '1989-03-16 18:27:16';,0 "What season has a league 3rd liga, and away of 1-0?","CREATE TABLE table_name_89 (season VARCHAR, league VARCHAR, away VARCHAR);","SELECT season FROM table_name_89 WHERE league = ""3rd liga"" AND away = ""1-0"";","SELECT season FROM table_name_89 WHERE league = ""3rd liga"" AND away = ""1-0"";",1 List all restaurants that have a sustainable sourcing certification.,"CREATE TABLE restaurant (restaurant_id INT, sustainable_sourcing BOOLEAN); ",SELECT restaurant_id FROM restaurant WHERE sustainable_sourcing = true;,SELECT restaurant_id FROM restaurant WHERE sustainable_sourcing = TRUE;,0 What was the value of 1st prize when the score was 271 (-9)?,CREATE TABLE table_15346009_1 (score VARCHAR);,"SELECT 1 AS st_prize__$__ FROM table_15346009_1 WHERE score = ""271 (-9)"";","SELECT 1 AS st_prize FROM table_15346009_1 WHERE score = ""271 (-9)"";",0 Method of submission (chin in the eye) had what opponent?,"CREATE TABLE table_name_93 (opponent VARCHAR, method VARCHAR);","SELECT opponent FROM table_name_93 WHERE method = ""submission (chin in the eye)"";","SELECT opponent FROM table_name_93 WHERE method = ""submission (chin in the eye)"";",1 List the top 3 smart city initiatives by annual budget in descending order.,"CREATE TABLE smart_city_initiatives (initiative_id INT, initiative_name VARCHAR(100), annual_budget FLOAT); ","SELECT initiative_name, annual_budget FROM (SELECT initiative_name, annual_budget, ROW_NUMBER() OVER (ORDER BY annual_budget DESC) rn FROM smart_city_initiatives) WHERE rn <= 3","SELECT initiative_name, annual_budget FROM smart_city_initiatives ORDER BY annual_budget DESC LIMIT 3;",0 What is the total cargo weight handled by each ship in the fleet?,"CREATE TABLE ships (ship_id INT, ship_name VARCHAR(255), registration_date DATE); CREATE TABLE cargo (cargo_id INT, ship_id INT, weight FLOAT, handling_date DATE); ","SELECT s.ship_name, SUM(c.weight) as total_weight FROM ships s JOIN cargo c ON s.ship_id = c.ship_id GROUP BY s.ship_id;","SELECT s.ship_name, SUM(c.weight) as total_weight FROM ships s JOIN cargo c ON s.ship_id = c.ship_id GROUP BY s.ship_name;",0 What is the recycling rate in Germany?,"CREATE TABLE recycling_rates (country VARCHAR(255), recycling_rate FLOAT); ",SELECT recycling_rate FROM recycling_rates WHERE country = 'Germany';,SELECT recycling_rate FROM recycling_rates WHERE country = 'Germany';,1 How many farmers are from Springfield?,"CREATE TABLE farmers (farmer_id INT PRIMARY KEY, name VARCHAR(255), age INT, location VARCHAR(255)); ",SELECT COUNT(*) FROM farmers WHERE location = 'Springfield';,SELECT COUNT(*) FROM farmers WHERE location = 'Springfield';,1 What is the production rate for the well with the second highest production rate?,"CREATE TABLE wells (well_id INT, well_type VARCHAR(10), location VARCHAR(20), production_rate FLOAT); ","SELECT production_rate FROM (SELECT well_id, well_type, location, production_rate, ROW_NUMBER() OVER (ORDER BY production_rate DESC) rn FROM wells) t WHERE rn = 2;",SELECT production_rate FROM wells WHERE well_type = 'Well' ORDER BY production_rate DESC LIMIT 2;,0 How many player with total points of 75,"CREATE TABLE table_14342367_15 (player VARCHAR, total_points VARCHAR);",SELECT COUNT(player) FROM table_14342367_15 WHERE total_points = 75;,SELECT COUNT(player) FROM table_14342367_15 WHERE total_points = 75;,1 How many donors have donated in the last month and have a lifetime donation amount of over $1000?,"CREATE TABLE Donors (DonorID int, DonorName varchar(50), DonationDate date, LifetimeDonations decimal(10,2));","SELECT DonorID, DonorName FROM Donors WHERE DonationDate > DATE_SUB(CURDATE(), INTERVAL 1 MONTH) AND LifetimeDonations > 1000;","SELECT COUNT(DISTINCT DonorID) FROM Donors WHERE DonationDate >= DATEADD(month, -1, GETDATE()) AND LifetimeDonations > 1000;",0 What is the nature of the incident that's a bomb attack?,"CREATE TABLE table_name_69 (nature_of_incident VARCHAR, circumstances VARCHAR);","SELECT nature_of_incident FROM table_name_69 WHERE circumstances = ""bomb attack"";","SELECT nature_of_incident FROM table_name_69 WHERE circumstances = ""bomb attack"";",1 Who won when robert kudelski finished with under 13 weeks?,"CREATE TABLE table_name_89 (winner VARCHAR, _number_of_weeks VARCHAR, third_place VARCHAR);","SELECT winner FROM table_name_89 WHERE _number_of_weeks < 13 AND third_place = ""robert kudelski"";","SELECT winner FROM table_name_89 WHERE _number_of_weeks 13 AND third_place = ""robert kudelski"";",0 What is the average impact score for companies in the Technology sector?,"CREATE TABLE companies (id INT, name TEXT, sector TEXT, impact_score FLOAT); ",SELECT AVG(impact_score) FROM companies WHERE sector = 'Technology';,SELECT AVG(impact_score) FROM companies WHERE sector = 'Technology';,1 What bridges were built using design standards from the Transportation Agency of Asia (TAA)?,"CREATE TABLE DesignStandard (id INT, standard VARCHAR(50), description TEXT); ","INSERT INTO Infrastructure (id, name, location, type) SELECT 2, 'Bridge 2', 'Country D', 'Steel' FROM DesignStandard WHERE DesignStandard.standard = 'TAA';",SELECT * FROM DesignStandard WHERE standard = 'TAA';,0 What is the average project timeline for residential buildings in Los Angeles?,"CREATE TABLE project_timeline (timeline_id INT, project_id INT, building_type VARCHAR(20), city VARCHAR(20), days INT); ",SELECT AVG(days) FROM project_timeline WHERE building_type = 'Residential' AND city = 'Los Angeles';,SELECT AVG(days) FROM project_timeline WHERE building_type = 'Residential' AND city = 'Los Angeles';,1 Find policyholders who have never made a claim,"CREATE TABLE policyholders (policyholder_id INT, name VARCHAR(50)); CREATE TABLE policies (policy_id INT, policyholder_id INT, category VARCHAR(10)); CREATE TABLE claims (claim_id INT, policy_id INT, amount DECIMAL(10, 2)); ",SELECT policyholders.name FROM policyholders LEFT JOIN claims ON policies.policy_id = claims.policy_id WHERE claims.claim_id IS NULL;,SELECT p.name FROM policyholders p JOIN policies p ON p.policyholder_id = p.policyholder_id JOIN claims c ON p.policy_id = c.policy_id WHERE c.claim_id IS NULL;,0 Which restorative practices are available across all legal aid providers in the 'legal_aid_practices' table?,"CREATE TABLE legal_aid_practices (provider_id INT, practice_id INT); CREATE TABLE restorative_practices (practice_id INT, practice VARCHAR(255));",SELECT practice FROM restorative_practices WHERE practice_id IN (SELECT practice_id FROM legal_aid_practices GROUP BY practice_id HAVING COUNT(DISTINCT provider_id) = (SELECT COUNT(DISTINCT provider_id) FROM legal_aid_practices));,SELECT restorative_practices.practice FROM legal_aid_practices INNER JOIN restorative_practices ON legal_aid_practices.practice_id = restorative_practices.practice_id;,0 Which aircraft models were manufactured by AvionicCorp in the US?,"CREATE TABLE AircraftModels (model_id INT, name VARCHAR(50), manufacturer VARCHAR(50), country VARCHAR(50)); ",SELECT name FROM AircraftModels WHERE manufacturer = 'AvionicCorp' AND country = 'USA';,SELECT name FROM AircraftModels WHERE manufacturer = 'AvionicCorp' AND country = 'USA';,1 What's the maximal L3 cache for any of the models given?,CREATE TABLE table_269920_3 (l2_cache__mb_ INTEGER);,SELECT MAX(l2_cache__mb_) FROM table_269920_3;,SELECT MAX(l2_cache__mb_) FROM table_269920_3;,1 Find bridges that are longer than any bridge in New York.,"CREATE TABLE Bridges (name TEXT, length FLOAT, location TEXT);",SELECT name FROM Bridges WHERE length > (SELECT MAX(length) FROM Bridges WHERE location = 'New York');,SELECT name FROM Bridges WHERE length > (SELECT MAX(length) FROM Bridges WHERE location = 'New York');,1 What is the total number of players who have not participated in any esports events and are from Africa or Oceania?,"CREATE TABLE Players (PlayerID INT, PlayerName VARCHAR(50), Country VARCHAR(50)); CREATE TABLE EsportsEvents (EventID INT, PlayerID INT, EventName VARCHAR(50)); ","(SELECT COUNT(*) FROM Players WHERE Players.Country IN ('Africa', 'Oceania') EXCEPT SELECT COUNT(*) FROM Players JOIN EsportsEvents ON Players.PlayerID = EsportsEvents.PlayerID)","SELECT COUNT(DISTINCT Players.PlayerID) FROM Players INNER JOIN EsportsEvents ON Players.PlayerID = EsportsEvents.PlayerID WHERE Players.Country IN ('Africa', 'Oceania');",0 What is the Record when the high rebounds was Antonio Davis (9)?,"CREATE TABLE table_name_5 (record VARCHAR, high_rebounds VARCHAR);","SELECT record FROM table_name_5 WHERE high_rebounds = ""antonio davis (9)"";","SELECT record FROM table_name_5 WHERE high_rebounds = ""antonio davis (9)"";",1 Which unions have collective bargaining agreements expiring in 2023?,"CREATE TABLE unions (id INT, name TEXT, cba_expiration_year INT); ",SELECT name FROM unions WHERE cba_expiration_year = 2023;,SELECT name FROM unions WHERE cba_expiration_year = 2023;,1 Show the total number of movies in each content category in the database.,"CREATE TABLE ContentCategories (MovieID INT, ContentCategory TEXT); CREATE TABLE Movies (MovieID INT, DirectorID INT); ","SELECT ContentCategory, COUNT(*) as Total FROM ContentCategories GROUP BY ContentCategory;","SELECT ContentCategories.ContentCategory, COUNT(*) FROM ContentCategories INNER JOIN Movies ON ContentCategories.MovieID = Movies.MovieID GROUP BY ContentCategories.ContentCategory;",0 What's the release date of Forward March Hare?,"CREATE TABLE table_name_10 (release_date VARCHAR, title VARCHAR);","SELECT release_date FROM table_name_10 WHERE title = ""forward march hare"";","SELECT release_date FROM table_name_10 WHERE title = ""forward march hare"";",1 Find the total number of vulnerabilities found in each system during the last quarter.,"CREATE TABLE vulnerabilities (id INT, system_name VARCHAR(50), vulnerability_type VARCHAR(50), timestamp TIMESTAMP); ","SELECT system_name, COUNT(*) as total_vulnerabilities FROM vulnerabilities WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP(), INTERVAL 3 MONTH) GROUP BY system_name;","SELECT system_name, COUNT(*) as total_vulnerabilities FROM vulnerabilities WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 MONTH) GROUP BY system_name;",0 "What is the total water conservation initiatives by region in 2020 and 2021, including both education and technology initiatives?","CREATE TABLE water_conservation (region VARCHAR(255), year INT, education_initiatives INT, technology_initiatives INT); ","SELECT region, year, (education_initiatives + technology_initiatives) as total_initiatives FROM water_conservation GROUP BY region, year;","SELECT region, SUM(education_initiatives) as total_initiatives FROM water_conservation WHERE year IN (2020, 2021) GROUP BY region;",0 Who are the rowers for Australia?,"CREATE TABLE table_name_54 (rowers VARCHAR, country VARCHAR);","SELECT rowers FROM table_name_54 WHERE country = ""australia"";","SELECT rowers FROM table_name_54 WHERE country = ""australia"";",1 Which Overall is the lowest one that has a Round of 3?,"CREATE TABLE table_name_87 (overall INTEGER, round VARCHAR);",SELECT MIN(overall) FROM table_name_87 WHERE round = 3;,SELECT MIN(overall) FROM table_name_87 WHERE round = 3;,1 "For each wildlife habitat, determine the average area between 2017 and 2019 and rank them in descending order of average area.","CREATE TABLE wildlife_habitats_2 (habitat_id INT, habitat_name VARCHAR(50), year INT, area INT); ","SELECT habitat_name, AVG(area) AS avg_area, RANK() OVER (ORDER BY AVG(area) DESC) AS area_rank FROM wildlife_habitats_2 GROUP BY habitat_name;","SELECT habitat_name, AVG(area) as avg_area FROM wildlife_habitats_2 WHERE year BETWEEN 2017 AND 2019 GROUP BY habitat_name ORDER BY avg_area DESC;",0 Identify community health workers with more than 10 years of experience,"CREATE TABLE community_health_workers (id INT, name VARCHAR(50), region VARCHAR(50), years_of_experience INT);",SELECT community_health_workers.name FROM community_health_workers WHERE community_health_workers.years_of_experience > 10;,SELECT name FROM community_health_workers WHERE years_of_experience > 10;,0 What finish has +21 as the to par?,"CREATE TABLE table_name_35 (finish VARCHAR, to_par VARCHAR);","SELECT finish FROM table_name_35 WHERE to_par = ""+21"";","SELECT finish FROM table_name_35 WHERE to_par = ""+21"";",1 How many people attended when opponent was twins?,"CREATE TABLE table_name_80 (attendance VARCHAR, opponent VARCHAR);","SELECT COUNT(attendance) FROM table_name_80 WHERE opponent = ""twins"";","SELECT attendance FROM table_name_80 WHERE opponent = ""twins"";",0 "What is the average word count of articles in the 'international' category, grouped by region?","CREATE TABLE categories (id INT, name TEXT); CREATE TABLE articles (id INT, title TEXT, content TEXT, category_id INT, region_id INT); ","SELECT regions.name, AVG(LENGTH(articles.content) - LENGTH(REPLACE(articles.content, ' ', '')) + 1) as average_word_count FROM categories INNER JOIN articles ON categories.id = articles.category_id INNER JOIN regions ON regions.id = articles.region_id WHERE categories.name = 'International' GROUP BY regions.name;","SELECT c.name, AVG(a.content) as avg_word_count FROM articles a JOIN categories c ON a.category_id = c.id WHERE c.name = 'international' GROUP BY c.name;",0 Which competition was held on 14 November 2012?,"CREATE TABLE table_name_41 (competition VARCHAR, date VARCHAR);","SELECT competition FROM table_name_41 WHERE date = ""14 november 2012"";","SELECT competition FROM table_name_41 WHERE date = ""14 november 2012"";",1 What is the average decile of Westport South School?,"CREATE TABLE table_name_5 (decile INTEGER, name VARCHAR);","SELECT AVG(decile) FROM table_name_5 WHERE name = ""westport south school"";","SELECT AVG(decile) FROM table_name_5 WHERE name = ""westport south school"";",1 What is the total revenue for each salesperson in the sales database?,"CREATE TABLE sales (salesperson VARCHAR(20), revenue INT); ","SELECT salesperson, SUM(revenue) FROM sales GROUP BY salesperson;","SELECT salesperson, SUM(revenue) FROM sales GROUP BY salesperson;",1 Identify the number of investments made by each investor in the renewable energy sector.,"CREATE TABLE investors (id INT, name VARCHAR(50), sector VARCHAR(20)); ","SELECT name, COUNT(*) as investments FROM investors WHERE sector = 'Renewable Energy' GROUP BY name;","SELECT name, COUNT(*) FROM investors WHERE sector = 'Renewable Energy' GROUP BY name;",0 Find the number of security incidents that occurred in each region in the last quarter.,"CREATE TABLE security_incidents_by_region (region VARCHAR(50), incident_count INT, incident_date DATE); ","SELECT region, SUM(incident_count) AS total_incidents FROM security_incidents_by_region WHERE incident_date >= DATEADD(quarter, -1, GETDATE()) GROUP BY region;","SELECT region, incident_count FROM security_incidents_by_region WHERE incident_date >= DATEADD(quarter, -1, GETDATE()) GROUP BY region;",0 What is the average accuracy of models trained on balanced datasets compared to imbalanced ones?,"CREATE TABLE model_data (model_id INT, model_name VARCHAR(50), dataset_type VARCHAR(50), accuracy FLOAT);",SELECT AVG(md.accuracy) FROM model_data md WHERE md.dataset_type = 'balanced',SELECT AVG(accuracy) FROM model_data WHERE dataset_type = 'balanced' AND accuracy = (SELECT AVG(accuracy) FROM model_data WHERE dataset_type = 'unbalanced');,0 What date is the record 4-3-0?,"CREATE TABLE table_name_94 (date VARCHAR, record VARCHAR);","SELECT date FROM table_name_94 WHERE record = ""4-3-0"";","SELECT date FROM table_name_94 WHERE record = ""4-3-0"";",1 "Attendance of 60,671 had what average week?","CREATE TABLE table_name_9 (week INTEGER, attendance VARCHAR);",SELECT AVG(week) FROM table_name_9 WHERE attendance = 60 OFFSET 671;,"SELECT AVG(week) FROM table_name_9 WHERE attendance = ""60,671"";",0 How many times was the background self-employed - media agency?,"CREATE TABLE table_26263322_1 (candidate VARCHAR, background VARCHAR);","SELECT COUNT(candidate) FROM table_26263322_1 WHERE background = ""Self-employed - media agency"";","SELECT COUNT(candidate) FROM table_26263322_1 WHERE background = ""Self-employed - Media Agency"";",0 Name the location for democratic méga-plex taschereau imax,"CREATE TABLE table_2461720_1 (location VARCHAR, theatre_name VARCHAR);","SELECT location FROM table_2461720_1 WHERE theatre_name = ""Méga-Plex Taschereau IMAX"";","SELECT location FROM table_2461720_1 WHERE theatre_name = ""Democratic Méga-Plastic Tataschereau Imax"";",0 What's the version in the 1.0.4 release?,"CREATE TABLE table_28540539_2 (version VARCHAR, release VARCHAR);","SELECT version FROM table_28540539_2 WHERE release = ""1.0.4"";","SELECT version FROM table_28540539_2 WHERE release = ""1.0.4"";",1 What is the total number of byes when the wins were 9?,"CREATE TABLE table_name_59 (byes VARCHAR, wins VARCHAR);",SELECT COUNT(byes) FROM table_name_59 WHERE wins = 9;,SELECT COUNT(byes) FROM table_name_59 WHERE wins = 9;,1 List all attorneys who have not handled any cases?,"CREATE TABLE attorneys (attorney_id INT, name VARCHAR(50)); CREATE TABLE cases (case_id INT, attorney_id INT); ",SELECT attorneys.name FROM attorneys LEFT JOIN cases ON attorneys.attorney_id = cases.attorney_id WHERE cases.attorney_id IS NULL;,SELECT attorneys.name FROM attorneys INNER JOIN cases ON attorneys.attorney_id = cases.attorney_id WHERE cases.attorney_id IS NULL;,0 What is the score for game 6?,"CREATE TABLE table_name_11 (score VARCHAR, game VARCHAR);",SELECT score FROM table_name_11 WHERE game = 6;,SELECT score FROM table_name_11 WHERE game = 6;,1 Which crops have the highest average temperature in the 'crop_temperature' view?,"CREATE VIEW crop_temperature AS SELECT crops.crop_name, field_sensors.temperature, field_sensors.measurement_date FROM crops JOIN field_sensors ON crops.field_id = field_sensors.field_id;","SELECT crop_name, AVG(temperature) as avg_temp FROM crop_temperature GROUP BY crop_name ORDER BY avg_temp DESC LIMIT 1;","SELECT crops.crop_name, AVG(crop_temperature) as avg_temperature FROM crop_temperature GROUP BY crops.crop_name ORDER BY avg_temperature DESC LIMIT 1;",0 Which building has more than 34 floors?,"CREATE TABLE table_name_90 (name VARCHAR, floors INTEGER);",SELECT name FROM table_name_90 WHERE floors > 34;,SELECT name FROM table_name_90 WHERE floors > 34;,1 What are the top 5 cities with the most users who clicked on a sports ad in the past month?,"CREATE TABLE cities (city_id INT, city_name VARCHAR(50));CREATE TABLE users (user_id INT, city_id INT, user_join_date DATE);CREATE TABLE clicks (click_id INT, user_id INT, ad_type VARCHAR(50), click_date DATE);","SELECT c.city_name, COUNT(DISTINCT u.user_id) as total_users FROM cities c JOIN users u ON c.city_id = u.city_id JOIN clicks cl ON u.user_id = cl.user_id WHERE cl.ad_type = 'sports' AND cl.click_date >= DATEADD(month, -1, GETDATE()) GROUP BY c.city_name ORDER BY total_users DESC LIMIT 5;","SELECT c.city_name, COUNT(DISTINCT u.user_id) as num_users FROM cities c JOIN users u ON c.city_id = u.city_id JOIN clicks c ON u.user_id = c.user_id WHERE c.ad_type = 'Sports' AND c.click_date >= DATEADD(month, -1, GETDATE()) GROUP BY c.city_name ORDER BY num_users DESC LIMIT 5;",0 What is the minimum funding amount for startups in the biotech industry?,"CREATE TABLE startup (id INT, name TEXT, industry TEXT); ",SELECT MIN(funding_amount) FROM investment_rounds ir JOIN startup s ON ir.startup_id = s.id WHERE s.industry = 'Biotech';,SELECT MIN(funding_amount) FROM startup WHERE industry = 'Biotech';,0 Which districts have at least two addresses?,CREATE TABLE address (district VARCHAR);,SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2;,SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2;,1 "Identify drugs that were approved in the same year as Clinical Trial 123, which is stored in the ""clinical_trials"" table.","CREATE TABLE drugs (drug_id INT, approval_year INT); CREATE TABLE clinical_trials (trial_id INT, trial_year INT); ","SELECT d.drug_id, d.approval_year FROM drugs d WHERE d.approval_year = (SELECT ct.trial_year FROM clinical_trials ct WHERE ct.trial_id = 123);","SELECT drugs.drug_id, drugs.approval_year FROM drugs INNER JOIN clinical_trials ON drugs.drug_id = clinical_trials.drug_id WHERE clinical_trials.trial_year = 123;",0 "Which genetic research projects have a start date on or after Jan 1, 2022 and have a duration of more than 9 months?","CREATE SCHEMA if not exists genetics;USE genetics;CREATE TABLE if not exists projects(id INT, name VARCHAR(255), start_date DATE, duration INT);",SELECT * FROM genetics.projects WHERE start_date >= '2022-01-01' AND duration > 9;,SELECT name FROM genetics.projects WHERE start_date >= '2022-01-01' AND duration > 9;,0 What is the average number of workforce development training hours received by workers in the 'Food' industry?,"CREATE TABLE training_hours (id INT, industry VARCHAR(255), hours INT);",SELECT AVG(hours) FROM training_hours WHERE industry = 'Food';,SELECT AVG(hours) FROM training_hours WHERE industry = 'Food';,1 "Identify the infrastructure projects located in the 'Coastal' region with the lowest cost, and show the project name and cost.","CREATE TABLE CoastalProjects (ProjectID INT, ProjectName VARCHAR(100), Location VARCHAR(50), Cost DECIMAL(10,2)); ","SELECT ProjectName, MIN(Cost) as LowestCost FROM CoastalProjects WHERE Location = 'Coastal' GROUP BY ProjectName HAVING COUNT(*) = 1;","SELECT ProjectName, Cost FROM CoastalProjects WHERE Location = 'Coastal' ORDER BY Cost DESC LIMIT 1;",0 Who is the candidate in the 2008 (2) election?,"CREATE TABLE table_name_20 (candidate VARCHAR, election VARCHAR);","SELECT candidate FROM table_name_20 WHERE election = ""2008 (2)"";","SELECT candidate FROM table_name_20 WHERE election = ""2008 (2)"";",1 What is the average budget for digital divide initiatives in each continent?,"CREATE TABLE digital_divide (id INT, initiative_name VARCHAR(50), continent VARCHAR(50), budget DECIMAL(5,2));","SELECT continent, AVG(budget) AS avg_budget FROM digital_divide GROUP BY continent;","SELECT continent, AVG(budget) as avg_budget FROM digital_divide GROUP BY continent;",0 What is the average quantity of sustainable fabric sourced (in metric tons) from African suppliers?,"CREATE TABLE AfricanSuppliers (Supplier VARCHAR(255), Quantity FLOAT); ",SELECT AVG(Quantity) FROM AfricanSuppliers;,SELECT AVG(Quantity) FROM AfricanSuppliers WHERE Supplier LIKE '%Sustainable%';,0 Insert new mining site records for a new mining site 'Site C',"CREATE TABLE mining_sites (site_id INT, site_name VARCHAR(255));","INSERT INTO mining_sites (site_id, site_name) VALUES (3, 'Site C');","INSERT INTO mining_sites (site_id, site_name) VALUES (1, 'Site C');",0 What are the names of nations speak both English and French?,"CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR);","SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = ""English"" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = ""French"";",SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = 'English' INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'French';,0 "What is Event, when Winning Driver is ""Laurent Aiello Laurent Aiello"", when Round is greater than 1, and when Circuit is ""Wunstorf""?","CREATE TABLE table_name_29 (event VARCHAR, circuit VARCHAR, winning_driver VARCHAR, round VARCHAR);","SELECT event FROM table_name_29 WHERE winning_driver = ""laurent aiello laurent aiello"" AND round > 1 AND circuit = ""wunstorf"";","SELECT event FROM table_name_29 WHERE winning_driver = ""lancaster aiello laurent aiello"" AND round > 1 AND circuit = ""wunstorf"";",0 "What is the averaged scored number of team guaraní, which has less than 6 draws and less than 5 losses?","CREATE TABLE table_name_30 (scored INTEGER, losses VARCHAR, draws VARCHAR, team VARCHAR);","SELECT AVG(scored) FROM table_name_30 WHERE draws < 6 AND team = ""guaraní"" AND losses < 5;","SELECT AVG(scored) FROM table_name_30 WHERE draws 6 AND team = ""guaran"" AND losses 5;",0 What is the total quantity of containers loaded on vessels in the port of Oakland for the year 2020?,"CREATE TABLE port (port_id INT, port_name VARCHAR(50)); CREATE TABLE vessels (vessel_id INT, port_id INT, quantity_containers INT); ",SELECT SUM(quantity_containers) FROM vessels JOIN port ON vessels.port_id = port.port_id WHERE port.port_name = 'Oakland' AND YEAR(vessels.vessel_id) = 2020;,SELECT SUM(quantity_containers) FROM vessels WHERE port_id = (SELECT port_id FROM port WHERE port_name = 'Oakland') AND YEAR(vessel_id) = 2020;,0 Who manufactured the motorcycle that did 24 laps and 9 grids?,"CREATE TABLE table_name_84 (manufacturer VARCHAR, laps VARCHAR, grid VARCHAR);",SELECT manufacturer FROM table_name_84 WHERE laps = 24 AND grid = 9;,SELECT manufacturer FROM table_name_84 WHERE laps = 24 AND grid = 9;,1 List the 'case_id' and 'case_type' for cases in the 'AccessToJustice' table where the 'case_type' starts with 'c',"CREATE TABLE AccessToJustice (case_id INT, case_type VARCHAR(10)); ","SELECT case_id, case_type FROM AccessToJustice WHERE case_type LIKE 'c%';","SELECT case_id, case_type FROM AccessToJustice WHERE case_type LIKE '%c%';",0 "What is the method for a match with a Round larger than 2, he took a loss, and 15–3 was the record?","CREATE TABLE table_name_67 (method VARCHAR, record VARCHAR, round VARCHAR, res VARCHAR);","SELECT method FROM table_name_67 WHERE round > 2 AND res = ""loss"" AND record = ""15–3"";","SELECT method FROM table_name_67 WHERE round > 2 AND res = ""loss"" AND record = ""15–3"";",1 Which analog channel has a digital channel of 4.1?,"CREATE TABLE table_name_31 (analog_channel VARCHAR, digital_channel VARCHAR);","SELECT analog_channel FROM table_name_31 WHERE digital_channel = ""4.1"";","SELECT analog_channel FROM table_name_31 WHERE digital_channel = ""4.1"";",1 Find the names and publication dates of all catalogs that have catalog level number greater than 5.,"CREATE TABLE catalogs (catalog_name VARCHAR, date_of_publication VARCHAR, catalog_id VARCHAR); CREATE TABLE catalog_structure (catalog_id VARCHAR);","SELECT t1.catalog_name, t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5;","SELECT T1.catalog_name, T1.date_of_publication FROM catalogs AS T1 JOIN catalog_structure AS T2 ON T1.catalog_id = T2.catalog_id WHERE T2.catalog_id > 5;",0 What is the total installed capacity of renewable energy projects by country?,"CREATE TABLE renewable_energy (country VARCHAR(50), project_type VARCHAR(50), installed_capacity INT); ","SELECT country, SUM(installed_capacity) FROM renewable_energy GROUP BY country;","SELECT country, SUM(installed_capacity) FROM renewable_energy GROUP BY country;",1 What are the names and types of minerals extracted by each company?,"CREATE TABLE Companies (CompanyID INT, CompanyName VARCHAR(50)); CREATE TABLE Minerals (MineralID INT, MineralName VARCHAR(50), CompanyID INT); ","SELECT CompanyName, MineralName FROM Companies JOIN Minerals ON Companies.CompanyID = Minerals.CompanyID;","SELECT Companies.CompanyName, Minerals.MineralName, Minerals.MineralName FROM Companies INNER JOIN Minerals ON Companies.CompanyID = Minerals.CompanyID GROUP BY Companies.CompanyName, Minerals.MineralName;",0 What is the total revenue for each art exhibition in each city?,"CREATE TABLE Exhibitions (id INT, name VARCHAR(255), city VARCHAR(255), start_date DATE, end_date DATE, revenue FLOAT);","SELECT e.city, e.name, SUM(e.revenue) FROM Exhibitions e GROUP BY e.city, e.name;","SELECT city, SUM(revenue) FROM Exhibitions GROUP BY city;",0 "What is the Aircraft when Kabul was the location, unknown fatalities, and the tail number was ya-ban?","CREATE TABLE table_name_3 (aircraft VARCHAR, tail_number VARCHAR, location VARCHAR, fatalities VARCHAR);","SELECT aircraft FROM table_name_3 WHERE location = ""kabul"" AND fatalities = ""unknown"" AND tail_number = ""ya-ban"";","SELECT aircraft FROM table_name_3 WHERE location = ""kabul"" AND fatalities = ""unknown"" AND tail_number = ""ya-ban"";",1 "What is the lowest poles that have 0 as a win, 0 as the top 5, with 66th as the postion?","CREATE TABLE table_name_61 (poles INTEGER, position VARCHAR, wins VARCHAR, top_5 VARCHAR);","SELECT MIN(poles) FROM table_name_61 WHERE wins = 0 AND top_5 = 0 AND position = ""66th"";","SELECT MIN(poles) FROM table_name_61 WHERE wins = ""0"" AND top_5 = ""0"" AND position = ""66th"";",0 What is the total number of workers in the manufacturing industry in the 'East' region?,"CREATE TABLE manufacturing_industry (id INT, region VARCHAR(255), number_of_workers INT); ",SELECT SUM(number_of_workers) FROM manufacturing_industry WHERE region = 'East';,SELECT SUM(number_of_workers) FROM manufacturing_industry WHERE region = 'East';,1 What is the average transaction amount per client in the Southeast region?,"CREATE TABLE clients (client_id INT, region VARCHAR(20)); CREATE TABLE transactions (transaction_id INT, client_id INT, amount DECIMAL(10,2)); ",SELECT AVG(amount) FROM transactions JOIN clients ON transactions.client_id = clients.client_id WHERE clients.region = 'Southeast';,SELECT AVG(amount) FROM transactions t JOIN clients c ON t.client_id = c.client_id WHERE c.region = 'Southeast';,0 How many people were in attendance when the Washington Nationals had a score of 7-3 and a loss of Worrell (0-1)?,"CREATE TABLE table_name_54 (attendance VARCHAR, score VARCHAR, loss VARCHAR);","SELECT COUNT(attendance) FROM table_name_54 WHERE score = ""7-3"" AND loss = ""worrell (0-1)"";","SELECT attendance FROM table_name_54 WHERE score = ""7-3"" AND loss = ""worrell (0-1)"";",0 Name the record for 9-4 score,"CREATE TABLE table_name_61 (record VARCHAR, score VARCHAR);","SELECT record FROM table_name_61 WHERE score = ""9-4"";","SELECT record FROM table_name_61 WHERE score = ""9-4"";",1 What is the total climate finance allocation for mitigation projects in all regions?,"CREATE TABLE climate_finance (region VARCHAR(50), amount FLOAT, sector VARCHAR(50)); ",SELECT SUM(amount) FROM climate_finance WHERE sector = 'Mitigation';,SELECT SUM(amount) FROM climate_finance WHERE sector = 'Mitigation';,1 What is the average percentage of 'organic_materials' use in the 'fashion_production' sector in 'India'?,"CREATE TABLE organic_materials (country VARCHAR(50), fashion_production_sector VARCHAR(50), organic_material_type VARCHAR(50), percentage_use FLOAT); ",SELECT AVG(percentage_use) FROM organic_materials WHERE country = 'India' AND fashion_production_sector = 'fashion_production';,SELECT AVG(percentage_use) FROM organic_materials WHERE country = 'India' AND fashion_production_sector = 'fashion_production';,1 "What is the sum of sliver medals when there were 2 gold medals, less than 15 total medals, and the rank is greater than 5?","CREATE TABLE table_name_88 (silver INTEGER, rank VARCHAR, gold VARCHAR, total VARCHAR);",SELECT SUM(silver) FROM table_name_88 WHERE gold = 2 AND total < 15 AND rank > 5;,SELECT SUM(silver) FROM table_name_88 WHERE gold = 2 AND total 15 AND rank > 5;,0 Get the total amount of resources depleted in Q1 2020?,"CREATE TABLE resources_depleted (id INT, date DATE, resource VARCHAR(50), quantity INT); CREATE VIEW q1_2020 AS SELECT * FROM resources_depleted WHERE date BETWEEN '2020-01-01' AND '2020-03-31';",SELECT SUM(quantity) FROM q1_2020 WHERE resource = 'coal';,SELECT SUM(quantity) FROM resources_depleted WHERE date BETWEEN '2020-01-01' AND '2020-03-31';,0 "Goals Conceded (GC) that has a Draw (PE) larger than 2, and a Goals Scored (GF) larger than 19?","CREATE TABLE table_name_33 (goals_conceded__gc_ INTEGER, draw__pe_ VARCHAR, goals_scored__gf_ VARCHAR);",SELECT MAX(goals_conceded__gc_) FROM table_name_33 WHERE draw__pe_ > 2 AND goals_scored__gf_ > 19;,SELECT SUM(goals_conceded__gc_) FROM table_name_33 WHERE draw__pe_ > 2 AND goals_scored__gf_ > 19;,0 What is the time of the peachtree road race in kenya?,"CREATE TABLE table_name_57 (time VARCHAR, nation VARCHAR, race VARCHAR);","SELECT time FROM table_name_57 WHERE nation = ""kenya"" AND race = ""peachtree road race"";","SELECT time FROM table_name_57 WHERE nation = ""kenya"" AND race = ""peachtree road race"";",1 What is every reference for the example of AF117?,"CREATE TABLE table_30011_2 (reference VARCHAR, example VARCHAR);","SELECT reference FROM table_30011_2 WHERE example = ""AF117"";","SELECT reference FROM table_30011_2 WHERE example = ""AF117"";",1 What is the total number of volunteers and donors for each program in 2021?,"CREATE TABLE donations (id INT, donor_id INT, donation_amount DECIMAL, donation_date DATE, donor_program VARCHAR); CREATE TABLE volunteers (id INT, name VARCHAR, program VARCHAR); CREATE TABLE programs (id INT, name VARCHAR); ","SELECT p.name as program_name, COUNT(DISTINCT v.id) as total_volunteers, COUNT(DISTINCT d.donor_id) as total_donors FROM programs p LEFT JOIN volunteers v ON p.name = v.program LEFT JOIN donations d ON p.name = d.donor_program AND YEAR(d.donation_date) = 2021 GROUP BY p.name;","SELECT p.name, COUNT(v.id) as total_volunteers, COUNT(d.donor_id) as total_donors FROM donations d JOIN volunteers v ON d.donor_program = v.program JOIN programs p ON d.program = p.name WHERE d.donation_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY p.name;",0 Update the safety rating of vehicle with id '123' in 'Vehicle Safety Testing' table to 'Excellent'.,"CREATE TABLE Vehicle_Safety_Testing (vehicle_id INT, safety_rating VARCHAR(20));",UPDATE Vehicle_Safety_Testing SET safety_rating = 'Excellent' WHERE vehicle_id = 123;,UPDATE Vehicle_Safety_Testing SET safety_rating = 'Excellent' WHERE vehicle_id = 123;,1 What is the total number of members in unions with a focus on workplace safety?,"CREATE TABLE unions (id INT, name VARCHAR(50), focus_area VARCHAR(50)); ",SELECT COUNT(*) FROM unions WHERE focus_area = 'workplace safety';,SELECT COUNT(*) FROM unions WHERE focus_area = 'Workplace Safety';,0 What is the maximum cargo handling time for each port?,"CREATE TABLE ports (port_id INT, port_name VARCHAR(50), cargo_handling_time INT); ","SELECT port_name, MAX(cargo_handling_time) FROM ports GROUP BY port_name;","SELECT port_name, MAX(cargo_handling_time) FROM ports GROUP BY port_name;",1 what is smallest number in fleet for chassis manufacturer Scania and fleet numbers is 3230?,"CREATE TABLE table_1425948_1 (number_in_fleet INTEGER, chassis_manufacturer VARCHAR, fleet_numbers VARCHAR);","SELECT MIN(number_in_fleet) FROM table_1425948_1 WHERE chassis_manufacturer = ""Scania"" AND fleet_numbers = ""3230"";","SELECT MIN(number_in_fleet) FROM table_1425948_1 WHERE chassis_manufacturer = ""Scania"" AND fleet_numbers = 3230;",0 "What is the average donation amount per donor in the United States, for donations made in 2021?","CREATE TABLE donors (id INT, name TEXT, country TEXT, donation_amount DECIMAL, donation_date DATE); ",SELECT AVG(donation_amount) FROM donors WHERE country = 'USA' AND YEAR(donation_date) = 2021;,SELECT AVG(donation_amount) FROM donors WHERE country = 'United States' AND donation_date BETWEEN '2021-01-01' AND '2021-12-31';,0 "Who played on december 12, 1993?","CREATE TABLE table_name_37 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_37 WHERE date = ""december 12, 1993"";","SELECT opponent FROM table_name_37 WHERE date = ""december 12, 1993"";",1 Name the game site for week 6,"CREATE TABLE table_14984103_1 (game_site VARCHAR, week VARCHAR);",SELECT game_site FROM table_14984103_1 WHERE week = 6;,SELECT game_site FROM table_14984103_1 WHERE week = 6;,1 Which organizations in the technology for social good domain have a Twitter presence?,"CREATE TABLE organizations (id INT, name TEXT, domain TEXT, twitter TEXT); ",SELECT name FROM organizations WHERE domain = 'technology for social good' AND twitter IS NOT NULL;,SELECT name FROM organizations WHERE domain = 'technology for social good' AND twitter = 'yes';,0 "What is the average salary of employees in the marketing department, including those on maternity leave?","CREATE TABLE Employees (EmployeeID int, Department varchar(20), Salary int, LeaveStatus varchar(10)); ","SELECT AVG(Salary) FROM Employees WHERE Department = 'Marketing' AND LeaveStatus IN ('Active', 'Maternity');",SELECT AVG(Salary) FROM Employees WHERE Department = 'Marketing' AND LeaveStatus = 'Maternity';,0 What was the minimum score of players from Canada in the 'tournament_2022' table?,"CREATE TABLE tournament_2022 (player_id INT, player_name TEXT, score INT, country TEXT);",SELECT MIN(score) FROM tournament_2022 WHERE country = 'Canada';,SELECT MIN(score) FROM tournament_2022 WHERE country = 'Canada';,1 What is the total number of employees who identify as LGBTQ+ and work in the HR department?,"CREATE TABLE Employees (EmployeeID INT, GenderIdentity VARCHAR(20), Department VARCHAR(20)); ","SELECT COUNT(*) FROM Employees WHERE GenderIdentity IN ('Non-binary', 'Genderqueer') AND Department = 'HR';",SELECT COUNT(*) FROM Employees WHERE GenderIdentity = 'LGBTQ+' AND Department = 'HR';,0 What scores did the RSC Anderlecht club have?,"CREATE TABLE table_name_68 (score VARCHAR, club VARCHAR);","SELECT score FROM table_name_68 WHERE club = ""rsc anderlecht"";","SELECT score FROM table_name_68 WHERE club = ""rsc anderlecht"";",1 What is average year for ayan mukerji?,"CREATE TABLE table_name_29 (year INTEGER, director VARCHAR);","SELECT AVG(year) FROM table_name_29 WHERE director = ""ayan mukerji"";","SELECT AVG(year) FROM table_name_29 WHERE director = ""ayan mukerji"";",1 How many times did bec tero sasana win?,"CREATE TABLE table_12303563_1 (winners INTEGER, nation VARCHAR);","SELECT MAX(winners) FROM table_12303563_1 WHERE nation = ""BEC Tero Sasana"";","SELECT SUM(winners) FROM table_12303563_1 WHERE nation = ""Bec Tero Sasana"";",0 What is the total waste generation in kg for each city in the 'New York' state in 2021?,"CREATE TABLE waste_generation_cities (city VARCHAR(255), state VARCHAR(255), year INT, amount FLOAT); ","SELECT wgc.city, SUM(wgc.amount) as total_waste FROM waste_generation_cities wgc WHERE wgc.state = 'New York' AND wgc.year = 2021 GROUP BY wgc.city;","SELECT city, SUM(amount) FROM waste_generation_cities WHERE state = 'New York' AND year = 2021 GROUP BY city;",0 "How many agricultural innovation projects were successfully implemented in Indonesia between 2015 and 2017, inclusive?","CREATE TABLE agricultural_innovation_projects (id INT, country VARCHAR(255), success BOOLEAN); ",SELECT COUNT(*) FROM agricultural_innovation_projects WHERE country = 'Indonesia' AND success = true AND completion_date BETWEEN '2015-01-01' AND '2017-12-31';,SELECT COUNT(*) FROM agricultural_innovation_projects WHERE country = 'Indonesia' AND success = true AND year BETWEEN 2015 AND 2017;,0 In what district is the incumbent Lawrence J. Smith? ,"CREATE TABLE table_1341598_10 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_1341598_10 WHERE incumbent = ""Lawrence J. Smith"";","SELECT district FROM table_1341598_10 WHERE incumbent = ""Larry J. Smith"";",0 What is the number of open pedagogy projects and their total word count for the topic 'Indigenous Studies'?,"CREATE TABLE open_pedagogy (project_id INT, project_name VARCHAR(255), topic VARCHAR(255), word_count INT); ","SELECT COUNT(*), SUM(word_count) FROM open_pedagogy WHERE topic = 'Indigenous Studies';","SELECT COUNT(*), SUM(word_count) FROM open_pedagogy WHERE topic = 'Indigenous Studies';",1 When segment b is dining room tables what is segment d?,"CREATE TABLE table_15187735_5 (segment_d VARCHAR, segment_b VARCHAR);","SELECT segment_d FROM table_15187735_5 WHERE segment_b = ""Dining Room Tables"";","SELECT segment_d FROM table_15187735_5 WHERE segment_b = ""dining room tables"";",0 Calculate the total production in the Niger Delta for the last 12 months.,"CREATE TABLE well_production (well_id INT, measurement_date DATE, production_rate FLOAT, location TEXT); ","SELECT SUM(production_rate) FROM well_production WHERE location = 'Niger Delta' AND measurement_date >= DATEADD(year, -1, GETDATE());","SELECT SUM(production_rate) FROM well_production WHERE location = 'Niger Delta' AND measurement_date >= DATEADD(month, -12, GETDATE());",0 Which ocean has the highest average sea surface temperature?,"CREATE TABLE sea_surface_temperature (id INT, ocean VARCHAR(255), avg_temperature FLOAT); ","SELECT ocean, MAX(avg_temperature) FROM sea_surface_temperature GROUP BY ocean ORDER BY MAX(avg_temperature) DESC LIMIT 1","SELECT ocean, AVG(avg_temperature) as avg_temperature FROM sea_surface_temperature GROUP BY ocean ORDER BY avg_temperature DESC LIMIT 1;",0 What is the location for the win against Johan Mparmpagiannis?,"CREATE TABLE table_name_78 (location VARCHAR, result VARCHAR, opponent VARCHAR);","SELECT location FROM table_name_78 WHERE result = ""win"" AND opponent = ""johan mparmpagiannis"";","SELECT location FROM table_name_78 WHERE result = ""win"" AND opponent = ""johan mparmpagiannis"";",1 What are the names of all venues that have hosted esports events?,"CREATE TABLE esports_events (id INT, event_name VARCHAR(50), date DATE, venue_id INT); CREATE TABLE venues (id INT, name VARCHAR(50), capacity INT); ",SELECT venues.name FROM venues INNER JOIN esports_events ON venues.id = esports_events.venue_id;,SELECT venues.name FROM venues INNER JOIN esports_events ON venues.id = esports_events.venue_id;,1 Delete all records from the 'sustainable_forestry' table where the location is 'Location2'.,"CREATE TABLE sustainable_forestry (id INT, location VARCHAR(255), species VARCHAR(255)); ",DELETE FROM sustainable_forestry WHERE location = 'Location2';,DELETE FROM sustainable_forestry WHERE location = 'Location2';,1 Determine the number of prisons that offer reentry programs for inmates in the midwest,"CREATE TABLE prisons (prison_id INT, region VARCHAR(255), reentry_program BOOLEAN); ",SELECT COUNT(*) FROM prisons WHERE region = 'Midwest' AND reentry_program = TRUE;,SELECT COUNT(*) FROM prisons WHERE region ='midwest' AND reentry_program = TRUE;,0 What is the average caloric content of organic fruits sourced from Southeast Asia?,"CREATE TABLE FruitSources (source_id INT, fruit_name VARCHAR(255), origin VARCHAR(255), is_organic BOOLEAN, caloric_content INT); ",SELECT AVG(caloric_content) FROM FruitSources WHERE origin = 'Southeast Asia' AND is_organic = true;,SELECT AVG(caloric_content) FROM FruitSources WHERE origin = 'Southeast Asia' AND is_organic = true;,1 "What date was the game at Williams-Brice stadium • Columbia, SC?","CREATE TABLE table_name_75 (date VARCHAR, site VARCHAR);","SELECT date FROM table_name_75 WHERE site = ""williams-brice stadium • columbia, sc"";","SELECT date FROM table_name_75 WHERE site = ""williams-brice stadium • columbia, sc"";",1 How many streams did songs from the Pop genre receive in 2021?,"CREATE TABLE Songs (SongID INT, Title VARCHAR(100), Genre VARCHAR(50), ReleaseDate DATE);",SELECT SUM(StreamCount) FROM (SELECT StreamCount FROM Songs WHERE Genre = 'Pop' AND YEAR(ReleaseDate) = 2021) AS PopSongs;,SELECT COUNT(*) FROM Songs WHERE Genre = 'Pop' AND YEAR(ReleaseDate) = 2021;,0 What is the sum of every heat for the nationality of Macedonia with a rank less than 114?,"CREATE TABLE table_name_13 (heat INTEGER, nationality VARCHAR, rank VARCHAR);","SELECT SUM(heat) FROM table_name_13 WHERE nationality = ""macedonia"" AND rank < 114;","SELECT SUM(heat) FROM table_name_13 WHERE nationality = ""macedonia"" AND rank 114;",0 Find the minimum retail sales revenue for any sustainable garment type in South Korea in 2021.,"CREATE TABLE RetailSales (id INT, garment_type VARCHAR(20), sustainable BOOLEAN, country VARCHAR(20), revenue DECIMAL(10, 2), year INT); ",SELECT MIN(revenue) as min_revenue FROM RetailSales WHERE sustainable = TRUE AND country = 'South Korea' AND year = 2021;,SELECT MIN(revenue) FROM RetailSales WHERE sustainable = true AND country = 'South Korea' AND year = 2021;,0 "What is Record, when Event is ""UFC 40""?","CREATE TABLE table_name_57 (record VARCHAR, event VARCHAR);","SELECT record FROM table_name_57 WHERE event = ""ufc 40"";","SELECT record FROM table_name_57 WHERE event = ""ufc 40"";",1 Find the maximum home value for Shariah-compliant loans in California,"CREATE TABLE shariah_compliant_loans (id INT, home_value FLOAT, state VARCHAR(255));",SELECT MAX(home_value) FROM shariah_compliant_loans WHERE state = 'California';,SELECT MAX(home_value) FROM shariah_compliant_loans WHERE state = 'California';,1 How many episodes in the series are also episode 18 in the season?,"CREATE TABLE table_23492454_1 (no_in_series VARCHAR, no_in_season VARCHAR);",SELECT COUNT(no_in_series) FROM table_23492454_1 WHERE no_in_season = 18;,SELECT COUNT(no_in_series) FROM table_23492454_1 WHERE no_in_season = 18;,1 How many marine species are there in the 'Southern Ocean'?,"CREATE TABLE marine_species_count (id INTEGER, name VARCHAR(255), species VARCHAR(255), ocean VARCHAR(255));",SELECT COUNT(*) FROM marine_species_count WHERE ocean = 'Southern Ocean';,SELECT COUNT(*) FROM marine_species_count WHERE ocean = 'Southern Ocean';,1 "If the player is Reed Doughty, what isthe fumrec?","CREATE TABLE table_25773915_11 (fumrec VARCHAR, player VARCHAR);","SELECT fumrec FROM table_25773915_11 WHERE player = ""Reed Doughty"";","SELECT fumrec FROM table_25773915_11 WHERE player = ""Reed Doughty"";",1 Calculate the moving average of revenue for each garment for the last 3 months.,"CREATE TABLE GarmentSales (garment_id INT, date DATE, revenue DECIMAL(10,2)); ","SELECT garment_id, date, AVG(revenue) OVER (PARTITION BY garment_id ORDER BY date ROWS BETWEEN 2 PRECEDING AND CURRENT ROW) AS moving_average FROM GarmentSales;","SELECT garment_id, AVG(revenue) as moving_avg FROM GarmentSales WHERE date >= DATEADD(month, -3, GETDATE()) GROUP BY garment_id;",0 "What is the directed/undirected of fpf (mavisto), which has an induced/non-induced of induced?","CREATE TABLE table_name_25 (directed___undirected VARCHAR, induced___non_induced VARCHAR, name VARCHAR);","SELECT directed___undirected FROM table_name_25 WHERE induced___non_induced = ""induced"" AND name = ""fpf (mavisto)"";","SELECT directed___undirected FROM table_name_25 WHERE induced___non_induced = ""induced"" AND name = ""fpf (mavisto)"";",1 What is the distribution of attendees by gender at 'Dance for All' events?,"CREATE TABLE GenderDistribution (event_name VARCHAR(50), attendee_gender VARCHAR(10), gender_count INT); ","SELECT attendee_gender, gender_count, gender_count * 100.0 / SUM(gender_count) OVER() AS percentage FROM GenderDistribution WHERE event_name = 'Dance for All';","SELECT attendee_gender, COUNT(*) as attendee_count FROM GenderDistribution WHERE event_name = 'Dance for All' GROUP BY attendee_gender;",0 What is the Gecko value for the item that has a Prince XML value of 'no' and a KHTML value of 'yes'?,"CREATE TABLE table_name_6 (gecko VARCHAR, prince_xml VARCHAR, khtml VARCHAR);","SELECT gecko FROM table_name_6 WHERE prince_xml = ""yes"" AND khtml = ""yes"";","SELECT gecko FROM table_name_6 WHERE prince_xml = ""no"" AND khtml = ""yes"";",0 "Which public works projects were completed in the last 5 years, and what was their budget?","CREATE TABLE Projects (id INT, name TEXT, completion_date DATE, budget INT); ","SELECT name, budget FROM Projects WHERE completion_date > (CURRENT_DATE - INTERVAL '5 years')","SELECT name, budget FROM Projects WHERE completion_date >= DATEADD(year, -5, GETDATE());",0 What is the average rating for suppliers in the SupplyChainTransparency table who supply both organic and vegan products?,"CREATE TABLE SupplyChainTransparency(supplier_id INT, supplier_country VARCHAR(50), is_organic BOOLEAN, is_vegan BOOLEAN, avg_rating FLOAT);",SELECT AVG(avg_rating) FROM SupplyChainTransparency WHERE is_organic = TRUE AND is_vegan = TRUE;,SELECT AVG(avg_rating) FROM SupplyChainTransparency WHERE is_organic = true AND is_vegan = true;,0 What is the total budget allocated for inclusion efforts in disability services in the North and South regions?,"CREATE TABLE Inclusion_Efforts (region VARCHAR(255), budget INT); ","SELECT SUM(budget) FROM Inclusion_Efforts WHERE region IN ('North', 'South');","SELECT SUM(budget) FROM Inclusion_Efforts WHERE region IN ('North', 'South');",1 "What is Time/Retired, when Team is ""Team Vodafone"", and when Grid is greater than 4?","CREATE TABLE table_name_16 (time_retired VARCHAR, team VARCHAR, grid VARCHAR);","SELECT time_retired FROM table_name_16 WHERE team = ""team vodafone"" AND grid > 4;","SELECT time_retired FROM table_name_16 WHERE team = ""team vodafone"" AND grid > 4;",1 Which Round has a Pick of 25 (via hamilton)?,"CREATE TABLE table_name_88 (round INTEGER, pick VARCHAR);","SELECT SUM(round) FROM table_name_88 WHERE pick = ""25 (via hamilton)"";",SELECT SUM(round) FROM table_name_88 WHERE pick = 25 (via hamilton);,0 What score has 1998 as the year?,"CREATE TABLE table_name_82 (score VARCHAR, year VARCHAR);",SELECT score FROM table_name_82 WHERE year = 1998;,SELECT score FROM table_name_82 WHERE year = 1998;,1 What is the time when ss12 is stage?,"CREATE TABLE table_21578303_2 (time VARCHAR, stage VARCHAR);","SELECT time FROM table_21578303_2 WHERE stage = ""SS12"";","SELECT time FROM table_21578303_2 WHERE stage = ""Ss12"";",0 "Which week was the October 17, 2004 game played?","CREATE TABLE table_name_76 (week VARCHAR, date VARCHAR);","SELECT week FROM table_name_76 WHERE date = ""october 17, 2004"";","SELECT week FROM table_name_76 WHERE date = ""october 17, 2004"";",1 What are the years of participation for pickerington north?,"CREATE TABLE table_17429402_7 (years_of_participation VARCHAR, school VARCHAR);","SELECT years_of_participation FROM table_17429402_7 WHERE school = ""Pickerington North"";","SELECT years_of_participation FROM table_17429402_7 WHERE school = ""Pickerington North"";",1 "What is Phil Crane, democrat or republican ","CREATE TABLE table_1341663_14 (party VARCHAR, incumbent VARCHAR);","SELECT party FROM table_1341663_14 WHERE incumbent = ""Phil Crane"";","SELECT party FROM table_1341663_14 WHERE incumbent = ""Phil Crane"";",1 Which race is located in kyalami?,"CREATE TABLE table_1140073_2 (race VARCHAR, location VARCHAR);","SELECT race FROM table_1140073_2 WHERE location = ""Kyalami"";","SELECT race FROM table_1140073_2 WHERE location = ""Kyalami"";",1 Who was the writer in the episode directed by Jesse Peretz?,"CREATE TABLE table_26961951_6 (written_by VARCHAR, directed_by VARCHAR);","SELECT written_by FROM table_26961951_6 WHERE directed_by = ""Jesse Peretz"";","SELECT written_by FROM table_26961951_6 WHERE directed_by = ""Jesse Peretz"";",1 What is the total word count of articles published in 2020?,"CREATE TABLE articles (id INT, title VARCHAR(100), content TEXT, publish_date DATE, word_count INT); ",SELECT SUM(word_count) as total_word_count FROM articles WHERE YEAR(publish_date) = 2020;,SELECT SUM(word_count) FROM articles WHERE YEAR(publish_date) = 2020;,0 What is the explainability score distribution for each AI model type?,"CREATE TABLE explainability_scores (model_id INT, model_type VARCHAR(20), score INT); ","SELECT model_type, AVG(score) as avg_explainability_score, STDDEV(score) as stddev_explainability_score FROM explainability_scores GROUP BY model_type;","SELECT model_type, SUM(score) as total_score FROM explainability_scores GROUP BY model_type;",0 "Find the number of times each volunteer has donated, ordered by the number of donations in descending order?","CREATE TABLE Donors (DonorID INT, DonorName VARCHAR(50), DonationDate DATE); ","SELECT DonorName, COUNT(*) as Donations FROM Donors GROUP BY DonorName ORDER BY Donations DESC;","SELECT DonorName, COUNT(*) as DonationCount FROM Donors GROUP BY DonorName ORDER BY DonationCount DESC;",0 What is the Date when MARTIN had 8%?,"CREATE TABLE table_name_21 (date VARCHAR, martin VARCHAR);","SELECT date FROM table_name_21 WHERE martin = ""8%"";","SELECT date FROM table_name_21 WHERE martin = ""8%"";",1 What club has 536 points for?,"CREATE TABLE table_13741576_6 (club VARCHAR, points_for VARCHAR);","SELECT club FROM table_13741576_6 WHERE points_for = ""536"";","SELECT club FROM table_13741576_6 WHERE points_for = ""536"";",1 List the cities and their water recycling rates in descending order.,"CREATE TABLE city_wastewater (city VARCHAR(50), recycling_rate DECIMAL(5,2)); ","SELECT city, recycling_rate FROM city_wastewater ORDER BY recycling_rate DESC;","SELECT city, recycling_rate FROM city_wastewater ORDER BY recycling_rate DESC;",1 What is the average 1st place with a Rank that is larger than 10?,CREATE TABLE table_name_26 (rank INTEGER);,SELECT AVG(1 AS st_place) FROM table_name_26 WHERE rank > 10;,SELECT AVG(1 AS st_place) FROM table_name_26 WHERE rank > 10;,1 What is the fewest number of silver medals won by Canada with fewer than 3 total medals?,"CREATE TABLE table_name_87 (silver INTEGER, nation VARCHAR, total VARCHAR);","SELECT MIN(silver) FROM table_name_87 WHERE nation = ""canada"" AND total < 3;","SELECT MIN(silver) FROM table_name_87 WHERE nation = ""canada"" AND total 3;",0 Which state is frederick bamford a member of?,"CREATE TABLE table_name_24 (state VARCHAR, member VARCHAR);","SELECT state FROM table_name_24 WHERE member = ""frederick bamford"";","SELECT state FROM table_name_24 WHERE member = ""frederick bamford"";",1 What is the average salary of workers in the 'manufacturing' department?,"CREATE TABLE IF NOT EXISTS employees (id INT, name VARCHAR(100), department VARCHAR(50), salary FLOAT); ",SELECT AVG(salary) FROM employees WHERE department = 'manufacturing';,SELECT AVG(salary) FROM employees WHERE department ='manufacturing';,0 What is the total sales revenue for each region?,"CREATE TABLE sales_data (sales_id INTEGER, region TEXT, sales_revenue INTEGER); ","SELECT region, SUM(sales_revenue) FROM sales_data GROUP BY region;","SELECT region, SUM(sales_revenue) FROM sales_data GROUP BY region;",1 List all the unique accommodations provided by the disability services.,"CREATE TABLE Accommodations (accommodation_id INT, accommodation VARCHAR(255)); ",SELECT DISTINCT accommodation FROM Accommodations;,SELECT DISTINCT accommodation FROM Accommodations;,1 What is the most common type of emergency call in the city of Atlanta?,"CREATE TABLE emergency_calls_atlanta (id INT, city VARCHAR(20), call_type VARCHAR(20), frequency INT); ","SELECT call_type, MAX(frequency) FROM emergency_calls_atlanta WHERE city = 'Atlanta' GROUP BY call_type;","SELECT call_type, COUNT(*) as count FROM emergency_calls_atlanta WHERE city = 'Atlanta' GROUP BY call_type ORDER BY count DESC LIMIT 1;",0 Show the authors who have submissions to more than one workshop.,"CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR); CREATE TABLE acceptance (Submission_ID VARCHAR, workshop_id VARCHAR);",SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1;,SELECT T1.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T1.Submission_ID HAVING COUNT(*) > 1;,0 What is the minimum price of fair trade coffee beans in Ethiopia?,"CREATE TABLE coffee_prices (id INT, price DECIMAL(5,2), product VARCHAR(255), country VARCHAR(255)); ",SELECT MIN(price) FROM coffee_prices WHERE product = 'Coffee Beans' AND country = 'Ethiopia';,SELECT MIN(price) FROM coffee_prices WHERE product = 'Fair Trade Coffee Beans' AND country = 'Ethiopia';,0 "What is the total combined weight of players from minnetonka, mn?","CREATE TABLE table_name_22 (weight INTEGER, home_town VARCHAR);","SELECT SUM(weight) FROM table_name_22 WHERE home_town = ""minnetonka, mn"";","SELECT SUM(weight) FROM table_name_22 WHERE home_town = ""minnetonka, mn"";",1 "List all companies that had a higher funding round than their previous round, in descending order of difference.","CREATE TABLE funding_rounds (company_id INT, round_number INT, funding_amount INT); ","SELECT a.company_id, (a.funding_amount - b.funding_amount) AS difference FROM funding_rounds a INNER JOIN funding_rounds b ON a.company_id = b.company_id AND a.round_number = b.round_number + 1 ORDER BY difference DESC;","SELECT company_id, round_number, funding_amount FROM funding_rounds WHERE funding_amount > (SELECT MAX(funding_amount) FROM funding_rounds);",0 What is the total amount of donations received from each country?,"CREATE TABLE DonorCountries (Country VARCHAR(20), DonationID INT, DonationAmount DECIMAL(10,2)); ","SELECT Country, SUM(DonationAmount) as TotalDonations FROM DonorCountries GROUP BY Country;","SELECT Country, SUM(DonationAmount) FROM DonorCountries GROUP BY Country;",0 What is the total number of participants in disability support programs by country?,"CREATE TABLE DisabilitySupportPrograms (ProgramID int, ProgramName varchar(50), Country varchar(50)); ","SELECT Country, COUNT(*) as TotalParticipants FROM DisabilitySupportPrograms GROUP BY Country;","SELECT Country, COUNT(*) FROM DisabilitySupportPrograms GROUP BY Country;",0 What is the average cargo weight handled at 'Port D'?,"CREATE TABLE ports (port_id INT, port_name TEXT, country TEXT); CREATE TABLE shipments (shipment_id INT, vessel_id INT, port_id INT, cargo_weight INT); ",SELECT AVG(cargo_weight) FROM shipments WHERE port_id = (SELECT port_id FROM ports WHERE port_name = 'Port D');,SELECT AVG(cargo_weight) FROM shipments JOIN ports ON shipments.port_id = ports.port_id WHERE ports.port_name = 'Port D';,0 "What are the details of the smart contract '0x789...', if any, in the 'contracts' table?","CREATE TABLE contracts (id INT, contract_address VARCHAR(50), contract_name VARCHAR(50), creator VARCHAR(50), language VARCHAR(20)); ",SELECT * FROM contracts WHERE contract_address = '0x789...';,SELECT * FROM contracts WHERE contract_name = '0x789...';,0 "What percentage of plastic, paper, and glass waste is generated in the 'Europe' region?","CREATE TABLE waste_type (waste_type VARCHAR(50)); CREATE TABLE europe_waste (city VARCHAR(50), region VARCHAR(50), waste_type VARCHAR(50), waste_metric INT); ","SELECT 100.0 * SUM(CASE WHEN waste_type IN ('Plastic', 'Paper', 'Glass') THEN waste_metric ELSE 0 END) / SUM(waste_metric) AS percentage FROM europe_waste WHERE region = 'Europe';","SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM europe_waste WHERE region = 'Europe')) AS percentage FROM europe_waste WHERE region = 'Europe' AND waste_type IN ('plastic', 'paper', 'glass');",0 Calculate the YoY percentage change in revenue for each menu category.,"CREATE TABLE restaurant_revenue (menu_category VARCHAR(50), transaction_date DATE, revenue NUMERIC(10,2)); ","SELECT menu_category, (SUM(revenue) OVER (PARTITION BY menu_category ORDER BY EXTRACT(YEAR FROM transaction_date) ROWS BETWEEN 1 FOLLOWING AND 1 FOLLOWING) - SUM(revenue) OVER (PARTITION BY menu_category ORDER BY EXTRACT(YEAR FROM transaction_date))) * 100.0 / SUM(revenue) OVER (PARTITION BY menu_category ORDER BY EXTRACT(YEAR FROM transaction_date)) AS yoy_percentage_change FROM restaurant_revenue;","SELECT menu_category, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM restaurant_revenue)) as yoy_percentage_change FROM restaurant_revenue GROUP BY menu_category;",0 "Identify restaurants with a sustainability rating greater than 3 and a monthly revenue greater than $25,000.","CREATE TABLE restaurants (id INT, name VARCHAR(255), location VARCHAR(255), sustainability_rating INT, monthly_revenue DECIMAL(10,2)); ","SELECT name, location FROM restaurants WHERE sustainability_rating > 3 AND monthly_revenue > 25000;",SELECT name FROM restaurants WHERE sustainability_rating > 3 AND monthly_revenue > 25.000;,0 what is the score when the team is @ cleveland?,"CREATE TABLE table_name_20 (score VARCHAR, team VARCHAR);","SELECT score FROM table_name_20 WHERE team = ""@ cleveland"";","SELECT score FROM table_name_20 WHERE team = ""@ cleveland"";",1 "What is the total production of crops in organic farms, grouped by type of crop and year?","CREATE TABLE Organic_Crop_Production (Crop_Type VARCHAR(50), Year INT, Production INT);","SELECT Crop_Type, Year, SUM(Production) FROM Organic_Crop_Production GROUP BY Crop_Type, Year;","SELECT Crop_Type, Year, SUM(Production) FROM Organic_Crop_Production GROUP BY Crop_Type, Year;",1 "Which author wrote Sironia, Texas in English?","CREATE TABLE table_name_42 (author VARCHAR, language VARCHAR, book_title VARCHAR);","SELECT author FROM table_name_42 WHERE language = ""english"" AND book_title = ""sironia, texas"";","SELECT author FROM table_name_42 WHERE language = ""english"" AND book_title = ""sironia, texas"";",1 "Which stadium can hold 63,443 people?","CREATE TABLE table_name_97 (result VARCHAR, attendance VARCHAR);","SELECT result FROM table_name_97 WHERE attendance = ""63,443"";","SELECT result FROM table_name_97 WHERE attendance = ""63,443"";",1 "List the names of vessels and their manufacturers, along with the number of regulatory compliance failures in the last 3 months.","CREATE TABLE Vessels (VesselID INT, VesselName VARCHAR(50), Manufacturer VARCHAR(50)); CREATE TABLE RegulatoryCompliance (RegulationID INT, VesselID INT, ComplianceDate DATE, Compliance VARCHAR(50)); ","SELECT Vessels.VesselName, Vessels.Manufacturer, COUNT(*) AS Failures FROM Vessels INNER JOIN RegulatoryCompliance ON Vessels.VesselID = RegulatoryCompliance.VesselID WHERE RegulatoryCompliance.ComplianceDate > DATE_SUB(CURDATE(), INTERVAL 3 MONTH) AND RegulatoryCompliance.Compliance = 'Non-Compliant' GROUP BY Vessels.VesselID;","SELECT Vessels.VesselName, Vessels.Manufacturer, COUNT(RegulatoryCompliance.RegulationID) FROM Vessels INNER JOIN RegulatoryCompliance ON Vessels.VesselID = RegulatoryCompliance.VesselID WHERE ComplianceDate >= DATEADD(month, -3, GETDATE()) GROUP BY Vessels.VesselName, Vessels.Manufacturer;",0 Which mining operations have the highest total carbon emissions per month?,"CREATE TABLE mine_carbon_emissions (emission_date DATE, mine_id INT, carbon_emissions INT); CREATE TABLE mine_info (mine_id INT, mine_name TEXT); ","SELECT mine_id, EXTRACT(MONTH FROM emission_date) AS month, SUM(carbon_emissions) OVER (PARTITION BY mine_id ORDER BY EXTRACT(MONTH FROM emission_date)) AS total_carbon_emissions FROM mine_carbon_emissions JOIN mine_info ON mine_carbon_emissions.mine_id = mine_info.mine_id ORDER BY total_carbon_emissions DESC LIMIT 1;","SELECT mine_name, SUM(carbon_emissions) as total_carbon_emissions FROM mine_carbon_emissions JOIN mine_info ON mine_carbon_emissions.mine_id = mine_info.mine_id GROUP BY mine_name ORDER BY total_carbon_emissions DESC;",0 What is the average mental health score of students per school in the last two years?,"CREATE TABLE student_mental_health (student_id INT, school_id INT, score INT, date DATE); ","SELECT school_id, AVG(score) as avg_score FROM (SELECT school_id, score, date, DATE_SUB(date, INTERVAL 2 YEAR) as two_years_ago FROM student_mental_health) as subquery WHERE date >= two_years_ago GROUP BY school_id;","SELECT school_id, AVG(score) as avg_score FROM student_mental_health WHERE date >= DATEADD(year, -2, GETDATE()) GROUP BY school_id;",0 What is the total budget allocated for public parks in the city of Beijing?,"CREATE TABLE city_services (city VARCHAR(20), service VARCHAR(20), budget INT); ",SELECT SUM(budget) FROM city_services WHERE city = 'Beijing' AND service = 'Public Parks';,SELECT SUM(budget) FROM city_services WHERE city = 'Beijing' AND service = 'Public Parks';,1 What is the maximum severity score of threats related to 'malware' in the last year?,"CREATE TABLE malware_threats (id INT, threat_type VARCHAR(50), severity_score INT, threat_date DATE);","SELECT MAX(severity_score) as max_severity FROM malware_threats WHERE threat_type = 'malware' AND threat_date >= DATEADD(year, -1, GETDATE());","SELECT MAX(severity_score) FROM malware_threats WHERE threat_type ='malware' AND threat_date >= DATEADD(year, -1, GETDATE());",0 "Which Win/Lose Percentage has Champs larger than 0, and a Draw larger than 3?","CREATE TABLE table_name_92 (win_lose_percentage VARCHAR, champs VARCHAR, draw VARCHAR);",SELECT win_lose_percentage FROM table_name_92 WHERE champs > 0 AND draw > 3;,SELECT win_lose_percentage FROM table_name_92 WHERE champs > 0 AND draw > 3;,1 What is the average lifespan of different types of satellites and how many have been launched?,"CREATE TABLE satellite (id INT, name VARCHAR(255), type VARCHAR(255), country VARCHAR(255), launch_date DATE); ","SELECT type, COUNT(id) as total, AVG(DATEDIFF(CURDATE(), launch_date)) as avg_lifespan FROM satellite GROUP BY type;","SELECT type, AVG(DATEDIFF(launch_date, '%Y-%m')) as avg_lifespan, COUNT(*) as num_launched FROM satellite GROUP BY type;",0 "What is Score, when Leading Scorer is Tyrone Hill , 20 Points?","CREATE TABLE table_name_6 (score VARCHAR, leading_scorer VARCHAR);","SELECT score FROM table_name_6 WHERE leading_scorer = ""tyrone hill , 20 points"";","SELECT score FROM table_name_6 WHERE leading_scorer = ""tyrone hill, 20 points"";",0 What is the fixed charge for the user with a unit/time range of i-2: peak (18:30-22:30)?,"CREATE TABLE table_25479607_3 (fixed_charge___rs__kwh_ VARCHAR, unit__kwh__time_range VARCHAR);","SELECT fixed_charge___rs__kwh_ FROM table_25479607_3 WHERE unit__kwh__time_range = ""I-2: Peak (18:30-22:30)"";","SELECT fixed_charge___rs__kwh_ FROM table_25479607_3 WHERE unit__kwh__time_range = ""I-2: Peak (18:30-22:30)"";",1 Number of 13 that has what highest weight?,"CREATE TABLE table_name_44 (weight INTEGER, number VARCHAR);",SELECT MAX(weight) FROM table_name_44 WHERE number = 13;,SELECT MAX(weight) FROM table_name_44 WHERE number = 13;,1 Which clinical trials were 'FAILED' for drug 'D005'?,"CREATE TABLE clinical_trials (drug_id VARCHAR(10), trial_status VARCHAR(10));",SELECT * FROM clinical_trials WHERE drug_id = 'D005' AND trial_status = 'FAILED';,"SELECT drug_id, trial_status FROM clinical_trials WHERE drug_id = 'D005' AND trial_status = 'FAILED';",0 What school joined the conference in 1996-97 and left it in 2011-12?,"CREATE TABLE table_262560_2 (institution VARCHAR, joined VARCHAR, left VARCHAR);","SELECT institution FROM table_262560_2 WHERE joined = ""1996-97"" AND left = ""2011-12"";","SELECT institution FROM table_262560_2 WHERE joined = ""1996-97"" AND left = ""2011-12"";",1 "How many students have participated in open pedagogy projects, and what are the average and total project costs?","CREATE TABLE project (project_id INT, project_name VARCHAR(50), num_students INT, avg_cost DECIMAL(5,2), total_cost DECIMAL(10,2), PRIMARY KEY(project_id)); ","SELECT num_students, AVG(avg_cost) as avg_project_cost, SUM(total_cost) as total_project_cost FROM project;","SELECT num_students, AVG(avg_cost) as avg_cost, SUM(total_cost) as total_cost FROM project WHERE project_name = 'Open Pedagogy' GROUP BY num_students;",0 What is the total production cost of B Corp certified garments?,"CREATE TABLE certifications (certification_id INT, certification_name TEXT); CREATE TABLE garments (garment_id INT, garment_name TEXT, production_cost FLOAT, certification_id INT); ",SELECT SUM(g.production_cost) FROM garments g WHERE g.certification_id = 3;,SELECT SUM(garments.production_cost) FROM garments INNER JOIN certifications ON garments.certification_id = certifications.certification_id WHERE certifications.certification_name = 'B Corp';,0 What is the total number of refugees supported by each organization in Oceania in 2020?,"CREATE TABLE refugees (refugee_id INT, refugee_name TEXT, organization TEXT, support_date DATE, region TEXT); ","SELECT organization, COUNT(*) as total_refugees FROM refugees WHERE region = 'Oceania' AND support_date >= '2020-01-01' GROUP BY organization;","SELECT organization, COUNT(*) FROM refugees WHERE region = 'Oceania' AND support_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY organization;",0 What is the bandwidth for downstream of 20 mbit/s for 69 tl?,"CREATE TABLE table_17304621_14 (bandwidth VARCHAR, downstream VARCHAR, price_tl VARCHAR);","SELECT bandwidth FROM table_17304621_14 WHERE downstream = ""20 Mbit/s"" AND price_tl = ""69 TL"";","SELECT bandwidth FROM table_17304621_14 WHERE downstream = ""20 Mbit/s"" AND price_tl = ""69"";",0 "What is the lowest against of the wimmera fl warrack eagles, which have less than 16 wins?","CREATE TABLE table_name_33 (against INTEGER, wins VARCHAR, wimmera_fl VARCHAR);","SELECT MIN(against) FROM table_name_33 WHERE wins < 16 AND wimmera_fl = ""warrack eagles"";","SELECT MIN(against) FROM table_name_33 WHERE wins 16 AND wimmera_fl = ""warrack eagles"";",0 What is the Type for l. publilius philo vulscus?,"CREATE TABLE table_name_31 (type VARCHAR, name VARCHAR);","SELECT type FROM table_name_31 WHERE name = ""l. publilius philo vulscus"";","SELECT type FROM table_name_31 WHERE name = ""l. publilius philo vulscus"";",1 List all artwork sold in the first quarter of 2016.,"CREATE TABLE Artwork (ArtworkID INT, Title VARCHAR(100), Category VARCHAR(50), Price FLOAT); CREATE TABLE Sales (SaleID INT, ArtworkID INT, SaleDate DATE); ",SELECT A.Title FROM Artwork A JOIN Sales S ON A.ArtworkID = S.ArtworkID WHERE QUARTER(S.SaleDate) = 1 AND YEAR(S.SaleDate) = 2016;,SELECT Artwork.Title FROM Artwork INNER JOIN Sales ON Artwork.ArtworkID = Sales.ArtworkID WHERE Sales.SaleDate BETWEEN '2016-01-01' AND '2016-12-31';,0 Find the minimum grade of students who have no friends.,"CREATE TABLE Highschooler (id VARCHAR); CREATE TABLE Friend (student_id VARCHAR); CREATE TABLE Highschooler (grade INTEGER, id VARCHAR);",SELECT MIN(grade) FROM Highschooler WHERE NOT id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id);,SELECT MIN(grade) FROM Highschooler WHERE id NOT IN (SELECT id FROM Friend);,0 What is the latest release year in the songs table?,"CREATE TABLE songs (id INT, title VARCHAR(255), release_year INT); ",SELECT MAX(release_year) FROM songs;,SELECT MAX(release_year) FROM songs;,1 Insert a new record for a baseball match in Japan with 2000 tickets sold.,"CREATE TABLE matches (match_id INT, sport VARCHAR(50), location VARCHAR(50), tickets_sold INT);","INSERT INTO matches (match_id, sport, location, tickets_sold) VALUES (4, 'Baseball', 'Japan', 2000);","INSERT INTO matches (match_id, sport, location, tickets_sold) VALUES (1, 'Baseball', 'Japan', 2000);",0 What place did Jimmy Reece start from when he ranked 12?,"CREATE TABLE table_name_83 (start VARCHAR, rank VARCHAR);","SELECT start FROM table_name_83 WHERE rank = ""12"";","SELECT start FROM table_name_83 WHERE rank = ""12"";",1 What is the name and location of each military technology developed by country Y in the year 2020?,"CREATE TABLE military_technology (id INT, country TEXT, technology TEXT, location TEXT, year INT);","SELECT technology, location FROM military_technology WHERE country = 'Country Y' AND year = 2020;","SELECT technology, location FROM military_technology WHERE country = 'country Y' AND year = 2020;",0 Highest inhabitants from gela?,"CREATE TABLE table_name_86 (inhabitants INTEGER, municipality VARCHAR);","SELECT MAX(inhabitants) FROM table_name_86 WHERE municipality = ""gela"";","SELECT MAX(inhabitants) FROM table_name_86 WHERE municipality = ""gela"";",1 "Which Date has a Game smaller than 4, and an Opponent of calgary flames, and a Score of 4–5?","CREATE TABLE table_name_83 (date VARCHAR, score VARCHAR, game VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_83 WHERE game < 4 AND opponent = ""calgary flames"" AND score = ""4–5"";","SELECT date FROM table_name_83 WHERE game 4 AND opponent = ""calgary flames"" AND score = ""4–5"";",0 "What is the average overall of John Ayres, who had a pick # greater than 4?","CREATE TABLE table_name_38 (overall INTEGER, name VARCHAR, pick__number VARCHAR);","SELECT AVG(overall) FROM table_name_38 WHERE name = ""john ayres"" AND pick__number > 4;","SELECT AVG(overall) FROM table_name_38 WHERE name = ""john ayres"" AND pick__number > 4;",1 Identify the communication channels used for each climate finance project in Europe.,"CREATE TABLE climate_finance (project_name TEXT, channel TEXT);","SELECT project_name, GROUP_CONCAT(channel) as channels FROM climate_finance WHERE region = 'Europe' GROUP BY project_name;","SELECT project_name, channel FROM climate_finance WHERE country = 'Europe';",0 What is the venue of the game with Man of the Match Vaclav Zavoral?,"CREATE TABLE table_17120964_8 (venue VARCHAR, man_of_the_match VARCHAR);","SELECT venue FROM table_17120964_8 WHERE man_of_the_match = ""Vaclav Zavoral"";","SELECT venue FROM table_17120964_8 WHERE man_of_the_match = ""Vaclav Zavoral"";",1 "Identify the programs with the highest and lowest average donation amounts, along with the total donation amounts for each program.","CREATE TABLE Programs (ProgramID INT, ProgramName VARCHAR(50)); CREATE TABLE Donations (DonationID INT, ProgramID INT, DonationAmount DECIMAL); ","SELECT Programs.ProgramName, AVG(Donations.DonationAmount) as AvgDonation, SUM(Donations.DonationAmount) as TotalDonations FROM Programs JOIN Donations ON Programs.ProgramID = Donations.ProgramID GROUP BY Programs.ProgramName ORDER BY AvgDonation DESC, TotalDonations DESC, Programs.ProgramName;","SELECT Programs.ProgramName, AVG(Donations.DonationAmount) AS AvgDonation, Programs.ProgramName, SUM(Donations.DonationAmount) AS TotalDonation FROM Programs INNER JOIN Donations ON Programs.ProgramID = Donations.ProgramID GROUP BY Programs.ProgramName ORDER BY AvgDonation DESC LIMIT 1;",0 Update the 'inventory_data' table and set 'inventory_status' to 'low' for all records where 'product_name' is 'Acetone',"CREATE TABLE inventory_data (inventory_id INT, product_name VARCHAR(20), inventory_status VARCHAR(10));",UPDATE inventory_data SET inventory_status = 'low' WHERE product_name = 'Acetone';,UPDATE inventory_data SET inventory_status = 'low' WHERE product_name = 'Acetone';,1 Delete all music videos by creators from the United States.,"CREATE TABLE media_content (id INT, type TEXT, creator_country TEXT); ",DELETE FROM media_content WHERE type = 'Music Video' AND creator_country = 'United States';,DELETE FROM media_content WHERE type = 'Music' AND creator_country = 'United States';,0 What was the average cost of community development initiatives in Brazil in 2018?',"CREATE TABLE community_development_initiatives (id INT, country VARCHAR(255), year INT, cost FLOAT); ",SELECT AVG(cost) FROM community_development_initiatives WHERE country = 'Brazil' AND year = 2018;,SELECT AVG(cost) FROM community_development_initiatives WHERE country = 'Brazil' AND year = 2018;,1 What is the number of volunteers who have participated in programs in each country?,"CREATE TABLE volunteers (id INT, volunteer_name VARCHAR, country VARCHAR, program VARCHAR); CREATE TABLE programs (id INT, program VARCHAR, community VARCHAR); ","SELECT country, COUNT(*) FROM volunteers v INNER JOIN programs p ON v.program = p.program GROUP BY country;","SELECT v.country, COUNT(v.id) FROM volunteers v JOIN programs p ON v.program = p.program GROUP BY v.country;",0 What are the total freights in metric tonnes when the total transit passengers is 147791?,"CREATE TABLE table_13836704_7 (freight___metric_tonnes__ VARCHAR, transit_passengers VARCHAR);",SELECT freight___metric_tonnes__ FROM table_13836704_7 WHERE transit_passengers = 147791;,SELECT freight___metric_tonnes__ FROM table_13836704_7 WHERE transit_passengers = 147791;,1 What was the average price per gram for Indica strains in Oregon in 2021?,"CREATE TABLE prices (id INT, state VARCHAR(50), year INT, strain_type VARCHAR(50), price FLOAT); ",SELECT AVG(price) FROM prices WHERE state = 'Oregon' AND year = 2021 AND strain_type = 'Indica';,SELECT AVG(price) FROM prices WHERE state = 'Oregon' AND strain_type = 'Indica' AND year = 2021;,0 What's the title in the number 10 in the season?,"CREATE TABLE table_27117365_1 (title VARCHAR, no_in_season VARCHAR);",SELECT title FROM table_27117365_1 WHERE no_in_season = 10;,SELECT title FROM table_27117365_1 WHERE no_in_season = 10;,1 What is the maximum number of military personnel employed by a defense contractor in India?,"CREATE TABLE MilitaryPersonnel (id INT, contractor VARCHAR(50), country VARCHAR(50), personnel INT); ",SELECT MAX(personnel) FROM MilitaryPersonnel WHERE country = 'India';,SELECT MAX(personnel) FROM MilitaryPersonnel WHERE contractor = 'Defense' AND country = 'India';,0 Which Features have Yes listed under Datacenter?,"CREATE TABLE table_name_18 (features VARCHAR, datacenter VARCHAR);","SELECT features FROM table_name_18 WHERE datacenter = ""yes"";","SELECT features FROM table_name_18 WHERE datacenter = ""yes"";",1 Update Europium production records in Russia for 2018 by 10%.,"CREATE TABLE production (country VARCHAR(255), year INT, element VARCHAR(10), quantity INT); ",UPDATE production SET quantity = ROUND(quantity * 1.10) WHERE country = 'Russia' AND year = 2018 AND element = 'Eu';,UPDATE production SET quantity = quantity * 1.10 WHERE country = 'Russia' AND element = 'Europium' AND year = 2018;,0 What was the total number of arrests made in each community district for the past year?,"CREATE TABLE community_districts (cd_number INT, community_name VARCHAR(255)); CREATE TABLE arrest_data (arrest_date DATE, cd_number INT, arrest_count INT);","SELECT cd.community_name, SUM(ad.arrest_count) as total_arrests FROM community_districts cd JOIN arrest_data ad ON cd.cd_number = ad.cd_number WHERE ad.arrest_date >= CURDATE() - INTERVAL 1 YEAR GROUP BY cd.community_name;","SELECT community_districts.community_name, SUM(arrest_data.arrest_count) as total_arrests FROM community_districts INNER JOIN arrest_data ON community_districts.cd_number = arrest_data.cd_number WHERE arrest_data.arrest_date >= DATEADD(year, -1, GETDATE()) GROUP BY community_districts.community_name;",0 Who was the opponent when Hoeft (19-14) took the loss?,"CREATE TABLE table_name_1 (opponent VARCHAR, loss VARCHAR);","SELECT opponent FROM table_name_1 WHERE loss = ""hoeft (19-14)"";","SELECT opponent FROM table_name_1 WHERE loss = ""houft (19-14)"";",0 What are the latest threat intelligence indicators associated with APT29?,"CREATE TABLE threat_intelligence (indicator_id INT PRIMARY KEY, indicator TEXT, threat_actor VARCHAR(50), last_updated TIMESTAMP);",SELECT indicator FROM threat_intelligence WHERE threat_actor = 'APT29' ORDER BY last_updated DESC LIMIT 10;,"SELECT indicator, MAX(last_updated) FROM threat_intelligence WHERE threat_actor = 'APT29' GROUP BY indicator;",0 "What was the score on May 12, 2008?","CREATE TABLE table_name_8 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_8 WHERE date = ""may 12, 2008"";","SELECT score FROM table_name_8 WHERE date = ""may 12, 2008"";",1 Which district has the largest population?,"CREATE TABLE district (district_name VARCHAR, city_population VARCHAR);",SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1;,SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1;,1 "What is the average ticket price for each team, split by sport?","CREATE TABLE ticket_prices (ticket_id INT, team_id INT, sport_id INT, avg_ticket_price DECIMAL(10,2)); CREATE TABLE teams (team_id INT, team_name VARCHAR(255), sport_id INT); CREATE TABLE sports (sport_id INT, sport_name VARCHAR(255)); ","SELECT sp.sport_name, t.team_name, tp.avg_ticket_price FROM ticket_prices tp JOIN teams t ON tp.team_id = t.team_id JOIN sports sp ON t.sport_id = sp.sport_id;","SELECT t.team_name, s.sport_name, AVG(tp.avg_ticket_price) as avg_ticket_price FROM ticket_prices tp JOIN teams t ON tp.team_id = t.team_id JOIN sports s ON tp.sport_id = s.sport_id GROUP BY t.team_name, s.sport_name;",0 Where did Wales play?,"CREATE TABLE table_name_39 (venue VARCHAR, opposing_teams VARCHAR);","SELECT venue FROM table_name_39 WHERE opposing_teams = ""wales"";","SELECT venue FROM table_name_39 WHERE opposing_teams = ""wales"";",1 List all ingredients that are sourced from Australia.,"CREATE TABLE ingredient (id INT, product_id INT, name VARCHAR(50), source_country VARCHAR(50), PRIMARY KEY (id)); ",SELECT name FROM ingredient WHERE source_country = 'Australia';,SELECT * FROM ingredient WHERE source_country = 'Australia';,0 What was the endowment in 2008 of the college that was established in 1961?,"CREATE TABLE table_name_55 (endowment_as_of_2008 VARCHAR, established VARCHAR);",SELECT endowment_as_of_2008 FROM table_name_55 WHERE established = 1961;,"SELECT endowment_as_of_2008 FROM table_name_55 WHERE established = ""1961"";",0 "Which Attendance has an Opponent of phillies, and a Record of 30-33?","CREATE TABLE table_name_34 (attendance INTEGER, opponent VARCHAR, record VARCHAR);","SELECT SUM(attendance) FROM table_name_34 WHERE opponent = ""phillies"" AND record = ""30-33"";","SELECT AVG(attendance) FROM table_name_34 WHERE opponent = ""phillies"" AND record = ""30-33"";",0 "In the WCHL League, what is the last Assists with less than 65 Goals?","CREATE TABLE table_name_37 (assists INTEGER, league VARCHAR, goals VARCHAR);","SELECT MIN(assists) FROM table_name_37 WHERE league = ""wchl"" AND goals < 65;","SELECT MAX(assists) FROM table_name_37 WHERE league = ""wchl"" AND goals 65;",0 How many social enterprises are in the 'Asia-Pacific' region?,"CREATE TABLE social_enterprises (id INT, region VARCHAR(20)); ",SELECT COUNT(*) FROM social_enterprises WHERE region = 'Asia-Pacific';,SELECT COUNT(*) FROM social_enterprises WHERE region = 'Asia-Pacific';,1 What is the environmental impact of sulfuric acid?,"CREATE TABLE environmental_impact (chemical_name VARCHAR(255), impact_description TEXT);",SELECT impact_description FROM environmental_impact WHERE chemical_name = 'sulfuric acid';,SELECT impact_description FROM environmental_impact WHERE chemical_name = 'Sulfuric Acid';,0 "What is the sum of the goals with less than 30 points, a position less than 10, and more than 57 goals against?","CREATE TABLE table_name_14 (goals_for INTEGER, goals_against VARCHAR, points VARCHAR, position VARCHAR);",SELECT SUM(goals_for) FROM table_name_14 WHERE points < 30 AND position < 10 AND goals_against > 57;,SELECT SUM(goals_for) FROM table_name_14 WHERE points 30 AND position 10 AND goals_against > 57;,0 "Calculate the average salary increase for employees who have received a promotion in the last year, and the average salary increase for employees who have not received a promotion.","CREATE TABLE Employees (EmployeeID INT, EmployeeName VARCHAR(50), Department VARCHAR(50), Salary DECIMAL(10,2), PromotionDate DATE); ","SELECT CASE WHEN PromotionDate IS NOT NULL THEN 'Promoted' ELSE 'Not Promoted' END AS PromotionStatus, AVG(Salary - LAG(Salary) OVER (PARTITION BY EmployeeID ORDER BY PromotionDate)) AS AverageSalaryIncrease FROM Employees WHERE PromotionDate IS NOT NULL OR DATEADD(YEAR, -1, GETDATE()) <= PromotionDate GROUP BY PromotionStatus;","SELECT AVG(Salary) AS AvgSalary, AVG(Salary) AS AvgSalary FROM Employees WHERE PromotionDate >= DATEADD(year, -1, GETDATE());",0 Find the total billing amount for cases in the family law category that were opened before 2020-01-01.,"CREATE TABLE cases (case_id INT, category VARCHAR(20), billing_amount DECIMAL(10, 2), opened_date DATE);",SELECT SUM(billing_amount) FROM cases WHERE category = 'family' AND opened_date < '2020-01-01';,SELECT SUM(billing_amount) FROM cases WHERE category = 'family law' AND opened_date '2020-01-01';,0 Calculate the average carbon footprint for chemicals with a water usage above 1200.,"CREATE TABLE environmental_impact (id INT PRIMARY KEY, chemical_id INT, carbon_footprint INT, water_usage INT); ",SELECT AVG(carbon_footprint) FROM environmental_impact WHERE water_usage > 1200;,SELECT AVG(carbon_footprint) FROM environmental_impact WHERE water_usage > 1200;,1 "What is the sum of the pop density people/km2 with a population % of EU of 0.1%, an area % of EU of 0.1%, and has more than 0.5 population in millions?","CREATE TABLE table_name_47 (pop_density_people_km_2 INTEGER, population_in_millions VARCHAR, population__percentage_of_eu VARCHAR, area__percentage_of_eu VARCHAR);","SELECT SUM(pop_density_people_km_2) FROM table_name_47 WHERE population__percentage_of_eu = ""0.1%"" AND area__percentage_of_eu = ""0.1%"" AND population_in_millions > 0.5;","SELECT SUM(pop_density_people_km_2) FROM table_name_47 WHERE population__percentage_of_eu = ""0.1%"" AND area__percentage_of_eu = ""0.1%"" AND population_in_millions > 0.5;",1 What is the difference in property size between the largest and smallest co-owned properties in Paris?,"CREATE TABLE properties (id INT, size FLOAT, co_owned BOOLEAN, city VARCHAR(20)); ",SELECT MAX(size) - MIN(size) FROM properties WHERE city = 'Paris' AND co_owned = TRUE;,SELECT MAX(size) - MIN(size) FROM properties WHERE co_owned = true AND city = 'Paris';,0 "A what time was the title aired in October 22, 2009","CREATE TABLE table_26826304_2 (timeslot VARCHAR, air_date VARCHAR);","SELECT timeslot FROM table_26826304_2 WHERE air_date = ""October 22, 2009"";","SELECT timeslot FROM table_26826304_2 WHERE air_date = ""October 22, 2009"";",1 What is the listed crowd when essendon is the away squad?,"CREATE TABLE table_name_68 (crowd VARCHAR, away_team VARCHAR);","SELECT COUNT(crowd) FROM table_name_68 WHERE away_team = ""essendon"";","SELECT crowd FROM table_name_68 WHERE away_team = ""essendon"";",0 What is the name of the speaker from India who spoke at the AI for Social Good Summit?,"CREATE TABLE speakers (id INT PRIMARY KEY, name VARCHAR(255), organization VARCHAR(255), country VARCHAR(255)); CREATE TABLE talks (id INT PRIMARY KEY, title VARCHAR(255), speaker_id INT, conference_id INT); CREATE TABLE conferences (id INT PRIMARY KEY, name VARCHAR(255), city VARCHAR(255), start_date DATE, end_date DATE); ","SELECT speakers.name FROM speakers, talks WHERE speakers.id = talks.speaker_id AND talks.conference_id = (SELECT id FROM conferences WHERE name = 'AI for Social Good Summit') AND speakers.country = 'India';",SELECT speakers.name FROM speakers INNER JOIN talks ON speakers.id = talks.speaker_id INNER JOIN conferences ON talks.conference_id = conferences.id WHERE speakers.country = 'India' AND talks.title = 'AI for Social Good Summit';,0 What is the Total of Set 2 of 21:12?,"CREATE TABLE table_name_58 (total VARCHAR, set_2 VARCHAR);","SELECT total FROM table_name_58 WHERE set_2 = ""21:12"";","SELECT total FROM table_name_58 WHERE set_2 = ""21:12"";",1 What is the total silver when bronze is smaller than 0?,"CREATE TABLE table_name_92 (silver VARCHAR, bronze INTEGER);",SELECT COUNT(silver) FROM table_name_92 WHERE bronze < 0;,SELECT COUNT(silver) FROM table_name_92 WHERE bronze 0;,0 What is the average total cost of projects in the transportation division that have an id greater than 2?,"CREATE TABLE Projects (id INT, division VARCHAR(20), total_cost FLOAT); ",SELECT AVG(total_cost) FROM Projects WHERE division = 'transportation' AND id > 2;,SELECT AVG(total_cost) FROM Projects WHERE division = 'Transportation' AND id > 2;,0 What's the to par for Jim Thorpe in T5 Place?,"CREATE TABLE table_name_42 (to_par VARCHAR, place VARCHAR, player VARCHAR);","SELECT to_par FROM table_name_42 WHERE place = ""t5"" AND player = ""jim thorpe"";","SELECT to_par FROM table_name_42 WHERE place = ""t5"" AND player = ""jim thorpe"";",1 Show the total savings of customers who have a high financial capability score,"CREATE TABLE customers (customer_id INT, financial_capability_score INT, savings DECIMAL(10,2));",SELECT SUM(savings) FROM customers WHERE financial_capability_score > 7;,SELECT SUM(savings) FROM customers WHERE financial_capability_score = (SELECT MAX(savings) FROM customers);,0 Who was the home team when the venue was Junction Oval?,"CREATE TABLE table_name_82 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_82 WHERE venue = ""junction oval"";","SELECT home_team FROM table_name_82 WHERE venue = ""junction oval"";",1 WHo is the Asian rider classification that has ruslan ivanov on the Stage of 9?,"CREATE TABLE table_name_43 (asian_rider_classification VARCHAR, general_classification VARCHAR, stage VARCHAR);","SELECT asian_rider_classification FROM table_name_43 WHERE general_classification = ""ruslan ivanov"" AND stage = ""9"";","SELECT asian_rider_classification FROM table_name_43 WHERE general_classification = ""ruslan ivanov"" AND stage = ""9"";",1 How many points did he have when he has in the 34th position? ,"CREATE TABLE table_24998088_1 (points VARCHAR, position VARCHAR);","SELECT points FROM table_24998088_1 WHERE position = ""34th"";","SELECT points FROM table_24998088_1 WHERE position = ""34th"";",1 How many different production codes are there for the episode with 4.69 million US viewers?,"CREATE TABLE table_26429543_1 (production_code VARCHAR, us_viewers__millions_ VARCHAR);","SELECT COUNT(production_code) FROM table_26429543_1 WHERE us_viewers__millions_ = ""4.69"";","SELECT COUNT(production_code) FROM table_26429543_1 WHERE us_viewers__millions_ = ""4.69"";",1 Show athlete names who have never received a wellbeing program reward.,"CREATE TABLE athletes (athlete_id INT, athlete_name VARCHAR(20)); CREATE TABLE rewards (reward_id INT, athlete_id INT, reward_date DATE); ",SELECT DISTINCT athletes.athlete_name FROM athletes LEFT JOIN rewards ON athletes.athlete_id = rewards.athlete_id WHERE rewards.athlete_id IS NULL;,SELECT athletes.athlete_name FROM athletes INNER JOIN rewards ON athletes.athlete_id = rewards.athlete_id WHERE rewards.reward_id IS NULL;,0 "Insert new records into the ""zip_codes"" table","CREATE TABLE zip_codes (zip_code VARCHAR(10), city VARCHAR(50));","INSERT INTO zip_codes (zip_code, city) VALUES ('45678', 'Newcity'), ('56789', 'Anothercity');","INSERT INTO zip_codes (zip_code, city) VALUES (4, 'New York', 'New York');",0 What is the maximum number of mental health parity violations in each region in the Pacific Islands?,"CREATE TABLE mental_health_parity_violations (violation_id INT, region TEXT, violation_count INT); ","SELECT region, MAX(violation_count) FROM mental_health_parity_violations GROUP BY region;","SELECT region, MAX(violation_count) FROM mental_health_parity_violations WHERE region = 'Pacific Islands' GROUP BY region;",0 Who is the home captain at the Adelaide Oval?,"CREATE TABLE table_name_14 (home_captain VARCHAR, venue VARCHAR);","SELECT home_captain FROM table_name_14 WHERE venue = ""adelaide oval"";","SELECT home_captain FROM table_name_14 WHERE venue = ""adelaide oval"";",1 Which conservation initiatives were implemented in regions with increasing contaminant levels in 2019?,"CREATE TABLE water_quality (region VARCHAR(255), year INT, contaminant_level INT); CREATE TABLE conservation_initiatives (region VARCHAR(255), year INT, initiative VARCHAR(255)); ",SELECT c.initiative FROM conservation_initiatives c JOIN water_quality w ON c.region = w.region WHERE c.year = w.year AND w.contaminant_level > (SELECT contaminant_level FROM water_quality WHERE region = w.region AND year = w.year - 1);,SELECT conservation_initiatives.initiative FROM conservation_initiatives INNER JOIN water_quality ON conservation_initiatives.region = water_quality.region WHERE water_quality.year = 2019 AND water_quality.contaminant_level > (SELECT contaminant_level FROM water_quality WHERE water_quality.year = 2019);,0 What is the total number of marine species in the Sea of Okhotsk?,"CREATE TABLE marine_species (species_name TEXT, region TEXT); ",SELECT COUNT(*) FROM marine_species WHERE region = 'Sea of Okhotsk';,SELECT COUNT(*) FROM marine_species WHERE region = 'Sea of Okhotsk';,1 What is the number of unique users who streamed music during each month of 2021?,"CREATE TABLE music_streaming (id INT, user_id INT, artist VARCHAR(50), song VARCHAR(50), genre VARCHAR(20), streamed_on DATE, revenue DECIMAL(10,2), streams INT); CREATE VIEW monthly_user_streams AS SELECT DATE_TRUNC('month', streamed_on) AS month, user_id FROM music_streaming GROUP BY month, user_id;","SELECT month, COUNT(DISTINCT user_id) FROM monthly_user_streams WHERE streamed_on BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY month ORDER BY month;","SELECT DATE_TRUNC('month', streamed_on) AS month, user_id, COUNT(DISTINCT user_id) AS unique_users FROM monthly_user_streams WHERE YEAR(streamed_on) = 2021 GROUP BY month, user_id;",0 "Who was the Opponent when the Save was || 36,388 ||15-7||?","CREATE TABLE table_name_26 (opponent VARCHAR, save VARCHAR);","SELECT opponent FROM table_name_26 WHERE save = ""|| 36,388 ||15-7||"";","SELECT opponent FROM table_name_26 WHERE save = ""| 36,388 ||15-7||"";",0 "What is the lowest gain with an 18 long, and a loss less than 191?","CREATE TABLE table_name_40 (gain INTEGER, long VARCHAR, loss VARCHAR);",SELECT MIN(gain) FROM table_name_40 WHERE long = 18 AND loss < 191;,SELECT MIN(gain) FROM table_name_40 WHERE long = 18 AND loss 191;,0 "When was the institution in boise, idaho founded?","CREATE TABLE table_27816698_2 (founded VARCHAR, location VARCHAR);","SELECT founded FROM table_27816698_2 WHERE location = ""Boise, Idaho"";","SELECT founded FROM table_27816698_2 WHERE location = ""Boise, Idaho"";",1 How much money was won for the game with a score of 74-76-71-71=292?,"CREATE TABLE table_name_17 (money___$__ VARCHAR, score VARCHAR);",SELECT money___$__ FROM table_name_17 WHERE score = 74 - 76 - 71 - 71 = 292;,SELECT money___$__ FROM table_name_17 WHERE score = 74 - 76 - 71 - 71 = 292;,1 What rank is Partizan Igokea that has less than 130 rebounds?,"CREATE TABLE table_name_53 (rank INTEGER, rebounds VARCHAR, team VARCHAR);","SELECT MIN(rank) FROM table_name_53 WHERE rebounds < 130 AND team = ""partizan igokea"";","SELECT SUM(rank) FROM table_name_53 WHERE rebounds 130 AND team = ""partizan igokea"";",0 "Display the number of users who have joined each month, for the past 12 months.","CREATE TABLE Memberships (id INT, user_id INT, start_date DATE); ","SELECT EXTRACT(MONTH FROM start_date) AS month, COUNT(DISTINCT user_id) AS users FROM Memberships WHERE start_date >= DATEADD(MONTH, -12, CURRENT_DATE) GROUP BY month ORDER BY month;","SELECT EXTRACT(MONTH FROM start_date) AS month, COUNT(DISTINCT user_id) AS num_users FROM Memberships WHERE start_date >= DATEADD(month, -12, GETDATE()) GROUP BY month;",0 List all donors who have given to both 'Habitat for Humanity' and 'Red Cross'.,"CREATE TABLE donor (donor_id INT, donor_name TEXT); CREATE TABLE donation (donation_id INT, donor_id INT, org_id INT); ",SELECT donor_name FROM donor WHERE donor_id IN (SELECT donation.donor_id FROM donation WHERE org_id = 1) INTERSECT SELECT donor_name FROM donor WHERE donor_id IN (SELECT donation.donor_id FROM donation WHERE org_id = 2);,"SELECT d.donor_name FROM donor d JOIN donation d ON d.donor_id = d.donor_id JOIN donation d ON d.donor_id = d.donor_id WHERE d.org_id IN ('Habitat for Humanity', 'Red Cross');",0 How many autonomous driving research papers have been published in Asia?,"CREATE TABLE ResearchPapers (Id INT, Title VARCHAR(50), PublicationDate DATE, Country VARCHAR(20)); ",SELECT COUNT(*) FROM ResearchPapers WHERE Country = 'Japan' OR Country = 'China';,SELECT COUNT(*) FROM ResearchPapers WHERE Country = 'Asia' AND Title LIKE '%Autonomous Driving%';,0 Show the total number of exits made by startups founded by refugees,"CREATE TABLE startups(id INT, name TEXT, founding_year INT, founder_refugee BOOLEAN); CREATE TABLE exits(id INT, startup_id INT, exit_type TEXT, exit_value FLOAT); ",SELECT COUNT(*) FROM startups s JOIN exits e ON s.id = e.startup_id WHERE s.founder_refugee = true;,SELECT COUNT(*) FROM exits JOIN startups ON exits.startup_id = startups.id WHERE startups.founder_refugee = TRUE;,0 What is the total amount of funding received from foundation sources in the year 2019?,"CREATE TABLE Funding (FundingID int, FundingAmount decimal(10,2), FundingDate date, FundingSource varchar(50)); ",SELECT SUM(FundingAmount) FROM Funding WHERE FundingDate BETWEEN '2019-01-01' AND '2019-12-31' AND FundingSource = 'Foundation';,SELECT SUM(FundingAmount) FROM Funding WHERE FundingSource = 'Foundation' AND YEAR(FundingDate) = 2019;,0 What is the 2008 of the 2r 2011 and A 2010?,CREATE TABLE table_name_38 (Id VARCHAR);,"SELECT 2008 FROM table_name_38 WHERE 2011 = ""2r"" AND 2010 = ""a"";","SELECT 2008 FROM table_name_38 WHERE 2011 = ""2r"" AND 2010 = ""a"";",1 What position was Parsons in for 1992? ,"CREATE TABLE table_2597876_1 (position VARCHAR, year VARCHAR);",SELECT position FROM table_2597876_1 WHERE year = 1992;,SELECT position FROM table_2597876_1 WHERE year = 1992;,1 What is the production code of the episode directed by Stacie Lipp?,"CREATE TABLE table_2226817_9 (production_code VARCHAR, written_by VARCHAR);","SELECT production_code FROM table_2226817_9 WHERE written_by = ""Stacie Lipp"";","SELECT production_code FROM table_2226817_9 WHERE written_by = ""Stacie Lipp"";",1 "In 1981, with a studio host of Dave Hodge, who was the colour commentator?","CREATE TABLE table_name_17 (colour_commentator_s_ VARCHAR, studio_host VARCHAR, year VARCHAR);","SELECT colour_commentator_s_ FROM table_name_17 WHERE studio_host = ""dave hodge"" AND year = 1981;","SELECT colour_commentator_s_ FROM table_name_17 WHERE studio_host = ""dave hodge"" AND year = 1981;",1 "What is the highest value for Byes, when Against is less than 1794, when Losses is ""6"", and when Draws is less than 0?","CREATE TABLE table_name_61 (byes INTEGER, draws VARCHAR, against VARCHAR, losses VARCHAR);",SELECT MAX(byes) FROM table_name_61 WHERE against < 1794 AND losses = 6 AND draws < 0;,SELECT MAX(byes) FROM table_name_61 WHERE against 1794 AND losses = 6 AND draws 0;,0 What was the second qualification time with a first qualification time of 1:02.813?,"CREATE TABLE table_name_29 (qual_2 VARCHAR, qual_1 VARCHAR);","SELECT qual_2 FROM table_name_29 WHERE qual_1 = ""1:02.813"";","SELECT qual_2 FROM table_name_29 WHERE qual_1 = ""1:02.813"";",1 "How many hotels in Sydney, Australia, have more than 4 stars?","CREATE TABLE hotel_ratings (hotel_id INT, hotel_name VARCHAR(255), city VARCHAR(255), country VARCHAR(255), stars INT); ",SELECT COUNT(*) FROM hotel_ratings WHERE city = 'Sydney' AND country = 'Australia' AND stars > 4;,SELECT COUNT(*) FROM hotel_ratings WHERE city = 'Sydney' AND country = 'Australia' AND stars > 4;,1 Scunthorpe United as the home team has what tie number?,"CREATE TABLE table_name_52 (tie_no VARCHAR, home_team VARCHAR);","SELECT tie_no FROM table_name_52 WHERE home_team = ""scunthorpe united"";","SELECT tie_no FROM table_name_52 WHERE home_team = ""scunthorpe united"";",1 Which mobile subscribers have not updated their billing address in the last 6 months?,"CREATE TABLE mobile_subscribers (subscriber_id INT, first_name VARCHAR(50), last_name VARCHAR(50), billing_address VARCHAR(100), last_updated_date DATE);","SELECT subscriber_id, first_name, last_name, billing_address FROM mobile_subscribers WHERE last_updated_date < DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);","SELECT subscriber_id, first_name, last_name, billing_address FROM mobile_subscribers WHERE last_updated_date DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",0 How many tourists visited New Zealand in 2019?,"CREATE TABLE visitor_stats (destination VARCHAR(255), year INT, tourists INT); ",SELECT tourists FROM visitor_stats WHERE destination = 'New Zealand' AND year = 2019;,SELECT SUM(tourists) FROM visitor_stats WHERE destination = 'New Zealand' AND year = 2019;,0 what amount of try bonus where the game was won by 11?,"CREATE TABLE table_13564637_3 (try_bonus VARCHAR, won VARCHAR);","SELECT COUNT(try_bonus) FROM table_13564637_3 WHERE won = ""11"";","SELECT try_bonus FROM table_13564637_3 WHERE won = ""11"";",0 "What is the percentage of total cargo weight that each cargo item represents, per port, in descending order?","CREATE TABLE Port (PortID INT, PortName VARCHAR(100), City VARCHAR(100), Country VARCHAR(100)); CREATE TABLE Cargo (CargoID INT, CargoName VARCHAR(100), PortID INT, Weight INT, Volume INT); CREATE TABLE PortCargo (PortID INT, CargoID INT, Weight INT, Volume INT); ","SELECT PortID, CargoID, Weight, Volume, PERCENT_RANK() OVER(PARTITION BY PortID ORDER BY SUM(Weight) OVER(PARTITION BY PortID) DESC) AS WeightPercentage FROM PortCargo ORDER BY PortID, WeightPercentage DESC","SELECT p.PortName, (COUNT(c.CargoID) * 100.0 / (SELECT COUNT(*) FROM Cargo c JOIN PortCargo pc ON c.PortID = pc.PortID)) as Percentage FROM Port p JOIN Cargo c ON p.PortID = c.PortID JOIN PortCargo pc ON p.PortID = pc.PortID GROUP BY p.PortName ORDER BY Percentage DESC;",0 Who directed the film titled 'Steam of Life'?,"CREATE TABLE table_22020724_1 (director VARCHAR, film_title_used_in_nomination VARCHAR);","SELECT director FROM table_22020724_1 WHERE film_title_used_in_nomination = ""Steam of Life"";","SELECT director FROM table_22020724_1 WHERE film_title_used_in_nomination = ""Steam of Life"";",1 What is the total number of cultural events in a given year?,"CREATE TABLE CulturalEvents (id INT, name VARCHAR(50), year INT, category VARCHAR(50), attendance INT); ","SELECT year, SUM(attendance) FROM CulturalEvents GROUP BY year;","SELECT year, SUM(attendance) FROM CulturalEvents GROUP BY year;",1 How many entries are shown for viewers when the airdate was 26 november 2009?,"CREATE TABLE table_24399615_3 (viewers VARCHAR, airdate VARCHAR);","SELECT COUNT(viewers) FROM table_24399615_3 WHERE airdate = ""26 November 2009"";","SELECT COUNT(viewers) FROM table_24399615_3 WHERE airdate = ""26 November 2009"";",1 What is the average labor cost per hour for each trade in the 'labor_statistics' table?,"CREATE TABLE labor_statistics (trade VARCHAR(255), hourly_wage DECIMAL(5,2));","select trade, avg(hourly_wage) as avg_hourly_wage from labor_statistics group by trade;","SELECT trade, AVG(hourly_wage) FROM labor_statistics GROUP BY trade;",0 What is the average number of labor rights violations in the Mining sector over the last 3 years?,"CREATE TABLE LaborRights (id INT, year INT, sector VARCHAR(255), violations INT); ",SELECT AVG(violations) FROM LaborRights WHERE sector = 'Mining' AND year BETWEEN 2019 AND 2021;,SELECT AVG(violations) FROM LaborRights WHERE sector = 'Mining' AND year BETWEEN 2019 AND 2021;,1 What was the departure time when the arrival was 14.40?,"CREATE TABLE table_18332845_2 (departure VARCHAR, arrival VARCHAR);","SELECT departure FROM table_18332845_2 WHERE arrival = ""14.40"";","SELECT departure FROM table_18332845_2 WHERE arrival = ""14.40"";",1 What is the minimum time between subway train arrivals in New York City?,"CREATE TABLE subway_stations (station_id INT, station_name VARCHAR(50), city VARCHAR(50), time_between_arrivals TIME); ",SELECT MIN(TIME_TO_SEC(time_between_arrivals))/60.0 FROM subway_stations WHERE city = 'New York City';,SELECT MIN(time_between_arrivals) FROM subway_stations WHERE city = 'New York City';,0 What is the maximum environmental impact score for mining operations in Year 2000?,"CREATE TABLE environmental_impact (id INT, mining_operation TEXT, year INT, score FLOAT); ",SELECT MAX(score) FROM environmental_impact WHERE year = 2000 AND mining_operation LIKE '%Mining%';,SELECT MAX(score) FROM environmental_impact WHERE year = 2000;,0 How many transportation projects are currently underway in New York City?,"CREATE TABLE projects (id INT, name VARCHAR(255), location VARCHAR(255), type VARCHAR(255), status VARCHAR(255)); ","SELECT COUNT(*) FROM projects WHERE location = 'New York, NY' AND status = 'In Progress' AND type = 'Transportation';",SELECT COUNT(*) FROM projects WHERE location = 'New York City' AND type = 'Transportation' AND status = 'Endangered';,0 List the names and research interests of all professors who have received a research grant.,"CREATE TABLE professors (id INT, name VARCHAR(50), department VARCHAR(50), research_interest VARCHAR(50), grant INT); ","SELECT name, research_interest FROM professors WHERE grant = 1;","SELECT name, research_interest FROM professors WHERE grant = 1;",1 "Which new team has a compensation-a round, and Frank Catalanotto as a player?","CREATE TABLE table_name_27 (new_team VARCHAR, round VARCHAR, player VARCHAR);","SELECT new_team FROM table_name_27 WHERE round = ""compensation-a"" AND player = ""frank catalanotto"";","SELECT new_team FROM table_name_27 WHERE round = ""compensation-a"" AND player = ""frank catalanotto"";",1 What is the date of the match with a winner outcome and jim courier as the opponent in the final?,"CREATE TABLE table_name_27 (date VARCHAR, outcome VARCHAR, opponent_in_the_final VARCHAR);","SELECT date FROM table_name_27 WHERE outcome = ""winner"" AND opponent_in_the_final = ""jim courier"";","SELECT date FROM table_name_27 WHERE outcome = ""winner"" AND opponent_in_the_final = ""jim courier"";",1 available subnets leading total is?,CREATE TABLE table_149426_4 (available_subnets INTEGER);,SELECT MAX(available_subnets) FROM table_149426_4;,SELECT MAX(available_subnets) FROM table_149426_4;,1 Show all the locations where no cinema has capacity over 800.,"CREATE TABLE cinema (LOCATION VARCHAR, capacity INTEGER);",SELECT LOCATION FROM cinema EXCEPT SELECT LOCATION FROM cinema WHERE capacity > 800;,SELECT LOCATION FROM cinema WHERE capacity 800;,0 "What is the average time to complete a safety audit, partitioned by facility and ordered by the longest average times first?","CREATE TABLE safety_audit (audit_id INT, facility_id INT, audit_duration INT); CREATE TABLE facility (facility_id INT, facility_name VARCHAR(255));","SELECT facility_name, facility_id, AVG(audit_duration) AS avg_audit_time FROM safety_audit JOIN facility ON safety_audit.facility_id = facility.facility_id GROUP BY facility_id, facility_name ORDER BY avg_audit_time DESC;","SELECT f.facility_name, AVG(sa.audit_duration) as avg_time FROM safety_audit sa JOIN facility f ON sa.facility_id = f.facility_id GROUP BY f.facility_name ORDER BY avg_time DESC;",0 What is the maximum billing amount for cases in the 'Civil' category?,"CREATE TABLE cases (case_id INT, attorney_id INT, category VARCHAR(20), billing_amount DECIMAL); ",SELECT MAX(billing_amount) FROM cases WHERE category = 'Civil';,SELECT MAX(billing_amount) FROM cases WHERE category = 'Civil';,1 What are the names of managers in ascending order of level?,"CREATE TABLE manager (Name VARCHAR, LEVEL VARCHAR);",SELECT Name FROM manager ORDER BY LEVEL;,SELECT Name FROM manager ORDER BY LEVEL;,1 List all mining sites that have higher coal depletion compared to gold depletion.,"CREATE TABLE coal_depletion (site_id INT, amount FLOAT); CREATE TABLE gold_depletion (site_id INT, amount FLOAT); ","SELECT c.site_id, c.amount as coal_depletion, g.amount as gold_depletion FROM coal_depletion c INNER JOIN gold_depletion g ON c.site_id = g.site_id WHERE c.amount > g.amount;",SELECT s.site_name FROM coal_depletion s INNER JOIN gold_depletion g ON s.site_id = g.site_id WHERE s.amount > g.amount;,0 How many visitors with disabilities visited our museum in the last quarter?,"CREATE TABLE visitors (id INT, disability BOOLEAN, visit_date DATE); ","SELECT COUNT(*) FROM visitors WHERE disability = true AND visit_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH);","SELECT COUNT(*) FROM visitors WHERE disability = TRUE AND visit_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH);",0 "Type of mi-10r, and a Record description of altitude with kg (lb) payload, and a Pilot of g.v. alfyorov is what date?","CREATE TABLE table_name_97 (date VARCHAR, pilot VARCHAR, type VARCHAR, record_description VARCHAR);","SELECT date FROM table_name_97 WHERE type = ""mi-10r"" AND record_description = ""altitude with kg (lb) payload"" AND pilot = ""g.v. alfyorov"";","SELECT date FROM table_name_97 WHERE type = ""mi-10r"" AND record_description = ""altitude with kg (lb) payload"" AND pilot = ""g.v. alfyorov"";",1 What name has a listed of 03/31/1989 in spartanburg county?,"CREATE TABLE table_name_19 (name VARCHAR, listed VARCHAR, county VARCHAR);","SELECT name FROM table_name_19 WHERE listed = ""03/31/1989"" AND county = ""spartanburg"";","SELECT name FROM table_name_19 WHERE listed = ""03/31/1989"" AND county = ""spartanburg"";",1 What are the names of Indigenous artisans who specialize in weaving?,"CREATE TABLE Artisans (ArtisanID INT PRIMARY KEY, Name VARCHAR(100), Specialty VARCHAR(50), Nation VARCHAR(50)); ",SELECT Name FROM Artisans WHERE Specialty = 'Weaving' AND Nation = 'Navajo';,SELECT Name FROM Artisans WHERE Specialty = 'Weaving' AND Nation = 'Indigenous';,0 What date has the competition of uefa euro 2012 qualifying?,"CREATE TABLE table_name_77 (date VARCHAR, competition VARCHAR);","SELECT date FROM table_name_77 WHERE competition = ""uefa euro 2012 qualifying"";","SELECT date FROM table_name_77 WHERE competition = ""uefa euro 2012 qualifying"";",1 How many writers write the episode whose director is Jonathan Herron?,"CREATE TABLE table_22580855_1 (written_by VARCHAR, directed_by VARCHAR);","SELECT COUNT(written_by) FROM table_22580855_1 WHERE directed_by = ""Jonathan Herron"";","SELECT COUNT(written_by) FROM table_22580855_1 WHERE directed_by = ""Jonathan Herron"";",1 What as the production code for the episode directed by Robert Duncan McNeill?,"CREATE TABLE table_24319661_5 (production_code VARCHAR, directed_by VARCHAR);","SELECT production_code FROM table_24319661_5 WHERE directed_by = ""Robert Duncan McNeill"";","SELECT production_code FROM table_24319661_5 WHERE directed_by = ""Robert Duncan McNeill"";",1 What is Geelong's home team score?,CREATE TABLE table_name_89 (home_team VARCHAR);,"SELECT home_team AS score FROM table_name_89 WHERE home_team = ""geelong"";","SELECT home_team AS score FROM table_name_89 WHERE home_team = ""geelong"";",1 Which district is associated with the incumbent Carl Vinson?,"CREATE TABLE table_1342233_11 (candidates VARCHAR, incumbent VARCHAR);","SELECT candidates FROM table_1342233_11 WHERE incumbent = ""Carl Vinson"";","SELECT candidates FROM table_1342233_11 WHERE incumbent = ""Carl Vinson"";",1 "What was the total fare collected from the Blue Line on February 14th, 2022?","CREATE TABLE routes (route_id INT, route_name VARCHAR(255)); CREATE TABLE fares (fare_id INT, route_id INT, fare_amount DECIMAL(5,2), fare_date DATE); ",SELECT SUM(fare_amount) FROM fares WHERE route_id = 2 AND fare_date = '2022-02-14';,SELECT SUM(fare_amount) FROM fares f JOIN routes r ON f.route_id = r.route_id WHERE r.route_name = 'Blue Line' AND f.fare_date BETWEEN '2022-02-14' AND '2022-02-28';,0 What are the public schools with a master's university?,"CREATE TABLE table_2076595_1 (location_s_ VARCHAR, control VARCHAR, type VARCHAR);","SELECT location_s_ FROM table_2076595_1 WHERE control = ""Public"" AND type = ""Master's university"";","SELECT location_s_ FROM table_2076595_1 WHERE control = ""Public"" AND type = ""Master's University"";",0 "Who was the opponent in a week below 14 on October 10, 1993?","CREATE TABLE table_name_18 (opponent VARCHAR, week VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_18 WHERE week < 14 AND date = ""october 10, 1993"";","SELECT opponent FROM table_name_18 WHERE week 14 AND date = ""october 10, 1993"";",0 "Drop the ""top_students"" view.","CREATE TABLE students (student_id INT, name VARCHAR(255), major VARCHAR(255), gpa DECIMAL(3,2)); CREATE VIEW top_students AS SELECT * FROM students WHERE gpa >= 3.5;",DROP VIEW top_students;,DROP VIEW top_students;,1 What is the total number of Round that has a Time of 6:04?,"CREATE TABLE table_name_85 (round INTEGER, time VARCHAR);","SELECT SUM(round) FROM table_name_85 WHERE time = ""6:04"";","SELECT SUM(round) FROM table_name_85 WHERE time = ""6:04"";",1 "What is Qual 1, when Qual 2 is 1:27.537?","CREATE TABLE table_name_80 (qual_1 VARCHAR, qual_2 VARCHAR);","SELECT qual_1 FROM table_name_80 WHERE qual_2 = ""1:27.537"";","SELECT qual_1 FROM table_name_80 WHERE qual_2 = ""1:27.37"";",0 What is the smallest round to have a record of 4-0?,"CREATE TABLE table_name_95 (round INTEGER, record VARCHAR);","SELECT MIN(round) FROM table_name_95 WHERE record = ""4-0"";","SELECT MIN(round) FROM table_name_95 WHERE record = ""4-0"";",1 "Insert a new record for a female African American founder from Nigeria into the ""company_diversity"" table","CREATE TABLE company_diversity (id INT PRIMARY KEY, company_id INT, founder_gender VARCHAR(10), founder_ethnicity VARCHAR(20), country VARCHAR(20)); ","INSERT INTO company_diversity (id, company_id, founder_gender, founder_ethnicity, country) VALUES (3, 1003, 'female', 'African American', 'NG');","INSERT INTO company_diversity (id, company_id, founder_gender, founder_ethnicity, country) VALUES (1, 'Female African American', 'Nigeria');",0 What was the attendance when the record was 77-54?,"CREATE TABLE table_name_90 (attendance INTEGER, record VARCHAR);","SELECT MIN(attendance) FROM table_name_90 WHERE record = ""77-54"";","SELECT AVG(attendance) FROM table_name_90 WHERE record = ""77-54"";",0 What is the total number of pollution control initiatives in the Arctic Ocean and Antarctic Ocean?,"CREATE TABLE pollution_control_initiatives (id INT, name TEXT, location TEXT, year INT); ","SELECT SUM(1) FROM pollution_control_initiatives WHERE location IN ('Arctic Ocean', 'Antarctic Ocean');","SELECT COUNT(*) FROM pollution_control_initiatives WHERE location IN ('Arctic Ocean', 'Antarctic Ocean');",0 Which Driver has an Entrant of Arrows Racing Team and Rounds 1-3?,"CREATE TABLE table_name_25 (driver VARCHAR, entrant VARCHAR, rounds VARCHAR);","SELECT driver FROM table_name_25 WHERE entrant = ""arrows racing team"" AND rounds = ""1-3"";","SELECT driver FROM table_name_25 WHERE entrant = ""arrows racing team"" AND rounds = ""1-3"";",1 What is the total number of cases in the 'court_cases' table?,"CREATE TABLE court_cases (id INT, case_number INT, filing_date DATE, case_type VARCHAR(50), case_status VARCHAR(50)); ",SELECT COUNT(*) FROM court_cases;,SELECT COUNT(*) FROM court_cases;,1 How many times is the series italian and the circuit is valencia?,"CREATE TABLE table_26920192_5 (round VARCHAR, series VARCHAR, circuit VARCHAR);","SELECT COUNT(round) FROM table_26920192_5 WHERE series = ""Italian"" AND circuit = ""Valencia"";","SELECT COUNT(round) FROM table_26920192_5 WHERE series = ""Italian"" AND circuit = ""Valencia"";",1 "What is Career with the franchise [b ], when Previous Team is ""New Jersey Nets""?","CREATE TABLE table_name_68 (career_with_the_franchise_ VARCHAR, b_ VARCHAR, previous_team VARCHAR);","SELECT career_with_the_franchise_[b_] FROM table_name_68 WHERE previous_team = ""new jersey nets"";","SELECT career_with_the_franchise_[b_] FROM table_name_68 WHERE previous_team = ""new jersey nets"";",1 What is the total area size of all marine protected areas with a conservation status of 'Endangered'?,"CREATE TABLE marine_protected_areas (id INT, name VARCHAR(255), area_size FLOAT, conservation_status VARCHAR(100)); ",SELECT SUM(area_size) FROM marine_protected_areas WHERE conservation_status = 'Endangered';,SELECT SUM(area_size) FROM marine_protected_areas WHERE conservation_status = 'Endangered';,1 Who was the home when the visitor was New York Knicks?,"CREATE TABLE table_name_79 (home VARCHAR, visitor VARCHAR);","SELECT home FROM table_name_79 WHERE visitor = ""new york knicks"";","SELECT home FROM table_name_79 WHERE visitor = ""new york knicks"";",1 What is the total quantity of products manufactured by companies located in the US and Canada?,"CREATE TABLE Manufacturing_Companies (Company_ID INT, Company_Name VARCHAR(100), Country VARCHAR(50)); CREATE TABLE Products (Product_ID INT, Company_ID INT, Product_Name VARCHAR(100), Quantity_Manufactured INT); ","SELECT SUM(Quantity_Manufactured) FROM Products INNER JOIN Manufacturing_Companies ON Products.Company_ID = Manufacturing_Companies.Company_ID WHERE Country IN ('USA', 'Canada');","SELECT SUM(Quantity_Manufactured) FROM Products JOIN Manufacturing_Companies ON Products.Company_ID = Manufacturing_Companies.Company_ID WHERE Manufacturing_Companies.Country IN ('USA', 'Canada');",0 Which model has a frequency of 750 mhz and a socket of bga2μpga2?,"CREATE TABLE table_name_19 (model_number VARCHAR, frequency VARCHAR, socket VARCHAR);","SELECT model_number FROM table_name_19 WHERE frequency = ""750 mhz"" AND socket = ""bga2μpga2"";","SELECT model_number FROM table_name_19 WHERE frequency = ""750 mhz"" AND socket = ""bga2pga2"";",0 What is the total CO2 emission in the Arctic by industry since 2000?,"CREATE TABLE co2_emission (country VARCHAR(50), year INT, industry VARCHAR(50), co2_emission FLOAT); ","SELECT c.country, c.industry, SUM(c.co2_emission) as total_emission FROM co2_emission c GROUP BY c.country, c.industry;","SELECT industry, SUM(co2_emission) FROM co2_emission WHERE country = 'Arctic' AND year >= 2000 GROUP BY industry;",0 What visitor has Ottawa as a home and a date of April 26?,"CREATE TABLE table_name_20 (visitor VARCHAR, home VARCHAR, date VARCHAR);","SELECT visitor FROM table_name_20 WHERE home = ""ottawa"" AND date = ""april 26"";","SELECT visitor FROM table_name_20 WHERE home = ""ottawa"" AND date = ""april 26"";",1 "What was the result when 58,516 were in attendance?","CREATE TABLE table_name_70 (result VARCHAR, attendance VARCHAR);","SELECT result FROM table_name_70 WHERE attendance = ""58,516"";","SELECT result FROM table_name_70 WHERE attendance = ""58,516"";",1 What type of game had a result of 1:2?,"CREATE TABLE table_name_7 (type_of_game VARCHAR, results¹ VARCHAR);","SELECT type_of_game FROM table_name_7 WHERE results¹ = ""1:2"";","SELECT type_of_game FROM table_name_7 WHERE results1 = ""1:1"";",0 What is the percentage of crimes committed by juveniles compared to adults?,"CREATE TABLE crimes (age VARCHAR(255), count INT); ","SELECT age, count, 100.0 * count / SUM(count) OVER () FROM crimes;",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM crimes WHERE age = 'Jugend')) * 100.0 / (SELECT COUNT(*) FROM crimes WHERE age = 'adult');,0 "Name the Team which has Points larger than 9, and a Year larger than 1971, and a Class of 250cc?","CREATE TABLE table_name_12 (team VARCHAR, class VARCHAR, points VARCHAR, year VARCHAR);","SELECT team FROM table_name_12 WHERE points > 9 AND year > 1971 AND class = ""250cc"";","SELECT team FROM table_name_12 WHERE points > 9 AND year > 1971 AND class = ""250cc"";",1 List all union members from the 'construction' industry in New York.,"CREATE TABLE union_members (id INT, name VARCHAR(50), union_id INT, industry VARCHAR(20)); ","SELECT name, industry FROM union_members WHERE industry = 'construction' AND state = 'New York';",SELECT name FROM union_members WHERE industry = 'construction';,0 What is the total number of games played by all soccer players in the 'players' table?,"CREATE TABLE games (game_id INT, team VARCHAR(50), opponent VARCHAR(50), goals INT); CREATE TABLE players (player_id INT, name VARCHAR(50), age INT, position VARCHAR(20), team VARCHAR(50), games INT); ",SELECT SUM(games) FROM players WHERE position = 'Soccer Player';,SELECT SUM(games) FROM players INNER JOIN games ON players.game_id = games.game_id WHERE players.position = 'Soccer';,0 "What is Record, when High Points is ""Ray Allen (20)""?","CREATE TABLE table_name_98 (record VARCHAR, high_points VARCHAR);","SELECT record FROM table_name_98 WHERE high_points = ""ray allen (20)"";","SELECT record FROM table_name_98 WHERE high_points = ""ray allen (20)"";",1 "What is the total number of cases and the maximum bail amount in 'justice_cases' table, filtered by 'Violent Crime'?","CREATE TABLE justice_cases (id INT, case_type TEXT, bail_amount INT); ","SELECT COUNT(*), MAX(bail_amount) FROM justice_cases WHERE case_type = 'Violent Crime';","SELECT case_type, COUNT(*), MAX(bail_amount) FROM justice_cases WHERE case_type = 'Violent Crime' GROUP BY case_type;",0 What game did the Buffalo Bills' opponents earn more than 28 points?,"CREATE TABLE table_name_59 (game VARCHAR, opponents INTEGER);",SELECT game FROM table_name_59 WHERE opponents > 28;,SELECT game FROM table_name_59 WHERE opponents > 28;,1 What is the monthly trend of new smart contracts and unique contract callers on the Binance Smart Chain?,"CREATE TABLE bsc_smart_contracts (contract_address VARCHAR(255), creation_date DATE); CREATE TABLE bsc_contract_callers (contract_caller VARCHAR(255), contract_address VARCHAR(255), call_date DATE); CREATE VIEW bsc_monthly_contracts AS SELECT EXTRACT(MONTH FROM creation_date) as month, COUNT(DISTINCT contract_address) as new_contracts FROM bsc_smart_contracts GROUP BY month; CREATE VIEW bsc_monthly_callers AS SELECT EXTRACT(MONTH FROM call_date) as month, COUNT(DISTINCT contract_caller) as unique_callers FROM bsc_contract_callers GROUP BY month;","SELECT mc.month, mc.new_contracts, mc.unique_callers FROM bsc_monthly_contracts mc JOIN bsc_monthly_callers mc2 ON mc2.month = mc.month;","SELECT EXTRACT(MONTH FROM creation_date) AS month, EXTRACT(MONTH FROM call_date) AS month, EXTRACT(MONTH FROM call_date) AS month, EXTRACT(MONTH FROM call_date) AS month, EXTRACT(MONTH FROM call_date) AS month, EXTRACT(MONTH FROM call_date) AS month, EXTRACT(MONTH FROM call_date) AS month, EXTRACT(MONTH FROM bsc_monthly_callers) AS unique_callers FROM bsc_monthly_callers GROUP BY month;",0 Who are the top 3 vendors selling the most sustainable products in New York?,"CREATE TABLE vendors (vendor_id INT, vendor_name VARCHAR(50), state VARCHAR(50)); CREATE TABLE products (product_id INT, product_name VARCHAR(50), vendor_id INT, sustainability_rating INT); ","SELECT vendors.vendor_name, SUM(products.sustainability_rating) as total_rating FROM vendors JOIN products ON vendors.vendor_id = products.vendor_id WHERE vendors.state = 'New York' GROUP BY vendors.vendor_id, vendors.vendor_name ORDER BY total_rating DESC LIMIT 3;","SELECT v.vendor_name, COUNT(p.product_id) as sustainability_rating FROM vendors v JOIN products p ON v.vendor_id = p.vendor_id WHERE v.state = 'New York' GROUP BY v.vendor_name ORDER BY sustainability_rating DESC LIMIT 3;",0 "What is the total volume of paper waste generated in 2020, categorized by country for India, China, and Japan?","CREATE TABLE WasteGeneration (year INT, country VARCHAR(50), material VARCHAR(50), volume FLOAT); ","SELECT country, SUM(volume) FROM WasteGeneration WHERE year = 2020 AND material = 'Paper' GROUP BY country HAVING country IN ('India', 'China', 'Japan');","SELECT country, SUM(volume) FROM WasteGeneration WHERE year = 2020 AND material = 'Paper' GROUP BY country;",0 What is the minimum age of sea ice in the Beaufort Sea in 2021?,"CREATE TABLE sea_ice_age (sea VARCHAR(50), year INT, age INT);",SELECT MIN(age) FROM sea_ice_age WHERE sea = 'Beaufort Sea' AND year = 2021;,SELECT MIN(age) FROM sea_ice_age WHERE sea = 'Beaufort Sea' AND year = 2021;,1 What is the total cost (in USD) of water conservation measures per building in each city?,"CREATE TABLE water_conservation_measures (building_id INT, building_name VARCHAR(255), city VARCHAR(255), cost_USD INT); ","SELECT city, SUM(cost_USD) as total_cost_USD FROM water_conservation_measures GROUP BY city;","SELECT city, SUM(cost_USD) as total_cost FROM water_conservation_measures GROUP BY city;",0 What is the total quantity of recycled polyester used by brands in the 'ethical_brands' table?,"CREATE TABLE ethical_brands (brand_id INT, brand_name TEXT, total_recycled_polyester_kg FLOAT);",SELECT SUM(total_recycled_polyester_kg) FROM ethical_brands;,SELECT SUM(total_recycled_polyester_kg) FROM ethical_brands;,1 What is the average age of subscribers from 'USA' who prefer investigative journalism?,"CREATE TABLE subscribers (id INT, age INT, country TEXT, interest TEXT);",SELECT AVG(age) FROM subscribers WHERE country = 'USA' AND interest = 'investigative journalism';,SELECT AVG(age) FROM subscribers WHERE country = 'USA' AND interest = 'investigative journalism';,1 How many episodes aired on 22january2009,"CREATE TABLE table_17641206_8 (episode VARCHAR, original_airdate VARCHAR);","SELECT COUNT(episode) FROM table_17641206_8 WHERE original_airdate = ""22January2009"";","SELECT COUNT(episode) FROM table_17641206_8 WHERE original_airdate = ""22 January 2009"";",0 List the names of all cosmetics products that are certified as vegan and have a consumer rating above 4.0.,"CREATE TABLE product_details (product_name TEXT, is_vegan_certified BOOLEAN, consumer_rating REAL); ",SELECT product_name FROM product_details WHERE is_vegan_certified = true AND consumer_rating > 4.0;,SELECT product_name FROM product_details WHERE is_vegan_certified = true AND consumer_rating > 4.0;,1 What is the total quantity of sustainable fashion items in stock?,"CREATE TABLE Stock (id INT, product VARCHAR(20), quantity INT, sustainable BOOLEAN); ",SELECT SUM(quantity) FROM Stock WHERE sustainable = true;,SELECT SUM(quantity) FROM Stock WHERE sustainable = true;,1 What is the maximum community service hours imposed in a single case involving a juvenile?,"CREATE TABLE cases (id INT, case_type VARCHAR(20), offender_age INT, community_service_hours INT); ",SELECT MAX(community_service_hours) FROM cases WHERE case_type = 'Juvenile';,SELECT MAX(community_service_hours) FROM cases WHERE case_type = 'Jugemental';,0 what is the college/junior/club team for the player alfie turcotte?,"CREATE TABLE table_2679061_1 (college_junior_club_team VARCHAR, player VARCHAR);","SELECT college_junior_club_team FROM table_2679061_1 WHERE player = ""Alfie Turcotte"";","SELECT college_junior_club_team FROM table_2679061_1 WHERE player = ""Alfie Turotte"";",0 List all citizen feedback entries related to transportation policies in the 'policy_feedback' table.,"CREATE TABLE policy_feedback (id INT, policy VARCHAR(255), feedback TEXT, submission_date DATE); ",SELECT * FROM policy_feedback WHERE policy = 'Transportation';,SELECT * FROM policy_feedback WHERE policy LIKE '%Transportation%';,0 What team is sponsored by chameleon sunglasses?,"CREATE TABLE table_name_63 (team VARCHAR, sponsor VARCHAR);","SELECT team FROM table_name_63 WHERE sponsor = ""chameleon sunglasses"";","SELECT team FROM table_name_63 WHERE sponsor = ""chameleon sunglasses"";",1 What is the average number of climate change mitigation projects in African countries?,"CREATE TABLE MitigationProjects (ID INT, Country VARCHAR(255), Projects INT); ","SELECT AVG(Projects) FROM MitigationProjects WHERE Country IN ('Nigeria', 'Kenya', 'South Africa', 'Egypt', 'Morocco');","SELECT AVG(Projects) FROM MitigationProjects WHERE Country IN ('Nigeria', 'Egypt', 'South Africa');",0 Find the intersection of fashion trends that are popular in both the US and Canada?,"CREATE TABLE FashionTrendsUS (TrendID INT, TrendName TEXT, Popularity INT); CREATE TABLE FashionTrendsCA (TrendID INT, TrendName TEXT, Popularity INT); ",SELECT FTUS.TrendName FROM FashionTrendsUS FTUS INNER JOIN FashionTrendsCA FTCAN ON FTUS.TrendName = FTCAN.TrendName;,"SELECT ft.TrendName, ft.Popularity FROM FashionTrendsUS ft JOIN FashionTrendsCA ft ON ft.TrendID = ft.TrendID WHERE ft.Popularity IN ('US', 'Canada') GROUP BY ft.TrendName;",0 "How many safety incidents were recorded for each type of autonomous vehicle in the AI Safety Incidents database from January 1, 2022, to January 1, 2022?","CREATE TABLE ai_safety_incidents (id INT PRIMARY KEY, incident_type VARCHAR(255), severity VARCHAR(255), timestamp TIMESTAMP); ","SELECT incident_type, COUNT(*) as total_incidents FROM ai_safety_incidents WHERE timestamp BETWEEN '2022-01-01 00:00:00' AND '2022-01-01 23:59:59' GROUP BY incident_type;","SELECT incident_type, COUNT(*) FROM ai_safety_incidents WHERE timestamp BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY incident_type;",0 "What is the lowest week that has September 19, 1965 as the date, with an attendance less than 46,941?","CREATE TABLE table_name_70 (week INTEGER, date VARCHAR, attendance VARCHAR);","SELECT MIN(week) FROM table_name_70 WHERE date = ""september 19, 1965"" AND attendance < 46 OFFSET 941;","SELECT MIN(week) FROM table_name_70 WHERE date = ""september 19, 1965"" AND attendance 46 OFFSET 941;",0 "What is the average energy consumption per square foot for green buildings in each city, partitioned by building type and ordered by the average consumption?","CREATE TABLE CityGreenBuildings (BuildingID INT, BuildingName VARCHAR(255), City VARCHAR(255), BuildingType VARCHAR(255), EnergyConsumption FLOAT, Area FLOAT); ","SELECT City, BuildingType, AVG(EnergyConsumption/Area) OVER (PARTITION BY City, BuildingType) AS Avg_Consumption_Per_Sqft FROM CityGreenBuildings ORDER BY Avg_Consumption_Per_Sqft DESC;","SELECT City, BuildingType, AVG(EnergyConsumption/Area) as AvgEnergyConsumptionPerSqFt FROM CityGreenBuildings GROUP BY City, BuildingType ORDER BY AvgEnergyConsumptionPerSqFt DESC;",0 "What is the venue with more than 3 against, and South Africa is the opposing team?","CREATE TABLE table_name_55 (venue VARCHAR, against VARCHAR, opposing_teams VARCHAR);","SELECT venue FROM table_name_55 WHERE against > 3 AND opposing_teams = ""south africa"";","SELECT venue FROM table_name_55 WHERE against > 3 AND opposing_teams = ""south africa"";",1 Delete all records related to schools in the district of 'School District 1' from the 'schools' table.,"CREATE TABLE districts (id INT, name VARCHAR(255)); CREATE TABLE schools (id INT, name VARCHAR(255), district_id INT); ",DELETE FROM schools WHERE district_id = (SELECT id FROM districts WHERE name = 'School District 1');,DELETE FROM schools WHERE district_id = 1;,0 Insert a new record in the humanitarian_assistance table for an operation named 'Natural Disaster Relief in Caribbean' in 2021,"CREATE TABLE humanitarian_assistance (assistance_id INT, assistance_name VARCHAR(50), year INT, location VARCHAR(50), description TEXT);","INSERT INTO humanitarian_assistance (assistance_id, assistance_name, year, location, description) VALUES (2, 'Natural Disaster Relief in Caribbean', 2021, 'Caribbean', 'Description of the natural disaster relief operation');","INSERT INTO humanitarian_assistance (assistance_id, assistance_name, year, location, description) VALUES (1, 'Natural Disaster Relief in Caribbean', 2021, 'Caribbean');",0 What's the British pronunciation when the American and Australian is i?,"CREATE TABLE table_name_44 (british VARCHAR, american VARCHAR, australian VARCHAR);","SELECT british FROM table_name_44 WHERE american = ""i"" AND australian = ""i"";","SELECT british FROM table_name_44 WHERE american = ""i"" AND australian = ""i"";",1 "What is the average sustainability score for cosmetic products, partitioned by brand and ordered by average score in descending order?","CREATE TABLE products (product_id INT, brand_id INT, sustainability_score FLOAT); CREATE TABLE brands (brand_id INT, name VARCHAR(255)); ","SELECT brands.name, AVG(products.sustainability_score) as avg_score FROM products JOIN brands ON products.brand_id = brands.brand_id GROUP BY brands.name ORDER BY avg_score DESC;","SELECT b.name, AVG(p.sustainability_score) as avg_score FROM products p JOIN brands b ON p.brand_id = b.brand_id GROUP BY b.name ORDER BY avg_score DESC;",0 How many FIFA World Cup titles has Brazil won?,"CREATE TABLE fifa_world_cup (year INT, winner VARCHAR(50)); ",SELECT COUNT(*) FROM fifa_world_cup WHERE winner = 'Brazil';,SELECT COUNT(*) FROM fifa_world_cup WHERE winner = 'Brazil';,1 How many nominees had a net voice of 15.17%,"CREATE TABLE table_15162479_8 (nominee VARCHAR, net_vote VARCHAR);","SELECT COUNT(nominee) FROM table_15162479_8 WHERE net_vote = ""15.17%"";","SELECT COUNT(nominee) FROM table_15162479_8 WHERE net_vote = ""15.17%"";",1 "What is the average energy efficiency score for buildings in 'UrbanEfficiency' table, by city?","CREATE TABLE UrbanEfficiency (id INT, building_name TEXT, city TEXT, state TEXT, energy_efficiency_score INT);","SELECT city, AVG(energy_efficiency_score) FROM UrbanEfficiency GROUP BY city;","SELECT city, AVG(energy_efficiency_score) FROM UrbanEfficiency GROUP BY city;",1 What Goalkeeper has MINS less than 2160,"CREATE TABLE table_name_32 (goalkeeper VARCHAR, mins INTEGER);",SELECT goalkeeper FROM table_name_32 WHERE mins < 2160;,SELECT goalkeeper FROM table_name_32 WHERE mins 2160;,0 What was the loss/gain when the votes -cast was 166?,"CREATE TABLE table_25818630_2 (loss_gain VARCHAR, votes__cast VARCHAR);",SELECT loss_gain FROM table_25818630_2 WHERE votes__cast = 166;,SELECT loss_gain FROM table_25818630_2 WHERE votes__cast = 166;,1 Who was the opponent for the 2003 davis cup europe/africa group ii?,"CREATE TABLE table_name_23 (opponent VARCHAR, edition VARCHAR);","SELECT opponent FROM table_name_23 WHERE edition = ""2003 davis cup europe/africa group ii"";","SELECT opponent FROM table_name_23 WHERE edition = ""2003 davis cup europe/africa group ii"";",1 List all contracts that were renegotiated in 2020 and the reasons for renegotiation.,"CREATE TABLE Contracts (contract_id INT, renegotiation_date DATE, renegotiation_reason VARCHAR(50)); ",SELECT * FROM Contracts WHERE renegotiation_date IS NOT NULL AND YEAR(renegotiation_date) = 2020,"SELECT contract_id, renegotiation_reason FROM Contracts WHERE YEAR(renegotiation_date) = 2020;",0 What is the average donation amount in the 'Education' and 'Arts' categories?,"CREATE TABLE Donations (DonationID INT, DonorID INT, Category TEXT, Amount DECIMAL); ","SELECT AVG(Amount) FROM Donations WHERE Category IN ('Education', 'Arts');","SELECT AVG(Amount) FROM Donations WHERE Category IN ('Education', 'Arts');",1 What was the time of the driver in grid 2?,"CREATE TABLE table_name_54 (time_retired VARCHAR, grid INTEGER);",SELECT time_retired FROM table_name_54 WHERE grid < 2;,SELECT time_retired FROM table_name_54 WHERE grid = 2;,0 "What is the year First elected, when the State is vic, and when the Member is Hon Don Chipp?","CREATE TABLE table_name_21 (first_elected VARCHAR, state VARCHAR, member VARCHAR);","SELECT first_elected FROM table_name_21 WHERE state = ""vic"" AND member = ""hon don chipp"";","SELECT first_elected FROM table_name_21 WHERE state = ""vic"" AND member = ""hon don chipp"";",1 Delete records in circular_economy table where initiative is 'Composting Program',"CREATE TABLE circular_economy (id INT PRIMARY KEY, location VARCHAR(255), initiative VARCHAR(255), start_date DATE, end_date DATE);",DELETE FROM circular_economy WHERE initiative = 'Composting Program';,DELETE FROM circular_economy WHERE initiative = 'Composting Program';,1 What is the minimum salary for employees in the company?,"CREATE TABLE Employees (EmployeeID INT, Gender VARCHAR(10), Department VARCHAR(20), Salary FLOAT); ",SELECT MIN(Salary) FROM Employees;,SELECT MIN(Salary) FROM Employees WHERE Department = 'Company';,0 How many items were shipped from each warehouse in Canada?,"CREATE TABLE Warehouse (id INT, city VARCHAR(50), country VARCHAR(50)); CREATE TABLE Shipment (id INT, quantity INT, warehouse_id INT, destination_country VARCHAR(50)); ","SELECT Warehouse.city, SUM(Shipment.quantity) FROM Warehouse INNER JOIN Shipment ON Warehouse.id = Shipment.warehouse_id WHERE Warehouse.country = 'Canada' GROUP BY Warehouse.city;","SELECT Warehouse.city, SUM(Shipment.quantity) FROM Warehouse INNER JOIN Shipment ON Warehouse.id = Shipment.warehouse_id WHERE Warehouse.country = 'Canada' GROUP BY Warehouse.city;",1 What was the score of the game in which Danny Granger (30) did the high points?,"CREATE TABLE table_27756164_2 (score VARCHAR, high_points VARCHAR);","SELECT score FROM table_27756164_2 WHERE high_points = ""Danny Granger (30)"";","SELECT score FROM table_27756164_2 WHERE high_points = ""Danny Granger (30)"";",1 "What is Record, when Game is greater than 55, and when Date is ""March 25""?","CREATE TABLE table_name_80 (record VARCHAR, game VARCHAR, date VARCHAR);","SELECT record FROM table_name_80 WHERE game > 55 AND date = ""march 25"";","SELECT record FROM table_name_80 WHERE game > 55 AND date = ""march 25"";",1 What are the artifact types and their quantities from site X?,"CREATE TABLE excavation_sites (id INT, name VARCHAR(255)); ","SELECT artifact_type, COUNT(*) FROM artifacts JOIN excavation_sites ON artifacts.excavation_site_id = excavation_sites.id","SELECT artifact_type, COUNT(*) FROM excavation_sites WHERE name = 'Site X' GROUP BY artifact_type;",0 How many auto shows were held in the United States in the year 2019?,"CREATE TABLE Auto_Shows (id INT, show_name VARCHAR(255), show_year INT, location VARCHAR(255)); ",SELECT COUNT(*) FROM Auto_Shows WHERE show_year = 2019 AND location = 'United States';,SELECT COUNT(*) FROM Auto_Shows WHERE show_year = 2019 AND location = 'United States';,1 How many enrollment figures are provided for Roosevelt High School?,"CREATE TABLE table_13759592_1 (enrollment VARCHAR, high_school VARCHAR);","SELECT COUNT(enrollment) FROM table_13759592_1 WHERE high_school = ""Roosevelt"";","SELECT COUNT(enrollment) FROM table_13759592_1 WHERE high_school = ""Theodore"";",0 What is the total number of medical supplies received by hospitals in each country in 2021?,"CREATE TABLE medical_supplies (id INT, name TEXT, hospital TEXT, received_date DATE, quantity INT); ","SELECT hospital, COUNT(*) as num_supplies FROM medical_supplies WHERE received_date >= '2021-01-01' AND received_date < '2022-01-01' GROUP BY hospital;","SELECT country, SUM(quantity) FROM medical_supplies WHERE received_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY country;",0 Name the ezhavas for muslims being 5.4,"CREATE TABLE table_23214055_2 (ezhavas VARCHAR, muslims VARCHAR);","SELECT ezhavas FROM table_23214055_2 WHERE muslims = ""5.4"";","SELECT ezhavas FROM table_23214055_2 WHERE muslims = ""5.4"";",1 What is the percentage of Neodymium exported from Brazil to other countries annually?,"CREATE TABLE NeodymiumExport(year INT, country VARCHAR(50), percentage DECIMAL(5,2)); ",SELECT (SUM(percentage) FILTER (WHERE country = 'Brazil'))/SUM(percentage) FROM NeodymiumExport;,SELECT percentage FROM NeodymiumExport WHERE country = 'Brazil';,0 Find the payment method that is used most frequently.,CREATE TABLE Customers (payment_method VARCHAR);,SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1;,SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1;,1 To what district does Bill Hefner belong?,"CREATE TABLE table_1341522_36 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_1341522_36 WHERE incumbent = ""Bill Hefner"";","SELECT district FROM table_1341522_36 WHERE incumbent = ""Bill Hefner"";",1 What is the total population of indigenous communities in each Arctic country?,"CREATE TABLE IndigenousCommunity (ID INT, Name TEXT, Country TEXT, Population INT); ","SELECT Country, SUM(Population) as Total_Population FROM IndigenousCommunity GROUP BY Country;","SELECT Country, SUM(Population) FROM IndigenousCommunity GROUP BY Country;",0 How many climate adaptation projects have been implemented in Small Island Developing States?,"CREATE TABLE climate_projects (id INT, project_name VARCHAR(50), location VARCHAR(50), sector VARCHAR(50));",SELECT COUNT(*) FROM climate_projects WHERE location LIKE '%Small Island Developing States%' AND sector = 'adaptation';,SELECT COUNT(*) FROM climate_projects WHERE location = 'Small Island Developing States' AND sector = 'climate adaptation';,0 Find the smart contracts created by the top 3 token issuers and their respective creation dates.,"CREATE TABLE token_issuers (issuer_id INT, issuer_address VARCHAR(50), issuer_name VARCHAR(100), country VARCHAR(50)); CREATE TABLE smart_contracts (contract_id INT, contract_address VARCHAR(50), contract_name VARCHAR(100), creator_address VARCHAR(50), creation_date DATE);","SELECT i.issuer_name, s.contract_address, s.creation_date FROM token_issuers i JOIN smart_contracts s ON i.issuer_address = s.creator_address WHERE i.issuer_id IN (SELECT issuer_id FROM (SELECT issuer_id, COUNT(issuer_id) as issue_count FROM token_issuers GROUP BY issuer_id ORDER BY issue_count DESC LIMIT 3) t) ORDER BY creation_date;","SELECT token_issuers.issuer_name, smart_contracts.contract_name, smart_contracts.creator_address, smart_contracts.creation_date FROM token_issuers INNER JOIN smart_contracts ON token_issuers.issuer_id = smart_contracts.contract_id GROUP BY token_issuers.issuer_name, smart_contracts.creation_date ORDER BY smart_contracts.creation_date DESC LIMIT 3;",0 How many teachers have completed professional development courses in STEM subjects?,"CREATE TABLE teachers (teacher_id INT, subject_area VARCHAR(255)); CREATE TABLE courses (course_id INT, course_name VARCHAR(255), subject_area VARCHAR(255)); CREATE TABLE completions (teacher_id INT, course_id INT); ","SELECT COUNT(DISTINCT t.teacher_id) as num_teachers FROM teachers t JOIN completions c ON t.teacher_id = c.teacher_id JOIN courses co ON c.course_id = co.course_id WHERE co.subject_area IN ('Math', 'Science', 'Technology', 'Engineering');",SELECT COUNT(DISTINCT teachers.teacher_id) FROM teachers INNER JOIN completions ON teachers.teacher_id = completions.teacher_id INNER JOIN courses ON completions.course_id = courses.course_id WHERE courses.subject_area = 'STEM';,0 Which strains have been sold in more than 5 dispensaries in Oregon?,"CREATE TABLE sales (sale_id INT, dispensary_id INT, strain VARCHAR(255), quantity INT);CREATE TABLE dispensaries (dispensary_id INT, name VARCHAR(255), state VARCHAR(255));",SELECT strain FROM sales JOIN dispensaries ON sales.dispensary_id = dispensaries.dispensary_id WHERE state = 'Oregon' GROUP BY strain HAVING COUNT(DISTINCT dispensary_id) > 5;,SELECT s.strain FROM sales s JOIN dispensaries d ON s.dispensary_id = d.dispensary_id WHERE d.state = 'Oregon' GROUP BY s.strain HAVING COUNT(DISTINCT d.dispensary_id) > 5;,0 What are the top 2 countries with the most eco-friendly accommodations in Asia?,"CREATE TABLE Accommodations_Asia (id INT, name VARCHAR(50), location VARCHAR(50), type VARCHAR(50), country VARCHAR(50)); ","SELECT country, COUNT(*) as num_eco_accommodations FROM Accommodations_Asia WHERE type = 'Eco-Friendly' GROUP BY country ORDER BY num_eco_accommodations DESC LIMIT 2;","SELECT country, COUNT(*) as eco_friendly_count FROM Accommodations_Asia WHERE type = 'Eco-friendly' GROUP BY country ORDER BY eco_friendly_count DESC LIMIT 2;",0 "Insert a new record for a movie with title ""MovieY"", genre ""Comedy"", release year 2012, and production budget 12000000.","CREATE TABLE movies (id INT, title VARCHAR(100), genre VARCHAR(50), release_year INT, production_budget INT);","INSERT INTO movies (title, genre, release_year, production_budget) VALUES ('MovieY', 'Comedy', 2012, 12000000);","INSERT INTO movies (title, genre, release_year, production_budget) VALUES ('MovieY', 'Comedy', 2012, 12000000);",1 What is the average monthly data usage for mobile customers in the city of Dallas?,"CREATE TABLE mobile_usage (id INT, city VARCHAR(50), data_usage FLOAT); ",SELECT AVG(data_usage) FROM mobile_usage WHERE city = 'Dallas';,SELECT AVG(data_usage) FROM mobile_usage WHERE city = 'Dallas';,1 What was the score for Footscray when they were the away team?,CREATE TABLE table_name_66 (away_team VARCHAR);,"SELECT away_team AS score FROM table_name_66 WHERE away_team = ""footscray"";","SELECT away_team AS score FROM table_name_66 WHERE away_team = ""footscray"";",1 What was the race when the winner of 2nd was Voleuse?,"CREATE TABLE table_name_27 (race VARCHAR, winner_or_2nd VARCHAR);","SELECT race FROM table_name_27 WHERE winner_or_2nd = ""voleuse"";","SELECT race FROM table_name_27 WHERE winner_or_2nd = ""voleuse"";",1 What is the smallest amount of matches?,CREATE TABLE table_27268238_4 (matches INTEGER);,SELECT MIN(matches) FROM table_27268238_4;,SELECT MIN(matches) FROM table_27268238_4;,1 Who are the property owners in the 'prop_owners' table that have a 'property_id' matching with any record in the 'property2' table?,"CREATE TABLE prop_owners (id INT, owner VARCHAR(20), property_id INT); CREATE TABLE property2 (id INT, city VARCHAR(20), price INT); ",SELECT prop_owners.owner FROM prop_owners INNER JOIN property2 ON prop_owners.property_id = property2.id;,SELECT prop_owners.owner FROM prop_owners INNER JOIN property2 ON prop_owners.property_id = property2.id;,1 What is the maximum budget for a rural infrastructure project in 'rural_infrastructure' table?,"CREATE TABLE rural_infrastructure (id INT, name VARCHAR(50), budget INT, location VARCHAR(50)); ",SELECT MAX(budget) FROM rural_infrastructure;,SELECT MAX(budget) FROM rural_infrastructure;,1 "What is the minimum salary in the ""tech_company"" database for data scientists?","CREATE TABLE employees (id INT, name VARCHAR(50), department VARCHAR(50), salary DECIMAL(10,2)); ",SELECT MIN(salary) FROM employees WHERE department = 'Data Scientist';,SELECT MIN(salary) FROM employees WHERE department = 'Data Science';,0 How many production codes are there for episode number 45?,"CREATE TABLE table_2602958_4 (prod_code VARCHAR, no VARCHAR);",SELECT COUNT(prod_code) FROM table_2602958_4 WHERE no = 45;,SELECT COUNT(prod_code) FROM table_2602958_4 WHERE no = 45;,1 Name the country for 6-month loan and moving from of lens,"CREATE TABLE table_name_90 (country VARCHAR, type VARCHAR, moving_from VARCHAR);","SELECT country FROM table_name_90 WHERE type = ""6-month loan"" AND moving_from = ""lens"";","SELECT country FROM table_name_90 WHERE type = ""6-month loan"" AND moving_from = ""lens"";",1 what is the race on 23 october?,"CREATE TABLE table_name_81 (race VARCHAR, date VARCHAR);","SELECT race FROM table_name_81 WHERE date = ""23 october"";","SELECT race FROM table_name_81 WHERE date = ""23 october"";",1 How many Apogee sis Ops-8285 with more than 1500 kg?,"CREATE TABLE table_name_74 (apogee__km_ VARCHAR, alt_name VARCHAR, mass__kg_ VARCHAR);","SELECT COUNT(apogee__km_) FROM table_name_74 WHERE alt_name = ""ops-8285"" AND mass__kg_ > 1500;","SELECT COUNT(apogee__km_) FROM table_name_74 WHERE alt_name = ""ops-8285"" AND mass__kg_ > 1500;",1 What is the total number of artworks in the museum that have never been checked out?,"CREATE TABLE artworks(artwork_id INT, title VARCHAR(50), is_checked_out INT); ",SELECT COUNT(artwork_id) FROM artworks WHERE is_checked_out = 0;,SELECT COUNT(*) FROM artworks WHERE is_checked_out IS NULL;,0 What is the Competition on July 7?,"CREATE TABLE table_name_68 (competition VARCHAR, date VARCHAR);","SELECT competition FROM table_name_68 WHERE date = ""july 7"";","SELECT competition FROM table_name_68 WHERE date = ""july 7"";",1 What is the average budget allocation for education in rural areas?,"CREATE TABLE districts (id INT, name TEXT, type TEXT); CREATE TABLE budget_allocations (year INT, district_id INT, category TEXT, amount INT); ",SELECT AVG(amount) FROM budget_allocations WHERE category = 'Education' AND type IN (SELECT type FROM districts WHERE type = 'Rural');,SELECT AVG(budget_allocations.amount) FROM budget_allocations INNER JOIN districts ON budget_allocations.district_id = districts.id WHERE districts.type = 'Education' AND districts.type = 'Rural';,0 "What is the average production cost of garments made with organic cotton, per country?","CREATE TABLE producers (id INT, name VARCHAR(50), country VARCHAR(50), production_cost DECIMAL(5,2)); CREATE TABLE materials (id INT, name VARCHAR(50), type VARCHAR(50), country VARCHAR(50)); ","SELECT m.country, AVG(p.production_cost) as avg_cost FROM producers p JOIN materials m ON p.country = m.country WHERE m.type = 'Organic Cotton' GROUP BY m.country;","SELECT p.country, AVG(p.production_cost) as avg_production_cost FROM producers p JOIN materials m ON p.country = m.country WHERE m.type = 'Organic Cotton' GROUP BY p.country;",0 What is the total number of animals in both the 'animal_population' and 'rescued_animals' tables?,"CREATE TABLE animal_population (id INT, animal VARCHAR(50), population INT); CREATE TABLE rescued_animals (id INT, animal VARCHAR(50), health_status VARCHAR(50)); ",SELECT COUNT(*) FROM animal_population UNION ALL SELECT COUNT(*) FROM rescued_animals;,SELECT SUM(animal_population.population) FROM animal_population INNER JOIN rescued_animals ON animal_population.animal = rescued_animals.animal;,0 "What is the average age of users who attended events in the ""Dance"" category?","CREATE TABLE Users (UserID INT, Age INT, Category VARCHAR(50)); CREATE TABLE Events (EventID INT, Category VARCHAR(50)); ",SELECT AVG(Users.Age) AS AverageAge FROM Users INNER JOIN Events ON Users.Category = Events.Category WHERE Events.Category = 'Dance';,SELECT AVG(Users.Age) FROM Users INNER JOIN Events ON Users.UserID = Events.EventID WHERE Events.Category = 'Dance';,0 What date was the show's weekly ranking 12?,"CREATE TABLE table_27319183_7 (date VARCHAR, weekly_rank VARCHAR);",SELECT date FROM table_27319183_7 WHERE weekly_rank = 12;,SELECT date FROM table_27319183_7 WHERE weekly_rank = 12;,1 Game of Thrones was done by which artist?,"CREATE TABLE table_name_82 (artist VARCHAR, actual_title VARCHAR);","SELECT artist FROM table_name_82 WHERE actual_title = ""game of thrones"";","SELECT artist FROM table_name_82 WHERE actual_title = ""game of thrones"";",1 What did the home team score at Lake Oval?,"CREATE TABLE table_name_2 (home_team VARCHAR, venue VARCHAR);","SELECT home_team AS score FROM table_name_2 WHERE venue = ""lake oval"";","SELECT home_team AS score FROM table_name_2 WHERE venue = ""lake oval"";",1 Who had a save on September 2?,"CREATE TABLE table_name_49 (save VARCHAR, date VARCHAR);","SELECT save FROM table_name_49 WHERE date = ""september 2"";","SELECT save FROM table_name_49 WHERE date = ""september 2"";",1 "What was the venue on October 16, 1996?","CREATE TABLE table_name_13 (venue VARCHAR, date VARCHAR);","SELECT venue FROM table_name_13 WHERE date = ""october 16, 1996"";","SELECT venue FROM table_name_13 WHERE date = ""october 16, 1996"";",1 What is the minimum production rate in the 'GH_Well' table for wells with a status of 'Active' in the 'Well_Status' table?,"CREATE TABLE GH_Well (Well_ID VARCHAR(10), Production_Rate INT); CREATE TABLE Well_Status (Well_ID VARCHAR(10), Status VARCHAR(10)); ",SELECT MIN(Production_Rate) FROM GH_Well WHERE Well_ID IN (SELECT Well_ID FROM Well_Status WHERE Status = 'Active');,SELECT MIN(Production_Rate) FROM GH_Well INNER JOIN Well_Status ON GH_Well.Well_ID = Well_Status.Well_ID WHERE Well_Status.Status = 'Active';,0 what's the species in the world with peruvian amazon vs. peru (percent)  of 63,"CREATE TABLE table_11727969_1 (species_in_the_world VARCHAR, peruvian_amazon_vs_peru__percent_ VARCHAR);",SELECT species_in_the_world FROM table_11727969_1 WHERE peruvian_amazon_vs_peru__percent_ = 63;,"SELECT species_in_the_world FROM table_11727969_1 WHERE peruvian_amazon_vs_peru__percent_ = ""63"";",0 What is the maximum budget for a biotech startup in the USA?,"CREATE SCHEMA if not exists startups; USE startups; CREATE TABLE if not exists budgets (id INT, startup_id INT, budget DECIMAL(10, 2)); ",SELECT MAX(budget) FROM startups.budgets WHERE startup_id IN (SELECT id FROM startups.startups WHERE country = 'USA');,SELECT MAX(budget) FROM budgets WHERE startup_id IN (SELECT id FROM startups.startups WHERE country = 'USA');,0 What is the maximum number of views for a video produced in 2021 by a creator from Asia?,"CREATE TABLE videos (title VARCHAR(255), release_year INT, views INT, creator VARCHAR(255), region VARCHAR(255)); ",SELECT MAX(views) FROM videos WHERE release_year = 2021 AND region = 'Asia';,SELECT MAX(views) FROM videos WHERE release_year = 2021 AND region = 'Asia';,1 "What is the average age of attendees for each program type, with data from the past 5 years?","CREATE TABLE Programs (program_id INT, program_type VARCHAR(50), start_date DATE); CREATE TABLE Audience (audience_id INT, program_id INT, attendee_age INT, attend_date DATE); ","SELECT p.program_type, AVG(a.attendee_age) AS avg_age FROM Programs p JOIN Audience a ON p.program_id = a.program_id WHERE a.attend_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR) AND CURRENT_DATE GROUP BY p.program_type;","SELECT Programs.program_type, AVG(Audience.attendee_age) as avg_age FROM Programs INNER JOIN Audience ON Programs.program_id = Audience.program_id WHERE Audience.attend_date >= DATEADD(year, -5, GETDATE()) GROUP BY Programs.program_type;",0 "What institution is located in Watertown, Wisconsin?","CREATE TABLE table_1974443_1 (institution VARCHAR, location VARCHAR);","SELECT institution FROM table_1974443_1 WHERE location = ""Watertown, Wisconsin"";","SELECT institution FROM table_1974443_1 WHERE location = ""Watertown, Wisconsin"";",1 The Milwaukee Mile circuit has what type of session?,"CREATE TABLE table_name_41 (session VARCHAR, circuit VARCHAR);","SELECT session FROM table_name_41 WHERE circuit = ""milwaukee mile"";","SELECT session FROM table_name_41 WHERE circuit = ""milwaukee mile"";",1 What was Zona Sur's result after being considered for nomination?,"CREATE TABLE table_name_36 (result VARCHAR, original_title VARCHAR);","SELECT result FROM table_name_36 WHERE original_title = ""zona sur"";","SELECT result FROM table_name_36 WHERE original_title = ""zona sur"";",1 Update 'location' to 'Toronto' for records in the 'autonomous_vehicles' table where 'vehicle_type' is 'Taxi',"CREATE TABLE autonomous_vehicles (id INT, vehicle_id VARCHAR(255), vehicle_type VARCHAR(255), location VARCHAR(255));",UPDATE autonomous_vehicles SET location = 'Toronto' WHERE vehicle_type = 'Taxi';,UPDATE autonomous_vehicles SET location = 'Toronto' WHERE vehicle_type = 'Taxi';,1 Which Surface has a Semifinalist of stefan edberg thomas muster?,"CREATE TABLE table_name_98 (surface VARCHAR, semifinalists VARCHAR);","SELECT surface FROM table_name_98 WHERE semifinalists = ""stefan edberg thomas muster"";","SELECT surface FROM table_name_98 WHERE semifinalists = ""stefan edberg thomas muster"";",1 What is the maximum number of open pedagogy courses a student has taken in a year?,"CREATE TABLE students (student_id INT, enrollment_date DATE, country VARCHAR(20)); CREATE TABLE courses (course_id INT, enrollment_date DATE, course_type VARCHAR(20)); ","SELECT student_id, MAX(yearly_courses) FROM (SELECT student_id, YEAR(enrollment_date) AS enrollment_year, COUNT(course_id) AS yearly_courses FROM students INNER JOIN courses ON students.enrollment_date = courses.enrollment_date WHERE course_type = 'open_pedagogy' GROUP BY student_id, enrollment_year) AS subquery GROUP BY student_id;","SELECT MAX(COUNT(*)) FROM courses JOIN students ON courses.student_id = students.student_id WHERE courses.course_type = 'Open Pedagogy' AND enrollment_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE;",0 "Count the number of tickets sold for the ""Home Team"" in the ""tickets"" table.","CREATE TABLE tickets (id INT, game_id INT, team VARCHAR(50), tickets_sold INT);",SELECT COUNT(*) FROM tickets WHERE team = 'Home Team';,SELECT SUM(tickets_sold) FROM tickets WHERE team = 'Home Team';,0 Which 'fair trade' certified manufacturers have the highest total quantity of sustainable materials used in their products?,"CREATE TABLE manufacturers (manufacturer_id INT, name VARCHAR(50), fair_trade_certified CHAR(1)); CREATE TABLE products (product_id INT, manufacturer_id INT, material VARCHAR(50), quantity INT); ","SELECT manufacturer_id, SUM(quantity) AS total_quantity FROM products JOIN manufacturers ON products.manufacturer_id = manufacturers.manufacturer_id WHERE manufacturers.fair_trade_certified = 'Y' GROUP BY manufacturer_id ORDER BY total_quantity DESC;","SELECT m.name, SUM(p.quantity) as total_quantity FROM manufacturers m JOIN products p ON m.manufacturer_id = p.manufacturer_id WHERE m.fair_trade_certified = true GROUP BY m.name ORDER BY total_quantity DESC LIMIT 1;",0 Show the number of companies that have received funding in each city,"CREATE TABLE companies (company_id INT, company_name VARCHAR(255), city VARCHAR(255));CREATE TABLE funding_rounds (funding_round_id INT, company_id INT, funding_amount INT, city VARCHAR(255));","SELECT c.city, COUNT(c.company_id) FROM companies c INNER JOIN funding_rounds fr ON c.company_id = fr.company_id GROUP BY c.city;","SELECT c.city, COUNT(fr.company_id) FROM companies c JOIN funding_rounds fr ON c.company_id = fr.company_id GROUP BY c.city;",0 What are the type and nationality of ships?,"CREATE TABLE ship (TYPE VARCHAR, Nationality VARCHAR);","SELECT TYPE, Nationality FROM ship;","SELECT TYPE, Nationality FROM ship;",1 What was the home team's score that played Geelong?,"CREATE TABLE table_name_44 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team AS score FROM table_name_44 WHERE away_team = ""geelong"";","SELECT home_team AS score FROM table_name_44 WHERE away_team = ""geelong"";",1 Which syndicate is associated with the stars & stripes yacht?,"CREATE TABLE table_name_8 (syndicate VARCHAR, yacht VARCHAR);","SELECT syndicate FROM table_name_8 WHERE yacht = ""stars & stripes"";","SELECT syndicate FROM table_name_8 WHERE yacht = ""stars & stripes"";",1 What is the percentage of students who have received accommodations for visual impairments?,"CREATE TABLE students (student_id INT, student_name VARCHAR(255));",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM students)) as percentage FROM student_accommodations SA JOIN visual_impairments VI ON SA.student_id = VI.student_id WHERE SA.accommodation_type = 'Visual Impairment';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM students WHERE student_id IN (SELECT student_id FROM students WHERE student_id IN (SELECT student_id FROM students WHERE student_id IN (SELECT student_id FROM students WHERE student_id IN (SELECT student_id FROM students WHERE student_id IN (SELECT student_id FROM students WHERE student_id IN (SELECT student_id) FROM students WHERE student_id) FROM students WHERE student_id IN (SELECT student_id FROM students WHERE student_id IN (SELECT student_id FROM students WHERE student_id IN (SELECT student_id FROM students WHERE student_id IN (SELECT student_id FROM students WHERE student_id))))))))),0 What is the score for the match where albert montañés was the partner?,"CREATE TABLE table_name_60 (score VARCHAR, partner VARCHAR);","SELECT score FROM table_name_60 WHERE partner = ""albert montañés"";","SELECT score FROM table_name_60 WHERE partner = ""albert montaés"";",0 Which team has Peak Fitness as the primary sponsor?,"CREATE TABLE table_name_87 (team VARCHAR, primary_sponsor_s_ VARCHAR);","SELECT team FROM table_name_87 WHERE primary_sponsor_s_ = ""peak fitness"";","SELECT team FROM table_name_87 WHERE primary_sponsor_s_ = ""peak fitness"";",1 "Which Video has a Channel smaller than 35.66, and a Programming of nhk world?","CREATE TABLE table_name_1 (video VARCHAR, channel VARCHAR, programming VARCHAR);","SELECT video FROM table_name_1 WHERE channel < 35.66 AND programming = ""nhk world"";","SELECT video FROM table_name_1 WHERE channel 35.66 AND programming = ""nhk world"";",0 Identify the top 2 countries with the lowest average account balance for socially responsible lending customers.,"CREATE TABLE socially_responsible_lending(customer_id INT, name VARCHAR(50), country VARCHAR(50), account_balance DECIMAL(10, 2)); ","SELECT country, AVG(account_balance) AS avg_balance FROM socially_responsible_lending GROUP BY country ORDER BY avg_balance LIMIT 2;","SELECT country, AVG(account_balance) as avg_account_balance FROM socially_responsible_lending GROUP BY country ORDER BY avg_account_balance DESC LIMIT 2;",0 What is the landfill capacity (in m3) for the 5 smallest countries in our database?,"CREATE TABLE countries (country VARCHAR(255), landfill_capacity FLOAT); ","SELECT c.country, c.landfill_capacity as capacity FROM countries c ORDER BY c.landfill_capacity ASC LIMIT 5;",SELECT landfill_capacity FROM countries ORDER BY landfill_capacity DESC LIMIT 5;,0 Which color is the background of the mandatory instructions?,"CREATE TABLE table_name_43 (background_colour VARCHAR, type_of_sign VARCHAR);","SELECT background_colour FROM table_name_43 WHERE type_of_sign = ""mandatory instructions"";","SELECT background_colour FROM table_name_43 WHERE type_of_sign = ""mandatory instructions"";",1 who is the opponent when the method is submission (rear naked choke) at 4:02 of round 2?,"CREATE TABLE table_name_83 (opponent VARCHAR, method VARCHAR);","SELECT opponent FROM table_name_83 WHERE method = ""submission (rear naked choke) at 4:02 of round 2"";","SELECT opponent FROM table_name_83 WHERE method = ""submission (rear naked choke) at 4:02 of round 2"";",1 What is the total number of organic products that are not locally sourced?,"CREATE TABLE Products (pid INT, name TEXT, organic BOOLEAN, locally_sourced BOOLEAN);",SELECT COUNT(*) FROM Products WHERE organic = true AND locally_sourced = false;,SELECT COUNT(*) FROM Products WHERE organic = true AND locally_sourced = false;,1 "What is the average number of crimes committed per day in the ""downtown"" neighborhood in the last month?","CREATE TABLE Crimes (id INT, date DATE, neighborhood VARCHAR(20));","SELECT neighborhood, AVG(COUNT(*)) as avg_crimes FROM Crimes WHERE neighborhood = 'downtown' AND date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) GROUP BY neighborhood;","SELECT AVG(COUNT(*)) FROM Crimes WHERE neighborhood = 'downtown' AND date >= DATEADD(month, -1, GETDATE());",0 Which customers have not made any transactions in the last 3 months for an investment business?,"CREATE TABLE customers (customer_id INT, name VARCHAR(255)); CREATE TABLE investment_transactions (transaction_id INT, customer_id INT, amount DECIMAL(10,2), trans_date DATE);",SELECT customers.name FROM customers LEFT JOIN investment_transactions ON customers.customer_id = investment_transactions.customer_id WHERE investment_transactions.trans_date IS NULL OR investment_transactions.trans_date < NOW() - INTERVAL '3 months';,"SELECT customers.name FROM customers INNER JOIN investment_transactions ON customers.customer_id = investment_transactions.customer_id WHERE investment_transactions.trans_date DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH);",0 What is the Place of the Player from Zimbabwe?,"CREATE TABLE table_name_75 (place VARCHAR, country VARCHAR);","SELECT place FROM table_name_75 WHERE country = ""zimbabwe"";","SELECT place FROM table_name_75 WHERE country = ""zimbabwe"";",1 What is the maximum length of a railway in the 'railways' table?,"CREATE TABLE railways (railway_id INT, railway_name VARCHAR(50), length DECIMAL(10,2));",SELECT MAX(length) FROM railways;,SELECT MAX(length) FROM railways;,1 Who did they play when the score was 95-114?,"CREATE TABLE table_name_11 (opponent VARCHAR, score VARCHAR);","SELECT opponent FROM table_name_11 WHERE score = ""95-114"";","SELECT opponent FROM table_name_11 WHERE score = ""95-114"";",1 Find the total value of social impact bonds issued by each organization in the Asia-Pacific region.,"CREATE TABLE social_impact_bonds (id INT, organization_name VARCHAR(255), region VARCHAR(255), issue_year INT, value FLOAT); ","SELECT region, organization_name, SUM(value) as total_value FROM social_impact_bonds WHERE region = 'Asia-Pacific' GROUP BY region, organization_name;","SELECT organization_name, SUM(value) FROM social_impact_bonds WHERE region = 'Asia-Pacific' GROUP BY organization_name;",0 "How many clients have an investment greater than $5,000 in the ""Bond"" fund?","CREATE TABLE clients (client_id INT, name VARCHAR(50), investment FLOAT); CREATE TABLE fund_investments (client_id INT, fund_name VARCHAR(50), investment FLOAT);",SELECT COUNT(DISTINCT clients.client_id) FROM clients INNER JOIN fund_investments ON clients.client_id = fund_investments.client_id WHERE clients.investment > 5000 AND fund_investments.fund_name = 'Bond';,SELECT COUNT(*) FROM clients INNER JOIN fund_investments ON clients.client_id = fund_investments.client_id WHERE fund_investments.fund_name = 'Bond' AND clients.investment > 5000;,0 Delete all records from the 'manufacturing_output' table where the 'chemical_name' is not present in the 'chemicals' table.,"CREATE TABLE manufacturing_output (id INT, chemical_name VARCHAR(255), quantity INT); CREATE TABLE chemicals (id INT, chemical_name VARCHAR(255), safety_rating INT); ",DELETE FROM manufacturing_output WHERE chemical_name NOT IN (SELECT chemical_name FROM chemicals);,DELETE FROM manufacturing_output WHERE chemical_name NOT IN (SELECT chemical_name FROM chemicals);,1 What shows for Report hen there is a set 1 of 19–25?,"CREATE TABLE table_name_15 (report VARCHAR, set_1 VARCHAR);","SELECT report FROM table_name_15 WHERE set_1 = ""19–25"";","SELECT report FROM table_name_15 WHERE set_1 = ""19–25"";",1 Which province's IATA is kix?,"CREATE TABLE table_name_21 (province VARCHAR, iata VARCHAR);","SELECT province FROM table_name_21 WHERE iata = ""kix"";","SELECT province FROM table_name_21 WHERE iata = ""kix"";",1 What is the average revenue per day for each restaurant in the last month?,"CREATE TABLE restaurants (id INT, name VARCHAR(50), location VARCHAR(50)); CREATE TABLE revenue (restaurant_id INT, date DATE, revenue INT); ","SELECT r.name, AVG(revenue/DATEDIFF(LAST_DAY(date), date)) as avg_revenue_per_day FROM revenue JOIN restaurants r ON revenue.restaurant_id = r.id WHERE date BETWEEN DATE_SUB(LAST_DAY(CURRENT_DATE), INTERVAL 1 MONTH) AND LAST_DAY(CURRENT_DATE) GROUP BY r.name;","SELECT r.name, AVG(r.revenue) as avg_revenue_per_day FROM restaurants r JOIN revenue r ON r.id = r.restaurant_id WHERE r.date >= DATEADD(month, -1, GETDATE()) GROUP BY r.name;",0 "How many values of last year in QLD Cup if QLD Cup Premierships is 1996, 2001?","CREATE TABLE table_2383498_4 (last_year_in_qld_cup VARCHAR, qld_cup_premierships VARCHAR);","SELECT COUNT(last_year_in_qld_cup) FROM table_2383498_4 WHERE qld_cup_premierships = ""1996, 2001"";","SELECT COUNT(last_year_in_qld_cup) FROM table_2383498_4 WHERE qld_cup_premierships = ""1996, 2001"";",1 "What is the maximum quantity of containers handled per day, for a given port in the United States?","CREATE TABLE ports (port_id INT, port_name TEXT, country TEXT); CREATE TABLE cargo (cargo_id INT, port_id INT, quantity INT, handling_date DATE); ",SELECT MAX(cargo.quantity) FROM cargo JOIN ports ON cargo.port_id = ports.port_id WHERE ports.country = 'United States' AND cargo.handling_date = (SELECT MAX(cargo.handling_date) FROM cargo JOIN ports ON cargo.port_id = ports.port_id WHERE ports.country = 'United States' AND cargo.port_id = 1);,SELECT MAX(quantity) FROM cargo JOIN ports ON cargo.port_id = ports.port_id WHERE ports.country = 'United States';,0 What Competition's Score was 1-2?,"CREATE TABLE table_name_76 (competition VARCHAR, score VARCHAR);","SELECT competition FROM table_name_76 WHERE score = ""1-2"";","SELECT competition FROM table_name_76 WHERE score = ""1-2"";",1 What tournament location has south korea as the country?,"CREATE TABLE table_name_43 (tournament_location VARCHAR, country VARCHAR);","SELECT tournament_location FROM table_name_43 WHERE country = ""south korea"";","SELECT tournament_location FROM table_name_43 WHERE country = ""south korea"";",1 Find the average safety score for each vehicle model in a specific country.,"CREATE TABLE Vehicle_Models (model_id INT, model VARCHAR(50), country_id INT); CREATE TABLE Safety_Tests (test_id INT, model_id INT, result INT, test_type VARCHAR(50)); CREATE TABLE Country (country_id INT, country_name VARCHAR(50)); ","SELECT vm.model, AVG(st.result) as ""Average Safety Score"" FROM Vehicle_Models vm JOIN Safety_Tests st ON vm.model_id = st.model_id JOIN Country c ON vm.country_id = c.country_id WHERE c.country_name = 'USA' GROUP BY vm.model;","SELECT vm.model, AVG(st.result) as avg_score FROM Vehicle_Models vm INNER JOIN Safety_Tests st ON vm.model_id = st.model_id INNER JOIN Country c ON vm.country_id = c.country_id GROUP BY vm.model;",0 What are the earliest year with games played fewer than 2?,"CREATE TABLE table_name_96 (first_game INTEGER, played INTEGER);",SELECT MIN(first_game) FROM table_name_96 WHERE played < 2;,SELECT MIN(first_game) FROM table_name_96 WHERE played 2;,0 Who was the home side at glenferrie oval?,"CREATE TABLE table_name_37 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_37 WHERE venue = ""glenferrie oval"";","SELECT home_team FROM table_name_37 WHERE venue = ""glenferrie oval"";",1 What is the average production of wells in 'FieldF' for the third quarter of 2020?,"CREATE TABLE wells (well_id varchar(10), field varchar(10), production int, datetime date); ","SELECT AVG(production) FROM wells WHERE field = 'FieldF' AND datetime BETWEEN DATE_SUB(LAST_DAY('2020-09-01'), INTERVAL 2 MONTH) AND LAST_DAY('2020-09-01');",SELECT AVG(production) FROM wells WHERE field = 'FieldF' AND datetime BETWEEN '2020-01-01' AND '2020-12-31';,0 "Which Competition has a Venue of Seoul, and Result of 4-1?","CREATE TABLE table_name_36 (competition VARCHAR, venue VARCHAR, result VARCHAR);","SELECT competition FROM table_name_36 WHERE venue = ""seoul"" AND result = ""4-1"";","SELECT competition FROM table_name_36 WHERE venue = ""seoul"" AND result = ""4-1"";",1 Who is the volunteer with the most hours in program 'Culture'?,"CREATE TABLE Volunteers (volunteer_id INT, volunteer_name VARCHAR(255), program_id INT, hours DECIMAL(10, 2)); ","SELECT volunteer_name, SUM(hours) AS total_hours FROM Volunteers WHERE program_id = 2 GROUP BY volunteer_name ORDER BY total_hours DESC LIMIT 1;","SELECT volunteer_name, SUM(hours) as total_hours FROM Volunteers WHERE program_id = 1 GROUP BY volunteer_name ORDER BY total_hours DESC LIMIT 1;",0 Show total installed capacity of solar projects in 'africa',"CREATE TABLE solar_projects (id INT PRIMARY KEY, project_name VARCHAR(255), location VARCHAR(255), capacity_mw FLOAT, completion_date DATE);",SELECT SUM(capacity_mw) FROM solar_projects WHERE location = 'africa';,SELECT SUM(capacity_mw) FROM solar_projects WHERE location = 'africa';,1 What are the average prices for sculptures and paintings in the modern art market?,"CREATE TABLE art_categories (id INT, category TEXT); CREATE TABLE art_market (id INT, title TEXT, category_id INT, price INT); ","SELECT AVG(price) as avg_price, category FROM art_market am INNER JOIN art_categories ac ON am.category_id = ac.id WHERE ac.category IN ('Sculpture', 'Painting') GROUP BY category;","SELECT AVG(art_market.price) FROM art_market INNER JOIN art_categories ON art_market.category_id = art_categories.id WHERE art_market.title IN ('Sculpture', 'Painting');",0 Which round is a lower score than 21.5?,"CREATE TABLE table_name_46 (round VARCHAR, score INTEGER);",SELECT round FROM table_name_46 WHERE score < 21.5;,SELECT round FROM table_name_46 WHERE score 21.5;,0 "What is the average word count for articles by author, grouped by genre?","CREATE TABLE articles (author VARCHAR(50), article_genre VARCHAR(50), article_text TEXT); ","SELECT author, article_genre, AVG(LENGTH(article_text) - LENGTH(REPLACE(article_text, ' ', '')) + 1) as avg_word_count FROM articles GROUP BY author, article_genre;","SELECT author, article_genre, AVG(word_count) as avg_word_count FROM articles GROUP BY author, article_genre;",0 Which base has a company of Theatro Technis Karolos Koun?,"CREATE TABLE table_name_59 (base VARCHAR, company VARCHAR);","SELECT base FROM table_name_59 WHERE company = ""theatro technis karolos koun"";","SELECT base FROM table_name_59 WHERE company = ""theatro technis karolos koun"";",1 "Can you tell me the Opponent that has the Date of sun, sept 9?","CREATE TABLE table_name_89 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_89 WHERE date = ""sun, sept 9"";","SELECT opponent FROM table_name_89 WHERE date = ""sun, sept 9"";",1 What is the average number of runs scored by a team in the 'baseball_games' table for games played after 2020?,"CREATE TABLE baseball_games (id INT, home_team VARCHAR(50), away_team VARCHAR(50), date DATE, runs_home INT, runs_away INT); ",SELECT AVG(runs_home + runs_away) FROM baseball_games WHERE date > '2020-12-31';,"SELECT AVG(runs_home, runs_away) FROM baseball_games WHERE date > '2020-01-01';",0 "What is the total budget for infrastructure projects in 2020, for projects with a budget over 10 million?","CREATE TABLE InfrastructureProjects (Year INT, Project VARCHAR(255), Budget FLOAT); ",SELECT SUM(Budget) AS TotalBudget FROM InfrastructureProjects WHERE Year = 2020 HAVING Budget > 10000000;,SELECT SUM(Budget) FROM InfrastructureProjects WHERE Year = 2020 AND Budget > 10000000;,0 Identify clients who received socially responsible loans and participated in financial capability programs in 2022.,"CREATE TABLE socially_responsible_loans (id INT, client_id INT, date DATE); CREATE TABLE financial_capability_programs (id INT, program_name VARCHAR(255), client_id INT, date DATE);",SELECT DISTINCT socially_responsible_loans.client_id FROM socially_responsible_loans INNER JOIN financial_capability_programs ON socially_responsible_loans.client_id = financial_capability_programs.client_id WHERE socially_responsible_loans.date BETWEEN '2022-01-01' AND '2022-12-31' AND financial_capability_programs.date BETWEEN '2022-01-01' AND '2022-12-31';,"SELECT srl.client_id, fcp.program_name FROM socially_responsible_loans srl JOIN financial_capability_programs fcp ON srl.client_id = fcp.client_id WHERE srl.date BETWEEN '2022-01-01' AND '2022-12-31';",0 What is the average weight of a player who is less than 175 centimeters tall?,"CREATE TABLE table_name_83 (weight__kg_ INTEGER, height__cm_ INTEGER);",SELECT AVG(weight__kg_) FROM table_name_83 WHERE height__cm_ < 175;,SELECT AVG(weight__kg_) FROM table_name_83 WHERE height__cm_ 175;,0 "What was the orignal title for the winner and nominee, Breaking the Waves, in 1996 (11th)?","CREATE TABLE table_name_56 (original_title VARCHAR, year VARCHAR, winner_and_nominees VARCHAR);","SELECT original_title FROM table_name_56 WHERE year = ""1996 (11th)"" AND winner_and_nominees = ""breaking the waves"";","SELECT original_title FROM table_name_56 WHERE year = ""1996 (11th)"" AND winner_and_nominees = ""breaking the waves"";",1 What score has houston texans as the opponent?,"CREATE TABLE table_name_62 (score VARCHAR, opponent VARCHAR);","SELECT score FROM table_name_62 WHERE opponent = ""houston texans"";","SELECT score FROM table_name_62 WHERE opponent = ""houston texans"";",1 Who is the driver of the Chevrolet engine that is sponsored by godaddy.com?,"CREATE TABLE table_2503102_1 (driver_s_ VARCHAR, engine VARCHAR, car_sponsor_s_ VARCHAR);","SELECT driver_s_ FROM table_2503102_1 WHERE engine = ""Chevrolet"" AND car_sponsor_s_ = ""GoDaddy.com"";","SELECT driver_s_ FROM table_2503102_1 WHERE engine = ""Chevrolet"" AND car_sponsor_s_ = ""Godaddy.com"";",0 Who has the fastest lap where Benoît Tréluyer got the pole position?,"CREATE TABLE table_22379931_2 (fastest_lap VARCHAR, pole_position VARCHAR);","SELECT fastest_lap FROM table_22379931_2 WHERE pole_position = ""Benoît Tréluyer"";","SELECT fastest_lap FROM table_22379931_2 WHERE pole_position = ""Benoît Tréluyer"";",1 Where will the game at (ET) of 7:00 pm be at?,"CREATE TABLE table_name_2 (game_site VARCHAR, time___et__ VARCHAR);","SELECT game_site FROM table_name_2 WHERE time___et__ = ""7:00 pm"";","SELECT game_site FROM table_name_2 WHERE time___et__ = ""7:00 pm"";",1 List the top 5 most common medical conditions in rural Mississippi.,"CREATE TABLE medical_conditions (id INT, patient_id INT, condition CHAR(20), rural_ms BOOLEAN); ","SELECT condition, ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) as rank FROM medical_conditions WHERE rural_ms = true GROUP BY condition LIMIT 5;","SELECT condition, COUNT(*) as count FROM medical_conditions WHERE rural_ms = true GROUP BY condition ORDER BY count DESC LIMIT 5;",0 What is the average age of patients who have been diagnosed with diabetes in the state of California?,"CREATE TABLE patients (patient_id INT, age INT, gender VARCHAR(10), state VARCHAR(20), disease VARCHAR(20)); ",SELECT AVG(age) FROM patients WHERE state = 'California' AND disease = 'Diabetes',SELECT AVG(age) FROM patients WHERE state = 'California' AND disease = 'Diabetes';,0 What is the average daily transaction amount for clients in the 'International' division for the month of January 2022?,"CREATE TABLE Clients (ClientID int, Name varchar(50), Division varchar(50), Country varchar(50)); CREATE TABLE Transactions (TransactionID int, ClientID int, Amount decimal(10,2), TransactionDate date); ",SELECT AVG(t.Amount) as AverageDailyTransactionAmount FROM Clients c INNER JOIN Transactions t ON c.ClientID = t.ClientID WHERE c.Division = 'International' AND c.Country = 'South Korea' AND t.TransactionDate BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY t.TransactionDate;,SELECT AVG(Transactions.Amount) FROM Transactions INNER JOIN Clients ON Transactions.ClientID = Clients.ClientID WHERE Clients.Division = 'International' AND Transactions.TransactionDate BETWEEN '2022-01-01' AND '2022-01-31';,0 What is the maximum sustainable urbanism score in Berkeley?,"CREATE TABLE sustainable_urbanism (property_id INT, city VARCHAR(20), score FLOAT); ",SELECT MAX(score) FROM sustainable_urbanism WHERE city = 'Berkeley';,SELECT MAX(score) FROM sustainable_urbanism WHERE city = 'Berkeley';,1 Which climate mitigation project has the highest allocation?,"CREATE TABLE climate_mitigation_projects (project_id INTEGER, project_name TEXT, allocation INTEGER); ","SELECT project_name, allocation FROM climate_mitigation_projects ORDER BY allocation DESC LIMIT 1;","SELECT project_name, MAX(allocation) FROM climate_mitigation_projects GROUP BY project_name;",0 Insert a record into 'artworks',"CREATE TABLE artworks (id INT PRIMARY KEY, title VARCHAR(255), artist VARCHAR(255), year INT);","INSERT INTO artworks (id, title, artist, year) VALUES (1, 'The Starry Night', 'Vincent van Gogh', 1889);","INSERT INTO artworks (id, title, artist, year) VALUES (1, 'Artworks', 'Made in Italy', 2022);",0 "How many times has the Cornwall HC team, that has scored more than 18 goals, lost ?","CREATE TABLE table_name_12 (losses VARCHAR, team VARCHAR, goals_for VARCHAR);","SELECT COUNT(losses) FROM table_name_12 WHERE team = ""cornwall hc"" AND goals_for > 18;","SELECT losses FROM table_name_12 WHERE team = ""cornwall hc"" AND goals_for > 18;",0 Find the average number of refugees per community project in 'refugee_community_projects' table?,"CREATE TABLE refugee_community_projects (id INT, country VARCHAR(255), num_refugees INT, project_type VARCHAR(255)); ","SELECT project_type, AVG(num_refugees) as avg_refugees_per_project FROM refugee_community_projects GROUP BY project_type;",SELECT AVG(num_refugees) FROM refugee_community_projects;,0 What are the majors of male (sex is M) students?,"CREATE TABLE STUDENT (Major VARCHAR, Sex VARCHAR);","SELECT Major FROM STUDENT WHERE Sex = ""M"";","SELECT Major FROM STUDENT WHERE Sex = ""M"" AND Sex = ""M"";",0 Insert a new record into the 'market_trends' table for 'Argentina' in 2018 with a 'price' of 50.75,"CREATE TABLE market_trends (id INT, country VARCHAR(50), year INT, price FLOAT);","INSERT INTO market_trends (id, country, year, price) VALUES (1, 'Argentina', 2018, 50.75);","INSERT INTO market_trends (country, year, price) VALUES ('Argentina', 2018, 50.75);",0 Which ocean has the least marine life?,"CREATE TABLE marine_life_counts (id INT, ocean VARCHAR(255), num_species INT); ","SELECT ocean, num_species FROM marine_life_counts ORDER BY num_species ASC;","SELECT ocean, MIN(num_species) FROM marine_life_counts GROUP BY ocean;",0 Show all card type codes and the number of cards in each type.,CREATE TABLE Customers_cards (card_type_code VARCHAR);,"SELECT card_type_code, COUNT(*) FROM Customers_cards GROUP BY card_type_code;","SELECT card_type_code, COUNT(*) FROM Customers_cards GROUP BY card_type_code;",1 "How many cases did each attorney work on, grouped by attorney name?","CREATE TABLE attorneys (attorney_id INT, name TEXT); CREATE TABLE cases (case_id INT, attorney_id INT);","SELECT a.name, COUNT(c.attorney_id) AS case_count FROM attorneys a JOIN cases c ON a.attorney_id = c.attorney_id GROUP BY a.name","SELECT a.name, COUNT(c.case_id) FROM attorneys a JOIN cases c ON a.attorney_id = c.attorney_id GROUP BY a.name;",0 What is the average property size in 'Sustainable Suburb' of the sustainable_urbanism table?,"CREATE TABLE sustainable_urbanism (property_id INT, size FLOAT, location VARCHAR(255)); ",SELECT AVG(size) FROM sustainable_urbanism WHERE location = 'Sustainable Suburb';,SELECT AVG(size) FROM sustainable_urbanism WHERE location = 'Sustainable Suburb';,1 How many different scores did Team Europe get when Mika Koivuniemi played for them?,"CREATE TABLE table_19072602_1 (score VARCHAR, team_europe VARCHAR);","SELECT COUNT(score) FROM table_19072602_1 WHERE team_europe = ""Mika Koivuniemi"";","SELECT COUNT(score) FROM table_19072602_1 WHERE team_europe = ""Mika Koivuniemi"";",1 Add a new autonomous bus to the public transportation fleet in Rio de Janeiro.,"CREATE TABLE public_transportation (transport_id INT, type VARCHAR(20), city VARCHAR(20)); ","INSERT INTO public_transportation (transport_id, type, city) VALUES (4, 'Autonomous Bus', 'Rio de Janeiro');","INSERT INTO public_transportation (transport_id, type, city) VALUES (1, 'Autonomous Bus', 'Rio de Janeiro');",0 What is the status of vessel number K-223?,"CREATE TABLE table_1634376_1 (status VARCHAR, _number VARCHAR);","SELECT status FROM table_1634376_1 WHERE _number = ""K-223"";","SELECT status FROM table_1634376_1 WHERE _number = ""K-223"";",1 Delete the record with the 'subscriber_id' 5 from the 'subscribers' table.,"CREATE TABLE subscribers (subscriber_id INT, name VARCHAR(50), data_usage FLOAT);",DELETE FROM subscribers WHERE subscriber_id = 5;,DELETE FROM subscribers WHERE subscriber_id = 5;,1 List all suppliers providing recycled polyester and their respective certifications.,"CREATE TABLE Suppliers (supplier_id INT, name VARCHAR(255), country VARCHAR(255)); CREATE TABLE Materials (material_id INT, name VARCHAR(255), type VARCHAR(255)); CREATE TABLE Supplies (supply_id INT, supplier_id INT, material_id INT, certification VARCHAR(255)); ","SELECT Suppliers.name, Supplies.certification FROM Suppliers INNER JOIN Supplies ON Suppliers.supplier_id = Supplies.supplier_id INNER JOIN Materials ON Supplies.material_id = Materials.material_id WHERE Materials.name = 'Recycled Polyester';","SELECT Suppliers.name, Supplies.certification FROM Suppliers INNER JOIN Materials ON Suppliers.supplier_id = Materials.supplier_id INNER JOIN Supplies ON Materials.material_id = Supplies.supplier_id WHERE Materials.type = 'Recycled Polyester';",0 List all deep-sea creatures discovered since 2010.,"CREATE TABLE deep_sea_creatures (id INT, creature_name TEXT, discovery_date DATE); ",SELECT creature_name FROM deep_sea_creatures WHERE discovery_date >= '2010-01-01';,SELECT creature_name FROM deep_sea_creatures WHERE discovery_date >= '2010-01-01';,1 What is the average sea ice extent for each month in the Arctic?,"CREATE TABLE arctic_month (month_id INT, month_name VARCHAR(255)); CREATE TABLE sea_ice (year INT, month_id INT, extent FLOAT); ","SELECT month_id, AVG(extent) as avg_extent FROM sea_ice GROUP BY month_id;","SELECT a.month_name, AVG(s.expansion) as avg_expansion FROM arctic_month a JOIN sea_ice s ON a.month_id = s.month_id GROUP BY a.month_name;",0 Add a new exhibit 'Chinese Calligraphy' to the 'Asian Art' event.,"CREATE TABLE exhibits (id INT, name VARCHAR(50), event VARCHAR(50), area INT); ","INSERT INTO exhibits (id, name, event, area) VALUES (3, 'Chinese Calligraphy', 'Asian Art', 400);","INSERT INTO exhibits (id, name, event, area) VALUES (1, 'Chinese Calligraphy', 'Asian Art', 'Asian Art');",0 "what is the name of the battleship with the battle listed on May 13, 1915?","CREATE TABLE table_name_23 (name VARCHAR, ship_type VARCHAR, date VARCHAR);","SELECT name FROM table_name_23 WHERE ship_type = ""battleship"" AND date = ""may 13, 1915"";","SELECT name FROM table_name_23 WHERE ship_type = ""battleship"" AND date = ""may 13, 1915"";",1 "What Surface has a Tournament of pune, india?","CREATE TABLE table_name_61 (surface VARCHAR, tournament VARCHAR);","SELECT surface FROM table_name_61 WHERE tournament = ""pune, india"";","SELECT surface FROM table_name_61 WHERE tournament = ""punte, india"";",0 Which country sources the most eco-friendly materials?,"CREATE TABLE sourcing (id INT, country TEXT, quantity INT); ","SELECT country, SUM(quantity) as total_quantity FROM sourcing WHERE quantity <= 1000 GROUP BY country ORDER BY total_quantity DESC LIMIT 1;","SELECT country, MAX(quantity) FROM sourcing GROUP BY country;",0 Find the top 3 mines with the highest CO2 emissions in the 'environmental_impact' table.,"CREATE TABLE environmental_impact (mine_id INT, year INT, co2_emissions INT, methane_emissions INT, waste_generation INT); ","SELECT mine_id, SUM(co2_emissions) FROM environmental_impact GROUP BY mine_id ORDER BY SUM(co2_emissions) DESC LIMIT 3;","SELECT mine_id, year, co2_emissions, methane_emissions, waste_generation FROM environmental_impact ORDER BY co2_emissions DESC LIMIT 3;",0 "Determine the number of days between each sale, partitioned by garment and ordered by date.","CREATE TABLE sales (garment VARCHAR(50), sale_date DATE); ","SELECT garment, sale_date, DATEDIFF(day, LAG(sale_date) OVER (PARTITION BY garment ORDER BY sale_date), sale_date) as days_between_sales FROM sales;","SELECT garment, sale_date, COUNT(*) as days_between FROM sales GROUP BY garment, sale_date ORDER BY sale_date;",0 Delete the 'Penguin' species record from the 'animals' table,"CREATE TABLE animals (id INT, name VARCHAR(50), species VARCHAR(50), population INT);",DELETE FROM animals WHERE species = 'Penguin';,DELETE FROM animals WHERE species = 'Penguin';,1 List the top 3 countries with the most aircraft accidents in 2020.,"CREATE TABLE Aircraft_Accidents (aircraft_model VARCHAR(255), accident_date DATE, country VARCHAR(255)); ","SELECT country, COUNT(*) AS num_accidents FROM Aircraft_Accidents WHERE YEAR(accident_date) = 2020 GROUP BY country ORDER BY num_accidents DESC LIMIT 3;","SELECT country, COUNT(*) as accident_count FROM Aircraft_Accidents WHERE YEAR(accident_date) = 2020 GROUP BY country ORDER BY accident_count DESC LIMIT 3;",0 What is the KINKA 1.3 when the developer is yes and the support version is support mo 230?,"CREATE TABLE table_name_11 (kinka_13 VARCHAR, kinka_developer VARCHAR, version VARCHAR);","SELECT kinka_13 FROM table_name_11 WHERE kinka_developer = ""yes"" AND version = ""support mo 230"";","SELECT kinka_13 FROM table_name_11 WHERE kinka_developer = ""yes"" AND version = ""support mo 230"";",1 What is the total value of military equipment sales to the Australian government by TopDefense from 2015 to 2020?,"CREATE TABLE TopDefense.EquipmentSales (id INT, manufacturer VARCHAR(255), equipment_type VARCHAR(255), quantity INT, price DECIMAL(10,2), buyer_country VARCHAR(255), sale_date DATE);",SELECT SUM(quantity * price) FROM TopDefense.EquipmentSales WHERE buyer_country = 'Australia' AND manufacturer = 'TopDefense' AND sale_date BETWEEN '2015-01-01' AND '2020-12-31';,SELECT SUM(quantity * price) FROM TopDefense.EquipmentSales WHERE buyer_country = 'Australia' AND sale_date BETWEEN '2015-01-01' AND '2020-12-31';,0 How many different kinds of reports are there for races that Juan Manuel Fangio won?,"CREATE TABLE table_1140111_5 (report VARCHAR, winning_driver VARCHAR);","SELECT COUNT(report) FROM table_1140111_5 WHERE winning_driver = ""Juan Manuel Fangio"";","SELECT COUNT(report) FROM table_1140111_5 WHERE winning_driver = ""Juan Manuel Fangio"";",1 What is the ethnic group is конак?,"CREATE TABLE table_2562572_39 (largest_ethnic_group__2002_ VARCHAR, cyrillic_name_other_names VARCHAR);","SELECT largest_ethnic_group__2002_ FROM table_2562572_39 WHERE cyrillic_name_other_names = ""Конак"";","SELECT largest_ethnic_group__2002_ FROM table_2562572_39 WHERE cyrillic_name_other_names = ""конак"";",0 What is the average gold grade for each rock type at sample ID 1001?,"CREATE TABLE Drill_Core (ID int, Sample_ID int, Depth decimal(10,2), Rock_Type varchar(50), Assay_Date date, Gold_Grade decimal(10,2)); ","SELECT Sample_ID, Rock_Type, AVG(Gold_Grade) as Avg_Gold_Grade FROM Drill_Core WHERE Sample_ID = 1001 GROUP BY Sample_ID, Rock_Type;","SELECT Rock_Type, AVG(Gold_Grade) as Avg_Gold_Grade FROM Drill_Core WHERE Sample_ID = 1001 GROUP BY Rock_Type;",0 Identify artists who performed in the same city multiple times in 'artist_performances' table?,"CREATE TABLE artist_performances (performance_id INT, artist_id INT, city_id INT, date DATE);","SELECT artist_id, city_id, COUNT(*) as performances_in_city FROM artist_performances GROUP BY artist_id, city_id HAVING COUNT(*) > 1;","SELECT artist_id, city_id, date FROM artist_performances GROUP BY artist_id, city_id, date HAVING COUNT(*) > 1;",0 Display the names and job titles of members who are in the 'construction' union but not in the 'education' union.,"CREATE TABLE construction_union (id INT, name VARCHAR, title VARCHAR); CREATE TABLE education_union (id INT, name VARCHAR, title VARCHAR); ","SELECT name, title FROM construction_union WHERE name NOT IN (SELECT name FROM education_union);","SELECT c.name, e.title FROM construction_union c INNER JOIN education_union e ON c.id = e.id;",0 "What is the average number of bike-share trips per day in the 'urban' schema, for the month of August in 2021?","CREATE SCHEMA urban; CREATE TABLE urban.bike_share (id INT, trip_date DATE); ",SELECT AVG(COUNT(*)) FROM urban.bike_share WHERE trip_date BETWEEN '2021-08-01' AND '2021-08-31' GROUP BY trip_date;,SELECT AVG(CASE WHEN trip_date BETWEEN '2021-01-01' AND '2021-08-30' THEN 1 ELSE 0 END) FROM urban.bike_share WHERE trip_date BETWEEN '2021-12-31' AND '2021-08-30';,0 What is the Absorbtion (in nanometers) of the color Violet with an emission of 432 nm?,"CREATE TABLE table_name_59 (absorb__nm_ VARCHAR, color VARCHAR, emit__nm_ VARCHAR);","SELECT absorb__nm_ FROM table_name_59 WHERE color = ""violet"" AND emit__nm_ = ""432"";","SELECT absorb__nm_ FROM table_name_59 WHERE color = ""violet"" AND emit__nm_ = ""432"";",1 "What is the year when not nominated was the result, and In the Navel of the Sea was the film title used in nomination?","CREATE TABLE table_name_24 (year__ceremony_ VARCHAR, result VARCHAR, film_title_used_in_nomination VARCHAR);","SELECT year__ceremony_ FROM table_name_24 WHERE result = ""not nominated"" AND film_title_used_in_nomination = ""in the navel of the sea"";","SELECT year__ceremony_ FROM table_name_24 WHERE result = ""not nominated"" AND film_title_used_in_nomination = ""in the naple of the sea"";",0 List the chemical names and production dates for the largest production batch for each chemical.,"CREATE TABLE ProductionBatches (BatchID INT, ChemicalID INT, ProductionDate DATE, BatchSize INT); ","SELECT ChemicalID, MAX(ProductionDate) FROM ProductionBatches GROUP BY ChemicalID;","SELECT ChemicalID, ProductionDate, MAX(BatchSize) FROM ProductionBatches GROUP BY ChemicalID, ProductionDate;",0 What was the township with a geo ID of 3807116660?,"CREATE TABLE table_18600760_3 (township VARCHAR, geo_id VARCHAR);",SELECT township FROM table_18600760_3 WHERE geo_id = 3807116660;,"SELECT township FROM table_18600760_3 WHERE geo_id = ""3807116660"";",0 Who did they play at lincoln financial field at 8:30 (ET) after week 14?,"CREATE TABLE table_name_88 (opponent VARCHAR, time__et_ VARCHAR, week VARCHAR, game_site VARCHAR);","SELECT opponent FROM table_name_88 WHERE week > 14 AND game_site = ""lincoln financial field"" AND time__et_ = ""8:30"";","SELECT opponent FROM table_name_88 WHERE week > 14 AND game_site = ""lincoln financial field"" AND time__et_ = ""8:30 (ET)"";",0 What are the names of all graduate students who have published papers in the Mathematics department?,"CREATE SCHEMA publications;CREATE TABLE student_publications(student_name TEXT,department TEXT,num_publications INTEGER);",SELECT student_name FROM publications.student_publications WHERE department='Mathematics' AND num_publications>0;,SELECT student_name FROM publications.student_publications WHERE department = 'Mathematics';,0 Find the maximum and minimum number of funding rounds for companies in the renewable energy sector.,"CREATE TABLE funding_rounds (id INT, company_id INT, round_number INT, funding_date DATE); CREATE TABLE companies (id INT, name TEXT, industry TEXT, founding_date DATE);","SELECT MAX(round_number), MIN(round_number) FROM funding_rounds JOIN companies ON funding_rounds.company_id = companies.id WHERE companies.industry = 'Renewable Energy';","SELECT MAX(funding_rounds.round_number), MIN(funding_rounds.round_number) FROM funding_rounds INNER JOIN companies ON funding_rounds.company_id = companies.id WHERE companies.industry = 'Renewable Energy';",0 Decrease the price of all skincare products from the United Kingdom by 10%.,"CREATE TABLE products (id INT, name TEXT, price DECIMAL, country TEXT, product_type TEXT);",UPDATE products SET price = price * 0.9 WHERE country = 'United Kingdom' AND product_type = 'skincare';,UPDATE products SET price = price * 1.10 WHERE country = 'United Kingdom' AND product_type = 'Skincare';,0 Which countries have the highest number of ethical fashion vendors?,"CREATE TABLE Countries (Country VARCHAR(50), VendorCount INT); ","SELECT Country, VendorCount FROM Countries ORDER BY VendorCount DESC FETCH FIRST 3 ROWS ONLY;","SELECT Country, VendorCount FROM Countries ORDER BY VendorCount DESC LIMIT 1;",0 What is the total weight of ceramic artifacts in 'Collection Y'?,"CREATE TABLE Collection_Y (Artifact_ID INT, Material VARCHAR(255), Weight INT); ",SELECT SUM(Weight) FROM Collection_Y WHERE Material = 'Ceramic';,SELECT SUM(Weight) FROM Collection_Y WHERE Material = 'Ceramic';,1 "What was the attendance for the March 6 game, where one of the teams had 53 points.","CREATE TABLE table_name_55 (attendance VARCHAR, points VARCHAR, date VARCHAR);","SELECT attendance FROM table_name_55 WHERE points = 53 AND date = ""march 6"";","SELECT attendance FROM table_name_55 WHERE points = ""53"" AND date = ""march 6"";",0 What candidates were featured in the 1974 election?,"CREATE TABLE table_1341640_14 (candidates VARCHAR, first_elected VARCHAR);",SELECT candidates FROM table_1341640_14 WHERE first_elected = 1974;,SELECT candidates FROM table_1341640_14 WHERE first_elected = 1974;,1 What is the total number of open data initiatives by department in the city of Toronto?,"CREATE TABLE department (id INT, name VARCHAR(255)); CREATE TABLE initiative (id INT, name VARCHAR(255), department_id INT, status VARCHAR(255)); ",SELECT SUM(i.id) FROM initiative i JOIN department d ON i.department_id = d.id WHERE d.name = 'Toronto' AND i.status = 'open';,"SELECT d.name, COUNT(i.id) FROM department d JOIN initiative i ON d.id = i.department_id WHERE i.status = 'Open' GROUP BY d.name;",0 "What was the total fare collected from the 'Green Line' on March 8, 2021?","CREATE TABLE routes (route_name VARCHAR(20), fare FLOAT); ",SELECT SUM(fare) FROM routes WHERE route_name = 'Green Line' AND fare_date = '2021-03-08';,SELECT SUM(fare) FROM routes WHERE route_name = 'Green Line' AND date = '2021-03-8';,0 Which artists had the most streams in the month of July?,"CREATE TABLE StreamingData (stream_id INT, stream_date DATE, song_id INT, artist_name VARCHAR(255), streams INT); ","SELECT artist_name, SUM(streams) as total_streams FROM StreamingData WHERE MONTH(stream_date) = 7 GROUP BY artist_name ORDER BY total_streams DESC LIMIT 1;","SELECT artist_name, SUM(streams) as total_streams FROM StreamingData WHERE stream_date BETWEEN '2022-07-01' AND '2022-07-31' GROUP BY artist_name ORDER BY total_streams DESC;",0 Update the name of the dish with dish_id 1 to 'Chia Parfait'.,"CREATE TABLE dishes (dish_id INT PRIMARY KEY, dish_name VARCHAR(50)); ",UPDATE dishes SET dish_name = 'Chia Parfait' WHERE dishes.dish_id = 1;,UPDATE dishes SET dish_name = 'Chia Parfait' WHERE dish_id = 1;,0 What is the total number of sustainable urban properties in the database?,"CREATE TABLE all_sustainable (id INT, city VARCHAR(20)); ","SELECT COUNT(*) FROM (SELECT DISTINCT city FROM all_sustainable WHERE city IN ('New York', 'Seattle', 'Oakland', 'Berkeley')) AS sustainable_cities;",SELECT COUNT(*) FROM all_sustainable;,0 "List all mines and their environmental impact score, grouped by country","CREATE TABLE mine (id INT, name TEXT, country TEXT, environmental_impact_score INT); ","SELECT country, environmental_impact_score, AVG(environmental_impact_score) as avg_score FROM mine GROUP BY country;","SELECT country, name, environmental_impact_score FROM mine GROUP BY country;",0 What is the total amount of water treated by wastewater treatment plants in the city of New York for the year 2018?,"CREATE TABLE wastewater_treatment(plant_id INT, city VARCHAR(50), year INT, treated_water_volume FLOAT); ",SELECT SUM(treated_water_volume) FROM wastewater_treatment WHERE city = 'New York' AND year = 2018;,SELECT SUM(treated_water_volume) FROM wastewater_treatment WHERE city = 'New York' AND year = 2018;,1 How many times was Louisiana-Monroe a visiting team?,"CREATE TABLE table_26842217_6 (time VARCHAR, visiting_team VARCHAR);","SELECT COUNT(time) FROM table_26842217_6 WHERE visiting_team = ""Louisiana-Monroe"";","SELECT COUNT(time) FROM table_26842217_6 WHERE visiting_team = ""Louisiana-Monroe"";",1 "What is the number of medical professionals in rural areas, categorized by their specialties, for the last five years?","CREATE TABLE medical_professionals (professional_id INT, region VARCHAR(20), specialty VARCHAR(30), join_year INT); ","SELECT s.specialty, COUNT(mp.professional_id), s.year FROM medical_professionals mp JOIN ( SELECT region, specialty, EXTRACT(YEAR FROM age(join_year, CURRENT_DATE)) AS year FROM medical_professionals WHERE region = 'Rural' GROUP BY region, specialty, year ORDER BY year DESC LIMIT 5 ) s ON mp.specialty = s.specialty GROUP BY s.specialty, s.year;","SELECT specialty, COUNT(*) FROM medical_professionals WHERE region = 'Rural' AND join_year >= YEAR(CURRENT_DATE) - 5 GROUP BY specialty;",0 "What are the manuals with a kind of r, and an opus of 144?","CREATE TABLE table_name_89 (manuals VARCHAR, kind VARCHAR, opus VARCHAR);","SELECT manuals FROM table_name_89 WHERE kind = ""r"" AND opus = ""144"";","SELECT manuals FROM table_name_89 WHERE kind = ""r"" AND opus = ""144"";",1 What is the maximum sustainable yield of cod in the Atlantic Ocean off the coast of Norway?,"CREATE TABLE atlanticcod (country VARCHAR(20), location VARCHAR(30), max_sustainable_yield FLOAT); ",SELECT max_sustainable_yield FROM atlanticcod WHERE country = 'Norway' AND location = 'Atlantic Ocean';,SELECT MAX(max_sustainable_yield) FROM atlanticcod WHERE country = 'Norway' AND location = 'Atlantic Ocean';,0 "What is the total number of Top division titles for the club that has more than 40 seasons in top division, a First season of current spell in top division of 1943-44, and more than 89 seasons in Liga MX?","CREATE TABLE table_name_55 (top_division_titles VARCHAR, number_of_seasons_in_liga_mx VARCHAR, number_of_seasons_in_top_division VARCHAR, first_season_of_current_spell_in_top_division VARCHAR);","SELECT COUNT(top_division_titles) FROM table_name_55 WHERE number_of_seasons_in_top_division > 40 AND first_season_of_current_spell_in_top_division = ""1943-44"" AND number_of_seasons_in_liga_mx > 89;","SELECT COUNT(top_division_titles) FROM table_name_55 WHERE number_of_seasons_in_top_division > 40 AND first_season_of_current_spell_in_top_division = ""1943-44"" AND number_of_seasons_in_liga_mx > 89;",1 What is the number of bookings and revenue generated by each OTA for hotels in London?,"CREATE TABLE otas (ota_id INT, ota_name TEXT, bookings INT, revenue INT); CREATE TABLE bookings (booking_id INT, ota_id INT, hotel_id INT, bookings INT, revenue INT); CREATE TABLE hotels (hotel_id INT, hotel_name TEXT, city TEXT); ","SELECT ota_name, SUM(bookings) as total_bookings, SUM(revenue) as total_revenue FROM otas JOIN bookings ON otas.ota_id = bookings.ota_id JOIN hotels ON bookings.hotel_id = hotels.hotel_id WHERE hotels.city = 'London' GROUP BY ota_name;","SELECT ota_name, SUM(bookings) as total_bookings, SUM(revenue) as total_revenue FROM otas JOIN bookings ON otas.ota_id = bookings.ota_id JOIN hotels ON bookings.hotel_id = hotels.hotel_id WHERE hotels.city = 'London' GROUP BY ota_name;",1 Delete all records with zero quantity sold in the 'appetizers' category from the menu.,"CREATE TABLE menu (id INT, category VARCHAR(255), item VARCHAR(255), qty_sold INT); ",DELETE FROM menu WHERE category = 'appetizers' AND qty_sold = 0;,DELETE FROM menu WHERE qty_sold 0 AND category = 'appetizers';,0 "What is the total word count of articles published in the 'Opinion' category in the year 2021, categorized by gender?","CREATE TABLE articles (id INT, title TEXT, word_count INT, published DATE, category TEXT, author_gender TEXT); ","SELECT author_gender, SUM(word_count) FROM articles WHERE category = 'Opinion' AND YEAR(published) = 2021 GROUP BY author_gender;","SELECT author_gender, SUM(word_count) FROM articles WHERE category = 'Opinion' AND YEAR(published) = 2021 GROUP BY author_gender;",1 What is the total number of mining sites in each state?,"CREATE TABLE mining_sites (site_id INT, site_name VARCHAR(50), state VARCHAR(20));","SELECT s.state, COUNT(*) FROM mining_sites s GROUP BY s.state;","SELECT state, COUNT(*) FROM mining_sites GROUP BY state;",0 What is the total number of visitors who engaged in digital museum activities?,"CREATE TABLE Digital_Engagement (id INT, visitor_id INT, activity_date DATE); CREATE TABLE Visitors (id INT, name VARCHAR(255)); ",SELECT COUNT(DISTINCT visitor_id) FROM Digital_Engagement;,SELECT COUNT(DISTINCT Visitors.id) FROM Visitors INNER JOIN Digital_Engagement ON Visitors.id = Digital_Engagement.visitor_id;,0 "Total number of visitors for each exhibition, including visitors who did not engage with any installations?","CREATE TABLE Exhibitions (ExhibitionID INT, Name VARCHAR(50)); CREATE TABLE Visitors (VisitorID INT, ExhibitionID INT); ","SELECT E.Name, COUNT(V.VisitorID) + (SELECT COUNT(*) FROM Visitors V2 WHERE V2.ExhibitionID IS NULL AND NOT EXISTS (SELECT 1 FROM Visitors V3 WHERE V3.VisitorID = V2.VisitorID)) AS TotalVisitors FROM Exhibitions E LEFT JOIN Visitors V ON E.ExhibitionID = V.ExhibitionID GROUP BY E.ExhibitionID, E.Name;","SELECT Exhibitions.Name, COUNT(VisitorID) FROM Exhibitions INNER JOIN Visitors ON Exhibitions.ExhibitionID = Visitors.ExhibitionID GROUP BY Exhibitions.Name;",0 Insert data into the publications table,"CREATE TABLE Publications (PublicationID INT PRIMARY KEY, Title VARCHAR(255), Author VARCHAR(255), Year INT, Type VARCHAR(255)); ","INSERT INTO Publications (PublicationID, Title, Author, Year, Type) VALUES (1, 'The Tomb of Tutankhamun', 'Howard Carter', 1923, 'Book');","INSERT INTO Publications (PublicationID, Title, Author, Year, Type) VALUES (1, 'The New York Times', 'The New York Times', 'The New York Times'), (2, 'The New York Times', 'The New York Times'), (3, 'The New York Times', 'The New York Times'), (4, 'The New York Times', 'The New York Times'), (5, 'The New York Times', 'The New York Times', 'The New York Times', 'The New York Times');",0 How many electric vehicles were sold in California during the first quarter of 2021?,"CREATE TABLE sales_data (state VARCHAR(20), quarter INT, year INT, vehicle_type VARCHAR(10), quantity INT); ","SELECT state, SUM(quantity) AS total_sold FROM sales_data WHERE state = 'California' AND vehicle_type = 'Electric' AND quarter = 1 GROUP BY state;",SELECT SUM(quantity) FROM sales_data WHERE state = 'California' AND vehicle_type = 'Electric' AND quarter = 1 AND year = 2021;,0 List the species that exist in both the Arctic and Antarctic oceans.,"CREATE TABLE arctic_species (id INT, species VARCHAR(255)); CREATE TABLE antarctic_species (id INT, species VARCHAR(255)); ",SELECT species FROM arctic_species WHERE species IN (SELECT species FROM antarctic_species);,SELECT a.species FROM arctic_species a INNER JOIN antarctic_species a ON a.species = a.species;,0 What is the Term Start date of the Progressive Party Prime Minister?,"CREATE TABLE table_name_45 (term_start VARCHAR, political_party VARCHAR);","SELECT term_start FROM table_name_45 WHERE political_party = ""progressive party"";","SELECT term_start FROM table_name_45 WHERE political_party = ""progressive party prime minister"";",0 "What is average frequency MHZ when is in portales, new mexico?","CREATE TABLE table_name_13 (frequency_mhz INTEGER, city_of_license VARCHAR);","SELECT AVG(frequency_mhz) FROM table_name_13 WHERE city_of_license = ""portales, new mexico"";","SELECT AVG(frequency_mhz) FROM table_name_13 WHERE city_of_license = ""portales, new mexico"";",1 What is the maximum depth at which any marine species is found?,"CREATE TABLE marine_species_depths (species VARCHAR(255), max_depth FLOAT); ",SELECT MAX(max_depth) FROM marine_species_depths;,SELECT MAX(max_depth) FROM marine_species_depths;,1 "Which Record has a Time (ET) of 1:00pm, and an Opponent of kansas city chiefs?","CREATE TABLE table_name_25 (record VARCHAR, time___et__ VARCHAR, opponent VARCHAR);","SELECT record FROM table_name_25 WHERE time___et__ = ""1:00pm"" AND opponent = ""kansas city chiefs"";","SELECT record FROM table_name_25 WHERE time___et__ = ""1:00pm"" AND opponent = ""kansas city chiefs"";",1 What was the percentage of attendees over 65 years old at the 'Senior Arts Festival' in Miami?,"CREATE TABLE age_distribution_2 (event_name VARCHAR(50), city VARCHAR(50), age_group VARCHAR(10), attendees INT); ",SELECT (attendees * 100.0 / (SELECT SUM(attendees) FROM age_distribution_2 WHERE event_name = 'Senior Arts Festival' AND city = 'Miami')) AS percentage FROM age_distribution_2 WHERE event_name = 'Senior Arts Festival' AND city = 'Miami' AND age_group = 'Over 65';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM age_distribution_2) FROM age_distribution_2 WHERE event_name = 'Senior Arts Festival' AND city = 'Miami' AND age_group = '65+') AS percentage FROM age_distribution_2 WHERE event_name = 'Senior Arts Festival';,0 "What is the production code for the show that aired on October 27, 1994?","CREATE TABLE table_11951237_1 (production_code INTEGER, original_air_date VARCHAR);","SELECT MAX(production_code) FROM table_11951237_1 WHERE original_air_date = ""October 27, 1994"";","SELECT MAX(production_code) FROM table_11951237_1 WHERE original_air_date = ""October 27, 1994"";",1 What is the total biomass of marine life in the Indian Ocean?,"CREATE TABLE marine_life (life_id INT, life_name VARCHAR(50), region VARCHAR(50), biomass INT); ",SELECT SUM(biomass) FROM marine_life WHERE region = 'Indian Ocean';,SELECT SUM(biomass) FROM marine_life WHERE region = 'Indian Ocean';,1 What is the total number of military equipment sales in the Asia-Pacific region?,"CREATE TABLE military_equipment_sales(id INT, region VARCHAR(20), equipment_type VARCHAR(20), quantity INT, sale_price FLOAT);",SELECT SUM(quantity * sale_price) FROM military_equipment_sales WHERE region = 'Asia-Pacific';,SELECT SUM(quantity * sale_price) FROM military_equipment_sales WHERE region = 'Asia-Pacific';,1 What was the total revenue of organic products sold in the USA in Q1 2022?,"CREATE TABLE OrganicProductSales (product_id INT, sale_date DATE, revenue DECIMAL(10,2));",SELECT SUM(revenue) FROM OrganicProductSales WHERE sale_date BETWEEN '2022-01-01' AND '2022-03-31' AND country = 'USA';,SELECT SUM(revenue) FROM OrganicProductSales WHERE sale_date BETWEEN '2022-01-01' AND '2022-03-31' AND country = 'USA';,1 "Insert a new sale for the state of Michigan in Q1 2022 with a revenue of 15000 and a strain of ""Blue Dream""","CREATE TABLE sales (id INT, state VARCHAR(50), quarter VARCHAR(10), strain VARCHAR(50), revenue INT);","INSERT INTO sales (state, quarter, strain, revenue) VALUES ('Michigan', 'Q1', 'Blue Dream', 15000);","INSERT INTO sales (state, quarter, strain, revenue) VALUES ('Michigan', 'Q1 2022', 15000, 'Blue Dream');",0 What is the total donation amount for each donor in each non-social cause category?,"CREATE TABLE donations (id INT, donor_id INT, amount DECIMAL(10, 2), cause_id INT); CREATE TABLE causes (id INT, name VARCHAR(255), type VARCHAR(255)); ","SELECT d.donor_id, c.type, SUM(d.amount) FROM donations d JOIN causes c ON d.cause_id = c.id GROUP BY d.donor_id, c.type HAVING c.type != 'Social';","SELECT c.name, SUM(d.amount) as total_donation FROM donations d JOIN causes c ON d.cause_id = c.id WHERE c.type = 'Non-social' GROUP BY c.name;",0 Show the number of asteroids that have been visited by spacecraft,"CREATE TABLE asteroids (asteroid_id INT, asteroid_name VARCHAR(50), visited BOOLEAN); ",SELECT COUNT(*) as num_visited_asteroids FROM asteroids WHERE visited = true;,SELECT COUNT(*) FROM asteroids WHERE visited = TRUE;,0 Show the number of transactions for different investors.,CREATE TABLE TRANSACTIONS (investor_id VARCHAR);,"SELECT investor_id, COUNT(*) FROM TRANSACTIONS GROUP BY investor_id;","SELECT investor_id, COUNT(*) FROM TRANSACTIONS GROUP BY investor_id;",1 What date was fitzroy the away team?,"CREATE TABLE table_name_65 (date VARCHAR, away_team VARCHAR);","SELECT date FROM table_name_65 WHERE away_team = ""fitzroy"";","SELECT date FROM table_name_65 WHERE away_team = ""fitzroy"";",1 What is the total capacity of all cargo ships owned by the ACME corporation?,"CREATE TABLE cargo_ships (id INT, name VARCHAR(50), capacity INT, owner_id INT); CREATE TABLE owners (id INT, name VARCHAR(50)); ",SELECT SUM(capacity) FROM cargo_ships JOIN owners ON cargo_ships.owner_id = owners.id WHERE owners.name = 'ACME Corporation';,SELECT SUM(capacity) FROM cargo_ships JOIN owners ON cargo_ships.owner_id = owners.id WHERE owners.name = 'ACME Corporation';,1 What is the minimum serving size for fair-trade coffee?,"CREATE TABLE Beverages (id INT, is_fair_trade BOOLEAN, category VARCHAR(20), serving_size INT); ",SELECT MIN(serving_size) FROM Beverages WHERE is_fair_trade = true AND category = 'coffee';,SELECT MIN(serving_size) FROM Beverages WHERE is_fair_trade = true AND category = 'Cafe';,0 What is the total salary cost for each department in the company?,"CREATE TABLE Employees (EmployeeID INT, Department VARCHAR(20), Salary DECIMAL(10,2)); ","SELECT Department, SUM(Salary) as TotalSalaryCost FROM Employees GROUP BY Department;","SELECT Department, SUM(Salary) FROM Employees GROUP BY Department;",0 What state is the city of Ruston in?,"CREATE TABLE table_name_13 (state VARCHAR, city VARCHAR);","SELECT state FROM table_name_13 WHERE city = ""ruston"";","SELECT state FROM table_name_13 WHERE city = ""ruston"";",1 How many rural infrastructure projects were completed per year in the 'rural_infrastructure' table?,"CREATE TABLE rural_infrastructure (project_name VARCHAR(255), project_type VARCHAR(255), completion_year INT); ","SELECT completion_year, COUNT(*) FROM rural_infrastructure GROUP BY completion_year;","SELECT completion_year, COUNT(*) FROM rural_infrastructure GROUP BY completion_year;",1 "Count the number of new hires per quarter, for the past two years, in the HR department.","CREATE TABLE Employees (EmployeeID INT, HireDate DATE); ","SELECT DATE_FORMAT(HireDate, '%Y-%V') AS Quarter, COUNT(*) AS NewHires FROM Employees WHERE HireDate >= DATE_SUB(CURDATE(), INTERVAL 2 YEAR) AND Department = 'HR' GROUP BY Quarter;","SELECT DATE_FORMAT(HireDate, '%Y-%m') AS Quarter, COUNT(*) AS NewHires FROM Employees WHERE HireDate >= DATE_SUB(CURRENT_DATE, INTERVAL 2 YEAR) GROUP BY Quarter;",0 What is the number of rural infrastructure projects and total budget by sector in Southeast Asia?,"CREATE TABLE RuralInfrastructure (id INT, project_id INT, type VARCHAR(255), sector VARCHAR(255), jobs_created INT, budget FLOAT); CREATE TABLE Geography (id INT, country VARCHAR(255), region VARCHAR(255)); ","SELECT RuralInfrastructure.sector, COUNT(RuralInfrastructure.id) as num_projects, SUM(RuralInfrastructure.budget) as total_budget FROM RuralInfrastructure INNER JOIN Geography ON 'Village A' = Geography.country WHERE Geography.region = 'Southeast Asia' GROUP BY RuralInfrastructure.sector;","SELECT r.sector, COUNT(r.id) as num_projects, SUM(r.budget) as total_budget FROM RuralInfrastructure r INNER JOIN Geography g ON r.id = g.project_id WHERE g.region = 'Southeast Asia' GROUP BY r.sector;",0 "How many news articles were published in the ""articles"" table for each month in 2020?","CREATE TABLE articles (id INT, title VARCHAR(100), publication_date DATE);","SELECT EXTRACT(MONTH FROM publication_date) AS month, COUNT(*) AS num_articles FROM articles WHERE EXTRACT(YEAR FROM publication_date) = 2020 GROUP BY month;","SELECT EXTRACT(MONTH FROM publication_date) AS month, COUNT(*) FROM articles WHERE YEAR(publication_date) = 2020 GROUP BY month;",0 Show the number of unique product categories for suppliers in India.,"CREATE TABLE suppliers (supplier_id INT, supplier_name TEXT, country TEXT, product_category TEXT); ",SELECT COUNT(DISTINCT product_category) FROM suppliers WHERE country = 'India';,SELECT COUNT(DISTINCT product_category) FROM suppliers WHERE country = 'India';,1 Which renewable energy sources have been installed in Africa with a capacity greater than 150 MW?,"CREATE TABLE africa_renewable (id INT, source VARCHAR(50), capacity FLOAT); ",SELECT DISTINCT source FROM africa_renewable WHERE capacity > 150;,SELECT source FROM africa_renewable WHERE capacity > 150;,0 What is the total duration of videos in the 'Education' category?,"CREATE TABLE Videos (video_id INT, title VARCHAR(255), category VARCHAR(50), duration INT); ",SELECT SUM(duration) FROM Videos WHERE category = 'Education';,SELECT SUM(duration) FROM Videos WHERE category = 'Education';,1 How many biosensor technology patents were granted in Germany between 2015 and 2018?,"CREATE SCHEMA if not exists biosensors;CREATE TABLE if not exists biosensors.patents (id INT PRIMARY KEY, name VARCHAR(100), country VARCHAR(50), patent_date DATE);",SELECT COUNT(*) FROM biosensors.patents WHERE country = 'Germany' AND patent_date BETWEEN '2015-01-01' AND '2018-12-31';,SELECT COUNT(*) FROM biosensors.patents WHERE country = 'Germany' AND patent_date BETWEEN '2015-01-01' AND '2018-12-31';,1 What is the maximum number of hours spent on mental health support sessions by teachers in each department?,"CREATE TABLE departments (department_id INT, department_name TEXT); CREATE TABLE teachers (teacher_id INT, teacher_name TEXT, department_id INT, hours_spent_on_mental_health_sessions INT); ","SELECT d.department_name, MAX(t.hours_spent_on_mental_health_sessions) FROM departments d INNER JOIN teachers t ON d.department_id = t.department_id GROUP BY d.department_id;","SELECT d.department_name, MAX(t.hours_spent_on_mental_health_sessions) FROM departments d JOIN teachers t ON d.department_id = t.department_id GROUP BY d.department_name;",0 How many floors does the Blue Diamond have?,"CREATE TABLE table_name_92 (floors INTEGER, name VARCHAR);","SELECT SUM(floors) FROM table_name_92 WHERE name = ""blue diamond"";","SELECT SUM(floors) FROM table_name_92 WHERE name = ""blue diamond"";",1 Who was the away team at Victoria Park?,"CREATE TABLE table_name_52 (away_team VARCHAR, venue VARCHAR);","SELECT away_team FROM table_name_52 WHERE venue = ""victoria park"";","SELECT away_team FROM table_name_52 WHERE venue = ""victoria park"";",1 What's the average view count of videos from the 'Asia' region?,"CREATE TABLE videos_region (id INT, title TEXT, region TEXT, view_count INT); ",SELECT AVG(view_count) FROM videos_region WHERE region = 'Asia';,SELECT AVG(view_count) FROM videos_region WHERE region = 'Asia';,1 Who is the player that plays position f from Fort Wayne Pistons?,"CREATE TABLE table_name_89 (player VARCHAR, team VARCHAR, position VARCHAR);","SELECT player FROM table_name_89 WHERE team = ""fort wayne pistons"" AND position = ""f"";","SELECT player FROM table_name_89 WHERE team = ""fort wayne pistons"" AND position = ""f"";",1 "What is the most common word in the titles of articles published by ""El País"" in 2022?","CREATE TABLE articles (id INT, title TEXT, content TEXT, publication_date DATE, newspaper TEXT); CREATE TABLE words (id INT, article_id INT, word TEXT);","SELECT word, COUNT(*) AS word_count FROM words w INNER JOIN articles a ON w.article_id = a.id WHERE a.newspaper = 'El País' AND YEAR(a.publication_date) = 2022 GROUP BY word ORDER BY word_count DESC LIMIT 1;","SELECT word, COUNT(*) FROM articles JOIN words ON articles.id = words.article_id WHERE newspaper = 'El Pas' AND YEAR(publication_date) = 2022 GROUP BY word ORDER BY COUNT(*) DESC LIMIT 1;",0 On what date(s) was the winning team Prema Powerteam?,"CREATE TABLE table_25213146_2 (date VARCHAR, winning_team VARCHAR);","SELECT date FROM table_25213146_2 WHERE winning_team = ""Prema Powerteam"";","SELECT date FROM table_25213146_2 WHERE winning_team = ""Prema Powerteam"";",1 What is the latest year with less than 0 points?,"CREATE TABLE table_name_54 (year INTEGER, points INTEGER);",SELECT MAX(year) FROM table_name_54 WHERE points < 0;,SELECT MAX(year) FROM table_name_54 WHERE points 0;,0 Calculate the average number of cases per court in the justice system,"CREATE TABLE courts (court_id INT, court_name VARCHAR(255), PRIMARY KEY (court_id)); CREATE TABLE court_cases (court_id INT, case_id INT, PRIMARY KEY (court_id, case_id), FOREIGN KEY (court_id) REFERENCES courts(court_id), FOREIGN KEY (case_id) REFERENCES cases(case_id)); ",SELECT AVG(cc.court_id) FROM courts c INNER JOIN court_cases cc ON c.court_id = cc.court_id;,SELECT AVG(cases_per_court) FROM court_cases JOIN courts ON court_cases.court_id = courts.court_id GROUP BY courts.court_id;,0 Show total number of research data entries,"CREATE TABLE autonomous_driving_data (id INT PRIMARY KEY, research_type VARCHAR(255), date DATE, data TEXT); ",SELECT COUNT(*) FROM autonomous_driving_data;,SELECT COUNT(*) FROM autonomous_driving_data;,1 What was the date of the victory when the Axis Unit was 5./jg 3?,"CREATE TABLE table_name_45 (date__ddmmyyyy_ VARCHAR, axis_unit VARCHAR);","SELECT date__ddmmyyyy_ FROM table_name_45 WHERE axis_unit = ""5./jg 3"";","SELECT date__ddmmyyyy_ FROM table_name_45 WHERE axis_unit = ""5./jg 3"";",1 How many environmental impact assessments were conducted in Region Z?,"CREATE TABLE EnvironmentalImpact (id INT, mine_id INT, region TEXT, year INT, assessment_count INT); ",SELECT SUM(assessment_count) FROM EnvironmentalImpact WHERE region = 'Region Z';,SELECT SUM(assessment_count) FROM EnvironmentalImpact WHERE region = 'Region Z';,1 "show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length.","CREATE TABLE bridge (name VARCHAR, architect_id VARCHAR, length_feet VARCHAR); CREATE TABLE architect (id VARCHAR, nationality VARCHAR);",SELECT t1.name FROM bridge AS t1 JOIN architect AS t2 ON t1.architect_id = t2.id WHERE t2.nationality = 'American' ORDER BY t1.length_feet;,SELECT name FROM bridge WHERE architect_id = (SELECT id FROM architect WHERE nationality = 'American Archtect') ORDER BY length_feet;,0 What is the average cost of medical procedures performed in each hospital in 2020?,"CREATE TABLE medical_procedures (id INT, name TEXT, hospital TEXT, procedure_date DATE, cost FLOAT); ","SELECT hospital, AVG(cost) as avg_cost FROM medical_procedures WHERE procedure_date >= '2020-01-01' AND procedure_date < '2021-01-01' GROUP BY hospital;","SELECT hospital, AVG(cost) FROM medical_procedures WHERE YEAR(procedure_date) = 2020 GROUP BY hospital;",0 What is the number of finish of the Qual of 159.384?,"CREATE TABLE table_name_11 (finish VARCHAR, qual VARCHAR);","SELECT finish FROM table_name_11 WHERE qual = ""159.384"";","SELECT COUNT(finish) FROM table_name_11 WHERE qual = ""159.384"";",0 What is the average financial wellbeing score for clients in Brazil?,"CREATE TABLE financial_wellbeing (id INT, client_id INT, country VARCHAR(50), score FLOAT); ","SELECT country, AVG(score) as avg_score FROM financial_wellbeing WHERE country = 'Brazil';",SELECT AVG(score) FROM financial_wellbeing WHERE country = 'Brazil';,0 What period were conscituency contested is aljunied grc?,"CREATE TABLE table_1889233_2 (period_in_office VARCHAR, constituency_contested VARCHAR);","SELECT period_in_office FROM table_1889233_2 WHERE constituency_contested = ""Aljunied GRC"";","SELECT period_in_office FROM table_1889233_2 WHERE constituency_contested = ""Aljunied Grc"";",0 Update the hire date of employee with ID 1 to '2019-06-01',"CREATE SCHEMA IF NOT EXISTS hr;CREATE TABLE IF NOT EXISTS employees (id INT, name VARCHAR(50), department VARCHAR(50), hire_date DATE);",UPDATE hr.employees SET hire_date = '2019-06-01' WHERE id = 1;,UPDATE employees SET hire_date = '2019-06-01' WHERE id = 1;,0 what's the report with rnd being 4,"CREATE TABLE table_1140074_2 (report VARCHAR, rnd VARCHAR);",SELECT report FROM table_1140074_2 WHERE rnd = 4;,SELECT report FROM table_1140074_2 WHERE rnd = 4;,1 "What is the average overall that has a pick less than 20, North Carolina as the college, with a round less than 8?","CREATE TABLE table_name_69 (overall INTEGER, round VARCHAR, pick VARCHAR, college VARCHAR);","SELECT AVG(overall) FROM table_name_69 WHERE pick < 20 AND college = ""north carolina"" AND round < 8;","SELECT AVG(overall) FROM table_name_69 WHERE pick 20 AND college = ""north carolina"" AND round 8;",0 What is the maximum number of shares held by a single customer for the 'AAPL' stock?,"CREATE TABLE holdings (holding_id INT, customer_id INT, ticker VARCHAR(10), shares INT); ",SELECT MAX(shares) FROM holdings WHERE ticker = 'AAPL';,SELECT MAX(shares) FROM holdings WHERE ticker = 'AAPL';,1 "How many unique users have posted about ""climate change"" in the last year?","CREATE TABLE users (id INT, username VARCHAR(255)); CREATE TABLE posts (id INT, user INT, content TEXT, timestamp TIMESTAMP);","SELECT COUNT(DISTINCT user) FROM posts JOIN users ON posts.user = users.id WHERE content LIKE '%climate change%' AND timestamp BETWEEN DATE_SUB(NOW(), INTERVAL 1 YEAR) AND NOW();","SELECT COUNT(DISTINCT user) FROM posts WHERE content LIKE '%climate change%' AND timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 YEAR);",0 "What are the circular economy initiatives in the EU, including their budgets and the number of people they have impacted, as of 2021?","CREATE TABLE circular_initiatives_eu (initiative TEXT, budget INTEGER, people_impacted INTEGER, start_date DATE);","SELECT initiative, budget, people_impacted FROM circular_initiatives_eu WHERE country = 'EU' AND start_date <= '2021-12-31';","SELECT initiative, budget, people_impacted FROM circular_initiatives_eu WHERE start_date BETWEEN '2021-01-01' AND '2021-12-31';",0 "What's the Class for the city the license plate was issued in great barrington, massachusetts?","CREATE TABLE table_name_16 (class VARCHAR, city_of_license VARCHAR);","SELECT class FROM table_name_16 WHERE city_of_license = ""great barrington, massachusetts"";","SELECT class FROM table_name_16 WHERE city_of_license = ""great barrington, massachusetts"";",1 What is the average water temperature in February for tropical fish farms?,"CREATE TABLE fish_farms (id INT, name TEXT, location TEXT, water_type TEXT, water_temperature DECIMAL(5,2)); ",SELECT AVG(water_temperature) FROM fish_farms WHERE EXTRACT(MONTH FROM date) = 2 AND water_type = 'tropical';,SELECT AVG(water_temperature) FROM fish_farms WHERE water_type = 'tropical' AND EXTRACT(MONTH FROM date) = 2;,0 What is the att-cmp-int with an effic smaller than 117.88 and a gp-gs of 10-0?,"CREATE TABLE table_name_73 (att_cmp_int VARCHAR, effic VARCHAR, gp_gs VARCHAR);","SELECT att_cmp_int FROM table_name_73 WHERE effic < 117.88 AND gp_gs = ""10-0"";","SELECT att_cmp_int FROM table_name_73 WHERE effic 117.88 AND gp_gs = ""10-0"";",0 How many male professors are there in the Mathematics department with no research grants?,"CREATE TABLE department (name VARCHAR(255), id INT);CREATE TABLE professor (name VARCHAR(255), gender VARCHAR(255), department_id INT, grant_amount DECIMAL(10,2));",SELECT COUNT(DISTINCT name) FROM professor WHERE gender = 'Male' AND department_id IN (SELECT id FROM department WHERE name = 'Mathematics') AND grant_amount IS NULL;,SELECT COUNT(*) FROM professor WHERE gender = 'Male' AND department_id NOT IN (SELECT id FROM department WHERE name = 'Mathematics');,0 What is the distribution of community health workers by race and ethnicity?,"CREATE TABLE community_health_workers (id INT, name VARCHAR(50), race VARCHAR(20), ethnicity VARCHAR(20)); ","SELECT race, ethnicity, COUNT(*) as worker_count FROM community_health_workers GROUP BY race, ethnicity;","SELECT race, ethnicity, COUNT(*) as count FROM community_health_workers GROUP BY race, ethnicity;",0 what's the party with candidates being silvio conte (r) unopposed,"CREATE TABLE table_1341604_22 (party VARCHAR, candidates VARCHAR);","SELECT party FROM table_1341604_22 WHERE candidates = ""Silvio Conte (R) Unopposed"";","SELECT party FROM table_1341604_22 WHERE candidates = ""Silvio Conte (R) Unopposed"";",1 What is the Latin equivalent for the Phagspa of ꡙ?,"CREATE TABLE table_name_72 (latin VARCHAR, ’phagspa VARCHAR);","SELECT latin FROM table_name_72 WHERE ’phagspa = ""ꡙ"";","SELECT latin FROM table_name_72 WHERE ’phagspa = """";",0 "When John Harkes was the color commentator, and Alexi Lalas and Steve McManaman were the pregame analysts, who were the sideline reporters?","CREATE TABLE table_name_84 (sideline_reporters VARCHAR, color_commentator VARCHAR, pregame_analysts VARCHAR);","SELECT sideline_reporters FROM table_name_84 WHERE color_commentator = ""john harkes"" AND pregame_analysts = ""alexi lalas and steve mcmanaman"";","SELECT sideline_reporters FROM table_name_84 WHERE color_commentator = ""john harkes"" AND pregame_analysts = ""alexi lalas and steve mcmanaman"";",1 Loss of gonzález (0–3) had what attendance?,"CREATE TABLE table_name_32 (attendance VARCHAR, loss VARCHAR);","SELECT attendance FROM table_name_32 WHERE loss = ""gonzález (0–3)"";","SELECT attendance FROM table_name_32 WHERE loss = ""gonzález (0–3)"";",1 "Who are the opponents of Mike Byron and partner in matches where the score was 6–4, 4–6, 7–6 (7–4)?","CREATE TABLE table_1964010_2 (opponents VARCHAR, score VARCHAR);","SELECT opponents FROM table_1964010_2 WHERE score = ""6–4, 4–6, 7–6 (7–4)"";","SELECT opponents FROM table_1964010_2 WHERE score = ""6–4, 4–6, 7–6 (7–4)"";",1 "What is the count of clients with a financial wellbeing score greater than 70, in the Southeast region?","CREATE TABLE clients (id INT, name VARCHAR, region VARCHAR, financial_wellbeing_score INT); ",SELECT COUNT(*) FROM clients WHERE region = 'Southeast' AND financial_wellbeing_score > 70;,SELECT COUNT(*) FROM clients WHERE region = 'Southeast' AND financial_wellbeing_score > 70;,1 What is the average rating for service_id 123?,"CREATE TABLE feedback (citizen_id INT, service_id INT, rating INT); ",SELECT AVG(rating) FROM feedback WHERE service_id = 123;,SELECT AVG(rating) FROM feedback WHERE service_id = 123;,1 WHAT IS THE APPOINTMENT DATE FOR AC HORSENS?,"CREATE TABLE table_name_33 (date_of_appointment VARCHAR, team VARCHAR);","SELECT date_of_appointment FROM table_name_33 WHERE team = ""ac horsens"";","SELECT date_of_appointment FROM table_name_33 WHERE team = ""ac horons"";",0 "what is the venue when the score is 1 goal and the date is october 11, 1997?","CREATE TABLE table_name_96 (venue VARCHAR, score VARCHAR, date VARCHAR);","SELECT venue FROM table_name_96 WHERE score = ""1 goal"" AND date = ""october 11, 1997"";","SELECT venue FROM table_name_96 WHERE score = ""1 goal"" AND date = ""october 11, 1997"";",1 What is the total number of tourists who visited cultural heritage sites in India last year?,"CREATE TABLE countries (country_id INT, country TEXT); CREATE TABLE years (year_id INT, year TEXT); CREATE TABLE tourism (tourist_id INT, country_id INT, year_id INT, site_type TEXT); ",SELECT COUNT(*) FROM tourism WHERE country_id = (SELECT country_id FROM countries WHERE country = 'India') AND year_id = (SELECT year_id FROM years WHERE year = '2022') AND site_type = 'cultural_heritage';,SELECT COUNT(*) FROM tourism t JOIN countries c ON t.country_id = c.country_id JOIN years y ON t.year_id = y.year_id JOIN countries c ON t.country_id = c.country_id WHERE c.country = 'India' AND y.year = 2021;,0 What is the minimum price of ethical AI solutions developed by companies in Asia?,"CREATE TABLE AI (id INT, solution VARCHAR(50), company VARCHAR(50), price DECIMAL(5,2), region VARCHAR(50)); ",SELECT MIN(price) FROM AI WHERE region = 'Asia' AND solution LIKE '%ethical%';,SELECT MIN(price) FROM AI WHERE solution = 'Ethical AI' AND region = 'Asia';,0 What was the result for City of the Sun?,"CREATE TABLE table_22032599_1 (result VARCHAR, film_title_used_in_nomination VARCHAR);","SELECT result FROM table_22032599_1 WHERE film_title_used_in_nomination = ""City of the Sun"";","SELECT result FROM table_22032599_1 WHERE film_title_used_in_nomination = ""City of the Sun"";",1 Find the maximum depth of the Atlantic Ocean.,"CREATE TABLE ocean_basins (name TEXT, depth_at_summit REAL, depth_at_deepest_point REAL);",SELECT MAX(depth_at_deepest_point) FROM ocean_basins WHERE name = 'Atlantic Ocean';,SELECT MAX(depth_at_deepest_point) FROM ocean_basins WHERE name = 'Atlantic Ocean';,1 What is the average lead time for orders placed in the UK and shipped from Italy?,"CREATE TABLE Orders (order_id INT, order_date DATE, order_lead_time INT, order_country VARCHAR(50), order_shipped_from VARCHAR(50));",SELECT AVG(order_lead_time) AS avg_lead_time FROM Orders WHERE order_country = 'UK' AND order_shipped_from = 'Italy';,SELECT AVG(order_lead_time) FROM Orders WHERE order_country = 'UK' AND order_shipped_from = 'Italy';,0 What is the title of Senusret I?,"CREATE TABLE table_name_78 (title VARCHAR, name VARCHAR);","SELECT title FROM table_name_78 WHERE name = ""senusret i"";","SELECT title FROM table_name_78 WHERE name = ""senusret i"";",1 Which of the biggest points numbers had a year more recent than 1953?,"CREATE TABLE table_name_62 (points INTEGER, year INTEGER);",SELECT MAX(points) FROM table_name_62 WHERE year > 1953;,SELECT MAX(points) FROM table_name_62 WHERE year > 1953;,1 What is every nature of role with year as 2009?,"CREATE TABLE table_23379776_5 (nature_of_role VARCHAR, year VARCHAR);",SELECT nature_of_role FROM table_23379776_5 WHERE year = 2009;,SELECT nature_of_role FROM table_23379776_5 WHERE year = 2009;,1 Update budget for 'Women Empowerment' program to 25000,"CREATE TABLE Programs (ProgramID INT, Program TEXT, Budget DECIMAL); ",UPDATE Programs SET Budget = 25000 WHERE Program = 'Women Empowerment';,UPDATE Programs SET Budget = 25000 WHERE Program = 'Women Empowerment';,1 What is the minimum population of the parish with a 750.51 km area?,"CREATE TABLE table_176524_2 (population INTEGER, area_km_2 VARCHAR);","SELECT MIN(population) FROM table_176524_2 WHERE area_km_2 = ""750.51"";","SELECT MIN(population) FROM table_176524_2 WHERE area_km_2 = ""750.51"";",1 who directed the episode that 6.3 million u.s. viewers saw?,"CREATE TABLE table_27811555_1 (directed_by VARCHAR, us_viewers__millions_ VARCHAR);","SELECT directed_by FROM table_27811555_1 WHERE us_viewers__millions_ = ""6.3"";","SELECT directed_by FROM table_27811555_1 WHERE us_viewers__millions_ = ""6.3"";",1 "What is the monthly average closing balance per customer for the last 6 months, ordered by the most recent month?","CREATE TABLE customer_account (customer_id INT, account_number INT, balance DECIMAL(10, 2), closing_date DATE); ","SELECT customer_id, AVG(balance) as avg_balance, EXTRACT(MONTH FROM closing_date) as month FROM customer_account WHERE closing_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) AND CURRENT_DATE GROUP BY customer_id, month ORDER BY month DESC;","SELECT AVG(balance) as avg_balance FROM customer_account WHERE closing_date >= DATEADD(month, -6, GETDATE()) GROUP BY month ORDER BY avg_balance DESC;",0 Which 30-day Pass has a Base Fare of $3?,"CREATE TABLE table_name_74 (day_pass VARCHAR, base_fares VARCHAR);","SELECT 30 - day_pass FROM table_name_74 WHERE base_fares = ""$3"";","SELECT day_pass FROM table_name_74 WHERE base_fares = ""$3"";",0 What date did Sigurd Rushfeldt score less than 2 points in the UEFA Euro 2004 qualifying competition?,"CREATE TABLE table_name_24 (date VARCHAR, scored VARCHAR, competition VARCHAR);","SELECT date FROM table_name_24 WHERE scored < 2 AND competition = ""uefa euro 2004 qualifying"";","SELECT date FROM table_name_24 WHERE scored 2 AND competition = ""uefa euro 2004 qualifying"";",0 What is the lowest draw that has 5 losses and byes greater than 0?,"CREATE TABLE table_name_62 (draws INTEGER, losses VARCHAR, byes VARCHAR);",SELECT MIN(draws) FROM table_name_62 WHERE losses = 5 AND byes > 0;,SELECT MIN(draws) FROM table_name_62 WHERE losses = 5 AND byes > 0;,1 Which online travel agencies offer virtual tours in the European region?,"CREATE TABLE virtual_tours_2 (tour_id INT, tour_name TEXT, date DATE, engagement INT, ota_id INT); CREATE TABLE online_travel_agencies_2 (ota_id INT, ota_name TEXT); ",SELECT ota_name FROM online_travel_agencies_2 INNER JOIN virtual_tours_2 ON online_travel_agencies_2.ota_id = virtual_tours_2.ota_id WHERE region = 'Europe';,SELECT ota_name FROM online_travel_agencies_2 INNER JOIN virtual_tours_2 ON online_travel_agencies_2.ota_id = virtual_tours_2.ota_id WHERE virtual_tours_2.region = 'Europe';,0 List the graduate students in the College of Education who have published papers with the word 'inclusion' in the title.,"CREATE TABLE students (id INT, name VARCHAR(50), department VARCHAR(50)); CREATE TABLE papers (id INT, student_id INT, title VARCHAR(100)); ","SELECT students.id, students.name FROM students INNER JOIN papers ON students.id = papers.student_id WHERE title LIKE '%inclusion%';",SELECT students.name FROM students INNER JOIN papers ON students.id = papers.student_id WHERE students.department = 'College of Education' AND papers.title LIKE '%inclusion%';,0 Which countries had the highest donation amounts to social programs in H2 2022?,"CREATE TABLE Donations (DonationID int, DonorID int, Amount decimal, DonationDate date, ProgramID int, Country varchar(50)); CREATE TABLE Programs (ProgramID int, ProgramName varchar(50)); ","SELECT Donations.Country, SUM(Donations.Amount) as TotalDonationToSocialPrograms FROM Donations JOIN Programs ON Donations.ProgramID = Programs.ProgramID WHERE Programs.ProgramName = 'Social Services' AND YEAR(DonationDate) = 2022 AND MONTH(DonationDate) > 6 GROUP BY Donations.Country ORDER BY TotalDonationToSocialPrograms DESC;","SELECT d.Country, MAX(d.Amount) as MaxDonation FROM Donations d JOIN Programs p ON d.ProgramID = p.ProgramID WHERE d.DonationDate BETWEEN '2022-01-01' AND '2022-06-30' GROUP BY d.Country;",0 What is the package/option in Italy when the content is religione?,"CREATE TABLE table_name_68 (package_option VARCHAR, content VARCHAR, country VARCHAR);","SELECT package_option FROM table_name_68 WHERE content = ""religione"" AND country = ""italy"";","SELECT package_option FROM table_name_68 WHERE content = ""religione"" AND country = ""italy"";",1 What are the mm dimensions of the Plustek Mobileoffice D28 Corporate?,"CREATE TABLE table_16409745_1 (dimensions__mm_ VARCHAR, product VARCHAR);","SELECT dimensions__mm_ FROM table_16409745_1 WHERE product = ""Plustek MobileOffice D28 Corporate"";","SELECT dimensions__mm_ FROM table_16409745_1 WHERE product = ""Plustek Mobileoffice D28 Corporate"";",0 Get the number of sustainable clothing items sold in the last month.,"CREATE TABLE clothing_items (id INT PRIMARY KEY, name VARCHAR(50), category VARCHAR(20), sustainable BOOLEAN); CREATE TABLE inventory (id INT PRIMARY KEY, clothing_item_id INT, size VARCHAR(10), quantity INT); CREATE TABLE sales (id INT PRIMARY KEY, inventory_id INT, sale_date DATE, quantity INT);","SELECT SUM(quantity) FROM sales JOIN inventory ON sales.inventory_id = inventory.id JOIN clothing_items ON inventory.clothing_item_id = clothing_items.id WHERE clothing_items.sustainable = TRUE AND sale_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH);","SELECT COUNT(*) FROM inventory JOIN clothing_items ON inventory.clothing_item_id = clothing_items.id WHERE clothing_items.sustainable = TRUE AND inventory.sale_date >= DATEADD(month, -1, GETDATE());",0 What is the average time spent in space per astronaut?,"CREATE TABLE Astronaut (Id INT, Name VARCHAR(50), TotalTimeInSpace INT);",SELECT AVG(TotalTimeInSpace) FROM Astronaut;,SELECT AVG(TotalTimeInSpace) FROM Astronaut;,1 What is the rank of the new zealand team that had fb listed under notes?,"CREATE TABLE table_name_31 (rank VARCHAR, notes VARCHAR, country VARCHAR);","SELECT rank FROM table_name_31 WHERE notes = ""fb"" AND country = ""new zealand"";","SELECT rank FROM table_name_31 WHERE notes = ""fb"" AND country = ""new zealand"";",1 What is the total number of freedom of information requests submitted in 2020 and 2021?,"CREATE TABLE foia_requests (id INT, year INT, requests INT); ","SELECT SUM(requests) FROM foia_requests WHERE year IN (2020, 2021)","SELECT SUM(requests) FROM foia_requests WHERE year IN (2020, 2021);",0 What was the result when incumbent John R. Tyson was elected?,"CREATE TABLE table_1342426_3 (result VARCHAR, incumbent VARCHAR);","SELECT result FROM table_1342426_3 WHERE incumbent = ""John R. Tyson"";","SELECT result FROM table_1342426_3 WHERE incumbent = ""John R. Tyson"";",1 List cybersecurity strategies with a higher success rate than 70%,"CREATE TABLE CybersecurityStrategies (Id INT PRIMARY KEY, Name VARCHAR(50), SuccessRate DECIMAL(3,2));",SELECT Name FROM CybersecurityStrategies WHERE SuccessRate > 0.7;,SELECT Name FROM CybersecurityStrategies WHERE SuccessRate > 70;,0 What is the percentage of students who have completed a lifelong learning course in 'South High' school?,"CREATE TABLE students_lifelong_learning (student_id INT, school_id INT, completed_course INT); CREATE TABLE school_roster (student_id INT, school_id INT, school_name VARCHAR(255)); ","SELECT s.school_name, 100.0 * SUM(CASE WHEN sl.completed_course = 1 THEN 1 ELSE 0 END) / COUNT(sr.student_id) AS completion_percentage FROM school_roster sr INNER JOIN students_lifelong_learning sl ON sr.student_id = sl.student_id INNER JOIN schools s ON sr.school_id = s.school_id WHERE s.school_name = 'South High' GROUP BY s.school_name;",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM students_lifelong_learning WHERE school_id = school_roster.school_id)) AS percentage FROM students_lifelong_learning WHERE school_roster.school_id = school_roster.school_id AND school_roster.school_name = 'South High';,0 What was the total rare earth element production for each country in 2020?,"CREATE TABLE production (country VARCHAR(255), year INT, amount INT); ","SELECT country, SUM(amount) AS total_production FROM production GROUP BY country;","SELECT country, SUM(amount) FROM production WHERE year = 2020 GROUP BY country;",0 Which studio did The Oregon Trail?,"CREATE TABLE table_name_13 (studio VARCHAR, title VARCHAR);","SELECT studio FROM table_name_13 WHERE title = ""the oregon trail"";","SELECT studio FROM table_name_13 WHERE title = ""oregon trail"";",0 What's the description of the buttonholer whose singer part number is 121795 kit 121908 buttonholer?,"CREATE TABLE table_28652521_1 (description VARCHAR, singer_part_number VARCHAR);","SELECT description FROM table_28652521_1 WHERE singer_part_number = ""121795 kit 121908 buttonholer"";","SELECT description FROM table_28652521_1 WHERE singer_part_number = ""121795 Kit 121908 buttonholer"";",0 Which team picked the player from the Toronto Marlboros (OHA) as Pick #32?,"CREATE TABLE table_name_81 (nhl_team VARCHAR, college_junior_club_team VARCHAR, pick__number VARCHAR);","SELECT nhl_team FROM table_name_81 WHERE college_junior_club_team = ""toronto marlboros (oha)"" AND pick__number = ""32"";","SELECT nhl_team FROM table_name_81 WHERE college_junior_club_team = ""toronto marlboros (oha)"" AND pick__number = 32;",0 How many pressure figures are given for the .380 acp cartridge?,"CREATE TABLE table_173103_1 (max_pressure VARCHAR, cartridge VARCHAR);","SELECT COUNT(max_pressure) FROM table_173103_1 WHERE cartridge = "".380 ACP"";","SELECT COUNT(max_pressure) FROM table_173103_1 WHERE cartridge = "".380 Acp"";",0 minimum retail price of garments in the 'Tops' category,"CREATE TABLE GarmentCategories (category VARCHAR(25)); CREATE TABLE Garments (garment_id INT, price DECIMAL(5,2), category VARCHAR(25)); ",SELECT MIN(price) FROM Garments WHERE category = 'Tops';,SELECT MIN(price) FROM Garments WHERE category = 'Tops';,1 "Which Thumb stick has a Basic shape of curved, a Backlit of yes, and a Supplier of genius?","CREATE TABLE table_name_37 (thumb_stick VARCHAR, supplier VARCHAR, basic_shape VARCHAR, backlit VARCHAR);","SELECT thumb_stick FROM table_name_37 WHERE basic_shape = ""curved"" AND backlit = ""yes"" AND supplier = ""genius"";","SELECT thumb_stick FROM table_name_37 WHERE basic_shape = ""curved"" AND backlit = ""yes"" AND supplier = ""genius"";",1 What was the score when the away team was brighton & hove albion?,"CREATE TABLE table_name_21 (score VARCHAR, away_team VARCHAR);","SELECT score FROM table_name_21 WHERE away_team = ""brighton & hove albion"";","SELECT score FROM table_name_21 WHERE away_team = ""brighton & hove albion"";",1 What is the average budget allocated per service category in the Education department?,"CREATE TABLE EducationBudget (Department VARCHAR(25), Category VARCHAR(25), Budget INT); ",SELECT AVG(Budget) FROM EducationBudget WHERE Department = 'Education' GROUP BY Category;,SELECT AVG(Budget) FROM EducationBudget WHERE Department = 'Education';,0 Which performing arts events had the highest and lowest attendance by gender?,"CREATE TABLE performing_arts_events (id INT, event_name VARCHAR(255), event_date DATE, attendee_gender VARCHAR(255));","SELECT event_name, attendee_gender, COUNT(attendee_gender) as attendance FROM performing_arts_events GROUP BY event_name, attendee_gender ORDER BY attendance DESC, event_name;","SELECT event_name, attendee_gender, MAX(attendee_gender) AS max_attendance, MIN(attendee_gender) AS min_attendance FROM performing_arts_events GROUP BY event_name, attendee_gender;",0 Which Date has a Record of 4–2–0?,"CREATE TABLE table_name_68 (date VARCHAR, record VARCHAR);","SELECT date FROM table_name_68 WHERE record = ""4–2–0"";","SELECT date FROM table_name_68 WHERE record = ""4–2–0"";",1 What was the total revenue from the 'Dance Recital' event?,"CREATE TABLE Events (event_id INT, event_name VARCHAR(50), revenue INT); ",SELECT revenue FROM Events WHERE event_name = 'Dance Recital';,SELECT SUM(revenue) FROM Events WHERE event_name = 'Dance Recital';,0 "What is the record during the event, UFC 27?","CREATE TABLE table_name_14 (record VARCHAR, event VARCHAR);","SELECT record FROM table_name_14 WHERE event = ""ufc 27"";","SELECT record FROM table_name_14 WHERE event = ""ufc 27"";",1 "Identify the total number of male members who have participated in outdoor cycling workouts in the last month, grouped by their region.","CREATE TABLE member_workouts (member_id INT, gender VARCHAR(50), workout_type VARCHAR(50), workout_date DATE, region VARCHAR(50)); ","SELECT region, COUNT(member_id) as total FROM member_workouts WHERE gender = 'Male' AND workout_type = 'Outdoor Cycling' AND workout_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY region;","SELECT region, COUNT(*) FROM member_workouts WHERE gender = 'Male' AND workout_type = 'Outdoor Cycling' AND workout_date >= DATEADD(month, -1, GETDATE()) GROUP BY region;",0 Name the highest pick number for PI GP more than 55,"CREATE TABLE table_name_28 (pick__number INTEGER, pl_gp INTEGER);",SELECT MAX(pick__number) FROM table_name_28 WHERE pl_gp > 55;,SELECT MAX(pick__number) FROM table_name_28 WHERE pl_gp > 55;,1 How many points when 15 is scored is considered the minimum?,"CREATE TABLE table_14889048_2 (points INTEGER, scored VARCHAR);",SELECT MIN(points) FROM table_14889048_2 WHERE scored = 15;,SELECT MIN(points) FROM table_14889048_2 WHERE scored = 15;,1 What is the worst (highest) score?,CREATE TABLE table_1506950_4 (score INTEGER);,SELECT MAX(score) FROM table_1506950_4;,SELECT MAX(score) FROM table_1506950_4;,1 When did the home team of Richmond play?,"CREATE TABLE table_name_89 (date VARCHAR, home_team VARCHAR);","SELECT date FROM table_name_89 WHERE home_team = ""richmond"";","SELECT date FROM table_name_89 WHERE home_team = ""richmond"";",1 What is the total budget for all accessible technology projects?,"CREATE TABLE AccessibleTech (project_id INT, location VARCHAR(20), budget DECIMAL(10,2)); ",SELECT SUM(budget) FROM AccessibleTech;,SELECT SUM(budget) FROM AccessibleTech;,1 When pokémon ieru kana? bw is the romaji who is the vocalist?,"CREATE TABLE table_2144389_9 (vocalist VARCHAR, rōmaji VARCHAR);","SELECT vocalist FROM table_2144389_9 WHERE rōmaji = ""Pokémon ieru kana? BW"";","SELECT vocalist FROM table_2144389_9 WHERE rmaji = ""Pokémon Eru Kana? BW"";",0 What was the revenue for 'DrugC' in Q2 2020?,"CREATE TABLE sales (drug varchar(20), quarter varchar(10), revenue int); ",SELECT revenue FROM sales WHERE drug = 'DrugC' AND quarter = 'Q2 2020';,SELECT revenue FROM sales WHERE drug = 'DrugC' AND quarter = 'Q2 2020';,1 What is the name and quantity of all cargo having a quantity greater than 5000 that is located in a port in Greece?,"CREATE TABLE Cargo (CargoID INT, Name VARCHAR(255), Quantity INT, PortID INT); ","SELECT Cargo.Name, Cargo.Quantity FROM Cargo INNER JOIN Port ON Cargo.PortID = Port.PortID WHERE Port.Country = 'Greece' AND Cargo.Quantity > 5000;","SELECT Name, Quantity FROM Cargo WHERE Quantity > 5000 AND PortID IN (SELECT PortID FROM Ports WHERE Country = 'Greece');",0 Where was the attempt on the Prime Minister of Sri Lanka's life made?,"CREATE TABLE table_251272_4 (location VARCHAR, title_at_the_time VARCHAR);","SELECT location FROM table_251272_4 WHERE title_at_the_time = ""Prime Minister of Sri Lanka"";","SELECT location FROM table_251272_4 WHERE title_at_the_time = ""Prime Minister of Sri Lanka"";",1 How many events in CA had more than 300 attendees in the last 3 months?,"CREATE TABLE Events (EventID int, EventLocation varchar(50), Attendance int, EventDate date); ",SELECT COUNT(*) FROM Events WHERE EventLocation LIKE '%CA%' AND Attendance > 300 AND EventDate >= (CURRENT_DATE - INTERVAL '3 months');,"SELECT COUNT(*) FROM Events WHERE EventLocation = 'CA' AND Attendance > 300 AND EventDate >= DATEADD(month, -3, GETDATE());",0 "Update the quantity of dysprosium produced on January 1, 2017 in the production table","CREATE TABLE production ( id INT PRIMARY KEY, element VARCHAR(10), quantity INT, production_date DATE);",UPDATE production SET quantity = 250 WHERE element = 'dysprosium' AND production_date = '2017-01-01';,UPDATE production SET quantity = 1 WHERE element = 'Dysprosium' AND production_date >= '2017-01-01';,0 What is the total number of players who play games on each platform and in each city?,"CREATE TABLE Players (PlayerID INT, City VARCHAR(20), Platform VARCHAR(10)); ","SELECT City, Platform, COUNT(*) AS Count FROM Players GROUP BY City, Platform ORDER BY Count DESC;","SELECT Platform, City, COUNT(*) FROM Players GROUP BY Platform, City;",0 what is the nickname that joined 1902 1?,"CREATE TABLE table_262527_1 (nickname VARCHAR, joined VARCHAR);","SELECT nickname FROM table_262527_1 WHERE joined = ""1902 1"";","SELECT nickname FROM table_262527_1 WHERE joined = ""1902 1"";",1 "List socially responsible microfinance institutions in Southeast Asia, along with their average loan amounts and total number of loans issued between 2018 and 2020, in descending order of average loan amounts?","CREATE TABLE Microfinance (id INT, institution_name VARCHAR(50), location VARCHAR(50), avg_loan_amount DECIMAL(10,2), num_loans INT, start_date DATE, end_date DATE);","SELECT institution_name, AVG(avg_loan_amount) as avg_loan_amount, SUM(num_loans) as total_loans FROM Microfinance WHERE location LIKE '%Southeast Asia%' AND start_date BETWEEN '2018-01-01' AND '2020-12-31' GROUP BY institution_name ORDER BY avg_loan_amount DESC;","SELECT institution_name, AVG(avg_loan_amount) as avg_loan_amount, SUM(num_loans) as total_loans FROM Microfinance WHERE location = 'Southeast Asia' AND start_date BETWEEN '2018-01-01' AND '2020-12-31' GROUP BY institution_name ORDER BY avg_loan_amount DESC;",0 What are the top 2 organic categories with the highest inventory value?,"CREATE TABLE organic_categories (id INT, category VARCHAR(255), total_value DECIMAL(5,2)); ","SELECT category, total_value FROM organic_categories ORDER BY total_value DESC LIMIT 2;","SELECT category, total_value FROM organic_categories ORDER BY total_value DESC LIMIT 2;",1 Name the years as tallest when floors are larger than 18,"CREATE TABLE table_name_4 (years_as_tallest VARCHAR, floors INTEGER);",SELECT years_as_tallest FROM table_name_4 WHERE floors > 18;,SELECT years_as_tallest FROM table_name_4 WHERE floors > 18;,1 Which legal aid cases were handled by the same organization more than once in Washington D.C. in 2020?,"CREATE TABLE legal_aid_2 (org_id INT, case_id INT, year INT); ","SELECT org_id, case_id FROM legal_aid_2 WHERE org_id IN (SELECT org_id FROM legal_aid_2 GROUP BY org_id HAVING COUNT(DISTINCT case_id) > 1) AND year = 2020","SELECT org_id, case_id FROM legal_aid_2 WHERE year = 2020 GROUP BY org_id HAVING COUNT(*) > 1;",0 Find the total installed capacity (in MW) of all Renewable Energy Projects in Germany,"CREATE TABLE renewable_projects_germany (id INT, name VARCHAR(100), country VARCHAR(50), type VARCHAR(50), capacity_mw FLOAT); ",SELECT SUM(capacity_mw) FROM renewable_projects_germany WHERE country = 'Germany';,SELECT SUM(capacity_mw) FROM renewable_projects_germany WHERE country = 'Germany';,1 What municipality is the Benson Street station located in?,"CREATE TABLE table_name_53 (municipality VARCHAR, station VARCHAR);","SELECT municipality FROM table_name_53 WHERE station = ""benson street"";","SELECT municipality FROM table_name_53 WHERE station = ""benson street"";",1 Name the travel time for porta nolana - nola - baiano,"CREATE TABLE table_2385460_1 (travel_time VARCHAR, route VARCHAR);","SELECT travel_time FROM table_2385460_1 WHERE route = ""Porta Nolana - Nola - Baiano"";","SELECT travel_time FROM table_2385460_1 WHERE route = ""Porta Nolana - Nola - Baiano"";",1 What is the minimum budget for projects focused on digital divide?,"CREATE TABLE projects_3 (id INT, name VARCHAR, digital_divide BOOLEAN, budget FLOAT); ",SELECT MIN(budget) FROM projects_3 WHERE digital_divide = true;,SELECT MIN(budget) FROM projects_3 WHERE digital_divide = true;,1 "What is the total budget for rural electrification projects in Southeast Asia, grouped by contributing organization?","CREATE TABLE rural_infrastructure (id INT, country VARCHAR(50), project_type VARCHAR(50), budget INT, contributor VARCHAR(50)); ","SELECT contributor, SUM(budget) as total_budget FROM rural_infrastructure WHERE country IN ('Cambodia', 'Thailand', 'Vietnam') AND project_type = 'Rural Electrification' GROUP BY contributor;","SELECT contributor, SUM(budget) FROM rural_infrastructure WHERE project_type = 'Electrification' GROUP BY contributor;",0 What is the total timber production of all forests in the 'Asia-Pacific' region?,"CREATE TABLE forests (id INT, name TEXT, area FLOAT, region TEXT, timber_production FLOAT); ",SELECT SUM(timber_production) FROM forests WHERE region = 'Asia-Pacific';,SELECT SUM(timber_production) FROM forests WHERE region = 'Asia-Pacific';,1 What was the total amount donated by individuals residing in California in Q2 of 2021?,"CREATE TABLE Donations (DonorID int, DonationAmt decimal(10,2), DonationDate date); ",SELECT SUM(DonationAmt) FROM Donations WHERE EXTRACT(YEAR FROM DonationDate) = 2021 AND EXTRACT(MONTH FROM DonationDate) BETWEEN 4 AND 6 AND EXTRACT(DAY FROM DonationDate) <> 29;,SELECT SUM(DonationAmt) FROM Donations WHERE DonorID IN (SELECT DonorID FROM Donations WHERE DonationDate BETWEEN '2021-04-01' AND '2021-06-30') AND State = 'California';,0 What are the defense project timelines for the first half of the year 2023?,"CREATE TABLE defense_project_timelines (id INT, project_name VARCHAR(255), start_date DATE, end_date DATE); ","SELECT start_date, end_date FROM defense_project_timelines WHERE start_date BETWEEN '2023-01-01' AND '2023-06-30';","SELECT project_name, start_date, end_date FROM defense_project_timelines WHERE start_date BETWEEN '2023-01-01' AND '2023-06-30';",0 What is the hospital with the highest number of beds per state?,"CREATE TABLE hospitals (state varchar(2), hospital_name varchar(25), num_beds int); ","SELECT state, hospital_name, MAX(num_beds) as max_beds FROM hospitals GROUP BY state;","SELECT state, hospital_name, num_beds FROM hospitals ORDER BY num_beds DESC LIMIT 1;",0 What is the maximum budget spent on military innovation by each department?,"CREATE TABLE DepartmentMilitaryInnovation (id INT, department VARCHAR(50), budget INT);","SELECT department, MAX(budget) FROM DepartmentMilitaryInnovation GROUP BY department;","SELECT department, MAX(budget) FROM DepartmentMilitaryInnovation GROUP BY department;",1 What is the maximum duration of a space mission for AstroTech Corp?,"CREATE TABLE space_missions (mission_id INT, mission_name VARCHAR(50), launch_date DATE, return_date DATE, mission_company VARCHAR(50));","SELECT 100.0 * DATEDIFF('9999-12-31', MAX(launch_date)) / DATEDIFF('9999-12-31', '1970-01-01') AS mission_duration FROM space_missions WHERE mission_company = 'AstroTech Corp';",SELECT MAX(duration) FROM space_missions WHERE mission_company = 'AstroTech Corp';,0 What is the largest number of consecutive starts for jason gildon?,"CREATE TABLE table_28606933_7 (consecutive_starts INTEGER, player VARCHAR);","SELECT MAX(consecutive_starts) FROM table_28606933_7 WHERE player = ""Jason Gildon"";","SELECT MAX(consecutive_starts) FROM table_28606933_7 WHERE player = ""Jason Gildon"";",1 What is the total quantity of minerals mined by companies in India?,"CREATE TABLE IndianMines (Company VARCHAR(50), Quantity INT); ",SELECT SUM(Quantity) FROM IndianMines,SELECT SUM(Quantity) FROM IndianMines;,0 Show the number of members who joined the 'communications' and 'energy' unions in 2019.,"CREATE TABLE communications_union (id INT, name VARCHAR, dob DATE); CREATE TABLE energy_union (id INT, name VARCHAR, dob DATE); ",SELECT COUNT(*) FROM ( (SELECT * FROM communications_union WHERE YEAR(dob) = 2019) UNION (SELECT * FROM energy_union WHERE YEAR(dob) = 2019) ) AS all_unions;,SELECT COUNT(DISTINCT c.name) FROM communications_union c JOIN energy_union e ON c.id = e.id WHERE c.dob BETWEEN '2019-01-01' AND '2019-12-31';,0 What was the minimum cost of military equipment sold by Lockheed Martin to the Americas in 2019?,"CREATE TABLE military_equipment_sales (company VARCHAR(255), region VARCHAR(255), year INT, cost INT); ",SELECT MIN(cost) FROM military_equipment_sales WHERE company = 'Lockheed Martin' AND region = 'Americas' AND year = 2019;,SELECT MIN(cost) FROM military_equipment_sales WHERE company = 'Lockheed Martin' AND region = 'Americas' AND year = 2019;,1 What is the percentage of products made from recycled materials that were sold in the last quarter?,"CREATE TABLE RecycledMaterialProducts (id INT, sold ENUM('yes','no'));","SELECT (COUNT(*) FILTER (WHERE sold = 'yes')) * 100.0 / COUNT(*) FROM RecycledMaterialProducts WHERE date BETWEEN DATE_SUB(NOW(), INTERVAL 3 MONTH) AND NOW();",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM RecycledMaterialProducts WHERE sold >= 0)) AS percentage FROM RecycledMaterialProducts WHERE sold >= 0 AND sold >= 0;,0 "What is the quantity made of the e-22 class, which has a quantity preserved of 0?","CREATE TABLE table_name_36 (quantity_made VARCHAR, quantity_preserved VARCHAR, class VARCHAR);","SELECT quantity_made FROM table_name_36 WHERE quantity_preserved = ""0"" AND class = ""e-22"";","SELECT quantity_made FROM table_name_36 WHERE quantity_preserved = ""0"" AND class = ""e-22"";",1 Update the year of 'Festival of Colors' to 2023,"CREATE TABLE CommunityEngagements (Id INT, Event TEXT, Year INT); ",UPDATE CommunityEngagements SET Year = 2023 WHERE Event = 'Festival of Colors';,UPDATE CommunityEngagements SET Year = 2023 WHERE Event = 'Festival of Colors';,1 Find the mining sites with the highest resource extraction by type,"CREATE TABLE mining_site (id INT, name VARCHAR(255), resource VARCHAR(255), amount INT); ","SELECT ms.name as site, ms.resource as resource, MAX(ms.amount) as max_resource_extraction FROM mining_site ms GROUP BY ms.name, ms.resource;","SELECT name, resource, amount FROM mining_site ORDER BY amount DESC LIMIT 1;",0 How many individuals have been served by legal aid organizations in California since 2017?,"CREATE TABLE legal_aid_servings (serving_id INT, serviced_state VARCHAR(20), servicing_year INT); ",SELECT COUNT(*) FROM legal_aid_servings WHERE serviced_state = 'California' AND servicing_year >= 2017;,SELECT COUNT(*) FROM legal_aid_servings WHERE serviced_state = 'California' AND servicing_year >= 2017;,1 What is the total number of likes on posts by users in 'Canada'?,"CREATE TABLE users (id INT, name VARCHAR(50), gender VARCHAR(10), age INT, location VARCHAR(50)); CREATE TABLE posts (id INT, user_id INT, content TEXT, timestamp TIMESTAMP, likes INT); CREATE TABLE likes (post_id INT, user_id INT);",SELECT SUM(posts.likes) AS total_likes FROM posts JOIN users ON posts.user_id = users.id WHERE users.location = 'Canada';,SELECT SUM(posts.likes) FROM posts INNER JOIN likes ON posts.user_id = likes.user_id WHERE users.location = 'Canada';,0 Which hotels in the Middle East have adopted the most AI technologies?,"CREATE TABLE ai_adoption (hotel_id INT, num_ai_technologies INT); CREATE TABLE hotels (hotel_id INT, hotel_name TEXT, country TEXT); ","SELECT hotel_name, num_ai_technologies FROM ai_adoption INNER JOIN hotels ON ai_adoption.hotel_id = hotels.hotel_id WHERE country IN ('UAE', 'Saudi Arabia', 'Qatar', 'Oman', 'Bahrain') ORDER BY num_ai_technologies DESC;","SELECT h.hotel_name, COUNT(*) as num_ai_technologies FROM ai_adoption a JOIN hotels h ON a.hotel_id = h.hotel_id WHERE h.country = 'Middle East' GROUP BY h.hotel_name ORDER BY num_ai_technologies DESC;",0 What is the total quantity of recycled paper used in manufacturing in Q2 2021?,"CREATE TABLE manufacturing_materials (id INT, material VARCHAR(50), quantity_used INT, use_date DATE); ",SELECT SUM(quantity_used) FROM manufacturing_materials WHERE material = 'Recycled Paper' AND QUARTER(use_date) = 2 AND YEAR(use_date) = 2021;,SELECT SUM(quantity_used) FROM manufacturing_materials WHERE material = 'Recycled Paper' AND use_date BETWEEN '2021-04-01' AND '2021-06-30';,0 Which countries have experienced a decrease in peacekeeping operation casualties from 2020 to 2021?,"CREATE TABLE PeacekeepingCasualties (Country VARCHAR(50), Year INT, Casualties INT); ","SELECT Country FROM (SELECT Country, Year, Casualties, LAG(Casualties) OVER (PARTITION BY Country ORDER BY Year) AS PreviousYearCasualties FROM PeacekeepingCasualties) AS Subquery WHERE Subquery.Country = Subquery.Country AND Subquery.Casualties < Subquery.PreviousYearCasualties;",SELECT Country FROM PeacekeepingCasualties WHERE Year BETWEEN 2020 AND 2021 AND Casualties (SELECT MIN(Casualties) FROM PeacekeepingCasualties WHERE Year BETWEEN 2020 AND 2021);,0 How many vehicles have been serviced in the NYC subway system in the last 30 days?,"CREATE TABLE subway_vehicles (id INT, type VARCHAR(10), last_service DATE); ","SELECT COUNT(*) FROM subway_vehicles WHERE last_service >= DATEADD(day, -30, CURRENT_DATE);","SELECT COUNT(*) FROM subway_vehicles WHERE last_service >= DATEADD(day, -30, GETDATE());",0 Who is the player with the pick# 80?,"CREATE TABLE table_22402438_7 (player VARCHAR, pick__number VARCHAR);",SELECT player FROM table_22402438_7 WHERE pick__number = 80;,SELECT player FROM table_22402438_7 WHERE pick__number = 80;,1 What did United States place when the player was Raymond Floyd?,"CREATE TABLE table_name_84 (place VARCHAR, country VARCHAR, player VARCHAR);","SELECT place FROM table_name_84 WHERE country = ""united states"" AND player = ""raymond floyd"";","SELECT place FROM table_name_84 WHERE country = ""united states"" AND player = ""raymond floyd"";",1 What is the average heart rate of members wearing a 'Smartwatch' device during their workouts?,"CREATE TABLE Workouts (MemberID INT, Device VARCHAR(20), HeartRate INT); ",SELECT AVG(HeartRate) FROM Workouts WHERE Device = 'Smartwatch';,SELECT AVG(HeartRate) FROM Workouts WHERE Device = 'Smartwatch';,1 Who won the episode in which Sean Lock was Rufus's guest?,"CREATE TABLE table_19930660_2 (winner VARCHAR, rufus_guest VARCHAR);","SELECT winner FROM table_19930660_2 WHERE rufus_guest = ""Sean Lock"";","SELECT winner FROM table_19930660_2 WHERE rufus_guest = ""Sean Lock"";",1 What are the Runner(s)-up of the 1956 Championship?,"CREATE TABLE table_name_52 (runner_s__up VARCHAR, year VARCHAR);","SELECT runner_s__up FROM table_name_52 WHERE year = ""1956"";",SELECT runner_s__up FROM table_name_52 WHERE year = 1956;,0 What is the release date if the code name is Aoba?,"CREATE TABLE table (release_date VARCHAR, code_name VARCHAR);","SELECT release_date FROM table WHERE code_name = ""Aoba"";","SELECT release_date FROM table WHERE code_name = ""Aoba"";",1 Which partnership has a run number of 27?,"CREATE TABLE table_name_70 (partnerships VARCHAR, runs VARCHAR);","SELECT partnerships FROM table_name_70 WHERE runs = ""27"";",SELECT partnerships FROM table_name_70 WHERE runs = 27;,0 How many policy advocacy initiatives were implemented in each year?,"CREATE TABLE policy_advocacy (initiative_id INT, initiative_name VARCHAR(50), implementation_year INT); ","SELECT implementation_year, COUNT(*) as initiatives_per_year FROM policy_advocacy GROUP BY implementation_year;","SELECT implementation_year, COUNT(*) FROM policy_advocacy GROUP BY implementation_year;",0 What is the total donation amount per category in 2022?,"CREATE TABLE Donations (donation_id INT, donor_id INT, donation_category VARCHAR(50), donation_amount DECIMAL(10,2), donation_date DATE); ","SELECT donation_category, SUM(donation_amount) as total_donation_amount_per_category_in_2022 FROM Donations WHERE donation_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY donation_category;","SELECT donation_category, SUM(donation_amount) as total_donation FROM Donations WHERE YEAR(donation_date) = 2022 GROUP BY donation_category;",0 What class had fewer than 336 laps in 2004?,"CREATE TABLE table_name_77 (class VARCHAR, laps VARCHAR, year VARCHAR);",SELECT class FROM table_name_77 WHERE laps < 336 AND year = 2004;,SELECT class FROM table_name_77 WHERE laps 336 AND year = 2004;,0 "What was the average weight of stone artifacts, per country?","CREATE TABLE artifact_details (id INT, artifact_id INT, artifact_type VARCHAR(50), weight INT);","SELECT country, AVG(CASE WHEN artifact_type = 'stone' THEN weight ELSE NULL END) as avg_weight FROM excavation_sites GROUP BY country","SELECT country, AVG(weight) FROM artifact_details WHERE artifact_type ='stone' GROUP BY country;",0 Who is the home team based at windy hill?,"CREATE TABLE table_name_56 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_56 WHERE venue = ""windy hill"";","SELECT home_team FROM table_name_56 WHERE venue = ""windy hill"";",1 What was the score when Richmond was the opponent?,"CREATE TABLE table_name_45 (score VARCHAR, opponent VARCHAR);","SELECT score FROM table_name_45 WHERE opponent = ""richmond"";","SELECT score FROM table_name_45 WHERE opponent = ""richmond"";",1 What date was a brig type ship located in SW Approaches?,"CREATE TABLE table_name_30 (date VARCHAR, ship_type VARCHAR, location VARCHAR);","SELECT date FROM table_name_30 WHERE ship_type = ""brig"" AND location = ""sw approaches"";","SELECT date FROM table_name_30 WHERE ship_type = ""brig"" AND location = ""sw approaches"";",1 Insert records of workers into the 'wood' department.,"CREATE TABLE workers (worker_id INT, factory_id INT, salary DECIMAL(5,2), department VARCHAR(20));","INSERT INTO workers (worker_id, factory_id, salary, department) SELECT 1001, 301, 55000.00, 'wood' WHERE NOT EXISTS (SELECT * FROM workers WHERE worker_id = 1001);","INSERT INTO workers (worker_id, factory_id, salary, department) VALUES (1, 'Wood', 'wood');",0 What is the ratio of male to female patients in rural areas of Alaska?,"CREATE TABLE patients_by_gender (patient_id INT, age INT, gender VARCHAR(20), location VARCHAR(20)); ",SELECT (COUNT(*) FILTER (WHERE gender = 'Male'))::float / COUNT(*) FROM patients_by_gender WHERE location = 'Rural Alaska';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM patients_by_gender WHERE location = 'Rural Alaska')) AS ratio FROM patients_by_gender WHERE location = 'Rural Alaska' AND gender = 'Male';,0 What was the pick for Bill Gramatica after round 2?,"CREATE TABLE table_name_53 (pick VARCHAR, round VARCHAR, player VARCHAR);","SELECT pick FROM table_name_53 WHERE round > 2 AND player = ""bill gramatica"";","SELECT pick FROM table_name_53 WHERE round > 2 AND player = ""bill gramatica"";",1 Name the candidates for l. mendel rivers,"CREATE TABLE table_1341930_40 (candidates VARCHAR, incumbent VARCHAR);","SELECT COUNT(candidates) FROM table_1341930_40 WHERE incumbent = ""L. Mendel Rivers"";","SELECT candidates FROM table_1341930_40 WHERE incumbent = ""L. Mendel Rivers"";",0 Add a column 'location' to 'cases' table,"CREATE TABLE cases (id INT PRIMARY KEY, case_number VARCHAR(50), date_reported DATE, location VARCHAR(100));",ALTER TABLE cases ADD location VARCHAR(100);,ALTER TABLE cases ADD location VARCHAR(100);,1 what is the record for years 2006-11?,"CREATE TABLE table_name_92 (record VARCHAR, years VARCHAR);","SELECT record FROM table_name_92 WHERE years = ""2006-11"";","SELECT record FROM table_name_92 WHERE years = ""2006-11"";",1 Which Lead has a Skip of mike mcewen?,"CREATE TABLE table_name_73 (lead VARCHAR, skip VARCHAR);","SELECT lead FROM table_name_73 WHERE skip = ""mike mcewen"";","SELECT lead FROM table_name_73 WHERE skip = ""mike mcewen"";",1 What was the round number for March 22?,"CREATE TABLE table_name_92 (round VARCHAR, date VARCHAR);","SELECT round FROM table_name_92 WHERE date = ""march 22"";","SELECT round FROM table_name_92 WHERE date = ""march 22"";",1 What is the maximum ticket price for hockey matches in the WestCoast region?,"CREATE TABLE Stadiums(id INT, name TEXT, location TEXT, sport TEXT, capacity INT); ",SELECT MAX(price) FROM TicketSales WHERE stadium_id IN (SELECT id FROM Stadiums WHERE location = 'WestCoast' AND sport = 'Hockey'),SELECT MAX(price) FROM Stadiums WHERE sport = 'hockey' AND location = 'WestCoast';,0 What is the average age of the animals in the 'animal_population' table per species?,"CREATE TABLE animal_population (species VARCHAR(255), animal_id INT, name VARCHAR(255), age INT, health_status VARCHAR(255)); ","SELECT species, AVG(age) as avg_age FROM animal_population GROUP BY species;","SELECT species, AVG(age) as avg_age FROM animal_population GROUP BY species;",1 What is the average waste generation rate per capita in the European Union?,"CREATE TABLE WasteGeneration (country VARCHAR(50), population INT, waste_generated_kg FLOAT);","SELECT AVG(waste_generated_kg/population) FROM WasteGeneration WHERE country IN ('Germany', 'France', 'Italy', 'Spain', 'United Kingdom');","SELECT AVG(waste_generated_kg/population) FROM WasteGeneration WHERE country IN ('Germany', 'France', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', ",0 How many episodes had rating/share (18-49) of 0.7/2 and a rating of 2.1?,"CREATE TABLE table_25751274_2 (episode_number VARCHAR, rating VARCHAR);","SELECT COUNT(episode_number) FROM table_25751274_2 WHERE rating / SHARE(18 - 49) = 0.7 / 2 AND rating = ""2.1"";","SELECT COUNT(episode_number) FROM table_25751274_2 WHERE rating = ""0.7/2"" AND rating = ""2.1"";",0 List the total number of records from Lambeau Field.,"CREATE TABLE table_14477002_1 (record VARCHAR, location VARCHAR);","SELECT COUNT(record) FROM table_14477002_1 WHERE location = ""Lambeau Field"";","SELECT COUNT(record) FROM table_14477002_1 WHERE location = ""Lambeau Field"";",1 "What is the sum of District, when Took Office is greater than 1981, and when Senator is Cyndi Taylor Krier?","CREATE TABLE table_name_67 (district INTEGER, took_office VARCHAR, senator VARCHAR);","SELECT SUM(district) FROM table_name_67 WHERE took_office > 1981 AND senator = ""cyndi taylor krier"";","SELECT SUM(district) FROM table_name_67 WHERE took_office > 1981 AND senator = ""cyndi taylor krier"";",1 How many marine species are found in the Southern Ocean that are affected by ocean acidification?,"CREATE TABLE marine_species (name TEXT, ocean TEXT, affected_by_acidification BOOLEAN); CREATE TABLE ocean_regions (name TEXT, area FLOAT);",SELECT COUNT(*) FROM marine_species WHERE ocean = (SELECT name FROM ocean_regions WHERE area = 'Southern Ocean') AND affected_by_acidification = TRUE;,SELECT COUNT(*) FROM marine_species WHERE ocean = 'Southern Ocean' AND affected_by_acidification = true;,0 "What is the average CO2 emission reduction for each climate adaptation project in Latin America, ordered by the reduction amount?","CREATE TABLE climate_adaptation (project VARCHAR(50), region VARCHAR(50), co2_reduction FLOAT); ","SELECT AVG(co2_reduction) as avg_reduction, project FROM climate_adaptation WHERE region = 'Latin America' GROUP BY project ORDER BY avg_reduction DESC;","SELECT project, AVG(co2_reduction) as avg_reduction FROM climate_adaptation WHERE region = 'Latin America' GROUP BY project ORDER BY avg_reduction DESC;",0 What is the average age of community health workers in California and Texas?,"CREATE TABLE community_health_workers (worker_id INT, age INT, state VARCHAR(20)); ","SELECT AVG(age) FROM community_health_workers WHERE state IN ('California', 'Texas')","SELECT AVG(age) FROM community_health_workers WHERE state IN ('California', 'Texas');",0 How many times did anderson university leave?,"CREATE TABLE table_11658094_3 (left VARCHAR, institution VARCHAR);","SELECT COUNT(left) FROM table_11658094_3 WHERE institution = ""Anderson University"";","SELECT COUNT(left) FROM table_11658094_3 WHERE institution = ""Anderson University"";",1 Add a new organization to the database,"CREATE TABLE organization (org_id INT, org_name TEXT); ","INSERT INTO organization (org_id, org_name) VALUES (3, 'Caring Communities');",ALTER TABLE organization ADD org_name;,0 How many years had more than 0 points?,"CREATE TABLE table_name_68 (year INTEGER, points INTEGER);",SELECT SUM(year) FROM table_name_68 WHERE points > 0;,SELECT SUM(year) FROM table_name_68 WHERE points > 0;,1 Which artist has the second-highest total ticket sales?,"CREATE TABLE tickets (artist_name TEXT, tickets_sold INT); ","SELECT artist_name, SUM(tickets_sold) as total_tickets_sold FROM tickets GROUP BY artist_name ORDER BY total_tickets_sold DESC LIMIT 1 OFFSET 1;","SELECT artist_name, SUM(tickets_sold) as total_sales FROM tickets GROUP BY artist_name ORDER BY total_sales DESC LIMIT 1;",0 How many marine species are recorded in the 'tropical_species' table?,"CREATE TABLE tropical_species (id INT, species TEXT); ",SELECT COUNT(*) FROM tropical_species;,SELECT COUNT(*) FROM tropical_species;,1 Calculate the average age of visitors for each exhibition,"CREATE TABLE visitors (visitor_id INT PRIMARY KEY, exhibition_id INT, age INT);","SELECT exhibition_id, AVG(age) as avg_age FROM visitors GROUP BY exhibition_id;","SELECT exhibition_id, AVG(age) FROM visitors GROUP BY exhibition_id;",0 "What event had a win, record of 8-1 and n/a round?","CREATE TABLE table_name_98 (event VARCHAR, record VARCHAR, res VARCHAR, round VARCHAR);","SELECT event FROM table_name_98 WHERE res = ""win"" AND round = ""n/a"" AND record = ""8-1"";","SELECT event FROM table_name_98 WHERE res = ""win"" AND round = ""n/a"" AND record = ""8-1"";",1 What is the average age of players who play games on mobile devices in India?,"CREATE TABLE Players (PlayerID INT, Age INT, Gender VARCHAR(10), Country VARCHAR(20), Mobile BOOLEAN); ",SELECT AVG(Age) FROM Players WHERE Players.Country = 'India' AND Players.Mobile = TRUE;,SELECT AVG(Age) FROM Players WHERE Country = 'India' AND Mobile = true;,0 How many episodes were directed by james quinn?,"CREATE TABLE table_2618061_1 (written_by VARCHAR, directed_by VARCHAR);","SELECT COUNT(written_by) FROM table_2618061_1 WHERE directed_by = ""James Quinn"";","SELECT COUNT(written_by) FROM table_2618061_1 WHERE directed_by = ""James Quinn"";",1 What is the average temperature in 'Field F' for the month of February 2022?,"CREATE TABLE sensors (sensor_id INT, location VARCHAR(50)); CREATE TABLE temps (sensor_id INT, temp FLOAT, timestamp TIMESTAMP); ",SELECT AVG(temp) FROM temps WHERE sensor_id = 006 AND timestamp BETWEEN '2022-02-01 00:00:00' AND '2022-02-28 23:59:59';,SELECT AVG(temp) FROM temps WHERE sensors.location = 'Field F' AND timestamp BETWEEN '2022-02-01' AND '2022-02-28';,0 List all warehouses with their total space and the number of pallets they can accommodate.,"CREATE TABLE warehouses (id INT, warehouse_name VARCHAR(50), total_space INT, pallets_per_sqft INT); ","SELECT warehouse_name, total_space, total_space * pallets_per_sqft as pallets_capacity FROM warehouses;","SELECT warehouse_name, total_space, pallets_per_sqft FROM warehouses;",0 List the top 5 most frequently ordered dishes across all locations.,"CREATE TABLE orders (order_id INT, location_id INT, item_id INT, quantity INT, date DATE); CREATE VIEW item_summary AS SELECT item_id, SUM(quantity) as total_quantity FROM orders GROUP BY item_id;","SELECT item_id, total_quantity FROM item_summary JOIN menu ON menu.item_id = item_summary.item_id WHERE menu.category IN ('entree') ORDER BY total_quantity DESC LIMIT 5;","SELECT location_id, SUM(quantity) as total_quantity FROM item_summary GROUP BY location_id ORDER BY total_quantity DESC LIMIT 5;",0 What is the average word count of articles about climate change?,"CREATE TABLE article_topics (article_id INT, topic VARCHAR(50)); CREATE TABLE articles (article_id INT, word_count INT, creation_date DATE);",SELECT AVG(word_count) FROM articles JOIN article_topics ON articles.article_id = article_topics.article_id WHERE topic = 'climate change';,SELECT AVG(word_count) FROM articles JOIN article_topics ON articles.article_id = article_topics.article_id WHERE topic = 'climate change';,1 Show the different statuses and the numbers of roller coasters for each status.,CREATE TABLE roller_coaster (Status VARCHAR);,"SELECT Status, COUNT(*) FROM roller_coaster GROUP BY Status;","SELECT Status, COUNT(*) FROM roller_coaster GROUP BY Status;",1 How many people have a vl type in a region greater than 3?,"CREATE TABLE table_name_49 (population INTEGER, type VARCHAR, region VARCHAR);","SELECT SUM(population) FROM table_name_49 WHERE type = ""vl"" AND region > 3;","SELECT SUM(population) FROM table_name_49 WHERE type = ""vl"" AND region > 3;",1 Which Season was the Division Three Hampton Park Rangers champions?,"CREATE TABLE table_name_63 (season VARCHAR, division_three VARCHAR);","SELECT season FROM table_name_63 WHERE division_three = ""hampton park rangers"";","SELECT season FROM table_name_63 WHERE division_three = ""hampton park rangers champions"";",0 What is the muzzle device with a 1:7 barrel twist and a stock 4th generation?,"CREATE TABLE table_name_47 (muzzle_device VARCHAR, barrel_twist VARCHAR, stock VARCHAR);","SELECT muzzle_device FROM table_name_47 WHERE barrel_twist = ""1:7"" AND stock = ""4th generation"";","SELECT muzzle_device FROM table_name_47 WHERE barrel_twist = ""1:7"" AND stock = ""4th generation"";",1 "In season 2005–06, who is 3rd place?",CREATE TABLE table_25058269_1 (season VARCHAR);,"SELECT 3 AS rd_place FROM table_25058269_1 WHERE season = ""2005–06"";","SELECT 3 AS rd_place FROM table_25058269_1 WHERE season = ""2005–06"";",1 "How many shows were released in each country, and what is the total runtime for each country?","CREATE TABLE shows (id INT, title VARCHAR(100), genre VARCHAR(50), country VARCHAR(50), release_year INT, runtime INT);","SELECT country, COUNT(*), SUM(runtime) FROM shows GROUP BY country;","SELECT country, COUNT(*) as num_shows, SUM(runtime) as total_runtime FROM shows GROUP BY country;",0 What is the total number of bike-sharing trips taken in the Madrid public transportation network during the evening peak hours?,"CREATE TABLE bike_trips (entry_time TIME, num_trips INT); ",SELECT SUM(num_trips) FROM bike_trips WHERE entry_time BETWEEN '17:00:00' AND '19:00:00';,"SELECT SUM(num_trips) FROM bike_trips WHERE entry_time BETWEEN DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) AND CURRENT_TIMESTAMP;",0 What is the total revenue from concert ticket sales for jazz artists?,"CREATE TABLE Concerts (ConcertID INT, Title VARCHAR(50), ArtistID INT, Venue VARCHAR(50), Revenue INT); CREATE TABLE Artists (ArtistID INT, Name VARCHAR(50), Age INT, Genre VARCHAR(50)); ",SELECT SUM(C.Revenue) FROM Concerts C INNER JOIN Artists A ON C.ArtistID = A.ArtistID WHERE A.Genre = 'Jazz';,SELECT SUM(Revenue) FROM Concerts JOIN Artists ON Concerts.ArtistID = Artists.ArtistID WHERE Artists.Genre = 'Jazz';,0 What was the total revenue generated from the 'Eco-Friendly' fabric type for the year 2021?,"CREATE TABLE sales_fabric (sale_id INT, sale_date DATE, fabric VARCHAR(20), revenue FLOAT); ",SELECT SUM(revenue) FROM sales_fabric WHERE fabric = 'Eco-Friendly' AND sale_date BETWEEN '2021-01-01' AND '2021-12-31';,SELECT SUM(revenue) FROM sales_fabric WHERE fabric = 'Eco-Friendly' AND YEAR(sale_date) = 2021;,0 How many unique volunteers worked on each project in 2022?,"CREATE TABLE projects (id INT, name VARCHAR(50), start_date DATE, end_date DATE); CREATE TABLE volunteers (id INT, name VARCHAR(50), project_id INT, volunteer_date DATE); ","SELECT p.name, COUNT(DISTINCT v.id) AS num_volunteers FROM projects p JOIN volunteers v ON p.id = v.project_id WHERE YEAR(v.volunteer_date) = 2022 GROUP BY p.id;","SELECT p.name, COUNT(DISTINCT v.id) as unique_volunteers FROM projects p JOIN volunteers v ON p.id = v.project_id WHERE YEAR(v.volunteer_date) = 2022 GROUP BY p.name;",0 What was Week 11 when Week 10 had Nebraska (7-1)?,"CREATE TABLE table_name_99 (week_11_nov_6 VARCHAR, week_10_oct_30 VARCHAR);","SELECT week_11_nov_6 FROM table_name_99 WHERE week_10_oct_30 = ""nebraska (7-1)"";","SELECT week_11_nov_6 FROM table_name_99 WHERE week_10_oct_30 = ""nebraska (7-1)"";",1 What is the total funding allocated for climate mitigation projects in Africa in 2020?,"CREATE TABLE climate_mitigation_projects (id INT, project_name VARCHAR(100), location VARCHAR(100), funding FLOAT, year INT); ",SELECT SUM(funding) FROM climate_mitigation_projects WHERE location = 'Africa' AND year = 2020;,SELECT SUM(funding) FROM climate_mitigation_projects WHERE location = 'Africa' AND year = 2020;,1 What is the average defense contract value in Q1 2021?,"CREATE TABLE defense_contracts (contract_id INT, value FLOAT, sign_date DATE); ",SELECT AVG(value) FROM defense_contracts WHERE sign_date BETWEEN '2021-01-01' AND '2021-03-31';,SELECT AVG(value) FROM defense_contracts WHERE sign_date BETWEEN '2021-01-01' AND '2021-03-31';,1 What is the average water demand and recycled water usage by sector?,"CREATE TABLE if not exists irrigation_data (id INT PRIMARY KEY, farm_id INT, water_usage FLOAT, usage_date DATE); CREATE TABLE if not exists recycled_water_usage (id INT PRIMARY KEY, sector VARCHAR(50), water_volume FLOAT);","SELECT rwu.sector, AVG(id.water_usage) as avg_water_demand, rwu.water_volume as recycled_water_volume FROM irrigation_data id JOIN recycled_water_usage rwu ON 1=1 GROUP BY rwu.sector;","SELECT sector, AVG(water_volume) as avg_water_demand, AVG(recycled_water_usage) as avg_recycled_water_usage FROM irrigation_data i JOIN recycled_water_usage r ON i.farm_id = r.id GROUP BY sector;",0 How many shipments arrived in Mexico from various countries?,"CREATE TABLE shipments (id INT, origin_country VARCHAR(255), destination_country VARCHAR(255)); ",SELECT COUNT(*) FROM shipments WHERE destination_country = 'Mexico';,"SELECT origin_country, COUNT(*) FROM shipments WHERE destination_country = 'Mexico' GROUP BY origin_country;",0 List the final score of Wimbledon (2/2).,"CREATE TABLE table_2201724_1 (score_in_the_final VARCHAR, championship VARCHAR);","SELECT score_in_the_final FROM table_2201724_1 WHERE championship = ""Wimbledon (2/2)"";","SELECT score_in_the_final FROM table_2201724_1 WHERE championship = ""Wimbledon (2/2)"";",1 What is the name for the forward in the 2009-2010 season?,"CREATE TABLE table_name_63 (name VARCHAR, position VARCHAR, season VARCHAR);","SELECT name FROM table_name_63 WHERE position = ""forward"" AND season = ""2009-2010"";","SELECT name FROM table_name_63 WHERE position = ""forward"" AND season = ""2009-2010"";",1 What is the maximum number of followers for users who have posted about environmental issues in the past year?,"CREATE TABLE users (id INT, joined_date DATE, followers INT); CREATE TABLE posts (id INT, user_id INT, posted_date DATE); CREATE TABLE post_tags (post_id INT, tag VARCHAR(255)); ","SELECT MAX(users.followers) FROM users INNER JOIN posts ON users.id = posts.user_id INNER JOIN post_tags ON posts.id = post_tags.post_id WHERE post_tags.tag = 'environmental issues' AND users.joined_date <= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT MAX(users.followers) FROM users INNER JOIN posts ON users.id = posts.user_id INNER JOIN post_tags ON posts.post_id = post_tags.post_id WHERE posts.posted_date >= DATEADD(year, -1, GETDATE());",0 Delete the 'city_info' table,"CREATE TABLE city_info (id INT, city VARCHAR(50), state VARCHAR(2), mayor_name VARCHAR(50));",DROP TABLE city_info;,DELETE FROM city_info;,0 What is the total revenue from cultural heritage experiences in Indonesia?,"CREATE TABLE Countries (id INT, name VARCHAR(50)); CREATE TABLE Transactions (id INT, country_id INT, experience_type VARCHAR(50), revenue INT); ",SELECT SUM(t.revenue) as total_revenue FROM Transactions t JOIN Countries c ON t.country_id = c.id WHERE t.experience_type = 'Cultural Heritage';,SELECT SUM(t.revenue) FROM Transactions t JOIN Countries c ON t.country_id = c.id WHERE c.name = 'Indonesia' AND t.experience_type = 'cultural heritage';,0 "What is the total value of Shariah-compliant assets held by each investor, in descending order?","CREATE TABLE investors (investor_id INT, investor_name TEXT, country TEXT); CREATE TABLE shariah_compliant_assets (asset_id INT, investor_id INT, asset_value DECIMAL); ","SELECT investor_name, SUM(asset_value) AS total_assets FROM shariah_compliant_assets JOIN investors ON shariah_compliant_assets.investor_id = investors.investor_id GROUP BY investor_name ORDER BY total_assets DESC;","SELECT investors.investor_name, SUM(shariah_compliant_assets.asset_value) as total_asset_value FROM investors INNER JOIN shariah_compliant_assets ON investors.investor_id = shariah_compliant_assets.investor_id GROUP BY investors.investor_name ORDER BY total_asset_value DESC;",0 "List all unique cities and the total number of arts education programs in 'Southern' region for 2021 and 2022, sorted by the total number of programs in descending order.","CREATE TABLE Education (city VARCHAR(20), region VARCHAR(20), year INT, program_count INT); ","SELECT city, SUM(program_count) FROM Education WHERE region = 'Southern' AND year IN (2021, 2022) GROUP BY city ORDER BY SUM(program_count) DESC;","SELECT city, SUM(program_count) as total_programs FROM Education WHERE region = 'Southern' AND year IN (2021, 2022) GROUP BY city ORDER BY total_programs DESC;",0 What school did draft pick from round 3 go to?,"CREATE TABLE table_name_6 (school VARCHAR, round VARCHAR);",SELECT school FROM table_name_6 WHERE round = 3;,SELECT school FROM table_name_6 WHERE round = 3;,1 What is the maximum value of artworks in the 'Artworks' table by artists from France?,"CREATE TABLE Artworks (id INT, value DECIMAL(10,2), artist_id INT); CREATE TABLE Artists (id INT, name VARCHAR(255), nationality VARCHAR(255)); ",SELECT MAX(value) FROM Artworks INNER JOIN Artists ON Artworks.artist_id = Artists.id WHERE Artists.nationality = 'France';,SELECT MAX(value) FROM Artworks JOIN Artists ON Artworks.artist_id = Artists.id WHERE Artists.nationality = 'France';,0 "Name the result for january 14, 2008","CREATE TABLE table_name_19 (result VARCHAR, date VARCHAR);","SELECT result FROM table_name_19 WHERE date = ""january 14, 2008"";","SELECT result FROM table_name_19 WHERE date = ""january 14, 2008"";",1 What are the total donation amounts for organizations with a higher rating than 'Good'?,"CREATE TABLE organizations (id INT, name TEXT, rating TEXT); ",SELECT SUM(donation_amount) FROM donations JOIN organizations ON donations.org_id = organizations.id WHERE organizations.rating > 'Good';,SELECT SUM(donation_amount) FROM donations JOIN organizations ON donations.organization_id = organizations.id WHERE organizations.rating > 'Good';,0 What is the NOAA of the higher harmonics that have a Darwin of mn 4?,"CREATE TABLE table_name_49 (noaa VARCHAR, darwin VARCHAR);","SELECT noaa FROM table_name_49 WHERE darwin = ""mn 4"";","SELECT noaa FROM table_name_49 WHERE darwin = ""mn 4"";",1 What director had a production number of 1490?,"CREATE TABLE table_name_27 (director VARCHAR, production_number VARCHAR);",SELECT director FROM table_name_27 WHERE production_number = 1490;,SELECT director FROM table_name_27 WHERE production_number = 1490;,1 What is the conservation initiative success rate for each region?,"CREATE TABLE conservation_initiatives (region TEXT, initiative TEXT, success BOOLEAN); ","SELECT region, AVG(success) as success_rate FROM conservation_initiatives GROUP BY region;","SELECT region, success FROM conservation_initiatives WHERE success = TRUE GROUP BY region;",0 How many products are made from 'Organic Cotton' in each country?,"CREATE TABLE products (product_id INT, name TEXT, material TEXT, country TEXT); CREATE TABLE countries (country TEXT, region TEXT); ","SELECT countries.country, COUNT(*) as product_count FROM products INNER JOIN countries ON products.country = countries.country WHERE products.material = 'Organic Cotton' GROUP BY countries.country;","SELECT c.country, COUNT(p.product_id) FROM products p JOIN countries c ON p.country = c.country WHERE p.material = 'Organic Cotton' GROUP BY c.country;",0 How many of the elected officials are on the Economic Matters committee?,"CREATE TABLE table_14009909_1 (first_elected VARCHAR, committee VARCHAR);","SELECT COUNT(first_elected) FROM table_14009909_1 WHERE committee = ""Economic Matters"";","SELECT COUNT(first_elected) FROM table_14009909_1 WHERE committee = ""Economic Matters"";",1 What are the top 5 most vulnerable systems by CVE count in the 'vulnerabilities' table?,"CREATE TABLE vulnerabilities (system_id INT, system_name VARCHAR(100), cve_count INT); ","SELECT system_name, SUM(cve_count) as total_cve_count FROM vulnerabilities GROUP BY system_name ORDER BY total_cve_count DESC LIMIT 5;","SELECT system_name, cve_count FROM vulnerabilities ORDER BY cve_count DESC LIMIT 5;",0 What is the total number of animals in 'animal_population' and 'rehabilitated_animals' tables?,"CREATE TABLE animal_population (id INT, animal_name VARCHAR(50), population INT); ","SELECT COALESCE(SUM(ap.population), 0) + COALESCE(SUM(ra.population), 0) FROM animal_population ap RIGHT JOIN rehabilitated_animals ra ON ap.animal_name = ra.animal_name;",SELECT SUM(population) FROM animal_population;,0 What was the year of the competition in which Odd Grenland was the runner-up?,"CREATE TABLE table_name_57 (years VARCHAR, runners_up VARCHAR);","SELECT years FROM table_name_57 WHERE runners_up = ""odd grenland"";","SELECT years FROM table_name_57 WHERE runners_up = ""odd grenland"";",1 "What is the highest championship that has 1 as the league cup, and 17 as the total?","CREATE TABLE table_name_85 (championship INTEGER, league_cup VARCHAR, total VARCHAR);","SELECT MAX(championship) FROM table_name_85 WHERE league_cup = 1 AND total = ""17"";",SELECT MAX(championship) FROM table_name_85 WHERE league_cup = 1 AND total = 17;,0 Which 2012 has a 2010 of 0–0?,CREATE TABLE table_name_46 (Id VARCHAR);,"SELECT 2012 FROM table_name_46 WHERE 2010 = ""0–0"";","SELECT 2012 FROM table_name_46 WHERE 2010 = ""0–0"";",1 Identify the design standard used in the 'Dam567' project,"CREATE TABLE design_standards (id INT, name VARCHAR(255), standard VARCHAR(255)); ",SELECT design_standards.standard FROM design_standards WHERE design_standards.name = 'Dam567';,SELECT standard FROM design_standards WHERE name = 'Dam567';,0 "Which venue has a Result of w, and a Goal of deacon 5/5?","CREATE TABLE table_name_84 (venue VARCHAR, result VARCHAR, goals VARCHAR);","SELECT venue FROM table_name_84 WHERE result = ""w"" AND goals = ""deacon 5/5"";","SELECT venue FROM table_name_84 WHERE result = ""w"" AND goals = ""deacon 5/5"";",1 The Cardinal-Priest of S. Prassede order and title has who as the elevator?,"CREATE TABLE table_name_30 (elevator VARCHAR, order_and_title VARCHAR);","SELECT elevator FROM table_name_30 WHERE order_and_title = ""cardinal-priest of s. prassede"";","SELECT elevator FROM table_name_30 WHERE order_and_title = ""s. prassede"";",0 Identify the top three crops by acreage in 'urban' farming communities.,"CREATE TABLE urban_community_farms AS SELECT f.name AS farmer_name, c.crop_name, c.acres FROM farmers f JOIN crops c ON f.id = c.farmer_id JOIN farm_communities fr ON f.id = fr.farm_id WHERE fr.community = 'urban'; ","SELECT crop_name, SUM(acres) AS total_acres FROM urban_community_farms GROUP BY crop_name ORDER BY total_acres DESC LIMIT 3;","SELECT c.crop_name, c.acres FROM urban_community_farms c JOIN crops c c ON c.id = c.farmer_id JOIN farm_communities fr ON c.id = fr.farm_id WHERE c.community = 'urban' GROUP BY c.crop_name ORDER BY c.acres DESC LIMIT 3;",0 "How many rural infrastructure projects were completed in the last two years, partitioned by completion status and region?","CREATE TABLE RuralInfrastructure (ProjectID INT, CompletionStatus VARCHAR(20), CompletionDate DATE, Region VARCHAR(100)); ","SELECT CompletionStatus, Region, COUNT(*) AS ProjectCount FROM RuralInfrastructure WHERE CompletionDate >= DATEADD(YEAR, -2, GETDATE()) GROUP BY CompletionStatus, Region;","SELECT CompletionStatus, Region, COUNT(*) FROM RuralInfrastructure WHERE CompletionDate >= DATEADD(year, -2, GETDATE()) GROUP BY CompletionStatus, Region;",0 What is the total blocks when there are less than 210 digs and the total attempts are more than 1116?,"CREATE TABLE table_name_78 (total_blocks INTEGER, digs VARCHAR, total_attempts VARCHAR);",SELECT AVG(total_blocks) FROM table_name_78 WHERE digs < 210 AND total_attempts > 1116;,SELECT SUM(total_blocks) FROM table_name_78 WHERE digs 210 AND total_attempts > 1116;,0 What is the average rating of movies produced in Spain and Italy?,"CREATE TABLE movies (id INT, title VARCHAR(255), rating DECIMAL(3,2), production_country VARCHAR(64)); ","SELECT AVG(rating) FROM movies WHERE production_country IN ('Spain', 'Italy');","SELECT AVG(rating) FROM movies WHERE production_country IN ('Spain', 'Italy');",1 "What is the total amount donated by each donor in 2021, ordered by the most to least?","CREATE TABLE Donations (DonorID int, DonationDate date, Amount decimal(10,2)); ","SELECT DonorID, SUM(Amount) as TotalDonation FROM Donations WHERE YEAR(DonationDate) = 2021 GROUP BY DonorID ORDER BY TotalDonation DESC;","SELECT DonorID, SUM(Amount) as TotalDonated FROM Donations WHERE YEAR(DonationDate) = 2021 GROUP BY DonorID ORDER BY TotalDonated DESC;",0 Find the names and locations of rural health centers in India and Nigeria that have been established after 2000.,"CREATE TABLE health_centers (name TEXT, location TEXT, establishment_date DATE); ","SELECT name, location FROM health_centers WHERE (location LIKE 'Rural%' AND establishment_date > '2000-01-01') AND country IN ('India', 'Nigeria')","SELECT name, location FROM health_centers WHERE location IN ('India', 'Nigeria') AND establishment_date > '2000-01-01';",0 What is the population for Deed number of 21352021?,"CREATE TABLE table_name_51 (population VARCHAR, deed_number VARCHAR);","SELECT population FROM table_name_51 WHERE deed_number = ""21352021"";","SELECT population FROM table_name_51 WHERE deed_number = ""21352021"";",1 Who was the director of the episode written by Russell T Davies and James Moran?,"CREATE TABLE table_name_67 (director VARCHAR, writer VARCHAR);","SELECT director FROM table_name_67 WHERE writer = ""russell t davies and james moran"";","SELECT director FROM table_name_67 WHERE writer = ""russell t davies and james moran"";",1 What is the most silver won by Norway?,"CREATE TABLE table_name_76 (silver INTEGER, nation VARCHAR);","SELECT MAX(silver) FROM table_name_76 WHERE nation = ""norway"";","SELECT MAX(silver) FROM table_name_76 WHERE nation = ""norway"";",1 Who was the Hessen the year that Saar was FK Pirmasens?,"CREATE TABLE table_name_23 (hessen VARCHAR, saar VARCHAR);","SELECT hessen FROM table_name_23 WHERE saar = ""fk pirmasens"";","SELECT hessen FROM table_name_23 WHERE saar = ""fk pirmasens"";",1 "How many Forfeits have Wins smaller than 8, and Losses larger than 16?","CREATE TABLE table_name_84 (forfeits VARCHAR, wins VARCHAR, losses VARCHAR);",SELECT COUNT(forfeits) FROM table_name_84 WHERE wins < 8 AND losses > 16;,SELECT COUNT(forfeits) FROM table_name_84 WHERE wins 8 AND losses > 16;,0 What's the highest Year for the Venue of Santiago De Chile and the Event of 800 m?,"CREATE TABLE table_name_67 (year INTEGER, event VARCHAR, venue VARCHAR);","SELECT MAX(year) FROM table_name_67 WHERE event = ""800 m"" AND venue = ""santiago de chile"";","SELECT MAX(year) FROM table_name_67 WHERE event = ""800 m"" AND venue = ""santiago de chile"";",1 Update all records with the occupation 'Engineer' to 'Senior Engineer' in the 'union_contracts' table,"CREATE TABLE union_contracts (id INT, worker_id INT, occupation VARCHAR(50), start_date DATE, end_date DATE); ",UPDATE union_contracts SET occupation = 'Senior Engineer' WHERE occupation = 'Engineer';,UPDATE union_contracts SET occupation = 'Senior Engineer' WHERE occupation = 'Engineer';,1 What's the highest level of team Astana since 2007?,"CREATE TABLE table_name_96 (level INTEGER, team VARCHAR, season VARCHAR);","SELECT MAX(level) FROM table_name_96 WHERE team = ""astana"" AND season > 2007;","SELECT MAX(level) FROM table_name_96 WHERE team = ""astana"" AND season > 2007;",1 "What is the total number of visitors for dance and visual art events, and how does the average attendance compare?","CREATE TABLE Events (Id INT, EventType VARCHAR(50), Attendance INT);CREATE TABLE DanceEvents (Id INT, EventId INT);CREATE TABLE VisualArtEvents (Id INT, EventId INT);","SELECT D.EventType, AVG(E.Attendance) as AvgAttendance FROM Events E INNER JOIN (SELECT * FROM DanceEvents UNION ALL SELECT * FROM VisualArtEvents) D ON E.Id = D.EventId GROUP BY D.EventType;","SELECT e.EventType, SUM(e.Attendance) as TotalVisitors, AVG(e.Attendance) as AvgAttendance FROM Events e JOIN DanceEvents d ON e.Id = d.EventId JOIN VisualArtEvents vAE ON e.Id = vAE.EventId GROUP BY e.EventType;",0 "How many profits is the company that is headquartered in the USA, in the banking industry, and has sales (billion $) less than 98.64 bringing in?","CREATE TABLE table_name_54 (profits__billion_ INTEGER, sales__billion_$_ VARCHAR, headquarters VARCHAR, industry VARCHAR);","SELECT SUM(profits__billion_) AS $_ FROM table_name_54 WHERE headquarters = ""usa"" AND industry = ""banking"" AND sales__billion_$_ < 98.64;","SELECT SUM(profits__billion_) FROM table_name_54 WHERE headquarters = ""usa"" AND industry = ""banking"" AND sales__billion_$_ 98.64;",0 What Type of museum is the Valdez museum?,"CREATE TABLE table_name_73 (type VARCHAR, name VARCHAR);","SELECT type FROM table_name_73 WHERE name = ""valdez museum"";","SELECT type FROM table_name_73 WHERE name = ""valdez museum"";",1 List all ports in the 'ports' table that have an even port ID.,"CREATE TABLE ports (port_id INT, port_name VARCHAR(50)); ","SELECT port_name FROM ports WHERE MOD(port_id, 2) = 0;",SELECT * FROM ports WHERE port_id = 1;,0 What are the names of the agricultural innovation projects in the 'rural_infrastructure' table that have a budget between 100000 and 200000?,"CREATE TABLE rural_infrastructure (id INT, name VARCHAR(50), type VARCHAR(50), budget FLOAT); ",SELECT name FROM rural_infrastructure WHERE type = 'Agricultural Innovation' AND budget > 100000 AND budget < 200000;,SELECT name FROM rural_infrastructure WHERE budget BETWEEN 100000 AND 200000;,0 "Score of 118–114, and a Record of 8–1 is what lowest game?","CREATE TABLE table_name_64 (game INTEGER, score VARCHAR, record VARCHAR);","SELECT MIN(game) FROM table_name_64 WHERE score = ""118–114"" AND record = ""8–1"";","SELECT MIN(game) FROM table_name_64 WHERE score = ""118–114"" AND record = ""8–1"";",1 What is the number of public parks in each state and their total area?,"CREATE TABLE parks (state VARCHAR(255), park_name VARCHAR(255), park_type VARCHAR(255), area FLOAT); ","SELECT s1.state, s1.park_type, COUNT(s1.park_name) as num_parks, SUM(s1.area) as total_area FROM parks s1 WHERE s1.park_type = 'Public' GROUP BY s1.state, s1.park_type;","SELECT state, COUNT(*), SUM(area) FROM parks GROUP BY state;",0 Get the total duration of news programs in minutes for each day of the week.,"CREATE TABLE news_programs (title VARCHAR(255), duration INT, air_date DATE);","SELECT air_date, SUM(duration) FROM news_programs WHERE title LIKE '%news%' GROUP BY air_date;","SELECT DATE_FORMAT(air_date, '%Y-%m') AS day_of_week, SUM(duration) AS total_duration FROM news_programs GROUP BY day_of_week;",0 What is the ANSI code of the township where the area is 35.737 square miles?,"CREATE TABLE table_18600760_18 (ansi_code INTEGER, land___sqmi__ VARCHAR);","SELECT MIN(ansi_code) FROM table_18600760_18 WHERE land___sqmi__ = ""35.737"";","SELECT MAX(ansi_code) FROM table_18600760_18 WHERE land___sqmi__ = ""35.737"";",0 "Which Game has an Opponent of detroit red wings, and a March smaller than 12?","CREATE TABLE table_name_13 (game VARCHAR, opponent VARCHAR, march VARCHAR);","SELECT COUNT(game) FROM table_name_13 WHERE opponent = ""detroit red wings"" AND march < 12;","SELECT game FROM table_name_13 WHERE opponent = ""detroit red wings"" AND march 12;",0 "List all astronauts who have participated in space missions, along with the number of missions they've been on, ordered by the number of missions in descending order.","CREATE TABLE Astronauts (ID INT, Astronaut_Name VARCHAR(255), Missions INT); ","SELECT Astronaut_Name, Missions FROM Astronauts ORDER BY Missions DESC;","SELECT Astronaut_Name, Missions FROM Astronauts ORDER BY Missions DESC;",1 List all cybersecurity strategies in the 'AsiaPacific' schema.,"CREATE SCHEMA AsiaPacific; CREATE TABLE CyberSecurityStrategies (id INT, name VARCHAR(255), description TEXT); ",SELECT * FROM AsiaPacific.CyberSecurityStrategies;,SELECT name FROM AsiaPacific.CyberSecurityStrategies;,0 What is the percentage of households in Mumbai with water consumption above the city average?,"CREATE TABLE mumbai_water_consumption (id INT, date DATE, household_id INT, water_consumption FLOAT); ",SELECT COUNT(*) * 100.0 / (SELECT COUNT(DISTINCT household_id) FROM mumbai_water_consumption) FROM mumbai_water_consumption WHERE water_consumption > (SELECT AVG(water_consumption) FROM mumbai_water_consumption);,SELECT (COUNT(*) FILTER (WHERE water_consumption > (SELECT AVG(water_consumption) FROM mumbai_water_consumption)) * 100.0 / COUNT(*) FROM mumbai_water_consumption;,0 Update the graduate_students table to change the advisor for student with ID 1,"CREATE TABLE graduate_students (id INT, name TEXT, department TEXT, advisor TEXT); ",UPDATE graduate_students SET advisor = 'Prof. Jones' WHERE id = 1;,UPDATE graduate_students SET advisor = 'Adviser' WHERE id = 1;,0 "Of the players with 50 free throws, what is the lowest number of three pointers?","CREATE TABLE table_22824199_1 (three_pointers INTEGER, free_throws VARCHAR);",SELECT MIN(three_pointers) FROM table_22824199_1 WHERE free_throws = 50;,SELECT MIN(three_pointers) FROM table_22824199_1 WHERE free_throws = 50;,1 What game was in 2001?,"CREATE TABLE table_name_66 (game VARCHAR, year VARCHAR);",SELECT game FROM table_name_66 WHERE year = 2001;,SELECT game FROM table_name_66 WHERE year = 2001;,1 What is the average of the Series #s that were directed by Matthew Penn?,"CREATE TABLE table_name_42 (series__number INTEGER, directed_by VARCHAR);","SELECT AVG(series__number) FROM table_name_42 WHERE directed_by = ""matthew penn"";","SELECT AVG(series__number) FROM table_name_42 WHERE directed_by = ""matthew penn"";",1 "Who are the eSports players with the most losses in ""Rainbow Six Siege"" tournaments?","CREATE TABLE Players (PlayerName VARCHAR(255), TournamentLosses INT); ",SELECT PlayerName FROM Players WHERE TournamentLosses = (SELECT MAX(TournamentLosses) FROM Players);,"SELECT PlayerName, TournamentLosses FROM Players WHERE TournamentLosses = (SELECT MAX(TournamentLosses) FROM Players WHERE TournamentLosses = (SELECT MAX(TournamentLosses) FROM Players WHERE TournamentLosses = (SELECT MAX(TournamentLosses) FROM Players WHERE TournamentLosses = (SELECT MAX(TournamentLosses) FROM Players WHERE TournamentLosses = (SELECT MAX(TournamentLosses) FROM Players WHERE TournamentLosses) = (SELECT MAX(TournamentLosses) FROM Players WHERE TournamentLosses) FROM Players WHERE TournamentLosses = (SELECT MAX(TournamentLosses) FROM Players WHERE TournamentLosses) = (SELECT MAX(TournamentLosses) FROM Players WHERE TournamentLosses) FROM Players WHERE TournamentLosses)) GROUP BY PlayerName;",0 "List all electric vehicle adoption statistics for Japan, grouped by year.","CREATE TABLE Adoption (Year INT, Country VARCHAR(255), Statistics FLOAT); ","SELECT Year, AVG(Statistics) FROM Adoption WHERE Country = 'Japan' GROUP BY Year;","SELECT Year, SUM(Statistics) FROM Adoption WHERE Country = 'Japan' GROUP BY Year;",0 What is the maximum financial wellbeing score for clients in each age group?,"CREATE TABLE clients(id INT, name TEXT, age INT, financial_wellbeing_score INT);","SELECT c.age, MAX(c.financial_wellbeing_score) FROM clients c GROUP BY c.age;","SELECT age, MAX(financial_wellbeing_score) FROM clients GROUP BY age;",0 How many materials are there for output power of ~0.1 pw per cycle (calculated)?,"CREATE TABLE table_30057479_1 (material VARCHAR, output_power VARCHAR);","SELECT COUNT(material) FROM table_30057479_1 WHERE output_power = ""~0.1 pW per cycle (calculated)"";","SELECT COUNT(material) FROM table_30057479_1 WHERE output_power = ""0.1 pw per cycle (calculated)"";",0 "Calculate the total number of hotel reviews and average rating per hotel for the first two days of June, 2021, for hotels in North America and Europe?","CREATE TABLE hotel_reviews (hotel_id INT, review_date DATE, rating INT, region VARCHAR(50)); ","SELECT h.region, h.hotel_id, COUNT(h.hotel_id) as total_reviews, AVG(h.rating) as avg_rating FROM hotel_reviews h WHERE h.review_date BETWEEN '2021-06-01' AND '2021-06-02' AND h.region IN ('North America', 'Europe') GROUP BY h.region, h.hotel_id;","SELECT region, COUNT(*) as total_reviews, AVG(rating) as avg_rating FROM hotel_reviews WHERE review_date BETWEEN '2021-01-01' AND '2021-06-30' AND region IN ('North America', 'Europe') GROUP BY region;",0 What was the lowes population of 2002 when the 2011 population was 30076?,"CREATE TABLE table_2562572_8 (population__2002_ INTEGER, population__2011_ VARCHAR);",SELECT MIN(population__2002_) FROM table_2562572_8 WHERE population__2011_ = 30076;,SELECT MAX(population__2002_) FROM table_2562572_8 WHERE population__2011_ = 30076;,0 What is the adoption rate of electric vehicles in Asia?,"CREATE TABLE electric_vehicle_stats (country VARCHAR(50), adoption_rate DECIMAL(3,1), year INT);",SELECT adoption_rate FROM electric_vehicle_stats WHERE country = 'China' OR country = 'Japan' AND year = 2025;,"SELECT adoption_rate FROM electric_vehicle_stats WHERE country IN ('China', 'India', 'Japan', 'India', 'China', 'India', 'China', 'India', 'China', 'India', 'China', 'India', 'China', 'India', 'China', 'India', 'India', 'China', 'India', 'India', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Ja",0 "Which City has a Date of may 19, 1976?","CREATE TABLE table_name_23 (city VARCHAR, date VARCHAR);","SELECT city FROM table_name_23 WHERE date = ""may 19, 1976"";","SELECT city FROM table_name_23 WHERE date = ""may 19, 1976"";",1 Display the number of VR games in each genre and the total number of years of experience their designers have in VR game development.,"CREATE TABLE VR_Games (GameID INT, GameName VARCHAR(50), Genre VARCHAR(20)); CREATE TABLE Designers (DesignerID INT, DesignerName VARCHAR(50), YearsOfExperience INT); CREATE TABLE VR_GameDesign (GameID INT, DesignerID INT);","SELECT VR_Games.Genre, SUM(Designers.YearsOfExperience) FROM VR_Games INNER JOIN VR_GameDesign ON VR_Games.GameID = VR_GameDesign.GameID INNER JOIN Designers ON VR_GameDesign.DesignerID = Designers.DesignerID GROUP BY VR_Games.Genre;","SELECT Genre, COUNT(DISTINCT VR_Games.GameID) AS GamesCount, SUM(Designers.YearsOfExperience) AS TotalYearsOfExperience FROM VR_Games INNER JOIN VR_GameDesign ON VR_Games.GameID = VR_GameDesign.GameID INNER JOIN Designers ON VR_GameDesign.DesignerID = Designers.DesignerID GROUP BY Genre;",0 Compare the number of hybrid and electric vehicles in the vehicle_sales table with the number of hybrid and electric vehicles in the autonomous_vehicles table.,"CREATE TABLE vehicle_sales (id INT, vehicle_type VARCHAR(50)); CREATE TABLE autonomous_vehicles (id INT, vehicle_type VARCHAR(50)); ","SELECT (SELECT COUNT(*) FROM vehicle_sales WHERE vehicle_type IN ('hybrid', 'electric')) - (SELECT COUNT(*) FROM autonomous_vehicles WHERE vehicle_type IN ('hybrid', 'electric'));",SELECT COUNT(*) FROM vehicle_sales INNER JOIN autonomous_vehicles ON vehicle_sales.vehicle_type = autonomous_vehicles.vehicle_type;,0 How many 'safe_algorithm' records exist for 'high_risk' sector?,"CREATE TABLE safe_algorithm (id INT PRIMARY KEY, sector TEXT, algorithm_name TEXT); ",SELECT COUNT(*) FROM safe_algorithm WHERE sector = 'high_risk';,SELECT COUNT(*) FROM safe_algorithm WHERE sector = 'high_risk';,1 What is the contact information and language preservation status for organizations in Africa?,"CREATE TABLE organizations (id INT, name VARCHAR, contact VARCHAR, region VARCHAR); CREATE TABLE preservation_status (id INT, status VARCHAR); ","SELECT organizations.name, organizations.contact, preservation_status.status FROM organizations INNER JOIN preservation_status ON organizations.region = preservation_status.status WHERE organizations.region = 'Africa';","SELECT T1.contact, T1.state FROM organizations AS T1 JOIN preservation_status AS T2 ON T1.id = T2.organization_id WHERE T2.region = 'Africa';",0 What is the number of patients treated for mental health issues in each region?,"CREATE TABLE RegionMentalHealth (RegionID int, PatientID int);","SELECT RegionID, COUNT(PatientID) as PatientCount FROM RegionMentalHealth GROUP BY RegionID;","SELECT RegionID, COUNT(*) FROM RegionMentalHealth GROUP BY RegionID;",0 What is the average heart rate during running workouts for users aged 30-40?,"CREATE TABLE activities (id INT, user_id INT, activity VARCHAR(50), date DATE, heart_rate INT); ",SELECT AVG(heart_rate) as avg_heart_rate FROM activities WHERE activity = 'Running' AND date BETWEEN '2022-01-01' AND '2022-01-31' AND user_id IN (SELECT id FROM users WHERE age BETWEEN 30 AND 40);,SELECT AVG(heart_rate) FROM activities WHERE user_id IN (SELECT user_id FROM users WHERE age BETWEEN 30 AND 40);,0 What is the long with a loss lower than 133 and more than 0 gain with an avg/G of 29.8?,"CREATE TABLE table_name_10 (long INTEGER, avg_g VARCHAR, loss VARCHAR, gain VARCHAR);",SELECT AVG(long) FROM table_name_10 WHERE loss < 133 AND gain > 0 AND avg_g = 29.8;,SELECT AVG(long) FROM table_name_10 WHERE loss 133 AND gain > 0 AND avg_g = 29.8;,0 What school did the catcher attend?,"CREATE TABLE table_11677100_12 (school VARCHAR, position VARCHAR);","SELECT school FROM table_11677100_12 WHERE position = ""Catcher"";","SELECT school FROM table_11677100_12 WHERE position = ""catcher"";",0 What is the recycling rate of plastic in the commercial sector?,"CREATE TABLE recycling_rates (sector VARCHAR(20), material VARCHAR(20), recycling_rate DECIMAL(5,2)); ",SELECT recycling_rate FROM recycling_rates WHERE sector = 'commercial' AND material = 'plastic';,SELECT recycling_rate FROM recycling_rates WHERE sector = 'Commercial' AND material = 'Plastic';,0 Which city has the highest average rating in the 'City_Hotels' table?,"CREATE TABLE City_Hotels (city VARCHAR(50), hotel_count INT, avg_rating DECIMAL(2,1)); ","SELECT city, AVG(avg_rating) FROM City_Hotels GROUP BY city ORDER BY AVG(avg_rating) DESC LIMIT 1;","SELECT city, AVG(avg_rating) as avg_rating FROM City_Hotels GROUP BY city ORDER BY avg_rating DESC LIMIT 1;",0 What is the Venue of the 2009 St. Louis Rams Home game?,"CREATE TABLE table_name_58 (venue VARCHAR, year VARCHAR, home_team VARCHAR);","SELECT venue FROM table_name_58 WHERE year = 2009 AND home_team = ""st. louis rams"";","SELECT venue FROM table_name_58 WHERE year = 2009 AND home_team = ""st. louis rams"";",1 What is the total number of electric vehicles sold in the world?,"CREATE TABLE if not exists EVSales (Id int, Vehicle varchar(100), City varchar(100), Country varchar(50), Quantity int); ",SELECT SUM(Quantity) FROM EVSales WHERE Country != '';,SELECT SUM(Quantity) FROM EVSales WHERE Vehicle = 'Electric';,0 What is the average age of inmates in each prison in the 'prisons' table?,"CREATE TABLE prisons (id INT, name VARCHAR(50), location VARCHAR(50), capacity INT, population INT, avg_age FLOAT); ","SELECT name, AVG(avg_age) FROM prisons GROUP BY name;","SELECT name, AVG(avg_age) FROM prisons GROUP BY name;",1 if the economy is 3.63 what is the bbi,"CREATE TABLE table_28798161_3 (bbi VARCHAR, economy VARCHAR);","SELECT bbi FROM table_28798161_3 WHERE economy = ""3.63"";","SELECT bbi FROM table_28798161_3 WHERE economy = ""3.63"";",1 Find the average temperature for each crop type in the 'crops' table.,"CREATE TABLE crops (id INT, crop_type VARCHAR(255), temperature FLOAT); ","SELECT crop_type, AVG(temperature) FROM crops GROUP BY crop_type;","SELECT crop_type, AVG(temperature) FROM crops GROUP BY crop_type;",1 "What is Written By, when Originalairdate is 25 April 1993?","CREATE TABLE table_name_31 (written_by VARCHAR, originalairdate VARCHAR);","SELECT written_by FROM table_name_31 WHERE originalairdate = ""25 april 1993"";","SELECT written_by FROM table_name_31 WHERE originalairdate = ""25 april 1993"";",1 What was the finishing position with 13 points?,"CREATE TABLE table_name_93 (fin_pos VARCHAR, points VARCHAR);","SELECT fin_pos FROM table_name_93 WHERE points = ""13"";",SELECT fin_pos FROM table_name_93 WHERE points = 13;,0 What country has a medical school established in 1969 with both an IMED and avicenna?,"CREATE TABLE table_name_15 (country_territory VARCHAR, imed_avicenna_listed VARCHAR, established VARCHAR);","SELECT country_territory FROM table_name_15 WHERE imed_avicenna_listed = ""both"" AND established = 1969;","SELECT country_territory FROM table_name_15 WHERE imed_avicenna_listed = ""medical school"" AND established = ""1969"";",0 What is the total and minimum enrollment of all schools?,CREATE TABLE university (enrollment INTEGER);,"SELECT SUM(enrollment), MIN(enrollment) FROM university;","SELECT SUM(enrollment) AS total_enrollment, MIN(enrollment) AS min_enrollment FROM university;",0 "What is the range of the head of household whereas single is $171,551–$372,950?","CREATE TABLE table_11647327_2 (head_of_household VARCHAR, single VARCHAR);","SELECT head_of_household FROM table_11647327_2 WHERE single = ""$171,551–$372,950"";","SELECT head_of_household FROM table_11647327_2 WHERE single = ""$171,551–$372,950"";",1 How many artists are from a specific country?,"CREATE TABLE Artists (id INT, name VARCHAR(50), country VARCHAR(50)); ",SELECT COUNT(*) FROM Artists WHERE country = 'United States';,SELECT COUNT(*) FROM Artists WHERE country = 'USA';,0 Name the ends lost for 67 pa,"CREATE TABLE table_15333005_1 (Ends VARCHAR, pa VARCHAR);",SELECT Ends AS lost FROM table_15333005_1 WHERE pa = 67;,SELECT Ends FROM table_15333005_1 WHERE pa = 67;,0 What is the score of the competition on November 10?,"CREATE TABLE table_name_90 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_90 WHERE date = ""november 10"";","SELECT score FROM table_name_90 WHERE date = ""november 10"";",1 Select the name and price of the cheapest product.,"CREATE TABLE Products (name VARCHAR, price VARCHAR);","SELECT name, price FROM Products ORDER BY price LIMIT 1;","SELECT name, price FROM Products ORDER BY price DESC LIMIT 1;",0 "For the match that lasted 3:53 minutes, what was the final record?","CREATE TABLE table_name_99 (record VARCHAR, time VARCHAR);","SELECT record FROM table_name_99 WHERE time = ""3:53"";","SELECT record FROM table_name_99 WHERE time = ""3:53"";",1 Which match did FCR 2001 Duisburg participate as the opponent?,"CREATE TABLE table_name_39 (match INTEGER, opponent VARCHAR);","SELECT SUM(match) FROM table_name_39 WHERE opponent = ""fcr 2001 duisburg"";","SELECT SUM(match) FROM table_name_39 WHERE opponent = ""fcr 2001 duisburg"";",1 What is the number of financially capable individuals in each country?,"CREATE TABLE if not exists individuals (id INT, country VARCHAR(50), is_financially_capable BOOLEAN, age INT, gender VARCHAR(10));","SELECT country, COUNT(*) FROM individuals WHERE is_financially_capable = TRUE GROUP BY country;","SELECT country, COUNT(*) FROM individuals WHERE is_financially_capable = true GROUP BY country;",0 What is the Canadian Kennel Club Toy Dogs Group with the australian silky terrier as the Australian National Kennel Council Toy Dogs Group breed?,"CREATE TABLE table_name_49 (canadian_kennel_club_toy_dogs_group VARCHAR, australian_national_kennel_council_toy_dogs_group VARCHAR);","SELECT canadian_kennel_club_toy_dogs_group FROM table_name_49 WHERE australian_national_kennel_council_toy_dogs_group = ""australian silky terrier"";","SELECT canadian_kennel_club_toy_dogs_group FROM table_name_49 WHERE australian_national_kennel_council_toy_dogs_group = ""silky terrier"";",0 "Find the average price per size for women's jeans in size 8, for all brands, and display the top 5 results.","CREATE TABLE Products (ProductID int, ProductName varchar(50), ProductType varchar(50), Size int, Price decimal(5,2)); ","SELECT AVG(Price) as AvgPrice, ProductType FROM Products WHERE ProductType = 'Women' AND Size = 8 GROUP BY ProductType ORDER BY AvgPrice DESC LIMIT 5;",SELECT AVG(Price) as AvgPricePerSize FROM Products WHERE ProductType = 'Female Jeans' AND Size = 8 GROUP BY ProductType ORDER BY AvgPricePerSize DESC LIMIT 5;,0 How many decentralized applications are there in the 'Polkadot' network that were launched after 2021-01-01?,"CREATE TABLE polkadot_dapps (id INT, name VARCHAR(255), network VARCHAR(255), launch_date DATE); ",SELECT COUNT(*) FROM polkadot_dapps WHERE network = 'polkadot' AND launch_date > '2021-01-01';,SELECT COUNT(*) FROM polkadot_dapps WHERE network = 'Polkadot' AND launch_date > '2021-01-01';,0 What is the total number of healthcare providers in the 'rural_clinic' table who are specialized in cardiology?,"CREATE TABLE rural_clinic (id INT, name VARCHAR(50), specialty VARCHAR(50)); ",SELECT COUNT(*) FROM rural_clinic WHERE specialty = 'Cardiology';,SELECT COUNT(*) FROM rural_clinic WHERE specialty = 'Cardiology';,1 Name the AEDT Time which has an Away team of collingwood?,"CREATE TABLE table_name_62 (aedt_time VARCHAR, away_team VARCHAR);","SELECT aedt_time FROM table_name_62 WHERE away_team = ""collingwood"";","SELECT aedt_time FROM table_name_62 WHERE away_team = ""collingwood"";",1 Name the sum of swimsuit for average more than 9.23 for delaware for interview more than 9.73,"CREATE TABLE table_name_31 (swimsuit INTEGER, interview VARCHAR, average VARCHAR, country VARCHAR);","SELECT SUM(swimsuit) FROM table_name_31 WHERE average > 9.23 AND country = ""delaware"" AND interview > 9.73;","SELECT SUM(swimsuit) FROM table_name_31 WHERE average > 9.23 AND country = ""delaware"" AND interview > 9.73;",1 What is the average carbon sequestered by trees in the forest?,"CREATE TABLE trees (id INT, carbon_sequestered DECIMAL(10,2));",SELECT AVG(carbon_sequestered) as avg_carbon_sequestered FROM trees;,SELECT AVG(carbon_sequestered) FROM trees;,0 "What is Series, when Season is 2007?","CREATE TABLE table_name_2 (series VARCHAR, season VARCHAR);",SELECT series FROM table_name_2 WHERE season = 2007;,SELECT series FROM table_name_2 WHERE season = 2007;,1 What is the lowest number of league cups associated with 0 FA cups?,"CREATE TABLE table_name_65 (league_cup INTEGER, fa_cup INTEGER);",SELECT MIN(league_cup) FROM table_name_65 WHERE fa_cup < 0;,SELECT MIN(league_cup) FROM table_name_65 WHERE fa_cup 0;,0 What is the highest year for the Bethesda Game Studios Developer?,"CREATE TABLE table_name_68 (year INTEGER, developer_s_ VARCHAR);","SELECT MAX(year) FROM table_name_68 WHERE developer_s_ = ""bethesda game studios"";","SELECT MAX(year) FROM table_name_68 WHERE developer_s_ = ""bethesda game studios"";",1 Which headquarters are associated with the school board Renfrew County Catholic District School Board?,"CREATE TABLE table_1506619_1 (headquarters VARCHAR, school_board VARCHAR);","SELECT headquarters FROM table_1506619_1 WHERE school_board = ""Renfrew County Catholic District school_board"";","SELECT headquarters FROM table_1506619_1 WHERE school_board = ""Renfrew County Catholic District School Board"";",0 Update the safety certifications of products manufactured in France to true.,"CREATE TABLE products (product_id TEXT, country TEXT, safety_certified BOOLEAN); ",UPDATE products SET safety_certified = TRUE WHERE country = 'France';,UPDATE products SET safety_certified = true WHERE country = 'France';,0 What is the earliest year in which an artwork from the 'Rococo' movement was created?,"CREATE TABLE Artworks (id INT, creation_year INT, movement VARCHAR(20));",SELECT MIN(creation_year) FROM Artworks WHERE movement = 'Rococo';,SELECT MIN(creation_year) FROM Artworks WHERE movement = 'Rococo';,1 "List the top 2 countries with the most shared bicycle trips, based on the number of trips?","CREATE TABLE trips (id INT, country VARCHAR(255), trip_type VARCHAR(255), trip_date DATE); ","SELECT country, COUNT(*) AS trips FROM trips WHERE trip_type = 'shared_bicycle' GROUP BY country ORDER BY trips DESC FETCH FIRST 2 ROWS ONLY;","SELECT country, COUNT(*) as num_trips FROM trips WHERE trip_type = 'Shared Bicycle' GROUP BY country ORDER BY num_trips DESC LIMIT 2;",0 Show the names of volunteers who have not been assigned to any tasks related to 'Food' distribution in the 'volunteers' and 'assignments' tables.,"CREATE TABLE volunteers (id INT, name VARCHAR(50)); CREATE TABLE assignments (id INT, volunteer_id INT, task VARCHAR(50)); ",SELECT volunteers.name FROM volunteers LEFT JOIN assignments ON volunteers.id = assignments.volunteer_id WHERE assignments.task NOT LIKE '%Food%';,SELECT v.name FROM volunteers v JOIN assignments a ON v.id = a.volunteer_id WHERE a.task IS NULL AND a.task LIKE '%Food%';,0 "How many Goals have a National team of england, and Apps smaller than 6, and a Year of 2012?","CREATE TABLE table_name_78 (goals INTEGER, year VARCHAR, national_team VARCHAR, apps VARCHAR);","SELECT SUM(goals) FROM table_name_78 WHERE national_team = ""england"" AND apps < 6 AND year = ""2012"";","SELECT SUM(goals) FROM table_name_78 WHERE national_team = ""england"" AND apps 6 AND year = 2012;",0 What is the production code for episode 15 in season 3?,"CREATE TABLE table_16581695_4 (production_code VARCHAR, no_in_season VARCHAR);","SELECT production_code FROM table_16581695_4 WHERE no_in_season = ""15"";","SELECT production_code FROM table_16581695_4 WHERE no_in_season = ""15"";",1 Name the play for 1976,"CREATE TABLE table_name_20 (play VARCHAR, year VARCHAR);",SELECT play FROM table_name_20 WHERE year = 1976;,SELECT play FROM table_name_20 WHERE year = 1976;,1 Identify any accounts that have had a balance greater than $100000 and calculate the minimum balance for each account?,"CREATE TABLE accounts (id INT, account_number INT, balance DECIMAL(10,2)); ","SELECT account_number, MIN(balance) as min_balance FROM accounts WHERE balance > 100000 GROUP BY account_number;","SELECT account_number, MIN(balance) FROM accounts WHERE balance > 100000 GROUP BY account_number;",0 What is the place of the player from Spain?,"CREATE TABLE table_name_64 (place VARCHAR, country VARCHAR);","SELECT place FROM table_name_64 WHERE country = ""spain"";","SELECT place FROM table_name_64 WHERE country = ""spain"";",1 What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes?,CREATE TABLE enzyme (OMIM INTEGER);,SELECT MAX(OMIM) FROM enzyme;,SELECT MAX(OMIM) FROM enzyme;,1 List all social good technology organizations in Africa.,"CREATE TABLE organizations (id INT, continent VARCHAR(255), is_social_good BOOLEAN); ",SELECT name FROM organizations WHERE continent = 'Africa' AND is_social_good = true;,SELECT * FROM organizations WHERE continent = 'Africa' AND is_social_good = true;,0 What is the total cost of all fines issued to companies from Africa in the last quarter?,"CREATE TABLE company (id INT, name TEXT, region TEXT); CREATE TABLE fine (id INT, company_id INT, date DATE, cost INT); ","SELECT SUM(f.cost) FROM fine f INNER JOIN company c ON f.company_id = c.id WHERE c.region = 'Africa' AND f.date >= DATEADD(quarter, -1, GETDATE());","SELECT SUM(f.cost) FROM fine f JOIN company c ON f.company_id = c.id WHERE c.region = 'Africa' AND f.date >= DATEADD(quarter, -1, GETDATE());",0 Calculate the median age of visitors who attended exhibitions in Berlin.,"CREATE TABLE BerlinExhibitions (id INT, visitorAge INT); ",SELECT AVG(visitorAge) FROM (SELECT visitorAge FROM BerlinExhibitions t1 WHERE (SELECT COUNT(*) FROM BerlinExhibitions t2 WHERE t2.visitorAge <= t1.visitorAge) > (SELECT COUNT(*) / 2 FROM BerlinExhibitions)) t;,SELECT AVG(visitorAge) FROM BerlinExhibitions;,0 "How many head coaches are there for the website, http://www.burleighbulldogs.org/?","CREATE TABLE table_11365528_2 (head_coach VARCHAR, website VARCHAR);","SELECT COUNT(head_coach) FROM table_11365528_2 WHERE website = ""http://www.burleighbulldogs.org/"";","SELECT COUNT(head_coach) FROM table_11365528_2 WHERE website = ""http://www.burleighbulldogs.org/"";",1 Show the names of singers that have more than one song.,"CREATE TABLE song (Singer_ID VARCHAR); CREATE TABLE singer (Name VARCHAR, Singer_ID VARCHAR);",SELECT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name HAVING COUNT(*) > 1;,SELECT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Singer_ID HAVING COUNT(*) > 1;,0 Show the top 3 states with the highest average carbon offsets for renewable energy projects.,"CREATE TABLE renewable_projects (id INT PRIMARY KEY, project_name VARCHAR(255), project_location VARCHAR(255), project_type VARCHAR(255), capacity_mw FLOAT, carbon_offsets INT); CREATE TABLE states (state_code CHAR(2), state_name VARCHAR(255));","SELECT project_location, AVG(carbon_offsets) AS avg_carbon_offsets FROM renewable_projects GROUP BY project_location ORDER BY avg_carbon_offsets DESC LIMIT 3;","SELECT states.state_name, AVG(renewable_projects.carbon_offsets) as avg_carbon_offsets FROM renewable_projects INNER JOIN states ON renewable_projects.state_code = states.state_code GROUP BY states.state_name ORDER BY avg_carbon_offsets DESC LIMIT 3;",0 How many volunteers are needed for each program in the Midwest region?,"CREATE TABLE programs (id INT, name VARCHAR(50), location VARCHAR(50)); CREATE TABLE volunteers (id INT, name VARCHAR(50), program_id INT); ","SELECT p.name, COUNT(v.id) FROM programs p INNER JOIN volunteers v ON p.id = v.program_id WHERE p.location = 'Michigan' OR p.location = 'Illinois' GROUP BY p.name;","SELECT p.name, COUNT(v.id) as num_volunteers FROM programs p JOIN volunteers v ON p.id = v.program_id WHERE p.location = 'Midwest' GROUP BY p.name;",0 "What is the average budget of agencies in cities with a population greater than 500,000 in the European region?","CREATE TABLE City (id INT, name VARCHAR(255), population INT, region VARCHAR(255)); CREATE TABLE Agency (id INT, city_id INT, budget DECIMAL(10,2)); ",SELECT AVG(Agency.budget) FROM Agency JOIN City ON Agency.city_id = City.id WHERE City.region = 'Europe' AND City.population > 500000;,SELECT AVG(Agency.budget) FROM Agency INNER JOIN City ON Agency.city_id = City.id WHERE City.population > 500000 AND City.region = 'Europe';,0 "On what Date was the Score of 3–6, 6–4, 3–6, 6–1, 6–2","CREATE TABLE table_name_76 (date INTEGER, score VARCHAR);","SELECT SUM(date) FROM table_name_76 WHERE score = ""3–6, 6–4, 3–6, 6–1, 6–2"";","SELECT MAX(date) FROM table_name_76 WHERE score = ""3–6, 6–4, 3–6, 6–1, 6–2"";",0 "What is the maximum carbon sequestration, in metric tons, for tropical rainforests in the Amazon in 2020?","CREATE TABLE carbon_sequestration (forest_type VARCHAR(30), year INT, sequestration FLOAT); ",SELECT MAX(sequestration) FROM carbon_sequestration WHERE forest_type = 'Tropical Rainforest - Amazon' AND year = 2020;,SELECT MAX(sequestration) FROM carbon_sequestration WHERE forest_type = 'tropical rainforest' AND year = 2020;,0 Insert a new marine species into the species table,"CREATE TABLE species (id INT, name VARCHAR(255), ocean VARCHAR(255));","INSERT INTO species (id, name, ocean) VALUES (7, 'Green Sea Turtle', 'Atlantic');","INSERT INTO species (id, name, ocean) VALUES (1, 'Sea Turtle', 'Marine');",0 List all defense projects with a start date before 2018-01-01 and an end date after 2022-12-31.,"CREATE TABLE defense_projects (id INT, project_name VARCHAR(255), start_date DATE, end_date DATE); ",SELECT * FROM defense_projects WHERE start_date < '2018-01-01' AND end_date > '2022-12-31';,SELECT * FROM defense_projects WHERE start_date '2018-01-01' AND end_date > '2022-12-31';,0 "List the creation year, name and budget of each department.","CREATE TABLE department (creation VARCHAR, name VARCHAR, budget_in_billions VARCHAR);","SELECT creation, name, budget_in_billions FROM department;","SELECT creation, name, budget_in_billions FROM department;",1 "What is the average transaction fee on the Binance Smart Chain, and what is the maximum fee for transactions with a value greater than 1000?","CREATE TABLE binance_smart_chain_transactions (transaction_id INT, fee DECIMAL(10, 2), value DECIMAL(20, 2)); ","SELECT AVG(fee), MAX(CASE WHEN value > 1000 THEN fee ELSE NULL END) FROM binance_smart_chain_transactions;","SELECT AVG(fee) as avg_fee, MAX(fee) as max_fee FROM binance_smart_chain_transactions WHERE value > 1000;",0 "Who was the opponent on December 17, 1995?","CREATE TABLE table_name_58 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_58 WHERE date = ""december 17, 1995"";","SELECT opponent FROM table_name_58 WHERE date = ""december 17, 1995"";",1 What is the average risk score for all green infrastructure projects in the Asia Pacific region?,"CREATE TABLE infrastructure_projects (project_id INT, project_name TEXT, sector TEXT, region TEXT, risk_score INT); ",SELECT AVG(risk_score) FROM infrastructure_projects WHERE sector = 'Green Infrastructure' AND region = 'Asia Pacific';,SELECT AVG(risk_score) FROM infrastructure_projects WHERE sector = 'Green' AND region = 'Asia Pacific';,0 "Which Rank has a Col (m) of 0, and a Peak of aoraki/mount cook, and a Prominence (m) larger than 3,755?","CREATE TABLE table_name_32 (rank INTEGER, prominence__m_ VARCHAR, col__m_ VARCHAR, peak VARCHAR);","SELECT SUM(rank) FROM table_name_32 WHERE col__m_ = 0 AND peak = ""aoraki/mount cook"" AND prominence__m_ > 3 OFFSET 755;","SELECT AVG(rank) FROM table_name_32 WHERE col__m_ = 0 AND peak = ""aoraki/mount cook"" AND prominence__m_ > 3 755;",0 Who was the Best Male Artist where Bankie Travolta won the Best Male MC?,"CREATE TABLE table_22546460_4 (best_male_artist VARCHAR, best_male_mc VARCHAR);","SELECT best_male_artist FROM table_22546460_4 WHERE best_male_mc = ""Bankie Travolta"";","SELECT best_male_artist FROM table_22546460_4 WHERE best_male_mc = ""Bankie Travolta"";",1 How many refugees were assisted by each organization in Europe in 2018?,"CREATE TABLE refugees (id INT, organization VARCHAR(255), location VARCHAR(255), assist_date DATE, gender VARCHAR(10), age INT); ","SELECT organization, COUNT(DISTINCT id) as number_of_refugees FROM refugees WHERE location = 'Europe' AND YEAR(assist_date) = 2018 GROUP BY organization;","SELECT organization, COUNT(*) FROM refugees WHERE location = 'Europe' AND assist_date BETWEEN '2018-01-01' AND '2018-12-31' GROUP BY organization;",0 "What was the kickoff time for the December 14, 2003 game?","CREATE TABLE table_name_82 (kickoff_time VARCHAR, date VARCHAR);","SELECT kickoff_time FROM table_name_82 WHERE date = ""december 14, 2003"";","SELECT kickoff_time FROM table_name_82 WHERE date = ""december 14, 2003"";",1 What is Friday 4 June if Wednesday 2 June is 20' 11.98 112.071mph?,"CREATE TABLE table_25220821_3 (fri_4_june VARCHAR, wed_2_june VARCHAR);","SELECT fri_4_june FROM table_25220821_3 WHERE wed_2_june = ""20' 11.98 112.071mph"";","SELECT fri_4_june FROM table_25220821_3 WHERE wed_2_june = ""20' 11.98 112.071mph"";",1 "How many security incidents have been reported in each region, and what is the total number of affected assets for each region?","CREATE TABLE security_incidents (id INT, incident_date DATE, region VARCHAR(255), incident_type VARCHAR(255), affected_assets INT); ","SELECT region, COUNT(DISTINCT incident_date) as incidents_count, SUM(affected_assets) as total_affected_assets FROM security_incidents GROUP BY region;","SELECT region, COUNT(*) as incident_count, SUM(affected_assets) as total_affected_assets FROM security_incidents GROUP BY region;",0 What is the maximum energy efficiency score in Texas,"CREATE TABLE energy_efficiency_scores_3 (state VARCHAR(20), score INT); ","SELECT state, MAX(score) FROM energy_efficiency_scores_3 WHERE state = 'Texas';",SELECT MAX(score) FROM energy_efficiency_scores_3 WHERE state = 'Texas';,0 What is the number of dances for the team that averages 20.6?,"CREATE TABLE table_25391981_3 (number_of_dances VARCHAR, average VARCHAR);","SELECT number_of_dances FROM table_25391981_3 WHERE average = ""20.6"";","SELECT number_of_dances FROM table_25391981_3 WHERE average = ""20.6"";",1 What was the total quantity of non-organic silk clothing items manufactured in China in Q1 2022?,"CREATE TABLE manufacturing (item_code VARCHAR(20), item_name VARCHAR(50), category VARCHAR(20), country VARCHAR(50), quantity INT, is_organic BOOLEAN, manufacturing_date DATE);",SELECT SUM(quantity) as total_quantity FROM manufacturing WHERE category = 'clothing' AND country = 'China' AND is_organic = FALSE AND manufacturing_date BETWEEN '2022-01-01' AND '2022-03-31';,SELECT SUM(quantity) FROM manufacturing WHERE category = 'Silk' AND country = 'China' AND is_organic = true AND manufacturing_date BETWEEN '2022-01-01' AND '2022-03-31';,0 "Which eSports players have the most wins in ""League of Legends"" tournaments?","CREATE TABLE Players (PlayerName VARCHAR(255), TournamentWins INT); ",SELECT PlayerName FROM Players ORDER BY TournamentWins DESC LIMIT 2;,"SELECT PlayerName, TournamentWins FROM Players WHERE TournamentWins = (SELECT MAX(TournamentWins) FROM Players WHERE TournamentName = 'League of Legends');",0 What is the total number of building permits issued in Georgia in 2021?,"CREATE TABLE building_permits (permit_id INT, state VARCHAR(2), year INT, type VARCHAR(20)); ",SELECT COUNT(*) FROM building_permits WHERE state = 'GA' AND year = 2021;,SELECT COUNT(*) FROM building_permits WHERE state = 'Georgia' AND year = 2021 AND type = 'Building';,0 List donations from January 2022,"CREATE TABLE Donations( id INT PRIMARY KEY AUTO_INCREMENT, donor_name VARCHAR(255), donation_amount DECIMAL(10, 2), donation_date DATE) INSERT INTO Donations (donor_name, donation_amount, donation_date) VALUES ('Aisha Patel', 500.00, '2022-01-01') INSERT INTO Donations (donor_name, donation_amount, donation_date) VALUES ('Carlos Rivera', 300.50, '2022-02-15') INSERT INTO Donations (donor_name, donation_amount, donation_date) VALUES ('Jasmine Lee', 250.00, '2022-03-30') INSERT INTO Donations (donor_name, donation_amount, donation_date) VALUES ('Kai Nguyen', 700.75, '2022-04-10')",SELECT * FROM Donations WHERE donation_date BETWEEN '2022-01-01' AND '2022-01-31',"SELECT Donations.donor_name, Donations.donation_amount, Donations.donation_date FROM Donations INNER JOIN Donations ON Donations.donor_name = Donations.donor_name INNER JOIN Donations ON Donations.donor_name = Donations.donor_name WHERE Donations.donation_date BETWEEN '2022-01-01' AND '2022-03-30';",0 What is the average temperature of the reactors in the past week?,"CREATE TABLE ReactorTemperatures (ReactorID INT, Temperature DECIMAL(5,2), Timestamp DATETIME);","SELECT AVG(Temperature) FROM ReactorTemperatures WHERE Timestamp BETWEEN DATE_SUB(CURRENT_DATE(), INTERVAL 1 WEEK) AND CURRENT_DATE();","SELECT AVG(Temperature) FROM ReactorTemperatures WHERE Timestamp >= DATEADD(week, -1, GETDATE());",0 "Which artist does the album ""Balls to the Wall"" belong to?","CREATE TABLE ALBUM (ArtistId VARCHAR, Title VARCHAR); CREATE TABLE ARTIST (Name VARCHAR, ArtistId VARCHAR);","SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = ""Balls to the Wall"";","SELECT T1.Name FROM ARTIST AS T1 JOIN ALBUM AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Title = ""Balls to the Wall"";",0 Whose attendance was the highest when the team played Arsenal?,"CREATE TABLE table_name_95 (attendance INTEGER, opponent VARCHAR);","SELECT MAX(attendance) FROM table_name_95 WHERE opponent = ""arsenal"";","SELECT MAX(attendance) FROM table_name_95 WHERE opponent = ""arsenal"";",1 How many digital divide initiatives were launched in 2021 and 2022 combined?,"CREATE TABLE Digital_Divide_Initiatives (Year INT, Initiatives INT); ","SELECT SUM(Initiatives) FROM Digital_Divide_Initiatives WHERE Year IN (2021, 2022);","SELECT SUM(Initiatives) FROM Digital_Divide_Initiatives WHERE Year IN (2021, 2022);",1 Which airport is in Xinjiang province in the city Kuqa?,"CREATE TABLE table_name_45 (airport VARCHAR, province VARCHAR, city VARCHAR);","SELECT airport FROM table_name_45 WHERE province = ""xinjiang"" AND city = ""kuqa"";","SELECT airport FROM table_name_45 WHERE province = ""xinjiang"" AND city = ""kuqa"";",1 What is the grid total for kazuyoshi hoshino with under 71 laps?,"CREATE TABLE table_name_22 (grid INTEGER, driver VARCHAR, laps VARCHAR);","SELECT SUM(grid) FROM table_name_22 WHERE driver = ""kazuyoshi hoshino"" AND laps < 71;","SELECT SUM(grid) FROM table_name_22 WHERE driver = ""kazuyoshi hoshino"" AND laps 71;",0 What was the original title for the film used in nomination of street days?,"CREATE TABLE table_name_91 (original_title VARCHAR, film_title_used_in_nomination VARCHAR);","SELECT original_title FROM table_name_91 WHERE film_title_used_in_nomination = ""street days"";","SELECT original_title FROM table_name_91 WHERE film_title_used_in_nomination = ""street days"";",1 What is the lowest caps for the Club of SBV Excelsior?,"CREATE TABLE table_name_86 (caps INTEGER, club VARCHAR);","SELECT MIN(caps) FROM table_name_86 WHERE club = ""sbv excelsior"";","SELECT MIN(caps) FROM table_name_86 WHERE club = ""sbv excelsior"";",1 What is the minimum and maximum property size in historically underrepresented communities?,"CREATE TABLE Property_Details (Property_ID INT, Community VARCHAR(20), Property_Size INT); ","SELECT MIN(Property_Size), MAX(Property_Size) FROM Property_Details WHERE Community = 'Historically Underrepresented';","SELECT MIN(Property_Size), MAX(Property_Size) FROM Property_Details WHERE Community IN ('Hispanic', 'Hispanic');",0 What is the total time of the vehicle having a navigator of Vandenberg?,"CREATE TABLE table_name_79 (total_time VARCHAR, navigator VARCHAR);","SELECT total_time FROM table_name_79 WHERE navigator = ""vandenberg"";","SELECT total_time FROM table_name_79 WHERE navigator = ""vandenberg"";",1 Delete all records from the 'workforce_development' table where the 'end_date' is before '2022-06-01',"CREATE TABLE workforce_development (id INT PRIMARY KEY, program_name VARCHAR(100), country VARCHAR(50), start_date DATE, end_date DATE);",DELETE FROM workforce_development WHERE end_date < '2022-06-01';,DELETE FROM workforce_development WHERE end_date '2022-06-01';,0 Name the number which has language of other,"CREATE TABLE table_name_73 (number VARCHAR, language VARCHAR);","SELECT number FROM table_name_73 WHERE language = ""other"";","SELECT number FROM table_name_73 WHERE language = ""other"";",1 What is the average salary of employees in each department in the employees table?,"CREATE TABLE employees (id INT PRIMARY KEY, name VARCHAR(50), department VARCHAR(20), salary DECIMAL(10,2)); ","SELECT department, AVG(salary) AS avg_salary FROM employees GROUP BY department;","SELECT department, AVG(salary) FROM employees GROUP BY department;",0 Which Format is listed that has a Region of China?,"CREATE TABLE table_name_93 (format VARCHAR, region VARCHAR);","SELECT format FROM table_name_93 WHERE region = ""china"";","SELECT format FROM table_name_93 WHERE region = ""china"";",1 What is the translation of chetvert?,"CREATE TABLE table_name_81 (translation VARCHAR, unit VARCHAR);","SELECT translation FROM table_name_81 WHERE unit = ""chetvert"";","SELECT translation FROM table_name_81 WHERE unit = ""chetvert"";",1 Which contractors were involved in sustainable building projects in the last 6 months?,"CREATE TABLE contractors (contractor_id INT, contractor_name VARCHAR(50), is_sustainable BOOLEAN); CREATE TABLE projects (project_id INT, project_name VARCHAR(50), contractor_id INT, start_date DATE); ",SELECT contractor_name FROM contractors c JOIN projects p ON c.contractor_id = p.contractor_id WHERE start_date >= (CURRENT_DATE - INTERVAL '6 months') AND c.is_sustainable = true;,"SELECT contractors.contractor_name FROM contractors INNER JOIN projects ON contractors.contractor_id = projects.contractor_id WHERE projects.start_date >= DATEADD(month, -6, GETDATE());",0 What's the average donation amount per donor in H1 2021?,"CREATE TABLE donations (id INT, donor_id INT, donation_amount DECIMAL, donation_date DATE);","SELECT AVG(donation_amount) FROM (SELECT donation_amount, donor_id FROM donations WHERE donation_date >= '2021-01-01' AND donation_date < '2021-07-01' GROUP BY donor_id) AS donations_per_donor;","SELECT donor_id, AVG(donation_amount) as avg_donation FROM donations WHERE donation_date BETWEEN '2021-01-01' AND '2021-06-30' GROUP BY donor_id;",0 Which Tournament has a 1984 of 1r?,CREATE TABLE table_name_26 (tournament VARCHAR);,"SELECT tournament FROM table_name_26 WHERE 1984 = ""1r"";","SELECT tournament FROM table_name_26 WHERE 1984 = ""1r"";",1 "List the number of support programs offered by each department, excluding any duplicate program names.","CREATE TABLE support_programs (program_name VARCHAR(50), department VARCHAR(50)); ","SELECT department, COUNT(DISTINCT program_name) FROM support_programs GROUP BY department;","SELECT department, COUNT(*) FROM support_programs GROUP BY department;",0 "What ""party"" was re-elected in district South Carolina 7?","CREATE TABLE table_2668243_22 (party VARCHAR, result VARCHAR, district VARCHAR);","SELECT party FROM table_2668243_22 WHERE result = ""Re-elected"" AND district = ""South Carolina 7"";","SELECT party FROM table_2668243_22 WHERE result = ""Re-elected"" AND district = ""South Carolina 7"";",1 "What is the average number of workers in mines, grouped by state?","CREATE TABLE mine (id INT, name VARCHAR(255), state VARCHAR(255), workers INT); ","SELECT state, AVG(workers) as avg_workers FROM mine GROUP BY state;","SELECT state, AVG(workers) as avg_workers FROM mine GROUP BY state;",1 "Which excavation sites have produced the most lithic artifacts, and how many were found at each?","CREATE TABLE Sites (SiteID int, SiteName varchar(50)); CREATE TABLE Artifacts (ArtifactID int, SiteID int, ArtifactType varchar(50), Quantity int); ","SELECT Sites.SiteName, SUM(Artifacts.Quantity) as TotalLithics FROM Artifacts INNER JOIN Sites ON Artifacts.SiteID = Sites.SiteID WHERE ArtifactType = 'Lithic' GROUP BY Sites.SiteName ORDER BY TotalLithics DESC;","SELECT Sites.SiteName, SUM(Artifacts.Quantity) as TotalQuantity FROM Sites INNER JOIN Artifacts ON Sites.SiteID = Artifacts.SiteID GROUP BY Sites.SiteName ORDER BY TotalQuantity DESC;",0 What is the minimum number of operational hours for a geostationary satellite?,"CREATE TABLE GeostationarySatellites (id INT, satellite_name VARCHAR(50), operational_hours INT);",SELECT MIN(operational_hours) FROM GeostationarySatellites WHERE operational_hours IS NOT NULL;,SELECT MIN(operational_hours) FROM GeostationarySatellites;,0 "What class has a MHZ frequency under 103.1 licensed in morro bay, california?","CREATE TABLE table_name_4 (class VARCHAR, frequency_mhz VARCHAR, city_of_license VARCHAR);","SELECT class FROM table_name_4 WHERE frequency_mhz < 103.1 AND city_of_license = ""morro bay, california"";","SELECT class FROM table_name_4 WHERE frequency_mhz 103.1 AND city_of_license = ""morro bay, california"";",0 What is the number of protected areas in each country?,"CREATE TABLE ProtectedAreas (country VARCHAR(255), area INT); ","SELECT country, COUNT(*) as num_protected_areas FROM ProtectedAreas GROUP BY country;","SELECT country, COUNT(*) FROM ProtectedAreas GROUP BY country;",0 Which nation is where rider phillip dutton from?,"CREATE TABLE table_18666752_3 (nation VARCHAR, rider VARCHAR);","SELECT nation FROM table_18666752_3 WHERE rider = ""Phillip Dutton"";","SELECT nation FROM table_18666752_3 WHERE rider = ""Phillip Dutton"";",1 What are the special notes for an issue price under 24.95 with an edmonton oilers theme?,"CREATE TABLE table_name_91 (special_notes VARCHAR, issue_price VARCHAR, theme VARCHAR);","SELECT special_notes FROM table_name_91 WHERE issue_price < 24.95 AND theme = ""edmonton oilers"";","SELECT special_notes FROM table_name_91 WHERE issue_price 24.95 AND theme = ""edmonton oilers"";",0 "What is the total sales amount for each sales representative in the North region, ordered by total sales in descending order?","CREATE TABLE sales_representatives (id INT, name TEXT, region TEXT, sales FLOAT); ","SELECT name, SUM(sales) as total_sales FROM sales_representatives WHERE region = 'North' GROUP BY name ORDER BY total_sales DESC;","SELECT name, SUM(sales) as total_sales FROM sales_representatives WHERE region = 'North' GROUP BY name ORDER BY total_sales DESC;",1 What was the term of Bruce Biers Kendall whose hometown is Anchorage?,"CREATE TABLE table_name_6 (term VARCHAR, hometown VARCHAR, name VARCHAR);","SELECT term FROM table_name_6 WHERE hometown = ""anchorage"" AND name = ""bruce biers kendall"";","SELECT term FROM table_name_6 WHERE hometown = ""anchorage"" AND name = ""bruce beers kendall"";",0 What launched has mariner 4 as the spacecraft?,"CREATE TABLE table_name_17 (launched VARCHAR, spacecraft VARCHAR);","SELECT launched FROM table_name_17 WHERE spacecraft = ""mariner 4"";","SELECT launched FROM table_name_17 WHERE spacecraft = ""mariner 4"";",1 How many German satellites are there in the 'Navigation' constellation?,"CREATE TABLE Satellites (satellite_id INT, name VARCHAR(255), country VARCHAR(255), altitude FLOAT, constellation VARCHAR(255)); ",SELECT COUNT(*) FROM Satellites WHERE constellation = 'Navigation' AND country = 'Germany';,SELECT COUNT(*) FROM Satellites WHERE country = 'Germany' AND constellation = 'Navigation';,0 "Who was the opponent on December 18, 2005?","CREATE TABLE table_name_80 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_80 WHERE date = ""december 18, 2005"";","SELECT opponent FROM table_name_80 WHERE date = ""december 18, 2005"";",1 What is the Commissioned date of the ship in NVR Page MCM02?,"CREATE TABLE table_name_29 (commissioned VARCHAR, nvr_page VARCHAR);","SELECT commissioned FROM table_name_29 WHERE nvr_page = ""mcm02"";","SELECT commissioned FROM table_name_29 WHERE nvr_page = ""mcm02"";",1 Which engine is responsible for the USAC Championship Car?,"CREATE TABLE table_name_72 (engine VARCHAR, series VARCHAR);","SELECT engine FROM table_name_72 WHERE series = ""usac championship car"";","SELECT engine FROM table_name_72 WHERE series = ""usac championship car"";",1 What is the RAtt when the comp is 48?,"CREATE TABLE table_name_49 (ratt VARCHAR, comp VARCHAR);","SELECT ratt FROM table_name_49 WHERE comp = ""48"";",SELECT ratt FROM table_name_49 WHERE comp = 48;,0 "Which Floors have a Pinnacle height ft (m) of 995 (303), and an Std Rank larger than 6?","CREATE TABLE table_name_92 (floors INTEGER, pinnacle_height_ft__m_ VARCHAR, std_rank VARCHAR);","SELECT MAX(floors) FROM table_name_92 WHERE pinnacle_height_ft__m_ = ""995 (303)"" AND std_rank > 6;",SELECT SUM(floors) FROM table_name_92 WHERE pinnacle_height_ft__m_ = 995 (303) AND std_rank > 6;,0 When was the ship originally named sachem finally decommissioned?,"CREATE TABLE table_name_94 (final_decommission VARCHAR, original_name VARCHAR);","SELECT final_decommission FROM table_name_94 WHERE original_name = ""sachem"";","SELECT final_decommission FROM table_name_94 WHERE original_name = ""sachem"";",1 what date did the m3 motorsport team compete at winton motor raceway?,"CREATE TABLE table_name_38 (date VARCHAR, team VARCHAR, circuit VARCHAR);","SELECT date FROM table_name_38 WHERE team = ""m3 motorsport"" AND circuit = ""winton motor raceway"";","SELECT date FROM table_name_38 WHERE team = ""m3 motorsport"" AND circuit = ""winton motor raceway"";",1 What university did Steve Hoar attend. ,"CREATE TABLE table_18042409_1 (alma_mater VARCHAR, player VARCHAR);","SELECT alma_mater FROM table_18042409_1 WHERE player = ""Steve Hoar"";","SELECT alma_mater FROM table_18042409_1 WHERE player = ""Steve Hoar"";",1 What is the total number of military equipment maintenance requests in Japan in the last 12 months?,"CREATE TABLE MaintenanceRequests (id INT, country VARCHAR(50), request_date DATE); ","SELECT COUNT(*) FROM MaintenanceRequests WHERE country = 'Japan' AND request_date >= DATE_SUB(CURDATE(), INTERVAL 12 MONTH);","SELECT COUNT(*) FROM MaintenanceRequests WHERE country = 'Japan' AND request_date >= DATEADD(month, -12, GETDATE());",0 What is the average yield of cassava per farmer in Africa?,"CREATE TABLE crop_yields (id INT, farmer_name VARCHAR(255), crop_name VARCHAR(255), yield INT, region VARCHAR(255)); ",SELECT AVG(yield) as avg_cassava_yield FROM crop_yields WHERE crop_name = 'Cassava' AND region = 'Africa';,SELECT AVG(yield) FROM crop_yields WHERE crop_name = 'Cassava' AND region = 'Africa';,0 What is the average salary for employees hired in 2021?,"CREATE TABLE Employees (EmployeeID int, HireDate date, Salary decimal(10,2)); ",SELECT AVG(Salary) FROM Employees WHERE YEAR(HireDate) = 2021;,SELECT AVG(Salary) FROM Employees WHERE HireDate BETWEEN '2021-01-01' AND '2021-12-31';,0 "What is Position, when Round is less than 5, when Nationality is ""Canada"", and when College/Junior/Club Team (League) is ""Saint John Sea Dogs ( QMJHL )""?","CREATE TABLE table_name_30 (position VARCHAR, college_junior_club_team__league_ VARCHAR, round VARCHAR, nationality VARCHAR);","SELECT position FROM table_name_30 WHERE round < 5 AND nationality = ""canada"" AND college_junior_club_team__league_ = ""saint john sea dogs ( qmjhl )"";","SELECT position FROM table_name_30 WHERE round 5 AND nationality = ""canada"" AND college_junior_club_team__league_ = ""saint john sea dogs ( qmjhl )"";",0 "How many draws occured with a record of 10 losses, and 6 wins?","CREATE TABLE table_name_38 (draws VARCHAR, losses VARCHAR, wins VARCHAR);",SELECT COUNT(draws) FROM table_name_38 WHERE losses = 10 AND wins > 6;,SELECT COUNT(draws) FROM table_name_38 WHERE losses = 10 AND wins = 6;,0 List all military equipment maintenance requests for aircraft carriers in the Atlantic region,"CREATE TABLE military_equipment_maintenance (request_id INT, request_date DATE, equipment_type VARCHAR(255), service_branch VARCHAR(255), region VARCHAR(255));",SELECT * FROM military_equipment_maintenance WHERE equipment_type LIKE '%aircraft carrier%' AND region = 'Atlantic';,SELECT * FROM military_equipment_maintenance WHERE service_branch = 'Aircraft Carriers' AND region = 'Atlantic';,0 How many times did Niels Christian Kaldau win the men's single and Pi Hongyan win the women's single in the same year?,"CREATE TABLE table_12275654_1 (year VARCHAR, mens_singles VARCHAR, womens_singles VARCHAR);","SELECT COUNT(year) FROM table_12275654_1 WHERE mens_singles = ""Niels Christian Kaldau"" AND womens_singles = ""Pi Hongyan"";","SELECT COUNT(year) FROM table_12275654_1 WHERE mens_singles = ""Niels Christian Kaldau"" AND womens_singles = ""Pi Hongyan"";",1 In what Round was OL Player Richard Zulys picked?,"CREATE TABLE table_name_92 (round INTEGER, position VARCHAR, player VARCHAR);","SELECT SUM(round) FROM table_name_92 WHERE position = ""ol"" AND player = ""richard zulys"";","SELECT SUM(round) FROM table_name_92 WHERE position = ""ol"" AND player = ""richard zulys"";",1 "What was the Record at the game that had an attendance of 21,191?","CREATE TABLE table_name_22 (record VARCHAR, attendance VARCHAR);","SELECT record FROM table_name_22 WHERE attendance = ""21,191"";","SELECT record FROM table_name_22 WHERE attendance = ""21,191"";",1 "What is the average PUBS 11 value in Mumbai, which has a 07-11 totals less than 1025?","CREATE TABLE table_name_52 (pubs_2011 INTEGER, location VARCHAR, totals_07_11 VARCHAR);","SELECT AVG(pubs_2011) FROM table_name_52 WHERE location = ""mumbai"" AND totals_07_11 < 1025;","SELECT AVG(pubs_2011) FROM table_name_52 WHERE location = ""mumbai"" AND totals_07_11 1025;",0 "Calculate the average years of experience for male educators in the 'educators_union' table, excluding those with less than 1 year of experience.","CREATE TABLE educators_union (id INT, name VARCHAR(50), gender VARCHAR(50), years_experience INT); ",SELECT AVG(years_experience) FROM (SELECT years_experience FROM educators_union WHERE gender = 'Male' AND years_experience > 1) AS subquery;,SELECT AVG(years_experience) FROM educators_union WHERE gender = 'Male' AND years_experience 1;,0 Show the id and name of the employee with maximum salary.,"CREATE TABLE Employee (eid VARCHAR, name VARCHAR, salary VARCHAR);","SELECT eid, name FROM Employee ORDER BY salary DESC LIMIT 1;","SELECT eid, name FROM Employee WHERE salary = (SELECT MAX(salary) FROM Employee);",0 What is the cultural competency score trend for each community health worker in the past year?,"CREATE TABLE cultural_competency_scores (worker_id INT, score INT, score_date DATE); ","SELECT worker_id, score, score_date, LAG(score) OVER (PARTITION BY worker_id ORDER BY score_date) as prev_score FROM cultural_competency_scores;","SELECT worker_id, score, score_date, ROW_NUMBER() OVER (ORDER BY score DESC) as rank FROM cultural_competency_scores WHERE score_date >= DATEADD(year, -1, GETDATE()) GROUP BY worker_id, score;",0 Which sustainable materials are most frequently used by the top 2 fair trade certified suppliers?,"CREATE TABLE fair_trade_suppliers (id INT PRIMARY KEY, name VARCHAR(50), material VARCHAR(50), quantity INT); ","SELECT material, SUM(quantity) as total_quantity FROM fair_trade_suppliers WHERE name IN ('Fair Trade Farms', 'Green Earth') GROUP BY material ORDER BY total_quantity DESC LIMIT 2;","SELECT material, COUNT(*) as count FROM fair_trade_suppliers GROUP BY material ORDER BY count DESC LIMIT 2;",0 "What year was the b n2t axle arrangement, which has a quantity of 31, manufactured?","CREATE TABLE table_name_74 (year_s__of_manufacture VARCHAR, quantity VARCHAR, axle_arrangement___uic__ VARCHAR);","SELECT year_s__of_manufacture FROM table_name_74 WHERE quantity = 31 AND axle_arrangement___uic__ = ""b n2t"";","SELECT year_s__of_manufacture FROM table_name_74 WHERE quantity = 31 AND axle_arrangement___uic__ = ""b n2t"";",1 What is the total biomass of fish in freshwater farms?,"CREATE TABLE freshwater_farms (id INT, species VARCHAR(50), biomass FLOAT); ","SELECT SUM(biomass) FROM freshwater_farms WHERE species IN ('Tilapia', 'Catfish');",SELECT SUM(biomass) FROM freshwater_farms;,0 What is the casting temperature for the alloy with hardness 21?,"CREATE TABLE table_name_98 (casting_at__°c_ VARCHAR, hardness VARCHAR);","SELECT casting_at__°c_ FROM table_name_98 WHERE hardness = ""21"";","SELECT casting_at__°c_ FROM table_name_98 WHERE hardness = ""21"";",1 "After week 8, what was the Attendance on November 1, 1964?","CREATE TABLE table_name_43 (attendance INTEGER, date VARCHAR, week VARCHAR);","SELECT AVG(attendance) FROM table_name_43 WHERE date = ""november 1, 1964"" AND week > 8;","SELECT AVG(attendance) FROM table_name_43 WHERE date = ""november 1, 1964"" AND week > 8;",1 What tournament what held in Cincinnati in 2009?,CREATE TABLE table_name_53 (tournament VARCHAR);,"SELECT 2009 FROM table_name_53 WHERE tournament = ""cincinnati"";","SELECT tournament FROM table_name_53 WHERE 2009 = ""cincinnati"";",0 "What player has defensive back as the position, with a round less than 2?","CREATE TABLE table_name_19 (player VARCHAR, position VARCHAR, round VARCHAR);","SELECT player FROM table_name_19 WHERE position = ""defensive back"" AND round < 2;","SELECT player FROM table_name_19 WHERE position = ""defensive back"" AND round 2;",0 What is the total number of research grants approved for female faculty members in the past 3 years?,"CREATE TABLE grants (id INT, faculty_member_id INT, department VARCHAR(255), year INT, status VARCHAR(255)); CREATE TABLE faculty (id INT, name VARCHAR(255), gender VARCHAR(255)); ","SELECT SUM(status = 'approved') as total_approved FROM grants g JOIN faculty f ON g.faculty_member_id = f.id WHERE g.department IN ('Physics', 'Mathematics', 'Computer Science') AND g.year BETWEEN YEAR(CURDATE()) - 3 AND YEAR(CURDATE()) AND f.gender = 'Female';",SELECT COUNT(*) FROM grants JOIN faculty ON grants.faculty_member_id = faculty.id WHERE faculty.gender = 'Female' AND grants.year BETWEEN YEAR(CURRENT_DATE) - 3 AND YEAR(CURRENT_DATE);,0 What are the names and launch dates of all satellites that were deployed in the same year as the first satellite launched by SpaceTech Inc.?,"CREATE TABLE Satellites (satellite_id INT, name VARCHAR(50), manufacturer VARCHAR(50), launch_date DATE); ","SELECT name, launch_date FROM Satellites WHERE YEAR(launch_date) = YEAR((SELECT launch_date FROM Satellites WHERE manufacturer = 'SpaceTech Inc.' LIMIT 1)) AND manufacturer != 'SpaceTech Inc.'","SELECT name, launch_date FROM Satellites WHERE launch_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE AND manufacturer = 'SpaceTech Inc.';",0 What is the minimum defense diplomacy event budget for each region in the 'defense_diplomacy' table?,"CREATE TABLE defense_diplomacy (id INT, region VARCHAR(50), budget INT);","SELECT region, MIN(budget) FROM defense_diplomacy GROUP BY region;","SELECT region, MIN(budget) FROM defense_diplomacy GROUP BY region;",1 "What is the average ticket price for cultural events in the 'CulturalEvents' table, separated by the type of event?","CREATE TABLE CulturalEvents (EventID INT, EventType VARCHAR(50), EventPrice DECIMAL(5,2)); ","SELECT EventType, AVG(EventPrice) AS AvgEventPrice FROM CulturalEvents GROUP BY EventType;","SELECT EventType, AVG(EventPrice) FROM CulturalEvents GROUP BY EventType;",0 What is the total production budget for all movies and TV shows released before 2010?,"CREATE TABLE Movies (id INT, title VARCHAR(255), release_year INT, budget INT); CREATE TABLE TVShows (id INT, title VARCHAR(255), release_year INT, budget INT);",SELECT SUM(budget) FROM Movies WHERE release_year < 2010 UNION ALL SELECT SUM(budget) FROM TVShows WHERE release_year < 2010;,SELECT SUM(Movies.budget) FROM Movies INNER JOIN TVShows ON Movies.release_year = TVShows.release_year WHERE Movies.release_year 2010;,0 what is the number of starts in 1977,"CREATE TABLE table_19864214_3 (starts VARCHAR, seasons VARCHAR);","SELECT starts FROM table_19864214_3 WHERE seasons = ""1977"";",SELECT COUNT(starts) FROM table_19864214_3 WHERE seasons = 1977;,0 "List all public transportation routes in the city of Philadelphia and their respective budgets for 2024, ordered by budget amount in descending order.","CREATE TABLE routes (city varchar(50), year int, route varchar(50), budget int); ","SELECT route, budget FROM routes WHERE city = 'Philadelphia' AND year = 2024 ORDER BY budget DESC;","SELECT route, budget FROM routes WHERE city = 'Philadelphia' AND year = 2024 ORDER BY budget DESC;",1 What is the ratio of deep-sea species to marine protected areas?,CREATE TABLE deep_sea_species (species_count INT); CREATE TABLE marine_protected_areas (area_count INT); ,"SELECT AVG(species_count::FLOAT / area_count) FROM deep_sea_species, marine_protected_areas;",SELECT (COUNT(DISTINCT deep_sea_species.species_count) / COUNT(DISTINCT marine_protected_areas.area_count)) * 100.0 / COUNT(DISTINCT deep_sea_species.species_count) FROM deep_sea_species INNER JOIN marine_protected_areas ON deep_sea_species.species_count = marine_protected_areas.area_count WHERE deep_sea_species.species_count = marine_protected_areas.area_count = marine_protected_areas.area_count;,0 What is the maximum frequency of content for each genre in the media_content table?,"CREATE TABLE media_content (id INT, genre VARCHAR(50), frequency INT); ","SELECT genre, MAX(frequency) FROM media_content GROUP BY genre;","SELECT genre, MAX(frequency) FROM media_content GROUP BY genre;",1 Identify marine species at risk in marine protected areas.,"CREATE TABLE marine_species (species_id INT, name VARCHAR(255), status VARCHAR(255)); CREATE TABLE area_species (area_id INT, species_id INT); CREATE TABLE marine_protected_areas (area_id INT, name VARCHAR(255), depth FLOAT);","SELECT s.name AS species_name, mpa.name AS protected_area FROM marine_species s JOIN area_species a ON s.species_id = a.species_id JOIN marine_protected_areas mpa ON a.area_id = mpa.area_id WHERE s.status = 'At Risk';",SELECT marine_species.name FROM marine_species INNER JOIN area_species ON marine_species.species_id = area_species.species_id INNER JOIN marine_protected_areas ON area_species.area_id = marine_protected_areas.area_id;,0 Delete the record with the highest donation amount for 'San Francisco'.,"CREATE TABLE DonorCities (City VARCHAR(50), Population INT); CREATE TABLE Donations (DonationID INT, City VARCHAR(50), DonationAmount DECIMAL(10,2)); ",DELETE FROM Donations WHERE DonationID = (SELECT DonationID FROM Donations WHERE City = 'San Francisco' ORDER BY DonationAmount DESC LIMIT 1);,DELETE FROM Donations WHERE City = 'San Francisco' ORDER BY DonationAmount DESC LIMIT 1;,0 Where was the game played that had a record of 19-6?,"CREATE TABLE table_18904831_7 (location VARCHAR, record VARCHAR);","SELECT location FROM table_18904831_7 WHERE record = ""19-6"";","SELECT location FROM table_18904831_7 WHERE record = ""19-6"";",1 Find the number of sustainable tourism activities in each country.,"CREATE TABLE SustainableTourismActivities (activity_id INT, activity_name TEXT, country TEXT, local_economic_impact FLOAT); ","SELECT country, COUNT(*) FROM SustainableTourismActivities GROUP BY country;","SELECT country, COUNT(*) FROM SustainableTourismActivities GROUP BY country;",1 Which week has a record of 5-7-1?,"CREATE TABLE table_name_58 (week VARCHAR, record VARCHAR);","SELECT week FROM table_name_58 WHERE record = ""5-7-1"";","SELECT week FROM table_name_58 WHERE record = ""5-7-1"";",1 What is the total number of climate adaptation projects in the 'africa' region?,"CREATE TABLE adaptation_projects (region VARCHAR(20), num_projects INT); ","SELECT region, SUM(num_projects) FROM adaptation_projects WHERE region = 'africa' GROUP BY region;",SELECT SUM(num_projects) FROM adaptation_projects WHERE region = 'africa';,0 What is the average temperature for each month in the 'weather' table?,"CREATE TABLE weather (location VARCHAR(50), temperature INT, record_date DATE); ","SELECT EXTRACT(MONTH FROM record_date) AS month, AVG(temperature) AS avg_temp FROM weather GROUP BY month;","SELECT EXTRACT(MONTH FROM record_date) AS month, AVG(temperature) AS avg_temperature FROM weather GROUP BY month;",0 How many events were attended by each age group in H1 2022?,"CREATE TABLE EventAudience (event_id INT, attendee_age INT, event_date DATE); ","SELECT FLOOR(attendee_age / 10) * 10 AS age_group, COUNT(*) AS event_attendance FROM EventAudience WHERE event_date BETWEEN '2022-01-01' AND '2022-06-30' GROUP BY age_group;","SELECT attendee_age, COUNT(*) FROM EventAudience WHERE event_date BETWEEN '2022-01-01' AND '2022-06-30' GROUP BY attendee_age;",0 what's the salmonella with shigella being ipgc,"CREATE TABLE table_10321124_1 (salmonella VARCHAR, shigella VARCHAR);","SELECT salmonella FROM table_10321124_1 WHERE shigella = ""IpgC"";","SELECT salmonella FROM table_10321124_1 WHERE shigella = ""IPGC"";",0 what is the party for district ohio 11?,"CREATE TABLE table_1341598_36 (party VARCHAR, district VARCHAR);","SELECT party FROM table_1341598_36 WHERE district = ""Ohio 11"";","SELECT party FROM table_1341598_36 WHERE district = ""Ohio 11"";",1 "What is the smallest bronze with a Gold smaller than 3, and a Silver larger than 1, and a Rank of 6, and a Nation of hungary?","CREATE TABLE table_name_36 (bronze INTEGER, nation VARCHAR, rank VARCHAR, gold VARCHAR, silver VARCHAR);","SELECT MIN(bronze) FROM table_name_36 WHERE gold < 3 AND silver > 1 AND rank = 6 AND nation = ""hungary"";","SELECT MIN(bronze) FROM table_name_36 WHERE gold 3 AND silver > 1 AND rank = 6 AND nation = ""hungary"";",0 Which water treatment plants are located in drought-prone areas with a drought status of 'extreme'?,"CREATE TABLE water_plants (id INT, name VARCHAR(255), lat FLOAT, long FLOAT); CREATE TABLE drought_status (id INT, region VARCHAR(255), status VARCHAR(255)); ","SELECT w.name, ds.status FROM water_plants w JOIN drought_status ds ON ST_DWithin(ST_SetSRID(ST_MakePoint(w.long, w.lat), 4326), ST_SetSRID(ST_MakePoint(ds.long, ds.lat), 4326), 100000) WHERE ds.status = 'extreme';",SELECT water_plants.name FROM water_plants INNER JOIN drought_status ON water_plants.id = drought_status.region WHERE drought_status.status = 'extreme';,0 "What is the average Matches, when Round is Third Qualifying Round?","CREATE TABLE table_name_81 (matches INTEGER, round VARCHAR);","SELECT AVG(matches) FROM table_name_81 WHERE round = ""third qualifying round"";","SELECT AVG(matches) FROM table_name_81 WHERE round = ""third qualifying round"";",1 What is the away team score with geelong home team?,"CREATE TABLE table_name_68 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team AS score FROM table_name_68 WHERE home_team = ""geelong"";","SELECT away_team AS score FROM table_name_68 WHERE home_team = ""geelong"";",1 Who was the stage winner when the start of stage is Cauterets?,"CREATE TABLE table_name_38 (stage VARCHAR, start_of_stage VARCHAR);","SELECT stage AS winner FROM table_name_38 WHERE start_of_stage = ""cauterets"";","SELECT stage FROM table_name_38 WHERE start_of_stage = ""caucaterets"";",0 What is the total billing amount for cases with a duration of less than or equal to 30 days?,"CREATE TABLE Cases (CaseID int, AttorneyID int, DurationDays int); CREATE TABLE CaseBilling (CaseID int, BillingAmount decimal(10,2)); ",SELECT SUM(BillingAmount) AS TotalBillingAmount FROM CaseBilling JOIN Cases ON CaseBilling.CaseID = Cases.CaseID WHERE DurationDays <= 30;,SELECT SUM(CaseBilling.BillingAmount) FROM Cases INNER JOIN CaseBilling ON Cases.CaseID = CaseBilling.CaseID WHERE Cases.DurationDays 30;,0 What is the number of climate mitigation projects in South America funded by the Green Climate Fund?,"CREATE TABLE green_climate_fund_2 (fund_id INT, project_name VARCHAR(100), country VARCHAR(50), sector VARCHAR(50), mitigation_flag BOOLEAN); ",SELECT COUNT(*) FROM green_climate_fund_2 WHERE country LIKE '%%south%am%' AND mitigation_flag = TRUE;,"SELECT COUNT(*) FROM green_climate_fund_2 WHERE country IN ('Brazil', 'Argentina', 'Colombia') AND mitigation_flag = true;",0 "What is the distribution of mental health scores among students, grouped by gender and grade level?","CREATE TABLE students_mental_health (student_id INT, student_gender VARCHAR(50), grade_level INT, mental_health_score INT); ","SELECT smh.grade_level, smh.student_gender, AVG(smh.mental_health_score) as avg_mental_health_score FROM students_mental_health smh GROUP BY smh.grade_level, smh.student_gender;","SELECT student_gender, grade_level, AVG(mental_health_score) as avg_mental_health_score FROM students_mental_health GROUP BY student_gender, grade_level;",0 Tell me the Hindu with Jewish of source: uk 2001 census,"CREATE TABLE table_name_87 (hindu VARCHAR, jewish VARCHAR);","SELECT hindu FROM table_name_87 WHERE jewish = ""source: uk 2001 census"";","SELECT Hindu FROM table_name_87 WHERE jewish = ""source: uk 2001 census"";",0 What is the home team score at windy hill?,"CREATE TABLE table_name_40 (home_team VARCHAR, venue VARCHAR);","SELECT home_team AS score FROM table_name_40 WHERE venue = ""windy hill"";","SELECT home_team AS score FROM table_name_40 WHERE venue = ""windy hill"";",1 What did the tournament that got an A in 1945 get in 1949?,CREATE TABLE table_name_22 (Id VARCHAR);,"SELECT 1949 FROM table_name_22 WHERE 1945 = ""a"";","SELECT 1949 FROM table_name_22 WHERE 1945 = ""a"";",1 What Album has a Year that's larger than 2001?,"CREATE TABLE table_name_39 (album VARCHAR, year INTEGER);",SELECT album FROM table_name_39 WHERE year > 2001;,SELECT album FROM table_name_39 WHERE year > 2001;,1 With Olympic Bronze Medalist as the total what are the score points?,"CREATE TABLE table_name_65 (score_points VARCHAR, total VARCHAR);","SELECT score_points FROM table_name_65 WHERE total = ""olympic bronze medalist"";","SELECT score_points FROM table_name_65 WHERE total = ""olympic bronze medalist"";",1 what is the highest fa cup goals when the total goals is more than 3 and total apps is 31 (1)?,"CREATE TABLE table_name_75 (fa_cup_goals INTEGER, total_goals VARCHAR, total_apps VARCHAR);","SELECT MAX(fa_cup_goals) FROM table_name_75 WHERE total_goals > 3 AND total_apps = ""31 (1)"";","SELECT MAX(fa_cup_goals) FROM table_name_75 WHERE total_goals > 3 AND total_apps = ""31 (1)"";",1 List all climate mitigation initiatives in Oceania that were unsuccessful.,"CREATE TABLE climate_mitigation (region VARCHAR(255), initiative_status VARCHAR(255)); ",SELECT * FROM climate_mitigation WHERE region = 'Oceania' AND initiative_status = 'unsuccessful';,SELECT initiative_status FROM climate_mitigation WHERE region = 'Oceania' AND initiative_status = 'Unsuccessful';,0 What Position has a Season larger than 2000 with a Level of Tier 3?,"CREATE TABLE table_name_21 (position VARCHAR, season VARCHAR, level VARCHAR);","SELECT position FROM table_name_21 WHERE season > 2000 AND level = ""tier 3"";","SELECT position FROM table_name_21 WHERE season > 2000 AND level = ""tier 3"";",1 The event WC Rio De Janeiro with a total of 16 has what as rank points?,"CREATE TABLE table_name_85 (rank_points VARCHAR, event VARCHAR, total VARCHAR);","SELECT rank_points FROM table_name_85 WHERE event = ""wc rio de janeiro"" AND total = ""16"";","SELECT rank_points FROM table_name_85 WHERE event = ""wc rio de janeiro"" AND total = 16;",0 "What is the id, name and IATA code of the airport that had most number of flights?","CREATE TABLE airport (id VARCHAR, name VARCHAR, IATA VARCHAR); CREATE TABLE flight (id VARCHAR, airport_id VARCHAR);","SELECT T1.id, T1.name, T1.IATA FROM airport AS T1 JOIN flight AS T2 ON T1.id = T2.airport_id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1;","SELECT T1.id, T1.name, T1.IATA FROM airport AS T1 JOIN flight AS T2 ON T1.id = T2.airport_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1;",0 What is the total revenue and player count for each game in the 'Adventure' genre?,"CREATE TABLE Games (Id INT, Name VARCHAR(100), Genre VARCHAR(50), Sales INT, Players INT); ","SELECT Genre, SUM(Sales) AS Total_Revenue, COUNT(*) AS Player_Count FROM Games WHERE Genre = 'Adventure' GROUP BY Genre;","SELECT Name, SUM(Sales) as Total_Revenue, SUM(Players) as Total_Players FROM Games WHERE Genre = 'Adventure' GROUP BY Name;",0 What match had 240 points for?,"CREATE TABLE table_name_81 (matches VARCHAR, points_for VARCHAR);","SELECT matches FROM table_name_81 WHERE points_for = ""240"";","SELECT matches FROM table_name_81 WHERE points_for = ""240"";",1 What is the total number of heritage sites in the Oceania region?,"CREATE TABLE HeritageSites (SiteID INT, SiteName VARCHAR(100), Location VARCHAR(100), Visits INT); ",SELECT COUNT(*) FROM HeritageSites WHERE Location LIKE 'Oceania%';,SELECT COUNT(*) FROM HeritageSites WHERE Location = 'Oceania';,0 What is Madeleine Dupont's shot pct.?,"CREATE TABLE table_name_96 (shot_pct VARCHAR, skip VARCHAR);","SELECT shot_pct FROM table_name_96 WHERE skip = ""madeleine dupont"";","SELECT shot_pct FROM table_name_96 WHERE skip = ""madeleine dupont"";",1 "How many traditional arts centers exist in the Asia-Pacific region, broken down by country?","CREATE TABLE Traditional_Arts_Centers (Center_Name VARCHAR(50), Country VARCHAR(50), Type VARCHAR(50)); ","SELECT Country, COUNT(*) FROM Traditional_Arts_Centers WHERE Country IN ('Indonesia', 'Thailand', 'Australia') GROUP BY Country;","SELECT Country, COUNT(*) FROM Traditional_Arts_Centers WHERE Type = 'Traditional Arts' GROUP BY Country;",0 Which salesperson has sold the most timber in total?,"CREATE TABLE salesperson (salesperson_id INT, name TEXT, region TEXT); CREATE TABLE timber_sales (sales_id INT, salesperson_id INT, volume REAL, sale_date DATE); ","SELECT salesperson_id, SUM(volume) as total_volume FROM timber_sales JOIN salesperson ON timber_sales.salesperson_id = salesperson.salesperson_id GROUP BY salesperson_id ORDER BY total_volume DESC LIMIT 1;","SELECT salesperson.name, SUM(t.volume) as total_volume FROM salesperson INNER JOIN timber_sales ON salesperson.salesperson_id = timber_sales.salesperson_id GROUP BY salesperson.name ORDER BY total_volume DESC LIMIT 1;",0 How many laps were in 1958?,"CREATE TABLE table_name_80 (laps INTEGER, year VARCHAR);","SELECT SUM(laps) FROM table_name_80 WHERE year = ""1958"";",SELECT SUM(laps) FROM table_name_80 WHERE year = 1958;,0 Name the total number of awardees for best screenplay,"CREATE TABLE table_24446718_3 (awardee_s_ VARCHAR, name_of_award VARCHAR);","SELECT COUNT(awardee_s_) FROM table_24446718_3 WHERE name_of_award = ""Best Screenplay"";","SELECT COUNT(awardee_s_) FROM table_24446718_3 WHERE name_of_award = ""Best Screenplay"";",1 What is the average size (in hectares) of all indigenous food system farms in the 'indigenous_food' schema?,"CREATE SCHEMA if not exists indigenous_food; use indigenous_food; CREATE TABLE indigenous_farms (id INT, name TEXT, size_ha FLOAT, location TEXT); ",SELECT AVG(size_ha) FROM indigenous_food.indigenous_farms;,SELECT AVG(size_ha) FROM indigenous_farms;,0 Which Surface had an Opponent of fernanda hermenegildo monika kochanova?,"CREATE TABLE table_name_57 (surface VARCHAR, opponent VARCHAR);","SELECT surface FROM table_name_57 WHERE opponent = ""fernanda hermenegildo monika kochanova"";","SELECT surface FROM table_name_57 WHERE opponent = ""fernanda hermenegildo monika kochanova"";",1 Which season has q145 as its format?,"CREATE TABLE table_name_63 (season__number INTEGER, format__number VARCHAR);","SELECT MIN(season__number) FROM table_name_63 WHERE format__number = ""q145"";","SELECT SUM(season__number) FROM table_name_63 WHERE format__number = ""q145"";",0 What are the most wins in 1971 in 250cc class?,"CREATE TABLE table_name_11 (wins INTEGER, class VARCHAR, year VARCHAR);","SELECT MAX(wins) FROM table_name_11 WHERE class = ""250cc"" AND year = 1971;","SELECT MAX(wins) FROM table_name_11 WHERE class = ""250cc"" AND year = 1971;",1 Display the total sales revenue for each product category in descending order,"CREATE TABLE sales (product_type VARCHAR(20), revenue DECIMAL(10,2)); ","SELECT product_type, SUM(revenue) AS total_revenue FROM sales GROUP BY product_type ORDER BY total_revenue DESC;","SELECT product_type, SUM(revenue) as total_revenue FROM sales GROUP BY product_type ORDER BY total_revenue DESC;",0 What was the status of rank 20?,"CREATE TABLE table_24431348_18 (status VARCHAR, rank VARCHAR);",SELECT status FROM table_24431348_18 WHERE rank = 20;,SELECT status FROM table_24431348_18 WHERE rank = 20;,1 Which actor from Serbia was nominated for best actor in a supporting role?,"CREATE TABLE table_10236830_4 (actors_name VARCHAR, nomination VARCHAR, country VARCHAR);","SELECT actors_name FROM table_10236830_4 WHERE nomination = ""Best Actor in a Supporting Role"" AND country = ""Serbia"";","SELECT actors_name FROM table_10236830_4 WHERE nomination = ""Best Actor in a Supporting Role"" AND country = ""Serbia"";",1 How many artworks were sold by each artist in 2020?,"CREATE TABLE ArtWorkSales (artworkID INT, artistID INT, saleDate DATE); CREATE TABLE Artists (artistID INT, artistName VARCHAR(50));","SELECT a.artistName, COUNT(*) as artwork_count FROM ArtWorkSales aws JOIN Artists a ON aws.artistID = a.artistID WHERE YEAR(aws.saleDate) = 2020 GROUP BY a.artistName;","SELECT Artists.artistName, COUNT(ArtWorkSales.artworkID) FROM ArtWorkSales INNER JOIN Artists ON ArtWorkSales.artistID = Artists.artistID WHERE YEAR(ArtWorkSales.saleDate) = 2020 GROUP BY Artists.artistName;",0 How many unique vehicle IDs were used for public transportation services in Moscow during the month of July?,"CREATE TABLE if not exists moscow_public_transport_vehicles (id INT, vehicle_id INT, vehicle_type VARCHAR(20), timestamp TIMESTAMP);",SELECT COUNT(DISTINCT vehicle_id) FROM moscow_public_transport_vehicles WHERE EXTRACT(MONTH FROM timestamp) = 7;,SELECT COUNT(DISTINCT vehicle_id) FROM moscow_public_transport_vehicles WHERE timestamp BETWEEN '2022-07-01' AND '2022-07-31';,0 What is the percentage of crop yield by country in 'crop_distribution' table?,"CREATE TABLE crop_distribution (country VARCHAR(50), crop VARCHAR(50), yield INT); ","SELECT country, crop, ROUND(100.0 * yield / SUM(yield) OVER (PARTITION BY crop), 2) as yield_percentage FROM crop_distribution;","SELECT country, 100.0 * SUM(yield) / (SELECT SUM(yield) FROM crop_distribution) as percentage FROM crop_distribution GROUP BY country;",0 How big was the crowd of away team Richmond?,"CREATE TABLE table_name_34 (crowd VARCHAR, away_team VARCHAR);","SELECT crowd FROM table_name_34 WHERE away_team = ""richmond"";","SELECT crowd FROM table_name_34 WHERE away_team = ""richmond"";",1 Show the number of events and total attendees by month and year,"CREATE TABLE events_attendees_3 (event_id INT, attendee_id INT, event_date DATE); ","SELECT YEAR(event_date) AS year, MONTH(event_date) AS month, COUNT(DISTINCT event_id) AS num_events, COUNT(DISTINCT attendee_id) AS num_attendees FROM events_attendees_3 GROUP BY year, month;","SELECT EXTRACT(MONTH FROM event_date) AS month, EXTRACT(YEAR FROM event_date) AS year, COUNT(*) AS event_count, SUM(attendees) AS total_attendees FROM events_attendees_3 GROUP BY month, year;",0 Which strains had the highest and lowest average price per gram sold at a specific dispensary in Washington in Q1 2022?,"CREATE TABLE Dispensaries (id INT, name TEXT, state TEXT); CREATE TABLE Sales (dispid INT, date DATE, strain TEXT, price DECIMAL(10,2)); ","SELECT s.strain, AVG(s.price) as avg_price_per_gram, ROW_NUMBER() OVER (ORDER BY AVG(s.price) DESC) as rank FROM Dispensaries d JOIN Sales s ON d.id = s.dispid WHERE d.state = 'Washington' AND QUARTER(s.date) = 1 GROUP BY s.strain HAVING COUNT(s.strain) > 1 ORDER BY rank;","SELECT strain, AVG(price) as avg_price FROM Sales JOIN Dispensaries ON Sales.dispid = Dispensaries.id WHERE Dispensaries.state = 'Washington' AND QUARTER(Sales.date) = 1 AND YEAR(Sales.date) = 2022 GROUP BY strain ORDER BY avg_price DESC LIMIT 1;",0 What is the waste generation amount for each country in 'waste_generation'?,"CREATE TABLE waste_generation (country VARCHAR(50), year INT, population INT, waste_amount INT);","SELECT country, SUM(waste_amount) as total_waste_amount FROM waste_generation GROUP BY country;","SELECT country, waste_amount FROM waste_generation GROUP BY country;",0 How many lanes had a rank smaller than 4 and a time of 2:01.51?,"CREATE TABLE table_name_88 (lane VARCHAR, time VARCHAR, rank VARCHAR);","SELECT COUNT(lane) FROM table_name_88 WHERE time = ""2:01.51"" AND rank < 4;","SELECT COUNT(lane) FROM table_name_88 WHERE time = ""2:01.51"" AND rank 4;",0 On what date was game 2 played?,"CREATE TABLE table_name_98 (date VARCHAR, game VARCHAR);","SELECT date FROM table_name_98 WHERE game = ""game 2"";",SELECT date FROM table_name_98 WHERE game = 2;,0 "Which name has a Roll larger than 297, and Years of 7–13?","CREATE TABLE table_name_1 (name VARCHAR, roll VARCHAR, years VARCHAR);","SELECT name FROM table_name_1 WHERE roll > 297 AND years = ""7–13"";","SELECT name FROM table_name_1 WHERE roll > 297 AND years = ""7–13"";",1 What is the highest and lowest rainfall recorded in farms?,"CREATE TABLE farm (id INT PRIMARY KEY, name VARCHAR(50), avg_rainfall DECIMAL(5,2)); ","SELECT MIN(f.avg_rainfall) AS lowest_rainfall, MAX(f.avg_rainfall) AS highest_rainfall FROM farm f;","SELECT MAX(avg_rainfall) AS max_rainfall, MIN(avg_rainfall) AS min_rainfall FROM farm;",0 How many community policing events were held in the Los Angeles County in the year 2020?,"CREATE TABLE community_policing (id INT, county VARCHAR(20), year INT, events INT);",SELECT COUNT(*) FROM community_policing WHERE county = 'Los Angeles' AND year = 2020;,SELECT SUM(events) FROM community_policing WHERE county = 'Los Angeles' AND year = 2020;,0 "What is Reserved Instruments, when Conduct of Litigation is Yes, and when Probate Activities is Yes?","CREATE TABLE table_name_19 (reserved_instruments VARCHAR, conduct_of_litigation VARCHAR, probate_activities VARCHAR);","SELECT reserved_instruments FROM table_name_19 WHERE conduct_of_litigation = ""yes"" AND probate_activities = ""yes"";","SELECT reserved_instruments FROM table_name_19 WHERE conduct_of_litigation = ""yes"" AND probate_activities = ""yes"";",1 On what date was there a record of 76-72?,"CREATE TABLE table_name_6 (date VARCHAR, record VARCHAR);","SELECT date FROM table_name_6 WHERE record = ""76-72"";","SELECT date FROM table_name_6 WHERE record = ""76-72"";",1 What is the sum of the appearances at the league cup for the defender who had less than 10 appearances at the UEFA cup?,"CREATE TABLE table_name_29 (league_cup INTEGER, position VARCHAR, UEfa_cup VARCHAR);","SELECT SUM(league_cup) FROM table_name_29 WHERE position = ""defender"" AND UEfa_cup < 10;","SELECT SUM(league_cup) FROM table_name_29 WHERE position = ""defender"" AND UEfa_cup 10;",0 Calculate the total amount of CO2 emissions generated from waste management activities in the European Union.,"CREATE TABLE CO2Emissions (Region VARCHAR(50), Emissions INT); ",SELECT Emissions FROM CO2Emissions WHERE Region = 'European Union';,SELECT SUM(Emissions) FROM CO2Emissions WHERE Region = 'European Union';,0 What is the percentage of ethical fashion products made from sustainable materials in Europe?,"CREATE TABLE ethical_fashion (product_id INT, product_type VARCHAR(50), material_type VARCHAR(50), sustainable BOOLEAN); ",SELECT COUNT(*) * 100.0 / (SELECT COUNT(*) FROM ethical_fashion WHERE product_type = 'Ethical Fashion') FROM ethical_fashion WHERE product_type = 'Ethical Fashion' AND sustainable = true;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM ethical_fashion WHERE sustainable = true)) AS percentage FROM ethical_fashion WHERE sustainable = true AND country = 'Europe';,0 What is the total revenue of fair labor practice brands in each region?,"CREATE TABLE Brands (brand_id INT, brand_name VARCHAR(50), ethical BOOLEAN); CREATE TABLE Sales (sale_id INT, brand_id INT, revenue DECIMAL(10,2)); CREATE TABLE Regions (region_id INT, region VARCHAR(50)); CREATE TABLE BrandRegions (brand_id INT, region_id INT);","SELECT R.region, SUM(S.revenue) FROM Brands B INNER JOIN Sales S ON B.brand_id = S.brand_id INNER JOIN BrandRegions BR ON B.brand_id = BR.brand_id INNER JOIN Regions R ON BR.region_id = R.region_id WHERE B.ethical = TRUE GROUP BY R.region;","SELECT r.region, SUM(s.revenue) as total_revenue FROM Brands b JOIN Sales s ON b.brand_id = s.brand_id JOIN Regions r ON s.region_id = r.region_id JOIN BrandRegions b ON s.brand_id = b.brand_id WHERE b.ethical = true GROUP BY r.region;",0 What Nationality had a Pick # of 117?,"CREATE TABLE table_name_91 (nationality VARCHAR, pick__number VARCHAR);","SELECT nationality FROM table_name_91 WHERE pick__number = ""117"";",SELECT nationality FROM table_name_91 WHERE pick__number = 117;,0 What are the top 5 average finishes equalling 40.3?,"CREATE TABLE table_2182562_1 (top_5 VARCHAR, avg_finish VARCHAR);","SELECT top_5 FROM table_2182562_1 WHERE avg_finish = ""40.3"";","SELECT top_5 FROM table_2182562_1 WHERE avg_finish = ""40.3"";",1 "Who was the opponent in the final in which the court surface was hard and the score was 6–3, 3–6, 7–5?","CREATE TABLE table_name_89 (opponent_in_the_final VARCHAR, surface VARCHAR, score VARCHAR);","SELECT opponent_in_the_final FROM table_name_89 WHERE surface = ""hard"" AND score = ""6–3, 3–6, 7–5"";","SELECT opponent_in_the_final FROM table_name_89 WHERE surface = ""hard"" AND score = ""6–3, 3–6, 7–5"";",1 Tell me who was the opponent on May 6,"CREATE TABLE table_name_33 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_33 WHERE date = ""may 6"";","SELECT opponent FROM table_name_33 WHERE date = ""may 6"";",1 When the elevator was Innocent IV what was the nationality?,"CREATE TABLE table_name_98 (nationality VARCHAR, elevator VARCHAR);","SELECT nationality FROM table_name_98 WHERE elevator = ""innocent iv"";","SELECT nationality FROM table_name_98 WHERE elevator = ""innocent iv"";",1 How many heritage sites are located in each country?,"CREATE TABLE heritage_sites_by_country(id INT, country TEXT, site_count INT); ","SELECT country, site_count FROM heritage_sites_by_country;","SELECT country, SUM(site_count) FROM heritage_sites_by_country GROUP BY country;",0 How many students with visual impairments have attended workshops in each month of the last year?,"CREATE TABLE Students (StudentID INT, Disability VARCHAR(50), Name VARCHAR(50)); CREATE TABLE Workshops (WorkshopID INT, Name VARCHAR(50), Date DATE, Description TEXT); CREATE TABLE StudentWorkshops (StudentID INT, WorkshopID INT);","SELECT MONTH(w.Date) as Month, COUNT(DISTINCT sw.StudentID) as StudentCount FROM Students s JOIN StudentWorkshops sw ON s.StudentID = sw.StudentID JOIN Workshops w ON sw.WorkshopID = w.WorkshopID WHERE s.Disability = 'visual impairment' AND w.Date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE GROUP BY Month;","SELECT EXTRACT(MONTH FROM Date) AS Month, COUNT(DISTINCT Students.StudentID) AS NumberOfStudents FROM Students INNER JOIN StudentWorkshops ON Students.StudentID = StudentWorkshops.StudentID INNER JOIN Workshops ON StudentWorkshops.WorkshopID = Workshops.WorkshopID WHERE Students.Disability = 'Visual Impairment' AND Workshops.Date >= DATEADD(year, -1, GETDATE()) GROUP BY Month;",0 Who are the top 3 artists by number of streams in the hip-hop genre on the music streaming platform?,"CREATE TABLE music_platform (id INT, artist VARCHAR(100), genre VARCHAR(50), streams INT);","SELECT artist, SUM(streams) as total_streams FROM music_platform WHERE genre = 'hip-hop' GROUP BY artist ORDER BY total_streams DESC LIMIT 3;","SELECT artist, SUM(streams) as total_streams FROM music_platform WHERE genre = 'hip-hop' GROUP BY artist ORDER BY total_streams DESC LIMIT 3;",1 What catalogue is the song It's Now or Never?,"CREATE TABLE table_name_86 (catalogue VARCHAR, song_title VARCHAR);","SELECT catalogue FROM table_name_86 WHERE song_title = ""it's now or never"";","SELECT catalogue FROM table_name_86 WHERE song_title = ""it's now or never"";",1 Find the average billing amount for cases in the 'Eastern' region.,"CREATE TABLE cases (id INT, region VARCHAR(10), billing_amount INT); ",SELECT AVG(billing_amount) FROM cases WHERE region = 'Eastern';,SELECT AVG(billing_amount) FROM cases WHERE region = 'Eastern';,1 What is the average distance covered by each athlete in the 2022 decathlon event?,"CREATE TABLE decathlon_results (athlete_id INT, athlete_name VARCHAR(50), distance_covered INT); ","SELECT athlete_name, AVG(distance_covered) as avg_distance_covered FROM decathlon_results GROUP BY athlete_name;","SELECT athlete_name, AVG(distance_covered) FROM decathlon_results GROUP BY athlete_name;",0 Who was the losing team with a total of 24 when the winning team was Sydney Roosters?,"CREATE TABLE table_name_44 (losing_team VARCHAR, total VARCHAR, winning_team VARCHAR);","SELECT losing_team FROM table_name_44 WHERE total = 24 AND winning_team = ""sydney roosters"";","SELECT losing_team FROM table_name_44 WHERE total = 24 AND winning_team = ""sydney roosters"";",1 What is the total revenue generated from sales of ethically-sourced products in stores located in the UK?,"CREATE TABLE sales (sale_id INT, product_id INT, sale_price DECIMAL(5,2), is_ethically_sourced BOOLEAN, store_location VARCHAR(50)); CREATE TABLE products (product_id INT, product_name VARCHAR(50), price DECIMAL(5,2), is_ethically_sourced BOOLEAN); ",SELECT SUM(sale_price) FROM sales JOIN products ON sales.product_id = products.product_id WHERE is_ethically_sourced = TRUE AND store_location = 'UK';,SELECT SUM(sale_price) FROM sales JOIN products ON sales.product_id = products.product_id WHERE is_ethically_sourced = true AND store_location = 'UK';,0 "Calculate the daily gas production for each well, for the month of January","CREATE TABLE wells (well_id INT, daily_gas_production FLOAT); ","SELECT well_id, daily_gas_production FROM wells WHERE daily_gas_production IS NOT NULL AND daily_gas_production <> 0;","SELECT well_id, daily_gas_production FROM wells WHERE EXTRACT(MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH;",0 Delete users with no posts in the past month,"CREATE TABLE users (id INT, name TEXT, last_post_at TIMESTAMP); ","DELETE FROM users WHERE last_post_at < DATE_SUB(NOW(), INTERVAL 1 MONTH) AND last_post_at IS NOT NULL;","DELETE FROM users WHERE last_post_at DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH);",0 "What is the highest year for the title, ""loves lost and found""?","CREATE TABLE table_name_82 (year INTEGER, title VARCHAR);","SELECT MAX(year) FROM table_name_82 WHERE title = ""loves lost and found"";","SELECT MAX(year) FROM table_name_82 WHERE title = ""loves lost and found"";",1 List the programs with their associated outcomes and total budget from the 'Programs' and 'Budgets' tables.,"CREATE TABLE Programs (ProgramID INT, ProgramName TEXT); CREATE TABLE Budgets (BudgetID INT, ProgramID INT, BudgetAmount DECIMAL(10,2)); ","SELECT Programs.ProgramName, SUM(Budgets.BudgetAmount) as TotalBudget FROM Programs INNER JOIN Budgets ON Programs.ProgramID = Budgets.ProgramID GROUP BY Programs.ProgramName;","SELECT Programs.ProgramName, SUM(Budgets.BudgetAmount) as TotalBudget FROM Programs INNER JOIN Budgets ON Programs.ProgramID = Budgets.ProgramID GROUP BY Programs.ProgramName;",1 What's the content offered by the package number 204?,"CREATE TABLE table_15887683_3 (content VARCHAR, n° VARCHAR);",SELECT content FROM table_15887683_3 WHERE n° = 204;,SELECT content FROM table_15887683_3 WHERE n° = 204;,1 What is the greatest number of losses when there are more than 0 draws and 1390 against matches?,"CREATE TABLE table_name_22 (losses INTEGER, draws VARCHAR, against VARCHAR);",SELECT MAX(losses) FROM table_name_22 WHERE draws > 0 AND against = 1390;,SELECT MAX(losses) FROM table_name_22 WHERE draws > 0 AND against = 1390;,1 What were the winnings for the Chevrolet with a number larger than 29 and scored 102 points?,"CREATE TABLE table_name_65 (winnings VARCHAR, points VARCHAR, make VARCHAR, car__number VARCHAR);","SELECT winnings FROM table_name_65 WHERE make = ""chevrolet"" AND car__number > 29 AND points = 102;","SELECT winnings FROM table_name_65 WHERE make = ""chevrolet"" AND car__number > 29 AND points = 102;",1 what was the engine when ken downing drove an entrant from connaught engineering?,"CREATE TABLE table_name_37 (engine VARCHAR, driver VARCHAR, entrant VARCHAR);","SELECT engine FROM table_name_37 WHERE driver = ""ken downing"" AND entrant = ""connaught engineering"";","SELECT engine FROM table_name_37 WHERE driver = ""ken downing"" AND entrant = ""connaught engineering"";",1 Calculate the average daily waste generation rate for the city of San Francisco in the year 2020,"CREATE TABLE waste_generation (city VARCHAR(20), year INT, daily_waste_generation FLOAT);",SELECT AVG(daily_waste_generation) FROM waste_generation WHERE city = 'San Francisco' AND year = 2020;,SELECT AVG(daily_waste_generation) FROM waste_generation WHERE city = 'San Francisco' AND year = 2020;,1 Create a table for nonprofit events,"CREATE TABLE if not exists nonprofit_events (event_id serial PRIMARY KEY, name text, description text, location text, start_date date, end_date date, organizer_id integer REFERENCES nonprofit_organizers(organizer_id));","CREATE TABLE nonprofit_events (event_id serial PRIMARY KEY, name text, description text, location text, start_date date, end_date date, organizer_id integer REFERENCES nonprofit_organizers(organizer_id));","CREATE TABLE nonprofit_events (event_id serial PRIMARY KEY, name text, description text, location text, start_date date, end_date date, organizer_id integer REFERENCES nonprofit_organizers(organizer_id));",1 What is the number of marine protected areas where the maximum depth is greater than 7000 meters?,"CREATE TABLE marine_protected_areas (area_name TEXT, max_depth INTEGER); ",SELECT COUNT(*) FROM marine_protected_areas WHERE max_depth > 7000;,SELECT COUNT(*) FROM marine_protected_areas WHERE max_depth > 7000;,1 How many matches were drawn by the teams that won exactly 10?,"CREATE TABLE table_27293285_6 (drawn VARCHAR, won VARCHAR);","SELECT COUNT(drawn) FROM table_27293285_6 WHERE won = ""10"";",SELECT drawn FROM table_27293285_6 WHERE won = 10;,0 "What is Current Branch Opened, when Branch is Midland Library?","CREATE TABLE table_name_22 (current_branch_opened VARCHAR, branch VARCHAR);","SELECT current_branch_opened FROM table_name_22 WHERE branch = ""midland library"";","SELECT current_branch_opened FROM table_name_22 WHERE branch = ""midlands library"";",0 Name the feb 2010 for january 2010 for 6.2%,"CREATE TABLE table_25256368_1 (february_2010 VARCHAR, january_2010 VARCHAR);","SELECT february_2010 FROM table_25256368_1 WHERE january_2010 = ""6.2%"";","SELECT february_2010 FROM table_25256368_1 WHERE january_2010 = ""6.2%"";",1 "What is the total number of cases heard by each judge, ordered by total cases in descending order?","CREATE TABLE judges (judge_id INT, name VARCHAR(50), court_id INT); CREATE TABLE cases (case_id INT, judge_id INT, court_date DATE); ","SELECT judge_id, COUNT(*) as total_cases FROM cases GROUP BY judge_id ORDER BY total_cases DESC;","SELECT j.name, COUNT(c.case_id) as total_cases FROM judges j JOIN cases c ON j.court_id = c.judge_id GROUP BY j.name ORDER BY total_cases DESC;",0 Create a table named 'precipitation',"CREATE TABLE public.precipitation ( id SERIAL PRIMARY KEY, location VARCHAR(255), date DATE, inches FLOAT);","CREATE TABLE public.precipitation ( id SERIAL PRIMARY KEY, location VARCHAR(255), date DATE, inches FLOAT);","CREATE TABLE public.precipitation ( id SERIAL PRIMARY KEY, location VARCHAR(255), date DATE, inches FLOAT);",0 Which Tournament has a 2007 of 19–4?,CREATE TABLE table_name_3 (tournament VARCHAR);,"SELECT tournament FROM table_name_3 WHERE 2007 = ""19–4"";","SELECT tournament FROM table_name_3 WHERE 2007 = ""19–4"";",1 Who directed episode 21?,"CREATE TABLE table_23958944_5 (directed_by VARCHAR, no_by_season VARCHAR);",SELECT directed_by FROM table_23958944_5 WHERE no_by_season = 21;,SELECT directed_by FROM table_23958944_5 WHERE no_by_season = 21;,1 Update the 'commanding_officer' field in the 'intelligence_agency' table to 'L. Brown' where 'agency_location' is 'Los Angeles',"CREATE TABLE intelligence_agency (agency_id INT PRIMARY KEY, agency_name VARCHAR(30), commanding_officer VARCHAR(30), agency_location VARCHAR(20));",UPDATE intelligence_agency SET commanding_officer = 'L. Brown' WHERE agency_location = 'Los Angeles';,UPDATE intelligence_agency SET commanding_officer = 'L. Brown' WHERE agency_location = 'Los Angeles';,1 What is the most total goals for a player having 0 FA Cup goals and 41 League appearances?,"CREATE TABLE table_name_98 (total_goals INTEGER, fa_cup_goals VARCHAR, league_apps VARCHAR);","SELECT MAX(total_goals) FROM table_name_98 WHERE fa_cup_goals = 0 AND league_apps = ""41"";",SELECT MAX(total_goals) FROM table_name_98 WHERE fa_cup_goals = 0 AND league_apps = 41;,0 How many silver medals were won in 1938?,"CREATE TABLE table_name_42 (silver VARCHAR, year VARCHAR);","SELECT silver FROM table_name_42 WHERE year = ""1938"";",SELECT silver FROM table_name_42 WHERE year = 1938;,0 In what district was the incumbent Charles A. Wickliffe? ,"CREATE TABLE table_2668254_8 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_2668254_8 WHERE incumbent = ""Charles A. Wickliffe"";","SELECT district FROM table_2668254_8 WHERE incumbent = ""Charles A. Wickliffe"";",1 WHAT IS THE SCORE FOR 2010 fifa world cup qualification?,"CREATE TABLE table_name_28 (score VARCHAR, competition VARCHAR);","SELECT score FROM table_name_28 WHERE competition = ""2010 fifa world cup qualification"";","SELECT score FROM table_name_28 WHERE competition = ""2010 fifa world cup qualification"";",1 What is the position of pick # 63?,"CREATE TABLE table_25518547_4 (position VARCHAR, pick__number VARCHAR);",SELECT position FROM table_25518547_4 WHERE pick__number = 63;,SELECT position FROM table_25518547_4 WHERE pick__number = 63;,1 What is the brand in Cabanatuan?,"CREATE TABLE table_19215259_1 (branding VARCHAR, location VARCHAR);","SELECT branding FROM table_19215259_1 WHERE location = ""Cabanatuan"";","SELECT branding FROM table_19215259_1 WHERE location = ""Cabanatuan"";",1 "Which tournament has an Outcome of runner-up, and an Opponent of maša zec peškirič?","CREATE TABLE table_name_93 (tournament VARCHAR, outcome VARCHAR, opponent VARCHAR);","SELECT tournament FROM table_name_93 WHERE outcome = ""runner-up"" AND opponent = ""maša zec peškirič"";","SELECT tournament FROM table_name_93 WHERE outcome = ""runner-up"" AND opponent = ""maa zec pekiri"";",0 What is the average of laps ridden by Toni Elias?,"CREATE TABLE table_name_42 (laps INTEGER, rider VARCHAR);","SELECT AVG(laps) FROM table_name_42 WHERE rider = ""toni elias"";","SELECT AVG(laps) FROM table_name_42 WHERE rider = ""toni ellias"";",0 What is the number of solo exhibitions for Asian artists in the last 20 years?,"CREATE TABLE Exhibitions (id INT, title VARCHAR(255), artist_nationality VARCHAR(255), start_year INT, end_year INT); ",SELECT COUNT(*) FROM Exhibitions WHERE artist_nationality LIKE '%Asia%' AND start_year >= 2001;,SELECT COUNT(*) FROM Exhibitions WHERE artist_nationality = 'Asian' AND start_year >= YEAR(CURRENT_DATE) - 20 AND end_year >= YEAR(CURRENT_DATE);,0 "Update the labor cost for Helicopter maintenance on Feb 15, 2020 to 750.","CREATE TABLE Maintenance (id INT, equipment VARCHAR(255), date DATE, labor INT, parts INT); ",UPDATE Maintenance SET labor = 750 WHERE equipment = 'Helicopter' AND date = '2020-02-15';,UPDATE Maintenance SET labor = 750 WHERE equipment = 'Helicopter' AND date = '2020-02-15';,1 "List the top 3 mobile plans with the highest data allowance, including plan name and data allowance, for the 'Rural' region.","CREATE TABLE plans (id INT, name VARCHAR(25), type VARCHAR(10), data_allowance INT, region VARCHAR(10)); ","SELECT plans.name, MAX(plans.data_allowance) AS max_data_allowance FROM plans WHERE plans.type = 'mobile' AND plans.region = 'Rural' GROUP BY plans.name ORDER BY max_data_allowance DESC LIMIT 3;","SELECT name, data_allowance FROM plans WHERE type = 'Mobile' AND region = 'Rural' ORDER BY data_allowance DESC LIMIT 3;",0 Name the number of playoffs for 3rd round,"CREATE TABLE table_2511876_1 (playoffs VARCHAR, open_cup VARCHAR);","SELECT COUNT(playoffs) FROM table_2511876_1 WHERE open_cup = ""3rd Round"";","SELECT COUNT(playoffs) FROM table_2511876_1 WHERE open_cup = ""3rd Round"";",1 Name the number of records for 30 game,"CREATE TABLE table_23285805_5 (record VARCHAR, game VARCHAR);",SELECT COUNT(record) FROM table_23285805_5 WHERE game = 30;,SELECT COUNT(record) FROM table_23285805_5 WHERE game = 30;,1 List the names of students who have published a paper in the past year and are enrolled in the Mathematics department.,"CREATE TABLE students (id INT, name VARCHAR(50), department VARCHAR(50)); CREATE TABLE student_publications (student_id INT, publication_id INT); CREATE TABLE publications (id INT, title VARCHAR(100), year INT, citations INT); ",SELECT students.name FROM students INNER JOIN student_publications ON students.id = student_publications.student_id INNER JOIN publications ON student_publications.publication_id = publications.id WHERE publications.year >= YEAR(CURRENT_DATE()) - 1 AND students.department = 'Mathematics';,SELECT students.name FROM students INNER JOIN student_publications ON students.id = student_publications.student_id INNER JOIN publications ON student_publications.publication_id = publications.id WHERE students.department = 'Mathematics' AND publications.year = 2021;,0 Can you tell me the Miss Maja Pilipinas that has the Year of 1969?,"CREATE TABLE table_name_30 (miss_maja_pilipinas VARCHAR, year VARCHAR);",SELECT miss_maja_pilipinas FROM table_name_30 WHERE year = 1969;,SELECT miss_maja_pilipinas FROM table_name_30 WHERE year = 1969;,1 How many titles are given for the episode directed by Joanna Kerns?,"CREATE TABLE table_17356205_1 (title VARCHAR, directed_by VARCHAR);","SELECT COUNT(title) FROM table_17356205_1 WHERE directed_by = ""Joanna Kerns"";","SELECT COUNT(title) FROM table_17356205_1 WHERE directed_by = ""Joanna Kerns"";",1 What is the average budget for intelligence operations in the Asia-Pacific region?,"CREATE TABLE intel_budget (id INT, region VARCHAR(255), operation VARCHAR(255), budget DECIMAL(10, 2)); ",SELECT AVG(budget) as avg_budget FROM intel_budget WHERE region = 'Asia-Pacific' AND operation = 'SIGINT' OR operation = 'GEOINT';,SELECT AVG(budget) FROM intel_budget WHERE region = 'Asia-Pacific';,0 Find the total energy efficiency score in Texas,"CREATE TABLE energy_efficiency_stats_2 (state VARCHAR(20), energy_efficiency_score INT); ","SELECT state, SUM(energy_efficiency_score) FROM energy_efficiency_stats_2 WHERE state = 'Texas' GROUP BY state;",SELECT SUM(energy_efficiency_score) FROM energy_efficiency_stats_2 WHERE state = 'Texas';,0 "How many tickets were sold for each event type (concert, exhibition, workshop) at cultural centers in New York?","CREATE TABLE events (id INT, title VARCHAR(50), event_type VARCHAR(50), city VARCHAR(50), tickets_sold INT); ","SELECT event_type, SUM(tickets_sold) FROM events WHERE city = 'New York' GROUP BY event_type;","SELECT event_type, SUM(tickets_sold) FROM events WHERE city = 'New York' GROUP BY event_type;",1 When rangitikei is the electorate who is the winner?,"CREATE TABLE table_28898948_3 (winner VARCHAR, electorate VARCHAR);","SELECT winner FROM table_28898948_3 WHERE electorate = ""Rangitikei"";","SELECT winner FROM table_28898948_3 WHERE electorate = ""Rangitikei"";",1 Which 2013 has a 2006 of grand slam tournaments?,CREATE TABLE table_name_64 (Id VARCHAR);,"SELECT 2013 FROM table_name_64 WHERE 2006 = ""grand slam tournaments"";","SELECT 2013 FROM table_name_64 WHERE 2006 = ""grand slam tournaments"";",1 Name the Province with ICAO of zbcf?,"CREATE TABLE table_name_60 (province VARCHAR, icao VARCHAR);","SELECT province FROM table_name_60 WHERE icao = ""zbcf"";","SELECT province FROM table_name_60 WHERE icao = ""zbcf"";",1 "What is the smallest number of gold of a country of rank 6, with 2 bronzes?","CREATE TABLE table_name_71 (gold INTEGER, total VARCHAR, bronze VARCHAR, rank VARCHAR);",SELECT MIN(gold) FROM table_name_71 WHERE bronze = 2 AND rank = 6 AND total > 2;,SELECT MIN(gold) FROM table_name_71 WHERE bronze = 2 AND rank = 6;,0 "Delete the order for menu item with ID 3 on Jan 1, 2022.","CREATE TABLE orders (id INT PRIMARY KEY, menu_id INT, order_date DATETIME, quantity INT); ",DELETE FROM orders WHERE menu_id = 3 AND order_date = '2022-01-01 19:30:00';,DELETE FROM orders WHERE menu_id = 3 AND order_date BETWEEN '2022-01-01' AND '2022-01-31';,0 What is the revenue generated from virtual tours in New York and Los Angeles?,"CREATE TABLE Cities (city_id INT, name TEXT, country TEXT); CREATE TABLE Virtual_Tours (tour_id INT, city_id INT, name TEXT, revenue FLOAT); ","SELECT SUM(revenue) FROM Virtual_Tours WHERE city_id IN (1, 2);","SELECT SUM(V.revenue) FROM Virtual_Tours V INNER JOIN Cities C ON V.city_id = C.city_id WHERE C.name IN ('New York', 'Los Angeles');",0 "How many posts were made by users in the ""healthcare"" industry, in the first quarter of 2022?","CREATE TABLE users (id INT, industry VARCHAR(255)); CREATE TABLE posts (id INT, user_id INT, post_date DATE); ","SELECT COUNT(posts.id) FROM posts JOIN users ON posts.user_id = users.id WHERE users.industry = 'healthcare' AND posts.post_date >= DATE_TRUNC('quarter', '2022-01-01') AND posts.post_date < DATE_TRUNC('quarter', '2022-04-01');",SELECT COUNT(*) FROM posts JOIN users ON posts.user_id = users.id WHERE users.industry = 'healthcare' AND post_date BETWEEN '2022-01-01' AND '2022-03-31';,0 "What is the total number of military equipment by country of origin, ranked by total count in descending order?","CREATE TABLE Equipment_Origin (Equipment_Type VARCHAR(255), Country_Of_Origin VARCHAR(255)); ","SELECT Country_Of_Origin, COUNT(*) as Equipment_Count FROM Equipment_Origin GROUP BY Country_Of_Origin ORDER BY Equipment_Count DESC;","SELECT Country_Of_Origin, COUNT(*) as Total_Equipment FROM Equipment_Origin GROUP BY Country_Of_Origin ORDER BY Total_Equipment DESC;",0 "What is the Rank of the Film with a Worldwide Gross of $183,031,272?","CREATE TABLE table_name_19 (rank INTEGER, worldwide_gross VARCHAR);","SELECT SUM(rank) FROM table_name_19 WHERE worldwide_gross = ""$183,031,272"";","SELECT SUM(rank) FROM table_name_19 WHERE worldwide_gross = ""$183,031,272"";",1 What results has a week smaller than 2?,"CREATE TABLE table_name_79 (result VARCHAR, week INTEGER);",SELECT result FROM table_name_79 WHERE week < 2;,SELECT result FROM table_name_79 WHERE week 2;,0 What is the minimum production value in 'australian_mines'?,"CREATE SCHEMA if not exists australia_schema_2;CREATE TABLE australia_schema_2.australian_mines (id INT, name VARCHAR, production_value DECIMAL);",SELECT MIN(production_value) FROM australia_schema_2.australian_mines;,SELECT MIN(production_value) FROM australia_schema_2.australian_mines;,1 Which Race has a Runners of 7 and Odds of 1/3?,"CREATE TABLE table_name_30 (race VARCHAR, runners VARCHAR, odds VARCHAR);","SELECT race FROM table_name_30 WHERE runners = 7 AND odds = ""1/3"";","SELECT race FROM table_name_30 WHERE runners = 7 AND odds = ""3/4"";",0 "How many labor disputes occurred in '2022' in the 'manufacturing' schema, which resulted in a work stoppage of more than 30 days?","CREATE TABLE labor_disputes (id INT, year INT, days_of_work_stoppage INT, industry VARCHAR(255)); ",SELECT COUNT(*) FROM labor_disputes WHERE year = 2022 AND days_of_work_stoppage > 30 AND industry = 'manufacturing';,SELECT COUNT(*) FROM labor_disputes WHERE year = 2022 AND days_of_work_stoppage > 30;,0 Which artists have released the most songs in the Jazz genre on Apple Music?,"CREATE TABLE AppleMusicSongs (ArtistID INT, ArtistName VARCHAR(100), Genre VARCHAR(50), SongID INT); ","SELECT ArtistName, COUNT(*) as SongCount FROM AppleMusicSongs WHERE Genre = 'Jazz' GROUP BY ArtistName ORDER BY SongCount DESC;","SELECT ArtistName, COUNT(*) FROM AppleMusicSongs WHERE Genre = 'Jazz' GROUP BY ArtistName ORDER BY COUNT(*) DESC LIMIT 1;",0 "What is the total donation amount by volunteers in Mexico, for each program, in the fiscal year 2022?","CREATE TABLE donations (id INT, donor_name VARCHAR(50), donation_amount DECIMAL(10,2), donation_date DATE, is_volunteer BOOLEAN, program_name VARCHAR(50)); CREATE TABLE programs (id INT, program_name VARCHAR(50)); ","SELECT p.program_name, DATE_FORMAT(d.donation_date, '%Y-%V') AS fiscal_year, SUM(d.donation_amount) FROM donations d JOIN programs p ON d.program_name = p.program_name WHERE d.is_volunteer = true AND d.donor_country = 'Mexico' GROUP BY p.program_name, fiscal_year;","SELECT p.program_name, SUM(d.donation_amount) as total_donation FROM donations d JOIN programs p ON d.program_name = p.program_name WHERE d.is_volunteer = true AND d.donation_date BETWEEN '2022-01-01' AND '2022-06-30' GROUP BY p.program_name;",0 What is the record when Clippers have the high points?,"CREATE TABLE table_name_14 (record VARCHAR, high_points VARCHAR);","SELECT record FROM table_name_14 WHERE high_points = ""clippers"";","SELECT record FROM table_name_14 WHERE high_points = ""clippers"";",1 What are the names of faculty members who have supervised graduate students but have not received any research grants?,"CREATE TABLE faculty (id INT, name VARCHAR(50), department VARCHAR(50)); CREATE TABLE grant (id INT, title VARCHAR(100), faculty_id INT); CREATE TABLE student (id INT, name VARCHAR(50), program VARCHAR(50), supervisor_id INT);",SELECT f.name FROM faculty f LEFT JOIN grant g ON f.id = g.faculty_id JOIN student s ON f.id = s.supervisor_id WHERE g.id IS NULL;,SELECT f.name FROM faculty f INNER JOIN grant g ON f.id = g.faculty_id INNER JOIN student s ON g.student_id = s.id WHERE s.program = 'Graduate' AND s.supervisor_id IS NULL;,0 what is the total number of deadline for completion where description is facebook becomes a publicly traded company,"CREATE TABLE table_12078626_1 (deadline_for_completion VARCHAR, description VARCHAR);","SELECT COUNT(deadline_for_completion) FROM table_12078626_1 WHERE description = ""Facebook becomes a publicly traded company"";","SELECT COUNT(deadline_for_completion) FROM table_12078626_1 WHERE description = ""Facebook becomes a publicly traded company"";",1 What is the average gas price for each block in the Bitcoin network?,"CREATE TABLE block (block_height INT, timestamp TIMESTAMP, gas_price DECIMAL(18,8));","SELECT block_height, AVG(gas_price) as avg_gas_price FROM block GROUP BY block_height;","SELECT block_height, AVG(gas_price) as avg_gas_price FROM block GROUP BY block_height;",1 What's the sum of all values in category 1 when category 3 is equal to 300?,"CREATE TABLE table_name_89 (category_1 INTEGER, category_3 VARCHAR);","SELECT SUM(category_1) FROM table_name_89 WHERE category_3 = ""300"";",SELECT SUM(category_1) FROM table_name_89 WHERE category_3 = 300;,0 During what week was the July 10 game played?,"CREATE TABLE table_21796261_4 (week VARCHAR, date VARCHAR);","SELECT week FROM table_21796261_4 WHERE date = ""July 10"";","SELECT week FROM table_21796261_4 WHERE date = ""July 10"";",1 "What is the College/Junior/Club Team (League) when the position is rw, and the player is Don Murdoch?","CREATE TABLE table_name_31 (college_junior_club_team__league_ VARCHAR, position VARCHAR, player VARCHAR);","SELECT college_junior_club_team__league_ FROM table_name_31 WHERE position = ""rw"" AND player = ""don murdoch"";","SELECT college_junior_club_team__league_ FROM table_name_31 WHERE position = ""rw"" AND player = ""don murdoch"";",1 What is the total number of volunteers and their combined hours for the 'Animal Welfare' program?,"CREATE TABLE volunteers (id INT, program VARCHAR(255), hours INT); ","SELECT program, COUNT(*), SUM(hours) FROM volunteers WHERE program = 'Animal Welfare';","SELECT program, COUNT(*) as total_volunteers, SUM(hours) as total_hours FROM volunteers WHERE program = 'Animal Welfare' GROUP BY program;",0 Where in 1985 was tim mayotte runner up?,"CREATE TABLE table_name_13 (location VARCHAR, year VARCHAR, runner_up VARCHAR);","SELECT location FROM table_name_13 WHERE year > 1985 AND runner_up = ""tim mayotte"";","SELECT location FROM table_name_13 WHERE year = 1985 AND runner_up = ""tim mayotte"";",0 What is the maximum number of likes received by posts in Japan on a single day?,"CREATE TABLE posts (id INT, user_id INT, post_date DATE, likes INT); ",SELECT MAX(likes) FROM posts WHERE post_date IN (SELECT post_date FROM posts WHERE country = 'Japan' GROUP BY post_date);,SELECT MAX(likes) FROM posts WHERE country = 'Japan';,0 What is the total quantity of vegan ingredients in our inventory?,"CREATE TABLE VeganIngredients (id INT, name VARCHAR(50), quantity INT); ",SELECT SUM(quantity) FROM VeganIngredients;,SELECT SUM(quantity) FROM VeganIngredients;,1 "What is the Mar 24 rank when the May 26 is 13, and the May 12 is 6?","CREATE TABLE table_name_93 (mar_24 VARCHAR, may_26 VARCHAR, may_12 VARCHAR);","SELECT mar_24 FROM table_name_93 WHERE may_26 = ""13"" AND may_12 = ""6"";","SELECT mar_24 FROM table_name_93 WHERE may_26 = ""13"" AND may_12 = ""6"";",1 "What is the Opponent name at memorial stadium • minneapolis, mn on 10/20/1928?","CREATE TABLE table_name_25 (opponent_number VARCHAR, site VARCHAR, date VARCHAR);","SELECT opponent_number FROM table_name_25 WHERE site = ""memorial stadium • minneapolis, mn"" AND date = ""10/20/1928"";","SELECT opponent_number FROM table_name_25 WHERE site = ""memorial stadium • minneapolis, mn"" AND date = ""10/20/1928"";",1 "What is the average time spent on each post by users from France, grouped by post type and day of the week?","CREATE TABLE posts (post_id INT, user_id INT, post_type VARCHAR(20), time_spent FLOAT, posted_at TIMESTAMP); ","SELECT post_type, DATE_PART('dow', posted_at) AS day_of_week, AVG(time_spent) AS avg_time_spent FROM posts WHERE country = 'France' GROUP BY post_type, day_of_week;","SELECT post_type, day_of_week, AVG(time_spent) as avg_time_spent FROM posts WHERE country = 'France' GROUP BY post_type, day_of_week;",0 "What is the average number of followers for users in the food industry, in France, who have posted in the past month?","CREATE TABLE users (id INT, country VARCHAR(255), industry VARCHAR(255), followers INT, last_post_time DATETIME);","SELECT AVG(followers) FROM users WHERE country = 'France' AND industry = 'food' AND last_post_time > DATE_SUB(NOW(), INTERVAL 1 MONTH);","SELECT AVG(followers) FROM users WHERE country = 'France' AND industry = 'Food' AND last_post_time >= DATEADD(month, -1, GETDATE());",0 What was the loss on September 2?,"CREATE TABLE table_name_16 (loss VARCHAR, date VARCHAR);","SELECT loss FROM table_name_16 WHERE date = ""september 2"";","SELECT loss FROM table_name_16 WHERE date = ""september 2"";",1 "Add a new sustainable practice to the ""sustainable_practices"" table with the following details: practice_id = 105, practice_name = 'Bicycle Rental Program', description = 'A program that allows visitors to rent bicycles to explore the destination in an eco-friendly way.'","CREATE TABLE sustainable_practices (practice_id INT, practice_name VARCHAR(50), description TEXT, PRIMARY KEY (practice_id));","INSERT INTO sustainable_practices (practice_id, practice_name, description) VALUES (105, 'Bicycle Rental Program', 'A program that allows visitors to rent bicycles to explore the destination in an eco-friendly way.');","INSERT INTO sustainable_practices (practice_id, practice_name, description) VALUES (105, 'Bicycle Rental Program', 'A program that allows visitors to rent bicycles to explore the destination in an eco-friendly way');",0 Name the most season for old hoss radbourn,"CREATE TABLE table_242813_2 (season INTEGER, pitcher VARCHAR);","SELECT MAX(season) FROM table_242813_2 WHERE pitcher = ""Old Hoss Radbourn"";","SELECT MAX(season) FROM table_242813_2 WHERE pitcher = ""Old Hoss Radbourn"";",1 "When did svishtov , bulgaria disband?","CREATE TABLE table_242785_1 (date_disband VARCHAR, main_legionary_base VARCHAR);","SELECT date_disband FROM table_242785_1 WHERE main_legionary_base = ""Svishtov , Bulgaria"";","SELECT date_disband FROM table_242785_1 WHERE main_legionary_base = ""Svishtov, Bulgaria"";",0 How many users from Asia have clicked on ads in the last week?,"CREATE TABLE user_activity (id INT, user_id INT, activity_type VARCHAR(255), activity_date DATE); CREATE TABLE users (id INT, region VARCHAR(255)); ","SELECT COUNT(DISTINCT user_id) AS users_clicked_ads, region FROM user_activity INNER JOIN users ON user_activity.user_id = users.id WHERE activity_type = 'clicked_ad' AND activity_date >= DATE(NOW()) - INTERVAL 7 DAY AND region LIKE 'Asia%' GROUP BY region;","SELECT COUNT(*) FROM user_activity JOIN users ON user_activity.user_id = users.id WHERE users.region = 'Asia' AND activity_date >= DATEADD(week, -1, GETDATE());",0 What was the total number of players from Asia who participated in the 'tournament_2022'?,"CREATE TABLE tournament_2022 (player_id INT, player_name TEXT, country TEXT);",SELECT COUNT(*) FROM tournament_2022 WHERE country = 'Asia';,SELECT COUNT(*) FROM tournament_2022 WHERE country = 'Asia';,1 How many values for high assists when the game is 81?,"CREATE TABLE table_23248869_10 (high_assists VARCHAR, game VARCHAR);",SELECT COUNT(high_assists) FROM table_23248869_10 WHERE game = 81;,SELECT COUNT(high_assists) FROM table_23248869_10 WHERE game = 81;,1 What are the total production costs for each chemical type in the past year?,"CREATE TABLE Production (id INT, chemical VARCHAR(255), production_date DATE, cost DECIMAL(10,2)); ","SELECT chemical, SUM(cost) FROM Production WHERE production_date >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR) GROUP BY chemical","SELECT chemical, SUM(cost) as total_cost FROM Production WHERE production_date >= DATEADD(year, -1, GETDATE()) GROUP BY chemical;",0 How many circular supply chain products were sold last month?,"CREATE TABLE products (product_id INT, name VARCHAR(255), circular_supply_chain BOOLEAN); CREATE TABLE sales (sale_id INT, product_id INT, sale_date DATE); ",SELECT COUNT(*) FROM products JOIN sales ON products.product_id = sales.product_id WHERE circular_supply_chain = TRUE AND sale_date BETWEEN '2022-02-01' AND '2022-02-28';,"SELECT COUNT(*) FROM sales JOIN products ON sales.product_id = products.product_id WHERE products.circular_supply_chain = true AND sales.sale_date >= DATEADD(month, -1, GETDATE());",0 "Runs smaller than 6106, and Inns smaller than 146 has what total number of matches?","CREATE TABLE table_name_24 (matches VARCHAR, runs VARCHAR, inns VARCHAR);",SELECT COUNT(matches) FROM table_name_24 WHERE runs < 6106 AND inns < 146;,SELECT COUNT(matches) FROM table_name_24 WHERE runs 6106 AND inns 146;,0 "List supply chain components, companies, and countries of origin.","CREATE TABLE supply_chain (id INT PRIMARY KEY, component VARCHAR(255), company_id INT, origin_country VARCHAR(255)); ","SELECT company_id, STRING_AGG(origin_country, ', ') as countries_of_origin FROM supply_chain GROUP BY company_id;","SELECT component, company_id, origin_country FROM supply_chain;",0 Calculate the average recycling rate in the European Union over the past 5 years.,"CREATE TABLE RecyclingRatesEU (country VARCHAR(50), year INT, rate DECIMAL(5,2)); ","SELECT AVG(rate) FROM RecyclingRatesEU WHERE country IN ('Germany', 'France');","SELECT AVG(rate) FROM RecyclingRatesEU WHERE country IN ('Germany', 'France', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', ",0 "Insert a record of a new Reggae music stream in Jamaica on April 10, 2021 with revenue of 1.50.","CREATE TABLE streams (song_id INT, stream_date DATE, genre VARCHAR(20), country VARCHAR(20), revenue DECIMAL(10,2));","INSERT INTO streams (song_id, stream_date, genre, country, revenue) VALUES (15, '2021-04-10', 'Reggae', 'Jamaica', 1.50);","INSERT INTO streams (song_id, stream_date, genre, country, revenue) VALUES (1, 'Reggae', 'Jamaica', '2021-04-10', 1.50);",0 List the names of players that do not have coaches.,"CREATE TABLE player (Player_name VARCHAR, Player_ID VARCHAR); CREATE TABLE player_coach (Player_name VARCHAR, Player_ID VARCHAR);",SELECT Player_name FROM player WHERE NOT Player_ID IN (SELECT Player_ID FROM player_coach);,SELECT T1.Player_name FROM player AS T1 JOIN player_coach AS T2 ON T1.Player_ID = T2.Player_ID;,0 How many traffic violations were issued in New York in the month of January 2022?,"CREATE TABLE traffic_violations (state VARCHAR(20), violation_date DATE); ",SELECT COUNT(*) FROM traffic_violations WHERE state = 'New York' AND violation_date BETWEEN '2022-01-01' AND '2022-01-31';,SELECT COUNT(*) FROM traffic_violations WHERE state = 'New York' AND violation_date BETWEEN '2022-01-01' AND '2022-01-31';,1 What is the average height of female basketball players in the players table?,"CREATE TABLE players (player_id INT, name VARCHAR(50), position VARCHAR(50), height FLOAT, weight INT, team_id INT, league VARCHAR(50)); ",SELECT AVG(height) FROM players WHERE position = 'Guard' AND league = 'NBA' AND gender = 'Female';,SELECT AVG(height) FROM players WHERE position = 'Female' AND league = 'Basketball';,0 What is the average ocean acidity in the 'Southern Ocean' over the last 5 years?,"CREATE TABLE ocean_acidity (id INTEGER, location TEXT, acidity FLOAT, date DATE);","SELECT AVG(acidity) FROM ocean_acidity WHERE location = 'Southern Ocean' AND date >= DATEADD(year, -5, CURRENT_DATE);","SELECT AVG(acidity) FROM ocean_acidity WHERE location = 'Southern Ocean' AND date >= DATEADD(year, -5, GETDATE());",0 What was the average donation amount by new donors in Q1 2021?,"CREATE TABLE Donors (DonorID INT, DonationDate DATE, DonationAmount DECIMAL); ",SELECT AVG(DonationAmount) FROM Donors WHERE DonationDate BETWEEN '2021-01-01' AND '2021-03-31' AND DonorID NOT IN (SELECT DonorID FROM Donors WHERE DonationDate < '2021-01-01');,SELECT AVG(DonationAmount) FROM Donors WHERE DonationDate BETWEEN '2021-01-01' AND '2021-03-31';,0 Which countries have supply chain violations and produce more than 20 products made from recycled materials?,"CREATE TABLE SupplyChainViolations (country TEXT, num_violations INT); CREATE TABLE RecycledMaterials (product_id INT, country TEXT, recycled_materials BOOLEAN); ",SELECT country FROM RecycledMaterials R1 INNER JOIN SupplyChainViolations S1 ON R1.country = S1.country GROUP BY country HAVING COUNT(*) > 20;,SELECT sc.country FROM SupplyChainViolations sc JOIN RecycledMaterials rm ON sc.country = rm.country WHERE sc.num_violations > 20 AND rm.recycled_materials = TRUE;,0 How many games were played on november 27?,"CREATE TABLE table_25461946_5 (record VARCHAR, date VARCHAR);","SELECT COUNT(record) FROM table_25461946_5 WHERE date = ""November 27"";","SELECT COUNT(record) FROM table_25461946_5 WHERE date = ""November 27"";",1 Get total mineral extraction in 2021,"CREATE TABLE extraction (id INT PRIMARY KEY, site_id INT, mineral VARCHAR(50), quantity INT, year INT);",SELECT SUM(quantity) FROM extraction WHERE year = 2021;,SELECT SUM(quantity) FROM extraction WHERE year = 2021;,1 What are the top 3 states with the highest construction labor statistics in 2021?,"CREATE TABLE labor_statistics_data (state VARCHAR(255), statistics INT, year INT); ","SELECT state, statistics FROM labor_statistics_data WHERE year = 2021 ORDER BY statistics DESC LIMIT 3;","SELECT state, statistics FROM labor_statistics_data WHERE year = 2021 ORDER BY statistics DESC LIMIT 3;",1 Find the least value of attendance?,CREATE TABLE table_14656147_2 (attendance INTEGER);,SELECT MIN(attendance) FROM table_14656147_2;,SELECT MIN(attendance) FROM table_14656147_2;,1 What are the names and types of renewable energy projects in Canada?,"CREATE TABLE projects (name TEXT, type TEXT, country TEXT); ","SELECT name, type FROM projects WHERE country = 'Canada'","SELECT name, type FROM projects WHERE country = 'Canada';",0 What is the minimum number of hospital beds in rural areas of India?,"CREATE TABLE HospitalBeds (HospitalID int, Beds int, Rural bool); ",SELECT MIN(Beds) FROM HospitalBeds WHERE Rural = true;,SELECT MIN(Beds) FROM HospitalBeds WHERE Rural = true;,1 Who had the fastest lap when the winning driver is giorgio sanna?,"CREATE TABLE table_26920192_5 (fastest_lap VARCHAR, winning_driver VARCHAR);","SELECT fastest_lap FROM table_26920192_5 WHERE winning_driver = ""Giorgio Sanna"";","SELECT fastest_lap FROM table_26920192_5 WHERE winning_driver = ""Giorgio Sanna"";",1 Identify the number of military equipment sales made in each country in the year 2021.,"CREATE TABLE SalesByCountry (id INT, country VARCHAR(255), sales_year INT, sales_count INT);","SELECT country, sales_count FROM SalesByCountry WHERE sales_year = 2021;","SELECT country, SUM(sales_count) FROM SalesByCountry WHERE sales_year = 2021 GROUP BY country;",0 What is the average weight of all satellites in the satellites table?,"CREATE TABLE satellites (name TEXT, country TEXT, weight FLOAT); ",SELECT AVG(weight) FROM satellites;,SELECT AVG(weight) FROM satellites;,1 What is the character for 2005?,"CREATE TABLE table_name_43 (character VARCHAR, year VARCHAR);",SELECT character FROM table_name_43 WHERE year = 2005;,SELECT character FROM table_name_43 WHERE year = 2005;,1 "What is the maximum heart rate recorded during a workout for each user in the past year, and what is the difference between the maximum and resting heart rate for each user?","CREATE TABLE Users (ID INT PRIMARY KEY, RestingHeartRate INT); CREATE TABLE Workouts (ID INT PRIMARY KEY, UserID INT, HeartRate INT, Date DATE);","SELECT Users.Name, MAX(Workouts.HeartRate) AS MaxHeartRate, Users.RestingHeartRate, MAX(Workouts.HeartRate) - Users.RestingHeartRate AS HeartRateDifference FROM Users JOIN Workouts ON Users.ID = Workouts.UserID WHERE Workouts.Date >= DATEADD(year, -1, GETDATE()) GROUP BY Users.Name, Users.RestingHeartRate;","SELECT Users.ID, MAX(Workouts.HeartRate) as MaxHeartRate, MAX(Workouts.HeartRate) as MaxHeartRate, DISTINCT Users.RestingHeartRate FROM Users INNER JOIN Workouts ON Users.ID = Workouts.UserID WHERE Workouts.Date >= DATEADD(year, -1, GETDATE()) GROUP BY Users.ID;",0 "Show the total production cost of ethical garments, grouped by garment type.","CREATE TABLE garment_type_production_cost (id INT, garment_type VARCHAR(255), production_cost DECIMAL(10,2));","SELECT garment_type, SUM(production_cost) AS total_cost FROM garment_type_production_cost GROUP BY garment_type;","SELECT garment_type, SUM(production_cost) FROM garment_type_production_cost GROUP BY garment_type;",0 What 1957 engine has a Chassis of connaught type b?,"CREATE TABLE table_name_71 (engine VARCHAR, chassis VARCHAR, year VARCHAR);","SELECT engine FROM table_name_71 WHERE chassis = ""connaught type b"" AND year > 1957;","SELECT engine FROM table_name_71 WHERE chassis = ""connaught type b"" AND year = 1957;",0 What is the average temperature (in Kelvin) for each space mission?,"CREATE TABLE space_missions (id INT, mission_name VARCHAR(255), launch_date DATE, average_temperature FLOAT); ","SELECT mission_name, AVG(average_temperature) OVER (PARTITION BY mission_name) as avg_temp FROM space_missions;","SELECT mission_name, AVG(average_temperature) FROM space_missions GROUP BY mission_name;",0 Which location had previous champions of Mike Webb and Nick Fahrenheit?,"CREATE TABLE table_name_93 (location VARCHAR, previous_champion_s_ VARCHAR);","SELECT location FROM table_name_93 WHERE previous_champion_s_ = ""mike webb and nick fahrenheit"";","SELECT location FROM table_name_93 WHERE previous_champion_s_ = ""mike webb and nick fahrenheit"";",1 Who is the Player with a Score of 70-72=142? Question 3,"CREATE TABLE table_name_20 (player VARCHAR, score VARCHAR);",SELECT player FROM table_name_20 WHERE score = 70 - 72 = 142;,SELECT player FROM table_name_20 WHERE score = 70 - 72 = 142;,1 "what is the average rating when the air date is november 23, 2007?","CREATE TABLE table_name_46 (rating INTEGER, air_date VARCHAR);","SELECT AVG(rating) FROM table_name_46 WHERE air_date = ""november 23, 2007"";","SELECT AVG(rating) FROM table_name_46 WHERE air_date = ""november 23, 2007"";",1 What is the average number of spectators at cricket matches in India in the last decade?,"CREATE TABLE if not exists countries (country_id INT, country VARCHAR(255)); CREATE TABLE if not exists matches (match_id INT, country_id INT, spectators INT, date DATE); ","SELECT AVG(spectators) FROM matches WHERE country_id = 1 AND date >= DATE_SUB(NOW(), INTERVAL 10 YEAR);","SELECT AVG(s.spectators) FROM matches m JOIN countries c ON m.country_id = c.country_id WHERE c.country = 'India' AND m.date >= DATEADD(year, -10, GETDATE());",0 How many spacecraft were launched per year by each country?,"CREATE TABLE space_missions (id INT, country VARCHAR(255), launch_year INT, spacecraft_model VARCHAR(255));","SELECT country, launch_year, COUNT(DISTINCT spacecraft_model) as unique_spacecraft_launched FROM space_missions GROUP BY country, launch_year;","SELECT country, launch_year, COUNT(*) FROM space_missions GROUP BY country, launch_year;",0 How many exploratory wells have been drilled in 'Alberta' since 2020?,"CREATE TABLE wells (id VARCHAR(10), name VARCHAR(10), type VARCHAR(20), region VARCHAR(20)); ",SELECT COUNT(*) FROM wells WHERE type = 'exploratory' AND region = 'Alberta' AND date >= '2020-01-01';,SELECT COUNT(*) FROM wells WHERE type = 'exploratory' AND region = 'Alberta' AND year >= 2020;,0 What is the total number of employees working in the mining sector in Canada?,"CREATE TABLE employees (id INT, company TEXT, location TEXT, department TEXT, number_of_employees INT); ",SELECT SUM(number_of_employees) FROM employees WHERE location = 'Canada' AND department = 'Mining';,SELECT SUM(number_of_employees) FROM employees WHERE location = 'Canada' AND department = 'Mining';,1 What are the names and locations of marine protected areas that overlap with the ocean floor mapping project?,"CREATE TABLE marine_protected_areas (name TEXT, location TEXT, avg_depth REAL); CREATE TABLE ocean_floor_mapping (location TEXT, depth REAL); ","SELECT name, location FROM marine_protected_areas WHERE location IN (SELECT location FROM ocean_floor_mapping);","SELECT marine_protected_areas.name, marine_protected_areas.location FROM marine_protected_areas INNER JOIN ocean_floor_mapping ON marine_protected_areas.location = ocean_floor_mapping.location;",0 What is the average network infrastructure investment for the 'coastal' region in the last 5 years?,"CREATE TABLE investments (id INT, region VARCHAR(10), year INT, amount INT); ","SELECT region, AVG(amount) FROM investments WHERE region = 'coastal' GROUP BY region, year HAVING COUNT(*) > 4;",SELECT AVG(amount) FROM investments WHERE region = 'coastal' AND year BETWEEN 2019 AND 2021;,0 Tell me the most attendance for game less than 1,"CREATE TABLE table_name_15 (attendance INTEGER, game INTEGER);",SELECT MAX(attendance) FROM table_name_15 WHERE game < 1;,SELECT MAX(attendance) FROM table_name_15 WHERE game 1;,0 How many wins did the team with 42 points get?,"CREATE TABLE table_16034882_4 (wins VARCHAR, points VARCHAR);",SELECT wins FROM table_16034882_4 WHERE points = 42;,SELECT wins FROM table_16034882_4 WHERE points = 42;,1 How many schools left in 2002-03?,"CREATE TABLE table_262560_2 (location VARCHAR, left VARCHAR);","SELECT COUNT(location) FROM table_262560_2 WHERE left = ""2002-03"";","SELECT COUNT(location) FROM table_262560_2 WHERE left = ""2002-03"";",1 How many volunteers have participated in the Food Distribution program?,"CREATE TABLE programs (id INT, name TEXT); CREATE TABLE volunteers (id INT, program TEXT, hours INT); ",SELECT COUNT(*) FROM volunteers WHERE program = 'Food Distribution';,SELECT COUNT(*) FROM volunteers WHERE program = 'Food Distribution';,1 "What is the average age of players who play games on each platform, and what is the maximum age of players on a single platform?","CREATE TABLE Players (id INT, name VARCHAR(50), age INT, platform VARCHAR(50)); ","SELECT platform, AVG(age) AS avg_age, MAX(age) AS max_age_per_platform FROM Players GROUP BY platform;","SELECT platform, AVG(age) as avg_age, MAX(age) as max_age FROM Players GROUP BY platform;",0 What is the minimum speed of vessels with 'CMA' prefix that had any accidents in the South China Sea in 2016?,"CREATE TABLE Vessels (ID INT, Name TEXT, Speed FLOAT, Accidents INT, Prefix TEXT, Year INT);CREATE VIEW South_China_Sea_Vessels AS SELECT * FROM Vessels WHERE Region = 'South China Sea';",SELECT MIN(Speed) FROM South_China_Sea_Vessels WHERE Prefix = 'CMA' AND Accidents > 0;,SELECT MIN(Speed) FROM South_China_Sea_Vessels WHERE Prefix = 'CMA' AND Year = 2016;,0 Tell me the highest interview for north carolina and evening gown more than 7.68,"CREATE TABLE table_name_19 (interview INTEGER, state VARCHAR, evening_gown VARCHAR);","SELECT MAX(interview) FROM table_name_19 WHERE state = ""north carolina"" AND evening_gown > 7.68;","SELECT MAX(interview) FROM table_name_19 WHERE state = ""north carolina"" AND evening_gown > 7.68;",1 What is the total revenue generated by second-hand products in Asia?,"CREATE TABLE vendors (vendor_id INT, vendor_name TEXT, region TEXT);CREATE TABLE products (product_id INT, product_name TEXT, price DECIMAL, second_hand BOOLEAN, vendor_id INT); ",SELECT SUM(price) FROM products JOIN vendors ON products.vendor_id = vendors.vendor_id WHERE second_hand = true AND region = 'Asia';,SELECT SUM(price) FROM products JOIN vendors ON products.vendor_id = vendors.vendor_id WHERE vendors.region = 'Asia' AND products.second_hand = true;,0 How many countries were sampled for the index in 2nd place in the LA ranking and 23rd in the world ranking?,"CREATE TABLE table_19948664_1 (countries_sampled VARCHAR, ranking_la__2_ VARCHAR, world_ranking__1_ VARCHAR);","SELECT countries_sampled FROM table_19948664_1 WHERE ranking_la__2_ = ""2nd"" AND world_ranking__1_ = ""23rd"";","SELECT COUNT(countries_sampled) FROM table_19948664_1 WHERE ranking_la__2_ = ""2nd"" AND world_ranking__1_ = ""23rd"";",0 "Show all storm names affecting region ""Denmark"".","CREATE TABLE region (region_id VARCHAR, region_name VARCHAR); CREATE TABLE affected_region (region_id VARCHAR, storm_id VARCHAR); CREATE TABLE storm (name VARCHAR, storm_id VARCHAR);",SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark';,"SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.region_id JOIN region AS T3 ON T2.region_id = T3.region_id WHERE T3.region_name = ""Denmark"";",0 Which aquaculture farms have had a decrease in production for three consecutive years?,"CREATE TABLE farm_production (farm_id INT, year INT, production INT); ","SELECT farm_id FROM (SELECT farm_id, production, LAG(production, 2) OVER (PARTITION BY farm_id ORDER BY year) AS lag_2, LAG(production, 1) OVER (PARTITION BY farm_id ORDER BY year) AS lag_1 FROM farm_production) AS subquery WHERE subquery.production < subquery.lag_1 AND subquery.lag_1 < subquery.lag_2;","SELECT farm_id, year, production, ROW_NUMBER() OVER (PARTITION BY farm_id ORDER BY year DESC) as rn FROM farm_production;",0 Please show the employee first names and ids of employees who serve at least 10 customers.,"CREATE TABLE CUSTOMER (FirstName VARCHAR, SupportRepId VARCHAR); CREATE TABLE EMPLOYEE (EmployeeId VARCHAR);","SELECT T1.FirstName, T1.SupportRepId FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) >= 10;","SELECT T1.FirstName, T1.EmployeeId FROM EMPLOYEE AS T1 JOIN CUSTOMER AS T2 ON T1.EmployeeId = T2.SupportRepId GROUP BY T1.EmployeeId HAVING COUNT(*) >= 10;",0 "Which Location /State has a Winner of craig lowndes, and a Date of 29–31 may?","CREATE TABLE table_name_67 (location___state VARCHAR, winner VARCHAR, date VARCHAR);","SELECT location___state FROM table_name_67 WHERE winner = ""craig lowndes"" AND date = ""29–31 may"";","SELECT location___state FROM table_name_67 WHERE winner = ""craig lowndes"" AND date = ""29–31 may"";",1 List the top 5 military equipment types by maintenance cost,"CREATE TABLE equipment_maintenance (equipment_type TEXT, maintenance_cost FLOAT); ","SELECT equipment_type, maintenance_cost FROM equipment_maintenance ORDER BY maintenance_cost DESC LIMIT 5;","SELECT equipment_type, maintenance_cost FROM equipment_maintenance ORDER BY maintenance_cost DESC LIMIT 5;",1 What is the average funding received by startups founded by people from a specific country in the cybersecurity sector?,"CREATE TABLE companies (id INT, name TEXT, industry TEXT, founder_country TEXT, funding FLOAT);",SELECT AVG(funding) FROM companies WHERE industry = 'cybersecurity' AND founder_country = 'country_name';,SELECT AVG(funding) FROM companies WHERE industry = 'Cybersecurity' AND founder_country = 'USA';,0 What is the average donation amount per donor from '2020' partitioned by 'region'?,"CREATE TABLE donations (donor_id INT, donation_amount DECIMAL(5,2), donation_date DATE, region VARCHAR(20)); ","SELECT region, AVG(donation_amount) avg_donation FROM (SELECT donor_id, donation_amount, donation_date, region, ROW_NUMBER() OVER (PARTITION BY donor_id ORDER BY donation_date) rn FROM donations WHERE EXTRACT(YEAR FROM donation_date) = 2020) x GROUP BY region;","SELECT region, AVG(donation_amount) as avg_donation FROM donations WHERE donation_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY region;",0 What is the minimum price of military communication systems sold by SecureComm to the US government?,"CREATE TABLE SecureComm.CommunicationSales (id INT, manufacturer VARCHAR(255), model VARCHAR(255), quantity INT, price DECIMAL(10,2), buyer_country VARCHAR(255), sale_date DATE);",SELECT MIN(price) FROM SecureComm.CommunicationSales WHERE buyer_country = 'United States';,SELECT MIN(price) FROM SecureComm.CommunicationSales WHERE buyer_country = 'USA';,0 What was the venue for the game on 18/03/2006?,"CREATE TABLE table_name_28 (venue VARCHAR, date VARCHAR);","SELECT venue FROM table_name_28 WHERE date = ""18/03/2006"";","SELECT venue FROM table_name_28 WHERE date = ""18/03/2006"";",1 What date did the episode air that had n/a for it's bbc three weekly ranking?,"CREATE TABLE table_24399615_4 (airdate VARCHAR, bbc_three_weekly_ranking VARCHAR);","SELECT airdate FROM table_24399615_4 WHERE bbc_three_weekly_ranking = ""N/A"";","SELECT airdate FROM table_24399615_4 WHERE bbc_three_weekly_ranking = ""N/A"";",1 Which genetic research experiments have been conducted in South America?,"CREATE SCHEMA if not exists genetics;CREATE TABLE if not exists genetics.experiments (id INT PRIMARY KEY, name VARCHAR(100), location VARCHAR(100)); ",SELECT DISTINCT name FROM genetics.experiments WHERE location = 'South America';,SELECT name FROM genetics.experiments WHERE location = 'South America';,0 What is the average engagement time for virtual tours in Canada and Australia?,"CREATE TABLE virtual_tours_ca_au (id INT, country VARCHAR(50), engagement_time INT); ","SELECT country, AVG(engagement_time) FROM virtual_tours_ca_au WHERE country IN ('Canada', 'Australia') GROUP BY country;","SELECT AVG(engagement_time) FROM virtual_tours_ca_au WHERE country IN ('Canada', 'Australia');",0 What is the total playtime of player 'Ella' in the VR game 'Pistol Whip'?,"CREATE TABLE vr_games_2 (id INT, player TEXT, game TEXT, playtime INT); ",SELECT SUM(playtime) FROM vr_games_2 WHERE player = 'Ella' AND game = 'Pistol Whip';,SELECT SUM(playtime) FROM vr_games_2 WHERE player = 'Ella' AND game = 'Pistol Whip';,1 What is the total number of publications from the Mathematics department?,"CREATE TABLE Faculty (FacultyID int, Name varchar(50), Department varchar(50), NumPublications int); ",SELECT SUM(NumPublications) FROM Faculty WHERE Department = 'Mathematics';,SELECT SUM(NumPublications) FROM Faculty WHERE Department = 'Mathematics';,1 "How many Bronzes have a Rank of 9, and a Silver larger than 2?","CREATE TABLE table_name_5 (bronze INTEGER, rank VARCHAR, silver VARCHAR);","SELECT SUM(bronze) FROM table_name_5 WHERE rank = ""9"" AND silver > 2;",SELECT SUM(bronze) FROM table_name_5 WHERE rank = 9 AND silver > 2;,0 What is the maximum score and corresponding game name for each game genre?,"CREATE TABLE scores (score_id INT, game_id INT, genre VARCHAR(50), player_name VARCHAR(50), score INT); ","SELECT genre, MAX(score) as max_score, (SELECT game_name FROM games WHERE games.game_id = scores.game_id) as game_name FROM scores GROUP BY genre;","SELECT genre, MAX(score) as max_score, game_name FROM scores GROUP BY genre;",0 Name the 1861 with 1851 of 5291,CREATE TABLE table_name_97 (Id VARCHAR);,"SELECT 1861 FROM table_name_97 WHERE 1851 = ""5291"";",SELECT 1861 FROM table_name_97 WHERE 1851 = 5291;,0 What is the minimum food safety score for restaurants in San Francisco?,"CREATE TABLE food_safety_inspections(restaurant VARCHAR(255), score INT, city VARCHAR(255)); ",SELECT MIN(score) FROM food_safety_inspections WHERE city = 'San Francisco';,SELECT MIN(score) FROM food_safety_inspections WHERE city = 'San Francisco';,1 What is the average new council number when the election result is smaller than 0?,"CREATE TABLE table_name_57 (new_council INTEGER, election_result INTEGER);",SELECT AVG(new_council) FROM table_name_57 WHERE election_result < 0;,SELECT AVG(new_council) FROM table_name_57 WHERE election_result 0;,0 Identify the total water consumption in liters for the state of California in January 2020,"CREATE TABLE water_usage (id INT, state VARCHAR(50), consumption FLOAT, date DATE); ",SELECT SUM(consumption) FROM water_usage WHERE state = 'California' AND date >= '2020-01-01' AND date <= '2020-01-31';,SELECT SUM(consumption) FROM water_usage WHERE state = 'California' AND date BETWEEN '2020-01-01' AND '2020-12-31';,0 List the names and number of ports of call for container ships in the Southern Ocean.,"CREATE TABLE container_ships (id INT, name VARCHAR(100), ports_of_call INT, region VARCHAR(50));","SELECT name, ports_of_call FROM container_ships WHERE region = 'Southern Ocean';","SELECT name, ports_of_call FROM container_ships WHERE region = 'Southern Ocean';",1 How many losses does the club with 539 points for have?,"CREATE TABLE table_1676073_13 (lost VARCHAR, points_for VARCHAR);","SELECT lost FROM table_1676073_13 WHERE points_for = ""539"";","SELECT lost FROM table_1676073_13 WHERE points_for = ""539"";",1 What is the final for middleweight –75 kg?,"CREATE TABLE table_name_88 (final VARCHAR, event VARCHAR);","SELECT final FROM table_name_88 WHERE event = ""middleweight –75 kg"";","SELECT final FROM table_name_88 WHERE event = ""middleweight –75 kg"";",1 What was the date of the game number 22?,"CREATE TABLE table_name_25 (date VARCHAR, game VARCHAR);",SELECT date FROM table_name_25 WHERE game = 22;,SELECT date FROM table_name_25 WHERE game = 22;,1 What is the total mass of all spacecraft manufactured by 'Galactic Corp.'?,"CREATE TABLE SpacecraftManufacturing (id INT, company VARCHAR(255), mass FLOAT); ",SELECT SUM(mass) FROM SpacecraftManufacturing WHERE company = 'Galactic Corp.';,SELECT SUM(mass) FROM SpacecraftManufacturing WHERE company = 'Galactic Corp.';,1 What is the maximum number of wins?,CREATE TABLE table_26222468_1 (wins INTEGER);,SELECT MAX(wins) FROM table_26222468_1;,SELECT MAX(wins) FROM table_26222468_1;,1 Who are the top 5 athletes with the highest participation in wellbeing programs?,"CREATE TABLE athletes (athlete_id INT, name VARCHAR(30), team VARCHAR(20)); CREATE TABLE wellbeing_programs (program_id INT, athlete_id INT, program_name VARCHAR(30)); ","SELECT athletes.name, COUNT(*) as program_count FROM athletes INNER JOIN wellbeing_programs ON athletes.athlete_id = wellbeing_programs.athlete_id GROUP BY athletes.name ORDER BY program_count DESC LIMIT 5;","SELECT a.name, COUNT(wp.athlete_id) as participation FROM athletes a JOIN wellbeing_programs wp ON a.athlete_id = wp.athlete_id GROUP BY a.name ORDER BY participation DESC LIMIT 5;",0 What is the round for bob randall?,"CREATE TABLE table_name_13 (round INTEGER, name VARCHAR);","SELECT AVG(round) FROM table_name_13 WHERE name = ""bob randall"";","SELECT SUM(round) FROM table_name_13 WHERE name = ""bob randall"";",0 Who was the opponent in week 3?,"CREATE TABLE table_name_34 (opponent VARCHAR, week VARCHAR);",SELECT opponent FROM table_name_34 WHERE week = 3;,SELECT opponent FROM table_name_34 WHERE week = 3;,1 "Show the number of public libraries in each county, ordered by the number of libraries in descending order","CREATE TABLE libraries (library_id INT, county_id INT, library_name TEXT);CREATE TABLE counties (county_id INT, county_name TEXT);","SELECT c.county_name, COUNT(l.library_id) FROM libraries l INNER JOIN counties c ON l.county_id = c.county_id GROUP BY c.county_name ORDER BY COUNT(l.library_id) DESC;","SELECT c.county_name, COUNT(l.library_id) as library_count FROM libraries l JOIN counties c ON l.county_id = c.county_id GROUP BY c.county_name ORDER BY library_count DESC;",0 What is the highest rank for a nation with 26 golds and over 17 silvers?,"CREATE TABLE table_name_39 (rank INTEGER, gold VARCHAR, silver VARCHAR);",SELECT MAX(rank) FROM table_name_39 WHERE gold = 26 AND silver > 17;,SELECT MAX(rank) FROM table_name_39 WHERE gold = 26 AND silver > 17;,1 What is the total revenue for each mobile plan type in the state of New York?,"CREATE TABLE mobile_revenue (id INT, plan_type VARCHAR(10), state VARCHAR(20), revenue DECIMAL(10,2));","SELECT plan_type, state, SUM(revenue) FROM mobile_revenue WHERE state = 'New York' GROUP BY plan_type;","SELECT plan_type, SUM(revenue) FROM mobile_revenue WHERE state = 'New York' GROUP BY plan_type;",0 "What opponent has 76,202 attendance ?","CREATE TABLE table_name_5 (opponent VARCHAR, attendance VARCHAR);","SELECT opponent FROM table_name_5 WHERE attendance = ""76,202"";","SELECT opponent FROM table_name_5 WHERE attendance = ""76,202"";",1 What is the total carbon footprint (in kg CO2) for each farm in FarmEmissions?,"CREATE TABLE FarmEmissions (farm_id INT, species VARCHAR(20), carbon_footprint FLOAT); ","SELECT farm_id, SUM(carbon_footprint) FROM FarmEmissions GROUP BY farm_id;","SELECT farm_id, SUM(carbon_footprint) FROM FarmEmissions GROUP BY farm_id;",1 What city was in 1889?,"CREATE TABLE table_name_97 (city VARCHAR, year VARCHAR);",SELECT city FROM table_name_97 WHERE year = 1889;,SELECT city FROM table_name_97 WHERE year = 1889;,1 What is the growth rate of virtual tour engagement in the 'attractions' category between Q1 2022 and Q2 2022?,"CREATE TABLE vt_engagement (id INT, quarter TEXT, category TEXT, views INT); ","SELECT (Q2_views - Q1_views) * 100.0 / Q1_views as growth_rate FROM (SELECT (SELECT views FROM vt_engagement WHERE quarter = 'Q2 2022' AND category = 'attractions') as Q2_views, (SELECT views FROM vt_engagement WHERE quarter = 'Q1 2022' AND category = 'attractions') as Q1_views) as subquery;","SELECT quarter, SUM(views) as total_views FROM vt_engagement WHERE category = 'attractions' AND quarter BETWEEN '2022-07-01' AND '2022-09-30' GROUP BY quarter;",0 "What is the title of the original airing on e4 May 2, 2010?","CREATE TABLE table_22170495_6 (title VARCHAR, original_airing_on_e4 VARCHAR);","SELECT title FROM table_22170495_6 WHERE original_airing_on_e4 = ""May 2, 2010"";","SELECT title FROM table_22170495_6 WHERE original_airing_on_e4 = ""May 2, 2010"";",1 which Province has a ICAO of vmmc?,"CREATE TABLE table_name_56 (province VARCHAR, icao VARCHAR);","SELECT province FROM table_name_56 WHERE icao = ""vmmc"";","SELECT province FROM table_name_56 WHERE icao = ""vmmc"";",1 Calculate the total waste generation rate for each province in Canada in the last quarter.,"CREATE TABLE canada_waste_rates (province VARCHAR(50), generation_rate NUMERIC(10,2), measurement_date DATE); ","SELECT province, SUM(generation_rate) total_rate FROM canada_waste_rates WHERE measurement_date >= DATEADD(quarter, -1, CURRENT_DATE) GROUP BY province, ROW_NUMBER() OVER (PARTITION BY province ORDER BY measurement_date DESC);","SELECT province, SUM(generation_rate) as total_generation_rate FROM canada_waste_rates WHERE measurement_date >= DATEADD(quarter, -1, GETDATE()) GROUP BY province;",0 "What is the total number of bronze a team with more than 0 silver, a total of 7 medals, and less than 1 gold medal has?","CREATE TABLE table_name_97 (bronze VARCHAR, gold VARCHAR, silver VARCHAR, total VARCHAR);",SELECT COUNT(bronze) FROM table_name_97 WHERE silver > 0 AND total = 7 AND gold < 1;,SELECT COUNT(bronze) FROM table_name_97 WHERE silver > 0 AND total = 7 AND gold 1;,0 "What is the total number of marine species found in the Pacific and Atlantic oceans, grouped by their conservation status (critically endangered, endangered, vulnerable, or least concern)?","CREATE TABLE marine_species (id INT, species VARCHAR(50), ocean VARCHAR(50), conservation_status VARCHAR(50)); ","SELECT ocean, conservation_status, COUNT(*) FROM marine_species WHERE ocean IN ('Pacific', 'Atlantic') GROUP BY ocean, conservation_status;","SELECT conservation_status, COUNT(*) FROM marine_species WHERE ocean IN ('Pacific', 'Atlantic') GROUP BY conservation_status;",0 "What was the parent magazine for the manga magazine, dengeki moeoh that was issued bimonthly?","CREATE TABLE table_name_6 (parent_magazine VARCHAR, title VARCHAR, frequency VARCHAR, magazine_type VARCHAR);","SELECT parent_magazine FROM table_name_6 WHERE frequency = ""bimonthly"" AND magazine_type = ""manga"" AND title = ""dengeki moeoh"";","SELECT parent_magazine FROM table_name_6 WHERE frequency = ""bimonthly"" AND magazine_type = ""manga"" AND title = ""dengeki moeoh"";",1 Insert a new threat actor 'Actor 4' last seen on '2021-08-05'.,"CREATE TABLE threat_actors (id INT, name VARCHAR(255), description TEXT, first_seen DATE, last_seen DATE); ","INSERT INTO threat_actors (id, name, description, first_seen, last_seen) VALUES (5, 'Actor 4', 'Description of Actor 4', NULL, '2021-08-05');","INSERT INTO threat_actors (name, description, first_seen, last_seen) VALUES (4, 'Actor 4', '2021-08-05');",0 What is the listed surface for the Championship of Toronto that had a runner-up outcome?,"CREATE TABLE table_name_56 (surface VARCHAR, outcome VARCHAR, championship VARCHAR);","SELECT surface FROM table_name_56 WHERE outcome = ""runner-up"" AND championship = ""toronto"";","SELECT surface FROM table_name_56 WHERE outcome = ""runner-up"" AND championship = ""toronto"";",1 Insert new record into recycling_rates table for location 'New York' and recycling rate 35%,"CREATE TABLE recycling_rates (location VARCHAR(50), rate DECIMAL(5,2));","INSERT INTO recycling_rates (location, rate) VALUES ('New York', 0.35);","INSERT INTO recycling_rates (location, rate) VALUES ('New York', 35%);",0 What is the average age of volunteers with engineering expertise?,"CREATE TABLE volunteers (volunteer_id INTEGER, name TEXT, age INTEGER, expertise TEXT); ",SELECT AVG(v.age) FROM volunteers v WHERE v.expertise = 'Engineering';,SELECT AVG(age) FROM volunteers WHERE expertise = 'Engineering';,0 What is the total number of public works projects completed in 2019 and 2020 for each district?,"CREATE TABLE PublicWorks (id INT, district VARCHAR(20), year INT, completed INT); ","SELECT district, COUNT(*) as num_projects FROM PublicWorks WHERE year IN (2019, 2020) GROUP BY district;","SELECT district, SUM(completed) FROM PublicWorks WHERE year IN (2019, 2020) GROUP BY district;",0 What is the maximum production rate of a single chemical in the African region?,"CREATE TABLE chemicals_produced (id INT, chemical_name VARCHAR(255), region VARCHAR(255), production_rate FLOAT); ",SELECT MAX(production_rate) FROM chemicals_produced WHERE region = 'Africa';,SELECT MAX(production_rate) FROM chemicals_produced WHERE region = 'Africa';,1 What is the number of climate adaptation projects and their total investment in Asia in the year 2019?,"CREATE TABLE climate_adaptation (project_name VARCHAR(50), country VARCHAR(50), year INT, investment INT); ","SELECT COUNT(*) as num_projects, SUM(investment) as total_investment FROM climate_adaptation WHERE year = 2019 AND country = 'Asia';","SELECT COUNT(*), SUM(investment) FROM climate_adaptation WHERE country = 'Asia' AND year = 2019;",0 What was the average AI investment per hotel in Africa in 2021?,"CREATE TABLE ai_investments (hotel_name VARCHAR(20), region VARCHAR(20), investment DECIMAL(10,2), investment_date DATE); ","SELECT region, AVG(investment) as avg_investment FROM ai_investments WHERE investment_date = '2021-01-01' AND region = 'Africa' GROUP BY region;",SELECT AVG(investment) FROM ai_investments WHERE region = 'Africa' AND YEAR(investment_date) = 2021;,0 What is the round number when the record is 15–7–1?,"CREATE TABLE table_name_68 (round VARCHAR, record VARCHAR);","SELECT COUNT(round) FROM table_name_68 WHERE record = ""15–7–1"";","SELECT round FROM table_name_68 WHERE record = ""15–7–1"";",0 "How many Points have a Record of 25–10–11, and a January larger than 28?","CREATE TABLE table_name_21 (points VARCHAR, record VARCHAR, january VARCHAR);","SELECT COUNT(points) FROM table_name_21 WHERE record = ""25–10–11"" AND january > 28;","SELECT COUNT(points) FROM table_name_21 WHERE record = ""25–10–11"" AND january > 28;",1 "What is the maximum number of labor hours worked by a single contractor in the city of Los Angeles, CA?","CREATE TABLE ConstructionLabor (LaborID INT, ContractorID INT, City TEXT, Hours INT); ","SELECT ContractorID, MAX(Hours) FROM ConstructionLabor WHERE City = 'Los Angeles' GROUP BY ContractorID;",SELECT MAX(Hours) FROM ConstructionLabor WHERE City = 'Los Angeles';,0 What is the average movie budget for films released between 2016 and 2018 in the Action genre?,"CREATE TABLE MOVIES (id INT, title VARCHAR(100), genre VARCHAR(50), release_year INT, budget INT); ",SELECT AVG(budget) as avg_budget FROM MOVIES WHERE genre = 'Action' AND release_year BETWEEN 2016 AND 2018;,SELECT AVG(budget) FROM MOVIES WHERE genre = 'Action' AND release_year BETWEEN 2016 AND 2018;,0 Find the names of stadiums that some Australian swimmers have been to.,"CREATE TABLE swimmer (id VARCHAR, nationality VARCHAR); CREATE TABLE record (swimmer_id VARCHAR, event_id VARCHAR); CREATE TABLE stadium (name VARCHAR, id VARCHAR); CREATE TABLE event (id VARCHAR, stadium_id VARCHAR);",SELECT t4.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id JOIN event AS t3 ON t2.event_id = t3.id JOIN stadium AS t4 ON t4.id = t3.stadium_id WHERE t1.nationality = 'Australia';,SELECT T1.name FROM stadium AS T1 JOIN swimmer AS T2 ON T1.id = T2.swimmer_id JOIN record AS T3 ON T2.event_id = T3.event_id JOIN event AS T4 ON T3.id = T4.event_id WHERE T4.nationality = 'Australian';,0 Name the nec record for 11th standing,"CREATE TABLE table_20774360_2 (nec_record VARCHAR, standing VARCHAR);","SELECT nec_record FROM table_20774360_2 WHERE standing = ""11th"";","SELECT nec_record FROM table_20774360_2 WHERE standing = ""11th"";",1 Who are the astronauts who have spent the most time in space?,"CREATE TABLE astronauts (id INT, name VARCHAR(255), total_days_in_space INT); ","SELECT name, total_days_in_space FROM astronauts ORDER BY total_days_in_space DESC LIMIT 1;","SELECT name, total_days_in_space FROM astronauts ORDER BY total_days_in_space DESC LIMIT 1;",1 "What is the highest position for Nelson, with a played entry of more than 24?","CREATE TABLE table_name_10 (position INTEGER, team VARCHAR, played VARCHAR);","SELECT MAX(position) FROM table_name_10 WHERE team = ""nelson"" AND played > 24;","SELECT MAX(position) FROM table_name_10 WHERE team = ""nelson"" AND played > 24;",1 What country placed t8 and scored 71-71-71=213?,"CREATE TABLE table_name_18 (country VARCHAR, place VARCHAR, score VARCHAR);","SELECT country FROM table_name_18 WHERE place = ""t8"" AND score = 71 - 71 - 71 = 213;","SELECT country FROM table_name_18 WHERE place = ""t8"" AND score = 71 - 71 - 71 = 213;",1 What is the name of the country that has 18 May 2004 as the date?,"CREATE TABLE table_name_27 (country VARCHAR, date VARCHAR);","SELECT country FROM table_name_27 WHERE date = ""18 may 2004"";","SELECT country FROM table_name_27 WHERE date = ""18 may 2004"";",1 "What are the top 3 most common vulnerabilities in the last month, by severity?","CREATE TABLE vulnerabilities (id INT, timestamp TIMESTAMP, severity VARCHAR(255), software VARCHAR(255)); ","SELECT severity, software, COUNT(*) as vulnerability_count FROM vulnerabilities WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 MONTH) GROUP BY severity, software ORDER BY vulnerability_count DESC LIMIT 3;","SELECT severity, COUNT(*) as count FROM vulnerabilities WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY severity ORDER BY count DESC LIMIT 3;",0 What is the total caloric intake of product X?,"CREATE TABLE Food (FoodID varchar(10), FoodName varchar(20), Calories int); ",SELECT SUM(Calories) FROM Food WHERE FoodID = 'X';,SELECT SUM(Calories) FROM Food WHERE FoodName = 'Product X';,0 What is the average rating of accessible technology initiatives in LATAM since 2020?,"CREATE TABLE accessibility_initiatives (initiative_id INT, initiative_name VARCHAR(50), region VARCHAR(50), rating FLOAT, launch_year INT); ","SELECT region, AVG(rating) as avg_rating FROM accessibility_initiatives WHERE launch_year >= 2020 AND region = 'LATAM' GROUP BY region;",SELECT AVG(rating) FROM accessibility_initiatives WHERE region = 'LATAM' AND launch_year >= 2020;,0 Name the average year for brookvale oval and margin more than 46,"CREATE TABLE table_name_99 (year INTEGER, venue VARCHAR, margin VARCHAR);","SELECT AVG(year) FROM table_name_99 WHERE venue = ""brookvale oval"" AND margin > 46;","SELECT AVG(year) FROM table_name_99 WHERE venue = ""brookvale oval"" AND margin > 46;",1 Insert a new pop song released in 2022 into the Songs table,"CREATE TABLE Songs (song_id INT, title TEXT, genre TEXT, release_date DATE, price DECIMAL(5,2));","INSERT INTO Songs (song_id, title, genre, release_date, price) VALUES (1001, 'New Pop Song', 'pop', '2022-10-15', 0.99);","INSERT INTO Songs (song_id, title, genre, release_date, price) VALUES (1, 'Pop', '2022-01-01', '2022-01-01', '2022-12-31');",0 Name the ensemble with silver medals more than 1,"CREATE TABLE table_name_21 (ensemble VARCHAR, silver_medals INTEGER);",SELECT ensemble FROM table_name_21 WHERE silver_medals > 1;,SELECT ensemble FROM table_name_21 WHERE silver_medals > 1;,1 What is the monthly transaction amount for the most active client in the Socially Responsible Lending database?,"CREATE TABLE clients (client_id INT, name TEXT, monthly_transactions INT); ",SELECT MAX(monthly_transactions) FROM clients;,SELECT monthly_transactions FROM clients ORDER BY monthly_transactions DESC LIMIT 1;,0 "What season was Barcelona ranked higher than 12, had more than 96 goals and had more than 26 apps?","CREATE TABLE table_name_59 (season VARCHAR, rank VARCHAR, goals VARCHAR, apps VARCHAR, club VARCHAR);","SELECT season FROM table_name_59 WHERE apps > 26 AND club = ""barcelona"" AND goals > 96 AND rank > 12;","SELECT season FROM table_name_59 WHERE apps > 26 AND club = ""barcelona"" AND rank > 12 AND goals > 96;",0 What is the total budget allocated for transportation projects in the Northeast region?,"CREATE TABLE transportation_projects (region VARCHAR(20), budget INT); ",SELECT SUM(budget) FROM transportation_projects WHERE region = 'Northeast';,SELECT SUM(budget) FROM transportation_projects WHERE region = 'Northeast';,1 Create a table for storing information about climate change conferences,"CREATE TABLE climate_conferences (conference_id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), start_date DATE, end_date DATE);","CREATE TABLE climate_conferences (conference_id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), start_date DATE, end_date DATE);","CREATE TABLE climate_conferences (conference_id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), start_date DATE, end_date DATE);",1 Delete records of chemical compounds with a safety_rating below 7,"CREATE TABLE chemical_compounds (id INT PRIMARY KEY, name VARCHAR(255), safety_rating INT);",DELETE FROM chemical_compounds WHERE safety_rating < 7;,DELETE FROM chemical_compounds WHERE safety_rating 7;,0 Identify the top 3 countries with the most virtual tour experiences.,"CREATE TABLE virtual_tour_experiences (tourist_id INT, country VARCHAR, num_experiences INT); CREATE VIEW top_3_countries AS SELECT country, SUM(num_experiences) AS total_experiences FROM virtual_tour_experiences GROUP BY country ORDER BY total_experiences DESC LIMIT 3;",SELECT * FROM top_3_countries;,"SELECT country, total_experiences FROM top_3_countries ORDER BY total_experiences DESC LIMIT 3;",0 What is the average water usage in the commercial sector over the past two years?,"CREATE TABLE water_usage (year INT, sector VARCHAR(20), usage INT); ","SELECT AVG(usage) FROM water_usage WHERE sector = 'commercial' AND year IN (2020, 2021);",SELECT AVG(usage) FROM water_usage WHERE sector = 'commercial' AND year BETWEEN (YEAR(CURRENT_DATE) - 2) AND YEAR(CURRENT_DATE);,0 Update all bus fares to 2.50.,"CREATE TABLE fares (id INT, type TEXT, amount DECIMAL, collection_date DATE); ",UPDATE fares SET amount = 2.50 WHERE type = 'Bus';,UPDATE fares SET amount = 2.50 WHERE type = 'Bus';,1 Add a new diversity metric for the company XYZ in the 'diversity_metrics' table,"CREATE TABLE diversity_metrics (company_name VARCHAR(50), gender VARCHAR(10), representation_percentage DECIMAL(5,2));","INSERT INTO diversity_metrics (company_name, gender, representation_percentage) VALUES ('XYZ', 'Non-binary', 12.50);","INSERT INTO diversity_metrics (company_name, gender, representation_percentage) VALUES ('XYZ', 'Female', 'Hispanic');",0 What country had the play Cyclops?,"CREATE TABLE table_name_15 (country VARCHAR, play VARCHAR);","SELECT country FROM table_name_15 WHERE play = ""cyclops"";","SELECT country FROM table_name_15 WHERE play = ""cyclops"";",1 How many wildlife species are present in each forest type?,"CREATE TABLE ForestTypes (id INT, name VARCHAR(255)); CREATE TABLE Wildlife (id INT, forest_type_id INT, species VARCHAR(255)); ","SELECT f.forest_type_id, f.name AS forest_type_name, COUNT(w.id) AS species_count FROM ForestTypes f LEFT JOIN Wildlife w ON f.id = w.forest_type_id GROUP BY f.id;","SELECT ForestTypes.name, COUNT(Wildlife.species) FROM ForestTypes INNER JOIN Wildlife ON ForestTypes.id = Wildlife.forest_type_id GROUP BY ForestTypes.name;",0 Find the number of exhibitions in Asia featuring artworks from the 'Fauvism' genre and the total revenue generated from sales of 'Impressionism' genre artworks in Germany.,"CREATE TABLE Artworks (ArtworkID INT, ArtworkName VARCHAR(50), Genre VARCHAR(20)); CREATE TABLE ExhibitionsArtworks (ExhibitionID INT, ArtworkID INT, Location VARCHAR(20)); CREATE TABLE Sales (SaleID INT, ArtworkID INT, Genre VARCHAR(20), Revenue FLOAT, Location VARCHAR(20)); ","SELECT COUNT(DISTINCT ExhibitionsArtworks.ExhibitionID), SUM(Sales.Revenue) FROM ExhibitionsArtworks INNER JOIN Sales ON ExhibitionsArtworks.ArtworkID = Sales.ArtworkID WHERE ExhibitionsArtworks.Location = 'Asia' AND Sales.Genre = 'Impressionism' AND Sales.Location = 'Germany';","SELECT COUNT(DISTINCT ExhibitionsArtworks.ExhibitionID) AS ExhibitionCount, SUM(Sales.Revenue) AS TotalRevenue FROM ExhibitionsArtworks INNER JOIN Artworks ON ExhibitionsArtworks.ArtworkID = Artworks.ArtworkID INNER JOIN Sales ON ExhibitionsArtworks.ExhibitionID = Sales.ArtworkID WHERE ExhibitionsArtworks.Genre = 'Fauvism' AND ExhibitionsArtworks.Location = 'Germany' AND ExhibitionsArtworks.Genre = 'Impressionism';",0 What is the race 12 hours in length?,"CREATE TABLE table_name_20 (race VARCHAR, length VARCHAR);","SELECT race FROM table_name_20 WHERE length = ""12 hours"";","SELECT race FROM table_name_20 WHERE length = ""12 hours"";",1 "Which Pos has a Make of chevrolet, and a Driver of jack sprague, and a Car # smaller than 2?","CREATE TABLE table_name_41 (pos INTEGER, car__number VARCHAR, make VARCHAR, driver VARCHAR);","SELECT SUM(pos) FROM table_name_41 WHERE make = ""chevrolet"" AND driver = ""jack sprague"" AND car__number < 2;","SELECT SUM(pos) FROM table_name_41 WHERE make = ""chevrolet"" AND driver = ""jack sprague"" AND car__number 2;",0 Which Nominated work has a Year of 1997?,"CREATE TABLE table_name_96 (nominated_work VARCHAR, year VARCHAR);",SELECT nominated_work FROM table_name_96 WHERE year = 1997;,SELECT nominated_work FROM table_name_96 WHERE year = 1997;,1 What is the average income of residents in the 'west' region?,"CREATE TABLE resident_income (id INT, region VARCHAR(20), income FLOAT); ",SELECT AVG(income) FROM resident_income WHERE region = 'west',SELECT AVG(income) FROM resident_income WHERE region = 'west';,0 "What is the production code of the episode before season 8, with a series number less than 31, and aired on September 21, 1995?","CREATE TABLE table_name_1 (production_code VARCHAR, original_air_date VARCHAR, season__number VARCHAR, series__number VARCHAR);","SELECT production_code FROM table_name_1 WHERE season__number < 8 AND series__number < 31 AND original_air_date = ""september 21, 1995"";","SELECT production_code FROM table_name_1 WHERE season__number 8 AND series__number 31 AND original_air_date = ""september 21, 1995"";",0 What is the value for the Wimbledon tournament in 1996?,CREATE TABLE table_name_92 (tournament VARCHAR);,"SELECT 1996 FROM table_name_92 WHERE tournament = ""wimbledon"";","SELECT 1996 FROM table_name_92 WHERE tournament = ""wimbledon"";",1 What is the sum of Preliminary scores where the interview score is 9.654 and the average score is lower than 9.733?,"CREATE TABLE table_name_84 (preliminary INTEGER, interview VARCHAR, average VARCHAR);",SELECT SUM(preliminary) FROM table_name_84 WHERE interview = 9.654 AND average < 9.733;,SELECT SUM(preliminary) FROM table_name_84 WHERE interview = 9.654 AND average 9.733;,0 "What was the value in 2008 when 2012 was 1R, 2010 was A, and 2005 was A?",CREATE TABLE table_name_1 (Id VARCHAR);,"SELECT 2008 FROM table_name_1 WHERE 2012 = ""1r"" AND 2010 = ""a"" AND 2005 = ""a"";","SELECT 2008 FROM table_name_1 WHERE 2012 = ""1r"" AND 2010 = ""a"" AND 2005 = ""a"";",1 Who is the winning driver of the race on 5 May?,"CREATE TABLE table_name_90 (winning_driver VARCHAR, date VARCHAR);","SELECT winning_driver FROM table_name_90 WHERE date = ""5 may"";","SELECT winning_driver FROM table_name_90 WHERE date = ""5 may"";",1 What is the average diameter at breast height (DBH) for trees in the temperate rainforest biome?,"CREATE TABLE biomes (biome_id INT PRIMARY KEY, name VARCHAR(50), area_km2 FLOAT); CREATE TABLE trees (tree_id INT PRIMARY KEY, species VARCHAR(50), biome_id INT, dbh FLOAT, FOREIGN KEY (biome_id) REFERENCES biomes(biome_id)); ",SELECT AVG(dbh) FROM trees WHERE biomes.name = 'Temperate Rainforest';,SELECT AVG(t.dbh) FROM trees t JOIN biomes b ON t.biome_id = b.biome_id WHERE b.name = 'Temperate Rainforest';,0 What is the license award date for North East England?,"CREATE TABLE table_10712301_5 (licence_award_date VARCHAR, region VARCHAR);","SELECT licence_award_date FROM table_10712301_5 WHERE region = ""North East England"";","SELECT license_award_date FROM table_10712301_5 WHERE region = ""North East England"";",0 What is the total area of all wildlife habitats in the forestry database?,"CREATE TABLE habitat (id INT, name VARCHAR(255), area FLOAT); CREATE TABLE region (id INT, name VARCHAR(255), habitat_id INT); ",SELECT SUM(h.area) FROM habitat h JOIN region r ON h.id = r.habitat_id;,SELECT SUM(habitat.area) FROM habitat INNER JOIN region ON habitat.id = region.habitat_id;,0 What was the series number of the episode directed by Rob Bailey?,"CREATE TABLE table_14346689_1 (series__number INTEGER, directed_by VARCHAR);","SELECT MAX(series__number) FROM table_14346689_1 WHERE directed_by = ""Rob Bailey"";","SELECT MAX(series__number) FROM table_14346689_1 WHERE directed_by = ""Rob Bailey"";",1 What was the average finish the year Bodine finished 3rd?,"CREATE TABLE table_2387790_2 (avg_finish VARCHAR, position VARCHAR);","SELECT avg_finish FROM table_2387790_2 WHERE position = ""3rd"";","SELECT avg_finish FROM table_2387790_2 WHERE position = ""3rd"";",1 Which Spanish voice actor does the same character as French voice actor Véronique Desmadryl?,"CREATE TABLE table_name_36 (spanish_voice_actor VARCHAR, french_voice_actor VARCHAR);","SELECT spanish_voice_actor FROM table_name_36 WHERE french_voice_actor = ""véronique desmadryl"";","SELECT spanish_voice_actor FROM table_name_36 WHERE french_voice_actor = ""véronique desmadryl"";",1 Who was the Man of the Match when the opponent was Milton Keynes Lightning and the venue was Away?,"CREATE TABLE table_name_19 (man_of_the_match VARCHAR, opponent VARCHAR, venue VARCHAR);","SELECT man_of_the_match FROM table_name_19 WHERE opponent = ""milton keynes lightning"" AND venue = ""away"";","SELECT man_of_the_match FROM table_name_19 WHERE opponent = ""milton keynes lightning"" AND venue = ""away"";",1 "Find products with max page size as ""A4"" and pages per minute color smaller than 5.","CREATE TABLE product (product VARCHAR, max_page_size VARCHAR, pages_per_minute_color VARCHAR);","SELECT product FROM product WHERE max_page_size = ""A4"" AND pages_per_minute_color < 5;","SELECT product FROM product WHERE max_page_size = ""A4"" AND pages_per_minute_color 5;",0 "What is the average cost of renewable energy infrastructure for projects in the 'renewable_energy' schema, grouped by infrastructure type?","CREATE TABLE renewable_energy (project_id INT, infrastructure_type TEXT, cost FLOAT); ","SELECT infrastructure_type, AVG(cost) FROM renewable_energy WHERE project_id IN (SELECT project_id FROM projects WHERE schema_name = 'renewable_energy') GROUP BY infrastructure_type;","SELECT infrastructure_type, AVG(cost) FROM renewable_energy GROUP BY infrastructure_type;",0 Which rider had less than 342 points in no more than 76 rides in 7 matches with more than 2 bonus points?,"CREATE TABLE table_name_37 (rider VARCHAR, bonus_pts VARCHAR, matches VARCHAR, total_points VARCHAR, rides VARCHAR);",SELECT rider FROM table_name_37 WHERE total_points < 342 AND rides < 76 AND matches = 7 AND bonus_pts > 2;,SELECT rider FROM table_name_37 WHERE total_points 342 AND rides 76 AND matches > 7 AND bonus_pts > 2;,0 "What is the average rating of hotels in the US, grouped by city?","CREATE TABLE hotels (hotel_id INT, hotel_name TEXT, city TEXT, rating FLOAT, country TEXT); ","SELECT city, AVG(rating) FROM hotels WHERE country = 'USA' GROUP BY city;","SELECT city, AVG(rating) FROM hotels WHERE country = 'USA' GROUP BY city;",1 How many time does the platelet count occur when prothrombin time and bleeding time are prolonged?,"CREATE TABLE table_221653_1 (platelet_count VARCHAR, prothrombin_time VARCHAR, bleeding_time VARCHAR);","SELECT COUNT(platelet_count) FROM table_221653_1 WHERE prothrombin_time = ""Prolonged"" AND bleeding_time = ""Prolonged"";","SELECT platelet_count FROM table_221653_1 WHERE prothrombin_time = ""prolonged"" AND bleeding_time = ""prolonged"";",0 "Who played the Rams on October 2, 2005?","CREATE TABLE table_name_22 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_22 WHERE date = ""october 2, 2005"";","SELECT opponent FROM table_name_22 WHERE date = ""october 2, 2005"";",1 What is the average number of military personnel per base in each country?,"CREATE TABLE military_bases (id INT, name VARCHAR(255), country VARCHAR(255), num_personnel INT); ","SELECT country, AVG(num_personnel) as avg_personnel FROM military_bases GROUP BY country;","SELECT country, AVG(num_personnel) FROM military_bases GROUP BY country;",0 What is the highest overall pick number for george nicula who had a pick smaller than 9?,"CREATE TABLE table_name_35 (overall INTEGER, name VARCHAR, pick VARCHAR);","SELECT MAX(overall) FROM table_name_35 WHERE name = ""george nicula"" AND pick < 9;","SELECT MAX(overall) FROM table_name_35 WHERE name = ""george nicula"" AND pick 9;",0 What are the most common types of cybersecurity incidents in the technology sector in the past month and their total number of occurrences?,"CREATE TABLE sector_incidents (id INT, incident_type VARCHAR(255), sector VARCHAR(255), incident_date DATE, affected_assets INT); ","SELECT incident_type, SUM(affected_assets) as total_occurrences FROM sector_incidents WHERE sector = 'Technology' AND incident_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY incident_type ORDER BY total_occurrences DESC;","SELECT incident_type, COUNT(*) as total_occurrences FROM sector_incidents WHERE sector = 'Technology' AND incident_date >= DATEADD(month, -1, GETDATE()) GROUP BY incident_type ORDER BY total_occurrences DESC LIMIT 1;",0 What was the streak on April 12?,"CREATE TABLE table_name_77 (streak VARCHAR, date VARCHAR);","SELECT streak FROM table_name_77 WHERE date = ""april 12"";","SELECT streak FROM table_name_77 WHERE date = ""april 12"";",1 What is the least number of goals scored in the play-offs among the players that have scored 2 in the FA Cup?,"CREATE TABLE table_name_43 (play_offs INTEGER, fa_cup VARCHAR);",SELECT MIN(play_offs) FROM table_name_43 WHERE fa_cup = 2;,SELECT MIN(play_offs) FROM table_name_43 WHERE fa_cup = 2;,1 "What is the average age of athletes in each sport, ordered by the average age?","CREATE TABLE athletes (athlete_id INT, name VARCHAR(50), age INT, sport VARCHAR(30)); ","SELECT sport, AVG(age) as avg_age FROM athletes GROUP BY sport ORDER BY avg_age;","SELECT sport, AVG(age) as avg_age FROM athletes GROUP BY sport ORDER BY avg_age DESC;",0 Calculate the total sales of vegetarian items,"CREATE TABLE menu (item_id INT, item_name VARCHAR(255), is_vegetarian BOOLEAN, price DECIMAL(5,2)); ",SELECT SUM(price) FROM menu WHERE is_vegetarian = TRUE;,SELECT SUM(price) FROM menu WHERE is_vegetarian = true;,0 What is the average life expectancy in rural areas of Canada?,"CREATE TABLE Demographics (ID INT, Population VARCHAR(10), LifeExpectancy FLOAT, AreaType VARCHAR(10)); ",SELECT AVG(LifeExpectancy) FROM Demographics WHERE AreaType = 'Rural';,SELECT AVG(LifeExpectancy) FROM Demographics WHERE AreaType = 'Rural';,1 What is the average time to resolve security incidents for each region in the last month?,"CREATE TABLE incident_resolution (id INT, region TEXT, resolution_time INT, incident_date DATE); ","SELECT region, AVG(resolution_time) as avg_resolution_time FROM incident_resolution WHERE incident_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) GROUP BY region;","SELECT region, AVG(resolution_time) as avg_resolution_time FROM incident_resolution WHERE incident_date >= DATEADD(month, -1, GETDATE()) GROUP BY region;",0 "Which Years in Orlando has a Nationality of united states, and a Player of doug overton?","CREATE TABLE table_name_43 (years_in_orlando VARCHAR, nationality VARCHAR, player VARCHAR);","SELECT years_in_orlando FROM table_name_43 WHERE nationality = ""united states"" AND player = ""doug overton"";","SELECT years_in_orlando FROM table_name_43 WHERE nationality = ""united states"" AND player = ""doug overton"";",1 What was the total revenue from the 'Organic Cotton' fabric type for the first quarter of 2022?,"CREATE TABLE sales_fabric_2 (sale_id INT, sale_date DATE, fabric VARCHAR(20), revenue FLOAT); ",SELECT SUM(revenue) FROM sales_fabric_2 WHERE fabric = 'Organic Cotton' AND sale_date BETWEEN '2022-01-01' AND '2022-03-31';,SELECT SUM(revenue) FROM sales_fabric_2 WHERE fabric = 'Organic Cotton' AND sale_date BETWEEN '2022-01-01' AND '2022-03-31';,1 Which opponent has april 2 as the date?,"CREATE TABLE table_name_93 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_93 WHERE date = ""april 2"";","SELECT opponent FROM table_name_93 WHERE date = ""april 2"";",1 What is the total revenue for products that are both vegan and organic in the USA?,"CREATE TABLE Products (product_id INT, product_name TEXT, vegan BOOLEAN, organic BOOLEAN, country TEXT); ",SELECT SUM(price * quantity_sold) AS revenue FROM Products WHERE country = 'USA' AND vegan = TRUE AND organic = TRUE;,SELECT SUM(revenue) FROM Products WHERE vegan = TRUE AND organic = TRUE AND country = 'USA';,0 What is the total number of education programs conducted?,"CREATE TABLE education_programs (region TEXT, program_count INTEGER); ",SELECT SUM(program_count) FROM education_programs;,SELECT SUM(program_count) FROM education_programs;,1 List all athletes who participated in the wellbeing program but did not have any injuries in the last season.,"CREATE TABLE AthleteWellbeing (AthleteID INT, ProgramName VARCHAR(50)); CREATE TABLE AthleteInjuries (AthleteID INT, InjuryDate DATE);","SELECT AthleteID FROM AthleteWellbeing WHERE AthleteID NOT IN (SELECT AthleteID FROM AthleteInjuries WHERE InjuryDate >= DATEADD(YEAR, -1, GETDATE()));","SELECT AthleteID FROM AthleteWellbeing INNER JOIN AthleteInjuries ON AthleteWellbeing.AthleteID = AthleteInjuries.AthleteID WHERE AthleteWellbeing.ProgramName = 'Wellbeing' AND AthleteInjuries.InjuriesDate >= DATEADD(year, -1, GETDATE());",0 What is the rank of Canada in terms of the number of tourists visiting from North America?,"CREATE TABLE tourism (visitor_continent VARCHAR(50), host_country VARCHAR(50), number_of_tourists INT); ","SELECT host_country, RANK() OVER (ORDER BY number_of_tourists DESC) as rank FROM tourism WHERE visitor_continent = 'North America';","SELECT host_country, SUM(number_of_tourists) as total_tourists FROM tourism WHERE visitor_continent = 'North America' GROUP BY host_country;",0 List the top 3 cultural heritage sites in Tokyo by visitor count.,"CREATE TABLE cultural_sites (site_id INT, name TEXT, city TEXT, visitors INT); ","SELECT name, visitors FROM cultural_sites WHERE city = 'Tokyo' ORDER BY visitors DESC LIMIT 3;","SELECT name, visitors FROM cultural_sites WHERE city = 'Tokyo' ORDER BY visitors DESC LIMIT 3;",1 What are the names and locations of all marine life research stations deeper than 3500 meters?,"CREATE TABLE marine_life (id INT, name TEXT, location TEXT, depth FLOAT); ","SELECT name, location FROM marine_life WHERE depth > 3500;","SELECT name, location FROM marine_life WHERE depth > 3500;",1 What class year was Vencie Glenn from? ,"CREATE TABLE table_22982552_9 (class_year INTEGER, player VARCHAR);","SELECT MIN(class_year) FROM table_22982552_9 WHERE player = ""Vencie Glenn"";","SELECT MAX(class_year) FROM table_22982552_9 WHERE player = ""Vencie Glenn"";",0 Which countries have received the most humanitarian aid in the form of food and water?,"CREATE TABLE aid_recipients (id INT, country VARCHAR(50), aid_type VARCHAR(20), quantity INT); ","SELECT country, SUM(quantity) FROM aid_recipients WHERE aid_type IN ('food', 'water') GROUP BY country ORDER BY SUM(quantity) DESC;","SELECT country, SUM(quantity) as total_aid FROM aid_recipients WHERE aid_type IN ('food', 'water') GROUP BY country ORDER BY total_aid DESC LIMIT 1;",0 What is the bowling score of season 1907?,"CREATE TABLE table_name_23 (bowling VARCHAR, season VARCHAR);","SELECT bowling FROM table_name_23 WHERE season = ""1907"";",SELECT bowling FROM table_name_23 WHERE season = 1907;,0 What was the record for the game before game 6 against the chicago black hawks?,"CREATE TABLE table_name_54 (record VARCHAR, game VARCHAR, opponent VARCHAR);","SELECT record FROM table_name_54 WHERE game < 6 AND opponent = ""chicago black hawks"";","SELECT record FROM table_name_54 WHERE game 6 AND opponent = ""chicago black hawks"";",0 What is the average threat intelligence score for European countries in the past month?,"CREATE TABLE threat_intelligence (threat_id INT, score INT, country VARCHAR(50), last_updated DATE);","SELECT AVG(score) FROM threat_intelligence WHERE country IN ('Austria', 'Belgium', 'Czech Republic', 'Denmark', 'Estonia', 'Finland', 'France', 'Germany', 'Greece', 'Hungary', 'Ireland', 'Italy', 'Latvia', 'Lithuania', 'Luxembourg', 'Malta', 'Netherlands', 'Poland', 'Portugal', 'Slovakia', 'Slovenia', 'Spain', 'Sweden') AND last_updated >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);","SELECT AVG(score) FROM threat_intelligence WHERE country IN ('Germany', 'France', 'Italy') AND last_updated >= DATEADD(month, -1, GETDATE());",0 "What is the difference in average time spent on the platform, per player, between players who made a purchase in the last month and those who did not, for each platform?","CREATE TABLE PlayerPurchaseTime (PlayerID INT, Platform VARCHAR(10), AvgTime FLOAT, Purchase DATE); ","SELECT a.Platform, AVG(a.AvgTime - b.AvgTime) as AvgTimeDifference FROM PlayerPurchaseTime a, PlayerPurchaseTime b WHERE a.Platform = b.Platform AND a.Purchase >= CURRENT_DATE - INTERVAL 1 MONTH AND b.Purchase < CURRENT_DATE - INTERVAL 1 MONTH GROUP BY a.Platform;","SELECT Platform, AVG(AvgTime) - (SELECT AVG(AvgTime) FROM PlayerPurchaseTime WHERE Purchase >= DATEADD(month, -1, GETDATE())) AS AvgTimeDifference FROM PlayerPurchaseTime WHERE Purchase >= DATEADD(month, -1, GETDATE()) GROUP BY Platform;",0 What are the average ticket prices for each team?,"CREATE TABLE teams (team_id INT, team_name VARCHAR(255)); CREATE TABLE ticket_sales (team_id INT, price DECIMAL(5,2)); ","SELECT team_name, AVG(price) as avg_price FROM ticket_sales JOIN teams ON ticket_sales.team_id = teams.team_id GROUP BY team_name;","SELECT teams.team_name, AVG(ticket_sales.price) as avg_price FROM teams INNER JOIN ticket_sales ON teams.team_id = ticket_sales.team_id GROUP BY teams.team_name;",0 How many students with 'Hearing' disabilities are there in each department?,"CREATE TABLE Students (Id INT, Name VARCHAR(50), Department VARCHAR(50), DisabilityType VARCHAR(50), Accommodations VARCHAR(50)); ","SELECT Department, COUNT(*) AS CountOfStudents FROM Students WHERE DisabilityType = 'Hearing' GROUP BY Department;","SELECT Department, COUNT(*) FROM Students WHERE DisabilityType = 'Hearing' GROUP BY Department;",0 How many genetic research projects were completed in H2 2021?,"CREATE SCHEMA if not exists genetics;CREATE TABLE if not exists genetics.project_timeline (id INT, project_id INT, phase VARCHAR(50), start_date DATE, end_date DATE); ",SELECT COUNT(*) FROM genetics.project_timeline WHERE phase = 'Execution' AND start_date <= '2021-12-31' AND end_date >= '2021-07-01';,SELECT COUNT(*) FROM genetics.project_timeline WHERE phase = 'H2 2021' AND end_date BETWEEN '2021-01-01' AND '2021-06-30';,0 What's the number of the episode directed by Whitney Ransick?,"CREATE TABLE table_2345558_1 (_number VARCHAR, director VARCHAR);","SELECT _number FROM table_2345558_1 WHERE director = ""Whitney Ransick"";","SELECT _number FROM table_2345558_1 WHERE director = ""Whitney Ransick"";",1 Which wells had drilling operations started in 2019?,"CREATE TABLE drilling_operations (drill_id INT, well_id INT, start_date DATE, end_date DATE, status VARCHAR(50)); ",SELECT well_id FROM drilling_operations WHERE start_date BETWEEN '2019-01-01' AND '2019-12-31' GROUP BY well_id;,SELECT well_id FROM drilling_operations WHERE start_date BETWEEN '2019-01-01' AND '2019-12-31' AND status = 'Started';,0 "for the rank of 3 for the united states, what is the average lane?","CREATE TABLE table_name_8 (lane INTEGER, nationality VARCHAR, rank VARCHAR);","SELECT AVG(lane) FROM table_name_8 WHERE nationality = ""united states"" AND rank = 3;","SELECT AVG(lane) FROM table_name_8 WHERE nationality = ""united states"" AND rank = ""3"";",0 Determine the percentage of sustainable orders for each customer by the total number of orders?,"CREATE TABLE customer_orders (order_id INT, customer_id INT, customer_country VARCHAR(255), sustainable_order BOOLEAN); ","SELECT customer_country, 100.0 * SUM(CASE WHEN sustainable_order THEN 1 ELSE 0 END) OVER (PARTITION BY customer_country) / COUNT(*) OVER (PARTITION BY customer_country) as percentage_sustainable_orders FROM customer_orders;","SELECT customer_country, (COUNT(*) FILTER (WHERE sustainable_order = TRUE) * 100.0 / COUNT(*)) as sustainable_percentage FROM customer_orders GROUP BY customer_country;",0 "Which state has a Reason for termination of retirement, and an Active service of 1926–1928?","CREATE TABLE table_name_34 (state VARCHAR, reason_for_termination VARCHAR, active_service VARCHAR);","SELECT state FROM table_name_34 WHERE reason_for_termination = ""retirement"" AND active_service = ""1926–1928"";","SELECT state FROM table_name_34 WHERE reason_for_termination = ""retirement"" AND active_service = ""1926–1928"";",1 "What is the number of employees by mine, gender, and role?","CREATE TABLE mine (id INT, name VARCHAR(50), location VARCHAR(50)); CREATE TABLE employee (id INT, mine_id INT, gender VARCHAR(10), role VARCHAR(20), salary INT);","SELECT mine.name, employee.gender, employee.role, COUNT(employee.id) FROM employee JOIN mine ON employee.mine_id = mine.id GROUP BY mine.name, employee.gender, employee.role;","SELECT m.name, e.gender, e.role, COUNT(e.id) FROM mine m JOIN employee e ON m.id = e.mine_id GROUP BY m.name, e.gender, e.role;",0 Which To par has a Place in 8?,"CREATE TABLE table_name_68 (to_par VARCHAR, place VARCHAR);","SELECT to_par FROM table_name_68 WHERE place = ""8"";","SELECT to_par FROM table_name_68 WHERE place = ""8"";",1 Which union represents the company with the most workplace safety violations?,"CREATE TABLE unions (id INT, name VARCHAR(50)); CREATE TABLE companies (id INT, name VARCHAR(50), union_id INT, safety_violations INT); ","SELECT unions.name, MAX(companies.safety_violations) FROM unions JOIN companies ON unions.id = companies.union_id GROUP BY unions.name ORDER BY MAX(companies.safety_violations) DESC LIMIT 1;","SELECT u.name, SUM(c.safety_violations) as total_violations FROM unions u JOIN companies c ON u.id = c.union_id GROUP BY u.name ORDER BY total_violations DESC LIMIT 1;",0 Delete all records from the explainable_ai table where the fairness_score is less than 0.7.,"CREATE TABLE explainable_ai (record_id INT, algorithm_name TEXT, fairness_score REAL); ",DELETE FROM explainable_ai WHERE fairness_score < 0.7;,DELETE FROM explainable_ai WHERE fairness_score 0.7;,0 who guest starred on the episode with a 1.44m rating,"CREATE TABLE table_29135051_3 (guest_s_ VARCHAR, ratings VARCHAR);","SELECT guest_s_ FROM table_29135051_3 WHERE ratings = ""1.44m"";","SELECT guest_s_ FROM table_29135051_3 WHERE ratings = ""1.44m"";",1 "How many volunteers are engaged in each program, based on the 'Volunteers' and 'VolunteerPrograms' tables?","CREATE TABLE Volunteers (VolunteerID INT, Name TEXT); CREATE TABLE VolunteerPrograms (VolunteerID INT, ProgramID INT); ","SELECT VolunteerPrograms.ProgramID, COUNT(DISTINCT Volunteers.VolunteerID) as VolunteerCount FROM VolunteerPrograms INNER JOIN Volunteers ON VolunteerPrograms.VolunteerID = Volunteers.VolunteerID GROUP BY VolunteerPrograms.ProgramID;","SELECT VolunteerPrograms.ProgramName, COUNT(Volunteers.VolunteerID) FROM Volunteers INNER JOIN VolunteerPrograms ON Volunteers.VolunteerID = VolunteerPrograms.VolunteerID GROUP BY VolunteerPrograms.ProgramName;",0 "What years have goals less than 229, and 440 as matches?","CREATE TABLE table_name_70 (years VARCHAR, goals VARCHAR, matches VARCHAR);",SELECT years FROM table_name_70 WHERE goals < 229 AND matches = 440;,SELECT years FROM table_name_70 WHERE goals 229 AND matches = 440;,0 Which week has Game site of Candlestick Park?,"CREATE TABLE table_name_32 (week VARCHAR, game_site VARCHAR);","SELECT week FROM table_name_32 WHERE game_site = ""candlestick park"";","SELECT week FROM table_name_32 WHERE game_site = ""candlestick park"";",1 What is the Delivered as name of the H3 Locomotive?,"CREATE TABLE table_name_64 (delivered_as VARCHAR, locomotive VARCHAR);","SELECT delivered_as FROM table_name_64 WHERE locomotive = ""h3"";","SELECT delivered_as FROM table_name_64 WHERE locomotive = ""h3"";",1 What is the average price of Fair Trade certified cotton products?,"CREATE TABLE cotton_products (product_id INT, name VARCHAR(255), price DECIMAL(5,2), certification VARCHAR(50)); ",SELECT AVG(price) FROM cotton_products WHERE certification = 'Fair Trade';,SELECT AVG(price) FROM cotton_products WHERE certification = 'Fair Trade';,1 What is the maximum and minimum age of volunteers in each program?,"CREATE TABLE VolunteerPrograms (VolunteerID INT, VolunteerAge INT, VolunteerGender VARCHAR(10), ProgramID INT); ","SELECT ProgramID, MIN(VolunteerAge), MAX(VolunteerAge) FROM VolunteerPrograms GROUP BY ProgramID;","SELECT ProgramID, MAX(VolunteerAge) as MaxVolunteerAge, MIN(VolunteerAge) as MinVolunteerAge FROM VolunteerPrograms GROUP BY ProgramID;",0 "Who directed the episode that originally aired on January 15, 2008?","CREATE TABLE table_13301516_1 (directed_by VARCHAR, original_air_date VARCHAR);","SELECT directed_by FROM table_13301516_1 WHERE original_air_date = ""January 15, 2008"";","SELECT directed_by FROM table_13301516_1 WHERE original_air_date = ""January 15, 2008"";",1 "What is the largest amount of wins when there are less than 5 points, the class is 500cc, the team is norton, and the year is more recent than 1955?","CREATE TABLE table_name_1 (wins INTEGER, year VARCHAR, team VARCHAR, points VARCHAR, class VARCHAR);","SELECT MAX(wins) FROM table_name_1 WHERE points < 5 AND class = ""500cc"" AND team = ""norton"" AND year > 1955;","SELECT MAX(wins) FROM table_name_1 WHERE points 5 AND class = ""500cc"" AND team = ""norton"" AND year > 1955;",0 Which users have been locked out of their accounts more than 3 times in the past day?,"CREATE TABLE account_lockouts (id INT, user VARCHAR(255), lockout_count INT, lockout_date DATE);","SELECT user FROM account_lockouts WHERE lockout_count > 3 AND lockout_date >= DATEADD(day, -1, GETDATE()) GROUP BY user HAVING COUNT(*) > 1;","SELECT user FROM account_lockouts WHERE lockout_count > 3 AND lockout_date >= DATEADD(day, -1, GETDATE());",0 How many mental health parity cases were reported in each region in 2020?,"CREATE TABLE MentalHealthParity (Id INT, Region VARCHAR(20), ReportDate DATE); ","SELECT Region, COUNT(*) as CountOfCases FROM MentalHealthParity WHERE YEAR(ReportDate) = 2020 GROUP BY Region;","SELECT Region, COUNT(*) FROM MentalHealthParity WHERE YEAR(ReportDate) = 2020 GROUP BY Region;",0 How many financial capability programs have been launched in each region in the past year?,"CREATE TABLE financial_capability_programs (program_id INT, launch_date DATE, region TEXT); CREATE TABLE financial_capability_launches (launch_id INT, program_id INT);","SELECT fcp.region, COUNT(fcp.program_id) FROM financial_capability_programs fcp JOIN financial_capability_launches fcl ON fcp.program_id = fcl.program_id WHERE fcp.launch_date >= DATEADD(year, -1, CURRENT_DATE()) GROUP BY fcp.region;","SELECT region, COUNT(*) FROM financial_capability_programs INNER JOIN financial_capability_launches ON financial_capability_programs.program_id = financial_capability_launches.program_id WHERE launch_date >= DATEADD(year, -1, GETDATE()) GROUP BY region;",0 In 1978 what is the NFL team?,"CREATE TABLE table_name_30 (nfl_team VARCHAR, draft_year VARCHAR);",SELECT nfl_team FROM table_name_30 WHERE draft_year = 1978;,SELECT nfl_team FROM table_name_30 WHERE draft_year = 1978;,1 "When is it has 15,557 Attendances?","CREATE TABLE table_name_35 (date VARCHAR, attendance VARCHAR);","SELECT date FROM table_name_35 WHERE attendance = ""15,557"";","SELECT date FROM table_name_35 WHERE attendance = ""15,557"";",1 What is the name of the astronaut with the highest number of space missions?,"CREATE TABLE Astronauts (Id INT, Name VARCHAR(50), NumberOfMissions INT); ","SELECT Name FROM (SELECT Name, ROW_NUMBER() OVER (ORDER BY NumberOfMissions DESC) AS Rank FROM Astronauts) AS Subquery WHERE Rank = 1",SELECT Name FROM Astronauts ORDER BY NumberOfMissions DESC LIMIT 1;,0 What is the total transaction value per week for the past year?,"CREATE TABLE transactions (transaction_date DATE, transaction_value DECIMAL(10, 2)); ","SELECT WEEK(transaction_date) as week, YEAR(transaction_date) as year, SUM(transaction_value) as total_transaction_value FROM transactions WHERE transaction_date >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR) GROUP BY week, year;","SELECT EXTRACT(WEEK FROM transaction_date) AS week, SUM(transaction_value) AS total_transaction_value FROM transactions WHERE transaction_date >= DATEADD(year, -1, GETDATE()) GROUP BY week;",0 WHAT IS THE NAME WITH 01.0 10 light street?,"CREATE TABLE table_name_63 (name VARCHAR, street_address VARCHAR);","SELECT name FROM table_name_63 WHERE street_address = ""01.0 10 light street"";","SELECT name FROM table_name_63 WHERE street_address = ""01.0 10 light street"";",1 What is the average energy demand and the corresponding energy source for locations with a demand greater than 7000 in the energy_demand and renewable_generation tables?,"CREATE TABLE renewable_generation (id INT, source VARCHAR(255), capacity FLOAT, location VARCHAR(255)); CREATE TABLE energy_demand (id INT, location VARCHAR(255), demand FLOAT, timestamp DATETIME); ","SELECT e.location, r.source, AVG(e.demand) as avg_demand FROM renewable_generation r RIGHT JOIN energy_demand e ON r.location = e.location WHERE e.demand > 7000.0 GROUP BY e.location, r.source;","SELECT AVG(energy_demand.demand) as avg_demand, renewable_generation.source FROM renewable_generation INNER JOIN energy_demand ON renewable_generation.location = energy_demand.location WHERE renewable_generation.capacity > 7000;",0 What was the attendance on september 29?,"CREATE TABLE table_name_83 (attendance INTEGER, date VARCHAR);","SELECT MAX(attendance) FROM table_name_83 WHERE date = ""september 29"";","SELECT SUM(attendance) FROM table_name_83 WHERE date = ""september 29"";",0 Show all home cities except for those having a driver older than 40.,"CREATE TABLE driver (home_city VARCHAR, age INTEGER);",SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age > 40;,SELECT home_city FROM driver WHERE age 40;,0 What is the maximum yield for strains in the 'Sativa' category?,"CREATE TABLE strains (id INT, name TEXT, category TEXT, yield FLOAT); ",SELECT MAX(yield) FROM strains WHERE category = 'Sativa';,SELECT MAX(yield) FROM strains WHERE category = 'Sativa';,1 "Show the total number of food safety violations for each region, excluding any regions with zero violations.","CREATE TABLE violations (id INT, region TEXT, violation_type TEXT, date DATE);","SELECT region, COUNT(*) as total_violations FROM violations GROUP BY region HAVING total_violations > 0;","SELECT region, COUNT(*) as total_violations FROM violations WHERE violation_type = 'Food Safety' GROUP BY region HAVING COUNT(*) > 0;",0 What was Raymond Floyd's score?,"CREATE TABLE table_name_58 (score VARCHAR, player VARCHAR);","SELECT score FROM table_name_58 WHERE player = ""raymond floyd"";","SELECT score FROM table_name_58 WHERE player = ""raymond floyd"";",1 "Identify the top 3 countries with the highest number of decentralized applications, along with the total number of transactions for the applications registered in each country.","CREATE TABLE dapps (dapp_id INT, dapp_name VARCHAR(255), total_transactions INT, industry_category VARCHAR(255), country_name VARCHAR(255));","SELECT country_name, SUM(total_transactions) as total_transactions, COUNT(dapp_id) as num_dapps FROM dapps GROUP BY country_name ORDER BY total_transactions DESC, num_dapps DESC;","SELECT country_name, SUM(total_transactions) as total_transactions FROM dapps GROUP BY country_name ORDER BY total_transactions DESC LIMIT 3;",0 What is the country of origin of the artist who is female and produced a song in Bangla?,"CREATE TABLE artist (country VARCHAR, artist_name VARCHAR, gender VARCHAR); CREATE TABLE song (artist_name VARCHAR, languages VARCHAR);","SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = ""Female"" AND T2.languages = ""bangla"";","SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.gender = ""Female"" AND T2.language = ""Bangla"";",0 "What is the total number of critical vulnerabilities by country, ordered by the number of vulnerabilities?","CREATE TABLE vulnerabilities (id INT, date DATE, severity VARCHAR(10), ip VARCHAR(15), country VARCHAR(30)); ","SELECT country, severity, COUNT(*) as vulnerability_count FROM vulnerabilities WHERE severity = 'critical' GROUP BY country ORDER BY vulnerability_count DESC;","SELECT country, COUNT(*) as total_vulnerabilities FROM vulnerabilities GROUP BY country ORDER BY total_vulnerabilities DESC;",0 "What is the total value of transactions for community development focused accounts in the 'community_development' schema's 'transactions' table, excluding transactions made within the last 60 days?","CREATE TABLE community_development.transactions (transaction_id INT, account_number INT, transaction_amount DECIMAL(10, 2), transaction_date DATE); ",SELECT SUM(transaction_amount) FROM community_development.transactions WHERE account_number IN (SELECT account_number FROM community_development.accounts WHERE is_community_development = true) AND transaction_date < NOW() - INTERVAL '60 days';,"SELECT SUM(transaction_amount) FROM community_development.transactions WHERE transaction_date >= DATEADD(day, -60, GETDATE());",0 What's the maximum supply for TokenX?,"CREATE TABLE tokens (id INT PRIMARY KEY, name VARCHAR(255), max_supply BIGINT); ",SELECT max_supply FROM tokens WHERE name = 'TokenX';,SELECT MAX(max_supply) FROM tokens WHERE name = 'TokenX';,0 How many countries are there in total?,CREATE TABLE country (Id VARCHAR);,SELECT COUNT(*) FROM country;,SELECT COUNT(*) FROM country;,1 Which class has fewer than 10 and number(s) names?,"CREATE TABLE table_name_84 (class VARCHAR, quantity VARCHAR, number_s_ VARCHAR);","SELECT class FROM table_name_84 WHERE quantity < 10 AND number_s_ = ""names"";","SELECT class FROM table_name_84 WHERE quantity 10 AND number_s_ = ""names"";",0 List the names of all copper mines in Peru that produced more than 8000 tons last year.,"CREATE TABLE mines (id INT, name TEXT, location TEXT, production_volume INT, year INT); ",SELECT name FROM mines WHERE location = 'Peru' AND production_volume > 8000 AND mineral = 'copper' AND year = 2020;,SELECT name FROM mines WHERE location = 'Peru' AND production_volume > 8000 AND year = 2021;,0 "What is the average week rank with 1.2 ratings, less than 1.94 million viewers, and a night rank less than 11?","CREATE TABLE table_name_53 (rank__week_ INTEGER, rank__night_ VARCHAR, rating VARCHAR, viewers__millions_ VARCHAR);",SELECT AVG(rank__week_) FROM table_name_53 WHERE rating = 1.2 AND viewers__millions_ < 1.94 AND rank__night_ < 11;,"SELECT AVG(rank__week_) FROM table_name_53 WHERE rating = ""1.2"" AND viewers__millions_ 1.94 AND rank__night_ 11;",0 What is the total revenue generated by each online travel agency (OTA) for bookings in Paris in the last quarter?,"CREATE TABLE otas (ota_id INT, ota_name TEXT, bookings INT, revenue INT); CREATE TABLE bookings (booking_id INT, ota_id INT, city TEXT, booking_date DATE); ","SELECT ota_name, SUM(revenue) as total_revenue FROM otas JOIN bookings ON otas.ota_id = bookings.ota_id WHERE city = 'Paris' AND booking_date >= '2022-01-01' AND booking_date < '2022-04-01' GROUP BY ota_name;","SELECT ota_name, SUM(revenue) FROM otas JOIN bookings ON otas.ota_id = bookings.ota_id WHERE bookings.city = 'Paris' AND bookings.booking_date >= DATEADD(quarter, -1, GETDATE()) GROUP BY ota_name;",0 "What event was in New Orleans, Louisiana, USA?","CREATE TABLE table_name_55 (event VARCHAR, location VARCHAR);","SELECT event FROM table_name_55 WHERE location = ""new orleans, louisiana, usa"";","SELECT event FROM table_name_55 WHERE location = ""new orleans, louisiana, usa"";",1 Show the number of events and total attendees by year,"CREATE TABLE events_attendees_2 (event_id INT, attendee_id INT, event_date DATE); ","SELECT YEAR(event_date) AS year, COUNT(DISTINCT event_id) AS num_events, COUNT(DISTINCT attendee_id) AS num_attendees FROM events_attendees_2 GROUP BY year;","SELECT year, COUNT(event_id) as event_count, SUM(attendee_id) as total_attendees FROM events_attendees_2 GROUP BY year;",0 Who won the Men's Doubles when Guo Xin won the Women's Singles?,"CREATE TABLE table_12164707_1 (mens_doubles VARCHAR, womens_singles VARCHAR);","SELECT mens_doubles FROM table_12164707_1 WHERE womens_singles = ""Guo Xin"";","SELECT mens_doubles FROM table_12164707_1 WHERE womens_singles = ""Guo Xin"";",1 Find the number of military equipment sales by month for 2022 and display the result in a YYYY-MM format.,"CREATE TABLE MonthlySales (sale_id INT, equipment_type VARCHAR(50), sale_value FLOAT, sale_date DATE); ","SELECT DATE_FORMAT(sale_date, '%Y-%m') AS SaleMonth, COUNT(*) AS SalesCount FROM MonthlySales WHERE YEAR(sale_date) = 2022 GROUP BY SaleMonth;","SELECT EXTRACT(MONTH FROM sale_date) AS month, COUNT(*) AS equipment_sales FROM MonthlySales WHERE EXTRACT(YEAR FROM sale_date) = 2022 GROUP BY month;",0 Identify the top 3 strains with the highest average retail price in California dispensaries during Q1 2022.,"CREATE TABLE strains (id INT, name TEXT, type TEXT); CREATE TABLE sales (id INT, strain_id INT, retail_price DECIMAL, sale_date DATE, state TEXT); ","SELECT name, AVG(retail_price) FROM (SELECT name, retail_price, ROW_NUMBER() OVER (PARTITION BY name ORDER BY retail_price DESC) rn FROM sales WHERE state = 'California' AND sale_date >= '2022-01-01' AND sale_date < '2022-04-01') tmp WHERE rn <= 3 GROUP BY name ORDER BY AVG(retail_price) DESC;","SELECT s.name, AVG(s.retail_price) as avg_price FROM strains s JOIN sales s ON s.id = s.strain_id WHERE s.state = 'California' AND s.sale_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY s.name ORDER BY avg_price DESC LIMIT 3;",0 What was the date of airing for episodes with ratings under 10.1 and production number of 96 5-09?,"CREATE TABLE table_name_74 (original_airing VARCHAR, rating VARCHAR, episode_number_production_number VARCHAR);","SELECT original_airing FROM table_name_74 WHERE rating < 10.1 AND episode_number_production_number = ""96 5-09"";","SELECT original_airing FROM table_name_74 WHERE rating 10.1 AND episode_number_production_number = ""96 5-09"";",0 Tell me the highest PI GP with pick # greater than 159 and reg GP more than 0,"CREATE TABLE table_name_97 (pl_gp INTEGER, pick__number VARCHAR, reg_gp VARCHAR);",SELECT MAX(pl_gp) FROM table_name_97 WHERE pick__number > 159 AND reg_gp > 0;,SELECT MAX(pl_gp) FROM table_name_97 WHERE pick__number > 159 AND reg_gp > 0;,1 "What is the highest goal for a GEO nat., that ended after 2010?","CREATE TABLE table_name_6 (goals INTEGER, nat VARCHAR, ends VARCHAR);","SELECT MAX(goals) FROM table_name_6 WHERE nat = ""geo"" AND ends > 2010;","SELECT MAX(goals) FROM table_name_6 WHERE nat = ""geo"" AND ends > 2010;",1 "Which December has Points of 38, and a Record of 18–6–2?","CREATE TABLE table_name_49 (december INTEGER, points VARCHAR, record VARCHAR);","SELECT AVG(december) FROM table_name_49 WHERE points = 38 AND record = ""18–6–2"";","SELECT AVG(december) FROM table_name_49 WHERE points = 38 AND record = ""18–6–2"";",1 List all permits and the number of labor violations for each permit,"CREATE TABLE building_permits (permit_id INT); CREATE TABLE labor_stats (permit_id INT, violation VARCHAR(100));","SELECT bp.permit_id, COUNT(ls.permit_id) AS num_violations FROM building_permits bp LEFT JOIN labor_stats ls ON bp.permit_id = ls.permit_id GROUP BY bp.permit_id;","SELECT bp.permit_id, COUNT(ls.violation) as num_violations FROM building_permits bp INNER JOIN labor_stats ls ON bp.permit_id = ls.permit_id GROUP BY bp.permit_id;",0 "Identify the carbon offset programs with a budget over $1,000,000 in the United States?","CREATE TABLE Carbon_Offset_Programs (program_id INT, location VARCHAR(50), budget FLOAT); ","SELECT program_id, location, budget FROM Carbon_Offset_Programs WHERE budget > 1000000.0 AND location = 'United States';","SELECT program_id, location, budget FROM Carbon_Offset_Programs WHERE budget > 1000000 AND location = 'United States';",0 How many financial capability training sessions were held in the Asia region?,"CREATE TABLE financial_capability_training (session_id INT, region VARCHAR(255), date DATE); ",SELECT COUNT(*) FROM financial_capability_training WHERE region = 'Asia';,SELECT COUNT(*) FROM financial_capability_training WHERE region = 'Asia';,1 List sustainable sourcing practices for seafood by restaurant location.,"CREATE TABLE sourcing (restaurant_id INT, item_id INT, source VARCHAR(255)); CREATE TABLE seafood (item_id INT, name VARCHAR(255)); CREATE TABLE restaurants (restaurant_id INT, name VARCHAR(255), location VARCHAR(255)); ","SELECT r.location, s.source FROM sourcing s JOIN seafood se ON s.item_id = se.item_id JOIN restaurants r ON s.restaurant_id = r.restaurant_id WHERE se.name LIKE '%seafood%';","SELECT r.location, s.source FROM sourcing s JOIN seafood s ON s.item_id = s.item_id JOIN restaurants r ON s.restaurant_id = r.restaurant_id GROUP BY r.location, s.source;",0 What was the away team score at kardinia park?,"CREATE TABLE table_name_40 (away_team VARCHAR, venue VARCHAR);","SELECT away_team AS score FROM table_name_40 WHERE venue = ""kardinia park"";","SELECT away_team AS score FROM table_name_40 WHERE venue = ""kardinia park"";",1 What is the maximum water temperature recorded for each farm?,"CREATE TABLE FarmTemp (FarmID int, Date date, WaterTemp float); ","SELECT FarmID, MAX(WaterTemp) as MaxTemp FROM FarmTemp GROUP BY FarmID;","SELECT FarmID, MAX(WaterTemp) FROM FarmTemp GROUP BY FarmID;",0 What is the annual production of Cerium and Promethium from 2017 to 2020?,"CREATE TABLE production (year INT, element VARCHAR(10), quantity INT); ","SELECT year, SUM(quantity) FROM production WHERE element IN ('Cerium', 'Promethium') GROUP BY year;","SELECT element, SUM(quantity) as total_quantity FROM production WHERE element IN ('Cerium', 'Promethium') AND year BETWEEN 2017 AND 2020 GROUP BY element;",0 What is the total of First Season games with 1537 Wins and a Season greater than 109?,"CREATE TABLE table_name_71 (first_season INTEGER, wins VARCHAR, seasons VARCHAR);",SELECT SUM(first_season) FROM table_name_71 WHERE wins = 1537 AND seasons > 109;,SELECT SUM(first_season) FROM table_name_71 WHERE wins = 1537 AND seasons > 109;,1 How many defense projects were negotiated with the Australian government in the last 3 years?,"CREATE TABLE ContractNegotiations (id INT, contractor VARCHAR(255), government VARCHAR(255), contract_value INT, negotiation_date DATE); ","SELECT COUNT(*) FROM ContractNegotiations WHERE government = 'Australian Government' AND negotiation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR);","SELECT COUNT(*) FROM ContractNegotiations WHERE government = 'Australia' AND negotiation_date >= DATEADD(year, -3, GETDATE());",0 Which of the airport names contains the word 'international'?,CREATE TABLE airport (name VARCHAR);,SELECT name FROM airport WHERE name LIKE '%international%';,SELECT name FROM airport WHERE name LIKE '%international%';,1 What is the total billing amount for cases handled by attorneys who have the word 'Partner' in their title?,"CREATE TABLE attorneys (attorney_id INT, title TEXT); CREATE TABLE cases (case_id INT, attorney_id INT, billing_amount INT);",SELECT SUM(cases.billing_amount) FROM cases INNER JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.title LIKE '%Partner%';,SELECT SUM(billing_amount) FROM cases JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.title LIKE '%Partner%';,0 "What is the lowest Year, when Venue is Rio De Janeiro, Brazil?","CREATE TABLE table_name_42 (year INTEGER, venue VARCHAR);","SELECT MIN(year) FROM table_name_42 WHERE venue = ""rio de janeiro, brazil"";","SELECT MIN(year) FROM table_name_42 WHERE venue = ""rio de janeiro, brazil"";",1 What was the total sales revenue for 'DrugC' in the 'USA' region in Q2 2020?,"CREATE TABLE sales_data (drug VARCHAR(50), region VARCHAR(50), quarter INT, year INT, revenue FLOAT); ",SELECT SUM(revenue) FROM sales_data WHERE drug = 'DrugC' AND region = 'USA' AND quarter = 2 AND year = 2020;,SELECT SUM(revenue) FROM sales_data WHERE drug = 'DrugC' AND region = 'USA' AND quarter = 2 AND year = 2020;,1 What is the percentage of patients with Diabetes in New York who are over 40 years old?,"CREATE TABLE Patients (ID INT, Age INT, Disease VARCHAR(20), State VARCHAR(20)); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Patients WHERE Disease = 'Diabetes' AND State = 'New York')) FROM Patients WHERE Age > 40 AND Disease = 'Diabetes' AND State = 'New York';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Patients WHERE Disease = 'Diabetes' AND State = 'New York')) AS Percentage FROM Patients WHERE Disease = 'Diabetes' AND Age > 40 AND State = 'New York';,0 What is the minimum number of shares for posts in Turkish?,"CREATE TABLE posts (id INT, language VARCHAR(255), shares INT); ",SELECT MIN(shares) FROM posts WHERE language = 'Turkish';,SELECT MIN(shares) FROM posts WHERE language = 'Turkish';,1 What is the total number of Points- when the Sets- is larger than 51?,"CREATE TABLE table_name_56 (points_ VARCHAR, sets_ INTEGER);",SELECT COUNT(points_) FROM table_name_56 WHERE sets_ > 51;,SELECT COUNT(points_) FROM table_name_56 WHERE sets_ > 51;,1 In what place did the player with a score of 66-67=133 come in?,"CREATE TABLE table_name_98 (place VARCHAR, score VARCHAR);",SELECT place FROM table_name_98 WHERE score = 66 - 67 = 133;,SELECT place FROM table_name_98 WHERE score = 66 - 67 = 133;,1 Find the average budget for digital divide projects in South America.,"CREATE TABLE digital_divide_projects (id INT, project_name VARCHAR(50), location VARCHAR(50), budget INT); ",SELECT AVG(budget) FROM digital_divide_projects WHERE location LIKE 'South%';,SELECT AVG(budget) FROM digital_divide_projects WHERE location = 'South America';,0 "what's the maximum position with winnings  $50,000","CREATE TABLE table_10160447_1 (position INTEGER, winnings VARCHAR);","SELECT MAX(position) FROM table_10160447_1 WHERE winnings = ""$50,000"";","SELECT MAX(position) FROM table_10160447_1 WHERE winnings = ""50,000"";",0 What was the nationality for the player in Round 1?,"CREATE TABLE table_name_11 (nationality VARCHAR, round VARCHAR);",SELECT nationality FROM table_name_11 WHERE round = 1;,SELECT nationality FROM table_name_11 WHERE round = 1;,1 What is the minimum age of members who do pilates workouts?,"CREATE TABLE Members (MemberID INT, Age INT, FavoriteExercise VARCHAR(20)); ",SELECT MIN(Age) FROM Members WHERE FavoriteExercise = 'Pilates';,SELECT MIN(Age) FROM Members WHERE FavoriteExercise = 'Pilates';,1 What is the number of 2011 populations having a 2002 population of 29449?,"CREATE TABLE table_2562572_2 (population__2011_ VARCHAR, population__2002_ VARCHAR);",SELECT COUNT(population__2011_) FROM table_2562572_2 WHERE population__2002_ = 29449;,SELECT COUNT(population__2011_) FROM table_2562572_2 WHERE population__2002_ = 29449;,1 Name the polyunsaturated fat with total fat of 100g and saturated fat of 7g,"CREATE TABLE table_name_39 (polyunsaturated_fat VARCHAR, total_fat VARCHAR, saturated_fat VARCHAR);","SELECT polyunsaturated_fat FROM table_name_39 WHERE total_fat = ""100g"" AND saturated_fat = ""7g"";","SELECT polyunsaturated_fat FROM table_name_39 WHERE total_fat = ""100g"" AND saturated_fat = ""7g"";",1 "What is the average depth of the seas in the 'oceanographic_data' table, excluding the Mediterranean Sea?""","CREATE TABLE oceanographic_data (sea_name VARCHAR(50), avg_depth DECIMAL(5,2));",SELECT AVG(avg_depth) FROM oceanographic_data WHERE sea_name != 'Mediterranean Sea';,SELECT AVG(avg_depth) FROM oceanographic_data WHERE sea_name!= 'Mediterranean Sea';,0 How many escorts does the nation with 6 cruisers have?,"CREATE TABLE table_name_74 (escorts VARCHAR, cruisers VARCHAR);","SELECT escorts FROM table_name_74 WHERE cruisers = ""6"";",SELECT escorts FROM table_name_74 WHERE cruisers = 6;,0 What is the position for outgoing manager alfredo merino,"CREATE TABLE table_27495117_3 (position_in_table VARCHAR, outgoing_manager VARCHAR);","SELECT position_in_table FROM table_27495117_3 WHERE outgoing_manager = ""Alfredo Merino"";","SELECT position_in_table FROM table_27495117_3 WHERE outgoing_manager = ""Alfredo Merino"";",1 "What is Authors, when Novelty is Gen Et Sp Nov, and when Name is Lanthanocephalus?","CREATE TABLE table_name_13 (authors VARCHAR, novelty VARCHAR, name VARCHAR);","SELECT authors FROM table_name_13 WHERE novelty = ""gen et sp nov"" AND name = ""lanthanocephalus"";","SELECT authors FROM table_name_13 WHERE novelty = ""gen esp nov"" AND name = ""lanthanocephalus"";",0 Name the opponent for 2-27-10,"CREATE TABLE table_22875369_3 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_22875369_3 WHERE date = ""2-27-10"";","SELECT opponent FROM table_22875369_3 WHERE date = ""2-27-10"";",1 Delete records of teams that have not won any championships,"CREATE TABLE teams (id INT, name VARCHAR(50), sport VARCHAR(50), location VARCHAR(50)); CREATE TABLE championships (championship_id INT, team_id INT, year INT); ",DELETE FROM teams WHERE id NOT IN (SELECT team_id FROM championships);,DELETE FROM teams WHERE id NOT IN (SELECT team_id FROM championships);,1 On July 25 what is the lowest attendance with the Brewers as the opponent?,"CREATE TABLE table_name_26 (attendance INTEGER, opponent VARCHAR, date VARCHAR);","SELECT MIN(attendance) FROM table_name_26 WHERE opponent = ""brewers"" AND date = ""july 25"";","SELECT MIN(attendance) FROM table_name_26 WHERE opponent = ""brewers"" AND date = ""july 25"";",1 Calculate the average loan amount disbursed to microfinance clients in the Southeast Asian region,"CREATE TABLE loan_disbursals (id INT PRIMARY KEY, client_name VARCHAR(100), region VARCHAR(50), loan_amount DECIMAL(10, 2)); ",SELECT AVG(loan_amount) FROM loan_disbursals WHERE region = 'Southeast Asia';,SELECT AVG(loan_amount) FROM loan_disbursals WHERE region = 'Southeast Asia';,1 "What is the total revenue for each menu category this month, with a 15% discount applied?","CREATE TABLE menu (category VARCHAR(255), price NUMERIC); ","SELECT category, SUM(price * 0.85) FROM menu GROUP BY category;","SELECT category, SUM(price) as total_revenue FROM menu WHERE price = '15%' GROUP BY category;",0 What is the total tonnage of all cargo handled by vessels with the 'Tanker' type?,"CREATE TABLE vessels(id INT, name VARCHAR(50), type VARCHAR(50)); CREATE TABLE cargo_handling(vessel_id INT, cargo_type VARCHAR(50), tonnage INT, handling_date DATE); ",SELECT SUM(cargo_handling.tonnage) FROM cargo_handling INNER JOIN vessels ON cargo_handling.vessel_id = vessels.id WHERE vessels.type = 'Tanker';,SELECT SUM(cargo_handling.tonnage) FROM cargo_handling INNER JOIN vessels ON cargo_handling.vessel_id = vessels.id WHERE vessels.type = 'Tanker';,1 "Create a view named ""freshwater_sources"" that shows all freshwater sources from the ""water_sources"" table","CREATE TABLE water_sources (id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255), type VARCHAR(255), location VARCHAR(255));",CREATE VIEW freshwater_sources AS SELECT * FROM water_sources WHERE type = 'Freshwater Lake' OR type = 'Freshwater River' OR type = 'Freshwater Reservoir';,CREATE VIEW freshwater_sources AS SELECT * FROM water_sources;,0 What is the total revenue for each product category in 2021?,"CREATE TABLE sales (sale_id INT, product_category VARCHAR(50), sale_date DATE, revenue DECIMAL(10,2));","SELECT product_category, SUM(revenue) AS total_revenue FROM sales WHERE sale_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY product_category;","SELECT product_category, SUM(revenue) as total_revenue FROM sales WHERE sale_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY product_category;",0 What is the name of the factory in 'Brazil' with the highest number of workers?,"CREATE TABLE factories_workers_2 (id INT, factory_id INT, name VARCHAR(50), country VARCHAR(50), worker_count INT); ",SELECT name FROM factories_workers_2 WHERE country = 'Brazil' AND worker_count = (SELECT MAX(worker_count) FROM factories_workers_2 WHERE country = 'Brazil');,SELECT name FROM factories_workers_2 WHERE country = 'Brazil' ORDER BY worker_count DESC LIMIT 1;,0 What school did bo jackson attend?,"CREATE TABLE table_name_96 (school VARCHAR, player VARCHAR);","SELECT school FROM table_name_96 WHERE player = ""bo jackson"";","SELECT school FROM table_name_96 WHERE player = ""bo jackson"";",1 "Find the max, average and min training hours of all players.",CREATE TABLE Player (HS INTEGER);,"SELECT AVG(HS), MAX(HS), MIN(HS) FROM Player;","SELECT MAX(HS), AVG(HS), MIN(HS) FROM Player;",0 When 2 is the k-band what is the v-band?,"CREATE TABLE table_186468_1 (v_band VARCHAR, k_band VARCHAR);","SELECT v_band FROM table_186468_1 WHERE k_band = ""2"";",SELECT v_band FROM table_186468_1 WHERE k_band = 2;,0 Name the date for score of 95-101,"CREATE TABLE table_17432028_1 (date VARCHAR, score VARCHAR);","SELECT date FROM table_17432028_1 WHERE score = ""95-101"";","SELECT date FROM table_17432028_1 WHERE score = ""95-101"";",1 What is the maximum production cost for items made of recycled polyester?,"CREATE TABLE products (id INT, name TEXT, material TEXT, production_cost FLOAT); ",SELECT MAX(production_cost) FROM products WHERE material = 'Recycled Polyester';,SELECT MAX(production_cost) FROM products WHERE material = 'Recycled Polyester';,1 What position did he finish in 2012?,"CREATE TABLE table_name_59 (position VARCHAR, year VARCHAR);",SELECT position FROM table_name_59 WHERE year = 2012;,SELECT position FROM table_name_59 WHERE year = 2012;,1 For the Year 2013 what building(s) had more than 15 Floors?,"CREATE TABLE table_name_81 (building VARCHAR, floors VARCHAR, year VARCHAR);","SELECT building FROM table_name_81 WHERE floors > 15 AND year = ""2013"";",SELECT building FROM table_name_81 WHERE floors > 15 AND year = 2013;,0 Find the number of successful contract negotiations with Saudi Arabia for each year since 2015.,"CREATE TABLE contract_negotiations(id INT, country VARCHAR(50), contractor VARCHAR(50), negotiation_date DATE, status VARCHAR(50)); ","SELECT YEAR(negotiation_date), COUNT(*) FROM contract_negotiations WHERE country = 'Saudi Arabia' AND status = 'Successful' GROUP BY YEAR(negotiation_date);","SELECT EXTRACT(YEAR FROM negotiation_date) AS year, COUNT(*) AS successful_negotiations FROM contract_negotiations WHERE country = 'Saudi Arabia' AND status = 'Successful' GROUP BY year;",0 What is the total number of concert tickets sold in the city of 'Sydney' in the year of 2022?,"CREATE TABLE concert_sales (id INT, artist VARCHAR(255), city VARCHAR(255), date DATE, tickets_sold INT); ",SELECT SUM(tickets_sold) FROM concert_sales WHERE city = 'Sydney' AND YEAR(date) = 2022;,SELECT SUM(tickets_sold) FROM concert_sales WHERE city = 'Sydney' AND YEAR(date) = 2022;,1 Find policy types with more than one policyholder living in 'FL'.,"CREATE TABLE policyholders (id INT, name TEXT, state TEXT, policy_type TEXT, premium FLOAT); ","SELECT policy_type, COUNT(DISTINCT name) as num_policyholders FROM policyholders WHERE state = 'FL' GROUP BY policy_type HAVING num_policyholders > 1;",SELECT policy_type FROM policyholders WHERE state = 'FL' GROUP BY policy_type HAVING COUNT(*) > 1;,0 What is the minimum annual wage for each mining occupation in Chile?,"CREATE TABLE mining_occupations (id INT, occupation VARCHAR(50), country VARCHAR(20), annual_wage DECIMAL(10,2), total_employees INT); ","SELECT occupation, MIN(annual_wage) FROM mining_occupations WHERE country = 'Chile' GROUP BY occupation;","SELECT occupation, MIN(annual_wage) FROM mining_occupations WHERE country = 'Chile' GROUP BY occupation;",1 What team did the Chicago Black Hawks visit on April 20?,"CREATE TABLE table_name_92 (home VARCHAR, visitor VARCHAR, date VARCHAR);","SELECT home FROM table_name_92 WHERE visitor = ""chicago black hawks"" AND date = ""april 20"";","SELECT home FROM table_name_92 WHERE visitor = ""chicago black hawks"" AND date = ""april 20"";",1 Which royal house has the name huai?,"CREATE TABLE table_name_88 (royal_house VARCHAR, name VARCHAR);","SELECT royal_house FROM table_name_88 WHERE name = ""huai"";","SELECT royal_house FROM table_name_88 WHERE name = ""huai"";",1 What is the NCBI Accession Number for the length of 5304bp/377aa?,"CREATE TABLE table_16849531_2 (ncbi_accession_number__mrna_protein_ VARCHAR, length__bp_aa_ VARCHAR);","SELECT ncbi_accession_number__mrna_protein_ FROM table_16849531_2 WHERE length__bp_aa_ = ""5304bp/377aa"";","SELECT ncbi_accession_number__mrna_protein_ FROM table_16849531_2 WHERE length__bp_aa_ = ""5304bp/377aa"";",1 "What is Quantitiy Made, when Quantity Preserved is ""4-4-0 — oooo — american""?","CREATE TABLE table_name_23 (quantity_made VARCHAR, quantity_preserved VARCHAR);","SELECT quantity_made FROM table_name_23 WHERE quantity_preserved = ""4-4-0 — oooo — american"";","SELECT quantity_made FROM table_name_23 WHERE quantity_preserved = ""4-4-0 — oooo — american"";",1 How many points did the away team score at Arden Street Oval?,"CREATE TABLE table_name_59 (away_team VARCHAR, venue VARCHAR);","SELECT away_team AS score FROM table_name_59 WHERE venue = ""arden street oval"";","SELECT away_team AS score FROM table_name_59 WHERE venue = ""arden street oval"";",1 "How many outcomes occur on the date of January 31, 2010?","CREATE TABLE table_26202940_6 (outcome VARCHAR, date VARCHAR);","SELECT COUNT(outcome) FROM table_26202940_6 WHERE date = ""January 31, 2010"";","SELECT COUNT(outcome) FROM table_26202940_6 WHERE date = ""January 31, 2010"";",1 What percentage of orders contain at least one vegetarian menu item?,"CREATE TABLE orders (order_id INT, dish_id INT); CREATE TABLE dishes (dish_id INT, dish_name VARCHAR(255), category VARCHAR(255)); ",SELECT 100.0 * COUNT(DISTINCT o.order_id) / (SELECT COUNT(DISTINCT order_id) FROM orders) AS vegetarian_order_percentage FROM orders o JOIN dishes d ON o.dish_id = d.dish_id WHERE d.category = 'Vegetarian';,SELECT (COUNT(*) FILTER (WHERE category = 'Vegetarian')) * 100.0 / COUNT(*) FROM orders JOIN dishes ON orders.dish_id = dishes.dish_id WHERE category = 'Vegetarian';,0 Which regions have no community education programs?,"CREATE TABLE regions_2 (region_id INT, region_name VARCHAR(50)); CREATE TABLE education_programs_2 (program_id INT, program_name VARCHAR(50), region_id INT); ",SELECT r.region_name FROM regions_2 r LEFT JOIN education_programs_2 ep ON r.region_id = ep.region_id WHERE ep.program_id IS NULL;,SELECT r.region_name FROM regions_2 r INNER JOIN education_programs_2 ep ON r.region_id = ep.region_id WHERE ep.program_name IS NULL;,0 Which venue ended in a 3-0 result?,"CREATE TABLE table_name_35 (venue VARCHAR, result VARCHAR);","SELECT venue FROM table_name_35 WHERE result = ""3-0"";","SELECT venue FROM table_name_35 WHERE result = ""3-0"";",1 What is the maximum number of hours of community service required for juvenile offenders in Texas?,"CREATE TABLE community_service_hours (id INT, state VARCHAR(50), offender_type VARCHAR(50), hours INT); ",SELECT MAX(hours) FROM community_service_hours WHERE state = 'Texas' AND offender_type = 'Juvenile';,SELECT MAX(hours) FROM community_service_hours WHERE state = 'Texas' AND offender_type = 'Juvenile';,1 What is the maximum ocean acidification level recorded in the Indian Ocean?,"CREATE TABLE ocean_acidification_levels (location VARCHAR(50), acidification_level FLOAT); ",SELECT MAX(acidification_level) FROM ocean_acidification_levels WHERE location = 'Indian Ocean';,SELECT MAX(acidification_level) FROM ocean_acidification_levels WHERE location = 'Indian Ocean';,1 Who had the high point total against cleveland?,"CREATE TABLE table_17311783_9 (high_points VARCHAR, team VARCHAR);","SELECT high_points FROM table_17311783_9 WHERE team = ""Cleveland"";","SELECT high_points FROM table_17311783_9 WHERE team = ""Cleveland"";",1 List all the races in the 2021 swimming season with their corresponding winners,"CREATE TABLE races (race_id INT, race_name VARCHAR(255)); CREATE TABLE results (race_id INT, winner_id INT, season VARCHAR(10)); CREATE TABLE swimmers (swimmer_id INT, swimmer_name VARCHAR(255)); ","SELECT races.race_name, swimmers.swimmer_name as winner FROM races JOIN results ON races.race_id = results.race_id JOIN swimmers ON results.winner_id = swimmers.swimmer_id WHERE races.season = '2021';","SELECT races.race_name, winners.winner_id FROM races INNER JOIN results ON races.race_id = results.race_id INNER JOIN swimmers ON results.winner_id = swimmers.swimmer_id WHERE results.season = '2021';",0 Name the venue with opponent of collingwood,"CREATE TABLE table_name_19 (venue VARCHAR, opponent VARCHAR);","SELECT venue FROM table_name_19 WHERE opponent = ""collingwood"";","SELECT venue FROM table_name_19 WHERE opponent = ""collingwood"";",1 What is the percentage of male and female patients that have completed their treatment for each condition?,"CREATE TABLE TreatmentOutcomes (TreatmentID int, ConditionID int, Gender varchar(10), Completed int); ","SELECT Conditions.Condition, Gender, SUM(TreatmentOutcomes.Completed)*100.0/COUNT(TreatmentOutcomes.TreatmentID) AS Percentage FROM TreatmentOutcomes JOIN Conditions ON TreatmentOutcomes.ConditionID = Conditions.ConditionID GROUP BY Conditions.Condition, Gender;","SELECT ConditionID, Gender, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM TreatmentOutcomes) as Percentage FROM TreatmentOutcomes WHERE Gender = 'Male' OR Gender = 'Female') as Percentage FROM TreatmentOutcomes WHERE Completed = 1 GROUP BY ConditionID, Gender;",0 List all waste types,"CREATE TABLE waste_types (id INT PRIMARY KEY, waste_type VARCHAR(255)); ",SELECT * FROM waste_types;,SELECT waste_type FROM waste_types;,0 What is the total value of Magenta Enterprises' social impact bonds issued in H2 2021?,"CREATE TABLE Magenta_Enterprises (id INT, half INT, social_impact_bonds_issued FLOAT); ",SELECT SUM(social_impact_bonds_issued) FROM Magenta_Enterprises WHERE half = 2;,SELECT SUM(social_impact_bonds_issued) FROM Magenta_Enterprises WHERE half = 2;,1 Howard Twitty was the runner-up of what tournament?,"CREATE TABLE table_name_14 (tournament VARCHAR, runner_s__up VARCHAR);","SELECT tournament FROM table_name_14 WHERE runner_s__up = ""howard twitty"";","SELECT tournament FROM table_name_14 WHERE runner_s__up = ""harvey twitty"";",0 "What was the home town of Bob Geren, picked by the San Diego Padres?","CREATE TABLE table_name_18 (hometown_school VARCHAR, team VARCHAR, player VARCHAR);","SELECT hometown_school FROM table_name_18 WHERE team = ""san diego padres"" AND player = ""bob geren"";","SELECT hometown_school FROM table_name_18 WHERE team = ""san diego pads"" AND player = ""bob geren"";",0 Find the total revenue generated by 'Organic Cotton Hoodies' sold in the United States for the year 2022.,"CREATE TABLE garments (id INT, name VARCHAR(255), category VARCHAR(255), country VARCHAR(255), price DECIMAL(10,2)); CREATE TABLE orders (id INT, garment_id INT, quantity INT, order_date DATE);",SELECT SUM(quantity * price) FROM orders INNER JOIN garments ON orders.garment_id = garments.id WHERE garments.name = 'Organic Cotton Hoodie' AND garments.country = 'United States' AND YEAR(order_date) = 2022;,SELECT SUM(quantity * price) FROM orders JOIN garments ON orders.garment_id = garments.id WHERE garments.name = 'Organic Cotton Hoodies' AND garments.country = 'United States' AND YEAR(order_date) = 2022;,0 What is the total cost of sustainable projects completed by 'GreenBuild' company?,"CREATE TABLE Company (id INT, name VARCHAR(20)); CREATE TABLE Permit (id INT, company_id INT, cost INT, sustainable VARCHAR(5));",SELECT SUM(Permit.cost) AS total_cost FROM Permit INNER JOIN Company ON Permit.company_id = Company.id WHERE Company.name = 'GreenBuild' AND Permit.sustainable = 'yes';,SELECT SUM(cost) FROM Permit WHERE company_id = (SELECT id FROM Company WHERE name = 'GreenBuild');,0 What is the time with 10 grids?,"CREATE TABLE table_name_81 (time_retired VARCHAR, grid VARCHAR);",SELECT time_retired FROM table_name_81 WHERE grid = 10;,SELECT time_retired FROM table_name_81 WHERE grid = 10;,1 What candidates ran in the election when the incumbent was william j. driver?,"CREATE TABLE table_1342292_4 (candidates VARCHAR, incumbent VARCHAR);","SELECT candidates FROM table_1342292_4 WHERE incumbent = ""William J. Driver"";","SELECT candidates FROM table_1342292_4 WHERE incumbent = ""William J. Driver"";",1 "What is the Total with a Joint Music Award of 1, RTHK of 4, and USCA of 4?","CREATE TABLE table_name_99 (total VARCHAR, usca VARCHAR, joint_music_award VARCHAR, rthk VARCHAR);","SELECT total FROM table_name_99 WHERE joint_music_award = ""1"" AND rthk = ""4"" AND usca = ""4"";","SELECT total FROM table_name_99 WHERE joint_music_award = ""1"" AND rthk = ""4"" AND usca = ""4"";",1 What is the height for the Shanghai World Plaza?,"CREATE TABLE table_name_26 (height_m___ft VARCHAR, name VARCHAR);","SELECT height_m___ft FROM table_name_26 WHERE name = ""shanghai world plaza"";","SELECT height_m___ft FROM table_name_26 WHERE name = ""shanghai world plaza"";",1 What is the name and creation date of the artifact with the second latest creation date?,"CREATE TABLE Artifacts (ArtifactID INT, Name VARCHAR(100), CreationDate DATETIME); ","SELECT Name, CreationDate FROM (SELECT Name, CreationDate, ROW_NUMBER() OVER (ORDER BY CreationDate DESC) as RowNum FROM Artifacts) as ArtifactRank WHERE RowNum = 2;","SELECT Name, CreationDate FROM Artifacts WHERE CreationDate = (SELECT MAX(CreationDate) FROM Artifacts);",0 What was the result of the UEFA Euro 2008 Qualifying competition?,"CREATE TABLE table_name_97 (result VARCHAR, competition VARCHAR);","SELECT result FROM table_name_97 WHERE competition = ""uefa euro 2008 qualifying"";","SELECT result FROM table_name_97 WHERE competition = ""uefa euro 2008 qualifying"";",1 What is the total number of animals in 'Refuge A' and 'Refuge B'?,"CREATE TABLE RefugeA(animal_id INT, species VARCHAR(20), refuge VARCHAR(10)); CREATE TABLE RefugeB(animal_id INT, species VARCHAR(20), refuge VARCHAR(10)); ",SELECT SUM(qty) FROM (SELECT COUNT(*) as qty FROM RefugeA UNION ALL SELECT COUNT(*) as qty FROM RefugeB) as total;,"SELECT COUNT(*) FROM RefugeA INNER JOIN RefugeB ON RefugeA.animal_id = RefugeB.animal_id WHERE RefugeA.refuge IN ('Refuge A', 'Refuge B');",0 List all products that are not certified cruelty-free or contain allergens.,"CREATE TABLE non_cruelty_free_products AS SELECT products.product_id, products.product_name FROM products WHERE products.is_cruelty_free = false; ","SELECT products.product_id, products.product_name FROM products WHERE products.product_id NOT IN (SELECT non_cruelty_free_products.product_id FROM non_cruelty_free_products) AND products.product_id IN (SELECT allergens.product_id FROM allergens)",SELECT products.product_name FROM non_cruelty_free_products;,0 "What is the highest rated training program for each skill, and who are the instructors?","CREATE TABLE training_programs (program_id INT, skill TEXT, rating DECIMAL, instructor_id INT);CREATE TABLE instructors (instructor_id INT, name TEXT);","SELECT t.skill, MAX(t.rating) AS max_rating, i.name FROM training_programs t INNER JOIN instructors i ON t.instructor_id = i.instructor_id GROUP BY t.skill, i.name;","SELECT tp.skill, MAX(tp.rating) as max_rating FROM training_programs tp JOIN instructors i ON tp.instructor_id = i.instructor_id GROUP BY tp.skill;",0 When are all years that the champion is Ji Min Jeong?,"CREATE TABLE table_15315816_1 (year VARCHAR, champion VARCHAR);","SELECT year FROM table_15315816_1 WHERE champion = ""Ji Min Jeong"";","SELECT year FROM table_15315816_1 WHERE champion = ""Ji Min Jeong"";",1 "When was the first HC climb before 2013 with more than 3 times visited, more than 4 HC climbs, and a height of 1669?","CREATE TABLE table_name_23 (first_time_as_hc_climb VARCHAR, height__m_ VARCHAR, most_recent VARCHAR, no_of_times_visited VARCHAR, no_of_hc_climbs VARCHAR);","SELECT first_time_as_hc_climb FROM table_name_23 WHERE no_of_times_visited > 3 AND no_of_hc_climbs = 4 AND most_recent < 2013 AND height__m_ = ""1669"";",SELECT first_time_as_hc_climb FROM table_name_23 WHERE no_of_times_visited > 3 AND no_of_hc_climbs > 4 AND height__m_ = 1669;,0 What was the method of elimination in the chamber with a time of 24:02? ,"CREATE TABLE table_24628683_2 (method_of_elimination VARCHAR, time VARCHAR);","SELECT method_of_elimination FROM table_24628683_2 WHERE time = ""24:02"";","SELECT method_of_elimination FROM table_24628683_2 WHERE time = ""24:02"";",1 Find the number of defense contracts awarded to companies in Texas,"CREATE TABLE defense_contracts (contract_id INT, company_name TEXT, state TEXT, value FLOAT); ",SELECT COUNT(*) FROM defense_contracts WHERE state = 'Texas';,SELECT COUNT(*) FROM defense_contracts WHERE state = 'Texas';,1 What airport has an ICAO of Birk?,"CREATE TABLE table_name_16 (airport VARCHAR, icao VARCHAR);","SELECT airport FROM table_name_16 WHERE icao = ""birk"";","SELECT airport FROM table_name_16 WHERE icao = ""birk"";",1 How many members have professor edward acton as vice-chancellor?,"CREATE TABLE table_142950_1 (total_number_of_students VARCHAR, vice_chancellor VARCHAR);","SELECT COUNT(total_number_of_students) FROM table_142950_1 WHERE vice_chancellor = ""Professor Edward Acton"";","SELECT total_number_of_students FROM table_142950_1 WHERE vice_chancellor = ""Professor Edward Acton"";",0 "What is the total number of restorative justice programs by location, and the number of programs facilitated by 'Sarah Lee'?","CREATE TABLE restorative_justice_programs (id INT, program_name TEXT, location TEXT, facilitator TEXT, participants INT); ","SELECT location, COUNT(*) AS total_programs, SUM(CASE WHEN facilitator = 'Sarah Lee' THEN 1 ELSE 0 END) AS sarah_lee_programs FROM restorative_justice_programs GROUP BY location;","SELECT location, COUNT(*) as total_programs, SUM(participants) as total_participants FROM restorative_justice_programs WHERE facilitator = 'Sarah Lee' GROUP BY location;",0 Which juvenile offenders were released early from detention centers in California?,"CREATE TABLE detention_centers (id INT, name TEXT, state TEXT); CREATE TABLE offenders (id INT, name TEXT, detention_center_id INT, release_date DATE); ","SELECT name, detention_center_id, release_date FROM offenders WHERE detention_center_id IN (1, 2) AND release_date < DATE('now')","SELECT o.name FROM offenders o INNER JOIN detention_centers dc ON o.detention_center_id = dc.id WHERE dc.state = 'California' AND o.release_date DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 "Insert new records of academic publications by female and non-binary authors, ordered by the sequence of publication_id.","CREATE TABLE academic_publications (publication_id INT, year INT, title VARCHAR(100), author_id INT, author_gender VARCHAR(10));","INSERT INTO academic_publications (publication_id, year, title, author_id, author_gender) VALUES (7001, 2022, 'Novel Biodegradation Techniques', 9001, 'Female'), (7002, 2021, 'Advancements in Renewable Energy', 9002, 'Non-binary'), (7003, 2020, 'Machine Learning in Healthcare', 9003, 'Female');","INSERT INTO academic_publications (publication_id, year, title, author_id, author_gender) VALUES ('Female', 'Non-binary');",0 what is the name when the laid down is 28 february 1943?,"CREATE TABLE table_name_37 (name VARCHAR, laid_down VARCHAR);","SELECT name FROM table_name_37 WHERE laid_down = ""28 february 1943"";","SELECT name FROM table_name_37 WHERE laid_down = ""28 february 1943"";",1 Find the average duration of videos in the 'comedy' category.,"CREATE TABLE videos (id INT, title VARCHAR(255), duration INT, category VARCHAR(255), date DATE);",SELECT AVG(duration) FROM videos WHERE category='comedy';,SELECT AVG(duration) FROM videos WHERE category = 'comedy';,0 What is the maximum hourly rate for attorneys who have never lost a case?,"CREATE TABLE Attorneys (AttorneyID int, HourlyRate decimal(5,2), Losses int); ",SELECT MAX(HourlyRate) AS MaxHourlyRate FROM Attorneys WHERE Losses = 0;,SELECT MAX(HourlyRate) FROM Attorneys WHERE Losses = 0;,0 what is the state when the peak population (year) is 134995 (1950)?,"CREATE TABLE table_name_33 (state VARCHAR, peak_population__year_ VARCHAR);","SELECT state FROM table_name_33 WHERE peak_population__year_ = ""134995 (1950)"";","SELECT state FROM table_name_33 WHERE peak_population__year_ = ""134995 (1950)"";",1 What is the maximum number of active astronauts on the ISS at any given time?,"CREATE TABLE active_iss_astronauts (astronaut_id INT, name VARCHAR(100), start_date DATE, end_date DATE, max_active INT);",SELECT MAX(max_active) FROM active_iss_astronauts;,SELECT MAX(max_active) FROM active_iss_astronauts;,1 What is the maximum cargo weight carried by vessels that are registered in the European Union?,"CREATE TABLE Vessels (Id INT, Name VARCHAR(100), CargoWeight FLOAT, EU_Registration BOOLEAN); ",SELECT MAX(CargoWeight) FROM Vessels WHERE EU_Registration = TRUE;,SELECT MAX(CargoWeight) FROM Vessels WHERE EU_Registration = TRUE;,1 What is the minimum listing price for properties in Miami that are co-owned?,"CREATE TABLE properties (id INT, city VARCHAR(50), listing_price DECIMAL(10, 2), co_owned BOOLEAN); ",SELECT MIN(listing_price) FROM properties WHERE city = 'Miami' AND co_owned = TRUE;,SELECT MIN(listing_price) FROM properties WHERE city = 'Miami' AND co_owned = true;,0 Find the name and country of origin for all artists who have release at least one song of resolution above 900.,"CREATE TABLE song (artist_name VARCHAR, resolution INTEGER); CREATE TABLE artist (artist_name VARCHAR, country VARCHAR);","SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING COUNT(*) >= 1;","SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900;",0 What is the frequency of number 3 with a bus station origin?,"CREATE TABLE table_name_33 (frequency VARCHAR, origin VARCHAR, number VARCHAR);","SELECT frequency FROM table_name_33 WHERE origin = ""bus station"" AND number = 3;","SELECT frequency FROM table_name_33 WHERE origin = ""bus station"" AND number = 3;",1 what is the section where gordon lee ran,"CREATE TABLE table_1342393_10 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_1342393_10 WHERE incumbent = ""Gordon Lee"";","SELECT district FROM table_1342393_10 WHERE incumbent = ""Gordon Lee"";",1 What is the difference in average property price between eco-friendly and standard communities?,"CREATE TABLE property_community ( id INT PRIMARY KEY, price FLOAT, community_type VARCHAR(255) ); ",SELECT AVG(price_eco) - AVG(price_standard) FROM (SELECT price FROM property_community WHERE community_type = 'eco-friendly') AS price_eco JOIN (SELECT price FROM property_community WHERE community_type = 'standard') AS price_standard ON 1=1;,SELECT AVG(price) - AVG(price) FROM property_community WHERE community_type = 'eco-friendly';,0 What is the average mental health parity score for each ZIP code in California?,"CREATE TABLE MentalHealthParity (ZIP VARCHAR(5), State VARCHAR(50), Score DECIMAL(3,2)); ","SELECT ZIP, AVG(Score) as AvgScore FROM MentalHealthParity WHERE State = 'California' GROUP BY ZIP;","SELECT ZIP, AVG(Score) FROM MentalHealthParity WHERE State = 'California' GROUP BY ZIP;",0 Find the name of rooms booked by some customers whose first name contains ROY.,"CREATE TABLE Reservations (Room VARCHAR); CREATE TABLE Rooms (roomName VARCHAR, RoomId VARCHAR);",SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%';,"SELECT T1.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.RoomId = ""ROY"";",0 "Insert a new record into the international_visitors table with the following data: 'Brazil', 'Rio de Janeiro', 5000, '01-JAN-2023'","CREATE TABLE international_visitors (country VARCHAR(255), city VARCHAR(255), visitor_count INT, visit_date DATE);","INSERT INTO international_visitors (country, city, visitor_count, visit_date) VALUES ('Brazil', 'Rio de Janeiro', 5000, '2023-01-01');","INSERT INTO international_visitors (country, city, visitor_count, visit_date) VALUES ('Brazil', 'Rio de Janeiro', 5000, '01-JAN-2023');",0 Which mining operations have a workforce diversity score above 0.7?,"CREATE TABLE mining_operations (id INT, mine_name VARCHAR(50), department VARCHAR(50), employee VARCHAR(50), age INT, gender VARCHAR(10)); CREATE VIEW workforce_diversity AS SELECT department, ((MAX(count) - MIN(count)) / MAX(count)) AS diversity_score FROM (SELECT department, gender, COUNT(*) AS count FROM mining_operations GROUP BY department, gender) AS diversity_by_dept GROUP BY department;",SELECT mine_name FROM mining_operations JOIN workforce_diversity ON TRUE WHERE workforce_diversity.diversity_score > 0.7;,SELECT m.mine_name FROM mining_operations m JOIN workforce_diversity w ON m.department = w.department WHERE w.diversity_score > 0.7;,0 Delete the green building in the 'green_buildings' table with building_id 2.,"CREATE TABLE if not exists green_buildings (building_id int, name varchar(255), city varchar(255), certification varchar(50)); ",DELETE FROM green_buildings WHERE building_id = 2;,DELETE FROM green_buildings WHERE building_id = 2;,1 "Insert a new record into the ""disease_prevalence"" table for 'Rural County A' with a 'Heart Disease' diagnosis and prevalence rate of 10%","CREATE TABLE disease_prevalence (county VARCHAR(50), diagnosis VARCHAR(50), prevalence DECIMAL(5,2));","INSERT INTO disease_prevalence (county, diagnosis, prevalence) VALUES ('Rural County A', 'Heart Disease', 0.10);","INSERT INTO disease_prevalence (county, diagnosis, prevalence) VALUES ('Rural County A', 'Heart Disease', 100.0);",0 What is the total number of autonomous vehicles in operation in Oslo?,"CREATE TABLE autonomous_vehicles (vehicle_id INT, vehicle_type VARCHAR(20)); ","SELECT COUNT(*) as num_vehicles FROM autonomous_vehicles WHERE vehicle_type IN ('Car', 'Truck', 'Bus');",SELECT COUNT(*) FROM autonomous_vehicles WHERE vehicle_type = 'Autonomous' AND city = 'Oslo';,0 Find the number of unique attendees who attended both 'Music Festival' and 'Music Concert'.,"CREATE TABLE attendee_demographics (attendee_id INT, attendee_name VARCHAR(50), attendee_age INT); CREATE TABLE event_attendance (attendee_id INT, event_name VARCHAR(50)); ","SELECT COUNT(DISTINCT attendee_id) FROM event_attendance WHERE event_name IN ('Music Festival', 'Music Concert') GROUP BY attendee_id HAVING COUNT(DISTINCT event_name) = 2;","SELECT COUNT(DISTINCT attendee_id) FROM attendee_demographics INNER JOIN event_attendance ON attendee_demographics.attendee_id = event_attendance.attendee_id WHERE event_attendance.event_name IN ('Music Festival', 'Music Concert');",0 Which Record label has an Album of rambo?,"CREATE TABLE table_name_63 (record_label VARCHAR, album VARCHAR);","SELECT record_label FROM table_name_63 WHERE album = ""rambo"";","SELECT record_label FROM table_name_63 WHERE album = ""rambo"";",1 "What is the total donation amount per donor, sorted by the highest donors?","CREATE TABLE Donors (DonorID INT, DonorName VARCHAR(50), TotalDonation DECIMAL(10,2)); ","SELECT DonorName, TotalDonation FROM (SELECT DonorName, TotalDonation, ROW_NUMBER() OVER (ORDER BY TotalDonation DESC) as rnk FROM Donors) sub WHERE rnk = 1 OR rnk = 2 OR rnk = 3;","SELECT DonorName, SUM(TotalDonation) as TotalDonation FROM Donors GROUP BY DonorName ORDER BY TotalDonation DESC;",0 who received gold when silver is wolfgang eibeck austria (aut)?,"CREATE TABLE table_name_42 (gold VARCHAR, silver VARCHAR);","SELECT gold FROM table_name_42 WHERE silver = ""wolfgang eibeck austria (aut)"";","SELECT gold FROM table_name_42 WHERE silver = ""wolfgang eibeck austria (aut)"";",1 What is the minimum heart rate recorded for users in the evening?,"CREATE TABLE heart_rate_times (user_id INT, heart_rate INT, measurement_time TIME); ",SELECT MIN(heart_rate) FROM heart_rate_times WHERE EXTRACT(HOUR FROM measurement_time) BETWEEN 18 AND 23;,"SELECT MIN(heart_rate) FROM heart_rate_times WHERE measurement_time BETWEEN DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) AND CURRENT_TIMESTAMP;",0 What is the pick for round 8 with a USA nationality in the 2000 draft?,"CREATE TABLE table_name_72 (pick VARCHAR, draft VARCHAR, round VARCHAR, nationality VARCHAR);","SELECT pick FROM table_name_72 WHERE round = ""8"" AND nationality = ""usa"" AND draft = 2000;","SELECT pick FROM table_name_72 WHERE round = 8 AND nationality = ""usa"" AND draft = 2000;",0 What is the average weight of packages shipped from Europe to Africa?,"CREATE TABLE packages (id INT, weight FLOAT, origin VARCHAR(50), destination VARCHAR(50)); ",SELECT AVG(weight) FROM packages WHERE origin = 'Europe' AND destination = 'Africa';,SELECT AVG(weight) FROM packages WHERE origin = 'Europe' AND destination = 'Africa';,1 What is the 'total_area' planted with 'vegetables' in the 'farm_plots' table?,"CREATE TABLE farm_plots (id INT, farm_id INT, plot_number INT, crop VARCHAR(50), total_area FLOAT);",SELECT SUM(total_area) FROM farm_plots WHERE crop = 'vegetables';,SELECT total_area FROM farm_plots WHERE crop ='vegetables';,0 Which Local name has a Network of tvn?,"CREATE TABLE table_name_36 (local_name VARCHAR, network VARCHAR);","SELECT local_name FROM table_name_36 WHERE network = ""tvn"";","SELECT local_name FROM table_name_36 WHERE network = ""tvn"";",1 Delete records in the 'wells' table where the 'region' is 'Gulf of Mexico',"CREATE TABLE wells (well_id INT, well_name VARCHAR(255), region VARCHAR(255), production FLOAT);",DELETE FROM wells WHERE region = 'Gulf of Mexico';,DELETE FROM wells WHERE region = 'Gulf of Mexico';,1 "How much Played has an Against larger than 37, and a Lost of 15, and Points smaller than 11?","CREATE TABLE table_name_63 (played INTEGER, points VARCHAR, against VARCHAR, lost VARCHAR);",SELECT SUM(played) FROM table_name_63 WHERE against > 37 AND lost = 15 AND points < 11;,SELECT SUM(played) FROM table_name_63 WHERE against > 37 AND lost = 15 AND points 11;,0 "What is Package/Option, when Content is Tennis?","CREATE TABLE table_name_3 (package_option VARCHAR, content VARCHAR);","SELECT package_option FROM table_name_3 WHERE content = ""tennis"";","SELECT package_option FROM table_name_3 WHERE content = ""tennis"";",1 WHAT IS THE RESULT WHEN THE OPPONENT WAS CHICAGO BEARS?,"CREATE TABLE table_name_18 (result VARCHAR, opponent VARCHAR);","SELECT result FROM table_name_18 WHERE opponent = ""chicago bears"";","SELECT result FROM table_name_18 WHERE opponent = ""chicago bears"";",1 Update the country for volunteer 'Bob' to Canada.,"CREATE TABLE Volunteers (id INT, name VARCHAR(255), country VARCHAR(255)); ",UPDATE Volunteers SET country = 'Canada' WHERE name = 'Bob';,UPDATE Volunteers SET country = 'Canada' WHERE name = 'Bob';,1 How many posts were created by users from underrepresented communities in Q1 2022?,"CREATE TABLE posts (user_id INT, post_date DATE); CREATE TABLE users (id INT, community VARCHAR(20)); ","SELECT COUNT(*) FROM posts JOIN users ON posts.user_id = users.id WHERE users.community IN ('Women in Tech', 'LGBTQ+', 'Minority Owned Business') AND posts.post_date BETWEEN '2022-01-01' AND '2022-03-31';",SELECT COUNT(*) FROM posts JOIN users ON posts.user_id = users.id WHERE users.community = 'Underrepresented' AND posts.post_date BETWEEN '2022-01-01' AND '2022-03-31';,0 Determine virtual reality games that have more than 1000 players and released in 2020,"CREATE TABLE vr_games (game VARCHAR(20), players INT, release_year INT); ",SELECT game FROM vr_games WHERE players > 1000 AND release_year = 2020;,SELECT game FROM vr_games WHERE players > 1000 AND release_year = 2020;,1 List all soccer matches with more than 3 goals scored,"CREATE TABLE matches (team1 VARCHAR(255), team2 VARCHAR(255), goals_scored INT);",SELECT * FROM matches WHERE goals_scored > 3;,SELECT * FROM matches WHERE goals_scored > 3;,1 What is the maximum number of citizens' complaints received by each city council in the 'Suburban' region?,"CREATE SCHEMA Government;CREATE TABLE Government.Region (name VARCHAR(255), budget INT);CREATE TABLE Government.City (name VARCHAR(255), region VARCHAR(255), complaints INT);","SELECT region, MAX(complaints) FROM Government.City WHERE region = 'Suburban' GROUP BY region;","SELECT g.name, MAX(g.complaints) FROM Government.City g JOIN Government.Region g ON g.name = g.name WHERE g.region = 'Suburban' GROUP BY g.name;",0 Who ran unsuccessfully against Bill Hefner?,"CREATE TABLE table_1341522_36 (opponent VARCHAR, incumbent VARCHAR);","SELECT opponent FROM table_1341522_36 WHERE incumbent = ""Bill Hefner"";","SELECT opponent FROM table_1341522_36 WHERE incumbent = ""Bill Hefner"";",1 What is the location of the festival with the largest number of audience?,"CREATE TABLE festival_detail (LOCATION VARCHAR, Num_of_Audience VARCHAR);",SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1;,SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1;,1 Show the average and maximum damage for all storms with max speed higher than 1000.,"CREATE TABLE storm (damage_millions_USD INTEGER, max_speed INTEGER);","SELECT AVG(damage_millions_USD), MAX(damage_millions_USD) FROM storm WHERE max_speed > 1000;","SELECT AVG(damage_millions_USD), MAX(damage_millions_USD) FROM storm WHERE max_speed > 1000;",1 What is the distribution of security incidents by geographical region for the last month?,"CREATE TABLE security_incidents (id INT, timestamp TIMESTAMP, region VARCHAR(255), incident_type VARCHAR(255)); ","SELECT region, incident_type, COUNT(*) as incident_count FROM security_incidents WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY region, incident_type;","SELECT region, COUNT(*) as incident_count FROM security_incidents WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY region;",0 What is the total number of medals won by each country in the Winter Olympics?,"CREATE TABLE winter_olympics (id INT, country VARCHAR(50), year INT, gold INT, silver INT, bronze INT); "," SELECT country, GOLD + SILVER + BRONZE AS total_medals FROM winter_olympics GROUP BY country ORDER BY total_medals DESC;","SELECT country, SUM(gold) as total_gold FROM winter_olympics GROUP BY country;",0 "What was the option from Italy with general television content, and the Cielo television service?","CREATE TABLE table_name_84 (package_option VARCHAR, television_service VARCHAR, country VARCHAR, content VARCHAR);","SELECT package_option FROM table_name_84 WHERE country = ""italy"" AND content = ""general television"" AND television_service = ""cielo"";","SELECT package_option FROM table_name_84 WHERE country = ""italy"" AND content = ""general television"" AND television_service = ""cielo"";",1 What is the maximum fare for a single trip on the 'montreal' schema's metro system?,"CREATE TABLE montreal.metro_fares (id INT, trip_type VARCHAR, fare DECIMAL); ",SELECT MAX(fare) FROM montreal.metro_fares WHERE trip_type = 'single';,SELECT MAX(fare) FROM montreal.metro_fares WHERE trip_type = 'Metro';,0 What is the average time taken for air freight delivery from 'Tokyo' to 'Paris'?,"CREATE TABLE air_freight_routes (route_id INT, origin VARCHAR(255), destination VARCHAR(255), transit_time INT); ",SELECT AVG(transit_time) FROM air_freight_routes WHERE origin = 'Tokyo' AND destination = 'Paris';,SELECT AVG(transit_time) FROM air_freight_routes WHERE origin = 'Tokyo' AND destination = 'Paris';,1 What is the total number of wins when casey mears ranked 36th and had more than 0 top fives?,"CREATE TABLE table_name_62 (wins VARCHAR, rank VARCHAR, top_fives VARCHAR);","SELECT COUNT(wins) FROM table_name_62 WHERE rank = ""36th"" AND top_fives > 0;","SELECT COUNT(wins) FROM table_name_62 WHERE rank = ""36th"" AND top_fives > 0;",1 "Which satellite images have a resolution of 0.4 or better, taken after 2021-09-01?","CREATE TABLE satellite_imagery (id INT, image_url VARCHAR(255), resolution DECIMAL(3,2), date DATE, PRIMARY KEY (id)); ",SELECT * FROM satellite_imagery WHERE resolution <= 0.4 AND date > '2021-09-01';,SELECT image_url FROM satellite_imagery WHERE resolution > 0.4 AND date > '2021-09-01';,0 How many cases were won or lost by attorneys in the Midwest region?,"CREATE TABLE Attorneys (AttorneyID int, Name varchar(50), Region varchar(10)); CREATE TABLE Cases (CaseID int, AttorneyID int, Outcome varchar(10)); ","SELECT A.Region, A.Name, COUNT(C.CaseID) as NumCases FROM Attorneys A JOIN Cases C ON A.AttorneyID = C.AttorneyID GROUP BY A.Region, A.Name;",SELECT COUNT(*) FROM Cases INNER JOIN Attorneys ON Cases.AttorneyID = Attorneys.AttorneyID WHERE Attorneys.Region = 'Midwest' AND Cases.Outcome = 'Won' OR Cases.Outcome = 'Lost';,0 What was the attendance when Fitzroy played as home team?,"CREATE TABLE table_name_2 (crowd VARCHAR, home_team VARCHAR);","SELECT COUNT(crowd) FROM table_name_2 WHERE home_team = ""fitzroy"";","SELECT crowd FROM table_name_2 WHERE home_team = ""fitzroy"";",0 List all properties in Oakland with inclusive housing policies.,"CREATE TABLE properties (property_id INT, city VARCHAR(20), inclusive BOOLEAN); ",SELECT * FROM properties WHERE city = 'Oakland' AND inclusive = true;,SELECT * FROM properties WHERE city = 'Oakland' AND inclusive = true;,1 Who is the prime minister that had a term that ended on 5 March 1930?,"CREATE TABLE table_name_53 (name VARCHAR, term_end VARCHAR);","SELECT name FROM table_name_53 WHERE term_end = ""5 march 1930"";","SELECT name FROM table_name_53 WHERE term_end = ""5 march 1930"";",1 "Which Venue has a Result of 2–2 and Attendances of 5,760?","CREATE TABLE table_name_58 (venue VARCHAR, result VARCHAR, attendance VARCHAR);","SELECT venue FROM table_name_58 WHERE result = ""2–2"" AND attendance = ""5,760"";","SELECT venue FROM table_name_58 WHERE result = ""2–2"" AND attendance = ""5,760"";",1 How many games for the player that has an over 2.7 assist average and over 598 total assists?,"CREATE TABLE table_name_91 (games VARCHAR, ast_avg VARCHAR, total_assists VARCHAR);",SELECT COUNT(games) FROM table_name_91 WHERE ast_avg > 2.7 AND total_assists > 598;,SELECT COUNT(games) FROM table_name_91 WHERE ast_avg > 2.7 AND total_assists > 598;,1 Name the original airdate for mr. buckston,"CREATE TABLE table_name_23 (original_airdate VARCHAR, identity_ies_ VARCHAR);","SELECT original_airdate FROM table_name_23 WHERE identity_ies_ = ""mr. buckston"";","SELECT original_airdate FROM table_name_23 WHERE identity_ies_ = ""mr. buckston"";",1 Name the sum of year for swimming and first of mike,"CREATE TABLE table_name_68 (year INTEGER, sport VARCHAR, first VARCHAR);","SELECT SUM(year) FROM table_name_68 WHERE sport = ""swimming"" AND first = ""mike"";","SELECT SUM(year) FROM table_name_68 WHERE sport = ""swimming"" AND first = ""mike"";",1 "What's the score at the October 30, 1996 1998 fifa world cup qualification with a result of win?","CREATE TABLE table_name_58 (score VARCHAR, date VARCHAR, result VARCHAR, competition VARCHAR);","SELECT score FROM table_name_58 WHERE result = ""win"" AND competition = ""1998 fifa world cup qualification"" AND date = ""october 30, 1996"";","SELECT score FROM table_name_58 WHERE result = ""win"" AND competition = ""october 30, 1996 1998 fifa world cup qualification"" AND date = ""october 30, 1996"";",0 What is the total number of police officers in each division and their respective ranks?,"CREATE TABLE division (division_id INT, division_name VARCHAR(255)); CREATE TABLE police_officers (officer_id INT, division_id INT, officer_name VARCHAR(255), officer_rank VARCHAR(255));","SELECT division_id, COUNT(*), officer_rank FROM police_officers GROUP BY division_id, officer_rank;","SELECT division.division_name, COUNT(police_officers.officer_id) as total_officers, COUNT(police_officers.officer_id) as officer_rank FROM division INNER JOIN police_officers ON division.division_id = police_officers.division_id GROUP BY division.division_name;",0 What is the least amount of touchdowns scored on the chart?,CREATE TABLE table_14342480_7 (touchdowns INTEGER);,SELECT MIN(touchdowns) FROM table_14342480_7;,SELECT MIN(touchdowns) FROM table_14342480_7;,1 What CFL teams are part of Simon Fraser college?,"CREATE TABLE table_10975034_4 (cfl_team VARCHAR, college VARCHAR);","SELECT cfl_team FROM table_10975034_4 WHERE college = ""Simon Fraser"";","SELECT cfl_team FROM table_10975034_4 WHERE college = ""Simon Fraser"";",1 List the top 5 cities with the highest number of recycling centers.,"CREATE TABLE cities (id INT, name TEXT, country TEXT); CREATE TABLE recycling_centers (id INT, city_id INT, type TEXT); ","SELECT cities.name, COUNT(recycling_centers.id) AS center_count FROM cities INNER JOIN recycling_centers ON cities.id = recycling_centers.city_id GROUP BY cities.name ORDER BY center_count DESC LIMIT 5;","SELECT c.name, COUNT(rc.id) as num_recycling_centers FROM cities c JOIN recycling_centers rc ON c.id = rc.city_id GROUP BY c.name ORDER BY num_recycling_centers DESC LIMIT 5;",0 "How many fish are there in total for each location in the 'fish_stock' table, grouped by location?","CREATE TABLE fish_stock (location VARCHAR(255), num_fish INT); ","SELECT location, SUM(num_fish) FROM fish_stock GROUP BY location;","SELECT location, SUM(num_fish) FROM fish_stock GROUP BY location;",1 Which opponent has a Date of july 27?,"CREATE TABLE table_name_24 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_24 WHERE date = ""july 27"";","SELECT opponent FROM table_name_24 WHERE date = ""july 27"";",1 what is the maximum completed for delta bessborough,"CREATE TABLE table_13397394_1 (completed INTEGER, building VARCHAR);","SELECT MAX(completed) FROM table_13397394_1 WHERE building = ""Delta Bessborough"";","SELECT MAX(completed) FROM table_13397394_1 WHERE building = ""Delta Bessborough"";",1 Name the date of vacancy for fabio brini,"CREATE TABLE table_17275810_7 (date_of_vacancy VARCHAR, replaced_by VARCHAR);","SELECT date_of_vacancy FROM table_17275810_7 WHERE replaced_by = ""Fabio Brini"";","SELECT date_of_vacancy FROM table_17275810_7 WHERE replaced_by = ""Fabio Brini"";",1 What is the minimum production cost for products in the 'Home & Kitchen' category?,"CREATE TABLE products (product_id INT, product_name VARCHAR(255), category VARCHAR(255), production_cost DECIMAL(5,2)); ",SELECT MIN(production_cost) FROM products WHERE category = 'Home & Kitchen';,SELECT MIN(production_cost) FROM products WHERE category = 'Home & Kitchen';,1 What is the daily sales trend for a specific menu item?,"CREATE TABLE sales_trend (menu_item VARCHAR(255), sales DECIMAL(10,2), date DATE); ","SELECT menu_item, date, sales, AVG(sales) OVER (PARTITION BY menu_item ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING) as moving_average FROM sales_trend WHERE menu_item = 'Bruschetta' ORDER BY date;","SELECT menu_item, DATE_FORMAT(date, '%Y-%m') as day, SUM(sales) as total_sales FROM sales_trend GROUP BY menu_item;",0 What is the average attendance at jazz concerts in New York?,"CREATE TABLE Concerts (city VARCHAR(255), genre VARCHAR(255), attendance INT); ",SELECT AVG(attendance) FROM Concerts WHERE city = 'New York' AND genre = 'Jazz';,SELECT AVG(attendance) FROM Concerts WHERE city = 'New York' AND genre = 'jazz';,0 Name the number of three pointers for 67,"CREATE TABLE table_23184448_4 (three_pointers VARCHAR, points VARCHAR);",SELECT COUNT(three_pointers) FROM table_23184448_4 WHERE points = 67;,SELECT COUNT(three_pointers) FROM table_23184448_4 WHERE points = 67;,1 What is the largest drawn that has a played less than 38?,"CREATE TABLE table_name_8 (drawn INTEGER, played INTEGER);",SELECT MAX(drawn) FROM table_name_8 WHERE played < 38;,SELECT MAX(drawn) FROM table_name_8 WHERE played 38;,0 "Which FAT32 has a no for HPFS, a no for ReFS, and a yes v3.0 fir NTFS?","CREATE TABLE table_name_54 (fat32 VARCHAR, ntfs VARCHAR, hpfs VARCHAR, refs VARCHAR);","SELECT fat32 FROM table_name_54 WHERE hpfs = ""no"" AND refs = ""no"" AND ntfs = ""yes v3.0"";","SELECT fat32 FROM table_name_54 WHERE hpfs = ""no"" AND refs = ""no"" AND ntfs = ""yes v3.0"";",1 Insert new graduate student records into the graduate_students table,"CREATE TABLE graduate_students (id INT, name TEXT, department TEXT, advisor TEXT); ","INSERT INTO graduate_students (id, name, department, advisor) VALUES (4, 'David', 'CS', 'Prof. Jones'), (5, 'Eve', 'Physics', 'Prof. Lee'), (6, 'Frank', 'Math', 'Prof. Davis');","INSERT INTO graduate_students (id, name, department, advisor) VALUES (1, 'Mathematics', 'Mathematics', 'Mathematics'), (2, 'Mathematics', 'Mathematics', 'Mathematics'), (3, 'Mathematics', 'Mathematics', 'Mathematics'), (4, 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics'), (4, 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics'), 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics', 'Mathematics'",0 "List all the unique types of medical facilities in ""New York""","CREATE TABLE medical_facilities(id INT, name TEXT, type TEXT, state TEXT); ",SELECT DISTINCT type FROM medical_facilities WHERE state = 'New York';,SELECT DISTINCT type FROM medical_facilities WHERE state = 'New York';,1 What was the team score when Tim Duncan (12) got the high rebounds?,"CREATE TABLE table_27715173_10 (score VARCHAR, high_rebounds VARCHAR);","SELECT score FROM table_27715173_10 WHERE high_rebounds = ""Tim Duncan (12)"";","SELECT score FROM table_27715173_10 WHERE high_rebounds = ""Tim Duncan (12)"";",1 Who was the visitor at 5:00 pm?,"CREATE TABLE table_name_42 (visitor VARCHAR, time VARCHAR);","SELECT visitor FROM table_name_42 WHERE time = ""5:00 pm"";","SELECT visitor FROM table_name_42 WHERE time = ""5:00 pm"";",1 Find the destination in Africa with the highest increase in tourists from 2019 to 2020,"CREATE TABLE tourism_stats (destination VARCHAR(255), year INT, visitors INT); ","SELECT destination, (visitors - (SELECT visitors FROM tourism_stats t2 WHERE t2.destination = t1.destination AND t2.year = 2019)) AS diff FROM tourism_stats t1 WHERE year = 2020 ORDER BY diff DESC LIMIT 1;","SELECT destination, MAX(visitors) FROM tourism_stats WHERE year BETWEEN 2019 AND 2020 GROUP BY destination;",0 What was the attendance of game 25 when the played the San Francisco Warriors?,"CREATE TABLE table_name_43 (location_attendance VARCHAR, opponent VARCHAR, game VARCHAR);","SELECT location_attendance FROM table_name_43 WHERE opponent = ""san francisco warriors"" AND game = 25;","SELECT location_attendance FROM table_name_43 WHERE opponent = ""san francisco warriors"" AND game = 25;",1 What was the method of resolution when LaVerne Clark's record was 23-16-1?,"CREATE TABLE table_name_84 (method VARCHAR, record VARCHAR);","SELECT method FROM table_name_84 WHERE record = ""23-16-1"";","SELECT method FROM table_name_84 WHERE record = ""23-16-1"";",1 Which To par is of thomas aiken?,"CREATE TABLE table_name_77 (to_par VARCHAR, player VARCHAR);","SELECT to_par FROM table_name_77 WHERE player = ""thomas aiken"";","SELECT to_par FROM table_name_77 WHERE player = ""thomas aiken"";",1 What is the name of the Post code district that is in Eden Park?,"CREATE TABLE table_name_76 (postcodedistrict VARCHAR, location VARCHAR);","SELECT postcodedistrict FROM table_name_76 WHERE location = ""eden park"";","SELECT postcodedistrict FROM table_name_76 WHERE location = ""eden park"";",1 What is the percentage of vegan makeup products?,"CREATE TABLE products (product_id INT, vegan BOOLEAN, product_type TEXT); ",SELECT (COUNT(*) FILTER (WHERE vegan = true)) * 100.0 / COUNT(*) FROM products WHERE product_type = 'Makeup';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM products WHERE vegan = true)) AS percentage FROM products WHERE product_type ='makeup';,0 What President has a Presidency greater than 7?,"CREATE TABLE table_name_6 (president VARCHAR, presidency INTEGER);",SELECT president FROM table_name_6 WHERE presidency > 7;,SELECT president FROM table_name_6 WHERE presidency > 7;,1 "What year did she compete in tampere, finland?","CREATE TABLE table_name_95 (year INTEGER, venue VARCHAR);","SELECT AVG(year) FROM table_name_95 WHERE venue = ""tampere, finland"";","SELECT SUM(year) FROM table_name_95 WHERE venue = ""tampere, finland"";",0 What is the average budget allocated for military innovation per country?,"CREATE TABLE MilitaryInnovation (country VARCHAR(50), budget INT); ",SELECT AVG(budget) FROM MilitaryInnovation GROUP BY country;,"SELECT country, AVG(budget) FROM MilitaryInnovation GROUP BY country;",0 "What was the earliest year during which the winner was Matthew King, and during which the score was higher than 270?","CREATE TABLE table_name_25 (year INTEGER, winner VARCHAR, score VARCHAR);","SELECT MIN(year) FROM table_name_25 WHERE winner = ""matthew king"" AND score > 270;","SELECT MIN(year) FROM table_name_25 WHERE winner = ""matthew king"" AND score > 270;",1 What is the Winnipeg Jets record?,"CREATE TABLE table_name_51 (record VARCHAR, opponent VARCHAR);","SELECT record FROM table_name_51 WHERE opponent = ""winnipeg jets"";","SELECT record FROM table_name_51 WHERE opponent = ""winnipeg jets"";",1 Name the average debt as % of value for operating income more than -16 and % change on year being 62,"CREATE TABLE table_name_7 (debt_as__percentage_of_value INTEGER, _percentage_change_on_year VARCHAR, operating_income__$m_ VARCHAR);","SELECT AVG(debt_as__percentage_of_value) FROM table_name_7 WHERE _percentage_change_on_year = ""62"" AND operating_income__$m_ > -16;",SELECT AVG(debt_as__percentage_of_value) FROM table_name_7 WHERE _percentage_change_on_year = 62 AND operating_income__$m_ > -16;,0 "Name the Provider that has a pay in 2006–, and a Transmission of iptv and digital terrestrial?","CREATE TABLE table_name_90 (provider VARCHAR, transmission VARCHAR, free_or_pay VARCHAR, years VARCHAR);","SELECT provider FROM table_name_90 WHERE free_or_pay = ""pay"" AND years = ""2006–"" AND transmission = ""iptv and digital terrestrial"";","SELECT provider FROM table_name_90 WHERE free_or_pay = ""2006–"" AND years = ""2006–"" AND transmission = ""iptv and digital terrestrial"";",0 What cc displacement has an i6 engine in 1936?,"CREATE TABLE table_name_13 (displacement_cc VARCHAR, engine VARCHAR, year VARCHAR);","SELECT displacement_cc FROM table_name_13 WHERE engine = ""i6"" AND year = ""1936"";","SELECT displacement_cc FROM table_name_13 WHERE engine = ""i6"" AND year = 1936;",0 "What is the maximum depth of any ocean, and which ocean has that depth?","CREATE TABLE ocean_depths_extended (ocean VARCHAR(255), max_depth FLOAT, min_depth FLOAT); ","SELECT ocean, max_depth FROM ocean_depths_extended ORDER BY max_depth DESC LIMIT 1;","SELECT ocean, max_depth, min_depth FROM ocean_depths_extended;",0 How many different teams had an average start of 12.9?,"CREATE TABLE table_2182562_2 (team_s_ VARCHAR, avg_start VARCHAR);","SELECT COUNT(team_s_) FROM table_2182562_2 WHERE avg_start = ""12.9"";","SELECT COUNT(team_s_) FROM table_2182562_2 WHERE avg_start = ""12.9"";",1 What is the total revenue of cosmetics sold in Asia?,"CREATE TABLE Sales (sale_id INT, product_id INT, sale_revenue FLOAT, region_sold VARCHAR(50)); CREATE TABLE Cosmetics (product_id INT, product_name VARCHAR(100), price FLOAT); ",SELECT SUM(Sales.sale_revenue) as total_revenue FROM Sales INNER JOIN Cosmetics ON Sales.product_id = Cosmetics.product_id WHERE Sales.region_sold = 'Asia';,SELECT SUM(Sales.sale_revenue) FROM Sales INNER JOIN Cosmetics ON Sales.product_id = Cosmetics.product_id WHERE Sales.region_sold = 'Asia';,0 Who shot an 80 in round 3,"CREATE TABLE table_14708760_3 (shooter VARCHAR, round_3 VARCHAR);",SELECT shooter FROM table_14708760_3 WHERE round_3 = 80;,"SELECT shooter FROM table_14708760_3 WHERE round_3 = ""80"";",0 "What is listed as the highest Gold that also has a Silver that's smaller than 1, and has a Total that's smaller than 0?","CREATE TABLE table_name_23 (gold INTEGER, silver VARCHAR, total VARCHAR);",SELECT MAX(gold) FROM table_name_23 WHERE silver < 1 AND total < 0;,SELECT MAX(gold) FROM table_name_23 WHERE silver 1 AND total 0;,0 What is the total network infrastructure investment for the 'Europe' region in the last 5 years?,"CREATE TABLE network_investments (id INT, investment FLOAT, year INT, region VARCHAR(15)); ",SELECT SUM(investment) FROM network_investments WHERE region = 'Europe' AND year BETWEEN 2017 AND 2021;,SELECT SUM(investment) FROM network_investments WHERE region = 'Europe' AND year BETWEEN 2019 AND 2021;,0 What are the top 5 heritage sites with the largest visitor count?,"CREATE TABLE heritage_sites_visitors (id INT, site_name VARCHAR(100), country VARCHAR(50), visitor_count INT); ","SELECT site_name, visitor_count FROM heritage_sites_visitors ORDER BY visitor_count DESC LIMIT 5;","SELECT site_name, visitor_count FROM heritage_sites_visitors ORDER BY visitor_count DESC LIMIT 5;",1 Which episode number was associated with Vibhav Gautam?,"CREATE TABLE table_name_1 (episode_number VARCHAR, name VARCHAR);","SELECT episode_number FROM table_name_1 WHERE name = ""vibhav gautam"";","SELECT episode_number FROM table_name_1 WHERE name = ""vibhav gautam"";",1 Who are the top 3 clients with the highest total transaction amounts in the 'Retail' division?,"CREATE TABLE Clients (ClientID int, Name varchar(50), Division varchar(50)); CREATE TABLE Transactions (TransactionID int, ClientID int, Amount decimal(10,2)); ","SELECT c.Name, SUM(t.Amount) as TotalTransactionAmount FROM Clients c INNER JOIN Transactions t ON c.ClientID = t.ClientID WHERE c.Division = 'Retail' GROUP BY c.Name ORDER BY TotalTransactionAmount DESC LIMIT 3;","SELECT Clients.Name, SUM(Transactions.Amount) as TotalTransactionAmount FROM Clients INNER JOIN Transactions ON Clients.ClientID = Transactions.ClientID WHERE Clients.Dividence = 'Retail' GROUP BY Clients.Name ORDER BY TotalTransactionAmount DESC LIMIT 3;",0 "What are the top 5 most vulnerable systems in the last month, based on CVE scores, for the finance department?","CREATE TABLE systems (system_id INT, system_name VARCHAR(255), department VARCHAR(255));CREATE TABLE cve_scores (system_id INT, score INT, scan_date DATE);","SELECT s.system_name, AVG(c.score) as avg_score FROM systems s INNER JOIN cve_scores c ON s.system_id = c.system_id WHERE s.department = 'finance' AND c.scan_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY s.system_name ORDER BY avg_score DESC LIMIT 5;","SELECT systems.system_name, SUM(cve_scores.score) as total_score FROM systems INNER JOIN cve_scores ON systems.system_id = cve_scores.system_id WHERE systems.department = 'Finance' AND scan_date >= DATEADD(month, -1, GETDATE()) GROUP BY systems.system_name ORDER BY total_score DESC LIMIT 5;",0 "What was the free agent class, with a pick less than 38?","CREATE TABLE table_name_22 (free_agent_class VARCHAR, pick INTEGER);",SELECT free_agent_class FROM table_name_22 WHERE pick < 38;,SELECT free_agent_class FROM table_name_22 WHERE pick 38;,0 Which hotel has the most bookings in the 'Hotel_Bookings' table?,"CREATE TABLE Hotel_Bookings (hotel_name VARCHAR(50), bookings INT); ","SELECT hotel_name, MAX(bookings) FROM Hotel_Bookings;","SELECT hotel_name, SUM(bookings) as total_bookings FROM Hotel_Bookings GROUP BY hotel_name ORDER BY total_bookings DESC;",0 What was the latest year for the film Gaon Ki Ganga?,"CREATE TABLE table_name_95 (year INTEGER, film_name VARCHAR);","SELECT MAX(year) FROM table_name_95 WHERE film_name = ""gaon ki ganga"";","SELECT MAX(year) FROM table_name_95 WHERE film_name = ""gaon ki ganga"";",1 What was the score of the game when the home team was Lincoln City?,"CREATE TABLE table_name_74 (score VARCHAR, home_team VARCHAR);","SELECT score FROM table_name_74 WHERE home_team = ""lincoln city"";","SELECT score FROM table_name_74 WHERE home_team = ""lincoln city"";",1 How many seasons did Barking Birmingham & Solihull Stourbridge were relegated from league?,"CREATE TABLE table_23927423_4 (season VARCHAR, relegated_from_league VARCHAR);","SELECT COUNT(season) FROM table_23927423_4 WHERE relegated_from_league = ""Barking Birmingham & Solihull Stourbridge"";","SELECT COUNT(season) FROM table_23927423_4 WHERE relegated_from_league = ""Baking Birmingham & Solihull Stourbridge"";",0 what is the grid when the time/retired is 1:46:42.3?,"CREATE TABLE table_name_61 (grid INTEGER, time_retired VARCHAR);","SELECT SUM(grid) FROM table_name_61 WHERE time_retired = ""1:46:42.3"";","SELECT SUM(grid) FROM table_name_61 WHERE time_retired = ""1:46:42.3"";",1 "What is the total number of wins of the club with a goal difference less than 21, 4 draws, and less than 21 losses?","CREATE TABLE table_name_81 (wins VARCHAR, losses VARCHAR, goal_difference VARCHAR, draws VARCHAR);",SELECT COUNT(wins) FROM table_name_81 WHERE goal_difference < 21 AND draws = 4 AND losses < 21;,SELECT COUNT(wins) FROM table_name_81 WHERE goal_difference 21 AND draws = 4 AND losses 21;,0 Which Losses have a Pct of .451 and Finished 6th?,"CREATE TABLE table_name_92 (losses VARCHAR, pct VARCHAR, finish VARCHAR);","SELECT losses FROM table_name_92 WHERE pct = "".451"" AND finish = ""6th"";","SELECT losses FROM table_name_92 WHERE pct = "".451"" AND finish = ""6th"";",1 What's the tries for count for the team with 70 points? ,"CREATE TABLE table_14070062_3 (tries_for VARCHAR, points VARCHAR);","SELECT tries_for FROM table_14070062_3 WHERE points = ""70"";",SELECT tries_for FROM table_14070062_3 WHERE points = 70;,0 How many volunteers signed up in each month in 2020?,"CREATE TABLE volunteer_signups (volunteer_id INT, signup_date DATE); ","SELECT MONTH(signup_date) as month, COUNT(volunteer_id) as total_volunteers FROM volunteer_signups WHERE YEAR(signup_date) = 2020 GROUP BY month;","SELECT EXTRACT(MONTH FROM signup_date) as month, COUNT(*) as num_volunteers FROM volunteer_signups WHERE YEAR(signup_date) = 2020 GROUP BY month;",0 What is the total revenue generated by attorneys from the 'Boston' region in the 'Criminal' practice area?,"CREATE TABLE Attorneys (AttorneyID INT, Name TEXT, Region TEXT, Practice TEXT, Revenue FLOAT); ",SELECT SUM(Revenue) FROM Attorneys WHERE Region = 'Boston' AND Practice = 'Criminal';,SELECT SUM(Revenue) FROM Attorneys WHERE Region = 'Boston' AND Practice = 'Criminal';,1 What is the total donation amount per organization in the 'philanthropy.organizations' table?,"CREATE TABLE philanthropy.organizations (organization_id INT, organization_name TEXT, total_donations DECIMAL);","SELECT organization_id, SUM(d.amount) FROM philanthropy.donations d JOIN philanthropy.organizations o ON d.organization_id = o.organization_id GROUP BY organization_id;","SELECT organization_name, SUM(total_donations) FROM philanthropy.organizations GROUP BY organization_name;",0 What are the circular economy initiatives in the city of Tokyo?,"CREATE TABLE circular_economy_initiatives_tokyo (city varchar(255), initiative varchar(255)); ",SELECT initiative FROM circular_economy_initiatives_tokyo WHERE city = 'Tokyo',SELECT initiative FROM circular_economy_initiatives_tokyo WHERE city = 'Tokyo';,0 "Find the total funding for research grants in the College of Science where the grant amount is greater than $50,000.","CREATE TABLE grants (id INT, college VARCHAR(50), amount DECIMAL(10,2)); CREATE TABLE colleges (id INT, name VARCHAR(50)); ",SELECT SUM(g.amount) FROM grants g JOIN colleges c ON g.college = c.name WHERE c.name = 'Science' AND g.amount > 50000;,SELECT SUM(grants.amount) FROM grants INNER JOIN colleges ON grants.college = colleges.id WHERE grants.amount > 50000;,0 "What is Home Team, when Tie No is 4?","CREATE TABLE table_name_49 (home_team VARCHAR, tie_no VARCHAR);","SELECT home_team FROM table_name_49 WHERE tie_no = ""4"";","SELECT home_team FROM table_name_49 WHERE tie_no = ""4"";",1 Who are the volunteers from the 'Global South' region?,"CREATE TABLE Volunteers (VolunteerID INT, Name TEXT, Department TEXT, Region TEXT); ",SELECT Name FROM Volunteers WHERE Region = 'South America';,SELECT Name FROM Volunteers WHERE Region = 'Global South';,0 "What is the percentage of corn fields in Iowa that have a nitrogen level below 120 ppm, based on IoT sensor data?","CREATE TABLE nitrogen_data (location VARCHAR(255), date DATE, nitrogen FLOAT); ",SELECT 100.0 * COUNT(*) / (SELECT COUNT(*) FROM nitrogen_data WHERE location LIKE '%Iowa Corn Field%') FROM nitrogen_data WHERE nitrogen < 120.0 AND location LIKE '%Iowa Corn Field%';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM nitrogen_data WHERE location = 'Iowa')) AS percentage FROM nitrogen_data WHERE location = 'Iowa' AND nitrogen 120;,0 What is the maximum duration of a flight in the 'flight_duration' table?,"CREATE TABLE flight_duration (flight_id INT, duration TIME);",SELECT MAX(duration) FROM flight_duration;,SELECT MAX(duration) FROM flight_duration;,1 "Insert a new record into the ""clinicians"" table for 'Clinician C' with the last name 'Lee' and specialty 'Pediatrics'","CREATE TABLE clinicians (id INT PRIMARY KEY AUTO_INCREMENT, first_name VARCHAR(50), last_name VARCHAR(50), specialty VARCHAR(50)); ","INSERT INTO clinicians (first_name, last_name, specialty) VALUES ('Clinician C', 'Lee', 'Pediatrics');","INSERT INTO clinicians (id, first_name, last_name, specialty) VALUES ('Clinician C', 'Lee', 'Pediatrics');",0 What is the minimum depth of all marine protected areas in the Atlantic Ocean?,"CREATE TABLE marine_protected_areas (area_name TEXT, location TEXT, avg_depth FLOAT); ",SELECT MIN(avg_depth) FROM marine_protected_areas WHERE location = 'Atlantic Ocean';,SELECT MIN(avg_depth) FROM marine_protected_areas WHERE location = 'Atlantic Ocean';,1 What is the total area (in hectares) of rice farms using automated irrigation systems in Japan?,"CREATE TABLE irrigation_systems (system_id INT, system_type TEXT, is_automated BOOLEAN, farm_id INT); CREATE TABLE farm_info (farm_id INT, name TEXT, country TEXT, crop TEXT, area_ha DECIMAL(5,2)); ",SELECT SUM(area_ha) FROM irrigation_systems JOIN farm_info ON irrigation_systems.farm_id = farm_info.farm_id WHERE farm_info.country = 'Japan' AND irrigation_systems.is_automated = true AND farm_info.crop = 'Rice';,SELECT SUM(area_ha) FROM farm_info INNER JOIN irrigation_systems ON farm_info.farm_id = irrigation_systems.farm_id WHERE irrigation_systems.is_automated = true AND farm_info.crop = 'Rice' AND farm_info.country = 'Japan';,0 How many were in attendance in a week lower than 5 with a Bye result?,"CREATE TABLE table_name_69 (attendance VARCHAR, week VARCHAR, result VARCHAR);","SELECT attendance FROM table_name_69 WHERE week < 5 AND result = ""bye"";","SELECT COUNT(attendance) FROM table_name_69 WHERE week 5 AND result = ""bye"";",0 How many unique donors have donated to each sector?,"CREATE TABLE donors (id INT, donor_id INT, name VARCHAR(255)); CREATE TABLE donations (id INT, donor_id INT, sector VARCHAR(255), amount DECIMAL(10,2)); ","SELECT sector, COUNT(DISTINCT donor_id) as num_donors FROM donations GROUP BY sector;","SELECT d.sector, COUNT(DISTINCT d.donor_id) as unique_donors FROM donations d JOIN donors d ON d.donor_id = d.donor_id GROUP BY d.sector;",0 Insert a new team in the Teams table,"CREATE TABLE Teams (TeamID INT, TeamName VARCHAR(50), City VARCHAR(50), Sport VARCHAR(20), EstablishedYear INT);","INSERT INTO Teams (TeamID, TeamName, City, Sport, EstablishedYear) VALUES (3, 'Atlanta United FC', 'Atlanta', 'Soccer', 2017);","INSERT INTO Teams (TeamID, TeamName, City, Sport, EstablishedYear) VALUES (1, 'Boston', 'Basketball', '2022-01-01');",0 What season was School/Club Team perpetual help in the guard position?,"CREATE TABLE table_name_6 (season VARCHAR, position VARCHAR, school_club_team VARCHAR);","SELECT season FROM table_name_6 WHERE position = ""guard"" AND school_club_team = ""perpetual help"";","SELECT season FROM table_name_6 WHERE position = ""guard"" AND school_club_team = ""perpetual help"";",1 Get the average depth of marine life research sites in the Caribbean sea,"CREATE TABLE caribbean_sites (site_id INT, site_name VARCHAR(255), longitude DECIMAL(9,6), latitude DECIMAL(9,6), depth DECIMAL(5,2)); CREATE VIEW caribbean_sites_view AS SELECT * FROM caribbean_sites WHERE latitude BETWEEN 10 AND 25 AND longitude BETWEEN -80 AND -60;",SELECT AVG(depth) FROM caribbean_sites_view;,SELECT AVG(depth) FROM caribbean_sites_view;,1 Add a new vendor named 'XYZ Defense' to the vendor_contracts table with a vendor_id of 123,"CREATE TABLE vendor_contracts (vendor_id INT, vendor_name VARCHAR(50), contract_id INT, contract_value DECIMAL(10,2));","INSERT INTO vendor_contracts (vendor_id, vendor_name) VALUES (123, 'XYZ Defense');","INSERT INTO vendor_contracts (vendor_id, vendor_name, contract_id, contract_value) VALUES (1, 'XYZ Defense', 123);",0 "WHAT IS THE GROSS DOLLARS WITH A RANK OF 7 OR MORE, AND DIRECTOR BARRY LEVINSON?","CREATE TABLE table_name_71 (gross VARCHAR, rank VARCHAR, director VARCHAR);","SELECT gross FROM table_name_71 WHERE rank > 7 AND director = ""barry levinson"";","SELECT gross FROM table_name_71 WHERE rank > 7 AND director = ""barry levinson"";",1 Which share had an audience of 4.693.000?,"CREATE TABLE table_name_12 (share VARCHAR, audience VARCHAR);","SELECT share FROM table_name_12 WHERE audience = ""4.693.000"";","SELECT share FROM table_name_12 WHERE audience = ""4.693.000"";",1 What was the score in the match against Sanaz Marand?,"CREATE TABLE table_name_54 (score VARCHAR, opponent VARCHAR);","SELECT score FROM table_name_54 WHERE opponent = ""sanaz marand"";","SELECT score FROM table_name_54 WHERE opponent = ""sanaz marand"";",1 what is the format when the frequency is fm 94.5?,"CREATE TABLE table_name_58 (format VARCHAR, frequency VARCHAR);","SELECT format FROM table_name_58 WHERE frequency = ""fm 94.5"";","SELECT format FROM table_name_58 WHERE frequency = ""fm 94.5"";",1 Which driver won the i race of champions?,"CREATE TABLE table_1140099_6 (winning_driver VARCHAR, race_name VARCHAR);","SELECT winning_driver FROM table_1140099_6 WHERE race_name = ""I Race of Champions"";","SELECT winning_driver FROM table_1140099_6 WHERE race_name = ""I"";",0 What is the average sea surface temperature in the Arctic Ocean?,"CREATE TABLE sea_surface_temperatures (ocean VARCHAR(50), avg_temp FLOAT); ",SELECT avg_temp FROM sea_surface_temperatures WHERE ocean = 'Arctic Ocean';,SELECT AVG(avg_temp) FROM sea_surface_temperatures WHERE ocean = 'Arctic Ocean';,0 What was the score of the game on November 9 when Atlanta was the visiting team?,"CREATE TABLE table_name_73 (score VARCHAR, visitor VARCHAR, date VARCHAR);","SELECT score FROM table_name_73 WHERE visitor = ""atlanta"" AND date = ""november 9"";","SELECT score FROM table_name_73 WHERE visitor = ""atlanta"" AND date = ""november 9"";",1 "What is the total amount of Shariah-compliant investments for each gender, ranked in descending order?","CREATE TABLE Investments (Id INT, Investor VARCHAR(20), Gender VARCHAR(10), InvestmentType VARCHAR(20), Amount DECIMAL(10,2), Year INT); ","SELECT Gender, SUM(Amount) AS Total_Amount FROM Investments WHERE InvestmentType = 'Shariah Compliant' GROUP BY Gender ORDER BY Total_Amount DESC;","SELECT Gender, SUM(Amount) as Total_Amount FROM Investments WHERE InvestmentType = 'Shariah-compliant' GROUP BY Gender ORDER BY Total_Amount DESC;",0 "Where is Transocean Richardson, a semi entered into service in 1988?","CREATE TABLE table_name_31 (location VARCHAR, name VARCHAR, type VARCHAR, entered_service VARCHAR);","SELECT location FROM table_name_31 WHERE type = ""semi"" AND entered_service = ""1988"" AND name = ""transocean richardson"";","SELECT location FROM table_name_31 WHERE type = ""semi"" AND entered_service = ""1988"" AND name = ""transocean ribaldson"";",0 What is the total number of schools that offer lifelong learning programs in the 'school_data' table?,"CREATE TABLE school_data (school_id INT, school_name VARCHAR(50), offers_lifelong_learning BOOLEAN);",SELECT COUNT(*) FROM school_data WHERE offers_lifelong_learning = TRUE;,SELECT COUNT(*) FROM school_data WHERE offers_lifelong_learning = true;,0 What is the maximum number of passengers for metro stations in 'east' region?,"CREATE TABLE metro_stations (station_id INT, region VARCHAR(10), passengers INT); ",SELECT MAX(passengers) FROM metro_stations WHERE region = 'east';,SELECT MAX(passengers) FROM metro_stations WHERE region = 'east';,1 How many were in attendance when the league position was 16th and the score was F–A of 0–3?,"CREATE TABLE table_name_43 (attendance VARCHAR, league_position VARCHAR, score_f_a VARCHAR);","SELECT COUNT(attendance) FROM table_name_43 WHERE league_position = ""16th"" AND score_f_a = ""0–3"";","SELECT COUNT(attendance) FROM table_name_43 WHERE league_position = ""16th"" AND score_f_a = ""0–3"";",1 What was the average daily water consumption (in gallons) in the state of California in January 2021?,"CREATE TABLE states (id INT, name VARCHAR(255)); CREATE TABLE water_consumption (state_id INT, consumption INT, date DATE); ",SELECT AVG(consumption) as avg_daily_consumption FROM water_consumption WHERE state_id = 1 AND date BETWEEN '2021-01-01' AND '2021-01-31';,SELECT AVG(consumption) FROM water_consumption WHERE state_id = (SELECT id FROM states WHERE name = 'California') AND date BETWEEN '2021-01-01' AND '2021-01-31';,0 What are the names of all the whale species in the Antarctic Ocean and their conservation status?,"CREATE TABLE marine_mammals (mammal_id INT, mammal_name VARCHAR(255), PRIMARY KEY(mammal_id)); CREATE TABLE conservation_status (status_id INT, mammal_id INT, status VARCHAR(255), PRIMARY KEY(status_id, mammal_id), FOREIGN KEY (mammal_id) REFERENCES marine_mammals(mammal_id)); CREATE TABLE ocean_distribution (distribution_id INT, mammal_id INT, region VARCHAR(255), PRIMARY KEY(distribution_id, mammal_id), FOREIGN KEY (mammal_id) REFERENCES marine_mammals(mammal_id)); ","SELECT marine_mammals.mammal_name, conservation_status.status FROM marine_mammals INNER JOIN conservation_status ON marine_mammals.mammal_id = conservation_status.mammal_id INNER JOIN ocean_distribution ON marine_mammals.mammal_id = ocean_distribution.mammal_id WHERE ocean_distribution.region = 'Antarctic Ocean';","SELECT marine_mammals.mammal_name, conservation_status.status FROM marine_mammals INNER JOIN conservation_status ON marine_mammals.mammal_id = conservation_status.mammal_id INNER JOIN ocean_distribution ON conservation_status.mammal_id = ocean_distribution.mammal_id WHERE ocean_distribution.region = 'Antarctic Ocean';",0 What is the number of stages where the teams classification leader is Cervélo Testteam?,"CREATE TABLE table_26010857_13 (stage VARCHAR, teams_classification VARCHAR);","SELECT COUNT(stage) FROM table_26010857_13 WHERE teams_classification = ""Cervélo TestTeam"";","SELECT COUNT(stage) FROM table_26010857_13 WHERE teams_classification = ""Cervélo Testteam"";",0 Which size category has the highest number of customers?,"CREATE TABLE CustomerDemographics (id INT, customer_id INT, age INT, size_category TEXT); ","SELECT size_category, COUNT(*) AS count FROM CustomerDemographics GROUP BY size_category ORDER BY count DESC LIMIT 1;","SELECT size_category, COUNT(*) as customer_count FROM CustomerDemographics GROUP BY size_category ORDER BY customer_count DESC LIMIT 1;",0 What is the total budget for 'youth-focused economic diversification projects' in 'South America' since 2016?,"CREATE TABLE projects (id INT, name TEXT, region TEXT, budget FLOAT, focus TEXT, start_date DATE); ",SELECT SUM(projects.budget) FROM projects WHERE projects.region = 'South America' AND projects.focus = 'youth-focused economic diversification' AND projects.start_date >= '2016-01-01';,SELECT SUM(budget) FROM projects WHERE region = 'South America' AND focus = 'youth-focused economic diversification' AND start_date >= '2016-01-01';,0 What is the total population of all marine species in the Southern Ocean that have been impacted by climate change?,"CREATE TABLE marine_species (id INT PRIMARY KEY, species VARCHAR(255), population INT, region VARCHAR(255));CREATE TABLE climate_change_impact (id INT PRIMARY KEY, location VARCHAR(255), temperature_change FLOAT, year INT);CREATE VIEW species_by_region AS SELECT region, species, population FROM marine_species;CREATE VIEW climate_impacted_species AS SELECT species FROM marine_species JOIN climate_change_impact ON marine_species.species = climate_change_impact.location WHERE temperature_change > 1;",SELECT SUM(population) FROM marine_species JOIN climate_impacted_species ON marine_species.species = climate_impacted_species.species WHERE marine_species.region = 'Southern Ocean';,SELECT SUM(population) FROM species_by_region INNER JOIN climate_impacted_species ON species_by_region.region = climate_impacted_species.region WHERE climate_change_impact.location = 'Southern Ocean';,0 Which countries are listed in the 'International_Alliances' table?,"CREATE TABLE International_Alliances (id INT, country VARCHAR(50), alliance VARCHAR(50)); ",SELECT DISTINCT country FROM International_Alliances;,SELECT country FROM International_Alliances;,0 Count the number of players who have played in esports events,"CREATE TABLE Players (PlayerID INT, EsportsExperience BOOLEAN); ",SELECT COUNT(*) FROM Players WHERE EsportsExperience = TRUE;,SELECT COUNT(*) FROM Players WHERE EsportsExperience = TRUE;,1 "What is the Surface when the score was 4–6, 6–3, 6–7 (5–7)?","CREATE TABLE table_name_75 (surface VARCHAR, score VARCHAR);","SELECT surface FROM table_name_75 WHERE score = ""4–6, 6–3, 6–7 (5–7)"";","SELECT surface FROM table_name_75 WHERE score = ""4–6, 6–3, 6–7 (5–7)"";",1 What day were the results 3:0?,"CREATE TABLE table_name_67 (date VARCHAR, results¹ VARCHAR);","SELECT date FROM table_name_67 WHERE results¹ = ""3:0"";","SELECT date FROM table_name_67 WHERE results1 = ""3:0"";",0 What is the number of students with each type of disability?,"CREATE TABLE Disability_Types (Student_ID INT, Student_Name TEXT, Disability_Type TEXT); ","SELECT Disability_Type, COUNT(*) FROM Disability_Types GROUP BY Disability_Type;","SELECT Disability_Type, COUNT(*) FROM Disability_Types GROUP BY Disability_Type;",1 What was the result of the game with the record of 3-1?,"CREATE TABLE table_20849830_1 (result VARCHAR, record VARCHAR);","SELECT result FROM table_20849830_1 WHERE record = ""3-1"";","SELECT result FROM table_20849830_1 WHERE record = ""3-1"";",1 What is the total quantity of grain transported by vessels from the USA to Africa?,"CREATE TABLE vessel_cargo ( id INT, vessel_id INT, departure_country VARCHAR(255), arrival_country VARCHAR(255), cargo_type VARCHAR(255), quantity INT ); ",SELECT SUM(quantity) as total_grain_transported FROM vessel_cargo WHERE departure_country = 'USA' AND arrival_country = 'Africa' AND cargo_type = 'Grain';,SELECT SUM(quantity) FROM vessel_cargo WHERE departure_country = 'USA' AND arrival_country = 'Africa' AND cargo_type = 'Grain';,0 What is the total quantity of gluten-free products ordered in Texas?,"CREATE TABLE Products (ProductID INT, ProductName VARCHAR(50), SupplierID INT, Category VARCHAR(50), IsGlutenFree BOOLEAN, Price DECIMAL(5, 2)); CREATE TABLE Orders (OrderID INT, ProductID INT, Quantity INT, OrderDate DATE, CustomerLocation VARCHAR(50)); ",SELECT SUM(Quantity) FROM Orders JOIN Products ON Orders.ProductID = Products.ProductID WHERE Products.IsGlutenFree = true AND CustomerLocation = 'Texas';,SELECT SUM(Quantity) FROM Orders JOIN Products ON Orders.ProductID = Products.ProductID WHERE Products.IsGlutenFree = TRUE AND Products.Country = 'Texas';,0 what is the party for the district south carolina 4?,"CREATE TABLE table_1341423_40 (party VARCHAR, district VARCHAR);","SELECT party FROM table_1341423_40 WHERE district = ""South Carolina 4"";","SELECT party FROM table_1341423_40 WHERE district = ""South Carolina 4"";",1 "How many units of each product were sold in the last month, by supplier?","CREATE TABLE sales (sale_date DATE, supplier VARCHAR(255), product VARCHAR(255), quantity INT);","SELECT supplier, product, SUM(quantity) AS qty_sold, DATE_TRUNC('month', sale_date) AS sale_month FROM sales WHERE sale_date >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '1 month') GROUP BY supplier, product, sale_month;","SELECT supplier, product, SUM(quantity) FROM sales WHERE sale_date >= DATEADD(month, -1, GETDATE()) GROUP BY supplier, product;",0 What is the total CO2 emission for each factory in the Western region by country?,"CREATE TABLE factories (factory_id INT, factory_name VARCHAR(50), country VARCHAR(50), co2_emission INT); CREATE TABLE country_regions (country VARCHAR(50), region VARCHAR(50));","SELECT country, SUM(co2_emission) FROM factories JOIN country_regions ON factories.country = country_regions.country WHERE region = 'Western' GROUP BY country;","SELECT f.country, SUM(f.co2_emission) FROM factories f INNER JOIN country_regions cr ON f.country = cr.country WHERE cr.region = 'Western' GROUP BY f.country;",0 What is the copa libertadores 1996 of team corinthians?,"CREATE TABLE table_name_32 (copa_libertadores_1996 VARCHAR, team VARCHAR);","SELECT copa_libertadores_1996 FROM table_name_32 WHERE team = ""corinthians"";","SELECT copa_libertadores_1996 FROM table_name_32 WHERE team = ""corinthians"";",1 List all climate mitigation initiatives in 'Asia'.,"CREATE TABLE initiatives (id INT, initiative_type TEXT, region_id INT); CREATE TABLE regions (id INT, region TEXT); ",SELECT initiatives.initiative_type FROM initiatives INNER JOIN regions ON initiatives.region_id = regions.id WHERE regions.region = 'Asia' AND initiatives.initiative_type = 'Mitigation';,SELECT initiatives.initiative_type FROM initiatives INNER JOIN regions ON initiatives.region_id = regions.id WHERE initiatives.initiative_type = 'climate mitigation' AND regions.region = 'Asia';,0 What are the top 3 sustainable destinations in Asia?,"CREATE TABLE destinations (id INT, name VARCHAR(255), sustainability_score INT); ",SELECT name FROM destinations WHERE country IN ('Asia') ORDER BY sustainability_score DESC LIMIT 3;,"SELECT name, sustainability_score FROM destinations WHERE region = 'Asia' ORDER BY sustainability_score DESC LIMIT 3;",0 How many region 1's did back to earth have?,"CREATE TABLE table_25721_4 (region_1 VARCHAR, release VARCHAR);","SELECT COUNT(region_1) FROM table_25721_4 WHERE release = ""Back to Earth"";","SELECT COUNT(region_1) FROM table_25721_4 WHERE release = ""Back to Earth"";",1 List all artworks that use 'Oil on canvas' as the medium.,"CREATE TABLE Artworks (id INT, artist VARCHAR(50), title VARCHAR(100), year INT, medium VARCHAR(50), width FLOAT, height FLOAT); ",SELECT * FROM Artworks WHERE medium = 'Oil on canvas';,SELECT title FROM Artworks WHERE medium = 'Oil on Canvas';,0 How many renewable energy projects were initiated in California in 2020?,"CREATE TABLE renewable_projects (state VARCHAR(20), year INT, num_projects INT); ",SELECT num_projects FROM renewable_projects WHERE state = 'California' AND year = 2020;,SELECT SUM(num_projects) FROM renewable_projects WHERE state = 'California' AND year = 2020;,0 How many smart contracts were deployed in the last 30 days?,"CREATE TABLE contract_deployments (id INT PRIMARY KEY, contract_name VARCHAR(255), deploy_date DATE); ",SELECT COUNT(*) FROM contract_deployments WHERE deploy_date >= CURDATE() - INTERVAL 30 DAY;,"SELECT COUNT(*) FROM contract_deployments WHERE deploy_date >= DATEADD(day, -30, GETDATE());",0 "Who was the opponent after week 9 with an attendance of 44,020?","CREATE TABLE table_name_96 (opponent VARCHAR, week VARCHAR, attendance VARCHAR);","SELECT opponent FROM table_name_96 WHERE week > 9 AND attendance = ""44,020"";","SELECT opponent FROM table_name_96 WHERE week > 9 AND attendance = ""44,020"";",1 What are the average soil moisture levels for vineyards in France and Spain?,"CREATE TABLE VineyardSoilMoisture (country VARCHAR(20), region VARCHAR(30), moisture FLOAT); ","SELECT AVG(moisture) FROM VineyardSoilMoisture WHERE country IN ('France', 'Spain') AND region IN ('Bordeaux', 'Burgundy', 'Rioja', 'Ribera del Duero');","SELECT AVG(moisture) FROM VineyardSoilMoisture WHERE country IN ('France', 'Spain');",0 When is the scheduled date for the farm having 17 turbines?,"CREATE TABLE table_name_96 (scheduled VARCHAR, turbines VARCHAR);",SELECT scheduled FROM table_name_96 WHERE turbines = 17;,SELECT scheduled FROM table_name_96 WHERE turbines = 17;,1 What is the distribution of visitor ages for events in 'RegionZ'?,"CREATE TABLE Visitors (visitor_id INT, name VARCHAR(255), birthdate DATE, city VARCHAR(255)); CREATE TABLE Visits (visit_id INT, visitor_id INT, event_id INT, visit_date DATE); CREATE TABLE Events (event_id INT, name VARCHAR(255), date DATE, region VARCHAR(255));",SELECT AVG(YEAR(CURRENT_DATE) - YEAR(birthdate)) AS avg_age FROM Visitors V JOIN Visits IV ON V.visitor_id = IV.visitor_id JOIN Events E ON IV.event_id = E.event_id WHERE E.region = 'RegionZ';,SELECT COUNT(DISTINCT v.visitor_id) FROM Visitors v JOIN Visits v ON v.visitor_id = v.visitor_id JOIN Events e ON v.event_id = e.event_id WHERE e.region = 'RegionZ';,0 "Show the top 3 digital divide issues by number of reported cases, for Africa only.","CREATE TABLE digital_divide (id INT, issue VARCHAR(50), country VARCHAR(2), cases INT); ","SELECT issue, cases FROM digital_divide WHERE country = 'NG' OR country = 'EG' OR country = 'ZA' OR country = 'ET' OR country = 'GH' GROUP BY issue ORDER BY SUM(cases) DESC LIMIT 3;","SELECT issue, SUM(cases) as total_cases FROM digital_divide WHERE country = 'Africa' GROUP BY issue ORDER BY total_cases DESC LIMIT 3;",0 How many margins have a winner of S. Singaravadivel?,"CREATE TABLE table_22753439_1 (margin VARCHAR, winner VARCHAR);","SELECT COUNT(margin) FROM table_22753439_1 WHERE winner = ""S. Singaravadivel"";","SELECT COUNT(margin) FROM table_22753439_1 WHERE winner = ""S. Singaravadivel"";",1 "What is the sum of 1886(s), when 1886 is greater than 1070, and when 1891 is less than 1946?",CREATE TABLE table_name_19 (Id VARCHAR);,SELECT SUM(1886) FROM table_name_19 WHERE 1866 > 1070 AND 1891 < 1946;,SELECT COUNT(*) FROM table_name_19 WHERE 1886 > 1070 AND 1891 1946;,0 Find the unique hobbies of visitors aged between 25 and 40 from Europe.,"CREATE TABLE visitors (id INT, name VARCHAR(100), country VARCHAR(50), age INT, hobby VARCHAR(50)); ",SELECT DISTINCT hobby FROM visitors WHERE age BETWEEN 25 AND 40 AND country LIKE 'Europe%';,SELECT DISTINCT hobby FROM visitors WHERE country = 'Europe' AND age BETWEEN 25 AND 40;,0 Which languages are spoken by only one country in republic governments?,"CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR); CREATE TABLE country (Code VARCHAR, GovernmentForm VARCHAR);","SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = ""Republic"" GROUP BY T2.Language HAVING COUNT(*) = 1;","SELECT T1.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.GovernmentForm = ""Republic"" GROUP BY T1.Code HAVING COUNT(*) = 1;",0 What is the name and donation amount of the top donor for each cause?,"CREATE TABLE causes (cause_id INT, cause_name VARCHAR(255)); CREATE TABLE donations (donor_id INT, donor_name VARCHAR(255), cause_id INT, donation_amount INT); ","SELECT c.cause_name, d.donor_name, d.donation_amount FROM (SELECT donor_name, cause_id, donation_amount, ROW_NUMBER() OVER (PARTITION BY cause_id ORDER BY donation_amount DESC) AS rn FROM donations) d JOIN causes c ON d.cause_id = c.cause_id WHERE d.rn = 1;","SELECT c.cause_name, d.donor_name, d.donation_amount FROM causes c JOIN donations d ON c.cause_id = d.cause_id GROUP BY c.cause_name ORDER BY d.donation_amount DESC LIMIT 1;",0 WHAT WAS THE YEAR WHEN THE RUNNER-UP WAS WILLIAM MEHLHORN?,"CREATE TABLE table_1507806_1 (year INTEGER, runner_up VARCHAR);","SELECT MAX(year) FROM table_1507806_1 WHERE runner_up = ""William Mehlhorn"";","SELECT MAX(year) FROM table_1507806_1 WHERE runner_up = ""William Mehlhorn"";",1 how many games has kansas state and depaul played against each other,"CREATE TABLE table_15740666_6 (games_played VARCHAR, kansas_state_vs VARCHAR);","SELECT COUNT(games_played) FROM table_15740666_6 WHERE kansas_state_vs = ""DePaul"";","SELECT games_played FROM table_15740666_6 WHERE kansas_state_vs = ""Depaul"";",0 "Which venue has Tickets Sold/ Available with a Gross Revenue (1979) of $665,232?","CREATE TABLE table_name_26 (tickets_sold___available VARCHAR, gross_revenue__1979_ VARCHAR);","SELECT tickets_sold___available FROM table_name_26 WHERE gross_revenue__1979_ = ""$665,232"";","SELECT tickets_sold___available FROM table_name_26 WHERE gross_revenue__1979_ = ""$655,232"";",0 "List all cities with a population between 200,000 and 500,000 that have a recycling rate above the state average.","CREATE TABLE cities_3 (name VARCHAR(255), state VARCHAR(255), population DECIMAL(10,2), recycling_rate DECIMAL(5,2)); ",SELECT name FROM cities_3 WHERE population BETWEEN 200000 AND 500000 AND recycling_rate > (SELECT AVG(recycling_rate) FROM cities_3 WHERE cities_3.state = cities_3.state);,SELECT name FROM cities_3 WHERE population BETWEEN 200000 AND 500000 AND recycling_rate > (SELECT AVG(recycling_rate) FROM cities_3);,0 What School did Player Alonzo Mourning attend?,"CREATE TABLE table_name_74 (school VARCHAR, player VARCHAR);","SELECT school FROM table_name_74 WHERE player = ""alonzo mourning"";","SELECT school FROM table_name_74 WHERE player = ""alonzo mourning"";",1 What is the coverage for relay tv-37?,"CREATE TABLE table_12379297_1 (coverage__transmitter_site_ VARCHAR, station_type VARCHAR, ch__number VARCHAR);","SELECT coverage__transmitter_site_ FROM table_12379297_1 WHERE station_type = ""Relay"" AND ch__number = ""TV-37"";","SELECT coverage__transmitter_site_ FROM table_12379297_1 WHERE station_type = ""Relay"" AND ch__number = ""TV-37"";",1 Name the Tag Team with a Time of 03:34?,"CREATE TABLE table_name_10 (tag_team VARCHAR, time VARCHAR);","SELECT tag_team FROM table_name_10 WHERE time = ""03:34"";","SELECT tag_team FROM table_name_10 WHERE time = ""03:34"";",1 Which stage was being played in Romania?,"CREATE TABLE table_name_34 (stage VARCHAR, venue VARCHAR);","SELECT stage FROM table_name_34 WHERE venue = ""romania"";","SELECT stage FROM table_name_34 WHERE venue = ""rumanian"";",0 "For language Aymara Simi, what was the maximum San Javier municipality percentage?","CREATE TABLE table_19998428_3 (san_javier_municipality___percentage_ INTEGER, language VARCHAR);","SELECT MAX(san_javier_municipality___percentage_) FROM table_19998428_3 WHERE language = ""Aymara simi"";","SELECT MAX(san_javier_municipality___percentage_) FROM table_19998428_3 WHERE language = ""Aymara Simi"";",0 How many innings does rank 3 have?,"CREATE TABLE table_21100348_11 (innings INTEGER, rank VARCHAR);",SELECT MAX(innings) FROM table_21100348_11 WHERE rank = 3;,SELECT MAX(innings) FROM table_21100348_11 WHERE rank = 3;,1 How many energy projects of each type exist?,"CREATE TABLE projects (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), type VARCHAR(255), capacity FLOAT, start_date DATE, end_date DATE); ","SELECT type, COUNT(*) FROM projects GROUP BY type;","SELECT type, COUNT(*) FROM projects GROUP BY type;",1 What is the number of hybrid vehicles sold in Canada each year since 2015?,"CREATE TABLE VehicleSales (year INT, country VARCHAR(255), vehicle_type VARCHAR(255), sales INT); ","SELECT year, SUM(sales) AS hybrid_vehicle_sales FROM VehicleSales WHERE country = 'Canada' AND vehicle_type = 'Hybrid' GROUP BY year;","SELECT year, SUM(sales) FROM VehicleSales WHERE country = 'Canada' AND vehicle_type = 'Hybrid' GROUP BY year;",0 During what period was the career average 44.10?,"CREATE TABLE table_21100348_10 (period VARCHAR, average VARCHAR);","SELECT period FROM table_21100348_10 WHERE average = ""44.10"";","SELECT period FROM table_21100348_10 WHERE average = ""44.10"";",1 What is the number of generators where the power capicity is 78.7?,"CREATE TABLE table_11456251_5 (number_of_generators VARCHAR, power_capacity__gw_ VARCHAR);","SELECT COUNT(number_of_generators) FROM table_11456251_5 WHERE power_capacity__gw_ = ""78.7"";","SELECT number_of_generators FROM table_11456251_5 WHERE power_capacity__gw_ = ""78.7"";",0 Name the date of appointment for 26 may 2011,"CREATE TABLE table_27666856_3 (date_of_appointment VARCHAR, date_of_vacancy VARCHAR);","SELECT COUNT(date_of_appointment) FROM table_27666856_3 WHERE date_of_vacancy = ""26 May 2011"";","SELECT date_of_appointment FROM table_27666856_3 WHERE date_of_vacancy = ""26 May 2011"";",0 Which countries have no cultural heritage sites with virtual tours?,"CREATE TABLE CulturalHeritageSites (site_id INT, site_name TEXT, country TEXT, has_virtual_tour BOOLEAN); ",SELECT country FROM CulturalHeritageSites WHERE has_virtual_tour = FALSE GROUP BY country HAVING COUNT(*) = 0;,SELECT country FROM CulturalHeritageSites WHERE has_virtual_tour = false;,0 What is the average caloric intake per serving for organic dishes?,"CREATE TABLE dishes (id INT, name VARCHAR(255), is_organic BOOLEAN, serving_size INT, calories INT); ",SELECT AVG(calories / serving_size) as avg_caloric_intake FROM dishes WHERE is_organic = true;,SELECT AVG(calories) FROM dishes WHERE is_organic = true;,0 What is the total number of ships that passed through the Arctic Circle in 2017?,"CREATE TABLE ship_traffic (ship_id INT, ship_name VARCHAR(255), passage_date DATE, latitude DECIMAL(9,6), longitude DECIMAL(9,6)); ",SELECT COUNT(*) FROM ship_traffic WHERE YEAR(passage_date) = 2017 AND latitude >= 66.5608 AND latitude <= 90 AND longitude >= -180 AND longitude <= 180;,SELECT COUNT(*) FROM ship_traffic WHERE passage_date BETWEEN '2017-01-01' AND '2017-12-31';,0 What is player raymond floyd's country?,"CREATE TABLE table_name_64 (country VARCHAR, player VARCHAR);","SELECT country FROM table_name_64 WHERE player = ""raymond floyd"";","SELECT country FROM table_name_64 WHERE player = ""raymond floyd"";",1 What is the number of wheelchair-accessible stations and their total parking spaces for stations with more than 15 parking spaces?,"CREATE TABLE accessibility (accessibility_id INT, station_id INT, wheelchair_accessible BOOLEAN, parking_spaces INT, bike_racks INT); ","SELECT station_id, COUNT(*) as wheelchair_accessible_stations, SUM(parking_spaces) as total_parking_spaces FROM accessibility WHERE parking_spaces > 15 AND wheelchair_accessible = true GROUP BY station_id;","SELECT COUNT(DISTINCT station_id) as station_count, SUM(parking_spaces) as total_parking_spaces FROM accessibility WHERE wheelchair_accessible = true GROUP BY station_id HAVING COUNT(DISTINCT parking_spaces) > 15;",0 Find the number of volunteers who joined in 2021 from the 'volunteer_registration' table.,"CREATE TABLE volunteer_registration (id INT, name VARCHAR(50), city VARCHAR(50), state VARCHAR(50), country VARCHAR(50), registration_date DATE);",SELECT COUNT(*) FROM volunteer_registration WHERE YEAR(registration_date) = 2021;,SELECT COUNT(*) FROM volunteer_registration WHERE YEAR(registration_date) = 2021;,1 How many public community centers are there in the Southeast region?,"CREATE TABLE CommunityCenter (Name VARCHAR(255), Region VARCHAR(255), Type VARCHAR(255)); ",SELECT COUNT(*) FROM CommunityCenter WHERE Region = 'Southeast' AND Type = 'Public';,SELECT COUNT(*) FROM CommunityCenter WHERE Region = 'Southeast' AND Type = 'Public';,1 Total ticket sales for artists who have streamed over 100M times,"CREATE TABLE artists (id INT, name TEXT, total_streams INT); ",SELECT SUM(ticket_sales) AS total_sales FROM concerts JOIN artists ON concerts.artist_id = artists.id WHERE artists.total_streams > 100000000;,SELECT SUM(total_streams) FROM artists WHERE total_streams > 100000;,0 What was the lowest attendance for week 1?,"CREATE TABLE table_name_48 (attendance INTEGER, week VARCHAR);",SELECT MIN(attendance) FROM table_name_48 WHERE week = 1;,SELECT MIN(attendance) FROM table_name_48 WHERE week = 1;,1 List the names of all museums in Spain with a rating higher than 4.5.,"CREATE TABLE museums (museum_id INT, name VARCHAR(255), country VARCHAR(255), rating FLOAT); ",SELECT name FROM museums WHERE country = 'Spain' AND rating > 4.5;,SELECT name FROM museums WHERE country = 'Spain' AND rating > 4.5;,1 Find the average claim amount for policyholders in 'New York' who have comprehensive coverage.,"CREATE TABLE policyholders (id INT, name TEXT, city TEXT, state TEXT, claim_amount FLOAT, coverage TEXT); ",SELECT AVG(claim_amount) FROM policyholders WHERE state = 'NY' AND coverage = 'Comprehensive';,SELECT AVG(claim_amount) FROM policyholders WHERE city = 'New York' AND coverage = 'Comprehensive';,0 What did the away team score at corio oval?,"CREATE TABLE table_name_58 (away_team VARCHAR, venue VARCHAR);","SELECT away_team AS score FROM table_name_58 WHERE venue = ""corio oval"";","SELECT away_team AS score FROM table_name_58 WHERE venue = ""corio oval"";",1 What is the minimum claim amount paid to policyholders in 'Oregon'?,"CREATE TABLE claims (policyholder_id INT, claim_amount DECIMAL(10,2), policyholder_state VARCHAR(20)); ",SELECT MIN(claim_amount) FROM claims WHERE policyholder_state = 'Oregon';,SELECT MIN(claim_amount) FROM claims WHERE policyholder_state = 'Oregon';,1 What seasons does stella malone appear?,"CREATE TABLE table_12441518_1 (main_cast_seasons VARCHAR, character VARCHAR);","SELECT main_cast_seasons FROM table_12441518_1 WHERE character = ""Stella Malone"";","SELECT main_cast_seasons FROM table_12441518_1 WHERE character = ""Stella Malone"";",1 "What is the total amount of financial aid provided to refugees in Jordan and Turkey, grouped by organization?","CREATE TABLE financial_aid (id INT, organization VARCHAR(255), country VARCHAR(255), amount DECIMAL(10, 2)); ","SELECT organization, SUM(amount) as total_aid FROM financial_aid WHERE country IN ('Jordan', 'Turkey') GROUP BY organization;","SELECT organization, SUM(amount) FROM financial_aid WHERE country IN ('Jordan', 'Turkey') GROUP BY organization;",0 How many artworks were created by female artists in the 19th century?,"CREATE TABLE artworks (id INT, name VARCHAR(255), year INT, artist_name VARCHAR(255), artist_gender VARCHAR(10)); ",SELECT COUNT(*) FROM artworks WHERE artist_gender = 'female' AND year BETWEEN 1800 AND 1899;,SELECT COUNT(*) FROM artworks WHERE year = 2021 AND artist_gender = 'Female';,0 Who was performer 1 in the episode number 7 where Heather Anne Campbell was performer 2?,"CREATE TABLE table_23294081_11 (performer_1 VARCHAR, performer_2 VARCHAR, _number VARCHAR);","SELECT performer_1 FROM table_23294081_11 WHERE performer_2 = ""Heather Anne Campbell"" AND _number = 7;","SELECT performer_1 FROM table_23294081_11 WHERE performer_2 = ""Heather Anne Campbell"" AND _number = 7;",1 "When indianapolis, indiana is the location what is the institution?","CREATE TABLE table_28211213_2 (institution VARCHAR, location VARCHAR);","SELECT institution FROM table_28211213_2 WHERE location = ""Indianapolis, Indiana"";","SELECT institution FROM table_28211213_2 WHERE location = ""Indianapolis, Indiana"";",1 What is the total salary cost for workers in the 'workforce development' department?,"CREATE TABLE salaries_ext (id INT, worker_id INT, department VARCHAR(50), salary FLOAT, is_development BOOLEAN); ",SELECT SUM(salary) FROM salaries_ext WHERE department = 'workforce development' AND is_development = TRUE;,SELECT SUM(salary) FROM salaries_ext WHERE department = 'workforce development' AND is_development = true;,0 Display the number of health equity metric complaints by month for the past year,"CREATE TABLE complaints (id INT PRIMARY KEY, complaint_date DATE, complaint_type VARCHAR(50));","SELECT DATEPART(year, complaint_date) as year, DATEPART(month, complaint_date) as month, COUNT(*) as total_complaints FROM complaints WHERE complaint_type = 'Health Equity Metrics' AND complaint_date >= DATEADD(year, -1, GETDATE()) GROUP BY DATEPART(year, complaint_date), DATEPART(month, complaint_date) ORDER BY year, month;","SELECT EXTRACT(MONTH FROM complaint_date) AS month, COUNT(*) FROM complaints WHERE complaint_type = 'Health Equity Metric' AND complaint_date >= DATEADD(year, -1, GETDATE()) GROUP BY month;",0 Which Title was awarded the gold RIAA Sales Certification?,"CREATE TABLE table_name_5 (title VARCHAR, riaa_sales_certification VARCHAR);","SELECT title FROM table_name_5 WHERE riaa_sales_certification = ""gold"";","SELECT title FROM table_name_5 WHERE riaa_sales_certification = ""gold"";",1 What is the minimum number of reviews for sustainable hotels in Asia?,"CREATE TABLE asian_sustainable_hotels (id INT, name TEXT, country TEXT, reviews INT); ",SELECT MIN(reviews) as min_reviews FROM asian_sustainable_hotels;,SELECT MIN(reviews) FROM asian_sustainable_hotels;,0 Which school did Herb Williams go to?,"CREATE TABLE table_10015132_21 (school_club_team VARCHAR, player VARCHAR);","SELECT school_club_team FROM table_10015132_21 WHERE player = ""Herb Williams"";","SELECT school_club_team FROM table_10015132_21 WHERE player = ""Herb Williams"";",1 "What is the Place, when the Score is 68-70-71=209?","CREATE TABLE table_name_19 (place VARCHAR, score VARCHAR);",SELECT place FROM table_name_19 WHERE score = 68 - 70 - 71 = 209;,SELECT place FROM table_name_19 WHERE score = 68 - 70 - 71 = 209;,1 What is the total number of threat intelligence data in the energy sector?,"CREATE TABLE threat_intelligence (id INT, sector VARCHAR(20), data VARCHAR(50)); ",SELECT COUNT(*) FROM threat_intelligence WHERE sector = 'Energy';,SELECT COUNT(*) FROM threat_intelligence WHERE sector = 'Energy';,1 what is the year where glos & wilts is gloucester city winget?,"CREATE TABLE table_12043148_2 (year VARCHAR, glos_ VARCHAR, _wilts VARCHAR);","SELECT year FROM table_12043148_2 WHERE glos_ & _wilts = ""Gloucester City Winget"";","SELECT year FROM table_12043148_2 WHERE glos_ & _wilts = ""Gloucester City Winget"";",1 "If the primary (South) winners is Inter The Bloomfield, what is the season total number?","CREATE TABLE table_23014923_1 (season VARCHAR, primary__south__winners VARCHAR);","SELECT COUNT(season) FROM table_23014923_1 WHERE primary__south__winners = ""Inter The Bloomfield"";","SELECT COUNT(season) FROM table_23014923_1 WHERE primary__south__winners = ""Inter The Bloomfield"";",1 Delete all records in the 'Organizations' table where the category is 'Education',"CREATE TABLE Organizations (id INT PRIMARY KEY, organization_name VARCHAR(255), country VARCHAR(255), category VARCHAR(255));",DELETE FROM Organizations WHERE category = 'Education';,DELETE FROM Organizations WHERE category = 'Education';,1 "Which Byes have Losses larger than 0, and an Against larger than 3049?","CREATE TABLE table_name_7 (byes INTEGER, losses VARCHAR, against VARCHAR);",SELECT AVG(byes) FROM table_name_7 WHERE losses > 0 AND against > 3049;,SELECT SUM(byes) FROM table_name_7 WHERE losses > 0 AND against > 3049;,0 What is the minimum duration of defense projects with a cost less than 3.5 million?,"CREATE TABLE defense_projects(project_id INT, project_name VARCHAR(50), duration INT, cost FLOAT); ",SELECT MIN(duration) FROM defense_projects WHERE cost < 3500000;,SELECT MIN(duration) FROM defense_projects WHERE cost 3.5;,0 Find the number of artworks in the 'modern' period and their respective artist's gender,"ARTWORK(artwork_id, title, date_created, period, artist_id); ARTIST(artist_id, name, gender)","SELECT COUNT(a.artwork_id), g.gender FROM ARTWORK a INNER JOIN ARTIST g ON a.artist_id = g.artist_id WHERE a.period = 'modern' GROUP BY g.gender;","SELECT COUNT(*), artist_id, gender FROM ARTWORK WHERE period ='modern';",0 "Show the attendances of the performances at location ""TD Garden"" or ""Bell Centre""","CREATE TABLE performance (Attendance VARCHAR, LOCATION VARCHAR);","SELECT Attendance FROM performance WHERE LOCATION = ""TD Garden"" OR LOCATION = ""Bell Centre"";","SELECT Attendance FROM performance WHERE LOCATION = ""TD Garden"" OR LOCATION = ""Bell Centre"";",1 What are the names of the factories that have never reported recycling rates?,"CREATE TABLE factories (name TEXT, id INTEGER); CREATE TABLE recycling_rates (factory_id INTEGER, rate FLOAT); ",SELECT f.name FROM factories f LEFT JOIN recycling_rates r ON f.id = r.factory_id WHERE r.rate IS NULL;,SELECT factories.name FROM factories INNER JOIN recycling_rates ON factories.id = recycling_rates.factory_id WHERE recycling_rates.rate IS NULL;,0 List all resilience projects with their associated sector and budget.,"CREATE TABLE ResilienceProjects (ProjectID int, Sector varchar(10), Budget int); ","SELECT ResilienceProjects.Sector, ResilienceProjects.Budget FROM ResilienceProjects;","SELECT ProjectID, Sector, Budget FROM ResilienceProjects;",0 What's the total number of donors from each country in Africa?,"CREATE TABLE donors (id INT, name TEXT, country TEXT); ","SELECT country, COUNT(*) FROM donors WHERE country IN ('Kenya', 'Nigeria', 'South Africa', 'Egypt', 'Tanzania') GROUP BY country;","SELECT country, COUNT(*) FROM donors GROUP BY country;",0 What was Galatasaray score when when he won in 1990 and Trabzonspor was the runner-up?,"CREATE TABLE table_name_24 (score VARCHAR, year VARCHAR, winners VARCHAR, runners_up VARCHAR);","SELECT score FROM table_name_24 WHERE winners = ""galatasaray"" AND runners_up = ""trabzonspor"" AND year = 1990;","SELECT score FROM table_name_24 WHERE winners = ""galatasaray"" AND runners_up = ""trabzonspor"" AND year = 1990;",1 What is the title of the episode that aired on 13 august 1981?,"CREATE TABLE table_2570269_3 (episode_title VARCHAR, original_air_date__uk_ VARCHAR);","SELECT episode_title FROM table_2570269_3 WHERE original_air_date__uk_ = ""13 August 1981"";","SELECT episode_title FROM table_2570269_3 WHERE original_air_date__uk_ = ""13 August 1981"";",1 "How many bridges are there in the region of Andalusia, Spain?","CREATE TABLE Bridges (BridgeID INT, Name TEXT, Length FLOAT, Region TEXT, Country TEXT); ",SELECT COUNT(*) FROM Bridges WHERE Region = 'Andalusia';,SELECT COUNT(*) FROM Bridges WHERE Region = 'Andalusia' AND Country = 'Spain';,0 Delete all records from the 'market_trends' table where the 'price' is less than 30,"CREATE TABLE market_trends (id INT, country VARCHAR(50), year INT, price FLOAT); ",DELETE FROM market_trends WHERE price < 30;,DELETE FROM market_trends WHERE price 30;,0 "List all donors and their corresponding volunteer information from the 'volunteers' table, along with the number of hours contributed by each volunteer.","CREATE TABLE donors (donor_id INT, donor_name TEXT, org_id INT); CREATE TABLE volunteers (volunteer_id INT, volunteer_name TEXT, hours_contributed INT, donor_id INT); CREATE TABLE organizations (org_id INT, org_name TEXT);","SELECT donors.donor_name, volunteers.volunteer_name, SUM(volunteers.hours_contributed) as total_hours FROM volunteers INNER JOIN donors ON volunteers.donor_id = donors.donor_id GROUP BY donors.donor_name, volunteers.volunteer_name;","SELECT donors.donor_name, volunteers.volunteer_name, SUM(volunteers.hours_contributed) FROM donors INNER JOIN volunteers ON donors.donor_id = volunteers.donor_id INNER JOIN organizations ON volunteers.org_id = organizations.org_id GROUP BY donors.donor_name;",0 List the pipelines in Texas,"CREATE TABLE Pipelines (id INT, name TEXT, length FLOAT, type TEXT, location TEXT); ",SELECT name FROM Pipelines WHERE location = 'Texas';,SELECT name FROM Pipelines WHERE location = 'Texas';,1 Who had 2 WSOP cashes and was 6th in final place?,"CREATE TABLE table_23696862_6 (name VARCHAR, wsop_cashes VARCHAR, final_place VARCHAR);","SELECT name FROM table_23696862_6 WHERE wsop_cashes = 2 AND final_place = ""6th"";","SELECT name FROM table_23696862_6 WHERE wsop_cashes = 2 AND final_place = ""6th"";",1 Which adaptation measures have the highest success rate in Africa?,"CREATE TABLE adaptation_measures (measure VARCHAR(50), location VARCHAR(50), success_rate NUMERIC); ","SELECT measure, MAX(success_rate) as highest_success_rate FROM adaptation_measures WHERE location = 'Africa' GROUP BY measure;","SELECT measure, success_rate FROM adaptation_measures WHERE location = 'Africa' ORDER BY success_rate DESC LIMIT 1;",0 How much power was used when the callsign was DZYT?,"CREATE TABLE table_12547903_3 (power__kw_ VARCHAR, callsign VARCHAR);","SELECT power__kw_ FROM table_12547903_3 WHERE callsign = ""DZYT"";","SELECT power__kw_ FROM table_12547903_3 WHERE callsign = ""DZYT"";",1 How many won the prize when Regina was the runner-up?,"CREATE TABLE table_178242_7 (winner VARCHAR, runner_up VARCHAR);","SELECT COUNT(winner) FROM table_178242_7 WHERE runner_up = ""Regina"";","SELECT COUNT(winner) FROM table_178242_7 WHERE runner_up = ""Regina"";",1 Identify the top 3 countries with the highest ocean health metrics.,"CREATE TABLE ocean_health_metrics (country VARCHAR(50), metric1 DECIMAL(5,2), metric2 DECIMAL(5,2), metric3 DECIMAL(5,2));","SELECT country, MAX(metric1 + metric2 + metric3) as top_metric FROM ocean_health_metrics GROUP BY country ORDER BY top_metric DESC LIMIT 3;","SELECT country, metric1, metric2, metric3 FROM ocean_health_metrics ORDER BY metric1 DESC LIMIT 3;",0 on how many days did the episode written by harold hayes jr. & craig s. phillips originally air,"CREATE TABLE table_29196086_4 (original_air_date VARCHAR, written_by VARCHAR);","SELECT COUNT(original_air_date) FROM table_29196086_4 WHERE written_by = ""Harold Hayes Jr. & Craig S. Phillips"";","SELECT COUNT(original_air_date) FROM table_29196086_4 WHERE written_by = ""Harold Hayes Jr. & Craig S. Phillips"";",1 Who wrote episode number 11?,"CREATE TABLE table_29273243_1 (written_by VARCHAR, no_in_season VARCHAR);",SELECT written_by FROM table_29273243_1 WHERE no_in_season = 11;,SELECT written_by FROM table_29273243_1 WHERE no_in_season = 11;,1 "Update the title of a research grant in the ""grants"" table","CREATE TABLE grants (id INT PRIMARY KEY, title VARCHAR(100), principal_investigator VARCHAR(50), amount NUMERIC, start_date DATE, end_date DATE);",WITH updated_grant AS (UPDATE grants SET title = 'Advanced Quantum Computing' WHERE id = 1 RETURNING *) SELECT * FROM updated_grant;,UPDATE grants SET title = 'Research Grant' WHERE title = 'Research Grant';,0 What is the total number of volunteers for each program in the 'programs' table?,"CREATE TABLE programs (program_id INT, program_name TEXT, org_id INT, num_volunteers INT);","SELECT program_name, SUM(num_volunteers) FROM programs GROUP BY program_name;","SELECT program_name, SUM(num_volunteers) FROM programs GROUP BY program_name;",1 "What is the score that has a game greater than 3, with buffalo sabres as the opponent?","CREATE TABLE table_name_77 (score VARCHAR, game VARCHAR, opponent VARCHAR);","SELECT score FROM table_name_77 WHERE game > 3 AND opponent = ""buffalo sabres"";","SELECT score FROM table_name_77 WHERE game > 3 AND opponent = ""buffalo sabres"";",1 How many safety incidents were reported for each vessel type in 2021?,"CREATE TABLE incidents (id INT, vessel_id INT, type VARCHAR(50), date DATE); ","SELECT type as vessel_type, COUNT(*) as incident_count FROM incidents WHERE date >= '2021-01-01' AND date < '2022-01-01' GROUP BY vessel_type;","SELECT type, COUNT(*) FROM incidents WHERE date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY type;",0 When 12 is the rank who is the most recent cyclist?,"CREATE TABLE table_18676973_3 (most_recent_cyclist VARCHAR, rank VARCHAR);","SELECT most_recent_cyclist FROM table_18676973_3 WHERE rank = ""12"";",SELECT most_recent_cyclist FROM table_18676973_3 WHERE rank = 12;,0 "What is the total population size of marine species in each region of the Atlantic Ocean, ranked by population size?","CREATE TABLE atlantic_species_by_region (id INT, species_name VARCHAR(255), population INT, habitat VARCHAR(255), region VARCHAR(255), ocean VARCHAR(255)); ","SELECT region, SUM(population) AS total_population FROM atlantic_species_by_region WHERE ocean = 'Atlantic' GROUP BY region ORDER BY total_population DESC;","SELECT region, SUM(population) as total_population FROM atlantic_species_by_region GROUP BY region ORDER BY total_population DESC;",0 Determine the total weight of containers handled daily by each port agent in 'Chennai'.,"CREATE TABLE port (port_id INT, name TEXT);CREATE TABLE port_agent (port_agent_id INT, port_id INT, name TEXT);CREATE TABLE container (container_id INT, port_agent_id INT, weight INT, handled_at DATETIME);","SELECT port_agent.name, SUM(container.weight) FROM port_agent JOIN port ON port_agent.port_id = port.port_id JOIN container ON port_agent.port_agent_id = container.port_agent_id WHERE port.name = 'Chennai' GROUP BY port_agent.name, DATE(container.handled_at);","SELECT p.name, SUM(c.weight) as total_weight FROM port p JOIN port_agent p ON p.port_id = p.port_agent_id JOIN container c ON p.port_id = c.port_agent_id WHERE p.name = 'Chennai' GROUP BY p.name;",0 "What is the number of losses when the goal difference was -8, and position is smaller than 10?","CREATE TABLE table_name_37 (losses VARCHAR, goal_difference VARCHAR, position VARCHAR);",SELECT COUNT(losses) FROM table_name_37 WHERE goal_difference = -8 AND position < 10;,"SELECT COUNT(losses) FROM table_name_37 WHERE goal_difference = ""-8"" AND position 10;",0 What is the modified speed (6th gear) when standard torque (lb/ft) is 10.3 and modified torque (lb/ft) is 8.75?,"CREATE TABLE table_19704392_1 (modified_speed__6th_gear_ VARCHAR, standard_torque__lb_ft_ VARCHAR, modified_torque__lb_ft_ VARCHAR);","SELECT modified_speed__6th_gear_ FROM table_19704392_1 WHERE standard_torque__lb_ft_ = ""10.3"" AND modified_torque__lb_ft_ = ""8.75"";","SELECT modified_speed__6th_gear_ FROM table_19704392_1 WHERE standard_torque__lb_ft_ = ""10.3"" AND modified_torque__lb_ft_ = ""8.75"";",1 What was the earliest year in which long jump was performed in the world indoor Championships in 5th position?,"CREATE TABLE table_name_69 (year INTEGER, position VARCHAR, performance VARCHAR, competition VARCHAR);","SELECT MIN(year) FROM table_name_69 WHERE performance = ""long jump"" AND competition = ""world indoor championships"" AND position = ""5th"";","SELECT MIN(year) FROM table_name_69 WHERE performance = ""long jump"" AND competition = ""world indoor championships"" AND position = ""5th"";",1 Where did the Lightning play the NY Rangers at 7:00 pm?,"CREATE TABLE table_name_96 (location VARCHAR, opponent VARCHAR, time VARCHAR);","SELECT location FROM table_name_96 WHERE opponent = ""ny rangers"" AND time = ""7:00 pm"";","SELECT location FROM table_name_96 WHERE opponent = ""ny rangers"" AND time = ""7:00 pm"";",1 Which Year has a Binibining Pilipinas International of alma concepcion?,"CREATE TABLE table_name_54 (year VARCHAR, binibining_pilipinas_international VARCHAR);","SELECT year FROM table_name_54 WHERE binibining_pilipinas_international = ""alma concepcion"";","SELECT year FROM table_name_54 WHERE binibining_pilipinas_international = ""alma concepcion"";",1 What is the minimum energy efficiency rating for industrial buildings in the 'building_efficiency' table?,"CREATE TABLE building_efficiency (building_id INT, building_type VARCHAR(50), energy_efficiency_rating FLOAT); ",SELECT MIN(energy_efficiency_rating) FROM building_efficiency WHERE building_type = 'Industrial';,SELECT MIN(energy_efficiency_rating) FROM building_efficiency WHERE building_type = 'Industrial';,1 What was the song choice when the theme was free choice and Adeleye made it through to bootcamp?,"CREATE TABLE table_name_26 (song_choice VARCHAR, theme VARCHAR, result VARCHAR);","SELECT song_choice FROM table_name_26 WHERE theme = ""free choice"" AND result = ""through to bootcamp"";","SELECT song_choice FROM table_name_26 WHERE theme = ""free choice"" AND result = ""bootcamp"" AND Adeleye made it through;",0 What is the title released on 24 July 2005?,"CREATE TABLE table_name_87 (title VARCHAR, release_date VARCHAR);","SELECT title FROM table_name_87 WHERE release_date = ""24 july 2005"";","SELECT title FROM table_name_87 WHERE release_date = ""24 july 2005"";",1 "What is the average age of athletes who played in the FIFA World Cup 2018, grouped by their position?","CREATE TABLE athletes (id INT, name VARCHAR(100), position VARCHAR(50), age INT, world_cup_2018 BOOLEAN);","SELECT position, AVG(age) as avg_age FROM athletes WHERE world_cup_2018 = true GROUP BY position;","SELECT position, AVG(age) FROM athletes WHERE world_cup_2018 = true GROUP BY position;",0 What is the number of members who joined in the last 3 months and have a smartwatch?,"CREATE TABLE Members (MemberID INT, JoinDate DATE, HasSmartwatch BOOLEAN);","SELECT COUNT(*) FROM Members WHERE Members.JoinDate >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH) AND Members.HasSmartwatch = TRUE;","SELECT COUNT(*) FROM Members WHERE JoinDate >= DATEADD(month, -3, GETDATE()) AND HasSmartwatch = TRUE;",0 How many circular supply chain products does Supplier C sell?,"CREATE TABLE Suppliers (SupplierID INT, SupplierName TEXT, Country TEXT);CREATE TABLE Products (ProductID INT, ProductName TEXT, Price DECIMAL, CircularSupplyChain BOOLEAN, SupplierID INT); ",SELECT COUNT(*) FROM Products WHERE CircularSupplyChain = true AND SupplierID = 3;,SELECT COUNT(*) FROM Products p JOIN Suppliers s ON p.SupplierID = s.SupplierID WHERE p.CircularSupplyChain = TRUE AND s.SupplierName = 'Supplier C';,0 "Delete all records in the ""judges"" table where the judge's last name is ""Garcia""","CREATE TABLE judges (id INT, first_name VARCHAR(20), last_name VARCHAR(20), court_id INT); ",DELETE FROM judges WHERE last_name = 'Garcia';,DELETE FROM judges WHERE last_name = 'Garcia';,1 Which Position has a Pick of 74?,"CREATE TABLE table_name_42 (position VARCHAR, pick VARCHAR);",SELECT position FROM table_name_42 WHERE pick = 74;,SELECT position FROM table_name_42 WHERE pick = 74;,1 What date has 79-48 as the record?,"CREATE TABLE table_name_47 (date VARCHAR, record VARCHAR);","SELECT date FROM table_name_47 WHERE record = ""79-48"";","SELECT date FROM table_name_47 WHERE record = ""79-48"";",1 What is the 1st leg for team 2 Portol Drac Palma Mallorca?,CREATE TABLE table_name_27 (team_2 VARCHAR);,"SELECT 1 AS st_leg FROM table_name_27 WHERE team_2 = ""portol drac palma mallorca"";","SELECT 1 AS st_leg FROM table_name_27 WHERE team_2 = ""portol drac palma mallorca"";",1 What is the average CO2 concentration in the atmosphere in Svalbard in 2021?,"CREATE TABLE CO2Concentration (location VARCHAR(50), year INT, avg_conc FLOAT); ",SELECT avg_conc FROM CO2Concentration WHERE location = 'Svalbard' AND year = 2021;,SELECT AVG(avg_conc) FROM CO2Concentration WHERE location = 'Svalbard' AND year = 2021;,0 What is the finalist in the week of March 12?,"CREATE TABLE table_name_91 (finalist VARCHAR, week VARCHAR);","SELECT finalist FROM table_name_91 WHERE week = ""march 12"";","SELECT finalist FROM table_name_91 WHERE week = ""march 12"";",1 What is the date of the Last Performance of Billy Elliot with a Cast Status of past replacement?,"CREATE TABLE table_name_46 (last_performance VARCHAR, status VARCHAR);","SELECT last_performance FROM table_name_46 WHERE status = ""past replacement"";","SELECT last_performance FROM table_name_46 WHERE status = ""past replacement"";",1 Name the service for 7th marines rank of sergeant,"CREATE TABLE table_name_20 (service VARCHAR, unit VARCHAR, rank VARCHAR);","SELECT service FROM table_name_20 WHERE unit = ""7th marines"" AND rank = ""sergeant"";","SELECT service FROM table_name_20 WHERE unit = ""7th marines"" AND rank = ""sergeant"";",1 What is the price of 150 mbps downstread?,"CREATE TABLE table_name_20 (price VARCHAR, downstream VARCHAR);","SELECT price FROM table_name_20 WHERE downstream = ""150 mbps"";","SELECT price FROM table_name_20 WHERE downstream = ""150 mbps"";",1 What is the department name of the students with lowest gpa belongs to?,"CREATE TABLE student (dept_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR);",SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa LIMIT 1;,SELECT T1.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) LIMIT 1;,0 What is the sum of volunteer hours per country in Q1 2022?,"CREATE TABLE q1_volunteer_hours (id INT, volunteer_name VARCHAR(50), country VARCHAR(50), volunteer_hours INT); ","SELECT country, SUM(volunteer_hours) as total_volunteer_hours FROM q1_volunteer_hours WHERE volunteer_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY country;","SELECT country, SUM(volunteer_hours) FROM q1_volunteer_hours GROUP BY country;",0 List the names and total funding of programs with an impact score above 80 and funded by private sources.,"CREATE TABLE programs (name VARCHAR(25), impact_score INT, funding_source VARCHAR(15)); ","SELECT name, SUM(CASE WHEN funding_source = 'private' THEN 1 ELSE 0 END) AS total_private_funding FROM programs WHERE impact_score > 80 GROUP BY name;","SELECT name, SUM(funding_source) FROM programs WHERE impact_score > 80 AND funding_source = 'Private';",0 "Show the prices of the products named ""Dining"" or ""Trading Policy"".","CREATE TABLE Products (Product_Price VARCHAR, Product_Name VARCHAR);","SELECT Product_Price FROM Products WHERE Product_Name = ""Dining"" OR Product_Name = ""Trading Policy"";","SELECT Product_Price FROM Products WHERE Product_Name IN ('Dining', 'Trading Policy');",0 What is the number of performances in the 'Performances' table with a duration of exactly 30 minutes?,"CREATE TABLE Performances (id INT, name VARCHAR(50), date DATE, duration INT); ",SELECT COUNT(*) FROM Performances WHERE duration = 30;,SELECT COUNT(*) FROM Performances WHERE duration = 30;,1 List the names and creation dates of all smart contracts created by developers from underrepresented communities in Europe.,"CREATE TABLE smart_contracts (id INT, name VARCHAR(255), developer VARCHAR(255), creation_date DATE, country VARCHAR(255)); ","SELECT name, creation_date FROM smart_contracts WHERE developer IN ('Ana Gomez', 'Borys Petrov') AND country = 'Europe';","SELECT name, creation_date FROM smart_contracts WHERE country IN ('Germany', 'France', 'Italy', 'France', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'I",0 Name the total number of series for april 26,"CREATE TABLE table_17621978_11 (series VARCHAR, date VARCHAR);","SELECT COUNT(series) FROM table_17621978_11 WHERE date = ""April 26"";","SELECT COUNT(series) FROM table_17621978_11 WHERE date = ""April 26"";",1 What is the total funding received by startups founded in each year?,"CREATE TABLE startups(id INT, name TEXT, founding_year INT, funding FLOAT); ","SELECT founding_year, SUM(funding) FROM startups GROUP BY founding_year;","SELECT founding_year, SUM(funding) FROM startups GROUP BY founding_year;",1 "Calculate the percentage of mobile subscribers who have upgraded to 5G plans, in each region.","CREATE TABLE subscribers (subscriber_id INT, plan_type VARCHAR(10), region VARCHAR(20)); ","SELECT region, COUNT(*) FILTER (WHERE plan_type = '5G') * 100.0 / COUNT(*) OVER (PARTITION BY region) as pct_5g_subscribers FROM subscribers GROUP BY region;","SELECT region, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM subscribers WHERE plan_type = '5G')) AS percentage FROM subscribers GROUP BY region;",0 What is the number of successful biosensor technology development projects in the UK?,"CREATE TABLE projects (id INT, name VARCHAR(50), location VARCHAR(50), status VARCHAR(50), type VARCHAR(50)); ",SELECT COUNT(*) FROM projects WHERE location = 'UK' AND type = 'Biosensor' AND status = 'Success';,SELECT COUNT(*) FROM projects WHERE location = 'UK' AND status = 'Successful' AND type = 'Biosensor';,0 What is the total production of well 'W001' in the 'GH_Well' table?,"CREATE TABLE GH_Well (Well_ID VARCHAR(10), Production_Rate INT); ",SELECT SUM(Production_Rate) FROM GH_Well WHERE Well_ID = 'W001';,SELECT SUM(Production_Rate) FROM GH_Well WHERE Well_ID = 'W001';,1 Find the top 5 most common types of space debris?,"CREATE TABLE debris_types (id INT, debris_type VARCHAR(50), quantity INT);","SELECT debris_type, quantity FROM (SELECT debris_type, quantity, RANK() OVER (ORDER BY quantity DESC) AS debris_rank FROM debris_types) AS subquery WHERE debris_rank <= 5;","SELECT debris_type, COUNT(*) as count FROM debris_types GROUP BY debris_type ORDER BY count DESC LIMIT 5;",0 "Which Result has a Home team of portland, and a Date of may 31?","CREATE TABLE table_name_30 (result VARCHAR, home_team VARCHAR, date VARCHAR);","SELECT result FROM table_name_30 WHERE home_team = ""portland"" AND date = ""may 31"";","SELECT result FROM table_name_30 WHERE home_team = ""portland"" AND date = ""may 31"";",1 What is the total number of military equipment sales for each sales representative?,"CREATE TABLE SalesRepresentatives (SalesRepID INT, SalesRepName VARCHAR(50)); CREATE TABLE SalesData (SalesID INT, SalesRepID INT, EquipmentType VARCHAR(50), Quantity INT, SalePrice DECIMAL(10,2)); ","SELECT SalesRepName, SUM(Quantity * SalePrice) AS TotalSales FROM SalesData SD JOIN SalesRepresentatives SR ON SD.SalesRepID = SR.SalesRepID GROUP BY SalesRepName;","SELECT SalesRepresentatives.SalesRepName, SUM(SalesData.Quantity) as TotalSales FROM SalesRepresentatives INNER JOIN SalesData ON SalesRepresentatives.SalesRepID = SalesData.SalesRepID GROUP BY SalesRepresentatives.SalesRepName;",0 "What are the results in 2008 when 2009 is 0, and the ATP Tournaments Won is the tournament?",CREATE TABLE table_name_36 (tournament VARCHAR);,"SELECT 2008 FROM table_name_36 WHERE 2009 = ""0"" AND tournament = ""atp tournaments won"";","SELECT 2008 FROM table_name_36 WHERE 2009 = ""0"" AND tournament = ""atp tournaments won"";",1 What is the total number of mobile and broadband subscribers who have not made a complaint in the last 6 months?,"CREATE TABLE mobile_subscribers(subscriber_id INT, last_complaint_date DATE); CREATE TABLE broadband_subscribers(subscriber_id INT, last_complaint_date DATE); ","SELECT COUNT(*) FROM (SELECT subscriber_id FROM mobile_subscribers WHERE last_complaint_date < DATEADD(month, -6, GETDATE()) EXCEPT SELECT subscriber_id FROM broadband_subscribers WHERE last_complaint_date < DATEADD(month, -6, GETDATE()));","SELECT COUNT(*) FROM mobile_subscribers JOIN broadband_subscribers ON mobile_subscribers.subscriber_id = broadband_subscribers.subscriber_id WHERE last_complaint_date DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",0 How many doctors are there in rural Louisiana?,"CREATE TABLE doctors (id INT, name VARCHAR(50), location VARCHAR(20)); ",SELECT COUNT(*) FROM doctors WHERE location = 'rural Louisiana';,SELECT COUNT(*) FROM doctors WHERE location = 'Rural Louisiana';,0 What is the pos with weight less than 205?,"CREATE TABLE table_name_37 (pos VARCHAR, weight INTEGER);",SELECT pos FROM table_name_37 WHERE weight < 205;,SELECT pos FROM table_name_37 WHERE weight 205;,0 What country placed t6 with player Vijay Singh?,"CREATE TABLE table_name_91 (country VARCHAR, place VARCHAR, player VARCHAR);","SELECT country FROM table_name_91 WHERE place = ""t6"" AND player = ""vijay singh"";","SELECT country FROM table_name_91 WHERE place = ""t6"" AND player = ""vijay singh"";",1 What is the total assets value for customers with age over 40?,"CREATE TABLE customers (id INT, name TEXT, age INT, country TEXT, assets FLOAT); ",SELECT SUM(assets) FROM customers WHERE age > 40;,SELECT SUM(assets) FROM customers WHERE age > 40;,1 How many professional development courses have been completed by teachers in each department?,"CREATE TABLE teachers (id INT, name VARCHAR(50), department_id INT, age INT); CREATE TABLE professional_development_courses (id INT, course_name VARCHAR(50), department_id INT, instructor_id INT, duration INT); CREATE TABLE departments (id INT, department_name VARCHAR(50), PRIMARY KEY(id));","SELECT d.department_name, COUNT(pd.id) as num_courses_completed FROM professional_development_courses pd JOIN departments d ON pd.department_id = d.id GROUP BY d.department_name;","SELECT d.department_name, COUNT(pdc.id) as num_courses FROM teachers t JOIN professional_development_courses pdc ON t.department_id = pdc.department_id JOIN departments d ON pdc.department_id = d.id GROUP BY d.department_name;",0 What is the Result of the game after Week 10 against Philadelphia Eagles?,"CREATE TABLE table_name_26 (result VARCHAR, week VARCHAR, opponent VARCHAR);","SELECT result FROM table_name_26 WHERE week > 10 AND opponent = ""philadelphia eagles"";","SELECT result FROM table_name_26 WHERE week > 10 AND opponent = ""philadelphia eagles"";",1 Add a new exit strategy for a company: acquisition.,"CREATE TABLE exit_strategies (id INT, company_id INT, type TEXT); ","INSERT INTO exit_strategies (id, company_id, type) VALUES (2, 1, 'acquisition');","INSERT INTO exit_strategies (id, company_id, type) VALUES (1, 'Acquisition', 'Acquisition');",0 What was the highest Interview score from a contestant who had a swimsuit score of 8.857 and an Average score over 9.097?,"CREATE TABLE table_name_66 (interview INTEGER, swimsuit VARCHAR, average VARCHAR);",SELECT MAX(interview) FROM table_name_66 WHERE swimsuit = 8.857 AND average > 9.097;,SELECT MAX(interview) FROM table_name_66 WHERE swimsuit = 8.857 AND average > 9.097;,1 Identify countries with no maritime safety inspections ('inspections') in the last 6 months.,"CREATE TABLE inspections (id INT, country TEXT, inspection_date DATE); ","SELECT country FROM inspections WHERE inspection_date < DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) GROUP BY country HAVING COUNT(*) = 0;","SELECT country FROM inspections WHERE inspection_date DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",0 What is the total number of space missions launched by NASA?,"CREATE TABLE Missions ( id INT, name VARCHAR(255), agency VARCHAR(255), launch_date DATE, status VARCHAR(255));",SELECT COUNT(*) FROM Missions WHERE agency = 'NASA';,SELECT COUNT(*) FROM Missions WHERE agency = 'NASA';,1 What is the emissions CO2 with a max speed of km/h (mph) of the car model Panamera 4s?,"CREATE TABLE table_name_76 (emissions_co2 VARCHAR, max_speed VARCHAR, car_model VARCHAR);","SELECT emissions_co2 FROM table_name_76 WHERE max_speed = ""km/h (mph)"" AND car_model = ""panamera 4s"";","SELECT emissions_co2 FROM table_name_76 WHERE max_speed = ""km/h (mph)"" AND car_model = ""panamera 4s"";",1 What is the lowest amount of wins of someone who has 2 losses?,"CREATE TABLE table_name_96 (wins INTEGER, losses VARCHAR);",SELECT MIN(wins) FROM table_name_96 WHERE losses = 2;,SELECT MIN(wins) FROM table_name_96 WHERE losses = 2;,1 Get the number of employees hired in each month of the year,"CREATE TABLE Employees (id INT, hire_date DATE);","SELECT DATE_FORMAT(hire_date, '%Y-%m') AS month, COUNT(*) FROM Employees GROUP BY month;","SELECT EXTRACT(MONTH FROM hire_date) as month, COUNT(*) as num_hired FROM Employees GROUP BY month;",0 Show the oil production of the well with ID 4 in the Bakken region,"CREATE TABLE if not exists wells (well_id int, region varchar(50), production_year int, oil_production int);",SELECT oil_production FROM wells WHERE well_id = 4 AND region = 'Bakken';,SELECT oil_production FROM wells WHERE well_id = 4 AND region = 'Bakken';,1 "Identify the rural healthcare providers with the lowest patient satisfaction ratings, grouped by provider type.","CREATE TABLE healthcare_providers (id INT, name TEXT, type TEXT, patient_satisfaction FLOAT);","SELECT type, MIN(patient_satisfaction) FROM healthcare_providers WHERE type = 'Rural' GROUP BY type;","SELECT type, MIN(patient_satisfaction) FROM healthcare_providers GROUP BY type;",0 What is the moving average of customer orders in the past 7 days?,"CREATE TABLE orders(id INT, date DATE, quantity INT); ","SELECT date, AVG(quantity) OVER (ORDER BY date ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) as moving_average FROM orders WHERE date >= CURRENT_DATE - INTERVAL '7 days';","SELECT AVG(quantity) FROM orders WHERE date >= DATEADD(day, -7, GETDATE());",0 Find the average temperature and humidity for the past week for all fields.,"CREATE TABLE field_sensor_data_2 (field_id INT, date DATE, temperature DECIMAL(5,2), humidity DECIMAL(5,2)); ","SELECT AVG(temperature) AS avg_temperature, AVG(humidity) AS avg_humidity FROM field_sensor_data_2 WHERE date >= CURDATE() - INTERVAL 7 DAY;","SELECT field_id, AVG(temperature) as avg_temperature, AVG(humidity) as avg_humidity FROM field_sensor_data_2 WHERE date >= DATEADD(week, -1, GETDATE()) GROUP BY field_id;",0 What is the total climate finance for 'Africa'?,"CREATE TABLE climate_finance (country VARCHAR(255), amount FLOAT); ",SELECT SUM(amount) FROM climate_finance WHERE country = 'Africa';,SELECT SUM(amount) FROM climate_finance WHERE country = 'Africa';,1 "How many streams did 'Take Me Home, Country Roads' get outside of Texas?","CREATE TABLE streams (song VARCHAR(255), location VARCHAR(255), streams INT); ","SELECT SUM(streams) FROM streams WHERE song = 'Take Me Home, Country Roads' AND location != 'Texas';","SELECT SUM(streams) FROM streams WHERE song = 'Take Me Home, Country Roads' AND location 'Texas';",0 What is the result of the 2005 (78th) year ceremony?,"CREATE TABLE table_22073745_1 (result VARCHAR, year__ceremony_ VARCHAR);","SELECT result FROM table_22073745_1 WHERE year__ceremony_ = ""2005 (78th)"";","SELECT result FROM table_22073745_1 WHERE year__ceremony_ = ""2005 (78th)"";",1 What was the attendance on May 13?,"CREATE TABLE table_name_76 (attendance VARCHAR, date VARCHAR);","SELECT attendance FROM table_name_76 WHERE date = ""may 13"";","SELECT attendance FROM table_name_76 WHERE date = ""may 13"";",1 What was the final result when the viewers selected ejay?,"CREATE TABLE table_15162503_1 (result VARCHAR, viewers_selection VARCHAR);","SELECT result FROM table_15162503_1 WHERE viewers_selection = ""Ejay"";","SELECT result FROM table_15162503_1 WHERE viewers_selection = ""Ejay"";",1 What is the total number of articles published in Spanish-speaking countries?,"CREATE TABLE Articles (ArticleID INT, Title TEXT, Language TEXT, Country TEXT); ","SELECT COUNT(*) FROM Articles WHERE Country IN ('Spain', 'Mexico', 'Colombia', 'Argentina') AND Language = 'Spanish';",SELECT COUNT(*) FROM Articles WHERE Language = 'Spanish';,0 What is the success rate of therapy sessions for different age groups?,"CREATE TABLE therapy_sessions_age (session_id INT, therapy_success CHAR(1), age INT); ","SELECT age, AVG(CASE WHEN therapy_success = 'Y' THEN 1.0 ELSE 0.0 END) as success_rate FROM therapy_sessions_age GROUP BY age;","SELECT age, SUM(therapy_success) as success_rate FROM therapy_sessions_age GROUP BY age;",0 What is the maximum diameter of the Mid West Gas Pipeline (1999)?,"CREATE TABLE table_name_57 (maximum_diameter VARCHAR, name__year_commissioned_ VARCHAR);","SELECT maximum_diameter FROM table_name_57 WHERE name__year_commissioned_ = ""mid west gas pipeline (1999)"";","SELECT maximum_diameter FROM table_name_57 WHERE name__year_commissioned_ = ""mid west gas pipeline (1999)"";",1 Who were the opposing team when a Loss was listed with Lowe (1-4)?,"CREATE TABLE table_name_63 (opponent VARCHAR, loss VARCHAR);","SELECT opponent FROM table_name_63 WHERE loss = ""lowe (1-4)"";","SELECT opponent FROM table_name_63 WHERE loss = ""lowe (1-4)"";",1 Insert a new genre named 'Afrobeat' into the Genres table,"CREATE TABLE Genres (GenreID INT PRIMARY KEY AUTO_INCREMENT, Name VARCHAR(50));",INSERT INTO Genres (Name) VALUES ('Afrobeat');,"INSERT INTO Genres (GenreID, Name) VALUES (1, 'Afrobeat');",0 What is the total revenue for each cuisine type in the last quarter?,"CREATE TABLE Restaurants (RestaurantID int, Name varchar(50), Cuisine varchar(50)); CREATE TABLE Revenues (RevenueID int, RestaurantID int, Revenue decimal(5,2), Date date); ","SELECT r.Cuisine, SUM(rev.Revenue) as TotalRevenue FROM Restaurants r JOIN Revenues rev ON r.RestaurantID = rev.RestaurantID WHERE rev.Date >= DATEADD(quarter, -1, GETDATE()) GROUP BY r.Cuisine;","SELECT Cuisine, SUM(Revenue) as TotalRevenue FROM Revenues JOIN Restaurants ON Revenues.RestaurantID = Restaurants.RestaurantID WHERE Date >= DATEADD(quarter, -1, GETDATE()) GROUP BY Cuisine;",0 Find the the name of the customers who have a loan with amount more than 3000.,"CREATE TABLE customer (cust_name VARCHAR, cust_id VARCHAR); CREATE TABLE loan (cust_id VARCHAR);",SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000;,SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.amount > 3000;,0 How many unique retailers sell each eco-friendly material product?,"CREATE TABLE RetailerProducts (RetailerID int, ProductID int);","SELECT ProductID, COUNT(DISTINCT RetailerID) AS RetailerCount FROM RetailerProducts GROUP BY ProductID;","SELECT ProductID, COUNT(DISTINCT RetailerID) FROM RetailerProducts GROUP BY ProductID;",0 What skip has switzerland as the country?,"CREATE TABLE table_name_15 (skip VARCHAR, country VARCHAR);","SELECT skip FROM table_name_15 WHERE country = ""switzerland"";","SELECT skip FROM table_name_15 WHERE country = ""switzerland"";",1 What date had the home team as brentford?,"CREATE TABLE table_name_30 (date VARCHAR, home_team VARCHAR);","SELECT date FROM table_name_30 WHERE home_team = ""brentford"";","SELECT date FROM table_name_30 WHERE home_team = ""brentford"";",1 How many people attended the score of w 7-6?,"CREATE TABLE table_name_15 (crowd VARCHAR, score VARCHAR);","SELECT crowd FROM table_name_15 WHERE score = ""w 7-6"";","SELECT crowd FROM table_name_15 WHERE score = ""w 7-6"";",1 Delete records in the consumer_awareness table where the region is 'Asia Pacific' and awareness_score is less than 5,"CREATE TABLE consumer_awareness (id INT PRIMARY KEY, consumer_id INT, region VARCHAR(255), awareness_score INT); ",DELETE FROM consumer_awareness WHERE region = 'Asia Pacific' AND awareness_score < 5;,DELETE FROM consumer_awareness WHERE region = 'Asia Pacific' AND awareness_score 5;,0 Which Away team has a Score of 0–3?,"CREATE TABLE table_name_4 (away_team VARCHAR, score VARCHAR);","SELECT away_team FROM table_name_4 WHERE score = ""0–3"";","SELECT away_team FROM table_name_4 WHERE score = ""0–3"";",1 "What is the total pro bono hours for each attorney, grouped by their location?","CREATE TABLE attorney (attorney_id INT, name VARCHAR(255), location VARCHAR(255)); CREATE TABLE pro_bono (pro_bono_id INT, attorney_id INT, hours DECIMAL(10,2)); ","SELECT location, SUM(hours) FROM pro_bono JOIN attorney ON pro_bono.attorney_id = attorney.attorney_id GROUP BY location;","SELECT attorney.location, SUM(pro_bono.hours) as total_hours FROM attorney INNER JOIN pro_bono ON attorney.attorney_id = pro_bono.attorney_id GROUP BY attorney.location;",0 Remove users who have not streamed any songs in the past month.,"CREATE TABLE user_activity (user_id INT, song_id INT, stream_date DATE); ","DELETE FROM user_activity WHERE stream_date < DATE_SUB(CURDATE(), INTERVAL 1 MONTH);","DELETE FROM user_activity WHERE user_id NOT IN (SELECT user_id FROM user_activity WHERE stream_date >= DATEADD(month, -1, GETDATE());",0 How many unique donors have contributed to causes related to poverty alleviation?,"CREATE TABLE causes (id INT, name VARCHAR(255)); CREATE TABLE donations (id INT, donor_id INT, cause_id INT, amount DECIMAL(10,2)); ",SELECT COUNT(DISTINCT donor_id) FROM donations WHERE cause_id = (SELECT id FROM causes WHERE name = 'Poverty Alleviation');,SELECT COUNT(DISTINCT donor_id) FROM donations JOIN causes ON donations.cause_id = causes.id WHERE causes.name LIKE '%Poverty alleviation%';,0 Delete records of Cod from the fish_stock table,"CREATE TABLE fish_stock (id INT PRIMARY KEY, species VARCHAR(255), quantity INT, location VARCHAR(255));",DELETE FROM fish_stock WHERE species = 'Cod';,DELETE FROM fish_stock WHERE species = 'Cod';,1 What is the average union membership rate per state for manufacturing industries?,"CREATE TABLE states (id INT, state VARCHAR(255)); CREATE TABLE manufacturing_industries (industry_id INT, industry_name VARCHAR(255), state_id INT); CREATE TABLE union_membership (id INT, industry_id INT, state_id INT, membership_rate DECIMAL(5,2)); ",SELECT AVG(membership_rate) FROM union_membership u JOIN manufacturing_industries m ON u.industry_id = m.industry_id JOIN states s ON u.state_id = s.id WHERE m.industry_name = 'Manufacturing';,"SELECT s.state, AVG(u.membership_rate) as avg_union_membership_rate FROM states s JOIN union_membership u ON s.id = u.industry_id JOIN manufacturing_industries m ON u.state_id = m.state_id GROUP BY s.state;",0 "What is the total number of employees from each country, and the percentage of the total workforce they represent?","CREATE TABLE Employees (EmployeeID INT, Country VARCHAR(255)); ","SELECT E.Country, COUNT(E.EmployeeID) AS Num_Employees, COUNT(E.EmployeeID) * 100.0 / (SELECT COUNT(*) FROM Employees) AS Pct_Total_Workforce FROM Employees E GROUP BY E.Country;","SELECT Country, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Employees) AS Percentage FROM Employees GROUP BY Country;",0 "How many bronzes have a total less than 11, with 11 as the rank, and a gold less than 1?","CREATE TABLE table_name_81 (bronze VARCHAR, gold VARCHAR, total VARCHAR, rank VARCHAR);","SELECT COUNT(bronze) FROM table_name_81 WHERE total < ""11"" AND rank = ""11"" AND gold < 1;","SELECT COUNT(bronze) FROM table_name_81 WHERE total 11 AND rank = ""11"" AND gold 1;",0 "How many tourists visited Australia in 2021 and 2022, respectively?","CREATE TABLE tourism_stats (visitor_country VARCHAR(255), visit_year INT, visit_count INT); ","SELECT visit_year, SUM(visit_count) FROM tourism_stats WHERE visitor_country = 'Australia' GROUP BY visit_year;","SELECT visit_year, SUM(visit_count) FROM tourism_stats WHERE visitor_country = 'Australia' GROUP BY visit_year;",1 Identify the top 2 countries with the highest number of sustainable materials providers?,"CREATE TABLE countries (country_id INT, country_name VARCHAR(255), sustainable_materials BOOLEAN); ","SELECT country_name, COUNT(*) as num_sustainable_materials_providers FROM countries WHERE sustainable_materials = TRUE GROUP BY country_name ORDER BY num_sustainable_materials_providers DESC LIMIT 2;","SELECT country_name, COUNT(*) as num_sustainable_materials FROM countries WHERE sustainable_materials = TRUE GROUP BY country_name ORDER BY num_sustainable_materials DESC LIMIT 2;",0 What is in 2003 that has a Career Win-Loss of 6–7,CREATE TABLE table_name_84 (career_win_loss VARCHAR);,"SELECT 2003 FROM table_name_84 WHERE career_win_loss = ""6–7"";","SELECT 2003 FROM table_name_84 WHERE career_win_loss = ""6–7"";",1 What is the maximum occupancy rate of eco-friendly hotels in Germany?,"CREATE TABLE eco_hotels (hotel_id INT, hotel_name TEXT, occupancy_rate FLOAT, country TEXT); ",SELECT MAX(occupancy_rate) FROM eco_hotels WHERE country = 'Germany';,SELECT MAX(occupancy_rate) FROM eco_hotels WHERE country = 'Germany';,1 How many altitudes does the common with an area of 130.7 km^2 have?,"CREATE TABLE table_1449176_1 (altitude__mslm_ VARCHAR, area__km_2__ VARCHAR);","SELECT COUNT(altitude__mslm_) FROM table_1449176_1 WHERE area__km_2__ = ""130.7"";","SELECT COUNT(altitude__mslm_) FROM table_1449176_1 WHERE area__km_2__ = ""130.7"";",1 What is the average rating of movies produced in the US and released between 2015 and 2020?,"CREATE TABLE movies (title VARCHAR(255), release_year INT, rating DECIMAL(3,2), production_country VARCHAR(50));",SELECT AVG(rating) FROM movies WHERE production_country = 'United States' AND release_year BETWEEN 2015 AND 2020;,SELECT AVG(rating) FROM movies WHERE production_country = 'USA' AND release_year BETWEEN 2015 AND 2020;,0 What is the average number of peacekeeping soldiers per country per year in Africa since 2016?,"CREATE TABLE peacekeeping_operations (id INT, country VARCHAR(50), year INT, soldiers INT);","SELECT country, AVG(soldiers) FROM peacekeeping_operations WHERE location LIKE '%Africa%' AND year >= 2016 GROUP BY country;","SELECT country, AVG(soldiers) as avg_soldiers FROM peacekeeping_operations WHERE year >= 2016 GROUP BY country;",0 What company was the constructor when Nick Heidfeld was the driver/,"CREATE TABLE table_name_50 (constructor VARCHAR, driver VARCHAR);","SELECT constructor FROM table_name_50 WHERE driver = ""nick heidfeld"";","SELECT constructor FROM table_name_50 WHERE driver = ""nick heidfeld"";",1 Which System has an Actual Version 9.0?,"CREATE TABLE table_name_15 (system VARCHAR, actual_version VARCHAR);","SELECT system FROM table_name_15 WHERE actual_version = ""9.0"";","SELECT system FROM table_name_15 WHERE actual_version = ""9.0"";",1 What is the maximum number of games won by a player in a week?,"CREATE TABLE player_game_stats (player_name TEXT, week INT, games_won INT); ","SELECT player_name, MAX(games_won) FROM player_game_stats;",SELECT MAX(games_won) FROM player_game_stats;,0 What is the maximum number of mental health parity violation incidents reported in each region?,"CREATE TABLE mental_health_parity_incidents (id INT, region VARCHAR(50), incidents INT); ","SELECT region, MAX(incidents) FROM mental_health_parity_incidents GROUP BY region;","SELECT region, MAX(incidents) FROM mental_health_parity_incidents GROUP BY region;",1 Show species and their observation counts in 2021.,"CREATE TABLE species ( id INT PRIMARY KEY, name VARCHAR(255) ); CREATE TABLE observations ( id INT PRIMARY KEY, species_id INT, observation_date DATE, FOREIGN KEY (species_id) REFERENCES species(id) ); ","SELECT s.name, COUNT(o.id) AS observation_count FROM species s JOIN observations o ON s.id = o.species_id WHERE o.observation_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY s.name;","SELECT species.name, COUNT(observations.id) FROM species INNER JOIN observations ON species.id = observations.species_id WHERE observations.observation_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY species.name;",0 What was the visiting team for the game that ended 82-75?,"CREATE TABLE table_name_51 (visitor VARCHAR, score VARCHAR);","SELECT visitor FROM table_name_51 WHERE score = ""82-75"";","SELECT visitor FROM table_name_51 WHERE score = ""82-75"";",1 What entrant has a P tyre and was constructed by Alfa Romeo?,"CREATE TABLE table_name_1 (entrant VARCHAR, tyre VARCHAR, constructor VARCHAR);","SELECT entrant FROM table_name_1 WHERE tyre = ""p"" AND constructor = ""alfa romeo"";","SELECT entrant FROM table_name_1 WHERE tyre = ""p"" AND constructor = ""alfa romeo"";",1 How many public parks are there in New York and Los Angeles?,"CREATE TABLE Parks (City VARCHAR(20), Type VARCHAR(20), Number INT); ","SELECT SUM(Number) FROM Parks WHERE City IN ('New York', 'Los Angeles') AND Type = 'Public';","SELECT COUNT(*) FROM Parks WHERE City IN ('New York', 'Los Angeles');",0 What is the total amount donated by individual donors from Canada in the year 2020?,"CREATE TABLE Donors (DonorID INT, DonorName TEXT, Country TEXT); CREATE TABLE Donations (DonationID INT, DonorID INT, DonationAmount DECIMAL, DonationDate DATE); ",SELECT SUM(Donations.DonationAmount) FROM Donors INNER JOIN Donations ON Donors.DonorID = Donations.DonorID WHERE Donors.Country = 'Canada' AND YEAR(Donations.DonationDate) = 2020;,SELECT SUM(DonationAmount) FROM Donations JOIN Donors ON Donations.DonorID = Donors.DonorID WHERE Donors.Country = 'Canada' AND YEAR(DonationDate) = 2020;,0 What is the total number of active practitioners of traditional arts in each country?,"CREATE TABLE art_practitioners (id INT, art_id INT, country TEXT, num_practitioners INT); ","SELECT country, SUM(num_practitioners) FROM art_practitioners GROUP BY country;","SELECT country, SUM(num_practitioners) FROM art_practitioners GROUP BY country;",1 What are the names of the smart contracts in the 'cardano' network that were created after the regulatory framework was implemented?,"CREATE TABLE regulatory_frameworks (framework_id INT, network VARCHAR(255), implementation_date DATE); CREATE TABLE smart_contracts (contract_id INT, name VARCHAR(255), network VARCHAR(255), creation_date DATE); ",SELECT name FROM smart_contracts WHERE network = 'cardano' AND creation_date > (SELECT implementation_date FROM regulatory_frameworks WHERE network = 'cardano');,"SELECT smart_contracts.name FROM smart_contracts INNER JOIN regulatory_frameworks ON smart_contracts.contract_id = regulatory_frameworks.framework_id WHERE regulatory_frameworks.network = 'cardano' AND regulatory_frameworks.implementation_date > DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 What language is the moviein that is on UMP movies network through Sky service?,"CREATE TABLE table_name_87 (language VARCHAR, network VARCHAR, genre VARCHAR, service VARCHAR);","SELECT language FROM table_name_87 WHERE genre = ""movies"" AND service = ""sky"" AND network = ""ump movies"";","SELECT language FROM table_name_87 WHERE genre = ""movies"" AND service = ""sky"" AND network = ""ump movies"";",1 Find the names of the candidates whose support percentage is lower than their oppose rate.,"CREATE TABLE candidate (people_id VARCHAR, support_rate INTEGER, oppose_rate VARCHAR); CREATE TABLE people (name VARCHAR, people_id VARCHAR);",SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate;,SELECT T1.name FROM people AS T1 JOIN candidate AS T2 ON T1.people_id = T2.people_id WHERE T2.support_rate T2.oppose_rate;,0 What's the number of users in the Nisibon-Yuma within the Del Este district?,"CREATE TABLE table_20018310_1 (users___number_ VARCHAR, irrigation_district VARCHAR, juntas_de_regantes__wub_ VARCHAR);","SELECT users___number_ FROM table_20018310_1 WHERE irrigation_district = ""Del Este"" AND juntas_de_regantes__wub_ = ""Nisibon-Yuma"";","SELECT users___number_ FROM table_20018310_1 WHERE irrigation_district = ""Del Este"" AND juntas_de_regantes__wub_ = ""Nisibon-Yuma"";",1 Find the average financial wellbeing score of customers in the age range 20-30 for the year 2021?,"CREATE TABLE customers (customer_id INT, age INT, wellbeing_score INT, registration_date DATE);",SELECT AVG(wellbeing_score) FROM customers WHERE age BETWEEN 20 AND 30 AND EXTRACT(YEAR FROM registration_date) = 2021;,SELECT AVG(wellbeing_score) FROM customers WHERE age BETWEEN 20 AND 30 AND YEAR(registration_date) = 2021;,0 When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?,"CREATE TABLE accelerator_compatible_browser (compatible_since_year VARCHAR, browser_id VARCHAR, accelerator_id VARCHAR); CREATE TABLE browser (id VARCHAR, name VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, name VARCHAR);",SELECT T1.compatible_since_year FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id WHERE T3.name = 'CACHEbox' AND T2.name = 'Internet Explorer';,SELECT T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id JOIN web_client_accelerator AS T3 ON T2.id = T3.id WHERE T3.name = 'CACHEbox' AND T3.name = 'Internet Explorer';,0 How many original airdates did season 20 have?,"CREATE TABLE table_22181917_2 (original_air_date VARCHAR, season__number VARCHAR);",SELECT COUNT(original_air_date) FROM table_22181917_2 WHERE season__number = 20;,SELECT COUNT(original_air_date) FROM table_22181917_2 WHERE season__number = 20;,1 What is the total amount of climate finance invested in renewable energy projects?,"CREATE TABLE climate_finance (project_name VARCHAR(255), type VARCHAR(255), investment_amount INT); ",SELECT SUM(investment_amount) FROM climate_finance WHERE type = 'Renewable Energy';,SELECT SUM(investment_amount) FROM climate_finance WHERE type = 'Renewable Energy';,1 Update the name of the event if the year is greater than 2020,"CREATE TABLE events (event_id INT, event_name VARCHAR(50), year INT); ","UPDATE events SET event_name = CASE WHEN year > 2020 THEN CONCAT(event_name, ' - New Format') ELSE event_name END;",UPDATE events SET event_name = 'Event' WHERE year > 2020;,0 Which menu item has the lowest cost at 'The Vegan Bistro'?,"CREATE TABLE Menu (restaurant_name TEXT, menu_item TEXT, item_cost FLOAT); ","SELECT menu_item, MIN(item_cost) FROM Menu WHERE restaurant_name = 'The Vegan Bistro';","SELECT menu_item, MIN(item_cost) FROM Menu WHERE restaurant_name = 'The Vegan Bistro' GROUP BY menu_item;",0 What nationality is keith carney?,"CREATE TABLE table_2897457_5 (nationality VARCHAR, player VARCHAR);","SELECT nationality FROM table_2897457_5 WHERE player = ""Keith Carney"";","SELECT nationality FROM table_2897457_5 WHERE player = ""Keith Carney"";",1 What is the Closure date of Hunterston B,"CREATE TABLE table_143352_1 (accounting_closure_date INTEGER, agr_power_station VARCHAR);","SELECT MIN(accounting_closure_date) FROM table_143352_1 WHERE agr_power_station = ""Hunterston B"";","SELECT MAX(accounting_closure_date) FROM table_143352_1 WHERE agr_power_station = ""Hunterston B"";",0 What is the total for miguel induráin with a Vuelta larger than 1?,"CREATE TABLE table_name_33 (total INTEGER, name VARCHAR, vuelta VARCHAR);","SELECT MIN(total) FROM table_name_33 WHERE name = ""miguel induráin"" AND vuelta > 1;","SELECT SUM(total) FROM table_name_33 WHERE name = ""miguel induráin"" AND vuelta > 1;",0 What is the average citizen satisfaction score for 'ServiceC' in 'RegionD'?,"CREATE TABLE Satisfaction(service VARCHAR(20), region VARCHAR(20), score INT); ",SELECT AVG(score) FROM Satisfaction WHERE service = 'ServiceC' AND region = 'RegionD';,SELECT AVG(score) FROM Satisfaction WHERE service = 'ServiceC' AND region = 'RegionD';,1 What was total size of the crowd at a home game for north melbourne?,"CREATE TABLE table_name_93 (crowd INTEGER, home_team VARCHAR);","SELECT SUM(crowd) FROM table_name_93 WHERE home_team = ""north melbourne"";","SELECT SUM(crowd) FROM table_name_93 WHERE home_team = ""north melbourne"";",1 "What is the lowest rank of Hungary where there was a total of 8 medals, including 2 silver?","CREATE TABLE table_name_37 (rank INTEGER, silver VARCHAR, total VARCHAR, nation VARCHAR);","SELECT MIN(rank) FROM table_name_37 WHERE total = 8 AND nation = ""hungary"" AND silver > 2;","SELECT MIN(rank) FROM table_name_37 WHERE total = 8 AND nation = ""hungary"" AND silver = 2;",0 "What is the total mental health budget for each program in the ""programs_mental_health_budget"" table?","CREATE TABLE programs_mental_health_budget (program_id INT, program_name VARCHAR(255), mental_health_budget DECIMAL(10,2));","SELECT program_name, SUM(mental_health_budget) as total_budget FROM programs_mental_health_budget GROUP BY program_name;","SELECT program_name, SUM(mental_health_budget) FROM programs_mental_health_budget GROUP BY program_name;",0 What is the to par number of the person who won in 2003?,"CREATE TABLE table_name_40 (to_par VARCHAR, year_s__won VARCHAR);","SELECT to_par FROM table_name_40 WHERE year_s__won = ""2003"";","SELECT to_par FROM table_name_40 WHERE year_s__won = ""2003"";",1 What is the total energy production from hydroelectric plants in India?,"CREATE TABLE energy_production (id INT, plant_type VARCHAR(50), country VARCHAR(50), production_amount INT);",SELECT SUM(production_amount) FROM energy_production WHERE country = 'India' AND plant_type = 'hydroelectric';,SELECT SUM(production_amount) FROM energy_production WHERE plant_type = 'hydroelectric' AND country = 'India';,0 "What is the number of species in each category in the 'species' table, grouped by country?","CREATE TABLE species (species_id INT, species_name TEXT, category TEXT, country TEXT);","SELECT country, category, COUNT(*) FROM species GROUP BY country, category;","SELECT category, country, COUNT(*) FROM species GROUP BY category, country;",0 Tell me the notes with method of points and event of adcc 2001 absolute with result of loss,"CREATE TABLE table_name_72 (notes VARCHAR, result VARCHAR, method VARCHAR, event VARCHAR);","SELECT notes FROM table_name_72 WHERE method = ""points"" AND event = ""adcc 2001 absolute"" AND result = ""loss"";","SELECT notes FROM table_name_72 WHERE method = ""points"" AND event = ""adcc 2001 absolute"" AND result = ""loss"";",1 What is the total claim amount for policyholders from Texas?,"CREATE TABLE policyholders (id INT, name TEXT, state TEXT, policy_type TEXT, premium FLOAT); CREATE TABLE claims (id INT, policyholder_id INT, claim_amount FLOAT, claim_date DATE); ",SELECT SUM(claims.claim_amount) FROM claims JOIN policyholders ON claims.policyholder_id = policyholders.id WHERE policyholders.state = 'Texas';,SELECT SUM(claim_amount) FROM claims JOIN policyholders ON claims.policyholder_id = policyholders.id WHERE policyholders.state = 'Texas';,0 What is the landfill capacity in Mexico City for 2018?,"CREATE TABLE landfill_capacity (city VARCHAR(255), year INT, capacity_m3 INT); ",SELECT capacity_m3 FROM landfill_capacity WHERE city = 'Mexico City' AND year = 2018;,SELECT capacity_m3 FROM landfill_capacity WHERE city = 'Mexico City' AND year = 2018;,1 List the menu items that were not sold in the last week.,"CREATE TABLE menu_items (item_id INT, name VARCHAR(255), category VARCHAR(255)); CREATE TABLE sales (sale_id INT, item_id INT, date DATE, revenue DECIMAL(10, 2)); ",SELECT mi.name FROM menu_items mi LEFT JOIN sales s ON mi.item_id = s.item_id AND s.date >= DATE(NOW()) - INTERVAL 7 DAY WHERE s.sale_id IS NULL;,"SELECT menu_items.name FROM menu_items INNER JOIN sales ON menu_items.item_id = sales.item_id WHERE sales.date IS NULL AND sales.date DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK);",0 "What is the position for Oleksandr Vorobiov ( ukr ), when the total was larger than 16.25?","CREATE TABLE table_name_58 (position VARCHAR, gymnast VARCHAR, total VARCHAR);","SELECT COUNT(position) FROM table_name_58 WHERE gymnast = ""oleksandr vorobiov ( ukr )"" AND total > 16.25;","SELECT position FROM table_name_58 WHERE gymnast = ""oleksandr vorobiov ( ukr )"" AND total > 16.25;",0 What is the total revenue generated from postpaid mobile customers in the city of Miami?,"CREATE TABLE mobile_customers (customer_id INT, monthly_bill FLOAT, city VARCHAR(20), plan_type VARCHAR(10)); ",SELECT SUM(monthly_bill) FROM mobile_customers WHERE city = 'Miami' AND plan_type = 'postpaid';,SELECT SUM(monthly_bill) FROM mobile_customers WHERE city = 'Miami' AND plan_type = 'postpaid';,1 How many 'Red' line rides were there in 'Evening'?,"CREATE TABLE red_line_rides (ride_id int, time_of_day varchar(20)); ",SELECT COUNT(*) FROM red_line_rides WHERE time_of_day = 'Evening';,SELECT COUNT(*) FROM red_line_rides WHERE time_of_day = 'Evening';,1 What is the maximum yield of soybean crops by country?,"CREATE TABLE Country (id INT, name VARCHAR(255)); CREATE TABLE Crop (id INT, name VARCHAR(255), country_id INT, yield INT); ",SELECT MAX(Crop.yield) FROM Crop INNER JOIN Country ON Crop.country_id = Country.id WHERE Crop.name = 'Soybean';,"SELECT Country.name, MAX(Crop.yield) FROM Crop INNER JOIN Country ON Crop.country_id = Country.id GROUP BY Country.name;",0 "Insert new records into the tour_guides table for a tour guide in Barcelona, Spain","CREATE TABLE tour_guides (id INT PRIMARY KEY, name VARCHAR(255), language VARCHAR(50), bio TEXT, city VARCHAR(255), country VARCHAR(255));","INSERT INTO tour_guides (name, language, bio, city, country) VALUES ('Marta Garcia', 'Spanish, English', 'Marta is a licensed tour guide in Barcelona with a degree in Art History. She loves sharing her city with visitors and showing them the hidden gems.', 'Barcelona', 'Spain');","INSERT INTO tour_guides (id, name, language, bio, city, country) VALUES (1, 'Guid', 'Barcelona', 'Spain');",0 What is the status for 24/11/1979?,"CREATE TABLE table_name_86 (status VARCHAR, date VARCHAR);","SELECT status FROM table_name_86 WHERE date = ""24/11/1979"";","SELECT status FROM table_name_86 WHERE date = ""24/11/1979"";",1 List all the 'protected species' in the 'Amazon rainforest' region.,"CREATE TABLE regions (id INT, name VARCHAR(50)); CREATE TABLE species (id INT, name VARCHAR(50), is_protected BOOLEAN); ",SELECT species.name FROM species JOIN regions ON FALSE WHERE regions.name = 'Amazon rainforest' AND species.is_protected = true;,SELECT species.name FROM species INNER JOIN regions ON species.id = regions.id WHERE regions.name = 'Amazon rainforest' AND species.is_protected = true;,0 Insert records for recycling initiatives,"CREATE TABLE recycling_initiatives ( id INT PRIMARY KEY, region VARCHAR(255), initiative_name VARCHAR(255), initiative_description TEXT, start_date DATE, end_date DATE); ","INSERT INTO recycling_initiatives (id, region, initiative_name, initiative_description, start_date, end_date) VALUES (1, 'Africa', 'Plastic Bottle Collection', 'Collecting plastic bottles in schools and parks.', '2020-01-01', '2020-12-31'), (2, 'South America', 'E-Waste Disposal', 'Establishing e-waste drop-off points in major cities.', '2019-06-15', '2021-06-14'), (3, 'Oceania', 'Composting Program', 'Implementing composting programs in households.', '2018-04-22', '2022-04-21'), (4, 'Antarctica', 'Research and Development', 'Researching new waste reduction methods.', '2023-07-04', '2026-07-03');","INSERT INTO recycling_initiatives (id, region, initiative_name, initiative_description, start_date, end_date) VALUES (1, 'Recycling Initiatives', '2020-01-01', '2022-01-01');",0 What is the average severity of vulnerabilities in the financial sector?,"CREATE TABLE vulnerabilities (id INT, sector VARCHAR(20), severity VARCHAR(10));",SELECT AVG(severity) FROM vulnerabilities WHERE sector = 'Financial';,SELECT AVG(severity) FROM vulnerabilities WHERE sector = 'Financial';,1 Please list the age and famous title of artists in descending order of age.,"CREATE TABLE artist (Famous_Title VARCHAR, Age VARCHAR);","SELECT Famous_Title, Age FROM artist ORDER BY Age DESC;","SELECT Famous_Title, Age FROM artist ORDER BY Age DESC;",1 What is the minimum age of athletes in the 'athletes' table?,"CREATE TABLE athletes (athlete_id INT, name VARCHAR(50), age INT, sport VARCHAR(20)); ",SELECT MIN(age) FROM athletes;,SELECT MIN(age) FROM athletes;,1 Calculate the total number of intelligence operations in the Middle Eastern region since 2019.,"CREATE TABLE Intelligence_Operations (operation_id INT, year INT, region_id INT); ",SELECT COUNT(*) FROM Intelligence_Operations WHERE year >= 2019 AND region_id = (SELECT region_id FROM Regions WHERE region_name = 'Middle Eastern');,SELECT COUNT(*) FROM Intelligence_Operations WHERE region_id IN (SELECT region_id FROM Middle Eastern_Region WHERE year >= 2019);,0 Who is the artist of the album Soul?,"CREATE TABLE table_name_18 (artist VARCHAR, album VARCHAR);","SELECT artist FROM table_name_18 WHERE album = ""soul"";","SELECT artist FROM table_name_18 WHERE album = ""soul"";",1 How many volunteers signed up in 2022 from India or Nigeria?,"CREATE TABLE volunteers (id INT, name TEXT, country TEXT, signup_date DATE); ","SELECT COUNT(*) FROM volunteers WHERE country IN ('India', 'Nigeria') AND YEAR(signup_date) = 2022;","SELECT COUNT(*) FROM volunteers WHERE country IN ('India', 'Nigeria') AND YEAR(signup_date) = 2022;",1 How many articles were published by female authors in the last 6 months?,"CREATE TABLE Articles (article_id INT, title VARCHAR(255), author_name VARCHAR(50), publication_date DATE); ","SELECT COUNT(*) FROM Articles WHERE author_name = 'Jane Smith' AND publication_date >= DATE_SUB(CURDATE(), INTERVAL 6 MONTH);","SELECT COUNT(*) FROM Articles WHERE author_name LIKE '%Female%' AND publication_date >= DATEADD(month, -6, GETDATE());",0 What is the maximum number of likes received by any article published in 2017?,"CREATE TABLE articles (article_id INT, title TEXT, publish_date DATE, likes INT);",SELECT MAX(likes) as max_likes FROM articles WHERE publish_date >= '2017-01-01' AND publish_date < '2018-01-01';,SELECT MAX(likes) FROM articles WHERE publish_date BETWEEN '2017-01-01' AND '2017-12-31';,0 How many points are listed when the position is 2?,"CREATE TABLE table_15405904_1 (points INTEGER, position VARCHAR);",SELECT MAX(points) FROM table_15405904_1 WHERE position = 2;,SELECT MAX(points) FROM table_15405904_1 WHERE position = 2;,1 What is the average safety rating for algorithmic fairness models?,"CREATE TABLE fairness_models (model_name TEXT, safety_rating INTEGER); ",SELECT AVG(safety_rating) FROM fairness_models;,SELECT AVG(safety_rating) FROM fairness_models;,1 Which state has the most customers?,CREATE TABLE customers (state VARCHAR);,SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) LIMIT 1;,SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) DESC LIMIT 1;,0 What are the mining companies operating in countries with the highest environmental impact?,"CREATE TABLE Companies (CompanyID INT, CompanyName VARCHAR(50), Country VARCHAR(50)); CREATE TABLE EnvironmentalImpact (Country VARCHAR(50), ImpactScore INT); ",SELECT CompanyName FROM Companies JOIN EnvironmentalImpact ON Companies.Country = EnvironmentalImpact.Country WHERE ImpactScore IN (SELECT MAX(ImpactScore) FROM EnvironmentalImpact);,SELECT Companies.CompanyName FROM Companies INNER JOIN EnvironmentalImpact ON Companies.Country = EnvironmentalImpact.Country WHERE EnvironmentalImpact.ImpactScore = (SELECT MAX(ImpactScore) FROM EnvironmentalImpact);,0 What is the sum of PTS when there is a PCT smaller than 0.1?,"CREATE TABLE table_name_11 (pts INTEGER, pct INTEGER);",SELECT SUM(pts) FROM table_name_11 WHERE pct < 0.1;,SELECT SUM(pts) FROM table_name_11 WHERE pct 0.1;,0 What is the minimum number of cases handled by attorneys who identify as Asian?,"CREATE TABLE attorneys (attorney_id INT, ethnicity VARCHAR(20), total_cases INT); ",SELECT MIN(total_cases) FROM attorneys WHERE ethnicity = 'Asian';,SELECT MIN(total_cases) FROM attorneys WHERE ethnicity = 'Asian';,1 What was the home team when the away team was Frickley Athletic?,"CREATE TABLE table_name_3 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_3 WHERE away_team = ""frickley athletic"";","SELECT home_team FROM table_name_3 WHERE away_team = ""frickley athletic"";",1 What is the number of individuals in Europe who have received financial capability training in the last 12 months?,"CREATE TABLE financial_capability (individual_id TEXT, training_date DATE, country TEXT); ","SELECT COUNT(individual_id) FROM financial_capability WHERE training_date >= DATEADD(year, -1, CURRENT_DATE) AND country = 'Europe';","SELECT COUNT(*) FROM financial_capability WHERE country = 'Europe' AND training_date >= DATE_SUB(CURRENT_DATE, INTERVAL 12 MONTH);",0 Identify the transaction with the largest amount in each quarter for the past two years.,"CREATE TABLE transactions (id INT, transaction_date DATE, amount DECIMAL(10, 2)); ","SELECT transaction_date, amount FROM (SELECT transaction_date, amount, ROW_NUMBER() OVER (PARTITION BY DATE_TRUNC('quarter', transaction_date) ORDER BY amount DESC) as rn FROM transactions WHERE transaction_date >= (CURRENT_DATE - INTERVAL '2 year')) t WHERE rn = 1;","SELECT DATE_FORMAT(transaction_date, '%Y-%m') as quarter, MAX(amount) as max_amount FROM transactions WHERE transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 2 YEAR) GROUP BY quarter;",0 What is the minimum risk rating for organizations in the Renewable Energy sector?,"CREATE TABLE organizations (id INT, name TEXT, sector TEXT, risk_rating FLOAT); ",SELECT MIN(risk_rating) FROM organizations WHERE sector = 'Renewable Energy';,SELECT MIN(risk_rating) FROM organizations WHERE sector = 'Renewable Energy';,1 Which Country has a IATA of vie?,"CREATE TABLE table_name_32 (country VARCHAR, iata VARCHAR);","SELECT country FROM table_name_32 WHERE iata = ""vie"";","SELECT country FROM table_name_32 WHERE iata = ""vie"";",1 Who was the democratic candidate when the republican was frank wolf?,"CREATE TABLE table_17503169_1 (democratic VARCHAR, republican VARCHAR);","SELECT democratic FROM table_17503169_1 WHERE republican = ""Frank Wolf"";","SELECT democratic FROM table_17503169_1 WHERE republican = ""Frank Wolf"";",1 "What is the number of goals when the position is DF, the nationality is England, and the Crewe Alexandra career is 1948–1951?","CREATE TABLE table_name_76 (goals VARCHAR, crewe_alexandra_career VARCHAR, position VARCHAR, nationality VARCHAR);","SELECT COUNT(goals) FROM table_name_76 WHERE position = ""df"" AND nationality = ""england"" AND crewe_alexandra_career = ""1948–1951"";","SELECT COUNT(goals) FROM table_name_76 WHERE position = ""df"" AND nationality = ""england"" AND crewe_alexandra_career = ""1948–1951"";",1 Rank the highways in Australia by length.,"CREATE TABLE highways (id INT, name TEXT, length_km FLOAT, location TEXT, built YEAR); ","SELECT name, length_km, RANK() OVER(ORDER BY length_km DESC) as length_rank FROM highways WHERE location = 'Australia';","SELECT name, length_km, RANK() OVER (ORDER BY length_km DESC) as rank FROM highways WHERE location = 'Australia';",0 "Which Fleet Series (Quantity) that has a Builder of mci, and an Order Year of 2002?","CREATE TABLE table_name_23 (fleet_series__quantity_ VARCHAR, builder VARCHAR, order_year VARCHAR);","SELECT fleet_series__quantity_ FROM table_name_23 WHERE builder = ""mci"" AND order_year = ""2002"";","SELECT fleet_series__quantity_ FROM table_name_23 WHERE builder = ""mci"" AND order_year = ""2002"";",1 Name the result for 19 black knights points,"CREATE TABLE table_21091145_1 (result VARCHAR, black_knights_points VARCHAR);",SELECT result FROM table_21091145_1 WHERE black_knights_points = 19;,SELECT result FROM table_21091145_1 WHERE black_knights_points = 19;,1 What place did the party finish in the year when they earned 0.86% of the vote?,"CREATE TABLE table_168482_1 (place VARCHAR, _percentage_of_popular_vote VARCHAR);","SELECT place FROM table_168482_1 WHERE _percentage_of_popular_vote = ""0.86%"";","SELECT place FROM table_168482_1 WHERE _percentage_of_popular_vote = ""0.86%"";",1 Which electric vehicles have an estimated driving range greater than 300 miles?,"CREATE TABLE Vehicles (Vehicle_ID INT, Name VARCHAR(50), Manufacturer VARCHAR(50), Electric_Range INT); ","SELECT Name, Manufacturer, Electric_Range FROM Vehicles WHERE Electric_Range > 300;",SELECT Name FROM Vehicles WHERE Electric_Range > 300;,0 Find the top 5 highest ESG scoring companies in the technology sector,"CREATE TABLE companies (id INT, sector VARCHAR(255), ESG_score FLOAT);",SELECT * FROM companies WHERE sector = 'technology' ORDER BY ESG_score DESC LIMIT 5;,"SELECT sector, ESG_score FROM companies WHERE sector = 'Technology' ORDER BY ESG_score DESC LIMIT 5;",0 Which game had a record of 45-16?,"CREATE TABLE table_name_12 (game INTEGER, record VARCHAR);","SELECT AVG(game) FROM table_name_12 WHERE record = ""45-16"";","SELECT SUM(game) FROM table_name_12 WHERE record = ""45-16"";",0 Name the year for laps of 200 and rank of 24,"CREATE TABLE table_name_14 (year VARCHAR, laps VARCHAR, rank VARCHAR);","SELECT year FROM table_name_14 WHERE laps = 200 AND rank = ""24"";",SELECT year FROM table_name_14 WHERE laps = 200 AND rank = 24;,0 "What is the average number of likes on posts by users from the US, for each social media platform, in the past month?","CREATE TABLE social_media (platform VARCHAR(20), country VARCHAR(20), likes INT); ","SELECT s.platform, AVG(s.likes) as avg_likes FROM social_media s WHERE s.country = 'USA' GROUP BY s.platform;","SELECT platform, AVG(likes) as avg_likes FROM social_media WHERE country = 'USA' AND post_date >= DATEADD(month, -1, GETDATE()) GROUP BY platform;",0 "what's the torque with fuel mileage (latest epa mpg - us ) being 22 city, 30 hwy, 25 comb","CREATE TABLE table_1373768_1 (torque VARCHAR, fuel_mileage__latest_epa_mpg___us__ VARCHAR);","SELECT torque FROM table_1373768_1 WHERE fuel_mileage__latest_epa_mpg___us__ = ""22 city, 30 hwy, 25 comb"";","SELECT torque FROM table_1373768_1 WHERE fuel_mileage__latest_epa_mpg___us__ = ""22 city, 30 hwy, 25 comb"";",1 "Find the average chemical concentration for each product, grouped by product category.","CREATE TABLE Chemical_Concentration (Product VARCHAR(255), Product_Category VARCHAR(255), Chemical_Concentration DECIMAL(5,2)); ","SELECT Product_Category, AVG(Chemical_Concentration) AS Avg_Concentration FROM Chemical_Concentration GROUP BY Product_Category;","SELECT Product_Category, AVG(Chemical_Concentration) FROM Chemical_Concentration GROUP BY Product_Category;",0 Which game is on mar 12?,"CREATE TABLE table_name_81 (game INTEGER, date VARCHAR);","SELECT AVG(game) FROM table_name_81 WHERE date = ""mar 12"";","SELECT SUM(game) FROM table_name_81 WHERE date = ""mar 12"";",0 "Find the number of research grants awarded to female faculty members in the ""technology"" department between 2015 and 2017","CREATE TABLE research_grants (id INT, faculty_id INT, department VARCHAR(255), amount FLOAT, grant_year INT); CREATE TABLE faculty (id INT, name VARCHAR(255), gender VARCHAR(255)); ",SELECT COUNT(*) FROM research_grants rg INNER JOIN faculty f ON rg.faculty_id = f.id WHERE rg.department = 'technology' AND rg.grant_year BETWEEN 2015 AND 2017 AND f.gender = 'female';,SELECT COUNT(*) FROM research_grants rg JOIN faculty f ON rg.faculty_id = f.id WHERE f.gender = 'Female' AND rg.department = 'technology' AND rg.grant_year BETWEEN 2015 AND 2017;,0 Who had the pole(s) when esteban guerrieri led the most laps round 8a and josef newgarden had the fastest lap?,"CREATE TABLE table_29690363_3 (pole_position VARCHAR, rd VARCHAR, most_laps_led VARCHAR, fastest_lap VARCHAR);","SELECT pole_position FROM table_29690363_3 WHERE most_laps_led = ""Esteban Guerrieri"" AND fastest_lap = ""Josef Newgarden"" AND rd = ""8A"";","SELECT pole_position FROM table_29690363_3 WHERE most_laps_led = ""Esteban Guerrieri"" AND fastest_lap = ""Josef Newgarden"";",0 What was the average number of hashtags in posts from March?,"CREATE TABLE posts (id INT, user_id INT, post_text VARCHAR(255), hashtags INT); ",SELECT AVG(hashtags) FROM posts WHERE MONTH(post_date) = 3;,SELECT AVG(hashtags) FROM posts WHERE post_text BETWEEN 'March' AND 'March';,0 List all volunteers who have not made a donation.,"CREATE TABLE donations (donation_id INT, donor_id INT, amount_donated DECIMAL(10, 2)); CREATE TABLE donors (donor_id INT, name TEXT); CREATE TABLE volunteers (volunteer_id INT, donor_id INT, name TEXT); ",SELECT volunteers.name FROM volunteers LEFT JOIN donors ON volunteers.donor_id = donors.donor_id WHERE donors.donor_id IS NULL;,SELECT volunteers.name FROM volunteers INNER JOIN donations ON volunteers.donor_id = donations.donor_id INNER JOIN donors ON donations.donor_id = donors.donor_id INNER JOIN volunteers ON donations.donor_id = volunteers.donor_id WHERE donations.donation_id IS NULL;,0 "What is the total waste generation in the Asian region for the year 2020, separated by country?","CREATE TABLE WasteGeneration (country VARCHAR(50), year INT, waste_quantity INT); ","SELECT country, SUM(waste_quantity) FROM WasteGeneration WHERE year = 2020 AND country IN ('Asia/India', 'Asia/China', 'Asia/Japan') GROUP BY country;","SELECT country, SUM(waste_quantity) FROM WasteGeneration WHERE year = 2020 AND region = 'Asia' GROUP BY country;",0 What is the maximum production capacity of the African coal mines?,"CREATE TABLE Mines (MineID INT, MineType VARCHAR(20), ProductionCapacity INT); ",SELECT MAX(ProductionCapacity) FROM Mines WHERE MineType = 'Coal' AND Location LIKE 'Africa%';,SELECT MAX(ProductionCapacity) FROM Mines WHERE MineType = 'Coal';,0 "Which social enterprises are in the 'renewable energy' sector and have received investments over $100,000?","CREATE TABLE social_enterprises (enterprise_id INT, sector VARCHAR(20), investment_received FLOAT); ","SELECT enterprise_id, sector, investment_received FROM social_enterprises WHERE sector = 'renewable energy' AND investment_received > 100000;",SELECT enterprise_id FROM social_enterprises WHERE sector ='renewable energy' AND investment_received > 100000;,0 "What date has 2006 fifa world cup qualification as the competition, and alamodome, san antonio, united States as the venue?","CREATE TABLE table_name_40 (date VARCHAR, competition VARCHAR, venue VARCHAR);","SELECT date FROM table_name_40 WHERE competition = ""2006 fifa world cup qualification"" AND venue = ""alamodome, san antonio, united states"";","SELECT date FROM table_name_40 WHERE competition = ""2006 fifa world cup qualification"" AND venue = ""alamodome, san antonio, united states"";",1 What date had a game with wycombe wanderers as the away team?,"CREATE TABLE table_name_28 (date VARCHAR, away_team VARCHAR);","SELECT date FROM table_name_28 WHERE away_team = ""wycombe wanderers"";","SELECT date FROM table_name_28 WHERE away_team = ""wycombe wanderers"";",1 "Which Projects template has an IntelliTrace of no, and a Windows Phone development of yes, and a Test impact analysis of no?","CREATE TABLE table_name_39 (projects_templates VARCHAR, test_impact_analysis VARCHAR, intellitrace VARCHAR, windows_phone_development VARCHAR);","SELECT projects_templates FROM table_name_39 WHERE intellitrace = ""no"" AND windows_phone_development = ""yes"" AND test_impact_analysis = ""no"";","SELECT projects_templates FROM table_name_39 WHERE intellitrace = ""no"" AND windows_phone_development = ""yes"" AND test_impact_analysis = ""no"";",1 What year did Elf Team Tyrrell have 34 points?,"CREATE TABLE table_name_59 (year INTEGER, entrant VARCHAR, points VARCHAR);","SELECT AVG(year) FROM table_name_59 WHERE entrant = ""elf team tyrrell"" AND points = ""34"";","SELECT AVG(year) FROM table_name_59 WHERE entrant = ""elf team tyrrell"" AND points = 34;",0 "What is the average rating of theater performances, in the past year, broken down by age group and language?","CREATE TABLE Events (id INT, date DATE, language VARCHAR(50), event_type VARCHAR(50)); CREATE TABLE Ratings (id INT, event_id INT, age_group VARCHAR(20), rating DECIMAL(3,2)); ","SELECT e.language, r.age_group, AVG(r.rating) AS avg_rating FROM Events e INNER JOIN Ratings r ON e.id = r.event_id WHERE e.date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND e.event_type = 'Theater' GROUP BY e.language, r.age_group;","SELECT e.language, r.age_group, AVG(r.rating) as avg_rating FROM Events e JOIN Ratings r ON e.id = r.event_id WHERE e.date >= DATEADD(year, -1, GETDATE()) GROUP BY e.language, r.age_group;",0 Candidate John Mccain had how many delegates?,"CREATE TABLE table_16186152_1 (delegates VARCHAR, candidate VARCHAR);","SELECT delegates FROM table_16186152_1 WHERE candidate = ""John McCain"";","SELECT delegates FROM table_16186152_1 WHERE candidate = ""John Mccain"";",0 What is the total quantity of gluten-free dishes sold in urban branches last week?,"CREATE TABLE Branches (branch_id INT, branch_type VARCHAR(255));CREATE TABLE Menu (dish_name VARCHAR(255), branch_id INT, dietary_restrictions VARCHAR(255));CREATE TABLE Sales (sale_date DATE, dish_name VARCHAR(255), quantity INT);","SELECT SUM(quantity) as total_gluten_free_sales FROM Sales JOIN Menu ON Sales.dish_name = Menu.dish_name JOIN Branches ON Menu.branch_id = Branches.branch_id WHERE dietary_restrictions = 'gluten-free' AND branch_type = 'urban' AND sale_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) AND CURRENT_DATE;","SELECT SUM(Sales.quantity) FROM Sales INNER JOIN Menu ON Sales.dish_name = Menu.dish_name WHERE Menu.dietary_restrictions = 'gluten-free' AND Sales.sale_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) AND CURRENT_DATE AND Branches.branch_type = 'Urban';",0 Update the total donation amount for donor 'John Doe' to $6000.,"CREATE TABLE donors (donor_id INT, donor_name TEXT, country TEXT, total_donation_amount FLOAT); ",WITH updated_john_doe AS (UPDATE donors SET total_donation_amount = 6000.00 WHERE donor_name = 'John Doe' AND country = 'USA' RETURNING *) SELECT * FROM updated_john_doe;,UPDATE donors SET total_donation_amount = 6000 WHERE donor_name = 'John Doe';,0 List the top 3 countries with the highest increase in corn yield between 2019 and 2021?,"CREATE TABLE CornYield (country TEXT, year INTEGER, corn_yield INTEGER); ","SELECT country, (LAG(corn_yield, 1, 0) OVER (PARTITION BY country ORDER BY year) - corn_yield) AS yield_difference FROM CornYield WHERE year = 2021 ORDER BY yield_difference DESC LIMIT 3;","SELECT country, MAX(corn_yield) FROM CornYield WHERE year BETWEEN 2019 AND 2021 GROUP BY country ORDER BY MAX(corn_yield) DESC LIMIT 3;",0 "Delete the research grant record with grant_id 5 and update the grant_amount to $500,000 for the record with grant_id 6 in the 'research_grants' table.","CREATE TABLE research_grants (grant_id INT, grant_amount INT, grant_title TEXT); ",DELETE FROM research_grants WHERE grant_id = 5; UPDATE research_grants SET grant_amount = 500000 WHERE grant_id = 6;,DELETE FROM research_grants WHERE grant_id = 5 AND grant_amount > 500000;,0 List the top 5 most frequently ordered vegan dishes.,"CREATE TABLE orders (order_id INT, dish_id INT); CREATE TABLE dishes (dish_id INT, name VARCHAR(50), type VARCHAR(20)); ","SELECT dishes.name, COUNT(orders.order_id) AS order_count FROM dishes JOIN orders ON dishes.dish_id = orders.dish_id WHERE dishes.type = 'vegan' GROUP BY dishes.name ORDER BY order_count DESC LIMIT 5;","SELECT d.name, COUNT(o.order_id) as order_count FROM orders o JOIN dishes d ON o.dish_id = d.dish_id WHERE d.type = 'Vegan' GROUP BY d.name ORDER BY order_count DESC LIMIT 5;",0 What is the score of the game with Grizzlies as the visitor team on 30 December 2007?,"CREATE TABLE table_name_21 (score VARCHAR, visitor VARCHAR, date VARCHAR);","SELECT score FROM table_name_21 WHERE visitor = ""grizzlies"" AND date = ""30 december 2007"";","SELECT score FROM table_name_21 WHERE visitor = ""grizzlies"" AND date = ""30 december 2007"";",1 What's the pick number of the player from Springfield Olympics (Nejhl)?,"CREATE TABLE table_1013129_3 (pick VARCHAR, college_junior_club_team VARCHAR);","SELECT pick FROM table_1013129_3 WHERE college_junior_club_team = ""Springfield Olympics (NEJHL)"";","SELECT pick FROM table_1013129_3 WHERE college_junior_club_team = ""Springfield Olympics (Nejhl)"";",0 Which regions have the most vegan products with a certain price range?,"CREATE TABLE vegan_products_prices (product_id INT, region_id INT, price DECIMAL); ","SELECT region_id, COUNT(*) as num_products, SUM(price) as total_price FROM vegan_products_prices JOIN vegan_products ON vegan_products_prices.product_id = vegan_products.product_id WHERE vegan_products.is_vegan = true AND price BETWEEN 10 AND 30 GROUP BY region_id ORDER BY num_products DESC","SELECT region_id, COUNT(*) as total_products FROM vegan_products_prices GROUP BY region_id ORDER BY total_products DESC LIMIT 1;",0 What is the total revenue for all Italian restaurants?,"CREATE TABLE Restaurants (id INT, name VARCHAR, category VARCHAR, revenue INT); ",SELECT SUM(revenue) FROM Restaurants WHERE category = 'Italian';,SELECT SUM(revenue) FROM Restaurants WHERE category = 'Italian';,1 How many total draws was played less than 18 with 11 losts?,"CREATE TABLE table_name_2 (draw INTEGER, lost VARCHAR, played VARCHAR);",SELECT SUM(draw) FROM table_name_2 WHERE lost = 11 AND played < 18;,SELECT SUM(draw) FROM table_name_2 WHERE lost = 11 AND played 18;,0 What was the total weight of artifacts excavated per analyst each year?,"CREATE TABLE analysts (analyst_id INT, name VARCHAR(50), start_date DATE); CREATE TABLE artifact_analysis (analysis_id INT, artifact_id INT, analyst_id INT, analysis_date DATE, weight DECIMAL(5,2));","SELECT a.name, EXTRACT(YEAR FROM aa.analysis_date) as analysis_year, SUM(aa.weight) as total_weight FROM analysts a JOIN artifact_analysis aa ON a.analyst_id = aa.analyst_id GROUP BY a.analyst_id, a.name, analysis_year ORDER BY analysis_year, total_weight DESC;","SELECT a.analyst_id, a.year, SUM(a.weight) as total_weight FROM analysts a JOIN artifact_analysis a ON a.analyst_id = a.analyst_id GROUP BY a.analyst_id, a.year;",0 Which season had 34 losses?,"CREATE TABLE table_name_35 (season VARCHAR, losses VARCHAR);","SELECT season FROM table_name_35 WHERE losses = ""34"";",SELECT season FROM table_name_35 WHERE losses = 34;,0 What school is in Brookville?,"CREATE TABLE table_name_34 (school VARCHAR, city VARCHAR);","SELECT school FROM table_name_34 WHERE city = ""brookville"";","SELECT school FROM table_name_34 WHERE city = ""brookville"";",1 "What is the total number of animals in the animal_population table, broken down by species and endangered status, for animals that are not endangered?","CREATE TABLE animal_population (id INT, species VARCHAR(50), population INT, endangered BOOLEAN);","SELECT species, endangered, SUM(population) FROM animal_population WHERE endangered = FALSE GROUP BY species, endangered;","SELECT species, endangered, SUM(population) FROM animal_population WHERE endangered = false GROUP BY species, endangered;",0 What is the maximum number of failed login attempts for user accounts with 'admin' role in the past week?,"CREATE TABLE login_attempts (id INT, user_account TEXT, role TEXT, attempt_time TIMESTAMP); ","SELECT user_account, MAX(TIMESTAMP_DIFF(attempt_time, LAG(attempt_time) OVER (PARTITION BY user_account ORDER BY attempt_time), MINUTE)) FROM login_attempts WHERE role = 'admin' AND attempt_time >= CURRENT_DATE - INTERVAL 7 DAY GROUP BY user_account;","SELECT MAX(COUNT(*)) FROM login_attempts WHERE role = 'admin' AND attempt_time >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 WEEK);",0 "Who was the home team at the game with a crowd larger than 32,576?","CREATE TABLE table_name_20 (home_team VARCHAR, crowd INTEGER);",SELECT home_team AS score FROM table_name_20 WHERE crowd > 32 OFFSET 576;,SELECT home_team FROM table_name_20 WHERE crowd > 32 OFFSET 576;,0 Which programs had more than 25 volunteers in any month of 2022?,"CREATE TABLE Volunteers (id INT, program VARCHAR(50), volunteer_count INT, engagement_date DATE); ","SELECT program, DATE_FORMAT(engagement_date, '%Y-%m') as engagement_month, SUM(volunteer_count) as total_volunteers FROM Volunteers WHERE engagement_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY program, engagement_month HAVING total_volunteers > 25;",SELECT program FROM Volunteers WHERE volunteer_count > 25 AND engagement_date BETWEEN '2022-01-01' AND '2022-12-31';,0 What is the name of the facility with the lowest circular economy score?,"CREATE TABLE circular_economy (id INT, facility_name VARCHAR(255), score FLOAT); ",SELECT facility_name FROM circular_economy ORDER BY score LIMIT 1;,SELECT facility_name FROM circular_economy WHERE score = (SELECT MIN(score) FROM circular_economy);,0 Please give me a list of cities whose regional population is over 8000000 or under 5000000.,"CREATE TABLE city (city VARCHAR, regional_population INTEGER);",SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000;,SELECT city FROM city WHERE regional_population > 8000000 OR regional_population 5000000;,0 Which Theme has a Order # of 9?,"CREATE TABLE table_name_5 (theme VARCHAR, order__number VARCHAR);","SELECT theme FROM table_name_5 WHERE order__number = ""9"";","SELECT theme FROM table_name_5 WHERE order__number = ""9"";",1 Which place has 23 floors and a street address in Detroit of 144 west congress street?,"CREATE TABLE table_name_17 (name VARCHAR, floors VARCHAR, street_address_in_detroit VARCHAR);","SELECT name FROM table_name_17 WHERE floors = 23 AND street_address_in_detroit = ""144 west congress street"";","SELECT name FROM table_name_17 WHERE floors = 23 AND street_address_in_detroit = ""144 west congress street"";",1 "What open cup did they play in when they finished 2nd, northeast in the reg. season?","CREATE TABLE table_name_21 (open_cup VARCHAR, reg_season VARCHAR);","SELECT open_cup FROM table_name_21 WHERE reg_season = ""2nd, northeast"";","SELECT open_cup FROM table_name_21 WHERE reg_season = ""2nd, northeast"";",1 Calculate the total cost of military equipment from the vendor 'Tactical Technologies',"CREATE TABLE military_equipment (equipment_id INT, vendor VARCHAR(255), cost FLOAT); ",SELECT SUM(cost) FROM military_equipment WHERE vendor = 'Tactical Technologies';,SELECT SUM(cost) FROM military_equipment WHERE vendor = 'Tactical Technologies';,1 Who had the high points when the score was w 108–105 (ot)?,"CREATE TABLE table_name_59 (high_points VARCHAR, score VARCHAR);","SELECT high_points FROM table_name_59 WHERE score = ""w 108–105 (ot)"";","SELECT high_points FROM table_name_59 WHERE score = ""w 108–105 (ot)"";",1 Show the number of employees in each region from 'employee_demographics',"CREATE TABLE employee_demographics (id INT PRIMARY KEY, employee_id INT, name VARCHAR(255), department VARCHAR(255), region VARCHAR(255)); ","SELECT region, COUNT(*) FROM employee_demographics GROUP BY region;","SELECT region, COUNT(*) FROM employee_demographics GROUP BY region;",1 List the name of all rooms sorted by their prices.,"CREATE TABLE Rooms (roomName VARCHAR, basePrice VARCHAR);",SELECT roomName FROM Rooms ORDER BY basePrice;,SELECT roomName FROM Rooms ORDER BY basePrice;,1 Glenys Bakker was second for which nation?,"CREATE TABLE table_name_74 (nation VARCHAR, second VARCHAR);","SELECT nation FROM table_name_74 WHERE second = ""glenys bakker"";","SELECT nation FROM table_name_74 WHERE second = ""glenys bakker"";",1 How many publications were made by graduate students from 'Asia' in 2022?,"CREATE TABLE students (id INT, region TEXT, start_year INT); CREATE TABLE publications (id INT, student_id INT, year INT); ",SELECT COUNT(*) FROM publications JOIN students ON publications.student_id = students.id WHERE students.region = 'China' AND publications.year = 2022;,SELECT COUNT(*) FROM publications p JOIN students s ON p.student_id = s.id WHERE s.region = 'Asia' AND p.year = 2022;,0 How many years was the issue price $19.95?,"CREATE TABLE table_name_52 (year_of_issue VARCHAR, issue_price VARCHAR);","SELECT COUNT(year_of_issue) FROM table_name_52 WHERE issue_price = ""$19.95"";","SELECT COUNT(year_of_issue) FROM table_name_52 WHERE issue_price = ""$19.95"";",1 Name the tv time for week 10,"CREATE TABLE table_name_49 (tv_time VARCHAR, week VARCHAR);",SELECT tv_time FROM table_name_49 WHERE week = 10;,SELECT tv_time FROM table_name_49 WHERE week = 10;,1 What is the end date for Maaroufi?,"CREATE TABLE table_name_59 (ends VARCHAR, name VARCHAR);","SELECT ends FROM table_name_59 WHERE name = ""maaroufi"";","SELECT ends FROM table_name_59 WHERE name = ""maaroufi"";",1 Determine the difference in revenue between the first and last sale for each product.,"CREATE TABLE sales (sale_id INT, product_name VARCHAR(255), sale_date DATE, revenue DECIMAL(10, 2)); ","SELECT product_name, MAX(sale_date) - MIN(sale_date) as days_between, SUM(revenue) FILTER (WHERE sale_date = MAX(sale_date)) - SUM(revenue) FILTER (WHERE sale_date = MIN(sale_date)) as revenue_difference FROM sales GROUP BY product_name;","SELECT product_name, SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) - SUM(revenue) GROUP BY product_name;",0 What is the average wellbeing program participation rate by athlete?,"CREATE TABLE athlete_participation (id INT, athlete VARCHAR(255), program VARCHAR(255), participation DECIMAL(5,2)); ","SELECT athlete, AVG(participation) as avg_participation FROM athlete_participation GROUP BY athlete;","SELECT athlete, AVG(participation) as avg_participation FROM athlete_participation GROUP BY athlete;",1 What is the total number of marine conservation initiatives in the Pacific Islands?,"CREATE TABLE marine_conservation_initiatives (id INT, name TEXT, location TEXT); ",SELECT COUNT(*) FROM marine_conservation_initiatives WHERE location = 'Pacific Islands';,SELECT COUNT(*) FROM marine_conservation_initiatives WHERE location = 'Pacific Islands';,1 Update the conservation status of the 'Hawaiian Monk Seal' to 'Endangered' in the North Pacific.,"CREATE TABLE marine_species (id INT, species VARCHAR(50), ocean VARCHAR(50), conservation_status VARCHAR(50));",UPDATE marine_species SET conservation_status = 'Endangered' WHERE species = 'Hawaiian Monk Seal' AND ocean = 'North Pacific';,UPDATE marine_species SET conservation_status = 'Endangered' WHERE species = 'Hawaiian Monk Seal' AND ocean = 'North Pacific';,1 Name the into service for dh1,"CREATE TABLE table_29002641_1 (into_service VARCHAR, number VARCHAR);","SELECT into_service FROM table_29002641_1 WHERE number = ""DH1"";","SELECT into_service FROM table_29002641_1 WHERE number = ""DH1"";",1 What was France's highest score when the venue was Bokskogens?,"CREATE TABLE table_name_1 (score INTEGER, country VARCHAR, venue VARCHAR);","SELECT MAX(score) FROM table_name_1 WHERE country = ""france"" AND venue = ""bokskogens"";","SELECT MAX(score) FROM table_name_1 WHERE country = ""france"" AND venue = ""bokskogens"";",1 What's the stadium on November 8?,"CREATE TABLE table_name_26 (home VARCHAR, date VARCHAR);","SELECT home FROM table_name_26 WHERE date = ""november 8"";","SELECT home FROM table_name_26 WHERE date = ""november 8"";",1 What the since year of the player with a transfer fee of £ 75k?,"CREATE TABLE table_name_76 (since VARCHAR, transfer_fee VARCHAR);","SELECT since FROM table_name_76 WHERE transfer_fee = ""£ 75k"";","SELECT since FROM table_name_76 WHERE transfer_fee = ""£ 75k"";",1 What is the total waste generation in eco-district A and B?,"CREATE TABLE district (id INT, name TEXT, waste_generation FLOAT); ","SELECT SUM(waste_generation) FROM district WHERE name IN ('A', 'B');","SELECT SUM(waste_generation) FROM district WHERE name IN ('Eco-district A', 'Eco-district B');",0 Delete all records of donors who have not donated more than $50 in the last 6 months.,"CREATE TABLE donors (id INT, name TEXT, donation_date DATE, amount_donated DECIMAL(10,2));","DELETE FROM donors WHERE id NOT IN (SELECT id FROM donors WHERE amount_donated > 50 AND donation_date > DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH));","DELETE FROM donors WHERE amount_donated 50 AND donation_date >= DATEADD(month, -6, GETDATE());",0 What is the minimum coral bleaching level in the Caribbean Sea?,"CREATE TABLE coral_bleaching (region TEXT, level REAL); ",SELECT MIN(level) FROM coral_bleaching WHERE region = 'Caribbean Sea';,SELECT MIN(level) FROM coral_bleaching WHERE region = 'Caribbean Sea';,1 "Show the innovation progress for chemical 101 over time, including its innovation score and ranking among other chemicals?","CREATE TABLE innovation_scores (chemical_id INT, innovation_score INT, measurement_date DATE); ","SELECT innovation_score, RANK() OVER (PARTITION BY measurement_date ORDER BY innovation_score DESC) as innovation_rank FROM innovation_scores WHERE chemical_id = 101","SELECT chemical_id, innovation_score, measurement_date, RANK() OVER (ORDER BY innovation_score DESC) as rank FROM innovation_scores WHERE chemical_id = 101;",0 "List all smart contract names, the number of transactions for each, and the corresponding digital asset name, if available. If there is no associated digital asset, display 'N/A'.","CREATE TABLE smart_contracts (contract_id INT, contract_name VARCHAR(255), total_transactions INT); CREATE TABLE assets_contracts (asset_id INT, contract_id INT); CREATE TABLE assets (asset_id INT, asset_name VARCHAR(255));","SELECT sc.contract_name, sc.total_transactions, COALESCE(a.asset_name, 'N/A') as asset_name FROM smart_contracts sc LEFT JOIN assets_contracts ac ON sc.contract_id = ac.contract_id LEFT JOIN assets a ON ac.asset_id = a.asset_id;","SELECT smart_contracts.contract_name, SUM(smart_contracts.total_transactions) as total_transactions, assets.asset_name FROM smart_contracts INNER JOIN assets_contracts ON smart_contracts.contract_id = assets_contracts.contract_id INNER JOIN assets ON assets_contracts.asset_id = assets.asset_id GROUP BY smart_contracts.contract_name;",0 What is the nickname of the team that has the colors black and gold?,"CREATE TABLE table_name_27 (nickname VARCHAR, colors VARCHAR);","SELECT nickname FROM table_name_27 WHERE colors = ""black and gold"";","SELECT nickname FROM table_name_27 WHERE colors = ""black and gold"";",1 What is the maximum depth of any marine protected area?,"CREATE TABLE marine_protected_areas (area_name TEXT, depth FLOAT); ",SELECT MAX(depth) FROM marine_protected_areas;,SELECT MAX(depth) FROM marine_protected_areas;,1 What was the lowest round for Paul Hubbard?,"CREATE TABLE table_name_21 (round INTEGER, name VARCHAR);","SELECT MIN(round) FROM table_name_21 WHERE name = ""paul hubbard"";","SELECT MIN(round) FROM table_name_21 WHERE name = ""paul hubbard"";",1 What is the NCBI Accession Number (mRNA/Protein) for the homo sapiens Species?,"CREATE TABLE table_name_63 (ncbi_accession_number__mrna_protein_ VARCHAR, species VARCHAR);","SELECT ncbi_accession_number__mrna_protein_ FROM table_name_63 WHERE species = ""homo sapiens"";","SELECT ncbi_accession_number__mrna_protein_ FROM table_name_63 WHERE species = ""homo sapiens"";",1 How many heritage sites were established before 1900?,"CREATE TABLE Heritage_Sites (id INT, site_name VARCHAR(100), country VARCHAR(50), year_established INT, UNIQUE (id));",SELECT COUNT(*) FROM Heritage_Sites WHERE year_established < 1900;,SELECT COUNT(*) FROM Heritage_Sites WHERE year_established 1900;,0 "Determine the digital interaction trends for the past year by month, broken down by exhibition and their respective percentage changes.","CREATE TABLE Exhibition (Id INT, Name VARCHAR(100)); CREATE TABLE DigitalInteraction (Id INT, ExhibitionId INT, InteractionDate DATE, Quantity INT);","SELECT ExhibitionId, Name, DATEADD(MONTH, DATEDIFF(MONTH, 0, InteractionDate), 0) as Month, SUM(Quantity) as TotalQuantity, LAG(SUM(Quantity), 1, 0) OVER (PARTITION BY ExhibitionId ORDER BY Month) as PreviousMonthTotal, (SUM(Quantity) - LAG(SUM(Quantity), 1, 0) OVER (PARTITION BY ExhibitionId ORDER BY Month))*100.0 / LAG(SUM(Quantity), 1, 0) OVER (PARTITION BY ExhibitionId ORDER BY Month) as PercentageChange FROM Exhibition e JOIN DigitalInteraction di ON e.Id = di.ExhibitionId GROUP BY ExhibitionId, Name, Month ORDER BY ExhibitionId, Month;","SELECT ExhibitionId, EXTRACT(MONTH FROM InteractionDate) AS Month, SUM(Quantity) OVER (PARTITION BY ExhibitionId ORDER BY InteractionDate) AS PercentageChange FROM DigitalInteraction JOIN Exhibition ON DigitalInteraction.ExhibitionId = Exhibition.Id WHERE InteractionDate >= DATEADD(year, -1, GETDATE()) GROUP BY ExhibitionId, Month;",0 Where did Croatia lead?,"CREATE TABLE table_name_1 (lead VARCHAR, nation VARCHAR);","SELECT lead FROM table_name_1 WHERE nation = ""croatia"";","SELECT lead FROM table_name_1 WHERE nation = ""croatia"";",1 What is the original airdate of the episode that had 8.23 million viewers?,"CREATE TABLE table_26139378_1 (original_airdate VARCHAR, viewers__in_millions_ VARCHAR);","SELECT original_airdate FROM table_26139378_1 WHERE viewers__in_millions_ = ""8.23"";","SELECT original_airdate FROM table_26139378_1 WHERE viewers__in_millions_ = ""8.23"";",1 "Name the opponets for 6–4, 3–6, 6–2","CREATE TABLE table_2009095_2 (opponents VARCHAR, score VARCHAR);","SELECT opponents FROM table_2009095_2 WHERE score = ""6–4, 3–6, 6–2"";","SELECT opponents FROM table_2009095_2 WHERE score = ""6–4, 3–6, 6–2"";",1 What team has a national league in 2001?,"CREATE TABLE table_name_31 (team VARCHAR, league VARCHAR, year VARCHAR);","SELECT team FROM table_name_31 WHERE league = ""national"" AND year = 2001;","SELECT team FROM table_name_31 WHERE league = ""national"" AND year = 2001;",1 What is the lowest total when the rank is 14 and the gold medals is larger than 0?,"CREATE TABLE table_name_34 (total INTEGER, rank VARCHAR, gold VARCHAR);","SELECT MIN(total) FROM table_name_34 WHERE rank = ""14"" AND gold > 0;",SELECT MIN(total) FROM table_name_34 WHERE rank = 14 AND gold > 0;,0 Which region had a catalogue number of 9362482872?,"CREATE TABLE table_name_89 (region VARCHAR, catalogue VARCHAR);","SELECT region FROM table_name_89 WHERE catalogue = ""9362482872"";","SELECT region FROM table_name_89 WHERE catalogue = ""9362482872"";",1 "How many wins when points are more than 51, goals against are more than 23 and losses are 5?","CREATE TABLE table_name_56 (wins VARCHAR, losses VARCHAR, points VARCHAR, goals_against VARCHAR);",SELECT COUNT(wins) FROM table_name_56 WHERE points > 51 AND goals_against > 23 AND losses = 5;,SELECT wins FROM table_name_56 WHERE points > 51 AND goals_against > 23 AND losses = 5;,0 "When the rank is 11, and bronze a smaller than 1 what is the lowest total?","CREATE TABLE table_name_5 (total INTEGER, rank VARCHAR, bronze VARCHAR);","SELECT MIN(total) FROM table_name_5 WHERE rank = ""11"" AND bronze < 1;",SELECT MIN(total) FROM table_name_5 WHERE rank = 11 AND bronze 1;,0 What album is 4:53 long?,"CREATE TABLE table_name_74 (album VARCHAR, length VARCHAR);","SELECT album FROM table_name_74 WHERE length = ""4:53"";","SELECT album FROM table_name_74 WHERE length = ""4:53"";",1 "List all military equipment maintenance requests, and calculate the moving average of processing time for each contractor.","CREATE TABLE contractor_maintenance(contractor_id INT, request_date DATE, request_type VARCHAR(20), processing_time INT); ","SELECT contractor_id, request_date, request_type, processing_time, AVG(processing_time) OVER (PARTITION BY contractor_id ORDER BY request_date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) as moving_average FROM contractor_maintenance;","SELECT contractor_id, request_type, AVG(processing_time) as moving_avg FROM contractor_maintenance GROUP BY contractor_id, request_type;",0 What earliest year with points larger than 68 and a rank of 7th?,"CREATE TABLE table_name_71 (year INTEGER, points VARCHAR, rank VARCHAR);","SELECT MIN(year) FROM table_name_71 WHERE points > 68 AND rank = ""7th"";","SELECT MIN(year) FROM table_name_71 WHERE points > 68 AND rank = ""7th"";",1 What is the Club during the Years 1995–1996?,"CREATE TABLE table_name_28 (club VARCHAR, years VARCHAR);","SELECT club FROM table_name_28 WHERE years = ""1995–1996"";","SELECT club FROM table_name_28 WHERE years = ""1995–1996"";",1 What is the total quantity of each appetizer sold?,"CREATE TABLE appetizer_orders (order_id INT, appetizer VARCHAR(255), appetizer_quantity INT); ","SELECT appetizer, SUM(appetizer_quantity) FROM appetizer_orders GROUP BY appetizer;","SELECT appetizer, SUM(aperitif_quantity) FROM appetizer_orders GROUP BY appetizer;",0 List the number of unique industries and total funding for companies founded by people of color before 2010,"CREATE TABLE diversity (id INT, company_id INT, founder_race VARCHAR(255)); ","SELECT diversity.founder_race, COUNT(DISTINCT companies.industry) AS unique_industries, SUM(funding.amount) AS total_funding FROM diversity JOIN companies ON diversity.company_id = companies.id JOIN funding ON companies.id = funding.company_id WHERE companies.founding_date < '2010-01-01' AND diversity.founder_race IN ('Hispanic', 'Asian', 'Black') GROUP BY diversity.founder_race;","SELECT COUNT(DISTINCT industry) as unique_industry, SUM(funding) as total_funding FROM diversity WHERE founder_race = 'African American' AND YEAR(id) 2010 GROUP BY unique_industry;",0 What was the average year that the venue was Bokskogens?,"CREATE TABLE table_name_16 (year INTEGER, venue VARCHAR);","SELECT AVG(year) FROM table_name_16 WHERE venue = ""bokskogens"";","SELECT AVG(year) FROM table_name_16 WHERE venue = ""bokskogens"";",1 Who were all candidate when incumbent was D. Wyatt Aiken?,"CREATE TABLE table_1431467_4 (candidates VARCHAR, incumbent VARCHAR);","SELECT candidates FROM table_1431467_4 WHERE incumbent = ""D. Wyatt Aiken"";","SELECT candidates FROM table_1431467_4 WHERE incumbent = ""D. Wyatt Aiken"";",1 "What is the lowest Industry, when Year is greater than 2005, and when Agriculture is greater than 11?","CREATE TABLE table_name_96 (industry INTEGER, year VARCHAR, agriculture VARCHAR);",SELECT MIN(industry) FROM table_name_96 WHERE year > 2005 AND agriculture > 11;,SELECT MIN(industry) FROM table_name_96 WHERE year > 2005 AND agriculture > 11;,1 How many graduate students in the Engineering department come from each country?,"CREATE TABLE student_demographics (id INT, student_id INT, country VARCHAR(50), department VARCHAR(50)); ","SELECT country, COUNT(DISTINCT student_id) FROM student_demographics WHERE department = 'Engineering' GROUP BY country;","SELECT country, COUNT(*) FROM student_demographics WHERE department = 'Engineering' GROUP BY country;",0 "What is the least ties when they played less than 14 games, and a lost less than 8 of them?","CREATE TABLE table_name_7 (draw INTEGER, played VARCHAR, lost VARCHAR);",SELECT MIN(draw) FROM table_name_7 WHERE played < 14 AND lost < 8;,SELECT MIN(draw) FROM table_name_7 WHERE played 14 AND lost 8;,0 What is the average age of offenders who have participated in restorative justice programs?,"CREATE TABLE restorative_justice (offender_id INT, age INT, program_name VARCHAR(255));",SELECT AVG(age) FROM restorative_justice;,SELECT AVG(age) FROM restorative_justice;,1 "Which Nation has a Gold larger than 0, and a Total larger than 4, and a Rank of 6?","CREATE TABLE table_name_74 (nation VARCHAR, rank VARCHAR, gold VARCHAR, total VARCHAR);","SELECT nation FROM table_name_74 WHERE gold > 0 AND total > 4 AND rank = ""6"";",SELECT nation FROM table_name_74 WHERE gold > 0 AND total > 4 AND rank = 6;,0 What is listed in new points when status is second round lost to xavier malisse?,"CREATE TABLE table_29572583_19 (new_points INTEGER, status VARCHAR);","SELECT MIN(new_points) FROM table_29572583_19 WHERE status = ""Second round lost to Xavier Malisse"";","SELECT MAX(new_points) FROM table_29572583_19 WHERE status = ""2nd Round Lost to Xavier Malisse"";",0 What is the total number of space missions by ESA and NASA?,"CREATE TABLE space_agency (agency VARCHAR(50), missions INT);","SELECT SUM(missions) FROM space_agency WHERE agency IN ('ESA', 'NASA');","SELECT SUM(missions) FROM space_agency WHERE agency IN ('ESA', 'NASA');",1 How many mens doubles when womens doubles is catrine bengtsson margit borg?,"CREATE TABLE table_12171145_1 (mens_doubles VARCHAR, womens_doubles VARCHAR);","SELECT COUNT(mens_doubles) FROM table_12171145_1 WHERE womens_doubles = ""Catrine Bengtsson Margit Borg"";","SELECT COUNT(mens_doubles) FROM table_12171145_1 WHERE womens_doubles = ""Catrine Bengtsson Margitborg"";",0 Who was the home team when the VFL played Arden Street Oval?,"CREATE TABLE table_name_6 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_6 WHERE venue = ""arden street oval"";","SELECT home_team FROM table_name_6 WHERE venue = ""arden street oval"";",1 "What is the average age of female patients diagnosed with diabetes in rural Texas clinics, grouped by county?","CREATE TABLE patients (id INT, name TEXT, age INT, gender TEXT, diagnosis TEXT, clinic_location TEXT); CREATE TABLE clinics (id INT, name TEXT, location TEXT, capacity INT);","SELECT clinic_location, AVG(age) as avg_age FROM patients JOIN clinics ON patients.clinic_location = clinics.name WHERE diagnosis = 'Diabetes' AND gender = 'Female' GROUP BY clinic_location;","SELECT c.location, AVG(p.age) as avg_age FROM patients p INNER JOIN clinics c ON p.clinic_location = c.location WHERE p.gender = 'Female' AND p.diagnosis = 'Diabetes' GROUP BY c.location;",0 "What is the total number of green buildings in the green_buildings table that have been certified by each certification agency, sorted by the highest number of certified buildings?","CREATE TABLE green_buildings (building_id INT, name VARCHAR(100), location VARCHAR(50), certification_agency VARCHAR(50)); ","SELECT certification_agency, COUNT(building_id) as total_certified_buildings FROM green_buildings GROUP BY certification_agency ORDER BY total_certified_buildings DESC;","SELECT certification_agency, COUNT(*) as certified_buildings FROM green_buildings GROUP BY certification_agency ORDER BY certified_buildings DESC;",0 What is the Lowest lost for Team Ypiranga-SP where the games Played is more than 10 and the goals Against is greater than 50?,"CREATE TABLE table_name_71 (lost INTEGER, against VARCHAR, played VARCHAR, team VARCHAR);","SELECT MIN(lost) FROM table_name_71 WHERE played > 10 AND team = ""ypiranga-sp"" AND against > 50;","SELECT MIN(lost) FROM table_name_71 WHERE played > 10 AND team = ""ypiranga-sp"" AND against > 50;",1 "Insert a new record for a sustainable tourism project in Canada with a budget of $150,000 and ID 6.","CREATE TABLE sustainable_tourism_projects (project_id INT, location VARCHAR(50), budget DECIMAL(10, 2));","INSERT INTO sustainable_tourism_projects (project_id, location, budget) VALUES (6, 'Canada', 150000.00);","INSERT INTO sustainable_tourism_projects (project_id, location, budget) VALUES (6, 'Canada', 150000);",0 Which infrastructure projects in Texas have experienced cost overruns of over 50%?,"CREATE TABLE projects (project_id INT, project_name VARCHAR(100), state CHAR(2), planned_cost FLOAT, actual_cost FLOAT); ",SELECT * FROM projects WHERE state = 'TX' AND actual_cost > planned_cost * 1.5;,SELECT project_name FROM projects WHERE state = 'Texas' AND actual_cost > 50;,0 "List the names, genders, and countries of players who have adopted virtual reality technology, and the number of VR games they have created, sorted by the number of VR games in descending order.","CREATE TABLE Players (PlayerID INT, Age INT, Gender VARCHAR(10), Country VARCHAR(20), VRAdoption BOOLEAN);CREATE TABLE Games (GameID INT, GameName VARCHAR(30), Rating INT, PlayerID INT);CREATE VIEW VR_Games AS SELECT * FROM Games WHERE VRAdoption = TRUE;","SELECT Players.Name, Players.Gender, Players.Country, COUNT(VR_Games.GameID) FROM Players INNER JOIN VR_Games ON Players.PlayerID = VR_Games.PlayerID GROUP BY Players.Name, Players.Gender, Players.Country ORDER BY COUNT(VR_Games.GameID) DESC;","SELECT Players.PlayerID, Players.Gender, Players.Country, COUNT(VR_Games.GameID) FROM Players INNER JOIN VR_Games ON Players.PlayerID = VR_Games.PlayerID GROUP BY Players.PlayerID, Players.Gender, Players.Country ORDER BY COUNT(VR_Games.GameID) DESC;",0 Select the total number of peacekeeping operations conducted by the African Union,"CREATE TABLE peacekeeping_operations (operation_id INT, organization VARCHAR(255), operation_name VARCHAR(255), start_date DATE, end_date DATE); ",SELECT COUNT(*) FROM peacekeeping_operations WHERE organization = 'African Union';,SELECT COUNT(*) FROM peacekeeping_operations WHERE organization = 'African Union';,1 What Canadian Grand Prix race winner had Didier Pironi in Pole Position?,"CREATE TABLE table_name_11 (race VARCHAR, pole_position VARCHAR);","SELECT race AS Winner FROM table_name_11 WHERE pole_position = ""didier pironi"" AND race = ""canadian grand prix"";","SELECT race FROM table_name_11 WHERE pole_position = ""didier pironi"";",0 Which player has +2 to par?,"CREATE TABLE table_name_45 (player VARCHAR, to_par VARCHAR);","SELECT player FROM table_name_45 WHERE to_par = ""+2"";","SELECT player FROM table_name_45 WHERE to_par = ""+2"";",1 "Which Opponent has a Round smaller than 3, and a Time of 1:09?","CREATE TABLE table_name_48 (opponent VARCHAR, round VARCHAR, time VARCHAR);","SELECT opponent FROM table_name_48 WHERE round < 3 AND time = ""1:09"";","SELECT opponent FROM table_name_48 WHERE round 3 AND time = ""1:09"";",0 What is the average production cost of garments in the 'ethical_materials' table?,"CREATE TABLE ethical_materials (id INT, garment_type VARCHAR(255), production_cost DECIMAL(10,2));",SELECT AVG(production_cost) FROM ethical_materials;,SELECT AVG(production_cost) FROM ethical_materials;,1 Which Date has a Score of 106–112?,"CREATE TABLE table_name_58 (date VARCHAR, score VARCHAR);","SELECT date FROM table_name_58 WHERE score = ""106–112"";","SELECT date FROM table_name_58 WHERE score = ""106–112"";",1 What was the sum of the rounds for the player who had a position of LS and an overall draft pick bigger than 230?,"CREATE TABLE table_name_10 (round INTEGER, position VARCHAR, overall VARCHAR);","SELECT SUM(round) FROM table_name_10 WHERE position = ""ls"" AND overall > 230;","SELECT SUM(round) FROM table_name_10 WHERE position = ""ls"" AND overall > 230;",1 Identify the stores with sales below the average for their state,"CREATE TABLE stores (store_id INT, city VARCHAR(255), state VARCHAR(255), sales FLOAT); ","SELECT s1.store_id, s1.city, s1.state, s1.sales FROM stores s1 INNER JOIN (SELECT state, AVG(sales) AS avg_sales FROM stores GROUP BY state) s2 ON s1.state = s2.state WHERE s1.sales < s2.avg_sales;","SELECT store_id, city, state, sales FROM stores WHERE sales (SELECT AVG(sales) FROM stores);",0 What are the top 5 most common vulnerabilities in the ThreatIntel database?,"CREATE TABLE ThreatIntel (id INT, vulnerability VARCHAR(255), frequency INT); ","SELECT vulnerability, frequency FROM (SELECT vulnerability, frequency, ROW_NUMBER() OVER (ORDER BY frequency DESC) AS rank FROM ThreatIntel) AS ranked_vulnerabilities WHERE rank <= 5;","SELECT vulnerability, frequency FROM ThreatIntel ORDER BY frequency DESC LIMIT 5;",0 What was the box score for the game where the away team was the sydney spirit?,"CREATE TABLE table_name_40 (Box VARCHAR, away_team VARCHAR);","SELECT Box AS score FROM table_name_40 WHERE away_team = ""sydney spirit"";","SELECT Box AS score FROM table_name_40 WHERE away_team = ""sydney spirit"";",1 "Which pick has a Round smaller than 8, and an Overall smaller than 16, and a Name of harry gilmer?","CREATE TABLE table_name_55 (pick VARCHAR, name VARCHAR, round VARCHAR, overall VARCHAR);","SELECT pick FROM table_name_55 WHERE round < 8 AND overall < 16 AND name = ""harry gilmer"";","SELECT pick FROM table_name_55 WHERE round 8 AND overall 16 AND name = ""harry gilmer"";",0 What is the name of the virtual reality game with the lowest rating?,"CREATE TABLE VR_Games (Game_ID INT, Game_Name VARCHAR(20), Rating INT); ","SELECT Game_Name, MIN(Rating) FROM VR_Games;",SELECT Game_Name FROM VR_Games WHERE Rating = (SELECT MIN(Rating) FROM VR_Games);,0 List the financial capability programs started in H2 2021.,"CREATE TABLE financial_capability_programs (program_id INT, program_name VARCHAR(255), start_date DATE); ","SELECT program_name, start_date FROM financial_capability_programs WHERE start_date BETWEEN '2021-07-01' AND '2021-12-31';",SELECT program_name FROM financial_capability_programs WHERE start_date BETWEEN '2021-01-01' AND '2021-06-30';,0 Which TV network was located in Brazil?,"CREATE TABLE table_name_42 (tv_network_s_ VARCHAR, country VARCHAR);","SELECT tv_network_s_ FROM table_name_42 WHERE country = ""brazil"";","SELECT tv_network_s_ FROM table_name_42 WHERE country = ""brazil"";",1 Update all fire response times to 6 minutes in 'Oakland',"CREATE TABLE emergency_response(id INT, emergency_type VARCHAR(20), location VARCHAR(20), response_time INT);",UPDATE emergency_response SET response_time = 6 WHERE emergency_type = 'fire' AND location = 'Oakland';,UPDATE emergency_response SET response_time = 6 WHERE emergency_type = 'Fire' AND location = 'Oakland';,0 What constructor has a 12 grid?,"CREATE TABLE table_name_61 (constructor VARCHAR, grid VARCHAR);",SELECT constructor FROM table_name_61 WHERE grid = 12;,"SELECT constructor FROM table_name_61 WHERE grid = ""12"";",0 What is the percentage of positive citizen feedback for public service A?,"CREATE TABLE feedback (id INT, service VARCHAR(20), rating INT); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM feedback WHERE service = 'Public Service A')) FROM feedback WHERE rating >= 4 AND service = 'Public Service A';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM feedback WHERE service = 'Public Service A')) AS positive_percentage FROM feedback WHERE service = 'Public Service A';,0 Insert new records of traditional art pieces donated by individuals and organizations.,"CREATE TABLE Donations (donation_id INT, donor_type VARCHAR(10), art_id INT, donation_date DATE); CREATE TABLE TraditionalArt (art_id INT, art_name VARCHAR(20), art_type VARCHAR(20));","INSERT INTO Donations (donation_id, donor_type, art_id, donation_date) VALUES (1, 'Individual', 1, '2022-01-01'), (2, 'Organization', 2, '2022-02-01'); INSERT INTO TraditionalArt (art_id, art_name, art_type) VALUES (1, 'Drum', 'Wood'), (2, 'Mask', 'Clay');","INSERT INTO Donations (donation_id, donor_type, art_id, donation_date) VALUES (1, 'Art', 'Art', '2022-01-01'); INSERT INTO TraditionalArt (art_id, art_name, art_type) VALUES (1, 'Art', 'Art'); INSERT INTO TraditionalArt (art_id, art_name, art_type) VALUES (1, 'Art', 'Art', 'Art', 'Art', 'Art');",0 What was the grid placement for the Maserati that completed 14 laps?,"CREATE TABLE table_name_40 (grid VARCHAR, constructor VARCHAR, laps VARCHAR);","SELECT grid FROM table_name_40 WHERE constructor = ""maserati"" AND laps = 14;","SELECT grid FROM table_name_40 WHERE constructor = ""maserati"" AND laps = ""14"";",0 What Semimajor axis (AU) has a Mass of ≥ 3.5 ± 1.4 m⊕?,"CREATE TABLE table_name_73 (semimajor_axis___au__ VARCHAR, mass VARCHAR);","SELECT semimajor_axis___au__ FROM table_name_73 WHERE mass = ""≥ 3.5 ± 1.4 m⊕"";","SELECT semimajor_axis___au__ FROM table_name_73 WHERE mass = "" 3.5 1.4 m"";",0 Which countries have participated in defense diplomacy events but not in peacekeeping operations?,"CREATE TABLE peacekeeping_operations (id INT, country VARCHAR(255), operation VARCHAR(255)); CREATE TABLE defense_diplomacy (id INT, country VARCHAR(255), event VARCHAR(255));",SELECT ddip.country FROM defense_diplomacy ddip LEFT JOIN peacekeeping_operations pkops ON ddip.country = pkops.country WHERE pkops.country IS NULL;,SELECT p.country FROM peacekeeping_operations p JOIN defense_diplomacy d ON p.country = d.country WHERE p.operation IS NULL;,0 How many PATAs does an nForce Professional 3400 MCP have?,"CREATE TABLE table_name_38 (pata INTEGER, model VARCHAR);","SELECT SUM(pata) FROM table_name_38 WHERE model = ""nforce professional 3400 mcp"";","SELECT SUM(pata) FROM table_name_38 WHERE model = ""nforce professional 3400 mcp"";",1 What is the total number of peacekeeping operations led by countries in Asia since 2015?,"CREATE TABLE PeacekeepingOperations (id INT, country VARCHAR(50), operation_count INT, year INT); ","SELECT SUM(operation_count) FROM PeacekeepingOperations WHERE country IN ('China', 'India', 'Japan') AND year >= 2015;","SELECT country, SUM(operation_count) as total_operations FROM PeacekeepingOperations WHERE year >= 2015 AND country IN ('China', 'India', 'Japan', 'India', 'China', 'India', 'China', 'India', 'China', 'India', 'China', 'India', 'China', 'India', 'India', 'India', 'Japan', 'India', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan', 'Japan',",0 What is the total revenue from concert ticket sales in Los Angeles?,"CREATE TABLE Concerts (id INT, city VARCHAR(255), price DECIMAL(5,2), tickets_sold INT); ",SELECT SUM(price * tickets_sold) FROM Concerts WHERE city = 'Los Angeles';,SELECT SUM(price * tickets_sold) FROM Concerts WHERE city = 'Los Angeles';,1 What is the Attendance of the game with a Score of 3–2?,"CREATE TABLE table_name_59 (attendance VARCHAR, score VARCHAR);","SELECT COUNT(attendance) FROM table_name_59 WHERE score = ""3–2"";","SELECT attendance FROM table_name_59 WHERE score = ""3–2"";",0 What was the highest attendance?,CREATE TABLE table_14945608_1 (attendance INTEGER);,SELECT MAX(attendance) FROM table_14945608_1;,SELECT MAX(attendance) FROM table_14945608_1;,1 Which country had a total of 282?,"CREATE TABLE table_name_37 (country VARCHAR, total VARCHAR);",SELECT country FROM table_name_37 WHERE total = 282;,"SELECT country FROM table_name_37 WHERE total = ""282"";",0 How many wins for the Caramut team with fewer than 11 losses and fewer than 2 byes?,"CREATE TABLE table_name_48 (wins INTEGER, byes VARCHAR, losses VARCHAR, mininera_dfl VARCHAR);","SELECT MAX(wins) FROM table_name_48 WHERE losses < 11 AND mininera_dfl = ""caramut"" AND byes < 2;","SELECT SUM(wins) FROM table_name_48 WHERE losses 11 AND mininera_dfl = ""caramut"" AND byes 2;",0 Find the name of project that continues for the longest time.,"CREATE TABLE projects (name VARCHAR, hours VARCHAR);",SELECT name FROM projects ORDER BY hours DESC LIMIT 1;,SELECT name FROM projects ORDER BY hours DESC LIMIT 1;,1 Which causes received the most funding in the US?,"CREATE TABLE Donations (DonationID INT, Cause VARCHAR(50), Amount INT, Country VARCHAR(50)); ","SELECT Cause, SUM(Amount) as Total_Funding FROM Donations WHERE Country = 'USA' GROUP BY Cause ORDER BY Total_Funding DESC;","SELECT Cause, MAX(Amount) FROM Donations WHERE Country = 'USA' GROUP BY Cause;",0 Add a new safety protocol for chemical LMN to the safety_protocols table.,"CREATE TABLE safety_protocols (id INT PRIMARY KEY, chemical_name VARCHAR(100), protocol VARCHAR(500));","INSERT INTO safety_protocols (id, chemical_name, protocol) VALUES (5, 'LMN', 'Use in a well-ventilated area. Keep away from heat and open flames.');","INSERT INTO safety_protocols (id, chemical_name, protocol) VALUES (1, 'LMN', 500);",0 "List all electric vehicle charging stations in the state of New York, along with their locations.","CREATE TABLE ev_charging_stations (id INT, station_name VARCHAR(50), state VARCHAR(50), location VARCHAR(50)); ","SELECT station_name, location FROM ev_charging_stations WHERE state = 'New York';","SELECT station_name, location FROM ev_charging_stations WHERE state = 'New York';",1 What is the Datacenter for the Memory modules: hot addition Feature that has Yes listed for Itanium?,"CREATE TABLE table_name_85 (datacenter VARCHAR, itanium VARCHAR, features VARCHAR);","SELECT datacenter FROM table_name_85 WHERE itanium = ""yes"" AND features = ""memory modules: hot addition"";","SELECT datacenter FROM table_name_85 WHERE itanium = ""yes"" AND features = ""memory modules: hot addition"";",1 What is the average number of cyber threats detected per day for the last 30 days?,"CREATE TABLE cyber_threats (threat_id INT, detection_date DATE); ","SELECT AVG(DATEDIFF('2022-04-30', detection_date)/30.0) FROM cyber_threats;","SELECT AVG(COUNT(*)) FROM cyber_threats WHERE detection_date >= DATEADD(day, -30, GETDATE());",0 What is the location of the game that was friendly and resulted in 2-3?,"CREATE TABLE table_name_6 (venue VARCHAR, competition VARCHAR, result VARCHAR);","SELECT venue FROM table_name_6 WHERE competition = ""friendly"" AND result = ""2-3"";","SELECT venue FROM table_name_6 WHERE competition = ""friendly"" AND result = ""1-2"";",0 What is the total revenue generated by each genre in the music streaming platform?,"CREATE TABLE genres (genre_id INT, genre VARCHAR(255)); CREATE TABLE streams (stream_id INT, genre_id INT, revenue DECIMAL(10,2));","SELECT g.genre, SUM(s.revenue) as total_revenue FROM genres g JOIN streams s ON g.genre_id = s.genre_id GROUP BY g.genre;","SELECT g.genre, SUM(s.revenue) as total_revenue FROM genres g JOIN streams s ON g.genre_id = s.genre_id GROUP BY g.genre;",1 What is the number of products that contain fragrance and are not cruelty-free certified?,"CREATE TABLE products (product_id INT, product_name VARCHAR(255), contains_fragrance BOOLEAN, is_cruelty_free BOOLEAN);",SELECT COUNT(*) FROM products WHERE contains_fragrance = TRUE AND is_cruelty_free = FALSE;,SELECT COUNT(*) FROM products WHERE contains_fragrance = true AND is_cruelty_free = false;,0 How many are in the Labour Party of a Fianna Fail of 3 with a total higher than 9 and more than 2 in the Green Party?,"CREATE TABLE table_name_29 (labour_party INTEGER, green_party VARCHAR, fianna_fáil VARCHAR, total VARCHAR);",SELECT SUM(labour_party) FROM table_name_29 WHERE fianna_fáil = 3 AND total > 9 AND green_party > 2;,SELECT SUM(labour_party) FROM table_name_29 WHERE fianna_fáil = 3 AND total > 9 AND green_party > 2;,1 What is the production code for Episode 153 in the series?,"CREATE TABLE table_23097214_1 (production_code INTEGER, series__number VARCHAR);",SELECT MIN(production_code) FROM table_23097214_1 WHERE series__number = 153;,SELECT MAX(production_code) FROM table_23097214_1 WHERE series__number = 153;,0 What is Inaba's maximum score?,CREATE TABLE table_18595004_7 (inaba INTEGER);,SELECT MAX(inaba) FROM table_18595004_7;,SELECT MAX(inaba) FROM table_18595004_7;,1 Identify the total number of community education programs and total number of attendees for each program,"CREATE TABLE community_education_program (id INT, name VARCHAR(50), location VARCHAR(50), total_attendees INT); ","SELECT cep.name, cep.total_attendees, SUM(registration.attendees) as total_attendees_registered FROM community_education_program cep LEFT JOIN registration ON cep.id = registration.community_education_program_id GROUP BY cep.name;","SELECT name, COUNT(*) as total_programs, SUM(total_attendees) as total_attendees FROM community_education_program GROUP BY name;",0 What is the Eagle Riders character voiced by Japanese voice actor Katsuji Mori?,"CREATE TABLE table_name_27 (eagle_riders VARCHAR, japanese_voice_actor VARCHAR);","SELECT eagle_riders FROM table_name_27 WHERE japanese_voice_actor = ""katsuji mori"";","SELECT eagle_riders FROM table_name_27 WHERE japanese_voice_actor = ""katsuji mori"";",1 Who were the runners-up in the game that was won by Cork City F.C. on 10/05/1998?,"CREATE TABLE table_name_48 (runners_up VARCHAR, winners VARCHAR, date VARCHAR);","SELECT runners_up FROM table_name_48 WHERE winners = ""cork city f.c."" AND date = ""10/05/1998"";","SELECT runners_up FROM table_name_48 WHERE winners = ""cork city f.c."" AND date = ""10/05/1998"";",1 What is the total square footage of green buildings in 'California'?,"CREATE TABLE green_buildings (id INT, building_name TEXT, square_footage INT, state TEXT); ",SELECT SUM(square_footage) FROM green_buildings WHERE state = 'California';,SELECT SUM(square_footage) FROM green_buildings WHERE state = 'California';,1 How many hours were spent on esports events in total in 2020 and 2021?,"CREATE TABLE EventSessions (SessionID INT, EventID INT, Duration INT); ","SELECT SUM(Duration) FROM EventSessions INNER JOIN EsportsEvents ON EventSessions.EventID = EsportsEvents.EventID WHERE Year IN (2020, 2021);","SELECT SUM(Duration) FROM EventSessions WHERE EventID IN (2020, 2021);",0 What is the infection rate for Tuberculosis among homeless individuals in Texas in 2021?,"CREATE TABLE Infections (ID INT, Patient_ID INT, Disease VARCHAR(20), Homeless BOOLEAN, State VARCHAR(20), Date DATE); ",SELECT (COUNT(*) / (SELECT COUNT(*) FROM Infections WHERE State = 'Texas' AND YEAR(Date) = 2021)) * 100 FROM Infections WHERE Disease = 'Tuberculosis' AND Homeless = TRUE AND State = 'Texas' AND YEAR(Date) = 2021;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Infections WHERE Disease = 'Tuberculosis' AND Homeless = TRUE AND State = 'Texas')) FROM Infections WHERE Disease = 'Tuberculosis' AND State = 'Texas' AND Date BETWEEN '2021-01-01' AND '2021-12-31';,0 List the total number of pollution control initiatives by region,"CREATE TABLE pollution_control_initiatives (initiative_id INT, initiative_name TEXT, region TEXT); ",SELECT COUNT(*) FROM pollution_control_initiatives GROUP BY region;,"SELECT region, COUNT(*) FROM pollution_control_initiatives GROUP BY region;",0 What is the score at shay stadium?,"CREATE TABLE table_name_96 (score VARCHAR, venue VARCHAR);","SELECT score FROM table_name_96 WHERE venue = ""shay stadium"";","SELECT score FROM table_name_96 WHERE venue = ""shay stadium"";",1 What is the percentage of drought-affected areas in each region?,"CREATE TABLE drought_data (id INT, region VARCHAR(30), area_size INT, drought_impact INT); ","SELECT region, (drought_impact * 100.0 / area_size) as drought_percentage FROM drought_data;","SELECT region, (SUM(CASE WHEN drought_impact = 1 THEN 1 ELSE 0 END) / SUM(CASE WHEN drought_impact = 1 THEN 1 ELSE 0 END) * 100.0 / SUM(CASE WHEN drought_impact = 1 THEN 1 ELSE 0 END)) * 100.0 / SUM(CASE WHEN drought_impact = 1 THEN 1 ELSE 0 END) * 100.0 / SUM(CASE WHEN drought_impact = 1 THEN 1 ELSE 0 END) / SUM(CASE WHEN drought_impact = 1 THEN 1 ELSE 0 END) / SUM(CASE WHEN drought_impact = 1 THEN 1 ELSE 0 END) / SUM(CASE WHEN drought_impact = 1 THEN 1 ELSE 0 END) / SUM(CASE WHEN drought_impact = 1 THEN 1 ELSE 0 END) / SUM(CASE WHEN drought_impact = 1 THEN 1 ELSE 0 END) / SUM(CASE WHEN drought_impact = 1 THEN 1 ELSE 0 END) / SUM(CASE WHEN drought_impact = 1 THEN 1 ELSE 0 END) / SUM(CASE WHEN drought_impact = 1 THEN 1 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 ELSE 0 EL",0 Show the average age for male and female students.,"CREATE TABLE Student (sex VARCHAR, age INTEGER);","SELECT AVG(age), sex FROM Student GROUP BY sex;",SELECT AVG(age) FROM Student WHERE sex = 'Male' INTERSECT SELECT AVG(age) FROM Student WHERE sex = 'Female';,0 What is the grid of driver joão urbano?,"CREATE TABLE table_name_75 (grid INTEGER, driver VARCHAR);","SELECT SUM(grid) FROM table_name_75 WHERE driver = ""joão urbano"";","SELECT SUM(grid) FROM table_name_75 WHERE driver = ""joo urbano"";",0 What is the total number of registered voters in each county?,"CREATE TABLE county (name VARCHAR(255), population INT); CREATE TABLE voter (county VARCHAR(255), is_registered BOOLEAN); ","SELECT county, SUM(is_registered) FROM voter GROUP BY county;","SELECT county, SUM(population) FROM county GROUP BY county;",0 Show defense contract data for the year 2019,"CREATE TABLE defense_contracts (contract_id INT, agency VARCHAR(255), vendor VARCHAR(255), amount DECIMAL(10, 2), year INT);",SELECT * FROM defense_contracts WHERE year = 2019;,"SELECT contract_id, agency, vendor, amount FROM defense_contracts WHERE year = 2019;",0 "What is the percentage of posts with hashtags in the 'social_media' table, for users in 'North America'?","CREATE TABLE social_media(user_id INT, user_name VARCHAR(50), region VARCHAR(50), post_date DATE, hashtags BOOLEAN, likes INT);",SELECT 100.0 * SUM(hashtags) / COUNT(*) as hashtag_percentage FROM social_media WHERE region = 'North America';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM social_media WHERE region = 'North America')) AS percentage FROM social_media WHERE region = 'North America' AND hashtags = true;,0 How many economic diversification initiatives in the tourism sector were completed between January 2018 and December 2021?,"CREATE TABLE EconomicDiversification (id INT PRIMARY KEY, name VARCHAR(50), location VARCHAR(50), sector VARCHAR(20), start_date DATE, end_date DATE); ",SELECT COUNT(*) FROM EconomicDiversification WHERE start_date <= '2021-12-31' AND end_date >= '2018-01-01' AND sector = 'Tourism';,SELECT COUNT(*) FROM EconomicDiversification WHERE sector = 'Tourist' AND start_date BETWEEN '2018-01-01' AND '2021-03-31';,0 How many seasons were directed by Bryan Spicer?,"CREATE TABLE table_18481791_3 (no_in_season INTEGER, directed_by VARCHAR);","SELECT MIN(no_in_season) FROM table_18481791_3 WHERE directed_by = ""Bryan Spicer"";","SELECT MAX(no_in_season) FROM table_18481791_3 WHERE directed_by = ""Bryan Spicer"";",0 "Position of guard, and a Pick # larger than 9 is what highest round?","CREATE TABLE table_name_67 (round INTEGER, position VARCHAR, pick__number VARCHAR);","SELECT MAX(round) FROM table_name_67 WHERE position = ""guard"" AND pick__number > 9;","SELECT MAX(round) FROM table_name_67 WHERE position = ""guard"" AND pick__number > 9;",1 Which polling firm put T. Papadopoulos at 31%?,"CREATE TABLE table_name_91 (polling_firm VARCHAR, t_papadopoulos VARCHAR);","SELECT polling_firm FROM table_name_91 WHERE t_papadopoulos = ""31%"";","SELECT polling_firm FROM table_name_91 WHERE t_papadopoulos = ""31%"";",1 What was the original title of the film directed by Lene Grønlykke and Sven Grønlykke?,"CREATE TABLE table_name_72 (original_title VARCHAR, director VARCHAR);","SELECT original_title FROM table_name_72 WHERE director = ""lene grønlykke and sven grønlykke"";","SELECT original_title FROM table_name_72 WHERE director = ""lene grnlykke and sven grnlykke"";",0 What's Francis Harris' position?,"CREATE TABLE table_name_83 (position VARCHAR, name VARCHAR);","SELECT position FROM table_name_83 WHERE name = ""francis harris"";","SELECT position FROM table_name_83 WHERE name = ""francis harrison"";",0 What is the total fare collected on each day of the week?,"CREATE TABLE fares (fare_id INT, fare_date DATE, fare DECIMAL); ","SELECT DATE_FORMAT(fares.fare_date, '%W') as day_of_week, SUM(fares.fare) FROM fares GROUP BY day_of_week;","SELECT DATE_FORMAT(fare_date, '%Y-%m') as day_of_week, SUM(fare) as total_fare FROM fares GROUP BY day_of_week;",0 On the album titled “Loud” who was the other performer on the song directed by Melina Matsoukas?,"CREATE TABLE table_name_4 (other_performer_s_ VARCHAR, director_s_ VARCHAR, album VARCHAR);","SELECT other_performer_s_ FROM table_name_4 WHERE director_s_ = ""melina matsoukas"" AND album = ""loud"";","SELECT other_performer_s_ FROM table_name_4 WHERE director_s_ = ""melina matsoukas"" AND album = ""loud"";",1 What is the average pollution level per mining operation for each country?,"CREATE TABLE MiningOperation (OperationID int, OperationName varchar(50), Country varchar(50), PollutionLevel int); ","SELECT Country, AVG(PollutionLevel) as AveragePollutionLevel FROM MiningOperation GROUP BY Country;","SELECT Country, AVG(PollutionLevel) as AvgPollutionPerOperation FROM MiningOperation GROUP BY Country;",0 How many movies were released per year in the 'Animation' genre?,"CREATE TABLE MOVIES (id INT, title VARCHAR(100), release_year INT, genre VARCHAR(50)); ","SELECT release_year, COUNT(*) as num_movies FROM MOVIES WHERE genre = 'Animation' GROUP BY release_year;","SELECT release_year, COUNT(*) FROM MOVIES WHERE genre = 'Animation' GROUP BY release_year;",0 What is the average budget of horror movies?,"CREATE TABLE movies (id INT, title TEXT, budget INT, genre TEXT); ",SELECT AVG(budget) FROM movies WHERE genre = 'Horror';,SELECT AVG(budget) FROM movies WHERE genre = 'Horror';,1 What was the average rental duration for adaptive bikes in February 2022?,"CREATE TABLE bike_share (bike_id INT, bike_type VARCHAR(255), rental_start_time TIMESTAMP, rental_end_time TIMESTAMP); ","SELECT AVG(TIMESTAMPDIFF(SECOND, rental_start_time, rental_end_time)) AS avg_rental_duration FROM bike_share WHERE bike_type = 'Adaptive' AND rental_start_time >= '2022-02-01' AND rental_start_time < '2022-03-01';","SELECT AVG(DATEDIFF(day, rental_start_time, rental_end_time)) FROM bike_share WHERE bike_type = 'Adaptive' AND rental_start_time BETWEEN '2022-02-01' AND '2022-02-28';",0 What was the Save in the game that has a Loss of sanderson (6-5)?,"CREATE TABLE table_name_96 (save VARCHAR, loss VARCHAR);","SELECT save FROM table_name_96 WHERE loss = ""sanderson (6-5)"";","SELECT save FROM table_name_96 WHERE loss = ""sanderson (6-5)"";",1 Name the team for avg start being 20.5,"CREATE TABLE table_2463383_2 (team_s_ VARCHAR, avg_start VARCHAR);","SELECT team_s_ FROM table_2463383_2 WHERE avg_start = ""20.5"";","SELECT team_s_ FROM table_2463383_2 WHERE avg_start = ""20.5"";",1 Create a view for the number of visits by age group,"CREATE VIEW visit_age_group AS SELECT age, COUNT(*) AS count FROM visitor_demographics GROUP BY age;",SELECT * FROM visit_age_group;,"CREATE VIEW visit_age_group AS SELECT age, count FROM visitor_demographics GROUP BY age;",0 "Where the length is 91', what is the year built?","CREATE TABLE table_name_38 (year_built VARCHAR, length VARCHAR);","SELECT year_built FROM table_name_38 WHERE length = ""91'"";","SELECT year_built FROM table_name_38 WHERE length = ""91'"";",1 Show names of teachers and the courses they are arranged to teach.,"CREATE TABLE course_arrange (Course_ID VARCHAR, Teacher_ID VARCHAR); CREATE TABLE teacher (Name VARCHAR, Teacher_ID VARCHAR); CREATE TABLE course (Course VARCHAR, Course_ID VARCHAR);","SELECT T3.Name, T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID;","SELECT T2.Name, T2.Course FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Course_ID = T2.Teacher_ID JOIN course AS T3 ON T1.Course_ID = T3.Course_ID;",0 What is the average price of the top 5 most expensive products made from sustainable materials?,"CREATE TABLE products (product_id int, material varchar(20), price decimal(5,2)); ","SELECT AVG(price) FROM (SELECT price FROM products WHERE material in ('organic cotton', 'recycled polyester', 'sustainable silk') ORDER BY price DESC LIMIT 5) tmp;",SELECT AVG(price) FROM products WHERE material = 'Sustainable' ORDER BY price DESC LIMIT 5;,0 What is the average temperature and humidity for all crops in France in July?,"CREATE TABLE Weather (location VARCHAR(255), date DATE, temperature INT, humidity INT); CREATE TABLE Crops (id INT, location VARCHAR(255), crop_type VARCHAR(255)); ","SELECT AVG(w.temperature) AS avg_temperature, AVG(w.humidity) AS avg_humidity FROM Weather w INNER JOIN Crops c ON w.location = c.location WHERE c.crop_type IS NOT NULL AND w.date BETWEEN '2022-07-01' AND '2022-07-31' AND c.location = 'France';","SELECT AVG(Weather.temperature) as avg_temperature, AVG(Humidity) as avg_humidity FROM Weather INNER JOIN Crops ON Weather.location = Crops.location WHERE Crops.location = 'France' AND Weather.date BETWEEN '2022-07-01' AND '2022-07-30';",0 What is the total socially responsible lending for each country?,"CREATE TABLE socially_responsible_lending_data (lending_id INT, amount DECIMAL(15, 2), country VARCHAR(50)); CREATE VIEW socially_responsible_lending_view AS SELECT country, SUM(amount) as total_lending FROM socially_responsible_lending_data GROUP BY country;","SELECT country, total_lending FROM socially_responsible_lending_view;","SELECT country, SUM(total_lending) FROM socially_responsible_lending_view GROUP BY country;",0 What is the total revenue for the food truck festival?,"CREATE TABLE Events (EventID INT, EventName VARCHAR(50), EventType VARCHAR(50)); CREATE TABLE Sales (SaleID INT, EventID INT, SaleAmount DECIMAL(5,2)); ",SELECT SUM(SaleAmount) FROM Sales WHERE EventID = (SELECT EventID FROM Events WHERE EventName = 'Food Truck Festival');,SELECT SUM(SaleAmount) FROM Sales JOIN Events ON Sales.EventID = Events.EventID WHERE Events.EventType = 'Food Truck Festival';,0 What IATA has queensland as the state/territory and an ICAO of ybrk?,"CREATE TABLE table_name_30 (iata VARCHAR, state_territory VARCHAR, icao VARCHAR);","SELECT iata FROM table_name_30 WHERE state_territory = ""queensland"" AND icao = ""ybrk"";","SELECT iata FROM table_name_30 WHERE state_territory = ""queensland"" AND icao = ""ybrk"";",1 What is the bleeding time when the platelet count is decreased or unaffected?,"CREATE TABLE table_221653_1 (bleeding_time VARCHAR, platelet_count VARCHAR);","SELECT bleeding_time FROM table_221653_1 WHERE platelet_count = ""Decreased or unaffected"";","SELECT bleeding_time FROM table_221653_1 WHERE platelet_count = ""Decreased"" OR platelet_count = ""Unaffected"";",0 When was the site listed 03/31/1989 in rockingham county proposed?,"CREATE TABLE table_name_6 (proposed VARCHAR, listed VARCHAR, county VARCHAR);","SELECT proposed FROM table_name_6 WHERE listed = ""03/31/1989"" AND county = ""rockingham"";","SELECT proposed FROM table_name_6 WHERE listed = ""03/31/1989"" AND county = ""rockingham"";",1 How many tenants are there in the city of Samsun?,"CREATE TABLE table_10601843_2 (tenant VARCHAR, city VARCHAR);","SELECT COUNT(tenant) FROM table_10601843_2 WHERE city = ""Samsun"";","SELECT COUNT(tenant) FROM table_10601843_2 WHERE city = ""Samsun"";",1 What is the maximum number of crimes committed in a single day in each location type?,"CREATE TABLE Locations (LocId INT, Type VARCHAR(50)); CREATE TABLE Crimes (CrimeId INT, LocId INT, Date DATE, Time TIME);","SELECT L.Type, MAX(C.Count) FROM Locations L INNER JOIN (SELECT LocId, COUNT(*) AS Count FROM Crimes GROUP BY LocId, Date, Time) C ON L.LocId = C.LocId GROUP BY L.Type;","SELECT Locations.Type, MAX(Crimes.CrimeId) FROM Locations INNER JOIN Crimes ON Locations.LocId = Crimes.LocId GROUP BY Locations.Type;",0 What is the total number of policy violations by employees in the engineering department?,"CREATE TABLE policy_violations (id INT, employee_id INT, department VARCHAR(255), violation_count INT); ","SELECT employee_id, SUM(violation_count) as total_violations FROM policy_violations WHERE department = 'engineering' GROUP BY employee_id;",SELECT SUM(violation_count) FROM policy_violations WHERE department = 'Engineering';,0 What is the home team of the match with an attendance greater than 202?,"CREATE TABLE table_name_22 (home_team VARCHAR, attendance INTEGER);",SELECT home_team FROM table_name_22 WHERE attendance > 202;,SELECT home_team FROM table_name_22 WHERE attendance > 202;,1 What is the name of the element with a calculated value of 56?,"CREATE TABLE table_name_57 (name VARCHAR, calculated VARCHAR);","SELECT name FROM table_name_57 WHERE calculated = ""56"";","SELECT name FROM table_name_57 WHERE calculated = ""56"";",1 What is the percentage of circular economy initiatives in the waste management sector in Germany and France?',"CREATE TABLE circular_economy(country VARCHAR(20), sector VARCHAR(20), percentage DECIMAL(5,4)); ","SELECT country, AVG(percentage) FROM circular_economy WHERE country IN ('Germany', 'France') AND sector = 'Waste Management' GROUP BY country;","SELECT percentage FROM circular_economy WHERE country IN ('Germany', 'France') AND sector = 'Waste Management';",0 What is the average age of attendees for theater performances?,"CREATE TABLE events (event_id INT, event_type VARCHAR(50)); CREATE TABLE attendees (attendee_id INT, event_id INT, age INT); ",SELECT AVG(age) FROM attendees WHERE event_id IN (SELECT event_id FROM events WHERE event_type = 'Theater');,SELECT AVG(age) FROM attendees JOIN events ON attendees.event_id = events.event_id WHERE events.event_type = 'Theater';,0 "Points larger than 108, and a Wins of 0, and a Rank smaller than 8, and a Manufacturer of honda is what rider?","CREATE TABLE table_name_64 (rider VARCHAR, manufacturer VARCHAR, rank VARCHAR, points VARCHAR, wins VARCHAR);","SELECT rider FROM table_name_64 WHERE points > 108 AND wins = 0 AND rank < 8 AND manufacturer = ""honda"";","SELECT rider FROM table_name_64 WHERE points > 108 AND wins = 0 AND rank 8 AND manufacturer = ""honda"";",0 How many 'medical relief supplies' were sent to 'Africa' in the year 2022?,"CREATE TABLE continent (continent_id INT, name VARCHAR(50)); CREATE TABLE year (year_id INT, year INT); CREATE TABLE supplies (supply_id INT, type VARCHAR(50), continent_id INT, year_id INT, quantity INT); ",SELECT SUM(quantity) FROM supplies WHERE type = 'Medical' AND continent_id = 2 AND year_id = 1;,SELECT SUM(supplies.quantity) FROM supplies INNER JOIN continent ON supplies.continent_id = continent.continent_id INNER JOIN year ON supplies.year_id = year.year_id WHERE continent.name = 'Africa' AND year.year = 2022 AND supplies.type ='medical relief';,0 What is the number of military equipment failures in 2019 categorized by equipment type?,"CREATE TABLE EquipmentFailures (EquipmentType TEXT, FailureCount INT, Year INT); ","SELECT EquipmentType, FailureCount FROM EquipmentFailures WHERE Year = 2019;","SELECT EquipmentType, SUM(FailureCount) as TotalFailures FROM EquipmentFailures WHERE Year = 2019 GROUP BY EquipmentType;",0 "What is the total revenue for the ""RacingGames"" genre in the North America region?","CREATE TABLE Games (GameID INT, GameName VARCHAR(255), Genre VARCHAR(255));CREATE TABLE Players (PlayerID INT, PlayerName VARCHAR(255), GameID INT, Spend DECIMAL(10,2));CREATE VIEW Revenue AS SELECT g.Genre, c.Country, SUM(p.Spend) as TotalRevenue FROM Games g JOIN Players p ON g.GameID = p.GameID JOIN (SELECT PlayerID, Country FROM PlayerProfile GROUP BY PlayerID) c ON p.PlayerID = c.PlayerID GROUP BY g.Genre, c.Country;",SELECT TotalRevenue FROM Revenue WHERE Genre = 'RacingGames' AND Country = 'North America';,SELECT SUM(TotalRevenue) FROM Revenue JOIN Games ON Revenue.GameID = Games.GameID JOIN Players ON Revenue.PlayerID = Players.PlayerID WHERE Games.Genre = 'RacingGames' AND Players.Country = 'North America';,0 List all diversity training initiatives and their respective regions,"CREATE TABLE inclusion_efforts (effort_id INT, effort_name VARCHAR(30), region VARCHAR(20)); ","SELECT effort_name, region FROM inclusion_efforts WHERE effort_name = 'Diversity Training';","SELECT effort_name, region FROM inclusion_efforts;",0 Show total financial wellbeing of customers living in a specific region,"CREATE TABLE customers (customer_id INT, region VARCHAR(255), financial_wellbeing DECIMAL(10,2));",SELECT SUM(financial_wellbeing) FROM customers WHERE region = 'Middle East';,"SELECT region, SUM(financial_wellbeing) FROM customers GROUP BY region;",0 What was the home team when the visiting team was Toronto?,"CREATE TABLE table_name_22 (home VARCHAR, visitor VARCHAR);","SELECT home FROM table_name_22 WHERE visitor = ""toronto"";","SELECT home FROM table_name_22 WHERE visitor = ""toronto"";",1 when did the usl a-league have conference finals?,"CREATE TABLE table_name_56 (year VARCHAR, league VARCHAR, playoffs VARCHAR);","SELECT year FROM table_name_56 WHERE league = ""usl a-league"" AND playoffs = ""conference finals"";","SELECT year FROM table_name_56 WHERE league = ""usl a-league"" AND playoffs = ""conference finals"";",1 What was the record the the match against vs. calgary stampeders before week 15?,"CREATE TABLE table_name_66 (record VARCHAR, opponent VARCHAR, week VARCHAR);","SELECT record FROM table_name_66 WHERE opponent = ""vs. calgary stampeders"" AND week < 15;","SELECT record FROM table_name_66 WHERE opponent = ""vs. calgary stampeders"" AND week 15;",0 How many years have a Title of Magia Nuda?,"CREATE TABLE table_name_78 (year VARCHAR, title VARCHAR);","SELECT COUNT(year) FROM table_name_78 WHERE title = ""magia nuda"";","SELECT COUNT(year) FROM table_name_78 WHERE title = ""magia nuda"";",1 get movies with budget greater than 150 million,"CREATE TABLE movies(id INT PRIMARY KEY, name VARCHAR(255), budget INT);",SELECT name FROM movies WHERE budget > 150000000;,SELECT name FROM movies WHERE budget > 150000000;,1 What is the total for a top-10 in a masters tournament in an event smaller than 4?,"CREATE TABLE table_name_52 (top_10 VARCHAR, tournament VARCHAR, events VARCHAR);","SELECT COUNT(top_10) FROM table_name_52 WHERE tournament = ""masters tournament"" AND events < 4;","SELECT COUNT(top_10) FROM table_name_52 WHERE tournament = ""masters"" AND events 4;",0 Which year has brm v12 as the engine?,"CREATE TABLE table_name_19 (year VARCHAR, engine VARCHAR);","SELECT year FROM table_name_19 WHERE engine = ""brm v12"";","SELECT year FROM table_name_19 WHERE engine = ""brm v12"";",1 How many mental health parity violations occurred in each region in the past year?,"CREATE TABLE mental_health_parity (violation_id INT, violation_date DATE, region VARCHAR(20)); ","SELECT region, COUNT(*) as num_violations FROM mental_health_parity WHERE violation_date >= DATEADD(year, -1, CURRENT_DATE) GROUP BY region;","SELECT region, COUNT(*) FROM mental_health_parity WHERE violation_date >= DATEADD(year, -1, GETDATE()) GROUP BY region;",0 Insert a new row into the 'media_ethics' table with appropriate data,"CREATE TABLE media_ethics (ethic_id INT PRIMARY KEY, ethic_name VARCHAR(255), description TEXT, source VARCHAR(255));","INSERT INTO media_ethics (ethic_id, ethic_name, description, source) VALUES (1, 'Freedom of Speech', 'The right to express one''s ideas and opinions freely through various forms of media.', 'United Nations');","INSERT INTO media_ethics (ethic_id, ethic_name, description, source) VALUES (1, 'Male', 'Male', 'Male'), (2, 'Male', 'Male', 'Male', 'Male'), (3, 'Male', 'Male', 'Male', 'Male'), (4, 'Male', 'Male', 'Male', 'Male');",0 What is the average water waste per household in each city in 2021?,"CREATE TABLE wastewater_treatment (household_id INT, city VARCHAR(30), year INT, waste_amount FLOAT);","SELECT city, AVG(waste_amount) FROM wastewater_treatment WHERE year=2021 GROUP BY city;","SELECT city, AVG(waste_amount) FROM wastewater_treatment WHERE year = 2021 GROUP BY city;",0 WHAT SCORE HAD A LOSS AND RECORD OF 1-1?,"CREATE TABLE table_name_75 (score VARCHAR, result VARCHAR, record VARCHAR);","SELECT score FROM table_name_75 WHERE result = ""loss"" AND record = ""1-1"";","SELECT score FROM table_name_75 WHERE result = ""loss"" AND record = ""1-1"";",1 "What is Birthplace, when Ring Name is Masunoyama Tomoharu?","CREATE TABLE table_name_70 (birthplace VARCHAR, ring_name VARCHAR);","SELECT birthplace FROM table_name_70 WHERE ring_name = ""masunoyama tomoharu"";","SELECT birthplace FROM table_name_70 WHERE ring_name = ""masunoyama tomoharu"";",1 How many concerts did artist 'Taylor Swift' perform in Europe in the year 2022?,"CREATE TABLE artists (artist_id INT, artist_name VARCHAR(100)); CREATE TABLE concerts (concert_id INT, artist_id INT, concert_venue VARCHAR(100), concert_date DATE); ",SELECT COUNT(concert_id) AS num_concerts FROM concerts WHERE artist_id IN (SELECT artist_id FROM artists WHERE artist_name = 'Taylor Swift') AND YEAR(concert_date) = 2022 AND concert_venue LIKE '%Europe%';,SELECT COUNT(*) FROM concerts JOIN artists ON concerts.artist_id = artists.artist_id WHERE artists.artist_name = 'Taylor Swift' AND concerts.concert_venue = 'Europe' AND concert_date BETWEEN '2022-01-01' AND '2022-12-31';,0 "Which countries are the source of attacks on system S007, and what are their respective counts?","CREATE TABLE attacks (id INT, attack_source VARCHAR(20), system_target VARCHAR(5)); ","SELECT attack_source, COUNT(*) as count FROM attacks WHERE system_target = 'S007' GROUP BY attack_source;","SELECT attack_source, COUNT(*) FROM attacks WHERE system_target = 'S007' GROUP BY attack_source;",0 What is the total production of all tin mines in 'Country T'?,"CREATE TABLE tin_mines (id INT, name TEXT, location TEXT, production INT); ",SELECT SUM(production) FROM tin_mines WHERE location = 'Country T';,SELECT SUM(production) FROM tin_mines WHERE location = 'Country T';,1 What are the names of the vessels that docked in the Port of Miami in May 2022 and have also docked in the Port of Key West in June 2022?,"CREATE TABLE port_of_miami (vessel_name VARCHAR(255), dock_month INT); CREATE TABLE port_of_key_west (vessel_name VARCHAR(255), dock_month INT); ",SELECT m.vessel_name FROM port_of_miami m WHERE m.dock_month = 5 INTERSECT SELECT k.vessel_name FROM port_of_key_west k WHERE k.dock_month = 6;,SELECT vessel_name FROM port_of_miami WHERE dock_month BETWEEN '2022-05-01' AND '2022-06-30';,0 What are the total sales for organic products?,"CREATE TABLE if not exists sales (id INT PRIMARY KEY, product_id INT, purchase_date DATE, quantity INT, price DECIMAL(5,2)); CREATE TABLE if not exists product (id INT PRIMARY KEY, name TEXT, brand_id INT, is_organic BOOLEAN, price DECIMAL(5,2)); CREATE TABLE if not exists brand (id INT PRIMARY KEY, name TEXT, category TEXT, country TEXT); ",SELECT SUM(quantity * price) FROM sales JOIN product ON sales.product_id = product.id WHERE product.is_organic = true;,SELECT SUM(quantity * price) FROM sales JOIN product ON sales.product_id = product.id JOIN brand ON product.brand_id = brand.id WHERE is_organic = true;,0 Delete all records of chemical containers that have not been inspected in the past 6 months and are not in use.,"CREATE TABLE chemical_containers (container_id INT, container_name TEXT, last_inspection_date DATE, in_use BOOLEAN); ",DELETE FROM chemical_containers WHERE last_inspection_date IS NULL OR last_inspection_date < NOW() - INTERVAL 6 MONTH AND in_use = FALSE;,"DELETE FROM chemical_containers WHERE last_inspection_date DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) AND in_use = false;",0 "Update 'material_source' table, setting 'certified' column as 'yes' if 'sustainability_score' is greater than or equal to 80","CREATE TABLE material_source (id INT PRIMARY KEY, name VARCHAR(50), sustainability_score INT, certified VARCHAR(10)); ",UPDATE material_source SET certified = 'yes' WHERE sustainability_score >= 80;,UPDATE material_source SET certified = 'yes' WHERE sustainability_score > 80;,0 What is the success rate of rural development projects in Indonesia over the past 5 years?,"CREATE TABLE projects (project_id INT, country VARCHAR(255), start_year INT, end_year INT, success_rate FLOAT); ",SELECT AVG(success_rate) FROM projects WHERE country = 'Indonesia' AND start_year BETWEEN 2016 AND 2021;,SELECT SUM(success_rate) FROM projects WHERE country = 'Indonesia' AND start_year >= YEAR(CURRENT_DATE) - 5;,0 When was the mcdonald's lpga championship?,"CREATE TABLE table_17335602_1 (date VARCHAR, tournament VARCHAR);","SELECT date FROM table_17335602_1 WHERE tournament = ""McDonald's LPGA Championship"";","SELECT date FROM table_17335602_1 WHERE tournament = ""McDonald's LPG Championship"";",0 Get the number of unique games played by each player in the 'PlayerGames' table,"CREATE TABLE PlayerGames (PlayerID INT, GameID INT, GameWon BOOLEAN); CREATE TABLE Games (GameID INT, GameName VARCHAR(255)); ","SELECT PlayerID, COUNT(DISTINCT GameID) as UniqueGamesPlayed FROM PlayerGames GROUP BY PlayerID;","SELECT p.PlayerID, COUNT(DISTINCT g.GameName) as UniqueGamesPlayed FROM PlayerGames p JOIN Games g ON p.GameID = g.GameID GROUP BY p.PlayerID;",0 what is the drawn when the won is 12?,"CREATE TABLE table_12828723_4 (drawn VARCHAR, won VARCHAR);","SELECT drawn FROM table_12828723_4 WHERE won = ""12"";",SELECT drawn FROM table_12828723_4 WHERE won = 12;,0 What is the sum of sales for products with a circular supply chain in Washington?,"CREATE TABLE vendors (vendor_id INT, vendor_name VARCHAR(50), state VARCHAR(50), circular_supply BOOLEAN); CREATE TABLE sales (sale_id INT, product_id INT, vendor_id INT, sale_amount DECIMAL(5,2)); ",SELECT SUM(sale_amount) FROM sales JOIN vendors ON sales.vendor_id = vendors.vendor_id WHERE vendors.circular_supply = true AND vendors.state = 'Washington';,SELECT SUM(sale_amount) FROM sales JOIN vendors ON sales.vendor_id = vendors.vendor_id WHERE vendors.circular_supply = TRUE AND vendors.state = 'Washington';,0 Album of les mots had what lowest year?,"CREATE TABLE table_name_18 (year INTEGER, album VARCHAR);","SELECT MIN(year) FROM table_name_18 WHERE album = ""les mots"";","SELECT MIN(year) FROM table_name_18 WHERE album = ""les mots"";",1 Name the director for coup de torchon,"CREATE TABLE table_18987377_1 (director VARCHAR, film_title_used_in_nomination VARCHAR);","SELECT director FROM table_18987377_1 WHERE film_title_used_in_nomination = ""Coup de Torchon"";","SELECT director FROM table_18987377_1 WHERE film_title_used_in_nomination = ""Coup de Tortoise"";",0 What is the difference in ocean health metrics between aquaculture sites with organic and non-organic certifications?,"CREATE TABLE ocean_health_metrics (site_id INT, certification VARCHAR(50), metric_name VARCHAR(50), value FLOAT); ","SELECT certification, metric_name, AVG(value) AS avg_value FROM ocean_health_metrics GROUP BY certification, metric_name ORDER BY certification;","SELECT certification, SUM(value) as total_value FROM ocean_health_metrics GROUP BY certification;",0 "How many people enrolled a the school with an IHSAA Class of a, and the trojans as their mascot?","CREATE TABLE table_name_73 (enrollment INTEGER, ihsaa_class VARCHAR, mascot VARCHAR);","SELECT MIN(enrollment) FROM table_name_73 WHERE ihsaa_class = ""a"" AND mascot = ""trojans"";","SELECT SUM(enrollment) FROM table_name_73 WHERE ihsaa_class = ""a"" AND mascot = ""trojans"";",0 What is the daily revenue trend for cultural heritage tours in Africa?,"CREATE TABLE revenue_trend (date TEXT, region TEXT, revenue FLOAT); ","SELECT date, revenue, LAG(revenue, 1) OVER (ORDER BY date) AS previous_day_revenue FROM revenue_trend WHERE region = 'Africa';","SELECT date, revenue FROM revenue_trend WHERE region = 'Africa';",0 what is гә гә [ɡʷ] when ҕь ҕь [ʁʲ/ɣʲ] is ҭә ҭә [tʷʰ]?,"CREATE TABLE table_202365_2 (гә_гә_ VARCHAR, ɡʷ VARCHAR, ҕь_ҕь_ VARCHAR, ʁʲ_ɣʲ VARCHAR);","SELECT гә_гә_[ɡʷ] FROM table_202365_2 WHERE ҕь_ҕь_[ʁʲ_ɣʲ] = ""Ҭә ҭә [tʷʰ]"";","SELECT __[w] FROM table_202365_2 WHERE __[j/j] = "" [twh]"";",0 "On what Surface was the match with a Score of 6–4, 6–3 and Runner-up Outcome played?","CREATE TABLE table_name_30 (surface VARCHAR, outcome VARCHAR, score VARCHAR);","SELECT surface FROM table_name_30 WHERE outcome = ""runner-up"" AND score = ""6–4, 6–3"";","SELECT surface FROM table_name_30 WHERE outcome = ""runner-up"" AND score = ""6–4, 6–3"";",1 What was the total weight of shipments from China to the USA in Q3 2021?,"CREATE TABLE Shipments (id INT, source VARCHAR(50), destination VARCHAR(50), weight FLOAT, ship_date DATE); ",SELECT SUM(weight) FROM Shipments WHERE source = 'China' AND destination = 'USA' AND ship_date BETWEEN '2021-07-01' AND '2021-09-30';,SELECT SUM(weight) FROM Shipments WHERE source = 'China' AND destination = 'USA' AND ship_date BETWEEN '2021-04-01' AND '2021-06-30';,0 What was T3 player Lee Janzen's score?,"CREATE TABLE table_name_1 (score INTEGER, place VARCHAR, player VARCHAR);","SELECT MIN(score) FROM table_name_1 WHERE place = ""t3"" AND player = ""lee janzen"";","SELECT SUM(score) FROM table_name_1 WHERE place = ""t3"" AND player = ""lee janzen"";",0 What year did the Cosworth v8 engine participate in?,"CREATE TABLE table_name_37 (year INTEGER, engine VARCHAR);","SELECT AVG(year) FROM table_name_37 WHERE engine = ""cosworth v8"";","SELECT SUM(year) FROM table_name_37 WHERE engine = ""cosworth v8"";",0 What is the average age of vessels in the fleet_management table?,"CREATE TABLE fleet_management (vessel_id INT, vessel_name VARCHAR(50), launch_date DATE); ","SELECT AVG(DATEDIFF(CURDATE(), launch_date) / 365.25) FROM fleet_management;","SELECT AVG(DATEDIFF('2022-01-01', launch_date)) FROM fleet_management;",0 "How many ranks have $1,084,439,099 as the worldwide gross?","CREATE TABLE table_name_91 (rank INTEGER, worldwide_gross VARCHAR);","SELECT SUM(rank) FROM table_name_91 WHERE worldwide_gross = ""$1,084,439,099"";","SELECT SUM(rank) FROM table_name_91 WHERE worldwide_gross = ""$1,084,439,099"";",1 What is the percentage of fans that are female in each age group?,"CREATE TABLE FanDemographics (FanID INT, Age INT, Gender VARCHAR(10)); ","SELECT Age, Gender, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM FanDemographics) AS Percentage FROM FanDemographics GROUP BY Age, Gender;","SELECT Age, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM FanDemographics WHERE Gender = 'Female') AS Percentage FROM FanDemographics WHERE Gender = 'Female' GROUP BY Age;",0 How many games won for teams with 49 tries against?,"CREATE TABLE table_15467476_3 (won VARCHAR, tries_against VARCHAR);","SELECT won FROM table_15467476_3 WHERE tries_against = ""49"";","SELECT won FROM table_15467476_3 WHERE tries_against = ""49"";",1 What is the total waste generation by business type in Mumbai?,"CREATE TABLE waste_generation_mumbai (business_type VARCHAR(50), waste_amount INT); ","SELECT business_type, SUM(waste_amount) FROM waste_generation_mumbai WHERE business_type IN ('Restaurant', 'Retail', 'Office') GROUP BY business_type;","SELECT business_type, SUM(waste_amount) FROM waste_generation_mumbai GROUP BY business_type;",0 What is the average salary of baseball players from the US?,"CREATE TABLE players (id INT, name VARCHAR(50), age INT, gender VARCHAR(10), sport VARCHAR(20), salary INT, country VARCHAR(50));",SELECT AVG(salary) FROM players WHERE sport = 'Baseball' AND country = 'USA';,SELECT AVG(salary) FROM players WHERE sport = 'Baseball' AND country = 'USA';,1 What is the total capacity of all landfills in Japan?,"CREATE TABLE landfills (name TEXT, country TEXT, capacity INTEGER); ",SELECT SUM(capacity) FROM landfills WHERE country = 'Japan';,SELECT SUM(capacity) FROM landfills WHERE country = 'Japan';,1 "Compute the average score-price for each regulator in the Midwest and their associated producers' prices, using a full outer join.","CREATE TABLE regulators (id INT PRIMARY KEY, name TEXT, region TEXT, compliance_score INT); CREATE TABLE producers (id INT PRIMARY KEY, name TEXT, region TEXT, product TEXT, quantity INT, price FLOAT); ","SELECT producers.name, regulators.name, AVG(producers.price * regulators.compliance_score) as avg_score_price FROM producers FULL OUTER JOIN regulators ON producers.region = regulators.region GROUP BY producers.name, regulators.name;","SELECT regulators.name, AVG(regulations.compliance_score) as avg_score_price, producers.price FROM regulators INNER JOIN producers ON regulators.region = producers.region WHERE regulators.region = 'Midwest' GROUP BY regulators.name;",0 How many research grants were awarded to faculty members in the School of Engineering in 2020?,"CREATE TABLE research_grants (id INT, year INT, faculty_name VARCHAR(50), faculty_department VARCHAR(50)); ",SELECT COUNT(*) FROM research_grants WHERE faculty_department LIKE '%Engineering%' AND year = 2020;,SELECT COUNT(*) FROM research_grants WHERE year = 2020 AND faculty_department = 'School of Engineering';,0 What are the top 2 countries with the least number of ethical AI principles?,"CREATE TABLE EthicalAI (country VARCHAR(20), num_principles INT); ","SELECT country, num_principles FROM (SELECT country, num_principles FROM EthicalAI ORDER BY num_principles LIMIT 2) AS subquery ORDER BY num_principles DESC;","SELECT country, num_principles FROM EthicalAI ORDER BY num_principles DESC LIMIT 2;",0 "What's the attendance for the game held on January 2, 2005?","CREATE TABLE table_name_28 (attendance VARCHAR, date VARCHAR);","SELECT attendance FROM table_name_28 WHERE date = ""january 2, 2005"";","SELECT attendance FROM table_name_28 WHERE date = ""january 2, 2005"";",1 What is the total waste generated by the industrial sector in London and the recycling rate of this sector?,"CREATE TABLE waste_generation (id INT, sector VARCHAR(20), location VARCHAR(20), amount DECIMAL(10,2), date DATE); CREATE TABLE recycling_rates (id INT, sector VARCHAR(20), location VARCHAR(20), rate DECIMAL(10,2));","SELECT SUM(waste_generation.amount), recycling_rates.rate FROM waste_generation INNER JOIN recycling_rates ON waste_generation.sector = recycling_rates.sector WHERE waste_generation.sector = 'industrial' AND waste_generation.location = 'London';","SELECT SUM(waste_generation.amount) AS total_waste, SUM(recycling_rates.rate) AS rate FROM waste_generation INNER JOIN recycling_rates ON waste_generation.sector = recycling_rates.sector WHERE waste_generation.location = 'London';",0 Which player was a running back from San Jose State?,"CREATE TABLE table_name_94 (player VARCHAR, position VARCHAR, college VARCHAR);","SELECT player FROM table_name_94 WHERE position = ""running back"" AND college = ""san jose state"";","SELECT player FROM table_name_94 WHERE position = ""running back"" AND college = ""san jose state"";",1 How many properties are there in each city in the database?,"CREATE TABLE properties (property_id INT, city VARCHAR(50)); ","SELECT city, COUNT(*) FROM properties GROUP BY city;","SELECT city, COUNT(*) FROM properties GROUP BY city;",1 What was the score when the Vikings won the championship at Namyangju Stadium?,"CREATE TABLE table_name_86 (score VARCHAR, champion VARCHAR, stadium VARCHAR);","SELECT score FROM table_name_86 WHERE champion = ""vikings"" AND stadium = ""namyangju stadium"";","SELECT score FROM table_name_86 WHERE champion = ""vikings"" AND stadium = ""namyangju stadium"";",1 Which astrological sign has the Latin motto of Vita?,"CREATE TABLE table_name_21 (sign VARCHAR, latin_motto VARCHAR);","SELECT sign FROM table_name_21 WHERE latin_motto = ""vita"";","SELECT sign FROM table_name_21 WHERE latin_motto = ""vita"";",1 What tournament had a winning score of –9 (69-71-67=207)?,"CREATE TABLE table_name_72 (tournament VARCHAR, winning_score VARCHAR);",SELECT tournament FROM table_name_72 WHERE winning_score = –9(69 - 71 - 67 = 207);,SELECT tournament FROM table_name_72 WHERE winning_score = –9(69 - 71 - 67 = 207);,1 Who composed the work conducted by jaroslav Vogel? ,"CREATE TABLE table_24521345_1 (composer VARCHAR, conductor VARCHAR);","SELECT composer FROM table_24521345_1 WHERE conductor = ""Jaroslav Vogel"";","SELECT composer FROM table_24521345_1 WHERE conductor = ""Jaroslav Vogel"";",1 "Which countries have the highest total donation amounts for the year 2021, excluding the United States?","CREATE TABLE Donations (id INT, donor_name VARCHAR(255), donation_amount DECIMAL(10,2), donation_date DATE, country VARCHAR(255)); ","SELECT country, SUM(donation_amount) as total_donations FROM Donations WHERE country != 'USA' AND donation_date >= '2021-01-01' AND donation_date < '2022-01-01' GROUP BY country ORDER BY total_donations DESC LIMIT 1;","SELECT country, SUM(donation_amount) as total_donations FROM Donations WHERE YEAR(donation_date) = 2021 AND country!= 'United States' GROUP BY country ORDER BY total_donations DESC LIMIT 1;",0 Insert a new record for 'Bamboo Viscose' with a water consumption reduction of '50%' into the 'sustainability_metrics' table,"CREATE TABLE sustainability_metrics (id INT PRIMARY KEY, fabric VARCHAR(50), water_reduction DECIMAL(3,2));","INSERT INTO sustainability_metrics (id, fabric, water_reduction) VALUES (2, 'Bamboo Viscose', 0.50);","INSERT INTO sustainability_metrics (fabric, water_reduction) VALUES ('Bamboo Viscose', '50%');",0 "When a team wins 4, how much is the Maximum amount of points?","CREATE TABLE table_14889048_2 (points INTEGER, wins VARCHAR);",SELECT MAX(points) FROM table_14889048_2 WHERE wins = 4;,SELECT MAX(points) FROM table_14889048_2 WHERE wins = 4;,1 How many military equipment sales were made to Germany?,"CREATE TABLE military_sales(sale_id INT, equipment_name VARCHAR(50), sale_country VARCHAR(50)); ",SELECT COUNT(*) FROM military_sales WHERE sale_country = 'Germany';,SELECT COUNT(*) FROM military_sales WHERE sale_country = 'Germany';,1 "What is Directed By, when Episode # is 7?","CREATE TABLE table_name_18 (directed_by VARCHAR, episode__number VARCHAR);",SELECT directed_by FROM table_name_18 WHERE episode__number = 7;,SELECT directed_by FROM table_name_18 WHERE episode__number = 7;,1 What is the total revenue from sustainable clothing lines in the last fiscal year?,"CREATE TABLE Sales_Data (Sale_Date DATE, Product_Line TEXT, Revenue INT); ",SELECT SUM(Revenue) FROM Sales_Data WHERE Product_Line = 'Sustainable Line' AND Sale_Date BETWEEN '2021-04-01' AND '2022-03-31';,"SELECT SUM(Revenue) FROM Sales_Data WHERE Product_Line LIKE '%Sustainable%' AND Sale_Date >= DATEADD(year, -1, GETDATE());",0 What is the average weight of containers shipped from the Port of Kolkata to India in 2019?,"CREATE TABLE ports (port_id INT, port_name TEXT, country TEXT);CREATE TABLE shipments (shipment_id INT, shipment_weight INT, ship_date DATE, port_id INT); ","SELECT AVG(shipment_weight) FROM shipments JOIN ports ON shipments.port_id = ports.port_id WHERE ports.country = 'India' AND ports.port_name IN ('Port of Kolkata', 'Port of Chennai') AND ship_date BETWEEN '2019-01-01' AND '2019-12-31';",SELECT AVG(shipment_weight) FROM shipments JOIN ports ON shipments.port_id = ports.port_id WHERE ports.port_name = 'Port of Kolkata' AND ports.country = 'India' AND ship_date BETWEEN '2019-01-01' AND '2019-12-31';,0 "What is the average salary of software engineers in the ""tech_company"" database, excluding those who earn more than $200,000?","CREATE TABLE employees (id INT, name VARCHAR(50), department VARCHAR(50), salary DECIMAL(10,2)); ",SELECT AVG(salary) FROM employees WHERE department = 'Software Engineer' AND salary < 200000.00;,SELECT AVG(salary) FROM employees WHERE department = 'Software Engineers' AND salary > 200000;,0 What is the total mass of space debris collected by different missions?,"CREATE TABLE space_debris (id INT, mission_name VARCHAR(255), mass FLOAT, PRIMARY KEY(id)); ",SELECT SUM(space_debris.mass) FROM space_debris GROUP BY mission_name;,"SELECT mission_name, SUM(mass) FROM space_debris GROUP BY mission_name;",0 "what is the league goals when the fa cup goals is higher than 0, the fa cup apps is 2 and the league apps is 45?","CREATE TABLE table_name_50 (league_goals VARCHAR, league_apps VARCHAR, fa_cup_goals VARCHAR, fa_cup_apps VARCHAR);","SELECT league_goals FROM table_name_50 WHERE fa_cup_goals > 0 AND fa_cup_apps = ""2"" AND league_apps = ""45"";",SELECT league_goals FROM table_name_50 WHERE fa_cup_goals > 0 AND fa_cup_apps = 2 AND league_apps = 45;,0 What is the title for YI?,"CREATE TABLE table_name_45 (title VARCHAR, name VARCHAR);","SELECT title FROM table_name_45 WHERE name = ""yi"";","SELECT title FROM table_name_45 WHERE name = ""yi"";",1 What is the score when watford was the away team?,"CREATE TABLE table_name_59 (score VARCHAR, away_team VARCHAR);","SELECT score FROM table_name_59 WHERE away_team = ""watford"";","SELECT score FROM table_name_59 WHERE away_team = ""watford"";",1 What was the total To Par for the winner in 1995?,"CREATE TABLE table_name_26 (to_par VARCHAR, year_s__won VARCHAR);","SELECT COUNT(to_par) FROM table_name_26 WHERE year_s__won = ""1995"";","SELECT COUNT(to_par) FROM table_name_26 WHERE year_s__won = ""1995"";",1 "What was the Attendance on october 2, 1977?","CREATE TABLE table_name_48 (attendance VARCHAR, date VARCHAR);","SELECT attendance FROM table_name_48 WHERE date = ""october 2, 1977"";","SELECT attendance FROM table_name_48 WHERE date = ""october 2, 1977"";",1 What is the distribution of fan demographics (age and gender) for each team's athlete wellbeing program?,"CREATE TABLE fan_demographics (fan_id INT, team_id INT, age INT, gender VARCHAR(10)); CREATE TABLE teams (team_id INT, team_name VARCHAR(255), sport_id INT); ","SELECT t.team_name, f.gender, f.age, COUNT(f.fan_id) as fan_count FROM fan_demographics f JOIN teams t ON f.team_id = t.team_id GROUP BY t.team_name, f.gender, f.age ORDER BY t.team_name, f.gender, f.age;","SELECT t.team_name, f.age, f.gender, COUNT(f.fan_id) as num_fans FROM fan_demographics f JOIN teams t ON f.team_id = t.team_id GROUP BY t.team_name, f.age, f.gender;",0 What are the top 3 genres listened to in the US?,"CREATE TABLE streaming (user_id INT, song_id INT, genre VARCHAR(20), country VARCHAR(10)); ","SELECT genre, COUNT(*) as count FROM streaming WHERE country = 'US' GROUP BY genre ORDER BY count DESC LIMIT 3;","SELECT genre, COUNT(*) as num_genres FROM streaming WHERE country = 'USA' GROUP BY genre ORDER BY num_genres DESC LIMIT 3;",0 Determine the most popular menu item by revenue for the 'Gourmet Greens' restaurant in the past month.,"CREATE TABLE revenue (restaurant_id INT, date DATE, menu_item VARCHAR(50), revenue INT); ","SELECT menu_item, SUM(revenue) as total_revenue FROM revenue WHERE restaurant_id = 7 AND MONTH(date) = 5 GROUP BY menu_item ORDER BY total_revenue DESC LIMIT 1;","SELECT menu_item, SUM(revenue) as total_revenue FROM revenue WHERE restaurant_id = 1 AND date >= DATEADD(month, -1, GETDATE()) GROUP BY menu_item ORDER BY total_revenue DESC LIMIT 1;",0 What is the average amount donated by each donor in the last year?,"CREATE TABLE Donors (donor_id INT, donor_name VARCHAR(50), donation_date DATE, amount INT); ","SELECT donor_name, AVG(amount) AS Avg_Donation FROM Donors D WHERE donation_date >= DATE(NOW()) - INTERVAL 1 YEAR GROUP BY donor_name","SELECT donor_name, AVG(amount) as avg_donation FROM Donors WHERE donation_date >= DATEADD(year, -1, GETDATE()) GROUP BY donor_name;",0 What is the average capacity utilization of nonprofits focused on health in the US?,"CREATE TABLE facilities (facility_id INT, facility_name TEXT, capacity INT, location TEXT); CREATE TABLE nonprofits (nonprofit_id INT, nonprofit_name TEXT, sector TEXT); CREATE TABLE nonprofit_facilities (nonprofit_id INT, facility_id INT); ",SELECT AVG(f.capacity / count(*)) as avg_capacity_utilization FROM facilities f JOIN nonprofit_facilities nf ON f.facility_id = nf.facility_id JOIN nonprofits n ON nf.nonprofit_id = n.nonprofit_id WHERE n.sector = 'health';,SELECT AVG(capacity) FROM facilities INNER JOIN nonprofit_facilities ON facilities.facility_id = nonprofit_facilities.facility_id INNER JOIN nonprofits ON nonprofit_facilities.nonprofit_id = nonprofits.nonprofit_id WHERE nonprofits.sector = 'Health' AND facilities.location = 'US';,0 What is the maximum budget allocated for military technology projects in the Pacific region?,"CREATE TABLE military_technology_projects (id INT, project_name VARCHAR(255), budget DECIMAL(10,2), region VARCHAR(255)); ",SELECT MAX(budget) FROM military_technology_projects WHERE region = 'Pacific';,SELECT MAX(budget) FROM military_technology_projects WHERE region = 'Pacific';,1 What is the Circuit in the ATCC Round 1 Series with Winner Jim Richards?,"CREATE TABLE table_name_34 (circuit VARCHAR, winner VARCHAR, series VARCHAR);","SELECT circuit FROM table_name_34 WHERE winner = ""jim richards"" AND series = ""atcc round 1"";","SELECT circuit FROM table_name_34 WHERE winner = ""jim richards"" AND series = ""atcc round 1"";",1 What is the IATA for Gatwick airport?,"CREATE TABLE table_name_79 (iata VARCHAR, airport VARCHAR);","SELECT iata FROM table_name_79 WHERE airport = ""gatwick airport"";","SELECT iata FROM table_name_79 WHERE airport = ""gatwick airport"";",1 "WHAT IS THE LOWEST $25-1/4 OZ COIN WITH A $10-1/10 OZ OF $70,250?","CREATE TABLE table_name_57 (MIN VARCHAR, $10___1_10_oz VARCHAR);","SELECT MIN AS $25___1_4_oz FROM table_name_57 WHERE $10___1_10_oz = ""70,250"";","SELECT MIN FROM table_name_57 WHERE $10___1_10_oz = ""70,250"";",0 Who was the star for the Vara network?,"CREATE TABLE table_name_61 (starring VARCHAR, network VARCHAR);","SELECT starring FROM table_name_61 WHERE network = ""vara"";","SELECT starring FROM table_name_61 WHERE network = ""vara"";",1 Find the difference between the number of records in the public.voting_records and public.absentee_voting tables?,CREATE TABLE public.voting_records (voter_id integer); CREATE TABLE public.absentee_voting (voter_id integer); ,SELECT COUNT(*) FROM public.voting_records EXCEPT SELECT COUNT(*) FROM public.absentee_voting;,SELECT COUNT(*) FROM public.voting_records JOIN public.absentee_voting ON public.voting_records.voter_id = public.absentee_voting.voter_id;,0 Find the number of aircraft with more than 10000 flight hours for each airline?,"CREATE TABLE Aircraft (id INT, tail_number VARCHAR(20), model VARCHAR(100), airline VARCHAR(100), flight_hours DECIMAL(10,2)); ","SELECT airline, COUNT(*) OVER (PARTITION BY airline) as count FROM Aircraft WHERE flight_hours > 10000;","SELECT airline, COUNT(*) FROM Aircraft WHERE flight_hours > 10000 GROUP BY airline;",0 How long does track Fast As a Shark has?,"CREATE TABLE tracks (milliseconds VARCHAR, name VARCHAR);","SELECT milliseconds FROM tracks WHERE name = ""Fast As a Shark"";","SELECT milliseconds FROM tracks WHERE name = ""Fast As a Shark"";",1 Calculate the percentage of sustainable materials used in production for each product category,"CREATE TABLE sustainable_materials (sustainable_material_id INT, sustainable_material_name VARCHAR(255), product_category VARCHAR(255)); CREATE TABLE production (production_id INT, product_id INT, sustainable_material_id INT, production_quantity INT); ","SELECT product_category, SUM(production_quantity) as total_production_quantity, SUM(CASE WHEN sustainable_material_id IS NOT NULL THEN production_quantity ELSE 0 END) as sustainable_production_quantity, (SUM(CASE WHEN sustainable_material_id IS NOT NULL THEN production_quantity ELSE 0 END) / SUM(production_quantity)) * 100 as sustainable_percentage FROM production JOIN sustainable_materials ON production.sustainable_material_id = sustainable_materials.sustainable_material_id GROUP BY product_category;","SELECT product_category, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM production)) AS percentage FROM production JOIN sustainable_materials ON production.sustainable_material_id = sustainable_materials.sustainable_material_id GROUP BY product_category;",0 Find the number of new attendees by month for art classes in 2021,"CREATE TABLE art_classes (id INT, attendee_id INT, class_month DATE);","SELECT EXTRACT(MONTH FROM class_month) AS month, COUNT(DISTINCT attendee_id) AS new_attendees FROM art_classes WHERE EXTRACT(YEAR FROM class_month) = 2021 GROUP BY month ORDER BY month;","SELECT EXTRACT(MONTH FROM class_month) AS month, COUNT(DISTINCT attendee_id) AS new_attendees FROM art_classes WHERE EXTRACT(YEAR FROM class_month) = 2021 GROUP BY month;",0 Delete records related to 'China' from the 'ev_adoption_statistics' table,"CREATE TABLE ev_adoption_statistics (id INT, country_name VARCHAR(50), adoption_rate INT);",DELETE FROM ev_adoption_statistics WHERE country_name = 'China';,DELETE FROM ev_adoption_statistics WHERE country_name = 'China';,1 Name the least top 5,CREATE TABLE table_1671401_1 (top_5 INTEGER);,SELECT MIN(top_5) FROM table_1671401_1;,SELECT MIN(top_5) FROM table_1671401_1;,1 What is the average cruelty-free rating for cosmetic brands?,"CREATE TABLE brand_cruelty_rating (brand_name VARCHAR(100), cruelty_free_rating DECIMAL(3,2)); ",SELECT AVG(cruelty_free_rating) FROM brand_cruelty_rating WHERE is_cruelty_free = true;,SELECT AVG(cruelty_free_rating) FROM brand_cruelty_rating;,0 Which ocean floor maps have been created more than once on the same day?,"CREATE TABLE OceanFloorMapping (id INT PRIMARY KEY, MapName VARCHAR(100), MapDetails TEXT, MapDate DATE); ","SELECT MapName, COUNT(*) as NumberOfMaps FROM OceanFloorMapping GROUP BY MapName HAVING SUM(CASE WHEN COUNT(*) > 1 THEN 1 ELSE 0 END) > 0;","SELECT MapName FROM OceanFloorMapping WHERE MapDate >= DATEADD(day, -1, GETDATE()) GROUP BY MapName HAVING COUNT(*) > 1;",0 What episode had a run time of 24:18?,"CREATE TABLE table_2101431_1 (episode VARCHAR, run_time VARCHAR);","SELECT episode FROM table_2101431_1 WHERE run_time = ""24:18"";","SELECT episode FROM table_2101431_1 WHERE run_time = ""24:18"";",1 What is the total number of clients for each investment strategy?,"CREATE TABLE investment_strategies (strategy_id INT, strategy_name VARCHAR(50), client_id INT); ","SELECT strategy_name, COUNT(DISTINCT client_id) AS total_clients FROM investment_strategies GROUP BY strategy_name;","SELECT strategy_name, COUNT(*) FROM investment_strategies GROUP BY strategy_name;",0 Which state has a royal house of Jiang?,"CREATE TABLE table_name_5 (state VARCHAR, royal_house VARCHAR);","SELECT state FROM table_name_5 WHERE royal_house = ""jiang"";","SELECT state FROM table_name_5 WHERE royal_house = ""jiang"";",1 "What is the number of career caps for a full back, when tour Apps is smaller than 29?","CREATE TABLE table_name_78 (career_caps VARCHAR, position VARCHAR, tour_apps VARCHAR);","SELECT COUNT(career_caps) FROM table_name_78 WHERE position = ""full back"" AND tour_apps < 29;","SELECT career_caps FROM table_name_78 WHERE position = ""full back"" AND tour_apps 29;",0 Which beauty products have a rating above 4.5 and a sustainability score above 85?,"CREATE TABLE ProductDetails (product VARCHAR(255), rating FLOAT, sustainability_score INT);",SELECT product FROM ProductDetails WHERE rating > 4.5 AND sustainability_score > 85;,SELECT product FROM ProductDetails WHERE rating > 4.5 AND sustainability_score > 85;,1 What is the to par of Al Mengert of the United States?,"CREATE TABLE table_name_73 (to_par VARCHAR, country VARCHAR, player VARCHAR);","SELECT to_par FROM table_name_73 WHERE country = ""united states"" AND player = ""al mengert"";","SELECT to_par FROM table_name_73 WHERE country = ""united states"" AND player = ""al lotert"";",0 What are the mental health scores of students who attended 'Open Pedagogy' course?,"CREATE TABLE student_mental_health (student_id INT, mental_health_score INT, attended_course VARCHAR(30)); CREATE TABLE course_attendance (student_id INT, course_name VARCHAR(30)); CREATE VIEW student_course_view AS SELECT s.student_id, s.mental_health_score, c.course_name FROM student_mental_health s JOIN course_attendance c ON s.student_id = c.student_id;",SELECT mental_health_score FROM student_course_view WHERE course_name = 'Open Pedagogy';,SELECT s.mental_health_score FROM student_course_view s JOIN student_mental_health s ON s.student_id = s.student_id WHERE s.attended_course = 'Open Pedagogy';,0 Which Year that has Notes of dnf?,"CREATE TABLE table_name_17 (year INTEGER, notes VARCHAR);","SELECT MIN(year) FROM table_name_17 WHERE notes = ""dnf"";","SELECT SUM(year) FROM table_name_17 WHERE notes = ""dnf"";",0 For how many fish species has feed been provided in the Arctic region with a dissolved oxygen level greater than 8?,"CREATE TABLE Feed (FeedID INT, StockID INT, FeedType VARCHAR(50), Quantity INT, FeedDate DATE, Location VARCHAR(50), DissolvedOxygen FLOAT); ",SELECT COUNT(DISTINCT Species) FROM FishStock fs JOIN Feed f ON fs.StockID = f.StockID WHERE f.Location = 'Arctic' AND f.DissolvedOxygen > 8;,SELECT COUNT(*) FROM Feed WHERE FeedType = 'Fish' AND Location = 'Arctic' AND DissolvedOxygen > 8;,0 What is the number of teachers who have attended professional development sessions in each subject area by race?,"CREATE TABLE teacher_development_race (teacher_id INT, race VARCHAR(255), subject_area VARCHAR(255), sessions_attended INT); ","SELECT race, subject_area, SUM(sessions_attended) as total_sessions_attended FROM teacher_development_race GROUP BY race, subject_area;","SELECT race, subject_area, SUM(sessions_attended) FROM teacher_development_race GROUP BY race, subject_area;",0 Get the number of electric and autonomous vehicles for each company.,"CREATE TABLE AutonomousVehicles (id INT, company VARCHAR(20), vehicle_type VARCHAR(20), num_vehicles INT); CREATE TABLE ElectricVehicles (id INT, company VARCHAR(20), vehicle_type VARCHAR(20), num_vehicles INT); ","SELECT company, num_vehicles FROM AutonomousVehicles WHERE vehicle_type = 'Self-Driving Car' INTERSECT SELECT company, num_vehicles FROM ElectricVehicles WHERE vehicle_type = 'EV';","SELECT company, SUM(num_vehicles) as total_vehicles FROM ElectricVehicles GROUP BY company;",0 Delete records from the 'resource_depletion' table for 'Iron' in the 'Brazil' region,"CREATE TABLE resource_depletion (resource VARCHAR(20), depletion_rate DECIMAL(5,2), region VARCHAR(20));",DELETE FROM resource_depletion WHERE resource = 'Iron' AND region = 'Brazil';,DELETE FROM resource_depletion WHERE resource = 'Iron' AND region = 'Brazil';,1 List the marine protected areas in the 'Marine Protected Areas' table.,"CREATE TABLE marine_protected_areas (id INT, area_name VARCHAR(255), location VARCHAR(255), size FLOAT, conservation_status TEXT);",SELECT area_name FROM marine_protected_areas;,SELECT area_name FROM marine_protected_areas;,1 Which Australian has British of ɒs?,"CREATE TABLE table_name_61 (australian VARCHAR, british VARCHAR);","SELECT australian FROM table_name_61 WHERE british = ""ɒs"";","SELECT australian FROM table_name_61 WHERE british = ""s"";",0 "What is the venue of the competition ""1994 FIFA World Cup qualification"" hosted by ""Nanjing ( Jiangsu )""?","CREATE TABLE city (city_id VARCHAR, city VARCHAR); CREATE TABLE MATCH (venue VARCHAR, match_id VARCHAR, competition VARCHAR); CREATE TABLE hosting_city (host_city VARCHAR, match_id VARCHAR);","SELECT T3.venue FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city JOIN MATCH AS T3 ON T2.match_id = T3.match_id WHERE T1.city = ""Nanjing ( Jiangsu )"" AND T3.competition = ""1994 FIFA World Cup qualification"";","SELECT T1.venue FROM hosting_city AS T1 JOIN city AS T2 ON T1.match_id = T2.city_id JOIN MATCH AS T3 ON T2.match_id = T3.match_id WHERE T3.competition = ""1994 FIFA World Cup qualification"" AND T3.host_city = ""Nanjing ( Jiangsu )"";",0 Display the daily new user signups for the social_media_users table in a bar chart format for the last month.,"CREATE TABLE social_media_users (user_id INT, signup_date DATE, country VARCHAR(50));","SELECT signup_date, COUNT(*) as new_users FROM social_media_users WHERE signup_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) GROUP BY signup_date;","SELECT DATE_FORMAT(signup_date, '%Y-%m') as signup_date, country FROM social_media_users WHERE signup_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY signup_date;",0 "Who was the successor that was formally installed on March 30, 1870?","CREATE TABLE table_2417345_3 (successor VARCHAR, date_of_successors_formal_installation VARCHAR);","SELECT successor FROM table_2417345_3 WHERE date_of_successors_formal_installation = ""March 30, 1870"";","SELECT successor FROM table_2417345_3 WHERE date_of_successors_formal_installation = ""March 30, 1870"";",1 Count the number of green buildings in the 'smart_cities' schema with an area greater than 6000 sq ft.,"CREATE TABLE green_buildings (id INT, area FLOAT, city VARCHAR(20), state VARCHAR(20)); ",SELECT COUNT(*) FROM green_buildings WHERE area > 6000;,SELECT COUNT(*) FROM green_buildings WHERE area > 6000;,1 What genre has the game god of war?,"CREATE TABLE table_name_91 (genre VARCHAR, game VARCHAR);","SELECT genre FROM table_name_91 WHERE game = ""god of war"";","SELECT genre FROM table_name_91 WHERE game = ""god of war"";",1 Which school left in 1968 and has the team name of Panthers?,"CREATE TABLE table_name_81 (school VARCHAR, team_name VARCHAR, year_left VARCHAR);","SELECT school FROM table_name_81 WHERE team_name = ""panthers"" AND year_left = ""1968"";","SELECT school FROM table_name_81 WHERE team_name = ""panthers"" AND year_left = ""1968"";",1 "What was the game result on November 16, 1969?","CREATE TABLE table_name_83 (result VARCHAR, date VARCHAR);","SELECT result FROM table_name_83 WHERE date = ""november 16, 1969"";","SELECT result FROM table_name_83 WHERE date = ""november 16, 1969"";",1 What is the finale number ranked at number 7?,"CREATE TABLE table_19210674_1 (finale VARCHAR, rank VARCHAR);",SELECT finale FROM table_19210674_1 WHERE rank = 7;,SELECT finale FROM table_19210674_1 WHERE rank = 7;,1 How many accidents occurred in the 'Silver' mine last year?,"CREATE TABLE mine (id INT, name TEXT, location TEXT); CREATE TABLE accident (id INT, mine_id INT, date DATE);","SELECT COUNT(accident.id) FROM accident WHERE accident.mine_id = (SELECT id FROM mine WHERE name = 'Silver') AND accident.date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE;","SELECT COUNT(*) FROM accident JOIN mine ON accident.mine_id = mine.id WHERE mine.name = 'Silver' AND accident.date >= DATEADD(year, -1, GETDATE());",0 Who are the investors who have not made any investments in the healthcare sector?,"CREATE TABLE investments (id INT PRIMARY KEY, investor_id INT, nonprofit_id INT, amount DECIMAL(10,2), investment_date DATE); CREATE TABLE investors (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255)); CREATE TABLE nonprofits (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), sector VARCHAR(255)); ","SELECT i.id, i.name FROM investors i LEFT JOIN (SELECT investor_id FROM investments WHERE nonprofit_id IN (SELECT id FROM nonprofits WHERE sector = 'Healthcare')) sub ON i.id = sub.investor_id WHERE sub.investor_id IS NULL;",SELECT investors.name FROM investors INNER JOIN nonprofits ON investments.nonprofit_id = nonprofits.id WHERE nonprofits.sector = 'Healthcare';,0 Identify the top 3 attorneys with the highest billing amounts for cases in the 'Civil Litigation' practice area.,"CREATE TABLE attorneys (attorney_id INT, name VARCHAR(30)); CREATE TABLE cases (case_id INT, attorney_id INT, practice_area VARCHAR(20), billing_amount DECIMAL(10, 2)); ","SELECT attorney_id, name, SUM(billing_amount) as total_billing FROM attorneys JOIN cases ON attorneys.attorney_id = cases.attorney_id WHERE practice_area = 'Civil Litigation' GROUP BY attorney_id, name ORDER BY total_billing DESC LIMIT 3;","SELECT attorneys.name, SUM(cases.billing_amount) as total_billing FROM attorneys INNER JOIN cases ON attorneys.attorney_id = cases.attorney_id WHERE cases.practice_area = 'Civil Litigation' GROUP BY attorneys.name ORDER BY total_billing DESC LIMIT 3;",0 What is the total budget allocated to hospitals per state?,"CREATE TABLE state_hospitals (hospital_id INT, hospital_name VARCHAR(50), state_name VARCHAR(50), budget_allocation INT); ","SELECT state_name, SUM(budget_allocation) as total_budget FROM state_hospitals GROUP BY state_name;","SELECT state_name, SUM(budget_allocation) FROM state_hospitals GROUP BY state_name;",0 What was the aggregate for the match with a team 2 of Hafia FC?,"CREATE TABLE table_name_98 (agg VARCHAR, team_2 VARCHAR);","SELECT agg FROM table_name_98 WHERE team_2 = ""hafia fc"";","SELECT agg FROM table_name_98 WHERE team_2 = ""hafia fc"";",1 What is the average dissolved oxygen level for each region?,"CREATE TABLE region (region_id INT, region_name TEXT); CREATE TABLE measurement (measurement_id INT, region_id INT, dissolved_oxygen FLOAT); ","SELECT region_id, AVG(dissolved_oxygen) FROM measurement GROUP BY region_id;","SELECT r.region_name, AVG(m.dissolved_oxygen) as avg_dissolved_oxygen FROM region r JOIN measurement m ON r.region_id = m.region_id GROUP BY r.region_name;",0 How many times is the accession number xp_001843282?,"CREATE TABLE table_26708105_5 (common_name VARCHAR, accession_number VARCHAR);","SELECT COUNT(common_name) FROM table_26708105_5 WHERE accession_number = ""XP_001843282"";","SELECT COUNT(common_name) FROM table_26708105_5 WHERE accession_number = ""XP_001843282"";",1 What is the L2 cache for the processor with iris pro graphics 5200 and frequency of 2.6 ghz?,"CREATE TABLE table_name_96 (l2_cache VARCHAR, gpu_model VARCHAR, frequency VARCHAR);","SELECT l2_cache FROM table_name_96 WHERE gpu_model = ""iris pro graphics 5200"" AND frequency = ""2.6 ghz"";","SELECT l2_cache FROM table_name_96 WHERE gpu_model = ""iris pro graphics 5200"" AND frequency = ""2.6 ghz"";",1 Delete all records from the marine_species table where the species name contains 'Tuna',"CREATE TABLE marine_species (id INT, name VARCHAR(50), population INT);",DELETE FROM marine_species WHERE name LIKE '%Tuna%';,DELETE FROM marine_species WHERE name LIKE '%Tuna%';,1 "Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.","CREATE TABLE manufacturers (name VARCHAR, headquarter VARCHAR, revenue VARCHAR);","SELECT name, headquarter FROM manufacturers ORDER BY revenue DESC;","SELECT name, headquarter FROM manufacturers ORDER BY revenue DESC;",1 What is the sum of streams for Hip Hop songs in the USA in 2021?,"CREATE TABLE Streaming (country VARCHAR(50), year INT, genre VARCHAR(50), streams INT); ",SELECT SUM(streams) FROM Streaming WHERE country = 'USA' AND year = 2021 AND genre = 'Hip Hop';,SELECT SUM(streams) FROM Streaming WHERE country = 'USA' AND year = 2021 AND genre = 'Hip Hop';,1 What is the maximum number of sessions attended by a patient in Spain for any therapy?,"CREATE TABLE therapy_attendance (id INT, patient_id INT, session_name TEXT, num_sessions INT, country TEXT);",SELECT MAX(num_sessions) FROM therapy_attendance WHERE country = 'Spain';,SELECT MAX(num_sessions) FROM therapy_attendance WHERE country = 'Spain';,1 What is the average bridge length in 'Asia'?,"CREATE TABLE Bridges (id INT, name TEXT, country TEXT, length FLOAT); CREATE TABLE Countries (id INT, name TEXT, continent TEXT); ",SELECT AVG(length) FROM Bridges INNER JOIN Countries ON Bridges.country = Countries.name WHERE Countries.continent = 'Asia';,SELECT AVG(Bridges.length) FROM Bridges INNER JOIN Countries ON Bridges.country = Countries.name WHERE Countries.continent = 'Asia';,0 Who was the home team when Fitzroy was the away team?,"CREATE TABLE table_name_76 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_76 WHERE away_team = ""fitzroy"";","SELECT home_team FROM table_name_76 WHERE away_team = ""fitzroy"";",1 Which School/Club Team does Vince Carter Play for?,"CREATE TABLE table_name_95 (school_club_team VARCHAR, player VARCHAR);","SELECT school_club_team FROM table_name_95 WHERE player = ""vince carter"";","SELECT school_club_team FROM table_name_95 WHERE player = ""vince carlton"";",0 Update 'Alicia's' preferred size to 'Petite' in the 'Customer' table,"CREATE TABLE Customer (id INT PRIMARY KEY, name VARCHAR(50), country VARCHAR(50), size VARCHAR(50));",UPDATE Customer SET size = 'Petite' WHERE name = 'Alicia';,UPDATE Customer SET size = 'Petite' WHERE name = 'Alicia';,1 Calculate the total humanitarian assistance provided by the US and China in 2020,"CREATE TABLE humanitarian_assistance (donor VARCHAR(255), recipient VARCHAR(255), amount DECIMAL(10, 2), year INT); ","SELECT donor, SUM(amount) as total_assistance FROM humanitarian_assistance WHERE donor IN ('USA', 'China') AND year = 2020 GROUP BY donor;","SELECT SUM(amount) FROM humanitarian_assistance WHERE donor IN ('USA', 'China') AND year = 2020;",0 "What is the total number of Game, when Attendance is ""18,568""?","CREATE TABLE table_name_7 (game VARCHAR, attendance VARCHAR);",SELECT COUNT(game) FROM table_name_7 WHERE attendance = 18 OFFSET 568;,"SELECT COUNT(game) FROM table_name_7 WHERE attendance = ""18,568"";",0 Determine the number of startups founded by veterans in the transportation industry,"CREATE TABLE company (id INT, name TEXT, industry TEXT, founding_year INT, founder_gender TEXT, founder_veteran BOOLEAN); ",SELECT COUNT(*) FROM company WHERE industry = 'Transportation' AND founder_veteran = true,SELECT COUNT(*) FROM company WHERE industry = 'Transportation' AND founder_veteran = true;,0 How many online bookings were made in 'January' for 'hotels'?,"CREATE TABLE bookings (id INT, hotel_name TEXT, booking_date DATE); ",SELECT COUNT(*) FROM bookings WHERE hotel_name = 'Hotel Ritz' AND EXTRACT(MONTH FROM booking_date) = 1;,SELECT COUNT(*) FROM bookings WHERE hotel_name = 'hotels' AND booking_date BETWEEN '2022-01-01' AND '2022-01-31';,0 List all AI projects that address climate change and their funding amounts.,"CREATE TABLE ai_projects (project_id INT, project_name VARCHAR(20), project_domain VARCHAR(15), funding FLOAT); ","SELECT project_name, funding FROM ai_projects WHERE project_domain = 'climate change';","SELECT project_name, funding FROM ai_projects WHERE project_domain = 'Climate Change';",0 Calculate the average landfill capacity in North America.,"CREATE TABLE LandfillCapacity (region VARCHAR(20), capacity INT); ",SELECT AVG(capacity) FROM LandfillCapacity WHERE region = 'North America';,SELECT AVG(capacity) FROM LandfillCapacity WHERE region = 'North America';,1 What is the minimum and maximum social impact score?,"CREATE TABLE SocialImpact (id INT, region VARCHAR(20), score FLOAT); ","SELECT MIN(score) as min_score, MAX(score) as max_score FROM SocialImpact;","SELECT MIN(score), MAX(score) FROM SocialImpact;",0 What is the average age of players who have played in both the NBA and EuroLeague?,"CREATE TABLE players (id INT, name TEXT, age INT, league TEXT); ",SELECT AVG(age) FROM players p1 INNER JOIN players p2 ON p1.name = p2.name WHERE p1.league = 'NBA' AND p2.league = 'EuroLeague';,"SELECT AVG(age) FROM players WHERE league IN ('NBA', 'EuroLeague');",0 Name the religion for Former Experience of commissioner of health and assumed office before 2005,"CREATE TABLE table_name_73 (religion VARCHAR, assumed_office VARCHAR, former_experience VARCHAR);","SELECT religion FROM table_name_73 WHERE assumed_office < 2005 AND former_experience = ""commissioner of health"";","SELECT religion FROM table_name_73 WHERE assumed_office 2005 AND former_experience = ""commissar of health"";",0 "What is the average cost of sustainable building materials used in green building projects, and how does it compare to the average cost of conventional building materials?","CREATE TABLE Sustainable_Materials (Material_ID INT, Material_Name TEXT, Cost FLOAT, Green_Rating INT); CREATE TABLE Conventional_Materials (Material_ID INT, Material_Name TEXT, Cost FLOAT); ","SELECT AVG(Sustainable_Materials.Cost) AS Avg_Sustainable_Cost, AVG(Conventional_Materials.Cost) AS Avg_Conventional_Cost FROM Sustainable_Materials, Conventional_Materials;",SELECT AVG(Sustainable_Materials.Cost) FROM Sustainable_Materials INNER JOIN Conventional_Materials ON Sustainable_Materials.Material_ID = Conventional_Materials.Material_ID;,0 What date was the race in 1968 run on?,"CREATE TABLE table_22648285_1 (date VARCHAR, year VARCHAR);",SELECT date FROM table_22648285_1 WHERE year = 1968;,SELECT date FROM table_22648285_1 WHERE year = 1968;,1 List all UN organizations and the number of countries that are members of each organization.,"CREATE TABLE un_orgs (id INT, org_name VARCHAR(255), member_count INT); ","SELECT org_name, member_count FROM un_orgs;","SELECT org_name, member_count FROM un_orgs;",1 "What is the total area of affordable housing units in the city of Seattle, Washington, broken down by property type?","CREATE TABLE affordable_housing_units (id INT, city VARCHAR(255), property_type VARCHAR(255), area FLOAT); ","SELECT property_type, SUM(area) FROM affordable_housing_units WHERE city = 'Seattle' GROUP BY property_type;","SELECT property_type, SUM(area) FROM affordable_housing_units WHERE city = 'Seattle' GROUP BY property_type;",1 How many repeat donors were there in 2022?,"CREATE TABLE donors (donor_id INT, donation_date DATE, donation_amount DECIMAL(10, 2), country VARCHAR(50)); ",SELECT COUNT(DISTINCT donor_id) FROM donors WHERE donor_id IN (SELECT donor_id FROM donors GROUP BY donor_id HAVING COUNT(*) > 1);,SELECT COUNT(DISTINCT donor_id) FROM donors WHERE donation_date BETWEEN '2022-01-01' AND '2022-12-31';,0 What was the playoff result for the team name of bay area seals,"CREATE TABLE table_1427998_1 (playoffs VARCHAR, team_name VARCHAR);","SELECT playoffs FROM table_1427998_1 WHERE team_name = ""Bay Area Seals"";","SELECT playoffs FROM table_1427998_1 WHERE team_name = ""Bay Area Seals"";",1 "What is the total number of male and female reporters in the ""reporters"" table from the ""ethics"" department?","CREATE TABLE reporters (id INT, name VARCHAR(50), gender VARCHAR(10), age INT, department VARCHAR(20));",SELECT SUM(CASE WHEN gender = 'male' THEN 1 ELSE 0 END) + SUM(CASE WHEN gender = 'female' THEN 1 ELSE 0 END) FROM reporters WHERE department = 'ethics';,"SELECT gender, COUNT(*) FROM reporters WHERE department = 'ethics' GROUP BY gender;",0 What is the average mental health parity violation incidents and average cultural competency score by state?,"CREATE TABLE mental_health_parity (state VARCHAR(2), incidents INT); CREATE TABLE cultural_competency (state VARCHAR(2), score INT); ","SELECT state, AVG(mhp.incidents) AS avg_incidents, AVG(cc.score) AS avg_score FROM mental_health_parity mhp INNER JOIN cultural_competency cc ON mhp.state = cc.state GROUP BY state;","SELECT mental_health_parity.state, AVG(mental_health_parity.incidents) AS avg_incidents, AVG(cultural_competency.score) AS avg_score FROM mental_health_parity INNER JOIN cultural_competency ON mental_health_parity.state = cultural_competency.state GROUP BY mental_health_parity.state;",0 What is the County of Howard Street Tunnel?,"CREATE TABLE table_name_72 (county VARCHAR, name VARCHAR);","SELECT county FROM table_name_72 WHERE name = ""howard street tunnel"";","SELECT county FROM table_name_72 WHERE name = ""howard street tunnel"";",1 How many customers in the 'large' size range have made purchases in the last six months?,"CREATE TABLE customer_size(customer_id INT, size VARCHAR(10), purchase_date DATE); ","SELECT COUNT(*) FROM customer_size WHERE size = 'large' AND purchase_date >= DATEADD(month, -6, CURRENT_DATE);","SELECT COUNT(*) FROM customer_size WHERE size = 'large' AND purchase_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",0 How many high-level threats has each agency reported in the first half of 2022?,"CREATE TABLE Threat_Intelligence (Threat_ID INT, Threat_Type VARCHAR(50), Threat_Level VARCHAR(50), Reported_Date DATE, Reporting_Agency VARCHAR(50)); CREATE VIEW High_Level_Threats AS SELECT Threat_Type, Threat_Level, Reported_Date FROM Threat_Intelligence WHERE Threat_Level = 'High';","SELECT Reporting_Agency, COUNT(*) as Number_of_High_Level_Threats FROM High_Level_Threats WHERE Reported_Date >= '2022-01-01' AND Reported_Date < '2022-07-01' GROUP BY Reporting_Agency;","SELECT Reporting_Agency, COUNT(*) FROM High_Level_Threats WHERE Reported_Date BETWEEN '2022-01-01' AND '2022-06-30' GROUP BY Reporting_Agency;",0 How many marine protected areas are in the Pacific ocean?,"CREATE TABLE marine_protected_areas (area_name TEXT, location TEXT); ",SELECT COUNT(*) FROM marine_protected_areas WHERE location = 'Pacific Ocean';,SELECT COUNT(*) FROM marine_protected_areas WHERE location = 'Pacific Ocean';,1 Rank of 6 has what time?,"CREATE TABLE table_name_16 (time VARCHAR, rank VARCHAR);",SELECT time FROM table_name_16 WHERE rank = 6;,"SELECT time FROM table_name_16 WHERE rank = ""6"";",0 Update the 'community_health_workers' table and change the 'Name' to 'Aaliyah Johnson' where 'ID' is 123,"CREATE TABLE community_health_workers (id INT, name VARCHAR(255), age INT, state VARCHAR(2));",UPDATE community_health_workers SET name = 'Aaliyah Johnson' WHERE id = 123;,UPDATE community_health_workers SET name = 'Aaliyah Johnson' WHERE id = 123;,1 What is the City or Town of the monument with a Longitude of 89°11′w?,"CREATE TABLE table_name_71 (city_or_town VARCHAR, longitude VARCHAR);","SELECT city_or_town FROM table_name_71 WHERE longitude = ""89°11′w"";","SELECT city_or_town FROM table_name_71 WHERE longitude = ""89°11′w"";",1 Name the most attendance for 25 january 2004,"CREATE TABLE table_name_64 (attendance INTEGER, date VARCHAR);","SELECT MAX(attendance) FROM table_name_64 WHERE date = ""25 january 2004"";","SELECT MAX(attendance) FROM table_name_64 WHERE date = ""25 january 2004"";",1 What is the total capacity of renewable energy projects for each type?,"CREATE TABLE projects (name TEXT, type TEXT, capacity INTEGER); ","SELECT type, SUM(capacity) FROM projects GROUP BY type","SELECT type, SUM(capacity) FROM projects GROUP BY type;",0 "What is the average number of likes and comments for posts in the travel category, in the social_media schema?","CREATE TABLE categories (id INT, name VARCHAR(50)); CREATE TABLE post_metrics (post_id INT, likes INT, comments INT);","SELECT c.name AS category, AVG(pml.likes) AS avg_likes, AVG(pml.comments) AS avg_comments FROM post_metrics pml JOIN categories c ON pml.post_id = c.id WHERE c.name = 'travel' GROUP BY c.name;","SELECT AVG(post_metrics.likes) as avg_likes, AVG(post_metrics.comments) as avg_comments FROM post_metrics INNER JOIN categories ON post_metrics.post_id = categories.id WHERE categories.name = 'travel';",0 "Which Overall has a Name of bob anderson, and a Round smaller than 9?","CREATE TABLE table_name_66 (overall INTEGER, name VARCHAR, round VARCHAR);","SELECT AVG(overall) FROM table_name_66 WHERE name = ""bob anderson"" AND round < 9;","SELECT SUM(overall) FROM table_name_66 WHERE name = ""bob anderson"" AND round 9;",0 When did Shelia Lawrence join the series?,"CREATE TABLE table_11404452_1 (series__number INTEGER, writer_s_ VARCHAR);","SELECT MIN(series__number) FROM table_11404452_1 WHERE writer_s_ = ""Shelia Lawrence"";","SELECT MAX(series__number) FROM table_11404452_1 WHERE writer_s_ = ""Shelia Lawrence"";",0 Which countries had the highest number of virtual tours in Q2 2022?,"CREATE TABLE virtual_tours (country VARCHAR(255), num_tours INT); ","SELECT country, SUM(num_tours) as total_tours FROM virtual_tours WHERE quarter = 'Q2' AND year = 2022 GROUP BY country ORDER BY total_tours DESC LIMIT 3;","SELECT country, MAX(num_tours) FROM virtual_tours WHERE QUARTER(num_tours) = 2 GROUP BY country;",0 Update the feeding habits of the 'Basking Shark' to 'Filter Feeder' in the North Atlantic.,"CREATE TABLE marine_species (id INT, species VARCHAR(50), ocean VARCHAR(50), feeding_habits VARCHAR(50));",UPDATE marine_species SET feeding_habits = 'Filter Feeder' WHERE species = 'Basking Shark' AND ocean = 'North Atlantic';,UPDATE marine_species SET feeding_habits = 'Filter Feeder' WHERE species = 'Basking Shark' AND ocean = 'North Atlantic';,1 Find the intersection of mitigation and adaptation actions taken by countries in South America and Oceania,"CREATE TABLE mitigation (id INT PRIMARY KEY, country VARCHAR(50), action VARCHAR(255)); CREATE TABLE adaptation (id INT PRIMARY KEY, country VARCHAR(50), action VARCHAR(255)); ","SELECT m.action FROM mitigation m, adaptation a WHERE m.country = a.country AND m.action = a.action AND m.country IN ('Brazil', 'Australia', 'Argentina', 'New Zealand');","SELECT mitigation.action, adaptation.action FROM mitigation INNER JOIN adaptation ON mitigation.country = adaptation.country WHERE mitigation.action IN ('Mitigation', 'Adaptation') AND adaptation.country IN ('South America', 'Oceania');",0 Which habitat type has the highest total population of animals?,"CREATE TABLE animal_population (id INT, type VARCHAR(50), animals INT); ","SELECT type, MAX(animals) FROM animal_population;","SELECT type, SUM(animals) as total_animals FROM animal_population GROUP BY type ORDER BY total_animals DESC LIMIT 1;",0 What is the average delivery time for shipments to Africa from our Chicago warehouse that were sent via sea freight?,"CREATE TABLE Warehouse (id INT, name VARCHAR(50), location VARCHAR(50)); CREATE TABLE Shipment (id INT, warehouse_id INT, region VARCHAR(50), delivery_time INT, freight_type VARCHAR(50)); ",SELECT AVG(delivery_time) FROM Shipment WHERE warehouse_id = (SELECT id FROM Warehouse WHERE location = 'Chicago') AND region = 'Africa' AND freight_type = 'Sea';,SELECT AVG(delivery_time) FROM Shipment JOIN Warehouse ON Shipment.warehouse_id = Warehouse.id WHERE Warehouse.location = 'Chicago' AND Shipment.region = 'Africa' AND Shipment.freight_type = 'Sea';,0 List all dispensaries in Colorado with a retail price per gram above the state average for Sativa strains.,"CREATE TABLE dispensaries (id INT, name VARCHAR(50), state VARCHAR(20)); CREATE TABLE strains (id INT, name VARCHAR(50), type VARCHAR(20), price DECIMAL(5,2)); ","SELECT d.name FROM dispensaries d JOIN (SELECT dispensary_id, AVG(price) as avg_price FROM strains WHERE type = 'Sativa' GROUP BY dispensary_id) s ON d.id = s.dispensary_id JOIN strains st ON s.dispensary_id = st.id WHERE st.type = 'Sativa' AND st.price > s.avg_price;",SELECT dispensaries.name FROM dispensaries INNER JOIN strains ON dispensaries.state = strains.state WHERE dispensaries.state = 'Colorado' AND strains.price > (SELECT AVG(price) FROM strains WHERE strains.type = 'Sativa');,0 What is the average waste generated per garment for each manufacturer?,"CREATE TABLE Manufacturers (ManufacturerID INT, ManufacturerName VARCHAR(100)); CREATE TABLE Waste (WasteID INT, ManufacturerID INT, WastePerGarment DECIMAL(5,2)); ","SELECT m.ManufacturerName, AVG(w.WastePerGarment) AS AvgWastePerGarment FROM Manufacturers m JOIN Waste w ON m.ManufacturerID = w.ManufacturerID GROUP BY m.ManufacturerName;","SELECT m.ManufacturerName, AVG(w.WastePerGarment) as AvgWastePerGarment FROM Manufacturers m JOIN Waste w ON m.ManufacturerID = w.ManufacturerID GROUP BY m.ManufacturerName;",0 What are the top 5 countries with the highest number of factories in the 'circular economy' sector?,"CREATE TABLE factories_ext (id INT, name VARCHAR(50), country VARCHAR(50), sector VARCHAR(50), is_circular BOOLEAN); ","SELECT country, COUNT(*) as factory_count FROM factories_ext WHERE is_circular = TRUE GROUP BY country ORDER BY factory_count DESC LIMIT 5;","SELECT country, COUNT(*) as factory_count FROM factories_ext WHERE sector = 'circular economy' GROUP BY country ORDER BY factory_count DESC LIMIT 5;",0 What is the title of the episode written by Frank Military?,"CREATE TABLE table_28611413_2 (title VARCHAR, written_by VARCHAR);","SELECT title FROM table_28611413_2 WHERE written_by = ""Frank Military"";","SELECT title FROM table_28611413_2 WHERE written_by = ""Frank Military"";",1 Calculate the average landfill capacity for districts in each region.,"CREATE TABLE LandfillCapacity (id INT, district VARCHAR(20), capacity INT, region VARCHAR(10)); ","SELECT region, AVG(capacity) FROM LandfillCapacity GROUP BY region;","SELECT region, AVG(capacity) as avg_capacity FROM LandfillCapacity GROUP BY region;",0 What is the total number of marine species in the Atlantic Ocean that are affected by maritime safety issues?,"CREATE TABLE marine_species (id INT, name TEXT, ocean TEXT, affected_by_safety_issues BOOLEAN); ",SELECT COUNT(*) FROM marine_species WHERE ocean = 'Atlantic' AND affected_by_safety_issues = TRUE;,SELECT COUNT(*) FROM marine_species WHERE ocean = 'Atlantic Ocean' AND affected_by_safety_issues = true;,0 What is the total number of posts in the social_media schema for users who have posted at least once on a Monday?,"CREATE TABLE users (id INT, name VARCHAR(50), posts_count INT); CREATE TABLE posts (id INT, user_id INT, post_text VARCHAR(255), post_date DATE);","SELECT SUM(posts_count) FROM users JOIN posts ON users.id = posts.user_id WHERE DATEPART(dw, post_date) = 2;",SELECT SUM(posts_count) FROM users JOIN posts ON users.id = posts.user_id WHERE posts.post_date >= '2022-01-01' AND posts.post_date = '2022-05-01';,0 How many average wins have USA as the team?,"CREATE TABLE table_name_25 (wins INTEGER, team VARCHAR);","SELECT AVG(wins) FROM table_name_25 WHERE team = ""usa"";","SELECT AVG(wins) FROM table_name_25 WHERE team = ""usa"";",1 What is the number of points for the Entrant of wolfgang seidel and a Cooper t45 chassis later than 1960?,"CREATE TABLE table_name_74 (points VARCHAR, year VARCHAR, entrant VARCHAR, chassis VARCHAR);","SELECT COUNT(points) FROM table_name_74 WHERE entrant = ""wolfgang seidel"" AND chassis = ""cooper t45"" AND year > 1960;","SELECT COUNT(points) FROM table_name_74 WHERE entrant = ""wolfgang seidel"" AND chassis = ""cooper t45"" AND year > 1960;",1 "What is the average financial wellbeing score of individuals in Indonesia with an income over 5,000,000 IDR?","CREATE TABLE individuals (individual_id INT, individual_name TEXT, income INT, financial_wellbeing_score INT, country TEXT); ",SELECT AVG(financial_wellbeing_score) FROM individuals WHERE income > 5000000 AND country = 'Indonesia';,SELECT AVG(financial_wellbeing_score) FROM individuals WHERE income > 5000000 AND country = 'Indonesia';,1 What is the best finish where the scoring rank is 97?,"CREATE TABLE table_15431122_2 (best_finish VARCHAR, scoring_rank VARCHAR);","SELECT best_finish FROM table_15431122_2 WHERE scoring_rank = ""97"";",SELECT best_finish FROM table_15431122_2 WHERE scoring_rank = 97;,0 How many tries for Nelson RFC?,"CREATE TABLE table_name_99 (tries_for VARCHAR, club VARCHAR);","SELECT tries_for FROM table_name_99 WHERE club = ""nelson rfc"";","SELECT tries_for FROM table_name_99 WHERE club = ""nelson rfc"";",1 Show the number of community health workers who speak each language by city.,"CREATE TABLE CommunityHealthWorkers (CHWId INT, City VARCHAR(255), Language VARCHAR(255)); ","SELECT City, Language, COUNT(*) FROM CommunityHealthWorkers GROUP BY City, Language;","SELECT City, Language, COUNT(*) FROM CommunityHealthWorkers GROUP BY City, Language;",1 What is the average cargo handling duration for vessels from Greece?,"CREATE TABLE handling_times (id INT, transaction_id INT, duration INT); ",SELECT AVG(ht.duration) as average_duration FROM transactions t JOIN handling_times ht ON t.id = ht.transaction_id JOIN vessels v ON t.vessel_id = v.id WHERE v.flag_state = 'Greece';,SELECT AVG(duration) FROM handling_times WHERE transaction_id IN (SELECT transaction_id FROM vessels WHERE country = 'Greece');,0 What is the minimum budget allocated for disability accommodations in '2021'?,"CREATE TABLE DisabilityAccommodations (year INT, budget DECIMAL(5,2)); ",SELECT MIN(budget) FROM DisabilityAccommodations WHERE year = 2021;,SELECT MIN(budget) FROM DisabilityAccommodations WHERE year = 2021;,1 Oklahoma State produced a player in which position in the draft?,"CREATE TABLE table_name_26 (position VARCHAR, school_club_team VARCHAR);","SELECT position FROM table_name_26 WHERE school_club_team = ""oklahoma state"";","SELECT position FROM table_name_26 WHERE school_club_team = ""oklahoma state"";",1 Who is the director of the fimm Biola Tak Berdawai?,"CREATE TABLE table_13719788_1 (director VARCHAR, original_title VARCHAR);","SELECT director FROM table_13719788_1 WHERE original_title = ""Biola tak berdawai"";","SELECT director FROM table_13719788_1 WHERE original_title = ""Fimm Biola Tak Berdawai"";",0 What is the average order value per customer in the ethical fashion marketplace?,"CREATE TABLE customers (customer_id INT, total_spend DECIMAL(10,2)); ",SELECT AVG(total_spend) FROM customers;,SELECT AVG(total_spend) FROM customers;,1 What's the report for the True Value 500?,"CREATE TABLE table_10527215_3 (report VARCHAR, name VARCHAR);","SELECT report FROM table_10527215_3 WHERE name = ""True Value 500"";","SELECT report FROM table_10527215_3 WHERE name = ""True Value 500"";",1 What is the total number of visitors for each destination in the international_visitors table?,"CREATE TABLE destinations (destination_id INT, name VARCHAR(50), country_id INT); ","SELECT d.name, SUM(i.num_visitors) as total_visitors FROM destinations d INNER JOIN international_visitors i ON d.destination_id = i.country_id GROUP BY d.name;","SELECT d.name, COUNT(DISTINCT d.country_id) as total_visitors FROM destinations d JOIN international_visitors i ON d.destination_id = i.destination_id GROUP BY d.name;",0 Which deep-sea expeditions discovered new species?,"CREATE TABLE deep_sea_expeditions (name text, new_species integer); ",SELECT name FROM deep_sea_expeditions WHERE new_species > 0;,SELECT name FROM deep_sea_expeditions WHERE new_species = 1;,0 "what is the lowest top 5 when the year is after 1995, team(s) is #15 billy ballew motorsports, and starts is more than 4?","CREATE TABLE table_name_45 (top_5 INTEGER, starts VARCHAR, year VARCHAR, team_s_ VARCHAR);","SELECT MIN(top_5) FROM table_name_45 WHERE year > 1995 AND team_s_ = ""#15 billy ballew motorsports"" AND starts > 4;","SELECT MIN(top_5) FROM table_name_45 WHERE year > 1995 AND team_s_ = ""#15 billy ballew motorsports"" AND starts > 4;",1 What was the final score when the attendance was 25598?,"CREATE TABLE table_21761882_4 (final_score VARCHAR, attendance VARCHAR);",SELECT final_score FROM table_21761882_4 WHERE attendance = 25598;,"SELECT final_score FROM table_21761882_4 WHERE attendance = ""25598"";",0 Delete all garments with a rating below 4 and a quantity below 10.,CREATE TABLE low_rated_low_quantity_garments AS SELECT * FROM garments WHERE rating < 4 AND quantity < 10;,DELETE FROM garments WHERE id IN (SELECT garment_id FROM low_rated_low_quantity_garments);,DELETE FROM low_rated_low_quantity_garments WHERE rating 4 AND quantity 10;,0 What is the length of the film with Burleigh Sullivan as the character?,"CREATE TABLE table_name_30 (length VARCHAR, character_name VARCHAR);","SELECT length FROM table_name_30 WHERE character_name = ""burleigh sullivan"";","SELECT length FROM table_name_30 WHERE character_name = ""burleigh sullivan"";",1 What was the race status(es) with the lotus-ford 38/1 chassis?,"CREATE TABLE table_181892_4 (race_status VARCHAR, chassis VARCHAR);","SELECT race_status FROM table_181892_4 WHERE chassis = ""Lotus-Ford 38/1"";","SELECT race_status FROM table_181892_4 WHERE chassis = ""LOTUS-FORD 38/1"";",0 What is the average amount of resources extracted per day in Canada and Australia?,"CREATE TABLE ResourceExtraction(id INT, country VARCHAR(50), extraction_date DATE, amount INT);","SELECT country, AVG(amount) AS Avg_Amount FROM ResourceExtraction WHERE country IN ('Canada', 'Australia') AND extraction_date >= DATEADD(day, -365, CURRENT_DATE) GROUP BY country;","SELECT AVG(amount) FROM ResourceExtraction WHERE country IN ('Canada', 'Australia');",0 What is the average donation amount for donors in the Technology industry who gave on Giving Tuesday?,"CREATE TABLE donations(id INT, donor_name TEXT, donation_amount FLOAT, donation_date DATE, industry TEXT); ",SELECT AVG(donation_amount) FROM donations WHERE industry = 'Technology' AND donation_date = '2022-11-29';,SELECT AVG(donation_amount) FROM donations WHERE industry = 'Technology' AND donation_date BETWEEN '2022-01-01' AND '2022-12-31';,0 Name the first elected for re-elected and brian higgins,"CREATE TABLE table_19753079_35 (first_elected VARCHAR, result VARCHAR, incumbent VARCHAR);","SELECT first_elected FROM table_19753079_35 WHERE result = ""Re-elected"" AND incumbent = ""Brian Higgins"";","SELECT first_elected FROM table_19753079_35 WHERE result = ""Re-elected"" AND incumbent = ""Brian Higgins"";",1 What is the transfer period for habarugira?,"CREATE TABLE table_name_16 (transfer_window VARCHAR, name VARCHAR);","SELECT transfer_window FROM table_name_16 WHERE name = ""habarugira"";","SELECT transfer_window FROM table_name_16 WHERE name = ""habarugira"";",1 What is the frequency when callsign is dxru-fm?,"CREATE TABLE table_23915973_1 (frequency VARCHAR, callsign VARCHAR);","SELECT frequency FROM table_23915973_1 WHERE callsign = ""DXRU-FM"";","SELECT frequency FROM table_23915973_1 WHERE callsign = ""DXRU-FM"";",1 Who was the successor for the Kentucky 2nd district?,"CREATE TABLE table_224794_3 (successor VARCHAR, district VARCHAR);","SELECT successor FROM table_224794_3 WHERE district = ""Kentucky 2nd"";","SELECT successor FROM table_224794_3 WHERE district = ""Kentucky 2nd"";",1 How many hospitals are there in each province of China?,"CREATE TABLE china_provinces (id INT, province VARCHAR(50)); CREATE TABLE hospitals (id INT, name VARCHAR(50), province_id INT); ","SELECT p.province, COUNT(h.id) AS total_hospitals FROM hospitals h JOIN china_provinces p ON h.province_id = p.id GROUP BY p.province;","SELECT c.province, COUNT(h.id) FROM china_provinces c JOIN hospitals h ON c.id = h.province_id GROUP BY c.province;",0 What is the market price trend of Gadolinium from 2018 to 2021?,"CREATE TABLE price (element VARCHAR(255), year INT, price DECIMAL(10, 2)); ","SELECT year, price FROM price WHERE element = 'Gadolinium' ORDER BY year;",SELECT price FROM price WHERE element = 'Gadolinium' AND year BETWEEN 2018 AND 2021;,0 On what circuit was the GTU winning team #59 Brumos Porsche - Audi in round 5? ,"CREATE TABLE table_13642023_2 (circuit VARCHAR, rnd VARCHAR, gtu_winning_team VARCHAR);","SELECT circuit FROM table_13642023_2 WHERE rnd = 5 AND gtu_winning_team = ""#59 Brumos Porsche - Audi"";","SELECT circuit FROM table_13642023_2 WHERE rnd = 5 AND gtu_winning_team = ""#59 Brumos Porsche - Audi"";",1 What is the latest public outreach date for each site?,"CREATE TABLE Sites (SiteID INT, SiteName VARCHAR(50), PublicOutreachDate DATE); ","SELECT SiteName, MAX(PublicOutreachDate) OVER (PARTITION BY SiteID) AS LatestPublicOutreachDate FROM Sites;","SELECT SiteName, MAX(PublicOutreachDate) FROM Sites GROUP BY SiteName;",0 What is the number of electric vehicles sold in the United States each year since 2015?,"CREATE TABLE VehicleSales (year INT, country VARCHAR(255), vehicle_type VARCHAR(255), sales INT); ","SELECT year, SUM(sales) AS electric_vehicle_sales FROM VehicleSales WHERE country = 'United States' AND vehicle_type = 'Electric' GROUP BY year;","SELECT year, SUM(sales) FROM VehicleSales WHERE country = 'United States' AND vehicle_type = 'Electric' GROUP BY year;",0 What is the average time (in years) between the founding date and the first investment round for startups founded by individuals who identify as Asian in the biotechnology sector?,"CREATE TABLE startups (id INT, name TEXT, founder_ethnicity TEXT, industry TEXT, founding_date DATE); CREATE TABLE investments (id INT, startup_id INT, investment_date DATE, funding_amount INT);","SELECT AVG(DATEDIFF('year', startups.founding_date, investments.investment_date)/365.25) FROM startups INNER JOIN investments ON startups.id = investments.startup_id WHERE startups.founder_ethnicity = 'Asian' AND startups.industry = 'Biotechnology';","SELECT AVG(DATEDIFF(year, founding_date, investment_date)) FROM startups JOIN investments ON startups.id = investments.startup_id WHERE startups.founder_ethnicity = 'Asian' AND startups.industry = 'Biotechnology';",0 "What are the total number of volunteers and total hours volunteered, grouped by the program location, for programs located in 'Los Angeles'?","CREATE TABLE Programs (ProgramID INT, ProgramName VARCHAR(50), Location VARCHAR(50), Budget DECIMAL(10,2));","SELECT p.Location, COUNT(v.VolunteerID) as TotalVolunteers, SUM(v.Hours) as TotalHours FROM Volunteers v INNER JOIN Programs p ON v.ProgramID = p.ProgramID WHERE p.Location = 'Los Angeles' GROUP BY p.Location;","SELECT ProgramName, Location, SUM(Budget) as TotalVolunteers, SUM(Hours) as TotalHours FROM Programs WHERE Location = 'Los Angeles' GROUP BY ProgramName, Location;",0 Which marine species were found in 'Australia' in 2020 and what pollution control initiatives were implemented there between 2015 and 2020?,"CREATE TABLE Species_3 (id INT, name VARCHAR(255), region VARCHAR(255), year INT); CREATE TABLE Initiatives_3 (id INT, initiative VARCHAR(255), region VARCHAR(255), start_year INT, end_year INT); ",SELECT name FROM Species_3 WHERE region = 'Australia' AND year = 2020 UNION SELECT initiative FROM Initiatives_3 WHERE region = 'Australia' AND start_year BETWEEN 2015 AND 2020;,"SELECT Species_3.name, Initiatives_3.initiative FROM Species_3 INNER JOIN Initiatives_3 ON Species_3.region = Initiatives_3.region WHERE Species_3.region = 'Australia' AND Initiatives_3.start_year BETWEEN 2015 AND 2020;",0 List all safety test results for vehicle models starting with 'A' in the 'safety_tests_detailed' table.,"CREATE TABLE safety_tests_detailed (vehicle_model VARCHAR(10), safety_rating INT, year INT, test_number INT);","SELECT * FROM safety_tests_detailed WHERE vehicle_model LIKE 'A%' ORDER BY vehicle_model, year;","SELECT vehicle_model, safety_rating, year, test_number FROM safety_tests_detailed WHERE vehicle_model LIKE 'A%';",0 "What is the average number of followers for users who posted at least 3 times with the hashtag ""#travel"" in the ""user_posts"" table?","CREATE TABLE user_profiles (id INT, followers INT); CREATE TABLE user_posts (user_id INT, post_id INT, hashtags VARCHAR(255)); ",SELECT AVG(fp.followers) FROM user_profiles fp JOIN user_posts up ON fp.id = up.user_id WHERE up.hashtags LIKE '%#travel%' GROUP BY up.user_id HAVING COUNT(up.post_id) >= 3;,SELECT AVG(user_profiles.followers) FROM user_profiles INNER JOIN user_posts ON user_profiles.id = user_posts.user_id WHERE user_posts.hashtags = '#travel' AND user_profiles.followers >= 3;,0 How many customers have savings greater than '8000'?,"CREATE TABLE savings (customer_id INT, name TEXT, state TEXT, savings DECIMAL(10, 2)); ",SELECT COUNT(*) FROM savings WHERE savings > 8000;,SELECT COUNT(*) FROM savings WHERE savings > 8000;,1 player is jim henshall what are all the position,"CREATE TABLE table_26996293_2 (position VARCHAR, player VARCHAR);","SELECT position FROM table_26996293_2 WHERE player = ""Jim Henshall"";","SELECT position FROM table_26996293_2 WHERE player = ""Jim Henshall"";",1 "Goalsagainst of 285, and a Season of 2006–07, and a Games smaller than 70 has what average points?","CREATE TABLE table_name_88 (points INTEGER, games VARCHAR, goalsagainst VARCHAR, season VARCHAR);","SELECT AVG(points) FROM table_name_88 WHERE goalsagainst = 285 AND season = ""2006–07"" AND games < 70;","SELECT AVG(points) FROM table_name_88 WHERE goalsagainst = 285 AND season = ""2006–07"" AND games 70;",0 what are all the win/loss where season is 2009,"CREATE TABLE table_1165048_1 (win_loss VARCHAR, season VARCHAR);",SELECT win_loss FROM table_1165048_1 WHERE season = 2009;,SELECT win_loss FROM table_1165048_1 WHERE season = 2009;,1 What is the total number of products recalled due to quality issues in the past year?,"CREATE TABLE products(id INT, product_name TEXT, production_date DATE);CREATE TABLE recalls(id INT, product_id INT, recall_date DATE); ","SELECT COUNT(DISTINCT product_id) as total_recalls FROM recalls WHERE recall_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT COUNT(*) FROM recalls JOIN products ON recalls.product_id = products.id WHERE recalls.recall_date >= DATEADD(year, -1, GETDATE());",0 Who is the rookie goalkeeper Mike Gabel?,"CREATE TABLE table_name_70 (rookie VARCHAR, goalkeeper VARCHAR);","SELECT rookie FROM table_name_70 WHERE goalkeeper = ""mike gabel"";","SELECT rookie FROM table_name_70 WHERE goalkeeper = ""mike gabel"";",1 What is the distribution of ethical labor practice ratings among suppliers?,"CREATE TABLE supplier_ratings (supplier_id INT, ethical_practice_rating INT); ","SELECT ethical_practice_rating, COUNT(*) AS supplier_count FROM supplier_ratings GROUP BY ethical_practice_rating;","SELECT supplier_id, ethical_practice_rating, COUNT(*) as num_ratings FROM supplier_ratings GROUP BY supplier_id, ethical_practice_rating;",0 What's the col (m) ranked more than 4 with a summit of Kawaikini?,"CREATE TABLE table_name_84 (col__m_ VARCHAR, rank VARCHAR, summit VARCHAR);","SELECT col__m_ FROM table_name_84 WHERE rank > 4 AND summit = ""kawaikini"";","SELECT col__m_ FROM table_name_84 WHERE rank > 4 AND summit = ""kawaikini"";",1 How many seasons has John Mcfadden coached?,"CREATE TABLE table_name_71 (seasons VARCHAR, coach VARCHAR);","SELECT COUNT(seasons) FROM table_name_71 WHERE coach = ""john mcfadden"";","SELECT seasons FROM table_name_71 WHERE coach = ""john mcfadden"";",0 "Determine the veteran unemployment rate by state, calculated as the number of unemployed veterans divided by the total number of veterans in that state.","CREATE TABLE veterans (veteran_id INT, state VARCHAR(255), employment_status VARCHAR(255));","SELECT state, COUNT(CASE WHEN employment_status = 'Unemployed' THEN 1 END) / COUNT(*) as unemployment_rate FROM veterans GROUP BY state;","SELECT state, COUNT(*) as num_unemployed_veterans, SUM(COUNT(*)) as total_veterans FROM veterans GROUP BY state;",0 Name the bleeding time with platelet count of unaffected and condition of factor xii deficiency,"CREATE TABLE table_name_83 (bleeding_time VARCHAR, platelet_count VARCHAR, condition VARCHAR);","SELECT bleeding_time FROM table_name_83 WHERE platelet_count = ""unaffected"" AND condition = ""factor xii deficiency"";","SELECT bleeding_time FROM table_name_83 WHERE platelet_count = ""unaffected"" AND condition = ""factor xii deficiency"";",1 "Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.","CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, id VARCHAR); CREATE TABLE employees (reports_to VARCHAR);","SELECT T2.first_name, T2.last_name, COUNT(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY COUNT(T1.reports_to) DESC LIMIT 1;","SELECT T1.first_name, T1.last_name, COUNT(*) FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1;",0 From which series is the title Barbary Coast Bunny?,"CREATE TABLE table_name_85 (series VARCHAR, title VARCHAR);","SELECT series FROM table_name_85 WHERE title = ""barbary coast bunny"";","SELECT series FROM table_name_85 WHERE title = ""barbarary coast bunny"";",0 "Where Result is nominated and Organization is 54th the television academy drama awards, what is the award?","CREATE TABLE table_name_80 (award VARCHAR, result VARCHAR, organization VARCHAR);","SELECT award FROM table_name_80 WHERE result = ""nominated"" AND organization = ""54th the television academy drama awards"";","SELECT award FROM table_name_80 WHERE result = ""nominated"" AND organization = ""54th the television academy drama awards"";",1 What is the Set 3 when the total was 53–75?,"CREATE TABLE table_name_26 (set_3 VARCHAR, total VARCHAR);","SELECT set_3 FROM table_name_26 WHERE total = ""53–75"";","SELECT set_3 FROM table_name_26 WHERE total = ""53–75"";",1 "What is the total quantity of items in warehouse 2, 3, and 4?","CREATE TABLE warehouses (id INT, location VARCHAR(10), item VARCHAR(10), quantity INT); ","SELECT SUM(quantity) FROM warehouses WHERE id IN (2, 3, 4);","SELECT SUM(quantity) FROM warehouses WHERE location IN (2, 3, 4);",0 Who were the opponents when the record was 11-2?,"CREATE TABLE table_22862203_2 (opponent VARCHAR, record VARCHAR);","SELECT opponent FROM table_22862203_2 WHERE record = ""11-2"";","SELECT opponent FROM table_22862203_2 WHERE record = ""11-2"";",1 What is the total donation amount per quarter for each cause in 2021?,"CREATE TABLE causes (id INT, cause_name VARCHAR(255)); CREATE TABLE donations (id INT, cause_id INT, donation_amount NUMERIC, donation_date DATE); ","SELECT d.cause_id, QUARTER(d.donation_date) as quarter, SUM(d.donation_amount) as total_donations FROM donations d WHERE YEAR(d.donation_date) = 2021 GROUP BY d.cause_id, quarter;","SELECT c.cause_name, DATE_FORMAT(d.donation_date, '%Y-%m') as quarter, SUM(d.donation_amount) as total_donation FROM donations d JOIN causes c ON d.cause_id = c.id WHERE YEAR(d.donation_date) = 2021 GROUP BY c.cause_name, quarter;",0 What is the average fare collected on trains per day?,"CREATE TABLE fares (id INT, type TEXT, amount DECIMAL, collection_date DATE); ",SELECT AVG(amount) FROM fares WHERE type = 'Train' AND DATE(collection_date) = CURDATE();,SELECT AVG(amount) FROM fares WHERE type = 'train' GROUP BY collection_date;,0 "Create a table named 'routes' with columns 'route_id', 'name', 'type'","CREATE TABLE routes (route_id INT, name VARCHAR(255), type VARCHAR(255));","CREATE TABLE routes (route_id INT, name VARCHAR(255), type VARCHAR(255));","CREATE TABLE routes (route_id INT, name VARCHAR(255), type VARCHAR(255);",0 what is the least amount in the tournament?,CREATE TABLE table_12755786_8 (league INTEGER);,SELECT MIN(league) AS Cup FROM table_12755786_8;,SELECT MIN(league) FROM table_12755786_8;,0 What is the average cargo weight for vessels arriving in Canada in May 2022?,"CREATE TABLE vessel_performance (id INT, name TEXT, speed DECIMAL(5,2), arrived_date DATE, country TEXT, cargo_weight INT); ",SELECT AVG(cargo_weight) FROM vessel_performance WHERE arrived_date BETWEEN '2022-05-01' AND '2022-05-31' AND country = 'Canada';,SELECT AVG(cargo_weight) FROM vessel_performance WHERE country = 'Canada' AND arrived_date BETWEEN '2022-01-01' AND '2022-05-30';,0 Which venue had a city of Manchester before 2003?,"CREATE TABLE table_name_82 (venue VARCHAR, city VARCHAR, year VARCHAR);","SELECT venue FROM table_name_82 WHERE city = ""manchester"" AND year < 2003;","SELECT venue FROM table_name_82 WHERE city = ""manchester"" AND year 2003;",0 How many points were there before 1979 with a ferrari 312b2 chassis?,"CREATE TABLE table_name_3 (points VARCHAR, year VARCHAR, chassis VARCHAR);","SELECT points FROM table_name_3 WHERE year < 1979 AND chassis = ""ferrari 312b2"";","SELECT points FROM table_name_3 WHERE year 1979 AND chassis = ""ferrari 312b2"";",0 How many climate mitigation projects have been funded by the Green Climate Fund in Asia?,"CREATE TABLE climate_mitigation_projects (project_id INT, project_name VARCHAR(255), location VARCHAR(255), funded_by VARCHAR(255)); ",SELECT COUNT(*) FROM climate_mitigation_projects WHERE location = 'Asia' AND funded_by = 'Green Climate Fund';,SELECT COUNT(*) FROM climate_mitigation_projects WHERE funded_by = 'Green Climate Fund' AND location = 'Asia';,0 List the top 5 cities with the most 4G coverage,"CREATE TABLE network_infrastructure (infrastructure_id INT, city VARCHAR(20), tech VARCHAR(10));","SELECT city, COUNT(*) FROM network_infrastructure WHERE tech = '4G' GROUP BY city ORDER BY COUNT(*) DESC LIMIT 5;","SELECT city, COUNT(*) as coverage_count FROM network_infrastructure WHERE tech = '4G' GROUP BY city ORDER BY coverage_count DESC LIMIT 5;",0 Delete all records from table fleet_management with status as 'pending',"CREATE TABLE fleet_management (id INT PRIMARY KEY, cargo_id INT, status VARCHAR(20), destination VARCHAR(20)); ",DELETE FROM fleet_management WHERE status = 'pending';,DELETE FROM fleet_management WHERE status = 'pending';,1 What are the lowest cuts made that have events less than 4?,"CREATE TABLE table_name_84 (cuts_made INTEGER, events INTEGER);",SELECT MIN(cuts_made) FROM table_name_84 WHERE events < 4;,SELECT MIN(cuts_made) FROM table_name_84 WHERE events 4;,0 Update the safety scores of vessels that have a historical non-compliance record.,"CREATE TABLE Vessels (VesselID INT, VesselName TEXT, SafetyScore INT, NonCompliance TEXT); ",UPDATE Vessels SET SafetyScore = SafetyScore - 10 WHERE NonCompliance = 'Yes';,UPDATE Vessels SET SafetyScore = SafetyScore WHERE NonCompliance IS NOT NULL;,0 "Which Investing Dragon has requested £100,000 and is supported by Entrepreneur Kay Russell?","CREATE TABLE table_name_43 (investing_dragon_s_ VARCHAR, money_requested__£_ VARCHAR, entrepreneur_s_ VARCHAR);","SELECT investing_dragon_s_ FROM table_name_43 WHERE money_requested__£_ = ""100,000"" AND entrepreneur_s_ = ""kay russell"";","SELECT investing_dragon_s_ FROM table_name_43 WHERE money_requested__£_ = ""100000"" AND entrepreneur_s_ = ""kay russell"";",0 What is the average threat level for the last week?,"CREATE TABLE Threat_Level (id INT, report_number VARCHAR(50), report_date DATE, threat_level INT);","SELECT AVG(threat_level) FROM Threat_Level WHERE report_date >= DATE_SUB(CURDATE(), INTERVAL 1 WEEK);","SELECT AVG(threat_level) FROM Threat_Level WHERE report_date >= DATEADD(week, -1, GETDATE());",0 How many users engaged with online travel agency data for each region in the world?,"CREATE TABLE users (user_id INT, user_region TEXT); CREATE TABLE otas (ota_id INT, ota_name TEXT, region TEXT); CREATE TABLE otas_users (ota_id INT, user_id INT);","SELECT region, COUNT(DISTINCT users.user_id) FROM otas_users JOIN users ON users.user_id = otas_users.user_id JOIN otas ON otas.ota_id = otas_users.ota_id GROUP BY region;","SELECT otas.region, COUNT(otas_users.ota_id) FROM otas INNER JOIN users ON otas_users.user_id = users.user_id GROUP BY otas.region;",0 Who has a time of 3:50.90?,"CREATE TABLE table_name_35 (name VARCHAR, time VARCHAR);","SELECT name FROM table_name_35 WHERE time = ""3:50.90"";","SELECT name FROM table_name_35 WHERE time = ""3:50.90"";",1 Which tournament had a hard surface?,"CREATE TABLE table_name_22 (tournament VARCHAR, surface VARCHAR);","SELECT tournament FROM table_name_22 WHERE surface = ""hard"";","SELECT tournament FROM table_name_22 WHERE surface = ""hard"";",1 Name the number of playoffs for semifinals,"CREATE TABLE table_245694_4 (playoffs VARCHAR, concacaf VARCHAR);","SELECT COUNT(playoffs) FROM table_245694_4 WHERE concacaf = ""Semifinals"";","SELECT playoffs FROM table_245694_4 WHERE concacaf = ""Semifinals"";",0 What is the total budget allocated for education and healthcare in each city?,"CREATE TABLE BudgetAllocation (Id INT, CityId INT, Category VARCHAR(50), Amount DECIMAL(10,2)); ","SELECT CityId, Category, SUM(Amount) AS TotalBudget FROM BudgetAllocation WHERE Category IN ('Education', 'Healthcare') GROUP BY CityId, Category;","SELECT CityId, SUM(Amount) FROM BudgetAllocation WHERE Category IN ('Education', 'Healthcare') GROUP BY CityId;",0 List the top 5 defense contractors in terms of awarded contract value for the last 5 years.,"CREATE TABLE Defense_Contracts (id INT, contractor VARCHAR(50), year INT, awarded_value FLOAT);","SELECT contractor, SUM(awarded_value) as total_contracts_value FROM Defense_Contracts WHERE year >= YEAR(CURRENT_DATE) - 5 GROUP BY contractor ORDER BY total_contracts_value DESC LIMIT 5;","SELECT contractor, SUM(avg_value) as total_avg_value FROM Defense_Contracts WHERE year >= YEAR(CURRENT_DATE) - 5 GROUP BY contractor ORDER BY total_avg_value DESC LIMIT 5;",0 How many mobile subscribers have exceeded their data limit in Canada?,"CREATE TABLE mobile_subscriber_limits (subscriber_id INT, data_limit FLOAT, data_usage FLOAT, country VARCHAR(20)); ",SELECT COUNT(*) FROM mobile_subscriber_limits WHERE data_usage > data_limit AND country = 'Canada';,SELECT COUNT(*) FROM mobile_subscriber_limits WHERE data_limit > (SELECT data_limit FROM mobile_subscriber_limits WHERE country = 'Canada');,0 What is the average year when traditional arts were first practiced?,"CREATE TABLE traditional_arts (id INT, art_name VARCHAR(255), year INT, country VARCHAR(255)); ",SELECT AVG(year) FROM traditional_arts;,SELECT AVG(year) FROM traditional_arts;,1 What is the average age of players who prefer VR games?,"CREATE TABLE players (id INT, name VARCHAR(50), age INT, game_preference VARCHAR(20)); ",SELECT AVG(age) FROM players WHERE game_preference = 'VR';,SELECT AVG(age) FROM players WHERE game_preference = 'VR';,1 Who is the highest paid employee in the 'production' department?,"CREATE TABLE employees (id INT, name VARCHAR(50), department VARCHAR(20), salary DECIMAL(10, 2)); ","SELECT name, MAX(salary) FROM employees WHERE department = 'production';","SELECT name, MAX(salary) FROM employees WHERE department = 'production' GROUP BY name;",0 What is the minimum project cost in each region?,"CREATE TABLE Projects (region VARCHAR(20), project_cost INT); ","SELECT region, MIN(project_cost) FROM Projects GROUP BY region;","SELECT region, MIN(project_cost) FROM Projects GROUP BY region;",1 How many IoT sensors are there in the 'sensors' table for crop type 'corn'?,"CREATE TABLE sensors (id INT, sensor_id INT, crop VARCHAR(10)); ",SELECT COUNT(*) FROM sensors WHERE crop = 'corn';,SELECT COUNT(*) FROM sensors WHERE crop = 'corn';,1 How many traditional art forms are practiced in 'Asia' that use paper as a primary material?,"CREATE TABLE TraditionalArts (ID INT, ArtForm TEXT, Material TEXT); ",SELECT COUNT(*) FROM TraditionalArts WHERE Material = 'Paper' AND PracticedIn = 'Asia';,SELECT COUNT(*) FROM TraditionalArts WHERE Material = 'Paper' AND Country = 'Asia';,0 "List the community engagement events with the highest attendance in each country and their respective dates, sorted by country.","CREATE TABLE Country (Id INT, Name VARCHAR(100)); CREATE TABLE CommunityEvent (Id INT, CountryId INT, EventType VARCHAR(50), Attendance INT, EventDate DATE);","SELECT CountryId, Name, EventType, EventDate, Attendance, DENSE_RANK() OVER (PARTITION BY CountryId ORDER BY Attendance DESC) as Ranking FROM Country c JOIN CommunityEvent ce ON c.Id = ce.CountryId ORDER BY Ranking, Name;","SELECT Country.Name, CommunityEvent.Attendance, CommunityEvent.EventDate FROM Country INNER JOIN CommunityEvent ON Country.Id = CommunityEvent.CountryId GROUP BY Country.Name ORDER BY Country.Attendance DESC;",0 What is the maximum number of peacekeepers deployed by any country in a single operation since 2000?,"CREATE TABLE peacekeeping_personnel (operation_name VARCHAR(255), country VARCHAR(255), personnel INT, deployment_date DATE);",SELECT MAX(personnel) FROM peacekeeping_personnel WHERE deployment_date >= '2000-01-01' GROUP BY operation_name ORDER BY MAX(personnel) DESC LIMIT 1;,SELECT MAX(personnel) FROM peacekeeping_personnel WHERE deployment_date >= '2000-01-01';,0 What is the date of game with tie number of 10?,"CREATE TABLE table_name_35 (date VARCHAR, tie_no VARCHAR);","SELECT date FROM table_name_35 WHERE tie_no = ""10"";","SELECT date FROM table_name_35 WHERE tie_no = ""10"";",1 What was the record for the game on March 25?,"CREATE TABLE table_name_27 (record VARCHAR, date VARCHAR);","SELECT record FROM table_name_27 WHERE date = ""march 25"";","SELECT record FROM table_name_27 WHERE date = ""march 25"";",1 What was the time for game 4?,"CREATE TABLE table_name_56 (time VARCHAR, game VARCHAR);",SELECT time FROM table_name_56 WHERE game = 4;,SELECT time FROM table_name_56 WHERE game = 4;,1 What is the percentage of customers in each age group that have a mobile subscription?,"CREATE TABLE customers(id INT, name VARCHAR(50), age INT, has_mobile_subscription BOOLEAN);","SELECT age_groups.age_group, COUNT(*) as num_customers, COUNT(has_mobile_subscription) * 100.0 / COUNT(*) as pct_mobile_subscriptions FROM customers JOIN (SELECT 0 as age_group UNION ALL SELECT 18 UNION ALL SELECT 25 UNION ALL SELECT 35 UNION ALL SELECT 50) as age_groups ON customers.age >= age_groups.age_group GROUP BY age_groups.age_group;","SELECT age, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM customers WHERE has_mobile_subscription = TRUE) as percentage FROM customers GROUP BY age;",0 What is the average amount of money of players in t8 place with a 68-71-69-72=280 score?,"CREATE TABLE table_name_53 (money___ INTEGER, place VARCHAR, score VARCHAR);","SELECT AVG(money___) AS $__ FROM table_name_53 WHERE place = ""t8"" AND score = 68 - 71 - 69 - 72 = 280;","SELECT AVG(money___) FROM table_name_53 WHERE place = ""t8"" AND score = 68 - 71 - 69 - 72 = 280;",0 "Find the number of AI safety incidents and their occurrence date, partitioned by incident type, ordered by date in ascending order?","CREATE TABLE ai_safety_incidents_date (incident_id INT, incident_type VARCHAR(50), occurrence_date DATE); ","SELECT incident_type, COUNT(*) as num_incidents, MIN(occurrence_date) as first_occurrence_date FROM ai_safety_incidents_date GROUP BY incident_type ORDER BY first_occurrence_date ASC;","SELECT incident_type, COUNT(*), occurrence_date FROM ai_safety_incidents_date ORDER BY occurrence_date ASC;",0 Show the average recycling rate and number of products for each country,"CREATE TABLE circular_supply_chain (product_id INT, supplier_id INT, recycling_program BOOLEAN); CREATE TABLE product_transparency (product_id INT, supplier_id INT, material VARCHAR(50), country_of_origin VARCHAR(50), production_process VARCHAR(50)); CREATE TABLE supplier_ethics (supplier_id INT, country VARCHAR(50), labor_practices VARCHAR(50), sustainability_score INT); CREATE VIEW recycling_rates_by_country AS SELECT country, AVG(recycling_program) as avg_recycling_rate FROM circular_supply_chain cs JOIN product_transparency pt ON cs.product_id = pt.product_id JOIN supplier_ethics se ON cs.supplier_id = se.supplier_id GROUP BY country;","SELECT r.country, AVG(recycling_program) as avg_recycling_rate, COUNT(pt.product_id) as product_count FROM recycling_rates_by_country r JOIN product_transparency pt ON r.country = pt.country_of_origin GROUP BY r.country;","SELECT country, AVG(avg_recycling_rate) as avg_recycling_rate, COUNT(*) as num_products FROM recycling_rates_by_country JOIN product_transparency ON recycling_rates_by_country = product_transparency.product_id JOIN supplier_ethics ON product_transparency.supplier_id = supplier_ethics.supplier_id GROUP BY country;",0 What is the total area of fields with soil type 'sandy'?,"CREATE TABLE fields (id INT, field_name VARCHAR(255), area FLOAT, soil_type VARCHAR(255)); ",SELECT SUM(area) FROM fields WHERE soil_type = 'sandy';,SELECT SUM(area) FROM fields WHERE soil_type ='sandy';,0 What is the average workout duration for each membership type in New York?,"CREATE TABLE users (id INT, name TEXT, membership_type TEXT, state TEXT); CREATE TABLE workouts (id INT, user_id INT, duration INT); ","SELECT users.membership_type, AVG(workouts.duration) AS avg_duration FROM users JOIN workouts ON users.id = workouts.user_id WHERE users.state = 'NY' GROUP BY users.membership_type;","SELECT users.membership_type, AVG(workouts.duration) FROM users INNER JOIN workouts ON users.id = workouts.user_id WHERE users.state = 'New York' GROUP BY users.membership_type;",0 Where is constituency number 16?,"CREATE TABLE table_name_57 (name VARCHAR, constituency_number VARCHAR);","SELECT name FROM table_name_57 WHERE constituency_number = ""16"";",SELECT name FROM table_name_57 WHERE constituency_number = 16;,0 What is Anders Forsbrand's Place?,"CREATE TABLE table_name_14 (place VARCHAR, player VARCHAR);","SELECT place FROM table_name_14 WHERE player = ""anders forsbrand"";","SELECT place FROM table_name_14 WHERE player = ""anders forsbrand"";",1 Who is the player with a t5 place and a 75-70=145 score?,"CREATE TABLE table_name_47 (player VARCHAR, place VARCHAR, score VARCHAR);","SELECT player FROM table_name_47 WHERE place = ""t5"" AND score = 75 - 70 = 145;","SELECT player FROM table_name_47 WHERE place = ""t5"" AND score = 75 - 70 = 145;",1 What are the names of unique freight forwarders operating in countries with more than 3 fulfillment centers?,"CREATE TABLE FreightForwarder (FFID INT, FFName TEXT, Country TEXT); CREATE TABLE FulfillmentCenter (FCID INT, FCName TEXT, Country TEXT); ","SELECT DISTINCT FFName, Country FROM FreightForwarder WHERE Country IN (SELECT Country FROM FulfillmentCenter GROUP BY Country HAVING COUNT(DISTINCT FCID) > 3);",SELECT DISTINCT FreightForwarder.FFName FROM FreightForwarder INNER JOIN FulfillmentCenter ON FreightForwarder.Country = FulfillmentCenter.Country GROUP BY FFName HAVING COUNT(DISTINCT FulfillmentCenter.FCID) > 3;,0 Who was the supporting actress in a film with Diane Keaton as the leading actress?,"CREATE TABLE table_24225238_1 (supporting_actress VARCHAR, leading_actress VARCHAR);","SELECT supporting_actress FROM table_24225238_1 WHERE leading_actress = ""Diane Keaton"";","SELECT supporting_actress FROM table_24225238_1 WHERE leading_actress = ""Diane Keaton"";",1 "How many skaters have a Rank in FS of 3, and a Rank in SP larger than 4?","CREATE TABLE table_name_37 (final_rank VARCHAR, rank_in_fs VARCHAR, rank_in_sp VARCHAR);",SELECT COUNT(final_rank) FROM table_name_37 WHERE rank_in_fs = 3 AND rank_in_sp > 4;,SELECT COUNT(final_rank) FROM table_name_37 WHERE rank_in_fs = 3 AND rank_in_sp > 4;,1 What was the position at the venue of lyon?,"CREATE TABLE table_name_71 (position VARCHAR, venue VARCHAR);","SELECT position FROM table_name_71 WHERE venue = ""lyon"";","SELECT position FROM table_name_71 WHERE venue = ""lyon"";",1 What is the average price of eco-friendly materials used in clothing production across all factories?,"CREATE TABLE Clothing (id INT, factory_id INT, material VARCHAR(255), price DECIMAL(5,2)); ","SELECT AVG(price) FROM Clothing WHERE material IN ('Organic Cotton', 'Recycled Polyester', 'Hemp');",SELECT AVG(price) FROM Clothing WHERE material LIKE '%eco%';,0 Which chemical storage tanks have not been inspected in the past year?,"CREATE TABLE chemical_storage_tanks (tank_id INT, tank_name VARCHAR(50), last_inspection_date DATE); ","SELECT tank_id, tank_name FROM chemical_storage_tanks WHERE last_inspection_date < DATE_SUB(CURDATE(), INTERVAL 1 YEAR);","SELECT tank_name FROM chemical_storage_tanks WHERE last_inspection_date DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 Tell me the power for 1935-45,"CREATE TABLE table_name_91 (power VARCHAR, year VARCHAR);","SELECT power FROM table_name_91 WHERE year = ""1935-45"";","SELECT power FROM table_name_91 WHERE year = ""1935-45"";",1 "What is the total sales revenue for each product category in Q1 2022, ordered by the highest revenue first?","CREATE TABLE sales (product_category VARCHAR(255), sale_date DATE, revenue DECIMAL(10, 2)); ","SELECT product_category, SUM(revenue) as total_revenue FROM sales WHERE sale_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY product_category ORDER BY total_revenue DESC;","SELECT product_category, SUM(revenue) as total_revenue FROM sales WHERE sale_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY product_category ORDER BY total_revenue DESC;",1 "Show production rates for machines in the textile manufacturing industry, ordered from highest to lowest.","CREATE TABLE machine_data (machine_type VARCHAR(50), industry VARCHAR(50), production_rate FLOAT); ","SELECT machine_type, production_rate FROM machine_data WHERE industry = 'Textile' ORDER BY production_rate DESC;","SELECT machine_type, production_rate FROM machine_data WHERE industry = 'Textile Manufacturing' ORDER BY production_rate DESC;",0 What is the average revenue per day for restaurants in Miami?,"CREATE TABLE restaurants (id INT, name TEXT, city TEXT, state TEXT, daily_revenue DECIMAL); ",SELECT AVG(daily_revenue) FROM restaurants WHERE city = 'Miami';,SELECT AVG(daily_revenue) FROM restaurants WHERE city = 'Miami';,1 List the number of hotels in each category that have a virtual tour.,"CREATE TABLE category_virtualtours (category VARCHAR(255), has_virtualtour INT); ","SELECT category, has_virtualtour FROM category_virtualtours WHERE has_virtualtour = 1;","SELECT category, COUNT(*) FROM category_virtualtours WHERE has_virtualtour = 1 GROUP BY category;",0 Which Chassis was featured in the year 1971?,"CREATE TABLE table_name_88 (chassis VARCHAR, year VARCHAR);",SELECT chassis FROM table_name_88 WHERE year = 1971;,SELECT chassis FROM table_name_88 WHERE year = 1971;,1 What was the average revenue per shipment for the month of January 2022?,"CREATE TABLE shipments (shipment_id INT, shipment_date DATE, revenue DECIMAL(10,2)); ",SELECT AVG(revenue) FROM shipments WHERE shipment_date BETWEEN '2022-01-01' AND '2022-01-31';,SELECT AVG(revenue) FROM shipments WHERE shipment_date BETWEEN '2022-01-01' AND '2022-01-31';,1 Name the record for charlotte,"CREATE TABLE table_23281862_10 (record VARCHAR, team VARCHAR);","SELECT record FROM table_23281862_10 WHERE team = ""Charlotte"";","SELECT record FROM table_23281862_10 WHERE team = ""Charlotte"";",1 How many new members joined per quarter in 2021?,"CREATE TABLE members (id INT, join_date DATE); ","SELECT DATE_TRUNC('quarter', join_date) AS quarter, COUNT(*) AS new_members FROM members WHERE YEAR(join_date) = 2021 GROUP BY quarter;","SELECT DATE_FORMAT(join_date, '%Y-%m') as quarter, COUNT(*) as new_members FROM members WHERE YEAR(join_date) = 2021 GROUP BY quarter;",0 What is the percentage of cases in the justice system in Los Angeles that involved a victim of domestic violence?,"CREATE TABLE cases (case_id INT, city VARCHAR(20), involved_domestic_violence BOOLEAN); ",SELECT (COUNT(*) FILTER (WHERE involved_domestic_violence = TRUE)) * 100.0 / COUNT(*) FROM cases WHERE city = 'Los Angeles';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM cases WHERE city = 'Los Angeles')) AS percentage FROM cases WHERE city = 'Los Angeles' AND involved_domestic_violence = true;,0 "What is Expected End Date, when Trial Start Date is Nov 2007?","CREATE TABLE table_name_65 (expected_end_date VARCHAR, trial_start_date VARCHAR);","SELECT expected_end_date FROM table_name_65 WHERE trial_start_date = ""nov 2007"";","SELECT expected_end_date FROM table_name_65 WHERE trial_start_date = ""nov 2007"";",1 Which country has the banglavision Network?,"CREATE TABLE table_name_85 (origin_of_programming VARCHAR, network VARCHAR);","SELECT origin_of_programming FROM table_name_85 WHERE network = ""banglavision"";","SELECT origin_of_programming FROM table_name_85 WHERE network = ""banglavision"";",1 What is the name of the available rock single/pack by REO Speedwagon?,"CREATE TABLE table_name_30 (single___pack_name VARCHAR, genre VARCHAR, artist VARCHAR);","SELECT single___pack_name FROM table_name_30 WHERE genre = ""rock"" AND artist = ""reo speedwagon"";","SELECT single___pack_name FROM table_name_30 WHERE genre = ""rock"" AND artist = ""reo speedwagon"";",1 What is the average donation amount for each organization in 2019?,"CREATE TABLE Donations (org_name TEXT, donation_amount INTEGER, donation_date DATE); ","SELECT org_name, AVG(donation_amount) FROM Donations WHERE donation_date BETWEEN '2019-01-01' AND '2019-12-31' GROUP BY org_name;","SELECT org_name, AVG(donation_amount) FROM Donations WHERE YEAR(donation_date) = 2019 GROUP BY org_name;",0 Identify vessels that did not perform any regulatory compliance checks in the last 6 months.,"CREATE TABLE RegulatoryChecks (id INT, vessel_id INT, check_type VARCHAR(20), check_time TIMESTAMP); ","SELECT vessel_id FROM RegulatoryChecks WHERE check_time < DATE_SUB(NOW(), INTERVAL 6 MONTH) GROUP BY vessel_id HAVING COUNT(*) = 0;","SELECT vessel_id FROM RegulatoryChecks WHERE check_time DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 6 MONTH);",0 What is the success rate of SpaceX Falcon 9 launches?,"CREATE TABLE LaunchOutcomes (mission TEXT, launch_vehicle TEXT, success BOOLEAN); ",SELECT (SUM(success) * 100.0 / COUNT(*)) AS success_rate FROM LaunchOutcomes WHERE launch_vehicle = 'Falcon 9';,SELECT success FROM LaunchOutcomes WHERE launch_vehicle = 'SpaceX Falcon 9';,0 What is the average age of attendees who have participated in 'Art in the Park' events across all regions?,"CREATE TABLE ArtInThePark (event_id INT, region VARCHAR(20), attendee_age INT); ",SELECT AVG(attendee_age) FROM ArtInThePark,"SELECT region, AVG(attendee_age) FROM ArtInThePark GROUP BY region;",0 How big in metric terms is the unit that has a ratio of 1/20?,"CREATE TABLE table_name_54 (metric_value VARCHAR, ratio VARCHAR);","SELECT metric_value FROM table_name_54 WHERE ratio = ""1/20"";","SELECT metric_value FROM table_name_54 WHERE ratio = ""1/20"";",1 What is the average delivery time for route 'R03'?,"CREATE TABLE deliveries (id INT, delivery_date DATE, route_id VARCHAR(5), delivery_time INT); ",SELECT AVG(delivery_time) FROM deliveries WHERE route_id = 'R03';,SELECT AVG(delivery_time) FROM deliveries WHERE route_id = 'R03';,1 When did Collingwood play an away game?,"CREATE TABLE table_name_53 (date VARCHAR, away_team VARCHAR);","SELECT date FROM table_name_53 WHERE away_team = ""collingwood"";","SELECT date FROM table_name_53 WHERE away_team = ""collingwood"";",1 Delete policy records for policyholders residing in 'California' in the 'Policy' table.,"CREATE TABLE Policy (policy_id INT, policyholder_state VARCHAR(20));",DELETE FROM Policy WHERE policyholder_state = 'California';,DELETE FROM Policy WHERE policyholder_state = 'California';,1 What is the maximum cargo weight for shipments to the United States in 2022?,"CREATE TABLE regions (id INT, name TEXT); CREATE TABLE countries (id INT, region_id INT, name TEXT); CREATE TABLE shipments (id INT, cargo_weight FLOAT, country_id INT); ",SELECT MAX(cargo_weight) FROM shipments INNER JOIN countries ON shipments.country_id = countries.id WHERE countries.name = 'United States' AND shipment_date BETWEEN '2022-01-01' AND '2022-12-31';,SELECT MAX(cargo_weight) FROM shipments JOIN regions ON shipments.region_id = regions.id JOIN countries ON shipments.country_id = countries.id WHERE countries.name = 'United States' AND YEAR(shipments.shipments.shipments.shipments.date) = 2022;,0 WHo has a Home of philadelphia and a Series of flyers lead 1–0?,"CREATE TABLE table_name_54 (visitor VARCHAR, home VARCHAR, series VARCHAR);","SELECT visitor FROM table_name_54 WHERE home = ""philadelphia"" AND series = ""flyers lead 1–0"";","SELECT visitor FROM table_name_54 WHERE home = ""philadelphia"" AND series = ""flyers lead 1–0"";",1 What is the size diversity in customer purchases?,"CREATE TABLE purchases (customer_id INT, product VARCHAR(255), size VARCHAR(10));","SELECT size, COUNT(DISTINCT customer_id) as unique_customers FROM purchases GROUP BY size;","SELECT size, COUNT(*) FROM purchases GROUP BY size;",0 "What was the average donation amount per month in 2021, sorted by month?","CREATE TABLE Donations (DonationID INT, DonorID INT, Amount FLOAT, DonationDate DATE); ","SELECT MONTH(DonationDate) as Month, AVG(Amount) as AvgDonation FROM Donations WHERE YEAR(DonationDate) = 2021 GROUP BY Month ORDER BY Month;","SELECT DATE_FORMAT(DonationDate, '%Y-%m') AS Month, AVG(Amount) AS AvgDonation FROM Donations WHERE YEAR(DonationDate) = 2021 GROUP BY Month ORDER BY Month;",0 Update the name of the communication campaign in the 'climate_communication' table to 'Green Horizons' if its name is 'Green Tomorrow'.,"CREATE TABLE climate_communication (campaign_name TEXT, start_date DATE, end_date DATE); ",UPDATE climate_communication SET campaign_name = 'Green Horizons' WHERE campaign_name = 'Green Tomorrow';,UPDATE climate_communication SET campaign_name = 'Green Horizons' WHERE campaign_name = 'Green Tomorrow';,1 What is the number of COVID-19 cases in Texas in the last month?,"CREATE TABLE covid (covid_id INT, patient_id INT, state VARCHAR(10), test_date DATE); ","SELECT COUNT(*) FROM covid WHERE state = 'Texas' AND test_date >= DATEADD(month, -1, GETDATE());","SELECT COUNT(*) FROM covid WHERE state = 'Texas' AND test_date >= DATEADD(month, -1, GETDATE());",1 What is the total number of discs where the run time was 4 hours 40 minutes?,"CREATE TABLE table_1180228_1 (num_of_discs VARCHAR, duration VARCHAR);","SELECT COUNT(num_of_discs) FROM table_1180228_1 WHERE duration = ""4 hours 40 minutes"";","SELECT COUNT(num_of_discs) FROM table_1180228_1 WHERE duration = ""4 hours 40 minutes"";",1 "What is the average age of readers who prefer sports news in Canada, partitioned by gender?","CREATE TABLE readers (id INT, age INT, gender VARCHAR(10), country VARCHAR(50), news_preference VARCHAR(50)); ","SELECT AVG(age) avg_age, gender FROM readers WHERE country = 'Canada' AND news_preference = 'Sports' GROUP BY gender;","SELECT gender, AVG(age) as avg_age FROM readers WHERE country = 'Canada' AND news_preference = 'Sports' GROUP BY gender;",0 "What is the lowest rank with less than 1 gold, 0 silver, 1 bronze, and a total less than 1?","CREATE TABLE table_name_75 (rank INTEGER, total VARCHAR, bronze VARCHAR, gold VARCHAR, silver VARCHAR);",SELECT MIN(rank) FROM table_name_75 WHERE gold < 1 AND silver = 0 AND bronze = 1 AND total < 1;,SELECT MIN(rank) FROM table_name_75 WHERE gold 1 AND silver = 0 AND bronze = 1 AND total 1;,0 "Get the well ID, start month, and average production forecast for wells in the Beaufort Sea, ordered by the forecast start date.","CREATE TABLE beaufort_forecasts (forecast_id INT, well_id INT, start_date DATE, end_date DATE, production_forecast FLOAT); ","SELECT well_id, EXTRACT(MONTH FROM start_date) as start_month, AVG(production_forecast) OVER (PARTITION BY well_id ORDER BY start_date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) as avg_forecast FROM beaufort_forecasts WHERE wells.location = 'Beaufort Sea';","SELECT well_id, start_date, end_date, AVG(production_forecast) as avg_production_forecast FROM beaufort_forecasts WHERE start_date >= DATEADD(month, -1, GETDATE()) GROUP BY well_id, start_date ORDER BY start_date;",0 List all the dental clinics in rural areas of Australia with their budget.,"CREATE TABLE clinics (id INT, name VARCHAR(50), location VARCHAR(50), type VARCHAR(20), budget INT);","SELECT name, budget FROM clinics WHERE location LIKE '%Australia%' AND location LIKE '%rural%' AND type = 'dental';","SELECT name, budget FROM clinics WHERE location LIKE '%rural%' AND type = 'Dental';",0 What are the contents of posts with more than 1000 impressions?,"CREATE TABLE posts (id INT PRIMARY KEY, user_id INT, content TEXT, impressions INT); ",SELECT content FROM posts WHERE impressions > 1000;,SELECT content FROM posts WHERE impressions > 1000;,1 How many people attended the game at Jahn-sportpark?,"CREATE TABLE table_24786958_2 (attendance INTEGER, game_site VARCHAR);","SELECT MIN(attendance) FROM table_24786958_2 WHERE game_site = ""Jahn-Sportpark"";","SELECT MAX(attendance) FROM table_24786958_2 WHERE game_site = ""Jahn-sportpark"";",0 Which team had car number 15?,"CREATE TABLE table_name_72 (team VARCHAR, car_no VARCHAR);","SELECT team FROM table_name_72 WHERE car_no = ""15"";","SELECT team FROM table_name_72 WHERE car_no = ""15"";",1 List all people names in the order of their date of birth from old to young.,"CREATE TABLE people (name VARCHAR, date_of_birth VARCHAR);",SELECT name FROM people ORDER BY date_of_birth;,SELECT name FROM people ORDER BY date_of_birth;,1 "What is the total transaction volume for each customer in the past month, grouped by currency?","CREATE TABLE customers (customer_id INT, name VARCHAR(255)); CREATE TABLE transactions (transaction_id INT, customer_id INT, amount DECIMAL(10,2), currency VARCHAR(3), transaction_date DATE);","SELECT c.customer_id, c.name, t.currency, SUM(t.amount) as total_transaction_volume FROM customers c INNER JOIN transactions t ON c.customer_id = t.customer_id WHERE t.transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY c.customer_id, t.currency;","SELECT c.name, t.currency, SUM(t.amount) as total_volume FROM customers c JOIN transactions t ON c.customer_id = t.customer_id WHERE t.transaction_date >= DATEADD(month, -1, GETDATE()) GROUP BY c.name, t.currency;",0 "Return all flight safety records with a severity level of ""High"" for aircraft manufactured by Boeing from the flight_safety table","CREATE TABLE flight_safety (id INT PRIMARY KEY, aircraft_model VARCHAR(100), manufacturer VARCHAR(100), severity VARCHAR(50), report_date DATE);",SELECT * FROM flight_safety WHERE manufacturer = 'Boeing' AND severity = 'High';,SELECT * FROM flight_safety WHERE severity = 'High' AND manufacturer = 'Boeing';,0 List all legal organizations that provide services related to access to justice,"CREATE TABLE legal_organizations (org_id INT, org_name VARCHAR(255), PRIMARY KEY (org_id)); ",SELECT org_name FROM legal_organizations WHERE org_name LIKE '%access to justice%';,SELECT org_name FROM legal_organizations WHERE org_name LIKE '%Access to Justice%';,0 How many consumers in North America are interested in circular economy practices?,"CREATE TABLE consumers (consumer_id INT, name VARCHAR(255), region VARCHAR(255)); CREATE TABLE interests (interest_id INT, name VARCHAR(255), is_circular_economy BOOLEAN); CREATE TABLE consumer_interests (consumer_id INT, interest_id INT); ",SELECT COUNT(DISTINCT c.consumer_id) FROM consumers c JOIN consumer_interests ci ON c.consumer_id = ci.consumer_id JOIN interests i ON ci.interest_id = i.interest_id WHERE i.is_circular_economy = TRUE AND c.region = 'North America';,SELECT COUNT(DISTINCT consumers.consumer_id) FROM consumers INNER JOIN consumer_interests ON consumers.consumer_id = consumer_interests.consumer_id INNER JOIN interests ON consumer_interests.interest_id = interests.interest_id WHERE consumers.region = 'North America' AND interests.is_circular_economy = true;,0 What is the premiere of the season where Holly Bell was the runner-up?,"CREATE TABLE table_28962227_1 (premiere VARCHAR, runners_up VARCHAR);","SELECT premiere FROM table_28962227_1 WHERE runners_up = ""Holly Bell"";","SELECT premiere FROM table_28962227_1 WHERE runners_up = ""Holly Bell"";",1 What is the average attendance that has june 24 as the date?,"CREATE TABLE table_name_14 (attendance INTEGER, date VARCHAR);","SELECT AVG(attendance) FROM table_name_14 WHERE date = ""june 24"";","SELECT AVG(attendance) FROM table_name_14 WHERE date = ""june 24"";",1 What is the maximum smart city technology adoption rate per region?,"CREATE TABLE SmartCityAdoption (region VARCHAR(20), adoption_rate FLOAT); ","SELECT region, MAX(adoption_rate) FROM SmartCityAdoption;","SELECT region, MAX(adoption_rate) FROM SmartCityAdoption GROUP BY region;",0 What is the 2013 with virgin in 2009?,CREATE TABLE table_name_5 (Id VARCHAR);,"SELECT 2013 FROM table_name_5 WHERE 2009 = ""virgin"";","SELECT 2013 FROM table_name_5 WHERE 2009 = ""virgin"";",1 Return the names of songs for which format is mp3 and resolution is below 1000.,"CREATE TABLE song (song_name VARCHAR, resolution INTEGER); CREATE TABLE song (song_name VARCHAR, f_id VARCHAR); CREATE TABLE files (f_id VARCHAR, formats VARCHAR);","SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = ""mp3"" INTERSECT SELECT song_name FROM song WHERE resolution < 1000;","SELECT T1.song_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id WHERE T2.format = ""mp3"" AND T2.resolution 1000;",0 What is the minimum length of fishing vessels in the Gulf of Mexico and the Arabian Sea?,"CREATE TABLE fishing_vessels (id INT, name VARCHAR(255), sea VARCHAR(255), length FLOAT); ","SELECT MIN(length) FROM fishing_vessels WHERE sea IN ('Gulf of Mexico', 'Arabian Sea');","SELECT MIN(length) FROM fishing_vessels WHERE sea IN ('Gulf of Mexico', 'Arabian Sea');",1 What is the average heart rate for all members during cycling workouts?,"CREATE TABLE Members (MemberID INT, Age INT, Gender VARCHAR(10), AverageHeartRate INT); CREATE TABLE Workouts (WorkoutID INT, MemberID INT, Duration INT, WorkoutType VARCHAR(20), AverageHeartRate INT); ",SELECT AVG(AverageHeartRate) FROM Members m JOIN Workouts w ON m.MemberID = w.MemberID WHERE w.WorkoutType = 'Cycling';,SELECT AVG(Members.AverageHeartRate) FROM Members INNER JOIN Workouts ON Members.MemberID = Workouts.MemberID WHERE Workouts.WorkoutType = 'Cycling';,0 What club did united states player ty harden play for?,"CREATE TABLE table_name_55 (club VARCHAR, nationality VARCHAR, player VARCHAR);","SELECT club FROM table_name_55 WHERE nationality = ""united states"" AND player = ""ty harden"";","SELECT club FROM table_name_55 WHERE nationality = ""united states"" AND player = ""ty harden"";",1 "What is To Par, when Place is ""T5"", and when Country is ""United States""?","CREATE TABLE table_name_18 (to_par VARCHAR, place VARCHAR, country VARCHAR);","SELECT to_par FROM table_name_18 WHERE place = ""t5"" AND country = ""united states"";","SELECT to_par FROM table_name_18 WHERE place = ""t5"" AND country = ""united states"";",1 What is the minimum network investment for the state of Texas in the last 12 months?,"CREATE TABLE network_investment (investment_id INT, investment_amount FLOAT, investment_date DATE, state VARCHAR(50));",SELECT MIN(investment_amount) FROM network_investment WHERE investment_date >= CURDATE() - INTERVAL 12 MONTH AND state = 'Texas';,"SELECT MIN(investment_amount) FROM network_investment WHERE state = 'Texas' AND investment_date >= DATEADD(month, -12, GETDATE());",0 "What is the highest Year, when Notes is ""Celebrity Guest Alongside YG Family""?","CREATE TABLE table_name_15 (year INTEGER, notes VARCHAR);","SELECT MAX(year) FROM table_name_15 WHERE notes = ""celebrity guest alongside yg family"";","SELECT MAX(year) FROM table_name_15 WHERE notes = ""celebrity guest alongside yg family"";",1 "In the game with an attendance of 18304, what was the final score?","CREATE TABLE table_17294353_1 (result VARCHAR, attendance VARCHAR);",SELECT result FROM table_17294353_1 WHERE attendance = 18304;,SELECT result FROM table_17294353_1 WHERE attendance = 18304;,1 Add a new song to album with ID 1 named 'Rise' with a duration of 205 seconds,"CREATE TABLE Albums (AlbumID INT PRIMARY KEY AUTO_INCREMENT, Title VARCHAR(100));CREATE TABLE Songs (SongID INT PRIMARY KEY AUTO_INCREMENT, Title VARCHAR(100), Duration INT, AlbumID INT, FOREIGN KEY (AlbumID) REFERENCES Albums(AlbumID));","INSERT INTO Songs (Title, Duration, AlbumID) VALUES ('Rise', 205, 1);","INSERT INTO Songs (SongID, Title, Duration, AlbumID) VALUES (1, 'Rise', 205);",0 Name the 2008 for 2012 f,CREATE TABLE table_name_37 (Id VARCHAR);,"SELECT 2008 FROM table_name_37 WHERE 2012 = ""f"";","SELECT 2008 FROM table_name_37 WHERE 2012 = ""f"";",1 "What is the total funding received for performing arts programs, broken down by state and program category?","CREATE TABLE Funding (Id INT, Amount DECIMAL(10,2), FundingSource VARCHAR(50), ProgramId INT);CREATE TABLE PerformingArtsPrograms (Id INT, State VARCHAR(5), Category VARCHAR(50));","SELECT P.State, P.Category, SUM(F.Amount) FROM Funding F INNER JOIN PerformingArtsPrograms P ON F.ProgramId = P.Id GROUP BY P.State, P.Category;","SELECT p.State, p.Category, SUM(f.Amount) FROM Funding f JOIN PerformingArtsPrograms p ON f.ProgramId = p.ProgramId GROUP BY p.State, p.Category;",0 Name the least evening gown for interview more than 7.97 and swimsui of 7.24,"CREATE TABLE table_name_25 (evening_gown INTEGER, swimsuit VARCHAR, interview VARCHAR);",SELECT MIN(evening_gown) FROM table_name_25 WHERE swimsuit = 7.24 AND interview > 7.97;,SELECT MIN(evening_gown) FROM table_name_25 WHERE swimsuit = 7.24 AND interview > 7.97;,1 "Identify customers who have had an increasing balance for the past three consecutive transactions, for all accounts.","CREATE TABLE accounts (customer_id INT, account_type VARCHAR(20), balance DECIMAL(10, 2), transaction_date DATE);","SELECT customer_id, account_type, balance FROM (SELECT customer_id, account_type, balance, transaction_date, LAG(balance, 2) OVER (PARTITION BY customer_id ORDER BY transaction_date) AS lag_balance_2 FROM accounts) AS lagged_accounts WHERE balance > lag_balance_2;","SELECT customer_id, account_type, balance, transaction_date FROM accounts WHERE balance >= (SELECT MAX(balance) FROM accounts WHERE transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH)) GROUP BY customer_id, account_type;",0 What is the minimum capacity of a vessel in the 'fleet_management' table?,"CREATE TABLE fleet_management (id INT, name VARCHAR(50), type VARCHAR(50), capacity INT);",SELECT MIN(capacity) FROM fleet_management;,SELECT MIN(capacity) FROM fleet_management;,1 Which Diameter has a Thickness of 1.3mm?,"CREATE TABLE table_name_93 (diameter VARCHAR, thickness VARCHAR);","SELECT diameter FROM table_name_93 WHERE thickness = ""1.3mm"";","SELECT diameter FROM table_name_93 WHERE thickness = ""1.3mm"";",1 Which are the top 5 sustainable fabric types by their total usage in all clothing items?,"CREATE TABLE TextileSourcing (FabricType VARCHAR(255), Quantity INT, IsSustainable BOOLEAN); ",SELECT FabricType FROM TextileSourcing WHERE IsSustainable = TRUE;,"SELECT FabricType, SUM(Quantity) as TotalQuantity FROM TextileSourcing WHERE IsSustainable = true GROUP BY FabricType ORDER BY TotalQuantity DESC LIMIT 5;",0 What tournament took place on Ground A with 8 rounds?,"CREATE TABLE table_name_80 (tournament VARCHAR, ground VARCHAR, round VARCHAR);","SELECT tournament FROM table_name_80 WHERE ground = ""a"" AND round = ""8"";","SELECT tournament FROM table_name_80 WHERE ground = ""a"" AND round = ""8"";",1 What is the average time to complete a production cycle for each machine?,"CREATE TABLE machines(id INT, name TEXT, location TEXT);CREATE TABLE cycles(id INT, machine_id INT, start_time TIMESTAMP, end_time TIMESTAMP); ","SELECT machine_id, AVG(TIMESTAMPDIFF(MINUTE, start_time, end_time)) as avg_time FROM cycles GROUP BY machine_id;","SELECT machines.name, AVG(cycles.end_time) as avg_time_to_complete FROM machines INNER JOIN cycles ON machines.id = cycles.machine_id GROUP BY machines.name;",0 What is the set 4 with a 2-3 score?,"CREATE TABLE table_name_73 (set_4 VARCHAR, score VARCHAR);","SELECT set_4 FROM table_name_73 WHERE score = ""2-3"";","SELECT set_4 FROM table_name_73 WHERE score = ""1-2"";",0 What is the average rating of organic lipsticks sold in Canada and the UK?,"CREATE TABLE products (product_id INT, product_name VARCHAR(100), product_type VARCHAR(50), organic BOOLEAN, rating FLOAT, country VARCHAR(50));","SELECT AVG(rating) FROM products WHERE product_type = 'lipstick' AND organic = TRUE AND country IN ('Canada', 'UK');","SELECT AVG(rating) FROM products WHERE organic = true AND country IN ('Canada', 'UK');",0 Count the number of animals in 'animal_population' table that are not present in 'endangered_species' or 'recovering_species' tables in Africa.,"CREATE TABLE animal_population (id INT, animal_name VARCHAR(50), population INT, region VARCHAR(50)); CREATE TABLE endangered_species (id INT, animal_name VARCHAR(50), population INT, region VARCHAR(50)); CREATE TABLE recovering_species (id INT, animal_name VARCHAR(50), population INT, region VARCHAR(50)); ",SELECT population FROM animal_population WHERE animal_name NOT IN (SELECT animal_name FROM endangered_species WHERE region = 'Africa') AND animal_name NOT IN (SELECT animal_name FROM recovering_species WHERE region = 'Africa');,SELECT COUNT(*) FROM animal_population INNER JOIN endangered_species ON animal_population.animal_name = endangered_species.animal_name INNER JOIN recovering_species ON animal_population.region = recovering_species.region WHERE animal_population.region = 'Africa';,0 How many award-winning films have the opening film of encounters at the end of the world?,"CREATE TABLE table_18220102_1 (award_winning_film VARCHAR, opening_film VARCHAR);","SELECT COUNT(award_winning_film) FROM table_18220102_1 WHERE opening_film = ""Encounters at the End of the World"";","SELECT COUNT(award_winning_film) FROM table_18220102_1 WHERE opening_film = ""Entrepreneurs at the end of the world"";",0 "List the number of cybersecurity incidents reported by contractors in the defense industry, in the last 6 months, sorted by severity.","CREATE TABLE cybersecurity_incidents(id INT, contractor VARCHAR(255), severity INT, date DATE);","SELECT contractor, severity, COUNT(*) as count FROM cybersecurity_incidents WHERE date > DATE_SUB(NOW(), INTERVAL 6 MONTH) GROUP BY contractor, severity ORDER BY severity DESC;","SELECT contractor, severity, COUNT(*) FROM cybersecurity_incidents WHERE date >= DATEADD(month, -6, GETDATE()) GROUP BY contractor, severity;",0 What is the Team with a Date with december 11?,"CREATE TABLE table_name_69 (team VARCHAR, date VARCHAR);","SELECT team FROM table_name_69 WHERE date = ""december 11"";","SELECT team FROM table_name_69 WHERE date = ""december 11"";",1 What is the average cargo weight for each cargo type?,"CREATE TABLE cargo_details (cargo_id INT, cargo_type VARCHAR(50), cargo_weight INT); ","SELECT cargo_type, AVG(cargo_weight) FROM cargo_details GROUP BY cargo_type;","SELECT cargo_type, AVG(cargo_weight) FROM cargo_details GROUP BY cargo_type;",1 What is the maximum market price of Europium in the USA?,"CREATE TABLE Europium_Market_Prices (id INT, year INT, country VARCHAR(20), market_price DECIMAL(10,2));",SELECT MAX(market_price) FROM Europium_Market_Prices WHERE country = 'USA';,SELECT MAX(market_price) FROM Europium_Market_Prices WHERE country = 'USA';,1 What is the total number of cases heard in community courts by gender?,"CREATE TABLE community_courts (id INT, case_number INT, gender VARCHAR(10));","SELECT gender, COUNT(*) FROM community_courts GROUP BY gender;","SELECT gender, COUNT(*) FROM community_courts GROUP BY gender;",1 What is the total waste produced (in metric tons) by the 'plastic' manufacturing department in 2022?,"CREATE TABLE waste (waste_id INT, date DATE, department VARCHAR(20), material VARCHAR(10), quantity FLOAT); ",SELECT SUM(quantity) FROM waste WHERE department = 'plastic' AND date BETWEEN '2022-01-01' AND '2022-12-31' AND material = 'plastic';,SELECT SUM(quantity) FROM waste WHERE department = 'plastic' AND date BETWEEN '2022-01-01' AND '2022-12-31';,0 Update the budget of military innovation projects based on conditions.,"CREATE TABLE military_innovation (id INT, project VARCHAR(255), budget INT, priority INT);",UPDATE military_innovation SET budget = budget * 1.1 WHERE priority > 5;,UPDATE military_innovation SET budget = budget * 100.0 WHERE priority = 'Military Innovation';,0 What RECNet has 40 watts of power and temagami as the city of license?,"CREATE TABLE table_name_20 (recnet VARCHAR, power VARCHAR, city_of_license VARCHAR);","SELECT recnet FROM table_name_20 WHERE power = ""40 watts"" AND city_of_license = ""temagami"";","SELECT recnet FROM table_name_20 WHERE power = ""40 watts"" AND city_of_license = ""temegami"";",0 "What is the policy type and corresponding risk score for each policy, ordered by risk score in ascending order, for policies issued in 'Texas'?","CREATE TABLE Policies (PolicyID INT, PolicyType VARCHAR(20), IssueState VARCHAR(20), RiskScore DECIMAL(5,2)); ","SELECT PolicyType, RiskScore FROM Policies WHERE IssueState = 'Texas' ORDER BY RiskScore ASC;","SELECT PolicyType, RiskScore FROM Policies WHERE IssueState = 'Texas' ORDER BY RiskScore ASC;",1 What score has friendly as the competition?,"CREATE TABLE table_name_11 (score VARCHAR, competition VARCHAR);","SELECT score FROM table_name_11 WHERE competition = ""friendly"";","SELECT score FROM table_name_11 WHERE competition = ""friendly"";",1 Insert a new record for a chemical named 'Ethyl Acetate' with a safety_rating of 5,"CREATE TABLE chemical_table (chemical_id INT, chemical_name VARCHAR(50), safety_rating INT);","INSERT INTO chemical_table (chemical_name, safety_rating) VALUES ('Ethyl Acetate', 5);","INSERT INTO chemical_table (chemical_name, safety_rating) VALUES ('Ethyl Acetate', 5);",1 What are the top 3 most viewed foreign language movies?,"CREATE TABLE movie (id INT, title VARCHAR(50), genre VARCHAR(20), language VARCHAR(20), viewers INT); ",SELECT title FROM movie WHERE language != 'English' ORDER BY viewers DESC LIMIT 3;,"SELECT title, language, viewers FROM movie ORDER BY viewers DESC LIMIT 3;",0 What is the average water temperature in the Atlantic Ocean for salmon farms?,"CREATE TABLE Atlantic_Ocean (id INT, temperature DECIMAL(5,2)); CREATE TABLE Salmon_Farms (id INT, ocean VARCHAR(20)); ",SELECT AVG(Atlantic_Ocean.temperature) FROM Atlantic_Ocean INNER JOIN Salmon_Farms ON Atlantic_Ocean.id = Salmon_Farms.id WHERE Salmon_Farms.ocean = 'Atlantic';,SELECT AVG(Atlantic_Ocean.temperature) FROM Atlantic_Ocean INNER JOIN Salmon_Farms ON Atlantic_Ocean.id = Salmon_Farms.id WHERE Salmon_Farms.ocean = 'Atlantic';,1 "Create a new table named 'conservation_events' with columns: id (INT), event_name (VARCHAR(50)), location (VARCHAR(100)), event_date (DATE)","CREATE TABLE animals (id INT, name VARCHAR(50), status VARCHAR(20)); CREATE TABLE habitat_preservation (id INT, location VARCHAR(100), acres FLOAT); CREATE TABLE community_education (id INT, event_name VARCHAR(50), date DATE, attendees INT);","CREATE TABLE conservation_events (id INT, event_name VARCHAR(50), location VARCHAR(100), event_date DATE);","CREATE TABLE conservation_events (id INT, event_name VARCHAR(50), location VARCHAR(100), event_date (DATE));",0 What are the top 5 countries with the highest number of virtual tours in 2022?,"CREATE TABLE Countries (id INT, name VARCHAR(255)); CREATE TABLE VirtualTours (id INT, country_id INT, year INT, views INT); ","SELECT c.name, SUM(vt.views) as total_views FROM Countries c JOIN VirtualTours vt ON c.id = vt.country_id WHERE vt.year = 2022 GROUP BY c.name ORDER BY total_views DESC LIMIT 5;","SELECT c.name, SUM(vt.views) as total_views FROM Countries c JOIN VirtualTours vt ON c.id = vt.country_id WHERE vt.year = 2022 GROUP BY c.name ORDER BY total_views DESC LIMIT 5;",1 Create a table for public awareness campaigns,"CREATE TABLE public_awareness_campaigns (id INT PRIMARY KEY, name VARCHAR(255), description TEXT, start_date DATE, end_date DATE);","CREATE TABLE public_awareness_campaigns (id INT PRIMARY KEY, name VARCHAR(255), description TEXT, start_date DATE, end_date DATE);","CREATE TABLE public_awareness_campaigns (id INT PRIMARY KEY, name VARCHAR(255), description TEXT, start_date DATE, end_date DATE);",1 How many smart contract updates were made in the 'DeFi' regulatory framework during Q1 2022?,"CREATE TABLE regulatory_frameworks (framework_name VARCHAR(10), quarter INT, update_count INT); ",SELECT update_count FROM regulatory_frameworks WHERE framework_name = 'DeFi' AND quarter = 1;,SELECT SUM(update_count) FROM regulatory_frameworks WHERE framework_name = 'DeFi' AND quarter = 1;,0 What's the cores with the part number cl8064701477202?,"CREATE TABLE table_name_89 (cores VARCHAR, part_number_s_ VARCHAR);","SELECT cores FROM table_name_89 WHERE part_number_s_ = ""cl8064701477202"";","SELECT cores FROM table_name_89 WHERE part_number_s_ = ""cl8064701477202"";",1 "What is the total number of artworks created by each artist in the 'Artworks' table, ordered by the total count in descending order?","CREATE TABLE Artworks (id INT, art_category VARCHAR(255), artist_name VARCHAR(255), year INT, art_medium VARCHAR(255), price DECIMAL(10,2));","SELECT artist_name, COUNT(*) as total FROM Artworks GROUP BY artist_name ORDER BY total DESC;","SELECT artist_name, COUNT(*) as total_artworks FROM Artworks GROUP BY artist_name ORDER BY total_artworks DESC;",0 What was the score of the match played on 18 January 1999?,"CREATE TABLE table_name_48 (outcome VARCHAR, date VARCHAR);","SELECT outcome FROM table_name_48 WHERE date = ""18 january 1999"";","SELECT outcome FROM table_name_48 WHERE date = ""18 january 1999"";",1 Which Crowd has a Venue of princes park?,"CREATE TABLE table_name_25 (crowd INTEGER, venue VARCHAR);","SELECT MIN(crowd) FROM table_name_25 WHERE venue = ""princes park"";","SELECT SUM(crowd) FROM table_name_25 WHERE venue = ""princes park"";",0 "What is Replaced By, when Outgoing Manager is ""Ünal Karaman""?","CREATE TABLE table_name_66 (replaced_by VARCHAR, outgoing_manager VARCHAR);","SELECT replaced_by FROM table_name_66 WHERE outgoing_manager = ""ünal karaman"";","SELECT replaced_by FROM table_name_66 WHERE outgoing_manager = ""ünal karaman"";",1 What is the health equity metric trend for a specific community in the past 6 months?,"CREATE TABLE HealthEquityMetrics (MetricID INT, Community VARCHAR(25), MetricDate DATE, Value FLOAT); ","SELECT MetricDate, Value FROM HealthEquityMetrics WHERE Community = 'Bronx' AND MetricDate >= DATEADD(month, -6, GETDATE()) ORDER BY MetricDate;","SELECT Community, AVG(Value) as AvgValue FROM HealthEquityMetrics WHERE MetricDate >= DATEADD(month, -6, GETDATE()) GROUP BY Community;",0 What is the maximum funding amount for startups founded by a team of at least two people in the renewable energy industry?,"CREATE TABLE startup (id INT, name TEXT, industry TEXT, founder_count INT, founder_gender TEXT); ",SELECT MAX(funding_amount) FROM investment_rounds ir JOIN startup s ON ir.startup_id = s.id WHERE s.industry = 'Renewable Energy' AND s.founder_count >= 2;,SELECT MAX(funding_amount) FROM startup WHERE industry = 'Renewable Energy' AND founder_gender = 'Female';,0 How many customers in each size range purchased sustainable garments in the last 6 months?,"CREATE TABLE Customers (CustomerID INT, SizeRange TEXT); CREATE TABLE GarmentSales (SaleID INT, CustomerID INT, GarmentID INT, PurchaseDate DATE); CREATE TABLE Garments (GarmentID INT, GarmentName TEXT, IsSustainable BOOLEAN); ","SELECT SizeRange, COUNT(*) FROM Customers c JOIN GarmentSales s ON c.CustomerID = s.CustomerID JOIN Garments g ON s.GarmentID = g.GarmentID WHERE IsSustainable = TRUE AND PurchaseDate >= DATEADD(MONTH, -6, CURRENT_DATE) GROUP BY SizeRange;","SELECT c.SizeRange, COUNT(gs.CustomerID) FROM Customers c JOIN GarmentSales gs ON c.CustomerID = gs.CustomerID JOIN Garments g ON gs.GarmentID = g.GarmentID WHERE g.IsSustainable = TRUE AND gs.PurchaseDate >= DATEADD(month, -6, GETDATE()) GROUP BY c.SizeRange;",0 List all chemical types produced in each manufacturing plant in the past year.,"CREATE TABLE Production (id INT, plant VARCHAR(255), chemical VARCHAR(255), production_date DATE); ","SELECT plant, chemical FROM Production WHERE production_date >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR) GROUP BY plant, chemical","SELECT plant, chemical, production_date FROM Production WHERE production_date >= DATEADD(year, -1, GETDATE()) GROUP BY plant, chemical;",0 "Insert a new record into the 'design_codes' table with the following data: 'Building Safety Code', '2022', 'Current'","CREATE TABLE design_codes (code_id INT, code_name TEXT, code_version INT, code_status TEXT);","INSERT INTO design_codes (code_name, code_version, code_status) VALUES ('Building Safety Code', 2022, 'Current');","INSERT INTO design_codes (code_name, code_version, code_status) VALUES ('Building Safety Code', '2022', 'Current');",0 What is the name of the digital asset with the most transactions?,"CREATE TABLE transactions (id INT, app_id INT, timestamp TIMESTAMP); CREATE TABLE digital_assets (id INT, name TEXT, app_id INT); ",SELECT name FROM digital_assets JOIN transactions ON digital_assets.app_id = transactions.app_id GROUP BY name ORDER BY COUNT(*) DESC LIMIT 1;,SELECT d.name FROM digital_assets d JOIN transactions t ON d.app_id = t.id GROUP BY d.name ORDER BY COUNT(*) DESC LIMIT 1;,0 What is the Date of the athlete in the shot put Event?,"CREATE TABLE table_name_19 (date VARCHAR, event VARCHAR);","SELECT date FROM table_name_19 WHERE event = ""shot put"";","SELECT date FROM table_name_19 WHERE event = ""shot put"";",1 what is the circuit when the date is 16 april?,"CREATE TABLE table_name_60 (circuit VARCHAR, date VARCHAR);","SELECT circuit FROM table_name_60 WHERE date = ""16 april"";","SELECT circuit FROM table_name_60 WHERE date = ""16 april"";",1 "Which Record has a Location/Attendance of palace of auburn hills 8,108?","CREATE TABLE table_name_22 (record VARCHAR, location_attendance VARCHAR);","SELECT record FROM table_name_22 WHERE location_attendance = ""palace of auburn hills 8,108"";","SELECT record FROM table_name_22 WHERE location_attendance = ""palace of auburn hills 8,108"";",1 What is the average number of electric vehicles in the fleet_inventory table?,"CREATE TABLE fleet_inventory (id INT, ev_type VARCHAR(20), quantity INT); ",SELECT AVG(quantity) FROM fleet_inventory WHERE ev_type LIKE 'electric%';,SELECT AVG(quantity) FROM fleet_inventory WHERE ev_type = 'Electric';,0 List the ingredient sources for all vegan cosmetic products.,"CREATE TABLE ingredients (product_id INT, ingredient VARCHAR(50), source_country VARCHAR(50)); CREATE TABLE products (product_id INT, is_vegan BOOLEAN); ","SELECT i.ingredient, i.source_country FROM ingredients i JOIN products p ON i.product_id = p.product_id WHERE p.is_vegan = true;",SELECT ingredients.source_country FROM ingredients INNER JOIN products ON ingredients.product_id = products.product_id WHERE products.is_vegan = true;,0 What is the total revenue generated from garment manufacturing in 'Asia' in Q1 2022?,"CREATE TABLE asia_manufacturing(region VARCHAR(20), revenue INT, manufacturing_date DATE); ",SELECT SUM(revenue) FROM asia_manufacturing WHERE region = 'Asia' AND manufacturing_date >= '2022-01-01' AND manufacturing_date <= '2022-03-31';,SELECT SUM(revenue) FROM asia_manufacturing WHERE region = 'Asia' AND manufacturing_date BETWEEN '2022-01-01' AND '2022-03-31';,0 How many times did Arsenal tie when they were away?,"CREATE TABLE table_name_2 (tie_no VARCHAR, away_team VARCHAR);","SELECT tie_no FROM table_name_2 WHERE away_team = ""arsenal"";","SELECT tie_no FROM table_name_2 WHERE away_team = ""arsenal"";",1 What is the lowest capacity with an opening larger than 2015 in Trabzon?,"CREATE TABLE table_name_95 (capacity INTEGER, opening VARCHAR, city VARCHAR);","SELECT MIN(capacity) FROM table_name_95 WHERE opening > 2015 AND city = ""trabzon"";","SELECT MIN(capacity) FROM table_name_95 WHERE opening > 2015 AND city = ""trabzon"";",1 "For the area which was 9.1 in October 2010, what is the figure for October 2012?","CREATE TABLE table_21531764_1 (october_2012 VARCHAR, october_2010 VARCHAR);","SELECT october_2012 FROM table_21531764_1 WHERE october_2010 = ""9.1"";","SELECT october_2012 FROM table_21531764_1 WHERE october_2010 = ""9.1"";",1 How many Liquidat (c) have a purpose of dual (machine & hand composition)?,"CREATE TABLE table_name_94 (liquidat__ VARCHAR, purpose VARCHAR);","SELECT COUNT(liquidat__) AS °c_ FROM table_name_94 WHERE purpose = ""dual (machine & hand composition)"";","SELECT COUNT(liquidat__) FROM table_name_94 WHERE purpose = ""dual (machine & hand composition)"";",0 What nationality is Rod Langway?,"CREATE TABLE table_name_79 (nationality VARCHAR, player VARCHAR);","SELECT nationality FROM table_name_79 WHERE player = ""rod langway"";","SELECT nationality FROM table_name_79 WHERE player = ""rod langway"";",1 Find the maximum gas production volume for the year 2021 from the 'gas_production' table,"CREATE TABLE gas_production (well_id INT, year INT, gas_volume FLOAT);",SELECT MAX(gas_volume) FROM gas_production WHERE year = 2021;,SELECT MAX(gas_volume) FROM gas_production WHERE year = 2021;,1 What is the average methane emission rate for each country?,"CREATE TABLE methane_emissions (country VARCHAR(255), emission_rate FLOAT);","SELECT country, AVG(emission_rate) FROM methane_emissions GROUP BY country;","SELECT country, AVG(emission_rate) FROM methane_emissions GROUP BY country;",1 Find the top 3 most visited African countries for ecotourism in 2025.,"CREATE TABLE africa_tourism (country VARCHAR(50), year INT, ecotourism_visitors INT); ","SELECT country, ecotourism_visitors FROM africa_tourism WHERE year = 2025 ORDER BY ecotourism_visitors DESC LIMIT 3;","SELECT country, ecotourism_visitors FROM africa_tourism WHERE year = 2025 ORDER BY ecotourism_visitors DESC LIMIT 3;",1 What is the percentage of the population that is obese in each state in the US?,"CREATE TABLE obesity (id INT, state TEXT, obese BOOLEAN); ","SELECT state, (SUM(obese) * 100.0 / COUNT(*)) FROM obesity GROUP BY state;","SELECT state, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM obesity WHERE obese = true)) * 100.0 / (SELECT COUNT(*) FROM obesity WHERE obese = true GROUP BY state) as obese_percentage FROM obesity WHERE obese = true GROUP BY state;",0 Who was the captain of the away team at Adelaide Oval?,"CREATE TABLE table_name_84 (away_captain VARCHAR, venue VARCHAR);","SELECT away_captain FROM table_name_84 WHERE venue = ""adelaide oval"";","SELECT away_captain FROM table_name_84 WHERE venue = ""adelaide oval"";",1 Delete artists who haven't sold any works in the last 5 years.,"CREATE TABLE Artists (id INT, name VARCHAR(255), last_sale_date DATE); CREATE TABLE Sales (id INT, artist_id INT, sale_date DATE);","DELETE FROM Artists WHERE id IN (SELECT artist_id FROM Sales WHERE sale_date > DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR)) AND last_sale_date < DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR);","DELETE FROM Artists WHERE id NOT IN (SELECT artist_id FROM Sales WHERE sale_date DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR);",0 What is the FY2008 $mil value associated with a FY2007 $mil value of exactly $120?,"CREATE TABLE table_25438110_5 (fy08_$millions VARCHAR, fy07_$millions VARCHAR);","SELECT fy08_$millions FROM table_25438110_5 WHERE fy07_$millions = ""$120"";","SELECT fy08_$millions FROM table_25438110_5 WHERE fy07_$millions = ""120"";",0 "What is the average water consumption per manufacturing process, partitioned by month and supplier, and ordered by the average water consumption?","CREATE TABLE water_consumption (consumption_id INT, process_id INT, supplier_id INT, consumption_date DATE, water_consumption INT); ","SELECT process_id, supplier_id, DATE_TRUNC('month', consumption_date) AS month, AVG(water_consumption) AS avg_water_consumption, RANK() OVER (PARTITION BY process_id, supplier_id ORDER BY AVG(water_consumption) DESC) AS ranking FROM water_consumption GROUP BY process_id, supplier_id, month ORDER BY avg_water_consumption DESC;","SELECT DATE_FORMAT(consumption_date, '%Y-%m') as month, supplier_id, AVG(water_consumption) as avg_water_consumption FROM water_consumption GROUP BY month, supplier_id ORDER BY avg_water_consumption DESC;",0 "For week of top 9, what were the results?","CREATE TABLE table_22736523_1 (result VARCHAR, week__number VARCHAR);","SELECT result FROM table_22736523_1 WHERE week__number = ""Top 9"";","SELECT result FROM table_22736523_1 WHERE week__number = ""Top 9"";",1 How many final scores were there on the game at Amsterdam arena?,"CREATE TABLE table_24786958_2 (final_score VARCHAR, game_site VARCHAR);","SELECT COUNT(final_score) FROM table_24786958_2 WHERE game_site = ""Amsterdam ArenA"";","SELECT final_score FROM table_24786958_2 WHERE game_site = ""Amsterdam Arena"";",0 Which poll source had an other of 15%?,"CREATE TABLE table_name_38 (poll_source VARCHAR, other VARCHAR);","SELECT poll_source FROM table_name_38 WHERE other = ""15%"";","SELECT poll_source FROM table_name_38 WHERE other = ""15 %"";",0 order all gas station locations by the opening year.,"CREATE TABLE gas_station (LOCATION VARCHAR, open_year VARCHAR);",SELECT LOCATION FROM gas_station ORDER BY open_year;,SELECT LOCATION FROM gas_station ORDER BY open_year;,1 What is the mean number of played when there are less than 18 points and the position is less than 8?,"CREATE TABLE table_name_45 (played INTEGER, points VARCHAR, position VARCHAR);",SELECT AVG(played) FROM table_name_45 WHERE points < 18 AND position < 8;,SELECT AVG(played) FROM table_name_45 WHERE points 18 AND position 8;,0 What is the maximum production quantity for wells owned by 'Big Oil' and located in the 'North Sea'?,"CREATE TABLE wells (id INT, name VARCHAR(255), location VARCHAR(255), owner VARCHAR(255), production_quantity INT); ",SELECT MAX(production_quantity) FROM wells WHERE location = 'North Sea' AND owner = 'Big Oil';,SELECT MAX(production_quantity) FROM wells WHERE owner = 'Big Oil' AND location = 'North Sea';,0 Name the recopa sudamericana 1992 for did not qualify for libertadores 1992 and round of 16 for bragantino,"CREATE TABLE table_15013825_8 (recopa_sudamericana_1992 VARCHAR, team VARCHAR, copa_libertadores_1992 VARCHAR, copa_conmebol_1992 VARCHAR);","SELECT recopa_sudamericana_1992 FROM table_15013825_8 WHERE copa_libertadores_1992 = ""Did not qualify"" AND copa_conmebol_1992 = ""Round of 16"" AND team = ""Bragantino"";","SELECT recopa_sudamericana_1992 FROM table_15013825_8 WHERE copa_libertadores_1992 = ""did not qualify"" AND copa_conmebol_1992 = ""round of 16"" AND team = ""Bragantino"";",0 "SELECT MemberID, AVG(Steps) as AverageSteps, AVG(Calories) as AverageCalories, AVG(HeartRate) as AverageHeartRate FROM Wearables GROUP BY MemberID ORDER BY AverageSteps DESC;","CREATE TABLE Wearables (DeviceID INT, MemberID INT, Steps INT, Calories INT, HeartRate INT, Date DATE); ","SELECT DISTINCT MemberID, WorkoutType FROM Workouts WHERE Duration > 45;","SELECT MemberID, AVG(Steps) as AverageSteps, AVG(Calories) as AverageCalories, AVG(HeartRate) as AverageHeartRate FROM Wearables GROUP BY MemberID ORDER BY AverageSteps DESC;",0 Name the date for broadcast fsn,"CREATE TABLE table_26842217_18 (date VARCHAR, broadcast VARCHAR);","SELECT date FROM table_26842217_18 WHERE broadcast = ""FSN"";","SELECT date FROM table_26842217_18 WHERE broadcast = ""FSN"";",1 How many satellites were launched by the European Space Agency (ESA) in total?,"CREATE TABLE esa_satellites (id INT, satellite_name VARCHAR(255), launch_date DATE, organization VARCHAR(255)); ",SELECT COUNT(*) FROM esa_satellites;,SELECT COUNT(*) FROM esa_satellites WHERE organization = 'ESA';,0 What was the TO par for the player who scored 68-71=139?,"CREATE TABLE table_name_73 (to_par VARCHAR, score VARCHAR);",SELECT to_par FROM table_name_73 WHERE score = 68 - 71 = 139;,SELECT to_par FROM table_name_73 WHERE score = 68 - 71 = 139;,1 What is the average price of sustainable clothing items by designer?,"CREATE TABLE ClothingItems (ItemID INT, ItemName TEXT, DesignerID INT, IsSustainable BOOLEAN, Price INT); CREATE TABLE Designers (DesignerID INT, DesignerName TEXT); ","SELECT DesignerName, AVG(Price) as AvgSustainablePrice FROM ClothingItems JOIN Designers ON ClothingItems.DesignerID = Designers.DesignerID WHERE IsSustainable = true GROUP BY DesignerName;","SELECT DesignerName, AVG(Price) FROM ClothingItems JOIN Designers ON ClothingItems.DesignerID = Designers.DesignerID WHERE IsSustainable = TRUE GROUP BY DesignerName;",0 "What date was the game played in seattle center coliseum 12,126?","CREATE TABLE table_27902171_7 (date VARCHAR, location_attendance VARCHAR);","SELECT date FROM table_27902171_7 WHERE location_attendance = ""Seattle Center Coliseum 12,126"";","SELECT date FROM table_27902171_7 WHERE location_attendance = ""Seattle Center Coliseum 12,126"";",1 What is the name of the episode # 11 in the season?,"CREATE TABLE table_25277262_2 (title VARCHAR, no_in_season VARCHAR);",SELECT title FROM table_25277262_2 WHERE no_in_season = 11;,SELECT title FROM table_25277262_2 WHERE no_in_season = 11;,1 Update the ticket price for basketball matches in the 'basketball_tickets' table in January to 50?,"CREATE TABLE basketball_tickets (ticket_id INT, match_id INT, price DECIMAL(5,2), date DATE);",UPDATE basketball_tickets SET price = 50 WHERE MONTH(date) = 1;,UPDATE basketball_tickets SET price = 50 WHERE date BETWEEN '2022-01-01' AND '2022-01-31';,0 "Which Lungchang has a Halang of ʒɯ², and a Rera of ʒo²?","CREATE TABLE table_name_85 (lungchang VARCHAR, halang VARCHAR, rera VARCHAR);","SELECT lungchang FROM table_name_85 WHERE halang = ""ʒɯ²"" AND rera = ""ʒo²"";","SELECT lungchang FROM table_name_85 WHERE halang = ""2"" AND rera = ""o2"";",0 "The game played on October 2, 1966 had what result?","CREATE TABLE table_name_40 (result VARCHAR, date VARCHAR);","SELECT result FROM table_name_40 WHERE date = ""october 2, 1966"";","SELECT result FROM table_name_40 WHERE date = ""october 2, 1966"";",1 "How many cases were handled by attorneys in each state, based on the 'attorney_state' column in the 'attorneys' table?","CREATE TABLE attorneys (attorney_id INT, attorney_state VARCHAR(255)); CREATE TABLE cases (case_id INT, attorney_id INT);","SELECT a.attorney_state, COUNT(c.case_id) FROM attorneys a INNER JOIN cases c ON a.attorney_id = c.attorney_id GROUP BY a.attorney_state;","SELECT attorneys.attorney_state, COUNT(cases.case_id) FROM attorneys INNER JOIN cases ON attorneys.attorney_id = cases.attorney_id GROUP BY attorneys.attorney_state;",0 what is the number of teams where conmebol 1996 did not qualify?,"CREATE TABLE table_14310205_1 (team VARCHAR, conmebol_1996 VARCHAR);","SELECT COUNT(team) FROM table_14310205_1 WHERE conmebol_1996 = ""did not qualify"";","SELECT COUNT(team) FROM table_14310205_1 WHERE conmebol_1996 = ""Not Qualified"";",0 What is the total budget allocated for education in 2022 across all cities in the 'city_education' table?,"CREATE TABLE city_education (city VARCHAR(255), budget INT); ",SELECT SUM(budget) FROM city_education WHERE YEAR(event_date) = 2022 AND category = 'education';,SELECT SUM(budget) FROM city_education WHERE year = 2022;,0 What is the percentage of total donations received from donors in Canada?,"CREATE TABLE Donors (DonorID int, Name varchar(50), TotalDonation decimal(10,2), Country varchar(50)); ",SELECT (SUM(CASE WHEN Country = 'Canada' THEN TotalDonation ELSE 0 END) / SUM(TotalDonation)) * 100 as Percentage FROM Donors;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Donors WHERE Country = 'Canada')) * 100.0 / (SELECT COUNT(*) FROM Donors WHERE Country = 'Canada') AS Percentage FROM Donors WHERE Country = 'Canada';,0 Insert records for company GHI founded in 2012 and 2017 into the 'company_founding_data' table,"CREATE TABLE company_founding_data (company_name VARCHAR(50), founding_year INT);","INSERT INTO company_founding_data (company_name, founding_year) VALUES ('GHI', 2012), ('GHI', 2017);","INSERT INTO company_founding_data (company_name, founding_year) VALUES ('GHI', 2012, 2017);",0 What is the total revenue for all restaurants?,"CREATE TABLE restaurant (restaurant_id INT, revenue INT); ",SELECT SUM(revenue) FROM restaurant;,SELECT SUM(revenue) FROM restaurant;,1 Who are the top 3 contributing authors in explainable AI area?,"CREATE TABLE explainable_ai_papers (author_id INT, author_name VARCHAR(255), paper_title VARCHAR(255), num_citations INT); ","SELECT author_name, SUM(num_citations) as total_citations FROM explainable_ai_papers GROUP BY author_name ORDER BY total_citations DESC LIMIT 3;","SELECT author_name, num_citations FROM explainable_ai_papers ORDER BY num_citations DESC LIMIT 3;",0 What is the maximum yield of crops grown by farmer 'f003'?,"CREATE TABLE farmer_crops_2 (farmer_id TEXT, crop_name TEXT, yield INTEGER); ",SELECT MAX(yield) FROM farmer_crops_2 WHERE farmer_id = 'f003';,SELECT MAX(yield) FROM farmer_crops_2 WHERE farmer_id = 'f003';,1 List the financial wellbeing programs in Africa with the lowest average monthly cost.,"CREATE TABLE programs (id INT PRIMARY KEY, program_name VARCHAR(255), region_id INT, is_financial_wellbeing BOOLEAN, monthly_cost DECIMAL(5,2)); CREATE TABLE regions (id INT PRIMARY KEY, name VARCHAR(255), country VARCHAR(255)); CREATE VIEW program_views AS SELECT programs.id, programs.program_name, programs.region_id, programs.is_financial_wellbeing, programs.monthly_cost, regions.country FROM programs INNER JOIN regions ON TRUE;","SELECT program_views.program_name, program_views.monthly_cost FROM program_views WHERE program_views.is_financial_wellbeing = TRUE AND regions.country = 'Africa' ORDER BY program_views.monthly_cost ASC LIMIT 1;","SELECT programs.program_name, AVG(program_views.monthly_cost) as avg_monthly_cost FROM programs INNER JOIN program_views ON programs.id = program_views.program_id INNER JOIN regions ON program_views.region_id = regions.id WHERE programs.is_financial_wellbeing = true AND regions.country = 'Africa' GROUP BY programs.program_name ORDER BY avg_monthly_cost DESC LIMIT 1;",0 Who has the world record of 153kg in the clean & jerk?,CREATE TABLE table_name_27 (world_record VARCHAR);,"SELECT 153 AS kg FROM table_name_27 WHERE world_record = ""clean & jerk"";","SELECT world_record FROM table_name_27 WHERE world_record = ""153kg"";",0 "List the total number of agricultural innovation projects and their budgets in the 'rural_development' database, focused on 'Mechanization' type projects, sorted by budget in descending order.","CREATE TABLE innovation_projects (id INT PRIMARY KEY, name TEXT, type TEXT, budget INT); ","SELECT COUNT(id) as total_mechanization_projects, SUM(budget) as total_budget FROM innovation_projects WHERE type = 'Mechanization' ORDER BY total_budget DESC;","SELECT COUNT(*), budget FROM innovation_projects WHERE type = 'Mechanization' ORDER BY budget DESC;",0 How many space missions were led by astronauts from Canada?,"CREATE TABLE SpaceMissions (id INT, name VARCHAR(50), leader_nationality VARCHAR(50)); ",SELECT COUNT(*) FROM SpaceMissions WHERE leader_nationality = 'Canada';,SELECT COUNT(*) FROM SpaceMissions WHERE leader_nationality = 'Canada';,1 How many silver medals were won by the participant(s) that had more than 12 gold medals and 11 bronze medals?,"CREATE TABLE table_name_54 (silver VARCHAR, gold VARCHAR, bronze VARCHAR);",SELECT silver FROM table_name_54 WHERE gold > 12 AND bronze = 11;,SELECT COUNT(silver) FROM table_name_54 WHERE gold > 12 AND bronze = 11;,0 What was the total organic matter (in kg) in soil samples from each region in 2020?,"CREATE TABLE soil_samples (id INT, region_id INT, organic_matter_kg FLOAT, date DATE);","SELECT region_id, SUM(organic_matter_kg) FROM soil_samples WHERE YEAR(date) = 2020 GROUP BY region_id;","SELECT region_id, SUM(organic_matter_kg) as total_organic_matter_kg FROM soil_samples WHERE date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY region_id;",0 "Which money is the highest one that has a To par of –1, and a Score of 73-70-73-71=287?","CREATE TABLE table_name_56 (money___ INTEGER, to_par VARCHAR, score VARCHAR);","SELECT MAX(money___) AS $__ FROM table_name_56 WHERE to_par = ""–1"" AND score = 73 - 70 - 73 - 71 = 287;","SELECT MAX(money___) FROM table_name_56 WHERE to_par = ""–1"" AND score = 73 - 70 - 73 - 71 = 287;",0 List all the renewable energy sources and their corresponding capacities in MW for the region of New England in 2022.,"CREATE TABLE renewable_energy (region VARCHAR(20), energy_source VARCHAR(20), capacity INT, year INT); ","SELECT energy_source, capacity FROM renewable_energy WHERE region = 'New England' AND year = 2022;","SELECT energy_source, capacity FROM renewable_energy WHERE region = 'New England' AND year = 2022;",1 "Show the number of satellites in the satellite_database table, grouped by their orbit_type and order by the count in descending order, only showing the top 3 orbit types","CREATE TABLE satellite_database (id INT, name VARCHAR(50), type VARCHAR(50), orbit_type VARCHAR(50), country VARCHAR(50), launch_date DATE);","SELECT orbit_type, COUNT(*) as satellite_count FROM satellite_database GROUP BY orbit_type ORDER BY satellite_count DESC LIMIT 3;","SELECT orbit_type, COUNT(*) as num_satellites FROM satellite_database GROUP BY orbit_type ORDER BY num_satellites DESC;",0 Delete all donations from 'Smithville Library',"CREATE TABLE Donations (donation_id INT, donor_name VARCHAR(50), location VARCHAR(50), amount DECIMAL(10,2)); ",DELETE FROM Donations WHERE location = 'Smithville Library';,DELETE FROM Donations WHERE location = 'Smithville Library';,1 "In what place did Des Smyth, who scored less than 71, finish?","CREATE TABLE table_name_23 (place VARCHAR, score VARCHAR, player VARCHAR);","SELECT place FROM table_name_23 WHERE score < 71 AND player = ""des smyth"";","SELECT place FROM table_name_23 WHERE score 71 AND player = ""des smyth"";",0 What was the earliest date and latest date for disability accommodations provided in 2022?,"CREATE TABLE DisabilityAccommodations (AccommodationID INT, DisabilityType VARCHAR(50), AccommodationDate DATE); ","SELECT MIN(AccommodationDate) as EarliestDate, MAX(AccommodationDate) as LatestDate FROM DisabilityAccommodations WHERE YEAR(AccommodationDate) = 2022;","SELECT MIN(AccommodationDate), MAX(AccommodationDate) FROM DisabilityAccommodations WHERE DisabilityType = 'Disability' AND YEAR(AccommodationDate) = 2022;",0 Identify the top 3 workout types with the longest duration for users aged 40 and above?,"CREATE TABLE Workouts (WorkoutID INT, UserID INT, WorkoutType VARCHAR(50), Duration INT, Date DATE); ","SELECT WorkoutType, AVG(Duration) as AvgDuration FROM Workouts WHERE Age >= 40 GROUP BY WorkoutType ORDER BY AvgDuration DESC LIMIT 3;","SELECT WorkoutType, MAX(Duration) as MaxDuration FROM Workouts WHERE UserID IN (SELECT UserID FROM Users WHERE Age >= 40 GROUP BY UserID HAVING COUNT(DISTINCT Age) >= 40) GROUP BY WorkoutType ORDER BY MaxDuration DESC LIMIT 3;",0 What is the barony of mountcotton?,"CREATE TABLE table_30120605_1 (barony VARCHAR, townland VARCHAR);","SELECT barony FROM table_30120605_1 WHERE townland = ""Mountcotton"";","SELECT barony FROM table_30120605_1 WHERE townland = ""Mountcotton"";",1 "Which projects in Sub-Saharan Africa have budgets greater than $1,000,000?","CREATE TABLE projects (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), budget DECIMAL(10,2));CREATE VIEW high_budget_projects AS SELECT * FROM projects WHERE budget >= 1000000;",SELECT * FROM high_budget_projects WHERE location = 'Sub-Saharan Africa';,SELECT name FROM high_budget_projects WHERE location = 'Sub-Saharan Africa' AND budget > 1000000;,0 What is the average conservation budget for the Arctic and Atlantic oceans?,"CREATE TABLE conservation (conservation_id INT, region TEXT, budget FLOAT); ","SELECT AVG(budget) FROM conservation WHERE region IN ('Arctic', 'Atlantic')","SELECT AVG(budget) FROM conservation WHERE region IN ('Arctic', 'Atlantic');",0 What is the average altitude of satellites in the Starlink constellation?,"CREATE TABLE Satellites (satellite_id INT, name VARCHAR(255), country VARCHAR(255), altitude FLOAT, constellation VARCHAR(255)); ",SELECT AVG(altitude) FROM Satellites WHERE constellation = 'Starlink';,SELECT AVG(altitude) FROM Satellites WHERE constellation = 'Starlink';,1 What place had 14:11.15 as the performance?,"CREATE TABLE table_name_33 (place VARCHAR, performance VARCHAR);","SELECT place FROM table_name_33 WHERE performance = ""14:11.15"";","SELECT place FROM table_name_33 WHERE performance = ""14:11.15"";",1 Name the district for spencer bachus,"CREATE TABLE table_25030512_4 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_25030512_4 WHERE incumbent = ""Spencer Bachus"";","SELECT district FROM table_25030512_4 WHERE incumbent = ""Spencer Bachus"";",1 What's Javagal Srinath's batting style?,"CREATE TABLE table_11950720_3 (batting_style VARCHAR, player VARCHAR);","SELECT batting_style FROM table_11950720_3 WHERE player = ""Javagal Srinath"";","SELECT batting_style FROM table_11950720_3 WHERE player = ""Javagal Srinath"";",1 "Insert new records into the FoodInspections table for restaurants A, B, and C in the month of February 2022 with a score of 90, 85, and 92 respectively.","CREATE TABLE FoodInspections (RestaurantID int, InspectionDate date, Score int);","INSERT INTO FoodInspections (RestaurantID, InspectionDate, Score) VALUES ('A', '2022-02-01', 90), ('B', '2022-02-15', 85), ('C', '2022-02-28', 92);","INSERT INTO FoodInspections (RestaurantID, InspectionDate, Score) VALUES ('A', 'B', 90, 85, 92);",0 "Insert a new fish record into the 'FishFarming' table with ID 1, species 'Cod', weight 5.5 lbs, and farm location 'North Atlantic'","CREATE TABLE FishFarming (id INT, species VARCHAR(20), weight FLOAT, farm_location VARCHAR(30));","INSERT INTO FishFarming (id, species, weight, farm_location) VALUES (1, 'Cod', 5.5, 'North Atlantic');","INSERT INTO FishFarming (id, species, weight, farm_location) VALUES (1, 'Cod', 5.5, 'North Atlantic');",1 What is the total number of cases heard and resolved by race for each community board in Brooklyn?,"CREATE TABLE community_board (community_board_number INT, community_board_name TEXT, race TEXT, cases_heard INT, cases_resolved INT); ","SELECT community_board_name, race, SUM(cases_heard) AS total_cases_heard, SUM(cases_resolved) AS total_cases_resolved FROM community_board GROUP BY community_board_name, race;","SELECT community_board_number, race, SUM(cases_heard) as total_cases_heard, SUM(cases_resolved) as total_cases_resolved FROM community_board WHERE community_board_number = 1 GROUP BY community_board_number, race;",0 "What is the premiere rating for a Chinese title of 野蠻奶奶大戰戈師奶, and a Peak smaller than 41?","CREATE TABLE table_name_59 (premiere INTEGER, chinese_title VARCHAR, peak VARCHAR);","SELECT SUM(premiere) FROM table_name_59 WHERE chinese_title = ""野蠻奶奶大戰戈師奶"" AND peak < 41;","SELECT AVG(premiere) FROM table_name_59 WHERE chinese_title = """" AND peak 41;",0 How many agricultural innovation projects were started in Nigeria between 2010 and 2014?',"CREATE TABLE agricultural_innovation_projects (id INT, country VARCHAR(255), start_year INT, end_year INT, started INT); ",SELECT COUNT(*) FROM agricultural_innovation_projects WHERE country = 'Nigeria' AND start_year >= 2010 AND end_year <= 2014 AND started = 1;,SELECT COUNT(*) FROM agricultural_innovation_projects WHERE country = 'Nigeria' AND start_year BETWEEN 2010 AND 2014;,0 Delete all records for donor_id 4.,"CREATE TABLE donors (donor_id INT, donation_amount DECIMAL(10,2), donation_year INT, gender VARCHAR(10)); ",DELETE FROM donors WHERE donor_id = 4;,DELETE FROM donors WHERE donor_id = 4;,1 What is the maximum number of security incidents in a single day for each department in the last month?,"CREATE TABLE security_incidents (id INT, department VARCHAR(255), timestamp DATETIME);","SELECT department, DATE(timestamp) as incident_date, MAX(COUNT(*)) as max_incidents FROM security_incidents WHERE timestamp >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY department, incident_date;","SELECT department, MAX(COUNT(*)) as max_incidents FROM security_incidents WHERE timestamp >= DATEADD(month, -1, GETDATE()) GROUP BY department;",0 What is the length for years 2012-2013?,"CREATE TABLE table_name_29 (length VARCHAR, year VARCHAR);","SELECT length FROM table_name_29 WHERE year = ""2012-2013"";","SELECT length FROM table_name_29 WHERE year = ""2012-2013"";",1 What is the percentage of employees trained in disability awareness in the Southeast region?,"CREATE TABLE employee_training (region VARCHAR(20), training VARCHAR(30), participants INT); ",SELECT (SUM(participants) / (SELECT SUM(participants) FROM employee_training WHERE region = 'Southeast')) * 100 FROM employee_training WHERE region = 'Southeast' AND training = 'Disability Awareness';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM employee_training WHERE region = 'Southeast')) AS percentage FROM employee_training WHERE region = 'Southeast' AND training = 'Disability Awareness';,0 What was the average of againsts on 21/5/1997?,"CREATE TABLE table_name_45 (against INTEGER, date VARCHAR);","SELECT AVG(against) FROM table_name_45 WHERE date = ""21/5/1997"";","SELECT AVG(against) FROM table_name_45 WHERE date = ""21/5/1997"";",1 "What is the age of the youngest artifact for each culture, grouped by excavation site?","CREATE TABLE ancient_cultures (id INT, culture VARCHAR(50)); CREATE TABLE ancient_artifacts (id INT, artifact_name VARCHAR(50), age INT, excavation_site VARCHAR(50), culture_id INT);","SELECT excavation_site, MIN(age) OVER (PARTITION BY culture_id) as youngest_artifact_age FROM ancient_artifacts JOIN ancient_cultures ON ancient_artifacts.culture_id = ancient_cultures.id GROUP BY excavation_site, culture_id;","SELECT ancient_cultures.culture, ancient_artifacts.age, ancient_artifacts.excavation_site, MIN(aaa.age) as youngest_age FROM ancient_cultures INNER JOIN ancient_artifacts ON ancient_cultures.id = ancient_artifacts.culture_id GROUP BY ancient_cultures.culture, ancient_artifacts.excavation_site;",0 "How many military deaths were there when there were 1,615 total casualties?","CREATE TABLE table_name_92 (military_deaths VARCHAR, total_casualties VARCHAR);","SELECT military_deaths FROM table_name_92 WHERE total_casualties = ""1,615"";","SELECT military_deaths FROM table_name_92 WHERE total_casualties = ""1,615"";",1 How many square miles of water is in Ramsey County with a geo id larger than 3807159460.0?,"CREATE TABLE table_18600760_15 (water__sqmi_ VARCHAR, county VARCHAR, geo_id VARCHAR);","SELECT water__sqmi_ FROM table_18600760_15 WHERE county = ""Ramsey"" AND geo_id > 3807159460.0;","SELECT water__sqmi_ FROM table_18600760_15 WHERE county = ""Ramsey"" AND geo_id > 3807159460.0;",1 What is the Kennel Club (UK) Toy Group with the shih-tzu as the American Kennel Club Toy Group breed?,"CREATE TABLE table_name_65 (the_kennel_club__uk__toy_group VARCHAR, american_kennel_club_toy_group VARCHAR);","SELECT the_kennel_club__uk__toy_group FROM table_name_65 WHERE american_kennel_club_toy_group = ""shih-tzu"";","SELECT the_kennel_club__uk__toy_group FROM table_name_65 WHERE american_kennel_club_toy_group = ""shih-tzu"";",1 "Insert a new record into the ""resources"" table for a new gold mine in ""Peru"" with ID 901 and reserves of 5000 tons","CREATE TABLE resources (id INT, mine_type VARCHAR(50), country VARCHAR(50), reserve_tons INT);","INSERT INTO resources (id, mine_type, country, reserve_tons) VALUES (901, 'gold', 'Peru', 5000);","INSERT INTO resources (id, mine_type, country, reserve_tons) VALUES (901, 'Gold', 'Peru', 5000);",0 Find the total size of fish farms in 'rivers' schema greater than 30.,"CREATE SCHEMA rivers; CREATE TABLE fish_farms (id INT, size FLOAT, location VARCHAR(20)); ",SELECT SUM(size) FROM rivers.fish_farms WHERE size > 30;,SELECT SUM(size) FROM rivers.fish_farms WHERE size > 30;,1 "Delete students who have not taken any courses in ""SchoolB"" database since 2019","CREATE TABLE SchoolB (student_id INT, course_id INT, enrollment_date DATE); ",DELETE FROM SchoolB WHERE student_id IN (SELECT student_id FROM SchoolB WHERE course_id IS NULL AND enrollment_date < '2020-01-01');,DELETE FROM SchoolB WHERE course_id NOT IN (SELECT course_id FROM SchoolB WHERE enrollment_date >= '2019-01-01');,0 What is the highest heat for a lane past 1 and mark of 1:48.61?,"CREATE TABLE table_name_79 (heat INTEGER, lane VARCHAR, mark VARCHAR);","SELECT MAX(heat) FROM table_name_79 WHERE lane > 1 AND mark = ""1:48.61"";","SELECT MAX(heat) FROM table_name_79 WHERE lane > 1 AND mark = ""1:48.61"";",1 What was the time when the laps were smaller than 66 and the grid was 15?,"CREATE TABLE table_name_62 (time_retired VARCHAR, laps VARCHAR, grid VARCHAR);",SELECT time_retired FROM table_name_62 WHERE laps < 66 AND grid = 15;,SELECT time_retired FROM table_name_62 WHERE laps 66 AND grid = 15;,0 What is the type ranked 13?,"CREATE TABLE table_name_6 (type VARCHAR, rank VARCHAR);","SELECT type FROM table_name_6 WHERE rank = ""13"";","SELECT type FROM table_name_6 WHERE rank = ""13"";",1 Insert a new financial institution 'Green Finance Corporation' in the 'Canada' region.,"CREATE TABLE financial_institutions (name TEXT, region TEXT); ","INSERT INTO financial_institutions (name, region) VALUES ('Green Finance Corporation', 'Canada');","INSERT INTO financial_institutions (name, region) VALUES ('Green Finance Corporation', 'Canada');",1 Find the name of all customers.,CREATE TABLE customers (customer_name VARCHAR);,SELECT customer_name FROM customers;,SELECT customer_name FROM customers;,1 How many workplaces are there in total in the state of Michigan?,"CREATE TABLE workplaces (id INT, name TEXT, state TEXT); ",SELECT COUNT(*) FROM workplaces WHERE state = 'Michigan';,SELECT COUNT(*) FROM workplaces WHERE state = 'Michigan';,1 "What are the top 5 most mentioned sustainable brands in influencer posts, in the last month?","CREATE TABLE influencers (influencer_id INT, influencer_name TEXT);CREATE TABLE posts (post_id INT, post_text TEXT, influencer_id INT, post_date DATE);CREATE TABLE brands (brand_id INT, brand_name TEXT, brand_sustainable BOOLEAN);CREATE TABLE mentions (mention_id INT, post_id INT, brand_id INT);","SELECT b.brand_name, COUNT(m.mention_id) as mention_count FROM mentions m JOIN posts p ON m.post_id = p.post_id JOIN brands b ON m.brand_id = b.brand_id JOIN influencers i ON p.influencer_id = i.influencer_id WHERE b.brand_sustainable = TRUE AND p.post_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY b.brand_name ORDER BY mention_count DESC LIMIT 5;","SELECT b.brand_name, COUNT(*) as mention_count FROM mentions m JOIN posts p ON m.post_id = p.influencer_id JOIN brands b ON m.brand_id = b.brand_id WHERE p.post_date >= DATEADD(month, -1, GETDATE()) GROUP BY b.brand_name ORDER BY mention_count DESC LIMIT 5;",0 List all unique mining operations in Asia.,"CREATE TABLE MiningOperations (Company VARCHAR(50), Operation VARCHAR(50), Location VARCHAR(10)); ",SELECT DISTINCT Operation FROM MiningOperations WHERE Location = 'Asia',SELECT DISTINCT Operation FROM MiningOperations WHERE Location = 'Asia';,0 How many organizations are working on accessible technology projects in the top 2 regions with the most budget allocated for technology accessibility?,"CREATE TABLE accessible_tech_orgs (id INT, region VARCHAR(20), budget INT, organizations INT); ",SELECT COUNT(*) FROM (SELECT * FROM accessible_tech_orgs WHERE budget = (SELECT MAX(budget) FROM accessible_tech_orgs) ORDER BY budget DESC LIMIT 2) subquery;,"SELECT region, SUM(budget) FROM accessible_tech_orgs GROUP BY region ORDER BY SUM(budget) DESC LIMIT 2;",0 How many byes were then when there were less than 737 against?,"CREATE TABLE table_name_13 (byes INTEGER, against INTEGER);",SELECT SUM(byes) FROM table_name_13 WHERE against < 737;,SELECT SUM(byes) FROM table_name_13 WHERE against 737;,0 Which ERP W is the highest one that has a Call sign of w255bi?,"CREATE TABLE table_name_3 (erp_w INTEGER, call_sign VARCHAR);","SELECT MAX(erp_w) FROM table_name_3 WHERE call_sign = ""w255bi"";","SELECT MAX(erp_w) FROM table_name_3 WHERE call_sign = ""w255bi"";",1 Get the name of all genes with a mutation rate higher than 0.1,"CREATE TABLE genes (gene_id INT PRIMARY KEY, species TEXT, mutation_rate REAL); CREATE VIEW mutations AS SELECT gene_id, COUNT(*) as mutation_count FROM mutations_table GROUP BY gene_id;",SELECT g.name FROM genes g JOIN mutations m ON g.gene_id = m.gene_id WHERE g.mutation_rate > 0.1;,SELECT genes.gene_name FROM genes INNER JOIN mutations ON genes.gene_id = mutations.gene_id WHERE mutations.mutation_rate > 0.1;,0 Who was the visitor on march 21?,"CREATE TABLE table_name_96 (visitor VARCHAR, date VARCHAR);","SELECT visitor FROM table_name_96 WHERE date = ""march 21"";","SELECT visitor FROM table_name_96 WHERE date = ""march 21"";",1 What is the total funding amount for projects in the 'Education' sector?,"CREATE TABLE projects (id INT, sector TEXT, total_funding DECIMAL); ",SELECT SUM(total_funding) FROM projects WHERE sector = 'Education';,SELECT SUM(total_funding) FROM projects WHERE sector = 'Education';,1 What are the top 3 age groups in the 'StudyA'?,"CREATE TABLE Patients (patient_id INT, study_name TEXT, age INT); ","SELECT age/10*10 AS age_group, COUNT(*) FROM Patients WHERE study_name = 'StudyA' GROUP BY age_group ORDER BY COUNT(*) DESC LIMIT 3;","SELECT study_name, age FROM Patients ORDER BY age DESC LIMIT 3;",0 What is the average react for a rank more than 8?,"CREATE TABLE table_name_36 (react INTEGER, rank INTEGER);",SELECT AVG(react) FROM table_name_36 WHERE rank > 8;,SELECT AVG(react) FROM table_name_36 WHERE rank > 8;,1 WHAT IS THE PLAYER WITH A SCORE OF 66?,"CREATE TABLE table_name_76 (player VARCHAR, score VARCHAR);",SELECT player FROM table_name_76 WHERE score = 66;,SELECT player FROM table_name_76 WHERE score = 66;,1 "Determine the average resilience score of each infrastructure category, only considering categories with more than 3 projects.","CREATE TABLE InfrastructureCategories (CategoryID INT, CategoryName VARCHAR(50), ProjectCount INT, ResilienceScore DECIMAL(3,1)); ","SELECT CategoryName, AVG(ResilienceScore) as AvgResilienceScore FROM InfrastructureCategories GROUP BY CategoryName HAVING ProjectCount > 3;","SELECT CategoryName, AVG(ResilienceScore) as AvgResilienceScore FROM InfrastructureCategories WHERE ProjectCount > 3 GROUP BY CategoryName;",0 What's the GFL Premiership when the home ground was Leopold Memorial Park?,"CREATE TABLE table_name_4 (gfl_premierships VARCHAR, home_ground VARCHAR);","SELECT gfl_premierships FROM table_name_4 WHERE home_ground = ""leopold memorial park"";","SELECT gfl_premierships FROM table_name_4 WHERE home_ground = ""leopold memorial park"";",1 List all the departments in the 'government_spending' table along with the total amount spent in descending order.,"CREATE TABLE government_spending (department TEXT, amount FLOAT); ","SELECT department, SUM(amount) as total_amount FROM government_spending GROUP BY department ORDER BY total_amount DESC;","SELECT department, SUM(amount) as total_spent FROM government_spending GROUP BY department ORDER BY total_spent DESC;",0 What was the distance when the weight was 6.11?,"CREATE TABLE table_name_21 (distance VARCHAR, weight VARCHAR);",SELECT distance FROM table_name_21 WHERE weight = 6.11;,"SELECT distance FROM table_name_21 WHERE weight = ""6.11"";",0 What is Wasim Akram's rank?,"CREATE TABLE table_name_47 (rank VARCHAR, player VARCHAR);","SELECT rank FROM table_name_47 WHERE player = ""wasim akram"";","SELECT rank FROM table_name_47 WHERE player = ""wasim akram"";",1 List all singer names in concerts in year 2014.,"CREATE TABLE singer_in_concert (singer_id VARCHAR, concert_id VARCHAR); CREATE TABLE concert (concert_id VARCHAR, year VARCHAR); CREATE TABLE singer (name VARCHAR, singer_id VARCHAR);",SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014;,SELECT T1.name FROM singer AS T1 JOIN singer_in_concert AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T2.concert_id = T3.concert_id WHERE T3.year = 2014;,0 What is the lowest attendance for week 2?,"CREATE TABLE table_name_50 (attendance INTEGER, week VARCHAR);",SELECT MIN(attendance) FROM table_name_50 WHERE week = 2;,SELECT MIN(attendance) FROM table_name_50 WHERE week = 2;,1 What was the time of the bout that ended in a TKO (strikes)?,"CREATE TABLE table_name_83 (time VARCHAR, method VARCHAR);","SELECT time FROM table_name_83 WHERE method = ""tko (strikes)"";","SELECT time FROM table_name_83 WHERE method = ""tko (strikes)"";",1 What is the average age of basketball players in the Eastern Conference by team?,"CREATE TABLE teams (team_id INT, team_name VARCHAR(50), conference VARCHAR(50)); CREATE TABLE players (player_id INT, player_name VARCHAR(50), team_id INT, age INT);","SELECT t.conference, t.team_name, AVG(p.age) as avg_age FROM players p JOIN teams t ON p.team_id = t.team_id WHERE t.conference = 'Eastern' GROUP BY t.conference, t.team_name;","SELECT t.team_name, AVG(p.age) as avg_age FROM teams t JOIN players p ON t.team_id = p.team_id WHERE t.conference = 'Eastern' GROUP BY t.team_name;",0 Calculate the moving average of revenue for each menu category over the last 30 days.,"CREATE TABLE restaurant_revenue (menu_category VARCHAR(50), transaction_date DATE, revenue NUMERIC(10,2)); ","SELECT menu_category, AVG(revenue) OVER (PARTITION BY menu_category ORDER BY transaction_date ROWS BETWEEN 29 PRECEDING AND CURRENT ROW) AS moving_average FROM restaurant_revenue;","SELECT menu_category, AVG(revenue) as moving_avg FROM restaurant_revenue WHERE transaction_date >= DATEADD(day, -30, GETDATE()) GROUP BY menu_category;",0 How many games did each team played?,CREATE TABLE table_18018214_3 (games_played INTEGER);,SELECT MIN(games_played) FROM table_18018214_3;,SELECT MIN(games_played) FROM table_18018214_3;,1 Name the matches for mark taylor category:articles with hcards,"CREATE TABLE table_21486890_1 (matches INTEGER, name VARCHAR);","SELECT MAX(matches) FROM table_21486890_1 WHERE name = ""Mark Taylor Category:Articles with hCards"";","SELECT MAX(matches) FROM table_21486890_1 WHERE name = ""Mark Taylor Category:Articles with hCards"";",1 What is the fewest number of wins when he has 3 poles in 2010?,"CREATE TABLE table_name_51 (wins INTEGER, poles VARCHAR, season VARCHAR);","SELECT MIN(wins) FROM table_name_51 WHERE poles = 3 AND season = ""2010"";",SELECT MIN(wins) FROM table_name_51 WHERE poles = 3 AND season = 2010;,0 What is the total amount of food aid distributed by organization_id 5 in the food_aid table?,"CREATE TABLE food_aid (id INT PRIMARY KEY, organization_id INT, food_aid_amount INT); ",SELECT SUM(food_aid_amount) FROM food_aid WHERE organization_id = 5;,SELECT SUM(food_aid_amount) FROM food_aid WHERE organization_id = 5;,1 Who is the Opponent on January 16?,"CREATE TABLE table_name_45 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_45 WHERE date = ""january 16"";","SELECT opponent FROM table_name_45 WHERE date = ""january 16"";",1 What are the top 3 most vulnerable systems by IP address and the number of vulnerabilities in the last month?,"CREATE TABLE system_vulnerabilities (ip_address VARCHAR(15), vulnerability_date DATE, vulnerability_id INT); ","SELECT ip_address, COUNT(vulnerability_id) as num_vulnerabilities FROM system_vulnerabilities WHERE vulnerability_date >= DATEADD(month, -1, CURRENT_DATE) GROUP BY ip_address ORDER BY num_vulnerabilities DESC FETCH FIRST 3 ROWS ONLY;","SELECT ip_address, COUNT(*) as vulnerability_count FROM system_vulnerabilities WHERE vulnerability_date >= DATEADD(month, -1, GETDATE()) GROUP BY ip_address ORDER BY vulnerability_count DESC LIMIT 3;",0 "What is the maximum number of assists made by a player in a single NBA game, and who was the player?","CREATE TABLE games (game_id INT, date DATE, player TEXT, assists INT);","SELECT player, MAX(assists) FROM games;","SELECT player, MAX(assists) FROM games GROUP BY player;",0 Identify the top 3 countries with the highest wheat production in the 'agriculture' database.,"CREATE TABLE production (id INT, crop VARCHAR(255), country VARCHAR(255), quantity INT); ","SELECT country, SUM(quantity) as total_production FROM production WHERE crop = 'wheat' GROUP BY country ORDER BY total_production DESC LIMIT 3;","SELECT country, SUM(quantity) as total_production FROM production WHERE crop = 'wheat' GROUP BY country ORDER BY total_production DESC LIMIT 3;",1 "Find the top 5 products with the most expensive ingredients per gram, ordered by the total cost.","CREATE TABLE ingredients (ingredient_id INT, ingredient VARCHAR(255), product_id INT, price DECIMAL(5,2), gram_weight DECIMAL(5,2)); CREATE TABLE products (product_id INT, product_name VARCHAR(255)); ","SELECT product_id, product_name, SUM(price * gram_weight) as total_cost FROM ingredients JOIN products ON ingredients.product_id = products.product_id GROUP BY product_id, product_name ORDER BY total_cost DESC FETCH FIRST 5 ROWS ONLY;","SELECT p.product_name, SUM(i.price * i.gram_weight) as total_cost FROM ingredients i JOIN products p ON i.product_id = p.product_id GROUP BY p.product_name ORDER BY total_cost DESC LIMIT 5;",0 How many times has 'Green Valley' supplied 'Eco Market' with organic vegetables?,"CREATE TABLE GreenValley (id INT, supplier VARCHAR(20), client VARCHAR(20), produce VARCHAR(20), quantity INT); ",SELECT SUM(quantity) FROM GreenValley WHERE supplier = 'Green Valley' AND client = 'Eco Market' AND produce LIKE '%vegetable%';,SELECT COUNT(*) FROM GreenValley WHERE supplier = 'Green Valley' AND client = 'Eco Market' AND produce = 'organic';,0 "Which Score in the final has a Surface of hard on august 20, 1989?","CREATE TABLE table_name_47 (score_in_the_final VARCHAR, surface VARCHAR, date VARCHAR);","SELECT score_in_the_final FROM table_name_47 WHERE surface = ""hard"" AND date = ""august 20, 1989"";","SELECT score_in_the_final FROM table_name_47 WHERE surface = ""hard"" AND date = ""august 20, 1989"";",1 "What is the number of points for east germany, and a Places of 88?","CREATE TABLE table_name_84 (points INTEGER, nation VARCHAR, places VARCHAR);","SELECT SUM(points) FROM table_name_84 WHERE nation = ""east germany"" AND places = ""88"";","SELECT SUM(points) FROM table_name_84 WHERE nation = ""east germany"" AND places = 88;",0 Compute the number of projects and their total labor hours per quarter.,"CREATE TABLE project (project_id INT, quarter VARCHAR(10), labor_hours INT); ","SELECT quarter, COUNT(*) as projects_count, SUM(labor_hours) as total_labor_hours FROM project GROUP BY quarter;","SELECT quarter, COUNT(*) as project_count, SUM(labor_hours) as total_labor_hours FROM project GROUP BY quarter;",0 Equipment maintenance requests in H1 2021 for the Pacific region?,"CREATE TABLE equipment_maintenance (equipment_id INT, maintenance_date DATE, region VARCHAR(255)); ","SELECT equipment_id, maintenance_date FROM equipment_maintenance WHERE region = 'Pacific' AND maintenance_date BETWEEN '2021-01-01' AND '2021-06-30';","SELECT equipment_id, maintenance_date, region FROM equipment_maintenance WHERE maintenance_date BETWEEN '2021-01-01' AND '2021-06-30' AND region = 'Pacific';",0 What is the latest creation date in the 'Contemporary' period?,"CREATE TABLE Artworks (artwork_name VARCHAR(255), creation_date DATE, movement VARCHAR(255)); ",SELECT MAX(creation_date) FROM Artworks WHERE movement = 'Contemporary';,SELECT MAX(creation_date) FROM Artworks WHERE movement = 'Contemporary';,1 What name is located in China?,"CREATE TABLE table_name_8 (name VARCHAR, location VARCHAR);","SELECT name FROM table_name_8 WHERE location = ""china"";","SELECT name FROM table_name_8 WHERE location = ""china"";",1 "What is the total number of training hours, grouped by the type of training, for the 'Mining Operations' department, in the past 3 months, where the training hours are greater than 10 hours?","CREATE TABLE TrainingHours(id INT, training_type VARCHAR(50), department VARCHAR(50), training_hours INT, training_date DATE);","SELECT training_type, SUM(training_hours) as total_training_hours FROM TrainingHours WHERE department = 'Mining Operations' AND training_date >= DATE(NOW()) - INTERVAL 3 MONTH GROUP BY training_type HAVING total_training_hours > 10;","SELECT training_type, SUM(training_hours) FROM TrainingHours WHERE department = 'Mining Operations' AND training_date >= DATEADD(month, -3, GETDATE()) GROUP BY training_type;",0 "When the conference is west coast and the number of bids are at 2, what's the percentage of games won?","CREATE TABLE table_name_51 (win__percentage VARCHAR, _number_of_bids VARCHAR, conference VARCHAR);","SELECT win__percentage FROM table_name_51 WHERE _number_of_bids = 2 AND conference = ""west coast"";","SELECT win__percentage FROM table_name_51 WHERE _number_of_bids = 2 AND conference = ""west coast"";",1 "How many goals against have 64 for games, a loss less than 12, with points greater than 107?","CREATE TABLE table_name_37 (goals_against INTEGER, points VARCHAR, games VARCHAR, lost VARCHAR);",SELECT SUM(goals_against) FROM table_name_37 WHERE games = 64 AND lost < 12 AND points > 107;,SELECT SUM(goals_against) FROM table_name_37 WHERE games = 64 AND lost 12 AND points > 107;,0 What is the Total with a Player named robbie winters?,"CREATE TABLE table_name_95 (total VARCHAR, player VARCHAR);","SELECT total FROM table_name_95 WHERE player = ""robbie winters"";","SELECT total FROM table_name_95 WHERE player = ""robbie winters"";",1 What is the minimum salary in each job category in the company?,"CREATE TABLE Salaries (Salary DECIMAL(10,2), JobCategory VARCHAR(20)); ","SELECT JobCategory, MIN(Salary) as MinSalary FROM Salaries GROUP BY JobCategory;","SELECT JobCategory, MIN(Salary) FROM Salaries GROUP BY JobCategory;",0 How many million viewers watched episode 6?,"CREATE TABLE table_17901155_4 (viewers__millions_ VARCHAR, no_in_season VARCHAR);",SELECT viewers__millions_ FROM table_17901155_4 WHERE no_in_season = 6;,SELECT viewers__millions_ FROM table_17901155_4 WHERE no_in_season = 6;,1 "What was the result of the game that was played on 29,30–31 May 1902?","CREATE TABLE table_name_31 (result VARCHAR, date VARCHAR);","SELECT result FROM table_name_31 WHERE date = ""29,30–31 may 1902"";","SELECT result FROM table_name_31 WHERE date = ""29,30–31 may 1902"";",1 What is the total amount of research grants awarded to the Physics department in 2020?,"CREATE TABLE ResearchGrants (GrantID int, Department varchar(50), Amount decimal(10,2), Year int); ",SELECT SUM(Amount) FROM ResearchGrants WHERE Department = 'Physics' AND Year = 2020;,SELECT SUM(Amount) FROM ResearchGrants WHERE Department = 'Physics' AND Year = 2020;,1 What is the average investment return for each investment strategy?,"CREATE TABLE investments (investment_id INT, strategy VARCHAR(20), return_rate DECIMAL(10,2)); ","SELECT strategy, AVG(return_rate) as avg_return FROM investments GROUP BY strategy;","SELECT strategy, AVG(return_rate) as avg_return FROM investments GROUP BY strategy;",1 What is the total number of workers in the 'textile' department across all factories?,"CREATE TABLE factories (factory_id INT, department VARCHAR(20));CREATE TABLE workers (worker_id INT, factory_id INT, salary DECIMAL(5,2), department VARCHAR(20)); ",SELECT COUNT(w.worker_id) FROM workers w JOIN factories f ON w.factory_id = f.factory_id WHERE f.department = 'textile';,SELECT SUM(workers.salary) FROM workers INNER JOIN factories ON workers.factory_id = factories.factory_id WHERE factories.department = 'textile';,0 "What Winner had a Prize of zł2,153,999?","CREATE TABLE table_name_22 (winner VARCHAR, prize VARCHAR);","SELECT winner FROM table_name_22 WHERE prize = ""zł2,153,999"";","SELECT winner FROM table_name_22 WHERE prize = ""z2,153,999"";",0 Create a view named 'funding_summary' that displays the total funding for each funding source,"CREATE TABLE funding (source VARCHAR(255), amount INT); ","CREATE VIEW funding_summary AS SELECT source, SUM(amount) AS total_funding FROM funding GROUP BY source;","CREATE VIEW funding_summary AS SELECT source, SUM(amount) FROM funding GROUP BY source;",0 Which year had a vehicle of Mitsubishi?,"CREATE TABLE table_name_88 (year VARCHAR, vehicle VARCHAR);","SELECT year FROM table_name_88 WHERE vehicle = ""mitsubishi"";","SELECT year FROM table_name_88 WHERE vehicle = ""mitsubishi"";",1 How many genetic researchers work in 'Lab2'?,"CREATE TABLE Employees (employee_id INT, name TEXT, role TEXT, department TEXT); ",SELECT COUNT(*) FROM Employees WHERE role = 'Genetic Researcher' AND department = 'Lab2';,SELECT COUNT(*) FROM Employees WHERE department = 'Lab2' AND role = 'Genetic Researcher';,0 "For a vehicle below 25 feet, that was retired in 2005 and had a navistar t444e engine, what was the total width?","CREATE TABLE table_name_11 (width__inches_ VARCHAR, length__feet_ VARCHAR, engine VARCHAR, retired VARCHAR);","SELECT COUNT(width__inches_) FROM table_name_11 WHERE engine = ""navistar t444e"" AND retired = ""2005"" AND length__feet_ < 25;","SELECT COUNT(width__inches_) FROM table_name_11 WHERE engine = ""navistar t444e"" AND retired = ""2005"" AND length__feet_ 25;",0 "What is the purse in 2003, which had a 1-1/16 distance?","CREATE TABLE table_name_94 (purse VARCHAR, distance VARCHAR, year VARCHAR);","SELECT purse FROM table_name_94 WHERE distance = ""1-1/16"" AND year = 2003;","SELECT purse FROM table_name_94 WHERE distance = ""1-1/16"" AND year = 2003;",1 "Create a view named ""feed_usage"" with columns ""farm_id"", ""species_id"", ""feed_type"", and ""total_quantity"". Join ""fish_farms"" with ""sustainable_seafood_sales"" to get the total quantity of each feed type sold per farm and species.","CREATE TABLE fish_farms (farm_id INT PRIMARY KEY, location VARCHAR(255), species_id INT, acreage FLOAT); CREATE TABLE sustainable_seafood_sales (sale_id INT PRIMARY KEY, store_id INT, species_id INT, quantity_sold INT, sale_date DATE); CREATE TABLE feed_types (feed_type_id INT PRIMARY KEY, feed_type VARCHAR(255)); CREATE TABLE feed_usage_fact (feed_usage_id INT PRIMARY KEY, farm_id INT, feed_type_id INT, species_id INT, quantity INT, sale_date DATE);","CREATE VIEW feed_usage AS SELECT ff.farm_id, ff.species_id, ft.feed_type, SUM(fu.quantity) AS total_quantity FROM fish_farms ff JOIN feed_usage_fact fu ON ff.farm_id = fu.farm_id JOIN feed_types ft ON fu.feed_type_id = ft.feed_type_id JOIN sustainable_seafood_sales ss ON fu.species_id = ss.species_id GROUP BY ff.farm_id, ff.species_id, ft.feed_type;","CREATE VIEW feed_usage_fact AS SELECT f.farm_id, f.species_id, f.feed_type, SUM(f.quantity_sold) AS total_quantity FROM fish_farms f INNER JOIN feed_usage_fact f ON f.farm_id = f.farm_id INNER JOIN sustainable_seafood_sales s ON f.species_id = s.seafood_id INNER JOIN feed_usage_fact f ON f.farm_id = f.species_id INNER JOIN feed_usage_fact f ON f.farm_id = f.species_id INNER JOIN fish_farms s ON f.species_id = s.species_id INNER JOIN feed_types f ON f.species_id INNER JOIN feed_usage_fact f ON f.species_id = f.species_id INNER JOIN feed_usage_fact f ON f.species_id = f.species_id GROUP BY f.species_id;",0 What was the attendance like for week 8?,"CREATE TABLE table_name_45 (attendance VARCHAR, week VARCHAR);",SELECT attendance FROM table_name_45 WHERE week = 8;,SELECT attendance FROM table_name_45 WHERE week = 8;,1 What was the result in the election in which the incumbent was Denver S. Church? ,"CREATE TABLE table_1342331_6 (result VARCHAR, incumbent VARCHAR);","SELECT result FROM table_1342331_6 WHERE incumbent = ""Denver S. Church"";","SELECT result FROM table_1342331_6 WHERE incumbent = ""Denver S. Church"";",1 How many items were sold in each month for the last six months?,"CREATE TABLE sales (sale_id INT, sale_date DATE, item_id INT, quantity INT); ","SELECT EXTRACT(MONTH FROM sale_date) AS month, SUM(quantity) AS total_sold FROM sales WHERE sale_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) GROUP BY month;","SELECT DATE_FORMAT(sale_date, '%Y-%m') AS month, SUM(quantity) AS total_sold FROM sales WHERE sale_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) GROUP BY month;",0 "What is the total population of each shark species, excluding the Great White?","CREATE TABLE Sharks (id INT PRIMARY KEY, name VARCHAR(50), species VARCHAR(50), location VARCHAR(50), population INT); ","SELECT species, SUM(population) FROM Sharks WHERE species != 'Great White' GROUP BY species;","SELECT species, SUM(population) FROM Sharks WHERE species!= 'Great White' GROUP BY species;",0 How many cyber attacks have been attributed to each threat actor group in the last year?,"CREATE TABLE cyber_attacks (attack_id INT, attack_date DATE, attack_country VARCHAR(50), attack_ip VARCHAR(50), threat_actor_group VARCHAR(50)); ","SELECT threat_actor_group, COUNT(*) as total_attacks FROM cyber_attacks WHERE attack_date >= DATEADD(year, -1, GETDATE()) GROUP BY threat_actor_group;","SELECT threat_actor_group, COUNT(*) FROM cyber_attacks WHERE attack_date >= DATEADD(year, -1, GETDATE()) GROUP BY threat_actor_group;",0 "What is Year, when Competition Description is ""U.S. Championships"", when Rank-Final is less than 3, and when Apparatus is ""All-Around""?","CREATE TABLE table_name_79 (year VARCHAR, apparatus VARCHAR, competition_description VARCHAR, rank_final VARCHAR);","SELECT year FROM table_name_79 WHERE competition_description = ""u.s. championships"" AND rank_final < 3 AND apparatus = ""all-around"";","SELECT year FROM table_name_79 WHERE competition_description = ""u.s. championships"" AND rank_final 3 AND apparatus = ""all-around"";",0 WHICH Outcome IS ON 18 july 1993?,"CREATE TABLE table_name_70 (outcome VARCHAR, date VARCHAR);","SELECT outcome FROM table_name_70 WHERE date = ""18 july 1993"";","SELECT outcome FROM table_name_70 WHERE date = ""18 july 1993"";",1 What date did Episode 2-01 (42) air?,"CREATE TABLE table_name_56 (original_airdate VARCHAR, episode VARCHAR);","SELECT original_airdate FROM table_name_56 WHERE episode = ""2-01 (42)"";","SELECT original_airdate FROM table_name_56 WHERE episode = ""2-01 (42)"";",1 Who had the decision when buffalo was the visitor?,"CREATE TABLE table_name_99 (decision VARCHAR, visitor VARCHAR);","SELECT decision FROM table_name_99 WHERE visitor = ""buffalo"";","SELECT decision FROM table_name_99 WHERE visitor = ""buffalo"";",1 What was the position for mauro at the world championships in 1985 during the foil individual event?,"CREATE TABLE table_name_41 (position VARCHAR, year VARCHAR, event VARCHAR, competition VARCHAR);","SELECT position FROM table_name_41 WHERE event = ""foil individual"" AND competition = ""world championships"" AND year = 1985;","SELECT position FROM table_name_41 WHERE event = ""world championships"" AND competition = ""foil individual"" AND year = 1985;",0 How many tries against did Pentyrch RFC have?,"CREATE TABLE table_name_92 (tries_against VARCHAR, club VARCHAR);","SELECT tries_against FROM table_name_92 WHERE club = ""pentyrch rfc"";","SELECT tries_against FROM table_name_92 WHERE club = ""pentyrch rfc"";",1 What is the maximum oil production rate for wells in the Middle East?,"CREATE TABLE wells (id INT, region VARCHAR(255), well_type VARCHAR(255), oil_production DECIMAL(5,2)); ",SELECT MAX(oil_production) as max_oil_production FROM wells WHERE region = 'Middle East';,SELECT MAX(oil_production) FROM wells WHERE region = 'Middle East';,0 What is the lowest rated 'Foundation' product?,"CREATE TABLE Products (ProductID int, ProductName varchar(50), Category varchar(50), Rating float); ",SELECT * FROM Products WHERE Category = 'Foundation' ORDER BY Rating ASC LIMIT 1;,SELECT MIN(Rating) FROM Products WHERE Category = 'Foundation';,0 What is the total number of streams for K-pop songs in South Korea in Q3 of 2021?,"CREATE TABLE Streaming (SongID INT, Song TEXT, Genre TEXT, Streams INT, Country TEXT, Quarter INT, Year INT); ",SELECT SUM(Streams) FROM Streaming WHERE Genre = 'K-pop' AND Country = 'South Korea' AND Quarter = 3 AND Year = 2021;,SELECT SUM(Streams) FROM Streaming WHERE Genre = 'K-pop' AND Country = 'South Korea' AND Quarter = 3 AND Year = 2021;,1 Create a table for player_stats,"CREATE TABLE player_stats (player_id INT, total_games INT, win_rate DECIMAL(5,2));","CREATE TABLE player_stats_new AS SELECT player_id, COUNT(*) as total_games, (SUM(win) / COUNT(*)) as win_rate FROM player_performances GROUP BY player_id;","CREATE TABLE player_stats (player_id INT, total_games INT, win_rate DECIMAL(5,2));",0 "Create a table named ""ocean_temperature""","CREATE TABLE ocean_temperature (id INT PRIMARY KEY, location VARCHAR(255), temperature FLOAT, timestamp TIMESTAMP);","CREATE TABLE ocean_temperature (id INT PRIMARY KEY, location VARCHAR(255), temperature FLOAT, timestamp TIMESTAMP);","CREATE TABLE ocean_temperature (id INT PRIMARY KEY, location VARCHAR(255), temperature FLOAT, timestamp TIMESTAMP);",1 Count the number of public transportation trips taken in New York City for the month of January in the year 2022.,"CREATE TABLE trips (trip_id INT, trip_date DATE, trip_type VARCHAR(50), city VARCHAR(50)); ",SELECT COUNT(*) FROM trips WHERE trip_type = 'Public Transportation' AND EXTRACT(MONTH FROM trip_date) = 1 AND EXTRACT(YEAR FROM trip_date) = 2022 AND city = 'New York City';,SELECT COUNT(*) FROM trips WHERE city = 'New York City' AND trip_date BETWEEN '2022-01-01' AND '2022-01-31';,0 How many villages are there in the Magway region?,"CREATE TABLE table_19457_1 (villages VARCHAR, state_region VARCHAR);","SELECT villages FROM table_19457_1 WHERE state_region = ""Magway Region"";","SELECT COUNT(villages) FROM table_19457_1 WHERE state_region = ""Magway"";",0 What is the sum of taxes collected from dispensaries in California in the last month?,"CREATE TABLE Dispensaries (id INT, name TEXT, state TEXT);CREATE TABLE Sales (id INT, dispensary_id INT, sale_amount DECIMAL, sale_date DATE, tax_rate DECIMAL);","SELECT SUM(S.sale_amount * S.tax_rate) FROM Dispensaries D JOIN Sales S ON D.id = S.dispensary_id WHERE D.state = 'California' AND S.sale_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH);","SELECT SUM(sale_amount) FROM Sales JOIN Dispensaries ON Sales.dispensary_id = Dispensaries.id WHERE Dispensaries.state = 'California' AND sale_date >= DATEADD(month, -1, GETDATE());",0 What is the total CO2 emissions reduction from recycled polyester?,"CREATE TABLE emissions (id INT, material VARCHAR(255), reduction DECIMAL(5,2)); INSERT INTO emissions (id, material, reduction) VALUES",SELECT SUM(reduction) FROM emissions WHERE material = 'Recycled Polyester';,SELECT SUM(reduction) FROM emissions WHERE material = 'Recycled Polyester';,1 What is the average age of patients who received cognitive behavioral therapy (CBT) in Canada?,"CREATE TABLE mental_health_treatments (id INT, patient_id INT, treatment_name TEXT, country TEXT); ",SELECT AVG(patient_age) FROM patients JOIN mental_health_treatments ON patients.id = mental_health_treatments.patient_id WHERE treatment_name = 'CBT' AND country = 'Canada';,SELECT AVG(age) FROM mental_health_treatments WHERE country = 'Canada' AND treatment_name = 'CBT';,0 "What is the total volume of timber harvested in 2020, partitioned by region?","CREATE TABLE forests (id INT, region VARCHAR(255), volume FLOAT, year INT); ","SELECT region, SUM(volume) as total_volume FROM forests WHERE year = 2020 GROUP BY region;","SELECT region, SUM(volume) FROM forests WHERE year = 2020 GROUP BY region;",0 Which place has a rank of 71?,"CREATE TABLE table_1447085_1 (place VARCHAR, rank VARCHAR);",SELECT place FROM table_1447085_1 WHERE rank = 71;,SELECT place FROM table_1447085_1 WHERE rank = 71;,1 What is the lowest total points Karine Trécy has with a less than 12 place?,"CREATE TABLE table_name_84 (total_points INTEGER, artist VARCHAR, place VARCHAR);","SELECT MIN(total_points) FROM table_name_84 WHERE artist = ""karine trécy"" AND place < 12;","SELECT MIN(total_points) FROM table_name_84 WHERE artist = ""karine trécy"" AND place 12;",0 What is the highest number of laps when there are less than 5 points for team garry rogers motorsport and the grid number is under 23?,"CREATE TABLE table_name_49 (laps INTEGER, grid VARCHAR, points VARCHAR, team VARCHAR);","SELECT MAX(laps) FROM table_name_49 WHERE points < 5 AND team = ""garry rogers motorsport"" AND grid < 23;","SELECT MAX(laps) FROM table_name_49 WHERE points 5 AND team = ""garry rogers motorsport"" AND grid 23;",0 What is the success rate of 'Group Therapy' and 'Family Therapy' in 'clinic_j'?,"CREATE TABLE therapy_outcome (therapy_type VARCHAR(50), outcome_status VARCHAR(50), treatment_center VARCHAR(50)); ","SELECT therapy_type, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM therapy_outcome WHERE therapy_outcome.treatment_center = 'clinic_j' AND outcome_status = 'Success') FROM therapy_outcome WHERE (therapy_type = 'Group Therapy' OR therapy_type = 'Family Therapy') AND treatment_center = 'clinic_j';","SELECT therapy_type, COUNT(*) as success_rate FROM therapy_outcome WHERE outcome_status = 'Success' AND treatment_center = 'clinic_j' GROUP BY therapy_type;",0 Create a table for 'stations',"CREATE TABLE stations (id INT PRIMARY KEY, name VARCHAR(50), location VARCHAR(100));","CREATE TABLE stations (id INT PRIMARY KEY, name VARCHAR(50), location VARCHAR(100));","CREATE TABLE stations (id INT PRIMARY KEY, name VARCHAR(50), location VARCHAR(100));",1 "How many users from each age group have joined the gym in the last 6 months, for users aged 19-25 and 36-46?","CREATE TABLE membership_data (id INT, user_id INT, join_date DATE); CREATE TABLE user_profile (id INT, user_id INT, age INT, city VARCHAR(50)); ","SELECT CASE WHEN age BETWEEN 19 AND 25 THEN '19-25' WHEN age BETWEEN 36 AND 46 THEN '36-46' END as age_group, COUNT(*) as user_count FROM membership_data m JOIN user_profile u ON m.user_id = u.user_id WHERE m.join_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) AND (age BETWEEN 19 AND 25 OR age BETWEEN 36 AND 46) GROUP BY age_group;","SELECT age, COUNT(*) FROM membership_data JOIN user_profile ON membership_data.user_id = user_profile.user_id WHERE age BETWEEN 19 AND 25 AND age BETWEEN 36 AND 46 AND join_date >= DATEADD(month, -6, GETDATE()) GROUP BY age;",0 Who was the home team when grimsby town was the away team?,"CREATE TABLE table_name_91 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_91 WHERE away_team = ""grimsby town"";","SELECT home_team FROM table_name_91 WHERE away_team = ""grimsby town"";",1 Add a new column 'manufacturer' to the 'workout_equipment' table,"CREATE TABLE workout_equipment (equipment_id INT, equipment_name VARCHAR(50), quantity INT);",ALTER TABLE workout_equipment ADD manufacturer VARCHAR(50);,ALTER TABLE workout_equipment ADD manufacturer;,0 Add new records for public bike-sharing programs in 2023.,"CREATE TABLE bike_share (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), launch_year INT);","INSERT INTO bike_share (name, location, launch_year) VALUES ('Copenhagen Wheels', 'Copenhagen', 2023), ('BIXI Montreal', 'Montreal', 2023), ('Bike Chattanooga', 'Chattanooga', 2023);","INSERT INTO bike_share (id, name, location, launch_year) VALUES (1, 'Public Bike Sharing', 'New York', 2023);",0 "Update the ""industry_4_0"" table to set the ""automation_level"" as ""High"" for all records where the ""manufacturing_country"" is ""Japan""","CREATE TABLE industry_4_0 ( id INT PRIMARY KEY, company_name VARCHAR(255), manufacturing_country VARCHAR(64), automation_level VARCHAR(64) ); ",UPDATE industry_4_0 SET automation_level = 'High' WHERE manufacturing_country = 'Japan';,UPDATE industry_4_0 SET automation_level = 'High' WHERE manufacturing_country = 'Japan';,1 What is the minimum size of a property in the city of Oakland?,"CREATE TABLE properties (property_id INT, size FLOAT, city VARCHAR(20)); ","SELECT city, MIN(size) FROM properties WHERE city = 'Oakland';",SELECT MIN(size) FROM properties WHERE city = 'Oakland';,0 List the names and completion dates of flood mitigation projects in the 'disaster_prevention' schema,"CREATE SCHEMA IF NOT EXISTS disaster_prevention; CREATE TABLE disaster_prevention.projects (id INT, name VARCHAR(100), completed_date DATE, type VARCHAR(50)); ","SELECT name, completed_date FROM disaster_prevention.projects WHERE type = 'flood mitigation';","SELECT name, completed_date FROM disaster_prevention.projects WHERE type = 'Flood Mitigation';",0 Calculate the average weight of packages shipped from warehouses in the 'Americas' and 'APAC' regions,"CREATE TABLE warehouses (id INT, name TEXT, region TEXT); ","SELECT AVG(weight) FROM packages JOIN warehouses ON packages.warehouse_id = warehouses.id WHERE region IN ('Americas', 'APAC');","SELECT AVG(weight) FROM packages JOIN warehouses ON packages.warehouse_id = warehouses.id WHERE warehouses.region IN ('Americas', 'APAC');",0 How many attended the game against the sharks with over 86 points?,"CREATE TABLE table_name_99 (attendance INTEGER, points VARCHAR, opponent VARCHAR);","SELECT AVG(attendance) FROM table_name_99 WHERE points > 86 AND opponent = ""sharks"";","SELECT SUM(attendance) FROM table_name_99 WHERE points > 86 AND opponent = ""sharks"";",0 What is the average lane for china?,"CREATE TABLE table_name_52 (lane INTEGER, nationality VARCHAR);","SELECT AVG(lane) FROM table_name_52 WHERE nationality = ""china"";","SELECT AVG(lane) FROM table_name_52 WHERE nationality = ""china"";",1 Find the project with the highest cost in 'Road_Infrastructure' table.,"CREATE TABLE Road_Infrastructure (id INT, project_name VARCHAR(50), location VARCHAR(50), cost INT);","SELECT project_name, MAX(cost) FROM Road_Infrastructure;","SELECT project_name, cost FROM Road_Infrastructure ORDER BY cost DESC LIMIT 1;",0 Show all dishes in the menu and menu_nutrition tables that contain less than 500 calories and more than 20g of protein per serving.,"CREATE TABLE menu (menu_id INT, dish_name TEXT); CREATE TABLE menu_nutrition (nutrition_id INT, menu_id INT, calories INT, protein INT);",SELECT menu.dish_name FROM menu INNER JOIN menu_nutrition ON menu.menu_id = menu_nutrition.menu_id WHERE menu_nutrition.calories < 500 AND menu_nutrition.protein > 20;,SELECT m.dish_name FROM menu m JOIN menu_nutrition m ON m.menu_id = m.menu_id WHERE m.calories 500 AND m.protein > 20 GROUP BY m.dish_name;,0 List all employees who have not completed the required safety training for their department.,"CREATE TABLE Employees (id INT, name VARCHAR(255), department VARCHAR(255)); CREATE TABLE Training (id INT, employee INT, completed BOOLEAN); ","SELECT e.name, e.department FROM Employees e LEFT JOIN Training t ON e.id = t.employee WHERE t.completed IS NULL",SELECT Employees.name FROM Employees INNER JOIN Training ON Employees.department = Training.employee WHERE Training.completed IS NULL;,0 Update the garment table to reflect the new cost for each garment type.,"CREATE TABLE garment (garment_id INT, garment_type VARCHAR(255), cost FLOAT); ",UPDATE garment SET cost = CASE garment_type WHEN 'T-Shirt' THEN 11.0 WHEN 'Jeans' THEN 22.0 WHEN 'Jackets' THEN 33.0 ELSE cost END;,UPDATE garment SET cost = cost * 1.0 WHERE garment_type IN (SELECT garment_type FROM garment);,0 How many people attended the Away team of middlesbrough?,"CREATE TABLE table_name_67 (attendance VARCHAR, away_team VARCHAR);","SELECT COUNT(attendance) FROM table_name_67 WHERE away_team = ""middlesbrough"";","SELECT attendance FROM table_name_67 WHERE away_team = ""middlesbrough"";",0 Name the winning driver for round 7,"CREATE TABLE table_name_24 (winning_driver VARCHAR, round VARCHAR);",SELECT winning_driver FROM table_name_24 WHERE round = 7;,SELECT winning_driver FROM table_name_24 WHERE round = 7;,1 "List the virtual reality headset models owned by players from the ""VREnthusiasts"" community.","CREATE TABLE Players (PlayerID INT PRIMARY KEY, Name VARCHAR(50), GamingCommunity VARCHAR(50)); CREATE TABLE VRHeadsets (VRHeadsetID INT PRIMARY KEY, Model VARCHAR(50), PlayerID INT, FOREIGN KEY (PlayerID) REFERENCES Players(PlayerID)); ",SELECT Model FROM VRHeadsets JOIN Players ON Players.PlayerID = VRHeadsets.PlayerID WHERE Players.GamingCommunity = 'VREnthusiasts';,SELECT VRHeadsets.Model FROM VRHeadsets INNER JOIN Players ON VRHeadsets.PlayerID = Players.PlayerID WHERE Players.GamingCommunity = 'VREnthusiasts';,0 How many albums were sold by female R&B artists between 2000 and 2009?,"CREATE TABLE artists (artist_id INT, artist_name VARCHAR(255), genre VARCHAR(255), gender VARCHAR(10)); CREATE TABLE albums (album_id INT, album_name VARCHAR(255), release_year INT, artist_id INT, sales INT); ",SELECT SUM(albums.sales) FROM albums JOIN artists ON albums.artist_id = artists.artist_id WHERE artists.genre = 'R&B' AND artists.gender = 'Female' AND albums.release_year BETWEEN 2000 AND 2009;,SELECT SUM(albums.sales) FROM albums INNER JOIN artists ON albums.artist_id = artists.artist_id WHERE artists.gender = 'Female' AND artists.genre = 'R&B' AND albums.release_year BETWEEN 2000 AND 2009;,0 what is the identifier when the power is 22500 watts?,"CREATE TABLE table_name_17 (identifier VARCHAR, power VARCHAR);","SELECT identifier FROM table_name_17 WHERE power = ""22500 watts"";","SELECT identifier FROM table_name_17 WHERE power = ""22500 watts"";",1 "How many total viewers have April 21, 2010 as the original airing on channel 4?","CREATE TABLE table_22170495_6 (total_viewers VARCHAR, original_airing_on_channel_4 VARCHAR);","SELECT COUNT(total_viewers) FROM table_22170495_6 WHERE original_airing_on_channel_4 = ""April 21, 2010"";","SELECT total_viewers FROM table_22170495_6 WHERE original_airing_on_channel_4 = ""April 21, 2010"";",0 Delete the light rail line 3 from the public transportation system of Phoenix,"CREATE TABLE light_rail_lines (id INT PRIMARY KEY, line_number INT, line_name VARCHAR(255), city VARCHAR(255), num_stations INT);",DELETE FROM light_rail_lines WHERE line_number = 3 AND city = 'Phoenix';,DELETE FROM light_rail_lines WHERE line_number = 3 AND city = 'Phoenix';,1 Delete the 'employee_photos' table,"CREATE TABLE employee_photos (id INT PRIMARY KEY, employee_id INT, photo BLOB);",DROP TABLE employee_photos;,DELETE FROM employee_photos;,0 Which competition had 2 draws?,"CREATE TABLE table_name_79 (competition VARCHAR, draws VARCHAR);",SELECT competition FROM table_name_79 WHERE draws = 2;,SELECT competition FROM table_name_79 WHERE draws = 2;,1 What is the average project cost per state?,"CREATE TABLE Projects (ProjectID int, State varchar(25), Cost decimal(10,2)); ","SELECT State, AVG(Cost) AS AvgCostPerState FROM Projects GROUP BY State;","SELECT State, AVG(Cost) as AvgCost FROM Projects GROUP BY State;",0 What is the length of the track named michigan international speedway?,"CREATE TABLE table_1245148_1 (length VARCHAR, track_name VARCHAR);","SELECT length FROM table_1245148_1 WHERE track_name = ""Michigan International Speedway"";","SELECT length FROM table_1245148_1 WHERE track_name = ""Michigan International Speedway"";",1 "Birth Date of 8 November 1980, and a Weight smaller than 93 has what sum of a shirt number?","CREATE TABLE table_name_6 (shirt_no INTEGER, birth_date VARCHAR, weight VARCHAR);","SELECT SUM(shirt_no) FROM table_name_6 WHERE birth_date = ""8 november 1980"" AND weight < 93;","SELECT SUM(shirt_no) FROM table_name_6 WHERE birth_date = ""8 november 1980"" AND weight 93;",0 Find the names of the swimmers who have no record.,"CREATE TABLE swimmer (name VARCHAR, id VARCHAR, swimmer_id VARCHAR); CREATE TABLE record (name VARCHAR, id VARCHAR, swimmer_id VARCHAR);",SELECT name FROM swimmer WHERE NOT id IN (SELECT swimmer_id FROM record);,SELECT T1.name FROM swimmer AS T1 JOIN record AS T2 ON T1.id = T2.swimmer_id WHERE T2.id IS NULL;,0 Name the race time for 2002,"CREATE TABLE table_2139390_2 (race_time VARCHAR, year VARCHAR);",SELECT race_time FROM table_2139390_2 WHERE year = 2002;,SELECT race_time FROM table_2139390_2 WHERE year = 2002;,1 What is the maximum rating of hotels in Oceania that have adopted AI technology?,"CREATE TABLE hotels (hotel_id INT, hotel_name TEXT, country TEXT, rating FLOAT, ai_adoption BOOLEAN); ",SELECT MAX(rating) FROM hotels WHERE ai_adoption = true AND country = 'Oceania';,SELECT MAX(rating) FROM hotels WHERE country = 'Oceania' AND ai_adoption = true;,0 "Identify the top 3 community development initiatives in Kenya, Tanzania, and Uganda based on the total budget allocated, and present them in descending order of budget.","CREATE TABLE Community_Projects (ProjectID INT, Country VARCHAR(10), Budget FLOAT); ","SELECT Country, SUM(Budget) as Total_Budget FROM Community_Projects WHERE Country IN ('Kenya', 'Tanzania', 'Uganda') GROUP BY Country ORDER BY Total_Budget DESC LIMIT 3;","SELECT Country, SUM(Budget) as Total_Budget FROM Community_Projects WHERE Country IN ('Kenya', 'Tanzania', 'Uganda') GROUP BY Country ORDER BY Total_Budget DESC LIMIT 3;",1 How many gold medals did Brazil win with a total of more than 55 medals?,"CREATE TABLE table_name_37 (gold INTEGER, nation VARCHAR, total VARCHAR);","SELECT AVG(gold) FROM table_name_37 WHERE nation = ""brazil"" AND total > 55;","SELECT SUM(gold) FROM table_name_37 WHERE nation = ""brazil"" AND total > 55;",0 Name the studio for john scott,"CREATE TABLE table_name_74 (studio VARCHAR, role VARCHAR);","SELECT studio FROM table_name_74 WHERE role = ""john scott"";","SELECT studio FROM table_name_74 WHERE role = ""john scott"";",1 Who was the Home captain for the Test match of Australia in England at the Edgbaston Venue?,"CREATE TABLE table_name_99 (home_captain VARCHAR, venue VARCHAR);","SELECT home_captain FROM table_name_99 WHERE venue = ""edgbaston"";","SELECT home_captain FROM table_name_99 WHERE venue = ""edgbaston"";",1 What is the winning span of the name martin kaymer?,"CREATE TABLE table_1953516_1 (winning_span VARCHAR, name VARCHAR);","SELECT winning_span FROM table_1953516_1 WHERE name = ""Martin Kaymer"";","SELECT winning_span FROM table_1953516_1 WHERE name = ""Martin Kaymer"";",1 What Home team played Richmond?,"CREATE TABLE table_name_22 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_22 WHERE away_team = ""richmond"";","SELECT home_team FROM table_name_22 WHERE away_team = ""richmond"";",1 Which engine is in all rounds with Tsugio Matsuda driving?,"CREATE TABLE table_name_9 (engine VARCHAR, rounds VARCHAR, driver VARCHAR);","SELECT engine FROM table_name_9 WHERE rounds = ""all"" AND driver = ""tsugio matsuda"";","SELECT engine FROM table_name_9 WHERE rounds = ""all"" AND driver = ""tsugio matsuda"";",1 What is the highest place of the song with 38 votes and a draw great than 3?,"CREATE TABLE table_name_8 (place INTEGER, votes VARCHAR, draw VARCHAR);",SELECT MAX(place) FROM table_name_8 WHERE votes = 38 AND draw > 3;,SELECT MAX(place) FROM table_name_8 WHERE votes = 38 AND draw > 3;,1 Find the number of days between the first and last visit for each visitor in Chicago.,"CREATE TABLE Visitors (VisitorID INT, Name VARCHAR(255)); CREATE TABLE Visits (VisitID INT, VisitorID INT, VisitDate DATE);","SELECT VisitorID, DATEDIFF(day, MIN(VisitDate), MAX(VisitDate)) as DaysBetweenVisits FROM Visits JOIN Visitors ON Visits.VisitorID = Visitors.VisitorID WHERE Visitors.City = 'Chicago' GROUP BY VisitorID;","SELECT v.Name, COUNT(v.VisitorID) as DaysFromVisits INNER JOIN Visits v ON v.VisitorID = v.VisitorID WHERE v.Name = 'Chicago' GROUP BY v.Name;",0 Which nation was the ship from that had 372 victims?,"CREATE TABLE table_name_26 (nat VARCHAR, estimate VARCHAR);","SELECT nat FROM table_name_26 WHERE estimate = ""372"";","SELECT nat FROM table_name_26 WHERE estimate = ""372 victims"";",0 Show the top 3 cities with the most fans in 'fan_demographics_v',"CREATE VIEW fan_demographics_v AS SELECT fan_id, age, gender, city, state, country FROM fan_data; CREATE TABLE fan_data (fan_id INT, age INT, gender VARCHAR(10), city VARCHAR(50), state VARCHAR(20), country VARCHAR(50)); ","SELECT city, COUNT(*) AS fan_count FROM fan_demographics_v GROUP BY city ORDER BY fan_count DESC LIMIT 3;","SELECT city, COUNT(*) as total_fans FROM fan_demographics_v GROUP BY city ORDER BY total_fans DESC LIMIT 3;",0 What is the maximum price of organic skincare products sold in the US?,"CREATE TABLE skincare_prices (id INT, product VARCHAR(255), organic BOOLEAN, price FLOAT, country VARCHAR(255)); ",SELECT MAX(price) FROM skincare_prices WHERE organic = true AND country = 'USA';,SELECT MAX(price) FROM skincare_prices WHERE organic = true AND country = 'US';,0 What is Bianka Panova's highest total with lower than place 1?,"CREATE TABLE table_name_56 (total INTEGER, name VARCHAR, place VARCHAR);","SELECT MAX(total) FROM table_name_56 WHERE name = ""bianka panova"" AND place < 1;","SELECT MAX(total) FROM table_name_56 WHERE name = ""bianka panova"" AND place 1;",0 Get the total number of military personnel in each region and order them by the highest number of personnel.,"CREATE TABLE military_personnel (region TEXT, personnel INTEGER); ","SELECT region, SUM(personnel) FROM military_personnel GROUP BY region ORDER BY SUM(personnel) DESC","SELECT region, SUM(personnel) as total_personnel FROM military_personnel GROUP BY region ORDER BY total_personnel DESC;",0 "What is the number of disability accommodations in each location, and what is the average budget spent on accommodations in each location?","CREATE TABLE Accommodations (id INT, name TEXT, location TEXT, budget DECIMAL(10,2)); ","SELECT location, COUNT(*) as num_accommodations, AVG(budget) as avg_budget_per_accommodation FROM Accommodations GROUP BY location;","SELECT location, COUNT(*) as num_accommodations, AVG(budget) as avg_budget FROM Accommodations GROUP BY location;",0 "What is 2011, when 2009 is ""A""?",CREATE TABLE table_name_59 (Id VARCHAR);,"SELECT 2011 FROM table_name_59 WHERE 2009 = ""a"";","SELECT 2011 FROM table_name_59 WHERE 2009 = ""a"";",1 "What is the minimum food safety score for restaurants located in each city, excluding cities with no restaurants?","CREATE TABLE restaurants (id INT, name TEXT, city TEXT, score INT);","SELECT city, MIN(score) FROM restaurants WHERE city IS NOT NULL GROUP BY city;","SELECT city, MIN(score) FROM restaurants GROUP BY city;",0 What is the minimum number of military personnel in Africa?,"CREATE TABLE military_personnel_africa (country VARCHAR(255), num_personnel INT); ",SELECT MIN(num_personnel) FROM military_personnel_africa;,SELECT MIN(num_personnel) FROM military_personnel_africa;,1 "What is the average weight of chemicals produced in the Asia Pacific region, grouped by chemical category?","CREATE TABLE chemicals (id INT, name VARCHAR(255), weight FLOAT, region VARCHAR(255));","SELECT category, AVG(weight) as avg_weight FROM (SELECT chemicals.name as category, AVG(weight) as weight FROM chemicals WHERE region = 'Asia Pacific' GROUP BY chemicals.name) as subquery GROUP BY category;","SELECT category, AVG(weight) as avg_weight FROM chemicals WHERE region = 'Asia Pacific' GROUP BY category;",0 What is the total water consumption for the month of July for all water treatment plants in the 'Rural' region?,"CREATE TABLE WaterConsumption (id INT, plant_id INT, consumption_date DATE, consumption INT); ",SELECT SUM(consumption) FROM WaterConsumption WHERE region = 'Rural' AND MONTH(consumption_date) = 7;,SELECT SUM(consumption) FROM WaterConsumption WHERE consumption_date BETWEEN '2022-07-01' AND '2022-07-31' AND plant_id IN (SELECT id FROM WaterConsumption WHERE region = 'Rural');,0 What is the total amount of climate finance committed to projects in Africa?,"CREATE TABLE climate_finance (id INT, country VARCHAR(50), amount FLOAT); CREATE TABLE africa_projects (id INT, project_name VARCHAR(50));",SELECT SUM(cf.amount) FROM climate_finance cf INNER JOIN africa_projects ap ON cf.id = ap.id WHERE cf.country = 'Africa';,SELECT SUM(amount) FROM climate_finance INNER JOIN africa_projects ON climate_finance.country = africa_projects.id;,0 "What is the highest # Of Constituency Votes, when Election is before 1976, when Leader is Eisaku Satō, and when # Of Candidates is less than 328?","CREATE TABLE table_name_18 (_number_of_constituency_votes INTEGER, _number_of_candidates VARCHAR, election VARCHAR, leader VARCHAR);","SELECT MAX(_number_of_constituency_votes) FROM table_name_18 WHERE election < 1976 AND leader = ""eisaku satō"" AND _number_of_candidates < 328;","SELECT MAX(_number_of_constituency_votes) FROM table_name_18 WHERE election 1976 AND leader = ""eisaku sat"" AND _number_of_candidates 328;",0 "How many content items were produced in each month of 2022, broken down by content type?","CREATE TABLE content (id INT, created_at TIMESTAMP); ","SELECT EXTRACT(MONTH FROM created_at) AS month, type, COUNT(*) AS num_content FROM content, (SELECT 'article' AS type UNION ALL SELECT 'video') types GROUP BY month, type ORDER BY month, type;","SELECT EXTRACT(MONTH FROM created_at) as month, COUNT(*) as num_items FROM content WHERE created_at BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY month ORDER BY month;",0 Who was the winner in 2007?,"CREATE TABLE table_name_49 (winner VARCHAR, date VARCHAR);",SELECT winner FROM table_name_49 WHERE date = 2007;,"SELECT winner FROM table_name_49 WHERE date = ""2007"";",0 How many properties are there in the 'sustainable_housing' table for each state?,"CREATE TABLE sustainable_housing (id INT, address VARCHAR(255), city VARCHAR(255), state VARCHAR(255), square_footage INT, sustainable_features VARCHAR(255)); ","SELECT state, COUNT(*) FROM sustainable_housing GROUP BY state;","SELECT state, COUNT(*) FROM sustainable_housing GROUP BY state;",1 What is the average dissolved oxygen level for each fish species in Tank1?,"CREATE TABLE Tank1 (species VARCHAR(20), dissolved_oxygen FLOAT); ","SELECT species, AVG(dissolved_oxygen) FROM Tank1 GROUP BY species;","SELECT species, AVG(dissolved_oxygen) FROM Tank1 GROUP BY species;",1 What is the minimum depth of all marine protected areas in the Arctic Ocean?,"CREATE TABLE marine_protected_areas (name VARCHAR(255), depth FLOAT, ocean VARCHAR(255));",SELECT MIN(depth) FROM marine_protected_areas WHERE ocean = 'Arctic';,SELECT MIN(depth) FROM marine_protected_areas WHERE ocean = 'Arctic Ocean';,0 What is the recycling rate for plastic and glass in 2018?,"CREATE TABLE recycling_rates (id INT, material VARCHAR(20), year INT, recycling_rate DECIMAL(5,2)); ",SELECT recycling_rate FROM recycling_rates WHERE (material = 'plastic' OR material = 'glass') AND year = 2018;,"SELECT material, recycling_rate FROM recycling_rates WHERE year = 2018 AND material IN ('plastic', 'glass');",0 List the top 3 countries with the highest number of cultural heritage sites.,"CREATE TABLE cultural_sites (site_id INT, site_name VARCHAR(50), country VARCHAR(50)); ","SELECT country, COUNT(*) as site_count FROM cultural_sites GROUP BY country ORDER BY site_count DESC LIMIT 3;","SELECT country, COUNT(*) as site_count FROM cultural_sites GROUP BY country ORDER BY site_count DESC LIMIT 3;",1 Calculate the total installed capacity of solar panels in Spain in 2019.,"CREATE TABLE renewable_energy (id INT, type TEXT, country TEXT, installation_year INT, capacity FLOAT); ",SELECT SUM(capacity) FROM renewable_energy WHERE type = 'Solar Panel' AND country = 'Spain' AND installation_year = 2019;,SELECT SUM(capacity) FROM renewable_energy WHERE type = 'Solar' AND country = 'Spain' AND installation_year = 2019;,0 What is the Tenure of the Officer who died in a helicopter accident with Badge/Serial Number 16805?,"CREATE TABLE table_name_95 (tenure VARCHAR, cause_of_death VARCHAR, badge_serial_number VARCHAR);","SELECT tenure FROM table_name_95 WHERE cause_of_death = ""helicopter accident"" AND badge_serial_number = ""16805"";","SELECT tenure FROM table_name_95 WHERE cause_of_death = ""helicopter accident"" AND badge_serial_number = ""16805"";",1 What is the average cargo weight for each vessel type?,"CREATE TABLE vessel_type (id INT, name VARCHAR(255)); CREATE TABLE vessel_cargo (vessel_id INT, weight INT, type_id INT);","SELECT v.name, AVG(vc.weight) as avg_weight FROM vessel_cargo vc JOIN vessel_type v ON vc.type_id = v.id GROUP BY v.name;","SELECT vt.name, AVG(vc.weight) as avg_weight FROM vessel_cargo vc JOIN vessel_type vt ON vc.vessel_id = vt.id GROUP BY vt.name;",0 List the unique spacecraft names manufactured by companies that have manufactured more than 5 spacecraft.,"CREATE TABLE Spacecraft_Manufacturers_5 (Company VARCHAR(50), Spacecraft_Name VARCHAR(50), Manufacturing_Date DATE); ",SELECT DISTINCT Spacecraft_Name FROM Spacecraft_Manufacturers_5 WHERE Company IN (SELECT Company FROM Spacecraft_Manufacturers_5 GROUP BY Company HAVING COUNT(*) > 5);,SELECT DISTINCT Spacecraft_Name FROM Spacecraft_Manufacturers_5 WHERE Company IN (SELECT Company FROM Spacecraft_Manufacturers_5) GROUP BY Company HAVING COUNT(DISTINCT Spacecraft_Name) > 5;,0 What are the average vulnerability scores for systems by operating system in the last month?,"CREATE TABLE systems (system_id INT, system_name VARCHAR(255), operating_system VARCHAR(255), vulnerability_score INT, discovered_date DATE); ","SELECT operating_system, AVG(vulnerability_score) AS avg_vulnerability_score FROM systems WHERE discovered_date >= DATE_SUB(NOW(), INTERVAL 1 MONTH) GROUP BY operating_system;","SELECT operating_system, AVG(vulnerability_score) as avg_vulnerability_score FROM systems WHERE discovered_date >= DATEADD(month, -1, GETDATE()) GROUP BY operating_system;",0 Which countries have the highest and lowest drug approval rates in 2020?,"CREATE TABLE drug_approval_rates(country VARCHAR(255), approval_count INT, total_drugs INT, year INT); ","SELECT country, approval_count/total_drugs as approval_rate FROM drug_approval_rates WHERE year = 2020 ORDER BY approval_rate DESC, country ASC;","SELECT country, MAX(approval_count) AS max_approval_rate, MIN(approval_count) AS min_approval_rate FROM drug_approval_rates WHERE year = 2020 GROUP BY country;",0 "What is the lowest number of played games of the team with less than 12 drawns, 41 against, and less than 69 points?","CREATE TABLE table_name_58 (played INTEGER, points VARCHAR, drawn VARCHAR, against VARCHAR);",SELECT MIN(played) FROM table_name_58 WHERE drawn < 12 AND against = 41 AND points < 69;,SELECT MIN(played) FROM table_name_58 WHERE drawn 12 AND against = 41 AND points 69;,0 What was the home teams score against the away team footscray?,"CREATE TABLE table_name_39 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team AS score FROM table_name_39 WHERE away_team = ""footscray"";","SELECT home_team AS score FROM table_name_39 WHERE away_team = ""footscray"";",1 Which Goals have a Name of lee dong-gook?,"CREATE TABLE table_name_17 (goals INTEGER, name VARCHAR);","SELECT MAX(goals) FROM table_name_17 WHERE name = ""lee dong-gook"";","SELECT SUM(goals) FROM table_name_17 WHERE name = ""lee dong-gook"";",0 The golfer who won in 1993 had what total has his total?,"CREATE TABLE table_name_97 (total INTEGER, year_s__won VARCHAR);","SELECT SUM(total) FROM table_name_97 WHERE year_s__won = ""1993"";",SELECT SUM(total) FROM table_name_97 WHERE year_s__won = 1993;,0 Find Alice's friends of friends.,"CREATE TABLE PersonFriend (name VARCHAR); CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR); CREATE TABLE Person (name VARCHAR);",SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name = T2.name JOIN PersonFriend AS T3 ON T1.friend = T3.name JOIN PersonFriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name <> 'Alice';,"SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = ""Alice"";",0 What is the average international tourist spending in Europe over the last 5 years?,"CREATE TABLE TouristSpending (Year INT, Country VARCHAR(255), Spending DECIMAL(10,2)); ",SELECT AVG(Spending) FROM (SELECT Spending FROM TouristSpending WHERE Country = 'Europe' AND Year BETWEEN 2016 AND 2021) AS EuropeSpending;,SELECT AVG(Spending) FROM TouristSpending WHERE Year BETWEEN (YEAR(CURRENT_DATE) - 5 AND YEAR(CURRENT_DATE)) AND YEAR(CURRENT_DATE);,0 What was the score for the game on February 12?,"CREATE TABLE table_name_79 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_79 WHERE date = ""february 12"";","SELECT score FROM table_name_79 WHERE date = ""february 12"";",1 Who played hte home team when the score was 2:1?,"CREATE TABLE table_name_45 (home VARCHAR, score VARCHAR);","SELECT home FROM table_name_45 WHERE score = ""2:1"";","SELECT home FROM table_name_45 WHERE score = ""2:1"";",1 "Which countries have launched satellites in a specific year, based on the SpaceMissions table?","CREATE TABLE SpaceMissions (MissionID INT, Year INT, Country VARCHAR(50), SatelliteID INT); ",SELECT Country FROM SpaceMissions WHERE Year = 2015 GROUP BY Country HAVING COUNT(SatelliteID) > 0;,SELECT Country FROM SpaceMissions WHERE Year = 2021;,0 What was the total investment in community development initiatives in the 'Gangetic Plains' region in 2020?,"CREATE TABLE community_development (id INT, initiative_name VARCHAR(255), region VARCHAR(255), investment FLOAT, completion_year INT); ",SELECT SUM(investment) FROM community_development WHERE region = 'Gangetic Plains' AND completion_year = 2020;,SELECT SUM(investment) FROM community_development WHERE region = 'Gangetic Plains' AND completion_year = 2020;,1 What are the names of all spacecraft that were launched after the first manned spaceflight by a non-US agency but before the first manned spaceflight by a private company?,"CREATE TABLE Spacecraft (id INT, name VARCHAR(50), manufacturer VARCHAR(50), launch_date DATE); ",SELECT s.name FROM Spacecraft s WHERE s.launch_date > (SELECT launch_date FROM Spacecraft WHERE name = 'Vostok 1') AND s.launch_date < (SELECT launch_date FROM Spacecraft WHERE name = 'SpaceShipOne');,SELECT name FROM Spacecraft WHERE launch_date > (SELECT launch_date FROM Spacecraft WHERE manufacturer = 'NASA') AND launch_date (SELECT launch_date FROM Spacecraft WHERE manufacturer = 'NASA') AND launch_date (SELECT launch_date FROM Spacecraft WHERE manufacturer = 'NASA');,0 What is the total when the score of set 1 was 15–11?,"CREATE TABLE table_name_68 (total VARCHAR, set_1 VARCHAR);","SELECT total FROM table_name_68 WHERE set_1 = ""15–11"";","SELECT total FROM table_name_68 WHERE set_1 = ""15–11"";",1 "Find the player with the most kills in a single 'Overwatch' match, and display the game, player, and kill count.","CREATE TABLE matches (id INT, game VARCHAR(10), player VARCHAR(50), kills INT, deaths INT, match_date DATE); ","SELECT game, player, kills FROM matches WHERE kills = (SELECT MAX(kills) FROM matches);","SELECT player, game, SUM(kills) as total_kills FROM matches WHERE game = 'Overwatch' GROUP BY player ORDER BY total_kills DESC LIMIT 1;",0 How many goals have been scored by Tiago Gomes?,"CREATE TABLE table_12321870_32 (goals VARCHAR, player_name VARCHAR);","SELECT goals FROM table_12321870_32 WHERE player_name = ""Tiago Gomes"";","SELECT goals FROM table_12321870_32 WHERE player_name = ""Tiago Gomes"";",1 How many customer complaints have been received for each mobile and broadband service in the last year?,"CREATE TABLE complaints (complaint_id INT, complaint_date DATE, service_id INT, complaint_description VARCHAR(500));","SELECT s.service_name, COUNT(c.complaint_id) AS complaint_count FROM services s INNER JOIN complaints c ON s.service_id = c.service_id WHERE c.complaint_date >= DATEADD(year, -1, GETDATE()) GROUP BY s.service_name;","SELECT service_id, COUNT(*) FROM complaints WHERE complaint_date >= DATEADD(year, -1, GETDATE()) GROUP BY service_id;",0 Which menu items were sold the least in a specific time period?,"CREATE TABLE menu_items (id INT, name VARCHAR(255), category VARCHAR(255), price DECIMAL(5,2)); CREATE TABLE orders (id INT, menu_item_id INT, quantity INT, order_date DATE); SELECT menu_item_id, SUM(quantity) AS total_quantity FROM orders WHERE order_date BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY menu_item_id ORDER BY total_quantity ASC;","SELECT m.id, m.name, m.category, SUM(o.quantity) AS total_quantity FROM menu_items m JOIN orders o ON m.id = o.menu_item_id WHERE o.order_date BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY m.id ORDER BY total_quantity ASC;","SELECT menu_item_id, MIN(total_quantity) as min_quantity FROM orders JOIN menu_items ON orders.menu_item_id = menu_items.id WHERE order_date BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY menu_item_id ORDER BY min_quantity DESC;",0 What is the total budget for ocean floor mapping projects in the Arctic region?,"CREATE TABLE ocean_floor_map (id INT, project_name VARCHAR(255), region VARCHAR(255), budget FLOAT);",SELECT sum(budget) FROM ocean_floor_map WHERE region = 'Arctic';,SELECT SUM(budget) FROM ocean_floor_map WHERE region = 'Arctic';,0 List all digital divide initiatives in Latin America and their respective funding amounts.,"CREATE TABLE digital_divide (id INT, initiative VARCHAR(255), region VARCHAR(255), funding DECIMAL(10,2)); ","SELECT initiative, funding FROM digital_divide WHERE region = 'Latin America';","SELECT initiative, funding FROM digital_divide WHERE region = 'Latin America';",1 "What is the sum of the values of all co-ownership properties in Atlanta, GA?","CREATE TABLE CoOwnershipProperties (Id INT, City VARCHAR(50), Value FLOAT); ",SELECT SUM(Value) FROM CoOwnershipProperties WHERE City = 'Atlanta';,SELECT SUM(Value) FROM CoOwnershipProperties WHERE City = 'Atlanta';,1 How many farms are there?,CREATE TABLE farm (Id VARCHAR);,SELECT COUNT(*) FROM farm;,SELECT COUNT(*) FROM farm;,1 List all space missions led by astronauts from India,"CREATE TABLE SpaceMissions (id INT, mission_name VARCHAR(30), leader_name VARCHAR(30), leader_nationality VARCHAR(20)); ",SELECT mission_name FROM SpaceMissions WHERE leader_nationality = 'India';,SELECT mission_name FROM SpaceMissions WHERE leader_nationality = 'India';,1 Teerasil Dangda who had a to club of released plays what position?,"CREATE TABLE table_name_76 (pos VARCHAR, to_club VARCHAR, player VARCHAR);","SELECT pos FROM table_name_76 WHERE to_club = ""released"" AND player = ""teerasil dangda"";","SELECT pos FROM table_name_76 WHERE to_club = ""released"" AND player = ""terasil dangda"";",0 Which donors have donated more than the average donation?,"CREATE TABLE Donors (DonorID INT, DonorName VARCHAR(50), TotalDonation DECIMAL(10,2));","SELECT DonorName, TotalDonation FROM Donors WHERE TotalDonation > (SELECT AVG(TotalDonation) FROM Donors);",SELECT DonorName FROM Donors WHERE TotalDonation > (SELECT AVG(TotalDonation) FROM Donors);,0 What is the minimum age of players who have played Rocket League?,"CREATE TABLE players (id INT, name VARCHAR(50), age INT, game VARCHAR(50)); ",SELECT MIN(age) AS min_age FROM players WHERE game = 'Rocket League';,SELECT MIN(age) FROM players WHERE game = 'Rocket League';,0 "If the winners from the previous round is 8, what is the round?","CREATE TABLE table_1859269_1 (round VARCHAR, winners_from_previous_round VARCHAR);","SELECT round FROM table_1859269_1 WHERE winners_from_previous_round = ""8"";",SELECT round FROM table_1859269_1 WHERE winners_from_previous_round = 8;,0 Which player has a subtotal of more than 3 and more than 8 in round 1?,"CREATE TABLE table_name_59 (player VARCHAR, subtotal VARCHAR, round_1 VARCHAR);",SELECT player FROM table_name_59 WHERE subtotal > 3 AND round_1 > 8;,SELECT player FROM table_name_59 WHERE subtotal > 3 AND round_1 > 8;,1 What award is featured in 1992?,"CREATE TABLE table_name_18 (award VARCHAR, year VARCHAR);",SELECT award FROM table_name_18 WHERE year = 1992;,SELECT award FROM table_name_18 WHERE year = 1992;,1 "Find the total number of registered users and the sum of their ages who signed up for the 'Toronto Raptors' newsletter in the 'Eastern' conference from the cities 'Toronto' and 'Montreal'. Assume the 'fan_registration' table has columns 'team_name', 'conference', 'city', 'registration_date' and 'age'.","CREATE TABLE TEAMS (team_name VARCHAR(50), conference VARCHAR(50)); CREATE TABLE fan_registration (team_name VARCHAR(50), conference VARCHAR(50), city VARCHAR(50), registration_date DATE, age INT); ","SELECT SUM(age), COUNT(*) FROM fan_registration WHERE team_name = 'Toronto Raptors' AND conference = 'Eastern' AND city IN ('Toronto', 'Montreal');","SELECT COUNT(*), SUM(age) FROM fan_registration WHERE team_name = 'Toronto Raptors' AND conference = 'Eastern' AND city IN ('Toronto', 'Montreal');",0 What are the total expenses for the SpaceX satellite deployment projects and the NASA space exploration research programs?,"CREATE TABLE SpaceX_Projects (project_id INT, name VARCHAR(50), type VARCHAR(50), expenses DECIMAL(10,2));CREATE TABLE NASA_Research (research_id INT, name VARCHAR(50), type VARCHAR(50), expenses DECIMAL(10,2)); ","SELECT SUM(expenses) FROM SpaceX_Projects WHERE type IN ('Satellite Deployment', 'Space Exploration') UNION ALL SELECT SUM(expenses) FROM NASA_Research WHERE type IN ('Space Exploration', 'Space Station');",SELECT SUM(Expenses) FROM SpaceX_Projects INNER JOIN NASA_Research ON SpaceX_Projects.project_id = NASA_Research.project_id WHERE SpaceX_Projects.type = 'Satellite Deployment' AND NASA_Research.type = 'Space Exploration';,0 "List document IDs, document names, and document descriptions for all documents.","CREATE TABLE Documents (document_id VARCHAR, document_name VARCHAR, document_description VARCHAR);","SELECT document_id, document_name, document_description FROM Documents;","SELECT document_id, document_name, document_description FROM Documents;",1 What joined year does Dropped Athletics have?,"CREATE TABLE table_1973729_2 (joined INTEGER, current_conference VARCHAR);","SELECT MAX(joined) FROM table_1973729_2 WHERE current_conference = ""Dropped athletics"";","SELECT MAX(joined) FROM table_1973729_2 WHERE current_conference = ""Dropped Athletics"";",0 Which place had a performance of 19.30 seconds by Jamaica?,"CREATE TABLE table_name_50 (place VARCHAR, nation VARCHAR, performance VARCHAR);","SELECT place FROM table_name_50 WHERE nation = ""jamaica"" AND performance = ""19.30"";","SELECT place FROM table_name_50 WHERE nation = ""jamaicana"" AND performance = ""19.30 seconds"";",0 What is the average virtual tour rating for each cultural heritage site?,"CREATE TABLE cultural_heritage (id INT, name TEXT, location TEXT, virtual_tour_id INT, rating INT); ","SELECT virtual_tour_id, AVG(rating) as avg_rating FROM cultural_heritage GROUP BY virtual_tour_id;","SELECT location, AVG(rating) as avg_rating FROM cultural_heritage GROUP BY location;",0 Name the least episode for donnie klang,"CREATE TABLE table_2140071_12 (episode INTEGER, coach VARCHAR);","SELECT MIN(episode) FROM table_2140071_12 WHERE coach = ""Donnie Klang"";","SELECT MIN(episode) FROM table_2140071_12 WHERE coach = ""Donnie Klang"";",1 "What is the total number of students and teachers who have access to mental health resources, by building?","CREATE TABLE Buildings (building_id INT, name VARCHAR(255), num_students INT, num_teachers INT, mental_health_resources BOOLEAN);","SELECT building_id, name, SUM(num_students) AS total_students, SUM(num_teachers) AS total_teachers FROM Buildings WHERE mental_health_resources = TRUE GROUP BY building_id, name;","SELECT name, SUM(num_students) as total_students, SUM(num_teachers) as total_teachers FROM Buildings WHERE mental_health_resources = TRUE GROUP BY name;",0 Show all template type codes and descriptions.,"CREATE TABLE Ref_template_types (template_type_code VARCHAR, template_type_description VARCHAR);","SELECT template_type_code, template_type_description FROM Ref_template_types;","SELECT template_type_code, template_type_description FROM Ref_template_types;",1 What time that is networked has an ad freq of 20 minutes until 7pm?,"CREATE TABLE table_name_13 (time VARCHAR, local_networked VARCHAR, ad_freq VARCHAR);","SELECT time FROM table_name_13 WHERE local_networked = ""networked"" AND ad_freq = ""20 minutes until 7pm"";","SELECT time FROM table_name_13 WHERE local_networked = ""networked"" AND ad_freq = ""20 minutes until 7pm"";",1 What nationality is Rob Nicholson?,"CREATE TABLE table_name_19 (nationality VARCHAR, player VARCHAR);","SELECT nationality FROM table_name_19 WHERE player = ""rob nicholson"";","SELECT nationality FROM table_name_19 WHERE player = ""rob nicholson"";",1 What is the total revenue for classical music concerts?,"CREATE TABLE ConcertTickets (ticket_id INT, genre VARCHAR(20), price DECIMAL(5,2));",SELECT SUM(price) FROM ConcertTickets WHERE genre = 'classical';,SELECT SUM(price) FROM ConcertTickets WHERE genre = 'Classical';,0 "What are the names and descriptions of all military technologies in the technologies table that have a cost less than $10,000,000?","CREATE TABLE technologies (name TEXT, description TEXT, cost INT); ","SELECT name, description FROM technologies WHERE cost < 10000000;","SELECT name, description FROM technologies WHERE cost 1000000000;",0 Determine the average number of posts per day for the 'social_media' database.,"CREATE TABLE posts (post_id INT, user_id INT, post_date DATE); ","SELECT AVG(num_posts_per_day) FROM (SELECT user_id, COUNT(*) / COUNT(DISTINCT post_date) AS num_posts_per_day FROM posts GROUP BY user_id) AS subquery;",SELECT AVG(posts_per_day) FROM posts WHERE user_id IN (SELECT user_id FROM social_media);,0 What is the total number of meteoroids encountered by each spacecraft?,"CREATE TABLE spacecraft_meteoroids (id INT, spacecraft VARCHAR, encounter_date DATE, size FLOAT);","SELECT spacecraft, COUNT(*) as total_encounters FROM spacecraft_meteoroids GROUP BY spacecraft;","SELECT spacecraft, SUM(size) FROM spacecraft_meteoroids GROUP BY spacecraft;",0 What is the total billing amount for each legal precedent?,"CREATE TABLE LegalPrecedents ( PrecedentID INT, PrecedentName VARCHAR(50), BillingAmount DECIMAL(10,2) ); ","SELECT PrecedentName, SUM(BillingAmount) AS TotalBillingAmount FROM LegalPrecedents GROUP BY PrecedentName;","SELECT PrecedentName, SUM(BillingAmount) FROM LegalPrecedents GROUP BY PrecedentName;",0 Who lost when the philadelphia eagles won at lincoln financial field on september 30?,"CREATE TABLE table_name_24 (loser VARCHAR, date VARCHAR, location VARCHAR, winner VARCHAR);","SELECT loser FROM table_name_24 WHERE location = ""lincoln financial field"" AND winner = ""philadelphia eagles"" AND date = ""september 30"";","SELECT loser FROM table_name_24 WHERE location = ""lincoln financial field"" AND winner = ""philadelphia eagles"" AND date = ""september 30"";",1 "Get the number of rural infrastructure projects and total funding for each region from the ""infrastructure_funding"" and ""rural_projects"" tables","CREATE TABLE infrastructure_funding (id INT, region VARCHAR(255), project_id INT, funding DECIMAL(10,2)); CREATE TABLE rural_projects (id INT, province VARCHAR(255), project_type VARCHAR(255), region VARCHAR(255), start_date DATE);","SELECT region, COUNT(*), SUM(funding) FROM infrastructure_funding i JOIN rural_projects r ON i.project_id = r.id GROUP BY region;","SELECT i.region, COUNT(i.id) as num_projects, SUM(i.funding) as total_funding FROM infrastructure_funding i JOIN rural_projects r ON i.project_id = r.id GROUP BY i.region;",0 What record was set by walter brennan before 1941?,"CREATE TABLE table_name_30 (record_set VARCHAR, actor VARCHAR, year VARCHAR);","SELECT record_set FROM table_name_30 WHERE actor = ""walter brennan"" AND year < 1941;","SELECT record_set FROM table_name_30 WHERE actor = ""walter brennan"" AND year 1941;",0 What is the total number of visitors to children's programs?,"CREATE TABLE if not exists programs (id INT, name VARCHAR(255), type VARCHAR(255), visitors INT); ",SELECT SUM(visitors) FROM programs WHERE type = 'Children';,SELECT SUM(visitors) FROM programs WHERE type = 'children';,0 What is the average number of starts when 11 cuts were made and the top 10 ranking is larger than 4?,"CREATE TABLE table_name_33 (starts INTEGER, cuts_made VARCHAR, top_10 VARCHAR);",SELECT AVG(starts) FROM table_name_33 WHERE cuts_made = 11 AND top_10 > 4;,SELECT AVG(starts) FROM table_name_33 WHERE cuts_made = 11 AND top_10 > 4;,1 "What is the average energy efficiency rating for buildings in 'UrbanEfficiency' table, grouped by city and construction period?","CREATE TABLE UrbanEfficiency (building_id INT, city VARCHAR(50), construction_period INT, energy_efficiency_rating INT);","SELECT city, construction_period, AVG(energy_efficiency_rating) FROM UrbanEfficiency GROUP BY city, construction_period;","SELECT city, construction_period, AVG(energy_efficiency_rating) FROM UrbanEfficiency GROUP BY city, construction_period;",0 "What was the average number of refugee camps built per year by org_type ""Non-governmental"" between 2015 and 2020?","CREATE TABLE refugee_camps (id INT, build_year INT, org_type VARCHAR(20)); ","SELECT AVG(build_year) FROM (SELECT build_year, YEAR(CURRENT_DATE) - build_year AS year_diff FROM refugee_camps WHERE org_type = 'Non-governmental') AS subquery HAVING year_diff BETWEEN 1 AND 6;",SELECT AVG(COUNT(*)) FROM refugee_camps WHERE build_year BETWEEN 2015 AND 2020 AND org_type = 'Non-governmental';,0 What is the average number of floors for buildings in mecca ranked above 12?,"CREATE TABLE table_name_40 (floors INTEGER, city VARCHAR, rank VARCHAR);","SELECT AVG(floors) FROM table_name_40 WHERE city = ""mecca"" AND rank < 12;","SELECT AVG(floors) FROM table_name_40 WHERE city = ""mecca"" AND rank > 12;",0 What is the total number of hours spent on open pedagogy projects by students in each age group?,"CREATE TABLE open_pedagogy_age (student_id INT, age INT, total_open_pedagogy_hours INT); ","SELECT FLOOR(age / 10) * 10 AS age_group, SUM(total_open_pedagogy_hours) FROM open_pedagogy_age GROUP BY age_group;","SELECT age, SUM(total_open_pedagogy_hours) FROM open_pedagogy_age GROUP BY age;",0 What is the Mountains Classification for Winner josé luis carrasco?,"CREATE TABLE table_name_2 (mountains_classification VARCHAR, winner VARCHAR);","SELECT mountains_classification FROM table_name_2 WHERE winner = ""josé luis carrasco"";","SELECT mountains_classification FROM table_name_2 WHERE winner = ""josé luis carrasco"";",1 "What is the ratio of primary care physicians to specialists for each state, ordered from highest to lowest?","CREATE SCHEMA RuralHealth; USE RuralHealth; CREATE TABLE States (StateName VARCHAR(50), StateAbbreviation VARCHAR(10)); CREATE TABLE Physicians (PhysicianID INT, PhysicianName VARCHAR(50), Specialty VARCHAR(50), StateAbbreviation VARCHAR(10)); ","SELECT StateAbbreviation, COUNT(CASE WHEN Specialty = 'Primary Care' THEN 1 END) * 1.0 / COUNT(CASE WHEN Specialty = 'Specialist' THEN 1 END) as Ratio FROM Physicians GROUP BY StateAbbreviation ORDER BY Ratio DESC;","SELECT s.StateName, COUNT(p.PhysicianID) * 100.0 / (SELECT COUNT(p.PhysicianID) FROM Physicians p JOIN RuralHealth.States s ON p.StateAbbreviation = s.StateAbbreviation GROUP BY s.StateName ORDER BY COUNT(p.PhysicianID) DESC;",0 What are the total number of artworks in the 'Paintings' and 'Sculptures' tables?,"CREATE TABLE Paintings (PaintingID INT, Title TEXT); CREATE TABLE Sculptures (SculptureID INT, Title TEXT); ",SELECT COUNT(*) FROM Paintings UNION ALL SELECT COUNT(*) FROM Sculptures;,SELECT COUNT(*) FROM Paintings INNER JOIN Sculptures ON Paintings.PaintingID = Sculptures.PaintingID;,0 How many players are there for each genre?,"CREATE TABLE Players (PlayerID INT, Name VARCHAR(50), Age INT, PreferredGame VARCHAR(50)); ","SELECT PreferredGame, COUNT(*) as NumPlayers FROM Players GROUP BY PreferredGame;","SELECT PreferredGame, COUNT(*) FROM Players GROUP BY PreferredGame;",0 What is the total quantity of vegan dishes sold in the last month?,"CREATE TABLE menu (item_id INT, name TEXT, category TEXT, price FLOAT, is_vegan BOOLEAN); CREATE TABLE sales (item_id INT, sale_date DATE); ",SELECT SUM(m.is_vegan) as total_vegan_sold FROM sales s JOIN menu m ON s.item_id = m.item_id WHERE s.sale_date BETWEEN '2022-04-01' AND '2022-04-30' AND m.category = 'Mains';,"SELECT SUM(m.price) FROM menu m JOIN sales s ON m.item_id = s.item_id WHERE m.is_vegan = true AND s.sale_date >= DATEADD(month, -1, GETDATE());",0 Get the average distance to the nearest star for each constellation in the Astrophysics_Research table.,"CREATE TABLE Astrophysics_Research(id INT, constellation VARCHAR(50), distance_to_nearest_star FLOAT);","SELECT constellation, AVG(distance_to_nearest_star) as Average_Distance FROM Astrophysics_Research GROUP BY constellation;","SELECT constellation, AVG(distance_to_nearest_star) FROM Astrophysics_Research GROUP BY constellation;",0 What was the maximum donation amount from corporate donors in the Central region in 2022?,"CREATE TABLE DonorContributions (donor_id INT, donation_amount DECIMAL(10,2), donation_date DATE, region VARCHAR(50), donor_type VARCHAR(50)); ",SELECT MAX(donation_amount) FROM DonorContributions WHERE region = 'Central' AND donation_date BETWEEN '2022-01-01' AND '2022-12-31' AND donor_type = 'Corporate';,SELECT MAX(donation_amount) FROM DonorContributions WHERE region = 'Central' AND donor_type = 'Corporate' AND YEAR(donation_date) = 2022;,0 What are the names of all schools in the 'education_table'?,CREATE TABLE education_table (school VARCHAR(50)); ,SELECT school FROM education_table;,SELECT school FROM education_table;,1 What is the Position with a round 3 pick for r. jay soward?,"CREATE TABLE table_name_20 (position VARCHAR, round VARCHAR, name VARCHAR);","SELECT position FROM table_name_20 WHERE round < 3 AND name = ""r. jay soward"";","SELECT position FROM table_name_20 WHERE round = 3 AND name = ""r. jay soward"";",0 What is the callsign that has a station type of relay and a channel number of TV-2?,"CREATE TABLE table_24673888_1 (callsign VARCHAR, station_type VARCHAR, ch__number VARCHAR);","SELECT callsign FROM table_24673888_1 WHERE station_type = ""Relay"" AND ch__number = ""TV-2"";","SELECT callsign FROM table_24673888_1 WHERE station_type = ""Relay"" AND ch__number = ""TV-2"";",1 What is the average score for 6th place with a total of 165?,"CREATE TABLE table_name_49 (average VARCHAR, place VARCHAR, total VARCHAR);","SELECT average FROM table_name_49 WHERE place = ""6th"" AND total = ""165"";","SELECT average FROM table_name_49 WHERE place = ""6th"" AND total = 165;",0 What are the average monthly water consumption rates in the agricultural sector for Canada and Australia?,"CREATE TABLE country_water_usage (country TEXT, sector TEXT, year INTEGER, month INTEGER, consumption INTEGER); ","SELECT country, AVG(consumption) AS avg_consumption FROM country_water_usage WHERE sector = 'Agriculture' AND month IN (1, 2, 3) GROUP BY country;","SELECT AVG(consumption) FROM country_water_usage WHERE country IN ('Canada', 'Australia') AND sector = 'Agriculture';",0 Who was the driver for the Richard Childress Racing team in the race with a time of 2:58:22?,"CREATE TABLE table_2266762_1 (driver VARCHAR, team VARCHAR, race_time VARCHAR);","SELECT driver FROM table_2266762_1 WHERE team = ""Richard Childress Racing"" AND race_time = ""2:58:22"";","SELECT driver FROM table_2266762_1 WHERE team = ""Richard Childress Racing"" AND race_time = ""2:58:22"";",1 Update a defendant record in the 'defendants' table,"CREATE TABLE defendants (defendant_id INT PRIMARY KEY, name VARCHAR(255), age INT, gender VARCHAR(50), race VARCHAR(50), ethnicity VARCHAR(50), date_of_birth DATE, charges VARCHAR(255), case_number INT, case_status VARCHAR(50));","UPDATE defendants SET charges = 'Assault', case_status = 'In Progress' WHERE defendant_id = 2003 AND case_number = 2022001;",UPDATE defendants SET charges = 0 WHERE defendant_id = 1;,0 What is the total number of IoT sensors deployed in different regions in the past month?,"CREATE TABLE sensor_data (id INT, region VARCHAR(255), sensor_type VARCHAR(255), timestamp TIMESTAMP); ","SELECT region, COUNT(*) FROM sensor_data WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY region;","SELECT region, COUNT(*) FROM sensor_data WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY region;",1 "What is Tie no, when Date is ""18 Nov 1989"", and when Home Team is ""Doncaster Rovers""?","CREATE TABLE table_name_32 (tie_no VARCHAR, date VARCHAR, home_team VARCHAR);","SELECT tie_no FROM table_name_32 WHERE date = ""18 nov 1989"" AND home_team = ""doncaster rovers"";","SELECT tie_no FROM table_name_32 WHERE date = ""18 nov 1989"" AND home_team = ""doncaster rovers"";",1 "What was the average price of a menu item in the ""Italian"" cuisine type?","CREATE TABLE menu_items (menu_item_id INT, name VARCHAR(255), cuisine_type VARCHAR(255), price DECIMAL(10,2), sales INT); ",SELECT AVG(price) FROM menu_items WHERE cuisine_type = 'Italian';,SELECT AVG(price) FROM menu_items WHERE cuisine_type = 'Italian';,1 How many matches did each team play in the 2021-2022 UEFA Champions League?,"CREATE TABLE ucl_teams (team_id INT, team_name TEXT, league TEXT, matches_played INT, wins INT); ","SELECT team_name, matches_played FROM ucl_teams;","SELECT team_name, SUM(matches_played) as total_matches FROM ucl_teams WHERE league = 'UEFA Champions League' AND YEAR(matches_played) = 2021 GROUP BY team_name;",0 "What are the names , themes , and number of singers for every concert ?","CREATE TABLE singer_in_concert (concert_id VARCHAR); CREATE TABLE concert (concert_name VARCHAR, theme VARCHAR, concert_id VARCHAR);","SELECT t2.concert_name, t2.theme, COUNT(*) FROM singer_in_concert AS t1 JOIN concert AS t2 ON t1.concert_id = t2.concert_id GROUP BY t2.concert_id;","SELECT T1.concert_name, T1.theme, COUNT(*) FROM concert AS T1 JOIN singer_in_concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T1.concert_id;",0 "What's the white for a black of Anand, a result of ½–½, 39 moves, and an opening of d37 queen's gambit declined?","CREATE TABLE table_name_20 (white VARCHAR, opening VARCHAR, moves VARCHAR, black VARCHAR, result VARCHAR);","SELECT white FROM table_name_20 WHERE black = ""anand"" AND result = ""½–½"" AND moves = 39 AND opening = ""d37 queen's gambit declined"";","SELECT white FROM table_name_20 WHERE black = ""anand"" AND result = ""12–12"" AND moves = 39 AND opening = ""d37 queen's gambit declined"";",0 Which smart contracts have a transaction count greater than 1000 and are associated with a digital asset created before 2020-01-01?,"CREATE TABLE smart_contracts (contract_id INT PRIMARY KEY, name VARCHAR(100), transaction_count INT, date_created DATE); CREATE TABLE digital_assets (asset_id INT PRIMARY KEY, name VARCHAR(100), contract_id INT, FOREIGN KEY (contract_id) REFERENCES smart_contracts(contract_id)); ",SELECT smart_contracts.name FROM smart_contracts INNER JOIN digital_assets ON smart_contracts.contract_id = digital_assets.contract_id WHERE smart_contracts.transaction_count > 1000 AND smart_contracts.date_created < '2020-01-01';,SELECT smart_contracts.name FROM smart_contracts INNER JOIN digital_assets ON smart_contracts.contract_id = digital_assets.contract_id WHERE smart_contracts.transaction_count > 1000 AND digital_assets.date_created '2020-01-01';,0 Name the score for josé juan barea (8),"CREATE TABLE table_27723526_12 (score VARCHAR, high_assists VARCHAR);","SELECT score FROM table_27723526_12 WHERE high_assists = ""José Juan Barea (8)"";","SELECT score FROM table_27723526_12 WHERE high_assists = ""José Juan Barea (8)"";",1 What is the maximum salary of sports columnists from the 'writers' and 'salaries' tables?,"CREATE TABLE writers (id INT, name VARCHAR(50), gender VARCHAR(10), department VARCHAR(20)); CREATE TABLE salaries (id INT, writer_id INT, salary INT);",SELECT MAX(s.salary) FROM writers w JOIN salaries s ON w.id = s.writer_id WHERE w.department = 'sports_columnist';,SELECT MAX(salaries.salary) FROM salaries INNER JOIN writers ON salaries.writer_id = writers.id WHERE writers.gender = 'Sports' AND writers.department = 'Sports';,0 Delete the record of the reader with the ID of 3 if it exists.,"CREATE TABLE readers (id INT, name VARCHAR(50), age INT, preference VARCHAR(50)); ",DELETE FROM readers WHERE id = 3;,DELETE FROM readers WHERE id = 3;,1 Identify patients who had an increase in medical visits in the last 6 months compared to the previous 6 months in rural Alabama.,"CREATE TABLE medical_visits (id INT, patient_id INT, visit_date DATE, rural_al BOOLEAN); ","SELECT patient_id, COUNT(*) as last_6_months, LAG(COUNT(*)) OVER (PARTITION BY patient_id ORDER BY visit_date) as previous_6_months FROM medical_visits WHERE rural_al = true GROUP BY patient_id, visit_date HAVING last_6_months > previous_6_months;","SELECT patient_id, COUNT(*) as num_visits FROM medical_visits WHERE rural_al = true AND visit_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) GROUP BY patient_id HAVING num_visits > (SELECT COUNT(*) FROM medical_visits WHERE visit_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) AND rural_al = true) GROUP BY patient_id;",0 What is the average water consumption per day for the last 30 days?,"CREATE TABLE water_consumption (consumption_date DATE, consumption_gallons INT); ","SELECT AVG(consumption_gallons) as avg_consumption FROM water_consumption WHERE consumption_date >= DATEADD(day, -30, GETDATE());","SELECT AVG(consumption_gallons) FROM water_consumption WHERE consumption_date >= DATEADD(day, -30, GETDATE());",0 "Which Rider has a Grid larger than 6, and has Laps of 28, and a Time of +39.476?","CREATE TABLE table_name_42 (rider VARCHAR, time VARCHAR, grid VARCHAR, laps VARCHAR);","SELECT rider FROM table_name_42 WHERE grid > 6 AND laps = 28 AND time = ""+39.476"";","SELECT rider FROM table_name_42 WHERE grid > 6 AND laps = 28 AND time = ""+39.476"";",1 When the network mask is 255.255.255.224 what is the highest total usable host?,"CREATE TABLE table_149426_4 (total_usable_hosts INTEGER, network_mask VARCHAR);","SELECT MAX(total_usable_hosts) FROM table_149426_4 WHERE network_mask = ""255.255.255.224"";","SELECT MAX(total_usable_hosts) FROM table_149426_4 WHERE network_mask = ""255.255.255.224"";",1 What is the average number of visitors to virtual tours in France?,"CREATE TABLE tour_visitors(tour_id INT, num_visitors INT); CREATE VIEW virtual_tours_french AS SELECT vt.tour_id, vt.name, vt.country, tv.num_visitors FROM virtual_tours vt INNER JOIN tour_visitors tv ON vt.tour_id = tv.tour_id WHERE vt.country = 'France';",SELECT AVG(num_visitors) FROM virtual_tours_french;,SELECT AVG(num_visitors) FROM virtual_tours_french;,1 Delete all records from the circular_economy table where the region is 'Asia',"CREATE TABLE circular_economy (id INT PRIMARY KEY, country VARCHAR(255), region VARCHAR(255), circular_economy_percentage INT); ",DELETE FROM circular_economy WHERE region = 'Asia';,DELETE FROM circular_economy WHERE region = 'Asia';,1 What is the average price of Vegan certified products?,"CREATE TABLE products (product_id INT, name VARCHAR(255), price DECIMAL(5,2), certification VARCHAR(255));",SELECT AVG(price) FROM products WHERE certification = 'Vegan';,SELECT AVG(price) FROM products WHERE certification = 'Vegan';,1 Update the description of 'Taiko' to 'Japanese drum',"CREATE TABLE TraditionalArts (Id INT, Art TEXT, Description TEXT); ",UPDATE TraditionalArts SET Description = 'Japanese drum' WHERE Art = 'Taiko';,UPDATE TraditionalArts SET Description = 'Japanese drum' WHERE Art = 'Taiko';,1 Calculate the total quantity of eco-friendly garments produced in Vietnam in 2022.,"CREATE TABLE Manufacturing (id INT, garment_type VARCHAR(20), sustainable BOOLEAN, country VARCHAR(20), quantity INT, year INT); ",SELECT SUM(quantity) as total_quantity FROM Manufacturing WHERE sustainable = TRUE AND country = 'Vietnam' AND year = 2022;,SELECT SUM(quantity) FROM Manufacturing WHERE sustainable = TRUE AND country = 'Vietnam' AND year = 2022;,0 "Which circular economy initiatives have the highest and lowest adoption rates among consumers, and what are their respective adoption rates?","CREATE TABLE EthicalFashion.CircularEconomyAdoption (initiative_id INT, is_adopted BOOLEAN, consumer_id INT); ","SELECT initiative_id, is_adopted, COUNT(*) FILTER (WHERE is_adopted = true) * 100.0 / COUNT(*) AS adoption_rate FROM EthicalFashion.CircularEconomyAdoption GROUP BY initiative_id ORDER BY adoption_rate DESC;","SELECT initiative_id, is_adopted FROM EthicalFashion.CircularEconomyAdoption ORDER BY is_adopted DESC LIMIT 1; SELECT initiative_id, is_adopted FROM EthicalFashion.CircularEconomyAdoption ORDER BY is_adopted DESC LIMIT 1; SELECT initiative_id, is_adopted FROM EthicalFashion.CircularEconomyAdoption ORDER BY is_adopted DESC LIMIT 1;",0 What type of proposal is measure number 3?,"CREATE TABLE table_256286_21 (type VARCHAR, meas_num VARCHAR);",SELECT type FROM table_256286_21 WHERE meas_num = 3;,SELECT type FROM table_256286_21 WHERE meas_num = 3;,1 Delete all intelligence operations related to a specific country in the last year.," CREATE TABLE CountryIntelligenceOps (OpID INT, OpName VARCHAR(50), OpCountry VARCHAR(50), OpDate DATE); "," DELETE FROM CountryIntelligenceOps WHERE OpDate >= DATEADD(year, -1, GETDATE()) AND OpCountry = 'USA';","DELETE FROM CountryIntelligenceOps WHERE OpCountry = 'USA' AND OpDate >= DATEADD(year, -1, GETDATE());",0 Find the number of female faculty members in the HumanResources table.,"CREATE TABLE HumanResources (EmployeeID INT, FirstName VARCHAR(20), LastName VARCHAR(20), Position VARCHAR(20), Gender VARCHAR(10));",SELECT COUNT(*) FROM HumanResources WHERE Position LIKE '%faculty%' AND Gender = 'Female';,SELECT COUNT(*) FROM HumanResources WHERE Gender = 'Female';,0 What is the average crowd size for games with north melbourne as the away side?,"CREATE TABLE table_name_22 (crowd INTEGER, away_team VARCHAR);","SELECT AVG(crowd) FROM table_name_22 WHERE away_team = ""north melbourne"";","SELECT AVG(crowd) FROM table_name_22 WHERE away_team = ""north melbourne"";",1 "What is the total number of garments produced using recycled materials, by each manufacturer, for the year 2020?","CREATE TABLE RecycledGarments (manufacturer VARCHAR(255), garment_count INT, year INT);","SELECT manufacturer, SUM(garment_count) FROM RecycledGarments WHERE year = 2020 GROUP BY manufacturer;","SELECT manufacturer, SUM(garment_count) FROM RecycledGarments WHERE year = 2020 GROUP BY manufacturer;",1 How many unique investors have supported the poverty reduction sector?,"CREATE TABLE investor_activities (investor VARCHAR(20), sector VARCHAR(30)); ",SELECT COUNT(DISTINCT investor) FROM investor_activities WHERE sector = 'poverty reduction';,SELECT COUNT(DISTINCT investor) FROM investor_activities WHERE sector = 'Poverty Reduction';,0 "Show total ticket sales for each team, grouped by team","CREATE TABLE ticket_sales (id INT, team VARCHAR(50), quantity INT, price DECIMAL(5,2));","SELECT team, SUM(quantity * price) as total_sales FROM ticket_sales GROUP BY team;","SELECT team, SUM(quantity * price) as total_sales FROM ticket_sales GROUP BY team;",1 Which systems have been affected by ransomware in the past month?,"CREATE TABLE systems (system_id INT PRIMARY KEY, system_name VARCHAR(255), last_updated TIMESTAMP);CREATE TABLE malware_events (event_id INT PRIMARY KEY, system_id INT, event_date TIMESTAMP, malware_type VARCHAR(50));",SELECT s.system_name FROM systems s JOIN malware_events m ON s.system_id = m.system_id WHERE m.event_date >= NOW() - INTERVAL 1 MONTH AND m.malware_type = 'ransomware';,"SELECT systems.system_name FROM systems INNER JOIN malware_events ON systems.system_id = malware_events.system_id WHERE malware_events.malware_type = 'Ransomware' AND malware_events.event_date >= DATEADD(month, -1, GETDATE());",0 Which team is Team 1 with a Team 2 being Sporting CP?,"CREATE TABLE table_name_81 (team_1 VARCHAR, team_2 VARCHAR);","SELECT team_1 FROM table_name_81 WHERE team_2 = ""sporting cp"";","SELECT team_1 FROM table_name_81 WHERE team_2 = ""sporting cp"";",1 How many submissions are there?,CREATE TABLE submission (Id VARCHAR);,SELECT COUNT(*) FROM submission;,SELECT COUNT(*) FROM submission;,1 How many ethical AI certifications were awarded in Q2 of 2022?,"CREATE TABLE certifications(id INT, employee_id INT, date DATE); ",SELECT COUNT(*) FROM certifications WHERE date BETWEEN '2022-04-01' AND '2022-06-30';,SELECT COUNT(*) FROM certifications WHERE date BETWEEN '2022-04-01' AND '2022-06-30';,1 What year was Skyline High School founded?,"CREATE TABLE table_13759592_1 (founded VARCHAR, high_school VARCHAR);","SELECT COUNT(founded) FROM table_13759592_1 WHERE high_school = ""Skyline"";","SELECT founded FROM table_13759592_1 WHERE high_school = ""Skyline"";",0 Who was the spokesperson for France in 1970?,"CREATE TABLE table_1368649_9 (spokesperson VARCHAR, year_s_ VARCHAR);",SELECT spokesperson FROM table_1368649_9 WHERE year_s_ = 1970;,SELECT spokesperson FROM table_1368649_9 WHERE year_s_ = 1970;,1 What was the record after the game at Rich Stadium?,"CREATE TABLE table_name_72 (record VARCHAR, game_site VARCHAR);","SELECT record FROM table_name_72 WHERE game_site = ""rich stadium"";","SELECT record FROM table_name_72 WHERE game_site = ""rich stadium"";",1 Which authority has a rocket launch called rehbar-ii?,"CREATE TABLE table_11869952_1 (institutional_authority VARCHAR, rocket_launch VARCHAR);","SELECT institutional_authority FROM table_11869952_1 WHERE rocket_launch = ""Rehbar-II"";","SELECT institutional_authority FROM table_11869952_1 WHERE rocket_launch = ""Rehbar-II"";",1 Find the maximum and minimum R&D expenditure for the drugs approved in 2018 and 2019.,"CREATE TABLE drugs_2(drug_name TEXT, approval_year INT, rd_expenditure FLOAT); ","SELECT MAX(rd_expenditure), MIN(rd_expenditure) FROM drugs_2 WHERE approval_year IN (2018, 2019);","SELECT MAX(rd_expenditure), MIN(rd_expenditure) FROM drugs_2 WHERE approval_year IN (2018, 2019);",1 Delete all records from the 'oil_reservoirs' table where the 'discovered_year' is before 1990,"CREATE TABLE oil_reservoirs (reservoir_id INT PRIMARY KEY, reservoir_name VARCHAR(255), discovered_year INT, oil_volume_bbls BIGINT);",DELETE FROM oil_reservoirs WHERE discovered_year < 1990;,DELETE FROM oil_reservoirs WHERE discovered_year 1990;,0 What is the points ranking of Chicago Fire?,"CREATE TABLE table_name_73 (pts_rank VARCHAR, club VARCHAR);","SELECT pts_rank FROM table_name_73 WHERE club = ""chicago fire"";","SELECT pts_rank FROM table_name_73 WHERE club = ""chicago fire"";",1 What is the average Shariah-compliant financing for female clients in each country?,"CREATE TABLE shariah_financing(client_id INT, client_gender VARCHAR(6), country VARCHAR(25), amount FLOAT);","SELECT country, AVG(amount) as avg_financing FROM shariah_financing WHERE client_gender = 'Female' GROUP BY country;","SELECT country, AVG(amount) FROM shariah_financing WHERE client_gender = 'Female' GROUP BY country;",0 Calculate the total quantity of CBD products sold in California dispensaries in Q2 2021.,"CREATE TABLE products (type VARCHAR(10), category VARCHAR(10), quantity INT); CREATE TABLE dispensaries (state VARCHAR(20), sales INT); CREATE TABLE time_periods (quarter INT); ","SELECT SUM(products.quantity) FROM products JOIN dispensaries ON TRUE WHERE products.category = 'CBD' AND products.type IN ('oil', 'flower', 'edible') AND dispensaries.state = 'California' AND time_periods.quarter = 2;",SELECT SUM(quantity) FROM products WHERE type = 'CBD' AND category = 'CBD' AND dispensaries.state = 'California' AND time_periods.quarter = 2;,0 Which water treatment plants in California have a capacity over 100 million gallons per day?,"CREATE TABLE Water_treatment_plants (Name VARCHAR(255), Capacity_gallons_per_day INT, State VARCHAR(255)); ",SELECT Name FROM Water_treatment_plants WHERE Capacity_gallons_per_day > 100 AND State = 'California';,SELECT Name FROM Water_treatment_plants WHERE Capacity_gallons_per_day > 100000000 AND State = 'California';,0 How many climate finance records were inserted for the year 2021?,"CREATE TABLE climate_finance (record_id INT, project_name TEXT, funding_year INT, amount FLOAT); ",SELECT COUNT(*) FROM climate_finance WHERE funding_year = 2021;,SELECT COUNT(*) FROM climate_finance WHERE funding_year = 2021;,1 "List the top 3 energy storage projects by capacity, in MW, for projects located in the US?","CREATE TABLE EnergyStorageProjects (Id INT, ProjectName VARCHAR(255), Location VARCHAR(255), Capacity FLOAT); ","SELECT ProjectName, Location, Capacity FROM (SELECT ProjectName, Location, Capacity, ROW_NUMBER() OVER (PARTITION BY Location ORDER BY Capacity DESC) as rn FROM EnergyStorageProjects WHERE Location = 'USA') t WHERE rn <= 3;","SELECT ProjectName, Capacity FROM EnergyStorageProjects WHERE Location = 'US' ORDER BY Capacity DESC LIMIT 3;",0 What is the average calorie intake for meals served in schools across the US?,"CREATE TABLE meals (id INT, school_id INT, calories INT, meal_type VARCHAR(20)); ",SELECT AVG(calories) FROM meals WHERE meal_type = 'lunch' OR meal_type = 'breakfast';,SELECT AVG(calories) FROM meals WHERE school_id IN (SELECT id FROM schools WHERE country = 'USA');,0 Which item has a score of 5-1?,"CREATE TABLE table_name_6 (score VARCHAR, result VARCHAR);","SELECT score FROM table_name_6 WHERE result = ""5-1"";","SELECT score FROM table_name_6 WHERE result = ""5-1"";",1 What is the score on 15 Aug with a 17:30 time?,"CREATE TABLE table_name_66 (score VARCHAR, date VARCHAR, time VARCHAR);","SELECT score FROM table_name_66 WHERE date = ""15 aug"" AND time = ""17:30"";","SELECT score FROM table_name_66 WHERE date = ""15 august"" AND time = ""17:30"";",0 Update the type for all records in the Ships table where the type is 'Cargo' to 'Transport'.,"CREATE TABLE ships (name VARCHAR(255), year_decommissioned INT, type VARCHAR(255)); ",UPDATE ships SET type = 'Transport' WHERE type = 'Cargo';,UPDATE ships SET type = 'Transport' WHERE type = 'Cargo';,1 List unique cultural competency training dates for community health workers in Florida.,"CREATE TABLE CommunityHealthWorkers (CHWId INT, Name VARCHAR(50), State VARCHAR(50)); CREATE TABLE CulturalCompetencyTrainings (TrainingId INT, CHWId INT, TrainingDate DATE); ","SELECT CHW.Name, TrainingDate FROM CommunityHealthWorkers CHW INNER JOIN CulturalCompetencyTrainings CCT ON CHW.CHWId = CCT.CHWId WHERE CHW.State = 'Florida';",SELECT DISTINCT TrainingDate FROM CulturalCompetencyTrainings INNER JOIN CommunityHealthWorkers ON CulturalCompetencyTrainings.CHWId = CommunityHealthWorkers.CHWId WHERE CommunityHealthWorkers.State = 'Florida';,0 Which sites have a higher than average CO2 emission level?,"CREATE TABLE site (site_id INT, site_name VARCHAR(50), co2_emissions_tonnes INT);",SELECT site_name FROM site WHERE co2_emissions_tonnes > (SELECT AVG(co2_emissions_tonnes) FROM site);,SELECT site_name FROM site WHERE co2_emissions_tonnes > (SELECT AVG(co2_emissions_tonnes) FROM site);,1 What is the average sea level rise in the Arctic Ocean in the last 10 years?,"CREATE TABLE SeaLevelRise (year INT, avg_rise FLOAT); ",SELECT AVG(avg_rise) FROM SeaLevelRise WHERE year BETWEEN 2011 AND 2020;,SELECT AVG(avg_rise) FROM SeaLevelRise WHERE year BETWEEN (YEAR(CURRENT_DATE) - 10) AND YEAR(CURRENT_DATE);,0 List the number of renewable energy projects for each type in 'Germany',"CREATE TABLE RenewableEnergyProjects (id INT, project_name VARCHAR(100), project_type VARCHAR(50), city VARCHAR(50), country VARCHAR(50), capacity INT);","SELECT project_type, COUNT(*) FROM RenewableEnergyProjects WHERE country = 'Germany' GROUP BY project_type;","SELECT project_type, COUNT(*) FROM RenewableEnergyProjects WHERE country = 'Germany' GROUP BY project_type;",1 What are the minimum indoor results that have a 5 for inspection? ,"CREATE TABLE table_19534874_2 (indoor INTEGER, inspection VARCHAR);",SELECT MIN(indoor) FROM table_19534874_2 WHERE inspection = 5;,SELECT MIN(indoor) FROM table_19534874_2 WHERE inspection = 5;,1 What are the names and descriptions of the products that are of 'Cutlery' type and have daily hire cost lower than 20?,"CREATE TABLE products_for_hire (product_name VARCHAR, product_description VARCHAR, product_type_code VARCHAR, daily_hire_cost VARCHAR);","SELECT product_name, product_description FROM products_for_hire WHERE product_type_code = 'Cutlery' AND daily_hire_cost < 20;","SELECT product_name, product_description FROM products_for_hire WHERE product_type_code = 'Cutlery' AND daily_hire_cost 20;",0 "What is the total population of cities in 'India' and 'Australia', grouped by state or province?","CREATE TABLE City (Id INT PRIMARY KEY, Name VARCHAR(50), Population INT, Country VARCHAR(50), State VARCHAR(50)); ","SELECT Country, State, SUM(Population) as TotalPopulation FROM City WHERE Country IN ('India', 'Australia') GROUP BY Country, State;","SELECT State, SUM(Population) FROM City WHERE Country IN ('India', 'Australia') GROUP BY State;",0 What is the total amount donated by donors from New York having a donation amount greater than $100?,"CREATE TABLE donors (id INT, name TEXT, state TEXT, donation_amount DECIMAL); ",SELECT SUM(donation_amount) FROM donors WHERE state = 'New York' AND donation_amount > 100;,SELECT SUM(donation_amount) FROM donors WHERE state = 'New York' AND donation_amount > 100;,1 What is the no party preference when republican is 45.3%?,"CREATE TABLE table_27003186_3 (no_party_preference VARCHAR, republican VARCHAR);","SELECT no_party_preference FROM table_27003186_3 WHERE republican = ""45.3%"";","SELECT no_party_preference FROM table_27003186_3 WHERE republican = ""45.3%"";",1 What is the production code for episode #78?,"CREATE TABLE table_2623498_5 (prod_code VARCHAR, episode__number VARCHAR);","SELECT prod_code FROM table_2623498_5 WHERE episode__number = ""78"";",SELECT prod_code FROM table_2623498_5 WHERE episode__number = 78;,0 "What is the result for Chicago, Illinois?","CREATE TABLE table_name_60 (result VARCHAR, hometown VARCHAR);","SELECT result FROM table_name_60 WHERE hometown = ""chicago, illinois"";","SELECT result FROM table_name_60 WHERE hometown = ""chicago, illinois"";",1 When the team is ypiranga-sp what is the number of won games?,"CREATE TABLE table_15405904_1 (won INTEGER, team VARCHAR);","SELECT MIN(won) FROM table_15405904_1 WHERE team = ""Ypiranga-SP"";","SELECT SUM(won) FROM table_15405904_1 WHERE team = ""Ypiranga-SP"";",0 Who is the club that had 617 points and a draw of 0?,"CREATE TABLE table_name_37 (club VARCHAR, drawn VARCHAR, points_for VARCHAR);","SELECT club FROM table_name_37 WHERE drawn = ""0"" AND points_for = ""617"";",SELECT club FROM table_name_37 WHERE drawn = 0 AND points_for = 617;,0 "What is the average number of gold medals won among participants that won less than 13 silver, less than 8 bronze, and more than 18 medals overall?","CREATE TABLE table_name_99 (gold INTEGER, bronze VARCHAR, silver VARCHAR, total VARCHAR);",SELECT AVG(gold) FROM table_name_99 WHERE silver < 13 AND total > 18 AND bronze < 8;,SELECT AVG(gold) FROM table_name_99 WHERE silver 13 AND total > 18 AND bronze 8;,0 Identify community engagement events in 'Africa' between 2000 and 2005.,"CREATE TABLE CommunityEngagement (id INT, name VARCHAR(255), region VARCHAR(255), start_year INT, end_year INT); ",SELECT * FROM CommunityEngagement WHERE region = 'Africa' AND start_year BETWEEN 2000 AND 2005;,SELECT name FROM CommunityEngagement WHERE region = 'Africa' AND start_year BETWEEN 2000 AND 2005;,0 What is the average billing amount for cases handled by attorney John Doe?,"CREATE TABLE attorneys (attorney_id INT, name TEXT); CREATE TABLE cases (case_id INT, attorney_id INT, billing_amount DECIMAL);",SELECT AVG(cases.billing_amount) FROM cases INNER JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.name = 'John Doe';,SELECT AVG(billing_amount) FROM cases JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.name = 'John Doe';,0 Show the names of all the donors except those whose donation amount less than 9.,"CREATE TABLE endowment (donator_name VARCHAR, amount INTEGER);",SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount < 9;,SELECT donor_name FROM endowment WHERE amount 9;,0 Insert new records of volunteer engagement metrics.,"CREATE TABLE volunteers (id INT, name VARCHAR(255)); CREATE TABLE volunteer_hours (id INT, volunteer_id INT, hours DECIMAL(10,2)); ","INSERT INTO volunteer_hours (id, volunteer_id, hours) VALUES (1, 1, 7), (2, 2, 12), (3, 3, 18);","INSERT INTO volunteer_hours (id, volunteer_id, hours) VALUES (1, 'Veterans', 'Volunteer Engagement'), (2, 'Volunteer Engagement', 'Volunteer Engagement', 'Volunteer Engagement'), (3, 'Volunteer Engagement', 'Volunteer Engagement', 'Volunteer Engagement', 'Volunteer Engagement'); (2, 'Volunteer Engagement', 'Volunteer Engagement', 'Volunteer Engagement', 'Volunteer Engagement', 'Volunteer Engagement', 'Volunteer Engagement', 'Volunteer Engagement', 'Volunteer Engagement', 'Volunteer Engagement', 'Volunteer Engagement', 'Volunteer Engagement', 'Volunteer Engagement', 'Volunteer Engagement', 'Volunteer Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Voluntary Engagement', 'Vol",0 "Which team had a year entering the league under 2009, located in Bath?","CREATE TABLE table_name_21 (team VARCHAR, year_entered_league VARCHAR, location VARCHAR);","SELECT team FROM table_name_21 WHERE year_entered_league < 2009 AND location = ""bath"";","SELECT team FROM table_name_21 WHERE year_entered_league 2009 AND location = ""bath"";",0 What is the average number of hospital beds in rural hospitals of Idaho that have between 100 and 200 beds?,"CREATE TABLE hospitals (id INT, name TEXT, location TEXT, beds INT, rural BOOLEAN); ",SELECT AVG(beds) FROM hospitals WHERE location = 'Idaho' AND rural = true AND beds BETWEEN 100 AND 200;,SELECT AVG(beds) FROM hospitals WHERE location = 'Idaho' AND rural = true AND beds BETWEEN 100 AND 200;,1 what is the value of the audio with a just ratio 21:20,"CREATE TABLE table_name_28 (audio VARCHAR, just_ratio VARCHAR);","SELECT audio FROM table_name_28 WHERE just_ratio = ""21:20"";","SELECT audio FROM table_name_28 WHERE just_ratio = ""21:20"";",1 "List the names, types, and completion dates of all LEED-certified projects in Florida, ordered by completion date in ascending order.","CREATE TABLE Building_Permits (permit_number INT, permit_type VARCHAR(50), completion_date DATE, state VARCHAR(50), is_leed_certified BOOLEAN); ","SELECT permit_number, permit_type, completion_date FROM Building_Permits WHERE state = 'Florida' AND is_leed_certified = true ORDER BY completion_date ASC;","SELECT permit_number, permit_type, completion_date FROM Building_Permits WHERE state = 'Florida' AND is_leed_certified = true ORDER BY completion_date ASC;",1 Find the name of the products that are not using the most frequently-used max page size.,"CREATE TABLE product (product VARCHAR, max_page_size VARCHAR);",SELECT product FROM product WHERE product <> (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1);,SELECT product FROM product WHERE max_page_size (SELECT MAX(max_page_size) FROM product);,0 What is the earliest launch date for each type of satellite?,"CREATE SCHEMA satellite_deployment; CREATE TABLE satellite_deployment.launches (launch_id INT, satellite_type VARCHAR(50), launch_date DATE); ","SELECT satellite_type, MIN(launch_date) OVER (PARTITION BY satellite_type) as earliest_launch_date FROM satellite_deployment.launches;","SELECT satellite_type, MIN(launch_date) FROM satellite_deployment.launches GROUP BY satellite_type;",0 What results has a week larger than 13?,"CREATE TABLE table_name_90 (result VARCHAR, week INTEGER);",SELECT result FROM table_name_90 WHERE week > 13;,SELECT result FROM table_name_90 WHERE week > 13;,1 Who was the Conductor of the Three Pintos (Die Drei Pintos) Production?,"CREATE TABLE table_name_34 (conductor VARCHAR, production VARCHAR);","SELECT conductor FROM table_name_34 WHERE production = ""the three pintos (die drei pintos)"";","SELECT conductor FROM table_name_34 WHERE production = ""three pintos (die drei pintos)"";",0 What are the names and types of all weapons in the weapons table that have a quantity greater than 50?,"CREATE TABLE weapons (name TEXT, type TEXT, quantity INT); ","SELECT name, type FROM weapons WHERE quantity > 50;","SELECT name, type FROM weapons WHERE quantity > 50;",1 What is the name of the artist with the highest number of artworks?,"CREATE TABLE Artists (name VARCHAR(255), art VARCHAR(255), quantity INT); ",SELECT name FROM Artists WHERE quantity = (SELECT MAX(quantity) FROM Artists);,SELECT name FROM Artists ORDER BY quantity DESC LIMIT 1;,0 "What is the average productivity of miners per country, partitioned by mine type?","CREATE TABLE mines (id INT, country VARCHAR(20), mine_type VARCHAR(20), productivity FLOAT); ","SELECT country, mine_type, AVG(productivity) AS avg_productivity FROM mines GROUP BY country, mine_type ORDER BY avg_productivity DESC;","SELECT country, mine_type, AVG(productivity) as avg_productivity FROM mines GROUP BY country, mine_type;",0 What was japan's score?,"CREATE TABLE table_name_51 (score VARCHAR, country VARCHAR);","SELECT score FROM table_name_51 WHERE country = ""japan"";","SELECT score FROM table_name_51 WHERE country = ""japan"";",1 What is the average number of laps when the grid number is 9?,"CREATE TABLE table_name_48 (laps INTEGER, grid VARCHAR);",SELECT AVG(laps) FROM table_name_48 WHERE grid = 9;,SELECT AVG(laps) FROM table_name_48 WHERE grid = 9;,1 What is the minimum quantity of military equipment sold by Raytheon to Oceania countries in Q3 2018?,"CREATE TABLE Military_Equipment_Sales(equipment_id INT, manufacturer VARCHAR(255), purchaser VARCHAR(255), sale_date DATE, quantity INT);",SELECT MIN(quantity) FROM Military_Equipment_Sales WHERE manufacturer = 'Raytheon' AND purchaser LIKE 'Oceania%' AND sale_date BETWEEN '2018-07-01' AND '2018-09-30';,SELECT MIN(quantity) FROM Military_Equipment_Sales WHERE manufacturer = 'Raytheon' AND purchaser LIKE '%Oceania%' AND sale_date BETWEEN '2018-10-01' AND '2018-10-31';,0 List all virtual reality (VR) games and their designers.,"CREATE TABLE Games (GameID INT, Title VARCHAR(50), Genre VARCHAR(20), Platform VARCHAR(10)); CREATE TABLE VRGames (GameID INT, Designer VARCHAR(50)); ","SELECT Games.Title, VRGames.Designer FROM Games INNER JOIN VRGames ON Games.GameID = VRGames.GameID WHERE Games.Platform = 'VR';","SELECT Games.Title, VRGames.Designer FROM Games INNER JOIN VRGames ON Games.GameID = VRGames.GameID;",0 How many food safety violations were recorded in the past week?,"CREATE TABLE Inspections (id INT, date DATE, violation BOOLEAN);","SELECT COUNT(*) FROM Inspections WHERE date >= DATEADD(week, -1, GETDATE()) AND violation = TRUE;","SELECT COUNT(*) FROM Inspections WHERE date >= DATEADD(week, -1, GETDATE());",0 "What is Reserved Instruments, when Conduct of Litigation is Yes, and when Probate Activities is No?","CREATE TABLE table_name_95 (reserved_instruments VARCHAR, conduct_of_litigation VARCHAR, probate_activities VARCHAR);","SELECT reserved_instruments FROM table_name_95 WHERE conduct_of_litigation = ""yes"" AND probate_activities = ""no"";","SELECT reserved_instruments FROM table_name_95 WHERE conduct_of_litigation = ""yes"" AND probate_activities = ""no"";",1 How many hotels offer virtual tours in 'Rio de Janeiro'?,"CREATE TABLE virtual_tours (hotel_id INT, location TEXT, has_virtual_tour BOOLEAN); ",SELECT COUNT(*) FROM virtual_tours WHERE location = 'Rio de Janeiro' AND has_virtual_tour = true;,SELECT COUNT(*) FROM virtual_tours WHERE location = 'Rio de Janeiro' AND has_virtual_tour = true;,1 Who has the height of m (ft 9in) and was born on 1980-03-05?,"CREATE TABLE table_name_57 (name VARCHAR, height VARCHAR, date_of_birth VARCHAR);","SELECT name FROM table_name_57 WHERE height = ""m (ft 9in)"" AND date_of_birth = ""1980-03-05"";","SELECT name FROM table_name_57 WHERE height = ""m (ft 9in)"" AND date_of_birth = ""1980-03-05"";",1 How many volunteer hours were recorded for each program in H2 2020?,"CREATE TABLE VolunteerHours (VolunteerID INT, ProgramID INT, Hours DECIMAL(5,2), HourDate DATE); ","SELECT ProgramID, SUM(Hours) as TotalHours FROM VolunteerHours WHERE HourDate BETWEEN '2020-07-01' AND '2020-12-31' GROUP BY ProgramID;","SELECT ProgramID, SUM(Hours) as TotalHours FROM VolunteerHours WHERE HourDate BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY ProgramID;",0 What is the average price of natural ingredients for products sourced from the US?,"CREATE TABLE products_ingredients(product_id INT, ingredient_id INT, natural_ingredient BOOLEAN, price DECIMAL, source_country TEXT); ",SELECT AVG(price) FROM products_ingredients WHERE natural_ingredient = true AND source_country = 'US';,SELECT AVG(price) FROM products_ingredients WHERE natural_ingredient = TRUE AND source_country = 'USA';,0 What is the maximum salary in the 'government' sector?,"CREATE TABLE government (id INT, employee_name TEXT, hours_worked INT, salary REAL); ",SELECT MAX(salary) FROM government WHERE sector = 'government';,SELECT MAX(salary) FROM government WHERE sector = 'government';,1 Which week 3 had a week 1 of Kristy Dwyer?,"CREATE TABLE table_name_30 (week_3 VARCHAR, week_1 VARCHAR);","SELECT week_3 FROM table_name_30 WHERE week_1 = ""kristy dwyer"";","SELECT week_3 FROM table_name_30 WHERE week_1 = ""kristy dwyer"";",1 what is faisaly when wehdat is xxx?,"CREATE TABLE table_26173063_2 (faisaly VARCHAR, wehdat VARCHAR);","SELECT faisaly FROM table_26173063_2 WHERE wehdat = ""XXX"";","SELECT faisaly FROM table_26173063_2 WHERE wehdat = ""Xxx"";",0 Name the number of rank for stone park,"CREATE TABLE table_22916979_5 (rank VARCHAR, densest_incorporated_place VARCHAR);","SELECT COUNT(rank) FROM table_22916979_5 WHERE densest_incorporated_place = ""Stone Park"";","SELECT COUNT(rank) FROM table_22916979_5 WHERE densest_incorporated_place = ""Stone Park"";",1 What is the maximum duration of any mental health treatment provided in Washington?,"CREATE TABLE treatment_durations (patient_id INT, condition VARCHAR(50), duration INT); CREATE TABLE patient_location (patient_id INT, location VARCHAR(50)); ",SELECT MAX(duration) FROM treatment_durations JOIN patient_location ON treatment_durations.patient_id = patient_location.patient_id WHERE location = 'Washington';,SELECT MAX(treatment_durations.duration) FROM treatment_durations INNER JOIN patient_location ON treatment_durations.patient_id = patient_location.patient_id WHERE patient_location.location = 'Washington';,0 What is the average ticket price for football matches in the EastCoast region?,"CREATE TABLE Stadiums(id INT, name TEXT, location TEXT, sport TEXT, capacity INT); ",SELECT AVG(price) FROM TicketSales WHERE stadium_id IN (SELECT id FROM Stadiums WHERE location = 'EastCoast' AND sport = 'Football'),SELECT AVG(price) FROM Stadiums WHERE sport = 'Football' AND location = 'EastCoast';,0 "What is the episode # of the episode that aired on April 5, 1998?","CREATE TABLE table_name_23 (episode__number VARCHAR, original_airdate VARCHAR);","SELECT episode__number FROM table_name_23 WHERE original_airdate = ""april 5, 1998"";","SELECT episode__number FROM table_name_23 WHERE original_airdate = ""april 5, 1998"";",1 What date was Rodger Ward the winning driver?,"CREATE TABLE table_name_48 (date VARCHAR, winning_driver VARCHAR);","SELECT date FROM table_name_48 WHERE winning_driver = ""rodger ward"";","SELECT date FROM table_name_48 WHERE winning_driver = ""rodger ward"";",1 What is the minimum energy storage utilization rate for the province of Ontario in 2021?,"CREATE TABLE energy_storage_utilization (province VARCHAR(20), utilization DECIMAL(4,2), year INT); ",SELECT MIN(utilization) FROM energy_storage_utilization WHERE province = 'Ontario' AND year = 2021;,SELECT MIN(utilization) FROM energy_storage_utilization WHERE province = 'Ontario' AND year = 2021;,1 What is the average quantity of eco-friendly garments sold per day for each store?,"CREATE TABLE Garments (ProductID INT, IsEcoFriendly BIT); ","SELECT StoreID, AVG(CASE WHEN IsEcoFriendly = 1 THEN QuantitySold ELSE 0 END) AS AvgEcoFriendlyQuantitySoldPerDay FROM Sales JOIN Garments ON Sales.ProductID = Garments.ProductID GROUP BY StoreID;","SELECT StoreName, AVG(IsEcoFriendly) as AvgSoldPerDay FROM Garments GROUP BY StoreName;",0 What Elimination number is listed againt Eliminated by Sonjay Dutt?,"CREATE TABLE table_name_87 (elimination VARCHAR, eliminated_by VARCHAR);","SELECT elimination FROM table_name_87 WHERE eliminated_by = ""sonjay dutt"";","SELECT elimination FROM table_name_87 WHERE eliminated_by = ""sonjay dutt"";",1 Which dispensaries in California have the highest average order value for concentrates?,"CREATE TABLE dispensaries (id INT, name TEXT, state TEXT);CREATE TABLE orders (id INT, dispensary_id INT, item_type TEXT, price DECIMAL, order_date DATE);","SELECT d.name, AVG(o.price) as avg_order_value FROM dispensaries d INNER JOIN orders o ON d.id = o.dispensary_id WHERE d.state = 'California' AND o.item_type = 'concentrates' GROUP BY d.name ORDER BY avg_order_value DESC;","SELECT d.name, AVG(o.price) as avg_order_value FROM dispensaries d JOIN orders o ON d.id = o.dispensary_id WHERE d.state = 'California' AND o.item_type = 'concentrate' GROUP BY d.name ORDER BY avg_order_value DESC LIMIT 1;",0 What is the total Shariah-compliant finance income in Africa?,"CREATE TABLE shariah_compliant_finance_incomes_africa (id INT, country VARCHAR(255), income DECIMAL(10,2)); ","SELECT SUM(income) FROM shariah_compliant_finance_incomes_africa WHERE country IN ('South Africa', 'Egypt', 'Nigeria');",SELECT SUM(income) FROM shariah_compliant_finance_incomes_africa;,0 Which City has a Stadium of estadio san cristóbal?,"CREATE TABLE table_name_96 (city VARCHAR, stadium VARCHAR);","SELECT city FROM table_name_96 WHERE stadium = ""estadio san cristóbal"";","SELECT city FROM table_name_96 WHERE stadium = ""estadio san cristóbal"";",1 What is the total quantity of locally-sourced products sold in each region?,"CREATE TABLE Regions (region_id INT, region_name VARCHAR(255)); CREATE TABLE Stores (store_id INT, store_name VARCHAR(255), region_id INT); CREATE TABLE Products (product_id INT, product_name VARCHAR(255), is_local BOOLEAN, product_category VARCHAR(255)); CREATE TABLE Inventory (store_id INT, product_id INT, quantity INT);","SELECT r.region_name, p.product_category, SUM(i.quantity) as total_quantity FROM Inventory i JOIN Stores s ON i.store_id = s.store_id JOIN Products p ON i.product_id = p.product_id JOIN Regions r ON s.region_id = r.region_id WHERE p.is_local = TRUE GROUP BY r.region_name, p.product_category;","SELECT r.region_name, SUM(i.quantity) as total_quantity FROM Regions r JOIN Inventory i ON r.region_id = i.product_id JOIN Stores s ON i.store_id = s.region_id JOIN Products p ON i.product_id = p.product_id WHERE p.is_local = true GROUP BY r.region_name;",0 Insert a new record for the mine 'Amethyst Ascent' with productivity 5.9 and year 2019.,"CREATE TABLE New_Mine_Productivity (Mine_Name VARCHAR(50), Productivity FLOAT, Year INT);","INSERT INTO New_Mine_Productivity (Mine_Name, Productivity, Year) VALUES ('Amethyst Ascent', 5.9, 2019);","INSERT INTO New_Mine_Productivity (Mine_Name, Productivity, Year) VALUES ('Amethyst Ascent', 5.9, 2019);",1 Which element had the highest production in 2020?,"CREATE TABLE production (year INT, element VARCHAR(10), quantity INT); ","SELECT element, MAX(quantity) FROM production WHERE year = 2020 GROUP BY element;","SELECT element, MAX(quantity) FROM production WHERE year = 2020 GROUP BY element;",1 What position did the player from Rice College play who was picked under 15?,"CREATE TABLE table_name_24 (position VARCHAR, pick VARCHAR, college VARCHAR);","SELECT position FROM table_name_24 WHERE pick < 15 AND college = ""rice"";","SELECT position FROM table_name_24 WHERE pick 15 AND college = ""rice"";",0 How many artists from each country released an album in 2020?,"CREATE TABLE Country (id INT, country VARCHAR(255)); CREATE TABLE Artist (id INT, country_id INT, name VARCHAR(255)); CREATE TABLE Album (id INT, artist_id INT, year INT);","SELECT C.country, COUNT(DISTINCT A.artist_id) as album_count FROM Country C INNER JOIN Artist A ON C.id = A.country_id INNER JOIN Album AL ON A.id = AL.artist_id WHERE AL.year = 2020 GROUP BY C.country;","SELECT Country.country, COUNT(DISTINCT Artist.id) FROM Country INNER JOIN Artist ON Country.id = Artist.country_id INNER JOIN Album ON Artist.id = Album.artist_id WHERE Album.year = 2020 GROUP BY Country.country;",0 Delete all records from the 'satellite_deployment' table where the location is 'not in space',"CREATE TABLE satellite_deployment (id INT PRIMARY KEY, name VARCHAR(50), launch_year INT, location VARCHAR(50));",DELETE FROM satellite_deployment WHERE location != 'Space';,DELETE FROM satellite_deployment WHERE location = 'not in space';,0 What's the agency of the member born on 1998.11.09?,"CREATE TABLE table_name_32 (agency VARCHAR, birthday VARCHAR);","SELECT agency FROM table_name_32 WHERE birthday = ""1998.11.09"";","SELECT agency FROM table_name_32 WHERE birthday = ""1998.11.09"";",1 "What is the safety rating of the product named ""Aloe Vera Lotion"" from the brand ""PureNature""?","CREATE TABLE product_safety_records (id INT PRIMARY KEY, product_id INT, safety_rating INT, last_inspection_date DATE); CREATE TABLE products (id INT PRIMARY KEY, name TEXT, brand TEXT); ",SELECT safety_rating FROM product_safety_records WHERE product_id = (SELECT id FROM products WHERE name = 'Aloe Vera Lotion' AND brand = 'PureNature'),SELECT product_safety_records.safety_rating FROM product_safety_records INNER JOIN products ON product_safety_records.product_id = products.id WHERE products.name = 'Aloe Vera Lotion' AND products.brand = 'PureNature';,0 what is the organisation when the nominated work title is n/a in the year 2005?,"CREATE TABLE table_name_79 (organisation VARCHAR, nominated_work_title VARCHAR, year VARCHAR);","SELECT organisation FROM table_name_79 WHERE nominated_work_title = ""n/a"" AND year = 2005;","SELECT organisation FROM table_name_79 WHERE nominated_work_title = ""n/a"" AND year = 2005;",1 What is the largest area in Alaska with a population of 39 and rank over 19?,"CREATE TABLE table_name_41 (area__km_2__ INTEGER, rank VARCHAR, location VARCHAR, population__2000_ VARCHAR);","SELECT MAX(area__km_2__) FROM table_name_41 WHERE location = ""alaska"" AND population__2000_ = ""39"" AND rank > 19;","SELECT MAX(area__km_2__) FROM table_name_41 WHERE location = ""alaska"" AND population__2000_ = 39 AND rank > 19;",0 Calculate the average number of streams per user for each genre.,"CREATE TABLE genres (genre_id INT, genre VARCHAR(255)); CREATE TABLE songs (song_id INT, title VARCHAR(255), genre_id INT, release_date DATE); CREATE TABLE users (user_id INT, user_country VARCHAR(255)); CREATE TABLE streams (stream_id INT, song_id INT, user_id INT, stream_date DATE, revenue DECIMAL(10,2));","SELECT g.genre, AVG(st.stream_count) as avg_streams_per_user FROM genres g JOIN (SELECT song_id, user_id, COUNT(*) as stream_count FROM streams GROUP BY song_id, user_id) st ON g.genre_id = st.song_id GROUP BY g.genre;","SELECT g.genre, AVG(s.revenue) as avg_streams_per_user FROM genres g JOIN songs s ON g.genre_id = s.genre_id JOIN users u ON s.user_id = u.user_id JOIN streams s ON s.song_id = s.song_id GROUP BY g.genre;",0 What is the average number of trips per day for autonomous buses in Tokyo?,"CREATE TABLE public.daily_trips (id SERIAL PRIMARY KEY, vehicle_type TEXT, city TEXT, trips_per_day DECIMAL(10,2)); ",SELECT AVG(trips_per_day) FROM public.daily_trips WHERE vehicle_type = 'autonomous_bus' AND city = 'Tokyo';,SELECT AVG(trips_per_day) FROM public.daily_trips WHERE vehicle_type = 'Autonomous Bus' AND city = 'Tokyo';,0 What was the depravitiy of earnings where international sales was 2470?,"CREATE TABLE table_13618358_1 (income_poverty_f VARCHAR, exports__usd_mn__2011 VARCHAR);",SELECT income_poverty_f FROM table_13618358_1 WHERE exports__usd_mn__2011 = 2470;,SELECT income_poverty_f FROM table_13618358_1 WHERE exports__usd_mn__2011 = 2470;,1 "What is the total quantity of minerals extracted for mining sites in South America, having a production date on or after 2015-01-01 and less than 50 employees?","CREATE TABLE mineral_extraction (site_id INT, continent VARCHAR(50), production_date DATE, num_employees INT, quantity INT); ","SELECT continent, SUM(quantity) as total_quantity FROM mineral_extraction WHERE continent = 'South America' AND production_date >= '2015-01-01' AND num_employees < 50 GROUP BY continent;",SELECT SUM(quantity) FROM mineral_extraction WHERE continent = 'South America' AND production_date >= '2015-01-01' AND num_employees 50;,0 What is the total number of articles published in 'The Boston Bugle' that contain the words 'climate change' or 'global warming' in the last two years?,"CREATE TABLE the_boston_bugle (title TEXT, publication_date DATE);","SELECT COUNT(*) FROM the_boston_bugle WHERE (lower(title) LIKE '%climate change%' OR lower(title) LIKE '%global warming%') AND publication_date > DATE('now','-2 years');","SELECT COUNT(*) FROM the_boston_bugle WHERE title LIKE '%climate change%' OR publication_date >= DATEADD(year, -2, GETDATE());",0 What is the number of volunteers who have joined each year?,"CREATE TABLE Volunteers (VolunteerID INT, VolunteerName TEXT, JoinDate DATE); ","SELECT YEAR(JoinDate) AS Year, COUNT(*) AS VolunteerCount FROM Volunteers GROUP BY YEAR(JoinDate) ORDER BY Year;","SELECT YEAR(JoinDate) AS Year, COUNT(*) FROM Volunteers GROUP BY YEAR(JoinDate);",0 What is the total data usage for the top 5 customers in the city of Tokyo?,"CREATE TABLE customers (id INT, name VARCHAR(50), data_usage FLOAT, city VARCHAR(50));",SELECT SUM(data_usage) FROM customers WHERE city = 'Tokyo' AND id IN (SELECT id FROM (SELECT id FROM customers WHERE city = 'Tokyo' ORDER BY data_usage DESC LIMIT 5) subquery) ORDER BY data_usage DESC;,SELECT SUM(data_usage) FROM customers WHERE city = 'Tokyo' ORDER BY SUM(data_usage) DESC LIMIT 5;,0 What home team played Collingwood as the away team?,"CREATE TABLE table_name_42 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_42 WHERE away_team = ""collingwood"";","SELECT home_team FROM table_name_42 WHERE away_team = ""collingwood"";",1 What was the theatre where Peter P. Peters is the role?,"CREATE TABLE table_name_8 (theatre VARCHAR, _studio VARCHAR, _or_network VARCHAR, role VARCHAR);","SELECT theatre, _studio, _or_network FROM table_name_8 WHERE role = ""peter p. peters"";","SELECT theatre FROM table_name_8 WHERE _studio = ""peter p. peters"" AND role = ""peter p. peters"";",0 What is the average cargo weight loaded in the Mexican region?,"CREATE TABLE CargoTracking (CargoID INT, LoadDate DATE, LoadLocation VARCHAR(50), CargoWeight INT); ",SELECT AVG(CargoWeight) FROM CargoTracking WHERE LoadLocation LIKE 'Mexico%';,SELECT AVG(CargoWeight) FROM CargoTracking WHERE LoadLocation = 'Mexico';,0 What is the maximum price per yard of any fabric type?,"CREATE TABLE fabric (fabric_id INT, fabric_type VARCHAR(255), price_per_yard DECIMAL(5,2)); ",SELECT MAX(price_per_yard) FROM fabric;,SELECT MAX(price_per_yard) FROM fabric;,1 What's the roll for summerland primary when decile is over 6?,"CREATE TABLE table_name_66 (roll VARCHAR, decile VARCHAR, name VARCHAR);","SELECT roll FROM table_name_66 WHERE decile > 6 AND name = ""summerland primary"";","SELECT roll FROM table_name_66 WHERE decile > 6 AND name = ""summerland primary"";",1 What was the waste generation by sector for the commercial sector in 2019 and 2020?,"CREATE TABLE waste_generation_by_sector(year INT, sector VARCHAR(255), amount INT); ","SELECT sector, AVG(amount) FROM waste_generation_by_sector WHERE sector = 'Commercial' AND year IN (2019, 2020) GROUP BY sector;","SELECT year, sector, SUM(amount) FROM waste_generation_by_sector WHERE sector = 'commercial' GROUP BY year, sector;",0 How many healthcare facilities are there in each district?,"CREATE TABLE Healthcare (District VARCHAR(255), FacilityType VARCHAR(255), Quantity INT); ","SELECT District, FacilityType, SUM(Quantity) FROM Healthcare GROUP BY District, FacilityType;","SELECT District, SUM(Quantity) FROM Healthcare GROUP BY District;",0 What is the average age of fans for each team that has a win rate above 55%?,"CREATE TABLE SportsTeamPerformance (id INT, team_name VARCHAR(255), win_rate DECIMAL(5,2), avg_fan_age INT); CREATE TABLE FanDemographics (id INT, name VARCHAR(255), gender VARCHAR(50), team_name VARCHAR(255), fan_age INT); ","SELECT team_name, AVG(fan_age) as avg_fan_age FROM FanDemographics WHERE team_name IN (SELECT team_name FROM SportsTeamPerformance WHERE win_rate > 0.55) GROUP BY team_name;","SELECT stp.team_name, AVG(fd.fan_age) as avg_fan_age FROM SportsTeamPerformance stp JOIN FanDemographics fd ON stp.team_name = fd.team_name WHERE stp.win_rate > 55% GROUP BY stp.team_name;",0 How many patients were treated with psychotherapy in Canada in the last 5 years?,"CREATE TABLE mental_health.treatments (treatment_id INT, patient_id INT, therapist_id INT, treatment_type VARCHAR(50), country VARCHAR(50), treatment_date DATE); ","SELECT COUNT(*) FROM mental_health.treatments t WHERE t.treatment_type = 'Psychotherapy' AND t.country = 'Canada' AND t.treatment_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 5 YEAR) AND CURDATE();","SELECT COUNT(*) FROM mental_health.treatments WHERE treatment_type = 'Psychotherapy' AND country = 'Canada' AND treatment_date >= DATEADD(year, -5, GETDATE());",0 List all donors who made donations in both H1 and H2 2021.,"CREATE TABLE Donors (DonorID INT, DonorName TEXT); CREATE TABLE Donations (DonationID INT, DonorID INT, DonationAmount FLOAT, DonationDate DATE); ",SELECT DonorName FROM Donors WHERE DonorID IN (SELECT DonorID FROM Donations WHERE DonationDate BETWEEN '2021-01-01' AND '2021-06-30') AND DonorID IN (SELECT DonorID FROM Donations WHERE DonationDate BETWEEN '2021-07-01' AND '2021-12-31');,SELECT Donors.DonorName FROM Donors INNER JOIN Donations ON Donors.DonorID = Donations.DonorID WHERE Donations.DonationDate BETWEEN '2021-01-01' AND '2021-06-30';,0 What is the average time between login attempts for all users?,"CREATE TABLE login_attempts (user_id INT, timestamp TIMESTAMP); ","SELECT AVG(time_between_login_attempts) as avg_time_between_login_attempts FROM (SELECT user_id, TIMESTAMPDIFF(SECOND, LAG(timestamp) OVER (PARTITION BY user_id ORDER BY timestamp), timestamp) as time_between_login_attempts FROM login_attempts) as login_attempts_time_diff;","SELECT AVG(DATEDIFF(TIMESTAMP, timestamp)) FROM login_attempts;",0 What date did the episode with a production code of 4301085 originally air?,"CREATE TABLE table_21172539_1 (original_air_date VARCHAR, production_code VARCHAR);",SELECT original_air_date FROM table_21172539_1 WHERE production_code = 4301085;,"SELECT original_air_date FROM table_21172539_1 WHERE production_code = ""4301085"";",0 What is the number of attendees at events held in France who are over the age of 60?,"CREATE TABLE Events (EventID int, EventDate date, Attendees int, Country varchar(50), AttendeeAge int); ",SELECT COUNT(*) FROM Events WHERE Country = 'France' AND AttendeeAge > 60;,SELECT COUNT(*) FROM Events WHERE Country = 'France' AND AttendeeAge > 60;,1 List the names of the city with the top 5 white percentages.,"CREATE TABLE city (Name VARCHAR, White VARCHAR);",SELECT Name FROM city ORDER BY White DESC LIMIT 5;,SELECT Name FROM city ORDER BY White DESC LIMIT 5;,1 Who was the winner on the Amaroo Park circuit?,"CREATE TABLE table_name_38 (winner VARCHAR, circuit VARCHAR);","SELECT winner FROM table_name_38 WHERE circuit = ""amaroo park"";","SELECT winner FROM table_name_38 WHERE circuit = ""amaroo park"";",1 What is the average price of items in the top 20% of sales?,"CREATE TABLE sales(id INT, item VARCHAR(255), price DECIMAL(10,2), quantity INT); ","SELECT AVG(price) as avg_price FROM (SELECT price, RANK() OVER (ORDER BY quantity DESC) as rank FROM sales) subquery WHERE rank <= COUNT(*) * 0.2;",SELECT AVG(price) FROM sales WHERE quantity IN (SELECT quantity FROM sales WHERE item IN (SELECT item FROM sales WHERE item IN (SELECT item FROM sales WHERE item IN (SELECT item FROM sales WHERE item IN (SELECT item FROM sales WHERE item IN (SELECT item FROM sales WHERE item IN (SELECT item FROM sales WHERE item IN (SELECT item FROM sales WHERE item IN (SELECT item FROM sales WHERE item IN (SELECT item FROM sales WHERE price)) ORDER BY price) ORDER BY price))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),0 What is HSN's official virtual channel in Minneapolis-St. Paul?,"CREATE TABLE table_1404984_1 (virtual_channel VARCHAR, network VARCHAR);","SELECT virtual_channel FROM table_1404984_1 WHERE network = ""HSN"";","SELECT virtual_channel FROM table_1404984_1 WHERE network = ""HSN"";",1 "What is XII Season, when Episode is 6?","CREATE TABLE table_name_57 (xii_season VARCHAR, episode VARCHAR);","SELECT xii_season FROM table_name_57 WHERE episode = ""6"";",SELECT xii_season FROM table_name_57 WHERE episode = 6;,0 "Which record has tko (strikes) as the method, and daan kooiman as the opponent?","CREATE TABLE table_name_57 (record VARCHAR, method VARCHAR, opponent VARCHAR);","SELECT record FROM table_name_57 WHERE method = ""tko (strikes)"" AND opponent = ""daan kooiman"";","SELECT record FROM table_name_57 WHERE method = ""tko (strikes)"" AND opponent = ""dan kooiman"";",0 List all astronauts who have been on a spacewalk for both the US and Russian space programs?,"CREATE SCHEMA space; USE space; CREATE TABLE astronaut (id INT, name VARCHAR(50), country VARCHAR(50)); CREATE TABLE spacewalk (id INT, astronaut_id INT, space_program VARCHAR(50)); ",SELECT DISTINCT a.name FROM space.astronaut a JOIN space.spacewalk s1 ON a.id = s1.astronaut_id JOIN space.spacewalk s2 ON a.id = s2.astronaut_id WHERE s1.space_program = 'USA' AND s2.space_program = 'Russia';,"SELECT a.name FROM astronaut a JOIN spacewalk sw ON a.id = sw.astronaut_id WHERE sw.space_program IN ('US', 'Russia') GROUP BY a.name HAVING COUNT(DISTINCT sw.space_program) = 2;",0 Describe the structure of the Artifacts table.,"CREATE TABLE Artifacts (ArtifactID INT, SiteName TEXT, Description TEXT, Analysis TEXT);",DESCRIBE Artifacts;,SELECT Structure FROM Artifacts;,0 What are the first names and date of birth of professors teaching course ACCT-211?,"CREATE TABLE CLASS (PROF_NUM VARCHAR); CREATE TABLE employee (EMP_FNAME VARCHAR, EMP_DOB VARCHAR, EMP_NUM VARCHAR);","SELECT DISTINCT T1.EMP_FNAME, T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = ""ACCT-211"";","SELECT T1.EMP_FNAME, T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T2.EMP_DOB = ""ACCT-211"";",0 What is the total number of workers employed in sustainable building projects in the United States?,"CREATE TABLE Workers (WorkerID INT, ProjectID INT, State CHAR(2), IsSustainable BOOLEAN);","SELECT COUNT(*) FROM Workers WHERE IsSustainable=TRUE AND State IN ('AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'FL', 'GA', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY');",SELECT COUNT(*) FROM Workers WHERE State = 'United States' AND IsSustainable = true;,0 Find the number of building permits issued in the city of Seattle,"CREATE TABLE building_permits (permit_id INT, city VARCHAR(20), state VARCHAR(20), issue_date DATE); ",SELECT COUNT(*) FROM building_permits WHERE city = 'Seattle';,SELECT COUNT(*) FROM building_permits WHERE city = 'Seattle';,1 What is the name of the conference that K. C. Jones was a head coach in?,"CREATE TABLE table_name_78 (conf VARCHAR, head_coach VARCHAR);","SELECT conf FROM table_name_78 WHERE head_coach = ""k. c. jones"";","SELECT conf FROM table_name_78 WHERE head_coach = ""k. c. jones"";",1 Who was number 9 that had a number 7 of Joana and a Final of Pedro?,"CREATE TABLE table_name_96 (no9 VARCHAR, no7 VARCHAR, final VARCHAR);","SELECT no9 FROM table_name_96 WHERE no7 = ""joana"" AND final = ""pedro"";","SELECT no9 FROM table_name_96 WHERE no7 = ""joana"" AND final = ""petro"";",0 What country does Adam van Koeverden play for?,"CREATE TABLE table_name_31 (country VARCHAR, athletes VARCHAR);","SELECT country FROM table_name_31 WHERE athletes = ""adam van koeverden"";","SELECT country FROM table_name_31 WHERE athletes = ""adam van koeverden"";",1 Tell me the dates conducted for plaid cymru of 19%,"CREATE TABLE table_name_69 (date_s__conducted VARCHAR, plaid_cymru VARCHAR);","SELECT date_s__conducted FROM table_name_69 WHERE plaid_cymru = ""19%"";","SELECT date_s__conducted FROM table_name_69 WHERE plaid_cymru = ""19%"";",1 Drop the 'ticket_sales' column,"CREATE TABLE team_performance (team_id INT PRIMARY KEY, team_name VARCHAR(50), wins INT, losses INT); CREATE TABLE ticket_sales (sale_id INT PRIMARY KEY, team_id INT, sale_date DATE, quantity INT); ALTER TABLE athlete_wellbeing ADD COLUMN ticket_sales INT;",ALTER TABLE athlete_wellbeing DROP COLUMN ticket_sales;,DROP COLUMN ticket_sales;,0 What bridge is in Mcville?,"CREATE TABLE table_name_69 (name VARCHAR, location VARCHAR);","SELECT name FROM table_name_69 WHERE location = ""mcville"";","SELECT name FROM table_name_69 WHERE location = ""mcville"";",1 What is the maximum collective bargaining agreement length in the transportation industry?,"CREATE TABLE transportation (id INT, agreement_length INT); ",SELECT MAX(agreement_length) FROM transportation;,SELECT MAX(agreement_length) FROM transportation;,1 Which company has the most satellite deployments since 2015?,"CREATE TABLE company_deployments (id INT, company VARCHAR(50), launch_year INT, deployments INT);","SELECT company, SUM(deployments) FROM company_deployments WHERE launch_year >= 2015 GROUP BY company ORDER BY SUM(deployments) DESC LIMIT 1;","SELECT company, SUM(deployments) as total_deployments FROM company_deployments WHERE launch_year >= 2015 GROUP BY company ORDER BY total_deployments DESC;",0 What is the total funding raised by startups founded by underrepresented minorities in the technology sector?,"CREATE TABLE company (id INT, name TEXT, industry TEXT, founder_race TEXT); CREATE TABLE funding_round (company_id INT, round_size INT); ",SELECT SUM(funding_round.round_size) FROM company INNER JOIN funding_round ON company.id = funding_round.company_id WHERE company.founder_race IS NOT NULL;,SELECT SUM(funding_round.round_size) FROM company INNER JOIN funding_round ON company.id = funding_round.company_id WHERE company.founder_race = 'Underrepresented Minority' AND company.industry = 'Technology';,0 What is the total revenue generated by the Tate from Cubist paintings between 1910 and 1920?,"CREATE TABLE Artworks (artwork_id INT, name VARCHAR(255), artist_id INT, date_sold DATE, price DECIMAL(10,2), museum_id INT); CREATE TABLE Artists (artist_id INT, name VARCHAR(255), nationality VARCHAR(255), gender VARCHAR(255)); CREATE TABLE Museums (museum_id INT, name VARCHAR(255));",SELECT SUM(Artworks.price) FROM Artworks INNER JOIN Artists ON Artworks.artist_id = Artists.artist_id INNER JOIN Museums ON Artworks.museum_id = Museums.museum_id WHERE Artists.nationality = 'Cubist' AND Museums.name = 'The Tate' AND YEAR(Artworks.date_sold) BETWEEN 1910 AND 1920;,SELECT SUM(Artworks.price) FROM Artworks INNER JOIN Artists ON Artworks.artist_id = Artists.artist_id INNER JOIN Museums ON Artists.museum_id = Museums.museum_id WHERE Artists.nationality = 'Cubist' AND Museums.name = 'Tate' AND Artworks.date_sold BETWEEN '1910-01-01' AND '2020-12-31';,0 How many cruelty-free certifications were issued per quarter in the year 2021?,"CREATE TABLE certifications (certification_id INT, date DATE, is_cruelty_free BOOLEAN); ","SELECT DATE_PART('quarter', date) as quarter, COUNT(*) as certifications_issued FROM certifications WHERE date >= '2021-01-01' AND date < '2022-01-01' AND is_cruelty_free = true GROUP BY quarter ORDER BY quarter;","SELECT DATE_FORMAT(date, '%Y-%m') as quarter, COUNT(*) as num_certifications FROM certifications WHERE is_cruelty_free = true AND date BETWEEN '2021-01-01' AND '2021-06-30' GROUP BY quarter;",0 "What is the average daily energy storage capacity (in MWh) for pumped hydro storage plants, grouped by country?","CREATE TABLE pumped_hydro_storage (name VARCHAR(50), location VARCHAR(50), capacity FLOAT, country VARCHAR(50)); ","SELECT country, AVG(capacity) as avg_capacity FROM pumped_hydro_storage GROUP BY country;","SELECT country, AVG(capacity) FROM pumped_hydro_storage GROUP BY country;",0 Insert a new sustainable cosmetic product into the database.,"CREATE TABLE Product (ProductID INT, ProductName VARCHAR(50), IsSustainable BOOLEAN); ","INSERT INTO Product (ProductID, ProductName, IsSustainable) VALUES (104, 'Eco-Friendly Blush', TRUE);","INSERT INTO Product (ProductID, ProductName, IsSustainable) VALUES (1, 'Sustainable Cosmetics', TRUE);",0 List the menu items and their prices from 'Italian Trattoria',"CREATE TABLE menu_prices (menu_item VARCHAR(255), price DECIMAL(10, 2), restaurant_name VARCHAR(255)); ","SELECT menu_item, price FROM menu_prices WHERE restaurant_name = 'Italian Trattoria';","SELECT menu_item, price FROM menu_prices WHERE restaurant_name = 'Italian Trattoria';",1 "Where was the game on September 11, 2004?","CREATE TABLE table_name_95 (venue VARCHAR, date VARCHAR);","SELECT venue FROM table_name_95 WHERE date = ""september 11, 2004"";","SELECT venue FROM table_name_95 WHERE date = ""september 11, 2004"";",1 Which African countries have the highest number of eco-tourists?,"CREATE TABLE africa_eco_tourists (country VARCHAR(50), eco_tourists INT); CREATE TABLE africa_countries (country VARCHAR(50)); ",SELECT country FROM africa_eco_tourists WHERE eco_tourists IN (SELECT MAX(eco_tourists) FROM africa_eco_tourists) INTERSECT SELECT country FROM africa_countries;,"SELECT country, COUNT(*) as eco_tourists FROM africa_eco_tourists GROUP BY country ORDER BY eco_tourists DESC LIMIT 1;",0 "Which Losses is the lowest one that has a Season smaller than 1920, and Draws larger than 0?","CREATE TABLE table_name_75 (losses INTEGER, season VARCHAR, draws VARCHAR);",SELECT MIN(losses) FROM table_name_75 WHERE season < 1920 AND draws > 0;,SELECT MIN(losses) FROM table_name_75 WHERE season 1920 AND draws > 0;,0 Find the average temperature and humidity for the past week for all fields in a specific region.,"CREATE TABLE field_sensor_data_3 (field_id INT, region VARCHAR(255), date DATE, temperature DECIMAL(5,2), humidity DECIMAL(5,2)); ","SELECT AVG(temperature) AS avg_temperature, AVG(humidity) AS avg_humidity, region FROM field_sensor_data_3 WHERE date >= CURDATE() - INTERVAL 7 DAY GROUP BY region;","SELECT region, AVG(temperature) as avg_temperature, AVG(humidity) as avg_humidity FROM field_sensor_data_3 WHERE date >= DATEADD(week, -1, GETDATE()) GROUP BY region;",0 What is the total number of visitors from Asia?,"CREATE TABLE VisitorDemographics (visitor_id INT, country VARCHAR(50), num_visits INT); ","SELECT SUM(num_visits) FROM VisitorDemographics WHERE country IN ('Japan', 'China', 'India', 'South Korea', 'Indonesia');",SELECT SUM(num_visits) FROM VisitorDemographics WHERE country = 'Asia';,0 Calculate the total network infrastructure investments for each quarter in the year 2022.,"CREATE TABLE network_investments_extended (investment_id INT, region VARCHAR(50), amount INT, investment_date DATE, network_type VARCHAR(20)); ","SELECT EXTRACT(QUARTER FROM investment_date) AS quarter, network_type, SUM(amount) FROM network_investments_extended WHERE EXTRACT(YEAR FROM investment_date) = 2022 GROUP BY EXTRACT(QUARTER FROM investment_date), network_type;","SELECT DATE_FORMAT(investment_date, '%Y-%m') as quarter, SUM(amount) as total_investments FROM network_investments_extended WHERE YEAR(investment_date) = 2022 GROUP BY quarter;",0 What was the total amount donated by each donor in the year 2020?,"CREATE TABLE Donors (DonorID INT, DonorName TEXT, TotalDonation DECIMAL); ","SELECT DonorName, SUM(TotalDonation) as TotalDonation FROM Donors WHERE YEAR(DonationDate) = 2020 GROUP BY DonorName;","SELECT DonorName, SUM(TotalDonation) FROM Donors WHERE YEAR(DonationDate) = 2020 GROUP BY DonorName;",0 "Who is the 2005 World AIDS Day Benefit ""Dream"" Cast when the Original Australian performer is Susan-Ann Walker?",CREATE TABLE table_1901751_1 (original_australian_performer VARCHAR);,"SELECT 2005 AS _world_aids_day_benefit_dream_cast FROM table_1901751_1 WHERE original_australian_performer = ""Susan-Ann Walker"";","SELECT 2005 FROM table_1901751_1 WHERE original_australian_performer = ""Susan-Ann Walker"";",0 "What is the total revenue for concerts and streams in Australia, grouped by year and quarter.","CREATE TABLE Concerts (id INT, date DATE, revenue FLOAT); CREATE TABLE Streams (song_id INT, date DATE, revenue FLOAT);","SELECT YEAR(date) AS year, QUARTER(date) AS quarter, SUM(Concerts.revenue) + SUM(Streams.revenue) FROM Concerts INNER JOIN Streams ON YEAR(Concerts.date) = YEAR(Streams.date) AND QUARTER(Concerts.date) = QUARTER(Streams.date) WHERE Concerts.country = 'Australia' GROUP BY year, quarter;","SELECT c.date, s.date, SUM(c.revenue) as total_revenue FROM Concerts c INNER JOIN Streams s ON c.id = s.song_id WHERE c.date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY c.date, s.date;",0 What is the total production of Neodymium for the top 5 producers in 2021?,"CREATE TABLE producers (id INT, name VARCHAR(255), neodymium_prod FLOAT); ","SELECT SUM(neodymium_prod) FROM (SELECT * FROM producers WHERE name IN ('China', 'USA', 'Australia', 'Myanmar', 'India') AND production_year = 2021 ORDER BY neodymium_prod DESC) WHERE rownum <= 5;",SELECT SUM(neodymium_prod) FROM producers WHERE YEAR(date) = 2021 GROUP BY name ORDER BY SUM(neodymium_prod) DESC LIMIT 5;,0 What is the stage of Gerolsteiner?,"CREATE TABLE table_name_29 (stage VARCHAR, team_classification VARCHAR);","SELECT stage FROM table_name_29 WHERE team_classification = ""gerolsteiner"";","SELECT stage FROM table_name_29 WHERE team_classification = ""gerolsteiner"";",1 How many test flights did SpaceX perform in 2019?,"CREATE TABLE test_flights (id INT, company VARCHAR(50), launch_year INT, test_flight BOOLEAN);",SELECT COUNT(*) FROM test_flights WHERE company = 'SpaceX' AND launch_year = 2019 AND test_flight = TRUE;,SELECT COUNT(*) FROM test_flights WHERE company = 'SpaceX' AND launch_year = 2019 AND test_flight = TRUE;,1 Tell me the 2nd leg for alemannia aachen,CREATE TABLE table_name_61 (team__number1 VARCHAR);,"SELECT 2 AS nd_leg FROM table_name_61 WHERE team__number1 = ""alemannia aachen"";","SELECT 2 AS nd_leg FROM table_name_61 WHERE team__number1 = ""almannia aachen"";",0 Who led the score on April 9?,"CREATE TABLE table_name_54 (leading_scorer VARCHAR, date VARCHAR);","SELECT leading_scorer FROM table_name_54 WHERE date = ""april 9"";","SELECT leading_scorer FROM table_name_54 WHERE date = ""april 9"";",1 What is the average number of tourists visiting Egypt from each continent in 2020?,"CREATE TABLE tourism_data (visitor_country VARCHAR(50), destination_country VARCHAR(50), visit_year INT); ","SELECT AVG(num_visitors) FROM (SELECT visitor_country, COUNT(*) as num_visitors FROM tourism_data WHERE visit_year = 2020 AND destination_country = 'Egypt' GROUP BY CONCAT(SUBSTR(visitor_country, 1, 1), ' continent')) subquery;","SELECT destination_country, AVG(COUNT(*)) as avg_tourists FROM tourism_data WHERE visit_year = 2020 GROUP BY destination_country;",0 How many fans from each country have purchased tickets to see the LA Lakers?,"CREATE TABLE fans (fan_id INT, country VARCHAR(20)); CREATE TABLE tickets (ticket_id INT, fan_id INT, team_id INT); CREATE TABLE teams (team_id INT, team_name VARCHAR(20)); ","SELECT COUNT(DISTINCT fans.fan_id), fans.country FROM fans INNER JOIN tickets ON fans.fan_id = tickets.fan_id INNER JOIN teams ON tickets.team_id = teams.team_id WHERE teams.team_name = 'LA Lakers' GROUP BY fans.country;","SELECT f.country, COUNT(t.ticket_id) FROM fans f JOIN tickets t ON f.fan_id = t.fan_id JOIN teams t ON t.team_id = t.team_id WHERE t.team_name = 'LA Lakers' GROUP BY f.country;",0 "What is the total revenue generated from ticket sales for exhibitions in Tokyo, Japan in 2019?'","CREATE TABLE Exhibitions (ID INT, Title VARCHAR(50), City VARCHAR(20), Country VARCHAR(20), Date DATE, TicketPrice INT); CREATE TABLE TicketSales (ID INT, ExhibitionID INT, Quantity INT, Date DATE); ",SELECT SUM(TicketSales.Quantity * Exhibitions.TicketPrice) FROM TicketSales INNER JOIN Exhibitions ON TicketSales.ExhibitionID = Exhibitions.ID WHERE Exhibitions.City = 'Tokyo' AND Exhibitions.Country = 'Japan' AND Exhibitions.Date BETWEEN '2019-01-01' AND '2019-12-31';,SELECT SUM(TicketPrice) FROM Exhibitions JOIN TicketSales ON Exhibitions.ID = TicketSales.ExhibitionID WHERE Exhibitions.City = 'Tokyo' AND Exhibitions.Country = 'Japan' AND YEAR(TicketSales.Date) = 2019;,0 Which ERP W is the lowest one that has a Frequency MHz of 91.3?,"CREATE TABLE table_name_58 (erp_w INTEGER, frequency_mhz VARCHAR);",SELECT MIN(erp_w) FROM table_name_58 WHERE frequency_mhz = 91.3;,"SELECT MIN(erp_w) FROM table_name_58 WHERE frequency_mhz = ""91.3"";",0 What is the minimum weight of packages shipped to Asia in the last week?,"CREATE TABLE packages (id INT, weight FLOAT, shipped_date DATE); ","SELECT MIN(weight) FROM packages WHERE shipped_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) AND destination = 'Asia';","SELECT MIN(weight) FROM packages WHERE shipped_date >= DATEADD(week, -1, GETDATE());",0 What is the policy renewal rate for female policyholders in California?,"CREATE TABLE Policyholders (PolicyID INT, Gender VARCHAR(10), State VARCHAR(10)); CREATE TABLE Policies (PolicyID INT, RenewalRate DECIMAL(3,2)); ","SELECT p.Gender, AVG(pr.RenewalRate) as RenewalRate FROM Policyholders p INNER JOIN Policies pr ON p.PolicyID = pr.PolicyID WHERE p.Gender = 'Female' AND p.State = 'California' GROUP BY p.Gender;","SELECT Policyholders.Gender, Policies.RenewalRate FROM Policyholders INNER JOIN Policies ON Policyholders.PolicyID = Policies.PolicyID WHERE Policyholders.State = 'California' AND Policyholders.Gender = 'Female';",0 "Add a new defense contract to the contracts table with ID 5, name 'ABC Defense Co.', and contract value 1000000","CREATE TABLE contracts (id INT, name VARCHAR(50), value INT);","INSERT INTO contracts (id, name, value) VALUES (5, 'ABC Defense Co.', 1000000);","INSERT INTO contracts (id, name, value) VALUES (5, 'ABC Defense Co.', 1000000);",1 What is the total revenue generated by streams of classical music in France on weekdays?,"CREATE TABLE streams (id INT, track_id INT, user_id INT, region VARCHAR(255), genre VARCHAR(255), revenue DECIMAL(10,2), timestamp TIMESTAMP);","SELECT SUM(revenue) FROM streams s JOIN (SELECT DAYNAME(timestamp) AS day FROM streams WHERE genre = 'classical' AND region = 'France') AS days ON s.timestamp = days.day WHERE day IN ('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday');",SELECT SUM(revenue) FROM streams WHERE genre = 'Classical' AND region = 'France' AND timestamp BETWEEN '2022-01-01' AND '2022-06-30';,0 What is the total number of explainable AI models with a satisfaction score greater than 85?,"CREATE TABLE explainable_ai (model_name TEXT, satisfaction_score INTEGER, date DATE); ",SELECT COUNT(*) FROM explainable_ai WHERE satisfaction_score > 85;,SELECT COUNT(*) FROM explainable_ai WHERE satisfaction_score > 85;,1 Which club has played for 27 seasons at this level?,"CREATE TABLE table_name_10 (clubs VARCHAR, seasons_at_this_level VARCHAR);","SELECT clubs FROM table_name_10 WHERE seasons_at_this_level = ""27 seasons"";",SELECT clubs FROM table_name_10 WHERE seasons_at_this_level = 27;,0 Which fabrics have sustainability scores equal to or higher than 85?,"CREATE TABLE fabrics (fabric_id INT PRIMARY KEY, name VARCHAR(255), type VARCHAR(255), sustainability_score INT); CREATE TABLE garments (garment_id INT PRIMARY KEY, name VARCHAR(255), fabric_id INT, FOREIGN KEY (fabric_id) REFERENCES fabrics(fabric_id));","SELECT name, sustainability_score FROM fabrics WHERE sustainability_score >= 85;",SELECT fabrics.name FROM fabrics INNER JOIN garments ON fabrics.fabric_id = garments.fabric_id WHERE fabrics.sustainability_score > 85;,0 What is the race on 10/10/2008?,"CREATE TABLE table_name_3 (race VARCHAR, date VARCHAR);","SELECT race FROM table_name_3 WHERE date = ""10/10/2008"";","SELECT race FROM table_name_3 WHERE date = ""10/10/2008"";",1 "What is 1989, when 1982 is ""SF""?",CREATE TABLE table_name_37 (Id VARCHAR);,"SELECT 1989 FROM table_name_37 WHERE 1982 = ""sf"";","SELECT 1989 FROM table_name_37 WHERE 1982 = ""sf"";",1 What is the highest goals against that has 15 as position?,"CREATE TABLE table_name_4 (goals_against INTEGER, position VARCHAR);",SELECT MAX(goals_against) FROM table_name_4 WHERE position = 15;,"SELECT MAX(goals_against) FROM table_name_4 WHERE position = ""15"";",0 What method had a record 12-2-3?,"CREATE TABLE table_name_87 (method VARCHAR, record VARCHAR);","SELECT method FROM table_name_87 WHERE record = ""12-2-3"";","SELECT method FROM table_name_87 WHERE record = ""12-2-3"";",1 "List the names and titles of committees that have not submitted any reports in the ""committee_reports"" table.","CREATE TABLE committee (id INT, name TEXT, type TEXT);CREATE TABLE committee_reports (committee_id INT, report_date DATE, title TEXT);","SELECT committee.name, committee.type FROM committee WHERE committee.id NOT IN (SELECT committee_id FROM committee_reports);","SELECT committee.name, committee_reports.title FROM committee INNER JOIN committee_reports ON committee.id = committee_reports.committee_id WHERE committee_reports.committee_id IS NULL;",0 Get the number of workers and total salary for each department,"CREATE TABLE departments (id INT, name VARCHAR(20)); CREATE TABLE workers (id INT, department INT, salary FLOAT); ","SELECT d.name, COUNT(w.id) AS num_workers, SUM(w.salary) AS total_salary FROM departments d JOIN workers w ON d.id = w.department GROUP BY d.name;","SELECT d.name, COUNT(w.id) as num_workers, SUM(w.salary) as total_salary FROM departments d JOIN workers w ON d.id = w.department GROUP BY d.name;",0 What is the minimum number of sustainable clothing items sold in any transaction?,"CREATE TABLE Transactions (id INT, customer_id INT, items_sold INT); ","SELECT MIN(items_sold) FROM Transactions WHERE EXISTS (SELECT 1 FROM Sales WHERE Transactions.customer_id = Sales.id AND material IN ('Organic Cotton', 'Hemp', 'Recycled Polyester', 'Tencel', 'Bamboo'));",SELECT MIN(items_sold) FROM Transactions;,0 What is the average water temperature in the Atlantic Ocean for salmon and trout farms?,"CREATE TABLE Atlantic_Ocean (id INT, temperature DECIMAL(5,2)); CREATE TABLE Farms (id INT, fish VARCHAR(20), ocean VARCHAR(20)); ","SELECT AVG(Atlantic_Ocean.temperature) FROM Atlantic_Ocean INNER JOIN Farms ON Atlantic_Ocean.id = Farms.id WHERE Farms.ocean = 'Atlantic' AND Farms.fish IN ('Salmon', 'Trout');","SELECT AVG(Atlantic_Ocean.temperature) FROM Atlantic_Ocean INNER JOIN Farms ON Atlantic_Ocean.id = Farms.id WHERE Farms.fish IN ('Salmon', 'Turtle');",0 "What was the Rampage's result in the playoffs in the year that their regular season resulted in 4th, central?","CREATE TABLE table_name_38 (playoffs VARCHAR, reg_season VARCHAR);","SELECT playoffs FROM table_name_38 WHERE reg_season = ""4th, central"";","SELECT playoffs FROM table_name_38 WHERE reg_season = ""4th, central"";",1 What is the maximum number of cases mediated by a single mediator in a year?,"CREATE TABLE mediators (id INT, name VARCHAR(255), cases_mediated INT, year INT); ",SELECT MAX(cases_mediated) FROM mediators WHERE year = 2020;,SELECT MAX(cases_mediated) FROM mediators;,0 How many Games has Points larger than 0 and a Lost smaller than 4?,"CREATE TABLE table_name_44 (games VARCHAR, drawn VARCHAR, points VARCHAR, lost VARCHAR);",SELECT COUNT(games) FROM table_name_44 WHERE points > 0 AND lost < 4 AND drawn < 0;,SELECT COUNT(games) FROM table_name_44 WHERE points > 0 AND lost 4;,0 Name the parent unit for ludwig franzisket,"CREATE TABLE table_28342423_1 (parent_unit VARCHAR, commanding_officer VARCHAR);","SELECT parent_unit FROM table_28342423_1 WHERE commanding_officer = ""Ludwig Franzisket"";","SELECT parent_unit FROM table_28342423_1 WHERE commanding_officer = ""Ludwig Frankisket"";",0 What is the Station Name of the Arrival Starting Station?,"CREATE TABLE table_name_63 (station_name VARCHAR, arrival VARCHAR);","SELECT station_name FROM table_name_63 WHERE arrival = ""starting station"";","SELECT station_name FROM table_name_63 WHERE arrival = ""starting station"";",1 Who was the music director in 1994?,"CREATE TABLE table_name_3 (music_director VARCHAR, year VARCHAR);",SELECT music_director FROM table_name_3 WHERE year = 1994;,SELECT music_director FROM table_name_3 WHERE year = 1994;,1 Update the status of the open data initiative 'Tree Inventory' in the 'Parks' department to 'closed',"CREATE TABLE department (id INT, name VARCHAR(255)); CREATE TABLE initiative (id INT, name VARCHAR(255), department_id INT, status VARCHAR(255)); ",UPDATE initiative SET status = 'closed' WHERE name = 'Tree Inventory' AND department_id = (SELECT id FROM department WHERE name = 'Parks');,UPDATE initiative SET status = 'closed' WHERE department_id = (SELECT id FROM department WHERE name = 'Parks');,0 Which episode aired in the USA on 20 May 2005?,"CREATE TABLE table_name_75 (episode VARCHAR, airdate__usa_ VARCHAR);","SELECT episode FROM table_name_75 WHERE airdate__usa_ = ""20 may 2005"";","SELECT episode FROM table_name_75 WHERE airdate__usa_ = ""20 may 2005"";",1 What is the maximum number of streams for any artist from Canada?,"CREATE TABLE Streaming (id INT, artist VARCHAR(50), streams INT, country VARCHAR(50)); ",SELECT MAX(streams) FROM Streaming WHERE country = 'Canada';,SELECT MAX(streams) FROM Streaming WHERE country = 'Canada';,1 What is the average speed of autonomous trains in Sydney?,"CREATE TABLE autonomous_trains (train_id INT, trip_duration INT, start_speed INT, end_speed INT, trip_date DATE); CREATE TABLE city_coordinates (city VARCHAR(50), latitude DECIMAL(9,6), longitude DECIMAL(9,6)); ","SELECT AVG(end_speed - start_speed) as avg_speed FROM autonomous_trains, city_coordinates WHERE city_coordinates.city = 'Sydney';",SELECT AVG(start_speed) FROM autonomous_trains INNER JOIN city_coordinates ON autonomous_trains.train_id = city_coordinates.train_id WHERE city_coordinates.city = 'Sydney';,0 "Find the top 3 favorite sports among fans, by ticket sales.","CREATE TABLE fan_demographics (fan_id INT, favorite_sport VARCHAR(20)); CREATE TABLE ticket_sales (ticket_id INT, fan_id INT, sport VARCHAR(20), sales INT);","SELECT sport, SUM(sales) as total_sales FROM ticket_sales td JOIN fan_demographics fd ON td.fan_id = fd.fan_id GROUP BY sport ORDER BY total_sales DESC LIMIT 3;","SELECT sport, SUM(sales) as total_sales FROM ticket_sales GROUP BY sport ORDER BY total_sales DESC LIMIT 3;",0 What's the percentage when the state delegate is 1662?,"CREATE TABLE table_16186152_1 (percentage VARCHAR, state_delegate VARCHAR);",SELECT percentage FROM table_16186152_1 WHERE state_delegate = 1662;,SELECT percentage FROM table_16186152_1 WHERE state_delegate = 1662;,1 "List the top 3 countries with the highest number of volunteers, along with their respective volunteer counts, in the year 2020.","CREATE TABLE Volunteers (VolunteerID INT, Name TEXT, Country TEXT, Hours INT); ","SELECT Country, SUM(Hours) as TotalHours FROM Volunteers WHERE YEAR(VolunteerDate) = 2020 GROUP BY Country ORDER BY TotalHours DESC LIMIT 3;","SELECT Country, COUNT(*) as VolunteerCount FROM Volunteers WHERE YEAR(VolunteerDate) = 2020 GROUP BY Country ORDER BY VolunteerCount DESC LIMIT 3;",0 What was the retired time on someone who had 43 laps on a grip of 18?,"CREATE TABLE table_name_17 (time_retired VARCHAR, laps VARCHAR, grid VARCHAR);",SELECT time_retired FROM table_name_17 WHERE laps = 43 AND grid = 18;,SELECT time_retired FROM table_name_17 WHERE laps = 43 AND grid = 18;,1 Show the total labor cost for each state and the total number of permits issued for each state,"CREATE TABLE construction_labor (state VARCHAR(2), labor_cost NUMERIC); CREATE TABLE building_permits (state VARCHAR(2), permit_number VARCHAR(10)); ","SELECT state, SUM(labor_cost) AS total_labor_cost, COUNT(permit_number) AS total_permits FROM construction_labor LEFT JOIN building_permits ON construction_labor.state = building_permits.state GROUP BY state;","SELECT cl.state, SUM(cl.labor_cost) as total_labor_cost, COUNT(bp.permit_number) as total_permits FROM construction_labor cl INNER JOIN building_permits bp ON cl.state = bp.state GROUP BY cl.state;",0 On which date was the game played on Week 13?,"CREATE TABLE table_name_22 (date VARCHAR, week VARCHAR);",SELECT date FROM table_name_22 WHERE week = 13;,SELECT date FROM table_name_22 WHERE week = 13;,1 What is the game number with a score of 116–138?,"CREATE TABLE table_name_31 (game VARCHAR, score VARCHAR);","SELECT COUNT(game) FROM table_name_31 WHERE score = ""116–138"";","SELECT game FROM table_name_31 WHERE score = ""116–138"";",0 Name the district for john randolph (dr),"CREATE TABLE table_2668387_18 (district VARCHAR, candidates VARCHAR);","SELECT district FROM table_2668387_18 WHERE candidates = ""John Randolph (DR)"";","SELECT district FROM table_2668387_18 WHERE candidates = ""John Randolph (DR)"";",1 In what year was the republican incumbent from Kentucky 2 district first elected?,"CREATE TABLE table_name_37 (first_elected INTEGER, party VARCHAR, district VARCHAR);","SELECT SUM(first_elected) FROM table_name_37 WHERE party = ""republican"" AND district = ""kentucky 2"";","SELECT AVG(first_elected) FROM table_name_37 WHERE party = ""republican"" AND district = ""kentucky 2"";",0 Who won the 250cc in 1927?,CREATE TABLE table_name_31 (year VARCHAR);,"SELECT 250 AS _cc FROM table_name_31 WHERE year = ""1927"";",SELECT 250 AS cc FROM table_name_31 WHERE year = 1927;,0 What is the average number of visitors to the dance events in the year 2020?,"CREATE TABLE DanceEvents (id INT, year INT, visitors INT); ",SELECT AVG(visitors) FROM DanceEvents WHERE year = 2020;,SELECT AVG(visitors) FROM DanceEvents WHERE year = 2020;,1 What is the total number of sustainable urbanism projects in the state of Texas?,"CREATE TABLE projects (id INT, state VARCHAR(20), sustainable BOOLEAN); ",SELECT COUNT(*) FROM projects WHERE state = 'Texas' AND sustainable = TRUE;,SELECT COUNT(*) FROM projects WHERE state = 'Texas' AND sustainable = TRUE;,1 Who is the winning drive of iv grand prix de caen?,"CREATE TABLE table_name_51 (winning_driver VARCHAR, race_name VARCHAR);","SELECT winning_driver FROM table_name_51 WHERE race_name = ""iv grand prix de caen"";","SELECT winning_driver FROM table_name_51 WHERE race_name = ""iv grand prix de caen"";",1 Who has a Height of head coach: tamás faragó?,"CREATE TABLE table_name_65 (name VARCHAR, height VARCHAR);","SELECT name FROM table_name_65 WHERE height = ""head coach: tamás faragó"";","SELECT name FROM table_name_65 WHERE height = ""head coach: tamás faragó"";",1 What is the average temperature in 'europe' in December?,"CREATE TABLE europe_weather (date TEXT, temperature INTEGER); ",SELECT AVG(temperature) FROM europe_weather WHERE date LIKE '2022-12-%';,SELECT AVG(temperature) FROM europe_weather WHERE date = 'December';,0 What is the average rating of beauty products with natural ingredients in the skincare category?,"CREATE TABLE ProductRatings (ProductID INT, ProductType VARCHAR(20), HasNaturalIngredients BOOLEAN, Rating INT, ReviewDate DATE); ",SELECT AVG(Rating) FROM ProductRatings WHERE ProductType = 'Skincare' AND HasNaturalIngredients = TRUE;,SELECT AVG(Rating) FROM ProductRatings WHERE ProductType = 'Skincare' AND HasNaturalIngredients = TRUE;,1 Delete all customer records from the Customers table.,"CREATE TABLE Customers (customerID INT, customerName VARCHAR(50), loyalty_score INT); ",DELETE FROM Customers;,DELETE FROM Customers;,1 List all public transportation routes with more than 50% autonomous bus usage in Singapore.,"CREATE TABLE public_transportation (route_id INT, route_name TEXT, vehicle_type TEXT, is_autonomous BOOLEAN, passengers INT);",SELECT route_name FROM public_transportation WHERE vehicle_type = 'Bus' AND is_autonomous = TRUE GROUP BY route_name HAVING COUNT(*) FILTER (WHERE is_autonomous = TRUE) / COUNT(*) > 0.5 AND route_name LIKE 'Singapore%';,SELECT route_name FROM public_transportation WHERE is_autonomous = true AND passengers > 50;,0 What are the total sales and average sales per game for each genre?,"CREATE TABLE game_sales (game_id INT, genre VARCHAR(255), sales FLOAT); ","SELECT genre, SUM(sales) as total_sales, AVG(sales) as avg_sales_per_game FROM game_sales GROUP BY genre;","SELECT genre, SUM(sales) as total_sales, AVG(sales) as avg_sales FROM game_sales GROUP BY genre;",0 Which infectious diseases have been reported in Tokyo this year?,"CREATE TABLE infections (id INT, patient_id INT, infection VARCHAR(50), date DATE, city VARCHAR(50)); ",SELECT DISTINCT infection FROM infections WHERE city = 'Tokyo' AND date >= '2022-01-01';,"SELECT infection FROM infections WHERE city = 'Tokyo' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 Find the top 5 destinations with the longest delivery times?,"CREATE TABLE Warehouse (id INT, location VARCHAR(255), capacity INT); CREATE TABLE Shipment (id INT, warehouse_id INT, delivery_time INT, destination VARCHAR(255)); ","SELECT destination, AVG(delivery_time) as avg_delivery_time, RANK() OVER (ORDER BY AVG(delivery_time) DESC) as rank FROM Shipment GROUP BY destination HAVING rank <= 5;","SELECT w.location, s.delivery_time FROM Shipment s JOIN Warehouse w ON s.warehouse_id = w.id GROUP BY w.location ORDER BY s.delivery_time DESC LIMIT 5;",0 Percentage of patients who improved after therapy sessions in Japan.,"CREATE TABLE patients (patient_id INT, country VARCHAR(50)); CREATE TABLE therapy_sessions (patient_id INT, session_count INT, improvement BOOLEAN); ",SELECT AVG(CASE WHEN therapy_sessions.improvement = TRUE THEN 1.0 ELSE 0.0 END) * 100.0 / COUNT(DISTINCT patients.patient_id) AS percentage FROM patients INNER JOIN therapy_sessions ON patients.patient_id = therapy_sessions.patient_id WHERE patients.country = 'Japan';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM therapy_sessions WHERE country = 'Japan')) AS percentage FROM patients JOIN therapy_sessions ON patients.patient_id = therapy_sessions.patient_id WHERE country = 'Japan' AND improvement = TRUE;,0 "What is the total number of green-certified industrial buildings in Mexico City with a floor area of over 50,000 square feet?","CREATE TABLE Green_Industrial_Buildings (Building_ID INT, City VARCHAR(50), Certification_Date DATE, Floor_Area INT);",SELECT COUNT(Building_ID) FROM Green_Industrial_Buildings WHERE City = 'Mexico City' AND Floor_Area > 50000;,SELECT COUNT(*) FROM Green_Industrial_Buildings WHERE City = 'Mexico City' AND Floor_Area > 50000;,0 "If the national trophy/rookie is Simone Iaquinta, what is the season total number?","CREATE TABLE table_25563779_4 (season VARCHAR, national_trophy_rookie VARCHAR);","SELECT COUNT(season) FROM table_25563779_4 WHERE national_trophy_rookie = ""Simone Iaquinta"";","SELECT COUNT(season) FROM table_25563779_4 WHERE national_trophy_rookie = ""Simone Iaquinta"";",1 Update the mental health parity scores for community health workers who identify as 'Non-binary' to 92.,"CREATE TABLE MentalHealthParityScores (ScoreID INT, Score INT, Gender VARCHAR(10)); ",UPDATE MentalHealthParityScores SET Score = 92 WHERE Gender = 'Non-binary';,UPDATE MentalHealthParityScores SET Score = 92 WHERE Gender = 'Non-binary';,1 What's the IS-2 when the KV-1S is 114?,"CREATE TABLE table_name_91 (is_2_m1945 VARCHAR, kv_1s_m1942 VARCHAR);","SELECT is_2_m1945 FROM table_name_91 WHERE kv_1s_m1942 = ""114"";","SELECT is_2_m1945 FROM table_name_91 WHERE kv_1s_m1942 = ""114"";",1 What is the average number of safety incidents in the textile industry in India?,"CREATE TABLE incidents (id INT, company VARCHAR(50), country VARCHAR(50), industry VARCHAR(50), number INT);",SELECT AVG(number) FROM incidents WHERE country = 'India' AND industry = 'Textile';,SELECT AVG(number) FROM incidents WHERE country = 'India' AND industry = 'textile';,0 What is the total salary expense for the Finance department compared to the HR department?,"CREATE TABLE Employees (EmployeeID INT, Department VARCHAR(50), Salary DECIMAL(10,2)); ","SELECT Department, SUM(Salary) FROM Employees GROUP BY Department;",SELECT SUM(Salary) FROM Employees WHERE Department = 'Finance' AND Department = 'HR';,0 How many mobile subscribers have each mobile device model?,"CREATE TABLE mobile_subscribers_devices (subscriber_id INT, name VARCHAR(255), device_model VARCHAR(255)); ","SELECT device_model, COUNT(*) FROM mobile_subscribers_devices GROUP BY device_model;","SELECT device_model, COUNT(*) FROM mobile_subscribers_devices GROUP BY device_model;",1 List all mobile subscribers who have exceeded their monthly data limit in the last month.,"CREATE TABLE mobile_subscribers (subscriber_id INT, data_limit DECIMAL(5,2), data_usage DECIMAL(5,2), last_update DATE); ","SELECT subscriber_id FROM mobile_subscribers WHERE data_usage > data_limit AND last_update >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);","SELECT subscriber_id, data_limit, data_usage FROM mobile_subscribers WHERE last_update >= DATEADD(month, -1, GETDATE());",0 What is the average water consumption per mining operation in the 'MiningOperations' table?,"CREATE TABLE MiningOperations (id INT, location TEXT, water_consumption INT);",SELECT AVG(water_consumption) FROM MiningOperations;,SELECT AVG(water_consumption) FROM MiningOperations;,1 How many were won when the points were 12? ,"CREATE TABLE table_17369472_2 (won VARCHAR, points VARCHAR);","SELECT COUNT(won) FROM table_17369472_2 WHERE points = ""12"";",SELECT won FROM table_17369472_2 WHERE points = 12;,0 "What is the average distance (in kilometers) of all satellites from the Earth's surface, grouped by the launch year?","CREATE TABLE space_satellites (id INT, name VARCHAR(50), launch_year INT, avg_distance FLOAT);","SELECT launch_year, AVG(avg_distance) FROM space_satellites GROUP BY launch_year;","SELECT launch_year, AVG(avg_distance) FROM space_satellites GROUP BY launch_year;",1 What is the distribution of employees by department and job level?,"CREATE TABLE departments (dept_id INT, dept_name TEXT); CREATE TABLE employees (employee_id INT, name TEXT, salary INT, dept_id INT, job_level TEXT); ","SELECT dept_name, job_level, COUNT(*) AS num_employees FROM employees JOIN departments ON employees.dept_id = departments.dept_id GROUP BY dept_name, job_level;","SELECT d.dept_name, e.job_level, COUNT(e.employee_id) as num_employees FROM departments d JOIN employees e ON d.dept_id = e.dept_id GROUP BY d.dept_name, e.job_level;",0 What is the number of community-based restorative justice programs by state and type?,"CREATE TABLE community_restorative_justice (program_id INT, program_state VARCHAR(20), program_type VARCHAR(20)); ","SELECT program_state, program_type, COUNT(*) as total_programs FROM community_restorative_justice GROUP BY program_state, program_type;","SELECT program_state, program_type, COUNT(*) FROM community_restorative_justice GROUP BY program_state, program_type;",0 "Count the number of unique esports events where at least one female player participated, and the number of unique VR games played in these events.","CREATE TABLE EsportsEvents (EventID INT, EventName VARCHAR(50)); CREATE TABLE Players (PlayerID INT, Age INT, Gender VARCHAR(10)); CREATE TABLE PlayerEvent (PlayerID INT, EventID INT); CREATE TABLE Games (GameID INT, GameName VARCHAR(50), Genre VARCHAR(20)); CREATE TABLE GameEvent (GameID INT, EventID INT, GameType VARCHAR(10)); CREATE TABLE VR_Games (GameID INT, IsVR INT);","SELECT COUNT(DISTINCT EsportsEvents.EventID), COUNT(DISTINCT Games.GameID) FROM EsportsEvents INNER JOIN PlayerEvent ON EsportsEvents.EventID = PlayerEvent.EventID INNER JOIN Players ON PlayerEvent.PlayerID = Players.PlayerID INNER JOIN GameEvent ON EsportsEvents.EventID = GameEvent.EventID INNER JOIN Games ON GameEvent.GameID = Games.GameID INNER JOIN VR_Games ON Games.GameID = VR_Games.GameID WHERE Players.Gender = 'Female' AND VR_Games.IsVR = 1;","SELECT COUNT(DISTINCT EsportsEvents.EventID) AS UniqueEvents, COUNT(DISTINCT VR_Games.GameID) AS UniqueGames FROM EsportsEvents INNER JOIN PlayerEvent ON EsportsEvents.EventID = PlayerEvent.EventID INNER JOIN GameEvent ON PlayerEvent.GameID = GameEvent.GameID INNER JOIN VR_Games ON GameEvent.GameID = VR_Games.GameID WHERE Gender = 'Female';",0 Delete the wellness program with ID 003 from the wellness_programs table.,"CREATE TABLE wellness_programs (id VARCHAR(10), name VARCHAR(20), description VARCHAR(50)); ",DELETE FROM wellness_programs WHERE id = '003';,DELETE FROM wellness_programs WHERE id = 003;,0 How many garments of the 'Dresses' category were sold in the second half of 2020?,"CREATE TABLE sales_category (sale_id INT, sale_date DATE, category VARCHAR(20), quantity INT); ",SELECT SUM(quantity) FROM sales_category WHERE category = 'Dresses' AND sale_date BETWEEN '2020-07-01' AND '2020-12-31';,SELECT SUM(quantity) FROM sales_category WHERE category = 'Dresses' AND sale_date BETWEEN '2020-01-01' AND '2020-12-31';,0 "List the top 5 water consuming cities in the state of California for the year 2019, ordered by water consumption in descending order.","CREATE TABLE california_cities (id INT, city VARCHAR(50), water_consumption FLOAT, year INT); ","SELECT city, water_consumption FROM california_cities WHERE year = 2019 ORDER BY water_consumption DESC LIMIT 5;","SELECT city, water_consumption FROM california_cities WHERE year = 2019 ORDER BY water_consumption DESC LIMIT 5;",1 What is the maximum severity level of a malware and its family in the 'malware' table?,"CREATE TABLE malware (id INT, family VARCHAR(255), severity INT, last_seen DATE);","SELECT family, severity FROM malware WHERE severity = (SELECT MAX(severity) FROM malware);","SELECT family, MAX(severity) FROM malware GROUP BY family;",0 What is the maximum number of points scored against?,CREATE TABLE table_21991074_1 (pts_agst INTEGER);,SELECT MAX(pts_agst) FROM table_21991074_1;,SELECT MAX(pts_agst) FROM table_21991074_1;,1 "How many properties are there in each city, ordered by the number of properties in descending order?","CREATE TABLE cities (id INT, name VARCHAR(255)); CREATE TABLE properties (id INT, city_id INT); ","SELECT city_id, COUNT(*) as num_properties FROM properties GROUP BY city_id ORDER BY num_properties DESC;","SELECT c.name, COUNT(p.id) as num_properties FROM cities c JOIN properties p ON c.id = p.city_id GROUP BY c.name ORDER BY num_properties DESC;",0 Calculate the number of volunteers who joined in H1 2018 from 'Africa' and 'South America'?,"CREATE TABLE volunteers (volunteer_id INT, volunteer_name TEXT, volunteer_region TEXT, volunteer_join_date DATE); ","SELECT COUNT(*) FROM volunteers WHERE EXTRACT(QUARTER FROM volunteer_join_date) IN (1, 2) AND volunteer_region IN ('Africa', 'South America');","SELECT COUNT(*) FROM volunteers WHERE volunteer_region IN ('Africa', 'South America') AND volunteer_join_date BETWEEN '2018-01-01' AND '2018-12-31';",0 How many containers were shipped from the Port of Santos to Cuba in the past 6 months?,"CREATE TABLE Port (port_id INT, port_name TEXT, country TEXT); CREATE TABLE Shipment (shipment_id INT, container_id INT, port_id INT, shipping_date DATE); CREATE TABLE Container (container_id INT, weight FLOAT);",SELECT COUNT(*) FROM Container c JOIN Shipment s ON c.container_id = s.container_id WHERE s.port_id = (SELECT port_id FROM Port WHERE port_name = 'Port of Santos') AND s.shipping_date >= NOW() - INTERVAL '6 months' AND (SELECT country FROM Port WHERE port_id = s.port_id) = 'Cuba';,"SELECT COUNT(*) FROM Shipment JOIN Port ON Shipment.port_id = Port.port_id JOIN Container ON Shipment.container_id = Container.container_id WHERE Port.port_name = 'Port of Santos' AND Shipment.shipping_date >= DATEADD(month, -6, GETDATE());",0 What is the data retention rate per quarter for customers in the 'Americas' region?,"CREATE TABLE customer_data (customer_id INT, retention_quarter DATE, region VARCHAR(50)); ","SELECT region, DATE_TRUNC('quarter', retention_quarter) as retention_quarter, COUNT(customer_id) as total_customers, COUNT(DISTINCT CASE WHEN customer_id IN (SELECT customer_id FROM customer_data WHERE retention_quarter <= current_date - INTERVAL '1 year' GROUP BY customer_id) THEN customer_id END) as retained_customers, 100.0 * COUNT(DISTINCT CASE WHEN customer_id IN (SELECT customer_id FROM customer_data WHERE retention_quarter <= current_date - INTERVAL '1 year' GROUP BY customer_id) THEN customer_id END) / COUNT(DISTINCT customer_id) as retention_rate FROM customer_data WHERE region = 'Americas' GROUP BY region, retention_quarter;","SELECT EXTRACT(QUARTER FROM retention_quarter) as quarter, COUNT(*) as retention_rate FROM customer_data WHERE region = 'Americas' GROUP BY quarter;",0 What is the average donation amount from Latin America?,"CREATE TABLE Donors (DonorID int, DonorName varchar(100), Country varchar(50), DonationDate date, AmountDonated decimal(10,2)); ","SELECT AVG(AmountDonated) as AverageDonation FROM Donors WHERE Country IN ('Argentina', 'Bolivia', 'Brazil', 'Chile', 'Colombia', 'Costa Rica', 'Cuba', 'Ecuador', 'El Salvador', 'Guatemala', 'Honduras', 'Mexico', 'Nicaragua', 'Panama', 'Paraguay', 'Peru', 'Uruguay', 'Venezuela');",SELECT AVG(AmountDonated) FROM Donors WHERE Country LIKE '%Latin America%';,0 What is the average carbon footprint of brands that use organic cotton?,"CREATE TABLE brands (brand_id INT, brand_name VARCHAR(255), uses_organic_cotton BOOLEAN, avg_carbon_footprint DECIMAL(5,2));",SELECT AVG(avg_carbon_footprint) FROM brands WHERE uses_organic_cotton = TRUE;,SELECT AVG(avg_carbon_footprint) FROM brands WHERE uses_organic_cotton = true;,0 List the top 2 employees with the most safety violations in the 'East' plant in 2022.,"CREATE TABLE employee_safety (employee_id int, name varchar(20), plant varchar(10), violation_date date); ","SELECT e.name, COUNT(*) as total_violations FROM employee_safety e JOIN (SELECT employee_id, plant FROM employee_safety WHERE plant = 'East Plant' GROUP BY employee_id, plant HAVING COUNT(*) >= 2) f ON e.employee_id = f.employee_id AND e.plant = f.plant GROUP BY e.name ORDER BY total_violations DESC LIMIT 2;","SELECT employee_id, name, plant, violation_date FROM employee_safety WHERE plant = 'East' AND violation_date >= '2022-01-01' AND violation_date '2023-01-01' GROUP BY employee_id, name ORDER BY violation_date DESC LIMIT 2;",0 What is the total quantity of items with type 'K' or type 'L' in warehouse W and warehouse X?,"CREATE TABLE warehouse_w(item_id INT, item_type VARCHAR(10), quantity INT);CREATE TABLE warehouse_x(item_id INT, item_type VARCHAR(10), quantity INT);","SELECT quantity FROM warehouse_w WHERE item_type IN ('K', 'L') UNION ALL SELECT quantity FROM warehouse_x WHERE item_type IN ('K', 'L');","SELECT SUM(quantity) FROM warehouse_w JOIN warehouse_x ON warehouse_w.item_id = warehouse_x.item_id WHERE item_type IN ('K', 'L') GROUP BY warehouse_w.item_type;",0 Find the average production quantity for wells in the North Sea,"CREATE TABLE production (well_id INT, date DATE, quantity FLOAT); ",SELECT AVG(quantity) FROM production p JOIN wells w ON p.well_id = w.id WHERE w.location = 'North Sea';,SELECT AVG(quantity) FROM production WHERE well_id IN (SELECT well_id FROM wells WHERE location = 'North Sea');,0 WHich Country has a ICAO of ltcd?,"CREATE TABLE table_name_46 (country VARCHAR, icao VARCHAR);","SELECT country FROM table_name_46 WHERE icao = ""ltcd"";","SELECT country FROM table_name_46 WHERE icao = ""ltcd"";",1 What place did Paul McGinley finish in?,"CREATE TABLE table_name_46 (place VARCHAR, player VARCHAR);","SELECT place FROM table_name_46 WHERE player = ""paul mcginley"";","SELECT place FROM table_name_46 WHERE player = ""paul mcguinley"";",0 "What teams played in the Capital One bowl game on January 1, 2009?","CREATE TABLE table_16046689_29 (conference_matchups VARCHAR, date VARCHAR, bowl_game VARCHAR);","SELECT conference_matchups FROM table_16046689_29 WHERE date = ""January 1, 2009"" AND bowl_game = ""Capital One"";","SELECT conference_matchups FROM table_16046689_29 WHERE date = ""January 1, 2009"" AND bowl_game = ""Capital One"";",1 "What was the total revenue from ticket sales for the ""Comedy Night"" event?","CREATE TABLE theatre_2 (event VARCHAR(255), date DATE, revenue FLOAT); ",SELECT SUM(revenue) FROM theatre_2 WHERE event = 'Comedy Night';,SELECT SUM(revenue) FROM theatre_2 WHERE event = 'Comedy Night';,1 "Which organic skincare brands are available in the California region with sales greater than $10,000?","CREATE TABLE skincare_sales(brand VARCHAR(255), region VARCHAR(255), sales FLOAT); ",SELECT brand FROM skincare_sales WHERE region = 'California' AND sales > 10000 AND brand LIKE '%organic%';,SELECT brand FROM skincare_sales WHERE region = 'California' AND sales > 10000;,0 who is the winner and score for the week of august 9?,"CREATE TABLE table_name_6 (winner_and_score VARCHAR, week VARCHAR);","SELECT winner_and_score FROM table_name_6 WHERE week = ""august 9"";","SELECT winner_and_score FROM table_name_6 WHERE week = ""august 9"";",1 How many clients have opened a new account in the last month?,"CREATE TABLE clients (id INT, last_account_opening DATE); ","SELECT COUNT(*) FROM clients WHERE last_account_opening BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) AND CURRENT_DATE;","SELECT COUNT(*) FROM clients WHERE last_account_opening >= DATEADD(month, -1, GETDATE());",0 What is the total number of schools founded that have an enrollment of 5634?,"CREATE TABLE table_2076608_1 (founded VARCHAR, enrollment VARCHAR);","SELECT COUNT(founded) FROM table_2076608_1 WHERE enrollment = ""5634"";",SELECT COUNT(founded) FROM table_2076608_1 WHERE enrollment = 5634;,0 "How many models does each car maker produce? List maker full name, id and the number.","CREATE TABLE MODEL_LIST (Maker VARCHAR); CREATE TABLE CAR_MAKERS (FullName VARCHAR, Id VARCHAR);","SELECT T1.FullName, T1.Id, COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id;","SELECT T1.FullName, T1.Id, COUNT(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T1.Maker;",0 How many drivers did Bob Gerard Racing have?,"CREATE TABLE table_21977627_1 (driver VARCHAR, entrant VARCHAR);","SELECT COUNT(driver) FROM table_21977627_1 WHERE entrant = ""Bob Gerard Racing"";","SELECT COUNT(driver) FROM table_21977627_1 WHERE entrant = ""Bob Gerard Racing"";",1 How many collective bargaining agreements were signed in '2020'?,"CREATE TABLE cb_agreements (id INT, agreement_number INT, sign_date DATE); ",SELECT COUNT(*) FROM cb_agreements WHERE YEAR(sign_date) = 2020 AND agreement_number IS NOT NULL;,SELECT COUNT(*) FROM cb_agreements WHERE YEAR(sign_date) = 2020;,0 Update the project_name of the project with id 3 to 'Bridge Replacement',"CREATE TABLE projects (id INT PRIMARY KEY, project_name VARCHAR(255), location VARCHAR(255)); ",UPDATE projects SET project_name = 'Bridge Replacement' WHERE id = 3;,UPDATE projects SET project_name = 'Bridge Replacement' WHERE id = 3;,1 Find the average rating for each dish,"CREATE TABLE sales (sale_id INT, dish_id INT, sale_price DECIMAL(5,2), country VARCHAR(255)); CREATE TABLE dishes (dish_id INT, dish_name VARCHAR(255), cuisine VARCHAR(255)); CREATE TABLE feedback (feedback_id INT, dish_id INT, customer_id INT, rating INT, comment TEXT); ","SELECT d.dish_name, AVG(f.rating) as avg_rating FROM dishes d INNER JOIN feedback f ON d.dish_id = f.dish_id GROUP BY d.dish_name;","SELECT d.dish_name, AVG(f.rating) as avg_rating FROM dishes d JOIN feedback f ON d.dish_id = f.dish_id GROUP BY d.dish_name;",0 How many bronze medals did the country with 7 medals and over 5 silver medals receive?,"CREATE TABLE table_name_88 (bronze INTEGER, total VARCHAR, silver VARCHAR);",SELECT SUM(bronze) FROM table_name_88 WHERE total = 7 AND silver > 5;,SELECT SUM(bronze) FROM table_name_88 WHERE total = 7 AND silver > 5;,1 Name the number for new mexico,"CREATE TABLE table_20649850_1 (pick__number INTEGER, college VARCHAR);","SELECT MIN(pick__number) FROM table_20649850_1 WHERE college = ""New Mexico"";","SELECT MAX(pick__number) FROM table_20649850_1 WHERE college = ""New Mexico"";",0 What is the average production volume for wells in the Amazon Basin and off the coast of Nigeria?,"CREATE TABLE wells (well_id INT, well_name VARCHAR(50), production_volume FLOAT, location VARCHAR(50)); ","SELECT location, AVG(production_volume) FROM wells WHERE location IN ('Amazon Basin', 'Nigeria Coast') GROUP BY location;","SELECT AVG(production_volume) FROM wells WHERE location IN ('Amazon Basin', 'Nigeria');",0 How many crimes were reported in each neighborhood with a community policing program in 2021?,"CREATE TABLE neighborhoods (nid INT, name VARCHAR(255), has_program BOOLEAN); CREATE TABLE crimes (cid INT, nid INT, year INT, type VARCHAR(255)); ","SELECT n.name, COUNT(c.cid) as num_crimes FROM neighborhoods n JOIN crimes c ON n.nid = c.nid WHERE c.year = 2021 AND n.has_program = true GROUP BY n.nid;","SELECT n.name, COUNT(c.cid) FROM neighborhoods n JOIN crimes c ON n.nid = c.nid WHERE n.has_program = TRUE AND c.year = 2021 GROUP BY n.name;",0 How many unique donors made donations in each quarter of 2021?,"CREATE TABLE Donors (id INT, name TEXT, country TEXT, donation FLOAT, quarter TEXT, year INT); ","SELECT quarter, COUNT(DISTINCT id) FROM Donors GROUP BY quarter;","SELECT quarter, COUNT(DISTINCT donation) FROM Donors WHERE year = 2021 GROUP BY quarter;",0 List all states and their respective percentage of total government spending on healthcare.,"CREATE TABLE government_spending (state VARCHAR(20), category VARCHAR(20), amount INT); ","SELECT state, ROUND(100.0*SUM(CASE WHEN category = 'Healthcare' THEN amount ELSE 0 END)/SUM(amount), 1) AS healthcare_percentage FROM government_spending GROUP BY state;","SELECT state, (SUM(amount) * 100.0 / (SELECT SUM(amount) FROM government_spending WHERE category = 'Healthcare')) as percentage FROM government_spending WHERE category = 'Healthcare' GROUP BY state;",0 "What is the number of hospitals and clinics in each state, ordered by the number of hospitals, descending?","CREATE TABLE hospitals (id INT, name TEXT, state TEXT, location TEXT, type TEXT, num_beds INT); CREATE TABLE clinics (id INT, name TEXT, state TEXT, location TEXT, type TEXT, num_providers INT); ","SELECT h.state, COUNT(h.id) as num_hospitals, COUNT(c.id) as num_clinics FROM hospitals h FULL OUTER JOIN clinics c ON h.state = c.state GROUP BY h.state ORDER BY num_hospitals DESC;","SELECT h.state, COUNT(c.id) as num_hospitals, COUNT(c.id) as num_clinics FROM hospitals h JOIN clinics c ON h.state = c.state GROUP BY h.state ORDER BY num_hospitals DESC;",0 What is the location of the car that has a constructor of Lorraine-Dietrich?,"CREATE TABLE table_18893428_1 (location VARCHAR, constructor VARCHAR);","SELECT location FROM table_18893428_1 WHERE constructor = ""Lorraine-Dietrich"";","SELECT location FROM table_18893428_1 WHERE constructor = ""Lorraine-Dietrich"";",1 What was the earliest game with a record of 16–4–3?,"CREATE TABLE table_name_96 (game INTEGER, record VARCHAR);","SELECT MIN(game) FROM table_name_96 WHERE record = ""16–4–3"";","SELECT MIN(game) FROM table_name_96 WHERE record = ""16–4–3"";",1 Which language has 3 draws?,"CREATE TABLE table_name_15 (language VARCHAR, draw VARCHAR);",SELECT language FROM table_name_15 WHERE draw = 3;,SELECT language FROM table_name_15 WHERE draw = 3;,1 "What is the Attendance with a Date that is october 31, 1965?","CREATE TABLE table_name_15 (attendance VARCHAR, date VARCHAR);","SELECT attendance FROM table_name_15 WHERE date = ""october 31, 1965"";","SELECT attendance FROM table_name_15 WHERE date = ""october 31, 1965"";",1 What is the total number of art pieces and their average value in African museums?,"CREATE TABLE Museums (MuseumID INT, MuseumName VARCHAR(50), Country VARCHAR(50)); CREATE TABLE ArtPieces (ArtPieceID INT, MuseumID INT, Value INT); ","SELECT COUNT(ArtPieces.ArtPieceID) AS TotalArtPieces, AVG(ArtPieces.Value) AS AvgValue FROM ArtPieces INNER JOIN Museums ON ArtPieces.MuseumID = Museums.MuseumID WHERE Museums.Country = 'Africa';","SELECT COUNT(ArtPieces.ArtPieceID), AVG(ArtPieces.Value) FROM ArtPieces INNER JOIN Museums ON ArtPieces.MuseumID = Museums.MuseumID WHERE Museums.Country = 'Africa';",0 Who won Miss Universe Philippines when the first runner-up was Danielle Castaño and Janina San Miguel won Binibining Pilipinas-World?,"CREATE TABLE table_name_82 (miss_universe_philippines VARCHAR, first_runner_up VARCHAR, binibining_pilipinas_world VARCHAR);","SELECT miss_universe_philippines FROM table_name_82 WHERE first_runner_up = ""danielle castaño"" AND binibining_pilipinas_world = ""janina san miguel"";","SELECT miss_universe_philippines FROM table_name_82 WHERE first_runner_up = ""danielle castao"" AND binibining_pilipinas_world = ""janina san Miguel"";",0 What was the record when the team played Boston?,"CREATE TABLE table_17325580_10 (record VARCHAR, team VARCHAR);","SELECT record FROM table_17325580_10 WHERE team = ""Boston"";","SELECT record FROM table_17325580_10 WHERE team = ""Boston"";",1 What is the total number of crimes reported in the city of Houston in the year 2019 and 2020?,"CREATE TABLE public.crime_statistics (id serial PRIMARY KEY, city varchar(255), year int, num_crimes int); ",SELECT SUM(num_crimes) FROM public.crime_statistics WHERE city = 'Houston' AND (year = 2019 OR year = 2020);,"SELECT SUM(num_crimes) FROM public.crime_statistics WHERE city = 'Houston' AND year IN (2019, 2020);",0 Delete all records of carbon offset initiatives that have been implemented in the country of Canada.,"CREATE TABLE carbon_offsets (initiative_id INT, initiative_name VARCHAR(255), city VARCHAR(255), country VARCHAR(255), offset_value INT);",DELETE FROM carbon_offsets WHERE country = 'Canada';,DELETE FROM carbon_offsets WHERE country = 'Canada';,1 What was the average donation amount by Zip Code?,"CREATE TABLE Donations (DonorID INT, DonationDate DATE, Amount DECIMAL(10,2), ZipCode VARCHAR(10)); ","SELECT ZipCode, AVG(Amount) as AvgDonation FROM Donations GROUP BY ZipCode;","SELECT ZipCode, AVG(Amount) FROM Donations GROUP BY ZipCode;",0 "What is Opponent, when Location/Attendance is ""Mellon Arena - 17,132""?","CREATE TABLE table_name_67 (opponent VARCHAR, location_attendance VARCHAR);","SELECT opponent FROM table_name_67 WHERE location_attendance = ""mellon arena - 17,132"";","SELECT opponent FROM table_name_67 WHERE location_attendance = ""melon arena - 17,132"";",0 "Where is the lowest area with a population of 7,616?","CREATE TABLE table_name_55 (area__km²_ INTEGER, population__2010_ VARCHAR);",SELECT MIN(area__km²_) FROM table_name_55 WHERE population__2010_ = 7 OFFSET 616;,"SELECT MIN(area__km2_) FROM table_name_55 WHERE population__2010_ = ""7,616"";",0 "What is Date, when Team is Holden Racing Team, and when Circuit is Eastern Creek Raceway?","CREATE TABLE table_name_40 (date VARCHAR, team VARCHAR, circuit VARCHAR);","SELECT date FROM table_name_40 WHERE team = ""holden racing team"" AND circuit = ""eastern creek raceway"";","SELECT date FROM table_name_40 WHERE team = ""holden racing team"" AND circuit = ""eastern creek raceway"";",1 What is the archive of the show that aired on 18april1970?,"CREATE TABLE table_2102898_1 (archive VARCHAR, broadcast_date VARCHAR);","SELECT archive FROM table_2102898_1 WHERE broadcast_date = ""18April1970"";","SELECT archive FROM table_2102898_1 WHERE broadcast_date = ""18 April1970"";",0 What is the flange thickness (mm) for the weight (kg/m) 6.0?Wg,"CREATE TABLE table_2071644_1 (flange_thickness__mm_ VARCHAR, weight__kg_m_ VARCHAR);","SELECT flange_thickness__mm_ FROM table_2071644_1 WHERE weight__kg_m_ = ""6.0"";","SELECT flange_thickness__mm_ FROM table_2071644_1 WHERE weight__kg_m_ = ""6.0?Wg"";",0 What duration is listed for Christian de la Fuente?,"CREATE TABLE table_11210576_3 (duration VARCHAR, actor VARCHAR);","SELECT duration FROM table_11210576_3 WHERE actor = ""Christian de la Fuente"";","SELECT duration FROM table_11210576_3 WHERE actor = ""Christian de la Fuente"";",1 How many visual artists are from African countries?,"CREATE TABLE artists (id INT, name TEXT, country TEXT); ","SELECT COUNT(*) FROM artists WHERE country IN ('Nigeria', 'Kenya', 'Somalia', 'Morocco', 'Senegal');",SELECT COUNT(*) FROM artists WHERE country IN (SELECT country FROM countries WHERE continent = 'Africa');,0 What is the earliest and latest launch year for space missions by each country in the space_missions table?,"CREATE TABLE space_missions (country VARCHAR(30), launch_year INT, mission_name VARCHAR(50)); ","SELECT country, MIN(launch_year) OVER (PARTITION BY country) AS min_launch_year, MAX(launch_year) OVER (PARTITION BY country) AS max_launch_year FROM space_missions;","SELECT country, MIN(launch_year) as earliest_launch_year, MAX(launch_year) as latest_launch_year FROM space_missions GROUP BY country;",0 What is the maximum transaction amount for each customer?,"CREATE TABLE customers (customer_id INT, name VARCHAR(50)); CREATE TABLE transactions (transaction_id INT, customer_id INT, amount DECIMAL(10, 2)); ","SELECT c.name, MAX(t.amount) FROM customers c INNER JOIN transactions t ON c.customer_id = t.customer_id GROUP BY c.name;","SELECT c.name, MAX(t.amount) as max_amount FROM customers c JOIN transactions t ON c.customer_id = t.customer_id GROUP BY c.name;",0 Which customer had the highest number of shipments in the first half of 2021?,"CREATE TABLE customers (customer_id VARCHAR(10), customer_name VARCHAR(20)); CREATE TABLE shipments (shipment_id INT, customer_id VARCHAR(10), shipment_date DATE); ","SELECT customer_id, COUNT(shipment_id) AS count FROM shipments WHERE shipment_date BETWEEN '2021-01-01' AND '2021-06-30' GROUP BY customer_id ORDER BY count DESC LIMIT 1;","SELECT c.customer_name, COUNT(s.shipment_id) as num_shipments FROM customers c JOIN shipments s ON c.customer_id = s.customer_id WHERE s.shipment_date BETWEEN '2021-01-01' AND '2021-06-30' GROUP BY c.customer_name ORDER BY num_shipments DESC LIMIT 1;",0 What is the total quantity of textiles sourced from India?,"CREATE TABLE textile_sourcing (textile_id INTEGER, material TEXT, country TEXT, quantity INTEGER); ",SELECT SUM(quantity) FROM textile_sourcing WHERE country = 'India';,SELECT SUM(quantity) FROM textile_sourcing WHERE country = 'India';,1 Which clinical trials were conducted by 'PharmaA' in 'RegionN' in 2022?,"CREATE TABLE clinical_trials(company varchar(20), region varchar(20), year int, trial varchar(20)); ",SELECT DISTINCT trial FROM clinical_trials WHERE company = 'PharmaA' AND region = 'RegionN' AND year = 2022;,SELECT trial FROM clinical_trials WHERE company = 'PharmaA' AND region = 'RegionN' AND year = 2022;,0 What is the Score when Deportes Savio is the Home team?,"CREATE TABLE table_name_99 (score VARCHAR, home VARCHAR);","SELECT score FROM table_name_99 WHERE home = ""deportes savio"";","SELECT score FROM table_name_99 WHERE home = ""deportes savio"";",1 What is the percentage of articles about technology and science written by female authors?,"CREATE TABLE articles (id INT, title VARCHAR(50), category VARCHAR(20), author_id INT); CREATE TABLE authors (id INT, name VARCHAR(50), gender VARCHAR(10)); ","SELECT (COUNT(articles.id) * 100.0 / (SELECT COUNT(*) FROM articles)) AS percentage FROM articles INNER JOIN authors ON articles.author_id = authors.id WHERE articles.category IN ('technology', 'science') AND authors.gender = 'female';","SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM articles WHERE category IN ('Technology', 'Science') AND gender = 'Female')) AS percentage FROM articles WHERE category IN ('Science', 'Technology') AND author_id IN (SELECT author_id FROM authors WHERE gender = 'Female');",0 What is the total revenue for each restaurant category in the past month?,"CREATE SCHEMA FoodService;CREATE TABLE Transactions (transaction_id INT, restaurant_id INT, transaction_date DATE, revenue FLOAT); ","SELECT category, SUM(revenue) as total_revenue FROM Transactions JOIN Restaurants ON Transactions.restaurant_id = Restaurants.restaurant_id WHERE transaction_date >= '2021-08-01' GROUP BY category;","SELECT restaurant_id, SUM(revenue) as total_revenue FROM FoodService.Transactions WHERE transaction_date >= DATEADD(month, -1, GETDATE()) GROUP BY restaurant_id;",0 The firs park stadium had the lowest average attendence of what?,"CREATE TABLE table_11206916_1 (average INTEGER, stadium VARCHAR);","SELECT MIN(average) FROM table_11206916_1 WHERE stadium = ""Firs Park"";","SELECT MIN(average) FROM table_11206916_1 WHERE stadium = ""Firs Park"";",1 "what is the monotone when pareto efficiency is yes, non-dictatorship is yes, and clone independence is yes?","CREATE TABLE table_name_41 (monotone VARCHAR, clone_independence VARCHAR, pareto_efficiency VARCHAR, non_dictatorship VARCHAR);","SELECT monotone FROM table_name_41 WHERE pareto_efficiency = ""yes"" AND non_dictatorship = ""yes"" AND clone_independence = ""yes"";","SELECT monotone FROM table_name_41 WHERE pareto_efficiency = ""yes"" AND non_dictatorship = ""yes"" AND clone_independence = ""yes"";",1 What is the number of products with natural ingredients by subcategory in Q2 of 2022?,"CREATE TABLE products (product_id INT, product_name VARCHAR(100), category VARCHAR(50), subcategory VARCHAR(50), natural_ingredients BOOLEAN, sale_date DATE); ","SELECT subcategory, COUNT(*) FILTER (WHERE natural_ingredients = true) AS number_of_products_with_natural_ingredients FROM products WHERE category = 'Cosmetics' AND EXTRACT(QUARTER FROM sale_date) = 2 GROUP BY subcategory;","SELECT subcategory, COUNT(*) FROM products WHERE natural_ingredients = TRUE AND sale_date BETWEEN '2022-04-01' AND '2022-06-30' GROUP BY subcategory;",0 What is the Game on May 24 with Road Team Seattle?,"CREATE TABLE table_name_76 (game VARCHAR, road_team VARCHAR, date VARCHAR);","SELECT game FROM table_name_76 WHERE road_team = ""seattle"" AND date = ""may 24"";","SELECT game FROM table_name_76 WHERE road_team = ""seattle"" AND date = ""may 24"";",1 Which country has the score 70-76-68-214?,"CREATE TABLE table_name_71 (country VARCHAR, score VARCHAR);","SELECT country FROM table_name_71 WHERE score = ""70-76-68-214"";",SELECT country FROM table_name_71 WHERE score = 70 - 76 - 68 - 214;,0 Name the circuit for #47 orbit racing ,"CREATE TABLE table_19598014_2 (circuit VARCHAR, challenge_winning_team VARCHAR);","SELECT circuit FROM table_19598014_2 WHERE challenge_winning_team = ""#47 Orbit Racing"";","SELECT circuit FROM table_19598014_2 WHERE challenge_winning_team = ""#47 Orbit Racing"";",1 How many professionals have performed any treatment to dogs?,CREATE TABLE Treatments (professional_id VARCHAR);,SELECT COUNT(DISTINCT professional_id) FROM Treatments;,SELECT COUNT(*) FROM Treatments WHERE professional_id = 1;,0 What is the total distance traveled by shared electric bicycles in Paris in the past month?,"CREATE TABLE shared_bicycles (bicycle_id INT, ride_start_time TIMESTAMP, ride_end_time TIMESTAMP, start_location TEXT, end_location TEXT, distance FLOAT);",SELECT SUM(distance) FROM shared_bicycles WHERE start_location LIKE 'Paris%' AND vehicle_type = 'Electric Bicycle' AND ride_start_time >= NOW() - INTERVAL '1 month';,"SELECT SUM(distance) FROM shared_bicycles WHERE start_location = 'Paris' AND end_location = 'Paris' AND ride_start_time >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH);",0 What is the No. 6 of the person with a No. 10 of Joshua and a No. 8 of Andrew?,"CREATE TABLE table_name_56 (no_6 VARCHAR, no_10 VARCHAR, no_8 VARCHAR);","SELECT no_6 FROM table_name_56 WHERE no_10 = ""joshua"" AND no_8 = ""andrew"";","SELECT no_6 FROM table_name_56 WHERE no_10 = ""joshua"" AND no_8 = ""andrew"";",1 What is the average donation amount per donor from 'country_of_origin' France?,"CREATE TABLE donor (donor_id INT, name VARCHAR(100), country_of_origin VARCHAR(50)); CREATE TABLE donation (donation_id INT, donor_id INT, amount DECIMAL(10,2)); ",SELECT AVG(d.amount) FROM donation d JOIN donor don ON d.donor_id = don.donor_id WHERE don.country_of_origin = 'France';,SELECT AVG(donation.amount) FROM donation INNER JOIN donor ON donation.donor_id = donor.donor_id WHERE donor.country_of_origin = 'France';,0 "Add new records of intelligence operations in a specific year to the ""intelligence_ops"" table","CREATE TABLE intelligence_ops (id INT, year INT, location VARCHAR(255), type VARCHAR(255), result VARCHAR(255));","INSERT INTO intelligence_ops (id, year, location, type, result) VALUES (1, 2015, 'Russia', 'Surveillance', 'Success'), (2, 2015, 'Germany', 'Infiltration', 'Failure');","INSERT INTO intelligence_ops (id, year, location, type, result) VALUES (1, 'Intelligence Operations', 'Intelligence Operations', 'Intelligence', 'Result');",0 What is the Theme of the coin with an Issue Price of $89.95?,"CREATE TABLE table_name_95 (theme VARCHAR, issue_price VARCHAR);","SELECT theme FROM table_name_95 WHERE issue_price = ""$89.95"";","SELECT theme FROM table_name_95 WHERE issue_price = ""$89.95"";",1 List all animals that have not been assigned to an education program.,"CREATE TABLE animals (id INT PRIMARY KEY, name VARCHAR(50), species VARCHAR(50), population INT); CREATE TABLE education_programs (id INT PRIMARY KEY, name VARCHAR(50), animal_id INT, coordinator VARCHAR(50));","SELECT animals.name, animals.species FROM animals LEFT JOIN education_programs ON animals.id = education_programs.animal_id WHERE education_programs.animal_id IS NULL;",SELECT animals.name FROM animals INNER JOIN education_programs ON animals.id = education_programs.animal_id WHERE education_programs.id IS NULL;,0 What is the type where the name is bojan?,"CREATE TABLE table_11891841_2 (type VARCHAR, name VARCHAR);","SELECT type FROM table_11891841_2 WHERE name = ""Bojan"";","SELECT type FROM table_11891841_2 WHERE name = ""Bojan"";",1 Update the team name for the given team id,"CREATE TABLE teams (id INT, name VARCHAR(50), sport VARCHAR(50)); ",UPDATE teams SET name = 'New York Red Bulls' WHERE id = 1;,UPDATE teams SET name = 'Teachers' WHERE id = 1;,0 What was a penalty given for at time 29:17?,"CREATE TABLE table_name_89 (penalty VARCHAR, time VARCHAR);","SELECT penalty FROM table_name_89 WHERE time = ""29:17"";","SELECT penalty FROM table_name_89 WHERE time = ""29:17"";",1 What is the total funding received by biotech startups in Africa?,"USE biotech; CREATE TABLE if not exists startups (id INT, name VARCHAR(255), location VARCHAR(255), funding DECIMAL(10,2)); ","SELECT SUM(funding) FROM startups WHERE location IN ('Nigeria', 'South Africa', 'Egypt');",SELECT SUM(funding) FROM biotech.startups WHERE location = 'Africa';,0 Show me the names and locations of all military bases located in 'north_africa' schema,"CREATE SCHEMA if not exists north_africa; USE north_africa; CREATE TABLE if not exists military_bases (id INT, name VARCHAR(255), type VARCHAR(255), location VARCHAR(255)); ","SELECT name, location FROM north_africa.military_bases;","SELECT name, location FROM north_africa.military_bases;",1 Which users have posted on consecutive days?,"CREATE TABLE posts (id INT, user_id INT, post_date DATE); ","SELECT user_id FROM (SELECT user_id, post_date, DATEDIFF(day, LAG(post_date) OVER (PARTITION BY user_id ORDER BY post_date), post_date) AS gap FROM posts) AS t WHERE gap = 1 GROUP BY user_id;","SELECT user_id FROM posts WHERE post_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 DAY) AND CURRENT_DATE;",0 Which Qualifying score had hoop as an apparatus?,"CREATE TABLE table_name_94 (score_qualifying VARCHAR, apparatus VARCHAR);","SELECT score_qualifying FROM table_name_94 WHERE apparatus = ""hoop"";","SELECT score_qualifying FROM table_name_94 WHERE apparatus = ""hoop"";",1 What is the average funding amount received by female founders in the Healthcare industry?,"CREATE TABLE Founders (id INT, name TEXT, gender TEXT, industry TEXT); ",SELECT AVG(InvestmentRounds.funding_amount) FROM Founders JOIN InvestmentRounds ON Founders.id = InvestmentRounds.founder_id WHERE Founders.gender = 'Female' AND Founders.industry = 'Healthcare';,SELECT AVG(funding_amount) FROM Founders WHERE gender = 'Female' AND industry = 'Healthcare';,0 What is the most points when the goals against are 354 and games less than 82?,"CREATE TABLE table_name_49 (points INTEGER, goals_against VARCHAR, games VARCHAR);",SELECT MAX(points) FROM table_name_49 WHERE goals_against = 354 AND games < 82;,SELECT MAX(points) FROM table_name_49 WHERE goals_against = 354 AND games 82;,0 "What is the total number of public works projects completed in the city of London, United Kingdom between 2016 and 2020?","CREATE TABLE PublicWorksProjects (id INT, city VARCHAR(50), country VARCHAR(50), completion_year INT);",SELECT COUNT(*) FROM PublicWorksProjects WHERE city = 'London' AND country = 'United Kingdom' AND completion_year BETWEEN 2016 AND 2020;,SELECT COUNT(*) FROM PublicWorksProjects WHERE city = 'London' AND country = 'United Kingdom' AND completion_year BETWEEN 2016 AND 2020;,1 How many weeks in total were games played at Cleveland Browns Stadium?,"CREATE TABLE table_name_81 (week VARCHAR, stadium VARCHAR);","SELECT COUNT(week) FROM table_name_81 WHERE stadium = ""cleveland browns stadium"";","SELECT COUNT(week) FROM table_name_81 WHERE stadium = ""cleveland browns stadium"";",1 What is the total number of open pedagogy projects per institution that have been completed after 2020?,"CREATE TABLE projects (project_id INT, institution_id INT, completion_date DATE, project_type VARCHAR);","SELECT institution_id, COUNT(project_id) as total_projects FROM projects WHERE completion_date > '2020-01-01' AND project_type = 'open pedagogy' GROUP BY institution_id;","SELECT institution_id, COUNT(*) FROM projects WHERE completion_date > '2020-01-01' AND project_type = 'Open Pedagogy' GROUP BY institution_id;",0 What is in 2007 has 2004 olympic games?,CREATE TABLE table_name_16 (Id VARCHAR);,"SELECT 2007 FROM table_name_16 WHERE 2004 = ""olympic games"";","SELECT 2007 FROM table_name_16 WHERE 2004 = ""olympic games"";",1 What is the total investment in assistive technology in South America?,"CREATE TABLE assistive_tech_investment (region VARCHAR(20), investment DECIMAL(10,2)); ",SELECT SUM(investment) as total_investment FROM assistive_tech_investment WHERE region = 'South America';,SELECT SUM(investment) FROM assistive_tech_investment WHERE region = 'South America';,0 Which home team competed against the away team Geelong?,"CREATE TABLE table_name_16 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_16 WHERE away_team = ""geelong"";","SELECT home_team FROM table_name_16 WHERE away_team = ""geelong"";",1 How many companies were founded in Canada?,"CREATE TABLE company (id INT, name VARCHAR(50), country VARCHAR(50)); ",SELECT COUNT(*) AS num_companies FROM company WHERE country = 'Canada';,SELECT COUNT(*) FROM company WHERE country = 'Canada';,0 What was the average donation amount in Q2 2020 for donors in the UK?,"CREATE TABLE donations (id INT, donor INT, donation FLOAT, donation_date DATE); ",SELECT AVG(donation) FROM donations WHERE EXTRACT(MONTH FROM donation_date) BETWEEN 4 AND 6 AND EXTRACT(YEAR FROM donation_date) = 2020 AND country = 'UK';,SELECT AVG(donation) FROM donations WHERE donation_date BETWEEN '2020-04-01' AND '2020-03-31' AND donor IN (SELECT donor FROM donors WHERE country = 'UK');,0 What genre is the song recorded in 1929?,"CREATE TABLE table_name_26 (genre VARCHAR, year_recorded VARCHAR);","SELECT genre FROM table_name_26 WHERE year_recorded = ""1929"";","SELECT genre FROM table_name_26 WHERE year_recorded = ""1929"";",1 "What is the average size, in hectares, of community development initiatives in Kenya that were completed after 2015?","CREATE TABLE community_development_initiatives (id INT, country VARCHAR(255), size_ha FLOAT, completion_date DATE); ",SELECT AVG(size_ha) FROM community_development_initiatives WHERE country = 'Kenya' AND completion_date >= '2015-01-01';,SELECT AVG(size_ha) FROM community_development_initiatives WHERE country = 'Kenya' AND completion_date > '2015-01-01';,0 Who was the artist with a start date of 1966-10-23?,"CREATE TABLE table_2560677_1 (artist_s_ VARCHAR, start_date VARCHAR);","SELECT artist_s_ FROM table_2560677_1 WHERE start_date = ""1966-10-23"";","SELECT artist_s_ FROM table_2560677_1 WHERE start_date = ""1966-10-23"";",1 "In 2008, what was the world ranking that ranked 5th in L.A.?","CREATE TABLE table_name_54 (world_ranking__1_ VARCHAR, ranking_la__2_ VARCHAR, year_of_publication VARCHAR);","SELECT world_ranking__1_ FROM table_name_54 WHERE ranking_la__2_ = ""5th"" AND year_of_publication = ""2008"";","SELECT world_ranking__1_ FROM table_name_54 WHERE ranking_la__2_ = ""5th"" AND year_of_publication = ""2008"";",1 What is the total revenue for the Pop genre in 2021?,"CREATE TABLE music_sales (sale_id INT, genre VARCHAR(10), year INT, revenue FLOAT); CREATE VIEW genre_sales AS SELECT genre, SUM(revenue) as total_revenue FROM music_sales GROUP BY genre;",SELECT total_revenue FROM genre_sales WHERE genre = 'Pop';,SELECT SUM(total_revenue) FROM genre_sales WHERE genre = 'Pop' AND year = 2021;,0 what is the location when the record is 5-1-1?,"CREATE TABLE table_name_90 (location VARCHAR, record VARCHAR);","SELECT location FROM table_name_90 WHERE record = ""5-1-1"";","SELECT location FROM table_name_90 WHERE record = ""5-1-1"";",1 Find the combined capacity (in MW) of geothermal and wind projects in the world,"CREATE TABLE project (id INT, name TEXT, country TEXT, type TEXT, capacity INT); ",SELECT SUM(capacity) FROM project WHERE (type = 'Geothermal' OR type = 'Wind');,"SELECT SUM(capacity) FROM project WHERE type IN ('Geothermal', 'Wind');",0 What is the average cost of clinical trials per drug that were approved by the FDA in 2020?,"CREATE TABLE clinical_trials (drug_name VARCHAR(255), trial_cost FLOAT, approval_year INT, primary_sponsor VARCHAR(255)); ",SELECT AVG(trial_cost) FROM clinical_trials WHERE approval_year = 2020;,SELECT AVG(trial_cost) FROM clinical_trials WHERE approval_year = 2020 AND primary_sponsor = 'FDA';,0 "What is the average maintenance cost per aircraft type, ordered by the highest average cost?","CREATE TABLE Aircraft (Type VARCHAR(50), Cost FLOAT); ","SELECT Type, AVG(Cost) as Avg_Cost FROM Aircraft GROUP BY Type ORDER BY Avg_Cost DESC;","SELECT Type, AVG(Cost) as Avg_Cost FROM Aircraft GROUP BY Type ORDER BY Avg_Cost DESC;",1 What is the maximum speed of spacecraft by country in the space_exploration_by_country table?,"CREATE TABLE space_exploration_by_country (id INT, country VARCHAR(30), name VARCHAR(50), launch_date DATE, max_speed FLOAT); ","SELECT country, MAX(max_speed) FROM space_exploration_by_country GROUP BY country;","SELECT country, MAX(max_speed) FROM space_exploration_by_country GROUP BY country;",1 Insert a new record into the sustainability table for 'Organic' with a rating of 5,"CREATE TABLE sustainability (sustainability_id INT, initiative VARCHAR(50), rating INT); ","INSERT INTO sustainability (sustainability_id, initiative, rating) VALUES (3, 'Organic', 5);","INSERT INTO sustainability (initiative, rating) VALUES ('Organic', 5);",0 What is the total for the week in the game against the Chicago Bears,"CREATE TABLE table_name_38 (week VARCHAR, opponent VARCHAR);","SELECT COUNT(week) FROM table_name_38 WHERE opponent = ""chicago bears"";","SELECT COUNT(week) FROM table_name_38 WHERE opponent = ""chicago bears"";",1 What is the average delivery time for products sourced from Fair Trade suppliers?,"CREATE TABLE Suppliers (SupplierID int, SupplierName varchar(255), IsFairTrade boolean); CREATE TABLE Orders (OrderID int, SupplierID int, DeliveryTime int);",SELECT AVG(DeliveryTime) FROM Orders WHERE SupplierID IN (SELECT SupplierID FROM Suppliers WHERE IsFairTrade = true);,SELECT AVG(DeliveryTime) FROM Orders JOIN Suppliers ON Orders.SupplierID = Suppliers.SupplierID WHERE Suppliers.IsFairTrade = true;,0 "List the programs that have had the most volunteers over the past 12 months, excluding the 'Food Bank' program?","CREATE TABLE Programs (id INT, program_name VARCHAR(255)); CREATE TABLE Volunteers (id INT, volunteer_name VARCHAR(255), program VARCHAR(255), volunteer_date DATE); ","SELECT program_name, COUNT(*) as total_volunteers FROM Programs p INNER JOIN Volunteers v ON p.program_name = v.program WHERE program_name != 'Food Bank' AND volunteer_date >= DATE_SUB(CURDATE(), INTERVAL 12 MONTH) GROUP BY program_name ORDER BY total_volunteers DESC LIMIT 1;","SELECT p.program_name, COUNT(v.id) as num_volunteers FROM Programs p JOIN Volunteers v ON p.id = v.program WHERE v.volunteer_date >= DATEADD(month, -12, GETDATE()) GROUP BY p.program_name ORDER BY num_volunteers DESC LIMIT 1;",0 What was the highest peak position for the album one of the boys?,"CREATE TABLE table_name_48 (peak_position INTEGER, album VARCHAR);","SELECT MAX(peak_position) FROM table_name_48 WHERE album = ""one of the boys"";","SELECT MAX(peak_position) FROM table_name_48 WHERE album = ""one of the boys"";",1 Which artists have their works exhibited in both 'Modern Art Gallery' and 'Contemporary Art Museum'?,"CREATE TABLE ModernArtGallery (artist_id INT, artist_name VARCHAR(255)); CREATE TABLE ContemporaryArtMuseum (artist_id INT, artist_name VARCHAR(255)); ",SELECT artist_name FROM ModernArtGallery WHERE artist_id IN (SELECT artist_id FROM ContemporaryArtMuseum),SELECT artist_name FROM ModernArtGallery INNER JOIN ContemporaryArtMuseum ON ModernArtGallery.artist_id = ContemporaryArtMuseum.artist_id;,0 What is the average mental health score of students in each district with more than 500 students?,"CREATE TABLE districts (id INT, district_name TEXT, num_students INT, avg_mental_health_score FLOAT); ","SELECT district_name, AVG(avg_mental_health_score) as avg_score FROM districts GROUP BY district_name HAVING num_students > 500;","SELECT district_name, AVG(avg_mental_health_score) FROM districts WHERE num_students > 500 GROUP BY district_name;",0 "What percentage of employees identify as members of the Latinx community, by job category?","CREATE TABLE EmployeeDemographics (EmployeeID INT, JobCategory VARCHAR(50), Ethnicity VARCHAR(50));","SELECT JobCategory, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM EmployeeDemographics WHERE Ethnicity = 'Latinx') as Percentage_Latinx FROM EmployeeDemographics WHERE Ethnicity = 'Latinx' GROUP BY JobCategory;","SELECT JobCategory, (COUNT(*) FILTER (WHERE Ethnicity = 'Latinx')) * 100.0 / COUNT(*) FROM EmployeeDemographics GROUP BY JobCategory;",0 What is the average depth of all marine protected areas (MPAs) that are deeper than 1000 meters?,"CREATE TABLE mpa (id INT, name TEXT, depth FLOAT); ",SELECT AVG(depth) FROM mpa WHERE depth > 1000;,SELECT AVG(depth) FROM mpa WHERE depth > 1000;,1 Which 1st Member has an Election of 1895?,CREATE TABLE table_name_23 (election VARCHAR);,"SELECT 1 AS st_member FROM table_name_23 WHERE election = ""1895"";",SELECT 1 AS st_member FROM table_name_23 WHERE election = 1895;,0 What is the average funding received by startups founded by immigrants in the last 3 years?,"CREATE TABLE startups(id INT, name TEXT, founding_year INT, founder_immigrant TEXT, funding FLOAT); ",SELECT AVG(funding) FROM startups WHERE founder_immigrant = 'Yes' AND founding_year >= YEAR(CURRENT_DATE) - 3;,SELECT AVG(funding) FROM startups WHERE founder_immigrant = 'Immigrant' AND founding_year >= YEAR(CURRENT_DATE) - 3;,0 What is the average revenue per restaurant?,"CREATE TABLE restaurants (name TEXT, revenue FLOAT); ",SELECT AVG(revenue) FROM restaurants;,SELECT AVG(revenue) FROM restaurants;,1 "What was the data on November 3, if the data on January 15-16 is January 15, 2010?","CREATE TABLE table_25216791_3 (november_3 VARCHAR, january_15_16 VARCHAR);","SELECT november_3 FROM table_25216791_3 WHERE january_15_16 = ""January 15, 2010"";","SELECT november_3 FROM table_25216791_3 WHERE january_15_16 = ""January 15, 2010"";",1 What was the average number of data breaches per month in the finance sector in Australia in 2021?,"CREATE TABLE security_incidents (id INT, sector VARCHAR(255), incident_type VARCHAR(255), incident_count INT, occurrence_date DATE); ",SELECT AVG(incident_count/6.0) AS avg_breaches_per_month FROM security_incidents WHERE sector = 'Finance' AND incident_type = 'Data Breach' AND occurrence_date >= '2021-01-01' AND occurrence_date < '2022-01-01' AND region = 'Australia';,SELECT AVG(incident_count) FROM security_incidents WHERE sector = 'Finance' AND occurrence_date BETWEEN '2021-01-01' AND '2021-12-31';,0 "Display the number of cases handled by each attorney, grouped by their respective practice areas.","CREATE TABLE CaseHandling (CaseHandlingID INT, AttorneyID INT, PracticeArea VARCHAR(50)); ","SELECT p.PracticeArea, COUNT(ch.AttorneyID) AS NumberOfCases FROM CaseHandling ch JOIN Attorneys p ON ch.AttorneyID = p.AttorneyID GROUP BY p.PracticeArea;","SELECT AttorneyID, PracticeArea, COUNT(*) FROM CaseHandling GROUP BY AttorneyID, PracticeArea;",0 "In womens doubles and mens singles, what years did Arvind Bhat or Valiyaveetil Diju Jwala Gutta win?","CREATE TABLE table_12194021_1 (womens_doubles VARCHAR, mens_singles VARCHAR, mixed_doubles VARCHAR);","SELECT womens_doubles FROM table_12194021_1 WHERE mens_singles = ""Arvind Bhat"" AND mixed_doubles = ""Valiyaveetil Diju Jwala Gutta"";","SELECT womens_doubles FROM table_12194021_1 WHERE mens_singles = ""Arvind Bhat"" AND mixed_doubles = ""Valiyaveetil Diju Jwala Gutta"";",1 Who is the Prime Minister of Antoine Wehenkel?,"CREATE TABLE table_name_71 (Prime VARCHAR, minister VARCHAR);","SELECT Prime AS minister FROM table_name_71 WHERE minister = ""antoine wehenkel"";","SELECT Prime FROM table_name_71 WHERE minister = ""anjou wehenkel"";",0 "what's the time required for prices to double with highest monthly inflation rate being 29,500%","CREATE TABLE table_13681_2 (time_required_for_prices_to_double VARCHAR, highest_monthly_inflation_rate VARCHAR);","SELECT time_required_for_prices_to_double FROM table_13681_2 WHERE highest_monthly_inflation_rate = ""29,500%"";","SELECT time_required_for_prices_to_double FROM table_13681_2 WHERE highest_monthly_inflation_rate = ""29,500%"";",1 Tell me the season for quarter-final position of 4th,"CREATE TABLE table_name_97 (season VARCHAR, play_offs VARCHAR, pos VARCHAR);","SELECT season FROM table_name_97 WHERE play_offs = ""quarter-final"" AND pos = ""4th"";","SELECT season FROM table_name_97 WHERE play_offs = ""quarter-final"" AND pos = ""4th"";",1 where was the location that had game 19?,"CREATE TABLE table_27756314_7 (location_attendance VARCHAR, game VARCHAR);",SELECT location_attendance FROM table_27756314_7 WHERE game = 19;,SELECT location_attendance FROM table_27756314_7 WHERE game = 19;,1 "Rank larger than 5, and a Rider of paul shoesmith belongs to what team?","CREATE TABLE table_name_53 (team VARCHAR, rank VARCHAR, rider VARCHAR);","SELECT team FROM table_name_53 WHERE rank > 5 AND rider = ""paul shoesmith"";","SELECT team FROM table_name_53 WHERE rank > 5 AND rider = ""paul shoesmith"";",1 What Player Club Team is Indiana Ice (ushl)?,"CREATE TABLE table_name_10 (player VARCHAR, club_team VARCHAR);","SELECT player FROM table_name_10 WHERE club_team = ""indiana ice (ushl)"";","SELECT player FROM table_name_10 WHERE club_team = ""indiana ice (ushl)"";",1 How many community development initiatives were implemented in the 'communitydev' schema in indigenous communities before 2010?,"CREATE TABLE communitydev.initiatives (id INT, initiative_name VARCHAR(50), community_type VARCHAR(50), start_year INT); ",SELECT COUNT(*) FROM communitydev.initiatives WHERE community_type = 'Indigenous' AND start_year < 2010;,SELECT COUNT(*) FROM communitydev.initiatives WHERE community_type = 'Indigenous' AND start_year 2010;,0 Name the operator with berths more than 1 and depth of 12.5-15.5,"CREATE TABLE table_name_81 (operator VARCHAR, berths VARCHAR, depth__m_ VARCHAR);","SELECT operator FROM table_name_81 WHERE berths > 1 AND depth__m_ = ""12.5-15.5"";","SELECT operator FROM table_name_81 WHERE berths > 1 AND depth__m_ = ""12.5-15.5"";",1 "What is the highest Total Passengers when the annual change is 18.3%, and the rank is less than 11?","CREATE TABLE table_name_49 (total_passengers INTEGER, annual_change VARCHAR, rank VARCHAR);","SELECT MAX(total_passengers) FROM table_name_49 WHERE annual_change = ""18.3%"" AND rank < 11;","SELECT MAX(total_passengers) FROM table_name_49 WHERE annual_change = ""18.3%"" AND rank 11;",0 how many voted in the texas 6 section,"CREATE TABLE table_1341884_45 (first_elected VARCHAR, district VARCHAR);","SELECT first_elected FROM table_1341884_45 WHERE district = ""Texas 6"";","SELECT COUNT(first_elected) FROM table_1341884_45 WHERE district = ""Texas 6"";",0 "Which race did Alberto Ascari have both the Pole position and the win, but Luigi Villoresi set the fastest lap time?","CREATE TABLE table_name_4 (race VARCHAR, fastest_lap VARCHAR, pole_position VARCHAR, winning_driver VARCHAR);","SELECT race FROM table_name_4 WHERE pole_position = ""alberto ascari"" AND winning_driver = ""alberto ascari"" AND fastest_lap = ""luigi villoresi"";","SELECT race FROM table_name_4 WHERE pole_position = ""alberto ascari"" AND winning_driver = ""luci villoresi"" AND fastest_lap = ""luigi villoresi"";",0 Find the algorithm names with risk_level of 'low' in the ai_safety table,"CREATE TABLE ai_safety (algorithm TEXT, risk_level TEXT, dataset TEXT, last_updated TIMESTAMP);",SELECT algorithm FROM ai_safety WHERE risk_level = 'low';,SELECT algorithm FROM ai_safety WHERE risk_level = 'low';,1 What is the total budget for accessible technology projects in Africa?,"CREATE TABLE accessible_tech_projects (project_id INT, continent VARCHAR(10), budget DECIMAL(10,2)); ",SELECT SUM(budget) FROM accessible_tech_projects WHERE continent = 'Africa';,SELECT SUM(budget) FROM accessible_tech_projects WHERE continent = 'Africa';,1 Identify buildings with the lowest sustainability ratings,"CREATE TABLE green_buildings (id INT, name VARCHAR(50), location VARCHAR(50), area FLOAT, sustainability_rating INT);",SELECT name FROM green_buildings WHERE sustainability_rating = (SELECT MIN(sustainability_rating) FROM green_buildings);,"SELECT name, sustainability_rating FROM green_buildings ORDER BY sustainability_rating DESC LIMIT 1;",0 How many space missions were successful?,"CREATE TABLE SpaceMissions (ID INT, MissionName VARCHAR(50), Success BOOLEAN); ",SELECT COUNT(*) FROM SpaceMissions WHERE Success = true;,SELECT COUNT(*) FROM SpaceMissions WHERE Success = TRUE;,0 "What is the most recent mission for each astronaut, partitioned by gender?","CREATE TABLE Astronauts (id INT, name VARCHAR(50), age INT, gender VARCHAR(10), mission_id INT); CREATE TABLE Missions (id INT, name VARCHAR(50), launch_site VARCHAR(50), launch_date DATE);","SELECT a.name, m.name as mission_name, m.launch_date FROM Astronauts a JOIN Missions m ON a.mission_id = m.id JOIN (SELECT mission_id, gender, MAX(launch_date) AS MaxDate FROM Astronauts GROUP BY mission_id, gender) AS MaxDates ON a.mission_id = MaxDates.mission_id AND a.gender = MaxDates.gender AND m.launch_date = MaxDates.MaxDate ORDER BY a.gender, m.launch_date DESC;","SELECT a.name, a.gender, MAX(m.launch_date) as max_launch_date FROM Astronauts a JOIN Missions m ON a.mission_id = m.id GROUP BY a.name, a.gender;",0 What is the minimum price of organic products sold by suppliers in Germany?,"CREATE TABLE Suppliers (SupplierID INT, SupplierName TEXT, Country TEXT);CREATE TABLE Products (ProductID INT, ProductName TEXT, Price DECIMAL, Organic BOOLEAN, SupplierID INT); ",SELECT MIN(Price) FROM Products JOIN Suppliers ON Products.SupplierID = Suppliers.SupplierID WHERE Organic = true AND Country = 'Germany';,SELECT MIN(Price) FROM Products p JOIN Suppliers s ON p.SupplierID = s.SupplierID WHERE s.Country = 'Germany' AND p.Organic = true;,0 What is the total CO2 emissions in the textile industry for the bottom 3 countries with the least CO2 emissions?,"CREATE TABLE co2_emissions (country VARCHAR(50), industry_type VARCHAR(50), co2_emissions FLOAT); ","SELECT SUM(co2_emissions) FROM co2_emissions WHERE country IN ('Sweden', 'Norway', 'Denmark') ORDER BY co2_emissions ASC LIMIT 3;","SELECT country, SUM(co2_emissions) FROM co2_emissions WHERE industry_type = 'textile' GROUP BY country ORDER BY SUM(co2_emissions) DESC LIMIT 3;",0 Which mining operations have the highest and lowest water usage in the Western United States?,"CREATE TABLE MiningWaterUsage (Operation VARCHAR(50), Location VARCHAR(50), WaterUsage FLOAT); ","SELECT Operation, WaterUsage FROM MiningWaterUsage WHERE Location = 'Western US' ORDER BY WaterUsage DESC LIMIT 1; SELECT Operation, WaterUsage FROM MiningWaterUsage WHERE Location = 'Western US' ORDER BY WaterUsage ASC LIMIT 1;","SELECT Operation, WaterUsage FROM MiningWaterUsage WHERE Location = 'Western United States' ORDER BY WaterUsage DESC LIMIT 1;",0 The ship SSBergensfjord built before 1973 has what tonnage?,"CREATE TABLE table_name_90 (tonnage VARCHAR, built VARCHAR, ship VARCHAR);","SELECT tonnage FROM table_name_90 WHERE built < 1973 AND ship = ""ssbergensfjord"";","SELECT tonnage FROM table_name_90 WHERE built 1973 AND ship = ""ssbergensfjord"";",0 Which name has a percentage of 0.59%?,"CREATE TABLE table_name_28 (name VARCHAR, percentage VARCHAR);","SELECT name FROM table_name_28 WHERE percentage = ""0.59%"";","SELECT name FROM table_name_28 WHERE percentage = ""0.59%"";",1 Identify the top 3 games with the most number of unique players in the last 6 months.,"CREATE TABLE GameSessions (PlayerID INT, GameID INT, SessionDuration FLOAT, SessionDate DATE); ","SELECT GameID, COUNT(DISTINCT PlayerID) as PlayerCount, RANK() OVER (ORDER BY COUNT(DISTINCT PlayerID) DESC) as Rank FROM GameSessions WHERE SessionDate BETWEEN DATEADD(month, -6, CURRENT_DATE) AND CURRENT_DATE GROUP BY GameID HAVING Rank <= 3;","SELECT GameID, COUNT(DISTINCT PlayerID) as UniquePlayers FROM GameSessions WHERE SessionDate >= DATEADD(month, -6, GETDATE()) GROUP BY GameID ORDER BY UniquePlayers DESC LIMIT 3;",0 What is the total number of police stations in CityM?,"CREATE TABLE police_stations_2 (id INT, city VARCHAR(50), station_count INT); ",SELECT station_count FROM police_stations_2 WHERE city = 'CityM';,SELECT SUM(station_count) FROM police_stations_2 WHERE city = 'CityM';,0 What is the minimum pollution level recorded for marine life research by species?,"CREATE SCHEMA oceans;CREATE TABLE oceans.marine_life_pollution (id INT PRIMARY KEY, species VARCHAR(50), pollution_level INT); ","SELECT context.species, MIN(context.pollution_level) FROM oceans.marine_life_pollution AS context GROUP BY context.species;","SELECT species, MIN(pollution_level) FROM oceans.marine_life_pollution GROUP BY species;",0 "What is the average funding amount for companies in the technology sector, excluding companies founded before 2010?","CREATE TABLE companies (id INT, name TEXT, industry TEXT, founding_date DATE, funding_amount INT); ",SELECT AVG(funding_amount) FROM companies WHERE industry = 'Technology' AND founding_date > '2010-01-01';,SELECT AVG(funding_amount) FROM companies WHERE industry = 'Technology' AND founding_date '2010-01-01';,0 What team defeated the Capital City Giants?,"CREATE TABLE table_name_11 (team VARCHAR, runner_up VARCHAR);","SELECT team FROM table_name_11 WHERE runner_up = ""capital city giants"";","SELECT team FROM table_name_11 WHERE runner_up = ""capital city giants"";",1 What is the largest ethnic group (2002) when cyrillic name is брестач?,"CREATE TABLE table_2562572_52 (largest_ethnic_group__2002_ VARCHAR, cyrillic_name VARCHAR);","SELECT largest_ethnic_group__2002_ FROM table_2562572_52 WHERE cyrillic_name = ""Брестач"";","SELECT largest_ethnic_group__2002_ FROM table_2562572_52 WHERE cyrillic_name = ""реста"";",0 What was the total amount of microloans issued to female farmers in Nigeria in 2020?,"CREATE TABLE microloans (id INT, farmer_id INT, country VARCHAR(50), amount DECIMAL(10,2), issue_date DATE); ",SELECT SUM(amount) FROM microloans WHERE country = 'Nigeria' AND issue_date >= '2020-01-01' AND issue_date <= '2020-12-31' AND gender = 'female';,SELECT SUM(amount) FROM microloans WHERE country = 'Nigeria' AND issue_date BETWEEN '2020-01-01' AND '2020-12-31' AND farmer_id IN (SELECT id FROM farmers WHERE gender = 'Female');,0 What is the party affiliation of the incumbent Robert Cramer?,"CREATE TABLE table_1805191_2 (party VARCHAR, incumbent VARCHAR);","SELECT party FROM table_1805191_2 WHERE incumbent = ""Robert Cramer"";","SELECT party FROM table_1805191_2 WHERE incumbent = ""Robert Cramer"";",1 List all news stories from the 'news_stories' table that were published after the hire date of the reporter with the 'reporter_id' of 3.,"CREATE TABLE news_stories (story_id INT, title VARCHAR(100), description TEXT, reporter_id INT, publish_date DATE); CREATE TABLE news_reporters (reporter_id INT, name VARCHAR(50), age INT, gender VARCHAR(10), hire_date DATE);",SELECT news_stories.title FROM news_stories INNER JOIN news_reporters ON news_stories.reporter_id = news_reporters.reporter_id WHERE news_stories.publish_date > news_reporters.hire_date AND news_reporters.reporter_id = 3;,SELECT * FROM news_stories JOIN news_reporters ON news_stories.reporter_id = news_reporters.reporter_id WHERE news_stories.publish_date > (SELECT publish_date FROM news_stories WHERE reporter_id = 3);,0 What is the average fuel consumption per day for container vessels in the Atlantic Ocean?,"CREATE TABLE vessel_fuel_consumption ( id INT, vessel_id INT, vessel_type VARCHAR(255), fuel_consumption_l_per_day INT, ocean VARCHAR(255) ); ","SELECT vessel_type, AVG(fuel_consumption_l_per_day) as avg_fuel_consumption FROM vessel_fuel_consumption WHERE ocean = 'Atlantic' AND vessel_type = 'Container' GROUP BY vessel_type;",SELECT AVG(fuel_consumption_l_per_day) FROM vessel_fuel_consumption WHERE vessel_type = 'Container' AND ocean = 'Atlantic';,0 List all continents and the number of animal species they have in the 'habitat_preservation' table,"CREATE TABLE habitat_preservation (id INT, animal_species VARCHAR(50), population INT, continent VARCHAR(50)); ","SELECT continent, COUNT(DISTINCT animal_species) FROM habitat_preservation GROUP BY continent;","SELECT continent, COUNT(*) FROM habitat_preservation GROUP BY continent;",0 When 102 is the number in series who is the director?,"CREATE TABLE table_2468961_6 (directed_by VARCHAR, no_in_series VARCHAR);",SELECT directed_by FROM table_2468961_6 WHERE no_in_series = 102;,SELECT directed_by FROM table_2468961_6 WHERE no_in_series = 102;,1 What is the total number of purchases made by players from 'India' in the 'Role-playing' genre?,"CREATE TABLE Purchases (PurchaseID INT, PlayerID INT, GameID INT, PurchaseDate DATE, Price DECIMAL(5, 2)); CREATE TABLE GameGenres (GameID INT, Genre VARCHAR(20)); CREATE TABLE Players (PlayerID INT, Country VARCHAR(20)); ",SELECT COUNT(*) FROM Purchases INNER JOIN GameGenres ON Purchases.GameID = GameGenres.GameID INNER JOIN Players ON Purchases.PlayerID = Players.PlayerID WHERE Players.Country = 'India' AND GameGenres.Genre = 'Role-playing';,SELECT COUNT(*) FROM Purchases JOIN GameGenres ON Purchases.GameID = GameGenres.GameID JOIN Players ON Purchases.PlayerID = Players.PlayerID WHERE Players.Country = 'India' AND GameGenres.Genre = 'Role-playing';,0 What is the average population size for each animal species in the wetlands?,"CREATE TABLE habitat (id INT, type VARCHAR(50), animals INT, species VARCHAR(50)); ","SELECT species, AVG(animals) FROM habitat WHERE type = 'Wetlands' GROUP BY species;","SELECT species, AVG(population) as avg_population FROM habitat WHERE type = 'Wetland' GROUP BY species;",0 "What is the distribution of fish species in aquaculture sites, ranked by the most common species?","CREATE TABLE fish_species (site_id INT, species VARCHAR(50), quantity INT); ","SELECT species, COUNT(*) AS species_count, RANK() OVER (ORDER BY COUNT(*) DESC) AS species_rank FROM fish_species GROUP BY species;","SELECT species, COUNT(*) as count FROM fish_species GROUP BY species ORDER BY count DESC;",0 What is the geo ID for the township with 0.771 square miles of water?,"CREATE TABLE table_18600760_10 (geo_id INTEGER, water__sqmi_ VARCHAR);","SELECT MAX(geo_id) FROM table_18600760_10 WHERE water__sqmi_ = ""0.771"";","SELECT MAX(geo_id) FROM table_18600760_10 WHERE water__sqmi_ = ""0.771"";",1 What is the highest value for SF round for the country of England?,"CREATE TABLE table_23293785_2 (sf_round INTEGER, country VARCHAR);","SELECT MAX(sf_round) FROM table_23293785_2 WHERE country = ""England"";","SELECT MAX(sf_round) FROM table_23293785_2 WHERE country = ""England"";",1 Name the date for week more than 1 and game site of bye,"CREATE TABLE table_name_99 (date VARCHAR, game_site VARCHAR, week VARCHAR);","SELECT date FROM table_name_99 WHERE game_site = ""bye"" AND week > 1;","SELECT date FROM table_name_99 WHERE game_site = ""bye"" AND week > 1;",1 Who was the opposing team when the status is second test?,"CREATE TABLE table_name_76 (opposing_teams VARCHAR, status VARCHAR);","SELECT opposing_teams FROM table_name_76 WHERE status = ""second test"";","SELECT opposing_teams FROM table_name_76 WHERE status = ""second test"";",1 "What is the total funding received by biotech startups in Indonesia, Thailand, and Malaysia?","CREATE SCHEMA if not exists biotech; CREATE TABLE if not exists biotech.startups (id INT, name VARCHAR(50), location VARCHAR(50), funding DECIMAL(10, 2)); ","SELECT SUM(funding) FROM biotech.startups WHERE location IN ('Indonesia', 'Thailand', 'Malaysia');","SELECT SUM(funding) FROM biotech.startups WHERE location IN ('Indonesia', 'Thailand', 'Malaysia');",1 "With 8 as the rank, and a total of more than 2 medals what is the average bronze medals?","CREATE TABLE table_name_34 (bronze INTEGER, rank VARCHAR, total VARCHAR);","SELECT AVG(bronze) FROM table_name_34 WHERE rank = ""8"" AND total > 2;",SELECT AVG(bronze) FROM table_name_34 WHERE rank = 8 AND total > 2;,0 What is the maximum amount donated by a donor in the super_donors view?,"CREATE VIEW super_donors AS SELECT id, name, organization, SUM(amount) AS total_donation FROM donors GROUP BY id;",SELECT MAX(total_donation) FROM super_donors;,SELECT MAX(total_donation) FROM super_donors;,1 How many concerts were sold out in 'Summer Nights' concert series?,"CREATE TABLE concerts (concert_id INT, concert_name VARCHAR(100), is_sold_out BOOLEAN); ",SELECT COUNT(*) FROM concerts WHERE concert_name = 'Summer Nights: Taylor Swift' AND is_sold_out = true;,SELECT COUNT(*) FROM concerts WHERE is_sold_out = true AND concert_name LIKE '%Summer Nights%';,0 "The country, competing in the Mr. International competition, that holds a rank of 3, has how many 2nd runners up?",CREATE TABLE table_20325360_2 (rank VARCHAR);,SELECT COUNT(2 AS nd_runner_up) FROM table_20325360_2 WHERE rank = 3;,"SELECT COUNT(2 AS nd_runners) FROM table_20325360_2 WHERE rank = ""3"";",0 What is the total number of hospitals and clinics in each region?,"CREATE TABLE hospitals (id INT, name TEXT, region TEXT); ","SELECT region, COUNT(*) FROM hospitals GROUP BY region;","SELECT region, COUNT(*) FROM hospitals GROUP BY region;",1 "What is the total number of inclusive housing units in Oakland, CA and San Francisco, CA?","CREATE TABLE InclusiveHousingUnits (Id INT, City VARCHAR(50), Units INT); ","SELECT SUM(Units) FROM InclusiveHousingUnits WHERE City IN ('Oakland', 'SanFrancisco');","SELECT SUM(Units) FROM InclusiveHousingUnits WHERE City IN ('Oakland', 'San Francisco');",0 Which Part number(s) has a Model number of core i7-3770?,"CREATE TABLE table_name_60 (part_number_s_ VARCHAR, model_number VARCHAR);","SELECT part_number_s_ FROM table_name_60 WHERE model_number = ""core i7-3770"";","SELECT part_number_s_ FROM table_name_60 WHERE model_number = ""core i7-3770"";",1 What was the stadium past 2012?,"CREATE TABLE table_name_31 (stadium VARCHAR, year INTEGER);",SELECT stadium FROM table_name_31 WHERE year > 2012;,SELECT stadium FROM table_name_31 WHERE year > 2012;,1 What was the game with a rank higher than 2 and a name of zendon hamilton?,"CREATE TABLE table_name_20 (games INTEGER, name VARCHAR, rank VARCHAR);","SELECT MAX(games) FROM table_name_20 WHERE name = ""zendon hamilton"" AND rank > 2;","SELECT SUM(games) FROM table_name_20 WHERE name = ""zendon hamilton"" AND rank > 2;",0 What is 2005's budget figure?,"CREATE TABLE table_name_4 (budget VARCHAR, year VARCHAR);",SELECT budget FROM table_name_4 WHERE year = 2005;,SELECT budget FROM table_name_4 WHERE year = 2005;,1 What are the names and subscription types of all broadband subscribers in Canada?,"CREATE TABLE broadband_subscribers (subscriber_id INT, country VARCHAR(50), subscription_type VARCHAR(50)); ","SELECT name, subscription_type FROM broadband_subscribers WHERE country = 'Canada';","SELECT subscriber_id, country, subscription_type FROM broadband_subscribers WHERE country = 'Canada';",0 how many times is the athlete jin di and the total less than 118?,"CREATE TABLE table_name_77 (rank VARCHAR, athlete VARCHAR, total VARCHAR);","SELECT COUNT(rank) FROM table_name_77 WHERE athlete = ""jin di"" AND total < 118;","SELECT COUNT(rank) FROM table_name_77 WHERE athlete = ""jin di"" AND total 118;",0 What is the percentage of male patients who have had a colonoscopy in the last year in the state of Texas?,"CREATE TABLE screenings (screening_id INT, patient_id INT, screening VARCHAR(20), date DATE, gender VARCHAR(10)); ","SELECT (COUNT(*) / (SELECT COUNT(*) FROM screenings WHERE date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE AND gender = 'Male')) * 100 FROM screenings WHERE date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE AND screening = 'Colonoscopy' AND gender = 'Male'","SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM screenings WHERE date >= DATEADD(year, -1, GETDATE()))) FROM screenings WHERE gender = 'Male' AND date >= DATEADD(year, -1, GETDATE());",0 What is the average budget for all movies produced in India?,"CREATE TABLE indian_movies (id INT, title VARCHAR(255), budget FLOAT, production_country VARCHAR(100)); ",SELECT AVG(budget) FROM indian_movies;,SELECT AVG(budget) FROM indian_movies WHERE production_country = 'India';,0 What is the average number of Gold when the total is 11 with more than 2 silver?,"CREATE TABLE table_name_3 (gold INTEGER, total VARCHAR, silver VARCHAR);",SELECT AVG(gold) FROM table_name_3 WHERE total = 11 AND silver > 2;,SELECT AVG(gold) FROM table_name_3 WHERE total = 11 AND silver > 2;,1 what is the finish when the country is united states and the player is tiger woods?,"CREATE TABLE table_name_51 (finish VARCHAR, country VARCHAR, player VARCHAR);","SELECT finish FROM table_name_51 WHERE country = ""united states"" AND player = ""tiger woods"";","SELECT finish FROM table_name_51 WHERE country = ""united states"" AND player = ""tiger woods"";",1 Tell me the class with rank of 89th,"CREATE TABLE table_name_12 (class VARCHAR, rank VARCHAR);","SELECT class FROM table_name_12 WHERE rank = ""89th"";","SELECT class FROM table_name_12 WHERE rank = ""89th"";",1 How many patients have not shown improvement after a specific therapy approach in a specific year?,"CREATE TABLE TherapyApproaches (TherapyID INT, TherapyName VARCHAR(50)); CREATE TABLE Patients (PatientID INT, Age INT, Gender VARCHAR(10), TherapyStartYear INT, Improvement VARCHAR(10)); CREATE TABLE TherapySessions (SessionID INT, PatientID INT, TherapyID INT);","SELECT TherapyApproaches.TherapyName, Patients.TherapyStartYear, SUM(CASE WHEN Patients.Improvement = 'No' THEN 1 ELSE 0 END) as NoImprovementCount FROM TherapyApproaches INNER JOIN TherapySessions ON TherapyApproaches.TherapyID = TherapySessions.TherapyID INNER JOIN Patients ON TherapySessions.PatientID = Patients.PatientID GROUP BY TherapyApproaches.TherapyName, Patients.TherapyStartYear;",SELECT COUNT(DISTINCT Patients.PatientID) FROM Patients INNER JOIN TherapyApproaches ON Patients.PatientID = TherapyApproaches.TherapyID INNER JOIN TherapySessions ON Patients.PatientID = TherapySessions.PatientID WHERE Patients.Improvement IS NULL AND TherapyApproaches.TherapyName = 'TherapyApproach' AND TherapyStartYear = YEAR(CURRENT_YEAR) AND TherapyApproaches.TherapyName = 'TherapyApproaches';,0 What is the total donation amount by each donor type?,"CREATE SCHEMA if not exists arts_culture;CREATE TABLE if not exists arts_culture.donors (donor_id INT PRIMARY KEY, name VARCHAR(255), type VARCHAR(255), donation DECIMAL(10,2));","SELECT type, SUM(donation) as total_donation FROM arts_culture.donors GROUP BY type;","SELECT type, SUM(donation) FROM arts_culture.donors GROUP BY type;",0 "Which company's type is joint venture, and has principle activities listed as Cargo Airline and an incorporation of China?","CREATE TABLE table_name_37 (company VARCHAR, incorporated_in VARCHAR, type VARCHAR, principal_activities VARCHAR);","SELECT company FROM table_name_37 WHERE type = ""joint venture"" AND principal_activities = ""cargo airline"" AND incorporated_in = ""china"";","SELECT company FROM table_name_37 WHERE type = ""joint venture"" AND principal_activities = ""cargo airline"" AND incorporated_in = ""china"";",1 What is the league with a 0:1 home?,"CREATE TABLE table_name_37 (league VARCHAR, home VARCHAR);","SELECT league FROM table_name_37 WHERE home = ""0:1"";","SELECT league FROM table_name_37 WHERE home = ""0:1"";",1 Show names of technicians in ascending order of quality rank of the machine they are assigned.,"CREATE TABLE repair_assignment (machine_id VARCHAR, technician_ID VARCHAR); CREATE TABLE machine (machine_id VARCHAR, quality_rank VARCHAR); CREATE TABLE technician (Name VARCHAR, technician_ID VARCHAR);",SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank;,SELECT T1.Name FROM technician AS T1 JOIN repair_assignment AS T2 ON T1.machine_id = T2.machine_id JOIN machine AS T3 ON T2.technician_ID = T3.technician_ID ORDER BY T3.quality_rank ASC;,0 "What is Location, when Date is December 8-December 20?","CREATE TABLE table_name_74 (location VARCHAR, date VARCHAR);","SELECT location FROM table_name_74 WHERE date = ""december 8-december 20"";","SELECT location FROM table_name_74 WHERE date = ""december 8-december 20"";",1 The league of 400 (21) has what years listed?,"CREATE TABLE table_name_87 (years VARCHAR, league VARCHAR);","SELECT years FROM table_name_87 WHERE league = ""400 (21)"";","SELECT years FROM table_name_87 WHERE league = ""400 (21)"";",1 What unit is in Mongolia?,"CREATE TABLE table_name_29 (unit VARCHAR, location VARCHAR);","SELECT unit FROM table_name_29 WHERE location = ""mongolia"";","SELECT unit FROM table_name_29 WHERE location = ""mongolia"";",1 Find marine pollution control projects that started after 2015,"CREATE TABLE pollution_control_projects (id INT PRIMARY KEY, project_name VARCHAR(255), start_date DATE, end_date DATE, budget FLOAT);",SELECT * FROM pollution_control_projects WHERE start_date > '2015-01-01';,SELECT project_name FROM pollution_control_projects WHERE start_date > '2015-01-01';,0 Which renewable energy projects have the highest energy efficiency ratings?,"CREATE TABLE projects (project_id INT, name TEXT, rating FLOAT); ","SELECT * FROM (SELECT project_id, name, rating, ROW_NUMBER() OVER (ORDER BY rating DESC) AS rn FROM projects) t WHERE rn <= 2;","SELECT name, rating FROM projects ORDER BY rating DESC LIMIT 1;",0 What is the average age of female athletes in the Football division?,"CREATE TABLE athletes (id INT, name VARCHAR(50), sport VARCHAR(50), age INT, gender VARCHAR(10)); ",SELECT AVG(age) FROM athletes WHERE sport = 'Football' AND gender = 'Female';,SELECT AVG(age) FROM athletes WHERE sport = 'Football' AND gender = 'Female';,1 What is the total number of high points on January 21?,"CREATE TABLE table_17323092_6 (high_points VARCHAR, date VARCHAR);","SELECT COUNT(high_points) FROM table_17323092_6 WHERE date = ""January 21"";","SELECT COUNT(high_points) FROM table_17323092_6 WHERE date = ""January 21"";",1 "How many polar bears were sighted in the 'polar_bear_sightings' table during the summer months (June, July, August) in the year 2019, broken down by region ('region' column in the 'polar_bear_sightings' table)?","CREATE TABLE polar_bear_sightings (id INT, date DATE, sighted BOOLEAN, region VARCHAR(50));","SELECT MONTH(date) AS month, region, COUNT(*) FROM polar_bear_sightings WHERE MONTH(date) IN (6, 7, 8) AND sighted = TRUE AND YEAR(date) = 2019 GROUP BY month, region;","SELECT region, COUNT(*) FROM polar_bear_sightings WHERE date BETWEEN '2019-01-01' AND '2019-12-31' AND sighted = TRUE GROUP BY region;",0 What is the lowest Digital PSIP for channels over 29 with callsign CFTU-DT?,"CREATE TABLE table_name_81 (digital_psip INTEGER, call_sign VARCHAR, broadcast_channel VARCHAR);","SELECT MIN(digital_psip) FROM table_name_81 WHERE call_sign = ""cftu-dt"" AND broadcast_channel > 29;","SELECT MIN(digital_psip) FROM table_name_81 WHERE call_sign = ""cftu-dt"" AND broadcast_channel > 29;",1 What is the navy for middleton with a home port of portsmouth after 1983?,"CREATE TABLE table_name_84 (navy VARCHAR, name VARCHAR, home_port VARCHAR, commissioned VARCHAR);","SELECT navy FROM table_name_84 WHERE home_port = ""portsmouth"" AND commissioned > 1983 AND name = ""middleton"";","SELECT navy FROM table_name_84 WHERE home_port = ""portsmouth"" AND commissioned > 1983 AND name = ""middleton"";",1 Delete all environmental violations that occurred before 2010 and provide a summary.,"CREATE TABLE EnvironmentalViolations (ViolationID INT, ViolationDate DATE, Description VARCHAR(255), FineAmount DECIMAL(10,2), MineID INT);",WITH pre_2010 AS (DELETE FROM EnvironmentalViolations WHERE ViolationDate < '2010-01-01' RETURNING *) SELECT COUNT(*) as ViolationsDeleted FROM pre_2010;,DELETE FROM EnvironmentalViolations WHERE ViolationDate '2010-01-01';,0 How many episodes had 4.44m viewers?,"CREATE TABLE table_27039190_3 (episode VARCHAR, viewers VARCHAR);","SELECT COUNT(episode) FROM table_27039190_3 WHERE viewers = ""4.44m"";","SELECT COUNT(episode) FROM table_27039190_3 WHERE viewers = ""4.44"";",0 How many polar bears are observed in each Arctic region?,"CREATE TABLE arctic_region (region_id INT, region_name VARCHAR(255)); CREATE TABLE polar_bear_observation (region_id INT, observation INT); ","SELECT region_id, SUM(observation) as total_observation FROM polar_bear_observation GROUP BY region_id;","SELECT arctic_region.region_name, COUNT(polar_bear_observation.observation) FROM arctic_region INNER JOIN polar_bear_observation ON arctic_region.region_id = polar_bear_observation.region_id GROUP BY arctic_region.region_name;",0 "what is the name when the displacement is 8,305 t?","CREATE TABLE table_name_12 (name VARCHAR, displacement VARCHAR);","SELECT name FROM table_name_12 WHERE displacement = ""8,305 t"";","SELECT name FROM table_name_12 WHERE displacement = ""8,305 t"";",1 "When is the winner olympiacos, the venue is georgios karaiskakis stadium and the runner-up is iraklis?","CREATE TABLE table_name_12 (year VARCHAR, runner_up VARCHAR, winner VARCHAR, venue VARCHAR);","SELECT year FROM table_name_12 WHERE winner = ""olympiacos"" AND venue = ""georgios karaiskakis stadium"" AND runner_up = ""iraklis"";","SELECT year FROM table_name_12 WHERE winner = ""olympiacos"" AND venue = ""georgios karaiskakis stadium"" AND runner_up = ""iraklis"";",1 What is the weight of the bullet used in a Remington?,"CREATE TABLE table_16010376_1 (bullet_weight VARCHAR, source VARCHAR);","SELECT bullet_weight FROM table_16010376_1 WHERE source = ""Remington"";","SELECT bullet_weight FROM table_16010376_1 WHERE source = ""Remington"";",1 What school did player number 6 come from?,"CREATE TABLE table_10015132_1 (school_club_team VARCHAR, no VARCHAR);","SELECT school_club_team FROM table_10015132_1 WHERE no = ""6"";",SELECT school_club_team FROM table_10015132_1 WHERE no = 6;,0 who has the high points on june 16?,"CREATE TABLE table_name_53 (high_points VARCHAR, date VARCHAR);","SELECT high_points FROM table_name_53 WHERE date = ""june 16"";","SELECT high_points FROM table_name_53 WHERE date = ""june 16"";",1 "Calculate the percentage of employees who are female in each department in the ""employee"", ""department"", and ""gender"" tables","CREATE TABLE employee (id INT, department_id INT, gender_id INT); CREATE TABLE department (id INT, name TEXT); CREATE TABLE gender (id INT, name TEXT);","SELECT d.name, (COUNT(CASE WHEN g.name = 'female' THEN 1 END) / COUNT(*)) * 100 AS pct_female FROM department d JOIN employee e ON d.id = e.department_id JOIN gender g ON e.gender_id = g.id GROUP BY d.name;","SELECT e.department_id, COUNT(e.id) * 100.0 / (SELECT COUNT(*) FROM employee e JOIN department d ON e.department_id = d.id GROUP BY e.department_id) as percentage FROM employee e JOIN gender g ON e.gender_id = g.id GROUP BY e.department_id;",0 What clay surface edition had an opponent of miho saeki?,"CREATE TABLE table_name_2 (edition VARCHAR, surface VARCHAR, opponent VARCHAR);","SELECT edition FROM table_name_2 WHERE surface = ""clay"" AND opponent = ""miho saeki"";","SELECT edition FROM table_name_2 WHERE surface = ""clay"" AND opponent = ""miho saeki"";",1 What is the total quantity of items shipped from each country to South America?,"CREATE TABLE Shipment (id INT, source_country VARCHAR(255), destination_continent VARCHAR(255), quantity INT); ","SELECT source_country, SUM(quantity) FROM Shipment WHERE destination_continent = 'South America' GROUP BY source_country","SELECT source_country, SUM(quantity) FROM Shipment WHERE destination_continent = 'South America' GROUP BY source_country;",0 Find the first name of the band mate that has performed in most songs.,"CREATE TABLE Songs (SongId VARCHAR); CREATE TABLE Band (firstname VARCHAR, id VARCHAR); CREATE TABLE Performance (bandmate VARCHAR);",SELECT t2.firstname FROM Performance AS t1 JOIN Band AS t2 ON t1.bandmate = t2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY firstname ORDER BY COUNT(*) DESC LIMIT 1;,SELECT T1.firstname FROM Band AS T1 JOIN Performance AS T2 ON T1.id = T2.bandmate GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1;,0 what is the play when the company is cyprus theatre organisation?,"CREATE TABLE table_name_61 (play VARCHAR, company VARCHAR);","SELECT play FROM table_name_61 WHERE company = ""cyprus theatre organisation"";","SELECT play FROM table_name_61 WHERE company = ""cyprus theatre organisation"";",1 Show production figures for wells in the Gulf of Mexico.,"CREATE TABLE wells (well_id INT, country VARCHAR(50), production FLOAT); ",SELECT production FROM wells WHERE country LIKE '%Gulf of Mexico%';,SELECT production FROM wells WHERE country = 'Gulf of Mexico';,0 List marine pollution incidents with their dates and locations in the Pacific Ocean.,"CREATE SCHEMA Pollution; CREATE TABLE Incidents (id INT, date DATE, location TEXT); CREATE SCHEMA Geography; CREATE TABLE Oceans (id INT, name TEXT);","SELECT i.date, i.location FROM Pollution.Incidents i JOIN Geography.Oceans o ON i.location = o.name WHERE o.name = 'Pacific Ocean';","SELECT i.date, i.location FROM Pollution. Incidents i INNER JOIN Geography.Oceans o ON i.id = o.id WHERE o.name = 'Pacific Ocean';",0 What is the total revenue generated by hotels in the 'EMEA' region for the year 2022?,"CREATE TABLE hotel_revenue (id INT, hotel_id INT, region TEXT, year INT, revenue FLOAT);","SELECT region, SUM(revenue) FROM hotel_revenue WHERE region = 'EMEA' AND YEAR(calendar) = 2022 GROUP BY region;",SELECT SUM(revenue) FROM hotel_revenue WHERE region = 'EMEA' AND year = 2022;,0 How many startups were founded by people from underrepresented racial or ethnic backgrounds in the edtech sector in the past 3 years?,"CREATE TABLE startups(id INT, name TEXT, industry TEXT, foundation_date DATE, founder_race TEXT); ","SELECT COUNT(*) FROM startups WHERE industry = 'Edtech' AND foundation_date >= '2019-01-01' AND founder_race IN ('African American', 'Hispanic', 'Native American', 'Pacific Islander');","SELECT COUNT(*) FROM startups WHERE industry = 'Edtech' AND foundation_date >= DATEADD(year, -3, GETDATE()) AND founder_race IN ('African American', 'Hispanic', 'Hispanic');",0 What opponent has a record of 6-9?,"CREATE TABLE table_name_27 (opponent VARCHAR, record VARCHAR);","SELECT opponent FROM table_name_27 WHERE record = ""6-9"";","SELECT opponent FROM table_name_27 WHERE record = ""6-9"";",1 Which countries have the highest and lowest use of sustainable materials in their manufacturing processes?,"CREATE TABLE ManufacturingProcesses (country VARCHAR(50), sustainable_material_use DECIMAL(3,2));","SELECT country, sustainable_material_use FROM (SELECT country, sustainable_material_use, RANK() OVER (ORDER BY sustainable_material_use DESC) as rank FROM ManufacturingProcesses) AS subquery WHERE rank = 1 OR rank = (SELECT COUNT(*) FROM ManufacturingProcesses) ORDER BY rank;","SELECT country, sustainable_material_use FROM ManufacturingProcesses ORDER BY sustainable_material_use DESC LIMIT 1; SELECT country, sustainable_material_use FROM ManufacturingProcesses ORDER BY sustainable_material_use DESC LIMIT 1;",0 What's the rank of Igor Rakočević of Tau Cerámica with more than 377 points?,"CREATE TABLE table_name_87 (rank INTEGER, points VARCHAR, team VARCHAR, name VARCHAR);","SELECT SUM(rank) FROM table_name_87 WHERE team = ""tau cerámica"" AND name = ""igor rakočević"" AND points > 377;","SELECT SUM(rank) FROM table_name_87 WHERE team = ""tau cerámica"" AND name = ""igor rakoevi"" AND points > 377;",0 How many United Airlines flights go to City 'Aberdeen'?,"CREATE TABLE AIRPORTS (AirportCode VARCHAR, City VARCHAR); CREATE TABLE AIRLINES (uid VARCHAR, Airline VARCHAR); CREATE TABLE FLIGHTS (DestAirport VARCHAR, Airline VARCHAR);","SELECT COUNT(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = ""Aberdeen"" AND T3.Airline = ""United Airlines"";",SELECT COUNT(*) FROM AIRPORTS AS T1 JOIN AIRLINES AS T2 ON T1.uid = T2.airline WHERE T2.City = 'Aberdeen';,0 Tell me the sum of wins for top 5 less than 1,"CREATE TABLE table_name_77 (wins INTEGER, top_5 INTEGER);",SELECT SUM(wins) FROM table_name_77 WHERE top_5 < 1;,SELECT SUM(wins) FROM table_name_77 WHERE top_5 1;,0 "For the tournament played on Jul 4, 1982, what was the winning score?","CREATE TABLE table_name_97 (winning_score VARCHAR, date VARCHAR);","SELECT winning_score FROM table_name_97 WHERE date = ""jul 4, 1982"";","SELECT winning_score FROM table_name_97 WHERE date = ""july 4, 1982"";",0 Find the name and account balance of the customer whose name includes the letter ‘a’.,"CREATE TABLE customer (cust_name VARCHAR, acc_bal VARCHAR);","SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%';","SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%';",1 What is the average donation amount per donor for Indigenous causes in 2021?,"CREATE TABLE Donations (id INT, donor_id INT, cause VARCHAR(255), amount DECIMAL(10, 2), donation_date DATE, donor_group VARCHAR(255)); ","SELECT donor_group, AVG(amount) as avg_donation FROM Donations WHERE donation_date BETWEEN '2021-01-01' AND '2021-12-31' AND cause LIKE 'Indigenous%' GROUP BY donor_group;",SELECT AVG(amount) FROM Donations WHERE cause = 'Indigenous' AND donation_date BETWEEN '2021-01-01' AND '2021-12-31';,0 List the number of acquisitions for female-founded startups in the transportation sector since 2016.,"CREATE TABLE acquisition (id INT, company_id INT, acquisition_date DATE); ",SELECT COUNT(*) FROM acquisition INNER JOIN company ON acquisition.company_id = company.id WHERE company.industry = 'Transportation' AND company.founder_gender = 'Female' AND acquisition_date >= '2016-01-01';,SELECT COUNT(*) FROM acquisition WHERE company_id IN (SELECT id FROM company WHERE gender = 'Female') AND acquisition_date >= '2016-01-01' AND acquisition_date '2016-12-31';,0 "Find the average investment amount for carbon offset projects in the 'Africa' and 'Europe' regions, excluding oceanic projects.","CREATE SCHEMA carbon_offsets; CREATE TABLE projects (project_name VARCHAR(255), region VARCHAR(255), investment_amount INT); ","SELECT region, AVG(investment_amount) FROM carbon_offsets.projects WHERE region IN ('Africa', 'Europe') AND region != 'Oceania' GROUP BY region;","SELECT AVG(investment_amount) FROM carbon_offsets.projects WHERE region IN ('Africa', 'Europe') AND region!= 'Oceania';",0 what's the night rank with viewers (m) of 6.63,"CREATE TABLE table_11354111_3 (night_rank VARCHAR, viewers__m_ VARCHAR);","SELECT night_rank FROM table_11354111_3 WHERE viewers__m_ = ""6.63"";",SELECT night_rank FROM table_11354111_3 WHERE viewers__m_ = 6.63;,0 "What is the total capacity of all programs in the programs table, grouped by their location?","CREATE TABLE programs (program_id INT, location VARCHAR(25), capacity INT); ","SELECT SUM(capacity) as total_capacity, location FROM programs GROUP BY location;","SELECT location, SUM(capacity) FROM programs GROUP BY location;",0 What is the total number of employees in the 'mining_operations' table?,"CREATE TABLE mining_operations (id INT PRIMARY KEY, operation_name VARCHAR(50), location VARCHAR(50), num_employees INT);",SELECT SUM(num_employees) FROM mining_operations;,SELECT SUM(num_employees) FROM mining_operations;,1 What is the average energy efficiency rating for Renewable Energy Projects in Canada?,"CREATE TABLE Renewable_Energy_Projects (project_id INT, location VARCHAR(50), energy_efficiency_rating INT); ",SELECT AVG(energy_efficiency_rating) FROM Renewable_Energy_Projects WHERE location = 'Canada';,SELECT AVG(energy_efficiency_rating) FROM Renewable_Energy_Projects WHERE location = 'Canada';,1 Count the total number of members in each union having a safety_rating greater than 8.5.,"CREATE TABLE Union_Members (union_id INT, member_id INT, safety_rating FLOAT); ","SELECT union_id, COUNT(member_id) FROM Union_Members WHERE safety_rating > 8.5 GROUP BY union_id;","SELECT union_id, COUNT(*) FROM Union_Members WHERE safety_rating > 8.5 GROUP BY union_id;",0 What was the average age of visitors who attended Exhibit A?,"CREATE TABLE visitors (visitor_id INT, exhibition_id INT, age INT, gender VARCHAR(50)); ",SELECT AVG(age) FROM visitors WHERE exhibition_id = 1;,SELECT AVG(age) FROM visitors WHERE exhibition_id = 1;,1 What is the occupancy rate for hotels in the 'budget' segment over the last month?,"CREATE TABLE hotel_occupancy (hotel_id INT, segment VARCHAR(20), occupancy INT, date DATE);","SELECT segment, AVG(occupancy) as avg_occupancy FROM hotel_occupancy WHERE segment = 'budget' AND date >= DATE(NOW()) - INTERVAL 1 MONTH GROUP BY segment;","SELECT occupancy FROM hotel_occupancy WHERE segment = 'budget' AND date >= DATEADD(month, -1, GETDATE());",0 What is the average speed of satellites in the Starlink constellation?,"CREATE TABLE Satellites (id INT, name VARCHAR(50), company VARCHAR(50), launch_date DATE); ",SELECT AVG(speed) FROM Satellites JOIN SatelliteSpeeds ON Satellites.id = SatelliteSpeeds.satellite_id WHERE company = 'SpaceX';,SELECT AVG(speed) FROM Satellites WHERE company = 'Starlink';,0 What is the total revenue for each quarter in 'dispensary_sales' table?,"CREATE TABLE dispensary_sales (id INT, quarter DATE, strain VARCHAR(255), quantity INT, revenue FLOAT);","SELECT DATE_FORMAT(quarter, '%Y-%m') as quarter, SUM(revenue) as total_revenue FROM dispensary_sales GROUP BY quarter;","SELECT quarter, SUM(revenue) as total_revenue FROM dispensary_sales GROUP BY quarter;",0 What is the transaction type that has processed the greatest total amount in transactions?,"CREATE TABLE Financial_transactions (transaction_type VARCHAR, transaction_amount INTEGER);",SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY SUM(transaction_amount) DESC LIMIT 1;,SELECT transaction_type FROM Financial_transactions ORDER BY transaction_amount DESC LIMIT 1;,0 What is the average financial wellbeing score for each gender?,"CREATE TABLE financial_wellbeing_gender (person_id INT, gender VARCHAR(6), score INT); ","SELECT gender, AVG(score) FROM financial_wellbeing_gender GROUP BY gender;","SELECT gender, AVG(score) FROM financial_wellbeing_gender GROUP BY gender;",1 What is the percentage of companies founded by Latinx individuals in each country?,"CREATE TABLE Companies (id INT, name VARCHAR(50), industry VARCHAR(50), country VARCHAR(50), founding_year INT, founder_latinx VARCHAR(10)); ","SELECT country, ROUND(100.0 * SUM(CASE WHEN founder_latinx = 'Yes' THEN 1 ELSE 0 END) / COUNT(*), 2) as latinx_percentage FROM Companies GROUP BY country;","SELECT country, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Companies WHERE founder_latinx = 'Latinx') as percentage FROM Companies GROUP BY country;",0 Identify the top 3 cities with the highest budget allocation for public transportation?,"CREATE TABLE cities (city_name VARCHAR(255), budget INT); ","SELECT city_name, budget FROM cities ORDER BY budget DESC LIMIT 3;","SELECT city_name, budget FROM cities ORDER BY budget DESC LIMIT 3;",1 How many farmers were included by the department with 32 projects?,"CREATE TABLE table_17118006_2 (farmers INTEGER, projects VARCHAR);",SELECT MAX(farmers) FROM table_17118006_2 WHERE projects = 32;,SELECT MAX(farmers) FROM table_17118006_2 WHERE projects = 32;,1 Update the phone number of a participant who registered for a writing workshop in Sydney.,"CREATE TABLE participants (participant_id INT, name VARCHAR(50), email VARCHAR(50), phone VARCHAR(20)); CREATE TABLE workshops (workshop_id INT, name VARCHAR(50), city VARCHAR(50), workshop_type VARCHAR(50)); CREATE TABLE registration (registration_id INT, participant_id INT, workshop_id INT); ",UPDATE participants SET phone = '0987654321' WHERE participant_id = 1;,UPDATE participants SET phone = 1 WHERE participant_id = 1 AND workshop_id IN (SELECT workshop_id FROM registration WHERE city = 'Sydney');,0 WHICH State/country that has ray roberts?,"CREATE TABLE table_name_43 (state_country VARCHAR, skipper VARCHAR);","SELECT state_country FROM table_name_43 WHERE skipper = ""ray roberts"";","SELECT state_country FROM table_name_43 WHERE skipper = ""ray roberts"";",1 What is the total number of defense diplomacy meetings held by China with ASEAN countries in the past 2 years?,"CREATE SCHEMA if not exists defense; CREATE TABLE if not exists china_asean_diplomacy (id INT PRIMARY KEY, year INT, meeting_count INT); ","SELECT SUM(meeting_count) FROM defense.china_asean_diplomacy WHERE year BETWEEN 2021 AND 2022 AND country IN ('ASEAN', 'China');",SELECT SUM(meeting_count) FROM defense.china_asean_diplomacy WHERE year BETWEEN 2017 AND 2021;,0 how many air date with overall being 83/95,"CREATE TABLE table_13110459_2 (air_date VARCHAR, overall VARCHAR);","SELECT COUNT(air_date) FROM table_13110459_2 WHERE overall = ""83/95"";","SELECT COUNT(air_date) FROM table_13110459_2 WHERE overall = ""83/95"";",1 Which sustainable fabric has the lowest production cost?,"CREATE TABLE fabric_costs (id INT, fabric_id INT, production_cost FLOAT); ","SELECT f.name, MIN(fc.production_cost) as lowest_cost FROM fabrics f JOIN fabric_costs fc ON f.id = fc.fabric_id WHERE f.sustainability_rating >= 4 GROUP BY f.name;","SELECT fabric_id, production_cost FROM fabric_costs ORDER BY production_cost DESC LIMIT 1;",0 "Find the number of research grants awarded to each department in the College of Engineering, ordered from the most to least grants.","CREATE TABLE College_of_Engineering_Grants (department VARCHAR(50), grant_awarded BOOLEAN); ","SELECT department, SUM(grant_awarded) as total_grants FROM College_of_Engineering_Grants GROUP BY department ORDER BY total_grants DESC;","SELECT department, COUNT(*) as num_grants FROM College_of_Engineering_Grants GROUP BY department ORDER BY num_grants DESC;",0 "What is the result for a year after 2003, when the nominee(s) is john wells?","CREATE TABLE table_name_64 (result VARCHAR, year VARCHAR, nominee_s_ VARCHAR);","SELECT result FROM table_name_64 WHERE year > 2003 AND nominee_s_ = ""john wells"";","SELECT result FROM table_name_64 WHERE year > 2003 AND nominee_s_ = ""john wells"";",1 Which Title has a Director of rowell santiago?,"CREATE TABLE table_name_39 (title VARCHAR, director VARCHAR);","SELECT title FROM table_name_39 WHERE director = ""rowell santiago"";","SELECT title FROM table_name_39 WHERE director = ""rowell santiago"";",1 How many rural infrastructure projects were completed in each district of the Southern region in 2021?,"CREATE TABLE projects (project_id INT, district_id INT, completion_date DATE, project_type VARCHAR(50)); ","SELECT district_id, COUNT(project_id) FROM projects WHERE district_id IN (SELECT district_id FROM districts WHERE region = 'Southern') AND YEAR(completion_date) = 2021 GROUP BY district_id;","SELECT district_id, COUNT(*) FROM projects WHERE completion_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY district_id;",0 What is the average investment in climate adaptation per project in Asia?,"CREATE TABLE climate_investment (id INT, country VARCHAR(50), type VARCHAR(50), investment FLOAT); ","SELECT AVG(investment) FROM climate_investment WHERE country IN ('China', 'India', 'Indonesia', 'Japan', 'Vietnam') AND type = 'climate adaptation';","SELECT AVG(investment) FROM climate_investment WHERE type = 'climate adaptation' AND country IN ('China', 'India');",0 Which Score has an Away team of middlesbrough?,"CREATE TABLE table_name_98 (score VARCHAR, away_team VARCHAR);","SELECT score FROM table_name_98 WHERE away_team = ""middlesbrough"";","SELECT score FROM table_name_98 WHERE away_team = ""middlesbrough"";",1 Insert a new manufacturer 'SustainableFabrics' in the 'Americas' region with 'No' FairTrade status.,"CREATE TABLE Manufacturers (ManufacturerID INT, ManufacturerName VARCHAR(50), Region VARCHAR(50), FairTrade VARCHAR(5));","INSERT INTO Manufacturers (ManufacturerID, ManufacturerName, Region, FairTrade) VALUES (5, 'SustainableFabrics', 'Americas', 'No');","INSERT INTO Manufacturers (ManufacturerID, ManufacturerName, Region, FairTrade) VALUES ('SustainableFabrics', 'Americas', 'No');",0 What is the minimum number of flight hours per pilot per year?,"CREATE TABLE Flight_Hours (ID INT, Year INT, Pilot VARCHAR(50), Flight_Hours INT); ","SELECT Pilot, MIN(Flight_Hours) FROM Flight_Hours GROUP BY Pilot;","SELECT Pilot, Year, MIN(Flight_Hours) FROM Flight_Hours GROUP BY Pilot, Year;",0 Find the number of unique games in the database,"game_stats(game_id, player_id, score, date_played)",SELECT COUNT(DISTINCT game_id) as unique_games FROM game_stats;,SELECT COUNT(DISTINCT game_id) FROM game_stats;,0 Tell me the venue for winner of nevada and year more than 2004,"CREATE TABLE table_name_7 (venue VARCHAR, winner VARCHAR, year VARCHAR);","SELECT venue FROM table_name_7 WHERE winner = ""nevada"" AND year > 2004;","SELECT venue FROM table_name_7 WHERE winner = ""nevada"" AND year > 2004;",1 What are the top 3 most popular sustainable clothing items based on sales in the last 6 months?,"CREATE TABLE Sales (SaleID INT, ItemID INT, SaleDate DATE); ","SELECT Items.Item, COUNT(*) AS SalesCount FROM Sales INNER JOIN Items ON Sales.ItemID = Items.ItemID WHERE Items.IsSustainable = TRUE AND Sales.SaleDate BETWEEN '2022-01-01' AND '2022-06-30' GROUP BY Items.Item ORDER BY SalesCount DESC LIMIT 3;","SELECT ItemID, COUNT(*) as TotalSales FROM Sales WHERE SaleDate >= DATEADD(month, -6, GETDATE()) GROUP BY ItemID ORDER BY TotalSales DESC LIMIT 3;",0 what is the 1st round when team 1 is stade lavallois (d2)?,CREATE TABLE table_name_56 (team_1 VARCHAR);,"SELECT 1 AS st_round FROM table_name_56 WHERE team_1 = ""stade lavallois (d2)"";","SELECT 1 AS st_round FROM table_name_56 WHERE team_1 = ""stade lavallois (d2)"";",1 "What is the total number of Wins, when Draws is less than 5, when Goals is greater than 49, and when Played is greater than 30?","CREATE TABLE table_name_93 (wins VARCHAR, played VARCHAR, draws VARCHAR, goals_against VARCHAR);",SELECT COUNT(wins) FROM table_name_93 WHERE draws < 5 AND goals_against > 49 AND played > 30;,SELECT COUNT(wins) FROM table_name_93 WHERE draws 5 AND goals_against > 49 AND played > 30;,0 What is the average age of artists who created more than 5 artworks?,"CREATE TABLE Artist (ArtistID INT, ArtistName VARCHAR(50), Age INT, TotalArtworks INT); ",SELECT AVG(Age) FROM Artist WHERE TotalArtworks > 5;,SELECT AVG(Age) FROM Artist WHERE TotalArtworks > 5;,1 How many startups were founded by individuals from the LGBTQ+ community in the retail sector before 2018?,"CREATE TABLE venture (id INT, name VARCHAR(255), sector VARCHAR(255), founding_date DATE, founder_lgbtq BOOLEAN); ",SELECT COUNT(*) FROM venture WHERE sector = 'Retail' AND founding_date < '2018-01-01' AND founder_lgbtq = TRUE;,SELECT COUNT(*) FROM venture WHERE sector = 'Retail' AND founder_lgbtq = true AND founding_date '2018-01-01';,0 "What is the average number of bronze medals of the team with 0 silvers, ranked 3, and less than 1 total medal?","CREATE TABLE table_name_52 (bronze INTEGER, total VARCHAR, silver VARCHAR, rank VARCHAR);","SELECT AVG(bronze) FROM table_name_52 WHERE silver = 0 AND rank = ""3"" AND total < 1;",SELECT AVG(bronze) FROM table_name_52 WHERE silver = 0 AND rank = 3 AND total 1;,0 Show the name of track and the number of races in each track.,"CREATE TABLE track (name VARCHAR, track_id VARCHAR); CREATE TABLE race (track_id VARCHAR);","SELECT T2.name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id;","SELECT T1.name, COUNT(*) FROM track AS T1 JOIN race AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id;",0 Find the number of students who is older than 20 in each dorm.,"CREATE TABLE dorm (dorm_name VARCHAR, dormid VARCHAR); CREATE TABLE lives_in (stuid VARCHAR, dormid VARCHAR); CREATE TABLE student (stuid VARCHAR, age INTEGER);","SELECT COUNT(*), T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.age > 20 GROUP BY T3.dorm_name;","SELECT T1.dorm_name, COUNT(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.age > 20 GROUP BY T1.dorm_name;",0 "What is the total population of all wildlife species in 2020, grouped by the region?","CREATE TABLE wildlife (id INT, region VARCHAR(255), species VARCHAR(255), year INT, population INT); ","SELECT region, SUM(population) as total_population FROM wildlife WHERE year = 2020 GROUP BY region;","SELECT region, SUM(population) FROM wildlife WHERE year = 2020 GROUP BY region;",0 "Name the solo when name is briggs, diyral","CREATE TABLE table_15128839_22 (solo VARCHAR, name VARCHAR);","SELECT solo FROM table_15128839_22 WHERE name = ""Briggs, Diyral"";","SELECT solo FROM table_15128839_22 WHERE name = ""Briggs, Diyral"";",1 What was the TV time for the road game against Phoenix where the score was 98-99?,"CREATE TABLE table_name_30 (tv_time VARCHAR, home_team VARCHAR, result VARCHAR);","SELECT tv_time FROM table_name_30 WHERE home_team = ""phoenix"" AND result = ""98-99"";","SELECT tv_time FROM table_name_30 WHERE home_team = ""phoenix"" AND result = ""98-99"";",1 What is the average calorie count for organic meals across all restaurants?,"CREATE TABLE meals (id INT, name TEXT, organic BOOLEAN, calorie_count INT); ",SELECT AVG(meals.calorie_count) FROM meals WHERE meals.organic = true;,SELECT AVG(calorie_count) FROM meals WHERE organic = true;,0 Name the sum of spectators for time more than 20.05 and team #2 of estonia,"CREATE TABLE table_name_66 (spectators INTEGER, time___cest__ VARCHAR, team__number2 VARCHAR);","SELECT SUM(spectators) FROM table_name_66 WHERE time___cest__ > 20.05 AND team__number2 = ""estonia"";","SELECT SUM(spectators) FROM table_name_66 WHERE time___cest__ > 20.05 AND team__number2 = ""estonia"";",1 "Which country has the lowest total zinc production, China or India?","CREATE TABLE zinc_production (country VARCHAR(20), quantity INT); ","SELECT country, MIN(quantity) FROM zinc_production WHERE country IN ('China', 'India') GROUP BY country;","SELECT country, SUM(quantity) as total_quantity FROM zinc_production WHERE country IN ('China', 'India') GROUP BY country ORDER BY total_quantity DESC LIMIT 1;",0 Who has the lowest laps with 29 points on 1 grid?,"CREATE TABLE table_name_16 (laps INTEGER, points VARCHAR, grid VARCHAR);",SELECT MIN(laps) FROM table_name_16 WHERE points = 29 AND grid < 1;,SELECT MIN(laps) FROM table_name_16 WHERE points = 29 AND grid = 1;,0 "Create a table named 'project_milestones' with columns 'project_id', 'milestone', 'due_date'","CREATE TABLE project_milestones (project_id INT, milestone VARCHAR(50), due_date DATE);","CREATE TABLE project_milestones (project_id INT, milestone VARCHAR(50), due_date DATE);","CREATE TABLE project_milestones (project_id INT, milestone VARCHAR(50), due_date DATE);",1 In what season was the final placing NC† and the team SL Formula Racing? ,"CREATE TABLE table_25421463_1 (season VARCHAR, final_placing VARCHAR, team_name VARCHAR);","SELECT season FROM table_25421463_1 WHERE final_placing = ""NC†"" AND team_name = ""SL Formula Racing"";","SELECT season FROM table_25421463_1 WHERE final_placing = ""NC"" AND team_name = ""SL Formula Racing"";",0 What was the score in the game against Boston?,"CREATE TABLE table_17326036_5 (score VARCHAR, team VARCHAR);","SELECT score FROM table_17326036_5 WHERE team = ""Boston"";","SELECT score FROM table_17326036_5 WHERE team = ""Boston"";",1 What is the highest date in october for a game number larger than 8 with a record of 4-4-0?,"CREATE TABLE table_name_54 (october INTEGER, record VARCHAR, game VARCHAR);","SELECT MAX(october) FROM table_name_54 WHERE record = ""4-4-0"" AND game > 8;","SELECT MAX(october) FROM table_name_54 WHERE record = ""4-4-0"" AND game > 8;",1 Find the average donation amount per donor for donors from the United States.,"CREATE TABLE Donors (DonorID INT, DonorName TEXT, Country TEXT, AmountDonated DECIMAL, DonationDate DATE); ",SELECT AVG(AmountDonated) FROM (SELECT AmountDonated FROM Donors WHERE Country = 'USA' GROUP BY DonorID);,SELECT AVG(AmountDonated) FROM Donors WHERE Country = 'United States';,0 Delete all firewall rules related to the Finance department that are older than 6 months.,"CREATE TABLE firewall_rules (rule_id INT PRIMARY KEY, rule_text TEXT, department VARCHAR(50), last_updated TIMESTAMP);",DELETE FROM firewall_rules WHERE department = 'Finance' AND last_updated < NOW() - INTERVAL 6 MONTH;,DELETE FROM firewall_rules WHERE department = 'Finance' AND last_updated NOW() - INTERVAL '6 months';,0 What date did the show air when Rhod Gilbert was the headliner?,"CREATE TABLE table_23122988_1 (airdate VARCHAR, headliner VARCHAR);","SELECT airdate FROM table_23122988_1 WHERE headliner = ""Rhod Gilbert"";","SELECT airdate FROM table_23122988_1 WHERE headliner = ""Rhod Gilbert"";",1 What is the average amount donated per month in 2020?,"CREATE TABLE donations (donation_id INT, donation_amount DECIMAL(10,2), donation_date DATE); ",SELECT AVG(donation_amount) FROM donations WHERE YEAR(donation_date) = 2020 GROUP BY MONTH(donation_date);,"SELECT DATE_FORMAT(donation_date, '%Y-%m') AS month, AVG(donation_amount) AS avg_donated FROM donations WHERE YEAR(donation_date) = 2020 GROUP BY month;",0 How many cities have a stadium that was opened before the year of 2006?,"CREATE TABLE stadium (city VARCHAR, opening_year INTEGER);",SELECT COUNT(DISTINCT city) FROM stadium WHERE opening_year < 2006;,SELECT COUNT(city) FROM stadium WHERE opening_year 2006;,0 What nationality is the player who went to school at South Florida?,"CREATE TABLE table_16494599_1 (nationality VARCHAR, school_club_team VARCHAR);","SELECT nationality FROM table_16494599_1 WHERE school_club_team = ""South Florida"";","SELECT nationality FROM table_16494599_1 WHERE school_club_team = ""South Florida"";",1 What is the maximum time taken to resolve restorative justice programs in Oregon?,"CREATE TABLE restorative_justice_programs (program_id INT, state VARCHAR(2), duration INT); ",SELECT MAX(duration) FROM restorative_justice_programs WHERE state = 'OR';,SELECT MAX(duration) FROM restorative_justice_programs WHERE state = 'Oregon';,0 I want to know the 2013 when 2001 was wta premier 5 tournaments,CREATE TABLE table_name_87 (Id VARCHAR);,"SELECT 2013 FROM table_name_87 WHERE 2001 = ""wta premier 5 tournaments"";","SELECT 2013 FROM table_name_87 WHERE 2001 = ""wta premier 5 tournaments"";",1 Total waste generation for each region in 2021?,"CREATE TABLE waste_generation (region VARCHAR(50), year INT, quantity INT); ","SELECT region, SUM(quantity) FROM waste_generation WHERE year = 2021 GROUP BY region;","SELECT region, SUM(quantity) FROM waste_generation WHERE year = 2021 GROUP BY region;",1 What is the total number of positive feedback instances for police and fire services in the last quarter?,"CREATE TABLE quarters (quarter_id INT, month VARCHAR(10), year INT); CREATE TABLE feedback_table (feedback_id INT, quarter_id INT, department VARCHAR(20), feedback VARCHAR(10)); ","SELECT COUNT(f.feedback_id) FROM feedback_table f JOIN quarters q ON f.quarter_id = q.quarter_id WHERE f.department IN ('police', 'fire') AND q.month IN ('January', 'February', 'March') AND q.year = 2021 AND f.feedback IN ('Great', 'Excellent', 'Very good');","SELECT COUNT(*) FROM feedback_table JOIN quarters ON feedback_table.quarter_id = quarters.quarter_id WHERE department IN ('Police', 'Fire') AND quarters.year = 2021;",0 What is the minimum number of workplace safety violations recorded for each union in Washington?,"CREATE TABLE unions (id INT, name VARCHAR(255), state VARCHAR(255)); CREATE TABLE safety_violations (id INT, union_id INT, violation_count INT); ","SELECT u.name, MIN(sv.violation_count) as min_violations FROM unions u JOIN safety_violations sv ON u.id = sv.union_id WHERE u.state = 'Washington' GROUP BY u.name;","SELECT u.name, MIN(sv.violation_count) as min_violations FROM unions u JOIN safety_violations sv ON u.id = sv.union_id WHERE u.state = 'Washington' GROUP BY u.name;",1 Identify the military equipment with the highest total sales quantity for the year 2020.,"CREATE TABLE Sales (Sale_ID INT, Equipment_ID INT, Quantity INT, Sale_Date DATE); CREATE TABLE Equipment (Equipment_ID INT, Equipment_Name VARCHAR(50), Supplier_ID INT, Unit_Price DECIMAL(10,2)); ","SELECT E.Equipment_Name, SUM(S.Quantity) AS 'Total Quantity Sold' FROM Sales S JOIN Equipment E ON S.Equipment_ID = E.Equipment_ID WHERE YEAR(S.Sale_Date) = 2020 GROUP BY E.Equipment_Name ORDER BY SUM(S.Quantity) DESC LIMIT 1;","SELECT Equipment_Name, SUM(Quantity) as Total_Quantity FROM Sales JOIN Equipment ON Sales.Equipment_ID = Equipment.Equipment_ID WHERE YEAR(Sale_Date) = 2020 GROUP BY Equipment_Name ORDER BY Total_Quantity DESC LIMIT 1;",0 What is the average energy efficiency of buildings in the United Kingdom?,"CREATE TABLE building_efficiency (id INT, country VARCHAR(255), efficiency FLOAT);",SELECT AVG(efficiency) FROM building_efficiency WHERE country = 'United Kingdom';,SELECT AVG(efficiency) FROM building_efficiency WHERE country = 'United Kingdom';,1 Increase the price of all virtual tours in India by 10%,"CREATE TABLE virtual_tours (id INT, name TEXT, country TEXT, price INT); ",UPDATE virtual_tours SET price = price * 1.1 WHERE country = 'India';,UPDATE virtual_tours SET price = price * 1.10 WHERE country = 'India';,0 What was the highest round that had northwestern?,"CREATE TABLE table_name_18 (round INTEGER, school VARCHAR);","SELECT MAX(round) FROM table_name_18 WHERE school = ""northwestern"";","SELECT MAX(round) FROM table_name_18 WHERE school = ""northwestern"";",1 How many vessels were registered in the first quarter of 2020 in the Caribbean region?,"CREATE TABLE vessels (vessel_id INT, registration_date DATE, region TEXT); ",SELECT COUNT(*) FROM vessels WHERE registration_date BETWEEN '2020-01-01' AND '2020-03-31' AND region = 'Caribbean';,SELECT COUNT(*) FROM vessels WHERE registration_date BETWEEN '2020-01-01' AND '2020-12-31' AND region = 'Caribbean';,0 Delete wastewater treatment records that are older than 5 years,"CREATE TABLE wastewater_treatment ( id INT PRIMARY KEY, location VARCHAR(255), treatment_date DATE, water_volume INT);","DELETE FROM wastewater_treatment WHERE treatment_date < DATE_SUB(CURDATE(), INTERVAL 5 YEAR);","DELETE FROM wastewater_treatment WHERE treatment_date DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR);",0 Who wrote the film Jehovah's Witness?,"CREATE TABLE table_name_5 (writer_s_ VARCHAR, film VARCHAR);","SELECT writer_s_ FROM table_name_5 WHERE film = ""jehovah's witness"";","SELECT writer_s_ FROM table_name_5 WHERE film = ""jehovah's witness"";",1 Name the wrestlers for days held of 69,"CREATE TABLE table_name_58 (wrestlers VARCHAR, days_held VARCHAR);","SELECT wrestlers FROM table_name_58 WHERE days_held = ""69"";","SELECT wrestlers FROM table_name_58 WHERE days_held = ""69"";",1 How many satellites were deployed in each country?,"CREATE TABLE satellite_deployment (country VARCHAR(20), satellites INT); ","SELECT country, satellites FROM satellite_deployment;","SELECT country, SUM(satellites) FROM satellite_deployment GROUP BY country;",0 "List all the timber_production data for a specific year, such as 2020?","CREATE TABLE timber_production (production_id INT, year INT, volume FLOAT);",SELECT * FROM timber_production WHERE year = 2020;,SELECT * FROM timber_production WHERE year = 2020;,1 List the names of all players who have played VR games from South America.,"CREATE TABLE players (player_id int, age int, gender varchar(10), country varchar(20)); CREATE TABLE game_sessions (session_id int, player_id int, game_name varchar(20), game_type varchar(10), duration int); CREATE TABLE game_catalog (game_name varchar(20), game_type varchar(10)); ","SELECT DISTINCT players.player_id, players.country, game_sessions.game_name FROM players INNER JOIN game_sessions ON players.player_id = game_sessions.player_id INNER JOIN game_catalog ON game_sessions.game_name = game_catalog.game_name WHERE players.country LIKE 'South%' AND game_catalog.game_type = 'VR';",SELECT players.player_id FROM players INNER JOIN game_sessions ON players.player_id = game_sessions.player_id INNER JOIN game_catalog ON game_sessions.game_name = game_catalog.game_name WHERE game_catalog.game_type = 'VR' AND players.country = 'South America';,0 Name the opponent with record of 6-2,"CREATE TABLE table_name_19 (opponent VARCHAR, record VARCHAR);","SELECT opponent FROM table_name_19 WHERE record = ""6-2"";","SELECT opponent FROM table_name_19 WHERE record = ""6-2"";",1 What is the highest series number with 9.17 million US viewers?,"CREATE TABLE table_27255755_1 (no_in_series INTEGER, us_viewers__millions_ VARCHAR);","SELECT MAX(no_in_series) FROM table_27255755_1 WHERE us_viewers__millions_ = ""9.17"";","SELECT MAX(no_in_series) FROM table_27255755_1 WHERE us_viewers__millions_ = ""9.17"";",1 Which team did they play on March 11?,"CREATE TABLE table_name_7 (team VARCHAR, date VARCHAR);","SELECT team FROM table_name_7 WHERE date = ""march 11"";","SELECT team FROM table_name_7 WHERE date = ""march 11"";",1 How many streams did songs by female artists receive in the month of May 2022?,"CREATE TABLE song_streams (song_id INT, artist_gender VARCHAR(10), stream_date DATE); ",SELECT COUNT(*) FROM song_streams WHERE artist_gender = 'Female' AND MONTH(stream_date) = 5 AND YEAR(stream_date) = 2022;,SELECT COUNT(*) FROM song_streams WHERE artist_gender = 'Female' AND stream_date BETWEEN '2022-05-01' AND '2022-05-30';,0 "What average points for highers has 0 has points for ordinary, and Ng as the grade, and less than 0 as points for foundation?","CREATE TABLE table_name_25 (points_for_higher INTEGER, points_for_foundation VARCHAR, points_for_ordinary VARCHAR, grade VARCHAR);","SELECT AVG(points_for_higher) FROM table_name_25 WHERE points_for_ordinary = 0 AND grade = ""ng"" AND points_for_foundation < 0;","SELECT AVG(points_for_higher) FROM table_name_25 WHERE points_for_ordinary = 0 AND grade = ""ng"" AND points_for_foundation 0;",0 What was the date of the home Detroit game with a decision of Joseph and a record of 27–13–5–2?,"CREATE TABLE table_name_85 (date VARCHAR, record VARCHAR, decision VARCHAR, home VARCHAR);","SELECT date FROM table_name_85 WHERE decision = ""joseph"" AND home = ""detroit"" AND record = ""27–13–5–2"";","SELECT date FROM table_name_85 WHERE decision = ""joseph"" AND home = ""detroit"" AND record = ""27–13–5–2"";",1 "How many volunteers engaged in the 'Feed the Hungry' program, having more than 10 participants?","CREATE TABLE Volunteers (id INT, volunteer_name TEXT, program TEXT, participation_date DATE); ","SELECT program, COUNT(*) FROM Volunteers WHERE program = 'Feed the Hungry' GROUP BY program HAVING COUNT(*) > 10;","SELECT COUNT(*) FROM Volunteers WHERE program = 'Feed the Hungry' AND participation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 10 DAY);",0 WHAT YEAR WAS ROBERT COOMBES CHAMPION ON MAY 7?,"CREATE TABLE table_name_97 (year VARCHAR, champion VARCHAR, date VARCHAR);","SELECT COUNT(year) FROM table_name_97 WHERE champion = ""robert coombes"" AND date = ""may 7"";","SELECT year FROM table_name_97 WHERE champion = ""robert coombes"" AND date = ""may 7"";",0 What is the adverbial for the nominative me?,"CREATE TABLE table_name_92 (adverbial VARCHAR, nominative VARCHAR);","SELECT adverbial FROM table_name_92 WHERE nominative = ""me"";","SELECT adverbial FROM table_name_92 WHERE nominative = ""me"";",1 What is the number of new visitors by program genre in the first quarter of 2022?,"CREATE SCHEMA events; CREATE TABLE events (event_id INT, event_name VARCHAR(255), event_genre VARCHAR(255), visit_date DATE, visitor_id INT); ","SELECT event_genre, COUNT(DISTINCT CASE WHEN visit_date BETWEEN '2022-01-01' AND '2022-03-31' THEN visitor_id END) as new_visitors FROM events GROUP BY event_genre;","SELECT event_genre, COUNT(DISTINCT visitor_id) as new_visitors FROM events.events WHERE visit_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY event_genre;",0 "What is the total budget allocated for infrastructure in the city of Phoenix, including all projects, for the fiscal year 2025?","CREATE TABLE city_budget (city VARCHAR(20), project VARCHAR(20), budget INT); ",SELECT SUM(budget) FROM city_budget WHERE city = 'Phoenix' AND project LIKE '%Infrastructure%' AND fiscal_year = 2025;,SELECT SUM(budget) FROM city_budget WHERE city = 'Phoenix' AND project = 'Infrastructure' AND fiscal_year = 2025;,0 What is the maximum number of patients served by a community health worker?,"CREATE TABLE worker_patient_data (worker_id INT, patients_served INT); ",SELECT MAX(patients_served) FROM worker_patient_data;,SELECT MAX(patients_served) FROM worker_patient_data;,1 What was the attendance at the Kings game when Anaheim was the visiting team?,"CREATE TABLE table_name_22 (attendance VARCHAR, visitor VARCHAR);","SELECT attendance FROM table_name_22 WHERE visitor = ""anaheim"";","SELECT attendance FROM table_name_22 WHERE visitor = ""anaheim"";",1 Tell me the total number of total for vovinam and bronze less than 3,"CREATE TABLE table_name_16 (total VARCHAR, sport VARCHAR, bronze VARCHAR);","SELECT COUNT(total) FROM table_name_16 WHERE sport = ""vovinam"" AND bronze < 3;","SELECT COUNT(total) FROM table_name_16 WHERE sport = ""vovinam"" AND bronze 3;",0 "List all clients with their age and the number of investments they made, sorted by the number of investments in descending order?","CREATE TABLE clients (client_id INT, name TEXT, age INT, gender TEXT); CREATE TABLE investments (client_id INT, investment_type TEXT); ","SELECT c.age, COUNT(i.investment_type) AS num_investments FROM clients c LEFT JOIN investments i ON c.client_id = i.client_id GROUP BY c.client_id ORDER BY num_investments DESC;","SELECT clients.age, investments.investment_type, COUNT(investments.client_id) as investment_count FROM clients INNER JOIN investments ON clients.client_id = investments.client_id GROUP BY clients.age, investments.investment_type ORDER BY investment_count DESC;",0 What team has a Score of l 88–94 (ot)?,"CREATE TABLE table_name_98 (team VARCHAR, score VARCHAR);","SELECT team FROM table_name_98 WHERE score = ""l 88–94 (ot)"";","SELECT team FROM table_name_98 WHERE score = ""l 88–94 (ot)"";",1 List all cultivators who have never been in compliance with regulations in the past year.,"CREATE TABLE Cultivators (CultivatorID INT, CultivatorName VARCHAR(255)); CREATE TABLE Compliance (ComplianceID INT, CultivatorID INT, ComplianceMonth DATE); ","SELECT CultivatorName FROM Cultivators WHERE CultivatorID NOT IN (SELECT CultivatorID FROM Compliance WHERE ComplianceMonth >= DATEADD(MONTH, -12, GETDATE())) ORDER BY CultivatorName;","SELECT Cultivators.CultivatorName FROM Cultivators INNER JOIN Compliance ON Cultivators.CultivatorID = Compliance.CultivatorID WHERE Compliance.ComplianceMonth DATEADD(year, -1, GETDATE());",0 Name the Player which has a To par of –6?,"CREATE TABLE table_name_99 (player VARCHAR, to_par VARCHAR);","SELECT player FROM table_name_99 WHERE to_par = ""–6"";","SELECT player FROM table_name_99 WHERE to_par = ""–6"";",1 "What is the tally when the opposition is Derry, and total is 14?","CREATE TABLE table_name_12 (tally VARCHAR, opposition VARCHAR, total VARCHAR);","SELECT tally FROM table_name_12 WHERE opposition = ""derry"" AND total = 14;","SELECT COUNT(tally) FROM table_name_12 WHERE opposition = ""derry"" AND total = 14;",0 Which player attended school at Georgia Tech?,"CREATE TABLE table_name_74 (player VARCHAR, school_club_team VARCHAR);","SELECT player FROM table_name_74 WHERE school_club_team = ""georgia tech"";","SELECT player FROM table_name_74 WHERE school_club_team = ""georgia tech"";",1 What are the dimensions of the amp with a 180W output?,"CREATE TABLE table_name_96 (dimensions VARCHAR, output VARCHAR);","SELECT dimensions FROM table_name_96 WHERE output = ""180w"";","SELECT dimensions FROM table_name_96 WHERE output = ""180w"";",1 How many safety incidents have been reported for non-vegan cosmetics products?,"CREATE TABLE product (product_id INT, name TEXT, cruelty_free BOOLEAN, vegan BOOLEAN); CREATE TABLE safety_record (record_id INT, product_id INT, incident_count INT);",SELECT COUNT(*) FROM safety_record INNER JOIN product ON safety_record.product_id = product.product_id WHERE product.vegan = FALSE;,SELECT SUM(incident_count) FROM safety_record JOIN product ON safety_record.product_id = product.product_id WHERE product.cruelty_free = TRUE AND product.vegan = TRUE;,0 List the number of startups founded by individuals with disabilities in the AI sector that have had at least two investment rounds.,"CREATE TABLE startup (id INT, name VARCHAR(100), industry VARCHAR(50), founder_disability VARCHAR(3), investment_round INT); ",SELECT COUNT(*) FROM startup WHERE founder_disability = 'Yes' AND industry = 'AI' AND investment_round >= 2;,SELECT COUNT(*) FROM startup WHERE industry = 'AI' AND founder_disability = 'Disability' AND investment_round >= 2;,0 What is the number of products certified by PETA?,"CREATE TABLE Certifications (ProductID INT, PETA BOOLEAN); ",SELECT COUNT(*) FROM Certifications WHERE PETA = TRUE;,SELECT COUNT(*) FROM Certifications WHERE PETA = true;,0 What is the lowest game number when the record was 26-24-9?,"CREATE TABLE table_name_58 (game INTEGER, record VARCHAR);","SELECT MIN(game) FROM table_name_58 WHERE record = ""26-24-9"";","SELECT MIN(game) FROM table_name_58 WHERE record = ""26-24-9"";",1 "If the college is Vanderbilt, what is the position?","CREATE TABLE table_27132791_3 (position VARCHAR, college VARCHAR);","SELECT position FROM table_27132791_3 WHERE college = ""Vanderbilt"";","SELECT position FROM table_27132791_3 WHERE college = ""Vanderbilt"";",1 "What is the name, location, and number of lanes for all highways in the state of California with a speed limit greater than 65 miles per hour?","CREATE TABLE Highways (id INT, name VARCHAR(100), location VARCHAR(100), lanes INT, speed_limit INT, state VARCHAR(50)); ","SELECT name, location, lanes FROM Highways WHERE state = 'California' AND speed_limit > 65;","SELECT name, location, lanes FROM Highways WHERE speed_limit > 65 AND state = 'California';",0 What is the average fish density (fish/m3) for fish farms located in the South China Sea?,"CREATE TABLE fish_farms (id INT, name TEXT, location TEXT, fish_density FLOAT); ",SELECT AVG(fish_density) FROM fish_farms WHERE location = 'South China Sea';,SELECT AVG(fish_density) FROM fish_farms WHERE location = 'South China Sea';,1 What is the Max Aggregate bandwidth with a HyperTransport of 2?,"CREATE TABLE table_name_17 (max_aggregate_bandwidth__bi_directional_ VARCHAR, hypertransport_version VARCHAR);",SELECT max_aggregate_bandwidth__bi_directional_ FROM table_name_17 WHERE hypertransport_version = 2;,"SELECT max_aggregate_bandwidth__bi_directional_ FROM table_name_17 WHERE hypertransport_version = ""2"";",0 What is the Catalog number in the Region of France?,"CREATE TABLE table_name_42 (catalog VARCHAR, region VARCHAR);","SELECT catalog FROM table_name_42 WHERE region = ""france"";","SELECT catalog FROM table_name_42 WHERE region = ""france"";",1 What is the success rate of the public defender's office in the city of Chicago?,"CREATE TABLE cases (id INT, city VARCHAR(255), office VARCHAR(255), result VARCHAR(255)); ",SELECT (SUM(CASE WHEN result = 'Won' THEN 1 ELSE 0 END) / COUNT(*)) * 100 AS success_rate FROM cases WHERE city = 'Chicago' AND office = 'Public Defender';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM cases WHERE city = 'Chicago')) AS success_rate FROM cases WHERE city = 'Chicago' AND office = 'Public Defender';,0 What was the maximum fuel consumption by 'VesselM' during its voyages in April 2021?,"CREATE TABLE Vessels (vessel_name VARCHAR(255)); CREATE TABLE Voyages (vessel_name VARCHAR(255), voyage_date DATE, fuel_consumption INT); ",SELECT MAX(fuel_consumption) FROM Voyages WHERE vessel_name = 'VesselM' AND voyage_date BETWEEN '2021-04-01' AND '2021-04-30';,SELECT MAX(fuel_consumption) FROM Voyages WHERE vessel_name = 'VesselM' AND voyage_date BETWEEN '2021-04-01' AND '2021-06-30';,0 What is the total biomass of fish species in the Pacific and Atlantic oceans?,"CREATE TABLE fish_species (id INT, species VARCHAR(20), biomass DECIMAL(10,2)); CREATE TABLE ocean (id INT, name VARCHAR(20), fish_id INT); ","SELECT SUM(fs.biomass) FROM fish_species fs INNER JOIN ocean o ON fs.id = o.fish_id WHERE o.name IN ('Pacific', 'Atlantic');","SELECT SUM(fs.biomass) FROM fish_species fs JOIN ocean o ON fs.id = o.fish_id WHERE o.name IN ('Pacific', 'Atlantic');",0 "What is the total number of shared scooters available in Los Angeles on August 15, 2022?","CREATE TABLE shared_scooters( scooter_id INT, availability_status VARCHAR(50), availability_date DATE, city VARCHAR(50));",SELECT COUNT(*) FROM shared_scooters WHERE availability_status = 'available' AND availability_date = '2022-08-15' AND city = 'Los Angeles';,SELECT COUNT(*) FROM shared_scooters WHERE city = 'Los Angeles' AND availability_date BETWEEN '2022-08-15' AND '2022-08-15';,0 What is the minimum range of electric vehicles in the 'green_vehicles' table?,"CREATE TABLE green_vehicles (make VARCHAR(50), model VARCHAR(50), year INT, range INT);","SELECT MIN(range) FROM green_vehicles WHERE make IN ('Tesla', 'Rivian');",SELECT MIN(range) FROM green_vehicles WHERE make = 'Electric';,0 "If the latitude is 71°18′n, what is the longitude?","CREATE TABLE table_name_98 (longitude VARCHAR, latitude VARCHAR);","SELECT longitude FROM table_name_98 WHERE latitude = ""71°18′n"";","SELECT longitude FROM table_name_98 WHERE latitude = ""71°18′n"";",1 How many electric vehicles are available in the vehicle_inventory table?,"CREATE TABLE vehicle_inventory (id INT, make VARCHAR(20), model VARCHAR(20), is_electric BOOLEAN); ",SELECT COUNT(*) FROM vehicle_inventory WHERE is_electric = true;,SELECT COUNT(*) FROM vehicle_inventory WHERE is_electric = true;,1 "What is the year average when not free was the status, and less than 7 was the civil liberties, and less than 6 political rights?","CREATE TABLE table_name_39 (year INTEGER, political_rights VARCHAR, status VARCHAR, civil_liberties VARCHAR);","SELECT AVG(year) FROM table_name_39 WHERE status = ""not free"" AND civil_liberties < 7 AND political_rights < 6;","SELECT AVG(year) FROM table_name_39 WHERE status = ""not free"" AND civil_liberties 7 AND political_rights 6;",0 What is the attendance of the match on October 26?,"CREATE TABLE table_name_16 (attendance VARCHAR, date VARCHAR);","SELECT attendance FROM table_name_16 WHERE date = ""october 26"";","SELECT attendance FROM table_name_16 WHERE date = ""october 26"";",1 "With the lost of 3, how many points?","CREATE TABLE table_name_9 (points_against VARCHAR, lost VARCHAR);","SELECT points_against FROM table_name_9 WHERE lost = ""3"";","SELECT points_against FROM table_name_9 WHERE lost = ""3"";",1 What is the average production volume of Neodymium in 2020?,"CREATE TABLE production_data (year INT, element VARCHAR(10), volume INT); ",SELECT AVG(volume) FROM production_data WHERE year = 2020 AND element = 'Neodymium';,SELECT AVG(volume) FROM production_data WHERE element = 'Neodymium' AND year = 2020;,0 "Which vendors have the highest average maintenance costs for military equipment, and the number of different equipment types maintained by these vendors?","CREATE TABLE Equipment (EID INT, Type VARCHAR(50), VendorID INT, MaintenanceCost INT); CREATE TABLE Vendors (VID INT, Name VARCHAR(100)); ","SELECT v.Name, AVG(Equipment.MaintenanceCost) as AvgMaintenanceCost, COUNT(DISTINCT Equipment.Type) as NumEquipmentTypes FROM Equipment JOIN Vendors v ON Equipment.VendorID = v.VID GROUP BY v.Name ORDER BY AvgMaintenanceCost DESC;","SELECT VendorID, AVG(MaintenanceCost) as AvgMaintenanceCost FROM Equipment JOIN Vendors ON Equipment.VendorID = Vendors.VID GROUP BY VendorID ORDER BY AvgMaintenanceCost DESC;",0 How many colleges in total?,CREATE TABLE College (Id VARCHAR);,SELECT COUNT(*) FROM College;,SELECT COUNT(*) FROM College;,1 What is the French word for the Italian word nazione?,"CREATE TABLE table_15040_8 (french VARCHAR, italian VARCHAR);","SELECT french FROM table_15040_8 WHERE italian = ""nazione"";","SELECT french FROM table_15040_8 WHERE italian = ""Nazione"";",0 What Replica has a race of supersport race 1?,"CREATE TABLE table_name_46 (replica VARCHAR, race VARCHAR);","SELECT replica FROM table_name_46 WHERE race = ""supersport race 1"";","SELECT replica FROM table_name_46 WHERE race = ""supersport race 1"";",1 How many items were shipped from the Mumbai warehouse in March 2022?,"CREATE TABLE warehouses (id INT, name VARCHAR(255)); CREATE TABLE shipments (id INT, warehouse_id INT, quantity INT, shipped_at DATETIME); ",SELECT SUM(quantity) FROM shipments WHERE warehouse_id = 3 AND shipped_at BETWEEN '2022-03-01' AND '2022-03-31';,SELECT SUM(quantity) FROM shipments JOIN warehouses ON shipments.warehouse_id = warehouses.id WHERE warehouses.name = 'Mumbai' AND shipped_at BETWEEN '2022-03-01' AND '2022-03-31';,0 "WHAT DATE HAD A GAME SMALLER THAN 58, AND FROM BOSTON?","CREATE TABLE table_name_57 (date VARCHAR, game VARCHAR, team VARCHAR);","SELECT date FROM table_name_57 WHERE game < 58 AND team = ""boston"";","SELECT date FROM table_name_57 WHERE game 58 AND team = ""boston"";",0 What was the birth state of Charles Cotesworth Pinckney who was elected in 1808?,"CREATE TABLE table_name_74 (birth_state VARCHAR, name VARCHAR, election_year VARCHAR);","SELECT birth_state FROM table_name_74 WHERE name = ""charles cotesworth pinckney"" AND election_year = 1808;","SELECT birth_state FROM table_name_74 WHERE name = ""charles cotesworth pinckney"" AND election_year = 1808;",1 Who is the oldest rock artist in the database?,"CREATE TABLE Artists (ArtistID INT, Name VARCHAR(100), Age INT, Genre VARCHAR(50)); ","SELECT Name, MAX(Age) FROM Artists WHERE Genre = 'Rock';","SELECT Name, Age FROM Artists WHERE Genre = 'Rock' ORDER BY Age DESC LIMIT 1;",0 Which Masaaki Mochizuki has a Gran Hamada of hamada (10:47)?,"CREATE TABLE table_name_56 (masaaki_mochizuki VARCHAR, gran_hamada VARCHAR);","SELECT masaaki_mochizuki FROM table_name_56 WHERE gran_hamada = ""hamada (10:47)"";","SELECT masaaki_mochizuki FROM table_name_56 WHERE gran_hamada = ""hamada (10:47)"";",1 "What is the total number of artworks in the 'Artworks' table, where the art_medium is 'Painting' or 'Sculpture'?","CREATE TABLE Artworks (id INT, art_category VARCHAR(255), artist_name VARCHAR(255), year INT, art_medium VARCHAR(255), price DECIMAL(10,2));","SELECT COUNT(*) as total FROM Artworks WHERE art_medium IN ('Painting', 'Sculpture');","SELECT COUNT(*) FROM Artworks WHERE art_medium IN ('Painting', 'Sculpture');",0 How many traffic accidents were reported in Texas in the past year?,"CREATE TABLE accidents (id INT, report_date DATE, city TEXT, type TEXT); ","SELECT COUNT(*) FROM accidents WHERE accidents.report_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND accidents.city IN (SELECT cities.name FROM cities WHERE cities.state = 'Texas');","SELECT COUNT(*) FROM accidents WHERE city = 'Texas' AND type = 'Traffic' AND report_date >= DATEADD(year, -1, GETDATE());",0 What is the name of the most recent Venus flyby mission?,"CREATE TABLE VenusMissions (id INT PRIMARY KEY, name VARCHAR(255), flyby_date DATE);",SELECT name FROM VenusMissions ORDER BY flyby_date DESC LIMIT 1;,SELECT name FROM VenusMissions ORDER BY flyby_date DESC LIMIT 1;,1 Find the total number of packages shipped to each destination in the last 5 days of September 2021,"CREATE TABLE Shipments (id INT, destination VARCHAR(50), packages INT, timestamp DATE); ","SELECT destination, SUM(packages) FROM Shipments WHERE timestamp BETWEEN '2021-09-26' AND '2021-09-30' GROUP BY destination;","SELECT destination, SUM(packages) as total_packages FROM Shipments WHERE timestamp >= DATEADD(day, -5, GETDATE()) GROUP BY destination;",0 "If the population density is 7,447.32, what is the population total number?","CREATE TABLE table_232458_1 (population__2010_census_ VARCHAR, pop_density__per_km²_ VARCHAR);","SELECT COUNT(population__2010_census_) FROM table_232458_1 WHERE pop_density__per_km²_ = ""7,447.32"";","SELECT COUNT(population__2010_census_) FROM table_232458_1 WHERE pop_density__per_km2_ = ""7,447.32"";",0 What is the name of the away team whose venue is Kardinia Park?,"CREATE TABLE table_name_73 (away_team VARCHAR, venue VARCHAR);","SELECT away_team FROM table_name_73 WHERE venue = ""kardinia park"";","SELECT away_team FROM table_name_73 WHERE venue = ""kardinia park"";",1 "What is Race 2, when Race 1 is ""18""?","CREATE TABLE table_name_42 (race_2 VARCHAR, race_1 VARCHAR);","SELECT race_2 FROM table_name_42 WHERE race_1 = ""18"";","SELECT race_2 FROM table_name_42 WHERE race_1 = ""18"";",1 What is the total wastewater treatment capacity for each city in China?,"CREATE TABLE wastewater_treatment_china(id INT, city VARCHAR(50), treatment_type VARCHAR(50), capacity INT, efficiency FLOAT); ","SELECT city, SUM(capacity) as total_capacity FROM wastewater_treatment_china GROUP BY city;","SELECT city, SUM(capacity) FROM wastewater_treatment_china GROUP BY city;",0 What is the age and nationality distribution of employees?,"CREATE TABLE EmployeeDemographics (EmployeeID INT, Age INT, Nationality VARCHAR(50)); ","SELECT Nationality, Age, COUNT(*) FROM EmployeeDemographics GROUP BY Nationality, Age;","SELECT Nationality, Age, COUNT(*) as Total_Employees FROM EmployeeDemographics GROUP BY Nationality, Age;",0 Update prize_pool by 20000 for event with name 'VirtuaCup',"esports_event (event_id, name, location, start_date, end_date, prize_pool, game_id)",UPDATE esports_event SET prize_pool = prize_pool + 20000 WHERE name = 'VirtuaCup',UPDATE esports_event SET prize_pool = prize_pool + 20000 WHERE name = 'VirtuaCup';,0 Which player from the Ironi Nahariya club was born in 1980?,"CREATE TABLE table_name_4 (player VARCHAR, current_club VARCHAR, year_born VARCHAR);","SELECT player FROM table_name_4 WHERE current_club = ""ironi nahariya"" AND year_born = 1980;","SELECT player FROM table_name_4 WHERE current_club = ""ironi nahariya"" AND year_born = ""1980"";",0 What are the most games when the points are 100 and goals for less than 356?,"CREATE TABLE table_name_23 (games INTEGER, points VARCHAR, goals_for VARCHAR);",SELECT MAX(games) FROM table_name_23 WHERE points = 100 AND goals_for < 356;,SELECT MAX(games) FROM table_name_23 WHERE points = 100 AND goals_for 356;,0 On what date was essendon the away team?,"CREATE TABLE table_name_57 (date VARCHAR, away_team VARCHAR);","SELECT date FROM table_name_57 WHERE away_team = ""essendon"";","SELECT date FROM table_name_57 WHERE away_team = ""essendon"";",1 Which marine species were found in a specific region in the last year?,"CREATE TABLE species_locations (id INT, species TEXT, location TEXT, sighting_date DATE); ",SELECT species FROM species_locations WHERE location = 'Atlantic' AND sighting_date >= DATE(NOW()) - INTERVAL 1 YEAR;,"SELECT species FROM species_locations WHERE location LIKE '%region%' AND sighting_date >= DATEADD(year, -1, GETDATE());",0 Insert a new record into the 'defense_diplomacy' table for 'Country A' and 'Country B' with a 'diplomacy_type' of 'Military Exercise',"CREATE TABLE defense_diplomacy (country1 VARCHAR(50), country2 VARCHAR(50), diplomacy_type VARCHAR(50));","INSERT INTO defense_diplomacy (country1, country2, diplomacy_type) VALUES ('Country A', 'Country B', 'Military Exercise');","INSERT INTO defense_diplomacy (country1, country2, diplomacy_type) VALUES ('Country A', 'Country B', 'Military Exercise');",1 What's the series number of the episode written by Dan Vebber?,"CREATE TABLE table_23242933_2 (no_in_series INTEGER, written_by VARCHAR);","SELECT MAX(no_in_series) FROM table_23242933_2 WHERE written_by = ""Dan Vebber"";","SELECT MAX(no_in_series) FROM table_23242933_2 WHERE written_by = ""Dan Vebber"";",1 What is the average advertising revenue in Japan for Q2 2022?,"CREATE TABLE ad_revenue (country VARCHAR(2), date DATE, revenue DECIMAL(10,2)); ",SELECT AVG(revenue) FROM ad_revenue WHERE country = 'JP' AND date BETWEEN '2022-04-01' AND '2022-06-30';,SELECT AVG(revenue) FROM ad_revenue WHERE country = 'Japan' AND date BETWEEN '2022-04-01' AND '2022-06-30';,0 What is the total of Final year that has a Notes of replaced by i-96?,"CREATE TABLE table_name_15 (final_year INTEGER, notes VARCHAR);","SELECT SUM(final_year) FROM table_name_15 WHERE notes = ""replaced by i-96"";","SELECT SUM(final_year) FROM table_name_15 WHERE notes = ""replaced by i-96"";",1 What is the average number of bronze medals won by Poland?,"CREATE TABLE table_name_67 (bronze INTEGER, nation VARCHAR);","SELECT AVG(bronze) FROM table_name_67 WHERE nation = ""poland"";","SELECT AVG(bronze) FROM table_name_67 WHERE nation = ""poland"";",1 What are the details of space missions that encountered asteroids?,"CREATE TABLE SpaceMissions (id INT, mission VARCHAR(255), year INT, organization VARCHAR(255)); CREATE TABLE AsteroidEncounters (id INT, mission_id INT, asteroid VARCHAR(255));","SELECT SpaceMissions.mission, SpaceMissions.year, SpaceMissions.organization, AsteroidEncounters.asteroid FROM SpaceMissions INNER JOIN AsteroidEncounters ON SpaceMissions.id = AsteroidEncounters.mission_id;","SELECT SpaceMissions.mission, AsteroidEncounters.asteroid FROM SpaceMissions INNER JOIN AsteroidEncounters ON SpaceMissions.id = AsteroidEncounters.mission_id;",0 How many historical sites in New York City have received funding for preservation in the last decade?,"CREATE TABLE historical_sites (id INT, name VARCHAR(255), city VARCHAR(255)); CREATE TABLE preservation_funding (id INT, site_id INT, funding_year INT); ",SELECT COUNT(*) FROM preservation_funding f JOIN historical_sites s ON f.site_id = s.id WHERE s.city = 'New York City' AND f.funding_year BETWEEN YEAR(CURRENT_DATE) - 10 AND YEAR(CURRENT_DATE);,SELECT COUNT(*) FROM preservation_funding JOIN historical_sites ON preservation_funding.site_id = historical_sites.id WHERE historical_sites.city = 'New York City' AND preservation_funding.funding_year >= 2020;,0 What is the average number of visitors for natural destinations in each country?,"CREATE TABLE Destinations (id INT PRIMARY KEY, country_id INT, name VARCHAR(255), type VARCHAR(255)); ","SELECT country_id, AVG(visitors) FROM Tourists t JOIN Destinations d ON t.country_id = d.country_id WHERE d.type = 'Natural' GROUP BY country_id;","SELECT country_id, AVG(CASE WHEN type = 'Natural' THEN 1 ELSE 0 END) as avg_visitors FROM Destinations GROUP BY country_id;",0 "What is the distribution of royalties by platform, for a specific artist?","CREATE TABLE royalties (royalty_id INT, artist_id INT, platform VARCHAR(50), amount DECIMAL(5,2));","SELECT r.platform, SUM(r.amount) AS total_royalties FROM royalties r WHERE r.artist_id = [artist_id] GROUP BY r.platform;","SELECT platform, AVG(amount) as avg_amount FROM royalties GROUP BY platform;",0 Calculate the average weight of shipments from Africa to Asia in October 2022,"CREATE TABLE Shipments (id INT, source VARCHAR(50), destination VARCHAR(50), weight FLOAT, ship_date DATE); ",SELECT AVG(weight) FROM Shipments WHERE (source = 'Egypt' OR source = 'Nigeria' OR source = 'South Africa') AND (destination = 'China' OR destination = 'Japan' OR destination = 'India') AND ship_date BETWEEN '2022-10-01' AND '2022-10-31';,SELECT AVG(weight) FROM Shipments WHERE source = 'Africa' AND destination = 'Asia' AND ship_date BETWEEN '2022-10-01' AND '2022-03-31';,0 What is the trend in funding received by startups founded by people from a specific region in the e-commerce sector over time?,"CREATE TABLE companies (id INT, name TEXT, founding_year INT, industry TEXT, founder_region TEXT, funding FLOAT);","SELECT founding_year, AVG(funding) FROM companies WHERE industry = 'e-commerce' AND founder_region = 'region_name' GROUP BY founding_year;","SELECT founder_region, SUM(funding) as total_funding FROM companies WHERE industry = 'e-commerce' GROUP BY founder_region;",0 What is the most popular workout by total time spent?,"CREATE TABLE workouts (id INT, member_id INT, workout_type VARCHAR(50), duration INT); CREATE TABLE members (id INT, name VARCHAR(50), age INT); ","SELECT workout_type, SUM(duration) AS total_time FROM workouts JOIN members ON workouts.member_id = members.id GROUP BY workout_type ORDER BY total_time DESC LIMIT 1;","SELECT w.workout_type, SUM(w.duration) as total_duration FROM workouts w JOIN members m ON w.member_id = m.id GROUP BY w.workout_type ORDER BY total_duration DESC LIMIT 1;",0 "Find the names of athletes who have participated in baseball and soccer, but not basketball.","CREATE TABLE athletes_2 (name TEXT, sport TEXT); ","SELECT name FROM athletes_2 WHERE sport IN ('Baseball', 'Soccer') AND name NOT IN (SELECT name FROM athletes_2 WHERE sport = 'Basketball');","SELECT name FROM athletes_2 WHERE sport IN ('Baseball', 'Soccer') AND sport!= 'Basketball';",0 Find the name of students who didn't take any course from Biology department.,"CREATE TABLE student (name VARCHAR, id VARCHAR); CREATE TABLE course (course_id VARCHAR, dept_name VARCHAR); CREATE TABLE takes (id VARCHAR, course_id VARCHAR);",SELECT name FROM student WHERE NOT id IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology');,SELECT T1.name FROM student AS T1 JOIN course AS T2 ON T1.id = T2.course_id JOIN takes AS T3 ON T2.course_id = T3.course_id WHERE T3.dept_name = 'Biology';,0 What is the total number of permits issued for residential and commercial buildings in the City of Angels?,"CREATE TABLE building_permit (permit_id INT, building_type VARCHAR(10), location VARCHAR(20));",SELECT SUM(permit_id) FROM building_permit WHERE location = 'City of Angels';,"SELECT COUNT(*) FROM building_permit WHERE building_type IN ('Residential', 'Commercial') AND location = 'City of Angels';",0 Find the average monthly production of Neodymium in 2020 from the 'production' table.,"CREATE TABLE production (element VARCHAR(10), year INT, month INT, quantity INT); ",SELECT AVG(quantity) FROM production WHERE element = 'Neodymium' AND year = 2020;,SELECT AVG(quantity) FROM production WHERE element = 'Neodymium' AND year = 2020;,1 Who has a rank great than 3 and a placing of 64?,"CREATE TABLE table_name_60 (name VARCHAR, rank VARCHAR, placings VARCHAR);","SELECT name FROM table_name_60 WHERE rank > 3 AND placings = ""64"";",SELECT name FROM table_name_60 WHERE rank > 3 AND placings = 64;,0 Find the name of airports which do not have any flight in and out.,"CREATE TABLE Flights (AirportName VARCHAR, AirportCode VARCHAR, SourceAirport VARCHAR, DestAirport VARCHAR); CREATE TABLE Airports (AirportName VARCHAR, AirportCode VARCHAR, SourceAirport VARCHAR, DestAirport VARCHAR);",SELECT AirportName FROM Airports WHERE NOT AirportCode IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights);,SELECT T1.AirportName FROM Flights AS T1 JOIN Airports AS T2 ON T1.AirportCode = T2.AirportCode WHERE T2.SourceAirport IS NULL AND T2.DestAirport IS NULL;,0 Who scored 68-73-66=207 in South Africa?,"CREATE TABLE table_name_70 (place VARCHAR, country VARCHAR, score VARCHAR);","SELECT place FROM table_name_70 WHERE country = ""south africa"" AND score = 68 - 73 - 66 = 207;","SELECT place FROM table_name_70 WHERE country = ""south africa"" AND score = 68 - 73 - 66 = 207;",1 What was the license award date for the ensemble from South Wales and the Severn Estuary that was on air in July 2001?,"CREATE TABLE table_name_67 (licence_award_date VARCHAR, on_air_date VARCHAR, region VARCHAR);","SELECT licence_award_date FROM table_name_67 WHERE on_air_date = ""july 2001"" AND region = ""south wales and the severn estuary"";","SELECT license_award_date FROM table_name_67 WHERE on_air_date = ""july 2001"" AND region = ""south wales and severn estuary"";",0 Get the number of players from each country who have adopted VR technology and the number of players who have not.,"CREATE TABLE Players (PlayerID INT PRIMARY KEY, PlayerName VARCHAR(100), Country VARCHAR(50), VRAdoption BOOLEAN); ","SELECT Country, SUM(CASE WHEN VRAdoption = TRUE THEN 1 ELSE 0 END) as NumPlayersWithVR, SUM(CASE WHEN VRAdoption = FALSE THEN 1 ELSE 0 END) as NumPlayersWithoutVR FROM Players GROUP BY Country;","SELECT Country, COUNT(*) as PlayerCount, COUNT(*) as PlayerCount FROM Players WHERE VRAdoption = TRUE GROUP BY Country;",0 "What is the average speed of spacecraft in the space_exploration table, ordered by their launch dates?","CREATE TABLE space_exploration (mission_name VARCHAR(50), launch_date DATE, max_speed NUMERIC(8,2)); ",SELECT AVG(max_speed) OVER (ORDER BY launch_date) FROM space_exploration;,"SELECT mission_name, launch_date, AVG(max_speed) as avg_speed FROM space_exploration GROUP BY mission_name, launch_date ORDER BY launch_date;",0 What is the average cost of military equipment sold in the Middle East in Q2 2022?,"CREATE TABLE military_sales (id INT, region VARCHAR(20), quarter VARCHAR(10), year INT, cost FLOAT); ",SELECT AVG(cost) FROM military_sales WHERE region = 'Middle East' AND quarter = 'Q2' AND year = 2022;,SELECT AVG(cost) FROM military_sales WHERE region = 'Middle East' AND quarter = 'Q2' AND year = 2022;,1 "What are the top 3 countries with the most security incidents in the past month, based on the 'security_incidents' table?","CREATE TABLE security_incidents (id INT, country VARCHAR(50), incident_count INT, incident_date DATE); ","SELECT country, COUNT(*) as incident_count FROM security_incidents WHERE incident_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY country ORDER BY incident_count DESC LIMIT 3;","SELECT country, incident_count FROM security_incidents WHERE incident_date >= DATEADD(month, -1, GETDATE()) GROUP BY country ORDER BY incident_count DESC LIMIT 3;",0 What is the average time taken by Shelly-Ann Fraser-Pryce in the 100m sprint?,"CREATE TABLE fraser_records (event VARCHAR(10), time DECIMAL(5,2)); ",SELECT AVG(time) FROM fraser_records WHERE event = '100m sprint';,SELECT AVG(time) FROM fraser_records WHERE event = '100m sprint';,1 Delete records from the customer_sales table for customers who have not made a purchase in the last 12 months.,"CREATE TABLE customer_sales (id INT, customer_name VARCHAR(255), region VARCHAR(255), quantity INT, last_purchase_date DATE); ","DELETE FROM customer_sales WHERE last_purchase_date < DATEADD(month, -12, CURRENT_TIMESTAMP);","DELETE FROM customer_sales WHERE last_purchase_date DATE_SUB(CURRENT_DATE, INTERVAL 12 MONTH);",0 "Insert a new shipment record with ID 124, warehouse ID 1, carrier ID 3, package count 600, and shipped date '2022-01-15'.","CREATE TABLE shipment (id INT PRIMARY KEY, warehouse_id INT, carrier_id INT, package_count INT, shipped_date DATE);","INSERT INTO shipment (id, warehouse_id, carrier_id, package_count, shipped_date) VALUES (124, 1, 3, 600, '2022-01-15');","INSERT INTO shipment (id, warehouse_id, carrier_id, package_count, shipped_date) VALUES (124, 1, 3, 600, '2022-01-15');",1 "How many volunteers signed up for each organization in Q1 of 2023, and what was the total number of hours they volunteered?","CREATE TABLE volunteers (id INT, volunteer_name TEXT, organization TEXT, signup_date DATE, hours INT); ","SELECT organization, COUNT(volunteer_name) as num_volunteers, SUM(hours) as total_hours FROM volunteers WHERE signup_date >= '2023-01-01' AND signup_date < '2023-04-01' GROUP BY organization;","SELECT organization, COUNT(*) as num_volunteers, SUM(hours) as total_hours FROM volunteers WHERE signup_date BETWEEN '2023-01-01' AND '2023-03-31' GROUP BY organization;",0 "Using a Ducati 999 F06 Bike, how many Laps with a Grid greater than 11 and Time of +53.488?","CREATE TABLE table_name_78 (laps VARCHAR, grid VARCHAR, bike VARCHAR, time VARCHAR);","SELECT COUNT(laps) FROM table_name_78 WHERE bike = ""ducati 999 f06"" AND time = ""+53.488"" AND grid > 11;","SELECT COUNT(laps) FROM table_name_78 WHERE bike = ""ducati 999 f06"" AND time = ""+53.488"" AND grid > 11;",1 Which Ratio has an in × in of 17 × 22?,"CREATE TABLE table_name_2 (ratio VARCHAR, in_×_in VARCHAR);","SELECT ratio FROM table_name_2 WHERE in_×_in = ""17 × 22"";","SELECT ratio FROM table_name_2 WHERE in__in = ""17 22"";",0 What team was he on when he had 10 f/laps?,"CREATE TABLE table_24491017_1 (team VARCHAR, f_laps VARCHAR);",SELECT team FROM table_24491017_1 WHERE f_laps = 10;,"SELECT team FROM table_24491017_1 WHERE f_laps = ""10"";",0 What is the Weight for the Name Billy Miller Category:Articles with hcards?,"CREATE TABLE table_name_45 (weight VARCHAR, name VARCHAR);","SELECT weight FROM table_name_45 WHERE name = ""billy miller category:articles with hcards"";","SELECT weight FROM table_name_45 WHERE name = ""billy miller category:articles with hcards"";",1 Which community policing programs are available in each borough?,"CREATE TABLE borough (id INT, name TEXT); CREATE TABLE community_policing (id INT, borough_id INT, program TEXT);","SELECT b.name, c.program FROM borough b JOIN community_policing c ON b.id = c.borough_id;","SELECT b.name, program FROM borough b JOIN community_policing cp ON b.id = cp.borough_id GROUP BY b.name;",0 Delete all records of cultural festivals in Egypt from the 'cultural_festivals' table.,"CREATE TABLE cultural_festivals (festival_id INT, festival_name TEXT, location TEXT); ",DELETE FROM cultural_festivals WHERE location = 'Egypt';,DELETE FROM cultural_festivals WHERE location = 'Egypt';,1 How many professional development courses were completed by teachers from each country?,"CREATE TABLE teachers (id INT, country TEXT);CREATE TABLE courses (id INT, teacher_id INT);CREATE TABLE course_completions (course_id INT, completion_date DATE);","SELECT teachers.country, COUNT(DISTINCT courses.id) as courses_completed FROM teachers INNER JOIN courses ON teachers.id = courses.teacher_id INNER JOIN course_completions ON courses.id = course_completions.course_id GROUP BY teachers.country;","SELECT t.country, COUNT(cc.course_id) FROM teachers t JOIN courses cc ON t.id = cc.teacher_id JOIN course_completions cc ON cc.course_id = cc.course_id GROUP BY t.country;",0 What is the match report of the match on 20 August?,"CREATE TABLE table_name_12 (match_report VARCHAR, date VARCHAR);","SELECT match_report FROM table_name_12 WHERE date = ""20 august"";","SELECT match_report FROM table_name_12 WHERE date = ""20 august"";",1 Which natural deodorant brands have the lowest sales in the Southern region?,"CREATE TABLE deodorant_sales(brand VARCHAR(255), region VARCHAR(255), sales FLOAT); CREATE TABLE deodorant_type(brand VARCHAR(255), type VARCHAR(255)); ","SELECT deodorant_sales.brand, deodorant_sales.sales FROM deodorant_sales INNER JOIN deodorant_type ON deodorant_sales.brand = deodorant_type.brand WHERE deodorant_sales.region = 'Southern' AND deodorant_type.type IN ('natural', 'aluminum-free') ORDER BY deodorant_sales.sales ASC;","SELECT brand, MIN(sales) FROM deodorant_sales JOIN deodorant_type ON deodorant_sales.brand = deodorant_type.brand WHERE region = 'Southern' GROUP BY brand;",0 How many attendees were there at events in 'Asia'?,"CREATE TABLE EventAttendance (attendee_id INT, event_id INT, event_location VARCHAR(50), attendee_date DATE); ",SELECT COUNT(*) AS total_attendees FROM EventAttendance WHERE event_location = 'Asia';,SELECT COUNT(*) FROM EventAttendance WHERE event_location = 'Asia';,0 What is the height in feet of number 10?,"CREATE TABLE table_name_77 (height_in_ft VARCHAR, no_s_ VARCHAR);","SELECT height_in_ft FROM table_name_77 WHERE no_s_ = ""10"";",SELECT height_in_ft FROM table_name_77 WHERE no_s_ = 10;,0 "Find the number of AI safety incidents and their severity, partitioned by incident type, ordered by severity in descending order?","CREATE TABLE ai_safety_incidents (incident_id INT, incident_type VARCHAR(50), severity DECIMAL(3,2)); ","SELECT incident_type, COUNT(*) as num_incidents, AVG(severity) as avg_severity FROM ai_safety_incidents GROUP BY incident_type ORDER BY avg_severity DESC;","SELECT incident_type, COUNT(*), SUM(severity) as total_incidents FROM ai_safety_incidents GROUP BY incident_type ORDER BY severity DESC;",0 What year was the Album/Song Speaking louder than before?,"CREATE TABLE table_name_39 (year INTEGER, album___song VARCHAR);","SELECT SUM(year) FROM table_name_39 WHERE album___song = ""speaking louder than before"";","SELECT MAX(year) FROM table_name_39 WHERE album___song = ""speaking louder than before"";",0 What is the earliest excavation date in the 'africa' region?,"CREATE TABLE ExcavationDates (SiteID INT, Region VARCHAR(50), ExcavationDate DATE); ",SELECT MIN(ExcavationDate) AS EarliestExcavationDate FROM ExcavationDates WHERE Region = 'africa';,SELECT MIN(ExcavationDate) FROM ExcavationDates WHERE Region = 'africa';,0 List all wildlife habitats in 'North America' with an area greater than 5000 sq. km.,"CREATE TABLE wildlife_habitats (name VARCHAR(255), area FLOAT, location VARCHAR(255)); ",SELECT name FROM wildlife_habitats WHERE location = 'North America' AND area > 5000;,SELECT name FROM wildlife_habitats WHERE area > 5000 AND location = 'North America';,0 How many concerts were sold out in France?,"CREATE TABLE Concerts (ConcertID INT, ArtistID INT, Venue VARCHAR(100), TicketRevenue DECIMAL(10,2), TotalTickets INT, SoldOut BOOLEAN); ",SELECT COUNT(*) FROM Concerts WHERE SoldOut = TRUE AND Country = 'France';,SELECT SUM(TotalTickets) FROM Concerts WHERE Venue = 'France' AND SoldOut = true;,0 What are the names of all satellites launched by India?,"CREATE TABLE Satellites (Id INT, Name VARCHAR(50), LaunchYear INT, Country VARCHAR(50)); ",SELECT Name FROM Satellites WHERE Country = 'India';,SELECT Name FROM Satellites WHERE Country = 'India';,1 Name the percentage of votes for violinist,"CREATE TABLE table_26267849_11 (percentage_of_votes VARCHAR, act VARCHAR);","SELECT percentage_of_votes FROM table_26267849_11 WHERE act = ""Violinist"";","SELECT percentage_of_votes FROM table_26267849_11 WHERE act = ""Violinist"";",1 What is the landfill capacity growth rate for Landfill B from 2018 to 2020?,"CREATE TABLE landfill_capacity (id INT, name VARCHAR(50), year INT, capacity INT); ",SELECT ((capacity - (SELECT capacity FROM landfill_capacity l2 WHERE l2.name = 'Landfill B' AND l2.year = 2018)) / (SELECT capacity FROM landfill_capacity l3 WHERE l3.name = 'Landfill B' AND l3.year = 2018)) * 100 FROM landfill_capacity WHERE name = 'Landfill B' AND year = 2020;,"SELECT year, capacity, ROW_NUMBER() OVER (ORDER BY capacity DESC) as growth_rate FROM landfill_capacity WHERE name = 'Landfill B' AND year BETWEEN 2018 AND 2020;",0 "What is the number of silver medals of the team with 0 gold, ranked 5, and more than 0 bronze medals?","CREATE TABLE table_name_84 (silver INTEGER, bronze VARCHAR, gold VARCHAR, rank VARCHAR);","SELECT SUM(silver) FROM table_name_84 WHERE gold = 0 AND rank = ""5"" AND bronze > 0;",SELECT SUM(silver) FROM table_name_84 WHERE gold = 0 AND rank = 5 AND bronze > 0;,0 Calculate the total number of maintenance activities for public works projects in Florida,"CREATE TABLE Infrastructure (id INT, name VARCHAR(255), type VARCHAR(255), location VARCHAR(255), is_public_works BOOLEAN); CREATE TABLE Maintenance (id INT, infrastructure_id INT, maintenance_date DATE, maintenance_type VARCHAR(255)); ",SELECT COUNT(*) FROM Maintenance INNER JOIN Infrastructure ON Maintenance.infrastructure_id = Infrastructure.id WHERE Infrastructure.location = 'Florida' AND Infrastructure.is_public_works = TRUE;,SELECT COUNT(*) FROM Maintenance JOIN Infrastructure ON Maintenance.infrastructure_id = Infrastructure.id WHERE Infrastructure.location = 'Florida' AND Infrastructure.is_public_works = true;,0 What is the lowest Hong Kong value with a 0 Brisbane value and a greater than 0 Kuala Lumpur value?,"CREATE TABLE table_name_52 (hong_kong INTEGER, brisbane VARCHAR, kuala_lumpur VARCHAR);",SELECT MIN(hong_kong) FROM table_name_52 WHERE brisbane = 0 AND kuala_lumpur > 0;,SELECT MIN(hong_kong) FROM table_name_52 WHERE brisbane = 0 AND kuala_lumpur > 0;,1 Which incumbent's democratic candidate was mike carroll?,"CREATE TABLE table_name_21 (incumbent VARCHAR, democratic VARCHAR);","SELECT incumbent FROM table_name_21 WHERE democratic = ""mike carroll"";","SELECT incumbent FROM table_name_21 WHERE democratic = ""mike carroll"";",1 Which artistic_genre had the highest number of attendees in 2022?,"CREATE TABLE Events (id INT PRIMARY KEY, name VARCHAR(30), year INT, artistic_genre VARCHAR(30), attendees INT); ","SELECT artistic_genre, MAX(attendees) FROM Events WHERE year = 2022 GROUP BY artistic_genre;","SELECT artistic_genre, MAX(attendees) FROM Events WHERE year = 2022 GROUP BY artistic_genre;",1 What is the average number of home runs hit by baseball players in the AL?,"CREATE TABLE baseball (id INT, player VARCHAR(50), team VARCHAR(50), league VARCHAR(50), homeruns INT); ",SELECT AVG(homeruns) FROM baseball WHERE league = 'AL';,SELECT AVG(homeruns) FROM baseball WHERE league = 'AL';,1 "What is the lowest attendance for a game before 10 weeks on November 12, 1967","CREATE TABLE table_name_37 (attendance INTEGER, week VARCHAR, date VARCHAR);","SELECT MIN(attendance) FROM table_name_37 WHERE week < 10 AND date = ""november 12, 1967"";","SELECT MIN(attendance) FROM table_name_37 WHERE week 10 AND date = ""november 12, 1967"";",0 Find the average climate finance investment in mitigation projects in Europe.,"CREATE TABLE climate_finance_mitigation_projects (project_id INT, sector TEXT, region TEXT, amount FLOAT); ",SELECT AVG(amount) FROM climate_finance_mitigation_projects WHERE sector = 'Climate Mitigation' AND region = 'Europe';,SELECT AVG(amount) FROM climate_finance_mitigation_projects WHERE region = 'Europe';,0 Identify top 3 investment strategies by ROI for Q3 2022 in the technology sector.,"CREATE TABLE investment_strategies (strategy_id INT, strategy_name TEXT, investment_date DATE, sector TEXT, amount FLOAT); CREATE TABLE returns (return_id INT, strategy_id INT, return_date DATE, return_amount FLOAT);","SELECT strategy_name, 100.0 * SUM(return_amount) / SUM(amount) AS roi FROM investment_strategies s JOIN returns r ON s.strategy_id = r.strategy_id WHERE investment_date BETWEEN '2022-07-01' AND '2022-09-30' AND sector = 'technology' GROUP BY strategy_id, strategy_name ORDER BY roi DESC LIMIT 3;","SELECT i.strategy_name, r.return_amount FROM investment_strategies i JOIN returns r ON i.strategy_id = r.strategy_id WHERE i.sector = 'Technology' AND r.return_date BETWEEN '2022-04-01' AND '2022-06-30' GROUP BY i.strategy_name ORDER BY r.return_amount DESC LIMIT 3;",0 "What is the total number for July with less than 8.05 in October, more than 4.46 in December, and more than 6.79 in November?","CREATE TABLE table_name_12 (july VARCHAR, november VARCHAR, october VARCHAR, december VARCHAR);",SELECT COUNT(july) FROM table_name_12 WHERE october < 8.05 AND december > 4.46 AND november > 6.79;,SELECT COUNT(july) FROM table_name_12 WHERE october 8.05 AND december > 4.46 AND november > 6.79;,0 List all sustainable tourism activities in Brazil and their respective capacities.,"CREATE TABLE sustainable_activities (activity_id INT, activity_name TEXT, country TEXT, capacity INT); ","SELECT activity_name, capacity FROM sustainable_activities WHERE country = 'Brazil';","SELECT activity_name, capacity FROM sustainable_activities WHERE country = 'Brazil';",1 List the number of circular supply chain initiatives for each vendor.,"CREATE TABLE Vendors (VendorID INT, VendorName TEXT, Country TEXT);CREATE TABLE SupplyChain (SupplyChainID INT, ProductID INT, VendorID INT, CircularSupplyChain BOOLEAN); ","SELECT v.VendorName, COUNT(s.SupplyChainID) FROM Vendors v LEFT JOIN SupplyChain s ON v.VendorID = s.VendorID AND s.CircularSupplyChain = true GROUP BY v.VendorID, v.VendorName;","SELECT Vendors.VendorName, COUNT(SupplyChain.SupplyChainID) FROM Vendors INNER JOIN SupplyChain ON Vendors.VendorID = SupplyChain.VendorID WHERE SupplyChain.CircularSupplyChain = TRUE GROUP BY Vendors.VendorName;",0 What is the last episode in the season that had 3.91 million viewers in the US?,"CREATE TABLE table_29154676_1 (season_no INTEGER, us_viewers__millions_ VARCHAR);","SELECT MIN(season_no) FROM table_29154676_1 WHERE us_viewers__millions_ = ""3.91"";","SELECT MIN(season_no) FROM table_29154676_1 WHERE us_viewers__millions_ = ""3.91"";",1 Who are the top 5 customers with the highest total quantity of returns for ethically produced clothing items?,"CREATE TABLE customers (id INT PRIMARY KEY, name VARCHAR(255), email VARCHAR(255)); CREATE TABLE returns (id INT PRIMARY KEY, product_id INT, customer_id INT, return_date DATE, FOREIGN KEY (product_id) REFERENCES products(id), FOREIGN KEY (customer_id) REFERENCES customers(id)); CREATE TABLE products (id INT PRIMARY KEY, name VARCHAR(255), category VARCHAR(255), is_ethical BOOLEAN, FOREIGN KEY (category) REFERENCES categories(name)); CREATE TABLE categories (name VARCHAR(255) PRIMARY KEY); CREATE VIEW returned_ethical_clothing AS SELECT customers.name AS customer_name, SUM(quantity) AS total_returned_quantity FROM returns JOIN products ON returns.product_id = products.id JOIN categories ON products.category = categories.name WHERE categories.name = 'Clothing' AND products.is_ethical = TRUE GROUP BY customers.name;","SELECT customer_name, total_returned_quantity FROM returned_ethical_clothing ORDER BY total_returned_quantity DESC LIMIT 5;","SELECT c.name, SUM(r.total_returned_quantity) as total_returned_quantity FROM customers c JOIN returned_ethical_clothing r ON c.id = r.customer_id JOIN products p ON r.product_id = p.id WHERE p.is_ethical = true GROUP BY c.name ORDER BY total_returned_quantity DESC LIMIT 5;",0 At which tournament does Milan play against Hungary's league selection?,"CREATE TABLE table_name_97 (tournament VARCHAR, opponent_team VARCHAR);","SELECT tournament FROM table_name_97 WHERE opponent_team = ""hungary's league selection"";","SELECT tournament FROM table_name_97 WHERE opponent_team = ""hungary"";",0 What is the minimum score obtained in the game 'Quantum Quest'?,"CREATE TABLE Game_Scores (Player_ID INT, Player_Name VARCHAR(50), Game_Name VARCHAR(50), Score INT); ",SELECT MIN(Score) FROM Game_Scores WHERE Game_Name = 'Quantum Quest';,SELECT MIN(Score) FROM Game_Scores WHERE Game_Name = 'Quantum Quest';,1 "What is the total number of space missions conducted by NASA and Russia between 1990 and 2000, excluding failed missions?","CREATE TABLE space_exploration (mission VARCHAR(50), country VARCHAR(50), mission_status VARCHAR(50), year INT); ","SELECT SUM(mission_status = 'Success') FROM space_exploration WHERE country IN ('NASA', 'Russia') AND year BETWEEN 1990 AND 2000;","SELECT COUNT(*) FROM space_exploration WHERE country IN ('USA', 'Russia') AND year BETWEEN 1990 AND 2000 AND mission_status IS NOT NULL;",0 "Find the average price of REE per ton in 2020 and 2021, including standard deviation?","CREATE TABLE prices (year INT, price DECIMAL(5,2)); ","SELECT AVG(price) AS avg_price, STDDEV(price) AS stddev_price FROM prices WHERE year IN (2020, 2021) GROUP BY year;","SELECT AVG(price) FROM prices WHERE year IN (2020, 2021) GROUP BY year;",0 What is the fewest area in Derrynanool townland?,"CREATE TABLE table_30120556_1 (area__acres__ INTEGER, townland VARCHAR);","SELECT MIN(area__acres__) FROM table_30120556_1 WHERE townland = ""Derrynanool"";","SELECT MIN(area__acres__) FROM table_30120556_1 WHERE townland = ""Derrynanool"";",1 What is the Martin McGuinness with a David Norris that is 10.3%?,"CREATE TABLE table_name_16 (martin_mcguinness VARCHAR, david_norris VARCHAR);","SELECT martin_mcguinness FROM table_name_16 WHERE david_norris = ""10.3%"";","SELECT martin_mcguinness FROM table_name_16 WHERE david_norris = ""10.3%"";",1 How many unique users have streamed hip-hop music from users in the USA?,"CREATE TABLE streams (id INT, user_id INT, genre TEXT, location TEXT); ",SELECT COUNT(DISTINCT user_id) FROM streams WHERE genre = 'Hip-Hop' AND location = 'USA';,SELECT COUNT(DISTINCT user_id) FROM streams WHERE genre = 'Hip-Hop' AND location = 'USA';,1 Who were the Opponents in the Match with Partner Rushmi Chakravarthi?,"CREATE TABLE table_name_80 (opponents VARCHAR, partner VARCHAR);","SELECT opponents FROM table_name_80 WHERE partner = ""rushmi chakravarthi"";","SELECT opponents FROM table_name_80 WHERE partner = ""rushmi chakravarthi"";",1 "What is Opponent, when October is less than 31, and when Game is greater than 7?","CREATE TABLE table_name_12 (opponent VARCHAR, october VARCHAR, game VARCHAR);",SELECT opponent FROM table_name_12 WHERE october < 31 AND game > 7;,SELECT opponent FROM table_name_12 WHERE october 31 AND game > 7;,0 What was Arkady Vyatchanin's time?,"CREATE TABLE table_name_86 (time VARCHAR, name VARCHAR);","SELECT time FROM table_name_86 WHERE name = ""arkady vyatchanin"";","SELECT time FROM table_name_86 WHERE name = ""arkady vyatchanin"";",1 What is the total number of mobile subscribers in the 'urban' subscriber_type?,"CREATE TABLE subscribers (subscriber_id INT, subscriber_type VARCHAR(50)); ",SELECT COUNT(*) FROM subscribers WHERE subscriber_type = 'urban';,SELECT COUNT(*) FROM subscribers WHERE subscriber_type = 'urban' AND subscriber_type ='mobile';,0 What is the total claim amount for policyholders in California with 'Life' policy_type?,"CREATE TABLE policyholders (id INT, name VARCHAR(50), age INT, gender VARCHAR(10), policy_type VARCHAR(10), state VARCHAR(20)); ",SELECT SUM(claim_amount) FROM claims JOIN policyholders ON claims.policyholder_id = policyholders.id WHERE policyholders.state = 'California' AND policyholders.policy_type = 'Life';,SELECT SUM(claim_amount) FROM claim_amount WHERE policy_type = 'Life' AND state = 'California';,0 What is the maximum budget allocated for public service delivery in each department?,"CREATE TABLE DepartmentBudget (Department TEXT, Budget INTEGER); ","SELECT Department, MAX(Budget) FROM DepartmentBudget;","SELECT Department, MAX(Budget) FROM DepartmentBudget GROUP BY Department;",0 Who is the co-driver for the 6th position and more than 159 laps?,"CREATE TABLE table_name_36 (co_driver VARCHAR, position VARCHAR, laps VARCHAR);","SELECT co_driver FROM table_name_36 WHERE position = ""6th"" AND laps > 159;","SELECT co_driver FROM table_name_36 WHERE position = ""6th"" AND laps > 159;",1 Which irrigation systems were used in vineyards located in France and Spain?,"CREATE TABLE vineyards (id INT, country VARCHAR(255), irrigation_system VARCHAR(255));","SELECT irrigation_system FROM vineyards WHERE country IN ('France', 'Spain') GROUP BY irrigation_system;","SELECT irrigation_system FROM vineyards WHERE country IN ('France', 'Spain');",0 "Find the minimum number of employees per mining site, grouped by mineral type, for mining sites having a production date on or after 2015-01-01 and located in Asia.","CREATE TABLE mining_site_3 (site_id INT, mineral_type VARCHAR(50), production_date DATE, num_employees INT, region VARCHAR(50)); ","SELECT mineral_type, MIN(num_employees) as min_employees FROM mining_site_3 WHERE production_date >= '2015-01-01' AND region = 'Asia' GROUP BY mineral_type;","SELECT mineral_type, MIN(num_employees) FROM mining_site_3 WHERE production_date >= '2015-01-01' AND region = 'Asia' GROUP BY mineral_type;",0 What is the most number of rounds that the Team from RBR Enterprises and having a Chevrolet Silverado ran?,"CREATE TABLE table_name_40 (rounds INTEGER, truck_s_ VARCHAR, team VARCHAR);","SELECT MAX(rounds) FROM table_name_40 WHERE truck_s_ = ""chevrolet silverado"" AND team = ""rbr enterprises"";","SELECT MAX(rounds) FROM table_name_40 WHERE truck_s_ = ""chevrolet silverado"" AND team = ""rbr enterprises"";",1 What is the San Javier municipality percentage if the Cuatro Cañadas municipality percentage is 202?,"CREATE TABLE table_19998428_3 (san_javier_municipality___percentage_ VARCHAR, cuatro_cañadas_municipality___percentage_ VARCHAR);","SELECT san_javier_municipality___percentage_ FROM table_19998428_3 WHERE cuatro_cañadas_municipality___percentage_ = ""202"";","SELECT san_javier_municipality___percentage_ FROM table_19998428_3 WHERE cuatro_caadas_municipality___percentage_ = ""202"";",0 "Elevation of 12,183 feet 3713 m is what average route?","CREATE TABLE table_name_12 (route INTEGER, elevation VARCHAR);","SELECT AVG(route) FROM table_name_12 WHERE elevation = ""12,183 feet 3713 m"";","SELECT AVG(route) FROM table_name_12 WHERE elevation = ""12,183 feet 3713 m"";",1 What is the average depth of marine life research stations in the Pacific Ocean?,"CREATE TABLE marine_life_research_stations (station_id INT, station_name TEXT, location TEXT, depth FLOAT); ",SELECT AVG(depth) FROM marine_life_research_stations WHERE location = 'Pacific Ocean';,SELECT AVG(depth) FROM marine_life_research_stations WHERE location = 'Pacific Ocean';,1 Insert new waste generation records for the 'Mountain' region in 2024 with a waste_gram of 55000.,"CREATE TABLE waste_generation(region VARCHAR(20), year INT, waste_gram INT); ","INSERT INTO waste_generation(region, year, waste_gram) VALUES('Mountain', 2024, 55000);","INSERT INTO waste_generation (region, year, waste_gram) VALUES ('Mountain', 2024, 55000);",0 Which education programs are associated with the 'community_education' table?,"CREATE TABLE community_education (education_id INT, program_name VARCHAR(50), description TEXT); ",SELECT program_name FROM community_education;,SELECT program_name FROM community_education;,1 "Present humanitarian assistance provided by the United States, sorted by year","CREATE TABLE humanitarian_assistance (id INT, provider_country VARCHAR(255), recipient_country VARCHAR(255), amount FLOAT, year INT);","SELECT recipient_country, amount FROM humanitarian_assistance WHERE provider_country = 'United States' ORDER BY year;","SELECT year, provider_country, amount FROM humanitarian_assistance WHERE provider_country = 'United States' ORDER BY year;",0 Which December is the lowest one that has Points of 52?,"CREATE TABLE table_name_96 (december INTEGER, points VARCHAR);",SELECT MIN(december) FROM table_name_96 WHERE points = 52;,SELECT MIN(december) FROM table_name_96 WHERE points = 52;,1 "What is the total number of UEFA Cup(s), when Total is greater than 3?","CREATE TABLE table_name_44 (uefa_cup VARCHAR, total INTEGER);",SELECT COUNT(uefa_cup) FROM table_name_44 WHERE total > 3;,SELECT COUNT(uefa_cup) FROM table_name_44 WHERE total > 3;,1 "How many weeks have September 14, 2008 as the date?","CREATE TABLE table_name_79 (week INTEGER, date VARCHAR);","SELECT SUM(week) FROM table_name_79 WHERE date = ""september 14, 2008"";","SELECT SUM(week) FROM table_name_79 WHERE date = ""september 14, 2008"";",1 Which fields in the 'South Atlantic' region produced more than 10000 barrels of oil daily in 2021?,"CREATE TABLE wells (well_id INT, field VARCHAR(50), region VARCHAR(50), production_oil FLOAT, production_gas FLOAT, production_date DATE); ",SELECT field FROM wells WHERE region = 'South Atlantic' AND production_oil > 10000 AND YEAR(production_date) = 2021;,SELECT field FROM wells WHERE region = 'South Atlantic' AND production_oil > 10000 AND production_date BETWEEN '2021-01-01' AND '2021-12-31';,0 Insert a record for a Tilapia farm in Egypt,"CREATE TABLE farm_locations (location_id INT PRIMARY KEY, location_name VARCHAR(255), country VARCHAR(255), ocean VARCHAR(255));","INSERT INTO farm_locations (location_id, location_name, country, ocean) VALUES (2, 'Egypt Tilapia Farm', 'Egypt', 'Mediterranean Sea');","INSERT INTO farm_locations (location_id, location_name, country, ocean) VALUES (1, 'Tilapia Farm', 'Egypt', 'Egypt');",0 What score to highest to par did Mike Weir achieve?,"CREATE TABLE table_name_33 (to_par INTEGER, player VARCHAR);","SELECT MAX(to_par) FROM table_name_33 WHERE player = ""mike weir"";","SELECT MAX(to_par) FROM table_name_33 WHERE player = ""mike weir"";",1 What is the highest round number for the player who came from team Missouri?,"CREATE TABLE table_name_38 (round INTEGER, school_club_team VARCHAR);","SELECT MAX(round) FROM table_name_38 WHERE school_club_team = ""missouri"";","SELECT MAX(round) FROM table_name_38 WHERE school_club_team = ""moscow"";",0 How many home team scores have a time of 4:40 PM?,"CREATE TABLE table_14425454_1 (home_team VARCHAR, time VARCHAR);","SELECT COUNT(home_team) AS score FROM table_14425454_1 WHERE time = ""4:40 PM"";","SELECT COUNT(home_team) FROM table_14425454_1 WHERE time = ""4:40 PM"";",0 How many community health centers are there in each state?,"CREATE TABLE community_health_centers (center_id INT, center_name TEXT, state TEXT); ","SELECT state, COUNT(*) FROM community_health_centers GROUP BY state;","SELECT state, COUNT(*) FROM community_health_centers GROUP BY state;",1 What is the minimum impact measurement for companies based in Europe?,"CREATE TABLE companies (company_id INT, region VARCHAR(50), impact_measurement FLOAT); ",SELECT MIN(impact_measurement) FROM companies WHERE region = 'Europe';,SELECT MIN(impact_measurement) FROM companies WHERE region = 'Europe';,1 "What is the total billing amount per case outcome, grouped by attorney?","CREATE TABLE Attorneys (AttorneyID int, Name varchar(50), Region varchar(10)); CREATE TABLE Cases (CaseID int, AttorneyID int, Outcome varchar(10), BillingID int); CREATE TABLE Billing (BillingID int, Amount decimal(10,2)); ","SELECT A.Name, C.Outcome, SUM(B.Amount) as TotalBilling FROM Attorneys A JOIN Cases C ON A.AttorneyID = C.AttorneyID JOIN Billing B ON C.BillingID = B.BillingID GROUP BY A.Name, C.Outcome;","SELECT Attorneys.Name, Cases.Outcome, SUM(Billing.Amount) as TotalBilling FROM Attorneys INNER JOIN Cases ON Attorneys.AttorneyID = Cases.AttorneyID INNER JOIN Billing ON Cases.BillingID = Billing.BillingID GROUP BY Attorneys.Name, Cases.Outcome;",0 Which are the galleries that have exhibited artworks from female artists born before 1900?,"CREATE TABLE Galleries (GalleryID int, GalleryName varchar(50)); CREATE TABLE Artists (ArtistID int, ArtistName varchar(50), Gender varchar(10), BirthYear int); CREATE TABLE Artworks (ArtworkID int, ArtistID int, GalleryID int, ArtworkTitle varchar(50));",SELECT Galleries.GalleryName FROM Galleries INNER JOIN Artworks ON Galleries.GalleryID = Artworks.GalleryID INNER JOIN Artists ON Artworks.ArtistID = Artists.ArtistID WHERE Artists.Gender = 'female' AND Artists.BirthYear < 1900;,SELECT Galleries.GalleryName FROM Galleries INNER JOIN Artists ON Galleries.GalleryID = Artists.GalleryID INNER JOIN Artworks ON Artists.ArtistID = Artworks.ArtistID WHERE Artists.Gender = 'Female' AND Artists.BirthYear 1900;,0 What is Vuelta a Ecuador's lowest UCI Rating?,"CREATE TABLE table_name_3 (uci_rating INTEGER, race_name VARCHAR);","SELECT MIN(uci_rating) FROM table_name_3 WHERE race_name = ""vuelta a ecuador"";","SELECT MIN(uci_rating) FROM table_name_3 WHERE race_name = ""vuelta a ecuador"";",1 Avg. revenue of Latin music released between 2010-2020,"CREATE TABLE Music_Data (title VARCHAR(255), genre VARCHAR(50), release_date DATE, revenue INT);",SELECT AVG(revenue) FROM Music_Data WHERE genre = 'Latin' AND release_date BETWEEN '2010-01-01' AND '2020-12-31';,SELECT AVG(revenue) FROM Music_Data WHERE genre = 'Latin' AND release_date BETWEEN '2010-01-01' AND '2020-12-31';,1 What is the sum of account balances for socially responsible lending accounts in the Midwest region?,"CREATE TABLE midwest_region (region VARCHAR(20), account_type VARCHAR(30), account_balance DECIMAL(10,2)); ",SELECT SUM(account_balance) FROM midwest_region WHERE account_type = 'Socially Responsible Lending';,SELECT SUM(account_balance) FROM midwest_region WHERE account_type = 'Socially Responsible Lending';,1 what's the won with points against being 597,"CREATE TABLE table_13758945_3 (won VARCHAR, points_against VARCHAR);","SELECT won FROM table_13758945_3 WHERE points_against = ""597"";",SELECT won FROM table_13758945_3 WHERE points_against = 597;,0 "What is the average caloric intake for users in the ""Vegetarian"" diet group for the past week?","CREATE TABLE user_info (id INT, user_name TEXT, diet TEXT); CREATE TABLE meals (id INT, user_id INT, calories INT, meal_date DATE); ","SELECT AVG(calories) FROM (SELECT calories FROM meals JOIN user_info ON user_info.id = meals.user_id WHERE diet = 'Vegetarian' AND meal_date BETWEEN DATE_SUB(CURRENT_DATE(), INTERVAL 1 WEEK) AND CURRENT_DATE()) AS subquery;","SELECT AVG(calories) FROM meals JOIN user_info ON meals.user_id = user_info.id WHERE diet = 'Vegetarian' AND meal_date >= DATEADD(week, -1, GETDATE());",0 What is the total number of COVID-19 cases by race?,"CREATE TABLE race (race_id INT, race_name TEXT); CREATE TABLE cases (case_id INT, case_date DATE, race_id INT); ","SELECT r.race_name, COUNT(c.case_id) as total_cases FROM race r INNER JOIN cases c ON r.race_id = c.race_id GROUP BY r.race_id;","SELECT r.race_name, COUNT(c.case_id) as total_cases FROM race r JOIN cases c ON r.race_id = c.race_id WHERE c.case_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY r.race_name;",0 "What is the local mission that has none as a local location, high commissioner as a local position, fiji as a resident county, and a mission of tonga?","CREATE TABLE table_name_41 (Local VARCHAR, mission VARCHAR, resident_country VARCHAR, local_location VARCHAR, local_position VARCHAR);","SELECT Local AS mission FROM table_name_41 WHERE local_location = ""none"" AND local_position = ""high commissioner"" AND resident_country = ""fiji"" AND mission = ""tonga"";","SELECT Local FROM table_name_41 WHERE local_location = ""none"" AND local_position = ""high commissioner"" AND resident_country = ""fiji"" AND mission = ""tonga"";",0 What is the district of the incumbent Thomas Larkin Thompson?,"CREATE TABLE table_name_37 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_name_37 WHERE incumbent = ""thomas larkin thompson"";","SELECT district FROM table_name_37 WHERE incumbent = ""thomas larkin thompson"";",1 How many Olympic medals has Usain Bolt won?,"CREATE TABLE olympic_athletes (athlete_id INT, name VARCHAR(50), country VARCHAR(50), medals INT); ",SELECT medals FROM olympic_athletes WHERE name = 'Usain Bolt';,SELECT medals FROM olympic_athletes WHERE name = 'Usain Bolt';,1 "What is the qual 2 of team Forsythe racing, which has a 1:09.515 best?","CREATE TABLE table_name_42 (qual_2 VARCHAR, team VARCHAR, best VARCHAR);","SELECT qual_2 FROM table_name_42 WHERE team = ""forsythe racing"" AND best = ""1:09.515"";","SELECT qual_2 FROM table_name_42 WHERE team = ""forsythe racing"" AND best = ""1:09.515"";",1 Delete local businesses in Lisbon that have not benefited from sustainable tourism,"CREATE TABLE local_businesses (business_id INT, name TEXT, city TEXT, daily_revenue FLOAT, benefited_from_sustainable_tourism BOOLEAN); ",DELETE FROM local_businesses WHERE city = 'Lisbon' AND benefited_from_sustainable_tourism = false;,DELETE FROM local_businesses WHERE city = 'Lisbon' AND benefited_from_sustainable_tourism = false;,1 What is the Label of the B0011141-01 Catalog?,"CREATE TABLE table_name_60 (label VARCHAR, catalog VARCHAR);","SELECT label FROM table_name_60 WHERE catalog = ""b0011141-01"";","SELECT label FROM table_name_60 WHERE catalog = ""b0011141-01"";",1 "Who was the opponent with a score of 4-6, 7-5, 4-6?","CREATE TABLE table_name_25 (opponent VARCHAR, score VARCHAR);","SELECT opponent FROM table_name_25 WHERE score = ""4-6, 7-5, 4-6"";","SELECT opponent FROM table_name_25 WHERE score = ""4-6, 7-5, 4-6"";",1 What is the total number of schools in the state of New York?,"CREATE TABLE Schools (SchoolID int, SchoolName varchar(255), State varchar(255), City varchar(255)); ",SELECT COUNT(*) FROM Schools WHERE State = 'New York';,SELECT COUNT(*) FROM Schools WHERE State = 'New York';,1 What date did the capitols play the toronto maple leafs?,"CREATE TABLE table_23308178_6 (date VARCHAR, opponent VARCHAR);","SELECT date FROM table_23308178_6 WHERE opponent = ""Toronto Maple Leafs"";","SELECT date FROM table_23308178_6 WHERE opponent = ""Toronto Maple Leafs"";",1 "List the community development initiatives with their respective funding sources in 2019, ordered by the amount of funds received?","CREATE TABLE community_development (id INT, initiative_name VARCHAR(100), initiative_type VARCHAR(50), funding_source VARCHAR(50), funds_received FLOAT, start_date DATE, end_date DATE);","SELECT initiative_name, funding_source, funds_received FROM community_development WHERE YEAR(start_date) = 2019 ORDER BY funds_received DESC;","SELECT initiative_name, funding_source, funds_received FROM community_development WHERE start_date BETWEEN '2019-01-01' AND '2019-12-31' ORDER BY funds_received DESC;",0 What is the minimum monthly bill for broadband subscribers in the city of San Francisco?,"CREATE TABLE broadband_subscribers (subscriber_id INT, monthly_bill FLOAT, city VARCHAR(20)); ",SELECT MIN(monthly_bill) FROM broadband_subscribers WHERE city = 'San Francisco';,SELECT MIN(monthly_bill) FROM broadband_subscribers WHERE city = 'San Francisco';,1 What was Essendon's opponents away score?,"CREATE TABLE table_name_40 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team AS score FROM table_name_40 WHERE home_team = ""essendon"";","SELECT away_team AS score FROM table_name_40 WHERE home_team = ""essendon"";",1 "What is the average media literacy score for creators by gender, for creators in Canada?","CREATE TABLE creators (id INT, gender VARCHAR(10), media_literacy_score FLOAT, country VARCHAR(20)); ","SELECT gender, AVG(media_literacy_score) AS avg_score FROM creators WHERE country = 'Canada' GROUP BY gender;","SELECT gender, AVG(media_literacy_score) FROM creators WHERE country = 'Canada' GROUP BY gender;",0 Which crops are grown in the same locations as 'Barley'?,"CREATE TABLE crops (id INT PRIMARY KEY, name VARCHAR(50), growth_season VARCHAR(50), location VARCHAR(50)); ",SELECT crops.name FROM crops WHERE crops.location IN (SELECT crops.location FROM crops WHERE crops.name = 'Barley');,SELECT name FROM crops WHERE location = 'Barley';,0 Display the total population of fish for each species in the 'AquaticSpecies' table,"CREATE TABLE AquaticSpecies (id INT, species VARCHAR(255), population INT); ","SELECT species, SUM(population) FROM AquaticSpecies GROUP BY species;","SELECT species, SUM(population) FROM AquaticSpecies GROUP BY species;",1 Delete records from the 'military_equipment' table where 'equipment_type' is 'aircraft' and 'last_maintenance_date' is older than 2020-01-01,"CREATE TABLE military_equipment (equipment_id INT PRIMARY KEY, equipment_type VARCHAR(255), last_maintenance_date DATE, equipment_status VARCHAR(255));",DELETE FROM military_equipment WHERE equipment_type = 'aircraft' AND last_maintenance_date < '2020-01-01';,DELETE FROM military_equipment WHERE equipment_type = 'aircraft' AND last_maintenance_date '2020-01-01';,0 What is the finishing time with a 2/1q finish on the Meadowlands track?,"CREATE TABLE table_name_10 (fin_time VARCHAR, finish VARCHAR, track VARCHAR);","SELECT fin_time FROM table_name_10 WHERE finish = ""2/1q"" AND track = ""the meadowlands"";","SELECT fin_time FROM table_name_10 WHERE finish = ""2/1q"" AND track = ""meadowlands"";",0 What is the minimum donation amount made by donors from each country in Q3 of 2021?,"CREATE TABLE Donors (id INT, name TEXT, country TEXT, donation FLOAT, quarter TEXT, year INT); ","SELECT country, MIN(donation) FROM Donors WHERE quarter = 'Q3' AND year = 2021 GROUP BY country;","SELECT country, MIN(donation) FROM Donors WHERE quarter = 3 AND year = 2021 GROUP BY country;",0 "What is the number of hospitals and their respective states, ordered by the number of hospitals in descending order?","CREATE TABLE hospitals (id INT, name TEXT, num_beds INT, city TEXT, state TEXT); ","SELECT state, COUNT(*) as num_hospitals FROM hospitals GROUP BY state ORDER BY num_hospitals DESC;","SELECT state, COUNT(*) as hospital_count FROM hospitals GROUP BY state ORDER BY hospital_count DESC;",0 Update the 'events' table to correct the date of the 'Lecture on Pompeii frescoes',"CREATE TABLE events (id INT PRIMARY KEY, site_id INT, date DATE, attendees INT, notes TEXT);",UPDATE events SET date = '2023-06-12' WHERE notes = 'Lecture on Pompeii frescoes';,UPDATE events SET date = '2022-01-01' WHERE site_id = 1 AND notes LIKE '%Lecture on Pompeii frescoes%';,0 "Show the number of heritage sites in each country in Europe, ordered from the most to the least, along with their respective percentage in relation to the total number of heritage sites in Europe.","CREATE TABLE UNESCO_Heritage_Sites (id INT, country VARCHAR(50), site VARCHAR(100)); ","SELECT country, COUNT(site) as num_sites, ROUND(COUNT(site) * 100.0 / (SELECT COUNT(*) FROM UNESCO_Heritage_Sites WHERE country = 'Europe'), 2) as percentage FROM UNESCO_Heritage_Sites WHERE country = 'Europe' GROUP BY country ORDER BY num_sites DESC;","SELECT country, COUNT(*) as num_sites, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM UNESCO_Heritage_Sites WHERE country IN ('Germany', 'France', 'Italy', 'Italy')) as num_sites, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM UNESCO_Heritage_Sites WHERE country IN ('France', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy",0 Insert a new record into the 'programs' table for 'Environmental Sustainability' program in the 'Southwest' region,"CREATE TABLE programs (id INT, program_name TEXT, region TEXT);","INSERT INTO programs (id, program_name, region) VALUES (1, 'Environmental Sustainability', 'Southwest');","INSERT INTO programs (id, program_name, region) VALUES (1, 'Environmental Sustainability', 'Southwest');",1 Which countries have launched more than 5 satellites in a year?,"CREATE TABLE international_satellite_launches (id INT, launch_year INT, country VARCHAR(50), satellites INT); ","SELECT country, SUM(satellites) as total_satellites FROM international_satellite_launches GROUP BY country HAVING total_satellites > 5;",SELECT country FROM international_satellite_launches WHERE satellites > 5;,0 "What is the change in timber production between 2018 and 2019, by species, and rank them by the largest increase first?","CREATE TABLE species_timber (species_id INT, species_name VARCHAR(50), year INT, volume INT); ","SELECT species_id, species_name, (volume - LAG(volume, 1) OVER (PARTITION BY species_name ORDER BY year)) AS volume_change, RANK() OVER (ORDER BY volume_change DESC) AS volume_rank FROM species_timber WHERE year IN (2018, 2019) GROUP BY species_id, species_name, volume, year ORDER BY year, volume_rank ASC;","SELECT species_name, SUM(volume) as total_volume FROM species_timber WHERE year BETWEEN 2018 AND 2019 GROUP BY species_name ORDER BY total_volume DESC;",0 What was the date of the game held at Invesco Field?,"CREATE TABLE table_name_8 (date VARCHAR, game_site VARCHAR);","SELECT date FROM table_name_8 WHERE game_site = ""invesco field"";","SELECT date FROM table_name_8 WHERE game_site = ""invesco field"";",1 What is the maximum budget allocated for defense diplomacy by African Union countries in 2022?,"CREATE SCHEMA defense_diplomacy;CREATE TABLE african_union_budget (country VARCHAR(50), budget INT, year INT);",SELECT MAX(budget) FROM defense_diplomacy.african_union_budget WHERE year = 2022;,SELECT MAX(budget) FROM defense_diplomacy.african_union_budget WHERE year = 2022;,1 What is the average ice thickness in the Arctic per month since 2010?,"CREATE TABLE ice_thickness (month INT, year INT, ice_thickness FLOAT); ","SELECT t.month, AVG(t.ice_thickness) as avg_thickness FROM ice_thickness t GROUP BY t.month;",SELECT AVG(ice_thickness) FROM ice_thickness WHERE year >= 2010;,0 Which countries have the highest military spending per capita in peacekeeping operations?,"CREATE TABLE peacekeeping_operations (id INT, country VARCHAR, military_spending FLOAT, population INT);","SELECT country, (military_spending / population) AS military_spending_per_capita FROM peacekeeping_operations ORDER BY military_spending_per_capita DESC;","SELECT country, military_spending, population FROM peacekeeping_operations ORDER BY military_spending DESC LIMIT 1;",0 How many catches did Clifford McWatt have? ,"CREATE TABLE table_27771406_1 (catches INTEGER, player VARCHAR);","SELECT MIN(catches) FROM table_27771406_1 WHERE player = ""Clifford McWatt"";","SELECT MAX(catches) FROM table_27771406_1 WHERE player = ""Clifford McWatt"";",0 What is the distribution of students with disabilities by disability type and ethnicity?,"CREATE TABLE Students_With_Disabilities (id INT, student_id INT, disability_type VARCHAR(50), ethnicity VARCHAR(50)); ","SELECT Students_With_Disabilities.disability_type, Students_With_Disabilities.ethnicity, COUNT(*) as total FROM Students_With_Disabilities GROUP BY Students_With_Disabilities.disability_type, Students_With_Disabilities.ethnicity;","SELECT disability_type, ethnicity, COUNT(*) as num_students FROM Students_With_Disabilities GROUP BY disability_type, ethnicity;",0 Show the title and director for all films.,"CREATE TABLE film (title VARCHAR, directed_by VARCHAR);","SELECT title, directed_by FROM film;","SELECT title, directed_by FROM film;",1 Delete records in waste_generation table where the generation_date is before 2018-01-01,"CREATE TABLE waste_generation (id INT, location VARCHAR(50), generation_date DATE, waste_amount INT); ",DELETE FROM waste_generation WHERE generation_date < '2018-01-01';,DELETE FROM waste_generation WHERE generation_date '2018-01-01';,0 In what position did the winning driver finish at Chicagoland?,"CREATE TABLE table_16099880_5 (winning_driver VARCHAR, race VARCHAR);","SELECT COUNT(winning_driver) FROM table_16099880_5 WHERE race = ""Chicagoland"";","SELECT winning_driver FROM table_16099880_5 WHERE race = ""Chicagoland"";",0 Which the Fastest Lap has a Season of 2009 and Poles smaller than 0?,"CREATE TABLE table_name_65 (fastest_laps INTEGER, season VARCHAR, poles VARCHAR);","SELECT MAX(fastest_laps) FROM table_name_65 WHERE season = ""2009"" AND poles < 0;",SELECT MAX(fastest_laps) FROM table_name_65 WHERE season = 2009 AND poles 0;,0 What is the total revenue generated from sustainable fashion products in each quarter of the year?,"CREATE TABLE sales (id INT, product_type VARCHAR(20), date DATE, revenue DECIMAL); ","SELECT DATE_FORMAT(date, '%Y-%m') AS quarter, SUM(revenue) FROM sales WHERE product_type = 'sustainable' GROUP BY quarter;","SELECT DATE_FORMAT(date, '%Y-%m') as quarter, SUM(revenue) as total_revenue FROM sales WHERE product_type ='sustainable fashion' GROUP BY quarter;",0 Who is the head linesman at game xxxv?,"CREATE TABLE table_name_66 (head_linesman VARCHAR, game VARCHAR);","SELECT head_linesman FROM table_name_66 WHERE game = ""xxxv"";","SELECT head_linesman FROM table_name_66 WHERE game = ""xxxv"";",1 How many conservation efforts have been implemented for turtles?,"CREATE TABLE conservation_efforts (id INT, species VARCHAR(50), year INT, protected_area VARCHAR(50), efforts VARCHAR(50)); ",SELECT SUM(CASE WHEN species LIKE '%Turtle%' THEN 1 ELSE 0 END) FROM conservation_efforts;,SELECT SUM(efforts) FROM conservation_efforts WHERE species = 'Turtle';,0 "What is the average height for hewitt class, with prom less than 86, and a Peak of gragareth?","CREATE TABLE table_name_45 (height__m_ INTEGER, peak VARCHAR, class VARCHAR, prom__m_ VARCHAR);","SELECT AVG(height__m_) FROM table_name_45 WHERE class = ""hewitt"" AND prom__m_ < 86 AND peak = ""gragareth"";","SELECT AVG(height__m_) FROM table_name_45 WHERE class = ""hewitt"" AND prom__m_ 86 AND peak = ""gragareth"";",0 what is the class when the identifier is cjbc-1-fm?,"CREATE TABLE table_name_60 (class VARCHAR, identifier VARCHAR);","SELECT class FROM table_name_60 WHERE identifier = ""cjbc-1-fm"";","SELECT class FROM table_name_60 WHERE identifier = ""cjbc-1-fm"";",1 "Who wrote when the original airdate is April 5, 1987?","CREATE TABLE table_2226817_2 (written_by VARCHAR, original_air_date VARCHAR);","SELECT written_by FROM table_2226817_2 WHERE original_air_date = ""April 5, 1987"";","SELECT written_by FROM table_2226817_2 WHERE original_air_date = ""April 5, 1987"";",1 What is the average delivery time for shipments from China to Europe?,"CREATE TABLE DeliveryTimes(id INT, source_country VARCHAR(50), destination_country VARCHAR(50), delivery_time INT); ",SELECT AVG(delivery_time) FROM DeliveryTimes WHERE source_country = 'China' AND destination_country LIKE '%Europe%';,SELECT AVG(delivery_time) FROM DeliveryTimes WHERE source_country = 'China' AND destination_country = 'Europe';,0 What is tuesday day three when thursday day five is kamis?,"CREATE TABLE table_1277350_7 (tuesday_day_three VARCHAR, thursday_day_five VARCHAR);","SELECT tuesday_day_three FROM table_1277350_7 WHERE thursday_day_five = ""Kamis"";","SELECT tuesday_day_three FROM table_1277350_7 WHERE thursday_day_five = ""Kamis"";",1 "What is the Team when the lost is less than 13, and the position is less than 4, with a Difference of 42?","CREATE TABLE table_name_58 (team VARCHAR, difference VARCHAR, lost VARCHAR, position VARCHAR);","SELECT team FROM table_name_58 WHERE lost < 13 AND position < 4 AND difference = ""42"";",SELECT team FROM table_name_58 WHERE lost 13 AND position 4 AND difference = 42;,0 What is the away team whose home is Victoria?,"CREATE TABLE table_name_42 (away VARCHAR, home VARCHAR);","SELECT away FROM table_name_42 WHERE home = ""victoria"";","SELECT away FROM table_name_42 WHERE home = ""victoria"";",1 which part on the team does rick schuhwerk play,"CREATE TABLE table_2781227_10 (position VARCHAR, player VARCHAR);","SELECT position FROM table_2781227_10 WHERE player = ""Rick Schuhwerk"";","SELECT position FROM table_2781227_10 WHERE player = ""Rick Schuhwerk"";",1 What percentage of the vote did McCain win in Waynesboro (city)?,"CREATE TABLE table_20524090_1 (mccain_percentage VARCHAR, county VARCHAR);","SELECT mccain_percentage FROM table_20524090_1 WHERE county = ""Waynesboro (city)"";","SELECT mccain_percentage FROM table_20524090_1 WHERE county = ""Waynesboro (city)"";",1 List all the financial wellbeing programs offered by lenders in the technology sector.,"CREATE TABLE programs (program_id INT, lender_id INT, sector VARCHAR(20), is_financial_wellbeing BOOLEAN); ",SELECT program_id FROM programs WHERE sector = 'technology' AND is_financial_wellbeing = true;,"SELECT program_id, lender_id, sector, is_financial_wellbeing FROM programs WHERE sector = 'Technology' AND is_financial_wellbeing = TRUE;",0 How many contestants are 1.80 mtr. in height? ,"CREATE TABLE table_27946889_2 (contestant VARCHAR, height__mtr_ VARCHAR);","SELECT COUNT(contestant) FROM table_27946889_2 WHERE height__mtr_ = ""1.80"";","SELECT COUNT(contestant) FROM table_27946889_2 WHERE height__mtr_ = ""1.80"";",1 Who wrote the episode that had 12.15 million viewers?,"CREATE TABLE table_24961421_1 (written_by VARCHAR, us_viewers__millions_ VARCHAR);","SELECT written_by FROM table_24961421_1 WHERE us_viewers__millions_ = ""12.15"";","SELECT written_by FROM table_24961421_1 WHERE us_viewers__millions_ = ""12.15"";",1 how many volunteers participated in habitat preservation programs in 2021?,"CREATE TABLE habitat_preservation (volunteer_id INT, year INT, hours FLOAT); ",SELECT COUNT(DISTINCT volunteer_id) FROM habitat_preservation WHERE year = 2021;,SELECT SUM(hours) FROM habitat_preservation WHERE year = 2021;,0 What is the average transaction value per day for the past month for customers in the 'Wholesale' customer type?,"CREATE TABLE customers (customer_id INT, customer_type VARCHAR(20)); CREATE TABLE transactions (transaction_date DATE, customer_id INT, transaction_value DECIMAL(10, 2)); ","SELECT AVG(transactions.transaction_value) as avg_transaction_value FROM transactions JOIN customers ON transactions.customer_id = customers.customer_id WHERE transactions.transaction_date >= DATE_SUB(CURDATE(), INTERVAL 30 DAY) AND customers.customer_type = 'Wholesale';","SELECT AVG(transaction_value) FROM transactions JOIN customers ON transactions.customer_id = customers.customer_id WHERE customers.customer_type = 'Wholesale' AND transaction_date >= DATEADD(month, -1, GETDATE());",0 How many days with frost were there in the City/Town of Lugo have?,"CREATE TABLE table_name_22 (days_with_frost INTEGER, city_town VARCHAR);","SELECT SUM(days_with_frost) FROM table_name_22 WHERE city_town = ""lugo"";","SELECT SUM(days_with_frost) FROM table_name_22 WHERE city_town = ""lugo"";",1 "What is the average time taken for disability policy advocacy initiatives to be implemented, categorized by initiative type?","CREATE TABLE PolicyAdvocacy (AdvocacyID INT, AdvocacyType VARCHAR(50), InitiativeID INT, StartDate DATE, EndDate DATE); ","SELECT AdvocacyType, AVG(DATEDIFF(DAY, StartDate, EndDate)) AS AvgTime FROM PolicyAdvocacy GROUP BY AdvocacyType;","SELECT AdvocacyType, AVG(DATEDIFF(EndDate, StartDate)) as AvgTimeOfInitiatives FROM PolicyAdvocacy GROUP BY AdvocacyType;",0 What is the total number in class for the Whitehaven Coal?,"CREATE TABLE table_name_13 (number_in_class INTEGER, owner VARCHAR);","SELECT SUM(number_in_class) FROM table_name_13 WHERE owner = ""whitehaven coal"";","SELECT SUM(number_in_class) FROM table_name_13 WHERE owner = ""whitehaven coal"";",1 When was there a team of Simon and the start was 3?,"CREATE TABLE table_name_48 (year VARCHAR, team VARCHAR, start VARCHAR);","SELECT year FROM table_name_48 WHERE team = ""simon"" AND start = ""3"";","SELECT year FROM table_name_48 WHERE team = ""simon"" AND start = ""3"";",1 What is the average age of players who use VR technology in Japan?,"CREATE TABLE Players (PlayerID INT, Age INT, Gender VARCHAR(10), Country VARCHAR(20)); ",SELECT AVG(Age) FROM Players WHERE Country = 'Japan' AND Gender = 'Male' AND VR_User = TRUE;,SELECT AVG(Age) FROM Players WHERE Country = 'Japan' AND Gender = 'Violent';,0 "Provide a list of all warehouses and their average lead times, grouped by country.","CREATE TABLE Warehouses (WarehouseID int, WarehouseName varchar(255), Country varchar(255));CREATE TABLE Shipments (ShipmentID int, WarehouseID int, LeadTime int); ","SELECT w.Country, AVG(s.LeadTime) as AvgLeadTime FROM Warehouses w INNER JOIN Shipments s ON w.WarehouseID = s.WarehouseID GROUP BY w.Country;","SELECT Warehouses.Country, AVG(Shipments.LeadTime) as AvgLeadTime FROM Warehouses INNER JOIN Shipments ON Warehouses.WarehouseID = Shipments.WarehouseID GROUP BY Warehouses.Country;",0 "What is the lowest female number of the hiroo 1-chōme district, which has more than 1,666 households?","CREATE TABLE table_name_66 (female INTEGER, district VARCHAR, number_of_households VARCHAR);","SELECT MIN(female) FROM table_name_66 WHERE district = ""hiroo 1-chōme"" AND number_of_households > 1 OFFSET 666;","SELECT MIN(female) FROM table_name_66 WHERE district = ""hiroo 1-chme"" AND number_of_households > 1 OFFSET 666;",0 Show public transportation usage in the top 3 cities with the highest usage,"CREATE TABLE pt_usage (usage_id INT, city INT, passengers INT);CREATE TABLE cities (city_id INT, city_name VARCHAR(50));","SELECT c.city_name, pu.passengers FROM (SELECT city, SUM(passengers) as total_passengers FROM pt_usage GROUP BY city ORDER BY total_passengers DESC LIMIT 3) t JOIN cities c ON t.city = c.city_id JOIN pt_usage pu ON t.city = pu.city;","SELECT c.city_name, SUM(p.passengers) as total_passengers FROM pt_usage p JOIN cities c ON p.city = c.city_id GROUP BY c.city_name ORDER BY total_passengers DESC LIMIT 3;",0 What's the average rainfall for farms with an irrigation system?,"CREATE TABLE farm (id INT, name VARCHAR(50), size FLOAT, irrigation_system BOOLEAN, PRIMARY KEY(id)); CREATE TABLE rainfall (id INT, farm_id INT, rainfall FLOAT, PRIMARY KEY(id)); ","SELECT f.name, AVG(r.rainfall) FROM farm f INNER JOIN rainfall r ON f.id = r.farm_id WHERE f.irrigation_system = true GROUP BY f.name;",SELECT AVG(rainfall) FROM rainfall JOIN farm ON rainfall.farm_id = farm.id WHERE farm.irrigation_system = TRUE;,0 List all fair trade certified factories in African countries that have not used any child labor in the last year.,"CREATE TABLE Factories (FactoryID INT, FactoryName VARCHAR(50), CountryID INT, Certification VARCHAR(50)); CREATE TABLE Countries (CountryID INT, CountryName VARCHAR(50), Continent VARCHAR(50), ChildLabor BOOLEAN); ",SELECT DISTINCT f.FactoryName FROM Factories f JOIN Countries c ON f.CountryID = c.CountryID WHERE c.Continent = 'Africa' AND f.Certification = 'Fair Trade' AND c.ChildLabor = FALSE;,SELECT f.FactoryName FROM Factories f INNER JOIN Countries c ON f.CountryID = c.CountryID WHERE f.Certification = 'Fair Trade' AND c.Continent = 'Africa' AND c.ChildLabor = FALSE AND c.CountryID IS NULL;,0 What is the Qual listed on the Year of 1954?,"CREATE TABLE table_name_38 (qual VARCHAR, year VARCHAR);","SELECT qual FROM table_name_38 WHERE year = ""1954"";",SELECT qual FROM table_name_38 WHERE year = 1954;,0 What is the total revenue generated by Latin music artists from digital streaming platforms?,"CREATE TABLE artists (artist_id INT, genre VARCHAR(20)); CREATE TABLE streams (stream_id INT, artist_id INT, revenue DECIMAL(10,2)); ",SELECT SUM(streams.revenue) FROM streams INNER JOIN artists ON streams.artist_id = artists.artist_id WHERE artists.genre = 'Latin';,SELECT SUM(streams.revenue) FROM streams JOIN artists ON streams.artist_id = artists.artist_id WHERE artists.genre = 'Latin';,0 What is the maximum depth of any ocean floor mapping project in the Atlantic region?,"CREATE TABLE ocean_floor_mapping_projects (id INT, name VARCHAR(255), region VARCHAR(255), depth FLOAT);",SELECT MAX(depth) FROM ocean_floor_mapping_projects WHERE region = 'Atlantic';,SELECT MAX(depth) FROM ocean_floor_mapping_projects WHERE region = 'Atlantic';,1 Delete all traffic accident records from the emergency incidents table.,"CREATE TABLE emergency_incidents (id INT, incident_type VARCHAR(255)); ",DELETE FROM emergency_incidents WHERE incident_type = 'Traffic Accident';,DELETE FROM emergency_incidents WHERE incident_type = 'Traffic Accident';,1 "What was the score of the Chiefs pre-Week 16 game that 69,362 people attended?","CREATE TABLE table_name_1 (result VARCHAR, week VARCHAR, attendance VARCHAR);","SELECT result FROM table_name_1 WHERE week < 16 AND attendance = ""69,362"";","SELECT result FROM table_name_1 WHERE week = 16 AND attendance = ""69,362"";",0 What is the class of the player with a weight of 242 pounds?,"CREATE TABLE table_name_9 (class VARCHAR, weight VARCHAR);",SELECT class FROM table_name_9 WHERE weight = 242;,"SELECT class FROM table_name_9 WHERE weight = ""242 pounds"";",0 How many communes when the arrondissement is cosne-cours-sur-loire?,"CREATE TABLE table_1175233_1 (communes INTEGER, arrondissement VARCHAR);","SELECT MIN(communes) FROM table_1175233_1 WHERE arrondissement = ""Cosne-Cours-sur-Loire"";","SELECT MAX(communes) FROM table_1175233_1 WHERE arrondissement = ""Cosne-cours-sur-loire"";",0 What is the average age of policyholders with life insurance in the state of New York?,"CREATE TABLE Policyholder_Info (ID INT, Age INT, State VARCHAR(20), Insurance_Type VARCHAR(20)); ",SELECT AVG(Age) FROM Policyholder_Info WHERE State = 'New York' AND Insurance_Type = 'Life';,SELECT AVG(Age) FROM Policyholder_Info WHERE State = 'New York' AND Insurance_Type = 'Life';,1 How many against have a status of first test?,"CREATE TABLE table_name_20 (against VARCHAR, status VARCHAR);","SELECT COUNT(against) FROM table_name_20 WHERE status = ""first test"";","SELECT COUNT(against) FROM table_name_20 WHERE status = ""first test"";",1 What are the names of people in ascending order of height?,"CREATE TABLE People (Name VARCHAR, Height VARCHAR);",SELECT Name FROM People ORDER BY Height;,SELECT Name FROM People ORDER BY Height;,1 What is the maximum renewable energy (gw×h) for the state of Delaware?,"CREATE TABLE table_25244412_1 (renewable_electricity__gw INTEGER, state VARCHAR);","SELECT MAX(renewable_electricity__gw) AS •h_ FROM table_25244412_1 WHERE state = ""Delaware"";","SELECT MAX(renewable_electricity__gw) FROM table_25244412_1 WHERE state = ""Delaware"";",0 What is the maximum number of students enrolled in a university in each country?,"CREATE TABLE countries (name VARCHAR(255), universities_count INT); CREATE TABLE university (name VARCHAR(255), country VARCHAR(255), enrollment INT); ","SELECT country, MAX(enrollment) FROM university GROUP BY country;","SELECT country, MAX(enrollment) FROM university GROUP BY country;",1 What is the total amount of research grants awarded to faculty members in the Humanities department?,"CREATE SCHEMA if not exists higher_ed;CREATE TABLE if not exists higher_ed.faculty(id INT, name VARCHAR(255), department VARCHAR(255), grant_amount DECIMAL(10,2));",SELECT SUM(grant_amount) FROM higher_ed.faculty WHERE department = 'Humanities';,SELECT SUM(grant_amount) FROM higher_ed.faculty WHERE department = 'Humanities';,1 What was the size of the crowd at the game where Fitzroy was the home team?,"CREATE TABLE table_name_94 (crowd VARCHAR, home_team VARCHAR);","SELECT crowd FROM table_name_94 WHERE home_team = ""fitzroy"";","SELECT crowd FROM table_name_94 WHERE home_team = ""fitzroy"";",1 Which player from Oregon used the number 12?,"CREATE TABLE table_name_16 (player VARCHAR, no_s_ VARCHAR, school_club_team_country VARCHAR);","SELECT player FROM table_name_16 WHERE no_s_ = ""12"" AND school_club_team_country = ""oregon"";","SELECT player FROM table_name_16 WHERE no_s_ = ""12"" AND school_club_team_country = ""oregon"";",1 What decade is the artist the replacements?,"CREATE TABLE table_name_92 (decade VARCHAR, artist VARCHAR);","SELECT decade FROM table_name_92 WHERE artist = ""the replacements"";","SELECT decade FROM table_name_92 WHERE artist = ""the replacements"";",1 What is the value of time/retired for Jean Alesi?,"CREATE TABLE table_name_29 (time_retired VARCHAR, driver VARCHAR);","SELECT time_retired FROM table_name_29 WHERE driver = ""jean alesi"";","SELECT time_retired FROM table_name_29 WHERE driver = ""jean alesi"";",1 What is the total number of weeks that the Seahawks had a record of 5-5?,"CREATE TABLE table_name_73 (week VARCHAR, record VARCHAR);","SELECT COUNT(week) FROM table_name_73 WHERE record = ""5-5"";","SELECT COUNT(week) FROM table_name_73 WHERE record = ""5-5"";",1 "What is the score of the event held on July 23, 2009?","CREATE TABLE table_name_78 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_78 WHERE date = ""july 23, 2009"";","SELECT score FROM table_name_78 WHERE date = ""july 23, 2009"";",1 How many freshwater species are there in the 'oceanic_fish' table?,"CREATE TABLE oceanic_fish (species_id INTEGER, species_name TEXT, habitat TEXT, is_marine BOOLEAN); ",SELECT COUNT(*) FROM oceanic_fish WHERE habitat = 'freshwater';,SELECT COUNT(*) FROM oceanic_fish WHERE habitat = 'freshwater' AND is_marine = true;,0 Count the number of Mars rovers that successfully landed on Mars and are still operational.,"CREATE TABLE mars_rovers (id INT, name VARCHAR(50), launch_date DATE, status VARCHAR(10));",SELECT COUNT(*) FROM mars_rovers WHERE status = 'operational';,SELECT COUNT(*) FROM mars_rovers WHERE status = 'Successful' AND id IN (SELECT id FROM mars_rovers WHERE status = 'Operational');,0 what's the score where record is 35–33,"CREATE TABLE table_11964047_9 (score VARCHAR, record VARCHAR);","SELECT score FROM table_11964047_9 WHERE record = ""35–33"";","SELECT score FROM table_11964047_9 WHERE record = ""35–33"";",1 What is the average cost of development per drug that received approval in Canada after 2015?,"CREATE TABLE drug_approval (drug_name TEXT, approval_date DATE, country TEXT); CREATE TABLE drug_cost (drug_name TEXT, development_cost NUMERIC); ",SELECT AVG(development_cost) FROM drug_cost INNER JOIN drug_approval ON drug_cost.drug_name = drug_approval.drug_name WHERE drug_approval.country = 'Canada' AND drug_approval.approval_date > '2015-01-01';,SELECT AVG(dc.development_cost) FROM drug_cost dc JOIN drug_approval da ON dc.drug_name = da.drug_name WHERE da.approval_date > '2015-01-01' AND da.country = 'Canada';,0 Which destinations had an increase in visitors from 2021 to 2022?,"CREATE TABLE if not exists VisitorStatisticsByYear (Year INT, Destination VARCHAR(50), Visitors INT); ","SELECT a.Destination, (a.Visitors - b.Visitors) AS VisitorChange FROM VisitorStatisticsByYear a, VisitorStatisticsByYear b WHERE a.Destination = b.Destination AND a.Year = 2022 AND b.Year = 2021;","SELECT Destination, SUM(Visitors) as TotalVisitors FROM VisitorStatisticsByYear WHERE Year = 2021 GROUP BY Destination HAVING SUM(Visitors) > (SELECT SUM(Visitors) FROM VisitorStatisticsByYear WHERE Year = 2022);",0 How many carbon offset initiatives were implemented in each district of a smart city?,"CREATE TABLE Carbon_Offset_Initiatives (id INT, initiative_name VARCHAR(50), district VARCHAR(50)); ","SELECT district, COUNT(*) FROM Carbon_Offset_Initiatives GROUP BY district;","SELECT district, COUNT(*) FROM Carbon_Offset_Initiatives GROUP BY district;",1 How many articles were published by each newspaper in 2021?,"CREATE TABLE newspapers (id INT, name VARCHAR(255), country VARCHAR(255));CREATE TABLE articles (id INT, newspaper_id INT, year INT); ","SELECT newspapers.name, COUNT(*) as articles_count FROM newspapers INNER JOIN articles ON newspapers.id = articles.newspaper_id GROUP BY newspapers.name;","SELECT newspapers.name, COUNT(articles.id) FROM newspapers INNER JOIN articles ON newspapers.id = articles.journalist_id WHERE articles.year = 2021 GROUP BY newspapers.name;",0 What's the highest frequency of the KBDR callsign?,"CREATE TABLE table_name_4 (frequency INTEGER, callsign VARCHAR);","SELECT MAX(frequency) FROM table_name_4 WHERE callsign = ""kbdr"";","SELECT MAX(frequency) FROM table_name_4 WHERE callsign = ""kbdr"";",1 What are the top 5 sizes sold in the European market?,"CREATE TABLE Inventory (product_id INT, product_name VARCHAR(255), available_sizes VARCHAR(255)); CREATE TABLE CustomerSize (customer_id INT, preferred_size VARCHAR(10)); CREATE TABLE Geography (customer_id INT, country VARCHAR(255), region VARCHAR(255));","SELECT I.product_id, I.product_name, COUNT(C.customer_id) AS sales_count FROM Inventory I INNER JOIN CustomerSize C ON I.available_sizes LIKE CONCAT('%', C.preferred_size, '%') INNER JOIN Geography G ON C.customer_id = G.customer_id WHERE G.region = 'Europe' GROUP BY I.product_id, I.product_name ORDER BY sales_count DESC LIMIT 5;","SELECT i.product_name, i.available_sizes FROM Inventory i JOIN CustomerSize cs ON i.product_id = cs.customer_id JOIN Geography g ON cs.customer_id = g.customer_id WHERE g.region = 'Europe' GROUP BY i.product_name ORDER BY i.available_sizes DESC LIMIT 5;",0 Which year is that has a Entrant of belond equa-flow / calif. muffler?,"CREATE TABLE table_name_88 (year VARCHAR, entrant VARCHAR);","SELECT year FROM table_name_88 WHERE entrant = ""belond equa-flow / calif. muffler"";","SELECT year FROM table_name_88 WHERE entrant = ""belond equa-flow / calif. muffler"";",1 How many restaurants have a hygiene rating of 5?,"CREATE TABLE inspections (restaurant_id INT, hygiene_rating INT); ",SELECT COUNT(*) as num_restaurants FROM inspections WHERE hygiene_rating = 5;,SELECT COUNT(*) FROM inspections WHERE hygiene_rating = 5;,0 Which organic products were sold in Europe?,"CREATE TABLE products (product_id INT, product_name VARCHAR(50), is_organic BOOLEAN); CREATE TABLE sales (sale_id INT, product_id INT, sale_date DATE, region VARCHAR(50)); ",SELECT products.product_name FROM products INNER JOIN sales ON products.product_id = sales.product_id WHERE products.is_organic = true AND sales.region = 'Europe';,SELECT products.product_name FROM products INNER JOIN sales ON products.product_id = sales.product_id WHERE products.is_organic = true AND sales.region = 'Europe';,1 "What shows for against when draws are 0, and losses are 16?","CREATE TABLE table_name_67 (against INTEGER, draws VARCHAR, losses VARCHAR);",SELECT AVG(against) FROM table_name_67 WHERE draws = 0 AND losses = 16;,SELECT AVG(against) FROM table_name_67 WHERE draws = 0 AND losses = 16;,1 What is the average length of articles published by 'The Guardian' in the 'technology' category?,"CREATE TABLE the_guardian (article_id INT, title VARCHAR(255), publish_date DATE, author VARCHAR(255), length INT, category VARCHAR(255)); CREATE TABLE technology (article_id INT, title VARCHAR(255), publish_date DATE, author VARCHAR(255), length INT, category VARCHAR(255)); ",SELECT AVG(length) FROM the_guardian WHERE category = 'technology';,SELECT AVG(length) FROM technology INNER JOIN the_guardian ON technology.article_id = the_guardian.article_id WHERE the_guardian.category = 'technology';,0 What player is from Wales?,"CREATE TABLE table_name_84 (player VARCHAR, country VARCHAR);","SELECT player FROM table_name_84 WHERE country = ""wales"";","SELECT player FROM table_name_84 WHERE country = ""wales"";",1 How many titles were directed by Alex Chapple?,"CREATE TABLE table_21002034_4 (title VARCHAR, director VARCHAR);","SELECT COUNT(title) FROM table_21002034_4 WHERE director = ""Alex Chapple"";","SELECT COUNT(title) FROM table_21002034_4 WHERE director = ""Alex Chapple"";",1 What is the average cargo weight handled per day by the port of Shanghai in February 2022?,"CREATE TABLE cargo_handling (cargo_handling_id INT, port VARCHAR(255), cargo_weight INT, handling_date DATE);",SELECT AVG(cargo_weight) FROM cargo_handling WHERE port = 'Shanghai' AND EXTRACT(MONTH FROM handling_date) = 2 AND EXTRACT(YEAR FROM handling_date) = 2022;,SELECT AVG(cargo_weight) FROM cargo_handling WHERE port = 'Shanghai' AND handling_date BETWEEN '2022-02-01' AND '2022-02-28';,0 What is the total data usage for each customer in January 2022?,"CREATE TABLE data_usage (usage_id INT, customer_id INT, usage_amount INT, usage_date DATE); ","SELECT customer_id, SUM(usage_amount) as total_data_usage FROM data_usage WHERE MONTH(usage_date) = 1 AND YEAR(usage_date) = 2022 GROUP BY customer_id;","SELECT customer_id, SUM(usage_amount) as total_usage FROM data_usage WHERE usage_date BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY customer_id;",0 List all space missions launched before 1990,"CREATE TABLE missions (id INT, name VARCHAR(50), spacecraft VARCHAR(50), launch_year INT);",SELECT name FROM missions WHERE launch_year < 1990;,SELECT * FROM missions WHERE launch_year 1990;,0 "List the co-owners and their shared property addresses in Seattle, WA.","CREATE TABLE co_owners (id INT, name VARCHAR(30), property_id INT); CREATE TABLE properties (id INT, address VARCHAR(50), city VARCHAR(20)); ","SELECT co_owners.name, properties.address FROM co_owners INNER JOIN properties ON co_owners.property_id = properties.id WHERE properties.city = 'Seattle';","SELECT co_owners.name, properties.address FROM co_owners INNER JOIN properties ON co_owners.property_id = properties.id WHERE properties.city = 'Seattle';",1 What is the average quantity of sustainable fabrics sourced from Europe in the past year?,"CREATE TABLE Sustainable_Fabrics (fabric_id INT, fabric_name VARCHAR(50), sourcing_country VARCHAR(50), quantity INT); ","SELECT AVG(quantity) FROM Sustainable_Fabrics WHERE sourcing_country IN ('France', 'Germany', 'Austria') AND sourcing_country IS NOT NULL AND fabric_name IS NOT NULL AND quantity IS NOT NULL;","SELECT AVG(quantity) FROM Sustainable_Fabrics WHERE sourcing_country = 'Europe' AND sourcing_date >= DATEADD(year, -1, GETDATE());",0 What are the top 3 hotels in terms of virtual tour engagement time in Q3 2022?,"CREATE TABLE hotel_virtual_tours (hotel_name VARCHAR(20), user_id INT, engagement_time INT, tour_date DATE); ","SELECT hotel_name, SUM(engagement_time) as total_engagement_time FROM hotel_virtual_tours WHERE tour_date BETWEEN '2022-07-01' AND '2022-09-30' GROUP BY hotel_name ORDER BY total_engagement_time DESC LIMIT 3;","SELECT hotel_name, engagement_time FROM hotel_virtual_tours WHERE tour_date BETWEEN '2022-04-01' AND '2022-06-30' ORDER BY engagement_time DESC LIMIT 3;",0 What division record did the Spartans hold?,"CREATE TABLE table_name_26 (division_record VARCHAR, team VARCHAR);","SELECT division_record FROM table_name_26 WHERE team = ""spartans"";","SELECT division_record FROM table_name_26 WHERE team = ""spartans"";",1 Who are the top 5 customers with the highest transaction values in the past month in a global investment firm?,"CREATE TABLE customers (customer_id INT, name VARCHAR(255)); CREATE TABLE global_investment_transactions (transaction_id INT, customer_id INT, amount DECIMAL(10,2), trans_date DATE);","SELECT customers.name, SUM(global_investment_transactions.amount) as total_amount FROM customers INNER JOIN global_investment_transactions ON customers.customer_id = global_investment_transactions.customer_id WHERE global_investment_transactions.trans_date >= NOW() - INTERVAL '1 month' GROUP BY customers.name ORDER BY total_amount DESC LIMIT 5;","SELECT customers.name, SUM(global_investment_transactions.amount) as total_transactions FROM customers INNER JOIN global_investment_transactions ON customers.customer_id = global_investment_transactions.customer_id WHERE global_investment_transactions.trans_date >= DATEADD(month, -1, GETDATE()) GROUP BY customers.name ORDER BY total_transactions DESC LIMIT 5;",0 Delete records in the 'unfair_outcomes' table where the 'outcome' is 'unfavorable' and the 'bias_type' is 'gender',"CREATE TABLE unfair_outcomes (id INT PRIMARY KEY, algorithm_name VARCHAR(50), outcome VARCHAR(20), bias_type VARCHAR(20), description TEXT);",DELETE FROM unfair_outcomes WHERE outcome = 'unfavorable' AND bias_type = 'gender';,DELETE FROM unfair_outcomes WHERE outcome = 'unfavorable' AND bias_type = 'gender';,1 "How many public transportation projects in the ""projects"" table have a budget greater than $10 million and are located in the 'Urban' area?","CREATE TABLE projects (project_id INT, project_name VARCHAR(50), budget DECIMAL(10, 2), area VARCHAR(50)); ",SELECT COUNT(*) FROM projects WHERE budget > 10000000 AND area = 'Urban';,SELECT COUNT(*) FROM projects WHERE budget > 10000000 AND area = 'Urban';,1 What was the previous conference for the school that joined in 2000 with a millers mascot?,"CREATE TABLE table_name_93 (previous_conference VARCHAR, year_joined VARCHAR, mascot VARCHAR);","SELECT previous_conference FROM table_name_93 WHERE year_joined = 2000 AND mascot = ""millers"";","SELECT previous_conference FROM table_name_93 WHERE year_joined = 2000 AND mascot = ""millers"";",1 "What is the result foe October 12, 2005?","CREATE TABLE table_name_75 (result VARCHAR, date VARCHAR);","SELECT result FROM table_name_75 WHERE date = ""october 12, 2005"";","SELECT result FROM table_name_75 WHERE date = ""october 12, 2005"";",1 What is the maximum amount donated in a single transaction?,"CREATE TABLE donations (id INT, transaction_date DATE, amount DECIMAL(10, 2)); ",SELECT MAX(amount) FROM donations;,SELECT MAX(amount) FROM donations;,1 "Delete a restorative justice program from the ""programs"" table","CREATE TABLE programs (id INT, name VARCHAR(50), type VARCHAR(20), location VARCHAR(50));",DELETE FROM programs WHERE id = 3001 AND type = 'Restorative Justice';,DELETE FROM programs WHERE type = 'Restorative Justice';,0 "List all smart city initiatives in the state of California, along with their start dates.","CREATE TABLE smart_city_initiatives (id INT, initiative_name VARCHAR(50), state VARCHAR(50), start_date DATE); ","SELECT initiative_name, start_date FROM smart_city_initiatives WHERE state = 'California';","SELECT initiative_name, start_date FROM smart_city_initiatives WHERE state = 'California';",1 What is the total number of marine research projects in the Mediterranean Sea?,"CREATE TABLE marine_research_projects (id INT, name TEXT, location TEXT); ",SELECT COUNT(*) FROM marine_research_projects WHERE location = 'Mediterranean Sea';,SELECT COUNT(*) FROM marine_research_projects WHERE location = 'Mediterranean Sea';,1 which year was the original title გაღმა ნაპირი,"CREATE TABLE table_18069789_1 (year_ VARCHAR, e_ VARCHAR, original_title VARCHAR);","SELECT year_[e_] AS __ceremony_ FROM table_18069789_1 WHERE original_title = ""გაღმა ნაპირი"";","SELECT year_ FROM table_18069789_1 WHERE e_ = "" "" AND original_title = "" "";",0 Delete projects that have a CO2 emission reduction lower than 1500 metric tons.,"CREATE TABLE projects (id INT, CO2_reduction_tons INT); ",DELETE FROM projects WHERE CO2_reduction_tons < 1500;,DELETE FROM projects WHERE CO2_reduction_tons 1500;,0 What pick number did the New York Rangers have?,"CREATE TABLE table_2897457_8 (pick__number VARCHAR, nhl_team VARCHAR);","SELECT pick__number FROM table_2897457_8 WHERE nhl_team = ""New York Rangers"";","SELECT pick__number FROM table_2897457_8 WHERE nhl_team = ""New York Rangers"";",1 what is the date when the opponent# is iowa?,"CREATE TABLE table_name_42 (date VARCHAR, opponent_number VARCHAR);","SELECT date FROM table_name_42 WHERE opponent_number = ""iowa"";","SELECT date FROM table_name_42 WHERE opponent_number = ""iowa"";",1 What are the military aircraft models and their manufacturers based in Europe?,"CREATE TABLE AircraftManufacturers (Manufacturer VARCHAR(255), Model VARCHAR(255)); ","SELECT Model FROM AircraftManufacturers WHERE Manufacturer IN ('Airbus', 'BAE Systems', 'Leonardo', 'Dassault Aviation') AND Manufacturer LIKE '%Europe%';","SELECT Model, Manufacturer FROM AircraftManufacturers WHERE Country = 'Europe';",0 What is the name of the episode written by Sheila Lawrence & Henry Alonso Myers?,"CREATE TABLE table_12146637_1 (episode_title VARCHAR, writer_s_ VARCHAR);","SELECT episode_title FROM table_12146637_1 WHERE writer_s_ = ""Sheila Lawrence & Henry Alonso Myers"";","SELECT episode_title FROM table_12146637_1 WHERE writer_s_ = ""Sheila Lawrence & Henry Alonso Myers"";",1 Display the number of unique vehicle types in the vehicles table,"CREATE TABLE vehicles (vehicle_id INT, vehicle_type VARCHAR(50)); ",SELECT COUNT(DISTINCT vehicle_type) FROM vehicles;,SELECT COUNT(DISTINCT vehicle_type) FROM vehicles;,1 "Get the count of policies, total claim amounts, and average claim amounts for policies in 'New York'","CREATE TABLE policies (policy_number INT, policyholder_state VARCHAR(20));CREATE TABLE claims (claim_id INT, policy_number INT, claim_amount DECIMAL(10,2), claim_date DATE);","SELECT p.policyholder_state, COUNT(DISTINCT p.policy_number) AS policy_count, SUM(c.claim_amount) AS total_claim_amount, AVG(c.claim_amount) AS avg_claim_amount FROM policies p INNER JOIN claims c ON p.policy_number = c.policy_number WHERE p.policyholder_state = 'New York' GROUP BY p.policyholder_state;","SELECT COUNT(*), SUM(claim_amount) AS total_claim_amount, AVG(claim_amount) AS avg_claim_amount FROM claims JOIN policies ON claims.policy_number = policies.policy_number WHERE policies.policyholder_state = 'New York' GROUP BY policies.policy_number;",0 List all community engagement events and their associated heritage sites.,"CREATE TABLE events (id INT, name VARCHAR, site_id INT); ","SELECT events.name, heritage_sites.name FROM events INNER JOIN heritage_sites ON events.site_id = heritage_sites.id;","SELECT name, site_id FROM events;",0 List all countries with a TV show budget over $10M.,"CREATE TABLE tv_shows (id INT, title VARCHAR(50), country VARCHAR(50), budget DECIMAL(10,2));",SELECT DISTINCT country FROM tv_shows WHERE budget > 10000000;,SELECT country FROM tv_shows WHERE budget > 10000000;,0 Delete all records of police department budget from 'City D',"CREATE TABLE city_budgets (city VARCHAR(255), sector VARCHAR(255), budget INT); INSERT INTO city_budgets",DELETE FROM city_budgets WHERE city = 'City D' AND sector = 'police department',DELETE FROM city_budgets WHERE city = 'City D' AND sector = 'Police Department';,0 Identify the forest type with the highest average tree age in the 'forest_type_ages' table.,"CREATE TABLE forest_type_ages (id INT, forest_type VARCHAR(255), tree_age INT); ","SELECT forest_type, AVG(tree_age) AS avg_tree_age, RANK() OVER (ORDER BY AVG(tree_age) DESC) AS rank FROM forest_type_ages GROUP BY forest_type HAVING rank = 1;","SELECT forest_type, AVG(tree_age) as avg_tree_age FROM forest_type_ages GROUP BY forest_type ORDER BY avg_tree_age DESC LIMIT 1;",0 WHAT IS THE TEAM WITH AN OF POSITION AND PICK OF 24?,"CREATE TABLE table_name_93 (team VARCHAR, position VARCHAR, pick VARCHAR);","SELECT team FROM table_name_93 WHERE position = ""of"" AND pick = 24;","SELECT team FROM table_name_93 WHERE position = ""of"" AND pick = ""24"";",0 How many deep-sea species were discovered in the last 5 years?,"CREATE TABLE deep_sea_species (id INT, species_name VARCHAR(255), discovery_year INT); ",SELECT COUNT(*) FROM deep_sea_species WHERE discovery_year >= YEAR(CURRENT_DATE) - 5;,SELECT COUNT(*) FROM deep_sea_species WHERE discovery_year >= YEAR(CURRENT_DATE) - 5;,1 "Insert a new record in the policy_holder table with policy_holder_id 3, first_name 'Clara', last_name 'Martinez', email 'clara.martinez@example.com', phone '555-123-4567', address '123 Main St', city 'San Juan', state 'PR', zip '00926'","CREATE TABLE policy_holder (policy_holder_id INT, first_name VARCHAR(50), last_name VARCHAR(50), email VARCHAR(50), phone VARCHAR(15), address VARCHAR(100), city VARCHAR(50), state VARCHAR(2), zip VARCHAR(10));","INSERT INTO policy_holder (policy_holder_id, first_name, last_name, email, phone, address, city, state, zip) VALUES (3, 'Clara', 'Martinez', 'clara.martinez@example.com', '555-123-4567', '123 Main St', 'San Juan', 'PR', '00926');","INSERT INTO policy_holder (policy_holder_id, first_name, last_name, email, phone, address, city, state, zip) VALUES (3, 'Clara', 'Martinez', 'clara.martinez@example.com', 555, 123, 4567, '123 Main St', 'San Juan', 'PR', '00926');",0 Select the total number of cases won by attorney 'John Smith',"CREATE TABLE attorneys (attorney_id INT, name VARCHAR(50), total_wins INT); ",SELECT SUM(total_wins) FROM attorneys WHERE name = 'John Smith';,SELECT SUM(total_wins) FROM attorneys WHERE name = 'John Smith';,1 Who are the top 2 VR hardware manufacturers with the highest average price for their VR hardware products?,"CREATE TABLE VRHardware (HardwareID INT, HardwareName VARCHAR(50), Manufacturer VARCHAR(20), ReleaseDate DATE, Price NUMERIC(10,2)); ","SELECT Manufacturer, AVG(Price) as AvgPrice, ROW_NUMBER() OVER (ORDER BY AVG(Price) DESC) as Rank FROM VRHardware GROUP BY Manufacturer HAVING COUNT(*) >= 2;","SELECT Manufacturer, AVG(Price) as AvgPrice FROM VRHardware GROUP BY Manufacturer ORDER BY AvgPrice DESC LIMIT 2;",0 What is the date of the that was played with the Baltimore Colts at home?,"CREATE TABLE table_name_94 (date VARCHAR, home_team VARCHAR);","SELECT date FROM table_name_94 WHERE home_team = ""baltimore colts"";","SELECT date FROM table_name_94 WHERE home_team = ""baltimore colts"";",1 Delete a marine species from the 'marine_species' table,"CREATE TABLE marine_species (id INT PRIMARY KEY, species_name VARCHAR(255), conservation_status VARCHAR(255)); ",DELETE FROM marine_species WHERE species_name = 'Oceanic Whitetip Shark';,DELETE FROM marine_species;,0 What is Jon Thorne's average speed?,"CREATE TABLE table_1963459_2 (average_speed__mph_ VARCHAR, team VARCHAR);","SELECT average_speed__mph_ FROM table_1963459_2 WHERE team = ""Jon Thorne"";","SELECT average_speed__mph_ FROM table_1963459_2 WHERE team = ""Jon Thorne"";",1 Calculate the percentage of total protected land for each country in the 'protected_land' and 'country' tables.,"CREATE TABLE protected_land (id INT, country_id INT, acres FLOAT); CREATE TABLE country (id INT, name VARCHAR(50)); ","SELECT c.name, 100.0 * SUM(pl.acres) / (SELECT SUM(acres) FROM protected_land pl2 WHERE pl2.country_id = c.id) as percentage_of_total_protected_land FROM protected_land pl JOIN country c ON pl.country_id = c.id GROUP BY c.id, c.name;","SELECT c.name, (COUNT(pl.acres) * 100.0 / (SELECT COUNT(*) FROM protected_land)) as percentage FROM protected_land pl JOIN country c ON pl.country_id = c.id GROUP BY c.name;",0 List all marine mammals that are endangered and their IUCN status.,"CREATE TABLE marine_mammals (id INT, name TEXT, iucn_status TEXT); ","SELECT name, iucn_status FROM marine_mammals WHERE iucn_status = 'Endangered';","SELECT name, iucn_status FROM marine_mammals WHERE iucn_status = 'Endangered';",1 "List the names of clients who have a total billing amount greater than $50,000","CREATE TABLE clients (id INT, name VARCHAR(50), total_billing_amount DECIMAL(10,2)); ",SELECT name FROM clients WHERE total_billing_amount > 50000.00;,SELECT name FROM clients WHERE total_billing_amount > 50000;,0 What is minimum and maximum share of TV series?,CREATE TABLE TV_series (SHARE INTEGER);,"SELECT MAX(SHARE), MIN(SHARE) FROM TV_series;","SELECT MIN(SHARE), MAX(SHARE) FROM TV_series;",0 Insert a new record for a donation of 100.00 from 'Fatima Alvarez' from Guatemala on 2021-12-25.,"CREATE TABLE Donors (id INT, name TEXT, country TEXT, donation_amount DECIMAL(10, 2), donation_date DATE);","INSERT INTO Donors (id, name, country, donation_amount, donation_date) VALUES (5, 'Fatima Alvarez', 'Guatemala', 100.00, '2021-12-25');","INSERT INTO Donors (name, country, donation_amount, donation_date) VALUES ('Fatima Alvarez', 'Guatemala', 100.00, '2021-12-25');",0 What is the time of ufc 154?,"CREATE TABLE table_name_44 (time VARCHAR, event VARCHAR);","SELECT time FROM table_name_44 WHERE event = ""ufc 154"";","SELECT time FROM table_name_44 WHERE event = ""ufc 154"";",1 Is prothrombin time long when thromboplastin is prolonged?,"CREATE TABLE table_1226250_1 (prothrombin_time VARCHAR, bleeding_time VARCHAR, partial_thromboplastin_time VARCHAR);","SELECT prothrombin_time FROM table_1226250_1 WHERE bleeding_time = ""Prolonged"" AND partial_thromboplastin_time = ""Prolonged"";","SELECT prothrombin_time FROM table_1226250_1 WHERE bleeding_time = ""long"" AND partial_thromboplastin_time = ""prolonged"";",0 List all drugs approved by the FDA in 2020,"CREATE TABLE drug_approval(drug_name TEXT, approval_date DATE, approval_agency TEXT); ",SELECT drug_name FROM drug_approval WHERE approval_agency = 'FDA' AND approval_date BETWEEN '2020-01-01' AND '2020-12-31';,SELECT drug_name FROM drug_approval WHERE approval_agency = 'FDA' AND YEAR(approval_date) = 2020;,0 What is the number of completions and attempts taken in 2009?,"CREATE TABLE table_name_83 (comp_att VARCHAR, season VARCHAR);","SELECT comp_att FROM table_name_83 WHERE season = ""2009"";",SELECT COUNT(comp_att) FROM table_name_83 WHERE season = 2009;,0 Update fish stock with correct nutritional data,"CREATE TABLE FoodItems (FoodItemID INT, FoodItemName TEXT, Calories INT, Protein INT, Fat INT);","UPDATE FoodItems SET Calories = 110, Protein = 20, Fat = 1 WHERE FoodItemName = 'Tilapia';",UPDATE FoodItems SET Protein = 1 AND Fat = 1;,0 What is the percentage of electric trains in the New York City subway system?,"CREATE TABLE nyc_subway(id INT, train_number INT, line VARCHAR(20), electric BOOLEAN);",SELECT 100.0 * COUNT(*) / (SELECT COUNT(*) FROM nyc_subway) AS percentage FROM nyc_subway WHERE electric = TRUE;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM nyc_subway)) FROM nyc_subway WHERE electric = true;,0 "Which menu items are served at Location2, but not at Location1 or Location3?","CREATE TABLE menu_items(menu_item VARCHAR(255), location VARCHAR(255)); ",SELECT menu_item FROM menu_items WHERE location = 'Location2' EXCEPT (SELECT menu_item FROM menu_items WHERE location = 'Location1' UNION SELECT menu_item FROM menu_items WHERE location = 'Location3');,SELECT menu_item FROM menu_items WHERE location = 'Location2' OR location = 'Location1' OR location = 'Location3';,0 "Count the number of female and male founders in companies founded in 2016 or later, and list their names and founding dates.","CREATE TABLE companies (id INT, name TEXT, founder_gender TEXT, founded_date DATE); ","SELECT companies.name, companies.founded_date, COUNT(*) filter (where companies.founder_gender = 'Female') as num_female_founders, COUNT(*) filter (where companies.founder_gender = 'Male') as num_male_founders FROM companies WHERE companies.founded_date >= '2016-01-01' GROUP BY companies.name, companies.founded_date;","SELECT founder_gender, COUNT(*) FROM companies WHERE founded_date >= '2016-01-01' GROUP BY founder_gender;",0 Show esports events with a prize pool greater than any event in the 'Esports_Events_NA' table.,"CREATE TABLE Esports_Events (EventID INT, EventName VARCHAR(100), Location VARCHAR(100), PrizePool DECIMAL(10, 2)); CREATE TABLE Esports_Events_NA (EventID INT, EventName VARCHAR(100), Location VARCHAR(100), PrizePool DECIMAL(10, 2)); ",SELECT * FROM Esports_Events WHERE PrizePool > (SELECT MAX(PrizePool) FROM Esports_Events_NA);,SELECT e.EventName FROM Esports_Events e INNER JOIN Esports_Events e ON e.EventID = e.EventID WHERE e.PrizePool > (SELECT MAX(PrizePool) FROM Esports_Events_NA);,0 How many access to justice programs were implemented in Mexico and Argentina between 2017 and 2022?,"CREATE TABLE access_to_justice_programs (id INT, program_name VARCHAR(255), country VARCHAR(255), start_year INT, end_year INT); ","SELECT COUNT(*) AS total_programs FROM access_to_justice_programs WHERE country IN ('Mexico', 'Argentina') AND start_year BETWEEN 2017 AND 2022;","SELECT COUNT(*) FROM access_to_justice_programs WHERE country IN ('Mexico', 'Argentina') AND start_year BETWEEN 2017 AND 2022;",0 What is the total number of art exhibits in each country?,"CREATE TABLE Exhibits (exhibit_id INT, country VARCHAR(50), city VARCHAR(50)); ","SELECT country, COUNT(*) as num_exhibits FROM Exhibits GROUP BY country;","SELECT country, COUNT(*) FROM Exhibits GROUP BY country;",0 Which teams have an athlete wellbeing program and how many participants does each have?,"CREATE TABLE teams (team_id INT, team_name VARCHAR(255)); CREATE TABLE athlete_wellbeing_programs (program_id INT, team_id INT, participants INT); ","SELECT t.team_name, awp.participants FROM teams t JOIN athlete_wellbeing_programs awp ON t.team_id = awp.team_id;","SELECT t.team_name, SUM(awp.participants) FROM teams t JOIN athlete_wellbeing_programs awp ON t.team_id = awp.team_id GROUP BY t.team_name;",0 How many main stream browsers whose market share is at least 5 exist?,CREATE TABLE browser (market_share VARCHAR);,SELECT COUNT(*) FROM browser WHERE market_share >= 5;,SELECT COUNT(*) FROM browser WHERE market_share >= 5;,1 What is the class of the Coca-cola classic 12 hours of sebring race?,"CREATE TABLE table_name_35 (class VARCHAR, race VARCHAR);","SELECT class FROM table_name_35 WHERE race = ""coca-cola classic 12 hours of sebring"";","SELECT class FROM table_name_35 WHERE race = ""coca-cola classic 12 hours of sebring"";",1 What is the total revenue generated by sustainable tourism in Costa Rica last year?,"CREATE TABLE bookings (id INT, hotel_id INT, tourist_id INT, cost FLOAT, date DATE); ",SELECT SUM(cost) FROM bookings JOIN hotels ON bookings.hotel_id = hotels.id WHERE hotels.country = 'Costa Rica' AND hotels.sustainable = true AND bookings.date >= '2021-01-01' AND bookings.date < '2022-01-01';,"SELECT SUM(cost) FROM bookings WHERE date >= DATEADD(year, -1, GETDATE());",0 "Add a new record to the wearables table for a member with ID 103, device type 'Garmin', and heart rate 120 bpm","CREATE TABLE wearables (member_id INT, device_type VARCHAR(50), heart_rate INT);","INSERT INTO wearables (member_id, device_type, heart_rate) VALUES (103, 'Garmin', 120);","INSERT INTO wearables (member_id, device_type, heart_rate) VALUES (103, 'Garmin', 120);",1 Which designers have the highest and lowest average garment prices for plus-size clothing?,"CREATE TABLE designers (designer_id INT, designer_name VARCHAR(255));CREATE TABLE garments (garment_id INT, garment_name VARCHAR(255), designer_id INT, price DECIMAL(10,2), size VARCHAR(10));","SELECT d.designer_name, AVG(g.price) AS avg_price FROM garments g JOIN designers d ON g.designer_id = d.designer_id WHERE g.size = 'plus-size' GROUP BY d.designer_name ORDER BY avg_price DESC, d.designer_name ASC LIMIT 1; SELECT d.designer_name, AVG(g.price) AS avg_price FROM garments g JOIN designers d ON g.designer_id = d.designer_id WHERE g.size = 'plus-size' GROUP BY d.designer_name ORDER BY avg_price ASC, d.designer_name ASC LIMIT 1;","SELECT d.designer_name, AVG(g.price) as avg_price FROM designers d JOIN garments g ON d.designer_id = g.designer_id WHERE g.size = 'plus' GROUP BY d.designer_name ORDER BY avg_price DESC LIMIT 1;",0 What is the age when the result is fired in week 8,"CREATE TABLE table_26263322_1 (age INTEGER, result VARCHAR);","SELECT MIN(age) FROM table_26263322_1 WHERE result = ""Fired in week 8"";","SELECT MAX(age) FROM table_26263322_1 WHERE result = ""Fired"";",0 "What is the highest goals against when points are larger than 31, the goal difference is smaller than 9, wins are 13, and draws are larger than 6?","CREATE TABLE table_name_12 (goals_against INTEGER, draws VARCHAR, wins VARCHAR, points VARCHAR, goal_difference VARCHAR);",SELECT MAX(goals_against) FROM table_name_12 WHERE points > 31 AND goal_difference < 9 AND wins = 13 AND draws > 6;,SELECT MAX(goals_against) FROM table_name_12 WHERE points > 31 AND goal_difference 9 AND wins = 13 AND draws > 6;,0 List the top 3 renewable energy producing countries in the world?,"CREATE TABLE renewable_energy (country VARCHAR(20), production FLOAT); ","SELECT country, SUM(production) as total_production FROM renewable_energy GROUP BY country ORDER BY total_production DESC LIMIT 3;","SELECT country, production FROM renewable_energy ORDER BY production DESC LIMIT 3;",0 How many users have registered from each country?,"CREATE TABLE users (user_id INT, registration_date DATE, country VARCHAR(255)); ","SELECT country, COUNT(DISTINCT user_id) FROM users GROUP BY country;","SELECT country, COUNT(*) FROM users GROUP BY country;",0 Provide the average labor cost per worker in 'Ontario' for the 'Construction' sector in the last quarter of 2019.,"CREATE TABLE labor_statistics (worker_id INT, state VARCHAR(20), sector VARCHAR(20), hourly_wage DECIMAL(5,2), hours_worked INT, record_date DATE); ","SELECT AVG(hourly_wage * (EXTRACT(MONTH FROM record_date) IN (10, 11, 12)) * (EXTRACT(YEAR FROM record_date) = 2019)) AS avg_labor_cost FROM labor_statistics WHERE state = 'Ontario' AND sector = 'Construction';",SELECT AVG(hourly_wage * hours_worked) FROM labor_statistics WHERE state = 'Ontario' AND sector = 'Construction' AND record_date >= '2019-01-01' AND record_date '2019-12-31';,0 What is the average budget allocated per service category in the Public Works department?,"CREATE TABLE Public_Works_Dept (ID INT, Service VARCHAR(255), Budget FLOAT); ",SELECT AVG(Budget) FROM Public_Works_Dept GROUP BY Service;,"SELECT Service, AVG(Budget) FROM Public_Works_Dept GROUP BY Service;",0 "What is the total amount donated by individual donors from the United States and Canada, excluding donations made by organizations?","CREATE TABLE Donors (DonorID int, DonorName varchar(100), Country varchar(50), DonationType varchar(50), DonationAmount numeric); ","SELECT DonationAmount FROM Donors WHERE DonationType = 'Individual' AND Country IN ('USA', 'Canada')","SELECT SUM(DonationAmount) FROM Donors WHERE Country IN ('USA', 'Canada') AND DonationType!= 'Organic';",0 What is the Lomavren associated with a Persian of se?,"CREATE TABLE table_name_32 (lomavren VARCHAR, persian VARCHAR);","SELECT lomavren FROM table_name_32 WHERE persian = ""se"";","SELECT lomavren FROM table_name_32 WHERE persian = ""se"";",1 What was the tie number with the away team of Sheffield Wednesday?,"CREATE TABLE table_name_63 (tie_no VARCHAR, away_team VARCHAR);","SELECT tie_no FROM table_name_63 WHERE away_team = ""sheffield wednesday"";","SELECT tie_no FROM table_name_63 WHERE away_team = ""sheffield wednesday"";",1 What is the minimum age of patients who received teletherapy sessions?,"CREATE TABLE patients (patient_id INT, age INT, teletherapy VARCHAR(5)); ",SELECT MIN(age) FROM patients WHERE teletherapy = 'yes';,SELECT MIN(age) FROM patients WHERE teletherapy = 'teletherapy';,0 Find the total number of games and unique genres for each platform.,"CREATE TABLE Games (GameID INT, GameName VARCHAR(50), Platform VARCHAR(10), GameGenre VARCHAR(20));","SELECT Platform, COUNT(DISTINCT GameGenre) AS Unique_Genres, COUNT(*) AS Total_Games FROM Games GROUP BY Platform;","SELECT Platform, COUNT(DISTINCT GameGenre) AS UniqueGenres, COUNT(DISTINCT GameGenre) AS TotalGenres FROM Games GROUP BY Platform;",0 How many security incidents were there in the EMEA region per month in 2021?,"CREATE TABLE security_incidents (id INT, incident_date DATE, region VARCHAR(255), incident_type VARCHAR(255)); ","SELECT EXTRACT(MONTH FROM incident_date) as month, COUNT(*) as incidents_per_month FROM security_incidents WHERE region = 'EMEA' AND incident_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY month;","SELECT EXTRACT(MONTH FROM incident_date) AS month, COUNT(*) FROM security_incidents WHERE region = 'EMEA' AND incident_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY month;",0 "What is Rider, when Grid is less than 16, when Laps is 21, when Manufacturer is Honda, and when Time is +10.583?","CREATE TABLE table_name_67 (rider VARCHAR, time VARCHAR, manufacturer VARCHAR, grid VARCHAR, laps VARCHAR);","SELECT rider FROM table_name_67 WHERE grid < 16 AND laps = 21 AND manufacturer = ""honda"" AND time = ""+10.583"";","SELECT rider FROM table_name_67 WHERE grid 16 AND laps = 21 AND manufacturer = ""honda"" AND time = ""+10.583"";",0 List the top 3 cities with the most members who have used a wearable device for more than 270 days.,"CREATE TABLE City (id INT, name VARCHAR(50), country VARCHAR(50)); ","SELECT c.name, COUNT(*) as member_count FROM Member m JOIN City c ON m.city = c.name JOIN WearableDevice wd ON m.id = wd.member_id WHERE DATEDIFF('day', device_start_date, device_end_date) > 270 GROUP BY c.name ORDER BY member_count DESC LIMIT 3;","SELECT name, COUNT(*) as num_members FROM City WHERE country = 'USA' GROUP BY name ORDER BY num_members DESC LIMIT 3;",0 "What is the total number of sunk by U-boats with less than 2 German submarines lost, 56328 sunk by aircrafts, and more than 8269 sunk by mines?","CREATE TABLE table_name_4 (sunk_by_u_boat VARCHAR, sunk_by_mines VARCHAR, german_submarines_lost VARCHAR, sunk_by_aircraft VARCHAR);",SELECT COUNT(sunk_by_u_boat) FROM table_name_4 WHERE german_submarines_lost < 2 AND sunk_by_aircraft = 56328 AND sunk_by_mines > 8269;,SELECT COUNT(sunk_by_u_boat) FROM table_name_4 WHERE german_submarines_lost 2 AND sunk_by_aircraft = 56328 AND sunk_by_mines > 8269;,0 "Which indigenous communities are represented in the 'arctic_communities' table, and what is their total population, excluding the 'Inuit' community?","CREATE TABLE arctic_communities (name TEXT, population INTEGER);","SELECT name, SUM(population) FROM arctic_communities WHERE name != 'Inuit' GROUP BY name;","SELECT name, SUM(population) FROM arctic_communities WHERE name!= 'Inuit' GROUP BY name;",0 What number is Fall 08 from the state with 57 in Fall 06 and 74 or less in Fall 05?,"CREATE TABLE table_name_52 (fall_08 VARCHAR, fall_06 VARCHAR, fall_05 VARCHAR);",SELECT COUNT(fall_08) FROM table_name_52 WHERE fall_06 = 57 AND fall_05 < 74;,SELECT COUNT(fall_08) FROM table_name_52 WHERE fall_06 = 57 AND fall_05 74;,0 "What was Freddie Starr, who entered on Day 1, known for?","CREATE TABLE table_name_67 (known_for VARCHAR, entered VARCHAR, celebrity VARCHAR);","SELECT known_for FROM table_name_67 WHERE entered = ""day 1"" AND celebrity = ""freddie starr"";","SELECT known_for FROM table_name_67 WHERE entered = ""day 1"" AND celebrity = ""freddie starr"";",1 Tell me the sum of Grid for giancarlo fisichella,"CREATE TABLE table_name_84 (grid INTEGER, driver VARCHAR);","SELECT SUM(grid) FROM table_name_84 WHERE driver = ""giancarlo fisichella"";","SELECT SUM(grid) FROM table_name_84 WHERE driver = ""giancarlo fisichella"";",1 "Name the Number of electorates (2009 which has a Reserved for ( SC / ST /None) of none, and a Name of jahanabad?","CREATE TABLE table_name_40 (number_of_electorates__2009_ INTEGER, reserved_for___sc___st__none_ VARCHAR, name VARCHAR);","SELECT MIN(number_of_electorates__2009_) FROM table_name_40 WHERE reserved_for___sc___st__none_ = ""none"" AND name = ""jahanabad"";","SELECT MAX(number_of_electorates__2009_) FROM table_name_40 WHERE reserved_for___sc___st__none_ = ""none"" AND name = ""jahanabad"";",0 Which country had the highest number of tourists in 2020?,"CREATE TABLE tourists (id INT, country VARCHAR(50), visitors INT, year INT); ","SELECT country, MAX(visitors) FROM tourists WHERE year = 2020 GROUP BY country;","SELECT country, MAX(visitors) FROM tourists WHERE year = 2020 GROUP BY country;",1 "What is the fewest mintage from Dora de Pédery-Hunt, and the year was before 2002?","CREATE TABLE table_name_93 (mintage INTEGER, artist VARCHAR, year VARCHAR);","SELECT MIN(mintage) FROM table_name_93 WHERE artist = ""dora de pédery-hunt"" AND year < 2002;","SELECT MIN(mintage) FROM table_name_93 WHERE artist = ""dora de pédery-hunt"" AND year 2002;",0 What was the total number for the Bulls when they were at Old Trafford?,"CREATE TABLE table_name_27 (bulls VARCHAR, venue VARCHAR);","SELECT COUNT(bulls) FROM table_name_27 WHERE venue = ""old trafford"";","SELECT COUNT(bulls) FROM table_name_27 WHERE venue = ""old trafford"";",1 Count total artworks for each artist,"CREATE TABLE artists (artist_id INT PRIMARY KEY, name VARCHAR(100), birth_date DATE, death_date DATE, nationality VARCHAR(50)); CREATE TABLE artworks (artwork_id INT PRIMARY KEY, title VARCHAR(100), year INT, artist_id INT, FOREIGN KEY (artist_id) REFERENCES artists(artist_id));","SELECT artists.name, COUNT(artworks.artwork_id) AS total_artworks FROM artists INNER JOIN artworks ON artists.artist_id = artworks.artist_id GROUP BY artists.name;","SELECT a.name, COUNT(a.artwork_id) as total_artworks FROM artists a JOIN artworks a ON a.artist_id = a.artist_id GROUP BY a.name;",0 List the top 5 most popular workouts by duration in April 2022.',"CREATE SCHEMA workouts; CREATE TABLE workout_durations (workout_id INT, workout_name VARCHAR(50), duration INT, duration_unit VARCHAR(10), workout_date DATE); ","SELECT workout_name, SUM(duration) as total_duration FROM workouts.workout_durations WHERE workout_date >= '2022-04-01' AND workout_date <= '2022-04-30' GROUP BY workout_name ORDER BY total_duration DESC LIMIT 5;","SELECT workout_name, duration FROM workouts.workout_durations WHERE workout_date BETWEEN '2022-04-01' AND '2022-06-30' GROUP BY workout_name ORDER BY duration DESC LIMIT 5;",0 "What is the total decile with an Area of whitianga, and a Roll smaller than 835?","CREATE TABLE table_name_64 (decile INTEGER, area VARCHAR, roll VARCHAR);","SELECT SUM(decile) FROM table_name_64 WHERE area = ""whitianga"" AND roll < 835;","SELECT SUM(decile) FROM table_name_64 WHERE area = ""whitianga"" AND roll 835;",0 How many female workers are there in the 'manufacturing' industry?,"CREATE TABLE if not exists industry (industry_id INT, industry_name TEXT, total_workers INT, female_workers INT); ",SELECT SUM(female_workers) FROM industry WHERE industry_name = 'manufacturing';,SELECT SUM(total_workers) FROM industry WHERE industry_name ='manufacturing' AND female_workers = 1;,0 "What is Best, when Name is Jimmy Vasser?","CREATE TABLE table_name_17 (best VARCHAR, name VARCHAR);","SELECT best FROM table_name_17 WHERE name = ""jimmy vasser"";","SELECT best FROM table_name_17 WHERE name = ""jamie vasser"";",0 "What is IATA, when ICAO is ""VHHH""?","CREATE TABLE table_name_8 (iata VARCHAR, icao VARCHAR);","SELECT iata FROM table_name_8 WHERE icao = ""vhhh"";","SELECT iata FROM table_name_8 WHERE icao = ""vhhh"";",1 Get the number of public hearings held in each district of the city,"CREATE TABLE public_hearings (hearing_id INT, topic VARCHAR(255), district VARCHAR(255)); ","SELECT district, COUNT(*) FROM public_hearings GROUP BY district;","SELECT district, COUNT(*) FROM public_hearings GROUP BY district;",1 Insert a new smart contract 'Loyalty' with language 'Simplicity',"CREATE TABLE smart_contracts (contract_id INT, name VARCHAR(20), language VARCHAR(20));","INSERT INTO smart_contracts (name, language) VALUES ('Loyalty', 'Simplicity');","INSERT INTO smart_contracts (name, language) VALUES ('Loyalty', 'Simplicity');",1 "What year was the Win percentage 50.00%, with more than 14 matches, and wins more than 8?","CREATE TABLE table_name_6 (year VARCHAR, wins VARCHAR, win__percentage VARCHAR, matches VARCHAR);","SELECT year FROM table_name_6 WHERE win__percentage = ""50.00%"" AND matches > 14 AND wins > 8;","SELECT year FROM table_name_6 WHERE win__percentage = ""50.00%"" AND matches > 14 AND wins > 8;",1 What is the total amount donated by each donor who made a donation in 2021?,"CREATE TABLE Donors (DonorID INT, FirstName TEXT, LastName TEXT, RegistrationDate DATE); CREATE TABLE Donations (DonationID INT, DonorID INT, DonationDate DATE, Amount DECIMAL(5,2)); ","SELECT d.FirstName, d.LastName, SUM(Donations.Amount) as TotalDonated FROM Donors d JOIN Donations ON d.DonorID = Donations.DonorID WHERE Donations.DonationDate BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY d.DonorID;","SELECT Donors.FirstName, Donors.LastName, SUM(Donations.Amount) as TotalDonated FROM Donors INNER JOIN Donations ON Donors.DonorID = Donations.DonorID WHERE Donations.DonationDate BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY Donors.FirstName, Donors.LastName;",0 What was Anand's score in game 8?,"CREATE TABLE table_name_67 (anand VARCHAR, game VARCHAR);","SELECT anand FROM table_name_67 WHERE game = ""8"";",SELECT anand FROM table_name_67 WHERE game = 8;,0 What was the time of the bout against Dave Menne?,"CREATE TABLE table_name_33 (time VARCHAR, opponent VARCHAR);","SELECT time FROM table_name_33 WHERE opponent = ""dave menne"";","SELECT time FROM table_name_33 WHERE opponent = ""dave menne"";",1 How many drugs were approved in 2020 for oncology?,"CREATE TABLE drug_approval (drug_class TEXT, approval_year INTEGER, status TEXT);",SELECT COUNT(*) FROM drug_approval WHERE drug_class = 'oncology' AND approval_year = 2020 AND status = 'approved';,SELECT COUNT(*) FROM drug_approval WHERE approval_year = 2020 AND status = 'Oncology';,0 What is the average age of patients who received therapy in community health center 1?,"CREATE TABLE community_health_center (center_id INT, name VARCHAR(255)); CREATE TABLE patient (patient_id INT, center_id INT, age INT); CREATE TABLE therapy_session (session_id INT, patient_id INT, therapist_id INT);",SELECT AVG(patient.age) FROM patient JOIN community_health_center ON patient.center_id = community_health_center.center_id JOIN therapy_session ON patient.patient_id = therapy_session.patient_id WHERE community_health_center.center_id = 1;,SELECT AVG(patient.age) FROM patient INNER JOIN therapy_session ON patient.patient_id = therapy_session.patient_id INNER JOIN community_health_center ON therapy_session.center_id = community_health_center.center_id WHERE community_health_center.name = 'Community Health Center 1';,0 What's the total amount donated by each donor?,"CREATE TABLE Donors (DonorID INT, Name TEXT, TotalDonation FLOAT); ","SELECT Name, SUM(TotalDonation) FROM Donors GROUP BY Name;","SELECT Name, SUM(TotalDonation) FROM Donors GROUP BY Name;",1 What Title is listed for the Year of 1999?,"CREATE TABLE table_name_63 (title VARCHAR, year VARCHAR);",SELECT title FROM table_name_63 WHERE year = 1999;,SELECT title FROM table_name_63 WHERE year = 1999;,1 Identify the total number of unique donors for the 'Arts & Culture' category.,"CREATE TABLE category (cat_id INT, name VARCHAR(255)); CREATE TABLE donation (don_id INT, donor_id INT, cat_id INT); ",SELECT COUNT(DISTINCT donor_id) FROM donation WHERE cat_id = (SELECT cat_id FROM category WHERE name = 'Arts & Culture');,SELECT COUNT(DISTINCT donor_id) FROM donation JOIN category ON donation.cat_id = category.cat_id WHERE category.name = 'Arts & Culture';,0 what is the language when the name of award is best editing?,"CREATE TABLE table_25926120_7 (language VARCHAR, name_of_award VARCHAR);","SELECT language FROM table_25926120_7 WHERE name_of_award = ""Best Editing"";","SELECT language FROM table_25926120_7 WHERE name_of_award = ""Best Editing"";",1 What is the lowest ERP W of the 67829 Facility ID?,"CREATE TABLE table_name_54 (erp_w INTEGER, facility_id VARCHAR);",SELECT MIN(erp_w) FROM table_name_54 WHERE facility_id = 67829;,SELECT MIN(erp_w) FROM table_name_54 WHERE facility_id = 67829;,1 What is the total amount donated in each quarter?,"CREATE TABLE donation (id INT, amount DECIMAL(10, 2), donation_date DATE); ","SELECT DATE_FORMAT(donation_date, '%Y-%m') as quarter, SUM(amount) as total_donations FROM donation GROUP BY quarter;","SELECT DATE_FORMAT(donation_date, '%Y-%m') as quarter, SUM(amount) as total_donated FROM donation GROUP BY quarter;",0 Which carbon offset initiatives in the 'Mountain' region were started after 2017-01-01?,"CREATE TABLE carbon_offset_initiatives (initiative_id INT, initiative_name VARCHAR(100), location VARCHAR(50), start_date DATE); ",SELECT * FROM carbon_offset_initiatives WHERE location = 'Mountain' AND start_date > '2017-01-01';,SELECT initiative_name FROM carbon_offset_initiatives WHERE location = 'Mountain' AND start_date > '2017-01-01';,0 What is the smallest number of wins with 7 games played and goals against less than 46 when goals for is more than 34?,"CREATE TABLE table_name_93 (wins INTEGER, goals_for VARCHAR, games_played VARCHAR, goals_against VARCHAR);",SELECT MIN(wins) FROM table_name_93 WHERE games_played = 7 AND goals_against < 46 AND goals_for > 34;,SELECT MIN(wins) FROM table_name_93 WHERE games_played = 7 AND goals_against 46 AND goals_for > 34;,0 Who had more than 3 wins?,"CREATE TABLE table_name_47 (winner VARCHAR, win__number INTEGER);",SELECT winner FROM table_name_47 WHERE win__number > 3;,SELECT winner FROM table_name_47 WHERE win__number > 3;,1 " what's the engine where performance is 0–100km/h: 10.5s, vmax km/h (mph)","CREATE TABLE table_11167610_1 (engine VARCHAR, performance VARCHAR);","SELECT engine FROM table_11167610_1 WHERE performance = ""0–100km/h: 10.5s, VMax km/h (mph)"";","SELECT engine FROM table_11167610_1 WHERE performance = ""0–100km/h: 10.5s, vmax km/h (mph)"";",0 What is the waste generation metric for region 'Tokyo' in 2019?,"CREATE TABLE waste_generation ( id INT PRIMARY KEY, region VARCHAR(50), year INT, metric DECIMAL(5,2)); ",SELECT metric FROM waste_generation WHERE region = 'Tokyo' AND year = 2019;,SELECT metric FROM waste_generation WHERE region = 'Tokyo' AND year = 2019;,1 How many points did player 7 score in the challenge cup?,"CREATE TABLE table_22683369_8 (challenge_cup VARCHAR, p VARCHAR);",SELECT COUNT(challenge_cup) FROM table_22683369_8 WHERE p = 7;,SELECT challenge_cup FROM table_22683369_8 WHERE p = 7;,0 Which Size has a County of 62 perry?,"CREATE TABLE table_name_69 (size INTEGER, county VARCHAR);","SELECT MAX(size) FROM table_name_69 WHERE county = ""62 perry"";","SELECT SUM(size) FROM table_name_69 WHERE county = ""62 perry"";",0 What is the city in Alabama that opened in 1996?,"CREATE TABLE table_name_89 (city VARCHAR, year_opened VARCHAR, state VARCHAR);","SELECT city FROM table_name_89 WHERE year_opened = ""1996"" AND state = ""alabama"";","SELECT city FROM table_name_89 WHERE year_opened = ""1996"" AND state = ""alaska"";",0 What is the phone and email for customer with first name Aniyah and last name Feest?,"CREATE TABLE Customers (customer_phone VARCHAR, customer_email VARCHAR, customer_first_name VARCHAR, customer_last_name VARCHAR);","SELECT customer_phone, customer_email FROM Customers WHERE customer_first_name = ""Aniyah"" AND customer_last_name = ""Feest"";","SELECT customer_phone, customer_email FROM Customers WHERE customer_first_name = ""Aniyah"" AND customer_last_name = ""Feest"";",1 What is the first episode with a netflix episode code of s02e20?,"CREATE TABLE table_15187735_4 (episode INTEGER, netflix VARCHAR);","SELECT MIN(episode) FROM table_15187735_4 WHERE netflix = ""S02E20"";","SELECT MIN(episode) FROM table_15187735_4 WHERE netflix = ""S02E20"";",1 Insert a new record for a mental health parity violation in Virginia with 5 violations.,"CREATE TABLE mental_health_parity (state VARCHAR(255), violations INT); ","INSERT INTO mental_health_parity (state, violations) VALUES ('Virginia', 5);","INSERT INTO mental_health_parity (state, violations) VALUES ('Virginia', 5);",1 "What is Date, when Opponent is @ Carolina Hurricanes?","CREATE TABLE table_name_84 (date VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_84 WHERE opponent = ""@ carolina hurricanes"";","SELECT date FROM table_name_84 WHERE opponent = ""@ carolina hurricanes"";",1 Tell me the origin for mi-2,"CREATE TABLE table_name_57 (origin VARCHAR, versions VARCHAR);","SELECT origin FROM table_name_57 WHERE versions = ""mi-2"";","SELECT origin FROM table_name_57 WHERE versions = ""mi-2"";",1 Find the first name and last name and department id for those employees who earn such amount of salary which is the smallest salary of any of the departments.,"CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, department_id VARCHAR, salary INTEGER);","SELECT first_name, last_name, department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id);","SELECT first_name, last_name, department_id FROM employees WHERE salary = (SELECT MIN(salary) FROM employees);",0 How many mobile and broadband subscribers are there in each country?,"CREATE TABLE countries (country_id INT, country_name VARCHAR(50)); CREATE TABLE mobile_subscribers (subscriber_id INT, subscriber_name VARCHAR(50), country_id INT); CREATE TABLE broadband_subscribers (subscriber_id INT, subscriber_name VARCHAR(50), country_id INT);","SELECT c.country_name, COUNT(m.subscriber_id) AS mobile_subscribers, COUNT(b.subscriber_id) AS broadband_subscribers FROM countries c LEFT JOIN mobile_subscribers m ON c.country_id = m.country_id LEFT JOIN broadband_subscribers b ON c.country_id = b.country_id GROUP BY c.country_name;","SELECT c.country_name, COUNT(ms.subscriber_id) as mobile_subscribers_count, COUNT(bs.subscriber_id) as broadband_subscribers_count FROM countries c JOIN mobile_subscribers ms ON c.country_id = ms.country_id JOIN broadband_subscribers bs ON c.country_id = bs.country_id GROUP BY c.country_name;",0 "What is the total CO2 emissions reduction in Mega tonnes, for each country, in the renewable energy sector in the last 5 years?","CREATE TABLE co2_emissions (id INT, country VARCHAR(50), sector VARCHAR(50), year INT, emissions FLOAT); ","SELECT country, SUM(emissions) FROM co2_emissions WHERE sector = 'Renewable Energy' AND year >= 2016 GROUP BY country;","SELECT country, SUM(emissions) FROM co2_emissions WHERE sector = 'Renewable Energy' AND year BETWEEN 2017 AND 2021 GROUP BY country;",0 How many resources does each mine deplete on average per day?,"CREATE TABLE mine (mine_id INT, mine_name TEXT, location TEXT, daily_depletion_percentage DECIMAL(4,2)); ","SELECT mine_name, daily_depletion_percentage*100 as daily_depletion_percentage_avg, (365*24) as days_in_year_hours FROM mine;","SELECT mine_name, AVG(daily_depletion_percentage) as avg_depletion_per_day FROM mine GROUP BY mine_name;",0 "what is the total rank on airdate march 30, 2011?","CREATE TABLE table_27987623_4 (rank_timeslot_ VARCHAR, airdate VARCHAR);","SELECT COUNT(rank_timeslot_) FROM table_27987623_4 WHERE airdate = ""March 30, 2011"";","SELECT COUNT(rank_timeslot_) FROM table_27987623_4 WHERE airdate = ""March 30, 2011"";",1 "During the championship where the winning score was −9 (66-69-73-71=279)?, who was the runner-up?","CREATE TABLE table_name_32 (runner_s__up VARCHAR, winning_score VARCHAR);",SELECT runner_s__up FROM table_name_32 WHERE winning_score = −9(66 - 69 - 73 - 71 = 279);,SELECT runner_s__up FROM table_name_32 WHERE winning_score = 9(66 - 69 - 73 - 71 = 279);,0 "which Player has a To par of –7, and a Country of spain?","CREATE TABLE table_name_67 (player VARCHAR, to_par VARCHAR, country VARCHAR);","SELECT player FROM table_name_67 WHERE to_par = ""–7"" AND country = ""spain"";","SELECT player FROM table_name_67 WHERE to_par = ""–7"" AND country = ""spain"";",1 List the top 3 regions with the highest climate adaptation funding in Latin America and the Caribbean.,"CREATE TABLE climate_adaptation_funding (project_id INT, sector TEXT, region TEXT, amount FLOAT); ","SELECT region, SUM(amount) AS total_funding FROM climate_adaptation_funding WHERE sector = 'Climate Adaptation' AND region IN ('Caribbean', 'Central America', 'South America') GROUP BY region ORDER BY total_funding DESC LIMIT 3;","SELECT region, SUM(amount) as total_funding FROM climate_adaptation_funding WHERE region IN ('Latin America', 'Caribbean') GROUP BY region ORDER BY total_funding DESC LIMIT 3;",0 What is the number of clients who made their first transaction in Q1 2023 and their total assets value?,"CREATE TABLE clients (client_id INT, name VARCHAR(50), total_assets DECIMAL(10,2), first_transaction_date DATE);CREATE TABLE transactions (transaction_id INT, client_id INT, transaction_date DATE);","SELECT c.total_assets, COUNT(*) FROM clients c INNER JOIN transactions t ON c.client_id = t.client_id WHERE c.first_transaction_date = t.transaction_date AND t.transaction_date BETWEEN '2023-01-01' AND '2023-03-31' GROUP BY c.total_assets","SELECT COUNT(*) as num_clients, SUM(total_assets) as total_assets FROM clients c JOIN transactions t ON c.client_id = t.client_id WHERE t.transaction_date BETWEEN '2023-01-01' AND '2023-03-31' GROUP BY c.client_id;",0 What label does Germany have?,"CREATE TABLE table_name_24 (label VARCHAR, region VARCHAR);","SELECT label FROM table_name_24 WHERE region = ""germany"";","SELECT label FROM table_name_24 WHERE region = ""germany"";",1 What is the total revenue for each restaurant in the last quarter?,"CREATE TABLE revenue (id INT, restaurant_id INT, revenue INT, revenue_date DATE); ","SELECT R.name, SUM(revenue) FROM revenue RE JOIN restaurants R ON RE.restaurant_id = R.id WHERE revenue_date BETWEEN DATE_SUB(NOW(), INTERVAL 3 MONTH) AND NOW() GROUP BY R.name;","SELECT restaurant_id, SUM(revenue) as total_revenue FROM revenue WHERE revenue_date >= DATEADD(quarter, -1, GETDATE()) GROUP BY restaurant_id;",0 What is the notes left for Berlin?,"CREATE TABLE table_name_96 (notes VARCHAR, location VARCHAR);","SELECT notes FROM table_name_96 WHERE location = ""berlin"";","SELECT notes FROM table_name_96 WHERE location = ""berlin"";",1 Total enrollment at the school with the nickname Blue Hens,"CREATE TABLE table_16432543_1 (enrollment VARCHAR, nickname VARCHAR);","SELECT COUNT(enrollment) FROM table_16432543_1 WHERE nickname = ""Blue Hens"";","SELECT COUNT(enrollment) FROM table_16432543_1 WHERE nickname = ""Blue Hens"";",1 Name the average bronze for total less than 1,"CREATE TABLE table_name_32 (bronze INTEGER, total INTEGER);",SELECT AVG(bronze) FROM table_name_32 WHERE total < 1;,SELECT AVG(bronze) FROM table_name_32 WHERE total 1;,0 what's the election date where member is william richmond category:articles with hcards,"CREATE TABLE table_1193568_1 (election_date VARCHAR, member VARCHAR);","SELECT election_date FROM table_1193568_1 WHERE member = ""William Richmond Category:Articles with hCards"";","SELECT election_date FROM table_1193568_1 WHERE member = ""William Richmond category:articles with hcards"";",0 Which spacecraft were launched before 2010?,"CREATE TABLE Spacecraft (Id INT, Name VARCHAR(50), LaunchDate DATE);",SELECT Name FROM Spacecraft WHERE YEAR(LaunchDate) < 2010;,SELECT Name FROM Spacecraft WHERE LaunchDate '2010-01-01';,0 What's the nationality of Louisiana Tech?,"CREATE TABLE table_name_10 (nationality VARCHAR, college VARCHAR);","SELECT nationality FROM table_name_10 WHERE college = ""louisiana tech"";","SELECT nationality FROM table_name_10 WHERE college = ""laouisville tech"";",0 Find the average carbon sequestration for forests in each region.,"CREATE TABLE regions (id INT, name VARCHAR(255)); CREATE TABLE forests (id INT, region_id INT, carbon_sequestration FLOAT); ","SELECT r.name, AVG(f.carbon_sequestration) FROM regions r JOIN forests f ON r.id = f.region_id GROUP BY r.name;","SELECT r.name, AVG(f.carbon_sequestration) as avg_carbon_sequestration FROM regions r JOIN forests f ON r.id = f.region_id GROUP BY r.name;",0 "What is the lowest Game, when Date is ""November 1""?","CREATE TABLE table_name_45 (game INTEGER, date VARCHAR);","SELECT MIN(game) FROM table_name_45 WHERE date = ""november 1"";","SELECT MIN(game) FROM table_name_45 WHERE date = ""november 1"";",1 What season has roma as the opponent?,"CREATE TABLE table_name_15 (season VARCHAR, opponent VARCHAR);","SELECT season FROM table_name_15 WHERE opponent = ""roma"";","SELECT season FROM table_name_15 WHERE opponent = ""roma"";",1 "How many vessels are there in the 'Red Sea', and what is their total cargo weight?","CREATE TABLE vessels (id INT, name TEXT, region TEXT, cargo_weight INT); ","SELECT COUNT(*), SUM(cargo_weight) FROM vessels WHERE region = 'Red Sea'","SELECT COUNT(*), SUM(cargo_weight) FROM vessels WHERE region = 'Red Sea';",0 What country is the player with a score of 72-72=144 from?,"CREATE TABLE table_name_97 (country VARCHAR, score VARCHAR);",SELECT country FROM table_name_97 WHERE score = 72 - 72 = 144;,SELECT country FROM table_name_97 WHERE score = 72 - 72 = 144;,1 Calculate the average weight of packages shipped from 'Warehouse A',"CREATE TABLE packages (id INT, warehouse_id INT, weight FLOAT); ",SELECT AVG(weight) FROM packages JOIN warehouses ON packages.warehouse_id = warehouses.id WHERE name = 'Warehouse A';,SELECT AVG(weight) FROM packages WHERE warehouse_id = (SELECT id FROM warehouses WHERE name = 'Warehouse A');,0 The Athlete Shin Yeong-eun with a rank larger than 3 and notes of FD had what time?,"CREATE TABLE table_name_79 (time VARCHAR, athlete VARCHAR, rank VARCHAR, notes VARCHAR);","SELECT time FROM table_name_79 WHERE rank > 3 AND notes = ""fd"" AND athlete = ""shin yeong-eun"";","SELECT time FROM table_name_79 WHERE rank > 3 AND notes = ""fd"" AND athlete = ""shin yeong-eun"";",1 Who got the gold in seoul before 2002?,"CREATE TABLE table_name_53 (gold VARCHAR, year VARCHAR, location VARCHAR);","SELECT gold FROM table_name_53 WHERE year < 2002 AND location = ""seoul"";","SELECT gold FROM table_name_53 WHERE year 2002 AND location = ""seoul"";",0 How many marine species are threatened with extinction?,"CREATE TABLE marine_species_status (species TEXT, status TEXT);",SELECT COUNT(*) FROM marine_species_status WHERE status = 'Threatened';,SELECT COUNT(*) FROM marine_species_status WHERE status = 'Ranged with extinction';,0 Update the salaries of all employees who have not left the company,"CREATE TABLE Employees (id INT, name VARCHAR(50), position VARCHAR(50), left_company BOOLEAN, salary DECIMAL(10,2));",UPDATE Employees SET salary = 70000 WHERE left_company = FALSE;,UPDATE Employees SET salary = (SELECT salary FROM Employees WHERE left_company = false) WHERE id NOT IN (SELECT id FROM Employees WHERE id NOT IN (SELECT id FROM Employees WHERE id NOT IN (SELECT id FROM Employees WHERE left_company = false);,0 What is the total quantity of sustainable materials supplied by women-owned businesses in Latin America?,"CREATE TABLE suppliers (supplier_id INT, gender VARCHAR(50), region VARCHAR(50), material_type VARCHAR(50), quantity INT); ",SELECT SUM(quantity) FROM suppliers WHERE gender = 'Female' AND region = 'Latin America';,SELECT SUM(quantity) FROM suppliers WHERE gender = 'Female' AND region = 'Latin America' AND material_type = 'Sustainable';,0 "Show total ticket sales for the 'Lakers' team, grouped by age","CREATE TABLE ticket_sales (id INT, team VARCHAR(50), quantity INT, price DECIMAL(5,2));","SELECT age, SUM(quantity * price) as total_sales FROM ticket_sales WHERE team = 'Lakers' GROUP BY age;","SELECT team, SUM(quantity * price) as total_sales FROM ticket_sales WHERE team = 'Lakers' GROUP BY team, age;",0 When total goals is 11 what was the league apps (sub)?,"CREATE TABLE table_1112176_1 (league_apps__sub_ INTEGER, total_goals VARCHAR);",SELECT MAX(league_apps__sub_) FROM table_1112176_1 WHERE total_goals = 11;,SELECT MAX(league_apps__sub_) FROM table_1112176_1 WHERE total_goals = 11;,1 Tell me the role for tea and sympathy,"CREATE TABLE table_name_83 (role VARCHAR, play VARCHAR);","SELECT role FROM table_name_83 WHERE play = ""tea and sympathy"";","SELECT role FROM table_name_83 WHERE play = ""tea and sympathy"";",1 "What is the zip code of the address where the teacher with first name ""Lyla"" lives?","CREATE TABLE Teachers (address_id VARCHAR, first_name VARCHAR); CREATE TABLE Addresses (zip_postcode VARCHAR, address_id VARCHAR);","SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = ""Lyla"";","SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = ""Lyla"";",1 What was the total revenue for each artwork medium in each year?,"CREATE TABLE ArtWorkSales (artworkID INT, saleDate DATE, artworkMedium VARCHAR(50), revenue DECIMAL(10,2));","SELECT artworkMedium, YEAR(saleDate) as sale_year, SUM(revenue) as total_revenue FROM ArtWorkSales GROUP BY artworkMedium, sale_year;","SELECT artworkMedium, YEAR(saleDate) as year, SUM(revenue) as total_revenue FROM ArtWorkSales GROUP BY artworkMedium, year;",0 What is the total number of fire stations in the city of Los Angeles?,"CREATE TABLE fire_stations (id INT, city VARCHAR(255), number_of_stations INT); ",SELECT SUM(number_of_stations) FROM fire_stations WHERE city = 'Los_Angeles';,SELECT SUM(number_of_stations) FROM fire_stations WHERE city = 'Los Angeles';,0 What is the minimum lead time for factories in the fair labor sector?,"CREATE TABLE Factories (id INT, sector VARCHAR, lead_time INT);",SELECT MIN(lead_time) FROM Factories WHERE sector = 'fair labor';,SELECT MIN(lead_time) FROM Factories WHERE sector = 'Fair Labor';,0 What is the total number of COVID-19 cases in each country?,"CREATE TABLE COVIDCountry (Country VARCHAR(50), Cases INT); ","SELECT Country, SUM(Cases) FROM COVIDCountry GROUP BY Country;","SELECT Country, SUM(Cases) FROM COVIDCountry GROUP BY Country;",1 How many volunteers are there in each region?,"CREATE TABLE Volunteers (VolunteerID INT, VolunteerName TEXT, Region TEXT); ","SELECT Region, COUNT(*) as TotalVolunteers FROM Volunteers GROUP BY Region;","SELECT Region, COUNT(*) FROM Volunteers GROUP BY Region;",0 How many arts education programs were funded by 'City Grants' in the 'Southeast' region in 2022?,"CREATE TABLE EducationPrograms (program_id INT, region VARCHAR(20), funding_source VARCHAR(20), year INT); ",SELECT COUNT(*) FROM EducationPrograms WHERE region = 'Southeast' AND funding_source = 'City Grants' AND year = 2022,SELECT COUNT(*) FROM EducationPrograms WHERE region = 'Southeast' AND funding_source = 'City Grants' AND year = 2022;,0 List the names of genetic research projects with an ID greater than 10 and their respective start dates.,"CREATE SCHEMA if not exists genetics; CREATE TABLE if not exists genetics.projects (id INT, name VARCHAR(100), start_date DATE); ","SELECT id, name, start_date FROM genetics.projects WHERE id > 10;","SELECT name, start_date FROM genetics.projects WHERE id > 10;",0 When Spencer is the county what is total of the population (2010) (rank)? ,"CREATE TABLE table_14253123_1 (population__2010___rank_ VARCHAR, county_name VARCHAR);","SELECT COUNT(population__2010___rank_) FROM table_14253123_1 WHERE county_name = ""Spencer"";","SELECT COUNT(population__2010___rank_) FROM table_14253123_1 WHERE county_name = ""Spencer"";",1 What are the names of the contestants whose names are not 'Jessie Alloway',CREATE TABLE contestants (contestant_name VARCHAR);,SELECT contestant_name FROM contestants WHERE contestant_name <> 'Jessie Alloway';,SELECT contestant_name FROM contestants WHERE contestant_name!= 'Jessie Alloway';,0 "Add a new author, 'Ali Al-Ahmad', to the 'authors' table","CREATE TABLE authors (author_id INT PRIMARY KEY, first_name VARCHAR(50), last_name VARCHAR(50));","INSERT INTO authors (first_name, last_name) VALUES ('Ali', 'Al-Ahmad');","INSERT INTO authors (author_id, first_name, last_name) VALUES (1, 'Ali Al-Ahmad', 'Ali Al-Ahmad');",0 Name the team for season 2010,"CREATE TABLE table_24466191_1 (team VARCHAR, season VARCHAR);",SELECT team FROM table_24466191_1 WHERE season = 2010;,SELECT team FROM table_24466191_1 WHERE season = 2010;,1 Which player has West Virginia listed as their school/country?,"CREATE TABLE table_name_11 (player VARCHAR, school_country VARCHAR);","SELECT player FROM table_name_11 WHERE school_country = ""west virginia"";","SELECT player FROM table_name_11 WHERE school_country = ""west virginia"";",1 What was the result when there were 6 matches?,"CREATE TABLE table_name_13 (result VARCHAR, matches VARCHAR);","SELECT result FROM table_name_13 WHERE matches = ""6"";",SELECT result FROM table_name_13 WHERE matches = 6;,0 List the names and transaction fees for all 'Security' smart contracts created by developers named 'Bob' or 'Charlie'.,"CREATE TABLE developers (developer_id INT, name VARCHAR(100)); CREATE TABLE smart_contracts (contract_id INT, developer_id INT, transaction_fee DECIMAL(10,2), app_category VARCHAR(50)); ","SELECT d.name, sc.transaction_fee FROM developers d JOIN smart_contracts sc ON d.developer_id = sc.developer_id WHERE d.name IN ('Bob', 'Charlie') AND sc.app_category = 'Security';","SELECT developers.name, smart_contracts.transaction_fee FROM developers INNER JOIN smart_contracts ON developers.developer_id = smart_contracts.developer_id WHERE smart_contracts.app_category = 'Security' AND developers.name IN ('Bob', 'Charlie');",0 What is the highest number of students with a teacher:student ratio of 20.8?,"CREATE TABLE table_1414743_1 (students INTEGER, pupil_teacher_ratio VARCHAR);","SELECT MAX(students) FROM table_1414743_1 WHERE pupil_teacher_ratio = ""20.8"";","SELECT MAX(students) FROM table_1414743_1 WHERE pupil_teacher_ratio = ""20.8"";",1 "What is the average mental health score of students in the ""Lakeside"" school district?","CREATE TABLE students (student_id INT, district VARCHAR(20), mental_health_score INT); ",SELECT AVG(mental_health_score) FROM students WHERE district = 'Lakeside';,SELECT AVG(mental_health_score) FROM students WHERE district = 'Lakeside';,1 Who had the high points on January 23?,"CREATE TABLE table_11960407_4 (high_points VARCHAR, date VARCHAR);","SELECT high_points FROM table_11960407_4 WHERE date = ""January 23"";","SELECT high_points FROM table_11960407_4 WHERE date = ""January 23"";",1 What is the percentage of cruelty-free beauty products in the Australian market?,"CREATE TABLE sales_data (sale_id INT, product_id INT, country VARCHAR(50), is_cruelty_free BOOLEAN, sale_date DATE);","SELECT country, 100.0 * SUM(CASE WHEN is_cruelty_free THEN 1 ELSE 0 END) / COUNT(*) as cruelty_free_percentage FROM sales_data WHERE sale_date >= '2022-01-01' AND country = 'Australia' GROUP BY country;",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM sales_data WHERE country = 'Australia')) FROM sales_data WHERE country = 'Australia' AND is_cruelty_free = true;,0 what is the airport for the country tunisia with the icao dtaa?,"CREATE TABLE table_name_68 (airport VARCHAR, country VARCHAR, icao VARCHAR);","SELECT airport FROM table_name_68 WHERE country = ""tunisia"" AND icao = ""dtaa"";","SELECT airport FROM table_name_68 WHERE country = ""tunisia"" AND icao = ""dtaa"";",1 "Show the average digital literacy rate for countries in Southeast Asia, South Asia, and the Middle East with a population of over 50 million in 2020.","CREATE TABLE digital_literacy (country_name VARCHAR(50), region VARCHAR(20), population INT, literacy_rate DECIMAL(5, 2), year INT);","SELECT AVG(literacy_rate) FROM digital_literacy WHERE year = 2020 AND population > 50000000 AND region IN ('Southeast Asia', 'South Asia', 'Middle East');","SELECT AVG(literacy_rate) FROM digital_literacy WHERE region IN ('Southeast Asia', 'South Asia', 'Middle East') AND population > 50000000 AND year = 2020;",0 Insert new records of explainable AI models for 2024,"CREATE TABLE explainable_ai_models (model_name VARCHAR(255), year INT, transparency_score DECIMAL(5,4));","INSERT INTO explainable_ai_models (model_name, year, transparency_score) VALUES ('ModelA', 2024, 0.85), ('ModelB', 2024, 0.92), ('ModelC', 2024, 0.78), ('ModelD', 2024, 0.88);","INSERT INTO explainable_ai_models (model_name, year, transparency_score) VALUES ('Model A', 2024, 'Transparency');",0 Which Ensemble Name has the Advertisement date October 2007?,"CREATE TABLE table_name_79 (ensemble_name VARCHAR, advertisement_date VARCHAR);","SELECT ensemble_name FROM table_name_79 WHERE advertisement_date = ""october 2007"";","SELECT ensemble_name FROM table_name_79 WHERE advertisement_date = ""october 2007"";",1 Show the change in water usage from 2018 to 2019 for each location,"CREATE TABLE water_usage (id INT PRIMARY KEY, year INT, location VARCHAR(50), usage FLOAT); ","SELECT a.location, a.year, (b.usage - a.usage) AS change FROM water_usage a INNER JOIN water_usage b ON a.location = b.location WHERE a.year = 2018 AND b.year = 2019;","SELECT location, year, usage, ROW_NUMBER() OVER (ORDER BY usage DESC) as rank FROM water_usage WHERE year = 2019;",0 What was John Watson's total laps with a grid of less than 7?,"CREATE TABLE table_name_21 (laps VARCHAR, driver VARCHAR, grid VARCHAR);","SELECT COUNT(laps) FROM table_name_21 WHERE driver = ""john watson"" AND grid < 7;","SELECT laps FROM table_name_21 WHERE driver = ""john watson"" AND grid 7;",0 Which Tikhak has a Yonguk of wu¹ti¹?,"CREATE TABLE table_name_77 (tikhak VARCHAR, yonguk VARCHAR);","SELECT tikhak FROM table_name_77 WHERE yonguk = ""wu¹ti¹"";","SELECT tikhak FROM table_name_77 WHERE yonguk = ""wu1ti1"";",0 Find the number of classical concerts in the last year.,"CREATE TABLE Concerts (genre VARCHAR(20), concert_date DATE); ","SELECT COUNT(*) FROM Concerts WHERE genre = 'Classical' AND concert_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT COUNT(*) FROM Concerts WHERE genre = 'Classical' AND concert_date >= DATEADD(year, -1, GETDATE());",0 Who is the winning driver of the Oschersleben circuit with Timo Scheider as the pole position?,"CREATE TABLE table_name_36 (winning_driver VARCHAR, pole_position VARCHAR, circuit VARCHAR);","SELECT winning_driver FROM table_name_36 WHERE pole_position = ""timo scheider"" AND circuit = ""oschersleben"";","SELECT winning_driver FROM table_name_36 WHERE pole_position = ""timo scheider"" AND circuit = ""oschersleben"";",1 List all the community education programs in the 'education_programs' table that are not associated with any animal species in the 'animal_population' table.,"CREATE TABLE animal_population (id INT, animal_name VARCHAR(50)); CREATE TABLE education_programs (id INT, habitat_id INT, coordinator_name VARCHAR(50));",SELECT e.coordinator_name FROM education_programs e LEFT JOIN animal_population a ON e.habitat_id = a.id WHERE a.id IS NULL;,SELECT education_programs.coordinator_name FROM education_programs INNER JOIN animal_population ON education_programs.habitat_id = animal_population.id WHERE animal_population.animal_name IS NULL;,0 Who was runner-up in the 2006 Pacific Life Open?,"CREATE TABLE table_name_62 (runner_up VARCHAR, name VARCHAR, year VARCHAR);","SELECT runner_up FROM table_name_62 WHERE name = ""pacific life open"" AND year = ""2006"";","SELECT runner_up FROM table_name_62 WHERE name = ""pacific life open"" AND year = 2006;",0 List all unique countries in the 'global_art_events' table.,"CREATE TABLE global_art_events (id INT, name VARCHAR(255), date DATE, country VARCHAR(255)); ",SELECT DISTINCT country FROM global_art_events;,SELECT DISTINCT country FROM global_art_events;,1 What is the reactor temperature trend for the last 10 production runs?,"CREATE TABLE production_runs (id INT, reactor_temp FLOAT, run_date DATE); ","SELECT reactor_temp, LAG(reactor_temp, 1) OVER (ORDER BY run_date) AS prev_reactor_temp FROM production_runs WHERE id >= 11;","SELECT reactor_temp, run_date, ROW_NUMBER() OVER (ORDER BY run_date DESC) as rn FROM production_runs WHERE run_date >= DATEADD(year, -10, GETDATE());",0 What is the average CO2 emission for the top 3 most populous countries in Europe?,"CREATE TABLE CO2Emissions (country VARCHAR(20), emission INT, population INT); ","SELECT AVG(emission) FROM (SELECT emission FROM CO2Emissions WHERE country IN ('Germany', 'France', 'Italy') ORDER BY population DESC LIMIT 3) AS subquery;","SELECT country, AVG(emission) as avg_emission FROM CO2Emissions GROUP BY country ORDER BY avg_emission DESC LIMIT 3;",0 Which city has a resolution that is negotiated exile in Austria?,"CREATE TABLE table_18299148_1 (city VARCHAR, resolution VARCHAR);","SELECT city FROM table_18299148_1 WHERE resolution = ""Negotiated exile in Austria"";","SELECT city FROM table_18299148_1 WHERE resolution = ""Negotiated Exile in Austria"";",0 For the triathlon with a bike (40km) of 58:20 what is the total time?,"CREATE TABLE table_name_21 (total_time VARCHAR, bike__40km_ VARCHAR);","SELECT total_time FROM table_name_21 WHERE bike__40km_ = ""58:20"";","SELECT total_time FROM table_name_21 WHERE bike__40km_ = ""58:20"";",1 Delete artworks with a price greater than $10 million created by 'Asian' artists,"CREATE TABLE Artists (id INT, artist_name VARCHAR(255), gender VARCHAR(10), ethnicity VARCHAR(255)); CREATE TABLE Artworks (id INT, artist_id INT, artwork_name VARCHAR(255), year_created INT, price FLOAT); ",DELETE A FROM Artworks A INNER JOIN Artists B ON A.artist_id = B.id WHERE B.ethnicity = 'Asian' AND A.price > 10000000; DELETE FROM Artists WHERE ethnicity = 'Asian';,DELETE FROM Artworks WHERE artist_id IN (SELECT artist_id FROM Artists WHERE ethnicity = 'Asian') AND price > 10000000;,0 "What player is from Spring, Tx?","CREATE TABLE table_11677100_4 (player VARCHAR, hometown VARCHAR);","SELECT player FROM table_11677100_4 WHERE hometown = ""Spring, TX"";","SELECT player FROM table_11677100_4 WHERE hometown = ""Spring, TX"";",1 Determine the difference in price between the most and least expensive dish in each category.,"CREATE TABLE menu(dish VARCHAR(255), category VARCHAR(255), price DECIMAL(5,2)); ","SELECT category, MAX(price) - MIN(price) as price_difference FROM menu GROUP BY category;","SELECT category, MAX(price) - MIN(price) as price_difference FROM menu GROUP BY category;",1 Who is the operator when Roe was the bodybuilder?,"CREATE TABLE table_28035004_1 (operator VARCHAR, bodybuilder VARCHAR);","SELECT operator FROM table_28035004_1 WHERE bodybuilder = ""Roe"";","SELECT operator FROM table_28035004_1 WHERE bodybuilder = ""Roe"";",1 Who's the shooter with a total of 25?,"CREATE TABLE table_name_57 (shooter VARCHAR, total VARCHAR);","SELECT shooter FROM table_name_57 WHERE total = ""25"";",SELECT shooter FROM table_name_57 WHERE total = 25;,0 What Country is Gene Littler from?,"CREATE TABLE table_name_60 (country VARCHAR, player VARCHAR);","SELECT country FROM table_name_60 WHERE player = ""gene littler"";","SELECT country FROM table_name_60 WHERE player = ""gene littler"";",1 What are the names of graduate students who have published in journals with impact factors above 5?,"CREATE TABLE student (id INT, name VARCHAR(50), program VARCHAR(50)); CREATE TABLE publication (id INT, title VARCHAR(100), journal_name VARCHAR(50), impact_factor DECIMAL(3,1));",SELECT s.name FROM student s JOIN publication p ON s.id IN (SELECT student_id FROM grant WHERE title IN (SELECT title FROM publication WHERE impact_factor > 5));,SELECT s.name FROM student s JOIN publication p ON s.id = p.journal_name WHERE p.impact_factor > 5;,0 "What is the total revenue generated from the ""Contemporary Art"" exhibition in the first quarter of the year?","CREATE TABLE quarterly_revenue (quarter INT, exhibition_id INT, revenue DECIMAL(5,2)); ",SELECT SUM(revenue) FROM quarterly_revenue WHERE exhibition_id = 7 AND quarter BETWEEN 1 AND 3;,SELECT SUM(revenue) FROM quarterly_revenue WHERE exhibition_id = 1 AND quarter = 1;,0 "Find the digital assets that were launched earliest, along with the country they were launched in, in ascending order.","CREATE TABLE DigitalAssets (AssetID int, AssetName varchar(50), LaunchDate date); ","SELECT AssetName, Country, LaunchDate FROM (SELECT AssetName, Country, LaunchDate, ROW_NUMBER() OVER (ORDER BY LaunchDate ASC) as Rank FROM DigitalAssets) as RankedAssets WHERE Rank = 1;","SELECT AssetName, LaunchDate FROM DigitalAssets ORDER BY LaunchDate DESC;",0 Who was nominated for best supporting actor in the movie Going My Way?,"CREATE TABLE table_18638067_1 (actor_actress VARCHAR, film_title_used_in_nomination VARCHAR, category VARCHAR);","SELECT actor_actress FROM table_18638067_1 WHERE film_title_used_in_nomination = ""Going My Way"" AND category = ""Best Supporting Actor"";","SELECT actor_actress FROM table_18638067_1 WHERE film_title_used_in_nomination = ""Going My Way"" AND category = ""Best Supporting"";",0 What is the recycling rate trend by material type in the last month?,"CREATE TABLE recycling_rate_trend(date DATE, material VARCHAR(255), recycling_rate FLOAT);","SELECT date, material, recycling_rate FROM recycling_rate_trend WHERE date >= DATEADD(month, -1, GETDATE()) ORDER BY date;","SELECT material, recycling_rate FROM recycling_rate_trend WHERE date >= DATEADD(month, -1, GETDATE()) GROUP BY material;",0 what is the total number of population where census designated place is westmont?,"CREATE TABLE table_22916979_2 (population__2000_census_ VARCHAR, census_designated_place VARCHAR);","SELECT COUNT(population__2000_census_) FROM table_22916979_2 WHERE census_designated_place = ""Westmont"";","SELECT COUNT(population__2000_census_) FROM table_22916979_2 WHERE census_designated_place = ""Westmont"";",1 What is the total installed capacity of renewable energy projects in the 'Wind' category?,"CREATE TABLE renewable_energy_projects (project_id INT, project_name VARCHAR(255), category VARCHAR(255), installed_capacity FLOAT); ",SELECT SUM(installed_capacity) FROM renewable_energy_projects WHERE category = 'Wind';,SELECT SUM(installed_capacity) FROM renewable_energy_projects WHERE category = 'Wind';,1 What is the minimum energy efficiency rating for smart city initiatives in Italy?,"CREATE TABLE SmartCities (city_id INT, city_name VARCHAR(255), country VARCHAR(255), energy_efficiency_rating FLOAT);",SELECT MIN(energy_efficiency_rating) FROM SmartCities WHERE country = 'Italy';,SELECT MIN(energy_efficiency_rating) FROM SmartCities WHERE country = 'Italy';,1 List the top 2 cultural heritage sites in Paris by visitor count.,"CREATE TABLE cultural_sites_paris (site_id INT, name TEXT, city TEXT, visitors INT); ","SELECT name, visitors FROM cultural_sites_paris WHERE city = 'Paris' ORDER BY visitors DESC LIMIT 2;","SELECT name, visitors FROM cultural_sites_paris ORDER BY visitors DESC LIMIT 2;",0 When has a surface of road and an event of half marathon?,"CREATE TABLE table_name_63 (date VARCHAR, surface VARCHAR, event VARCHAR);","SELECT date FROM table_name_63 WHERE surface = ""road"" AND event = ""half marathon"";","SELECT date FROM table_name_63 WHERE surface = ""road"" AND event = ""half marathon"";",1 "What is the average age of readers who prefer reading articles about technology in the ""TechNews"" newspaper?","CREATE TABLE Readers (id INT, age INT, preference VARCHAR(20)); ",SELECT AVG(age) FROM Readers WHERE preference = 'technology';,SELECT AVG(age) FROM Readers WHERE preference = 'TechNews';,0 "Which round had a city/location of Toronto, Ontario?","CREATE TABLE table_name_81 (round VARCHAR, city_location VARCHAR);","SELECT round FROM table_name_81 WHERE city_location = ""toronto, ontario"";","SELECT round FROM table_name_81 WHERE city_location = ""toronto, ontario"";",1 which round is u.s. open cup division semifinals,"CREATE TABLE table_1046170_5 (us_open_cup VARCHAR, playoffs VARCHAR);","SELECT us_open_cup FROM table_1046170_5 WHERE playoffs = ""division Semifinals"";","SELECT us_open_cup FROM table_1046170_5 WHERE playoffs = ""Dividend Semifinals"";",0 What was the total waste generation in the commercial sector in 2018?,"CREATE TABLE WasteGeneration (year INT, sector VARCHAR(20), amount INT); ",SELECT amount FROM WasteGeneration WHERE year = 2018 AND sector = 'commercial';,SELECT SUM(amount) FROM WasteGeneration WHERE year = 2018 AND sector = 'Commercial';,0 What is the total number of crimes and the crime type with the highest frequency in each borough?,"CREATE TABLE Boroughs (BoroughID INT, BoroughName VARCHAR(255)); CREATE TABLE Crimes (CrimeID INT, CrimeType VARCHAR(255), BoroughID INT, CrimeDate DATE);","SELECT BoroughName, COUNT(CrimeID) as CrimesCount, CrimeType FROM Crimes c JOIN Boroughs b ON c.BoroughID = b.BoroughID GROUP BY BoroughName, CrimeType ORDER BY BoroughName, CrimesCount DESC;","SELECT b.BoroughName, COUNT(c.CrimeID) as TotalCrimes, COUNT(c.CrimeType) as CrimeCount FROM Boroughs b JOIN Crimes c ON b.BoroughID = c.BoroughID GROUP BY b.BoroughName ORDER BY CrimeCount DESC;",0 Crockett High School had which number(#)?,"CREATE TABLE table_12032893_1 (_number VARCHAR, high_school VARCHAR);","SELECT _number FROM table_12032893_1 WHERE high_school = ""Crockett"";","SELECT _number FROM table_12032893_1 WHERE high_school = ""Crockett"";",1 Show the total number of game sessions for each game in the 'GameSessions' table,"CREATE TABLE GameSessions (GameID INT, SessionDuration TIME);","SELECT GameID, COUNT(*) as TotalGameSessions FROM GameSessions GROUP BY GameID;","SELECT GameID, COUNT(*) FROM GameSessions GROUP BY GameID;",0 Who are the top 5 customers with the highest total spending on cannabis products in Michigan dispensaries in the last quarter?,"CREATE TABLE customers (id INT, name TEXT, state TEXT);CREATE TABLE orders (id INT, customer_id INT, item_type TEXT, price DECIMAL, order_date DATE);","SELECT c.name, SUM(o.price) as total_spending FROM customers c INNER JOIN orders o ON c.id = o.customer_id WHERE c.state = 'Michigan' AND o.order_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH) GROUP BY c.name ORDER BY total_spending DESC LIMIT 5;","SELECT c.name, SUM(o.price) as total_spending FROM customers c JOIN orders o ON c.id = o.customer_id WHERE c.state = 'Michigan' AND o.order_date >= DATEADD(quarter, -1, GETDATE()) GROUP BY c.name ORDER BY total_spending DESC LIMIT 5;",0 What is the maximum temperature (°C) for fish farms located in the Gulf of Mexico?,"CREATE TABLE fish_farms (id INT, name TEXT, location TEXT, temperature FLOAT); ",SELECT MAX(temperature) FROM fish_farms WHERE location = 'Gulf of Mexico';,SELECT MAX(temperature) FROM fish_farms WHERE location = 'Gulf of Mexico';,1 "Insert a new row into the 'vehicle_sales' table with the following values: 'Mahindra', 'Mumbai', 45","CREATE TABLE vehicle_sales (vehicle_make VARCHAR(255), city VARCHAR(255), sales_count INT);","INSERT INTO vehicle_sales (vehicle_make, city, sales_count) VALUES ('Mahindra', 'Mumbai', 45);","INSERT INTO vehicle_sales (vehicle_make, city, sales_count) VALUES ('Mahindra', 'Mumbai', 45);",1 What is the earliest approval date for drugs that have a sales figure greater than 2000000 in any market?,"CREATE TABLE drug_sales (drug_name TEXT, year INTEGER, sales INTEGER, market TEXT); CREATE TABLE drug_approval (drug_name TEXT, approval_date DATE); ",SELECT MIN(drug_approval.approval_date) FROM drug_approval JOIN drug_sales ON drug_approval.drug_name = drug_sales.drug_name WHERE drug_sales.sales > 2000000;,SELECT MIN(approval.approval_date) FROM drug_approval INNER JOIN drug_sales ON drug_approval.drug_name = drug_sales.drug_name WHERE drug_sales.sales > 2000000;,0 What is the earliest year that kim hyun-soo won the gold?,"CREATE TABLE table_name_51 (year INTEGER, gold VARCHAR);","SELECT MIN(year) FROM table_name_51 WHERE gold = ""kim hyun-soo"";","SELECT MIN(year) FROM table_name_51 WHERE gold = ""kim hyun-soo"";",1 What is the total donation amount from first-time donors in the last quarter?,"CREATE TABLE donations (id INT, donor_id INT, amount DECIMAL(10,2), donation_date DATE); ","SELECT SUM(amount) FROM donations WHERE donor_id IN (SELECT id FROM donors WHERE donation_date > DATE_SUB(CURDATE(), INTERVAL 3 MONTH)) AND donor_id NOT IN (SELECT id FROM donors WHERE donation_date < DATE_SUB(CURDATE(), INTERVAL 6 MONTH));","SELECT SUM(amount) FROM donations WHERE donor_id IN (SELECT donor_id FROM donors WHERE donation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH)) AND donor_id IN (SELECT donor_id FROM donors WHERE donation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH);",0 Find the number of fans who engaged with each social media platform for a specific team and gender?,"CREATE TABLE fans (fan_id INT, team_name VARCHAR(50), platform VARCHAR(50), followers INT, gender VARCHAR(50)); ","SELECT team_name, platform, SUM(followers) as total_followers, gender FROM fans GROUP BY team_name, platform, gender;","SELECT platform, gender, COUNT(fan_id) FROM fans GROUP BY platform, gender;",0 "What is the highest salary for each unique position in the baseball domain, for the current year?","CREATE TABLE baseball_players (player_id INT, name VARCHAR(50), position VARCHAR(10), team VARCHAR(50), salary INT, year INT); ","SELECT position, MAX(salary) FROM baseball_players WHERE year = YEAR(CURRENT_DATE) GROUP BY position;","SELECT position, MAX(salary) FROM baseball_players WHERE year = 2021 GROUP BY position;",0 What is the total budget for programs with a budget over $5000?,"CREATE TABLE Programs (id INT, program TEXT, budget DECIMAL(10,2)); ",SELECT SUM(budget) FROM Programs WHERE budget > 5000;,SELECT SUM(budget) FROM Programs WHERE budget > 5000.00;,0 what is the name of the level for the 7th position,"CREATE TABLE table_29697744_1 (level VARCHAR, position VARCHAR);","SELECT level FROM table_29697744_1 WHERE position = ""7th"";","SELECT level FROM table_29697744_1 WHERE position = ""7th"";",1 What Venue had Carlton has the Away team?,"CREATE TABLE table_name_29 (venue VARCHAR, away_team VARCHAR);","SELECT venue FROM table_name_29 WHERE away_team = ""carlton"";","SELECT venue FROM table_name_29 WHERE away_team = ""carlton"";",1 How many defense diplomacy events were held by Russia in the Asia-Pacific region between 2015 and 2017?,"CREATE TABLE defense_diplomacy (country VARCHAR(255), region VARCHAR(255), year INT, events INT); ",SELECT SUM(events) as total_events FROM defense_diplomacy WHERE country = 'Russia' AND region = 'Asia-Pacific' AND year BETWEEN 2015 AND 2017;,SELECT SUM(events) FROM defense_diplomacy WHERE country = 'Russia' AND region = 'Asia-Pacific' AND year BETWEEN 2015 AND 2017;,0 "What is the date of enrollment of the course named ""Spanish""?","CREATE TABLE Student_Course_Enrolment (date_of_enrolment VARCHAR, course_id VARCHAR); CREATE TABLE Courses (course_id VARCHAR, course_name VARCHAR);","SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = ""Spanish"";","SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Courses AS T2 ON T1.course_id = T2.course_id WHERE T2.course_name = ""Spanish"";",0 "Insert a new cargo with ID 100, name 'New Cargo', and weight 10000 into the 'cargos' table.","CREATE TABLE cargos (id INT PRIMARY KEY, name VARCHAR(50), weight INT);","INSERT INTO cargos (id, name, weight) VALUES (100, 'New Cargo', 10000);","INSERT INTO cargos (id, name, weight) VALUES (100, 'New Cargo', 10000);",1 Find the number of professors in accounting department.,CREATE TABLE professor (dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR);,"SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = ""Accounting"";",SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code;,0 What is the 1979 number for Standing Rock Indian Reservation when the 1989 is less than 54.9?,CREATE TABLE table_name_51 (reservation VARCHAR);,"SELECT SUM(1979) FROM table_name_51 WHERE reservation = ""standing rock indian reservation"" AND 1989 < 54.9;","SELECT 1979 FROM table_name_51 WHERE reservation = ""standing rock indian reservation"" AND 1989 54.9;",0 Delete policy records for policyholders living in 'California',"CREATE TABLE policy (policy_id INT, policy_holder VARCHAR(50), coverage_amount INT); CREATE TABLE claim (claim_id INT, policy_id INT, claim_amount INT, claim_date DATE); ",DELETE FROM policy WHERE policy_holder IN (SELECT policy_holder FROM policy JOIN (SELECT 'California' AS state_name UNION ALL SELECT 'CA') AS ca ON policy_holder LIKE '%CA%');,DELETE FROM policy WHERE policy_holder = 'California';,0 How many mobile and broadband subscribers are there in each region?,"CREATE TABLE mobile_subscribers (subscriber_id INT, name VARCHAR(255), region_id INT); CREATE TABLE broadband_subscribers (subscriber_id INT, name VARCHAR(255), region_id INT); ","SELECT r.region_name, COUNT(m.subscriber_id) as mobile_subscribers, COUNT(b.subscriber_id) as broadband_subscribers FROM regions AS r LEFT JOIN mobile_subscribers AS m ON r.region_id = m.region_id LEFT JOIN broadband_subscribers AS b ON r.region_id = b.region_id GROUP BY r.region_name;","SELECT m.region_id, COUNT(bs.subscriber_id) FROM mobile_subscribers m JOIN broadband_subscribers bs ON m.region_id = bs.region_id GROUP BY m.region_id;",0 Which label has a date of 1987?,"CREATE TABLE table_name_52 (label VARCHAR, date VARCHAR);","SELECT label FROM table_name_52 WHERE date = ""1987"";","SELECT label FROM table_name_52 WHERE date = ""1987"";",1 "What was the Result of the game after Week 9 with an Attendance of 69,714?","CREATE TABLE table_name_70 (result VARCHAR, week VARCHAR, attendance VARCHAR);","SELECT result FROM table_name_70 WHERE week > 9 AND attendance = ""69,714"";","SELECT result FROM table_name_70 WHERE week > 9 AND attendance = ""69,714"";",1 List all departments and the number of employees in each department.,"CREATE TABLE Employees (id INT, name VARCHAR(100), department VARCHAR(50), country VARCHAR(50)); ","SELECT department, COUNT(*) FROM Employees GROUP BY department;","SELECT department, COUNT(*) FROM Employees GROUP BY department;",1 What is the total of Goals Conceded that has Points smaller than 21 and a Lost thats smaller than 8?,"CREATE TABLE table_name_10 (goals_conceded INTEGER, points VARCHAR, lost VARCHAR);",SELECT SUM(goals_conceded) FROM table_name_10 WHERE points < 21 AND lost < 8;,SELECT SUM(goals_conceded) FROM table_name_10 WHERE points 21 AND lost 8;,0 Which date has the tier of Itf $10k?,"CREATE TABLE table_name_66 (date VARCHAR, tier VARCHAR);","SELECT date FROM table_name_66 WHERE tier = ""itf $10k"";","SELECT date FROM table_name_66 WHERE tier = ""itf $10k"";",1 What is the total revenue from concert tickets for each artist in the Concerts table?,"CREATE TABLE Concerts (id INT, artist_name VARCHAR(255), country VARCHAR(255), tickets_sold INT, ticket_price FLOAT); ","SELECT artist_name, SUM(tickets_sold * ticket_price) as total_revenue FROM Concerts GROUP BY artist_name;","SELECT artist_name, SUM(tickets_sold * ticket_price) as total_revenue FROM Concerts GROUP BY artist_name;",1 How many games were won by teams with a win rate higher than 60% in the SoccerMatches table?,"CREATE TABLE SoccerMatches (MatchID INT, HomeTeam VARCHAR(50), AwayTeam VARCHAR(50), HomeScore INT, AwayScore INT);","SELECT COUNT(*) FROM (SELECT HomeTeam, AwayTeam, (HomeScore > AwayScore) as Win FROM SoccerMatches) as Wins WHERE Win = 1 GROUP BY HomeTeam, AwayTeam HAVING COUNT(*) * 100 / (SELECT COUNT(*) FROM SoccerMatches) > 60;",SELECT COUNT(*) FROM SoccerMatches WHERE HomeScore > 60;,0 What is the total CO2 emission for each factory in the Northern region by country?,"CREATE TABLE factories (factory_id INT, factory_name VARCHAR(50), country VARCHAR(50), co2_emission INT); CREATE TABLE country_regions (country VARCHAR(50), region VARCHAR(50));","SELECT country, SUM(co2_emission) FROM factories JOIN country_regions ON factories.country = country_regions.country WHERE region = 'Northern' GROUP BY country;","SELECT f.country, SUM(f.co2_emission) FROM factories f INNER JOIN country_regions cr ON f.country = cr.country WHERE cr.region = 'Northern' GROUP BY f.country;",0 "What is the average mass (in kg) of all spacecraft that have been used in space missions, excluding any spacecraft that have not yet been launched?","CREATE TABLE spacecraft (id INT, name VARCHAR(50), manufacturer VARCHAR(50), mass FLOAT, launch_date DATE); ",SELECT AVG(mass) FROM spacecraft WHERE launch_date IS NOT NULL;,SELECT AVG(mass) FROM spacecraft WHERE manufacturer NOT IN (SELECT manufacturer FROM spacecraft WHERE launch_date IS NULL);,0 What is the average production cost for items made of materials sourced from developing countries?,"CREATE TABLE products (id INT, name TEXT, material TEXT, production_cost FLOAT, country TEXT); ","SELECT AVG(production_cost) FROM products WHERE country IN ('Bangladesh', 'Cambodia', 'India', 'Nepal', 'Vietnam');","SELECT AVG(production_cost) FROM products WHERE country IN ('South Africa', 'Egypt', 'South Africa');",0 Present the number of hospitals in each state,"CREATE TABLE hospitals (hospital_id INT, name VARCHAR(255), state VARCHAR(255)); ","SELECT state, COUNT(*) FROM hospitals GROUP BY state;","SELECT state, COUNT(*) FROM hospitals GROUP BY state;",1 "Who are the top 5 volunteers with the most volunteer hours in a specific year, based on the 'volunteer_hours' and 'volunteers' tables?","CREATE TABLE volunteers (id INT, name TEXT, volunteer_id INT, volunteer_start_date DATE);CREATE TABLE volunteer_hours (id INT, volunteer_id INT, hours DECIMAL(3,1), hour_date DATE);","SELECT volunteers.name, SUM(volunteer_hours.hours) as total_hours FROM volunteers INNER JOIN volunteer_hours ON volunteers.id = volunteer_hours.volunteer_id WHERE YEAR(volunteer_hours.hour_date) = 2022 GROUP BY volunteers.id ORDER BY total_hours DESC LIMIT 5;","SELECT volunteers.name, SUM(volunteer_hours.hours) as total_hours FROM volunteers INNER JOIN volunteer_hours ON volunteers.id = volunteer_hours.volunteer_id WHERE YEAR(volunteer_start_date) = YEAR(CURRENT_DATE) GROUP BY volunteers.name ORDER BY total_hours DESC LIMIT 5;",0 how many high assits have a date of february 5?,"CREATE TABLE table_30054758_5 (high_assists VARCHAR, date VARCHAR);","SELECT high_assists FROM table_30054758_5 WHERE date = ""February 5"";","SELECT COUNT(high_assists) FROM table_30054758_5 WHERE date = ""February 5"";",0 What is the total transaction value for each month of the year 2022?,"CREATE TABLE transactions (transaction_id INT, transaction_date DATE, transaction_category VARCHAR(255), transaction_value DECIMAL(10,2)); ","SELECT YEAR(transaction_date) as year, MONTH(transaction_date) as month, SUM(transaction_value) as total_value FROM transactions WHERE transaction_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY year, month;","SELECT DATE_FORMAT(transaction_date, '%Y-%m') AS month, SUM(transaction_value) AS total_value FROM transactions WHERE transaction_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY month;",0 Which cruelty-free makeup brands have the highest customer satisfaction ratings?,"CREATE TABLE brands (brand_id INT, brand_name VARCHAR(255), is_cruelty_free BOOLEAN, customer_satisfaction_rating DECIMAL(3,2));","SELECT brand_name, MAX(customer_satisfaction_rating) FROM brands WHERE is_cruelty_free = TRUE GROUP BY brand_name;","SELECT brand_name, customer_satisfaction_rating FROM brands WHERE is_cruelty_free = true ORDER BY customer_satisfaction_rating DESC LIMIT 1;",0 What is the total value of military equipment sales to African countries in 2023?,"CREATE TABLE military_sales (id INT PRIMARY KEY, year INT, country VARCHAR(50), value DECIMAL(10,2)); ","SELECT SUM(value) FROM military_sales WHERE year = 2023 AND country IN ('Algeria', 'Egypt', 'South Africa');",SELECT SUM(value) FROM military_sales WHERE year = 2023 AND country LIKE 'Africa%';,0 "Find the top 3 locations with the highest average project cost in the 'public_works' table, partitioned by year.","CREATE TABLE public_works (id INT, name VARCHAR(50), location VARCHAR(50), year INT, cost FLOAT);","SELECT location, AVG(cost) as avg_cost, ROW_NUMBER() OVER (PARTITION BY year ORDER BY AVG(cost) DESC) as rn FROM public_works GROUP BY location, year ORDER BY year, avg_cost DESC LIMIT 3;","SELECT location, year, AVG(cost) as avg_cost FROM public_works GROUP BY location, year ORDER BY avg_cost DESC LIMIT 3;",0 Find the number of fans who have attended both basketball and football games in the last year.,"CREATE TABLE FanEvents (FanID INT, EventType VARCHAR(10), EventDate DATE); CREATE TABLE Fans (FanID INT, FanName VARCHAR(50));","SELECT COUNT(DISTINCT FanID) FROM FanEvents WHERE EventType IN ('Basketball', 'Football') GROUP BY FanID HAVING COUNT(DISTINCT EventType) = 2;","SELECT COUNT(*) FROM Fans INNER JOIN FanEvents ON Fans.FanID = FanEvents.FanID WHERE FanEvents.EventType = 'Basketball' INTERSECT SELECT COUNT(*) FROM Fans INNER JOIN FanEvents ON Fans.FanID = FanEvents.FanID WHERE FanEvents.EventDate >= DATEADD(year, -1, GETDATE());",0 What is the average number of daily trips for shared bicycles in Mexico City?,"CREATE TABLE public.daily_trips_bicycle (id SERIAL PRIMARY KEY, bike_type TEXT, city TEXT, daily_trips INTEGER); ",SELECT AVG(daily_trips) FROM public.daily_trips_bicycle WHERE bike_type = 'shared_bicycle' AND city = 'Mexico City';,SELECT AVG(daily_trips) FROM public.daily_trips_bicycle WHERE bike_type ='shared' AND city = 'Mexico City';,0 "What is the Week of the game with an Attendance of 64,900 and a Result of L 34-13?","CREATE TABLE table_name_83 (week INTEGER, attendance VARCHAR, result VARCHAR);","SELECT MAX(week) FROM table_name_83 WHERE attendance = ""64,900"" AND result = ""l 34-13"";","SELECT AVG(week) FROM table_name_83 WHERE attendance = 64 OFFSET 900 AND result = ""l 34-13"";",0 Update the 'sequestration' value for the record with id 2 in the 'carbon_sequestration' table to 900 metric tons.,"CREATE TABLE carbon_sequestration (id INT, location VARCHAR(255), sequestration FLOAT); ",UPDATE carbon_sequestration SET sequestration = 900 WHERE id = 2;,UPDATE carbon_sequestration SET sequestration = 900 WHERE id = 2;,1 What is the total number of vaccinations administered in Texas for individuals aged 65 and older?,"CREATE TABLE Vaccinations (VaccinationID INT, PatientID INT, Age INT, VaccineType VARCHAR(20), Date DATE); ",SELECT COUNT(*) FROM Vaccinations WHERE Age >= 65 AND State = 'Texas';,SELECT COUNT(*) FROM Vaccinations WHERE Age >= 65 AND VaccineType = 'Vaccine';,0 "In what year was Yauco, which had over 42,043 people in 2010, founded?","CREATE TABLE table_name_9 (founded INTEGER, municipality VARCHAR, population__2010_ VARCHAR);","SELECT AVG(founded) FROM table_name_9 WHERE municipality = ""yauco"" AND population__2010_ > 42 OFFSET 043;","SELECT SUM(founded) FROM table_name_9 WHERE municipality = ""yauco"" AND population__2010_ > 42 OFFSET 043;",0 What is the 1989 result of the tournament that had a 1987 result of 1R?,CREATE TABLE table_name_71 (Id VARCHAR);,"SELECT 1989 FROM table_name_71 WHERE 1987 = ""1r"";","SELECT 1989 FROM table_name_71 WHERE 1987 = ""1r"";",1 What builder has lot number 30702?,"CREATE TABLE table_name_44 (builder VARCHAR, lot_no VARCHAR);",SELECT builder FROM table_name_44 WHERE lot_no = 30702;,SELECT builder FROM table_name_44 WHERE lot_no = 30702;,1 What is the total revenue per brand in the natural beauty category?,"CREATE TABLE sales (product_id INT, product_name VARCHAR(100), category VARCHAR(50), brand VARCHAR(50), sale_date DATE, revenue DECIMAL(10, 2)); ","SELECT brand, SUM(revenue) AS total_revenue FROM sales WHERE category = 'Natural Beauty' GROUP BY brand;","SELECT brand, SUM(revenue) as total_revenue FROM sales WHERE category = 'natural beauty' GROUP BY brand;",0 How many articles were published by each author in the 'investigative_reports' category?,"CREATE TABLE authors (author_id INT, author_name VARCHAR(100)); CREATE TABLE articles (article_id INT, title VARCHAR(100), author_id INT, category VARCHAR(50), publication_date DATE); ","SELECT authors.author_name, COUNT(articles.article_id) AS num_of_articles FROM authors INNER JOIN articles ON authors.author_id = articles.author_id WHERE articles.category = 'investigative_reports' GROUP BY authors.author_name;","SELECT a.author_name, COUNT(a.article_id) FROM authors a JOIN articles a ON a.author_id = a.author_id WHERE a.category = 'investigative_reports' GROUP BY a.author_name;",0 Insert records into the table 'community_health_workers',"CREATE TABLE community_health_workers (id INT PRIMARY KEY, name VARCHAR(255), region VARCHAR(255), years_experience INT, cultural_competency_score INT); ","INSERT INTO community_health_workers (id, name, region, years_experience, cultural_competency_score) VALUES (7, 'Hee Jeong Lee', 'Northwest', 7, 87), (8, 'Ibrahim Hussein', 'East', 9, 96), (9, 'Jasmine Patel', 'Southwest', 8, 91);","INSERT INTO community_health_workers (id, name, region, years_experience, cultural_competency_score) VALUES (1, 'Michael', 'North America', 'Mexico');",0 What was the total mintage for years after 2002 that had a 85th Anniversary of Vimy Ridge theme?,"CREATE TABLE table_name_68 (mintage VARCHAR, theme VARCHAR, year VARCHAR);","SELECT COUNT(mintage) FROM table_name_68 WHERE theme = ""85th anniversary of vimy ridge"" AND year > 2002;","SELECT COUNT(mintage) FROM table_name_68 WHERE theme = ""85th anniversary of vimy ridge"" AND year > 2002;",1 "How many hours did each volunteer contribute in the first quarter of 2024, including any partial hours?","CREATE TABLE VolunteerHours (HourID INT, VolunteerID INT, Hours DECIMAL(10,2), HourDate DATE);","SELECT V.Name, SUM(VH.Hours) as TotalHours FROM VolunteerHours VH JOIN Volunteers V ON VH.VolunteerID = Volunteers.VolunteerID WHERE VH.HourDate BETWEEN '2024-01-01' AND '2024-03-31' GROUP BY V.VolunteerID, V.Name;","SELECT VolunteerID, SUM(Hours) as TotalHours FROM VolunteerHours WHERE HourDate BETWEEN '2024-01-01' AND '2022-03-31' GROUP BY VolunteerID;",0 Find suppliers who have not delivered products in the last 6 months.,"CREATE TABLE suppliers(id INT, name TEXT, location TEXT);CREATE TABLE products(id INT, supplier_id INT, product_name TEXT, delivery_date DATE); ","SELECT s.* FROM suppliers s LEFT JOIN products p ON s.id = p.supplier_id WHERE p.delivery_date < DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) OR p.delivery_date IS NULL;","SELECT suppliers.name FROM suppliers INNER JOIN products ON suppliers.id = products.supplier_id WHERE products.delivery_date DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",0 What is the difference in Terbium production between the highest and lowest producers in 2020?,"CREATE TABLE terbium_production (id INT, year INT, producer VARCHAR(255), terbium_prod FLOAT); ",SELECT MAX(terbium_prod) - MIN(terbium_prod) FROM terbium_production WHERE year = 2020;,"SELECT producer, MAX(terbium_prod) - MIN(terbium_prod) FROM terbium_production WHERE year = 2020 GROUP BY producer;",0 "Show the rural infrastructure projects that have a budget over $1 million and were completed in the last 5 years, including the project name, country, and start date.","CREATE TABLE rural_infrastructure (project_name VARCHAR(50), country VARCHAR(50), project_start_date DATE, project_end_date DATE, budget DECIMAL(10,2));","SELECT project_name, country, project_start_date FROM rural_infrastructure WHERE budget > 1000000 AND project_end_date >= DATEADD(year, -5, GETDATE());","SELECT project_name, country, project_start_date, project_end_date, budget FROM rural_infrastructure WHERE budget > 1000000 AND project_end_date >= DATEADD(year, -5, GETDATE());",0 Who played home team at the Arden Street Oval game?,"CREATE TABLE table_name_99 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_99 WHERE venue = ""arden street oval"";","SELECT home_team FROM table_name_99 WHERE venue = ""arden street oval"";",1 Name the number of regular season for 2007,"CREATE TABLE table_2361788_1 (regular_season VARCHAR, year VARCHAR);",SELECT COUNT(regular_season) FROM table_2361788_1 WHERE year = 2007;,SELECT COUNT(regular_season) FROM table_2361788_1 WHERE year = 2007;,1 "What was the attendance for the game on October 30, 1994 for a week after week 2?","CREATE TABLE table_name_54 (attendance VARCHAR, week VARCHAR, date VARCHAR);","SELECT COUNT(attendance) FROM table_name_54 WHERE week > 2 AND date = ""october 30, 1994"";","SELECT attendance FROM table_name_54 WHERE week > 2 AND date = ""october 30, 1994"";",0 Who won the men's ski jump when the FIS Nordic World Ski Championships was 1980?,"CREATE TABLE table_name_34 (winner VARCHAR, fis_nordic_world_ski_championships VARCHAR);","SELECT winner FROM table_name_34 WHERE fis_nordic_world_ski_championships = ""1980"";","SELECT winner FROM table_name_34 WHERE fis_nordic_world_ski_championships = ""1980"";",1 What is the total amount of research grants awarded to faculty members in the Computer Science department?,"CREATE TABLE department (id INT, name TEXT);CREATE TABLE faculty (id INT, department_id INT);CREATE TABLE research_grant (id INT, faculty_id INT, amount INT);",SELECT SUM(rg.amount) FROM research_grant rg JOIN faculty f ON rg.faculty_id = f.id JOIN department d ON f.department_id = d.id WHERE d.name = 'Computer Science';,SELECT SUM(rg.amount) FROM research_grant rg JOIN faculty f ON rg.faculty_id = f.id JOIN department d ON f.department_id = d.id WHERE d.name = 'Computer Science';,1 How many items were produced in the 'autumn 2021' collection with a production cost above 30?,"CREATE TABLE production_costs (item_type VARCHAR(20), collection VARCHAR(20), cost NUMERIC(10,2), quantity INT); ",SELECT COUNT(*) FROM production_costs WHERE collection = 'autumn 2021' AND cost > 30;,SELECT COUNT(*) FROM production_costs WHERE collection = 'autumn 2021' AND cost > 30;,1 "Update the population of the ""Green Sea Turtle"" in the ""species"" table for the Atlantic Ocean","CREATE TABLE species (id INT PRIMARY KEY, name VARCHAR(255), population INT, habitat VARCHAR(255));",WITH updated_population AS (UPDATE species SET population = 8500 WHERE name = 'Green Sea Turtle' AND habitat = 'Atlantic Ocean') SELECT * FROM updated_population;,UPDATE species SET population = population * 1.0 WHERE name = 'Green Sea Turtle' AND habitat = 'Atlantic Ocean';,0 Which Kit manufacturer sponsers Arsenal?,"CREATE TABLE table_name_99 (kit_manufacturer VARCHAR, team VARCHAR);","SELECT kit_manufacturer FROM table_name_99 WHERE team = ""arsenal"";","SELECT kit_manufacturer FROM table_name_99 WHERE team = ""arsenal"";",1 What is the losing bonus associated with 0 tries for?,"CREATE TABLE table_name_82 (losing_bonus VARCHAR, tries_for VARCHAR);","SELECT losing_bonus FROM table_name_82 WHERE tries_for = ""0"";","SELECT losing_bonus FROM table_name_82 WHERE tries_for = ""0"";",1 "Delete all records in the ""GreenBuildings"" table where the ""material"" is ""wood""","CREATE TABLE GreenBuildings (id INT, building_name VARCHAR(20), material VARCHAR(20), size INT); ",DELETE FROM GreenBuildings WHERE material = 'wood';,DELETE FROM GreenBuildings WHERE material = 'wood';,1 What is the first leg with an agg of 10-2?,CREATE TABLE table_name_31 (agg VARCHAR);,"SELECT 1 AS st_leg FROM table_name_31 WHERE agg = ""10-2"";","SELECT MIN(leg) FROM table_name_31 WHERE agg = ""10-2"";",0 What is the number of events held in Spain that had an attendance of over 200 people?,"CREATE TABLE Events (EventID int, EventDate date, Attendees int, Country varchar(50)); ",SELECT COUNT(*) FROM Events WHERE Country = 'Spain' AND Attendees > 200;,SELECT COUNT(*) FROM Events WHERE Country = 'Spain' AND Attendees > 200;,1 How many people wrote the episode with a production code of 2j5507?,"CREATE TABLE table_27450976_1 (written_by VARCHAR, production_code VARCHAR);","SELECT COUNT(written_by) FROM table_27450976_1 WHERE production_code = ""2J5507"";","SELECT COUNT(written_by) FROM table_27450976_1 WHERE production_code = ""2J5507"";",1 How many positions have goals of fewer than 40 and more than 38 played?,"CREATE TABLE table_name_62 (position VARCHAR, goals_for VARCHAR, played VARCHAR);",SELECT COUNT(position) FROM table_name_62 WHERE goals_for < 40 AND played > 38;,SELECT COUNT(position) FROM table_name_62 WHERE goals_for 40 AND played > 38;,0 List the names and scores of all wines.,"CREATE TABLE WINE (Name VARCHAR, Score VARCHAR);","SELECT Name, Score FROM WINE;","SELECT Name, Score FROM WINE;",1 What was the time of the 5th ranked swimmer who swam after heat 3 and was in a lane under 5?,"CREATE TABLE table_name_24 (time VARCHAR, rank VARCHAR, heat VARCHAR, lane VARCHAR);",SELECT time FROM table_name_24 WHERE heat > 3 AND lane < 5 AND rank = 5;,"SELECT time FROM table_name_24 WHERE heat > 3 AND lane 5 AND rank = ""5th"";",0 "When sylvania, oh is the location what is the team nickname?","CREATE TABLE table_28211213_2 (team_nickname VARCHAR, location VARCHAR);","SELECT team_nickname FROM table_28211213_2 WHERE location = ""Sylvania, OH"";","SELECT team_nickname FROM table_28211213_2 WHERE location = ""Sylvania, Ohio"";",0 What is the percentage of upcycled clothing items in our inventory in Mexico?,"CREATE TABLE clothing_inventory (id INT, item_name VARCHAR(50), item_type VARCHAR(50), upcycled BOOLEAN, country_of_sale VARCHAR(50)); ",SELECT (COUNT(*) FILTER (WHERE upcycled = true) * 100.0 / COUNT(*)) FROM clothing_inventory WHERE country_of_sale = 'Mexico';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM clothing_inventory WHERE country_of_sale = 'Mexico')) AS percentage FROM clothing_inventory WHERE country_of_sale = 'Mexico' AND upcycled = true;,0 Show me the number of wells in the Montney Play that were drilled after 2015.,"CREATE TABLE montney_wells (well_name VARCHAR(50), location VARCHAR(50), drilled_year INT); ",SELECT COUNT(*) FROM montney_wells WHERE location = 'Montney Play' AND drilled_year > 2015;,SELECT COUNT(*) FROM montney_wells WHERE location = 'Montney Play' AND drilled_year > 2015;,1 Which defense contractors have the highest average contract negotiation value with the US government?,"CREATE TABLE contract_negotiations (id INT, negotiation_date DATE, contractor VARCHAR(50), customer VARCHAR(50), value DECIMAL(10,2));","SELECT contractor, AVG(value) as avg_value FROM contract_negotiations WHERE customer = 'US government' GROUP BY contractor ORDER BY avg_value DESC;","SELECT contractor, AVG(value) as avg_value FROM contract_negotiations WHERE customer = 'US government' GROUP BY contractor ORDER BY avg_value DESC LIMIT 1;",0 Who had the highest assists during game 78?,"CREATE TABLE table_27721131_11 (high_assists VARCHAR, game VARCHAR);",SELECT high_assists FROM table_27721131_11 WHERE game = 78;,SELECT high_assists FROM table_27721131_11 WHERE game = 78;,1 Name the high points for w 90–77 (ot),"CREATE TABLE table_27712180_7 (high_points VARCHAR, score VARCHAR);","SELECT high_points FROM table_27712180_7 WHERE score = ""W 90–77 (OT)"";","SELECT high_points FROM table_27712180_7 WHERE score = ""W 90–77 (OT)"";",1 What is the minimum number of bikes at each station in the city of Toronto?,"CREATE TABLE stations (id INT, station_name VARCHAR(20), city VARCHAR(20), bikes INT, docks INT); ","SELECT station_name, MIN(bikes) FROM stations WHERE city = 'Toronto' GROUP BY station_name;","SELECT station_name, MIN(bikes) FROM stations WHERE city = 'Toronto' GROUP BY station_name;",1 What is the total number of 'skilled' workers in 'Germany'?,"CREATE TABLE workers (id INT, name TEXT, skill TEXT, location TEXT); ",SELECT COUNT(*) FROM workers WHERE skill = 'skilled' AND location = 'Germany';,SELECT COUNT(*) FROM workers WHERE skill ='skilled' AND location = 'Germany';,0 "Who had pole position for the races in Braselton, Georgia where Victor Carbone had fastest lap?","CREATE TABLE table_25773116_2 (pole_position VARCHAR, fastest_lap VARCHAR, location VARCHAR);","SELECT pole_position FROM table_25773116_2 WHERE fastest_lap = ""Victor Carbone"" AND location = ""Braselton, Georgia"";","SELECT pole_position FROM table_25773116_2 WHERE fastest_lap = ""Victor Carbone"" AND location = ""Braselton, Georgia"";",1 What was the qualification in 1932?,"CREATE TABLE table_name_51 (qual VARCHAR, year VARCHAR);","SELECT qual FROM table_name_51 WHERE year = ""1932"";",SELECT qual FROM table_name_51 WHERE year = 1932;,0 "what's the title with original air date being september23,1995","CREATE TABLE table_14637853_3 (title VARCHAR, original_air_date VARCHAR);","SELECT title FROM table_14637853_3 WHERE original_air_date = ""September23,1995"";","SELECT title FROM table_14637853_3 WHERE original_air_date = ""September23,1995"";",1 "Decision of parent, and a Home of philadelphia, and a Record of 20–16–7 is on what date?","CREATE TABLE table_name_23 (date VARCHAR, record VARCHAR, decision VARCHAR, home VARCHAR);","SELECT date FROM table_name_23 WHERE decision = ""parent"" AND home = ""philadelphia"" AND record = ""20–16–7"";","SELECT date FROM table_name_23 WHERE decision = ""parent"" AND home = ""philadelphia"" AND record = ""20–16–7"";",1 How many points after 1956?,"CREATE TABLE table_name_40 (points VARCHAR, year INTEGER);",SELECT COUNT(points) FROM table_name_40 WHERE year > 1956;,SELECT COUNT(points) FROM table_name_40 WHERE year > 1956;,1 What was the maximum production volume of Gadolinium in 2018?,"CREATE TABLE gadolinium_production (year INT, production_volume INT); ",SELECT MAX(production_volume) FROM gadolinium_production WHERE year = 2018;,SELECT MAX(production_volume) FROM gadolinium_production WHERE year = 2018;,1 "Find the number of co-owned properties in the 'co_ownership' table, grouped by the number of co-owners.","CREATE TABLE co_ownership (co_id INT, property_id INT, num_owners INT);","SELECT num_owners, COUNT(*) as num_properties FROM co_ownership GROUP BY num_owners;","SELECT num_owners, COUNT(*) FROM co_ownership GROUP BY num_owners;",0 "What is the Home team on February 2, 1947?","CREATE TABLE table_name_68 (home VARCHAR, date VARCHAR);","SELECT home FROM table_name_68 WHERE date = ""february 2, 1947"";","SELECT home FROM table_name_68 WHERE date = ""february 2, 1947"";",1 "What is the highest position of the team with an against of 12, less than 11 points, more than 2 drawn, and more than 9 played?","CREATE TABLE table_name_24 (position INTEGER, played VARCHAR, drawn VARCHAR, against VARCHAR, points VARCHAR);",SELECT MAX(position) FROM table_name_24 WHERE against = 12 AND points < 11 AND drawn > 2 AND played > 9;,SELECT MAX(position) FROM table_name_24 WHERE against = 12 AND points 11 AND drawn > 2 AND played > 9;,0 Show the number of active players in each game in the last month?,"CREATE TABLE game_sessions (id INT, player_id INT, game_id INT, session_date DATE); CREATE TABLE games (id INT, game_name VARCHAR(100)); ","SELECT g.game_name, COUNT(DISTINCT gs.player_id) as active_players FROM game_sessions gs JOIN games g ON gs.game_id = g.id WHERE gs.session_date >= (CURRENT_DATE - INTERVAL '1 month') GROUP BY g.game_name;","SELECT gs.game_name, COUNT(gs.id) as active_players FROM game_sessions gs JOIN games g ON gs.game_id = gs.game_id WHERE gs.session_date >= DATEADD(month, -1, GETDATE()) GROUP BY gs.game_name;",0 What was the total amount donated by each donor by quarter in 2020?,"CREATE TABLE Donors (DonorID int, DonorName varchar(50), DonationDate date); ","SELECT DonorName, DATE_FORMAT(DonationDate, '%Y-%q') as Quarter, SUM(DonationAmount) as TotalDonated FROM Donations GROUP BY DonorName, Quarter;","SELECT DonorName, DATE_FORMAT(DonationDate, '%Y-%m') as Quarter, SUM(Amount Donated) as TotalDonated FROM Donors WHERE YEAR(DonationDate) = 2020 GROUP BY DonorName, Quarter;",0 What is the total number of articles published in a specific category for a specific language?,"CREATE TABLE article_lang_category (id INT PRIMARY KEY, article_id INT, language VARCHAR(50), category VARCHAR(255), FOREIGN KEY (article_id) REFERENCES articles(id));","SELECT language, category, COUNT(*) as total_articles FROM article_lang_category GROUP BY language, category;",SELECT COUNT(*) FROM article_lang_category WHERE language = 'English';,0 What is the average age of fans in the 'fans' table?,"CREATE TABLE fans (id INT PRIMARY KEY, name VARCHAR(100), gender VARCHAR(10), age INT, favorite_team VARCHAR(50));",SELECT AVG(age) FROM fans;,SELECT AVG(age) FROM fans;,1 Where is the Holy Cross of Davao College campus located?,"CREATE TABLE table_name_42 (province_region VARCHAR, home_campus VARCHAR);","SELECT province_region FROM table_name_42 WHERE home_campus = ""holy cross of davao college"";","SELECT province_region FROM table_name_42 WHERE home_campus = ""holy cross of davao college"";",1 Which mobile subscribers have a higher data usage than the average in their country?,"CREATE TABLE mobile_subscribers (subscriber_id INT, home_location VARCHAR(50), monthly_data_usage DECIMAL(10,2)); CREATE TABLE country_averages (home_location VARCHAR(50), average_data_usage DECIMAL(10,2)); ","SELECT ms.subscriber_id, ms.home_location, ms.monthly_data_usage FROM mobile_subscribers ms INNER JOIN country_averages ca ON ms.home_location = ca.home_location WHERE ms.monthly_data_usage > ca.average_data_usage;","SELECT subscriber_id, home_location, monthly_data_usage FROM mobile_subscribers JOIN country_averages ON mobile_subscribers.home_location = country_averages.home_location WHERE average_data_usage > (SELECT AVG(average_data_usage) FROM country_averages);",0 "What is the total carbon offset of all initiatives in the 'CarbonOffset' schema, grouped by initiative type?","CREATE SCHEMA CarbonOffset; CREATE TABLE Initiatives (initiative_id INT, name VARCHAR(50), location VARCHAR(50), initiative_type VARCHAR(20), carbon_offset FLOAT); ","SELECT initiative_type, SUM(carbon_offset) FROM CarbonOffset.Initiatives GROUP BY initiative_type;","SELECT initiative_type, SUM(carbon_offset) FROM CarbonOffset.Initiatives GROUP BY initiative_type;",1 Name the vessel type for beluga shipping,"CREATE TABLE table_26168687_5 (vessel_type VARCHAR, vessel_operator VARCHAR);","SELECT vessel_type FROM table_26168687_5 WHERE vessel_operator = ""Beluga Shipping"";","SELECT vessel_type FROM table_26168687_5 WHERE vessel_operator = ""Beluga Shipping"";",1 List all fish species raised in sustainable farms in Norway.,"CREATE TABLE fish_species (id INT, species TEXT, sustainable BOOLEAN); CREATE TABLE farm_species (farm_id INT, species_id INT); ",SELECT species FROM fish_species fs JOIN farm_species fss ON fs.id = fss.species_id WHERE fss.farm_id IN (SELECT id FROM farms WHERE country = 'Norway' AND sustainable = TRUE);,SELECT fish_species.species FROM fish_species INNER JOIN farm_species ON fish_species.farm_id = farm_species.farm_id WHERE farm_species.sustainable = TRUE AND farm_species.farm_id IN (SELECT farm_species.farm_id FROM farm_species WHERE farm_species.farm_id = farm_species.farm_id AND farm_species.species_id = farm_species.farm_id);,0 "Insert a new record for a veteran employment statistic with ID 10, veteran status 'Honorably Discharged', and employment date 2022-01-01","CREATE TABLE veteran_employment (id INT, veteran_status VARCHAR(50), employment_date DATE);","INSERT INTO veteran_employment (id, veteran_status, employment_date) VALUES (10, 'Honorably Discharged', '2022-01-01');","INSERT INTO veteran_employment (id, veteran_status, employment_date) VALUES (10, 'Honorably Discharged', '2022-01-01');",1 What is the percentage of players who have played a VR game in each region?,"CREATE TABLE PlayerVR (PlayerID INT, Region VARCHAR(50)); CREATE TABLE PlayerActivity (PlayerID INT, GameID INT, VRGame INT); ","SELECT Region, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM PlayerVR) as Percentage FROM PlayerVR INNER JOIN PlayerActivity ON PlayerVR.PlayerID = PlayerActivity.PlayerID WHERE VRGame = 1 GROUP BY Region;","SELECT Region, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM PlayerVR GROUP BY Region) as Percentage FROM PlayerVR GROUP BY Region;",0 What is the average response time for fire emergencies in New York City?,"CREATE TABLE response_times (id INT, incident_type VARCHAR(20), city VARCHAR(20), response_time INT); ",SELECT AVG(response_time) FROM response_times WHERE city = 'New York City' AND incident_type = 'Fire';,SELECT AVG(response_time) FROM response_times WHERE incident_type = 'fire' AND city = 'New York City';,0 What is the average number of parks per city in California?,"CREATE TABLE cities (id INT, name TEXT, state TEXT, num_parks INT); ",SELECT AVG(num_parks) FROM cities WHERE state = 'CA';,SELECT AVG(num_parks) FROM cities WHERE state = 'California';,0 "What is the release year for the top 20% of songs in the 'Jazz' genre, ordered by the release year in descending order?","CREATE TABLE songs (id INT, title VARCHAR(255), artist VARCHAR(255), genre VARCHAR(255), release_year INT, listening_time INT); ","SELECT release_year AS release_year_of_jazz_songs, PERCENT_RANK() OVER (PARTITION BY genre ORDER BY release_year DESC) AS percent_rank FROM songs WHERE genre = 'Jazz';","SELECT release_year, SUM(listening_time) as total_listening_time FROM songs WHERE genre = 'Jazz' GROUP BY release_year ORDER BY total_listening_time DESC;",0 "What is the total cargo weight transported by vessels with a length greater than 200 meters in the Caribbean, in the month of August?","CREATE TABLE cargo_transport_data (id INT, vessel_name VARCHAR(50), type VARCHAR(50), region VARCHAR(50), date DATE, length DECIMAL(5,2), cargo_weight INT);",SELECT SUM(cargo_weight) FROM cargo_transport_data WHERE region = 'Caribbean' AND MONTH(date) = 8 AND length > 200;,SELECT SUM(cargo_weight) FROM cargo_transport_data WHERE region = 'Caribbean' AND length > 200 AND date BETWEEN '2022-08-01' AND '2022-08-30';,0 What is the highest rank of a rider whose time was 1:19.02.8?,"CREATE TABLE table_name_70 (place INTEGER, time VARCHAR);","SELECT MAX(place) FROM table_name_70 WHERE time = ""1:19.02.8"";","SELECT MAX(place) FROM table_name_70 WHERE time = ""1:19.02.8"";",1 Which dish belongs to the network that has the official website of ksat.com?,"CREATE TABLE table_name_46 (dish VARCHAR, official_website VARCHAR);","SELECT dish FROM table_name_46 WHERE official_website = ""ksat.com"";","SELECT dish FROM table_name_46 WHERE official_website = ""ksat.com"";",1 What date was the district incumbent Saxby Chambliss elected? ,"CREATE TABLE table_26336739_1 (elected INTEGER, incumbent VARCHAR);","SELECT MAX(elected) FROM table_26336739_1 WHERE incumbent = ""Saxby Chambliss"";","SELECT MAX(elected) FROM table_26336739_1 WHERE incumbent = ""Saxby Chambliss"";",1 Drop the 'jobs' table,"CREATE TABLE jobs (id INT, job_title VARCHAR(100)); ",DROP TABLE jobs;,DROP TABLE jobs;,1 "What is the number of matches when the wins are less than 8, and losses of 7, in 2011?","CREATE TABLE table_name_56 (matches INTEGER, year VARCHAR, wins VARCHAR, losses VARCHAR);","SELECT SUM(matches) FROM table_name_56 WHERE wins < 8 AND losses = 7 AND year = ""2011"";",SELECT SUM(matches) FROM table_name_56 WHERE wins 8 AND losses = 7 AND year = 2011;,0 What is the minimum temperature recorded in the Arctic Ocean?,"CREATE TABLE temperatures (ocean VARCHAR(255), date DATE, temperature DECIMAL(5,2)); ",SELECT MIN(temperature) FROM temperatures WHERE ocean = 'Arctic';,SELECT MIN(temperature) FROM temperatures WHERE ocean = 'Arctic Ocean';,0 The player who had 5 touchdowns had how many extra points? ,"CREATE TABLE table_25642873_2 (extra_points VARCHAR, touchdowns VARCHAR);",SELECT extra_points FROM table_25642873_2 WHERE touchdowns = 5;,SELECT extra_points FROM table_25642873_2 WHERE touchdowns = 5;,1 "If the opponents in the final is Hewitt McMillan and the partner is Fleming, what is the surface?","CREATE TABLE table_22597626_2 (surface VARCHAR, partner VARCHAR, opponents_in_the_final VARCHAR);","SELECT surface FROM table_22597626_2 WHERE partner = ""Fleming"" AND opponents_in_the_final = ""Hewitt McMillan"";","SELECT surface FROM table_22597626_2 WHERE partner = ""Fleming"" AND opponents_in_the_final = ""Hewitt McMillan"";",1 What is the sum of safety ratings for vehicles at the Paris Auto Show?,"CREATE TABLE VehicleSafetyTotal (VehicleID INT, SafetyRating INT, ShowName TEXT);",SELECT SUM(SafetyRating) FROM VehicleSafetyTotal WHERE ShowName = 'Paris Auto Show';,SELECT SUM(SafetyRating) FROM VehicleSafetyTotal WHERE ShowName = 'Paris Auto Show';,1 What was the total revenue for 'DrugA' in Q1 2020?',"CREATE TABLE sales (drug varchar(20), quarter varchar(10), revenue int); ",SELECT revenue FROM sales WHERE drug = 'DrugA' AND quarter = 'Q1 2020';,SELECT SUM(revenue) FROM sales WHERE drug = 'DrugA' AND quarter = 'Q1 2020';,0 List the customer event id and the corresponding move in date and property id.,"CREATE TABLE customer_events (customer_event_id VARCHAR, date_moved_in VARCHAR, property_id VARCHAR);","SELECT customer_event_id, date_moved_in, property_id FROM customer_events;","SELECT customer_event_id, date_moved_in, property_id FROM customer_events;",1 What is the name of the algorithm with a directed/undirected of both and a subgraph-centric basis?,"CREATE TABLE table_name_12 (name VARCHAR, directed___undirected VARCHAR, basis VARCHAR);","SELECT name FROM table_name_12 WHERE directed___undirected = ""both"" AND basis = ""subgraph-centric"";","SELECT name FROM table_name_12 WHERE directed___undirected = ""both"" AND basis = ""subgraph-centric"";",1 Which age groups have the highest attendance at outdoor events?,"CREATE TABLE attendee_demographics (attendee_id INT, age_group VARCHAR(20)); CREATE TABLE event_types (event_type_id INT, event_type VARCHAR(20)); CREATE TABLE event_attendance (attendee_id INT, event_id INT, event_type_id INT); ","SELECT ad.age_group, COUNT(*) AS event_count FROM attendee_demographics ad INNER JOIN event_attendance ea ON ad.attendee_id = ea.attendee_id INNER JOIN event_types et ON ea.event_type_id = et.event_type_id WHERE et.event_type = 'Outdoor Event' GROUP BY ad.age_group ORDER BY event_count DESC;","SELECT a.age_group, MAX(ea.attendee_id) as max_attendance FROM attendee_demographics a JOIN event_attendance ea ON a.attendee_id = ea.attendee_id JOIN event_types et ON et.event_type_id = et.event_type_id JOIN event_attendance ea ON et.event_type_id = et.event_type_id WHERE et.event_type_id = et.event_type_id GROUP BY e.age_group;",0 Which artists from Asia have the most pieces in the modern art category?,"CREATE TABLE Artists (ArtistID int, Name varchar(50), Nationality varchar(50)); CREATE TABLE ArtPieces (ArtPieceID int, Title varchar(50), YearCreated int, ArtistID int, MovementID int); CREATE TABLE ArtMovements (MovementID int, Name varchar(50));","SELECT Artists.Name, COUNT(ArtPieces.ArtPieceID) AS ArtPiecesCount FROM Artists INNER JOIN ArtPieces ON Artists.ArtistID = ArtPieces.ArtistID INNER JOIN ArtMovements ON ArtPieces.MovementID = ArtMovements.MovementID WHERE Artists.Nationality LIKE 'Asia%' AND ArtMovements.Name = 'Modern Art' GROUP BY Artists.Name ORDER BY ArtPiecesCount DESC;","SELECT Artists.Name, COUNT(ArtPieces.ArtPieceID) as PieceCount FROM Artists INNER JOIN ArtPieces ON Artists.ArtistID = ArtPieces.ArtistID INNER JOIN ArtMovements ON ArtPieces.MovementID = ArtMovements.MovementID WHERE Artists.Nationality = 'Asia' GROUP BY Artists.Name ORDER BY PieceCount DESC LIMIT 1;",0 "Delete the ""DiveSite"" record with a name of Blue Hole","CREATE TABLE DiveSite (Name VARCHAR(50) PRIMARY KEY, Depth INT); ",DELETE FROM DiveSite WHERE Name = 'Blue Hole';,DELETE FROM DiveSite WHERE Name = 'Blue Hole';,1 Minimum healthcare access score in rural areas in 2020.,"CREATE TABLE HealthcareAccess (Area VARCHAR(50), Score INT, Year INT); ",SELECT MIN(Score) FROM HealthcareAccess WHERE Area = 'Rural' AND Year = 2020;,SELECT MIN(Score) FROM HealthcareAccess WHERE Area = 'Rural' AND Year = 2020;,1 Tell me constructor for Laps less than 17 and Grid more than 11 for alan jones,"CREATE TABLE table_name_52 (constructor VARCHAR, driver VARCHAR, laps VARCHAR, grid VARCHAR);","SELECT constructor FROM table_name_52 WHERE laps < 17 AND grid > 11 AND driver = ""alan jones"";","SELECT constructor FROM table_name_52 WHERE laps 17 AND grid > 11 AND driver = ""alan jones"";",0 "What was the total investment in rural infrastructure projects in the 'South America' region for the year 2015, grouped by project_domain?","CREATE TABLE rural_infrastructure (id INT, project_name VARCHAR(100), project_domain VARCHAR(50), project_location VARCHAR(100), investment FLOAT, start_date DATE, end_date DATE);","SELECT project_domain, SUM(investment) FROM rural_infrastructure WHERE project_location = 'South America' AND YEAR(start_date) = 2015 GROUP BY project_domain;","SELECT project_domain, SUM(investment) FROM rural_infrastructure WHERE project_location = 'South America' AND start_date BETWEEN '2015-01-01' AND '2015-12-31' GROUP BY project_domain;",0 find the total percentage share of all channels owned by CCTV.,"CREATE TABLE channel (Share_in_percent INTEGER, OWNER VARCHAR);",SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV';,"SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = ""CTV"";",0 What is the total number of pallets that were shipped from Canada to the United States in February 2022?,"CREATE TABLE Shipment_Details (shipment_id INT, origin_country TEXT, destination_country TEXT, pallets INT); ",SELECT SUM(pallets) FROM Shipment_Details WHERE origin_country = 'Canada' AND destination_country = 'USA' AND pallets_date BETWEEN '2022-02-01' AND '2022-02-28';,SELECT SUM(pallets) FROM Shipment_Details WHERE origin_country = 'Canada' AND destination_country = 'United States' AND shipment_date BETWEEN '2022-02-01' AND '2022-02-28';,0 Who are all the players from the united states?,"CREATE TABLE table_24302700_6 (name VARCHAR, nationality VARCHAR);","SELECT name FROM table_24302700_6 WHERE nationality = ""United States"";","SELECT name FROM table_24302700_6 WHERE nationality = ""United States"";",1 How many cases were opened in each state in 2021?,"CREATE TABLE Cases (CaseID int, ClientID int, OpenDate date); CREATE TABLE Clients (ClientID int, State text); ","SELECT Clients.State, COUNT(*) as NumCases FROM Cases INNER JOIN Clients ON Cases.ClientID = Clients.ClientID WHERE Cases.OpenDate BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY Clients.State;","SELECT c.State, COUNT(c.ClientID) FROM Cases c INNER JOIN Clients c ON c.ClientID = c.ClientID WHERE c.OpenDate BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY c.State;",0 "How many unique games in the database have more than 100,000 monthly active users?","CREATE TABLE GameStats (Game VARCHAR(100), MAU INT); ",SELECT COUNT(DISTINCT Game) FROM GameStats WHERE MAU > 100000;,SELECT COUNT(DISTINCT Game) FROM GameStats WHERE MAU > 100000;,1 "Show the employee ids for all employees with role name ""Human Resource"" or ""Manager"".","CREATE TABLE Employees (employee_id VARCHAR, role_code VARCHAR); CREATE TABLE ROLES (role_code VARCHAR, role_name VARCHAR);","SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = ""Human Resource"" OR T2.role_name = ""Manager"";","SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = ""Human Resource"" OR T2.role_name = ""Manager"";",1 List all Solar Projects in the United States with a capacity over 50 MW,"CREATE TABLE solar_projects (id INT, name VARCHAR(100), country VARCHAR(50), capacity_mw FLOAT); ",SELECT * FROM solar_projects WHERE country = 'USA' AND capacity_mw > 50;,SELECT * FROM solar_projects WHERE country = 'United States' AND capacity_mw > 50;,0 What was the average round for john markham draft pick?,"CREATE TABLE table_name_36 (round INTEGER, player VARCHAR);","SELECT AVG(round) FROM table_name_36 WHERE player = ""john markham"";","SELECT AVG(round) FROM table_name_36 WHERE player = ""john markham draft pick"";",0 How many tourists visited each African country in 2019?,"CREATE TABLE africa_tourism (country VARCHAR(255), year INT, visitors INT); ","SELECT country, visitors FROM africa_tourism WHERE year = 2019;","SELECT country, SUM(visitors) FROM africa_tourism WHERE year = 2019 GROUP BY country;",0 Insert a new record for a student with a physical disability who requires mobility assistance accommodations.,"CREATE TABLE StudentAccommodations (StudentID INT, StudentName VARCHAR(255), DisabilityType VARCHAR(255), AccommodationType VARCHAR(255)); ","INSERT INTO StudentAccommodations (StudentID, StudentName, DisabilityType, AccommodationType) VALUES (4, 'Sara Johnson', 'Physical Disability', 'Mobility Assistance');","INSERT INTO StudentAccommodations (StudentID, StudentName, DisabilityType, AccommodationType) VALUES (1, 'Mobility Assistance', 'Physical Disability', 'Mobility Assistance');",0 "How many rural hospitals are in the ""rural_hospitals"" table?","CREATE TABLE rural_hospitals (id INT, name TEXT, location TEXT, capacity INT); ",SELECT COUNT(*) FROM rural_hospitals;,SELECT COUNT(*) FROM rural_hospitals;,1 What was the local economic impact of virtual tourism in Q2 2022 in Africa?,"CREATE TABLE Region (RegionID int, RegionName varchar(50)); CREATE TABLE VirtualTourism (VTID int, RegionID int, Revenue int, Quarter varchar(10), Year int); CREATE TABLE LocalEconomy (LEID int, RegionID int, Impact int); ",SELECT LocalEconomy.Impact FROM LocalEconomy JOIN Region ON LocalEconomy.RegionID = Region.RegionID JOIN VirtualTourism ON Region.RegionID = VirtualTourism.RegionID WHERE VirtualTourism.Quarter = 'Q2' AND VirtualTourism.Year = 2022 AND Region.RegionName = 'Africa';,SELECT LocalEconomy.Impact FROM LocalEconomy INNER JOIN VirtualTourism ON LocalEconomy.RegionID = VirtualTourism.RegionID INNER JOIN Region ON VirtualTourism.RegionID = Region.RegionID WHERE Region.RegionName = 'Africa' AND VirtualTourism.Quarter = 2 AND VirtualTourism.Year = 2022;,0 What is the date for the Operational Livery?,"CREATE TABLE table_name_51 (date VARCHAR, livery VARCHAR);","SELECT date FROM table_name_51 WHERE livery = ""operational"";","SELECT date FROM table_name_51 WHERE livery = ""operational"";",1 Which museums had the highest attendance for temporary exhibitions in 2021?,"CREATE TABLE museums (id INT, name VARCHAR(255), city VARCHAR(255));CREATE TABLE exhibitions (id INT, title VARCHAR(255), start_date DATE, end_date DATE, museum_id INT);CREATE TABLE attendance (id INT, exhibition_id INT, date DATE, attendees INT);","SELECT m.name, SUM(a.attendees) as total_attendance FROM museums m JOIN exhibitions e ON m.id = e.museum_id JOIN attendance a ON e.id = a.exhibition_id WHERE e.type = 'temporary' AND a.date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY m.name ORDER BY total_attendance DESC;","SELECT m.name, MAX(a.attendees) as max_attendance FROM museums m JOIN exhibitions e ON m.id = e.museum_id JOIN attendance a ON e.id = a.exhibition_id WHERE e.start_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY m.name;",0 How many wastewater treatment plants are there in the state of Texas?,"CREATE TABLE wastewater_treatment_plants (id INT, state VARCHAR); ",SELECT COUNT(*) FROM wastewater_treatment_plants WHERE state = 'Texas';,SELECT COUNT(*) FROM wastewater_treatment_plants WHERE state = 'Texas';,1 Which community development initiatives have budget allocations over 75000 in the 'community_development' table?,"CREATE TABLE community_development (id INT, initiative_name VARCHAR(50), budget DECIMAL(10, 2)); ","SELECT initiative_name, budget FROM community_development WHERE budget > 75000;",SELECT initiative_name FROM community_development WHERE budget > 75000;,0 What is the minimum number of police officers in the 'Eastern' region?,"CREATE TABLE police_department (id INT, region VARCHAR(20), num_officers INT); ",SELECT MIN(num_officers) FROM police_department WHERE region = 'Eastern';,SELECT MIN(num_officers) FROM police_department WHERE region = 'Eastern';,1 What team had 159 laps and a Time/Retired of 6:30:02.3733?,"CREATE TABLE table_name_75 (team VARCHAR, laps VARCHAR, time_retired VARCHAR);","SELECT team FROM table_name_75 WHERE laps = 159 AND time_retired = ""6:30:02.3733"";","SELECT team FROM table_name_75 WHERE laps = 159 AND time_retired = ""6:59:02.3733"";",0 Find the number of employees hired in 2020 from the 'hiring' table,"CREATE TABLE hiring (id INT, employee_id INT, hire_date DATE, department VARCHAR(255)); ",SELECT COUNT(*) FROM hiring WHERE YEAR(hire_date) = 2020;,SELECT COUNT(*) FROM hiring WHERE YEAR(hire_date) = 2020;,1 "Update the location of an existing port in the ""ports"" table","CREATE TABLE ports (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255));","UPDATE ports SET location = 'Seattle, WA, USA' WHERE id = 1;",UPDATE ports SET location = 'New Port' WHERE id = 1;,0 What is the name of the race where Stirling Moss was the winning driver?,"CREATE TABLE table_name_13 (race_name VARCHAR, winning_driver VARCHAR);","SELECT race_name FROM table_name_13 WHERE winning_driver = ""stirling moss"";","SELECT race_name FROM table_name_13 WHERE winning_driver = ""sturling moss"";",0 List all the investments made by venture capital firms in the year 2018,"CREATE TABLE investments(id INT, startup_id INT, investor TEXT, investment_amount FLOAT, investment_year INT); ","SELECT startup_id, investor, investment_amount FROM investments WHERE investment_year = 2018;",SELECT * FROM investments WHERE startup_id = 1 AND investment_year = 2018;,0 What is the name of the player from Spain with a rank lower than 3?,"CREATE TABLE table_name_62 (name VARCHAR, nationality VARCHAR, ranking VARCHAR);","SELECT name FROM table_name_62 WHERE nationality = ""spain"" AND ranking > 3;","SELECT name FROM table_name_62 WHERE nationality = ""spain"" AND ranking 3;",0 "What is the least score for interview with a preliminaries score less than 9.4, evening gown score less than 9.55, and swimsuit score more than 9.18 in New York?","CREATE TABLE table_name_79 (interview INTEGER, swimsuit VARCHAR, country VARCHAR, preliminaries VARCHAR, evening_gown VARCHAR);","SELECT MIN(interview) FROM table_name_79 WHERE preliminaries < 9.4 AND evening_gown < 9.55 AND country = ""new york"" AND swimsuit > 9.18;","SELECT MIN(interview) FROM table_name_79 WHERE preliminaries 9.4 AND evening_gown 9.55 AND country = ""new york"" AND swimsuit > 9.18;",0 List the number of policies by region,"CREATE TABLE policy (policy_id INT, policy_region VARCHAR(20)); ","SELECT policy_region, COUNT(policy_id) AS num_policies FROM policy GROUP BY policy_region;","SELECT policy_region, COUNT(*) FROM policy GROUP BY policy_region;",0 Who was the candidate in 1791?,"CREATE TABLE table_2668420_12 (candidates VARCHAR, first_elected VARCHAR);",SELECT candidates FROM table_2668420_12 WHERE first_elected = 1791;,SELECT candidates FROM table_2668420_12 WHERE first_elected = 1791;,1 What is the population associated with latitude 48.676125?,"CREATE TABLE table_18600760_13 (pop__2010_ INTEGER, latitude VARCHAR);","SELECT MAX(pop__2010_) FROM table_18600760_13 WHERE latitude = ""48.676125"";","SELECT MAX(pop__2010_) FROM table_18600760_13 WHERE latitude = ""48.676125"";",1 What position did the palyer drafted out of Washington play?,"CREATE TABLE table_name_34 (position VARCHAR, college VARCHAR);","SELECT position FROM table_name_34 WHERE college = ""washington"";","SELECT position FROM table_name_34 WHERE college = ""washington"";",1 "Name the most week for record of 1-2 and attendance more than 61,602","CREATE TABLE table_name_60 (week INTEGER, record VARCHAR, attendance VARCHAR);","SELECT MAX(week) FROM table_name_60 WHERE record = ""1-2"" AND attendance > 61 OFFSET 602;","SELECT MAX(week) FROM table_name_60 WHERE record = ""1-2"" AND attendance > 61 OFFSET 602;",1 "Calculate the 3-month moving average of product ratings for each brand, in order of date.","CREATE TABLE brands (brand_id INT, brand_name VARCHAR(50)); CREATE TABLE ratings (rating_id INT, brand_id INT, product_rating DECIMAL(3,2), rating_date DATE);","SELECT r.brand_id, r.rating_date, AVG(r.product_rating) OVER (PARTITION BY r.brand_id ORDER BY r.rating_date ROWS BETWEEN 3 PRECEDING AND CURRENT ROW) as moving_avg FROM ratings r;","SELECT b.brand_name, AVG(r.product_rating) as moving_avg FROM brands b JOIN ratings r ON b.brand_id = r.brand_id GROUP BY b.brand_name ORDER BY rating_date DESC;",0 What is the total CO2 offset for each carbon offset initiative?,"CREATE TABLE CarbonOffsetInitiatives (id INT, name TEXT, co2_offset_amount INT); ","SELECT name, co2_offset_amount FROM CarbonOffsetInitiatives;","SELECT name, SUM(co2_offset_amount) FROM CarbonOffsetInitiatives GROUP BY name;",0 "Show the apartment numbers of apartments with bookings that have status code both ""Provisional"" and ""Confirmed""","CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR); CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR);","SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = ""Confirmed"" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = ""Provisional"";","SELECT T1.apt_number FROM Apartments AS T1 JOIN Apartment_Bookings AS T2 ON T1.apt_id = T2.apt_id WHERE T2.booking_status_code = ""Provisional"" INTERSECT SELECT T2.apt_number FROM Apartments AS T1 JOIN Apartment_Bookings AS T2 ON T1.apt_id = T2.apt_id WHERE T2.booking_status_code = ""Confirmed"";",0 Show the ages of gymnasts in descending order of total points.,"CREATE TABLE people (Age VARCHAR, People_ID VARCHAR); CREATE TABLE gymnast (Gymnast_ID VARCHAR, Total_Points VARCHAR);",SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC;,SELECT T1.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Total_Points DESC;,0 What is the launch date of the satellite with a COSPAR ID of 1995-022a?,"CREATE TABLE table_name_32 (launch_date__utc_ VARCHAR, cospar_id_satcat_№ VARCHAR);","SELECT launch_date__utc_ FROM table_name_32 WHERE cospar_id_satcat_№ = ""1995-022a"";","SELECT launch_date__utc_ FROM table_name_32 WHERE cospar_id_satcat_No = ""1995-022a"";",0 "What is the average mental health score for patients, grouped by their ethnicity?","CREATE TABLE patient (id INT, name TEXT, mental_health_score INT, ethnicity TEXT); ","SELECT AVG(mental_health_score), ethnicity FROM patient GROUP BY ethnicity;","SELECT ethnicity, AVG(mental_health_score) FROM patient GROUP BY ethnicity;",0 What is the shipping agent code of shipping agent UPS?,"CREATE TABLE Ref_Shipping_Agents (shipping_agent_code VARCHAR, shipping_agent_name VARCHAR);","SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name = ""UPS"";","SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name = ""UPS"";",1 What's jim colbert's highest rank?,"CREATE TABLE table_name_60 (rank INTEGER, player VARCHAR);","SELECT MAX(rank) FROM table_name_60 WHERE player = ""jim colbert"";","SELECT MAX(rank) FROM table_name_60 WHERE player = ""jim colbert"";",1 "What is the average attendance at week earlier than 6 on October 14, 2001?","CREATE TABLE table_name_22 (attendance INTEGER, week VARCHAR, date VARCHAR);","SELECT AVG(attendance) FROM table_name_22 WHERE week < 6 AND date = ""october 14, 2001"";","SELECT AVG(attendance) FROM table_name_22 WHERE week 6 AND date = ""october 14, 2001"";",0 "What is Set 5, when Date is Jun 26, and when Set 2 is 25-22?","CREATE TABLE table_name_46 (set_5 VARCHAR, date VARCHAR, set_2 VARCHAR);","SELECT set_5 FROM table_name_46 WHERE date = ""jun 26"" AND set_2 = ""25-22"";","SELECT set_5 FROM table_name_46 WHERE date = ""jun 26"" AND set_2 = ""25-22"";",1 "List the top 5 most active volunteers by total hours in Q1 2022, grouped by their organization?","CREATE TABLE volunteer_hours (hour_id INT, volunteer_id INT, hours_spent FLOAT, hour_date DATE, volunteer_org TEXT); ","SELECT volunteer_org, volunteer_id, SUM(hours_spent) AS total_hours FROM volunteer_hours WHERE EXTRACT(MONTH FROM hour_date) BETWEEN 1 AND 3 GROUP BY volunteer_org, volunteer_id ORDER BY total_hours DESC FETCH FIRST 5 ROWS ONLY;","SELECT volunteer_org, SUM(hours_spent) as total_hours FROM volunteer_hours WHERE hour_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY volunteer_org ORDER BY total_hours DESC LIMIT 5;",0 List inclusive housing policies that were implemented before 2010.,"CREATE TABLE InclusiveHousingPolicies (PolicyID INT, PolicyName VARCHAR(50), ImplementationDate DATE); ",SELECT PolicyName FROM InclusiveHousingPolicies WHERE ImplementationDate < '2010-01-01';,SELECT PolicyName FROM InclusiveHousingPolicies WHERE ImplementationDate '2010-01-01';,0 what is the least bronze when gold is more than 0 for russia?,"CREATE TABLE table_name_37 (bronze INTEGER, gold VARCHAR, nation VARCHAR);","SELECT MIN(bronze) FROM table_name_37 WHERE gold > 0 AND nation = ""russia"";","SELECT MIN(bronze) FROM table_name_37 WHERE gold > 0 AND nation = ""russia"";",1 List the types of crops grown in the 'crop_data' table and their respective planting seasons.,"CREATE TABLE crop_data (crop_id INT, crop_name VARCHAR(20), planting_season VARCHAR(20)); ","SELECT crop_name, planting_season FROM crop_data;","SELECT crop_name, planting_season FROM crop_data;",1 Who had the pole position in the Canadian Grand Prix? ,"CREATE TABLE table_26258348_4 (pole_position VARCHAR, grand_prix VARCHAR);","SELECT pole_position FROM table_26258348_4 WHERE grand_prix = ""Canadian grand_prix"";","SELECT pole_position FROM table_26258348_4 WHERE grand_prix = ""Canadian Grand Prix"";",0 "What is the total workout duration in minutes for each gender, in the last month?","CREATE TABLE membership (member_id INT, membership_type VARCHAR(20), gender VARCHAR(10)); CREATE TABLE workout_data (member_id INT, duration INT, timestamp TIMESTAMP); ","SELECT gender, SUM(duration)/60 as total_minutes FROM workout_data w JOIN membership m ON w.member_id = m.member_id WHERE timestamp BETWEEN '2022-02-01 00:00:00' AND '2022-02-28 23:59:59' GROUP BY gender;","SELECT m.gender, SUM(w.duration) as total_duration FROM membership m JOIN workout_data w ON m.member_id = w.member_id WHERE w.timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY m.gender;",0 What is the average quantity of eco-friendly materials sourced from South America?,"CREATE TABLE sourcing (id INT, region TEXT, quantity INT); ",SELECT AVG(quantity) FROM sourcing WHERE region = 'South America';,SELECT AVG(quantity) FROM sourcing WHERE region = 'South America';,1 "What is the biggest roll number of Sylvia Park School, which has a state authority?","CREATE TABLE table_name_12 (roll INTEGER, authority VARCHAR, name VARCHAR);","SELECT MAX(roll) FROM table_name_12 WHERE authority = ""state"" AND name = ""sylvia park school"";","SELECT MAX(roll) FROM table_name_12 WHERE authority = ""state"" AND name = ""sylvia park school"";",1 "In the match where fitzroy was the away team, where was the venue?","CREATE TABLE table_name_47 (venue VARCHAR, away_team VARCHAR);","SELECT venue FROM table_name_47 WHERE away_team = ""fitzroy"";","SELECT venue FROM table_name_47 WHERE away_team = ""fitzroy"";",1 Name the most attendance for october 11,"CREATE TABLE table_name_75 (attendance INTEGER, date VARCHAR);","SELECT MAX(attendance) FROM table_name_75 WHERE date = ""october 11"";","SELECT MAX(attendance) FROM table_name_75 WHERE date = ""october 11"";",1 How many vegetarian options are available on the menu?,"CREATE TABLE menu_items (item VARCHAR(255), vegetarian BOOLEAN); ",SELECT COUNT(*) FROM menu_items WHERE vegetarian = true;,SELECT COUNT(*) FROM menu_items WHERE vegetarian = true;,1 "Name the tournament for april 3, 2005","CREATE TABLE table_name_79 (tournament VARCHAR, date VARCHAR);","SELECT tournament FROM table_name_79 WHERE date = ""april 3, 2005"";","SELECT tournament FROM table_name_79 WHERE date = ""april 3, 2005"";",1 Find the first name and gpa of the students whose gpa is lower than the average gpa of all students.,"CREATE TABLE student (stu_fname VARCHAR, stu_gpa INTEGER);","SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student);","SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa (SELECT AVG(stu_gpa) FROM student);",0 What is the total number of crimes reported in 2021?,"CREATE TABLE crimes (id INT, report_date DATE, crime_type VARCHAR(20)); ",SELECT COUNT(*) FROM crimes WHERE report_date BETWEEN '2021-01-01' AND '2021-12-31';,SELECT COUNT(*) FROM crimes WHERE report_date BETWEEN '2021-01-01' AND '2021-12-31';,1 What is the number of years that the event was foil team and took place in Los Angeles?,"CREATE TABLE table_name_77 (year VARCHAR, venue VARCHAR, event VARCHAR);","SELECT COUNT(year) FROM table_name_77 WHERE venue = ""los angeles"" AND event = ""foil team"";","SELECT COUNT(year) FROM table_name_77 WHERE venue = ""los angeles"" AND event = ""foil team"";",1 What is the sum of the golds of the nation with 5 total and less than 0 bronze medals?,"CREATE TABLE table_name_18 (gold INTEGER, total VARCHAR, bronze VARCHAR);",SELECT SUM(gold) FROM table_name_18 WHERE total = 5 AND bronze < 0;,SELECT SUM(gold) FROM table_name_18 WHERE total = 5 AND bronze 0;,0 What team 2 has lokomotiva as team 1?,"CREATE TABLE table_name_16 (team_2 VARCHAR, team_1 VARCHAR);","SELECT team_2 FROM table_name_16 WHERE team_1 = ""lokomotiva"";","SELECT team_2 FROM table_name_16 WHERE team_1 = ""lokomotiva"";",1 What is the minimum R&D expenditure for drugs approved by the EMA since 2018?,"CREATE TABLE drug_approval (drug_name VARCHAR(255), approval_body VARCHAR(255), approval_year INT); CREATE TABLE rd_expenditure (drug_name VARCHAR(255), rd_expenditure FLOAT); ",SELECT MIN(rd_expenditure) FROM rd_expenditure INNER JOIN drug_approval ON rd_expenditure.drug_name = drug_approval.drug_name WHERE drug_approval.approval_body = 'EMA' AND drug_approval.approval_year >= 2018;,SELECT MIN(rd_expenditure) FROM drug_approval WHERE approval_body = 'EMA' AND approval_year >= 2018;,0 How many days has each aircraft spent in maintenance in the past year?,"CREATE TABLE aircraft_maintenance (aircraft_id INT, maintenance_date DATE, maintenance_hours INT); ","SELECT aircraft_id, DATEDIFF(day, MIN(maintenance_date), MAX(maintenance_date)) AS total_days_in_maintenance FROM aircraft_maintenance GROUP BY aircraft_id;","SELECT aircraft_id, SUM(maintenance_hours) as total_maintenance_days FROM aircraft_maintenance WHERE maintenance_date >= DATEADD(year, -1, GETDATE()) GROUP BY aircraft_id;",0 What was the Result on Week 3?,"CREATE TABLE table_name_62 (result VARCHAR, week VARCHAR);",SELECT result FROM table_name_62 WHERE week = 3;,SELECT result FROM table_name_62 WHERE week = 3;,1 What is the total value of all open trades for a specific stock as of a certain date?,"CREATE TABLE trades (trade_id INT, customer_id INT, stock_ticker VARCHAR(10), trade_date DATE, trade_status VARCHAR(50), quantity INT, price DECIMAL(10, 2)); ",SELECT SUM(quantity * price) FROM trades WHERE stock_ticker = 'AAPL' AND trade_status = 'open' AND trade_date <= '2022-02-03';,"SELECT SUM(quantity * price) FROM trades WHERE stock_ticker = 'Open' AND trade_status = 'Open' AND trade_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 How many broadband customers have a connection speed greater than 500 Mbps in the state of New York?,"CREATE TABLE broadband_subscribers(subscriber_id INT, connection_speed FLOAT, state VARCHAR(20)); ",SELECT COUNT(*) FROM broadband_subscribers WHERE connection_speed > 500 AND state = 'New York';,SELECT COUNT(*) FROM broadband_subscribers WHERE connection_speed > 500 AND state = 'New York';,1 What year did maggs magnificent mild win a gold medal in the mild and porter category at the siba south east region beer competition?,"CREATE TABLE table_name_93 (year INTEGER, competition VARCHAR, category VARCHAR, beer_name VARCHAR, prize VARCHAR);","SELECT AVG(year) FROM table_name_93 WHERE beer_name = ""maggs magnificent mild"" AND prize = ""gold medal"" AND category = ""mild and porter"" AND competition = ""siba south east region beer competition"";","SELECT AVG(year) FROM table_name_93 WHERE beer_name = ""maggs magnificent mild"" AND prize = ""gold"" AND category = ""mild and porter"" AND competition = ""siba south east region"";",0 Update the country for Green Waves vendor in the sustainable_vendors table,"CREATE TABLE sustainable_vendors (id INT PRIMARY KEY, name VARCHAR(255), country VARCHAR(255));",UPDATE sustainable_vendors SET country = 'USA' WHERE name = 'Green Waves';,UPDATE sustainable_vendors SET country = 'Green Waves' WHERE name = 'Green Waves';,0 What is the local economic impact of tourism in Costa Rica's coastal towns?,"CREATE TABLE tourism(town_id INT, town_name TEXT, country TEXT, tourism_impact INT); ","SELECT town_name, tourism_impact FROM tourism WHERE country = 'Costa Rica';",SELECT tourism_impact FROM tourism WHERE country = 'Costa Rica';,0 "What is the water demand and water price by city, and how many water treatment plants serve each city?","CREATE TABLE if not exists water_demand (id INT PRIMARY KEY, city VARCHAR(50), water_demand FLOAT); CREATE TABLE if not exists water_price (id INT PRIMARY KEY, city VARCHAR(50), price FLOAT); CREATE TABLE if not exists water_treatment_plants (id INT PRIMARY KEY, city VARCHAR(50), num_treatment_plants INT); CREATE VIEW if not exists water_demand_price AS SELECT wd.city, wd.water_demand, wp.price FROM water_demand wd JOIN water_price wp ON wd.city = wp.city;","SELECT wdp.city, AVG(wdp.water_demand) as avg_water_demand, AVG(wdp.price) as avg_price, wt.num_treatment_plants FROM water_demand_price wdp JOIN water_treatment_plants wt ON wdp.city = wt.city GROUP BY wt.city;","SELECT wd.city, wd.water_demand, wp.price, COUNT(wd.id) FROM water_demand_price wd JOIN water_treatment_plants wtp ON wd.city = wtp.city GROUP BY wd.city, wd.water_demand, wp.price;",0 What is the highest score for Black Milk?,"CREATE TABLE table_name_29 (average_score INTEGER, artist VARCHAR);","SELECT MAX(average_score) FROM table_name_29 WHERE artist = ""black milk"";","SELECT MAX(average_score) FROM table_name_29 WHERE artist = ""black milk"";",1 "Find the number of garments produced by each manufacturer, and the percentage of garments produced by each manufacturer, for the year 2022.","CREATE TABLE garment_manufacturing (manufacturer_id INT, garment_id INT, production_date DATE); ","SELECT manufacturer_id, COUNT(*) as num_garments, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM garment_manufacturing WHERE EXTRACT(YEAR FROM production_date) = 2022) as pct_garments FROM garment_manufacturing WHERE EXTRACT(YEAR FROM production_date) = 2022 GROUP BY manufacturer_id ORDER BY num_garments DESC;","SELECT manufacturer_id, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM garment_manufacturing WHERE production_date BETWEEN '2022-01-01' AND '2022-12-31') as percentage FROM garment_manufacturing WHERE production_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY manufacturer_id;",0 What is the total cost of wellbeing programs by athlete gender?,"CREATE TABLE athletes (athlete_id INT, athlete_name VARCHAR(50), gender VARCHAR(10)); CREATE TABLE wellbeing_programs (program_id INT, athlete_id INT, cost DECIMAL(5,2)); ","SELECT a.gender, SUM(wellbeing_programs.cost) as total_cost FROM athletes JOIN wellbeing_programs ON athletes.athlete_id = wellbeing_programs.athlete_id GROUP BY a.gender;","SELECT athletes.gender, SUM(wellbeing_programs.cost) as total_cost FROM athletes INNER JOIN wellbeing_programs ON athletes.athlete_id = wellbeing_programs.athlete_id GROUP BY athletes.gender;",0 What is the Official Name of the Community with an Area km 2 of 16.13?,"CREATE TABLE table_name_50 (official_name VARCHAR, area_km_2 VARCHAR);",SELECT official_name FROM table_name_50 WHERE area_km_2 = 16.13;,"SELECT official_name FROM table_name_50 WHERE area_km_2 = ""16.13"";",0 Find the average temperature and humidity for the crops in field 1 during March 2021.,"CREATE TABLE field_sensors (field_id INT, sensor_type VARCHAR(20), value FLOAT, timestamp TIMESTAMP); ","SELECT AVG(value) FROM field_sensors WHERE field_id = 1 AND sensor_type IN ('temperature', 'humidity') AND MONTH(timestamp) = 3 AND YEAR(timestamp) = 2021;","SELECT AVG(value) as avg_temperature, AVG(value) as avg_humidity FROM field_sensors WHERE field_id = 1 AND timestamp BETWEEN '2021-03-01' AND '2021-03-31';",0 Delete all beauty products that contain 'paraben'.,"CREATE TABLE Products (product_id INT, name VARCHAR(100), ingredients TEXT); ",DELETE FROM Products WHERE ingredients LIKE '%paraben%';,DELETE FROM Products WHERE ingredients LIKE '%paraben%';,1 What was the report of the Belgian Grand Prix?,"CREATE TABLE table_1132600_3 (report VARCHAR, grand_prix VARCHAR);","SELECT report FROM table_1132600_3 WHERE grand_prix = ""Belgian grand_prix"";","SELECT report FROM table_1132600_3 WHERE grand_prix = ""Belgian Grand Prix"";",0 Overall pick 240 was a pick in which round?,"CREATE TABLE table_10360823_1 (round VARCHAR, overall VARCHAR);",SELECT round FROM table_10360823_1 WHERE overall = 240;,SELECT round FROM table_10360823_1 WHERE overall = 240;,1 How many publications does each faculty member have?,"CREATE TABLE faculty (id INT, name VARCHAR(50), department VARCHAR(50)); CREATE TABLE publications (id INT, faculty_id INT, title VARCHAR(100)); ","SELECT f.name, COUNT(p.id) FROM faculty f JOIN publications p ON f.id = p.faculty_id GROUP BY f.name;","SELECT f.name, COUNT(p.id) FROM faculty f JOIN publications p ON f.id = p.faculty_id GROUP BY f.name;",1 "What is the lowest draws that have losses greater than 0, an against less than 1728, melton as the ballarat fl, and byes less than 2?","CREATE TABLE table_name_66 (draws INTEGER, byes VARCHAR, ballarat_fl VARCHAR, losses VARCHAR, against VARCHAR);","SELECT MIN(draws) FROM table_name_66 WHERE losses > 0 AND against < 1728 AND ballarat_fl = ""melton"" AND byes < 2;","SELECT MIN(draws) FROM table_name_66 WHERE losses > 0 AND against 1728 AND ballarat_fl = ""melton"" AND byes 2;",0 Add new humanitarian assistance records to the Humanitarian_Assistance table.,"CREATE TABLE Humanitarian_Assistance (id INT, operation_name VARCHAR(255), location VARCHAR(255), start_date DATE, end_date DATE, budget DECIMAL(10,2));","INSERT INTO Humanitarian_Assistance (operation_name, location, start_date, end_date, budget) VALUES ('Operation Aid', 'Nigeria', CURDATE(), DATE_ADD(CURDATE(), INTERVAL 6 MONTH), 500000.00);","INSERT INTO Humanitarian_Assistance (id, operation_name, location, start_date, end_date, budget) VALUES (1, 'Habitat', 'New York', '2022-03-01', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31', '2022-03-31');",0 What electorate does Member dingley brittin category:articles with hcards represent?,"CREATE TABLE table_name_37 (electorate VARCHAR, member VARCHAR);","SELECT electorate FROM table_name_37 WHERE member = ""dingley brittin category:articles with hcards"";","SELECT electorate FROM table_name_37 WHERE member = ""dingley brittin category:articles with hcards"";",1 "Display the machine IDs, types, and maintenance schedules for machines not in factories with industry 4.0 initiatives.","CREATE TABLE machines (machine_id INT, type TEXT, schedule TEXT); CREATE TABLE factories (factory_id INT, initiative TEXT);","SELECT machines.machine_id, machines.type, machines.schedule FROM machines RIGHT JOIN factories ON machines.factory_id = factories.factory_id WHERE factories.initiative IS NULL;","SELECT machines.machine_id, machines.type, machines.schedule FROM machines INNER JOIN factories ON machines.factory_id = factories.factory_id WHERE factories.initiative IS NULL;",0 Update the species column for all entries in the trees table where the diameter is between 30 and 60 inches to 'Large Tree',"CREATE TABLE trees (id INT PRIMARY KEY, species VARCHAR(255), diameter FLOAT);",UPDATE trees SET species = 'Large Tree' WHERE diameter BETWEEN 30 AND 60;,UPDATE trees SET species = 'Large Tree' WHERE diameter BETWEEN 30 AND 60;,1 What is the total amount donated and number of volunteers for each organization?,"CREATE TABLE funding (org_id INT, amount DECIMAL(10,2), funding_date DATE); CREATE TABLE volunteers (org_id INT, num_volunteers INT); ","SELECT org_id, SUM(amount) AS total_funding, num_volunteers FROM funding f JOIN volunteers v ON f.org_id = v.org_id GROUP BY org_id;","SELECT funding.org_id, SUM(funding.amount) AS total_donated, SUM(volunteers.num_volunteers) AS total_volunteers FROM funding INNER JOIN volunteers ON funding.org_id = volunteers.org_id GROUP BY funding.org_id;",0 "Which player has a Position of fly-half, and a Caps of 3?","CREATE TABLE table_name_41 (player VARCHAR, position VARCHAR, caps VARCHAR);","SELECT player FROM table_name_41 WHERE position = ""fly-half"" AND caps = 3;","SELECT player FROM table_name_41 WHERE position = ""fly-half"" AND caps = ""3"";",0 What is the number of users who signed up in each quarter of 2019 and 2020?,"CREATE TABLE Members (id INT, user_name VARCHAR, signup_date DATE); ","SELECT DATE_FORMAT(signup_date, '%Y-%m') AS quarter, COUNT(*) AS total_count FROM Members WHERE signup_date BETWEEN '2019-01-01' AND '2020-12-31' GROUP BY quarter;","SELECT DATE_FORMAT(signup_date, '%Y-%m') as quarter, COUNT(*) as num_users FROM Members WHERE signup_date BETWEEN '2019-01-01' AND '2020-12-31' GROUP BY quarter;",0 What was the election date for H. Brent Coles?,"CREATE TABLE table_1329532_2 (date_of_election VARCHAR, appointed_successor VARCHAR);","SELECT date_of_election FROM table_1329532_2 WHERE appointed_successor = ""H. Brent Coles"";","SELECT date_of_election FROM table_1329532_2 WHERE appointed_successor = ""H. Brent Coles"";",1 WHAT IS THE 2010 WITH 2012 OF 2R AT MIAMI MASTERS?,CREATE TABLE table_name_93 (tournament VARCHAR);,"SELECT 2010 FROM table_name_93 WHERE 2012 = ""2r"" AND tournament = ""miami masters"";","SELECT 2010 FROM table_name_93 WHERE 2012 = ""2r"" AND tournament = ""miami masters"";",1 What is the total mass of chemicals produced per week?,"CREATE TABLE ChemicalProduction (date DATE, chemical VARCHAR(10), mass FLOAT); ","SELECT WEEKOFYEAR(date) as Week, SUM(mass) as TotalMass FROM ChemicalProduction GROUP BY Week;","SELECT EXTRACT(WEEK FROM date) AS week, SUM(mass) AS total_mass FROM ChemicalProduction GROUP BY week;",0 What is the average pages per minute color?,CREATE TABLE product (pages_per_minute_color INTEGER);,SELECT AVG(pages_per_minute_color) FROM product;,SELECT AVG(pages_per_minute_color) FROM product;,1 Which mining operations have more than 50 employees?,"CREATE TABLE mining_operations (id INT, name VARCHAR(50), num_employees INT); ",SELECT name FROM mining_operations WHERE num_employees > 50;,SELECT name FROM mining_operations WHERE num_employees > 50;,1 "What is the power of b-b wheel arrangement, built in 1952?","CREATE TABLE table_name_88 (power_output VARCHAR, wheel_arrangement VARCHAR, build_date VARCHAR);","SELECT power_output FROM table_name_88 WHERE wheel_arrangement = ""b-b"" AND build_date = ""1952"";","SELECT power_output FROM table_name_88 WHERE wheel_arrangement = ""b-b"" AND build_date = ""1952"";",1 List all ingredients sourced from France for cosmetic products launched in 2020 with a 'natural' label.,"CREATE TABLE ingredients (ingredient_id INT, product_id INT, ingredient_name VARCHAR(100), source_country VARCHAR(50), launch_year INT, label VARCHAR(50)); ",SELECT ingredient_name FROM ingredients WHERE source_country = 'France' AND launch_year = 2020 AND label = 'natural';,SELECT ingredient_name FROM ingredients WHERE source_country = 'France' AND launch_year = 2020 AND label = 'natural';,1 "List all basketball players who have played for the 'Golden State Warriors' and their total points scored, sorted by the number of games played.","CREATE TABLE players (player_id INT, player_name VARCHAR(255), team_name VARCHAR(255)); CREATE TABLE points (player_id INT, points INT, games_played INT); ","SELECT p.player_name, p.team_name, SUM(pnts.points) as total_points FROM players p INNER JOIN points pnts ON p.player_id = pnts.player_id WHERE p.team_name = 'Golden State Warriors' GROUP BY p.player_id ORDER BY games_played DESC;","SELECT players.player_name, SUM(points.points) as total_points FROM players INNER JOIN points ON players.player_id = points.player_id WHERE players.team_name = 'Golden State Warriors' GROUP BY players.player_name ORDER BY total_points DESC;",0 "Who did the Tampa Bay Buccaneers play on december 23, 1995?","CREATE TABLE table_name_60 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_60 WHERE date = ""december 23, 1995"";","SELECT opponent FROM table_name_60 WHERE date = ""december 23, 1995"";",1 Who had the high rebounds at the delta center?,"CREATE TABLE table_13762472_5 (high_rebounds VARCHAR, location_attendance VARCHAR);","SELECT high_rebounds FROM table_13762472_5 WHERE location_attendance = ""Delta Center"";","SELECT high_rebounds FROM table_13762472_5 WHERE location_attendance = ""Delta Center"";",1 "What is the total water consumption by agricultural sector in the Mississippi river basin, excluding Illinois?","CREATE TABLE mississippi_river_basin(state VARCHAR(20), sector VARCHAR(20), consumption NUMERIC(10,2)); ",SELECT consumption FROM mississippi_river_basin WHERE state != 'Illinois' AND sector = 'Agricultural';,SELECT SUM(consumption) FROM mississippi_river_basin WHERE state!= 'Illinois' AND sector = 'Agriculture';,0 What's the distribution of user ratings for non-English TV shows?,"CREATE TABLE tv_shows (show_id INT, title VARCHAR(100), language VARCHAR(20), user_rating DECIMAL(3,2)); ","SELECT language, AVG(user_rating) as avg_rating, COUNT(*) as show_count, MIN(user_rating) as min_rating, MAX(user_rating) as max_rating FROM tv_shows WHERE language != 'English' GROUP BY language;","SELECT language, SUM(user_rating) as total_rating FROM tv_shows WHERE language!= 'English' GROUP BY language;",0 Name the centerfold model when interview subject is steve jobs,"CREATE TABLE table_1566848_6 (centerfold_model VARCHAR, interview_subject VARCHAR);","SELECT centerfold_model FROM table_1566848_6 WHERE interview_subject = ""Steve Jobs"";","SELECT centerfold_model FROM table_1566848_6 WHERE interview_subject = ""Steve Jobs"";",1 Which segment a's Netflix is S05E22?,"CREATE TABLE table_name_86 (segment_a VARCHAR, netflix VARCHAR);","SELECT segment_a FROM table_name_86 WHERE netflix = ""s05e22"";","SELECT segment_a FROM table_name_86 WHERE netflix = ""s05e22"";",1 What is the Total of the Player who won in 1979 with a To par of less than 11?,"CREATE TABLE table_name_28 (total INTEGER, year_s__won VARCHAR, to_par VARCHAR);","SELECT MAX(total) FROM table_name_28 WHERE year_s__won = ""1979"" AND to_par < 11;","SELECT SUM(total) FROM table_name_28 WHERE year_s__won = ""1979"" AND to_par 11;",0 "Find the number of solar power projects in California, Texas, and New York with an investment over 100 million dollars.","CREATE TABLE solar_power_projects (id INT, name TEXT, state TEXT, investment_usd FLOAT); ","SELECT COUNT(*) FROM solar_power_projects WHERE state IN ('California', 'Texas', 'New York') AND investment_usd > 100000000.0;","SELECT COUNT(*) FROM solar_power_projects WHERE state IN ('California', 'Texas', 'New York') AND investment_usd > 100000000;",0 Update the donation amount to $60 for donation ID 1,"CREATE TABLE donations (donation_id INT, donation_amount DECIMAL(10,2), donation_date DATE); ",UPDATE donations SET donation_amount = 60.00 WHERE donation_id = 1;,UPDATE donations SET donation_amount = 60 WHERE donation_id = 1;,0 What are the total sales figures for each drug in the 'drugs' table?,"CREATE TABLE drugs (drug_name TEXT, sales_q1 INT, sales_q2 INT, sales_q3 INT, sales_q4 INT); ","SELECT drug_name, SUM(sales_q1 + sales_q2 + sales_q3 + sales_q4) as total_sales FROM drugs GROUP BY drug_name;","SELECT drug_name, SUM(sales_q1) as total_sales FROM drugs GROUP BY drug_name;",0 List the top 3 renewable energy sources by installed capacity in descending order in Canada?,"CREATE TABLE Renewable_Energy (Source VARCHAR(30), Country VARCHAR(20), Installed_Capacity INT); ","SELECT Source, Installed_Capacity FROM (SELECT Source, Installed_Capacity, RANK() OVER (ORDER BY Installed_Capacity DESC) as Rank FROM Renewable_Energy WHERE Country = 'Canada') tmp WHERE Rank <= 3;","SELECT Source, Installed_Capacity FROM Renewable_Energy WHERE Country = 'Canada' ORDER BY Installed_Capacity DESC LIMIT 3;",0 Update the 'bankruptcy_law' table and set the 'chapter' column to '13' for all cases filed in 2018,"CREATE TABLE bankruptcy_law (case_id INT, filing_date DATE, chapter VARCHAR(10));",WITH updated_cases AS (UPDATE bankruptcy_law SET chapter = '13' WHERE EXTRACT(YEAR FROM filing_date) = 2018 RETURNING *) SELECT * FROM updated_cases;,UPDATE bankruptcy_law SET chapter = 13 WHERE filing_date BETWEEN '2018-01-01' AND '2018-12-31';,0 What is the maximum number of satellites launched by any country in a single year?,"CREATE TABLE satellites (id INT, country VARCHAR(255), name VARCHAR(255), launch_date DATE);","SELECT MAX(satellites_per_year.count) FROM (SELECT COUNT(*) as count, YEAR(launch_date) as launch_year FROM satellites GROUP BY launch_year) as satellites_per_year;","SELECT MAX(COUNT(*)) FROM satellites WHERE launch_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE;",0 What team was Bodine in when he had an average finish of 8.3?,"CREATE TABLE table_2387790_2 (team_s_ VARCHAR, avg_finish VARCHAR);","SELECT team_s_ FROM table_2387790_2 WHERE avg_finish = ""8.3"";","SELECT team_s_ FROM table_2387790_2 WHERE avg_finish = ""8.3"";",1 Insert new record into 'manufacturing_process' table for 'leather_tanning' with 'emission_rating' of 60,"CREATE TABLE manufacturing_process (id INT PRIMARY KEY, process VARCHAR(50), emission_rating INT); ","INSERT INTO manufacturing_process (process, emission_rating) VALUES ('leather_tanning', 60);","INSERT INTO manufacturing_process (process, emission_rating) VALUES ('leather_tanning', 60);",1 How many community development initiatives are in the 'community_development' table?,"CREATE TABLE community_development (id INT, initiative VARCHAR(50), status VARCHAR(50)); ",SELECT COUNT(*) FROM community_development;,SELECT COUNT(*) FROM community_development;,1 What is the average number of citations per publication by department?,"CREATE TABLE faculty (id INT, name VARCHAR(255), department_id INT); CREATE TABLE publication (id INT, faculty_id INT, year INT, citations INT); ","SELECT department.name, AVG(COUNT(publication.id)) as avg_citations_per_publication FROM department LEFT JOIN faculty ON department.id = faculty.department_id LEFT JOIN publication ON faculty.id = publication.faculty_id GROUP BY department.name;","SELECT f.department_id, AVG(p.citations) as avg_citations_per_publication FROM faculty f JOIN publication p ON f.id = p.faculty_id GROUP BY f.department_id;",0 What source gave 26% of the votes to Brian Moran?,"CREATE TABLE table_21535453_1 (source VARCHAR, brian_moran VARCHAR);","SELECT source FROM table_21535453_1 WHERE brian_moran = ""26%"";","SELECT source FROM table_21535453_1 WHERE brian_moran = ""26%"";",1 Who are the volunteers with the least number of hours in the 'VolunteerHours' table?,"CREATE TABLE VolunteerHours (VolunteerID INT, VolunteerName VARCHAR(50), Hours INT); ","SELECT VolunteerID, VolunteerName, Hours FROM VolunteerHours WHERE Hours = (SELECT MIN(Hours) FROM VolunteerHours);",SELECT VolunteerName FROM VolunteerHours ORDER BY Hours LIMIT 1;,0 How many opponents fought on 1982-12-03?,"CREATE TABLE table_12206918_2 (opponent VARCHAR, date VARCHAR);","SELECT COUNT(opponent) FROM table_12206918_2 WHERE date = ""1982-12-03"";","SELECT COUNT(opponent) FROM table_12206918_2 WHERE date = ""1982-12-03"";",1 What was the score of Ken Still (3) when he won first place?,"CREATE TABLE table_name_14 (score VARCHAR, winner VARCHAR);","SELECT score FROM table_name_14 WHERE winner = ""ken still (3)"";","SELECT score FROM table_name_14 WHERE winner = ""ken still (3)"";",1 "What is the average launch cost, in USD, for each space agency's missions?","CREATE TABLE space_missions (mission_id INT, agency VARCHAR(50), launch_cost DECIMAL(10,2)); ","SELECT agency, AVG(launch_cost) as average_cost FROM space_missions GROUP BY agency;","SELECT agency, AVG(launch_cost) as avg_launch_cost FROM space_missions GROUP BY agency;",0 What is the number of climate communication initiatives and their total budget in Africa in the year 2021?,"CREATE TABLE climate_communication (initiative_name VARCHAR(50), location VARCHAR(50), year INT, budget INT); ","SELECT COUNT(*) as num_initiatives, SUM(budget) as total_budget FROM climate_communication WHERE year = 2021 AND location = 'Africa';","SELECT COUNT(*), SUM(budget) FROM climate_communication WHERE location = 'Africa' AND year = 2021;",0 Increase the landfill capacity for the city of Toronto by 10% for the year 2022.,"CREATE TABLE landfill_capacity (city VARCHAR(255), year INT, capacity INT); ",UPDATE landfill_capacity SET capacity = capacity * 1.10 WHERE city = 'Toronto' AND year = 2022;,UPDATE landfill_capacity SET capacity = capacity * 1.10 WHERE city = 'Toronto' AND year = 2022;,1 What is the total amount spent on network infrastructure in the European region?,"CREATE TABLE network_investments (investment_id INT, amount FLOAT, region VARCHAR(20)); ",SELECT SUM(amount) FROM network_investments WHERE region = 'Europe';,SELECT SUM(amount) FROM network_investments WHERE region = 'Europe';,1 "What is the percentage of buildings that have an energy efficiency score above 70, for each country?","CREATE TABLE Buildings_2 (id INT, country VARCHAR(50), city VARCHAR(50), efficiency_score INT); ","SELECT country, 100.0 * COUNT(*) FILTER (WHERE efficiency_score > 70) OVER (PARTITION BY country) / COUNT(*) OVER (PARTITION BY country) AS percentage FROM Buildings_2;","SELECT country, 100.0 * COUNT(*) / (SELECT COUNT(*) FROM Buildings_2) AS percentage FROM Buildings_2 WHERE efficiency_score > 70 GROUP BY country;",0 What is the average monthly bill for postpaid mobile customers in the state of New York?,"CREATE TABLE postpaid_mobile_customers (customer_id INT, state VARCHAR(20), bill FLOAT); ",SELECT AVG(bill) FROM postpaid_mobile_customers WHERE state = 'New York' AND plan_type = 'postpaid';,SELECT AVG(bill) FROM postpaid_mobile_customers WHERE state = 'New York';,0 What is the latest result where a person from the Philippines won?,"CREATE TABLE table_name_72 (year INTEGER, nation_represented VARCHAR);","SELECT MAX(year) FROM table_name_72 WHERE nation_represented = ""philippines"";","SELECT MAX(year) FROM table_name_72 WHERE nation_represented = ""philippines"";",1 what is the number of draws when there are 4 losses and 28.6% efficiency?,"CREATE TABLE table_name_11 (draws VARCHAR, losses VARCHAR, efficiency__percentage VARCHAR);","SELECT COUNT(draws) FROM table_name_11 WHERE losses = 4 AND efficiency__percentage = ""28.6%"";","SELECT COUNT(draws) FROM table_name_11 WHERE losses = 4 AND efficiency__percentage = ""28.6%"";",1 "List the first name, last name, and city for all providers who have 'therapist' in their specialty and are located in New York, NY, along with the number of patients assigned to each provider, and the average mental health score for each provider's patients","CREATE TABLE providers (provider_id INT, first_name VARCHAR(50), last_name VARCHAR(50), specialty VARCHAR(50), city VARCHAR(50), state VARCHAR(2)); CREATE TABLE patients (patient_id INT, provider_id INT, first_name VARCHAR(50), last_name VARCHAR(50), city VARCHAR(50), state VARCHAR(2), mental_health_score INT); CREATE TABLE mental_health_scores (score_id INT, patient_id INT, mental_health_score INT);","SELECT p.first_name, p.last_name, p.city, AVG(m.mental_health_score) AS avg_score, COUNT(pa.patient_id) AS patient_count FROM providers p JOIN patients pa ON p.provider_id = pa.provider_id JOIN mental_health_scores m ON pa.patient_id = m.patient_id WHERE p.specialty LIKE '%therapist%' AND p.city = 'New York' AND p.state = 'NY' GROUP BY p.provider_id, p.first_name, p.last_name, p.city ORDER BY avg_score DESC;","SELECT p.first_name, p.last_name, p.city, AVG(mhs.mental_health_score) as avg_score FROM providers p INNER JOIN patients p ON p.provider_id = p.provider_id INNER JOIN mental_health_scores mhs ON p.provider_id = mhs.patient_id WHERE p.specialty = 'therapist' AND p.city = 'New York';",0 What is the number of cases opened for each month in the year 2019?,"CREATE TABLE Cases (id INT, case_number INT, opened_date DATE);","SELECT MONTH(opened_date) AS Month, COUNT(*) AS NumberOfCases FROM Cases WHERE YEAR(opened_date) = 2019 GROUP BY Month;","SELECT DATE_FORMAT(opened_date, '%Y-%m') as month, COUNT(*) as cases_opened FROM Cases WHERE YEAR(opened_date) = 2019 GROUP BY month;",0 What score has may 9 as the date?,"CREATE TABLE table_name_26 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_26 WHERE date = ""may 9"";","SELECT score FROM table_name_26 WHERE date = ""may 9"";",1 Calculate the percentage of garments made from sustainable materials.,"CREATE TABLE Garments (garment_id INT, garment_name VARCHAR(50), sustainable BOOLEAN); ",SELECT 100.0 * SUM(sustainable) * 1.0 / COUNT(*) as percentage FROM Garments;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Garments)) AS percentage FROM Garments WHERE sustainable = TRUE;,0 What is the distribution of community health workers by gender?,"CREATE TABLE community_health_workers (worker_id INT, gender VARCHAR(10)); ","SELECT gender, COUNT(worker_id) as num_workers FROM community_health_workers GROUP BY gender;","SELECT gender, COUNT(*) FROM community_health_workers GROUP BY gender;",0 Which Tournament has an Opponent of meike babel?,"CREATE TABLE table_name_92 (tournament VARCHAR, opponent VARCHAR);","SELECT tournament FROM table_name_92 WHERE opponent = ""meike babel"";","SELECT tournament FROM table_name_92 WHERE opponent = ""meike babel"";",1 What is the total amount of resources depleted from the 'Coal' and 'Iron' mining operations?,"CREATE TABLE mining_operations(id INT, resource VARCHAR(50), amount INT); ","SELECT SUM(amount) FROM mining_operations WHERE resource IN ('Coal', 'Iron');","SELECT SUM(amount) FROM mining_operations WHERE resource IN ('Coal', 'Iron');",1 How many donors have made donations in each of the last 3 months?,"CREATE TABLE donations (donor_id INT, donation_amount DECIMAL(5,2), donation_date DATE); ","SELECT donor_id, COUNT(*) num_months FROM (SELECT donor_id, EXTRACT(MONTH FROM donation_date) month FROM donations WHERE donation_date >= DATEADD(MONTH, -3, CURRENT_DATE) GROUP BY donor_id, EXTRACT(MONTH FROM donation_date)) x GROUP BY donor_id HAVING COUNT(*) = 3;","SELECT DATE_FORMAT(donation_date, '%Y-%m') as donation_month, COUNT(DISTINCT donor_id) as donor_count FROM donations WHERE donation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH) GROUP BY donation_month;",0 What is the average mental health score of students in 'Fall 2021' term?,"CREATE TABLE student_mental_health (student_id INT, term VARCHAR(10), mental_health_score INT); ",SELECT AVG(mental_health_score) FROM student_mental_health WHERE term = 'Fall 2021';,SELECT AVG(mental_health_score) FROM student_mental_health WHERE term = 'Fall 2021';,1 What was the score of Game 2 in the series against the Florida Panthers?,"CREATE TABLE table_name_17 (score VARCHAR, opponent VARCHAR, game VARCHAR);","SELECT score FROM table_name_17 WHERE opponent = ""florida panthers"" AND game = 2;","SELECT score FROM table_name_17 WHERE opponent = ""florida panthers"" AND game = ""game 2"";",0 How many legal aid clinics are there in urban and rural areas of California and Texas?,"CREATE TABLE california_legal_aid (id INT, location VARCHAR(255), count INT); CREATE TABLE texas_legal_aid (id INT, location VARCHAR(255), count INT); ","SELECT 'California' AS state, location, SUM(count) AS total_clinics FROM california_legal_aid GROUP BY location UNION ALL SELECT 'Texas' AS state, location, SUM(count) AS total_clinics FROM texas_legal_aid GROUP BY location;","SELECT SUM(count) FROM california_legal_aid INNER JOIN texas_legal_aid ON california_legal_aid.location = texas_legal_aid.location WHERE california_legal_aid.location IN ('Urban', 'Rural');",0 What is the median age of patients who received a pneumonia shot in the last year in Florida?,"CREATE TABLE patient (patient_id INT, age INT, gender VARCHAR(10), state VARCHAR(10)); ","SELECT AVG(age) OVER (PARTITION BY state ORDER BY flu_shot_date DESC ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS median_age_by_state FROM patient WHERE state = 'Florida' AND flu_shot_date >= DATEADD(year, -1, GETDATE());",SELECT AVG(age) FROM patient WHERE state = 'Florida' AND gender = 'Pneumonia' AND patient_id IN (SELECT patient_id FROM patient WHERE state = 'Florida' AND patient_id IN (SELECT patient_id FROM patient WHERE state = 'Florida' AND patient_id IN (SELECT patient_id FROM patient WHERE state = 'Florida') AND patient_id IN (SELECT patient_id FROM patient WHERE state = 'Florida' AND patient_id IN (SELECT patient_id FROM patient WHERE state = 'Florida' AND patient_id IN (SELECT patient_id FROM patient WHERE state = 'Florida');,0 Calculate the average fuel consumption of vessels with a displacement between 4000 and 6000 tons,"CREATE TABLE Vessels (Id INT, Name VARCHAR(50), Displacement FLOAT, FuelConsumption FLOAT); ",SELECT AVG(FuelConsumption) FROM Vessels WHERE Displacement BETWEEN 4000 AND 6000;,SELECT AVG(FuelConsumption) FROM Vessels WHERE Displacement BETWEEN 4000 AND 6000;,1 What was the total revenue for the 'Desserts' menu category in the second quarter of 2021?,"CREATE TABLE restaurant_revenue(menu_category VARCHAR(20), revenue DECIMAL(10, 2), order_date DATE); ",SELECT SUM(revenue) FROM restaurant_revenue WHERE menu_category = 'Desserts' AND order_date >= '2021-04-01' AND order_date <= '2021-06-30';,SELECT SUM(revenue) FROM restaurant_revenue WHERE menu_category = 'Desserts' AND order_date BETWEEN '2021-01-01' AND '2021-03-31';,0 "What is the number of rural hospitals and clinics in each province, and the total bed count for each?","CREATE TABLE hospitals (id INT, name TEXT, location TEXT, num_beds INT, province TEXT); CREATE TABLE clinics (id INT, name TEXT, location TEXT, num_beds INT, province TEXT); ","SELECT p.province, COUNT(h.id) AS num_hospitals, SUM(h.num_beds) AS hospital_beds, COUNT(c.id) AS num_clinics, SUM(c.num_beds) AS clinic_beds FROM hospitals h INNER JOIN clinics c ON h.province = c.province GROUP BY p.province;","SELECT h.province, COUNT(h.id) as num_hospitals, SUM(c.num_beds) as total_beds FROM hospitals h JOIN clinics c ON h.province = c.province GROUP BY h.province;",0 What is the id and name of the enzyme with most number of medicines that can interact as 'activator'?,"CREATE TABLE medicine_enzyme_interaction (enzyme_id VARCHAR, interaction_type VARCHAR); CREATE TABLE enzyme (id VARCHAR, name VARCHAR);","SELECT T1.id, T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T2.interaction_type = 'activitor' GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1;","SELECT T1.enzyme_id, T1.name FROM medicine_enzyme_interaction AS T1 JOIN enzyme AS T2 ON T1.enzyme_id = T2.id WHERE T2.interaction_type = 'activator' GROUP BY T1.enzyme_id ORDER BY COUNT(*) DESC LIMIT 1;",0 "What is the average salary for employees in each department, excluding the Sales department?","CREATE TABLE employees (id INT, name VARCHAR(50), department VARCHAR(50), salary DECIMAL(10, 2)); ","SELECT department, AVG(salary) AS avg_salary FROM employees WHERE department <> 'Sales' GROUP BY department;","SELECT department, AVG(salary) as avg_salary FROM employees WHERE department!= 'Sales' GROUP BY department;",0 "What is Points, when Points For is ""562""?","CREATE TABLE table_name_25 (points VARCHAR, points_for VARCHAR);","SELECT points FROM table_name_25 WHERE points_for = ""562"";","SELECT points FROM table_name_25 WHERE points_for = ""562"";",1 Name the first elected for hosea moffitt (f) 57.9% josiah masters (dr) 42.1%,"CREATE TABLE table_2668352_11 (first_elected VARCHAR, candidates VARCHAR);","SELECT first_elected FROM table_2668352_11 WHERE candidates = ""Hosea Moffitt (F) 57.9% Josiah Masters (DR) 42.1%"";","SELECT first_elected FROM table_2668352_11 WHERE candidates = ""Hosea Moffitt (F) 57.9% Josiah Masters (DR) 42.1%"";",1 Calculate the average temperature in the Arctic Circle for the year 2020,"CREATE TABLE WeatherData (location VARCHAR(255), temperature INT, time DATETIME); ",SELECT AVG(temperature) FROM WeatherData WHERE location = 'Arctic Circle' AND YEAR(time) = 2020;,SELECT AVG(temperature) FROM WeatherData WHERE location = 'Arctic Circle' AND YEAR(time) = 2020;,1 "How many public libraries are available in each region, and what is their ranking based on availability?","CREATE TABLE Libraries (Region VARCHAR(255), Library VARCHAR(255)); ","SELECT Region, Library, ROW_NUMBER() OVER (PARTITION BY Region ORDER BY Library) AS Rank FROM Libraries;","SELECT Region, COUNT(DISTINCT Library) AS LibraryCount, RANK() OVER (ORDER BY Library) AS LibraryRank FROM Libraries;",0 What is the number of mental health facilities in each province of Canada?,"CREATE TABLE facilities (facility_id INT, facility_type VARCHAR(20), province_abbr VARCHAR(2)); ","SELECT province_abbr, COUNT(*) as mental_health_facilities FROM facilities WHERE facility_type = 'Mental Health Clinic' GROUP BY province_abbr;","SELECT province_abbr, COUNT(*) FROM facilities GROUP BY province_abbr;",0 "What is the total number of military equipment sales for each defense contractor in the Asia-Pacific region, grouped by country and displayed in descending order of sales volume?","CREATE TABLE defense_contractors (id INT, name VARCHAR(255), region VARCHAR(255)); CREATE TABLE military_equipment_sales (id INT, defense_contractor_id INT, country VARCHAR(255), sales INT); ","SELECT m.country, d.name, SUM(m.sales) as total_sales FROM military_equipment_sales m JOIN defense_contractors d ON m.defense_contractor_id = d.id WHERE d.region = 'Asia-Pacific' GROUP BY m.country, d.name ORDER BY total_sales DESC;","SELECT defense_contractors.name, military_equipment_sales.country, SUM(military_equipment_sales.sales) as total_sales FROM defense_contractors INNER JOIN military_equipment_sales ON defense_contractors.id = military_equipment_sales.defense_contractor_id WHERE defense_contractors.region = 'Asia-Pacific' GROUP BY defense_contractors.name, military_equipment_sales.country ORDER BY total_sales DESC;",0 Who produced track 7?,"CREATE TABLE table_name_7 (producer_s_ VARCHAR, track VARCHAR);",SELECT producer_s_ FROM table_name_7 WHERE track = 7;,SELECT producer_s_ FROM table_name_7 WHERE track = 7;,1 What is the total number of military personnel in the Asia-Pacific region?,"CREATE TABLE military_personnel (id INT, name TEXT, rank TEXT, region TEXT); ",SELECT COUNT(*) FROM military_personnel WHERE region = 'Asia-Pacific';,SELECT COUNT(*) FROM military_personnel WHERE region = 'Asia-Pacific';,1 "What's the lowest Overall average that has a College of Arkansas, and a Round larger than 3?","CREATE TABLE table_name_51 (overall INTEGER, college VARCHAR, round VARCHAR);","SELECT MIN(overall) FROM table_name_51 WHERE college = ""arkansas"" AND round > 3;","SELECT MIN(overall) FROM table_name_51 WHERE college = ""arkansas"" AND round > 3;",1 "What is the average transaction value, in EUR, for each customer in the ""debit_card"" table, grouped by their country, for transactions that occurred in the month of May 2023?","CREATE TABLE customer (customer_id INT, name VARCHAR(50), country VARCHAR(50)); CREATE TABLE debit_card (transaction_id INT, customer_id INT, value DECIMAL(10,2), timestamp TIMESTAMP, currency VARCHAR(3)); CREATE TABLE foreign_exchange (date DATE, currency VARCHAR(3), rate DECIMAL(10,4));","SELECT c.country, AVG(dc.value * fx.rate) as avg_value FROM customer c JOIN debit_card dc ON c.customer_id = dc.customer_id LEFT JOIN foreign_exchange fx ON dc.currency = fx.currency AND DATE_FORMAT(dc.timestamp, '%Y-%m') = '2023-05' GROUP BY c.country;","SELECT c.country, AVG(dc.value) as avg_value FROM customer c JOIN debit_card dc ON c.customer_id = dc.customer_id JOIN foreign_exchange fe ON dc.country = fe.country WHERE dc.timestamp BETWEEN '2023-01-01' AND '2023-05-30' GROUP BY c.country;",0 "What is the total funding for companies based in the United States, broken down by funding round?","CREATE TABLE Funding_Records (company_name VARCHAR(50), funding_round VARCHAR(20), funding_amount INT, country VARCHAR(50)); ","SELECT funding_round, SUM(funding_amount) FROM Funding_Records WHERE country = 'United States' GROUP BY funding_round;","SELECT funding_round, SUM(funding_amount) FROM Funding_Records WHERE country = 'United States' GROUP BY funding_round;",1 How many Shariah-compliant finance accounts were opened in each quarter?,"CREATE TABLE shariah_compliant_finance (account_number INT, account_open_date DATE, account_type VARCHAR(50));","SELECT QUARTER(account_open_date) AS quarter, COUNT(account_number) FROM shariah_compliant_finance WHERE account_type = 'Shariah-compliant' GROUP BY quarter;","SELECT DATE_FORMAT(account_open_date, '%Y-%m') AS quarter, COUNT(*) FROM shariah_compliant_finance GROUP BY quarter;",0 What is the largest number of cars per set that is less than 9?,"CREATE TABLE table_name_30 (number INTEGER, cars_per_set INTEGER);",SELECT MAX(number) FROM table_name_30 WHERE cars_per_set < 9;,SELECT MAX(number) FROM table_name_30 WHERE cars_per_set 9;,0 "What is the average number of likes on posts containing the hashtag #sustainability, per day, for the past week?","CREATE TABLE posts (id INT, content TEXT, likes INT, timestamp DATETIME); ","SELECT AVG(likes) FROM posts WHERE content LIKE '%#sustainability%' AND timestamp BETWEEN DATE_SUB(NOW(), INTERVAL 1 WEEK) AND NOW();","SELECT AVG(likes) FROM posts WHERE content LIKE '%#sustainability%' AND timestamp >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK);",0 Add a new record of a military innovation project.,"CREATE TABLE military_innovation (id INT, project VARCHAR(255), budget INT);","INSERT INTO military_innovation (id, project, budget) VALUES (1, 'Artificial Intelligence in Combat', 10000000);","INSERT INTO military_innovation (id, project, budget) VALUES (1, 'Military Innovation', '2020-2022');",0 What is the total number of space missions by ESA?,"CREATE TABLE space_missions (agency TEXT, num_missions INTEGER); ",SELECT SUM(num_missions) FROM space_missions WHERE agency = 'ESA';,SELECT SUM(num_missions) FROM space_missions WHERE agency = 'ESA';,1 How many volunteers worked on each disaster type?,"CREATE TABLE VolunteerWork (VolunteerID INT, DisasterType VARCHAR(25)); ","SELECT DisasterType, COUNT(VolunteerID) as NumVolunteers FROM VolunteerWork GROUP BY DisasterType;","SELECT DisasterType, COUNT(*) FROM VolunteerWork GROUP BY DisasterType;",0 What is the maximum number of social good initiatives in the finance industry?,"CREATE TABLE finance_social_good (id INT, industry VARCHAR(20), initiatives INT); ",SELECT MAX(initiatives) FROM finance_social_good WHERE industry = 'finance';,SELECT MAX(initiatives) FROM finance_social_good WHERE industry = 'Finance';,0 What is the average capacity of clinics in rural Montana?,"CREATE TABLE clinics (id INT, name VARCHAR(50), type VARCHAR(50), capacity INT, region VARCHAR(50)); ",SELECT AVG(clinics.capacity) FROM clinics WHERE clinics.region = 'Rural Montana';,SELECT AVG(capacity) FROM clinics WHERE region = 'Montana';,0 "How many energy efficiency policies were implemented in the EU between 2015 and 2020, inclusive?","CREATE TABLE energy_efficiency_policies (policy_name VARCHAR(255), policy_date DATE);",SELECT COUNT(*) FROM energy_efficiency_policies WHERE policy_date BETWEEN '2015-01-01' AND '2020-12-31';,SELECT COUNT(*) FROM energy_efficiency_policies WHERE policy_date BETWEEN '2015-01-01' AND '2020-12-31';,1 How many premierships for the queensland raceway?,"CREATE TABLE table_name_40 (premierships VARCHAR, venue VARCHAR);","SELECT premierships FROM table_name_40 WHERE venue = ""queensland raceway"";","SELECT premierships FROM table_name_40 WHERE venue = ""queensland raceway"";",1 How many points did the team who had 132 total points have in round 1? ,"CREATE TABLE table_24784769_1 (round1 INTEGER, total_points VARCHAR);",SELECT MAX(round1) FROM table_24784769_1 WHERE total_points = 132;,SELECT MAX(round1) FROM table_24784769_1 WHERE total_points = 132;,1 What is the number of donations made by first-time donors from the United Kingdom?,"CREATE TABLE Donations (DonationID int, DonorID int, DonationDate date);",SELECT COUNT(*) FROM Donations D INNER JOIN (SELECT DISTINCT DonorID FROM Donations WHERE YEAR(DonationDate) = YEAR(CURRENT_DATE) - 1) FD ON D.DonorID = FD.DonorID WHERE Country = 'UK';,SELECT COUNT(*) FROM Donations WHERE DonorID IN (SELECT DonorID FROM Donations WHERE Country = 'United Kingdom');,0 What is the minimum rating of heritage sites in India?,"CREATE TABLE heritage_sites (site_id INT, site_name TEXT, country TEXT, rating FLOAT); ",SELECT MIN(rating) FROM heritage_sites WHERE country = 'India';,SELECT MIN(rating) FROM heritage_sites WHERE country = 'India';,1 Who constructed the car with a grid larger than 20 that got in an accident?,"CREATE TABLE table_name_1 (constructor VARCHAR, grid VARCHAR, time_retired VARCHAR);","SELECT constructor FROM table_name_1 WHERE grid > 20 AND time_retired = ""accident"";","SELECT constructor FROM table_name_1 WHERE grid > 20 AND time_retired = ""accident"";",1 What is the minimum donation amount per state?,"CREATE TABLE Donations (id INT, donor_name TEXT, donation_amount DECIMAL(10,2), state TEXT); ","SELECT state, MIN(donation_amount) FROM Donations GROUP BY state;","SELECT state, MIN(donation_amount) FROM Donations GROUP BY state;",1 "How many educational programs were launched in ""South America"" since 2017?","CREATE TABLE educational_programs (id INT, program_id INT, location VARCHAR(255), launch_date DATE); ",SELECT COUNT(*) FROM educational_programs WHERE location = 'South America' AND YEAR(launch_date) >= 2017;,SELECT COUNT(*) FROM educational_programs WHERE location = 'South America' AND launch_date >= '2017-01-01';,0 What is the maximum weight for each astronaut in the 'max_weight_per_astronaut' view?,"CREATE VIEW max_weight_per_astronaut AS SELECT astronaut_id, MAX(weight) AS max_weight FROM astronaut_medical GROUP BY astronaut_id;","SELECT astronaut_id, max_weight FROM max_weight_per_astronaut;","SELECT astronaut_id, MAX(max_weight) FROM max_weight_per_astronaut GROUP BY astronaut_id;",0 What is the total number of climate communication initiatives in the Pacific islands?,"CREATE TABLE climate_communication (id INT, country VARCHAR(50), initiative VARCHAR(50), status VARCHAR(50)); ","SELECT COUNT(*) FROM climate_communication WHERE country IN ('Fiji', 'Samoa', 'Tonga', 'Vanuatu', 'Palau') AND initiative IS NOT NULL;",SELECT COUNT(*) FROM climate_communication WHERE country = 'Pacific Islands' AND status = 'Climate Communication';,0 Which student's age is older than 18 and is majoring in 600? List each student's first and last name.,"CREATE TABLE Student (Fname VARCHAR, Lname VARCHAR, Age VARCHAR, Major VARCHAR);","SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major = 600;","SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major = 600;",1 Which series with a total of 27 albums did Dargaud edit?,"CREATE TABLE table_name_39 (series VARCHAR, editor VARCHAR, albums VARCHAR);","SELECT series FROM table_name_39 WHERE editor = ""dargaud"" AND albums = ""27"";","SELECT series FROM table_name_39 WHERE editor = ""dargaud"" AND albums = 27;",0 What is the real name of the movie directed by gert fredholm?,"CREATE TABLE table_name_22 (original_name VARCHAR, director VARCHAR);","SELECT original_name FROM table_name_22 WHERE director = ""gert fredholm"";","SELECT original_name FROM table_name_22 WHERE director = ""gert fredholm"";",1 List all schools and their nicknames in the order of founded year.,"CREATE TABLE university (school VARCHAR, nickname VARCHAR, founded VARCHAR);","SELECT school, nickname FROM university ORDER BY founded;","SELECT school, nickname FROM university ORDER BY founded;",1 What is the 2004 value with a sf in 2010?,CREATE TABLE table_name_4 (Id VARCHAR);,"SELECT 2004 FROM table_name_4 WHERE 2010 = ""sf"";","SELECT 2004 FROM table_name_4 WHERE 2010 = ""sf"";",1 Which are the names and artworks of all artists who have created abstract art pieces since 1950?,"CREATE TABLE artists (artist_id INT, name VARCHAR(50), genre VARCHAR(50), birth_year INT); CREATE TABLE art_pieces (art_piece_id INT, title VARCHAR(50), year_made INT, artist_id INT); ","SELECT a.name, ap.title FROM artists a INNER JOIN art_pieces ap ON a.artist_id = ap.artist_id WHERE a.genre = 'Abstract' AND ap.year_made >= 1950;","SELECT artists.name, art_pieces.title FROM artists INNER JOIN art_pieces ON artists.artist_id = art_pieces.artist_id WHERE artists.genre = 'Abstract' AND art_pieces.year_made >= 1950;",0 "What is the career caps for half-back, when tests is more than 3?","CREATE TABLE table_name_73 (career_caps VARCHAR, position VARCHAR, tests VARCHAR);","SELECT career_caps FROM table_name_73 WHERE position = ""half-back"" AND tests > 3;","SELECT career_caps FROM table_name_73 WHERE position = ""half-back"" AND tests > 3;",1 What is the minimum fare for a cable car in the 'Rio de Janeiro' region?,"CREATE TABLE cable_cars (id INT, region VARCHAR(20), fare DECIMAL(5,2)); ",SELECT MIN(fare) FROM cable_cars WHERE region = 'Rio de Janeiro';,SELECT MIN(fare) FROM cable_cars WHERE region = 'Rio de Janeiro';,1 What is the highest round for the Minnesota Junior Stars (Mjhl)?,"CREATE TABLE table_name_60 (round INTEGER, college_junior_club_team__league_ VARCHAR);","SELECT MAX(round) FROM table_name_60 WHERE college_junior_club_team__league_ = ""minnesota junior stars (mjhl)"";","SELECT MAX(round) FROM table_name_60 WHERE college_junior_club_team__league_ = ""minnesota junior stars (mjhl)"";",1 what is the number of wins that is in the Top 10 and larger than 13?,"CREATE TABLE table_name_73 (wins INTEGER, top_10 INTEGER);",SELECT SUM(wins) FROM table_name_73 WHERE top_10 > 13;,SELECT SUM(wins) FROM table_name_73 WHERE top_10 > 13;,1 What is the maximum water depth in marine aquaculture facilities in the North Sea?,"CREATE TABLE marine_aquaculture (id INT, name TEXT, region TEXT, water_depth INT); ",SELECT MAX(water_depth) FROM marine_aquaculture WHERE region = 'North Sea';,SELECT MAX(water_depth) FROM marine_aquaculture WHERE region = 'North Sea';,1 "Calculate the moving average of donation amounts for the last three months for each donor, ordered by donation date.","CREATE TABLE Donors (DonorID int, Name varchar(50)); CREATE TABLE Donations (DonationID int, DonorID int, Amount decimal(10,2), DonationDate date); ","SELECT D.DonorID, D.Name, D.DonationDate, AVG(D.Amount) OVER (PARTITION BY D.DonorID ORDER BY D.DonationDate ROWS BETWEEN 2 PRECEDING AND CURRENT ROW) AS MovingAverage FROM Donors D JOIN Donations DD ON D.DonorID = DD.DonorID ORDER BY DD.DonationDate;","SELECT Donors.Name, AVG(Donations.Amount) as MovingAverage FROM Donors INNER JOIN Donations ON Donors.DonorID = Donations.DonorID WHERE Donations.DonationDate >= DATEADD(month, -3, GETDATE()) GROUP BY Donors.Name ORDER BY Donations.DonationDate;",0 Count the number of military equipment items in 'military_equipment' table,"CREATE TABLE military_equipment (id INT PRIMARY KEY, name VARCHAR(255), type VARCHAR(255), manufacturer VARCHAR(255), year INT, country VARCHAR(255)); ",SELECT COUNT(*) FROM military_equipment;,SELECT COUNT(*) FROM military_equipment;,1 Which brands sourced Tencel from Germany in 2022?,"CREATE TABLE tencel_sources (brand VARCHAR(50), country VARCHAR(50), year INT); ",SELECT brand FROM tencel_sources WHERE country = 'Germany' AND year = 2022;,SELECT brand FROM tencel_sources WHERE country = 'Germany' AND year = 2022;,1 Which player came from Kent State?,"CREATE TABLE table_name_38 (player VARCHAR, college VARCHAR);","SELECT player FROM table_name_38 WHERE college = ""kent state"";","SELECT player FROM table_name_38 WHERE college = ""kent state"";",1 What is the percentage of wastewater treated in Queensland?,"CREATE TABLE wastewater_treatment (id INT, state VARCHAR(20), treated_wastewater FLOAT); ",SELECT (SUM(treated_wastewater) / (SELECT SUM(treated_wastewater) FROM wastewater_treatment WHERE state = 'Queensland') * 100) FROM wastewater_treatment WHERE state = 'Queensland';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM wastewater_treatment WHERE state = 'Queensland')) AS percentage FROM wastewater_treatment WHERE state = 'Queensland';,0 tell the final for lindsey graham,"CREATE TABLE table_1133844_4 (result VARCHAR, senator VARCHAR);","SELECT result FROM table_1133844_4 WHERE senator = ""Lindsey Graham"";","SELECT result FROM table_1133844_4 WHERE senator = ""Lindsey Graham"";",1 Which cities have volunteers who have contributed more than 150 hours?,"CREATE TABLE Volunteers (VolunteerID INT PRIMARY KEY, VolunteerName VARCHAR(50), VolunteerHours INT, VolunteerCity VARCHAR(30)); ","SELECT VolunteerCity, SUM(VolunteerHours) FROM Volunteers GROUP BY VolunteerCity HAVING SUM(VolunteerHours) > 150;",SELECT VolunteerCity FROM Volunteers WHERE VolunteerHours > 150;,0 "Which Points have a Lost smaller than 1, and Games larger than 7?","CREATE TABLE table_name_81 (points INTEGER, lost VARCHAR, games VARCHAR);",SELECT MAX(points) FROM table_name_81 WHERE lost < 1 AND games > 7;,SELECT SUM(points) FROM table_name_81 WHERE lost 1 AND games > 7;,0 What is the percentage of female union members in the agriculture sector?,"CREATE TABLE agriculture (id INT, gender TEXT, union_member BOOLEAN); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM agriculture WHERE union_member = TRUE)) FROM agriculture WHERE gender = 'Female';,SELECT (COUNT(*) FILTER (WHERE union_member = TRUE) * 100.0 / COUNT(*)) FROM agriculture WHERE gender = 'Female';,0 How many autonomous taxis are there in each city in Germany?,"CREATE TABLE germany_taxis (city VARCHAR(20), num_taxis INT);","SELECT city, SUM(num_taxis) AS total_autonomous_taxis FROM germany_taxis GROUP BY city;","SELECT city, SUM(num_taxis) FROM germany_taxis GROUP BY city;",0 What is the percentage of female employees in the marketing department?,"CREATE TABLE Employees (EmployeeID INT, Gender VARCHAR(10), Department VARCHAR(20)); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Employees WHERE Department = 'Marketing')) FROM Employees WHERE Gender = 'Female' AND Department = 'Marketing';,SELECT (COUNT(*) FILTER (WHERE Gender = 'Female')) * 100.0 / COUNT(*) FROM Employees WHERE Department = 'Marketing';,0 What is the number of hospitals and average hospital capacity for each state?,"CREATE TABLE StateHospitals (StateName VARCHAR(50), NumHospitals INT, AvgCapacity INT); ","SELECT StateName, COUNT(*) AS NumHospitals, AVG(AvgCapacity) AS AvgCapacity FROM StateHospitals GROUP BY StateName","SELECT StateName, NumHospitals, AvgCapacity FROM StateHospitals;",0 What is the percentage of global Dysprosium production in 2019 that came from Africa?,"CREATE TABLE production (element VARCHAR(10), year INT, region VARCHAR(10), quantity INT); ",SELECT (SUM(CASE WHEN region = 'Africa' THEN quantity ELSE 0 END) / SUM(quantity)) * 100 FROM production WHERE element = 'Dysprosium' AND year = 2019;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM production WHERE element = 'Dysprosium' AND year = 2019 AND region = 'Africa')) AS percentage FROM production WHERE element = 'Dysprosium' AND year = 2019;,0 What is the total energy consumption of the top 3 most energy-intensive manufacturing industries in Africa?,"CREATE TABLE energy_consumption (factory_id INT, industry VARCHAR(50), region VARCHAR(50), energy_consumption INT);","SELECT industry, SUM(energy_consumption) FROM energy_consumption e JOIN (SELECT factory_id, MIN(row_number) FROM (SELECT factory_id, ROW_NUMBER() OVER (PARTITION BY industry ORDER BY energy_consumption DESC) row_number FROM energy_consumption) t GROUP BY industry) x ON e.factory_id = x.factory_id GROUP BY industry HAVING COUNT(*) <= 3 AND region = 'Africa';","SELECT industry, SUM(energy_consumption) FROM energy_consumption WHERE region = 'Africa' GROUP BY industry ORDER BY SUM(energy_consumption) DESC LIMIT 3;",0 "What is the total value of assets for clients in the 'Americas' region, grouped by currency?","CREATE TABLE clients (client_id INT, region VARCHAR(20), currency VARCHAR(10)); CREATE TABLE assets (asset_id INT, client_id INT, value INT); ","SELECT clients.currency, SUM(assets.value) AS total_assets FROM clients INNER JOIN assets ON clients.client_id = assets.client_id WHERE clients.region = 'Americas' GROUP BY clients.currency;","SELECT c.currency, SUM(a.value) FROM clients c JOIN assets a ON c.client_id = a.client_id WHERE c.region = 'Americas' GROUP BY c.currency;",0 What is the average year of the games with the date December 26?,"CREATE TABLE table_name_84 (year INTEGER, date VARCHAR);","SELECT AVG(year) FROM table_name_84 WHERE date = ""december 26"";","SELECT AVG(year) FROM table_name_84 WHERE date = ""december 26"";",1 What is the earliest start date for a defense diplomacy event?,"CREATE TABLE Defense_Diplomacy (Event_ID INT, Event_Name VARCHAR(50), Start_Date DATE); ",SELECT MIN(Start_Date) as Earliest_Date FROM Defense_Diplomacy;,SELECT MIN(Start_Date) FROM Defense_Diplomacy;,0 What is the average health equity metric score by state?,"CREATE TABLE health_equity_metrics (state VARCHAR(255), score DECIMAL(5,2)); ","SELECT state, AVG(score) FROM health_equity_metrics GROUP BY state;","SELECT state, AVG(score) FROM health_equity_metrics GROUP BY state;",1 List the top 5 species with the highest number of protection programs in place.,"CREATE TABLE Species ( id INT PRIMARY KEY, name VARCHAR(50), family VARCHAR(50), conservation_status VARCHAR(50)); CREATE TABLE Threats ( id INT PRIMARY KEY, species_id INT, threat_type VARCHAR(50), severity VARCHAR(50)); CREATE TABLE Protection_Programs ( id INT PRIMARY KEY, species_id INT, program_name VARCHAR(50), start_year INT, end_year INT);","SELECT Species.name, COUNT(Protection_Programs.id) AS program_count FROM Species LEFT JOIN Protection_Programs ON Species.id = Protection_Programs.species_id GROUP BY Species.name ORDER BY program_count DESC LIMIT 5;","SELECT Species.name, COUNT(Program_Programs.id) as program_count FROM Species INNER JOIN Threats ON Species.id = Threats.species_id INNER JOIN Protection_Programs ON Threats.species_id = Protection_Programs.species_id GROUP BY Species.name ORDER BY program_count DESC LIMIT 5;",0 Which food products have been recalled due to contamination in the last 6 months?,"CREATE TABLE recalls (id INT, date TEXT, product TEXT, reason TEXT); ","SELECT product, reason FROM recalls WHERE date > DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) AND reason = 'Contamination';","SELECT product FROM recalls WHERE reason = 'Contamination' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",0 Where is the school with state authority that has a roll of more than 157 students?,"CREATE TABLE table_name_11 (area VARCHAR, authority VARCHAR, roll VARCHAR);","SELECT area FROM table_name_11 WHERE authority = ""state"" AND roll > 157;","SELECT area FROM table_name_11 WHERE authority = ""state"" AND roll > 157;",1 "On week 11 when Dixon scored an 8, what was tonioli's score?","CREATE TABLE table_2803106_1 (tonioli VARCHAR, week__number VARCHAR, dixon VARCHAR);","SELECT tonioli FROM table_2803106_1 WHERE week__number = 11 AND dixon = ""8"";",SELECT tonioli FROM table_2803106_1 WHERE week__number = 11 AND dixon = 8;,0 Show the number of drought impacts for each severity,"CREATE TABLE drought_impact (location VARCHAR(255), year INT, severity VARCHAR(255));","SELECT severity, COUNT(*) as num_impacts FROM drought_impact GROUP BY severity;","SELECT severity, COUNT(*) FROM drought_impact GROUP BY severity;",0 List all wastewater treatment plants in 'RegionD' with a permit expiration date in 2023,"CREATE TABLE Plant_Permit (id INT, plant_id INT, expiration_date DATE); CREATE TABLE Wastewater_Plant (plant_id INT, name VARCHAR(30), region VARCHAR(20)); ",SELECT * FROM Wastewater_Plant JOIN Plant_Permit ON Wastewater_Plant.plant_id = Plant_Permit.plant_id WHERE Plant_Permit.expiration_date = '2023-12-31' AND Wastewater_Plant.region = 'RegionD';,"SELECT Plant_Permit.plant_id, Plant_Permit.expiration_date FROM Plant_Permit INNER JOIN Wastewater_Plant ON Plant_Permit.plant_id = Wastewater_Plant.plant_id WHERE Wastewater_Plant.region = 'RegionD' AND Plant_Permit.expiration_date BETWEEN '2023-01-01' AND '2023-12-31';",0 Delete all records for the 'recycling' program in the 'waste_management' table.,"CREATE TABLE waste_management (program VARCHAR(50), waste_type VARCHAR(50), quantity INT); ",DELETE FROM waste_management WHERE program = 'recycling';,DELETE FROM waste_management WHERE program ='recycling';,0 What was the total number of volunteer hours for each program in Q1 2022?,"CREATE TABLE Volunteer_Hours (id INT, program VARCHAR(50), hours DECIMAL(5,2), hour_date DATE); ","SELECT program, DATE_FORMAT(hour_date, '%Y-%m') as quarter, SUM(hours) as total_hours FROM Volunteer_Hours WHERE hour_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY program, quarter;","SELECT program, SUM(hours) as total_hours FROM Volunteer_Hours WHERE hour_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY program;",0 Which countries have the highest military equipment sales from Lockheed Martin?,"CREATE TABLE lockheed_martin_sales (sale_id INT, country VARCHAR(50), equipment_type VARCHAR(50), sale_amount DECIMAL(10,2)); ","SELECT country, SUM(sale_amount) as total_sales FROM lockheed_martin_sales GROUP BY country ORDER BY total_sales DESC;","SELECT country, MAX(sale_amount) FROM lockheed_martin_sales GROUP BY country;",0 Name the finish which has qual of 144.817,"CREATE TABLE table_name_1 (finish VARCHAR, qual VARCHAR);","SELECT finish FROM table_name_1 WHERE qual = ""144.817"";","SELECT finish FROM table_name_1 WHERE qual = ""144.817"";",1 Which location has 111 as the days held?,"CREATE TABLE table_name_4 (location VARCHAR, days_held VARCHAR);","SELECT location FROM table_name_4 WHERE days_held = ""111"";","SELECT location FROM table_name_4 WHERE days_held = ""111"";",1 "How many games have been played by each player in the ""RetroGamers"" community?","CREATE TABLE Players (PlayerID INT PRIMARY KEY, Name VARCHAR(50), GamingCommunity VARCHAR(50)); CREATE TABLE Games (GameID INT PRIMARY KEY, GameName VARCHAR(50), PlayerID INT, FOREIGN KEY (PlayerID) REFERENCES Players(PlayerID)); ","SELECT Players.Name, COUNT(Games.GameName) FROM Players JOIN Games ON Players.PlayerID = Games.PlayerID WHERE Players.GamingCommunity = 'RetroGamers' GROUP BY Players.Name;","SELECT Players.Name, COUNT(Games.GameID) FROM Players INNER JOIN Games ON Players.PlayerID = Games.PlayerID WHERE Players.GamingCommunity = 'RetroGamers' GROUP BY Players.Name;",0 What is the total tonnage of construction waste recycled in Australia in 2017?,"CREATE TABLE Waste_Management (Waste_ID INT, Waste_Type VARCHAR(50), Tonnage DECIMAL(10,2), Year INT, Country VARCHAR(50));",SELECT SUM(Tonnage) FROM Waste_Management WHERE Waste_Type = 'Construction Waste' AND Year = 2017 AND Country = 'Australia';,SELECT SUM(Tonnage) FROM Waste_Management WHERE Waste_Type = 'Construction' AND Year = 2017 AND Country = 'Australia';,0 Delete a record with infectious disease tracking data for a specific location,"CREATE TABLE infectious_disease_tracking_v3 (id INT, location VARCHAR(20), infection_rate INT);",DELETE FROM infectious_disease_tracking_v3 WHERE location = 'Rural location 1';,DELETE FROM infectious_disease_tracking_v3 WHERE location = 'New York';,0 Which Mac OS X has an AmigaOS of partial?,"CREATE TABLE table_name_66 (mac_os_x VARCHAR, amigaos VARCHAR);","SELECT mac_os_x FROM table_name_66 WHERE amigaos = ""partial"";","SELECT mac_os_x FROM table_name_66 WHERE amigaos = ""partial"";",1 What is the maximum fare for passengers using the 'South' bus route in the last week?,"CREATE TABLE Routes (RouteID int, RouteName varchar(255), Region varchar(255)); CREATE TABLE Trips (TripID int, RouteID int, Fare double, TripDateTime datetime);","SELECT MAX(Fare) FROM Routes JOIN Trips ON Routes.RouteID = Trips.RouteID WHERE Routes.RouteName = 'South' AND Trips.TripDateTime >= DATEADD(week, -1, GETDATE());","SELECT MAX(Fare) FROM Trips JOIN Routes ON Trips.RouteID = Routes.RouteID WHERE Routes.Region = 'South' AND TripDateTime >= DATEADD(week, -1, GETDATE());",0 What is the home team score at brunswick street oval?,"CREATE TABLE table_name_26 (home_team VARCHAR, venue VARCHAR);","SELECT home_team AS score FROM table_name_26 WHERE venue = ""brunswick street oval"";","SELECT home_team AS score FROM table_name_26 WHERE venue = ""brunswick street oval"";",1 "Identify the number of mobile subscribers using 4G technology in each region, excluding subscribers with incomplete data.","CREATE TABLE mobile_subscribers (subscriber_id INT, technology VARCHAR(20), region VARCHAR(50), complete_data BOOLEAN); ","SELECT technology, region, COUNT(*) AS subscribers FROM mobile_subscribers WHERE complete_data = true AND technology = '4G' GROUP BY technology, region;","SELECT region, COUNT(*) FROM mobile_subscribers WHERE technology = '4G' AND complete_data = true GROUP BY region;",0 List the number of volunteer hours per program in the last 3 months.,"CREATE TABLE programs (id INT, program_name VARCHAR(50), hours DECIMAL(10,2)); CREATE TABLE volunteer_hours (id INT, program_id INT, volunteer_hours DECIMAL(10,2), hours_date DATE); ","SELECT p.program_name, SUM(vh.volunteer_hours) AS total_hours FROM programs p INNER JOIN volunteer_hours vh ON p.id = vh.program_id WHERE vh.hours_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH) GROUP BY p.program_name;","SELECT p.program_name, SUM(vh.volunteer_hours) as total_hours FROM programs p JOIN volunteer_hours vh ON p.id = vh.program_id WHERE vh.hours_date >= DATEADD(month, -3, GETDATE()) GROUP BY p.program_name;",0 What circuit has a race called ii cape south easter trophy.,"CREATE TABLE table_1140099_6 (circuit VARCHAR, race_name VARCHAR);","SELECT circuit FROM table_1140099_6 WHERE race_name = ""II Cape South Easter Trophy"";","SELECT circuit FROM table_1140099_6 WHERE race_name = ""II Cape South Easter Trophy"";",1 Who was eliminated from the competition when connacht to the quarter final?,"CREATE TABLE table_28068063_3 (eliminated_from_competition VARCHAR, proceed_to_quarter_final VARCHAR);","SELECT eliminated_from_competition FROM table_28068063_3 WHERE proceed_to_quarter_final = ""Connacht"";","SELECT eliminated_from_competition FROM table_28068063_3 WHERE proceed_to_quarter_final = ""Connacht"";",1 How many VR games are available in the 'Adventure' category?,"CREATE TABLE GameLibrary (GameID INT, GameName VARCHAR(50), GameType VARCHAR(50), Category VARCHAR(50)); ",SELECT COUNT(GameID) FROM GameLibrary WHERE GameType = 'VR' AND Category = 'Adventure';,SELECT COUNT(*) FROM GameLibrary WHERE GameType = 'VR' AND Category = 'Adventure';,0 How many ends were lost by the country whose points for (PF) was 87?,"CREATE TABLE table_1644857_2 (Ends INTEGER, pf VARCHAR);",SELECT MAX(Ends) AS lost FROM table_1644857_2 WHERE pf = 87;,SELECT SUM(Ends) FROM table_1644857_2 WHERE pf = 87;,0 What was the visiting team on october 23?,"CREATE TABLE table_name_10 (visiting_team VARCHAR, date VARCHAR);","SELECT visiting_team FROM table_name_10 WHERE date = ""october 23"";","SELECT visiting_team FROM table_name_10 WHERE date = ""october 23"";",1 What was the name of the album that was a demo release?,"CREATE TABLE table_name_44 (album VARCHAR, release_type VARCHAR);","SELECT album FROM table_name_44 WHERE release_type = ""demo"";","SELECT album FROM table_name_44 WHERE release_type = ""demo"";",1 "Find the three most recent security incidents for each country, and their total impact value.","CREATE TABLE security_incidents (id INT, country VARCHAR(50), incident_time TIMESTAMP, impact_value INT); ","SELECT country, incident_time, impact_value, ROW_NUMBER() OVER (PARTITION BY country ORDER BY incident_time DESC) as rn FROM security_incidents WHERE rn <= 3;","SELECT country, incident_time, SUM(impact_value) as total_impact_value FROM security_incidents GROUP BY country ORDER BY total_impact_value DESC LIMIT 3;",0 What NHL team drafted Rob Palmer?,"CREATE TABLE table_1473672_6 (nhl_team VARCHAR, player VARCHAR);","SELECT nhl_team FROM table_1473672_6 WHERE player = ""Rob Palmer"";","SELECT nhl_team FROM table_1473672_6 WHERE player = ""Rob Palmer"";",1 "What is the daily usage of bike-sharing systems in Seoul, South Korea?","CREATE TABLE bike_sharing_systems (bike_id INT, trip_id INT, trip_start_time TIMESTAMP, trip_end_time TIMESTAMP, start_location TEXT, end_location TEXT, city TEXT, daily_usage INT);",SELECT SUM(daily_usage) FROM bike_sharing_systems WHERE city = 'Seoul';,SELECT daily_usage FROM bike_sharing_systems WHERE city = 'Seoul';,0 "For an aggregate of 1-3, what was the 2nd leg?",CREATE TABLE table_name_74 (agg VARCHAR);,"SELECT 2 AS nd_leg FROM table_name_74 WHERE agg = ""1-3"";","SELECT 2 AS nd_leg FROM table_name_74 WHERE agg = ""1-3"";",1 How many titles/sources have a developer of Clover Studio?,"CREATE TABLE table_26538035_1 (title_and_source VARCHAR, developer VARCHAR);","SELECT COUNT(title_and_source) FROM table_26538035_1 WHERE developer = ""Clover Studio"";","SELECT COUNT(title_and_source) FROM table_26538035_1 WHERE developer = ""Clover Studio"";",1 What is the average number of disaster preparedness drills conducted per state in the past year?,"CREATE TABLE DisasterPreparedness (id INT, state VARCHAR(20), date DATE, drill_type VARCHAR(20), quantity INT);","SELECT AVG(SUM(quantity)) FROM DisasterPreparedness GROUP BY state HAVING date >= DATEADD(year, -1, GETDATE());","SELECT state, AVG(quantity) FROM DisasterPreparedness WHERE date >= DATEADD(year, -1, GETDATE()) GROUP BY state;",0 What is the total number of hours spent on open pedagogy projects by students in each city?,"CREATE TABLE projects (id INT, city TEXT, hours INT, open_pedagogy BOOLEAN);","SELECT city, SUM(hours) FROM projects WHERE open_pedagogy = TRUE GROUP BY city;","SELECT city, SUM(hours) FROM projects WHERE open_pedagogy = true GROUP BY city;",0 "Who was the visitor on december 15, 1976?","CREATE TABLE table_name_94 (visitor VARCHAR, date VARCHAR);","SELECT visitor FROM table_name_94 WHERE date = ""december 15, 1976"";","SELECT visitor FROM table_name_94 WHERE date = ""december 15, 1976"";",1 Show the number of active projects and total budget for 'Education' sector projects in the 'Americas' region as of 2020-12-31.,"CREATE TABLE Projects (project_id INT, project_name VARCHAR(255), sector VARCHAR(255), region VARCHAR(255), start_date DATE, end_date DATE, budget INT); ","SELECT COUNT(project_id) AS active_projects, SUM(budget) AS total_budget FROM Projects WHERE sector = 'Education' AND region = 'Americas' AND end_date >= '2020-12-31';","SELECT COUNT(*), SUM(budget) FROM Projects WHERE sector = 'Education' AND region = 'Americas' AND start_date >= '2020-12-31';",0 Which title has a US release of august 1996?,"CREATE TABLE table_name_56 (title VARCHAR, us_release VARCHAR);","SELECT title FROM table_name_56 WHERE us_release = ""august 1996"";","SELECT title FROM table_name_56 WHERE us_release = ""august 1996"";",1 What is the maximum and minimum budget allocated for ethical AI research by country?,"CREATE TABLE Ethical_AI (country VARCHAR(50), budget INT); ","SELECT country, MAX(budget) as max_budget, MIN(budget) as min_budget FROM Ethical_AI;","SELECT country, MAX(budget) as max_budget, MIN(budget) as min_budget FROM Ethical_AI GROUP BY country;",0 How many volunteers from historically underrepresented communities participated in projects in Q4 2023?,"CREATE TABLE underrepresented_groups (group_id INT, group_name TEXT); CREATE TABLE volunteers (volunteer_id INT, group_id INT, project_id INT, volunteer_date DATE); ",SELECT COUNT(DISTINCT volunteer_id) as num_volunteers FROM volunteers v JOIN underrepresented_groups grp ON v.group_id = grp.group_id WHERE v.volunteer_date BETWEEN '2023-10-01' AND '2023-12-31';,SELECT COUNT(DISTINCT volunteers.volunteer_id) FROM volunteers INNER JOIN underrepresented_groups ON volunteers.group_id = underrepresented_groups.group_id WHERE volunteers.volunteer_date BETWEEN '2023-04-01' AND '2023-06-30';,0 What was the average E score when the T score was less than 4?,"CREATE TABLE table_name_69 (e_score INTEGER, t_score INTEGER);",SELECT AVG(e_score) FROM table_name_69 WHERE t_score < 4;,SELECT AVG(e_score) FROM table_name_69 WHERE t_score 4;,0 How many dates for the week of 4?,"CREATE TABLE table_23916462_3 (date VARCHAR, week VARCHAR);",SELECT COUNT(date) FROM table_23916462_3 WHERE week = 4;,SELECT COUNT(date) FROM table_23916462_3 WHERE week = 4;,1 What is the r (ω/km) when the frequency is 10k?,"CREATE TABLE table_261642_3 (r__ω_km_ VARCHAR, frequency__hz_ VARCHAR);","SELECT r__ω_km_ FROM table_261642_3 WHERE frequency__hz_ = ""10k"";","SELECT r___km_ FROM table_261642_3 WHERE frequency__hz_ = ""10k"";",0 What are the top 3 chemical substances by production volume in the Asia region?,"CREATE TABLE ChemicalSubstances (SubstanceID INT, SubstanceName VARCHAR(50), ProductionVolume INT, Region VARCHAR(50)); ","SELECT SubstanceName, ProductionVolume FROM ChemicalSubstances WHERE Region = 'Asia' ORDER BY ProductionVolume DESC LIMIT 3;","SELECT SubstanceName, ProductionVolume FROM ChemicalSubstances WHERE Region = 'Asia' ORDER BY ProductionVolume DESC LIMIT 3;",1 Which player was the forward?,"CREATE TABLE table_name_7 (player VARCHAR, position VARCHAR);","SELECT player FROM table_name_7 WHERE position = ""forward"";","SELECT player FROM table_name_7 WHERE position = ""forward"";",1 What was the model for PRR class of gf28a freight?,"CREATE TABLE table_name_61 (builder’s_model VARCHAR, service VARCHAR, prr_class VARCHAR);","SELECT builder’s_model FROM table_name_61 WHERE service = ""freight"" AND prr_class = ""gf28a"";","SELECT builder’s_model FROM table_name_61 WHERE service = ""freight"" AND prr_class = ""gf28a"";",1 "What is the Location of the Event on March 30, 2008?","CREATE TABLE table_name_73 (location VARCHAR, date VARCHAR);","SELECT location FROM table_name_73 WHERE date = ""march 30, 2008"";","SELECT location FROM table_name_73 WHERE date = ""march 30, 2008"";",1 How many smart contracts were created by developers in each country?,"CREATE TABLE developers (developer_id INT, name VARCHAR(255), country VARCHAR(255)); CREATE TABLE smart_contracts (contract_id INT, name VARCHAR(255), developer_id INT); ","SELECT d.country, COUNT(*) as num_contracts FROM smart_contracts sc JOIN developers d ON sc.developer_id = d.developer_id GROUP BY d.country;","SELECT d.country, COUNT(sc.contract_id) FROM developers d JOIN smart_contracts sc ON d.developer_id = sc.developer_id GROUP BY d.country;",0 What is the Finish of the Player with a Total of 273?,"CREATE TABLE table_name_20 (finish VARCHAR, total VARCHAR);",SELECT finish FROM table_name_20 WHERE total = 273;,SELECT finish FROM table_name_20 WHERE total = 273;,1 What is the total revenue generated by hotels in the top 2 countries with the highest revenue?,"CREATE TABLE hotel_revenue (hotel_id INT, country TEXT, revenue FLOAT); ","SELECT SUM(revenue) FROM (SELECT country, SUM(revenue) as revenue FROM hotel_revenue GROUP BY country ORDER BY revenue DESC LIMIT 2) as top2;","SELECT country, SUM(revenue) FROM hotel_revenue GROUP BY country ORDER BY SUM(revenue) DESC LIMIT 2;",0 "Find the number of clinical trials conducted in the US and Canada for each drug, sorted alphabetically by drug name.","CREATE TABLE clinical_trials (drug_name VARCHAR(255), trial_country VARCHAR(255)); ","SELECT drug_name, COUNT(*) as trial_count FROM clinical_trials WHERE trial_country IN ('USA', 'Canada') GROUP BY drug_name ORDER BY drug_name;","SELECT drug_name, COUNT(*) as num_trials FROM clinical_trials WHERE trial_country IN ('USA', 'Canada') GROUP BY drug_name ORDER BY num_trials DESC;",0 Which province has muju as the capital?,"CREATE TABLE table_name_82 (province VARCHAR, capital VARCHAR);","SELECT province FROM table_name_82 WHERE capital = ""muju"";","SELECT province FROM table_name_82 WHERE capital = ""muju"";",1 Insert a new digital asset 'BitInvest' with sector 'Investment',"CREATE TABLE digital_assets (asset_id INT, name VARCHAR(20), sector VARCHAR(20));","INSERT INTO digital_assets (name, sector) VALUES ('BitInvest', 'Investment');","INSERT INTO digital_assets (asset_id, name, sector) VALUES (4, 'BitInvest', 'Investment');",0 Update the country for all players who live in 'United States' to 'USA'?,"CREATE TABLE players (id INT, name VARCHAR(100), country VARCHAR(100)); ",UPDATE players SET country = 'USA' WHERE country = 'United States';,UPDATE players SET country = 'USA' WHERE country = 'United States';,1 Find suppliers that deliver to specific regions and their average delivery time.,"CREATE TABLE DeliveryRegions (SupplierID INT, Region VARCHAR(50)); CREATE TABLE DeliveryTimes (DeliveryID INT, SupplierID INT, DeliveryTime INT); ","SELECT DR.SupplierID, DR.Region, AVG(DT.DeliveryTime) as AverageDeliveryTime FROM DeliveryRegions DR INNER JOIN DeliveryTimes DT ON DR.SupplierID = DT.SupplierID WHERE DR.Region IN ('East Coast', 'West Coast') GROUP BY DR.SupplierID, DR.Region;","SELECT dr.Region, AVG(dt.DeliveryTime) as AvgDeliveryTime FROM DeliveryRegions dr JOIN DeliveryTimes dt ON dr.SupplierID = dt.SupplierID GROUP BY dr.Region;",0 Delete all exhibitions from the '19th Century' in the 'European' genre.,"CREATE TABLE Exhibitions (id INT, title VARCHAR(255), genre VARCHAR(255), century VARCHAR(255)); ",DELETE FROM Exhibitions WHERE genre = 'European' AND century = '19th Century';,DELETE FROM Exhibitions WHERE genre = 'European' AND century = '19th Century';,1 Which player has an average of 38.22?,"CREATE TABLE table_name_53 (player VARCHAR, average VARCHAR);",SELECT player FROM table_name_53 WHERE average = 38.22;,"SELECT player FROM table_name_53 WHERE average = ""38.22"";",0 "Show the change in negotiator for each contract negotiation, if any.","CREATE TABLE ContractNegotiations (Id INT, Contract VARCHAR(255), NegotiationDate DATE, Negotiator VARCHAR(255)); ","SELECT Contract, NegotiationDate, Negotiator, LAG(Negotiator, 1) OVER (PARTITION BY Contract ORDER BY NegotiationDate) as PreviousNegotiator FROM ContractNegotiations;","SELECT Contract, Negotiator, Negotiator, RANK() OVER (PARTITION BY Contract ORDER BY NegotiationDate ROWS BETWEEN 1 PRECEDING AND CURRENT ROW) as NegotiationNegotiatorNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiationNegotiation N",0 What is the average revenue per user (ARPU) for the rock genre across all streaming platforms in Q3 2021?,"CREATE TABLE RevenueData (StreamingPlatform TEXT, Genre TEXT, Quarter TEXT(2), Year INTEGER, ARPU FLOAT); ",SELECT AVG(ARPU) as AvgARPU FROM RevenueData WHERE Genre = 'Rock' AND Quarter = 'Q3' AND Year = 2021;,SELECT AVG(ARPU) FROM RevenueData WHERE Genre = 'Rock' AND Quarter = 3 AND Year = 2021;,0 What was the finish of the player who had a total of 282?,"CREATE TABLE table_name_80 (finish VARCHAR, total VARCHAR);",SELECT finish FROM table_name_80 WHERE total = 282;,"SELECT finish FROM table_name_80 WHERE total = ""282"";",0 What is the round when Grand Slam was the Davis Cup?,"CREATE TABLE table_name_92 (round VARCHAR, grand_slam VARCHAR);","SELECT round FROM table_name_92 WHERE grand_slam = ""davis cup"";","SELECT round FROM table_name_92 WHERE grand_slam = ""davis cup"";",1 What support programs were offered in the Asia-Pacific region?,"CREATE TABLE SupportPrograms (Id INT, Name VARCHAR(100), Description TEXT, Region VARCHAR(50)); ",SELECT * FROM SupportPrograms WHERE Region = 'Asia-Pacific';,SELECT Name FROM SupportPrograms WHERE Region = 'Asia-Pacific';,0 What shows for 2011 at the French open?,CREATE TABLE table_name_82 (tournament VARCHAR);,"SELECT 2011 FROM table_name_82 WHERE tournament = ""french open"";","SELECT 2011 FROM table_name_82 WHERE tournament = ""french open"";",1 How many police officers joined the police force in California in Q1 of 2020?,"CREATE TABLE police_officers (id INT, name VARCHAR(255), joined_date DATE, state VARCHAR(255)); ",SELECT COUNT(*) FROM police_officers WHERE state = 'California' AND joined_date >= '2020-01-01' AND joined_date < '2020-04-01';,SELECT COUNT(*) FROM police_officers WHERE joined_date BETWEEN '2020-01-01' AND '2020-03-31' AND state = 'California';,0 What is the score for the November 3 game?,"CREATE TABLE table_name_10 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_10 WHERE date = ""november 3"";","SELECT score FROM table_name_10 WHERE date = ""november 3"";",1 Can you tell me the Season that has the Team 2 of hanoi acb?,"CREATE TABLE table_name_99 (season VARCHAR, team_2 VARCHAR);","SELECT season FROM table_name_99 WHERE team_2 = ""hanoi acb"";","SELECT season FROM table_name_99 WHERE team_2 = ""hanoi acb"";",1 At what venue was there a competition with a score reported as 7.14 (56) - 4.5 (29)?,"CREATE TABLE table_name_89 (venue VARCHAR, score VARCHAR);","SELECT venue FROM table_name_89 WHERE score = ""7.14 (56) - 4.5 (29)"";","SELECT venue FROM table_name_89 WHERE score = ""7.14 (56) - 4.5 (29)"";",1 WHAT IS THE HOME TEAM WITH A TIE OF 14?,"CREATE TABLE table_name_21 (home_team VARCHAR, tie_no VARCHAR);","SELECT home_team FROM table_name_21 WHERE tie_no = ""14"";","SELECT home_team FROM table_name_21 WHERE tie_no = ""14"";",1 what is the part number that has a turbo of low power?,"CREATE TABLE table_name_85 (part_number_s_ VARCHAR, turbo VARCHAR);","SELECT part_number_s_ FROM table_name_85 WHERE turbo = ""low power"";","SELECT part_number_s_ FROM table_name_85 WHERE turbo = ""low power"";",1 What is Richmond's away team score versus Geelong?,CREATE TABLE table_name_96 (away_team VARCHAR);,"SELECT away_team AS score FROM table_name_96 WHERE away_team = ""richmond"";","SELECT away_team AS score FROM table_name_96 WHERE away_team = ""geelong"";",0 What is the college/junior/club team (league) of the player who was pick number 130?,"CREATE TABLE table_14209245_9 (college_junior_club_team__league_ VARCHAR, pick__number VARCHAR);","SELECT college_junior_club_team__league_ FROM table_14209245_9 WHERE pick__number = ""130"";",SELECT college_junior_club_team__league_ FROM table_14209245_9 WHERE pick__number = 130;,0 Remove the menu item with id 1 from the menu table,"CREATE TABLE Menu (id INT PRIMARY KEY, name VARCHAR(255), category VARCHAR(255), price DECIMAL(5,2));",DELETE FROM Menu WHERE id = 1;,DELETE FROM Menu WHERE id = 1;,1 How many hospitals are there in Berlin and Rome?,"CREATE TABLE Hospitals (City VARCHAR(20), Number INT); ","SELECT SUM(Number) FROM Hospitals WHERE City IN ('Berlin', 'Rome');","SELECT SUM(Number) FROM Hospitals WHERE City IN ('Berlin', 'Rome');",1 Which smart city districts have no carbon offset initiatives?,"CREATE TABLE Carbon_Offset_Initiatives (id INT, initiative_name VARCHAR(50), district VARCHAR(50)); ",SELECT district FROM Carbon_Offset_Initiatives WHERE district IS NULL;,SELECT district FROM Carbon_Offset_Initiatives WHERE initiative_name IS NULL;,0 What is the Label of the Release with Catalog number 2508668?,"CREATE TABLE table_name_51 (label VARCHAR, catalog VARCHAR);","SELECT label FROM table_name_51 WHERE catalog = ""2508668"";","SELECT label FROM table_name_51 WHERE catalog = ""2508668"";",1 What is the average size (cents) with an interval of major third and size (steps) more than 5,"CREATE TABLE table_name_33 (size__cents_ INTEGER, interval_name VARCHAR, size__steps_ VARCHAR);","SELECT AVG(size__cents_) FROM table_name_33 WHERE interval_name = ""major third"" AND size__steps_ > 5;","SELECT AVG(size__cents_) FROM table_name_33 WHERE interval_name = ""major third"" AND size__steps_ > 5;",1 What is the difference in the average income of citizens in 'CityY' and 'CityZ' in 2021?,"CREATE TABLE CityY_Income (ID INT, Year INT, Income FLOAT); CREATE TABLE CityZ_Income (ID INT, Year INT, Income FLOAT); ","SELECT AVG(CityY_Income.Income) - AVG(CityZ_Income.Income) FROM CityY_Income, CityZ_Income WHERE CityY_Income.Year = 2021 AND CityZ_Income.Year = 2021;",SELECT AVG(CityY_Income.Income) - AVG(CityZ_Income.Income) FROM CityY_Income INNER JOIN CityZ_Income ON CityY_Income.ID = CityZ_Income.ID WHERE CityY_Income.Year = 2021;,0 "What is the total number of hours of legal representation, by lawyer's years of experience, in the past month?","CREATE TABLE legal_representation (id INT, lawyer VARCHAR(50), hours_worked INT, representation_date DATE); CREATE TABLE lawyers (id INT, years_of_experience INT, lawyer VARCHAR(50));","SELECT l.years_of_experience, SUM(hours_worked) FROM legal_representation r JOIN lawyers l ON r.lawyer = l.lawyer WHERE representation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY l.years_of_experience;","SELECT lawyers.years_of_experience, SUM(legal_representation.hours_worked) as total_hours_worked FROM legal_representation INNER JOIN lawyers ON legal_representation.lawyer = lawyers.lawyer WHERE legal_representation.representation_date >= DATEADD(month, -1, GETDATE()) GROUP BY lawyers.years_of_experience;",0 How many average wins does bruce fleisher have?,"CREATE TABLE table_name_40 (wins INTEGER, player VARCHAR);","SELECT AVG(wins) FROM table_name_40 WHERE player = ""bruce fleisher"";","SELECT AVG(wins) FROM table_name_40 WHERE player = ""bruce fleisher"";",1 Which is the lowest crop total with New South Wales at 42 kilotonnes and Victorian at less than 68 kilotonnes?,"CREATE TABLE table_name_26 (total INTEGER, new_south_wales VARCHAR, victoria VARCHAR);",SELECT MIN(total) FROM table_name_26 WHERE new_south_wales = 42 AND victoria < 68;,SELECT MIN(total) FROM table_name_26 WHERE new_south_wales = 42 AND victoria 68;,0 Show the number of ethical labor practice violations by manufacturer.,"CREATE TABLE manufacturers(manufacturer_id INT, num_violations INT);","SELECT manufacturer_id, num_violations FROM manufacturers ORDER BY num_violations DESC;","SELECT manufacturer_id, SUM(num_violations) FROM manufacturers GROUP BY manufacturer_id;",0 "What is the total number of volunteer hours for each program in the last 3 months, and which program has the highest total number of volunteer hours?","CREATE TABLE Volunteers (VolunteerID INT, VolunteerName VARCHAR(255), ProgramID INT); CREATE TABLE Programs (ProgramID INT, ProgramName VARCHAR(255)); CREATE TABLE VolunteerHours (VolunteerHourID INT, VolunteerID INT, Hours DECIMAL(10, 2), HourDate DATE);","SELECT ProgramName, SUM(Hours) AS TotalHours, RANK() OVER (ORDER BY SUM(Hours) DESC) AS ProgramRank FROM Volunteers JOIN Programs ON Volunteers.ProgramID = Programs.ProgramID JOIN VolunteerHours ON Volunteers.VolunteerID = VolunteerHours.VolunteerID WHERE HourDate >= DATEADD(MONTH, -3, CURRENT_DATE) GROUP BY ProgramName;","SELECT Programs.ProgramName, SUM(VolunteerHours.Hours) as TotalHours FROM VolunteerHours INNER JOIN Volunteers ON VolunteerHours.VolunteerID = Volunteers.VolunteerID INNER JOIN Programs ON VolunteerHours.ProgramID = Programs.ProgramID WHERE HourDate >= DATEADD(month, -3, GETDATE()) GROUP BY Programs.ProgramName;",0 What is the overall record of Indian River?,"CREATE TABLE table_name_17 (overall_record VARCHAR, school VARCHAR);","SELECT overall_record FROM table_name_17 WHERE school = ""indian river"";","SELECT overall_record FROM table_name_17 WHERE school = ""indigenous river"";",0 Which countries had the most failed login attempts in the past month?,"CREATE TABLE country_login_attempts (id INT, country TEXT, user TEXT, timestamp TIMESTAMP); ","SELECT country, COUNT(*) AS login_attempts_count FROM country_login_attempts WHERE timestamp >= NOW() - INTERVAL '1 month' GROUP BY country ORDER BY login_attempts_count DESC;","SELECT country, COUNT(*) FROM country_login_attempts WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1;",0 When salt of this sea is the english title who is the director?,"CREATE TABLE table_26555737_1 (director VARCHAR, english_title VARCHAR);","SELECT director FROM table_26555737_1 WHERE english_title = ""Salt of this Sea"";","SELECT director FROM table_26555737_1 WHERE english_title = ""Salt of this Sea"";",1 What is the date of the game being played at Schaeffer Stadium?,"CREATE TABLE table_name_52 (date VARCHAR, game_site VARCHAR);","SELECT date FROM table_name_52 WHERE game_site = ""schaeffer stadium"";","SELECT date FROM table_name_52 WHERE game_site = ""schaeffer stadium"";",1 What is the total number of artworks donated by artists from India?,"CREATE TABLE Donations (id INT, donor_id INT, country VARCHAR(20), artworks_donated INT); ",SELECT SUM(artworks_donated) FROM Donations WHERE country = 'India';,SELECT SUM(artworks_donated) FROM Donations WHERE country = 'India';,1 Insert new data for a farmer and their crops in Australia,"CREATE TABLE Farmers (id INT PRIMARY KEY, name VARCHAR(255), age INT, gender VARCHAR(10), location VARCHAR(255), farmer_id INT); CREATE TABLE Crops (id INT PRIMARY KEY, type VARCHAR(255), acres FLOAT, farmer_id INT, FOREIGN KEY (farmer_id) REFERENCES Farmers(farmer_id));","INSERT INTO Crops (id, type, acres, farmer_id) VALUES (6, 'cotton', 25.3, 4); INSERT INTO Farmers (id, name, age, gender, location, farmer_id) VALUES (4, 'James Smith', 45, 'Male', 'Australia', 6);","INSERT INTO Farmers (id, name, age, gender, location, farmer_id, Crops.acres) VALUES ('Farmer', 'Australia', 'Farmer', 'Gender', 'Australia', 'Farmer'); INSERT INTO Crops (id, Crops.acres, farmer_id, Farmers.farmer_id, Farmers.farmer_id) VALUES ('Farmer', 'Australia', 'Australia', 'Australia', 'Australia');",0 What is the distance of the maldegem > brussels route?,"CREATE TABLE table_name_71 (distance VARCHAR, route VARCHAR);","SELECT distance FROM table_name_71 WHERE route = ""maldegem > brussels"";","SELECT distance FROM table_name_71 WHERE route = ""maldegem > brussels"";",1 "Which Seasons have a Poles larger than 29, and Entries larger than 191?","CREATE TABLE table_name_66 (seasons VARCHAR, poles VARCHAR, entries VARCHAR);",SELECT seasons FROM table_name_66 WHERE poles > 29 AND entries > 191;,SELECT seasons FROM table_name_66 WHERE poles > 29 AND entries > 191;,1 "What is the total donation amount per program, ordered by the total donation amount in descending order?","CREATE TABLE donors_ext (id INT, name VARCHAR(50), donation_amount DECIMAL(10,2), donation_date DATE, program VARCHAR(50)); ","SELECT program, SUM(donation_amount) AS total_donation, ROW_NUMBER() OVER (ORDER BY SUM(donation_amount) DESC) AS donation_rank FROM donors_ext GROUP BY program ORDER BY donation_rank;","SELECT program, SUM(donation_amount) as total_donation FROM donors_ext GROUP BY program ORDER BY total_donation DESC;",0 Who had the highest points of the game on May 27?,"CREATE TABLE table_name_26 (high_points VARCHAR, date VARCHAR);","SELECT high_points FROM table_name_26 WHERE date = ""may 27"";","SELECT high_points FROM table_name_26 WHERE date = ""may 27"";",1 Who is the incumbent for the Colorado 4 district?,"CREATE TABLE table_name_95 (incumbent VARCHAR, district VARCHAR);","SELECT incumbent FROM table_name_95 WHERE district = ""colorado 4"";","SELECT incumbent FROM table_name_95 WHERE district = ""colorado 4"";",1 Name the number for db,"CREATE TABLE table_20649850_1 (pick__number VARCHAR, position VARCHAR);","SELECT COUNT(pick__number) FROM table_20649850_1 WHERE position = ""DB"";","SELECT pick__number FROM table_20649850_1 WHERE position = ""DB"";",0 Name the successor for north carolina 13th,"CREATE TABLE table_225204_4 (successor VARCHAR, district VARCHAR);","SELECT successor FROM table_225204_4 WHERE district = ""North Carolina 13th"";","SELECT successor FROM table_225204_4 WHERE district = ""North Carolina 13th"";",1 What is the largest number of gold medals for Canada with more than 7 bronze medals?,"CREATE TABLE table_name_31 (gold INTEGER, nation VARCHAR, bronze VARCHAR);","SELECT MAX(gold) FROM table_name_31 WHERE nation = ""canada"" AND bronze > 7;","SELECT MAX(gold) FROM table_name_31 WHERE nation = ""canada"" AND bronze > 7;",1 What is the total data usage for the month?,"CREATE TABLE data_usage (usage_id INT, data_usage INT, usage_date DATE);",SELECT SUM(data_usage) FROM data_usage WHERE usage_date BETWEEN '2022-01-01' AND '2022-01-31';,"SELECT SUM(data_usage) FROM data_usage WHERE usage_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) AND CURRENT_DATE;",0 What was the score of the game on 19/3/00?,"CREATE TABLE table_name_60 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_60 WHERE date = ""19/3/00"";","SELECT score FROM table_name_60 WHERE date = ""19/3/00"";",1 What is the total claim amount for each policyholder living in New York?,"CREATE TABLE Policyholders (ID INT, ClaimAmount DECIMAL(10, 2), State VARCHAR(50)); ","SELECT State, SUM(ClaimAmount) FROM Policyholders WHERE State = 'New York' GROUP BY State;","SELECT State, SUM(ClaimAmount) FROM Policyholders WHERE State = 'New York' GROUP BY State;",1 What is the representation percentage of each gender and minority group per company?,"CREATE TABLE Company (id INT, name VARCHAR(50), industry VARCHAR(50), founding_year INT); CREATE TABLE Diversity (id INT, company_id INT, gender VARCHAR(10), minority VARCHAR(50), percentage_representation DECIMAL(4,2)); ","SELECT company_id, gender, minority, SUM(percentage_representation) as total_percentage FROM Diversity GROUP BY company_id, gender, minority;","SELECT c.name, d.gender, d.minority, d.percentage_representation FROM Company c JOIN Diversity d ON c.id = d.company_id GROUP BY c.name, d.gender, d.minority;",0 What is the total number of maintenance requests submitted by each unit in the Pacific region in the past month?,"CREATE TABLE maintenance_requests (request_id INT, request_date DATE, request_type VARCHAR(255), unit VARCHAR(255), region VARCHAR(255)); ","SELECT unit, COUNT(*) as total_requests FROM maintenance_requests WHERE request_date >= DATEADD(month, -1, GETDATE()) AND region = 'Pacific' GROUP BY unit;","SELECT unit, COUNT(*) FROM maintenance_requests WHERE request_date >= DATEADD(month, -1, GETDATE()) AND region = 'Pacific' GROUP BY unit;",0 Find the difference in budget allocated for education between 'California' and 'New York'.,"CREATE TABLE budget (state VARCHAR(20), service VARCHAR(20), amount INT); ",SELECT b1.amount - b2.amount FROM budget b1 JOIN budget b2 ON b1.service = b2.service WHERE b1.state = 'California' AND b2.state = 'New York' AND b1.service = 'Education';,SELECT DIFF(amount) FROM budget WHERE state = 'California' AND service = 'Education';,0 How many years have HMOs been 27% and POS plans 18%?,"CREATE TABLE table_name_54 (year VARCHAR, hmos VARCHAR, pos_plans VARCHAR);","SELECT COUNT(year) FROM table_name_54 WHERE hmos = ""27%"" AND pos_plans = ""18%"";","SELECT COUNT(year) FROM table_name_54 WHERE hmos = ""27%"" AND pos_plans = ""18%"";",1 "Can you tell me the highest Total votes that has the % of popular vote of 0.86%, and the # of seats won larger than 0?","CREATE TABLE table_name_48 (total_votes INTEGER, _percentage_of_popular_vote VARCHAR, _number_of_seats_won VARCHAR);","SELECT MAX(total_votes) FROM table_name_48 WHERE _percentage_of_popular_vote = ""0.86%"" AND _number_of_seats_won > 0;","SELECT MAX(total_votes) FROM table_name_48 WHERE _percentage_of_popular_vote = ""0.86%"" AND _number_of_seats_won > 0;",1 What are the vehicle types and their quantities in the 'fleet' schema?,"CREATE SCHEMA fleet; CREATE TABLE fleet.vehicles (id INT PRIMARY KEY, type VARCHAR(255), year INT); ","SELECT type, COUNT(*) as quantity FROM fleet.vehicles GROUP BY type;","SELECT type, COUNT(*) FROM fleet.vehicles GROUP BY type;",0 Which school had a player who played the C position?,"CREATE TABLE table_name_64 (school VARCHAR, position VARCHAR);","SELECT school FROM table_name_64 WHERE position = ""c"";","SELECT school FROM table_name_64 WHERE position = ""c"";",1 What were GD Mcgrath's bowling figures?,"CREATE TABLE table_name_42 (bowling_figures_wickets_runs__overs_ VARCHAR, bowler VARCHAR);","SELECT bowling_figures_wickets_runs__overs_ FROM table_name_42 WHERE bowler = ""gd mcgrath"";","SELECT bowling_figures_wickets_runs__overs_ FROM table_name_42 WHERE bowler = ""gd mcgrath"";",1 Which mascot has an IHSAA Class and Football class of 2A/2A?,"CREATE TABLE table_name_80 (mascot VARCHAR, ihsaa_class___football_class VARCHAR);","SELECT mascot FROM table_name_80 WHERE ihsaa_class___football_class = ""2a/2a"";","SELECT mascot FROM table_name_80 WHERE ihsaa_class___football_class = ""2a/2a"";",1 Which Race has the Toyota Racing Series New Zealand and 0 wins?,"CREATE TABLE table_name_99 (races VARCHAR, series VARCHAR, wins VARCHAR);","SELECT races FROM table_name_99 WHERE series = ""toyota racing series new zealand"" AND wins = ""0"";","SELECT races FROM table_name_99 WHERE series = ""toyota racing series new zealand"" AND wins = ""0"";",1 "Count the number of unique users who have played each game, grouped by their platform.","CREATE TABLE games (id INT, game_name VARCHAR(255), release_date DATE, platform VARCHAR(255)); ","SELECT platform, COUNT(DISTINCT user_id) FROM user_actions JOIN games ON user_actions.game_id = games.id GROUP BY platform;","SELECT platform, COUNT(DISTINCT user_id) as unique_users FROM games GROUP BY platform;",0 Add a new 'game' record for 'New York Red' vs 'Chicago Blues',"CREATE TABLE games (id INT PRIMARY KEY, home_team VARCHAR(50), away_team VARCHAR(50), score INT, date DATE);","INSERT INTO games (id, home_team, away_team, score, date) VALUES (789, 'New York Red', 'Chicago Blues', NULL, '2023-04-15');","INSERT INTO games (id, home_team, away_team, score, date) VALUES (1, 'New York Red', 'Chicago Blues', '2022-01-01');",0 "The score in the final is 2–6, 6–2, 6–0, on what surface?","CREATE TABLE table_26202847_6 (surface VARCHAR, score_in_the_final VARCHAR);","SELECT surface FROM table_26202847_6 WHERE score_in_the_final = ""2–6, 6–2, 6–0"";","SELECT surface FROM table_26202847_6 WHERE score_in_the_final = ""2–6, 6–2, 6–0"";",1 What was the attendance of the Florida vs. Montreal game?,"CREATE TABLE table_name_46 (attendance INTEGER, home VARCHAR, visitor VARCHAR);","SELECT AVG(attendance) FROM table_name_46 WHERE home = ""florida"" AND visitor = ""montreal"";","SELECT AVG(attendance) FROM table_name_46 WHERE home = ""florida"" AND visitor = ""montreal"";",1 How many years of introduction does the Neal Submachine Gun have?,"CREATE TABLE table_29474407_11 (year_of_intro VARCHAR, name__designation VARCHAR);","SELECT COUNT(year_of_intro) FROM table_29474407_11 WHERE name__designation = ""Neal submachine gun"";","SELECT COUNT(year_of_intro) FROM table_29474407_11 WHERE name__designation = ""Neal Submachine Gun"";",0 What is the minimum efficiency for each farm with more than 1 record using 'Smart Sprinkler' irrigation system model?,"CREATE TABLE Irrigation_Systems (id INT, farm_id INT, model VARCHAR(50), efficiency FLOAT); ","SELECT model, MIN(efficiency) FROM Irrigation_Systems WHERE model = 'Smart Sprinkler' GROUP BY model HAVING COUNT(*) > 1;","SELECT farm_id, MIN(efficiency) FROM Irrigation_Systems WHERE model = 'Smart Sprinkler' GROUP BY farm_id HAVING COUNT(*) > 1;",0 On what circuit was the City of Ipswich 400 race held?,"CREATE TABLE table_14016079_1 (circuit VARCHAR, race_title VARCHAR);","SELECT circuit FROM table_14016079_1 WHERE race_title = ""City of Ipswich 400"";","SELECT circuit FROM table_14016079_1 WHERE race_title = ""City of Ipswich 400"";",1 On what position number is the club with a w-l-d of 5-7-4?,"CREATE TABLE table_13713206_1 (club__city_town_ VARCHAR, w_l_d VARCHAR);","SELECT COUNT(club__city_town_) FROM table_13713206_1 WHERE w_l_d = ""5-7-4"";","SELECT club__city_town_ FROM table_13713206_1 WHERE w_l_d = ""5-7-4"";",0 What was the result for Paris(48-byes) for 3 seed?,"CREATE TABLE table_20711545_1 (paris__48___byes_ VARCHAR, seed VARCHAR);",SELECT paris__48___byes_ FROM table_20711545_1 WHERE seed = 3;,SELECT paris__48___byes_ FROM table_20711545_1 WHERE seed = 3;,1 Which Championship was louise suggs the runner-up by 3 strokes?,"CREATE TABLE table_name_8 (championship VARCHAR, runner_s__up VARCHAR, margin VARCHAR);","SELECT championship FROM table_name_8 WHERE runner_s__up = ""louise suggs"" AND margin = ""3 strokes"";","SELECT championship FROM table_name_8 WHERE runner_s__up = ""louise suggs"" AND margin = ""3 strokes"";",1 What was the points with 7 races?,"CREATE TABLE table_name_34 (points VARCHAR, races VARCHAR);","SELECT points FROM table_name_34 WHERE races = ""7"";",SELECT points FROM table_name_34 WHERE races = 7;,0 Which championship has a margin of 8 strokes?,"CREATE TABLE table_name_89 (championship VARCHAR, margin VARCHAR);","SELECT championship FROM table_name_89 WHERE margin = ""8 strokes"";","SELECT championship FROM table_name_89 WHERE margin = ""8 strokes"";",1 Which community engagement programs have a budget greater than the average budget for all programs in 'Europe'?,"CREATE TABLE community_programs (id INT, name VARCHAR(50), budget INT, location VARCHAR(50)); ","SELECT name, budget FROM community_programs WHERE budget > (SELECT AVG(budget) FROM community_programs WHERE location = 'Europe') AND location = 'Europe';",SELECT name FROM community_programs WHERE budget > (SELECT AVG(budget) FROM community_programs WHERE location = 'Europe');,0 "What Opponent has a Site of razorback stadium • fayetteville, ar, and a Date of october 7, 1967?","CREATE TABLE table_name_29 (opponent VARCHAR, site VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_29 WHERE site = ""razorback stadium • fayetteville, ar"" AND date = ""october 7, 1967"";","SELECT opponent FROM table_name_29 WHERE site = ""raskback stadium • fayetteville, ar"" AND date = ""october 7, 1967"";",0 Find the total biomass of fish in the sustainable_seafood_trends_2 table for each fishing_method.,"CREATE TABLE sustainable_seafood_trends_2 (fishing_method VARCHAR(255), biomass FLOAT); ","SELECT fishing_method, SUM(biomass) FROM sustainable_seafood_trends_2 GROUP BY fishing_method;","SELECT fishing_method, SUM(biomass) FROM sustainable_seafood_trends_2 GROUP BY fishing_method;",1 Show the number of electric and autonomous vehicles sold in each region in 2019,"CREATE TABLE region_sales (id INT, region VARCHAR(20), vehicle_type VARCHAR(20), year INT, quantity INT); ","SELECT region, year, SUM(quantity) FROM region_sales WHERE vehicle_type IN ('ev', 'autonomous') AND year = 2019 GROUP BY region, year;","SELECT region, vehicle_type, SUM(quantity) FROM region_sales WHERE vehicle_type IN ('Electric', 'Autonomous') AND year = 2019 GROUP BY region, vehicle_type;",0 What is the average population for indigenous communities in the Arctic and the Antarctic?,"CREATE TABLE indigenous_communities ( id INT PRIMARY KEY, name VARCHAR(255), population INT, region VARCHAR(255), language VARCHAR(255)); ","SELECT AVG(population) FROM indigenous_communities WHERE region IN ('Arctic', 'Antarctic');","SELECT AVG(population) FROM indigenous_communities WHERE region IN ('Arctic', 'Antarctic');",1 "What is the total cost of construction materials in the Midwest, partitioned by month?","CREATE TABLE Midwest_Materials (location VARCHAR(20), material VARCHAR(30), cost FLOAT, order_date DATE); ","SELECT location, material, SUM(cost) OVER (PARTITION BY EXTRACT(MONTH FROM order_date)) as total_cost FROM Midwest_Materials;","SELECT DATE_FORMAT(order_date, '%Y-%m') AS month, SUM(cost) AS total_cost FROM Midwest_Materials GROUP BY month;",0 Who was the rider when Fri 28 Aug was 24' 23.36 92.820mph?,"CREATE TABLE table_23465864_6 (rider VARCHAR, fri_28_aug VARCHAR);","SELECT rider FROM table_23465864_6 WHERE fri_28_aug = ""24' 23.36 92.820mph"";","SELECT rider FROM table_23465864_6 WHERE fri_28_aug = ""24' 23.36 92.820mph"";",1 Who is the current champion in the NECW Heavyweight Championship?,"CREATE TABLE table_name_44 (current_champion_s_ VARCHAR, championship VARCHAR);","SELECT current_champion_s_ FROM table_name_44 WHERE championship = ""necw heavyweight champion"";","SELECT current_champion_s_ FROM table_name_44 WHERE championship = ""necw heavyweight"";",0 What is the average income in urban areas of Canada in 2020?,"CREATE TABLE urban_areas (id INT, name VARCHAR(50), is_urban BOOLEAN, country VARCHAR(50), income FLOAT, year INT); ",SELECT AVG(income) FROM urban_areas WHERE is_urban = true AND country = 'Canada' AND year = 2020;,SELECT AVG(income) FROM urban_areas WHERE country = 'Canada' AND is_urban = true AND year = 2020;,0 "What are the commissioned for scotts, greenock and chieftain?","CREATE TABLE table_1206583_2 (commissioned VARCHAR, builder VARCHAR, name VARCHAR);","SELECT commissioned FROM table_1206583_2 WHERE builder = ""Scotts, Greenock"" AND name = ""Chieftain"";","SELECT commissioned FROM table_1206583_2 WHERE builder = ""Scotts, Greenock and Chieftain"";",0 what is the title of the episode with the production code of ad1a22?,"CREATE TABLE table_name_1 (title VARCHAR, production_code VARCHAR);","SELECT title FROM table_name_1 WHERE production_code = ""ad1a22"";","SELECT title FROM table_name_1 WHERE production_code = ""ad1a22"";",1 What is the count of products with ethical labor practices?,"CREATE TABLE products (product_id INT, has_ethical_labor BOOLEAN); ",SELECT COUNT(*) FROM products WHERE has_ethical_labor = true;,SELECT COUNT(*) FROM products WHERE has_ethical_labor = true;,1 "What is Syracuse, when Buffalo is Oatka Creek Shale, and when Albany is Berne?","CREATE TABLE table_name_90 (syracuse VARCHAR, buffalo VARCHAR, albany VARCHAR);","SELECT syracuse FROM table_name_90 WHERE buffalo = ""oatka creek shale"" AND albany = ""berne"";","SELECT Syracuse FROM table_name_90 WHERE buffalo = ""oatka creek shale"" AND albany = ""berne"";",0 How many security incidents were reported in the financial services sector in Europe in 2020?,"CREATE TABLE security_incidents (id INT, sector VARCHAR(255), incident_type VARCHAR(255), incident_count INT, occurrence_date DATE); ",SELECT SUM(incident_count) AS total_incidents FROM security_incidents WHERE sector = 'Financial Services' AND occurrence_date >= '2020-01-01' AND occurrence_date < '2021-01-01' AND region = 'Europe';,SELECT SUM(incident_count) FROM security_incidents WHERE sector = 'Financial Services' AND YEAR(occurrence_date) = 2020;,0 What is the average waste generation metric for all regions in 2019?,"CREATE TABLE waste_generation ( id INT PRIMARY KEY, region VARCHAR(50), year INT, metric DECIMAL(5,2)); ",SELECT AVG(metric) FROM waste_generation WHERE year = 2019 GROUP BY region;,SELECT AVG(metric) FROM waste_generation WHERE year = 2019;,0 "Delete all records from the ""bookings"" table where the ""checkout_date"" is earlier than the ""checkin_date""","CREATE TABLE bookings (booking_id INT, hotel_id INT, guest_name VARCHAR(50), checkin_date DATE, checkout_date DATE, price DECIMAL(10,2));",DELETE FROM bookings WHERE checkout_date < checkin_date;,DELETE FROM bookings WHERE checkin_date (SELECT MIN(checkout_date) FROM bookings);,0 "At the venue Vfl Park, what was the Home team score?","CREATE TABLE table_name_5 (home_team VARCHAR, venue VARCHAR);","SELECT home_team AS score FROM table_name_5 WHERE venue = ""vfl park"";","SELECT home_team AS score FROM table_name_5 WHERE venue = ""vfl park"";",1 How many matches has each cricket team played this season and what is their win-loss ratio?,"CREATE TABLE cricket_teams (team_id INT, team_name VARCHAR(255)); CREATE TABLE cricket_matches (match_id INT, team1 INT, team2 INT, result VARCHAR(10)); ","SELECT ct.team_name, COUNT(cm.match_id) as matches_played, SUM(CASE WHEN cm.result = 'Won' THEN 1 ELSE 0 END) as wins, SUM(CASE WHEN cm.result = 'Lost' THEN 1 ELSE 0 END) as losses, SUM(CASE WHEN cm.result = 'Won' THEN 1 ELSE 0 END)/COUNT(cm.match_id) as win_loss_ratio FROM cricket_teams ct INNER JOIN cricket_matches cm ON ct.team_id = cm.team1 OR ct.team_id = cm.team2 GROUP BY ct.team_name;","SELECT ct.team_name, COUNT(cm.match_id) AS match_count, SUM(cm.match_id) AS win_loss_ratio FROM cricket_teams ct JOIN cricket_matches cm ON ct.team_id = cm.team_id GROUP BY ct.team_name;",0 Find the average size of space debris in each location.,"CREATE TABLE space_debris (id INT, name VARCHAR(255), source_type VARCHAR(255), location VARCHAR(255), size FLOAT); ","SELECT location, AVG(size) as avg_size FROM space_debris GROUP BY location;","SELECT location, AVG(size) FROM space_debris GROUP BY location;",0 What is the total number of employees for companies founded by underrepresented minorities in the tech sector?,"CREATE TABLE companies (id INT, name TEXT, industry TEXT, employees INT, founding_date DATE, founder_minority TEXT);","SELECT SUM(employees) FROM companies WHERE industry = 'Tech' AND founder_minority IN ('African American', 'Hispanic', 'Native American');",SELECT SUM(employees) FROM companies WHERE industry = 'Tech' AND founder_minority = 'Underrepresented Minority';,0 Who directed the episode that had 3.55 million viewers?,"CREATE TABLE table_29897962_1 (directed_by VARCHAR, us_viewers__million_ VARCHAR);","SELECT directed_by FROM table_29897962_1 WHERE us_viewers__million_ = ""3.55"";","SELECT directed_by FROM table_29897962_1 WHERE us_viewers__million_ = ""3.55"";",1 What are the names of all intelligence agencies in the Middle East?,"CREATE TABLE Agency (Name VARCHAR(50), Region VARCHAR(50)); ",SELECT Name FROM Agency WHERE Region = 'Middle East';,SELECT Name FROM Agency WHERE Region = 'Middle East';,1 Calculate the running total of donations for each donor in descending order of donation date.,"CREATE TABLE Donations (DonationID int, DonorID int, DonationAmount money, DonationDate date);","SELECT DonorID, SUM(DonationAmount) OVER (PARTITION BY DonorID ORDER BY DonationDate DESC) as RunningTotal FROM Donations;","SELECT DonorID, SUM(DonationAmount) as RunningSum(DonationAmount) as TotalDonations FROM Donations GROUP BY DonorID ORDER BY DonationDate DESC;",0 What is the average number of tries of player israel folau?,"CREATE TABLE table_name_25 (tries INTEGER, player VARCHAR);","SELECT AVG(tries) FROM table_name_25 WHERE player = ""israel folau"";","SELECT AVG(tries) FROM table_name_25 WHERE player = ""israel folau"";",1 What is the total number of cases handled by attorneys from underrepresented communities?,"CREATE TABLE Attorneys (AttorneyID INT PRIMARY KEY, Name VARCHAR(255), Community VARCHAR(255)); ","SELECT COUNT(*) FROM Attorneys WHERE Community IN ('Latinx', 'Asian', 'African American');","SELECT COUNT(*) FROM Attorneys WHERE Community IN ('Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic'",0 How many total funding sources supported the Dance Program in 2023?,"CREATE TABLE Funding (id INT PRIMARY KEY, program VARCHAR(20), source VARCHAR(20), year INT); ",SELECT COUNT(DISTINCT source) FROM Funding WHERE program = 'Dance Program' AND year = 2023;,SELECT COUNT(*) FROM Funding WHERE program = 'Dance' AND year = 2023;,0 Identify the garment styles and corresponding prices that follow the trend of bold colors.,"CREATE TABLE trends (id INT PRIMARY KEY, season VARCHAR(100), color VARCHAR(100), popularity INT); CREATE TABLE garments (id INT PRIMARY KEY, trend_id INT, style VARCHAR(100), price DECIMAL(10,2)); ","SELECT g.style, g.price FROM garments g INNER JOIN trends t ON g.trend_id = t.id WHERE t.color = 'Bold';","SELECT g.style, g.price FROM garments g JOIN trends t ON g.trend_id = t.id WHERE t.color = 'Bright';",0 What is the label with the LP format?,"CREATE TABLE table_name_86 (label VARCHAR, format VARCHAR);","SELECT label FROM table_name_86 WHERE format = ""lp"";","SELECT label FROM table_name_86 WHERE format = ""lp"";",1 What is the total water consumption in the residential sector in Florida in 2019 and 2020?,"CREATE TABLE residential_water_usage (state VARCHAR(20), year INT, usage FLOAT); ","SELECT state, SUM(usage) FROM residential_water_usage WHERE state = 'Florida' AND year IN (2019, 2020) GROUP BY state;","SELECT SUM(usage) FROM residential_water_usage WHERE state = 'Florida' AND year IN (2019, 2020);",0 "Update the assets value of the customer 'Jane Smith' to $800,000.00.","CREATE TABLE customers (id INT, name VARCHAR(100), assets_value FLOAT); ",UPDATE customers SET assets_value = 800000.00 WHERE name = 'Jane Smith';,"UPDATE customers SET assets_value = 800,000 WHERE name = 'Jane Smith';",0 "Insert a new record into the fair_trade table with the following information: 'Cooperative E', 'Africa', 'Yes'","CREATE TABLE fair_trade (id INT PRIMARY KEY, cooperative VARCHAR(255), region VARCHAR(255), certified VARCHAR(5));","INSERT INTO fair_trade (cooperative, region, certified) VALUES ('Cooperative E', 'Africa', 'Yes');","INSERT INTO fair_trade (cooperative, region, certified) VALUES ('Cooperative E', 'Africa', 'Yes');",1 How many deep-sea expeditions have been conducted in the Southern Ocean since 2010?,"CREATE TABLE deep_sea_expeditions (id INT, expedition_name VARCHAR(255), year INT, region VARCHAR(255)); ",SELECT COUNT(*) FROM deep_sea_expeditions WHERE region = 'Southern Ocean' AND year >= 2010;,SELECT COUNT(*) FROM deep_sea_expeditions WHERE region = 'Southern Ocean' AND year >= 2010;,1 What is the number of publications per researcher?,"CREATE TABLE researcher (id INT, name VARCHAR(255)); CREATE TABLE publication (id INT, researcher_id INT, title VARCHAR(255));","SELECT researcher.name, COUNT(publication.id) FROM researcher LEFT JOIN publication ON researcher.id = publication.researcher_id GROUP BY researcher.name;","SELECT r.name, COUNT(p.id) as num_publications FROM researcher r JOIN publication p ON r.id = p.researcher_id GROUP BY r.name;",0 Waht is the Country of the play by Author Aristophanes?,"CREATE TABLE table_name_25 (country VARCHAR, author VARCHAR);","SELECT country FROM table_name_25 WHERE author = ""aristophanes"";","SELECT country FROM table_name_25 WHERE author = ""aristophanes"";",1 "If the average is 50.16, who is the player?","CREATE TABLE table_27268238_4 (player VARCHAR, average VARCHAR);","SELECT player FROM table_27268238_4 WHERE average = ""50.16"";","SELECT player FROM table_27268238_4 WHERE average = ""50.16"";",1 Retrieve the first and last post of each user.,"CREATE TABLE posts (id INT, user_id INT, title VARCHAR(100), content TEXT, created_at TIMESTAMP); ","SELECT p.*, LEAD(p.id, 1) OVER (PARTITION BY p.user_id ORDER BY p.created_at) as next_post_id, LAG(p.id, 1) OVER (PARTITION BY p.user_id ORDER BY p.created_at) as prev_post_id FROM posts p;","SELECT user_id, MIN(title) as first_post, MIN(title) as last_post FROM posts GROUP BY user_id;",0 How many championships did the team or teams established in 1976 win?,"CREATE TABLE table_name_92 (championships INTEGER, established VARCHAR);",SELECT SUM(championships) FROM table_name_92 WHERE established = 1976;,SELECT SUM(championships) FROM table_name_92 WHERE established = 1976;,1 "What is the policy type and corresponding risk score for each policy, ordered by risk score in ascending order, for policies issued in 'California'?","CREATE TABLE Policies (PolicyID INT, PolicyType VARCHAR(20), IssueState VARCHAR(20), RiskScore DECIMAL(5,2)); ","SELECT PolicyType, RiskScore FROM Policies WHERE IssueState = 'California' ORDER BY RiskScore ASC;","SELECT PolicyType, RiskScore FROM Policies WHERE IssueState = 'California' ORDER BY RiskScore ASC;",1 "Which Season has a Score of 3 – 3 aet , 4–3 pen","CREATE TABLE table_name_31 (season VARCHAR, score VARCHAR);","SELECT season FROM table_name_31 WHERE score = ""3 – 3 aet , 4–3 pen"";","SELECT season FROM table_name_31 WHERE score = ""3 – 3 aet, 4–3 pen"";",0 "Determine the number of healthcare providers with a salary higher than the average salary at each clinic location, in the ""rural_clinics"" table with salary data.","CREATE TABLE rural_clinics (clinic_location VARCHAR(255), healthcare_provider_salary INT); ","SELECT clinic_location, COUNT(*) FROM (SELECT clinic_location, healthcare_provider_salary, AVG(healthcare_provider_salary) OVER (PARTITION BY clinic_location) AS avg_salary FROM rural_clinics) t WHERE healthcare_provider_salary > avg_salary GROUP BY clinic_location;","SELECT clinic_location, COUNT(*) FROM rural_clinics WHERE healthcare_provider_salary > (SELECT AVG(salary) FROM rural_clinics GROUP BY clinic_location);",0 What is the combined of 2 overalls and 5 slaloms?,"CREATE TABLE table_name_93 (combined VARCHAR, overall VARCHAR, slalom VARCHAR);","SELECT combined FROM table_name_93 WHERE overall = ""2"" AND slalom = ""5"";","SELECT combined FROM table_name_93 WHERE overall = ""2"" AND slalom = ""5"";",1 Where is the train going to when departing at 20.35?,"CREATE TABLE table_18332845_2 (going_to VARCHAR, departure VARCHAR);","SELECT going_to FROM table_18332845_2 WHERE departure = ""20.35"";","SELECT going_to FROM table_18332845_2 WHERE departure = ""20.35"";",1 "What nation has paavo nurmi as the athlete, with a medal count less than 12?","CREATE TABLE table_name_62 (nation VARCHAR, athlete VARCHAR, medal_count VARCHAR);","SELECT nation FROM table_name_62 WHERE athlete = ""paavo nurmi"" AND medal_count < 12;","SELECT nation FROM table_name_62 WHERE athlete = ""paavo nurmi"" AND medal_count 12;",0 Who has the most assists on Denver?,"CREATE TABLE table_17311812_8 (high_assists VARCHAR, team VARCHAR);","SELECT high_assists FROM table_17311812_8 WHERE team = ""Denver"";","SELECT high_assists FROM table_17311812_8 WHERE team = ""Denver"";",1 What is the D 41 √ when the D 47 √ is d 34?,"CREATE TABLE table_name_83 (d_41_√ VARCHAR, d_47_√ VARCHAR);","SELECT d_41_√ FROM table_name_83 WHERE d_47_√ = ""d 34"";","SELECT d_41_ FROM table_name_83 WHERE d_47_ = ""d 34"";",0 Update the 'city' of the 'New York Yankees' team to 'New York City'.,"CREATE TABLE teams (id INT PRIMARY KEY, name VARCHAR(50), sport VARCHAR(20), city VARCHAR(30)); ",UPDATE teams SET city = 'New York City' WHERE name = 'New York Yankees';,UPDATE teams SET city = 'New York City' WHERE name = 'New York Yankees';,1 "What is the highest Population that has a Median household income of $32,902 with a number of households less than 11,125","CREATE TABLE table_name_34 (population INTEGER, median_household_income VARCHAR, number_of_households VARCHAR);","SELECT MAX(population) FROM table_name_34 WHERE median_household_income = ""$32,902"" AND number_of_households < 11 OFFSET 125;","SELECT MAX(population) FROM table_name_34 WHERE median_household_income = ""$32,902"" AND number_of_households 11 OFFSET 125;",0 What is the total number of accommodations provided for students in the 'Science' department?,"CREATE TABLE Students (student_id INT, department VARCHAR(255)); CREATE TABLE Accommodations (accommodation_id INT, student_id INT, accommodation_type VARCHAR(255));",SELECT COUNT(*) as total_accommodations FROM Accommodations WHERE student_id IN ( SELECT student_id FROM Students WHERE department = 'Science' );,SELECT COUNT(*) FROM Accommodations JOIN Students ON Accommodations.student_id = Students.student_id WHERE Students.department = 'Science';,0 How high is Macedonia's highest point?,"CREATE TABLE table_name_53 (height__ft_ VARCHAR, country VARCHAR);","SELECT height__ft_ FROM table_name_53 WHERE country = ""macedonia"";","SELECT height__ft_ FROM table_name_53 WHERE country = ""macedonia"";",1 How many safety tests were conducted on sedans in the 'SafetyTest' database between 2018 and 2020?,"CREATE TABLE SafetyTest (Id INT, VehicleType VARCHAR(50), TestYear INT, TestResult VARCHAR(50)); CREATE VIEW Sedans AS SELECT * FROM Vehicles WHERE VehicleType = 'Sedan';",SELECT COUNT(*) FROM SafetyTest JOIN Sedans ON SafetyTest.VehicleType = Sedans.VehicleType WHERE TestYear BETWEEN 2018 AND 2020;,SELECT COUNT(*) FROM SafetyTest WHERE VehicleType = 'Sedan' AND TestYear BETWEEN 2018 AND 2020;,0 What was the score of the away team at the MCG?,"CREATE TABLE table_name_16 (away_team VARCHAR, venue VARCHAR);","SELECT away_team AS score FROM table_name_16 WHERE venue = ""mcg"";","SELECT away_team AS score FROM table_name_16 WHERE venue = ""mcg"";",1 Identify smart city technology vendors that have implemented projects in both New York and Tokyo.,"CREATE TABLE smart_city_projects (vendor VARCHAR(255), city VARCHAR(255));","SELECT vendor FROM smart_city_projects WHERE city IN ('New York', 'Tokyo') GROUP BY vendor HAVING COUNT(DISTINCT city) = 2;","SELECT vendor FROM smart_city_projects WHERE city IN ('New York', 'Tokyo');",0 Which energy storage technology has the highest capacity in the EnergyStorage table?,"CREATE TABLE EnergyStorage (technology TEXT, capacity INT); ","SELECT technology, capacity FROM EnergyStorage ORDER BY capacity DESC LIMIT 1;","SELECT technology, MAX(capacity) FROM EnergyStorage GROUP BY technology;",0 What is the average number of home runs hit by players from the same team in a single game in the MLB?,"CREATE TABLE games (game_id INT, date DATE, team1 TEXT, team2 TEXT, home_runs INT);",SELECT AVG(home_runs) FROM games WHERE team1 = (SELECT team1 FROM games WHERE game_id = (SELECT MAX(game_id) FROM games WHERE home_runs > 0)) OR team2 = (SELECT team1 FROM games WHERE game_id = (SELECT MAX(game_id) FROM games WHERE home_runs > 0));,SELECT AVG(home_runs) FROM games WHERE team1 = 1 AND team2 = 2;,0 How many volunteers participated in educational programs in Texas?,"CREATE TABLE VolunteerEvents (EventID INT, EventName TEXT, Location TEXT, EventType TEXT); ",SELECT COUNT(DISTINCT VolunteerID) FROM VolunteerEvents JOIN VolunteerHours ON VolunteerEvents.EventID = VolunteerHours.EventID WHERE VolunteerEvents.Location = 'Texas' AND VolunteerEvents.EventType = 'Education';,SELECT COUNT(*) FROM VolunteerEvents WHERE Location = 'Texas' AND EventType = 'Education';,0 What is the number of marine conservation initiatives by status?,"CREATE TABLE Conservation_Initiatives(id INT, initiative_name VARCHAR(50), region VARCHAR(50), status VARCHAR(50), start_date DATE, end_date DATE);","SELECT status, COUNT(*) AS Number_Of_Initiatives FROM Conservation_Initiatives GROUP BY status;","SELECT status, COUNT(*) FROM Conservation_Initiatives GROUP BY status;",0 Which artist has 13 points?,"CREATE TABLE table_name_42 (artist VARCHAR, points VARCHAR);",SELECT artist FROM table_name_42 WHERE points = 13;,SELECT artist FROM table_name_42 WHERE points = 13;,1 "What is Instant Messaging, when Electronic Meeting System is ""Yes"", and when Name is ""Microsoft Sharepoint""?","CREATE TABLE table_name_48 (instant_messaging VARCHAR, electronic_meeting_system VARCHAR, name VARCHAR);","SELECT instant_messaging FROM table_name_48 WHERE electronic_meeting_system = ""yes"" AND name = ""microsoft sharepoint"";","SELECT instant_messaging FROM table_name_48 WHERE electronic_meeting_system = ""yes"" AND name = ""microsoft sharepoint"";",1 "Add a new record into the 'autonomous_vehicles' table with 'model'='Wayve', 'year'=2023, 'top_speed'=70","CREATE TABLE autonomous_vehicles (model VARCHAR(255) PRIMARY KEY, year INT, top_speed FLOAT);","INSERT INTO autonomous_vehicles (model, year, top_speed) VALUES ('Wayve', 2023, 70);","INSERT INTO autonomous_vehicles (model, year, top_speed) VALUES ('Wayve', 2023, 70);",1 "Which donors have made a donation in every quarter of the current year, broken down by their location?","CREATE TABLE donations (id INT, donor_id INT, amount DECIMAL(10,2), donation_date DATE, location VARCHAR(100)); ","SELECT donor_id, YEAR(donation_date) AS year, QUARTER(donation_date) AS quarter, location FROM donations WHERE donation_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 1 YEAR) AND CURDATE() GROUP BY donor_id, year, quarter, location HAVING COUNT(DISTINCT quarter) = 4;","SELECT donor_id, location, DATE_FORMAT(donation_date, '%Y-%m') as quarter, AVG(amount) as avg_donation FROM donations WHERE donation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) GROUP BY donor_id, location, quarter;",0 How many unique donors are there for each cause?,"CREATE TABLE unique_donors (donor_id INT, cause_id INT); ","SELECT cause_id, COUNT(DISTINCT donor_id) AS unique_donors FROM unique_donors GROUP BY cause_id;","SELECT cause_id, COUNT(DISTINCT donor_id) FROM unique_donors GROUP BY cause_id;",0 How many graduate students have not enrolled in any courses in the Spring semester?,"CREATE TABLE GraduateStudents (StudentID int, Name varchar(50), Department varchar(50)); CREATE TABLE Enrollment (StudentID int, Course varchar(50), Semester varchar(50)); ",SELECT COUNT(*) FROM GraduateStudents WHERE StudentID NOT IN (SELECT StudentID FROM Enrollment WHERE Semester = 'Spring');,SELECT COUNT(*) FROM GraduateStudents gs JOIN Enrollment e ON gs.StudentID = e.StudentID WHERE e.Semester = 'Spring';,0 What is the total number of unique official languages spoken in the countries that are founded before 1930?,"CREATE TABLE country (Code VARCHAR); CREATE TABLE countrylanguage (Language VARCHAR, CountryCode VARCHAR, IsOfficial VARCHAR);","SELECT COUNT(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE IndepYear < 1930 AND T2.IsOfficial = ""T"";",SELECT COUNT(DISTINCT T1.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IsOfficial 1930;,0 What town has 15 stops and a NB kind?,"CREATE TABLE table_name_82 (town VARCHAR, stops VARCHAR, kind VARCHAR);","SELECT town FROM table_name_82 WHERE stops = ""15"" AND kind = ""nb"";","SELECT town FROM table_name_82 WHERE stops = 15 AND kind = ""nb"";",0 List the menu items that are not served in any restaurant.,"CREATE TABLE menu_items_all_restaurants (id INT, name VARCHAR(50), vegetarian BOOLEAN, vegan BOOLEAN, restaurant_id INT); ",SELECT name FROM menu_items_all_restaurants GROUP BY name HAVING COUNT(restaurant_id) = 0;,SELECT name FROM menu_items_all_restaurants WHERE restaurant_id IS NULL;,0 What was the average Yttrium production in Oceania between 2016 and 2018?,"CREATE TABLE production (year INT, region VARCHAR(10), element VARCHAR(10), quantity INT); ",SELECT AVG(quantity) FROM production WHERE element = 'Yttrium' AND region = 'Oceania' AND year BETWEEN 2016 AND 2018;,SELECT AVG(quantity) FROM production WHERE element = 'Yttrium' AND region = 'Oceania' AND year BETWEEN 2016 AND 2018;,1 How many players identify as female and have participated in esports events in the last year?,"CREATE TABLE Players (PlayerID int, Age int, Gender varchar(10), LastEsportsParticipation date); ","SELECT COUNT(*) FROM Players WHERE Gender = 'Female' AND LastEsportsParticipation >= DATEADD(year, -1, GETDATE());","SELECT COUNT(*) FROM Players WHERE Gender = 'Female' AND LastEsportsParticipation >= DATEADD(year, -1, GETDATE());",1 Which cities have had a female mayor for the longest continuous period?,"CREATE TABLE city (id INT, name VARCHAR(255)); CREATE TABLE mayor (id INT, city_id INT, name VARCHAR(255), gender VARCHAR(10), start_year INT, end_year INT); ","SELECT c.name, MAX(m.end_year - m.start_year) as max_tenure FROM city c JOIN mayor m ON c.id = m.city_id WHERE m.gender = 'Female' GROUP BY c.name HAVING MAX(m.end_year - m.start_year) >= ALL (SELECT MAX(m2.end_year - m2.start_year) FROM mayor m2 WHERE m2.gender = 'Female')","SELECT c.name, m.gender, m.start_year, m.end_year FROM city c JOIN mayor m ON c.id = m.city_id WHERE m.gender = 'Female' AND m.start_year = (SELECT MAX(end_year) FROM end_year) GROUP BY c.name, m.gender;",0 Calculate the transaction amount variance per day for the last month?,"CREATE TABLE transactions (transaction_id INT, user_id INT, amount DECIMAL(10,2), transaction_time TIMESTAMP);","SELECT DATE(transaction_time) as transaction_date, VAR(amount) as variance FROM transactions WHERE transaction_time > DATEADD(month, -1, GETDATE()) GROUP BY transaction_date;","SELECT DATE_FORMAT(transaction_time, '%Y-%m') AS transaction_day, AVG(amount) AS variance FROM transactions WHERE transaction_time >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY transaction_day;",0 What is the recycling rate for the 'South' region in 2019?,"CREATE TABLE recycling_rates (region VARCHAR(10), year INT, rate DECIMAL(3,2)); ",SELECT rate FROM recycling_rates WHERE region = 'South' AND year = 2019;,SELECT rate FROM recycling_rates WHERE region = 'South' AND year = 2019;,1 What is the number for the french open 1974?,"CREATE TABLE table_197638_7 (_number INTEGER, french_open VARCHAR);",SELECT MAX(_number) FROM table_197638_7 WHERE french_open = 1974;,SELECT MAX(_number) FROM table_197638_7 WHERE french_open = 1974;,1 Who are the top 3 consumers of cosmetic products in Japan?,"CREATE TABLE ConsumerPreference (ConsumerID INT, ProductID INT, ProductName VARCHAR(50), Country VARCHAR(50)); ","SELECT ConsumerName, COUNT(*) AS ProductCount FROM ConsumerPreference CP INNER JOIN Consumers C ON CP.ConsumerID = C.ConsumerID WHERE CP.Country = 'Japan' GROUP BY ConsumerName ORDER BY ProductCount DESC LIMIT 3;","SELECT ConsumerID, ProductName FROM ConsumerPreference WHERE Country = 'Japan' ORDER BY ProductName DESC LIMIT 3;",0 What's the IHSAA class of the Red Devils?,"CREATE TABLE table_name_77 (ihsaa_class VARCHAR, mascot VARCHAR);","SELECT ihsaa_class FROM table_name_77 WHERE mascot = ""red devils"";","SELECT ihsaa_class FROM table_name_77 WHERE mascot = ""red devils"";",1 Update 'usage' to 900 for records in 'water_usage' view where 'region' is 'Central',"CREATE TABLE water_usage (id INT PRIMARY KEY, region VARCHAR(20), usage FLOAT);",UPDATE water_usage SET usage = 900 WHERE region = 'Central';,UPDATE water_usage SET usage = 900 WHERE region = 'Central';,1 "What are the top 3 countries with the most user activity on social media platform sm_platform in the year 2022, and what is the total activity for each?","CREATE TABLE sm_platform (country VARCHAR(50), activity INT); ","SELECT s.country, SUM(s.activity) as total_activity FROM sm_platform s WHERE s.activity >= 10000 AND YEAR(s.activity_date) = 2022 GROUP BY s.country ORDER BY total_activity DESC LIMIT 3;","SELECT country, SUM(activity) as total_activity FROM sm_platform WHERE year = 2022 GROUP BY country ORDER BY total_activity DESC LIMIT 3;",0 Find the total number of alternative dispute resolution cases in urban areas from 2015 to 2020,"CREATE TABLE dispute_resolution_cases (case_id INT, year INT, urban_area BOOLEAN); ",SELECT SUM(urban_area) FROM dispute_resolution_cases WHERE year BETWEEN 2015 AND 2020;,SELECT COUNT(*) FROM dispute_resolution_cases WHERE year BETWEEN 2015 AND 2020 AND urban_area = true;,0 What is the maximum capacity of a cargo ship owned by Pacific Shipping?,"CREATE TABLE ships (id INT, name VARCHAR(255), capacity INT); ",SELECT MAX(capacity) FROM ships WHERE name LIKE 'Pacific%';,SELECT MAX(capacity) FROM ships WHERE name = 'Pacific Shipping';,0 On which date did the Indians have a record of 67-58,"CREATE TABLE table_name_92 (date VARCHAR, record VARCHAR);","SELECT date FROM table_name_92 WHERE record = ""67-58"";","SELECT date FROM table_name_92 WHERE record = ""67-58"";",1 "Who was the player from the United States, with a total larger than 145?","CREATE TABLE table_name_32 (player VARCHAR, country VARCHAR, total VARCHAR);","SELECT player FROM table_name_32 WHERE country = ""united states"" AND total > 145;","SELECT player FROM table_name_32 WHERE country = ""united states"" AND total > 145;",1 What is the label for the album with a catalog number of 83061-4?,"CREATE TABLE table_name_84 (label VARCHAR, catalog__number VARCHAR);","SELECT label FROM table_name_84 WHERE catalog__number = ""83061-4"";","SELECT label FROM table_name_84 WHERE catalog__number = ""83061-4"";",1 "What is the total number of losses and draws less than 7, points larger than 26, 60 goals, and a position before 4?","CREATE TABLE table_name_68 (losses VARCHAR, position VARCHAR, goals_for VARCHAR, draws VARCHAR, points VARCHAR);",SELECT COUNT(losses) FROM table_name_68 WHERE draws < 7 AND points > 26 AND goals_for = 60 AND position < 4;,SELECT COUNT(losses) FROM table_name_68 WHERE draws 7 AND points > 26 AND goals_for 60 AND position 4;,0 What is Tom Kite with a Score of 68's To Par?,"CREATE TABLE table_name_92 (to_par VARCHAR, score VARCHAR, player VARCHAR);","SELECT to_par FROM table_name_92 WHERE score = 68 AND player = ""tom kite"";","SELECT to_par FROM table_name_92 WHERE score = 68 AND player = ""tom kite"";",1 "Can you tell me the lowest Played that has the Position larger than 2, and the Draws smaller than 2, and the Goals against smaller than 18?","CREATE TABLE table_name_90 (played INTEGER, goals_against VARCHAR, position VARCHAR, draws VARCHAR);",SELECT MIN(played) FROM table_name_90 WHERE position > 2 AND draws < 2 AND goals_against < 18;,SELECT MIN(played) FROM table_name_90 WHERE position > 2 AND draws 2 AND goals_against 18;,0 What is the total revenue generated by social equity dispensaries in Washington?,"CREATE TABLE Dispensaries (id INT, dispensary_name VARCHAR(255), state VARCHAR(255), income DECIMAL(10, 2), social_equity BOOLEAN); ",SELECT SUM(income) FROM Dispensaries WHERE state = 'Washington' AND social_equity = true;,SELECT SUM(income) FROM Dispensaries WHERE state = 'Washington' AND social_equity = true;,1 What is the total revenue generated by VR games released in 2020?,"CREATE TABLE games (game_id INT, game_name TEXT, genre TEXT, release_year INT, revenue INT); CREATE TABLE vr_games (game_id INT, game_name TEXT, genre TEXT, is_vr BOOLEAN); ",SELECT SUM(games.revenue) FROM games JOIN vr_games ON games.game_id = vr_games.game_id WHERE vr_games.genre = 'Virtual Reality' AND games.release_year = 2020;,SELECT SUM(games.revenue) FROM games INNER JOIN vr_games ON games.game_id = vr_games.game_id WHERE games.release_year = 2020 AND vr_games.is_vr = true;,0 What is the record which shows Kickoff as kickoff?,CREATE TABLE table_name_75 (record VARCHAR);,"SELECT record FROM table_name_75 WHERE ""kickoff"" = ""kickoff"";","SELECT record FROM table_name_75 WHERE ""kickoff"" = ""kickoff"";",1 Count the number of electric cars in each state in the USA,"CREATE TABLE states (state_id INT, state_name VARCHAR(50));CREATE TABLE ev_sales (sale_id INT, ev_type VARCHAR(50), sale_state INT);","SELECT s.state_name, COUNT(es.ev_type) as num_ecars FROM states s JOIN ev_sales es ON s.state_id = es.sale_state WHERE es.ev_type NOT LIKE '%Bus' GROUP BY s.state_name;","SELECT s.state_name, COUNT(ev_sales.sale_id) FROM states s JOIN ev_sales ev ON s.state_id = ev_sales.sale_id WHERE ev_type = 'Electric' GROUP BY s.state_name;",0 Create a view 'top_5_cities' that displays top 5 cities with the most policyholders,"CREATE TABLE policyholders (policyholder_id INT PRIMARY KEY, name VARCHAR(100), age INT, gender VARCHAR(10), city VARCHAR(50)); ","CREATE VIEW top_5_cities AS SELECT city, COUNT(*) as policyholder_count FROM policyholders GROUP BY city ORDER BY policyholder_count DESC LIMIT 5;","CREATE VIEW top_5_cities AS SELECT city, COUNT(*) as policyholder_count FROM policyholders GROUP BY city ORDER BY policyholder_count DESC LIMIT 5;",1 "What is the average budget for Indian movies released after 2015, grouped by genre?","CREATE TABLE movie (id INT, title VARCHAR(100), release_year INT, country VARCHAR(50), genre VARCHAR(50), budget INT); ","SELECT genre, AVG(budget) FROM movie WHERE country = 'India' AND release_year > 2015 GROUP BY genre;","SELECT genre, AVG(budget) as avg_budget FROM movie WHERE country = 'India' AND release_year > 2015 GROUP BY genre;",0 What are the names and total cargo weights for all shipments that share a warehouse with shipment ID 12345?,"CREATE TABLE Warehouses (WarehouseID int, WarehouseName varchar(50)); CREATE TABLE Shipments (ShipmentID int, WarehouseID int, CargoWeight int); INSERT INTO Shipments VALUES (12345, 1, 5000), (67890, 1, 7000), (11121, 2, 6000), (22232, 3, 8000)","SELECT Warehouses.WarehouseName, SUM(Shipments.CargoWeight) as TotalCargoWeight FROM Warehouses INNER JOIN Shipments ON Warehouses.WarehouseID = Shipments.WarehouseID WHERE Shipments.ShipmentID <> 12345 AND Warehouses.WarehouseID = (SELECT WarehouseID FROM Shipments WHERE ShipmentID = 12345) GROUP BY Warehouses.WarehouseName;","SELECT w.WarehouseName, SUM(s.CargoWeight) FROM Shipments s JOIN Warehouses w ON s.WarehouseID = w.WarehouseID WHERE w.WarehouseID = 12345 GROUP BY w.WarehouseName;",0 How many stages did Team Sky lead the teams classification?,"CREATE TABLE table_26010857_13 (stage INTEGER, teams_classification VARCHAR);","SELECT MAX(stage) FROM table_26010857_13 WHERE teams_classification = ""Team Sky"";","SELECT MAX(stage) FROM table_26010857_13 WHERE teams_classification = ""Team Sky"";",1 How many time was the distance Abu Dhabi?,"CREATE TABLE table_26894949_2 (sanya VARCHAR, distance VARCHAR);","SELECT COUNT(sanya) FROM table_26894949_2 WHERE distance = ""abu_dhabi"";","SELECT COUNT(sanya) FROM table_26894949_2 WHERE distance = ""Abu Dhabi"";",0 What are the top 2 most frequently violated policies in the Middle East and North Africa region?,"CREATE TABLE policy_violations (id INT, policy_name VARCHAR(255), region VARCHAR(255), violation_date DATE); ","SELECT policy_name, COUNT(*) AS violation_count FROM policy_violations WHERE region = 'MENA' AND violation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY policy_name ORDER BY violation_count DESC LIMIT 2;","SELECT policy_name, COUNT(*) as violation_count FROM policy_violations WHERE region IN ('Middle East', 'North Africa') GROUP BY policy_name ORDER BY violation_count DESC LIMIT 2;",0 Count the number of renewable energy projects in 'renewable_projects' table grouped by project type,"CREATE TABLE renewable_projects (id INT, type VARCHAR(50), location VARCHAR(50), capacity INT, status VARCHAR(10));","SELECT type, COUNT(*) FROM renewable_projects GROUP BY type;","SELECT type, COUNT(*) FROM renewable_projects GROUP BY type;",1 How many budgets are above 3000 in year 2001 or before?,"CREATE TABLE budget (budgeted VARCHAR, YEAR VARCHAR);",SELECT COUNT(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001;,SELECT COUNT(budgeted) FROM budget WHERE YEAR 2001;,0 What is the name of the Constructor with a 19 Grid?,"CREATE TABLE table_name_98 (constructor VARCHAR, grid VARCHAR);",SELECT constructor FROM table_name_98 WHERE grid = 19;,SELECT constructor FROM table_name_98 WHERE grid = 19;,1 "What is the total number of diversity, equity, and inclusion (DEI) initiatives in the 'dei_initiatives' table by location?","CREATE TABLE dei_initiatives (initiative_id INT, initiative_name VARCHAR(50), location VARCHAR(30), start_date DATE, end_date DATE);","SELECT location, COUNT(*) AS initiative_count FROM dei_initiatives GROUP BY location;","SELECT location, COUNT(*) FROM dei_initiatives GROUP BY location;",0 What is the population in стари жедник (croatian: stari žednik)?,"CREATE TABLE table_2562572_26 (population__2011_ VARCHAR, cyrillic_name_other_names VARCHAR);","SELECT population__2011_ FROM table_2562572_26 WHERE cyrillic_name_other_names = ""Стари Жедник (Croatian: Stari Žednik)"";","SELECT population__2011_ FROM table_2562572_26 WHERE cyrillic_name_other_names = ""стари едник (croatian: stari ednik)"";",0 What was the lowest year that a player from midfield won first team honors?,"CREATE TABLE table_name_12 (year INTEGER, team VARCHAR, position VARCHAR);","SELECT MIN(year) FROM table_name_12 WHERE team = ""first team"" AND position = ""midfield"";","SELECT MIN(year) FROM table_name_12 WHERE team = ""first team honors"" AND position = ""midfield"";",0 How many albums are there?,CREATE TABLE ALBUM (Id VARCHAR);,SELECT COUNT(*) FROM ALBUM;,SELECT COUNT(*) FROM ALBUM;,1 What is the class of vessel of the ship Hyundai Smart?,"CREATE TABLE table_name_85 (class VARCHAR, vessel_name VARCHAR);","SELECT class FROM table_name_85 WHERE vessel_name = ""hyundai smart"";","SELECT class FROM table_name_85 WHERE vessel_name = ""hyundai smart"";",1 On which week was the beatles the original artist and the order # smaller than 10?,"CREATE TABLE table_name_34 (week__number VARCHAR, original_artist VARCHAR, order__number VARCHAR);","SELECT week__number FROM table_name_34 WHERE original_artist = ""the beatles"" AND order__number < 10;","SELECT week__number FROM table_name_34 WHERE original_artist = ""the beatles"" AND order__number 10;",0 What was the total revenue for each salesperson in the month of January 2022?,"CREATE TABLE sales (salesperson VARCHAR(255), revenue FLOAT); ","SELECT salesperson, SUM(revenue) FROM sales WHERE revenue IS NOT NULL AND salesperson IS NOT NULL AND STR_TO_DATE(CONCAT('01-', MONTH(NOW())), '%d-%m-%Y') = STR_TO_DATE('01-2022', '%d-%m-%Y') GROUP BY salesperson;","SELECT salesperson, SUM(revenue) as total_revenue FROM sales WHERE month = 'January 2022' GROUP BY salesperson;",0 What is the number of students in the open pedagogy program who have visited in the past month?,"CREATE TABLE open_pedagogy_students (id INT, name VARCHAR(50), last_visit DATE);","SELECT COUNT(*) FROM open_pedagogy_students WHERE last_visit >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH);","SELECT COUNT(*) FROM open_pedagogy_students WHERE last_visit >= DATEADD(month, -1, GETDATE());",0 "For the teams that had fewer than 1 Byes, what was the lowest number of Draws?","CREATE TABLE table_name_38 (draws INTEGER, byes INTEGER);",SELECT MIN(draws) FROM table_name_38 WHERE byes < 1;,SELECT MIN(draws) FROM table_name_38 WHERE byes 1;,0 what is the original air date of the episode directed by Ben Jones and written by Steven Melching? ,"CREATE TABLE table_20360535_4 (original_air_date VARCHAR, directed_by VARCHAR, written_by VARCHAR);","SELECT original_air_date FROM table_20360535_4 WHERE directed_by = ""Ben Jones"" AND written_by = ""Steven Melching"";","SELECT original_air_date FROM table_20360535_4 WHERE directed_by = ""Ben Jones"" AND written_by = ""Steven Melching"";",1 What is the average number of assists per basketball player in the 'assists' table?,"CREATE TABLE assists (assist_id INT, player_id INT, match_id INT, team_id INT, assists INT); ",SELECT AVG(assists) FROM assists;,SELECT AVG(assists) FROM assists;,1 "What is Country, when Class / Type is ""Three masted full rigged ship""?","CREATE TABLE table_name_2 (country VARCHAR, class___type VARCHAR);","SELECT country FROM table_name_2 WHERE class___type = ""three masted full rigged ship"";","SELECT country FROM table_name_2 WHERE class___type = ""three masted full rigged ship"";",1 How many Parishes in Merrimack which has 4 Cemeteries?,"CREATE TABLE table_name_62 (parishes INTEGER, pastoral_region VARCHAR, cemeteries VARCHAR);","SELECT MIN(parishes) FROM table_name_62 WHERE pastoral_region = ""merrimack"" AND cemeteries < 4;","SELECT SUM(parishes) FROM table_name_62 WHERE pastoral_region = ""merimack"" AND cemeteries = ""4"";",0 What is the average number of songs per album for K-pop albums released in the last 3 years?,"CREATE TABLE kpop_albums (id INT, name TEXT, genre TEXT, release_date DATE, songs INT); ","SELECT AVG(songs) FROM kpop_albums WHERE genre = 'K-pop' AND release_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR);","SELECT AVG(songs) FROM kpop_albums WHERE genre = 'K-pop' AND release_date >= DATEADD(year, -3, GETDATE());",0 How many touchdowns were there when Heston was in play?,"CREATE TABLE table_14342592_7 (touchdowns INTEGER, player VARCHAR);","SELECT MAX(touchdowns) FROM table_14342592_7 WHERE player = ""Heston"";","SELECT SUM(touchdowns) FROM table_14342592_7 WHERE player = ""Heston"";",0 What is the number of hospitals per 1000 people in European countries in 2020?,"CREATE TABLE Hospitals (Country VARCHAR(50), Continent VARCHAR(50), HospitalsPer1000 FLOAT, Year INT); ","SELECT Country, Continent, HospitalsPer1000 FROM Hospitals WHERE Continent = 'Europe' AND Year = 2020;","SELECT Country, HospitalsPer1000 FROM Hospitals WHERE Continent = 'Europe' AND Year = 2020;",0 How many teams does Lee Sorochan play for?,"CREATE TABLE table_2781227_2 (college_junior_club_team VARCHAR, player VARCHAR);","SELECT COUNT(college_junior_club_team) FROM table_2781227_2 WHERE player = ""Lee Sorochan"";","SELECT COUNT(college_junior_club_team) FROM table_2781227_2 WHERE player = ""Lee Sorochan"";",1 Who is the home team that tied no 2?,"CREATE TABLE table_name_2 (home_team VARCHAR, tie_no VARCHAR);","SELECT home_team FROM table_name_2 WHERE tie_no = ""2"";",SELECT home_team FROM table_name_2 WHERE tie_no = 2;,0 What is the minimum number of pharmacotherapy sessions attended by patients with depression in France?,"CREATE TABLE pharmacotherapy (pharmacotherapy_id INT, patient_id INT, condition VARCHAR(50), country VARCHAR(50), num_sessions INT); ",SELECT MIN(num_sessions) FROM pharmacotherapy WHERE country = 'France' AND condition = 'Depression';,SELECT MIN(num_sessions) FROM pharmacotherapy WHERE condition = 'Depression' AND country = 'France';,0 What is the maximum number of days taken to resolve a critical vulnerability in the government sector?,"CREATE TABLE vulnerability_resolution (id INT, severity VARCHAR(255), sector VARCHAR(255), resolution_date DATE, detection_date DATE); ","SELECT MAX(DATEDIFF(resolution_date, detection_date)) FROM vulnerability_resolution WHERE severity = 'critical' AND sector = 'government';",SELECT MAX(resolution_date) FROM vulnerability_resolution WHERE sector = 'Government';,0 What is the lowest year that had foil team as the event at Melbourne?,"CREATE TABLE table_name_7 (year INTEGER, event VARCHAR, venue VARCHAR);","SELECT MIN(year) FROM table_name_7 WHERE event = ""foil team"" AND venue = ""melbourne"";","SELECT MIN(year) FROM table_name_7 WHERE event = ""foil team"" AND venue = ""melbourne"";",1 What was the result of the game after week 3 against the New York Giants?,"CREATE TABLE table_name_94 (result VARCHAR, week VARCHAR, opponent VARCHAR);","SELECT result FROM table_name_94 WHERE week > 3 AND opponent = ""new york giants"";","SELECT result FROM table_name_94 WHERE week > 3 AND opponent = ""new york giants"";",1 "What is the average monthly data usage for postpaid mobile customers in the ""coastal"" region, excluding those with unlimited plans?","CREATE TABLE subscribers (id INT, type VARCHAR(10), region VARCHAR(10), unlimited BOOLEAN); CREATE TABLE usage (subscriber_id INT, month INT, data_usage INT); ",SELECT AVG(data_usage) FROM usage JOIN subscribers ON usage.subscriber_id = subscribers.id WHERE subscribers.type = 'postpaid' AND subscribers.region = 'coastal' AND subscribers.unlimited = FALSE;,SELECT AVG(usage.data_usage) FROM usage INNER JOIN subscribers ON usage.subscriber_id = subscribers.id WHERE subscribers.type = 'postpaid' AND subscribers.region = 'coastal' AND subscribers.unlimited = true;,0 List all the unique mining sites,"CREATE TABLE MiningSites (id INT, name VARCHAR(255)); ",SELECT DISTINCT name FROM MiningSites;,SELECT DISTINCT name FROM MiningSites;,1 What is the total number of transactions for each gender?,"CREATE TABLE Transactions (transaction_id INT, user_id INT, gender VARCHAR(10), transaction_amount DECIMAL(10,2)); ","SELECT gender, SUM(transaction_amount) as total_amount FROM Transactions GROUP BY gender;","SELECT gender, COUNT(*) FROM Transactions GROUP BY gender;",0 What is the minimum number of tracks for railways in New York?,"CREATE TABLE Railways (id INT, name TEXT, location TEXT, state TEXT, tracks INT); ",SELECT MIN(tracks) FROM Railways WHERE state = 'New York';,SELECT MIN(tracks) FROM Railways WHERE state = 'New York';,1 "Which Venue has an Event of marathon, and a Year larger than 1995, and a Position of 4th?","CREATE TABLE table_name_94 (venue VARCHAR, position VARCHAR, event VARCHAR, year VARCHAR);","SELECT venue FROM table_name_94 WHERE event = ""marathon"" AND year > 1995 AND position = ""4th"";","SELECT venue FROM table_name_94 WHERE event = ""marathon"" AND year > 1995 AND position = ""4th"";",1 How many incidents of illegal mining were reported in Asia in the last 3 years?,"CREATE TABLE incidents (id INT, location TEXT, date DATE, type TEXT); ",SELECT COUNT(*) FROM incidents WHERE extract(year from date) >= 2019 AND location = 'Asia' AND type = 'illegal mining';,"SELECT COUNT(*) FROM incidents WHERE location LIKE '%Asia%' AND type = 'Illegal Mining' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR);",0 what is the country when the score is 68-72-67=207?,"CREATE TABLE table_name_75 (country VARCHAR, score VARCHAR);",SELECT country FROM table_name_75 WHERE score = 68 - 72 - 67 = 207;,SELECT country FROM table_name_75 WHERE score = 68 - 72 - 67 = 207;,1 "In the Central region, where the land area (km 2) is 8,543.2, what was the rainfall by depth (mm/year)?","CREATE TABLE table_25983027_1 (rainfall_by_depth__mm_year_ VARCHAR, land_area__km_2__ VARCHAR);","SELECT rainfall_by_depth__mm_year_ FROM table_25983027_1 WHERE land_area__km_2__ = ""8,543.2"";","SELECT rainfall_by_depth__mm_year_ FROM table_25983027_1 WHERE land_area__km_2__ = ""8,543.2"";",1 What is the total claim amount by policy type?,"CREATE TABLE Claims (PolicyID INT, PolicyType VARCHAR(255), ClaimAmount DECIMAL(10, 2)); ","SELECT PolicyType, SUM(ClaimAmount) AS TotalClaimAmount FROM Claims GROUP BY PolicyType;","SELECT PolicyType, SUM(ClaimAmount) FROM Claims GROUP BY PolicyType;",0 Who is entered earlier than 1975 and has a Lotus 20 chassis?,"CREATE TABLE table_name_14 (entrant VARCHAR, year VARCHAR, chassis VARCHAR);","SELECT entrant FROM table_name_14 WHERE year < 1975 AND chassis = ""lotus 20"";","SELECT entrant FROM table_name_14 WHERE year 1975 AND chassis = ""lotus 20"";",0 What is the maximum daily revenue recorded in the database?,"CREATE TABLE daily_revenue (sale_date DATE, revenue DECIMAL(10,2)); ",SELECT MAX(revenue) FROM daily_revenue;,SELECT MAX(revenue) FROM daily_revenue;,1 what's the doubles w-l for player seol jae-min (none),"CREATE TABLE table_10023387_1 (doubles_w_l VARCHAR, player VARCHAR);","SELECT doubles_w_l FROM table_10023387_1 WHERE player = ""Seol Jae-Min (none)"";","SELECT doubles_w_l FROM table_10023387_1 WHERE player = ""Seol Jae-Min (None)"";",0 How many episodes in the season were directed by Jeremy Podeswa?,"CREATE TABLE table_2182654_3 (no_in_season VARCHAR, directed_by VARCHAR);","SELECT COUNT(no_in_season) FROM table_2182654_3 WHERE directed_by = ""Jeremy Podeswa"";","SELECT COUNT(no_in_season) FROM table_2182654_3 WHERE directed_by = ""Jeremy Podeswa"";",1 Who was the away team at Princes Park?,"CREATE TABLE table_name_26 (away_team VARCHAR, venue VARCHAR);","SELECT away_team FROM table_name_26 WHERE venue = ""princes park"";","SELECT away_team FROM table_name_26 WHERE venue = ""princes park"";",1 "What was the Queens number when Brooklyn was 201,866?","CREATE TABLE table_name_57 (queens VARCHAR, brooklyn VARCHAR);","SELECT queens FROM table_name_57 WHERE brooklyn = ""201,866"";","SELECT queens FROM table_name_57 WHERE brooklyn = ""201,866"";",1 What is the total number of accommodations provided for students with speech and language impairments?,"CREATE TABLE Accommodations (Student VARCHAR(255), School VARCHAR(255), Accommodation VARCHAR(255)); ",SELECT COUNT(*) as TotalAccommodations FROM Accommodations WHERE Accommodation LIKE '%Speech%' OR Accommodation LIKE '%Language%';,"SELECT COUNT(*) FROM Accommodations WHERE Student IN ('Speech and Language Impairment', 'Language Impairment');",0 Update the policy 'Access Control Policy' to have a last_updated date of '2022-02-15',"CREATE TABLE cybersecurity_policies (id INT, name VARCHAR, last_updated DATE); ",UPDATE cybersecurity_policies SET last_updated = '2022-02-15' WHERE name = 'Access Control Policy';,UPDATE cybersecurity_policies SET last_updated = '2022-02-15' WHERE name = 'Access Control Policy';,1 How many unique strains are available in CO dispensaries that have 'organic' in their name?,"CREATE TABLE strains (id INT, name TEXT, dispensary_id INT); CREATE TABLE dispensaries (id INT, name TEXT, state TEXT); ",SELECT COUNT(DISTINCT s.name) FROM strains s JOIN dispensaries d ON s.dispensary_id = d.id WHERE d.state = 'Colorado' AND d.name LIKE '%organic%';,SELECT COUNT(DISTINCT strains.name) FROM strains INNER JOIN dispensaries ON strains.dispensary_id = dispensaries.id WHERE dispensaries.state = 'CO' AND strains.name LIKE '%organic%';,0 Who was the incumbent in the Ohio 5 district?,"CREATE TABLE table_2646656_3 (incumbent VARCHAR, district VARCHAR);","SELECT incumbent FROM table_2646656_3 WHERE district = ""Ohio 5"";","SELECT incumbent FROM table_2646656_3 WHERE district = ""Ohio 5"";",1 How many regular season titles did Kansas receive when they received fewer than 2 tournament titles and more than 0 total titles?,"CREATE TABLE table_name_25 (Regular VARCHAR, team VARCHAR, tournament VARCHAR, total VARCHAR);","SELECT Regular AS season FROM table_name_25 WHERE tournament < 2 AND total > 0 AND team = ""kansas"";","SELECT COUNT(Regular) FROM table_name_25 WHERE tournament 2 AND total > 0 AND team = ""kansas"";",0 What is the total waste generation in kg for each country in 2020?,"CREATE TABLE waste_generation (country VARCHAR(255), year INT, amount FLOAT); ","SELECT wg.country, SUM(wg.amount) as total_waste FROM waste_generation wg WHERE wg.year = 2020 GROUP BY wg.country;","SELECT country, SUM(amount) FROM waste_generation WHERE year = 2020 GROUP BY country;",0 "What's the lowest Code that's got a Most Spoke Language of Xhosa, a Place of Addo Elephant National Park, and an Area (KM 2) that's smaller than 1.08?","CREATE TABLE table_name_92 (code INTEGER, area__km_2__ VARCHAR, most_spoken_language VARCHAR, place VARCHAR);","SELECT MIN(code) FROM table_name_92 WHERE most_spoken_language = ""xhosa"" AND place = ""addo elephant national park"" AND area__km_2__ < 1.08;","SELECT MIN(code) FROM table_name_92 WHERE most_spoken_language = ""xhosa"" AND place = ""addo elephant national park"" AND area__km_2__ 1.08;",0 How many cases were opened in New York in Q1 2022 for clients who identify as LGBTQ+?,"CREATE TABLE Cases (CaseID int, ClientID int, OpenDate date); CREATE TABLE Clients (ClientID int, Name text, Identity text); ",SELECT COUNT(*) FROM Cases C INNER JOIN Clients CL ON C.ClientID = CL.ClientID WHERE CL.Identity = 'LGBTQ+' AND C.OpenDate BETWEEN '2022-01-01' AND '2022-03-31';,SELECT COUNT(*) FROM Cases INNER JOIN Clients ON Cases.ClientID = Clients.ClientID WHERE Clients.Identity = 'LGBTQ+' AND Cases.OpenDate BETWEEN '2022-01-01' AND '2022-03-31' AND Cases.OpenDate BETWEEN '2022-01-01' AND '2022-03-31';,0 What is the total number of traffic violation tickets issued in Tokyo?,"CREATE TABLE traffic_violations (id INT, city VARCHAR(20), ticket_issued INT); ",SELECT COUNT(*) FROM traffic_violations WHERE city = 'Tokyo';,SELECT SUM(ticket_issued) FROM traffic_violations WHERE city = 'Tokyo';,0 What was the prize pool in New Orleans?,"CREATE TABLE table_2715355_1 (total_prize_pool VARCHAR, location VARCHAR);","SELECT total_prize_pool FROM table_2715355_1 WHERE location = ""New Orleans"";","SELECT total_prize_pool FROM table_2715355_1 WHERE location = ""New Orleans"";",1 "List all defense diplomacy events between NATO and ASEAN since 2015, including the number of attendees.","CREATE TABLE defense_diplomacy (event_name VARCHAR(255), participants VARCHAR(255), date DATE, attendees INT);","SELECT event_name, attendees FROM defense_diplomacy WHERE participants LIKE '%NATO%' AND participants LIKE '%ASEAN%' AND date >= '2015-01-01';","SELECT event_name, participants, date, attendees FROM defense_diplomacy WHERE participants IN ('NATO', 'ASEAN') AND date >= '2015-01-01';",0 Delete all records for vessels that have not docked since 2019,"CREATE TABLE Vessels(Id INT, Name VARCHAR(255)); CREATE TABLE DockingHistory(Id INT, VesselId INT, DockingDateTime DATETIME); ",DELETE dh FROM DockingHistory dh INNER JOIN Vessels v ON dh.VesselId = v.Id WHERE v.Id NOT IN (SELECT VesselId FROM DockingHistory WHERE YEAR(DockingDateTime) >= 2019);,DELETE FROM Vessels WHERE VesselId NOT IN (SELECT VesselId FROM DockingHistory WHERE DockingDateTime '2019-01-01');,0 "What is the least round number for Jon Olinger, who was picked before pick # 24?","CREATE TABLE table_name_3 (round INTEGER, name VARCHAR, pick__number VARCHAR);","SELECT MIN(round) FROM table_name_3 WHERE name = ""jon olinger"" AND pick__number < 24;","SELECT MIN(round) FROM table_name_3 WHERE name = ""jon olinger"" AND pick__number 24;",0 "What is the total funding received by companies in the sustainability sector, having at least 3 funding rounds?","CREATE TABLE companies (company_id INT, company_name TEXT, industry TEXT, founding_year INT); CREATE TABLE funding_records (funding_id INT, company_id INT, amount INT, round_number INT); ",SELECT SUM(fr.amount) FROM companies c JOIN funding_records fr ON c.company_id = fr.company_id WHERE c.industry = 'Sustainability' GROUP BY c.company_id HAVING COUNT(fr.round_number) >= 3;,SELECT SUM(funding_records.amount) FROM companies INNER JOIN funding_records ON companies.company_id = funding_records.company_id WHERE companies.industry = 'Sustainability' AND funding_records.round_number >= 3;,0 What is the Project Name with a Country that is opec?,"CREATE TABLE table_name_36 (project_name VARCHAR, country VARCHAR);","SELECT project_name FROM table_name_36 WHERE country = ""opec"";","SELECT project_name FROM table_name_36 WHERE country = ""opec"";",1 What school did Paul Dawkins play for?,"CREATE TABLE table_name_34 (school_club_team VARCHAR, player VARCHAR);","SELECT school_club_team FROM table_name_34 WHERE player = ""paul dawkins"";","SELECT school_club_team FROM table_name_34 WHERE player = ""paul dawkins"";",1 What company plays on april 1?,"CREATE TABLE table_27733258_11 (team VARCHAR, date VARCHAR);","SELECT team FROM table_27733258_11 WHERE date = ""April 1"";","SELECT team FROM table_27733258_11 WHERE date = ""April 1"";",1 What is the average number of transactions per day for all decentralized applications launched before 2020?,"CREATE TABLE decentralized_apps (id INT, name VARCHAR(100), launch_date DATE, num_transactions INT); ","SELECT AVG(num_transactions) OVER (PARTITION BY launch_date < '2020-01-01') as avg_transactions_per_day, name, launch_date, num_transactions FROM decentralized_apps WHERE launch_date < '2020-01-01';",SELECT AVG(num_transactions) FROM decentralized_apps WHERE launch_date '2020-01-01';,0 "Which regions have the highest and lowest energy efficiency ratings in the buildings, energy_efficiency, and regions tables?","CREATE TABLE buildings(id INT, building_name VARCHAR(50), building_type VARCHAR(50), region_id INT);CREATE TABLE energy_efficiency(building_id INT, rating INT);CREATE TABLE regions(id INT, region_name VARCHAR(50), country VARCHAR(50));","SELECT r.region_name, AVG(e.rating) AS avg_rating FROM buildings b INNER JOIN energy_efficiency e ON b.id = e.building_id INNER JOIN regions r ON b.region_id = r.id GROUP BY r.region_name ORDER BY avg_rating DESC, region_name;","SELECT r.region_name, MAX(e.rating) as max_rating, MIN(e.rating) as min_rating FROM buildings b JOIN energy_efficiency e ON b.region_id = e.building_id JOIN regions r ON e.region_id = r.id GROUP BY r.region_name;",0 What is the number of 'High' severity threat intelligence alerts issued in Q3 of 2021?,"CREATE TABLE ThreatIntelligence (alert_id INT, date DATE, severity VARCHAR(255)); ",SELECT COUNT(*) FROM ThreatIntelligence WHERE MONTH(date) BETWEEN 7 AND 9 AND severity = 'High';,SELECT COUNT(*) FROM ThreatIntelligence WHERE severity = 'High' AND date BETWEEN '2021-04-01' AND '2021-06-30';,0 What is the average transaction amount for customers from the United States?,"CREATE TABLE customers (customer_id INT, name TEXT, country TEXT, transaction_amount DECIMAL); ",SELECT AVG(transaction_amount) FROM customers WHERE country = 'USA';,SELECT AVG(transaction_amount) FROM customers WHERE country = 'USA';,1 "Update the ""Status"" column in the ""Shipwrecks"" table, setting the value to 'Sunken' for all records where ""Year"" is less than 2000","CREATE TABLE Shipwrecks (Id INT, Year INT, Status VARCHAR(10));",UPDATE Shipwrecks SET Status = 'Sunken' WHERE Year < 2000;,UPDATE Shipwrecks SET Status = 'Sunken' WHERE Year 2000;,0 "Who was runner-up at Berlin when the result was 2-0 with 100,000 fans in attendance?","CREATE TABLE table_name_20 (runner_up VARCHAR, attendance VARCHAR, venue VARCHAR, result VARCHAR);","SELECT runner_up FROM table_name_20 WHERE venue = ""berlin"" AND result = ""2-0"" AND attendance = ""100,000"";","SELECT runner_up FROM table_name_20 WHERE venue = ""berlin"" AND result = ""2-0"" AND attendance = ""100000"";",0 What is the average revenue per day for a specific restaurant?,"CREATE TABLE daily_revenue (restaurant_id INT, revenue FLOAT, date DATE); ",SELECT AVG(revenue) as avg_daily_revenue FROM daily_revenue WHERE restaurant_id = 1;,SELECT AVG(revenue) FROM daily_revenue WHERE restaurant_id = 1;,0 What is the average labor productivity (measured in units of mineral extracted per employee) for each mine?,"CREATE TABLE Mines (MineID INT, MineName TEXT, Location TEXT, Employees INT); CREATE TABLE ExtractionData (ExtractionDataID INT, MineID INT, Date DATE, Mineral TEXT, Quantity INT);","SELECT Mines.MineName, AVG(Quantity/Employees) FROM Mines INNER JOIN ExtractionData ON Mines.MineID = ExtractionData.MineID GROUP BY Mines.MineName;","SELECT Mines.MineName, AVG(ExtractionData.Quantity) as AvgLocationPerEmployee FROM Mines INNER JOIN ExtractionData ON Mines.MineID = ExtractionData.MineID GROUP BY Mines.MineName;",0 "What is the weekly rank of the episode with more than 7.14mil viewers, a nightly rank of 5, and a rating/share of 2.9/10?","CREATE TABLE table_name_73 (rank__week_ VARCHAR, viewers__millions_ VARCHAR, rank__night_ VARCHAR, rating VARCHAR);","SELECT rank__week_ FROM table_name_73 WHERE viewers__millions_ > 7.14 AND rank__night_ = ""5"" AND rating / SHARE(18 - 49) = 2.9 / 10;","SELECT rank__week_ FROM table_name_73 WHERE rank__night_ = 5 AND rating = ""2.9/10"" AND viewers__millions_ > 7.14;",0 Who was Purdue's opponent?,"CREATE TABLE table_name_19 (opp_team VARCHAR, big_ten_team VARCHAR);","SELECT opp_team FROM table_name_19 WHERE big_ten_team = ""purdue"";","SELECT opp_team FROM table_name_19 WHERE big_ten_team = ""purdue"";",1 Calculate the percentage of water conservation in the state of Florida in June 2020 compared to June 2019,"CREATE TABLE conservation_initiatives (id INT, state VARCHAR(50), year INT, month INT, conservation_percentage FLOAT); ","SELECT (conservation_percentage_2020 - conservation_percentage_2019) / conservation_percentage_2019 * 100 AS percentage_change FROM (SELECT conservation_percentage AS conservation_percentage_2019 FROM conservation_initiatives WHERE state = 'Florida' AND year = 2019 AND month = 6) AS previous_year, (SELECT conservation_percentage AS conservation_percentage_2020 FROM conservation_initiatives WHERE state = 'Florida' AND year = 2020 AND month = 6) AS current_year;",SELECT conservation_percentage FROM conservation_initiatives WHERE state = 'Florida' AND year = 2020 AND month = 2019;,0 What is the maximum sustainable urbanism rating in the downtown area?,"CREATE TABLE property (id INT PRIMARY KEY, rating FLOAT, area VARCHAR(20));",SELECT MAX(rating) FROM property WHERE area = 'downtown';,SELECT MAX(rating) FROM property WHERE area = 'City Center';,0 Which cities are in both the top 5 for highest GHG emissions and the top 5 for highest population growth?,"CREATE TABLE city_emissions (city VARCHAR(50), ghg_emissions FLOAT); CREATE TABLE city_population (city VARCHAR(50), population_growth FLOAT); ; ",SELECT city FROM city_emissions WHERE ghg_emissions = (SELECT MAX(ghg_emissions) FROM city_emissions LIMIT 5) INTERSECT SELECT city FROM city_population WHERE population_growth = (SELECT MAX(population_growth) FROM city_population LIMIT 5),SELECT city FROM city_emissions ORDER BY ghg_emissions DESC LIMIT 5; SELECT city FROM city_population ORDER BY ghg_emissions DESC LIMIT 5;,0 What is the to par of the player from the United States with a t5 place?,"CREATE TABLE table_name_38 (to_par VARCHAR, country VARCHAR, place VARCHAR);","SELECT to_par FROM table_name_38 WHERE country = ""united states"" AND place = ""t5"";","SELECT to_par FROM table_name_38 WHERE country = ""united states"" AND place = ""t5"";",1 How many students with visual impairments received assistive technology support in the past year?,"CREATE TABLE student (id INT, disability VARCHAR(255)); CREATE TABLE support (id INT, student_id INT, type VARCHAR(255), date DATE); ","SELECT COUNT(s.id) as visual_impairment_support FROM support s JOIN student st ON s.student_id = st.id WHERE s.date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND st.disability = 'Visual Impairment' AND s.type IN ('Assistive Technology', 'Screen Reader');","SELECT COUNT(DISTINCT student.id) FROM student INNER JOIN support ON student.id = support.student_id WHERE student.disability = 'Visual Impairment' AND support.date >= DATEADD(year, -1, GETDATE());",0 What is the average billing amount for cases handled by attorneys with the last name 'Garcia'?,"CREATE TABLE attorneys (attorney_id INT, name TEXT, title TEXT); CREATE TABLE cases (case_id INT, attorney_id INT, billing_amount INT); ",SELECT AVG(billing_amount) FROM cases INNER JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.name = 'Garcia';,SELECT AVG(billing_amount) FROM cases JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.name = 'Garcia';,0 What is the name of the race on 9 July?,"CREATE TABLE table_name_72 (name VARCHAR, date VARCHAR);","SELECT name FROM table_name_72 WHERE date = ""9 july"";","SELECT name FROM table_name_72 WHERE date = ""9 july"";",1 Find the number of patients diagnosed with diabetes in each rural county in 2020,"CREATE TABLE rural_counties (county_name TEXT, region TEXT); CREATE TABLE patients (patient_id INTEGER, county TEXT, diagnosis TEXT, visit_date DATE); ","SELECT county, COUNT(*) as num_diabetes_patients FROM patients WHERE diagnosis = 'diabetes' AND YEAR(visit_date) = 2020 GROUP BY county;","SELECT r.county_name, COUNT(p.patient_id) FROM rural_counties r JOIN patients p ON r.county = p.county WHERE p.diagnosis = 'Diabetes' AND YEAR(p.visit_date) = 2020 GROUP BY r.county_name;",0 What are the recycling rates for factories located in the Asia-Pacific region?,"CREATE TABLE factories (name TEXT, id INTEGER, region TEXT); CREATE TABLE recycling_rates (factory_id INTEGER, rate FLOAT); ","SELECT f.name, r.rate FROM factories f JOIN recycling_rates r ON f.id = r.factory_id WHERE f.region = 'Asia-Pacific';",SELECT r.rate FROM recycling_rates r JOIN factories f ON r.factory_id = f.id WHERE f.region = 'Asia-Pacific';,0 What is the total number of events that had 34 cuts and 3 in the top 10?,"CREATE TABLE table_name_58 (events VARCHAR, cuts_made VARCHAR, top_10 VARCHAR);",SELECT COUNT(events) FROM table_name_58 WHERE cuts_made < 34 AND top_10 > 3;,SELECT COUNT(events) FROM table_name_58 WHERE cuts_made = 34 AND top_10 = 3;,0 "What is the total sales revenue per sales representative, ranked by sales revenue?","CREATE TABLE DrugSales (SalesRepID int, DrugName varchar(50), SalesDate date, TotalSalesRev decimal(18,2)); ","SELECT SalesRepID, SUM(TotalSalesRev) as TotalSales, ROW_NUMBER() OVER (ORDER BY SUM(TotalSalesRev) DESC) as SalesRank FROM DrugSales GROUP BY SalesRepID;","SELECT SalesRepID, DrugName, TotalSalesRev, RANK() OVER (ORDER BY TotalSalesRev DESC) as SalesRevenueRank FROM DrugSales GROUP BY SalesRepID, DrugName;",0 What is the type of measure that voted on the Power Development Debt Limit Amendment?,"CREATE TABLE table_256286_45 (type VARCHAR, description VARCHAR);","SELECT type FROM table_256286_45 WHERE description = ""Power Development Debt Limit Amendment"";","SELECT type FROM table_256286_45 WHERE description = ""Power Development Debt Limit Amendment"";",1 What is the total revenue generated from eco-friendly accommodations in France?,"CREATE TABLE bookings (id INT, accommodation_id INT, revenue FLOAT); CREATE TABLE accommodations (id INT, name TEXT, country TEXT, is_eco_friendly BOOLEAN); ",SELECT SUM(b.revenue) FROM bookings b JOIN accommodations a ON b.accommodation_id = a.id WHERE a.country = 'France' AND a.is_eco_friendly = TRUE;,SELECT SUM(bookings.revenue) FROM bookings INNER JOIN accommodations ON bookings.accommodation_id = accommodations.id WHERE accommodations.country = 'France' AND accommodations.is_eco_friendly = true;,0 What was the record for the game played by the home team San Francisco 49ers and visitor Philadelphia Eagles?,"CREATE TABLE table_name_58 (record VARCHAR, home VARCHAR, visitor VARCHAR);","SELECT record FROM table_name_58 WHERE home = ""san francisco 49ers"" AND visitor = ""philadelphia eagles"";","SELECT record FROM table_name_58 WHERE home = ""san francisco 49ers"" AND visitor = ""philadelphia eagles"";",1 What is the total CO2 emissions reduction in CityC due to electric vehicle adoption?,"CREATE TABLE electric_vehicles (vehicle_id INT, co2_emission_reduction FLOAT, city VARCHAR(20)); ",SELECT SUM(co2_emission_reduction) FROM electric_vehicles WHERE city = 'CityC';,SELECT SUM(co2_emission_reduction) FROM electric_vehicles WHERE city = 'CityC';,1 What is the L2 cache for the core i7-2635QM?,"CREATE TABLE table_name_65 (l2_cache VARCHAR, model_number VARCHAR);","SELECT l2_cache FROM table_name_65 WHERE model_number = ""core i7-2635qm"";","SELECT l2_cache FROM table_name_65 WHERE model_number = ""core i7-2635qm"";",1 What was the total military equipment sales value to Oceania countries in 2021?,"CREATE TABLE military_sales (id INT, country VARCHAR(50), year INT, value FLOAT); ","SELECT SUM(value) FROM military_sales WHERE YEAR(FROM_UNIXTIME(timestamp)) = 2021 AND country IN ('Australia', 'New Zealand');",SELECT SUM(value) FROM military_sales WHERE country LIKE 'Oceania%' AND year = 2021;,0 What's the combined list of astronauts who have flown on both the Space Shuttle and Soyuz spacecraft?,"CREATE TABLE SpaceShuttleAstronauts (AstronautName TEXT, Missions INTEGER);CREATE TABLE SoyuzAstronauts (AstronautName TEXT, Missions INTEGER);",SELECT AstronautName FROM SpaceShuttleAstronauts WHERE Missions > 1 INTERSECT SELECT AstronautName FROM SoyuzAstronauts WHERE Missions > 1;,SELECT COUNT(*) FROM SpaceShuttleAstronauts INNER JOIN SoyuzAstronauts ON SpaceShuttleAstronauts.AstronautName = SoyuzAstronauts.AstronautName;,0 How many players had the most points in the game @ Milwaukee?,"CREATE TABLE table_11960944_6 (high_points VARCHAR, team VARCHAR);","SELECT COUNT(high_points) FROM table_11960944_6 WHERE team = ""@ Milwaukee"";","SELECT COUNT(high_points) FROM table_11960944_6 WHERE team = ""@ Milwaukee"";",1 How many sustainable projects were completed in Texas in 2021?,"CREATE TABLE Projects (Id INT, Name VARCHAR(50), City VARCHAR(50), StartDate DATE, EndDate DATE, Sustainable BOOLEAN);",SELECT COUNT(p.Id) FROM Projects p WHERE p.City = 'Texas' AND p.EndDate <= '2021-12-31' AND p.Sustainable = TRUE;,SELECT COUNT(*) FROM Projects WHERE City = 'Texas' AND YEAR(StartDate) = 2021 AND Sustainable = TRUE;,0 What is the total number of vaccinations administered to indigenous people in Canada?,"CREATE TABLE Vaccinations (VaccinationID INT, PatientID INT, Age INT, Ethnicity VARCHAR(30), VaccineType VARCHAR(20), Date DATE); ",SELECT COUNT(*) FROM Vaccinations WHERE Ethnicity = 'Indigenous' AND Country = 'Canada';,SELECT COUNT(*) FROM Vaccinations WHERE Ethnicity = 'Indigenous' AND Country = 'Canada';,1 List all mines in Australia and their respective mineral types.,"CREATE TABLE australia_mines (id INT, mine_name TEXT, location TEXT, mineral TEXT); ","SELECT id, mine_name, location, mineral FROM australia_mines;","SELECT mine_name, mineral FROM australia_mines;",0 What was the value in 2006 when 2003 was not held and 2012 was A?,CREATE TABLE table_name_40 (Id VARCHAR);,"SELECT 2006 FROM table_name_40 WHERE 2003 = ""not held"" AND 2012 = ""a"";","SELECT 2006 FROM table_name_40 WHERE 2003 = ""not held"" AND 2012 = ""a"";",1 "Which player made the highest number of assists during the game played at the FleetCenter, with end score of W 120-87?","CREATE TABLE table_name_96 (high_assists VARCHAR, location_attendance VARCHAR, score VARCHAR);","SELECT high_assists FROM table_name_96 WHERE location_attendance = ""fleetcenter"" AND score = ""w 120-87"";","SELECT high_assists FROM table_name_96 WHERE location_attendance = ""fleetcenter"" AND score = ""w 120-87"";",1 Who are the top 2 most expensive female painters from Asia?,"CREATE TABLE Artworks (artwork_id INT, name VARCHAR(255), artist_id INT, date_sold DATE, price DECIMAL(10,2)); CREATE TABLE Artists (artist_id INT, name VARCHAR(255), nationality VARCHAR(255), gender VARCHAR(255));","SELECT Artists.name, MAX(Artworks.price) as price FROM Artists INNER JOIN Artworks ON Artists.artist_id = Artworks.artist_id WHERE Artists.gender = 'Female' AND Artists.nationality = 'Asian' GROUP BY Artists.name ORDER BY price DESC LIMIT 2;","SELECT Artists.name, SUM(Artworks.price) as total_price FROM Artists INNER JOIN Artworks ON Artists.artist_id = Artworks.artist_id WHERE Artists.gender = 'Female' AND Artists.nationality = 'Asia' GROUP BY Artists.name ORDER BY total_price DESC LIMIT 2;",0 How many size 14 garments were sold in Canada in the last month?,"CREATE TABLE sales (id INT, garment_id INT, size INT, sale_date DATE, country VARCHAR(50)); ","SELECT COUNT(*) FROM sales WHERE size = 14 AND country = 'Canada' AND sale_date >= DATEADD(month, -1, GETDATE());","SELECT COUNT(*) FROM sales WHERE size = 14 AND country = 'Canada' AND sale_date >= DATEADD(month, -1, GETDATE());",1 "What is the number of against when the wins were 8, and a Club of South Warrnambool, with less than 0 draws?","CREATE TABLE table_name_29 (against INTEGER, draws VARCHAR, wins VARCHAR, club VARCHAR);","SELECT SUM(against) FROM table_name_29 WHERE wins = 8 AND club = ""south warrnambool"" AND draws < 0;","SELECT SUM(against) FROM table_name_29 WHERE wins = 8 AND club = ""south warrnambool"" AND draws 0;",0 How many autonomous driving research projects were completed in '2020' and '2021' in the 'research' table?,"CREATE TABLE research (year INT, type VARCHAR(15)); ","SELECT COUNT(*) FROM research WHERE type = 'autonomous driving' AND year IN (2020, 2021);","SELECT COUNT(*) FROM research WHERE year IN (2020, 2021) AND type = 'Autonomous Driving';",0 What is the earliest launch date for a space mission for SpaceX?,"CREATE TABLE space_missions (mission_id INT, mission_name VARCHAR(50), launch_date DATE, return_date DATE, mission_company VARCHAR(50));",SELECT MIN(launch_date) AS earliest_launch_date FROM space_missions WHERE mission_company = 'SpaceX';,SELECT MIN(launch_date) FROM space_missions WHERE mission_company = 'SpaceX';,0 What is the average year with nominated result?,"CREATE TABLE table_name_32 (year INTEGER, result VARCHAR);","SELECT AVG(year) FROM table_name_32 WHERE result = ""nominated"";","SELECT AVG(year) FROM table_name_32 WHERE result = ""nominated"";",1 What is the total number of streams for hip hop artists in the United States?,"CREATE TABLE Artists (ArtistID int, ArtistName varchar(100), Genre varchar(50), Country varchar(50)); CREATE TABLE StreamingData (StreamDate date, ArtistID int, Streams int); ",SELECT SUM(Streams) as TotalStreams FROM Artists JOIN StreamingData ON Artists.ArtistID = StreamingData.ArtistID WHERE Artists.Genre = 'Hip Hop' AND Artists.Country = 'United States';,SELECT SUM(Streams) FROM StreamingData JOIN Artists ON StreamingData.ArtistID = Artists.ArtistID WHERE Artists.Genre = 'Hip Hop' AND Artists.Country = 'United States';,0 "What is the total installed capacity (in MW) of wind energy projects in Vietnam, Thailand, and Indonesia up to 2020?","CREATE TABLE wind_energy_projects (project_id INT, country VARCHAR(50), capacity_mw FLOAT, completion_year INT); ","SELECT SUM(capacity_mw) FROM wind_energy_projects WHERE country IN ('Vietnam', 'Thailand', 'Indonesia') AND completion_year <= 2020;","SELECT SUM(capacity_mw) FROM wind_energy_projects WHERE country IN ('Vietnam', 'Thailand', 'Indonesia') AND completion_year >= 2020;",0 What is the average ticket price for concerts in the state of New York?,"CREATE TABLE concert_sales (id INT, state VARCHAR, price DECIMAL);",SELECT AVG(price) FROM concert_sales WHERE state = 'New York';,SELECT AVG(price) FROM concert_sales WHERE state = 'New York';,1 "Rank engineers in the 'SouthWest' region by the number of projects they have, in descending order, and show only those with more than 5 projects.","CREATE TABLE Engineers (ID INT, Name VARCHAR(255), Region VARCHAR(255), Projects INT, Cost DECIMAL(10,2)); ","SELECT ID, Name, Region, Projects, RANK() OVER (PARTITION BY Region ORDER BY Projects DESC) AS Rank FROM Engineers WHERE Region = 'SouthWest' AND Projects > 5 ORDER BY Region, Rank;","SELECT Name, Projects FROM Engineers WHERE Region = 'SouthWest' ORDER BY Projects DESC;",0 Find the total funding received by companies with female founders in the last 5 years,"CREATE TABLE funds (company_id INT, funding_amount DECIMAL(10, 2), funding_date DATE); ","SELECT SUM(funding_amount) FROM funds INNER JOIN companies ON funds.company_id = companies.company_id WHERE companies.founder_gender = 'Female' AND funds.funding_date BETWEEN DATEADD(year, -5, GETDATE()) AND GETDATE();","SELECT SUM(funding_amount) FROM funds WHERE company_id IN (SELECT company_id FROM companies WHERE founder_type = 'Female') AND funding_date >= DATEADD(year, -5, GETDATE());",0 How many 'machines' are there in the 'factory1' location?,"CREATE TABLE machines (location VARCHAR(50), quantity INT); ",SELECT quantity FROM machines WHERE location = 'factory1';,SELECT SUM(quantity) FROM machines WHERE location = 'factory1';,0 What is the maximum property tax in each neighborhood for co-ownership properties?,"CREATE TABLE co_ownership_property (id INT, property_id INT, property_tax DECIMAL(5,2), neighborhood_id INT); ","SELECT n.name AS neighborhood, MAX(cp.property_tax) AS max_property_tax FROM co_ownership_property cp JOIN neighborhood n ON cp.neighborhood_id = n.id GROUP BY n.name;","SELECT neighborhood_id, MAX(property_tax) FROM co_ownership_property GROUP BY neighborhood_id;",0 How many traditional music pieces were created in each country and their average duration?,"CREATE TABLE TraditionalMusicCountry (id INT, piece VARCHAR(255), country VARCHAR(255), duration INT); ","SELECT country, piece, COUNT(*) as total_pieces, AVG(duration) as avg_duration FROM TraditionalMusicCountry GROUP BY country, piece;","SELECT country, COUNT(*), AVG(duration) FROM TraditionalMusicCountry GROUP BY country;",0 What are the names and quantities of items in the inventory of warehouse 'BOS' that have not been shipped?,"CREATE TABLE warehouse (id VARCHAR(5), name VARCHAR(10), location VARCHAR(15)); CREATE TABLE inventory (item_id VARCHAR(10), item_name VARCHAR(20), warehouse_id VARCHAR(5), quantity INT); CREATE TABLE shipment (item_id VARCHAR(10), warehouse_id VARCHAR(5), shipped_quantity INT); ","SELECT i.item_name, i.quantity FROM inventory i JOIN warehouse w ON i.warehouse_id = w.id WHERE w.name = 'BOS' AND i.item_id NOT IN (SELECT item_id FROM shipment);","SELECT i.item_name, i.quantity FROM inventory i JOIN shipment s ON i.item_id = s.item_id WHERE i.warehouse_id = 'BOS' AND s.shipped_quantity IS NULL;",0 Name the most 3 car sets,CREATE TABLE table_19255192_2 (Id VARCHAR);,SELECT MAX(3 AS _car_sets) FROM table_19255192_2;,SELECT COUNT(*) FROM table_19255192_2;,0 Display the number of intelligence operations conducted in the first quarter of 2022.,"CREATE TABLE intelligence_ops (id INT, operation_date DATE); ",SELECT COUNT(*) FROM intelligence_ops WHERE operation_date >= '2022-01-01' AND operation_date <= '2022-03-31';,SELECT COUNT(*) FROM intelligence_ops WHERE operation_date BETWEEN '2022-01-01' AND '2022-03-31';,0 How many climate adaptation projects were completed in each year?,"CREATE TABLE adaptation (year INTEGER, completion_status TEXT); ","SELECT year, COUNT(*) FROM adaptation WHERE completion_status = 'completed' GROUP BY year;","SELECT year, COUNT(*) FROM adaptation GROUP BY year;",0 What is the average Apps of indonesia with Goals smaller than 1000?,"CREATE TABLE table_name_64 (apps INTEGER, country VARCHAR, goals VARCHAR);","SELECT AVG(apps) FROM table_name_64 WHERE country = ""indonesia"" AND goals < 1000;","SELECT AVG(apps) FROM table_name_64 WHERE country = ""indonesia"" AND goals 1000;",0 Find the total quantity of sustainable materials used in the last 6 months in the UK.,"CREATE TABLE Materials(id INT, material_name VARCHAR(50), quantity INT, usage_date DATE, is_sustainable BOOLEAN); ","SELECT SUM(quantity) FROM Materials WHERE is_sustainable = true AND usage_date >= DATEADD(month, -6, GETDATE()) AND usage_country = 'UK';","SELECT SUM(quantity) FROM Materials WHERE is_sustainable = true AND usage_date >= DATEADD(month, -6, GETDATE());",0 Who had a ballet style with original cast?,"CREATE TABLE table_name_80 (name VARCHAR, style VARCHAR, status VARCHAR);","SELECT name FROM table_name_80 WHERE style = ""ballet"" AND status = ""original cast"";","SELECT name FROM table_name_80 WHERE style = ""ballet"" AND status = ""original cast"";",1 How many renewable energy projects were completed per year in Canada?,"CREATE TABLE renewable_energy_projects (id INT, project_name VARCHAR(100), completion_date DATE, country VARCHAR(50));","SELECT YEAR(completion_date) AS project_year, COUNT(*) AS projects_per_year FROM renewable_energy_projects WHERE country = 'Canada' GROUP BY project_year ORDER BY project_year;","SELECT EXTRACT(YEAR FROM completion_date) AS year, COUNT(*) FROM renewable_energy_projects WHERE country = 'Canada' GROUP BY year;",0 What is the total revenue generated by the hotels table for each continent?,"CREATE TABLE hotels (id INT, hotel_name VARCHAR(50), country VARCHAR(50), continent VARCHAR(50), revenue INT);","SELECT continent, SUM(revenue) FROM hotels GROUP BY continent;","SELECT continent, SUM(revenue) FROM hotels GROUP BY continent;",1 In what stadium did a game result in a final scoreline reading 27-34?,"CREATE TABLE table_name_30 (stadium VARCHAR, final_score VARCHAR);","SELECT stadium FROM table_name_30 WHERE final_score = ""27-34"";","SELECT stadium FROM table_name_30 WHERE final_score = ""27-34"";",1 What is the average number of citizen feedback messages received per day in each city?,"CREATE TABLE city_feedback (feedback_id INT, city_name VARCHAR(50), feedback_date DATE); ","SELECT city_name, AVG(ROW_NUMBER() OVER (PARTITION BY city_name ORDER BY feedback_date)) as avg_feedback_per_day FROM city_feedback GROUP BY city_name;","SELECT city_name, AVG(COUNT(*)) as avg_feedback_per_day FROM city_feedback GROUP BY city_name;",0 When falcons are the nickname what is the type?,"CREATE TABLE table_262495_1 (type VARCHAR, nickname VARCHAR);","SELECT type FROM table_262495_1 WHERE nickname = ""Falcons"";","SELECT type FROM table_262495_1 WHERE nickname = ""Falcons"";",1 "Which rider had fewer than 10 laps for the Aprilia manufacturer, finishing in retirement?","CREATE TABLE table_name_22 (rider VARCHAR, time_retired VARCHAR, laps VARCHAR, manufacturer VARCHAR);","SELECT rider FROM table_name_22 WHERE laps < 10 AND manufacturer = ""aprilia"" AND time_retired = ""retirement"";","SELECT rider FROM table_name_22 WHERE laps 10 AND manufacturer = ""aprilia"" AND time_retired = ""retirement"";",0 How many wheels does the train owned by Texas and New Orleans Railroad #319 have?,"CREATE TABLE table_1057316_1 (wheel_arrangement___whyte_notation__ VARCHAR, operational_owner_s_ VARCHAR);","SELECT COUNT(wheel_arrangement___whyte_notation__) FROM table_1057316_1 WHERE operational_owner_s_ = ""Texas and New Orleans Railroad #319"";","SELECT COUNT(wheel_arrangement___whyte_notation__) FROM table_1057316_1 WHERE operational_owner_s_ = ""Texas and New Orleans Railroad #319"";",1 Insert a new record in the 'autonomous_vehicles' table for a new self-driving taxi from 'AutoDriver',"CREATE TABLE autonomous_vehicles ( id INT PRIMARY KEY, manufacturer VARCHAR(255), model VARCHAR(255), year INT, type VARCHAR(255) );","INSERT INTO autonomous_vehicles (id, manufacturer, model, year, type) VALUES ((SELECT COALESCE(MAX(id), 0) + 1 FROM autonomous_vehicles), 'AutoDriver', 'AutoDriver Taxi', 2023, 'taxi');","INSERT INTO autonomous_vehicles (id, manufacturer, model, year, type) VALUES (1, 'AutoDriver', 'Taxi', 'Self-driving', '2019-01-01');",0 Delete all records in the 'animals' table where the 'species' is 'shark',"CREATE TABLE animals (id INT, name VARCHAR(50), species VARCHAR(50), location VARCHAR(50)); ",DELETE FROM animals WHERE species = 'shark';,DELETE FROM animals WHERE species ='shark';,0 What was part 4 when part 3 was *hleupun?,"CREATE TABLE table_name_65 (part_4 VARCHAR, part_3 VARCHAR);","SELECT part_4 FROM table_name_65 WHERE part_3 = ""*hleupun"";","SELECT part_4 FROM table_name_65 WHERE part_3 = ""*hleupun"";",1 Which position did the player hold that played for the Philadelphia Flyers in NHL?,"CREATE TABLE table_1473672_3 (position VARCHAR, nhl_team VARCHAR);","SELECT position FROM table_1473672_3 WHERE nhl_team = ""Philadelphia Flyers"";","SELECT position FROM table_1473672_3 WHERE nhl_team = ""Philadelphia Flyers"";",1 Identify the top 3 countries with the highest average exit strategy valuation for startups founded by LGBTQ+ entrepreneurs.,"CREATE TABLE startups(id INT, name TEXT, founder TEXT, exit_strategy_valuation FLOAT, country TEXT); ","SELECT country, AVG(exit_strategy_valuation) as avg_valuation FROM startups WHERE founder IN ('Alex Garcia', 'Jamie Brown', 'Sophia Lee', 'Kim Taylor') GROUP BY country ORDER BY avg_valuation DESC LIMIT 3;","SELECT country, AVG(exit_strategy_valuation) as avg_exit_strategy_valuation FROM startups WHERE founder LIKE '%LGBTQ+%' GROUP BY country ORDER BY avg_exit_strategy_valuation DESC LIMIT 3;",0 What is the total number of crimes reported in 'crime_data' and 'community_policing' tables?,"CREATE TABLE crime_data (id INT, type VARCHAR(255), location VARCHAR(255), reported_date DATE); CREATE TABLE community_policing (id INT, type VARCHAR(255), location VARCHAR(255), reported_date DATE); ",SELECT COUNT(*) FROM crime_data UNION SELECT COUNT(*) FROM community_policing;,SELECT COUNT(*) FROM crime_data; SELECT COUNT(*) FROM community_policing;,0 Name the team which has high rebounds of smith (10),"CREATE TABLE table_name_96 (team VARCHAR, high_rebounds VARCHAR);","SELECT team FROM table_name_96 WHERE high_rebounds = ""smith (10)"";","SELECT team FROM table_name_96 WHERE high_rebounds = ""smith (10)"";",1 Get defense projects with no contracts for 'Asia Pacific',"CREATE TABLE defense_projects (proj_id INT, proj_name VARCHAR(50), region VARCHAR(50)); CREATE TABLE defense_contracts (cont_id INT, cont_name VARCHAR(50), proj_id INT, cont_status VARCHAR(50));",SELECT dp.* FROM defense_projects dp LEFT JOIN defense_contracts dc ON dp.proj_id = dc.proj_id WHERE dc.proj_id IS NULL AND dp.region = 'Asia Pacific';,SELECT defense_projects.proj_name FROM defense_projects INNER JOIN defense_contracts ON defense_projects.proj_id = defense_contracts.proj_id WHERE defense_projects.region = 'Asia Pacific' AND defense_contracts.cont_id IS NULL;,0 How many workers were employed in each department during the year 2019?,"CREATE TABLE workers(id INT, name TEXT, department TEXT, year INT);","SELECT department, COUNT(DISTINCT id) FROM workers WHERE year = 2019 GROUP BY department;","SELECT department, COUNT(*) FROM workers WHERE year = 2019 GROUP BY department;",0 How many courses in total are listed?,CREATE TABLE Courses (Id VARCHAR);,SELECT COUNT(*) FROM Courses;,SELECT COUNT(*) FROM Courses;,1 What is the number of military exercises conducted by South Korea with the United States in 2019?,"CREATE TABLE military_exercises (id INT, country VARCHAR(255), year INT, exercise_name VARCHAR(255)); ",SELECT COUNT(*) FROM military_exercises WHERE country = 'United States' AND year = 2019;,SELECT COUNT(*) FROM military_exercises WHERE country = 'South Korea' AND year = 2019 AND exercise_name = 'United States';,0 "What are the email addresses of teachers whose address has zip code ""918""?","CREATE TABLE Addresses (address_id VARCHAR, zip_postcode VARCHAR); CREATE TABLE Teachers (email_address VARCHAR, address_id VARCHAR);","SELECT T2.email_address FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T1.zip_postcode = ""918"";","SELECT T1.email_address FROM Teachers AS T1 JOIN Addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.zip_postcode = ""918"";",0 "How many tickets were sold and how many were available for the shows that grossed $348,674?","CREATE TABLE table_name_30 (ticket_sold___available VARCHAR, ticket_grossing VARCHAR);","SELECT ticket_sold___available FROM table_name_30 WHERE ticket_grossing = ""$348,674"";","SELECT ticket_sold___available FROM table_name_30 WHERE ticket_grossing = ""$368,674"";",0 Which ingredients are used in more than 3 products?,"CREATE TABLE IngredientSource (id INT, product_id INT, ingredient VARCHAR(50), country VARCHAR(30)); ","SELECT ingredient, COUNT(DISTINCT product_id) as product_count FROM IngredientSource GROUP BY ingredient HAVING COUNT(DISTINCT product_id) > 3;",SELECT ingredient FROM IngredientSource GROUP BY ingredient HAVING COUNT(*) > 3;,0 Who was the opponent during the tournament in Kuwait?,"CREATE TABLE table_name_91 (opponent_in_the_final VARCHAR, tournament VARCHAR);","SELECT opponent_in_the_final FROM table_name_91 WHERE tournament = ""kuwait"";","SELECT opponent_in_the_final FROM table_name_91 WHERE tournament = ""kuwait"";",1 "How many chemical manufacturing facilities are there in each region (North, South, Central, East, West) in Africa?","CREATE TABLE african_facilities (facility_id INT, facility_name TEXT, region TEXT); ","SELECT region, COUNT(*) as facility_count FROM african_facilities GROUP BY region;","SELECT region, COUNT(*) FROM african_facilities GROUP BY region;",0 What is the date of the game at Commerce Bank Ballpark?,"CREATE TABLE table_name_67 (date VARCHAR, field VARCHAR);","SELECT date FROM table_name_67 WHERE field = ""commerce bank ballpark"";","SELECT date FROM table_name_67 WHERE field = ""commercio bank ballpark"";",0 what position did the player from connecticut play,"CREATE TABLE table_10015132_7 (position VARCHAR, school_club_team VARCHAR);","SELECT position FROM table_10015132_7 WHERE school_club_team = ""Connecticut"";","SELECT position FROM table_10015132_7 WHERE school_club_team = ""Connecticut"";",1 What is the total number of donations and total amount donated by each age group in the 'Donors' table?,"CREATE TABLE Donors (DonorID int, DonorName varchar(50), DonorAge int, DonationCount int, TotalDonations numeric(18,2));","SELECT DonorAge, SUM(DonationCount) as TotalDonationsCount, SUM(TotalDonations) as TotalDonationsAmount FROM Donors GROUP BY DonorAge;","SELECT DonorAge, SUM(DonationCount) as TotalDonations, SUM(TotalDonations) as TotalDonated FROM Donors GROUP BY DonorAge;",0 What is the percentage of cases won by the prosecution and the defense in each court location in the US?,"CREATE TABLE case_outcomes (case_id INT, prosecution_win BOOLEAN, defense_win BOOLEAN, court_location VARCHAR(50)); ","SELECT court_location, 100.0 * AVG(prosecution_win::INT) AS prosecution_win_percentage, 100.0 * AVG(defense_win::INT) AS defense_win_percentage FROM case_outcomes GROUP BY court_location;","SELECT court_location, (CASE WHEN prosecution_win = TRUE THEN 1 ELSE 0 END) * 100.0 / COUNT(*) AS percentage FROM case_outcomes WHERE court_location = 'US' GROUP BY court_location;",0 What was the result of the 4:27 fight?,"CREATE TABLE table_name_51 (res VARCHAR, time VARCHAR);","SELECT res FROM table_name_51 WHERE time = ""4:27"";","SELECT res FROM table_name_51 WHERE time = ""4:27"";",1 What is the maximum production in the 'crop_yield' table for each year?,"CREATE TABLE crop_yield (id INT, year INT, crop_type VARCHAR(20), production INT);","SELECT year, MAX(production) FROM crop_yield GROUP BY year;","SELECT year, MAX(production) FROM crop_yield GROUP BY year;",1 tipuani municipality when tacacoma municipality is 6?,"CREATE TABLE table_2509202_2 (tipuani_municipality VARCHAR, tacacoma_municipality VARCHAR);","SELECT tipuani_municipality FROM table_2509202_2 WHERE tacacoma_municipality = ""6"";",SELECT tipuani_municipality FROM table_2509202_2 WHERE tacacoma_municipality = 6;,0 "What season has a number less than 90, Mitte as the league and spvgg ruhmannsfelden as the team?","CREATE TABLE table_name_95 (season VARCHAR, team VARCHAR, number VARCHAR, league VARCHAR);","SELECT season FROM table_name_95 WHERE number < 90 AND league = ""mitte"" AND team = ""spvgg ruhmannsfelden"";","SELECT season FROM table_name_95 WHERE number 90 AND league = ""mitte"" AND team = ""spvgg ruhmannsfelden"";",0 How many employees in the Marketing department have a bachelor's degree and speak Spanish?,"CREATE TABLE Employees (EmployeeID INT, Department VARCHAR(20), HasBachelorsDegree BOOLEAN, SpeaksSpanish BOOLEAN); ",SELECT COUNT(*) FROM Employees WHERE Department = 'Marketing' AND HasBachelorsDegree = true AND SpeaksSpanish = true;,SELECT COUNT(*) FROM Employees WHERE Department = 'Marketing' AND HasBachelorsDegree = TRUE AND SpeaksSpanish = TRUE;,0 What is the sector is the establishment is 110313?,"CREATE TABLE table_23802822_1 (sector VARCHAR, establishments VARCHAR);",SELECT sector FROM table_23802822_1 WHERE establishments = 110313;,SELECT sector FROM table_23802822_1 WHERE establishments = 110313;,1 What was the total time for the match that ocurred in Round 3 with opponent Keith Wisniewski?,"CREATE TABLE table_name_39 (time VARCHAR, round VARCHAR, opponent VARCHAR);","SELECT time FROM table_name_39 WHERE round = ""3"" AND opponent = ""keith wisniewski"";","SELECT COUNT(time) FROM table_name_39 WHERE round = 3 AND opponent = ""keith wisniewski"";",0 Name the company where index weighting % is 11.96,"CREATE TABLE table_168274_1 (company VARCHAR, index_weighting___percentage__at_17_january_2013 VARCHAR);","SELECT company FROM table_168274_1 WHERE index_weighting___percentage__at_17_january_2013 = ""11.96"";","SELECT company FROM table_168274_1 WHERE index_weighting___percentage__at_17_january_2013 = ""11.96"";",1 How many rural infrastructure projects were completed in each year from the 'project_completion_dates_2' table?,"CREATE TABLE project_completion_dates_2 (id INT, project_id INT, completion_date DATE); ","SELECT EXTRACT(YEAR FROM completion_date) AS Year, COUNT(DISTINCT project_id) AS Number_Of_Projects FROM project_completion_dates_2 GROUP BY Year;","SELECT EXTRACT(YEAR FROM completion_date) AS year, COUNT(*) FROM project_completion_dates_2 GROUP BY year;",0 "Which Year named has a Name of nuptadi planitia, and a Diameter (km) larger than 1,200.0?","CREATE TABLE table_name_84 (year_named INTEGER, name VARCHAR, diameter__km_ VARCHAR);","SELECT MIN(year_named) FROM table_name_84 WHERE name = ""nuptadi planitia"" AND diameter__km_ > 1 OFFSET 200.0;","SELECT SUM(year_named) FROM table_name_84 WHERE name = ""nuptadi planitia"" AND diameter__km_ > 1 OFFSET 200.0;",0 How many grants were given in each state?,"CREATE TABLE Nonprofits (NonprofitID INT, Name VARCHAR(50), City VARCHAR(50), State VARCHAR(2), Zip VARCHAR(10), MissionStatement TEXT); CREATE TABLE Grants (GrantID INT, DonorID INT, NonprofitID INT, GrantAmount DECIMAL(10,2), Date DATE);","SELECT State, COUNT(*) FROM Nonprofits N INNER JOIN Grants G ON N.NonprofitID = G.NonprofitID GROUP BY State;","SELECT Nonprofits.State, COUNT(Grants.GrantID) FROM Nonprofits INNER JOIN Grants ON Nonprofits.NonprofitID = Grants.NonprofitID GROUP BY Nonprofits.State;",0 How many public schools are there in Texas with an average teacher age above 45?,"CREATE TABLE public_schools (id INT, name TEXT, location TEXT, num_students INT, avg_teacher_age FLOAT); ",SELECT COUNT(*) FROM public_schools WHERE location = 'TX' AND avg_teacher_age > 45;,SELECT COUNT(*) FROM public_schools WHERE location = 'Texas' AND avg_teacher_age > 45;,0 What's the team's status in the Open Cup in 2006?,"CREATE TABLE table_1990460_1 (open_cup VARCHAR, year VARCHAR);",SELECT open_cup FROM table_1990460_1 WHERE year = 2006;,SELECT open_cup FROM table_1990460_1 WHERE year = 2006;,1 What is the Free Agent Type for player bryant johnson?,"CREATE TABLE table_name_2 (free_agent_type VARCHAR, player VARCHAR);","SELECT free_agent_type FROM table_name_2 WHERE player = ""bryant johnson"";","SELECT free_agent_type FROM table_name_2 WHERE player = ""bryant johnson"";",1 What is the average sustainability rating for organic products?,"CREATE TABLE products (product_id INT, name VARCHAR(100), is_organic BOOLEAN, sustainability_rating FLOAT); ",SELECT AVG(sustainability_rating) FROM products WHERE is_organic = true;,SELECT AVG(sustainability_rating) FROM products WHERE is_organic = true;,1 Compare virtual tour engagement metrics between Asia and Europe.,"CREATE TABLE virtual_tours (hotel_id INT, location VARCHAR(20), views INT, clicks INT);","SELECT location, AVG(views) as avg_views, AVG(clicks) as avg_clicks FROM virtual_tours WHERE location IN ('Asia', 'Europe') GROUP BY location","SELECT location, views, clicks FROM virtual_tours WHERE location IN ('Asia', 'Europe');",0 Count the number of subscribers in each network type.,"CREATE TABLE subscriber_details (subscriber_id INT, network_type VARCHAR(10)); ","SELECT network_type, COUNT(*) FROM subscriber_details GROUP BY network_type;","SELECT network_type, COUNT(*) FROM subscriber_details GROUP BY network_type;",1 "Which date has a Kickoff [a] of 4:00, and an Opponent of detroit lions?","CREATE TABLE table_name_34 (date VARCHAR, opponent VARCHAR, kickoff_ VARCHAR, a_ VARCHAR);","SELECT date FROM table_name_34 WHERE kickoff_[a_] = ""4:00"" AND opponent = ""detroit lions"";","SELECT date FROM table_name_34 WHERE kickoff_[a_] = ""4:00"" AND opponent = ""detroit lions"";",1 "Get the construction labor statistics for California, including the total number of construction workers, average hourly wage, and total payroll for the year 2020","CREATE TABLE labor_statistics (state VARCHAR(2), year INT, total_workers INT, avg_hourly_wage DECIMAL(5,2), total_payroll DECIMAL(10,2)); ",SELECT * FROM labor_statistics WHERE state = 'CA' AND year = 2020;,"SELECT state, SUM(total_workers) as total_workers, AVG(avg_hourly_wage) as avg_hourly_wage, SUM(total_payroll) as total_payroll FROM labor_statistics WHERE state = 'California' AND year = 2020 GROUP BY state;",0 Name the record for arizona,"CREATE TABLE table_22815259_1 (record VARCHAR, opponent VARCHAR);","SELECT record FROM table_22815259_1 WHERE opponent = ""Arizona"";","SELECT record FROM table_22815259_1 WHERE opponent = ""Arizona"";",1 At which stadiums was attendance total 79176?,"CREATE TABLE table_16028479_2 (game_site VARCHAR, attendance VARCHAR);",SELECT game_site FROM table_16028479_2 WHERE attendance = 79176;,"SELECT game_site FROM table_16028479_2 WHERE attendance = ""79176"";",0 "What is the average temperature in the storage facilities located in Texas, during the month of July?","CREATE TABLE StorageFacilities (FacilityID INT, FacilityName TEXT, State TEXT, Temperature DECIMAL(5,2)); ",SELECT AVG(Temperature) FROM StorageFacilities WHERE State = 'Texas' AND EXTRACT(MONTH FROM StorageDate) = 7;,SELECT AVG(Temperature) FROM StorageFacilities WHERE State = 'Texas' AND EXTRACT(MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH FROM MONTH;,0 Which wells are located in the Beaufort Sea and have a production figure less than 2000?,"CREATE TABLE wells (well_id varchar(10), region varchar(20), production_figures int); ","SELECT well_id, production_figures FROM wells WHERE region = 'Beaufort Sea' AND production_figures < 2000;","SELECT well_id, region, production_figures FROM wells WHERE region = 'Beaufort Sea' AND production_figures 2000;",0 What team opposed Tipperary in the Munster Final game?,"CREATE TABLE table_name_98 (team VARCHAR, opposition VARCHAR, game VARCHAR);","SELECT team FROM table_name_98 WHERE opposition = ""tipperary"" AND game = ""munster final"";","SELECT team FROM table_name_98 WHERE opposition = ""tipperary"" AND game = ""munster final"";",1 What is the maximum duration (in days) of completed missions?,"CREATE TABLE mission_duration (mission_name VARCHAR(50), mission_status VARCHAR(50), duration INT);","SELECT mission_status, MAX(duration) as max_duration FROM mission_duration WHERE mission_status = 'completed' GROUP BY mission_status;",SELECT MAX(duration) FROM mission_duration WHERE mission_status = 'Completed';,0 What is the date of game 5?,"CREATE TABLE table_20745706_1 (date VARCHAR, _number VARCHAR);","SELECT date FROM table_20745706_1 WHERE _number = ""5"";",SELECT date FROM table_20745706_1 WHERE _number = 5;,0 "When the foursome was w-l-h is 1–0–0 won w/ p. creamer 3&2, what was the points %?","CREATE TABLE table_1628607_5 (points__percentage VARCHAR, foursomes_w_l_h VARCHAR);","SELECT points__percentage FROM table_1628607_5 WHERE foursomes_w_l_h = ""1–0–0 won w/ P. Creamer 3&2"";","SELECT points__percentage FROM table_1628607_5 WHERE foursomes_w_l_h = ""1–0–0 won w/ p. creamer 3&2"";",0 Who did the Raptors play when their record was 45-36? ,"CREATE TABLE table_13619135_8 (team VARCHAR, record VARCHAR);","SELECT team FROM table_13619135_8 WHERE record = ""45-36"";","SELECT team FROM table_13619135_8 WHERE record = ""45-36"";",1 What year was the developer(s) Bioware?,"CREATE TABLE table_name_59 (year INTEGER, developer_s_ VARCHAR);","SELECT AVG(year) FROM table_name_59 WHERE developer_s_ = ""bioware"";","SELECT SUM(year) FROM table_name_59 WHERE developer_s_ = ""bioware"";",0 "For each program, list the number of volunteers, total volunteer hours, and the average volunteer hours per volunteer.","CREATE TABLE Programs (ProgramID int, Name varchar(50), Location varchar(50)); CREATE TABLE Volunteers (VolunteerID int, Name varchar(50), ProgramID int, Hours decimal(10,2)); ","SELECT P.Name, COUNT(V.VolunteerID) as VolunteerCount, SUM(V.Hours) as TotalHours, AVG(V.Hours) as AvgHoursPerVolunteer FROM Programs P JOIN Volunteers V ON P.ProgramID = V.ProgramID GROUP BY P.ProgramID, P.Name;","SELECT Programs.Name, COUNT(Volunteers.VolunteerID) as NumberOfVolunteers, SUM(Volunteers.Hours) as TotalHours, AVG(Volunteers.Hours) as AverageHoursPerVolunteer FROM Programs INNER JOIN Volunteers ON Programs.ProgramID = Volunteers.ProgramID GROUP BY Programs.Name;",0 What percentage of cosmetic products are not cruelty-free in the European Union?,"CREATE TABLE eu_products (product_id INT, is_cruelty_free BOOLEAN); ",SELECT (COUNT(*) FILTER (WHERE is_cruelty_free = false) * 100.0 / COUNT(*)) AS percentage FROM eu_products;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM eu_products)) FROM eu_products WHERE is_cruelty_free = false;,0 What are the names of all products that contain ingredients sourced from both 'Organic Farms' and 'Large Scale Producers'?,"CREATE TABLE product_ingredients (product_name VARCHAR(50), ingredient VARCHAR(50), ingredient_source VARCHAR(50)); ","SELECT product_name FROM product_ingredients WHERE ingredient_source IN ('Organic Farms', 'Large Scale Producers') GROUP BY product_name HAVING COUNT(DISTINCT ingredient_source) = 2;","SELECT product_name FROM product_ingredients WHERE ingredient_source IN ('Organic Farms', 'Large Scale Producers');",0 What was the total revenue for Latin music in 2018 and 2019?,"CREATE TABLE genre_sales (year INT, genre VARCHAR(255), revenue FLOAT); ","SELECT year, SUM(revenue) FROM genre_sales WHERE genre = 'Latin' GROUP BY year;","SELECT SUM(revenue) FROM genre_sales WHERE year IN (2018, 2019) AND genre = 'Latin';",0 Show all the Store_Name of drama workshop groups.,CREATE TABLE Drama_Workshop_Groups (Store_Name VARCHAR);,SELECT Store_Name FROM Drama_Workshop_Groups;,SELECT Store_Name FROM Drama_Workshop_Groups;,1 What is the total number of volunteers for each program in the 'NonprofitDB' database?,"CREATE TABLE Program (ID INT, Name VARCHAR(255)); CREATE TABLE Volunteer (ID INT, Name VARCHAR(255), ProgramID INT); ","SELECT v.ProgramID, COUNT(*) as TotalVolunteers FROM Volunteer v GROUP BY v.ProgramID;","SELECT Program.Name, COUNT(Volunteer.ID) as TotalVolunteers FROM Program INNER JOIN Volunteer ON Program.ID = Volunteer.ProgramID GROUP BY Program.Name;",0 Which original air date had 0.871 U.S. viewers (millions)?,"CREATE TABLE table_26808178_3 (original_air_date VARCHAR, us_viewers__millions_ VARCHAR);","SELECT original_air_date FROM table_26808178_3 WHERE us_viewers__millions_ = ""0.871"";","SELECT original_air_date FROM table_26808178_3 WHERE us_viewers__millions_ = ""0.871"";",1 What is the maximum cost of a space mission by ESA?,"CREATE TABLE missions (id INT, name TEXT, country TEXT, launch_date DATE, cost FLOAT); ",SELECT MAX(cost) FROM missions WHERE country = 'Europe';,SELECT MAX(cost) FROM missions WHERE country = 'ESA';,0 What is the success rate of startups founded by women?,"CREATE TABLE companies (id INT, name TEXT, founder_gender TEXT); CREATE TABLE success (company_id INT, is_successful BOOLEAN); ","SELECT COUNT(*) as num_successful_startups, 100.0 * COUNT(*) / (SELECT COUNT(*) FROM companies) as success_rate FROM success JOIN companies ON success.company_id = companies.id WHERE companies.founder_gender = 'Female' AND is_successful = 1;",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM companies WHERE founder_gender = 'Female')) AS success_rate FROM companies WHERE founder_gender = 'Female';,0 "List all animals and their species from the ""animals"" table","CREATE TABLE animals (animal_id SERIAL PRIMARY KEY, name VARCHAR(255), species VARCHAR(255)); ","SELECT animal_id, name, species FROM animals;","SELECT name, species FROM animals;",0 "What is the distribution of open pedagogy initiatives by country, with a count of initiatives that use open pedagogy and those that do not?","CREATE TABLE initiatives (initiative_id INT, initiative_name VARCHAR(50), country VARCHAR(20), open_pedagogy BOOLEAN); ","SELECT country, SUM(CASE WHEN open_pedagogy THEN 1 ELSE 0 END) as num_open, SUM(CASE WHEN NOT open_pedagogy THEN 1 ELSE 0 END) as num_not_open FROM initiatives GROUP BY country;","SELECT country, COUNT(*) FROM initiatives WHERE open_pedagogy = true GROUP BY country;",0 What is the maximum carbon emission for a single day in the 'carbon_emissions' table?,"CREATE TABLE carbon_emissions (id INT, date DATE, carbon_emission INT); ",SELECT MAX(carbon_emission) FROM carbon_emissions;,SELECT MAX(carbon_emission) FROM carbon_emissions;,1 Which countries have the highest average donation amounts in the Education program?,"CREATE TABLE donations (id INT, donor_id INT, donation_amount DECIMAL, donation_date DATE, donor_program VARCHAR, donor_country VARCHAR); ","SELECT d.donor_country, AVG(d.donation_amount) as avg_donation FROM donations d WHERE d.donor_program = 'Education' GROUP BY d.donor_country ORDER BY avg_donation DESC LIMIT 1;","SELECT donor_country, AVG(donation_amount) as avg_donation FROM donations WHERE donor_program = 'Education' GROUP BY donor_country ORDER BY avg_donation DESC LIMIT 1;",0 How many international visitors came to Canada between 2020 and 2022 and what were their average expenditures?,"CREATE TABLE Visitors (id INT, year INT, country VARCHAR(50), expenditure FLOAT); ",SELECT AVG(expenditure) FROM Visitors WHERE country = 'Canada' AND year BETWEEN 2020 AND 2022;,SELECT AVG(expenditure) FROM Visitors WHERE country = 'Canada' AND year BETWEEN 2020 AND 2022;,1 What is the Date with a Time that is 18:45?,"CREATE TABLE table_name_6 (date VARCHAR, time VARCHAR);","SELECT date FROM table_name_6 WHERE time = ""18:45"";","SELECT date FROM table_name_6 WHERE time = ""18:45"";",1 What are the total numbers of marine species found in the Pacific and Atlantic oceans?,"CREATE TABLE oceans (ocean_name TEXT, species_count INT); ","SELECT SUM(species_count) FROM oceans WHERE ocean_name IN ('Pacific', 'Atlantic');","SELECT SUM(species_count) FROM oceans WHERE ocean_name IN ('Pacific', 'Atlantic');",1 Insert new records into the virtual_reality_headsets table and update the corresponding vr_headsets_sales table,"CREATE TABLE virtual_reality_headsets (id INT PRIMARY KEY, manufacturer TEXT, model TEXT, price DECIMAL(10,2)); CREATE TABLE vr_headsets_sales (id INT PRIMARY KEY, headset_id INT, quantity INT);","INSERT INTO virtual_reality_headsets (id, manufacturer, model, price) VALUES (1, 'Oculus', 'Quest 2', 299.99), (2, 'HTC', 'Vive Pro 2', 799.99); UPDATE vr_headsets_sales SET headset_id = CASE WHEN model = 'Quest 2' THEN 1 WHEN model = 'Vive Pro 2' THEN 2 ELSE NULL END WHERE headset_id IS NULL;","INSERT INTO virtual_reality_headsets (id, manufacturer, model, price, quantity) VALUES (1, 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta'), (2, 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta', 'Violta');",0 How many species are present in 'asia' that are not endangered?,"CREATE TABLE species (name VARCHAR(255), region VARCHAR(255), endangered BOOLEAN); ",SELECT COUNT(*) FROM species WHERE region = 'asia' AND endangered = FALSE;,SELECT COUNT(*) FROM species WHERE region = 'asia' AND endangered = false;,0 "Play-by-play of sean grande, and a Year of 2004-05 had what studio host?","CREATE TABLE table_name_47 (studio_host VARCHAR, play_by_play VARCHAR, year VARCHAR);","SELECT studio_host FROM table_name_47 WHERE play_by_play = ""sean grande"" AND year = ""2004-05"";","SELECT studio_host FROM table_name_47 WHERE play_by_play = ""sean grande"" AND year = ""2004-05"";",1 Count the number of records in the 'animals' table,"CREATE TABLE animals (id INT PRIMARY KEY, name VARCHAR(100), species VARCHAR(50), population INT); ",SELECT COUNT(*) FROM animals;,SELECT COUNT(*) FROM animals;,1 What's the total budget for programs in arts and environment?,"CREATE TABLE Programs (ProgramID INT, ProgramName TEXT, Budget DECIMAL(10,2), Category TEXT); ","SELECT SUM(Budget) FROM Programs WHERE Category IN ('Arts', 'Environment');","SELECT SUM(Budget) FROM Programs WHERE Category IN ('Arts', 'Environment');",1 Which students have not completed any lifelong learning courses?,"CREATE TABLE students (student_id INT, first_name VARCHAR(255), last_name VARCHAR(255)); CREATE TABLE courses (course_id INT, course_name VARCHAR(255)); CREATE TABLE student_courses (student_id INT, course_id INT);","SELECT s.student_id, s.first_name, s.last_name FROM students s LEFT JOIN student_courses sc ON s.student_id = sc.student_id WHERE sc.student_id IS NULL;","SELECT s.first_name, s.last_name FROM students s JOIN student_courses sc ON s.student_id = sc.student_id JOIN courses c ON sc.course_id = c.course_id WHERE sc.course_id IS NULL;",0 find all dependent names who have a spouse relation with some employee.,"CREATE TABLE dependent (Dependent_name VARCHAR, relationship VARCHAR);",SELECT Dependent_name FROM dependent WHERE relationship = 'Spouse';,"SELECT Dependent_name FROM dependent WHERE relationship = ""Sponsor"";",0 List all products and their suppliers that have a circular supply chain.,"CREATE TABLE products (product_id INT, product_name VARCHAR(50), supplier_id INT); CREATE TABLE suppliers (supplier_id INT, supplier_name VARCHAR(50), is_circular BOOLEAN); ","SELECT products.product_name, suppliers.supplier_name FROM products INNER JOIN suppliers ON products.supplier_id = suppliers.supplier_id WHERE suppliers.is_circular = true;","SELECT products.product_name, suppliers.supplier_name FROM products INNER JOIN suppliers ON products.supplier_id = suppliers.supplier_id WHERE suppliers.is_circular = true;",1 What points larger than 1950 has a maserati straight-6 engine?,"CREATE TABLE table_name_68 (points VARCHAR, year VARCHAR, engine VARCHAR);","SELECT points FROM table_name_68 WHERE year > 1950 AND engine = ""maserati straight-6"";","SELECT points FROM table_name_68 WHERE year > 1950 AND engine = ""maserati straight-6"";",1 What is the percentage of organic produce sold in Japan compared to the global average?,"CREATE TABLE OrganicProduce (country VARCHAR(50), volume_sold INT, global_volume_sold INT); ",SELECT 100.0 * volume_sold / SUM(volume_sold) AS percentage FROM OrganicProduce WHERE country = 'Japan';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM OrganicProduce WHERE country = 'Japan')) AS percentage FROM OrganicProduce WHERE country = 'Japan' AND global_volume_sold > (SELECT AVG(global_volume_sold) FROM OrganicProduce WHERE country = 'Japan');,0 Create a table named 'tech_donations' to store details about technology donations made by various organizations,"CREATE TABLE tech_donations (id INT PRIMARY KEY, organization VARCHAR(50), city VARCHAR(50), country VARCHAR(50), donation_date DATE, donation_value FLOAT);","CREATE TABLE tech_donations (id INT PRIMARY KEY, organization VARCHAR(50), city VARCHAR(50), country VARCHAR(50), donation_date DATE, donation_value FLOAT);","CREATE TABLE tech_donations (id INT PRIMARY KEY, organization VARCHAR(50), city VARCHAR(50), country VARCHAR(50), donation_date DATE, donation_value FLOAT);",1 What is the average hourly wage for construction laborers in Florida?,"CREATE TABLE LaborStatistics (id INT, job_title VARCHAR(50), hourly_wage DECIMAL(5,2), state VARCHAR(20)); ",SELECT AVG(hourly_wage) FROM LaborStatistics WHERE job_title = 'Construction Laborer' AND state = 'Florida';,SELECT AVG(hourly_wage) FROM LaborStatistics WHERE state = 'Florida';,0 "Which Album has an Artist of various artists (compilation), and a Label of laface?","CREATE TABLE table_name_53 (album VARCHAR, artist VARCHAR, label VARCHAR);","SELECT album FROM table_name_53 WHERE artist = ""various artists (compilation)"" AND label = ""laface"";","SELECT album FROM table_name_53 WHERE artist = ""various artists (compilation)"" AND label = ""laface"";",1 How many points did the Wildcats get when Baylor was an opponent?,"CREATE TABLE table_24561550_1 (wildcats_points VARCHAR, opponent VARCHAR);","SELECT wildcats_points FROM table_24561550_1 WHERE opponent = ""Baylor"";","SELECT wildcats_points FROM table_24561550_1 WHERE opponent = ""Baylor"";",1 What's the lowest rank of Lane 3?,"CREATE TABLE table_name_70 (rank INTEGER, lane VARCHAR);",SELECT MIN(rank) FROM table_name_70 WHERE lane = 3;,SELECT MIN(rank) FROM table_name_70 WHERE lane = 3;,1 Name the Series with a Title of elmer's pet rabbit?,"CREATE TABLE table_name_96 (series VARCHAR, title VARCHAR);","SELECT series FROM table_name_96 WHERE title = ""elmer's pet rabbit"";","SELECT series FROM table_name_96 WHERE title = ""elmer's pet rabbit"";",1 How many pallets were handled by each warehouse on the 'last day of each month' in '2022'?,"CREATE TABLE Warehouse (name varchar(20), pallets_handled int, handling_date date); ","SELECT name, SUM(pallets_handled) FROM (SELECT name, pallets_handled, handling_date, LAG(handling_date) OVER (PARTITION BY name ORDER BY handling_date) AS prev_handling_date FROM Warehouse WHERE YEAR(handling_date) = 2022 AND DAY(LAST_DAY(handling_date)) = DAY(handling_date)) subquery WHERE handling_date <> prev_handling_date GROUP BY name;","SELECT name, SUM(pallets_handled) as total_pallets FROM Warehouse WHERE handling_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY name;",0 What are the sales of beauty products with a recyclable packaging in the European Union?,"CREATE TABLE beauty_products (product_recyclable BOOLEAN, sale_region VARCHAR(20), sales_quantity INT); ",SELECT SUM(sales_quantity) AS total_sales FROM beauty_products WHERE product_recyclable = TRUE AND sale_region = 'EU';,SELECT SUM(sales_quantity) FROM beauty_products WHERE product_recyclable = true AND sale_region = 'European Union';,0 Find the number of paintings created per year for the artist 'Vincent van Gogh'.,"CREATE TABLE Artists (ArtistID INT, Name VARCHAR(50), Nationality VARCHAR(50)); CREATE TABLE Paintings (PaintingID INT, Title VARCHAR(50), ArtistID INT, YearCreated INT); ","SELECT YearCreated, COUNT(*) as NumberOfPaintings FROM Paintings WHERE ArtistID = 1 GROUP BY YearCreated ORDER BY YearCreated;","SELECT YearCreated, COUNT(*) FROM Paintings JOIN Artists ON Paintings.ArtistID = Artists.ArtistID WHERE Artists.Name = 'Vincent van Gogh' GROUP BY YearCreated;",0 What is the minimum and maximum trip duration for all trips on the Paris metro?,"CREATE TABLE paris_metro (trip_id INT, start_time TIMESTAMP, end_time TIMESTAMP);","SELECT MIN(end_time - start_time) AS min_duration, MAX(end_time - start_time) AS max_duration FROM paris_metro;","SELECT MIN(start_time), MAX(end_time) FROM paris_metro;",0 Delete the waste generation record with a NULL year value.,"CREATE TABLE waste_generation (year INT, sector TEXT, amount INT); ",DELETE FROM waste_generation WHERE year IS NULL;,DELETE FROM waste_generation WHERE year = NULL;,0 "Count the number of menu items with a price above $15 in the ""fine dining"" category.","CREATE TABLE menu (restaurant_id INT, category VARCHAR(255), item VARCHAR(255), price DECIMAL(5,2));",SELECT COUNT(menu.item) FROM menu WHERE menu.category = 'fine dining' AND menu.price > 15.00;,SELECT COUNT(*) FROM menu WHERE category = 'fine dining' AND price > 15;,0 Where is the location with a record of 50-19?,"CREATE TABLE table_name_34 (location VARCHAR, record VARCHAR);","SELECT location FROM table_name_34 WHERE record = ""50-19"";","SELECT location FROM table_name_34 WHERE record = ""50-19"";",1 What is the highest to par for the 76-70-76-76=298 score?,"CREATE TABLE table_name_96 (to_par INTEGER, score VARCHAR);",SELECT MAX(to_par) FROM table_name_96 WHERE score = 76 - 70 - 76 - 76 = 298;,SELECT MAX(to_par) FROM table_name_96 WHERE score = 76-70-76-76 = 298;,0 "How many users liked, shared, or commented on posts containing the hashtag ""#nature"" in April 2022?","CREATE TABLE posts (id INT, user_id INT, timestamp DATETIME, content TEXT, hashtags TEXT); ",SELECT COUNT(DISTINCT user_id) FROM posts WHERE hashtags LIKE '%#nature%' AND MONTH(timestamp) = 4;,SELECT COUNT(*) FROM posts WHERE hashtags LIKE '%#nature%' AND timestamp BETWEEN '2022-04-01' AND '2022-06-30';,0 What was the least amount of points scored by the golden bears when the opponent scored 15 points?,"CREATE TABLE table_21035326_1 (golden_bears_points INTEGER, opponents VARCHAR);",SELECT MIN(golden_bears_points) FROM table_21035326_1 WHERE opponents = 15;,SELECT MIN(golden_bears_points) FROM table_21035326_1 WHERE opponents = 15;,1 What is the average length of the top 5 longest songs in each genre?,"CREATE TABLE songs (song_id INT, title TEXT, length FLOAT, genre TEXT);","SELECT genre, AVG(length) FROM (SELECT genre, length FROM songs WHERE row_number() OVER (PARTITION BY genre ORDER BY length DESC) <= 5) subquery GROUP BY genre;","SELECT genre, AVG(length) as avg_length FROM songs GROUP BY genre ORDER BY avg_length DESC LIMIT 5;",0 What are the names and types of all tugboats in the 'tugboats' table that were built before 1990?,"CREATE TABLE tugboats (id INT PRIMARY KEY, name VARCHAR(50), year_built INT, type VARCHAR(50));","SELECT name, type FROM tugboats WHERE year_built < 1990;","SELECT name, type FROM tugboats WHERE year_built 1990;",0 Find the number of unique users who streamed songs released in 2020.,"CREATE TABLE artists (id INT PRIMARY KEY, name VARCHAR(255), genre VARCHAR(255), country VARCHAR(255)); CREATE TABLE songs (id INT PRIMARY KEY, title VARCHAR(255), artist_id INT, released DATE); CREATE TABLE streams (id INT PRIMARY KEY, song_id INT, user_id INT, stream_date DATE, FOREIGN KEY (song_id) REFERENCES songs(id)); CREATE TABLE users (id INT PRIMARY KEY, gender VARCHAR(50), age INT);",SELECT COUNT(DISTINCT user_id) AS unique_users FROM streams s JOIN songs t ON s.song_id = t.id WHERE YEAR(t.released) = 2020;,SELECT COUNT(DISTINCT users.id) FROM users INNER JOIN songs ON users.id = songs.id INNER JOIN streams ON songs.id = streams.song_id INNER JOIN artists ON songs.artist_id = artists.id WHERE songs.released >= '2020-01-01' AND streams.stream_date '2020-12-31';,0 What was the total carbon emissions of the commercial sector in Beijing in 2020?,"CREATE TABLE carbon_emissions (id INT, sector TEXT, location TEXT, year INT, emissions INT); ",SELECT SUM(emissions) FROM carbon_emissions WHERE sector = 'commercial' AND location = 'Beijing' AND year = 2020;,SELECT SUM(emissions) FROM carbon_emissions WHERE sector = 'Commercial' AND location = 'Beijing' AND year = 2020;,0 Tell me the left office for mirko tremaglia,"CREATE TABLE table_name_20 (left_office VARCHAR, minister VARCHAR);","SELECT left_office FROM table_name_20 WHERE minister = ""mirko tremaglia"";","SELECT left_office FROM table_name_20 WHERE minister = ""mirko tremaglia"";",1 List the top 10 smart city projects with the highest annual carbon offsets,"CREATE TABLE smart_cities_carbon_offsets (id INT, project_id INT, annual_carbon_offsets INT);","SELECT smart_cities.project_name, smart_cities_carbon_offsets.annual_carbon_offsets FROM smart_cities JOIN smart_cities_carbon_offsets ON smart_cities.id = smart_cities_carbon_offsets.project_id ORDER BY annual_carbon_offsets DESC LIMIT 10;","SELECT project_id, annual_carbon_offsets FROM smart_cities_carbon_offsets ORDER BY annual_carbon_offsets DESC LIMIT 10;",0 Calculate the total number of animals in each habitat type,"CREATE TABLE habitats (id INT, type VARCHAR(50)); CREATE TABLE animals (id INT, species VARCHAR(50), habitat_id INT); ","SELECT h.type, COUNT(a.id) as animal_count FROM animals a INNER JOIN habitats h ON a.habitat_id = h.id GROUP BY h.type;","SELECT h.type, COUNT(a.id) FROM habitats h JOIN animals a ON h.id = a.habitat_id GROUP BY h.type;",0 What is the maximum transaction amount for a customer in the Northwest region?,"CREATE TABLE customers_2 (customer_id INT, name VARCHAR(50), region VARCHAR(20)); CREATE TABLE transactions_3 (transaction_id INT, customer_id INT, amount DECIMAL(10, 2)); ",SELECT MAX(amount) FROM transactions_3 t JOIN customers_2 c ON t.customer_id = c.customer_id WHERE c.region = 'Northwest';,SELECT MAX(amount) FROM transactions_3 t JOIN customers_2 c ON t.customer_id = c.customer_id WHERE c.region = 'Northwest';,1 What is the value in 2008 for the US Open?,CREATE TABLE table_name_31 (tournament VARCHAR);,"SELECT 2008 FROM table_name_31 WHERE tournament = ""us open"";","SELECT 2008 FROM table_name_31 WHERE tournament = ""us open"";",1 Which non-vegetarian menu items have the highest and lowest sales?,"CREATE TABLE SalesData (id INT, item VARCHAR(30), sales INT); ","SELECT item, sales FROM SalesData WHERE item NOT LIKE '%Vegetarian%' ORDER BY sales DESC, sales ASC LIMIT 1;","SELECT item, MAX(sales) as max_sales, MIN(sales) as min_sales FROM SalesData WHERE item NOT IN (SELECT item FROM Menus WHERE menus.menu_type = 'Non-Vegetarian') GROUP BY item;",0 What is the percentage of wind turbines in the UK that have a production value greater than 5.0?,"CREATE TABLE wind_turbines_uk (id INT, production FLOAT); ",SELECT 100.0 * COUNT(*) / (SELECT COUNT(*) FROM wind_turbines_uk WHERE production > 5.0) as percentage FROM wind_turbines_uk WHERE production > 5.0;,SELECT (COUNT(*) FILTER (WHERE production > 5.0)) * 100.0 / COUNT(*) FROM wind_turbines_uk;,0 Name the space crusade which has Genestealers of genrøvere (gene robbers),"CREATE TABLE table_name_92 (space_crusade VARCHAR, genestealers VARCHAR);","SELECT space_crusade FROM table_name_92 WHERE genestealers = ""genrøvere (gene robbers)"";","SELECT space_crusade FROM table_name_92 WHERE genestealers = ""genrvere (gene robbers)"";",0 "What is the highest number born in a none EU state (1000) from Denmark with a total population (1000) less than 5,534?","CREATE TABLE table_name_20 (born_in_a_non_eu_state__1000_ INTEGER, country VARCHAR, total_population__1000_ VARCHAR);","SELECT MAX(born_in_a_non_eu_state__1000_) FROM table_name_20 WHERE country = ""denmark"" AND total_population__1000_ < 5 OFFSET 534;","SELECT MAX(born_in_a_non_eu_state__1000_) FROM table_name_20 WHERE country = ""danmark"" AND total_population__1000_ 5 OFFSET 534;",0 Update the email of the member with ID 003 to 'newemail@fitness.com' in the members table.,"CREATE TABLE members (id VARCHAR(10), name VARCHAR(20), email VARCHAR(30)); ",UPDATE members SET email = 'newemail@fitness.com' WHERE id = '003';,UPDATE members SET email = 'newemail@fitness.com' WHERE id = 003;,0 Album # of 1st was released on what date?,"CREATE TABLE table_name_6 (released VARCHAR, album_number VARCHAR);","SELECT released FROM table_name_6 WHERE album_number = ""1st"";","SELECT released FROM table_name_6 WHERE album_number = ""1st"";",1 What is the total number of streams for Pop artists from the United States?,"CREATE TABLE artists (artist_id INT, artist_genre VARCHAR(50), artist_country VARCHAR(50)); CREATE TABLE streams (stream_id INT, artist_id INT); ",SELECT SUM(s.stream_id) FROM streams s INNER JOIN artists a ON s.artist_id = a.artist_id WHERE a.artist_genre = 'Pop' AND a.artist_country = 'United States';,SELECT COUNT(*) FROM streams JOIN artists ON streams.artist_id = artists.artist_id WHERE artists.artist_country = 'USA' AND artists.artist_genre = 'Pop';,0 What is the maximum production cost for fair trade products?,"CREATE TABLE products (product_id INT, product_name VARCHAR(255), production_cost DECIMAL(5,2), fair_trade BOOLEAN); ",SELECT MAX(production_cost) FROM products WHERE fair_trade = true;,SELECT MAX(production_cost) FROM products WHERE fair_trade = true;,1 Which artist earned the most revenue in 2019?,"CREATE TABLE artist_sales (year INT, artist VARCHAR(255), revenue FLOAT); ","SELECT artist, MAX(revenue) FROM artist_sales WHERE year = 2019 GROUP BY artist;","SELECT artist, MAX(revenue) FROM artist_sales WHERE year = 2019 GROUP BY artist;",1 What is the average rating of hotels in 'Paris' on 'Booking.com'?,"CREATE TABLE Hotels (hotel_id INT, name TEXT, city TEXT, rating FLOAT); ",SELECT AVG(rating) FROM Hotels WHERE city = 'Paris';,SELECT AVG(rating) FROM Hotels WHERE city = 'Paris';,1 Count the number of electric vehicle charging stations in each city.,"CREATE TABLE ev_charging_stations (id INT, name VARCHAR(255), city VARCHAR(255), num_charging_points INT);","SELECT city, COUNT(*) FROM ev_charging_stations GROUP BY city;","SELECT city, COUNT(*) FROM ev_charging_stations GROUP BY city;",1 What is the average episode number where jimmy mulville was the 4th performer?,"CREATE TABLE table_name_35 (episode INTEGER, performer_4 VARCHAR);","SELECT AVG(episode) FROM table_name_35 WHERE performer_4 = ""jimmy mulville"";","SELECT AVG(episode) FROM table_name_35 WHERE performer_4 = ""jimmy mulville"";",1 what's the saturday saturnus ( saturn) with wednesday mercurius (mercury) being mercuridi,"CREATE TABLE table_1277350_1 (saturday_saturnus___saturn_ VARCHAR, wednesday_mercurius__mercury_ VARCHAR);","SELECT saturday_saturnus___saturn_ FROM table_1277350_1 WHERE wednesday_mercurius__mercury_ = ""Mercuridi"";","SELECT saturday_saturnus___saturn_ FROM table_1277350_1 WHERE wednesday_mercurius__mercury_ = ""Mercidi"";",0 How many recycling facilities are there in Australia and New Zealand?,"CREATE TABLE RecyclingFacilities (country VARCHAR(255), num_facilities INT); ","SELECT SUM(num_facilities) FROM RecyclingFacilities WHERE country IN ('Australia', 'New Zealand')","SELECT SUM(num_facilities) FROM RecyclingFacilities WHERE country IN ('Australia', 'New Zealand');",0 What is the total number of military bases in the 'US_Military_Bases' table?,"CREATE SCHEMA IF NOT EXISTS defense_security;CREATE TABLE IF NOT EXISTS defense_security.US_Military_Bases (id INT PRIMARY KEY, base_name VARCHAR(255), location VARCHAR(255), type VARCHAR(255));",SELECT COUNT(*) FROM defense_security.US_Military_Bases;,SELECT COUNT(*) FROM defense_security.US_Military_Bases;,1 What is Hon. Vicente Q. Roxas appointment date?,"CREATE TABLE table_name_25 (date_of_appointment VARCHAR, name VARCHAR);","SELECT date_of_appointment FROM table_name_25 WHERE name = ""hon. vicente q. roxas"";","SELECT date_of_appointment FROM table_name_25 WHERE name = ""hon. victorente q. roxas"";",0 Who are the Runner(s)-up with a Margin of 3 strokes?,"CREATE TABLE table_name_49 (runner_s__up VARCHAR, margin VARCHAR);","SELECT runner_s__up FROM table_name_49 WHERE margin = ""3 strokes"";","SELECT runner_s__up FROM table_name_49 WHERE margin = ""3 strokes"";",1 Find the number of factories in each country that use sustainable materials.,"CREATE TABLE factories (id INT, name VARCHAR(255), country VARCHAR(255), uses_sustainable_materials BOOLEAN);","SELECT country, COUNT(*) FROM factories WHERE uses_sustainable_materials = TRUE GROUP BY country;","SELECT country, COUNT(*) FROM factories WHERE uses_sustainable_materials = true GROUP BY country;",0 Find the top 5 AI companies with the most ethical AI research papers published in the last 2 years.,"CREATE TABLE ai_companies (id INT, company_name VARCHAR(255), papers_published INT, publication_date DATE);","SELECT company_name, papers_published FROM ai_companies WHERE publication_date >= DATEADD(year, -2, CURRENT_TIMESTAMP) ORDER BY papers_published DESC LIMIT 5;","SELECT company_name, papers_published FROM ai_companies WHERE papers_published >= (SELECT MAX(papers_published) FROM ai_companies WHERE publication_date >= DATEADD(year, -2, GETDATE()) GROUP BY company_name ORDER BY papers_published DESC LIMIT 5);",0 What is the total number of military bases in the 'Asia-Pacific' region?,"CREATE TABLE military_bases (id INT, base_name TEXT, region TEXT); ",SELECT COUNT(*) FROM military_bases WHERE region = 'Asia-Pacific';,SELECT COUNT(*) FROM military_bases WHERE region = 'Asia-Pacific';,1 What is the total humanitarian assistance provided by the European Union in 2019?,"CREATE TABLE humanitarian_assistance (id INT, donor VARCHAR(50), funds DECIMAL(10,2), year INT); ",SELECT SUM(funds) as total_humanitarian_assistance FROM humanitarian_assistance WHERE donor = 'European Union' AND year = 2019;,SELECT SUM(funds) FROM humanitarian_assistance WHERE donor = 'European Union' AND year = 2019;,0 When was the episode written by Albert Kim aired for the first time?,"CREATE TABLE table_20704243_4 (original_air_date VARCHAR, written_by VARCHAR);","SELECT original_air_date FROM table_20704243_4 WHERE written_by = ""Albert Kim"";","SELECT original_air_date FROM table_20704243_4 WHERE written_by = ""Albert Kim"";",1 What is the minimum price of organic cosmetic products in Portugal?,"CREATE TABLE OrganicProducts (product VARCHAR(255), country VARCHAR(255), price DECIMAL(10,2)); ",SELECT MIN(price) FROM OrganicProducts WHERE country = 'Portugal';,SELECT MIN(price) FROM OrganicProducts WHERE country = 'Portugal';,1 Select all records from trends table where forecast='Winter' and trend_name like '%Jacket%',"CREATE TABLE trends (id INT, trend_name VARCHAR(50), region VARCHAR(50), forecast VARCHAR(50), popularity INT);",SELECT * FROM trends WHERE forecast = 'Winter' AND trend_name LIKE '%Jacket%';,SELECT * FROM trends WHERE forecast = 'Winter' AND trend_name LIKE '%Jacket%%';,0 Get the average funding amount for startups based in 'Asia'.,"CREATE TABLE startups (id INT, name VARCHAR(50), location VARCHAR(50), funding_amount DECIMAL(10, 2));",SELECT AVG(funding_amount) FROM startups WHERE location = 'Asia';,SELECT AVG(funding_amount) FROM startups WHERE location = 'Asia';,1 What Nationality's time is 2:07.64?,"CREATE TABLE table_name_98 (nationality VARCHAR, time VARCHAR);","SELECT nationality FROM table_name_98 WHERE time = ""2:07.64"";","SELECT nationality FROM table_name_98 WHERE time = ""2:07.64"";",1 Insert a new mobile subscriber record into the subscribers table,"CREATE TABLE subscribers (subscriber_id INT, first_name VARCHAR(50), last_name VARCHAR(50), mobile_number VARCHAR(20), email VARCHAR(50), date_joined DATE);","INSERT INTO subscribers (subscriber_id, first_name, last_name, mobile_number, email, date_joined) VALUES (12345, 'John', 'Doe', '1234567890', 'johndoe@mail.com', '2022-01-01');","INSERT INTO subscribers (subscriber_id, first_name, last_name, mobile_number, email, date_joined) VALUES (1, 'Jane', 'Jane', '2019-01-01');",0 What is the minimum donation amount received in 2021 by a donor from the LGBTQ+ community?,"CREATE TABLE Donations2021 (DonationID int, DonorType varchar(50), DonationAmount decimal(10,2), DonorCommunity varchar(50)); ",SELECT MIN(DonationAmount) FROM Donations2021 WHERE DonorType = 'Individual' AND DonorCommunity = 'LGBTQ+' AND YEAR(DonationDate) = 2021;,SELECT MIN(DonationAmount) FROM Donations2021 WHERE DonorCommunity = 'LGBTQ+';,0 Name the result for arrowhead stadium,"CREATE TABLE table_name_45 (result VARCHAR, game_site VARCHAR);","SELECT result FROM table_name_45 WHERE game_site = ""arrowhead stadium"";","SELECT result FROM table_name_45 WHERE game_site = ""arrowhead stadium"";",1 Find the average price of sustainable materials purchased from Latin American countries in the current month.,"CREATE TABLE Countries (CountryID INT, CountryName VARCHAR(50), Continent VARCHAR(50)); CREATE TABLE Suppliers (SupplierID INT, CountryID INT, SupplierName VARCHAR(50), Material VARCHAR(50), Quantity INT, Price DECIMAL(5,2)); ","SELECT AVG(Price) FROM Suppliers s JOIN Countries c ON s.CountryID = c.CountryID WHERE c.Continent = 'South America' AND s.Material = 'Sustainable Material' AND s.ProductionDate >= DATEADD(month, DATEDIFF(month, 0, GETDATE()), 0);",SELECT AVG(Suppliers.Price) FROM Suppliers INNER JOIN Countries ON Suppliers.CountryID = Countries.CountryID WHERE Countries.Continent = 'Latin America' AND Suppliers.Material = 'Sustainable' AND Suppliers.Quantity = (SELECT AVG(Suppliers.Price) FROM Suppliers WHERE Suppliers.Quantity = (SELECT AVG(Suppliers.Price) FROM Suppliers WHERE Countries.Continent = 'Latin America');,0 What source showed Brian Moran at 19%?,"CREATE TABLE table_21535453_1 (source VARCHAR, brian_moran VARCHAR);","SELECT source FROM table_21535453_1 WHERE brian_moran = ""19%"";","SELECT source FROM table_21535453_1 WHERE brian_moran = ""19%"";",1 Name the least silver when gold is less than 0,"CREATE TABLE table_name_41 (silver INTEGER, gold INTEGER);",SELECT MIN(silver) FROM table_name_41 WHERE gold < 0;,SELECT MIN(silver) FROM table_name_41 WHERE gold 0;,0 What is the average money requested in the episode first aired on 18 January 2005 by the company/product name IV Cam,"CREATE TABLE table_name_96 (money_requested__ INTEGER, first_aired VARCHAR, company_or_product_name VARCHAR);","SELECT AVG(money_requested__) AS £_ FROM table_name_96 WHERE first_aired = ""18 january 2005"" AND company_or_product_name = ""iv cam"";","SELECT AVG(money_requested__) FROM table_name_96 WHERE first_aired = ""18 january 2005"" AND company_or_product_name = ""iv cam"";",0 what records have a score of l 109–116 2 ot,"CREATE TABLE table_11964047_7 (record VARCHAR, score VARCHAR);","SELECT record FROM table_11964047_7 WHERE score = ""L 109–116 2 OT"";","SELECT record FROM table_11964047_7 WHERE score = ""L 109–116 2 Ot"";",0 "How many professional development courses have been completed by teachers in each subject area, in total?","CREATE TABLE teacher_pd (teacher_id INT, course_id INT, completed_date DATE); CREATE TABLE courses (course_id INT, course_name VARCHAR(255), subject_area VARCHAR(255));","SELECT c.subject_area, COUNT(t.course_id) FROM teacher_pd t INNER JOIN courses c ON t.course_id = c.course_id GROUP BY c.subject_area;","SELECT c.subject_area, COUNT(tpd.course_id) as total_courses FROM teacher_pd tpd JOIN courses c ON tpd.course_id = c.course_id GROUP BY c.subject_area;",0 What is the name of the opponent at the Herceg Novi tournament?,"CREATE TABLE table_name_54 (opponent VARCHAR, tournament VARCHAR);","SELECT opponent FROM table_name_54 WHERE tournament = ""herceg novi"";","SELECT opponent FROM table_name_54 WHERE tournament = ""herceg novi"";",1 "What is the maximum number of emergency responses and disaster recovery efforts in a single day in each district, separated by type and sorted by maximum number of responses/efforts in descending order?","CREATE TABLE Districts (DId INT, Name VARCHAR(50)); CREATE TABLE EmergencyResponses (ResponseId INT, DId INT, Type VARCHAR(50), Date DATE, Time TIME); CREATE TABLE DisasterRecovery (RecoveryId INT, DId INT, Type VARCHAR(50), Date DATE, Time TIME);","SELECT D.Name, ER.Type, MAX(COUNT(*)) AS MaxResponses FROM Districts D LEFT JOIN EmergencyResponses ER ON D.DId = ER.DId WHERE ER.Time BETWEEN '00:00:00' AND '23:59:59' GROUP BY D.Name, ER.Type UNION SELECT D.Name, DR.Type, MAX(COUNT(*)) AS MaxEfforts FROM Districts D LEFT JOIN DisasterRecovery DR ON D.DId = DR.DId WHERE DR.Time BETWEEN '00:00:00' AND '23:59:59' GROUP BY D.Name, DR.Type ORDER BY MaxResponses DESC;","SELECT Districts.Name, EmergencyResponses.Type, MAX(EmergencyResponses.ResponseId) as MaxResponse, MAX(DisasterRecovery.Effort) as MaxEffort FROM Districts INNER JOIN EmergencyResponses ON Districts.DId = EmergencyResponses.DId INNER JOIN DisasterRecovery ON Districts.DId = DisasterRecovery.DId GROUP BY Districts.Name, EmergencyResponses.Type;",0 "List all artworks with a creation date between 1900 and 1950, ordered by the number of exhibitions they have been featured in.","CREATE TABLE Artworks (id INT, name TEXT, creation_date DATE, exhibitions INT);","SELECT name, exhibitions FROM (SELECT name, exhibitions, ROW_NUMBER() OVER (ORDER BY exhibitions DESC) as rn FROM Artworks WHERE creation_date BETWEEN '1900-01-01' AND '1950-12-31') t WHERE rn <= 10;","SELECT name, exhibitions FROM Artworks WHERE creation_date BETWEEN '1900-01-01' AND '1950-12-31' ORDER BY exhibitions DESC;",0 "What is the number of goals against when the goal difference was less than 43, the Wins less than 13, and losses more than 14?","CREATE TABLE table_name_44 (goals_against VARCHAR, losses VARCHAR, goal_difference VARCHAR, wins VARCHAR);",SELECT goals_against FROM table_name_44 WHERE goal_difference < 43 AND wins < 13 AND losses > 14;,SELECT COUNT(goals_against) FROM table_name_44 WHERE goal_difference 43 AND wins 13 AND losses > 14;,0 Name the scott for chloropsis hardwickii,"CREATE TABLE table_2006661_1 (scott VARCHAR, species VARCHAR);","SELECT scott FROM table_2006661_1 WHERE species = ""Chloropsis hardwickii"";","SELECT scott FROM table_2006661_1 WHERE species = ""Chloropsis Hardwickii"";",0 Top 3 states with the highest veteran unemployment rates and their rates for the year 2021?,"CREATE TABLE veteran_employment (state VARCHAR(100), year INT, unemployment_rate DECIMAL(5, 2)); ","SELECT state, unemployment_rate FROM veteran_employment WHERE year = 2021 ORDER BY unemployment_rate DESC LIMIT 3;","SELECT state, unemployment_rate FROM veteran_employment WHERE year = 2021 ORDER BY unemployment_rate DESC LIMIT 3;",1 What is the standard deviation of the number of items sold by each salesperson in the sales database?,"CREATE TABLE sales (salesperson VARCHAR(20), items INT); ",SELECT STDEV(items) FROM sales;,"SELECT salesperson, SUM(items) as standard deviation FROM sales GROUP BY salesperson;",0 Which astronauts have participated in Mars missions?,"CREATE TABLE Astronauts (ID INT PRIMARY KEY, Name TEXT); CREATE TABLE Missions (ID INT PRIMARY KEY, Astronaut_ID INT, Name TEXT, Destination TEXT);",SELECT a.Name FROM Astronauts a INNER JOIN Missions m ON a.ID = m.Astronaut_ID WHERE m.Destination = 'Mars';,SELECT Astronauts.Name FROM Astronauts INNER JOIN Missions ON Astronauts.ID = Missions.Astronaut_ID WHERE Missions.Destination = 'Mars';,0 "What is the average length of songs per genre, ranked by popularity?","CREATE TABLE genres (genre_id INT, genre VARCHAR(255)); CREATE TABLE songs (song_id INT, song_name VARCHAR(255), genre_id INT, length FLOAT); CREATE VIEW song_length_per_genre AS SELECT genre_id, AVG(length) as avg_length FROM songs GROUP BY genre_id; CREATE VIEW genre_popularity AS SELECT genre_id, COUNT(song_id) as num_songs FROM songs GROUP BY genre_id ORDER BY num_songs DESC; CREATE VIEW final_result AS SELECT g.genre, sl.avg_length, g.num_songs, g.num_songs/SUM(g.num_songs) OVER () as popularity_ratio FROM song_length_per_genre sl JOIN genre_popularity g ON sl.genre_id = g.genre_id;","SELECT genre, avg_length, popularity_ratio FROM final_result;","SELECT g.genre, AVG(s.length) as avg_length, g.num_songs, g.num_songs/SUM(g.num_songs/SUM(g.num_songs/SUM(g.num_songs/SUM(g.num_songs)))) as popularity_ratio FROM genres g JOIN song_length_per_genre s ON g.genre_id = s.genre_id JOIN final_result g ON g.genre_id = g.genre_id GROUP BY g.genre_id;",0 What is the average number of research grants received per faculty member in the College of Arts and Humanities in the past 3 years?,"CREATE TABLE faculty (id INT, name VARCHAR(100), department VARCHAR(100)); CREATE TABLE grants (id INT, title VARCHAR(100), pi_name VARCHAR(100), pi_department VARCHAR(100), start_date DATE, end_date DATE); ","SELECT AVG(num_grants) as avg_grants FROM (SELECT pi_department, COUNT(*) as num_grants FROM grants WHERE pi_department = 'English' AND start_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR) AND CURRENT_DATE GROUP BY pi_department) AS subquery WHERE pi_department = 'English';","SELECT AVG(g.id) FROM grants g JOIN faculty f ON g.faculty_id = f.id WHERE f.department = 'College of Arts and Humanities' AND g.start_date >= DATEADD(year, -3, GETDATE());",0 How many customers in the customers table have a size that is not available in the fashion_trends table?,"CREATE TABLE customers (id INT PRIMARY KEY, size VARCHAR(10)); ",SELECT COUNT(*) FROM customers LEFT JOIN fashion_trends ON customers.size = fashion_trends.size WHERE fashion_trends.size IS NULL;,SELECT COUNT(*) FROM customers WHERE size IS NULL;,0 Who was the builder for joffre,"CREATE TABLE table_name_60 (builder VARCHAR, name_number VARCHAR);","SELECT builder FROM table_name_60 WHERE name_number = ""joffre"";","SELECT builder FROM table_name_60 WHERE name_number = ""joffre"";",1 "Identify the top 3 cities with the highest CO2 emissions per capita for each continent in 2015, using the 'CityCO2' table.","CREATE TABLE CityCO2 (City VARCHAR(50), Continent VARCHAR(50), CO2_Emissions INT, Population INT); ","SELECT City, Continent, CO2_Emissions/Population AS CO2_PerCapita FROM CityCO2 WHERE Year = 2015 GROUP BY City, Continent ORDER BY Continent, CO2_PerCapita DESC LIMIT 3;","SELECT City, Continent, CO2_Emissions, Population FROM CityCO2 WHERE YEAR(CO2_Emissions) = 2015 GROUP BY City, Continent ORDER BY CO2_Emissions DESC LIMIT 3;",0 What is the total number of security incidents that have occurred in each region in the past year?,"CREATE TABLE incident_region(id INT, region VARCHAR(50), incidents INT, incident_date DATE);","SELECT region, SUM(incidents) as total_incidents FROM incident_region WHERE incident_date > DATE(NOW()) - INTERVAL 365 DATE GROUP BY region;","SELECT region, SUM(incidents) as total_incidents FROM incident_region WHERE incident_date >= DATEADD(year, -1, GETDATE()) GROUP BY region;",0 "Show different tourist attractions' names, ids, and the corresponding number of visits.","CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR);","SELECT T1.Name, T2.Tourist_Attraction_ID, COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID;","SELECT T1.Name, T1.Tourist_Attraction_ID, COUNT(*) FROM VISITS AS T1 JOIN Tourist_Attractions AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T1.Tourist_Attraction_ID;",0 Show teachers who have not received any professional development in the last 2 years,"CREATE TABLE teachers (id INT, name VARCHAR(20), last_pd_date DATE); ","SELECT name FROM teachers WHERE last_pd_date < DATE_SUB(CURRENT_DATE, INTERVAL 2 YEAR);","SELECT name FROM teachers WHERE last_pd_date DATE_SUB(CURDATE(), INTERVAL 2 YEAR);",0 What is the total revenue generated from memberships by state?,"CREATE TABLE memberships (id INT, state VARCHAR(50), member_type VARCHAR(50), revenue DECIMAL(10,2)); ","SELECT state, SUM(revenue) AS total_revenue FROM memberships GROUP BY state;","SELECT state, SUM(revenue) FROM memberships GROUP BY state;",0 How many items were sold in the ethical_sales table that cost more than $100?,"CREATE TABLE ethical_sales (sale_id INT, product_id INT, sale_price DECIMAL); ",SELECT COUNT(*) FROM ethical_sales WHERE sale_price > 100;,SELECT COUNT(*) FROM ethical_sales WHERE sale_price > 100;,1 List all restaurants that have a revenue above the average revenue.,"CREATE TABLE restaurant (restaurant_id INT, revenue INT); ","SELECT restaurant_id, revenue FROM restaurant WHERE revenue > (SELECT AVG(revenue) FROM restaurant);",SELECT restaurant_id FROM restaurant WHERE revenue > (SELECT AVG(revenue) FROM restaurant);,0 What is the maximum number of passengers for a single autonomous shuttle ride?,"CREATE TABLE autonomous_shuttles (shuttle_id INT, ride_id INT, start_time TIMESTAMP, end_time TIMESTAMP, passengers INT);",SELECT MAX(passengers) FROM autonomous_shuttles;,SELECT MAX(passengers) FROM autonomous_shuttles;,1 The ship named Bacchus with a tonnage of t had what disposition of ship?,"CREATE TABLE table_name_37 (disposition_of_ship VARCHAR, tonnage VARCHAR, ship_name VARCHAR);","SELECT disposition_of_ship FROM table_name_37 WHERE tonnage = ""t"" AND ship_name = ""bacchus"";","SELECT disposition_of_ship FROM table_name_37 WHERE tonnage = ""t"" AND ship_name = ""bacchus"";",1 What is the average monthly cost of broadband plans?,"CREATE TABLE broadband_plans (plan_name TEXT, monthly_cost FLOAT, speed INT);",SELECT AVG(monthly_cost) FROM broadband_plans;,SELECT AVG(monthly_cost) FROM broadband_plans;,1 What is the least total seasons of the Vancouver 86ers?,"CREATE TABLE table_name_58 (total_seasons INTEGER, team VARCHAR);","SELECT MIN(total_seasons) FROM table_name_58 WHERE team = ""vancouver 86ers"";","SELECT MIN(total_seasons) FROM table_name_58 WHERE team = ""vancouver 86ers"";",1 "what's the name origin of feature of diameter (km) 2,155.0","CREATE TABLE table_16799784_7 (name VARCHAR, diameter__km_ VARCHAR);","SELECT name AS origin FROM table_16799784_7 WHERE diameter__km_ = ""2,155.0"";","SELECT name FROM table_16799784_7 WHERE diameter__km_ = ""2,155.0"";",0 Which opponent has a date 21 jul 2007?,"CREATE TABLE table_name_3 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_3 WHERE date = ""21 jul 2007"";","SELECT opponent FROM table_name_3 WHERE date = ""21 jun 2007"";",0 "What is the maximum daily water usage (in million gallons) in the state of New York in the summer months (June, July, August)?","CREATE TABLE ny_water_usage (id INT, daily_usage FLOAT, usage_location VARCHAR(255), usage_date DATE); ","SELECT MAX(daily_usage) FROM ny_water_usage WHERE usage_location = 'New York' AND EXTRACT(MONTH FROM usage_date) IN (6, 7, 8);",SELECT MAX(daily_usage) FROM ny_water_usage WHERE usage_location = 'New York' AND usage_date BETWEEN '2022-01-01' AND '2022-06-30';,0 When north american record is the world record who is the denis nizhegorodov ( rus )?,"CREATE TABLE table_24059973_3 (denis_nizhegorodov___rus__ VARCHAR, world_record VARCHAR);","SELECT denis_nizhegorodov___rus__ FROM table_24059973_3 WHERE world_record = ""North American record"";","SELECT denis_nizhegorodov___rus__ FROM table_24059973_3 WHERE world_record = ""North American record"";",1 How many accelerators are not compatible with the browsers listed ?,"CREATE TABLE accelerator_compatible_browser (id VARCHAR, accelerator_id VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, accelerator_id VARCHAR);",SELECT COUNT(*) FROM web_client_accelerator WHERE NOT id IN (SELECT accelerator_id FROM accelerator_compatible_browser);,SELECT COUNT(*) FROM web_client_accelerator AS t1 JOIN accelerator_compatible_browser AS t2 ON t1.id = t2.accelerator_id JOIN accelerator_compatible_browser AS t3 ON t1.accelerator_id = t3.accelerator_id;,0 In which game did the opponent score more than 103 and the record was 1-3?,"CREATE TABLE table_name_32 (game INTEGER, record VARCHAR, opponents VARCHAR);","SELECT AVG(game) FROM table_name_32 WHERE record = ""1-3"" AND opponents > 103;","SELECT SUM(game) FROM table_name_32 WHERE record = ""1-3"" AND opponents > 103;",0 What was the time of the driver on grid 3?,"CREATE TABLE table_name_15 (time_retired VARCHAR, grid VARCHAR);",SELECT time_retired FROM table_name_15 WHERE grid = 3;,SELECT time_retired FROM table_name_15 WHERE grid = 3;,1 How many cultivation licenses were issued per month in Canada in 2021?,"CREATE TABLE Licenses (id INT, issue_date DATE, license_type TEXT); ","SELECT DATE_FORMAT(issue_date, '%Y-%m') as month, COUNT(*) as num_licenses FROM Licenses WHERE license_type = 'Cultivation' AND issue_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY month;","SELECT EXTRACT(MONTH FROM issue_date) AS month, COUNT(*) FROM Licenses WHERE license_type = 'Cultivation' AND EXTRACT(YEAR FROM issue_date) = 2021 GROUP BY month;",0 What is the number of polar bears in each region in 2020?,"CREATE TABLE PolarBearCount (id INT, region VARCHAR(20), year INT, bear_count INT); ","SELECT region, bear_count FROM PolarBearCount WHERE year = 2020;","SELECT region, bear_count FROM PolarBearCount WHERE year = 2020 GROUP BY region;",0 What is the number of certified eco-friendly hotels in Southeast Asia?,"CREATE TABLE eco_friendly_hotels (name VARCHAR(255), location VARCHAR(255), certification DATE); ",SELECT COUNT(*) FROM eco_friendly_hotels WHERE location LIKE '%Southeast Asia%';,SELECT COUNT(*) FROM eco_friendly_hotels WHERE location = 'Southeast Asia';,0 What was the total sales revenue for 'DrugA' in Q1 2020?,"CREATE TABLE sales (drug_name TEXT, quarter INTEGER, year INTEGER, revenue INTEGER); ",SELECT revenue FROM sales WHERE drug_name = 'DrugA' AND quarter = 1 AND year = 2020;,SELECT SUM(revenue) FROM sales WHERE drug_name = 'DrugA' AND quarter = 1 AND year = 2020;,0 What is the manner of departure when the replaced by is bahman hasanov?,"CREATE TABLE table_27057070_3 (manner_of_departure VARCHAR, replaced_by VARCHAR);","SELECT manner_of_departure FROM table_27057070_3 WHERE replaced_by = ""Bahman Hasanov"";","SELECT manner_of_departure FROM table_27057070_3 WHERE replaced_by = ""Bahman Hasanov"";",1 How many containers were handled by each crane in the 'cranes' table?,"CREATE TABLE cranes (id INT PRIMARY KEY, name VARCHAR(50), type VARCHAR(50), quantity INT);","SELECT cranes.name, SUM(handled_containers.quantity) FROM cranes INNER JOIN handled_containers ON cranes.id = handled_containers.crane_id GROUP BY cranes.name;","SELECT name, SUM(quantity) FROM cranes GROUP BY name;",0 What is the average capacity of cargo ships owned by Global Shipping?,"CREATE TABLE ships (id INT, name VARCHAR(255), capacity INT); ",SELECT AVG(capacity) FROM ships WHERE name LIKE 'Global%';,SELECT AVG(capacity) FROM ships WHERE name = 'Global Shipping';,0 "List dispensaries that have not had sales in the last 14 days, along with the number of days since their last sale.","CREATE TABLE Dispensaries (DispensaryID INT, DispensaryName VARCHAR(50)); CREATE TABLE Sales (SaleID INT, DispensaryID INT, QuantitySold INT, SaleDate DATE);","SELECT D.DispensaryID, D.DispensaryName, DATEDIFF(day, MAX(S.SaleDate), GETDATE()) AS DaysSinceLastSale FROM Dispensaries D LEFT JOIN Sales S ON D.DispensaryID = S.DispensaryID WHERE S.SaleDate IS NULL OR S.SaleDate < DATEADD(day, -14, GETDATE()) GROUP BY D.DispensaryID, D.DispensaryName;","SELECT Dispensaries.DispensaryName, SUM(Sales.QuantitySold) as TotalSales FROM Dispensaries INNER JOIN Sales ON Dispensaries.DispensaryID = Sales.DispensaryID WHERE Sales.SaleDate DATEADD(day, -14, GETDATE()) GROUP BY Dispensaries.DispensaryName;",0 What are the unique game genres played on each continent?,"CREATE TABLE GameContinents (GameID INT, GameName VARCHAR(20), Continent VARCHAR(20), Genre VARCHAR(20)); ","SELECT DISTINCT Continent, Genre FROM GameContinents WHERE Genre IS NOT NULL;","SELECT Continent, DISTINCT Genre FROM GameContinents GROUP BY Continent;",0 How many Laps does Eddie Cheever have?,"CREATE TABLE table_name_39 (laps VARCHAR, driver VARCHAR);","SELECT laps FROM table_name_39 WHERE driver = ""eddie cheever"";","SELECT laps FROM table_name_39 WHERE driver = ""eddie cheever"";",1 "Insert a new employee record for 'Sophia' 'Garcia', who was hired on '2022-04-01', lives in 'Mexico', and has not completed any diversity and inclusion training.","CREATE TABLE employees (id INT, first_name VARCHAR(50), last_name VARCHAR(50), hire_date DATE, country VARCHAR(50)); CREATE TABLE diversity_training (id INT, employee_id INT, training_name VARCHAR(50), completed_date DATE);","INSERT INTO employees (id, first_name, last_name, hire_date, country) VALUES (4, 'Sophia', 'Garcia', '2022-04-01', 'Mexico');","INSERT INTO employees (id, first_name, last_name, hire_date, country) VALUES ('Sophia', 'Garcia', '2022-04-01', 'Mexico'); INSERT INTO diversity_training (id, employee_id, training_name, completed_date) VALUES ('Sophia', 'Garcia', '2022-04-01');",0 What was the date for game 9?,"CREATE TABLE table_20760407_1 (date VARCHAR, game VARCHAR);",SELECT date FROM table_20760407_1 WHERE game = 9;,SELECT date FROM table_20760407_1 WHERE game = 9;,1 How many outcomes were there in the elections in California 38?,"CREATE TABLE table_1341663_6 (result VARCHAR, district VARCHAR);","SELECT COUNT(result) FROM table_1341663_6 WHERE district = ""California 38"";","SELECT COUNT(result) FROM table_1341663_6 WHERE district = ""California 38"";",1 List all the bridges and their construction material from the 'bridges' and 'construction_materials' tables.,"CREATE TABLE bridges (id INT, name VARCHAR(255), location VARCHAR(255)); CREATE TABLE construction_materials (bridge_id INT, material VARCHAR(255));","SELECT b.name, cm.material FROM bridges b LEFT JOIN construction_materials cm ON b.id = cm.bridge_id;","SELECT bridges.name, construction_materials.material FROM bridges INNER JOIN construction_materials ON bridges.id = construction_materials.bridge_id;",0 "Show the number of donors and total donation amounts per cause, joining the donors, donations, and causes tables.","CREATE TABLE causes (id INT, name VARCHAR(255)); CREATE TABLE donors (id INT, name VARCHAR(255)); CREATE TABLE donations (id INT, donor_id INT, cause_id INT, amount DECIMAL(10, 2)); ","SELECT c.name, COUNT(DISTINCT d.donor_id) as donor_count, SUM(donations.amount) as total_donation FROM causes c JOIN donations ON c.id = donations.cause_id JOIN donors ON donations.donor_id = donors.id GROUP BY c.name;","SELECT c.name, COUNT(d.id) as num_donors, SUM(d.amount) as total_donations FROM causes c JOIN donors d ON c.id = d.donor_id JOIN donations d ON d.cause_id = d.cause_id GROUP BY c.name;",0 Find the number of crimes in each district in 2021.,"CREATE TABLE district (did INT, name VARCHAR(255)); CREATE TABLE crimes (crime_id INT, district_id INT, year INT);","SELECT d.name, COUNT(c.crime_id) FROM district d JOIN crimes c ON d.did = c.district_id WHERE c.year = 2021 GROUP BY d.did;","SELECT d.did, COUNT(c.crime_id) FROM district d JOIN crimes c ON d.did = c.district_id WHERE c.year = 2021 GROUP BY d.did;",0 "What is the total investment of all clients in the ""US Equity"" fund?","CREATE TABLE clients (client_id INT, name VARCHAR(50), investment FLOAT); CREATE TABLE fund_investments (client_id INT, fund_name VARCHAR(50), investment FLOAT);",SELECT SUM(investment) FROM clients INNER JOIN fund_investments ON clients.client_id = fund_investments.client_id WHERE fund_investments.fund_name = 'US Equity';,SELECT SUM(investment) FROM clients INNER JOIN fund_investments ON clients.client_id = fund_investments.client_id WHERE fund_investments.fund_name = 'US Equity';,1 "What are the titles of papers published by ""Jeremy Gibbons""?","CREATE TABLE authorship (authid VARCHAR, paperid VARCHAR); CREATE TABLE papers (title VARCHAR, paperid VARCHAR); CREATE TABLE authors (authid VARCHAR, fname VARCHAR, lname VARCHAR);","SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = ""Jeremy"" AND t1.lname = ""Gibbons"";","SELECT T1.title FROM authors AS T1 JOIN authorship AS T2 ON T1.authid = T2.authid JOIN papers AS T3 ON T2.paperid = T3.paperid WHERE T3.fname = ""Jeremy Gibbons"";",0 What is the average property price for co-owned properties in the city of Seattle?,"CREATE TABLE properties (id INT, price FLOAT, city VARCHAR(20), coowners INT); ",SELECT AVG(price) FROM properties WHERE city = 'Seattle' AND coowners > 1;,SELECT AVG(price) FROM properties WHERE city = 'Seattle' AND coowners = (SELECT coowners FROM properties WHERE city = 'Seattle');,0 "What date was the game at Dowdy-Ficklen stadium • Greenville, NC, with 27,321 in attendance?","CREATE TABLE table_name_96 (date VARCHAR, site VARCHAR, attendance VARCHAR);","SELECT date FROM table_name_96 WHERE site = ""dowdy-ficklen stadium • greenville, nc"" AND attendance = ""27,321"";","SELECT date FROM table_name_96 WHERE site = ""dowdy-fizcklen stadium • greenville, nc"" AND attendance = ""27,321"";",0 What is the total revenue generated from sustainable sources?,"CREATE TABLE revenue (id INT, source VARCHAR(50), amount INT); ",SELECT SUM(amount) FROM revenue WHERE source = 'Sustainable';,SELECT SUM(amount) FROM revenue WHERE source LIKE '%Sustainable%';,0 What are the research interests of professors who have advised the most graduate students in the past year?,"CREATE TABLE professor_advising (id INT, professor TEXT, num_students INT); ","SELECT professor, research_interest FROM professors p JOIN professor_advising pa ON p.name = pa.professor ORDER BY num_students DESC LIMIT 1;","SELECT professor, SUM(num_students) as total_students FROM professor_advising WHERE num_students >= (SELECT MAX(num_students) FROM professor_advising WHERE num_students >= (SELECT MAX(num_students) FROM professor_advising WHERE num_students >= (SELECT MAX(num_students) FROM professor_advising WHERE num_students >= (SELECT MAX(num_students) FROM professor_advising WHERE num_students >= (SELECT MAX(num_students) FROM professor_advising WHERE num_students) FROM professor_advising WHERE num_students)) GROUP BY professor)))",0 What are the total assets under management (AUM) for each investment strategy?,"CREATE TABLE Investment_Strategies (strategy_id INT, strategy_name VARCHAR(30), AUM DECIMAL(12,2)); ","SELECT strategy_name, SUM(AUM) AS total_AUM FROM Investment_Strategies GROUP BY strategy_name;","SELECT strategy_name, SUM(AUM) FROM Investment_Strategies GROUP BY strategy_name;",0 "When the laps are over 53, what's the average grid?","CREATE TABLE table_name_32 (grid INTEGER, laps INTEGER);",SELECT AVG(grid) FROM table_name_32 WHERE laps > 53;,SELECT AVG(grid) FROM table_name_32 WHERE laps > 53;,1 "Update the safety record for vessel ""Atlantic Queen"" with id 106 to 3.8","CREATE TABLE safety_records (vessel_id INT, safety_score REAL);",UPDATE safety_records SET safety_score = 3.8 WHERE vessel_id = 106 AND name = 'Atlantic Queen';,UPDATE safety_records SET safety_score = 3.8 WHERE vessel_id = 106 AND vessel_name = 'Atlantic Queen';,0 "what is the total series percent that has total attempted less than 49, and a percent made of 0.777","CREATE TABLE table_name_63 (series_percent VARCHAR, total_attempted VARCHAR, percent_made VARCHAR);",SELECT COUNT(series_percent) FROM table_name_63 WHERE total_attempted < 49 AND percent_made = 0.777;,SELECT COUNT(series_percent) FROM table_name_63 WHERE total_attempted 49 AND percent_made = 0.777;,0 What is the plural present that has a past participle of e and an infinitive stem of e?,"CREATE TABLE table_name_61 (plur_pres VARCHAR, past_part VARCHAR, inf_stem VARCHAR);","SELECT plur_pres FROM table_name_61 WHERE past_part = ""e"" AND inf_stem = ""e"";","SELECT plural_pres FROM table_name_61 WHERE past_part = ""e"" AND inf_stem = ""e"";",0 How many fish species were added to sustainable seafood trend reports each year in the last 5 years?,"CREATE TABLE seafood_trends (year INT, species INT); ","SELECT year, COUNT(species) FROM seafood_trends WHERE year BETWEEN 2016 AND 2021 GROUP BY year;","SELECT year, COUNT(*) FROM seafood_trends WHERE year BETWEEN (SELECT YEAR(CURRENT_DATE) - 5) AND YEAR(CURRENT_DATE) GROUP BY year;",0 What is the total donation amount per region?,"CREATE TABLE donations (id INT, donor_name VARCHAR, donation_amount DECIMAL, donation_date DATE, region VARCHAR); ","SELECT region, SUM(donation_amount) FROM donations GROUP BY region;","SELECT region, SUM(donation_amount) FROM donations GROUP BY region;",1 Delete all records from the sharks table where the species is 'Great White',"CREATE TABLE sharks (id INT, species VARCHAR(255), weight FLOAT); ",DELETE FROM sharks WHERE species = 'Great White';,DELETE FROM sharks WHERE species = 'Great White';,1 "Show the number of followers for users who have posted about vegan food in the past week, filtered by gender (male, female, non-binary).","CREATE TABLE users (user_id INT, user_name VARCHAR(50), join_date DATE, follower_count INT, gender VARCHAR(10));CREATE TABLE posts (post_id INT, user_id INT, post_content TEXT, post_date DATE);","SELECT u.gender, COUNT(u.user_id) as follower_count FROM users u JOIN posts p ON u.user_id = p.user_id WHERE p.post_content LIKE '%vegan food%' AND p.post_date >= DATEADD(week, -1, GETDATE()) GROUP BY u.gender;","SELECT u.gender, SUM(u.follower_count) as total_followers FROM users u JOIN posts p ON u.user_id = p.user_id WHERE p.post_content LIKE '%vegan%' AND p.post_date >= DATEADD(week, -1, GETDATE()) GROUP BY u.gender;",0 "What is the sum of sales for sustainable fashion items in the UK, France, and Germany?","CREATE TABLE sales (sale_id INT, country VARCHAR(50), amount DECIMAL(5, 2), sustainable BOOLEAN); ","SELECT SUM(amount) FROM sales WHERE country IN ('UK', 'France', 'Germany') AND sustainable = TRUE;","SELECT SUM(amount) FROM sales WHERE country IN ('UK', 'France', 'Germany') AND sustainable = true;",0 Name the score which has opponent of stefano galvani,"CREATE TABLE table_name_85 (score VARCHAR, opponent VARCHAR);","SELECT score FROM table_name_85 WHERE opponent = ""stefano galvani"";","SELECT score FROM table_name_85 WHERE opponent = ""stefano galvani"";",1 What is the total quantity of Tencel used by brands in 2022?,"CREATE TABLE tencel_usage (brand VARCHAR(50), quantity INT, year INT); ",SELECT SUM(quantity) FROM tencel_usage WHERE year = 2022;,SELECT SUM(quantity) FROM tencel_usage WHERE year = 2022;,1 "What's the Termination of Mission listed that has a Presentation of Credentials for August 29, 1859?","CREATE TABLE table_name_34 (termination_of_mission VARCHAR, presentation_of_credentials VARCHAR);","SELECT termination_of_mission FROM table_name_34 WHERE presentation_of_credentials = ""august 29, 1859"";","SELECT termination_of_mission FROM table_name_34 WHERE presentation_of_credentials = ""august 29, 1859"";",1 What's the score in 1990?,"CREATE TABLE table_name_29 (score VARCHAR, year VARCHAR);","SELECT score FROM table_name_29 WHERE year = ""1990"";",SELECT score FROM table_name_29 WHERE year = 1990;,0 List astronauts who have flown on multiple missions for 'SpaceMates Inc.'?,"CREATE TABLE Astronauts (id INT, name VARCHAR(50), organization VARCHAR(50)); CREATE TABLE Missions (id INT, astronaut_id INT, spacecraft_name VARCHAR(50), company VARCHAR(50)); ",SELECT a.name FROM Astronauts a JOIN (SELECT astronaut_id FROM Missions GROUP BY astronaut_id HAVING COUNT(DISTINCT spacecraft_name) > 1) b ON a.id = b.astronaut_id WHERE a.organization = 'SpaceMates Inc.';,SELECT a.name FROM Astronauts a JOIN Missions m ON a.id = m.astronaut_id WHERE m.company = 'SpaceMates Inc.' GROUP BY a.name HAVING COUNT(m.id) > 1;,0 What format was released in August 1996?,"CREATE TABLE table_name_78 (format VARCHAR, release_date VARCHAR);","SELECT format FROM table_name_78 WHERE release_date = ""august 1996"";","SELECT format FROM table_name_78 WHERE release_date = ""august 1996"";",1 Insert a new recycling plant with name 'Recycling Plant 6' in Canada that processes 5 types of waste.,"CREATE TABLE recycling_plants (name TEXT, country TEXT, waste_types INTEGER); ","INSERT INTO recycling_plants (name, country, waste_types) VALUES ('Recycling Plant 6', 'Canada', 5);","INSERT INTO recycling_plants (name, country, waste_types) VALUES (6, 'Recycling Plant 6', 'Canada');",0 What is south melbourne's home side score?,CREATE TABLE table_name_53 (home_team VARCHAR);,"SELECT home_team AS score FROM table_name_53 WHERE home_team = ""south melbourne"";","SELECT home_team AS score FROM table_name_53 WHERE home_team = ""south melbourne"";",1 "When the laps are 31 and the constructor was honda, what's the sum of all grid values?","CREATE TABLE table_name_58 (grid INTEGER, constructor VARCHAR, laps VARCHAR);","SELECT SUM(grid) FROM table_name_58 WHERE constructor = ""honda"" AND laps = 31;","SELECT SUM(grid) FROM table_name_58 WHERE constructor = ""honda"" AND laps = 31;",1 What is the total enrollment at Laville?,"CREATE TABLE table_name_97 (enrollment VARCHAR, school VARCHAR);","SELECT COUNT(enrollment) FROM table_name_97 WHERE school = ""laville"";","SELECT COUNT(enrollment) FROM table_name_97 WHERE school = ""laville"";",1 How many totals have 2 for the bronze?,"CREATE TABLE table_name_40 (total VARCHAR, bronze VARCHAR);",SELECT COUNT(total) FROM table_name_40 WHERE bronze = 2;,SELECT COUNT(total) FROM table_name_40 WHERE bronze = 2;,1 What is the maximum number of research grants awarded to a single faculty member in the 'faculty' and 'research_grants' tables?,"CREATE TABLE faculty_research_grants (faculty_id INT, grant_id INT, amount FLOAT); ","SELECT MAX(fg.grant_count) FROM (SELECT f.id AS faculty_id, COUNT(*) AS grant_count FROM faculty f JOIN faculty_research_grants frg ON f.id = frg.faculty_id GROUP BY f.id) AS fg;",SELECT MAX(amount) FROM faculty_research_grants;,0 What is the lowest lost from drawn of 1 or greater?,"CREATE TABLE table_name_18 (lost INTEGER, drawn INTEGER);",SELECT MIN(lost) FROM table_name_18 WHERE drawn > 1;,SELECT MIN(lost) FROM table_name_18 WHERE drawn > 1;,1 Which models are lighter than 3500 but not built by the 'Ford Motor Company'?,"CREATE TABLE CAR_MAKERS (Id VARCHAR, FullName VARCHAR); CREATE TABLE MODEL_LIST (model VARCHAR, Model VARCHAR, Maker VARCHAR); CREATE TABLE CARS_DATA (Id VARCHAR, weight VARCHAR); CREATE TABLE CAR_NAMES (Model VARCHAR, MakeId VARCHAR);",SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName <> 'Ford Motor Company';,SELECT T1.model FROM MODEL_LIST AS T1 JOIN CARS_DATA AS T2 ON T1.Model = T2.Id JOIN CAR_NAMES AS T3 ON T2.MakeId = T3.MakeId WHERE T3.weight 3500 AND T3.FullName = 'Ford Motor Company';,0 "When the away team was north melbourne, what was the away team score?",CREATE TABLE table_name_63 (away_team VARCHAR);,"SELECT away_team AS score FROM table_name_63 WHERE away_team = ""north melbourne"";","SELECT away_team AS score FROM table_name_63 WHERE away_team = ""north melbourne"";",1 List all plants that have machines in the 'tooling' category.,"CREATE TABLE machines (machine_id INT, plant VARCHAR(10), category VARCHAR(10)); ",SELECT plant FROM machines WHERE category = 'tooling';,SELECT plant FROM machines WHERE category = 'tooling';,1 What is the total inventory value of the 'Healthy Delights' menu?,"CREATE TABLE HealthyDelights (menu_item VARCHAR(50), quantity INT, purchase_price DECIMAL(5,2)); ",SELECT SUM(quantity * purchase_price) as total_inventory_value FROM HealthyDelights;,SELECT SUM(quantity * purchase_price) FROM HealthyDelights WHERE menu_item = 'Healthy Delights';,0 Find the number of active drilling rigs in the North Sea and the Gulf of Mexico.,"CREATE TABLE drilling_rigs(region VARCHAR(255), status VARCHAR(255), count INT);","SELECT region, COUNT(*) AS active_rigs_count FROM drilling_rigs WHERE status = 'Active' AND region IN ('North Sea', 'Gulf of Mexico') GROUP BY region;","SELECT SUM(count) FROM drilling_rigs WHERE region IN ('North Sea', 'Gulf of Mexico');",0 Which captain is managed by gianluca vialli?,"CREATE TABLE table_name_31 (captain VARCHAR, manager VARCHAR);","SELECT captain FROM table_name_31 WHERE manager = ""gianluca vialli"";","SELECT captain FROM table_name_31 WHERE manager = ""gianluca vialli"";",1 "For the match that had detail of 2001 nrl grand final, what was the lowest total points?","CREATE TABLE table_name_73 (total_points INTEGER, details VARCHAR);","SELECT MIN(total_points) FROM table_name_73 WHERE details = ""2001 nrl grand final"";","SELECT MIN(total_points) FROM table_name_73 WHERE details = ""2001 nrl grand final"";",1 "What is the lowest quantity of the 1b n2 type, which was retired in 1907-12?","CREATE TABLE table_name_50 (quantity INTEGER, type VARCHAR, retired VARCHAR);","SELECT MIN(quantity) FROM table_name_50 WHERE type = ""1b n2"" AND retired = ""1907-12"";","SELECT MIN(quantity) FROM table_name_50 WHERE type = ""1b n2"" AND retired = ""1907-12"";",1 What is the maximum number of livestock in South American countries?,"CREATE TABLE livestock_count (country VARCHAR(255), livestock_count INT); ",SELECT MAX(livestock_count) FROM livestock_count WHERE country LIKE 'South%',"SELECT MAX(animal_count) FROM livestock_count WHERE country IN ('Brazil', 'Argentina', 'Colombia');",0 What is the minimum salary for employees in the Marketing department?,"CREATE TABLE Employees (EmployeeID INT, Department VARCHAR(50), Gender VARCHAR(10), Salary FLOAT); ",SELECT MIN(Salary) FROM Employees WHERE Department = 'Marketing';,SELECT MIN(Salary) FROM Employees WHERE Department = 'Marketing';,1 What is the total labor cost for green building projects in Texas and Oklahoma?,"CREATE TABLE Green_Buildings (Project_ID INT, Project_Name VARCHAR(255), State VARCHAR(255), Labor_Cost DECIMAL(10,2)); ","SELECT State, SUM(Labor_Cost) FROM Green_Buildings WHERE State IN ('Texas', 'Oklahoma') GROUP BY State;","SELECT SUM(Labor_Cost) FROM Green_Buildings WHERE State IN ('Texas', 'Oklahoma');",0 What was the average age of visitors who attended exhibitions in New York and Chicago?,"CREATE TABLE Exhibitions (id INT, city VARCHAR(20), visitor_age INT); ","SELECT AVG(visitor_age) FROM Exhibitions WHERE city IN ('New York', 'Chicago');","SELECT AVG(visitor_age) FROM Exhibitions WHERE city IN ('New York', 'Chicago');",1 "What is the Date of the game with a Score of 4–6, 4–6?","CREATE TABLE table_name_36 (date VARCHAR, score VARCHAR);","SELECT date FROM table_name_36 WHERE score = ""4–6, 4–6"";","SELECT date FROM table_name_36 WHERE score = ""4–6, 4–6"";",1 "What is Fleet Number(s), when Wheel Arrangement is ""2-6-0"", and when Class is ""Z""?","CREATE TABLE table_name_98 (fleet_number_s_ VARCHAR, wheel_arrangement VARCHAR, class VARCHAR);","SELECT fleet_number_s_ FROM table_name_98 WHERE wheel_arrangement = ""2-6-0"" AND class = ""z"";","SELECT fleet_number_s_ FROM table_name_98 WHERE wheel_arrangement = ""2-6-0"" AND class = ""z"";",1 How many goals have a goal ration less than 0.8 with 56 games?,"CREATE TABLE table_name_49 (goals VARCHAR, goal_ratio VARCHAR, games VARCHAR);",SELECT COUNT(goals) FROM table_name_49 WHERE goal_ratio < 0.8 AND games = 56;,SELECT COUNT(goals) FROM table_name_49 WHERE goal_ratio 0.8 AND games = 56;,0 "When did Bonecrusher win the championship at Bayamón, Puerto Rico?","CREATE TABLE table_name_5 (date_won VARCHAR, location VARCHAR, champion_s_ VARCHAR);","SELECT date_won FROM table_name_5 WHERE location = ""bayamón, puerto rico"" AND champion_s_ = ""bonecrusher"";","SELECT date_won FROM table_name_5 WHERE location = ""bayamón, puerto rico"" AND champion_s_ = ""bonecrusher"";",1 When was jack watson appointed?,"CREATE TABLE table_24490665_1 (appointed VARCHAR, name VARCHAR);","SELECT appointed FROM table_24490665_1 WHERE name = ""Jack Watson"";","SELECT appointed FROM table_24490665_1 WHERE name = ""Jack Watt"";",0 Who is the director when the title is 2003?,"CREATE TABLE table_name_27 (director VARCHAR, title VARCHAR);","SELECT director FROM table_name_27 WHERE title = ""2003"";","SELECT director FROM table_name_27 WHERE title = ""2003"";",1 "Who is the player with a t10 place, from the United States, and has a score of 69-70-76=215?","CREATE TABLE table_name_61 (player VARCHAR, place VARCHAR, country VARCHAR, score VARCHAR);","SELECT player FROM table_name_61 WHERE place = ""t10"" AND country = ""united states"" AND score = 69 - 70 - 76 = 215;","SELECT player FROM table_name_61 WHERE country = ""united states"" AND score = 69 - 70 - 76 = 215 AND place = ""t10"";",0 How many points against does the club that has a try bonus of 6 and tries against of 54 have ?,"CREATE TABLE table_name_92 (points_against VARCHAR, try_bonus VARCHAR, tries_against VARCHAR);","SELECT points_against FROM table_name_92 WHERE try_bonus = ""6"" AND tries_against = ""54"";","SELECT points_against FROM table_name_92 WHERE try_bonus = ""6"" AND tries_against = ""54"";",1 Who are the top 5 construction workers with the most working hours in California?,"CREATE TABLE Workers (Id INT, Name VARCHAR(50), ProjectId INT, Hours FLOAT, State VARCHAR(50)); ","SELECT Name, SUM(Hours) AS TotalHours FROM Workers WHERE State = 'California' GROUP BY Name ORDER BY TotalHours DESC LIMIT 5;","SELECT Name, Hours FROM Workers WHERE State = 'California' ORDER BY Hours DESC LIMIT 5;",0 Who is the Player born in 1981?,"CREATE TABLE table_name_40 (player VARCHAR, year_born VARCHAR);",SELECT player FROM table_name_40 WHERE year_born = 1981;,SELECT player FROM table_name_40 WHERE year_born = 1981;,1 Name the high rebounds for charlotte,"CREATE TABLE table_27700375_11 (high_rebounds VARCHAR, team VARCHAR);","SELECT high_rebounds FROM table_27700375_11 WHERE team = ""Charlotte"";","SELECT high_rebounds FROM table_27700375_11 WHERE team = ""Charlotte"";",1 "What is the average salary of full-time and part-time employees, by department?","CREATE TABLE departments (dept_id INT, dept_name TEXT); CREATE TABLE employees (employee_id INT, name TEXT, salary INT, dept_id INT, employment_status TEXT); ","SELECT dept_name, AVG(CASE WHEN employment_status = 'Full-time' THEN salary ELSE 0 END) AS avg_full_time_salary, AVG(CASE WHEN employment_status = 'Part-time' THEN salary ELSE 0 END) AS avg_part_time_salary FROM employees JOIN departments ON employees.dept_id = departments.dept_id GROUP BY dept_name;","SELECT d.dept_name, AVG(e.salary) as avg_salary FROM departments d JOIN employees e ON d.dept_id = e.dept_id GROUP BY d.dept_name;",0 What is the total cargo weight handled at each port in June 2022?,"CREATE TABLE port (port_id VARCHAR(10), port_name VARCHAR(20)); CREATE TABLE handling (handling_id INT, port_id VARCHAR(10), cargo_weight INT, handling_date DATE); ","SELECT port.port_name, SUM(handling.cargo_weight) FROM port INNER JOIN handling ON port.port_id = handling.port_id WHERE handling_date BETWEEN '2022-06-01' AND '2022-06-30' GROUP BY port.port_name;","SELECT p.port_name, SUM(h.cargo_weight) as total_cargo_weight FROM port p JOIN handling h ON p.port_id = h.port_id WHERE h.handling_date BETWEEN '2022-06-01' AND '2022-06-30' GROUP BY p.port_name;",0 Which team plays at Lake Oval?,"CREATE TABLE table_name_39 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_39 WHERE venue = ""lake oval"";","SELECT home_team FROM table_name_39 WHERE venue = ""lake oval"";",1 What are the average annual defense expenditures for each country in the 'defense_expenditures' table?,"CREATE TABLE defense_expenditures (country VARCHAR(50), year INT, expenditure INT); ","SELECT country, AVG(expenditure) as avg_annual_expenditure FROM defense_expenditures GROUP BY country;","SELECT country, AVG(expenditure) FROM defense_expenditures GROUP BY country;",0 "How many laps were completed with a start of 33, and a finish of 18?","CREATE TABLE table_name_67 (laps INTEGER, start VARCHAR, finish VARCHAR);","SELECT MAX(laps) FROM table_name_67 WHERE start = ""33"" AND finish = ""18"";",SELECT SUM(laps) FROM table_name_67 WHERE start = 33 AND finish = 18;,0 Determine the average carbon offsetting (in metric tons) of green building projects in the 'Greater Toronto Area',"CREATE TABLE green_buildings (id INT, name VARCHAR(100), location VARCHAR(50), carbon_offset FLOAT); ",SELECT AVG(carbon_offset) FROM green_buildings WHERE location = 'Greater Toronto Area';,SELECT AVG(carbon_offset) FROM green_buildings WHERE location = 'Greater Toronto Area';,1 What is the total revenue for concerts in 'Berlin'?,"CREATE TABLE concerts (id INT, artist_id INT, city VARCHAR(50), revenue FLOAT); ",SELECT SUM(revenue) as total_revenue FROM concerts WHERE city = 'Berlin';,SELECT SUM(revenue) FROM concerts WHERE city = 'Berlin';,0 What gender has a local board of albert–eden with a roll of more than 232 and Decile of 5?,"CREATE TABLE table_name_49 (gender VARCHAR, decile VARCHAR, local_board VARCHAR, roll VARCHAR);","SELECT gender FROM table_name_49 WHERE local_board = ""albert–eden"" AND roll > 232 AND decile = ""5"";","SELECT gender FROM table_name_49 WHERE local_board = ""albert–eden"" AND roll > 232 AND decile = ""5"";",1 "What is the total number of emergency incidents reported by different districts in 2021, ordered from highest to lowest?","CREATE TABLE Districts (id INT, district_name VARCHAR(255)); CREATE TABLE EmergencyIncidents (id INT, district_id INT, incident_date DATE); ","SELECT district_id, COUNT(*) as total_incidents FROM EmergencyIncidents WHERE incident_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY district_id ORDER BY total_incidents DESC;","SELECT Districts.district_name, COUNT(EmergencyIncidents.id) as total_incidents FROM Districts INNER JOIN EmergencyIncidents ON Districts.id = EmergencyIncidents.district_id WHERE YEAR(EmergencyIncidents.incident_date) = 2021 GROUP BY Districts.district_name ORDER BY total_incidents DESC;",0 What is the number of military innovation patents filed by country in 2021?,"CREATE TABLE military_patents (patent_name VARCHAR(255), country VARCHAR(255), year INT); ","SELECT country, COUNT(patent_name) FROM military_patents WHERE year = 2021 GROUP BY country;","SELECT country, COUNT(*) FROM military_patents WHERE year = 2021 GROUP BY country;",0 How many rovers have been deployed on the surface of Mars and are not operational?,"CREATE TABLE mars_rovers (id INT, name VARCHAR(50), status VARCHAR(50)); ",SELECT COUNT(*) FROM mars_rovers WHERE status != 'Operational';,SELECT COUNT(*) FROM mars_rovers WHERE status = 'non-operational';,0 Which rebound was 8 and has and ast that was less than 57?,"CREATE TABLE table_name_64 (b_ VARCHAR, reb_ INTEGER, no_ VARCHAR, a_ VARCHAR, ast_ VARCHAR);","SELECT AVG(reb_)[b_] FROM table_name_64 WHERE no_[a_] = ""8"" AND ast_[b_] < 57;","SELECT MAX(b_) FROM table_name_64 WHERE a_ = 8 AND ast_ 57 AND no_ = ""57"";",0 "What is the total number of students who received accommodations in the arts department and the physical education department, for the fall 2021 semester?","CREATE TABLE arts_accommodations (student_id INT, semester VARCHAR(10));CREATE TABLE pe_accommodations (student_id INT, semester VARCHAR(10)); ",SELECT COUNT(*) FROM arts_accommodations WHERE semester = 'fall 2021' UNION ALL SELECT COUNT(*) FROM pe_accommodations WHERE semester = 'fall 2021';,SELECT COUNT(DISTINCT a.student_id) FROM arts_accommodations a JOIN pe_accommodations p ON a.student_id = p.student_id WHERE a.semester = 'fall' AND p.semester = 'fall';,0 What is the number of online course enrollments by institution and course type?,"CREATE TABLE institutions (id INT, name VARCHAR(50), type VARCHAR(20)); CREATE TABLE enrollments (id INT, institution_id INT, course_type VARCHAR(20), student_count INT); ","SELECT i.name, e.course_type, SUM(e.student_count) as total_enrolled FROM institutions i JOIN enrollments e ON i.id = e.institution_id GROUP BY i.name, e.course_type;","SELECT i.name, i.type, SUM(e.student_count) FROM institutions i JOIN enrollments e ON i.id = e.institution_id WHERE e.course_type = 'Online' GROUP BY i.name, i.type;",0 What is the Winners when the United States is the runner-up at st. germain golf club?,"CREATE TABLE table_name_90 (winners VARCHAR, runners_up VARCHAR, venue VARCHAR);","SELECT winners FROM table_name_90 WHERE runners_up = ""united states"" AND venue = ""st. germain golf club"";","SELECT winners FROM table_name_90 WHERE runners_up = ""united states"" AND venue = ""st. germain golf club"";",1 Tell me the winning driver for jim clark as pole position and fastest lap,"CREATE TABLE table_name_1 (winning_driver VARCHAR, pole_position VARCHAR, fastest_lap VARCHAR);","SELECT winning_driver FROM table_name_1 WHERE pole_position = ""jim clark"" AND fastest_lap = ""jim clark"";","SELECT winning_driver FROM table_name_1 WHERE pole_position = ""jim clark"" AND fastest_lap = ""jim clark"";",1 "What is the sum of the area for the bahawalnagar district with a population more than 134,936?","CREATE TABLE table_name_32 (city_area_km_2__ INTEGER, district VARCHAR, city_population__2009_ VARCHAR);","SELECT SUM(city_area_km_2__) FROM table_name_32 WHERE district = ""bahawalnagar district"" AND city_population__2009_ > 134 OFFSET 936;","SELECT SUM(city_area_km_2__) FROM table_name_32 WHERE district = ""bahawalnagar"" AND city_population__2009_ > 134 OFFSET 936;",0 Which venue did Luke Blackwell serve as captain?,"CREATE TABLE table_13514348_7 (venue VARCHAR, captain VARCHAR);","SELECT venue FROM table_13514348_7 WHERE captain = ""Luke Blackwell"";","SELECT venue FROM table_13514348_7 WHERE captain = ""Luke Blackwell"";",1 What is the chassis of the Honda Engine from 2008?,"CREATE TABLE table_name_68 (chassis VARCHAR, engine VARCHAR, year VARCHAR);","SELECT chassis FROM table_name_68 WHERE engine = ""honda"" AND year = 2008;","SELECT chassis FROM table_name_68 WHERE engine = ""honda"" AND year = 2008;",1 Show the most common nationality of pilots.,CREATE TABLE pilot (Nationality VARCHAR);,SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1;,SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1;,1 What is the average population of animals in the 'animal_population' table?,"CREATE TABLE animal_population (animal_id INT, animal_name VARCHAR(50), population INT); ",SELECT AVG(population) FROM animal_population;,SELECT AVG(population) FROM animal_population;,1 When Bianca Manalo won Miss Universe Philippines who was the second runner-up?,"CREATE TABLE table_name_46 (second_runner_up VARCHAR, miss_universe_philippines VARCHAR);","SELECT second_runner_up FROM table_name_46 WHERE miss_universe_philippines = ""bianca manalo"";","SELECT second_runner_up FROM table_name_46 WHERE miss_universe_philippines = ""bianca manalo"";",1 How many goals were scored with a pos larger than 4 and active in 2001-?,"CREATE TABLE table_name_50 (goals_scored VARCHAR, pos VARCHAR, years_active VARCHAR);","SELECT goals_scored FROM table_name_50 WHERE pos > 4 AND years_active = ""2001-"";","SELECT goals_scored FROM table_name_50 WHERE pos > 4 AND years_active = ""2001-"";",1 How many providers have a destination of Blackpool?,"CREATE TABLE table_3005999_1 (provider VARCHAR, destination VARCHAR);","SELECT COUNT(provider) FROM table_3005999_1 WHERE destination = ""Blackpool"";","SELECT COUNT(provider) FROM table_3005999_1 WHERE destination = ""Blackpool"";",1 What is the rank for the Mixed Team nation with a total of less than 13?,"CREATE TABLE table_name_74 (rank VARCHAR, total VARCHAR, nation VARCHAR);","SELECT rank FROM table_name_74 WHERE total < 13 AND nation = ""mixed team"";","SELECT rank FROM table_name_74 WHERE total 13 AND nation = ""mixed team"";",0 What was the score for the 2014 FIFA World Cup Qual. competition?,"CREATE TABLE table_name_13 (score VARCHAR, competition VARCHAR);","SELECT score FROM table_name_13 WHERE competition = ""2014 fifa world cup qual."";","SELECT score FROM table_name_13 WHERE competition = ""2014 fifa world cup qualifier"";",0 Which programs received donations of more than $100 in a single day in 2022?,"CREATE TABLE DailyDonations (DonationID int, ProgramName varchar(255), DonationAmount decimal(10,2), DonationDate date); ","SELECT ProgramName FROM (SELECT ProgramName, ROW_NUMBER() OVER (PARTITION BY ProgramName ORDER BY DonationDate) as Rank FROM DailyDonations WHERE DonationAmount > 100) as DonationRanks WHERE Rank = 1;",SELECT ProgramName FROM DailyDonations WHERE DonationAmount > 100 AND DonationDate BETWEEN '2022-01-01' AND '2022-12-31';,0 Name the highest points when year is more than 1953,"CREATE TABLE table_name_8 (points INTEGER, year INTEGER);",SELECT MAX(points) FROM table_name_8 WHERE year > 1953;,SELECT MAX(points) FROM table_name_8 WHERE year > 1953;,1 What is the tool with the highest score in the AI category?,"CREATE TABLE tool (category VARCHAR(20), tool VARCHAR(20), score INT); ","SELECT tool, score FROM tool WHERE category = 'AI' AND score = (SELECT MAX(score) FROM tool WHERE category = 'AI');","SELECT tool, MAX(score) FROM tool WHERE category = 'AI' GROUP BY tool;",0 What are the names of all audience members who have attended film screenings but never theater productions?,"CREATE TABLE film_screenings (attendee_id INT, attendee_name TEXT); CREATE TABLE theater_productions (attendee_id INT, attendee_name TEXT);",SELECT attendee_name FROM film_screenings WHERE attendee_id NOT IN (SELECT attendee_id FROM theater_productions);,SELECT attendee_name FROM film_screenings JOIN theater_productions ON film_screenings.attendee_id = theater_productions.attendee_id;,0 what had a score like roberto devicenzo,"CREATE TABLE table_name_97 (score VARCHAR, player VARCHAR);","SELECT score FROM table_name_97 WHERE player = ""roberto devicenzo"";","SELECT score FROM table_name_97 WHERE player = ""roberto devicenzo"";",1 "Update the revenue of all Classical music streams in the United Kingdom on March 1, 2021 to 2.50.","CREATE TABLE streams (song_id INT, stream_date DATE, genre VARCHAR(20), country VARCHAR(20), revenue DECIMAL(10,2)); ",UPDATE streams SET revenue = 2.50 WHERE genre = 'Classical' AND country = 'UK' AND stream_date = '2021-03-01';,UPDATE streams SET revenue = 2.50 WHERE genre = 'Classical' AND country = 'United Kingdom' AND stream_date BETWEEN '2021-01-01' AND '2021-03-31';,0 What is the maximum safety score for each chemical category?,"CREATE TABLE chemical_safety_scores_v2 (chemical_id INT, category VARCHAR(255), safety_score INT); ","SELECT category, MAX(safety_score) FROM chemical_safety_scores_v2 GROUP BY category;","SELECT category, MAX(safety_score) FROM chemical_safety_scores_v2 GROUP BY category;",1 What is the First Pref Votes for the % FPv of 0.06?,"CREATE TABLE table_name_23 (first_pref_votes VARCHAR, _percentage_fpv VARCHAR);","SELECT first_pref_votes FROM table_name_23 WHERE _percentage_fpv = ""0.06"";","SELECT first_pref_votes FROM table_name_23 WHERE _percentage_fpv = ""0.66"";",0 On how many different dates was the episode written by Charlie Day aired for the first time?,"CREATE TABLE table_29273115_1 (original_air_date VARCHAR, written_by VARCHAR);","SELECT COUNT(original_air_date) FROM table_29273115_1 WHERE written_by = ""Charlie Day"";","SELECT COUNT(original_air_date) FROM table_29273115_1 WHERE written_by = ""Charlie Day"";",1 what was the score on june 16?,"CREATE TABLE table_name_77 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_77 WHERE date = ""june 16"";","SELECT score FROM table_name_77 WHERE date = ""june 16"";",1 Which games saw a record set in the long jump event?,"CREATE TABLE table_name_94 (games VARCHAR, event VARCHAR);","SELECT games FROM table_name_94 WHERE event = ""long jump"";","SELECT games FROM table_name_94 WHERE event = ""long jump"";",1 What is the most common type of crime in New York City?,"CREATE TABLE crimes (id INT, city VARCHAR(255), type VARCHAR(255), number_of_crimes INT); ","SELECT type, COUNT(*) AS count FROM crimes WHERE city = 'New_York_City' GROUP BY type ORDER BY count DESC LIMIT 1;","SELECT type, COUNT(*) as count FROM crimes WHERE city = 'New York City' GROUP BY type ORDER BY count DESC LIMIT 1;",0 Mike Forshaw had 0 goals and 28 points. What is his position?,"CREATE TABLE table_name_74 (position VARCHAR, player VARCHAR, goals VARCHAR, points VARCHAR);","SELECT position FROM table_name_74 WHERE goals = 0 AND points = 28 AND player = ""mike forshaw"";","SELECT position FROM table_name_74 WHERE goals = 0 AND points = 28 AND player = ""mike forshaw"";",1 Update the ethnicity of worker 5 to 'Hispanic',"CREATE TABLE community_health_workers (worker_id INT, ethnicity VARCHAR(50)); ",UPDATE community_health_workers SET ethnicity = 'Hispanic' WHERE worker_id = 5;,UPDATE community_health_workers SET ethnicity = 'Hispanic' WHERE worker_id = 5;,1 "Find total quantity sold for each strain in Oregon, ordered by strain name.","CREATE TABLE strains (id INT, name VARCHAR(255)); CREATE TABLE sales_details (id INT, sale_id INT, strain_id INT, quantity INT);","SELECT s.name, SUM(sd.quantity) as total_quantity_sold FROM strains s INNER JOIN sales_details sd ON s.id = sd.strain_id WHERE s.state = 'OR' GROUP BY s.name ORDER BY s.name;","SELECT s.name, SUM(s.quantity) as total_quantity FROM strains s JOIN sales_details s ON s.id = s.strain_id WHERE s.state = 'Oregon' GROUP BY s.name ORDER BY total_quantity DESC;",0 "How many silver medals did Estonia, which won more than 1 gold and less than 97 medals total, win?","CREATE TABLE table_name_20 (silver VARCHAR, nation VARCHAR, gold VARCHAR, total VARCHAR);","SELECT silver FROM table_name_20 WHERE gold > 1 AND total < 97 AND nation = ""estonia"";","SELECT silver FROM table_name_20 WHERE gold > 1 AND total 97 AND nation = ""estonia"";",0 Delete the marine protected area with the maximum depth,"CREATE TABLE marine_protected_areas (area_id INT, name VARCHAR(50), depth FLOAT); ",DELETE FROM marine_protected_areas WHERE depth = (SELECT MAX(depth) FROM marine_protected_areas);,DELETE FROM marine_protected_areas WHERE depth = (SELECT MAX(depth) FROM marine_protected_areas);,1 "What is the socket with an order part number of amm300dbo22gq and a September 10, 2009 release date?","CREATE TABLE table_name_34 (socket VARCHAR, release_date VARCHAR, order_part_number VARCHAR);","SELECT socket FROM table_name_34 WHERE release_date = ""september 10, 2009"" AND order_part_number = ""amm300dbo22gq"";","SELECT socket FROM table_name_34 WHERE release_date = ""september 10, 2009"" AND order_part_number = ""amm300dbo22gq"";",1 List all unique 'impact_categories' in the 'Locations' table.,"CREATE TABLE LocationsCategories (id INT, country VARCHAR(255), region VARCHAR(255), impact_category VARCHAR(255));",SELECT DISTINCT impact_category FROM LocationsCategories;,SELECT DISTINCT impact_category FROM LocationsCategories;,1 What is the total calorie count for vegan meals served by each vendor?,"CREATE TABLE Meals (MealID INT, MealName VARCHAR(50), Vendor VARCHAR(50), IsVegan BOOLEAN, Calories INT); ","SELECT Vendor, SUM(Calories) as TotalCalories FROM Meals WHERE IsVegan = TRUE GROUP BY Vendor;","SELECT Vendor, SUM(Calories) FROM Meals WHERE IsVegan = true GROUP BY Vendor;",0 List clinics with more than 5 doctors in a rural region.,"CREATE TABLE clinics (id INT, name VARCHAR(50), region VARCHAR(20), num_doctors INT); CREATE TABLE doctors (id INT, name VARCHAR(50), clinic_id INT, specialty VARCHAR(30)); ",SELECT clinics.name FROM clinics INNER JOIN doctors ON clinics.id = doctors.clinic_id GROUP BY clinics.id HAVING COUNT(doctors.id) > 5;,SELECT c.name FROM clinics c INNER JOIN doctors d ON c.id = d.clinic_id WHERE c.region = 'Rural' GROUP BY c.name HAVING COUNT(DISTINCT d.specialty) > 5;,0 Find the average hours for the students whose tryout decision is no.,"CREATE TABLE player (HS INTEGER, pID VARCHAR); CREATE TABLE tryout (pID VARCHAR, decision VARCHAR);",SELECT AVG(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no';,"SELECT AVG(HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = ""no"";",0 What is the average carbon offset per project for carbon offset initiatives in the state of California?,"CREATE TABLE carbon_offsets (project_name TEXT, state TEXT, carbon_offset INTEGER); ",SELECT AVG(carbon_offset) FROM carbon_offsets WHERE state = 'California';,SELECT AVG(carbon_offset) FROM carbon_offsets WHERE state = 'California';,1 "Who was the director of the movie having a release date of 1934-09-15, an MM Series and a production number less than 6494?","CREATE TABLE table_name_12 (director VARCHAR, release_date VARCHAR, series VARCHAR, production_num VARCHAR);","SELECT director FROM table_name_12 WHERE series = ""mm"" AND production_num < 6494 AND release_date = ""1934-09-15"";","SELECT director FROM table_name_12 WHERE series = ""mm"" AND production_num 6494 AND release_date = ""1934-09-15"";",0 What is the total number of engines for each aircraft?,"CREATE TABLE Aircraft (id INT, model VARCHAR(255), manufacturer VARCHAR(255), year_manufactured INT, total_flight_hours INT); CREATE TABLE Engine (id INT, aircraft_id INT, engine_type VARCHAR(255), hours_since_last_service INT); ","SELECT a.model, COUNT(e.id) FROM Aircraft a JOIN Engine e ON a.id = e.aircraft_id GROUP BY a.model;","SELECT a.model, COUNT(e.id) as total_engines FROM Aircraft a JOIN Engine e ON a.id = e.aviation_id GROUP BY a.model;",0 What is the minimum cost of a project in the 'Buildings' category?,"CREATE TABLE InfrastructureProjects (id INT, category VARCHAR(20), cost FLOAT); ",SELECT MIN(cost) FROM InfrastructureProjects WHERE category = 'Buildings';,SELECT MIN(cost) FROM InfrastructureProjects WHERE category = 'Buildings';,1 What is the sum of the gold medals for the nation of Great britain who had more than 8 silvers and a total of less than 61 medals?,"CREATE TABLE table_name_18 (gold INTEGER, total VARCHAR, silver VARCHAR, nation VARCHAR);","SELECT SUM(gold) FROM table_name_18 WHERE silver > 8 AND nation = ""great britain"" AND total < 61;","SELECT SUM(gold) FROM table_name_18 WHERE silver > 8 AND nation = ""great britain"" AND total 61;",0 "What is the total number of posts with the hashtag ""#sustainability"" in the past year, grouped by month?","CREATE TABLE posts (id INT, hashtags TEXT, created_at DATETIME);","SELECT MONTH(posts.created_at) AS month, COUNT(*) AS count FROM posts WHERE FIND_IN_SET('sustainability', posts.hashtags) > 0 AND posts.created_at >= DATE_SUB(NOW(), INTERVAL 1 YEAR) GROUP BY month;","SELECT DATE_FORMAT(created_at, '%Y-%m') as month, COUNT(*) as total_posts FROM posts WHERE hashtags LIKE '%#sustainability%' AND created_at >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) GROUP BY month;",0 What is the minimum content rating for anime TV shows?,"CREATE TABLE TV_Shows (show_id INT, show_name VARCHAR(255), content_rating DECIMAL(3,2), genre VARCHAR(255)); ",SELECT MIN(content_rating) FROM TV_Shows WHERE genre = 'Anime';,SELECT MIN(content_rating) FROM TV_Shows WHERE genre = 'Anime';,1 What is the average rank for players with under 205 matches and under 100 goals?,"CREATE TABLE table_name_92 (rank INTEGER, matches VARCHAR, goals VARCHAR);",SELECT AVG(rank) FROM table_name_92 WHERE matches < 205 AND goals < 100;,SELECT AVG(rank) FROM table_name_92 WHERE matches 205 AND goals 100;,0 Delete fairness issues for models from Germany with an id greater than 5.,"CREATE TABLE fairness (model_id INT, country VARCHAR(255), issue_description VARCHAR(255)); ",DELETE FROM fairness WHERE model_id > 5 AND country = 'Germany';,DELETE FROM fairness WHERE country = 'Germany' AND model_id > 5;,0 What are the names of representatives with more than 10000 votes in election?,"CREATE TABLE representative (Name VARCHAR, Representative_ID VARCHAR); CREATE TABLE election (Representative_ID VARCHAR);",SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE Votes > 10000;,SELECT T1.Name FROM representative AS T1 JOIN election AS T2 ON T1.Representative_ID = T2.Representative_ID GROUP BY T1.Representative_ID HAVING COUNT(*) > 10000;,0 What is the average cultural competency score for mental health facilities in California?,"CREATE TABLE mental_health_facilities (id INT, name VARCHAR, state VARCHAR, cultural_competency_score INT); ","SELECT state, AVG(cultural_competency_score) as avg_score FROM mental_health_facilities WHERE state = 'California' GROUP BY state;",SELECT AVG(cultural_competency_score) FROM mental_health_facilities WHERE state = 'California';,0 Which manager sponsor arke shirt?,"CREATE TABLE table_name_90 (manager VARCHAR, shirt_sponsor VARCHAR);","SELECT manager FROM table_name_90 WHERE shirt_sponsor = ""arke"";","SELECT manager FROM table_name_90 WHERE shirt_sponsor = ""arke"";",1 "Name the october 15, 2004 catalogue","CREATE TABLE table_name_48 (catalogue VARCHAR, date VARCHAR);","SELECT catalogue FROM table_name_48 WHERE date = ""october 15, 2004"";","SELECT catalogue FROM table_name_48 WHERE date = ""october 15, 2004"";",1 "Identify the hotel_id and hotel_name with the highest unique visitors to virtual tours in June, 2021?","CREATE TABLE virtual_tours (hotel_id INT, tour_date DATE, unique_visitors INT); CREATE TABLE hotels (hotel_id INT, hotel_name VARCHAR(50)); ","SELECT h.hotel_id, h.hotel_name, SUM(vt.unique_visitors) as total_visitors FROM virtual_tours vt JOIN hotels h ON vt.hotel_id = h.hotel_id WHERE vt.tour_date BETWEEN '2021-06-01' AND '2021-06-30' GROUP BY h.hotel_id, h.hotel_name ORDER BY total_visitors DESC LIMIT 1;","SELECT h.hotel_name, h.hotel_id FROM virtual_tours vt JOIN hotels h ON vt.hotel_id = h.hotel_id WHERE vt.tour_date BETWEEN '2021-06-01' AND '2021-06-30' GROUP BY h.hotel_name ORDER BY unique_visitors DESC;",0 What are the environmental ratings of organizations with strong social performance?,"CREATE TABLE esg_rating (id INT PRIMARY KEY, organization_id INT, environmental_score FLOAT, social_score FLOAT, governance_score FLOAT);",SELECT environmental_score FROM esg_rating WHERE social_score > 8;,"SELECT organization_id, environmental_score, social_score, governance_score FROM esg_rating WHERE social_score = (SELECT MAX(social_score) FROM esg_rating);",0 "Which viewers have the language of troff (typesetter runoff) , groff (gnu runoff)?","CREATE TABLE table_1574968_1 (viewer VARCHAR, language VARCHAR);","SELECT viewer FROM table_1574968_1 WHERE language = ""troff (typesetter runoff) , groff (GNU runoff)"";","SELECT viewer FROM table_1574968_1 WHERE language = ""Troff (typesetter runoff), Groff (gnu runoff)"";",0 What country has a to par larger than 5 and a player John Mahaffey?,"CREATE TABLE table_name_38 (country VARCHAR, to_par VARCHAR, player VARCHAR);","SELECT country FROM table_name_38 WHERE to_par > 5 AND player = ""john mahaffey"";","SELECT country FROM table_name_38 WHERE to_par > 5 AND player = ""john mahaffey"";",1 "Show me the number of AI algorithms that have been evaluated for fairness, excluding those with missing data.","CREATE TABLE Algorithm_Fairness (algorithm_name TEXT, evaluated_for_fairness BOOLEAN, missing_data BOOLEAN); ",SELECT COUNT(algorithm_name) FROM Algorithm_Fairness WHERE evaluated_for_fairness = TRUE AND missing_data = FALSE;,SELECT COUNT(*) FROM Algorithm_Fairness WHERE evaluated_for_fairness = true AND missing_data = false;,0 What is every party A with a constituency of Tiruchendur?,"CREATE TABLE table_22753439_1 (party VARCHAR, constituency VARCHAR);","SELECT party AS a FROM table_22753439_1 WHERE constituency = ""Tiruchendur"";","SELECT party FROM table_22753439_1 WHERE constituency = ""Tiruchendur"";",0 Which Surface has a Result of fernando verdasco?,"CREATE TABLE table_name_10 (surface VARCHAR, result VARCHAR);","SELECT surface FROM table_name_10 WHERE result = ""fernando verdasco"";","SELECT surface FROM table_name_10 WHERE result = ""fernando verdasco"";",1 What is the thurs 25 aug when wed 24 aug is 19' 59.73 113.216mph?,"CREATE TABLE table_30058355_2 (thurs_25_aug VARCHAR, wed_24_aug VARCHAR);","SELECT thurs_25_aug FROM table_30058355_2 WHERE wed_24_aug = ""19' 59.73 113.216mph"";","SELECT thurs_25_aug FROM table_30058355_2 WHERE wed_24_aug = ""19' 59.73 113.216mph"";",1 "What is the Surface of the match played on October 5, 1987?","CREATE TABLE table_name_77 (surface VARCHAR, date VARCHAR);","SELECT surface FROM table_name_77 WHERE date = ""october 5, 1987"";","SELECT surface FROM table_name_77 WHERE date = ""october 5, 1987"";",1 What is the average Top-10 with a greater than 11 Top-25 and a less than 2 wins?,"CREATE TABLE table_name_15 (top_10 INTEGER, top_25 VARCHAR, wins VARCHAR);",SELECT AVG(top_10) FROM table_name_15 WHERE top_25 > 11 AND wins < 2;,SELECT AVG(top_10) FROM table_name_15 WHERE top_25 > 11 AND wins 2;,0 Name the most 4/inns,CREATE TABLE table_17900317_5 (Id VARCHAR);,SELECT MAX(4 AS _inns) FROM table_17900317_5;,"SELECT COUNT(*) FROM table_17900317_5 WHERE Id = ""4/inns"";",0 List the names and areas of protected forests in the Amazon Basin.,"CREATE TABLE ProtectedForests (id INT, name VARCHAR(255), region VARCHAR(255), area FLOAT); ","SELECT name, area FROM ProtectedForests WHERE region = 'Amazon Basin';","SELECT name, area FROM ProtectedForests WHERE region = 'Amazon Basin';",1 "What is the Total Apps when League Cup Apps is 0 (1), and position is df?","CREATE TABLE table_name_55 (total_apps VARCHAR, league_cup_apps VARCHAR, position VARCHAR);","SELECT total_apps FROM table_name_55 WHERE league_cup_apps = ""0 (1)"" AND position = ""df"";","SELECT total_apps FROM table_name_55 WHERE league_cup_apps = ""0 (1)"" AND position = ""df"";",1 Identify the top 2 sectors with the highest increase in CO2 emissions between 2019 and 2020 from the 'greenhouse_gas_emissions' table.,"CREATE TABLE greenhouse_gas_emissions (sector VARCHAR(255), co2_emissions DECIMAL(10,2), year INT); ","SELECT sector, (co2_emissions - LAG(co2_emissions) OVER (ORDER BY year)) as co2_emissions_increase FROM greenhouse_gas_emissions WHERE year IN (2019, 2020) ORDER BY co2_emissions_increase DESC LIMIT 2;","SELECT sector, co2_emissions FROM greenhouse_gas_emissions WHERE year BETWEEN 2019 AND 2020 ORDER BY co2_emissions DESC LIMIT 2;",0 Update the budget for the 'Rural Road Improvement' project in Mexico to 120000.00.,"CREATE TABLE projects (id INT, project_name VARCHAR(100), location VARCHAR(50), start_date DATE, end_date DATE, budget DECIMAL(10,2)); ",UPDATE projects SET budget = 120000.00 WHERE project_name = 'Rural Road Improvement' AND location = 'Puebla';,UPDATE projects SET budget = 120000.00 WHERE project_name = 'Rural Road Improvement' AND location = 'Mexico';,0 What was the total weight of shipments from Africa to Asia in June 2022?,"CREATE TABLE Shipments (id INT, source VARCHAR(50), destination VARCHAR(50), weight FLOAT, ship_date DATE); ",SELECT SUM(weight) FROM Shipments WHERE (source = 'Nigeria' OR source = 'Egypt' OR source = 'South Africa') AND (destination = 'China' OR destination = 'Japan' OR destination = 'India') AND ship_date = '2022-06-01';,SELECT SUM(weight) FROM Shipments WHERE source = 'Africa' AND destination = 'Asia' AND ship_date BETWEEN '2022-01-01' AND '2022-06-30';,0 What is the monto where the total region is 11230?,"CREATE TABLE table_12526990_1 (monto VARCHAR, total_region VARCHAR);",SELECT COUNT(monto) FROM table_12526990_1 WHERE total_region = 11230;,SELECT monto FROM table_12526990_1 WHERE total_region = 11230;,0 Show the names and grades of each high schooler.,"CREATE TABLE Highschooler (name VARCHAR, grade VARCHAR);","SELECT name, grade FROM Highschooler;","SELECT name, grade FROM Highschooler;",1 What is the title when the series # is 7?,"CREATE TABLE table_29747178_2 (title VARCHAR, series__number VARCHAR);",SELECT title FROM table_29747178_2 WHERE series__number = 7;,SELECT title FROM table_29747178_2 WHERE series__number = 7;,1 How many consumers in the 'ethical_consumers' table have made purchases in the last 6 months?,"CREATE TABLE ethical_consumers (consumer_id INT, name TEXT, last_purchase_date DATE);","SELECT COUNT(*) FROM ethical_consumers WHERE last_purchase_date >= DATEADD(month, -6, GETDATE());","SELECT COUNT(*) FROM ethical_consumers WHERE last_purchase_date >= DATEADD(month, -6, GETDATE());",1 How far is the olbia to sassari route?,"CREATE TABLE table_name_99 (distance VARCHAR, course VARCHAR);","SELECT distance FROM table_name_99 WHERE course = ""olbia to sassari"";","SELECT distance FROM table_name_99 WHERE course = ""olbia to sassari"";",1 Count the number of size 14 dresses in the inventory,"CREATE TABLE inventory (id INT, product_id INT, product_name VARCHAR(50), size INT, quantity INT); ",SELECT COUNT(*) FROM inventory WHERE size = 14 AND product_name = 'Dress';,SELECT COUNT(*) FROM inventory WHERE size = 14;,0 What is the total revenue generated from prepaid mobile plans in California for the year 2021?,"CREATE TABLE mobile_plans (id INT, plan_type VARCHAR(10), state VARCHAR(20), revenue DECIMAL(10,2));",SELECT SUM(revenue) FROM mobile_plans WHERE plan_type = 'prepaid' AND state = 'California' AND YEAR(order_date) = 2021;,SELECT SUM(revenue) FROM mobile_plans WHERE plan_type = 'prepaid' AND state = 'California' AND YEAR(plan_date) = 2021;,0 "List all suppliers that have provided both organic and non-organic ingredients to restaurants, along with the total number of ingredients supplied by each.","CREATE TABLE suppliers (supplier_id INT, organic_supplier BOOLEAN); CREATE TABLE ingredients (ingredient_id INT, supplier_id INT, is_organic BOOLEAN); ","SELECT s.supplier_id, COUNT(i.ingredient_id) as total_ingredients FROM suppliers s INNER JOIN ingredients i ON s.supplier_id = i.supplier_id WHERE s.organic_supplier = true OR i.is_organic = false GROUP BY s.supplier_id;","SELECT s.organic_supplier, COUNT(i.ingredient_id) FROM suppliers s JOIN ingredients i ON s.supplier_id = i.supplier_id WHERE i.is_organic = true GROUP BY s.organic_supplier;",0 What is the size of the biggest crowd for a game where Fitzroy was the away team?,"CREATE TABLE table_name_29 (crowd INTEGER, away_team VARCHAR);","SELECT MAX(crowd) FROM table_name_29 WHERE away_team = ""fitzroy"";","SELECT MAX(crowd) FROM table_name_29 WHERE away_team = ""fitzroy"";",1 What is the average age of teachers who have completed at least one professional development course in the past year?,"CREATE TABLE teachers (teacher_id INT, age INT, num_courses_completed INT); ","SELECT AVG(age) FROM teachers WHERE num_courses_completed >= (SELECT COUNT(course_id) FROM courses WHERE completion_date > DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR));",SELECT AVG(age) FROM teachers WHERE num_courses_completed >= 1;,0 How many renewable energy projects were completed in each country in the past 2 years?,"CREATE TABLE Renewable_Energy_Projects (Project_ID INT, Country VARCHAR(50), Completion_Date DATE); ","SELECT Country, COUNT(*) FROM Renewable_Energy_Projects WHERE Completion_Date >= DATEADD(YEAR, -2, CURRENT_TIMESTAMP) GROUP BY Country;","SELECT Country, COUNT(*) FROM Renewable_Energy_Projects WHERE Completion_Date >= DATEADD(year, -2, GETDATE()) GROUP BY Country;",0 What is the total budget allocated for military innovation by countries in the EU?,"CREATE TABLE military_innovation (country VARCHAR(50), budget INT); ",SELECT SUM(mi.budget) FROM military_innovation mi;,"SELECT SUM(budget) FROM military_innovation WHERE country IN ('Germany', 'France', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', ",0 Update the average salary for the 'metalwork' department in the 'factory1' to 3200.00.,"CREATE TABLE factories (factory_id INT, department VARCHAR(255), worker_count INT, average_salary DECIMAL(10,2)); ",UPDATE factories SET average_salary = 3200.00 WHERE factory_id = 1 AND department = 'metalwork';,UPDATE factories SET average_salary = 3200.00 WHERE department ='metalwork' AND factory_id = 1;,0 Which country sources the highest quantity of organic ingredients for cosmetic products?,"CREATE TABLE ingredient_sourcing (ingredient_name VARCHAR(100), source_country VARCHAR(100), is_organic BOOLEAN); ","SELECT source_country, SUM(CASE WHEN is_organic THEN 1 ELSE 0 END) AS total_organic_ingredients FROM ingredient_sourcing GROUP BY source_country ORDER BY total_organic_ingredients DESC LIMIT 1;","SELECT source_country, MAX(is_organic) FROM ingredient_sourcing GROUP BY source_country;",0 "What is the sum of households that makes a median household income of $44,718?","CREATE TABLE table_name_43 (number_of_households INTEGER, median_household_income VARCHAR);","SELECT SUM(number_of_households) FROM table_name_43 WHERE median_household_income = ""$44,718"";","SELECT SUM(number_of_households) FROM table_name_43 WHERE median_household_income = ""$44,718"";",1 How many episodes had 3.62 million viewers?,"CREATE TABLE table_22353769_3 (share VARCHAR, viewers__millions_ VARCHAR);","SELECT COUNT(share) FROM table_22353769_3 WHERE viewers__millions_ = ""3.62"";","SELECT COUNT(share) FROM table_22353769_3 WHERE viewers__millions_ = ""3.62"";",1 Which Album had a year less than 2005 with a Label by Ministry of Sound?,"CREATE TABLE table_name_94 (album VARCHAR, year VARCHAR, label VARCHAR);","SELECT album FROM table_name_94 WHERE year < 2005 AND label = ""ministry of sound"";","SELECT album FROM table_name_94 WHERE year 2005 AND label = ""minimum of sound"";",0 "What was the date of birth of the member of the United States House of Representatives that began their term on April 24, 1902?","CREATE TABLE table_name_66 (date_of_birth VARCHAR, begin_date VARCHAR);","SELECT date_of_birth FROM table_name_66 WHERE begin_date = ""april 24, 1902"";","SELECT date_of_birth FROM table_name_66 WHERE begin_date = ""april 24, 1902"";",1 What is the average number of tries for British and Irish Lions with less than 2 games?,"CREATE TABLE table_name_82 (tries INTEGER, team VARCHAR, games VARCHAR);","SELECT AVG(tries) FROM table_name_82 WHERE team = ""british and irish lions"" AND games < 2;","SELECT AVG(tries) FROM table_name_82 WHERE team = ""british and irish lions"" AND games 2;",0 How many games have been designed by women game designers from Europe?,"CREATE TABLE game_designers (id INT, name VARCHAR(50), gender VARCHAR(50), country VARCHAR(50)); ","SELECT COUNT(*) FROM game_designers WHERE game_designers.gender = 'Female' AND game_designers.country IN ('Germany', 'France', 'Italy', 'Spain');",SELECT COUNT(*) FROM game_designers WHERE gender = 'Female' AND country = 'Europe';,0 What year was Asi Peko?,"CREATE TABLE table_name_60 (year VARCHAR, name VARCHAR);","SELECT year FROM table_name_60 WHERE name = ""asi peko"";","SELECT year FROM table_name_60 WHERE name = ""asi eko"";",0 What is the smallest ansi code?,CREATE TABLE table_18600760_13 (ansi_code INTEGER);,SELECT MIN(ansi_code) FROM table_18600760_13;,SELECT MIN(ansi_code) FROM table_18600760_13;,1 "What is the total to par of player jeff sluman, who won before 1993 and has a total greater than 154?","CREATE TABLE table_name_48 (to_par VARCHAR, total VARCHAR, year_won VARCHAR, player VARCHAR);","SELECT COUNT(to_par) FROM table_name_48 WHERE year_won < 1993 AND player = ""jeff sluman"" AND total > 154;","SELECT COUNT(to_par) FROM table_name_48 WHERE year_won 1993 AND player = ""jeff sluman"" AND total > 154;",0 "Which position has an Overall smaller than 64, and a Round of 1?","CREATE TABLE table_name_14 (position VARCHAR, overall VARCHAR, round VARCHAR);",SELECT position FROM table_name_14 WHERE overall < 64 AND round = 1;,SELECT position FROM table_name_14 WHERE overall 64 AND round = 1;,0 Get the top 5 carrier_name with the highest count of shipments from the shipment table,"CREATE TABLE shipment (shipment_id VARCHAR(10), status VARCHAR(20), warehouse_id VARCHAR(10), carrier_name VARCHAR(30), shipped_date DATE);","SELECT carrier_name, COUNT(*) as count FROM shipment GROUP BY carrier_name ORDER BY count DESC LIMIT 5;","SELECT carrier_name, COUNT(*) as num_shipments FROM shipment GROUP BY carrier_name ORDER BY num_shipments DESC LIMIT 5;",0 "How many clients have an investment greater than $10,000 in any fund?","CREATE TABLE clients (client_id INT, name VARCHAR(50), investment FLOAT); CREATE TABLE fund_investments (client_id INT, fund_name VARCHAR(50), investment FLOAT);",SELECT COUNT(DISTINCT clients.client_id) FROM clients INNER JOIN fund_investments ON clients.client_id = fund_investments.client_id WHERE clients.investment > 10000;,SELECT COUNT(*) FROM clients INNER JOIN fund_investments ON clients.client_id = fund_investments.client_id WHERE investment > 10000;,0 Who are the top 3 players with the highest scores in Europe?,"CREATE TABLE PlayerScores (PlayerID int, PlayerName varchar(50), Score int, Country varchar(50)); ","SELECT PlayerName, Score FROM PlayerScores WHERE Country = 'Europe' ORDER BY Score DESC LIMIT 3;","SELECT PlayerName, Score FROM PlayerScores WHERE Country = 'Europe' ORDER BY Score DESC LIMIT 3;",1 Name the regular season for usisl d-3 pro league did not qualify,"CREATE TABLE table_2361911_2 (regular_season VARCHAR, league VARCHAR, playoffs VARCHAR);","SELECT regular_season FROM table_2361911_2 WHERE league = ""USISL D-3 Pro league"" AND playoffs = ""Did not qualify"";","SELECT regular_season FROM table_2361911_2 WHERE league = ""USIL d-3 pro league did not qualify"";",0 Add new records of artworks from artists of the Pop Art movement.,"CREATE TABLE Artworks (ArtworkID INT, Title VARCHAR(50), Year INT, ArtistID INT); ","CREATE TABLE Artists (ArtistID INT, Name VARCHAR(50), BirthDate DATE, DeathDate DATE, Movement VARCHAR(50)); INSERT INTO Artists (ArtistID, Name, BirthDate, DeathDate, Movement) VALUES (1, 'Andy Warhol', '1928-08-06', '1987-02-22', 'Pop Art'), (2, 'Jasper Johns', '1930-05-15', '', 'Pop Art');","INSERT INTO Artworks (ArtworkID, Title, Year, ArtistID) VALUES (1, 'Pop Art', '2021-01-01', 'Pop Art');",0 What is the total balance for customers who have made a transaction in the last month?,"CREATE TABLE transactions (id INT, customer_id INT, transaction_date DATE, amount DECIMAL(10,2)); CREATE TABLE customers (id INT, name VARCHAR(50), region VARCHAR(50), balance DECIMAL(10,2)); ","SELECT SUM(c.balance) FROM customers c JOIN transactions t ON c.id = t.customer_id WHERE t.transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);","SELECT SUM(balance) FROM customers JOIN transactions ON customers.id = transactions.customer_id WHERE transactions.transaction_date >= DATEADD(month, -1, GETDATE());",0 What is the average cost of all projects in 'New York' and 'Florida'?,"CREATE TABLE Infrastructure_Projects (id INT, name VARCHAR(100), state VARCHAR(50), cost FLOAT); ","SELECT AVG(cost) FROM Infrastructure_Projects WHERE state IN ('New York', 'Florida');","SELECT AVG(cost) FROM Infrastructure_Projects WHERE state IN ('New York', 'Florida');",1 What is the total number of successful intelligence operations in the 'intelligence_operations' table?,"CREATE TABLE intelligence_operations (id INT, operation_name TEXT, success BOOLEAN);",SELECT SUM(success) FROM intelligence_operations WHERE success = true;,SELECT COUNT(*) FROM intelligence_operations WHERE success = TRUE;,0 "Views by age group for TV Show ""Stranger Things""?","CREATE TABLE TV_Views (viewer_id INT, age INT, tv_show VARCHAR(255), view_date DATE);","SELECT age, COUNT(*) as views FROM TV_Views WHERE tv_show = 'Stranger Things' GROUP BY age;","SELECT age, SUM(view_date) as total_views FROM TV_Views WHERE tv_show = 'Stranger Things' GROUP BY age;",0 "What is the total number of vulnerabilities found in the last quarter, segmented by severity?","CREATE TABLE vulnerabilities (id INT, discovered_date DATE, severity VARCHAR(10)); ","SELECT severity, COUNT(*) as vulnerability_count FROM vulnerabilities WHERE discovered_date >= DATEADD(quarter, -1, GETDATE()) GROUP BY severity;","SELECT severity, COUNT(*) FROM vulnerabilities WHERE discovered_date >= DATEADD(quarter, -1, GETDATE()) GROUP BY severity;",0 Who are the contract negotiators for defense projects in Europe?,"CREATE TABLE contract_negotiators (id INT, name VARCHAR(255), region VARCHAR(255)); ",SELECT name FROM contract_negotiators WHERE region = 'Europe';,SELECT name FROM contract_negotiators WHERE region = 'Europe';,1 "Delete records from the ""smart_contracts"" table where ""contract_type"" is ""ERC721"" and ""country"" is ""US""","CREATE TABLE smart_contracts (contract_address VARCHAR(42), contract_type VARCHAR(10), country VARCHAR(2)); ",DELETE FROM smart_contracts WHERE contract_type = 'ERC721' AND country = 'US';,DELETE FROM smart_contracts WHERE contract_type = 'ERC721' AND country = 'US';,1 "How many points have @ new york islanders as the opponent, with a game greater than 35?","CREATE TABLE table_name_64 (points VARCHAR, opponent VARCHAR, game VARCHAR);","SELECT COUNT(points) FROM table_name_64 WHERE opponent = ""@ new york islanders"" AND game > 35;","SELECT points FROM table_name_64 WHERE opponent = ""@ new york islanders"" AND game > 35;",0 Find the number of cities in each district whose population is greater than the average population of cities?,"CREATE TABLE city (District VARCHAR, Population INTEGER);","SELECT COUNT(*), District FROM city WHERE Population > (SELECT AVG(Population) FROM city) GROUP BY District;","SELECT District, COUNT(*) FROM city WHERE Population > (SELECT AVG(Population) FROM city GROUP BY District);",0 Name the term in office for liberal and state of sa for ian mclachlan,"CREATE TABLE table_name_27 (term_in_office VARCHAR, member VARCHAR, party VARCHAR, state VARCHAR);","SELECT term_in_office FROM table_name_27 WHERE party = ""liberal"" AND state = ""sa"" AND member = ""ian mclachlan"";","SELECT term_in_office FROM table_name_27 WHERE party = ""liberal"" AND state = ""sa"" AND member = ""ian mclachlan"";",1 What is 1995 Grand Slam Tournament if 1996 is also grand slam tournaments?,CREATE TABLE table_name_33 (Id VARCHAR);,"SELECT 1990 FROM table_name_33 WHERE 1996 = ""grand slam tournaments"";","SELECT 1995 FROM table_name_33 WHERE 1996 = ""grand slam tournaments"";",0 Identify the well with the lowest exploration cost in the 'GulfOfMexico' for wells drilled between 2010 and 2015.,"CREATE TABLE WellExplorationCosts (well_id INT, drill_year INT, region TEXT, exploration_cost REAL); ","SELECT well_id, exploration_cost FROM WellExplorationCosts WHERE region = 'GulfOfMexico' AND drill_year BETWEEN 2010 AND 2015 ORDER BY exploration_cost ASC LIMIT 1","SELECT well_id, MIN(exploration_cost) FROM WellExplorationCosts WHERE region = 'GulfOfMexico' AND drill_year BETWEEN 2010 AND 2015 GROUP BY well_id;",0 "What is the total number of diversity and inclusion training sessions conducted, by department, for the year 2021?","CREATE TABLE training_sessions (id INT, session_date DATE, department VARCHAR(50), training_type VARCHAR(50)); ","SELECT department, training_type, COUNT(*) as total_sessions FROM training_sessions WHERE YEAR(session_date) = 2021 AND training_type = 'Diversity and Inclusion' GROUP BY department, training_type;","SELECT department, COUNT(*) FROM training_sessions WHERE YEAR(session_date) = 2021 AND training_type = 'Diversity and Inclusion' GROUP BY department;",0 "When did the reactor that has a rated power of 945 MW and ended construction on May 10, 1978 close?","CREATE TABLE table_name_13 (close_of_reactor VARCHAR, rated_power VARCHAR, finish_construction VARCHAR);","SELECT close_of_reactor FROM table_name_13 WHERE rated_power = ""945 mw"" AND finish_construction = ""may 10, 1978"";","SELECT close_of_reactor FROM table_name_13 WHERE rated_power = 945 AND finish_construction = ""may 10, 1978"";",0 What season had less than 301 points and 17 races?,"CREATE TABLE table_name_28 (season VARCHAR, points VARCHAR, races VARCHAR);",SELECT season FROM table_name_28 WHERE points < 301 AND races = 17;,SELECT season FROM table_name_28 WHERE points 301 AND races = 17;,0 what is the type of lithium when rubidium is nabr (1.9)?,"CREATE TABLE table_name_54 (lithium VARCHAR, rubidium VARCHAR);","SELECT lithium FROM table_name_54 WHERE rubidium = ""nabr (1.9)"";","SELECT lithium FROM table_name_54 WHERE rubidium = ""nabr (1.9)"";",1 What is the average mental health parity score for clinicians who have treated at least 50 patients?,"CREATE TABLE clinician_impact_data (id INT, clinician_id INT, patients_treated INT, cultural_competency_score INT); ",SELECT AVG(mental_health_parity_data.mental_health_parity_score) FROM mental_health_parity_data JOIN clinician_impact_data ON mental_health_parity_data.clinician_id = clinician_impact_data.clinician_id WHERE clinician_impact_data.patients_treated >= 50;,SELECT AVG(cultural_competency_score) FROM clinician_impact_data WHERE patients_treated >= 50;,0 "What is the average age of patients diagnosed with influenza in the San Francisco Bay Area, grouped by gender?","CREATE TABLE patients (id INT, name VARCHAR(50), age INT, gender VARCHAR(10), city VARCHAR(50)); CREATE TABLE diagnoses (id INT, patient_id INT, diagnosis VARCHAR(50), diagnosis_date DATE); ","SELECT AVG(patients.age), patients.gender FROM patients JOIN diagnoses ON patients.id = diagnoses.patient_id WHERE diagnoses.diagnosis = 'Influenza' AND patients.city LIKE 'San Francisco%' GROUP BY patients.gender;","SELECT patients.gender, AVG(patients.age) as avg_age FROM patients INNER JOIN diagnoses ON patients.id = diagnoses.patient_id WHERE diagnoses.diagnosis = 'Influenza' AND patients.city = 'San Francisco Bay Area' GROUP BY patients.gender;",0 "Which January is the lowest one that has an Opponent of florida panthers, and Points smaller than 59?","CREATE TABLE table_name_13 (january INTEGER, opponent VARCHAR, points VARCHAR);","SELECT MIN(january) FROM table_name_13 WHERE opponent = ""florida panthers"" AND points < 59;","SELECT MIN(january) FROM table_name_13 WHERE opponent = ""florida panthers"" AND points 59;",0 "What was the average donation amount by age group in 2021, excluding donations below $10?","CREATE TABLE Donors (DonorID int, DonorName varchar(50), DonationDate date, DonationAmount decimal(10,2), Age int); ","SELECT Age, AVG(DonationAmount) as AverageDonationAmount FROM Donors WHERE DonationAmount >= 10 AND YEAR(DonationDate) = 2021 GROUP BY Age;","SELECT Age, AVG(DonationAmount) as AvgDonation FROM Donors WHERE DonationDate BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY Age;",0 What is the percentage of Indigenous workers in each department?,"CREATE TABLE employee (id INT, name TEXT, department TEXT, role TEXT, ethnicity TEXT); ","SELECT department, ROUND(100.0 * SUM(CASE WHEN ethnicity = 'Indigenous' THEN 1 ELSE 0 END) / COUNT(*) , 2) as percentage_indigenous FROM employee GROUP BY department;","SELECT department, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM employee WHERE ethnicity = 'Indigenous')) as percentage FROM employee GROUP BY department;",0 What is the total energy production by renewable source in Canada for the month of January 2022?,"CREATE TABLE energy_production (id INT, country VARCHAR(50), source VARCHAR(50), production FLOAT, timestamp TIMESTAMP); ","SELECT source, SUM(production) as total_production FROM energy_production WHERE country = 'Canada' AND timestamp BETWEEN '2022-01-01 00:00:00' AND '2022-01-31 23:59:59' AND source IN ('Wind', 'Solar') GROUP BY source;","SELECT source, SUM(production) FROM energy_production WHERE country = 'Canada' AND timestamp BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY source;",0 "Which Partner has a Score in Final of 6–1, 6–2?","CREATE TABLE table_name_94 (partner VARCHAR, score_in_final VARCHAR);","SELECT partner FROM table_name_94 WHERE score_in_final = ""6–1, 6–2"";","SELECT partner FROM table_name_94 WHERE score_in_final = ""6–1, 6–2"";",1 What is the title of the king who left office in 982 and entered office in 949?,"CREATE TABLE table_name_64 (title VARCHAR, left_office VARCHAR, entered_office VARCHAR);","SELECT title FROM table_name_64 WHERE left_office = ""982"" AND entered_office = ""949"";",SELECT title FROM table_name_64 WHERE left_office = 982 AND entered_office = 949;,0 What is the total number of articles and videos produced by creators from underrepresented communities?,"CREATE TABLE creators (id INT, name VARCHAR(100), community VARCHAR(50)); CREATE TABLE content (id INT, creator_id INT, type VARCHAR(50), title VARCHAR(100)); ","SELECT SUM(num_articles + num_videos) FROM (SELECT c.community, COUNT(CASE WHEN con.type = 'article' THEN 1 END) AS num_articles, COUNT(CASE WHEN con.type = 'video' THEN 1 END) AS num_videos FROM creators c JOIN content con ON c.id = con.creator_id WHERE c.community IN ('underrepresented_group_1', 'underrepresented_group_2') GROUP BY c.community) sub;","SELECT COUNT(*) FROM content JOIN creators ON content.creator_id = creators.id WHERE creators.community IN ('Black', 'Hispanic', 'Hispanic');",0 What is the total quantity of item 'Pizza' sold across all locations?,"CREATE TABLE locations (location_id INT, location_name VARCHAR(50)); CREATE TABLE menu_items (item_id INT, item_name VARCHAR(50), quantity_sold INT); ",SELECT SUM(quantity_sold) FROM menu_items WHERE item_name = 'Pizza';,SELECT SUM(quantity_sold) FROM menu_items WHERE item_name = 'Pizza';,1 Calculate the average labor satisfaction score for factories in each country,"CREATE TABLE factory_info (factory_id INT, country TEXT, labor_satisfaction_score INT);","SELECT country, AVG(labor_satisfaction_score) as avg_labor_satisfaction_score FROM factory_info GROUP BY country;","SELECT country, AVG(labor_satisfaction_score) FROM factory_info GROUP BY country;",0 Name the average SP+FS with places less tha 94 for renata baierova,"CREATE TABLE table_name_2 (fs VARCHAR, sp INTEGER, places VARCHAR, name VARCHAR);","SELECT AVG(sp) + fs FROM table_name_2 WHERE places < 94 AND name = ""renata baierova"";","SELECT AVG(fs + sp) FROM table_name_2 WHERE places 94 AND name = ""renata baierova"";",0 What is the percentage of students who have participated in open pedagogy activities?,"CREATE TABLE students (student_id INT, participated_in_open_pedagogy BOOLEAN); ",SELECT (COUNT(student_id) * 100.0 / (SELECT COUNT(*) FROM students)) AS percentage FROM students WHERE participated_in_open_pedagogy = TRUE;,SELECT (COUNT(*) FILTER (WHERE participated_in_open_pedagogy = TRUE)) * 100.0 / COUNT(*) FROM students;,0 What is the combined list of mental health conditions and physical health issues for community health workers?,"CREATE TABLE CommunityHealthWorkers (WorkerID INT, Name VARCHAR(50), Specialty VARCHAR(50)); ",SELECT Specialty FROM CommunityHealthWorkers WHERE Specialty = 'Mental Health' UNION SELECT Specialty FROM CommunityHealthWorkers WHERE Specialty = 'Physical Health';,"SELECT SUM(CASE WHEN Specialty = 'Mental Health' THEN 1 ELSE 0 END) AS MentalHealthConditions, SUM(CASE WHEN Specialty = 'Physical Health' THEN 1 ELSE 0 END) AS PhysicalHealthConditions FROM CommunityHealthWorkers;",0 What is the total number of shelters built in Haiti and Kenya?,"CREATE TABLE disasters (id INT, country VARCHAR(50), type VARCHAR(50), buildings INT); ","SELECT SUM(buildings) FROM disasters WHERE country IN ('Haiti', 'Kenya');","SELECT SUM(buildings) FROM disasters WHERE country IN ('Haiti', 'Kenya');",1 Show all template type codes and the number of documents using each type.,"CREATE TABLE Documents (template_id VARCHAR); CREATE TABLE Templates (template_type_code VARCHAR, template_id VARCHAR);","SELECT T1.template_type_code, COUNT(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code;","SELECT T1.template_type_code, COUNT(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code;",1 "What is the total contract value and average length for each contract, partitioned by vendor and ordered by total contract value in descending order?","CREATE TABLE contract (id INT, vendor_id INT, value FLOAT, length INT, contract_date DATE); CREATE TABLE vendor (id INT, name VARCHAR(255)); ","SELECT v.name as vendor, SUM(c.value) as total_contract_value, AVG(c.length) as avg_contract_length, ROW_NUMBER() OVER (PARTITION BY v.name ORDER BY SUM(c.value) DESC) as rank FROM contract c JOIN vendor v ON c.vendor_id = v.id GROUP BY v.name ORDER BY total_contract_value DESC;","SELECT v.name, SUM(c.value) as total_contract_value, AVG(c.length) as avg_length FROM contract c JOIN vendor v ON c.vendor_id = v.id GROUP BY v.name ORDER BY total_contract_value DESC;",0 How many transactions were there in Michigan in March 2021?,"CREATE TABLE sales (id INT, state VARCHAR(20), quantity INT, month INT, year INT);",SELECT COUNT(*) FROM sales WHERE state = 'Michigan' AND month = 3 AND year = 2021;,SELECT SUM(quantity) FROM sales WHERE state = 'Michigan' AND month = 3 AND year = 2021;,0 What is the total number of mental health facilities in each state that have a health equity rating below 5?,"CREATE TABLE MentalHealthFacilities (Id INT, State VARCHAR(255), HealthEquityRating INT); ","SELECT State, COUNT(*) FROM MentalHealthFacilities WHERE HealthEquityRating < 5 GROUP BY State;","SELECT State, COUNT(*) FROM MentalHealthFacilities WHERE HealthEquityRating 5 GROUP BY State;",0 What is the maximum amount of waste generated by a gold mine in the African continent?,"CREATE TABLE WasteGeneration (MineID INT, MineType VARCHAR(15), Continent VARCHAR(20), WasteAmount DECIMAL(10,2));",SELECT MAX(WasteAmount) FROM WasteGeneration WHERE MineType = 'Gold' AND Continent = 'Africa';,SELECT MAX(WasteAmount) FROM WasteGeneration WHERE MineType = 'Gold' AND Continent = 'Africa';,1 Tell me the race name for ferrari on 25 april,"CREATE TABLE table_name_17 (race_name VARCHAR, constructor VARCHAR, date VARCHAR);","SELECT race_name FROM table_name_17 WHERE constructor = ""ferrari"" AND date = ""25 april"";","SELECT race_name FROM table_name_17 WHERE constructor = ""ferrari"" AND date = ""25 april"";",1 What is the format of the album with a year less than 1992?,"CREATE TABLE table_name_58 (format VARCHAR, year INTEGER);",SELECT format FROM table_name_58 WHERE year < 1992;,SELECT format FROM table_name_58 WHERE year 1992;,0 What's the diameter of the 2006 equestrian Reverse?,"CREATE TABLE table_name_49 (diameter VARCHAR, year VARCHAR, reverse VARCHAR);","SELECT diameter FROM table_name_49 WHERE year = 2006 AND reverse = ""equestrian"";","SELECT diameter FROM table_name_49 WHERE year = 2006 AND reverse = ""equestrian"";",1 "What is the total number of articles published in the ""articles"" table for each unique combination of day and month?","CREATE TABLE articles (id INT PRIMARY KEY, title TEXT, category TEXT, publication_date DATE, word_count INT, author_id INT);","SELECT EXTRACT(MONTH FROM publication_date) AS month, EXTRACT(DAY FROM publication_date) AS day, COUNT(*) AS articles_per_day_month FROM articles GROUP BY month, day ORDER BY month, day;","SELECT DATE_FORMAT(publication_date, '%Y-%m') AS day, DATE_FORMAT(publication_date, '%Y-%m') AS month, SUM(word_count) AS total_articles FROM articles GROUP BY day, month;",0 Display the intelligence operations that have been conducted jointly by a country with NATO and the number of personnel involved in each operation.,"CREATE TABLE joint_operations (country VARCHAR(255), partner VARCHAR(255), operation_name VARCHAR(255), operation_date DATE, primary_objective VARCHAR(255), personnel_count INT);","SELECT country, partner, primary_objective, SUM(personnel_count) as total_personnel FROM joint_operations WHERE partner = 'NATO' GROUP BY country, partner, primary_objective;","SELECT country, partner, operation_name, personnel_count FROM joint_operations WHERE primary_objective = 'intelligence' AND partner = 'NATO' GROUP BY country, partner;",0 What is the total mass of all exoplanets discovered by the TESS space telescope?,"CREATE TABLE exoplanets (id INT, name TEXT, discovery_mission TEXT, mass FLOAT); ",SELECT SUM(mass) FROM exoplanets WHERE discovery_mission = 'TESS';,SELECT SUM(mass) FROM exoplanets WHERE discovery_mission = 'TESS';,1 On what surface did Poland play as the against team?,"CREATE TABLE table_name_38 (surface VARCHAR, against VARCHAR);","SELECT surface FROM table_name_38 WHERE against = ""poland"";","SELECT surface FROM table_name_38 WHERE against = ""poland"";",1 "In the year (ceremony) 1995 (68th), what is the film title?","CREATE TABLE table_26385848_1 (film_title VARCHAR, year__ceremony_ VARCHAR);","SELECT film_title FROM table_26385848_1 WHERE year__ceremony_ = ""1995 (68th)"";","SELECT film_title FROM table_26385848_1 WHERE year__ceremony_ = ""1995 (68th)"";",1 "Delete records from the ""digital_assets"" table where ""asset_type"" is ""Utility Token"" and ""country"" is ""NG""","CREATE TABLE digital_assets (asset_id VARCHAR(42), asset_type VARCHAR(20), country VARCHAR(2)); ",DELETE FROM digital_assets WHERE asset_type = 'Utility Token' AND country = 'NG';,DELETE FROM digital_assets WHERE asset_type = 'Utility Token' AND country = 'NG';,1 Which type has 140 made?,"CREATE TABLE table_name_79 (type VARCHAR, quantity VARCHAR);","SELECT type FROM table_name_79 WHERE quantity = ""140"";",SELECT type FROM table_name_79 WHERE quantity = 140;,0 "What is the number of cases in each court, broken down by case type, case status, and year?","CREATE TABLE CourtCases (CourtName text, CaseType text, CaseStatus text, Year int, NumCases int); ","SELECT CourtName, CaseType, CaseStatus, Year, SUM(NumCases) FROM CourtCases GROUP BY CourtName, CaseType, CaseStatus, Year;","SELECT CourtName, CaseType, CaseStatus, Year, NumCases FROM CourtCases GROUP BY CourtName, CaseType, CaseStatus, Year;",0 List the names and average depths of all marine protected areas in the Pacific region that are deeper than 2000 meters.,"CREATE TABLE marine_protected_areas (name VARCHAR(255), region VARCHAR(255), avg_depth FLOAT); ","SELECT name, avg_depth FROM marine_protected_areas WHERE region = 'Pacific' AND avg_depth > 2000;","SELECT name, AVG(avg_depth) FROM marine_protected_areas WHERE region = 'Pacific' AND avg_depth > 2000;",0 Who are the community health workers serving the Non-Hispanic population?,"CREATE TABLE community_health_workers (worker_id INT, name VARCHAR(50), ethnicity VARCHAR(20)); ",SELECT * FROM community_health_workers WHERE ethnicity = 'Non-Hispanic';,SELECT name FROM community_health_workers WHERE ethnicity = 'Non-Hispanic';,0 What are the gender and occupation of players?,"CREATE TABLE player (Gender VARCHAR, Occupation VARCHAR);","SELECT Gender, Occupation FROM player;","SELECT Gender, Occupation FROM player;",1 What was the vote for Alvin Green when other was 9%?,"CREATE TABLE table_name_29 (alvin_greene__d_ VARCHAR, other VARCHAR);","SELECT alvin_greene__d_ FROM table_name_29 WHERE other = ""9%"";","SELECT alvin_greene__d_ FROM table_name_29 WHERE other = ""9%"";",1 What is the maximum flight distance for each aircraft type?,"CREATE TABLE flights (flight_id INT, aircraft_type VARCHAR(50), flight_distance INT);","SELECT aircraft_type, MAX(flight_distance) as max_distance FROM flights GROUP BY aircraft_type;","SELECT aircraft_type, MAX(flight_distance) FROM flights GROUP BY aircraft_type;",0 What are the earliest artifacts from each excavation site?,"CREATE TABLE Sites (SiteID INT, SiteName TEXT); CREATE TABLE Artifacts (ArtifactID INT, ArtifactName TEXT, SiteID INT, Age INT); ","SELECT Sites.SiteName, MIN(Artifacts.Age) AS EarliestAge FROM Sites INNER JOIN Artifacts ON Sites.SiteID = Artifacts.SiteID GROUP BY Sites.SiteName;","SELECT Sites.SiteName, MIN(Artifacts.Age) FROM Sites INNER JOIN Artifacts ON Sites.SiteID = Artifacts.SiteID GROUP BY Sites.SiteName;",0 "What is the minimum handling time in hours for containers at ports located in North America, for each port?","CREATE TABLE ports (port_id INT, port_name TEXT, country TEXT); CREATE TABLE cargo (cargo_id INT, port_id INT, quantity INT, handling_time INT, handling_date DATE); ",SELECT MIN(cargo.handling_time) FROM cargo JOIN ports ON cargo.port_id = ports.port_id WHERE ports.country = 'North America' GROUP BY cargo.port_id;,"SELECT p.port_name, MIN(c.handling_time) as min_handling_time FROM ports p JOIN cargo c ON p.port_id = c.port_id WHERE p.country = 'North America' GROUP BY p.port_name;",0 Name the total number of date for round 26,"CREATE TABLE table_21269143_1 (date VARCHAR, round VARCHAR);","SELECT COUNT(date) FROM table_21269143_1 WHERE round = ""26"";",SELECT COUNT(date) FROM table_21269143_1 WHERE round = 26;,0 Calculate the average population of each animal,"CREATE TABLE if not exists animal_population (id INT, animal VARCHAR(255), country VARCHAR(255), population INT); ","SELECT animal, AVG(population) FROM animal_population GROUP BY animal;","SELECT animal, AVG(population) FROM animal_population GROUP BY animal;",1 What round did the event UFC 86 take place?,"CREATE TABLE table_name_31 (round VARCHAR, event VARCHAR);","SELECT round FROM table_name_31 WHERE event = ""ufc 86"";","SELECT round FROM table_name_31 WHERE event = ""ufc 86"";",1 "Which type of institution is in Amherst, MA?","CREATE TABLE table_name_1 (type VARCHAR, location VARCHAR);","SELECT type FROM table_name_1 WHERE location = ""amherst, ma"";","SELECT type FROM table_name_1 WHERE location = ""amherst, massachusetts"";",0 "What is American, when British is ""ɪ, ə"", and when Initial-Syllable Open/Semi-Open Unstressed Vowels is ""æ /ɨ/""?","CREATE TABLE table_name_23 (american VARCHAR, british VARCHAR, initial_syllable_open_semi_open_unstressed_vowels VARCHAR);","SELECT american FROM table_name_23 WHERE british = ""ɪ, ə"" AND initial_syllable_open_semi_open_unstressed_vowels = ""æ /ɨ/"";","SELECT american FROM table_name_23 WHERE british = "", "" AND initial_syllable_open_semi_open_unstressed_vowels = "" //"";",0 What is the Weight of the Player with a Date of Birth of 1979-09-26?,"CREATE TABLE table_name_54 (weight VARCHAR, date_of_birth VARCHAR);","SELECT weight FROM table_name_54 WHERE date_of_birth = ""1979-09-26"";","SELECT weight FROM table_name_54 WHERE date_of_birth = ""1979-09-26"";",1 Insert a new record for a company with the name 'LMN Inc.' and an ESG rating of 'A-' into the companies table.,"CREATE TABLE companies (id INT, name VARCHAR(50), esg_rating VARCHAR(2)); ","INSERT INTO companies (name, esg_rating) VALUES ('LMN Inc.', 'A-');","INSERT INTO companies (name, esg_rating) VALUES ('LMN Inc.', 'A-');",1 "What is the total number of Poles, when Position is 6th, and when Points is less than 164?","CREATE TABLE table_name_27 (poles VARCHAR, position VARCHAR, points VARCHAR);","SELECT COUNT(poles) FROM table_name_27 WHERE position = ""6th"" AND points < 164;","SELECT COUNT(poles) FROM table_name_27 WHERE position = ""6th"" AND points 164;",0 What is the total assets of clients with age greater than 50?,"CREATE TABLE clients (client_id INT, name VARCHAR(50), age INT, assets DECIMAL(10,2)); ",SELECT SUM(assets) FROM clients WHERE age > 50;,SELECT SUM(assets) FROM clients WHERE age > 50;,1 What is the average age of community health workers who identify as female and male?,"CREATE TABLE community_health_worker_demographics (id INT, worker_id INT, gender VARCHAR(10), age INT); ","SELECT gender, AVG(age) FROM community_health_worker_demographics GROUP BY gender;","SELECT AVG(age) FROM community_health_worker_demographics WHERE gender IN ('Female', 'Male');",0 Add a new union 'Educators Union' with 500 members in the 'midwest' region.,"CREATE TABLE unions (id INT, name TEXT, member_count INT, region TEXT); CREATE TABLE members (id INT, union_id INT);","INSERT INTO unions (id, name, member_count, region) VALUES (1, 'Educators Union', 500, 'midwest'); INSERT INTO members (id, union_id) SELECT NULL, id FROM (SELECT 1 + (SELECT MAX(id) FROM unions) AS id) AS seq_table;","INSERT INTO unions (id, name, member_count, region) VALUES (1, 'Educators Union', 500,'midwest');",0 What is the 1994 when QF is 1999?,CREATE TABLE table_name_4 (Id VARCHAR);,"SELECT 1994 FROM table_name_4 WHERE 1999 = ""qf"";","SELECT 1994 FROM table_name_4 WHERE 1999 = ""qf"";",1 What is the total CO2 emission from waste management in Australia?,"CREATE TABLE AustralianWasteData (waste_type VARCHAR(50), CO2_emission_tonnes FLOAT); ",SELECT SUM(CO2_emission_tonnes) FROM AustralianWasteData;,SELECT SUM(CO2_emission_tonnes) FROM AustralianWasteData WHERE waste_type = 'Waste';,0 How many medical supplies were shipped to Bangladesh in the first quarter of 2022?,"CREATE TABLE medical_supplies (id INT, name TEXT, shipped_date DATE); ",SELECT COUNT(*) FROM medical_supplies WHERE shipped_date >= '2022-01-01' AND shipped_date < '2022-04-01' AND name = 'Bangladesh';,SELECT COUNT(*) FROM medical_supplies WHERE shipped_date BETWEEN '2022-01-01' AND '2022-03-31' AND name LIKE '%Bangladesh%';,0 "Name the high rebounds for american airlines center 20,557","CREATE TABLE table_23284271_11 (high_rebounds VARCHAR, location_attendance VARCHAR);","SELECT high_rebounds FROM table_23284271_11 WHERE location_attendance = ""American Airlines Center 20,557"";","SELECT high_rebounds FROM table_23284271_11 WHERE location_attendance = ""American Airlines Center 20,557"";",1 Update the price of concert records for the artist 'Adele' to 150 in the 'concerts' table.,"CREATE TABLE concerts (id INT, artist VARCHAR(255), city VARCHAR(255), tickets_sold INT, price DECIMAL(10,2));",UPDATE concerts SET price = 150 WHERE artist = 'Adele';,UPDATE concerts SET price = 150 WHERE artist = 'Adele';,1 What is the Venue of the Competition with a Score of 2–0?,"CREATE TABLE table_name_89 (venue VARCHAR, score VARCHAR);","SELECT venue FROM table_name_89 WHERE score = ""2–0"";","SELECT venue FROM table_name_89 WHERE score = ""2–0"";",1 "Which College/Junior/Club Team has a Pick larger than 70, and a Round smaller than 7?","CREATE TABLE table_name_7 (college_junior_club_team VARCHAR, pick VARCHAR, round VARCHAR);",SELECT college_junior_club_team FROM table_name_7 WHERE pick > 70 AND round < 7;,SELECT college_junior_club_team FROM table_name_7 WHERE pick > 70 AND round 7;,0 What is the number of pole position with a round of 15?,"CREATE TABLE table_1137707_2 (pole_position VARCHAR, round VARCHAR);",SELECT COUNT(pole_position) FROM table_1137707_2 WHERE round = 15;,SELECT COUNT(pole_position) FROM table_1137707_2 WHERE round = 15;,1 "Which CONMEBOL 1994 has a Supercopa 1994 of n/a, and a Recopa 1994 of n/a, and a Team of san lorenzo?","CREATE TABLE table_name_12 (conmebol_1994 VARCHAR, team VARCHAR, supercopa_1994 VARCHAR, recopa_1994 VARCHAR);","SELECT conmebol_1994 FROM table_name_12 WHERE supercopa_1994 = ""n/a"" AND recopa_1994 = ""n/a"" AND team = ""san lorenzo"";","SELECT conmebol_1994 FROM table_name_12 WHERE supercopa_1994 = ""n/a"" AND recopa_1994 = ""n/a"" AND team = ""san lorenzo"";",1 What is the name and year of all national security strategies implemented before 2015 in the 'Strategy' table?,"CREATE TABLE Strategy (id INT, name VARCHAR(50), year INT, continent VARCHAR(50)); ","SELECT name, year FROM Strategy WHERE year < 2015;","SELECT name, year FROM Strategy WHERE year 2015;",0 Find policy types with more than two policyholders living in 'MI'.,"CREATE TABLE policyholders (id INT, name TEXT, state TEXT, policy_type TEXT, premium FLOAT); ","SELECT policy_type, COUNT(DISTINCT name) as num_policyholders FROM policyholders WHERE state = 'MI' GROUP BY policy_type HAVING num_policyholders > 2;",SELECT policy_type FROM policyholders WHERE state = 'MI' GROUP BY policy_type HAVING COUNT(*) > 2;,0 Who drove in grids more than 3 and exited in an accident?,"CREATE TABLE table_name_17 (driver VARCHAR, grid VARCHAR, time_retired VARCHAR);","SELECT driver FROM table_name_17 WHERE grid > 3 AND time_retired = ""accident"";","SELECT driver FROM table_name_17 WHERE grid > 3 AND time_retired = ""accident"";",1 Who was the home team for the game where North Melbourne was the away team?,"CREATE TABLE table_name_59 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_59 WHERE away_team = ""north melbourne"";","SELECT home_team FROM table_name_59 WHERE away_team = ""north melbourne"";",1 What is the rank of the arch with a length in meters of 75/55?,"CREATE TABLE table_name_29 (rank VARCHAR, length___m__ VARCHAR);","SELECT rank FROM table_name_29 WHERE length___m__ = ""75/55"";","SELECT rank FROM table_name_29 WHERE length___m__ = ""75/55"";",1 What CFL team did simeon rottier play for?,"CREATE TABLE table_20170644_1 (cfl_team VARCHAR, player VARCHAR);","SELECT cfl_team FROM table_20170644_1 WHERE player = ""Simeon Rottier"";","SELECT cfl_team FROM table_20170644_1 WHERE player = ""Simeon Rottier"";",1 Add a new pollution control initiative in 'Asia' for 2022.,"CREATE TABLE Initiatives_4 (id INT, initiative VARCHAR(255), region VARCHAR(255), year INT); ","INSERT INTO Initiatives_4 (id, initiative, region, year) VALUES (4, 'Wastewater Treatment', 'Asia', 2022);","INSERT INTO Initiatives_4 (id, initiative, region, year) VALUES (1, 'Asia', 2022);",0 Which driver set the Qualifying record with a time of 24.761 seconds?,"CREATE TABLE table_name_61 (driver VARCHAR, record VARCHAR, time VARCHAR);","SELECT driver FROM table_name_61 WHERE record = ""qualifying"" AND time = ""24.761"";","SELECT driver FROM table_name_61 WHERE record = ""qualifying"" AND time = ""24.761 seconds"";",0 What is the maximum quantity of 'Lanthanum' produced in a year by 'Canada'?,"CREATE TABLE production (element VARCHAR(10), country VARCHAR(20), quantity INT, year INT); ",SELECT MAX(quantity) FROM production WHERE element = 'Lanthanum' AND country = 'Canada';,SELECT MAX(quantity) FROM production WHERE element = 'Lanthanum' AND country = 'Canada';,1 What is the average donation amount to 'Disaster Relief' programs in '2020'?,"CREATE TABLE Donors (donor_id INT, donor_name VARCHAR(255)); CREATE TABLE Donations (donation_id INT, donor_id INT, donation_amount INT, donation_date DATE, program_area VARCHAR(255)); ",SELECT AVG(Donations.donation_amount) FROM Donations INNER JOIN Programs ON Donations.program_area = Programs.program_name WHERE Programs.program_name = 'Disaster Relief' AND YEAR(Donations.donation_date) = 2020;,SELECT AVG(donation_amount) FROM Donations JOIN Donors ON Donations.donor_id = Donors.donor_id WHERE program_area = 'Disaster Relief' AND YEAR(donation_date) = 2020;,0 What is the total donation amount by month and cause category?,"CREATE TABLE donations_2 (donation_date DATE, donation_amount DECIMAL(10, 2), cause_category VARCHAR(255)); ","SELECT DATE_PART('month', donation_date) AS month, cause_category, SUM(donation_amount) AS total_donation FROM donations_2 GROUP BY DATE_PART('month', donation_date), cause_category;","SELECT EXTRACT(MONTH FROM donation_date) AS month, cause_category, SUM(donation_amount) AS total_donation FROM donations_2 GROUP BY month, cause_category;",0 How many draws did Durham have?,"CREATE TABLE table_name_72 (draws VARCHAR, team VARCHAR);","SELECT draws FROM table_name_72 WHERE team = ""durham"";","SELECT draws FROM table_name_72 WHERE team = ""durham"";",1 How many marine protected areas are in the Atlantic Ocean?,"CREATE TABLE marine_protected_areas (region VARCHAR(20), name VARCHAR(50), size FLOAT); ",SELECT COUNT(*) FROM marine_protected_areas WHERE region = 'Atlantic Ocean';,SELECT COUNT(*) FROM marine_protected_areas WHERE region = 'Atlantic Ocean';,1 Name the most rank for the United States with wins less than 1,"CREATE TABLE table_name_18 (rank INTEGER, country VARCHAR, wins VARCHAR);","SELECT MAX(rank) FROM table_name_18 WHERE country = ""united states"" AND wins < 1;","SELECT MAX(rank) FROM table_name_18 WHERE country = ""united states"" AND wins 1;",0 What date did the West Indies win the match?,"CREATE TABLE table_22384475_1 (match_date VARCHAR, winner VARCHAR);","SELECT match_date FROM table_22384475_1 WHERE winner = ""West Indies"";","SELECT match_date FROM table_22384475_1 WHERE winner = ""West Indies"";",1 "In the race with a winning time of 4:17:18, how many laps were run?","CREATE TABLE table_2241841_1 (laps VARCHAR, race_time VARCHAR);","SELECT laps FROM table_2241841_1 WHERE race_time = ""4:17:18"";","SELECT laps FROM table_2241841_1 WHERE race_time = ""4:17:18"";",1 How many donors from Asia contributed more than $200 in H1 2022?,"CREATE TABLE donations (id INT, donor VARCHAR(50), region VARCHAR(50), amount DECIMAL(10,2), donation_date DATE); ","SELECT region, COUNT(DISTINCT donor) as donor_count FROM donations WHERE region = 'Asia' AND amount > 200 AND donation_date BETWEEN '2022-01-01' AND '2022-06-30' GROUP BY region;",SELECT COUNT(*) FROM donations WHERE region = 'Asia' AND amount > 200 AND donation_date BETWEEN '2022-01-01' AND '2022-03-31';,0 Insert a new 'exploration' record for 'XYZ Oil' in the 'North Sea' dated '2022-01-01',"CREATE TABLE exploration (id INT PRIMARY KEY, operator TEXT, location TEXT, date DATE, result TEXT);","INSERT INTO exploration (operator, location, date, result) VALUES ('XYZ Oil', 'North Sea', '2022-01-01', 'Undetermined');","INSERT INTO exploration (id, operator, location, date, result) VALUES (1, 'XYZ Oil', 'North Sea', '2022-01-01', '2022-01-01');",0 List the names of vessels that have visited Tokyo and Osaka in Japan?,"CREATE TABLE Port (port_id INT PRIMARY KEY, port_name VARCHAR(255), port_country VARCHAR(255)); CREATE TABLE Vessel (vessel_id INT PRIMARY KEY, vessel_name VARCHAR(255)); CREATE TABLE Vessel_Movement (vessel_id INT, movement_date DATE, port_id INT, PRIMARY KEY (vessel_id, movement_date));","SELECT DISTINCT V.vessel_name FROM Vessel V JOIN Vessel_Movement VM ON V.vessel_id = VM.vessel_id JOIN Port P ON VM.port_id = P.port_id WHERE P.port_name IN ('Tokyo', 'Osaka') AND P.port_country = 'Japan';","SELECT v.vessel_name FROM Vessel v INNER JOIN Port p ON v.port_id = p.port_id INNER JOIN Vessel_Movement vm ON v.vessel_id = vm.vessel_id INNER JOIN Port p ON vm.port_id = p.port_id WHERE p.port_country IN ('Tokyo', 'Osaka') GROUP BY v.vessel_name;",0 Which country has the most garment workers?,"CREATE TABLE garment_workers (country VARCHAR(255), worker_id INT, worker_name VARCHAR(255), role VARCHAR(255)); ","SELECT country, COUNT(DISTINCT worker_id) AS worker_count FROM garment_workers GROUP BY country ORDER BY worker_count DESC LIMIT 1;","SELECT country, COUNT(*) FROM garment_workers GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1;",0 Update the email for a fan who signed up for the newsletter,"CREATE TABLE fans (fan_id INT, first_name VARCHAR(50), last_name VARCHAR(50), dob DATE, email VARCHAR(50), signed_up_for_newsletter BOOLEAN); ",UPDATE fans SET email = 'johndoe_new@mail.com' WHERE fan_id = 1;,UPDATE fans SET email = 'update_email' WHERE signed_up_for_newsletter = TRUE;,0 List the bottom 2 regions with the lowest average temperature in December.,"CREATE TABLE WeatherData (region VARCHAR(255), date DATE, temperature INT); ","SELECT region, AVG(temperature) as Avg_Temperature FROM WeatherData WHERE date BETWEEN '2022-12-01' AND '2022-12-31' GROUP BY region ORDER BY Avg_Temperature ASC LIMIT 2;","SELECT region, AVG(temperature) as avg_temperature FROM WeatherData WHERE date >= DATEADD(month, -1, GETDATE()) GROUP BY region ORDER BY avg_temperature DESC LIMIT 2;",0 "Which carriers have handled the most returns from Canada to France, and what is the total weight of those returns?","CREATE TABLE returns (id INT, carrier TEXT, return_weight FLOAT, source_country TEXT, destination_country TEXT);","SELECT carrier, SUM(return_weight) as total_weight FROM returns WHERE source_country = 'Canada' AND destination_country = 'France' GROUP BY carrier ORDER BY total_weight DESC;","SELECT carrier, SUM(return_weight) FROM returns WHERE source_country = 'Canada' AND destination_country = 'France' GROUP BY carrier ORDER BY SUM(return_weight) DESC LIMIT 1;",0 How many live births per year do people with a life expectancy of 65.1 have?,"CREATE TABLE table_27434_2 (live_births_per_year VARCHAR, life_expectancy_total VARCHAR);","SELECT live_births_per_year FROM table_27434_2 WHERE life_expectancy_total = ""65.1"";","SELECT live_births_per_year FROM table_27434_2 WHERE life_expectancy_total = ""65.1"";",1 what is the place where the location is 2-1,"CREATE TABLE table_26173058_2 (amman VARCHAR, qadisiya VARCHAR);","SELECT amman FROM table_26173058_2 WHERE qadisiya = ""2-1"";","SELECT amman FROM table_26173058_2 WHERE qadisiya = ""2-1"";",1 "When Kerry is at 36.7%, what is the total number of others?","CREATE TABLE table_name_88 (others_number VARCHAR, kerry_percentage VARCHAR);","SELECT COUNT(others_number) FROM table_name_88 WHERE kerry_percentage = ""36.7%"";","SELECT COUNT(others_number) FROM table_name_88 WHERE kerry_percentage = ""36.7%"";",1 "Calculate the average guest rating for each exhibition in Tokyo, and rank them in descending order of average rating.","CREATE TABLE Exhibitions (id INT, city VARCHAR(20), revenue FLOAT, guest_rating FLOAT); ","SELECT city, AVG(guest_rating) as avg_guest_rating, RANK() OVER (PARTITION BY city ORDER BY AVG(guest_rating) DESC) as rank FROM Exhibitions WHERE city = 'Tokyo' GROUP BY city, RANK() OVER (PARTITION BY city ORDER BY AVG(guest_rating) DESC);","SELECT city, AVG(guest_rating) as avg_guest_rating FROM Exhibitions WHERE city = 'Tokyo' GROUP BY city ORDER BY avg_guest_rating DESC;",0 What is the Years for Jazz Club at Oregon State?,"CREATE TABLE table_name_46 (years_for_jazz VARCHAR, school_club_team VARCHAR);","SELECT years_for_jazz FROM table_name_46 WHERE school_club_team = ""oregon state"";","SELECT years_for_jazz FROM table_name_46 WHERE school_club_team = ""oregon state"";",1 What is the average ticket price for concerts in New York?,"CREATE TABLE Concerts (id INT, city VARCHAR(50), price DECIMAL(5,2)); ",SELECT AVG(price) FROM Concerts WHERE city = 'New York';,SELECT AVG(price) FROM Concerts WHERE city = 'New York';,1 Which state has the lowest workforce diversity index?,"CREATE TABLE diversity (id INT, state VARCHAR(20), diversity_index FLOAT); ","SELECT state, MIN(diversity_index) as min_index FROM diversity GROUP BY state;","SELECT state, MIN(diversity_index) FROM diversity GROUP BY state;",0 "List all the inclusive housing units in San Diego, CA.","CREATE TABLE InclusiveHousingUnits (Id INT, City VARCHAR(50), Units INT); ",SELECT * FROM InclusiveHousingUnits WHERE City = 'SanDiego';,SELECT Units FROM InclusiveHousingUnits WHERE City = 'San Diego';,0 What is the multiplier for the processor with a frequency of 733MHz?,"CREATE TABLE table_name_20 (multiplier VARCHAR, frequency VARCHAR);","SELECT multiplier FROM table_name_20 WHERE frequency = ""733mhz"";","SELECT multiplier FROM table_name_20 WHERE frequency = ""733MHz"";",0 What is the percentage of social good technology initiatives in Latin America?,"CREATE TABLE social_good_technology (id INT, initiative VARCHAR, region VARCHAR, is_social_good BOOLEAN);","SELECT region, COUNT(*) as total_initiatives, COUNT(*) FILTER (WHERE is_social_good = TRUE) as social_good_initiatives, (COUNT(*) FILTER (WHERE is_social_good = TRUE) * 100.0 / COUNT(*)) as percentage FROM social_good_technology WHERE region = 'Latin America' GROUP BY region;",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM social_good_technology WHERE region = 'Latin America')) AS percentage FROM social_good_technology WHERE region = 'Latin America' AND is_social_good = true;,0 Find the average water usage in each sector across all regions.,"CREATE TABLE water_usage (sector VARCHAR(20), region VARCHAR(20), usage INT); ","SELECT sector, AVG(usage) FROM water_usage GROUP BY sector","SELECT sector, region, AVG(usage) as avg_usage FROM water_usage GROUP BY sector, region;",0 What is the total points when there is a refusal fault and the rider is H.R.H. Prince Abdullah Al-Soud?,"CREATE TABLE table_name_85 (points INTEGER, faults VARCHAR, rider VARCHAR);","SELECT SUM(points) FROM table_name_85 WHERE faults = ""refusal"" AND rider = ""h.r.h. prince abdullah al-soud"";","SELECT SUM(points) FROM table_name_85 WHERE faults = ""refusal"" AND rider = ""h.r.h. prince abdullah al-soud"";",1 What is the number of mental health appointments in each county?,"CREATE TABLE mental_health(id INT, patient_id INT, county TEXT, date DATE);","SELECT county, COUNT(*) FROM mental_health GROUP BY county;","SELECT county, COUNT(*) FROM mental_health GROUP BY county;",1 "What is the minimum fine amount issued in traffic court in the past year, broken down by the type of violation?","CREATE TABLE traffic_court_records (id INT, violation_type TEXT, fine_amount DECIMAL(5,2), court_date DATE);","SELECT violation_type, MIN(fine_amount) FROM traffic_court_records WHERE court_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) GROUP BY violation_type;","SELECT violation_type, MIN(fine_amount) FROM traffic_court_records WHERE court_date >= DATEADD(year, -1, GETDATE()) GROUP BY violation_type;",0 what is the population where the area (sq. mi.) is area (sq. mi.)?,CREATE TABLE table_12108_1 (population VARCHAR);,"SELECT population FROM table_12108_1 WHERE ""area__sq_mi_"" = ""area__sq_mi_"";","SELECT population FROM table_12108_1 WHERE area = ""area (sq. mi.)"";",0 Find the names of athletes who have participated in both baseball and soccer.,"CREATE TABLE athletes (name TEXT, sport TEXT); ","SELECT name FROM athletes WHERE sport IN ('Baseball', 'Soccer') GROUP BY name HAVING COUNT(DISTINCT sport) = 2;","SELECT name FROM athletes WHERE sport IN ('Baseball', 'Soccer');",0 Find the top 3 energy efficient appliances by category in the appliances table.,"CREATE TABLE appliances (id INT, name VARCHAR(50), category VARCHAR(50), energy_rating FLOAT, created_at TIMESTAMP);","SELECT name, category, energy_rating FROM (SELECT name, category, energy_rating, ROW_NUMBER() OVER(PARTITION BY category ORDER BY energy_rating DESC) as rn FROM appliances) a WHERE rn <= 3;","SELECT category, name, energy_rating FROM appliances ORDER BY energy_rating DESC LIMIT 3;",0 What runner-up has 1925 as the year?,"CREATE TABLE table_name_6 (runner_up VARCHAR, year VARCHAR);","SELECT runner_up FROM table_name_6 WHERE year = ""1925"";",SELECT runner_up FROM table_name_6 WHERE year = 1925;,0 "What is the total training cost for underrepresented groups, including all training programs?","CREATE TABLE Employees (EmployeeID INT, FirstName VARCHAR(50), LastName VARCHAR(50), Group VARCHAR(50), TrainingProgram VARCHAR(50), TrainingCost DECIMAL(10,2)); ",SELECT SUM(TrainingCost) FROM Employees WHERE Group = 'Underrepresented';,SELECT SUM(TrainingCost) FROM Employees WHERE Group = 'Underrepresented';,1 What is the date when Miranda Gore Browne was runner-up?,"CREATE TABLE table_28962227_1 (finale VARCHAR, runners_up VARCHAR);","SELECT finale FROM table_28962227_1 WHERE runners_up = ""Miranda Gore Browne"";","SELECT finale FROM table_28962227_1 WHERE runners_up = ""Maria Gore Browne"";",0 What is the average listing price for green-certified properties in the city of Seattle?,"CREATE TABLE properties (id INT, city VARCHAR(20), listing_price FLOAT, green_certified BOOLEAN); ",SELECT AVG(listing_price) FROM properties WHERE city = 'Seattle' AND green_certified = true;,SELECT AVG(listing_price) FROM properties WHERE city = 'Seattle' AND green_certified = true;,1 What was the average funding received per community development initiative in Ghana from 2016 to 2018?,"CREATE TABLE community_funding (initiative_id INT, country TEXT, funding INT, year INT); ",SELECT AVG(funding) FROM community_funding WHERE country = 'Ghana' AND year BETWEEN 2016 AND 2018;,SELECT AVG(funding) FROM community_funding WHERE country = 'Ghana' AND year BETWEEN 2016 AND 2018;,1 What are military innovation projects with budgets over 10 million?,"CREATE TABLE IF NOT EXISTS military_innovations (id INT PRIMARY KEY, project_name VARCHAR(255), budget INT);",SELECT * FROM military_innovations WHERE budget > 10000000;,SELECT project_name FROM military_innovations WHERE budget > 10000000;,0 What is the average number of green buildings constructed per year in each city?,"CREATE TABLE green_buildings (id INT, city VARCHAR(50), year INT); CREATE TABLE green_buildings_stats (city VARCHAR(50), avg_buildings_per_year FLOAT);"," INSERT INTO green_buildings_stats SELECT city, AVG(year) FROM green_buildings GROUP BY city;","SELECT city, AVG(avg_buildings_per_year) FROM green_buildings_stats GROUP BY city;",0 What is the maximum popularity score for each category in the food trends table?,"CREATE TABLE FoodTrends (product_id INT, product_name VARCHAR(255), category VARCHAR(100), popularity_score INT); ","SELECT category, MAX(popularity_score) FROM FoodTrends GROUP BY category;","SELECT category, MAX(popularity_score) FROM FoodTrends GROUP BY category;",1 Name the scores for michael buerk and russell howard,"CREATE TABLE table_23575917_2 (scores VARCHAR, lees_team VARCHAR);","SELECT scores FROM table_23575917_2 WHERE lees_team = ""Michael Buerk and Russell Howard"";","SELECT scores FROM table_23575917_2 WHERE lees_team = ""Michael Buerk and Russell Howard"";",1 What is the lowest number of total goals for a player with 6 league goals?,"CREATE TABLE table_27170987_5 (total_goals INTEGER, league_goals VARCHAR);",SELECT MIN(total_goals) FROM table_27170987_5 WHERE league_goals = 6;,SELECT MIN(total_goals) FROM table_27170987_5 WHERE league_goals = 6;,1 What was the club team for Kyle de Coste?,"CREATE TABLE table_name_98 (club_team VARCHAR, player VARCHAR);","SELECT club_team FROM table_name_98 WHERE player = ""kyle de coste"";","SELECT club_team FROM table_name_98 WHERE player = ""kyle de coste"";",1 What is the total number of 'gold' and 'silver' reserves?,"CREATE TABLE reserves (id INT, type VARCHAR(10), quantity INT); ","SELECT SUM(quantity) FROM reserves WHERE type IN ('gold', 'silver');","SELECT SUM(quantity) FROM reserves WHERE type IN ('gold','silver');",0 What is the minimum CO2 emission (tonnes) for vehicles in 'Japan'?,"CREATE TABLE min_co2_emissions (emission_id INT, country VARCHAR(50), co2_emission FLOAT); ",SELECT MIN(co2_emission) FROM min_co2_emissions WHERE country = 'Japan';,SELECT MIN(co2_emission) FROM min_co2_emissions WHERE country = 'Japan';,1 What is the minimum number of likes received by a post in Asia in the last month?,"CREATE TABLE post_likes (post_id INT, user_id INT, country VARCHAR(2), like_date DATE); ","SELECT MIN(likes) FROM (SELECT post_id, COUNT(*) AS likes FROM post_likes WHERE country IN ('IN', 'CN', 'JP') AND like_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) GROUP BY post_id) AS post_likes_asia;","SELECT MIN(post_likes.like_date) FROM post_likes WHERE post_likes.country = 'Asia' AND post_likes.like_date >= DATEADD(month, -1, GETDATE());",0 Which attendance number was taken in a week less than 16 when the Washington Redskins were the opponents?,"CREATE TABLE table_name_39 (attendance VARCHAR, week VARCHAR, opponent VARCHAR);","SELECT attendance FROM table_name_39 WHERE week < 16 AND opponent = ""washington redskins"";","SELECT attendance FROM table_name_39 WHERE week 16 AND opponent = ""washington redskins"";",0 Calculate the total revenue for vegan menu items in March 2022.,"CREATE TABLE menu_sales_7 (menu_item VARCHAR(255), sale_date DATE, revenue INT, is_vegan BOOLEAN); ",SELECT SUM(revenue) FROM menu_sales_7 WHERE is_vegan = true AND sale_date BETWEEN '2022-03-01' AND '2022-03-31';,SELECT SUM(revenue) FROM menu_sales_7 WHERE is_vegan = true AND sale_date BETWEEN '2022-03-01' AND '2022-03-31';,1 "Which countries source the most organic ingredients for cosmetic products, and which brands are associated with those countries?","CREATE TABLE ingredient_sourcing (ingredient_id INT, product_id INT, country_name VARCHAR(50), organic_sourced BOOLEAN); CREATE TABLE brand_info (brand_name VARCHAR(50), country_of_origin VARCHAR(50)); ","SELECT i.country_name, b.brand_name FROM ingredient_sourcing i INNER JOIN brand_info b ON i.country_name = b.country_of_origin WHERE i.organic_sourced = true GROUP BY i.country_name, b.brand_name HAVING COUNT(i.ingredient_id) >= 2;","SELECT i.country_name, COUNT(i.ingredient_id) as organic_ingredient_count FROM ingredient_sourcing i JOIN brand_info b ON i.product_id = b.country_id WHERE i.organic_sourced = true GROUP BY i.country_name ORDER BY organic_ingredient_count DESC;",0 What tournament venue is listed during the Missouri Valley Conference?,"CREATE TABLE table_28365816_2 (tournament_venue__city_ VARCHAR, conference VARCHAR);","SELECT tournament_venue__city_ FROM table_28365816_2 WHERE conference = ""Missouri Valley conference"";","SELECT tournament_venue__city_ FROM table_28365816_2 WHERE conference = ""Missouri Valley Conference"";",0 "How many security incidents involved privileged users in the telecommunications industry in Q1 2023, grouped by country?","CREATE TABLE security_incidents (id INT, user_role TEXT, industry TEXT, country TEXT, incident_date DATE); ","SELECT country, COUNT(*) FROM security_incidents WHERE user_role = 'privileged' AND industry = 'Telecommunications' AND incident_date >= '2023-01-01' AND incident_date < '2023-04-01' GROUP BY country;","SELECT country, COUNT(*) FROM security_incidents WHERE industry = 'telecommunications' AND user_role = 'Private' AND incident_date BETWEEN '2023-01-01' AND '2023-03-31' GROUP BY country;",0 What IHSAA football class do the Generals play in?,"CREATE TABLE table_name_24 (ihsaa_class__football_ VARCHAR, mascot VARCHAR);","SELECT ihsaa_class__football_ FROM table_name_24 WHERE mascot = ""generals"";","SELECT ihsaa_class__football_ FROM table_name_24 WHERE mascot = ""generals"";",1 What is every year where opponent in the final is John Mcenroe at Wimbledon?,"CREATE TABLE table_23235767_1 (year VARCHAR, opponent_in_the_final VARCHAR, championship VARCHAR);","SELECT year FROM table_23235767_1 WHERE opponent_in_the_final = ""John McEnroe"" AND championship = ""Wimbledon"";","SELECT year FROM table_23235767_1 WHERE opponent_in_the_final = ""John McEnroe"" AND championship = ""Wimbledon"";",1 What is the count of employees hired in 2022?,"CREATE TABLE EmployeeHires (HireID INT, HireDate DATE); ",SELECT COUNT(*) FROM EmployeeHires WHERE YEAR(HireDate) = 2022;,SELECT COUNT(*) FROM EmployeeHires WHERE YEAR(HireDate) = 2022;,1 "What is Opponent in Final, when Surface is ""Hard"", and when Date is ""13 January 1992""?","CREATE TABLE table_name_31 (opponent_in_final VARCHAR, surface VARCHAR, date VARCHAR);","SELECT opponent_in_final FROM table_name_31 WHERE surface = ""hard"" AND date = ""13 january 1992"";","SELECT opponent_in_final FROM table_name_31 WHERE surface = ""hard"" AND date = ""13 january 1992"";",1 Identify the supplier with the lowest transparency score for Dysprosium and Terbium,"CREATE TABLE supply_chain_transparency (element VARCHAR(10), supplier VARCHAR(20), transparency INT); ","SELECT element, MIN(transparency) AS min_transparency FROM supply_chain_transparency GROUP BY element;","SELECT supplier, MIN(transparency) FROM supply_chain_transparency WHERE element IN ('Dysprosium', 'Terbium') GROUP BY supplier;",0 How many animals were admitted to the rescue center in the 'Forest' region?;,"CREATE TABLE rescue_center (id INT, animal_name VARCHAR(50), date_admitted DATE, region VARCHAR(20)); ",SELECT COUNT(animal_name) FROM rescue_center WHERE region = 'Forest';,SELECT COUNT(*) FROM rescue_center WHERE region = 'Forest';,0 What is the couples name where the average is 15.9?,"CREATE TABLE table_19744915_14 (couple VARCHAR, average VARCHAR);","SELECT couple FROM table_19744915_14 WHERE average = ""15.9"";","SELECT couple FROM table_19744915_14 WHERE average = ""15.9"";",1 What is the extra result associated with 6th place in 1972?,"CREATE TABLE table_name_22 (extra VARCHAR, result VARCHAR, year VARCHAR);","SELECT extra FROM table_name_22 WHERE result = ""6th"" AND year = 1972;","SELECT extra FROM table_name_22 WHERE result = ""6th place"" AND year = 1972;",0 Which mlb team is located in maryland?,"CREATE TABLE table_name_95 (team VARCHAR, state_province VARCHAR, league VARCHAR);","SELECT team FROM table_name_95 WHERE state_province = ""maryland"" AND league = ""mlb"";","SELECT team FROM table_name_95 WHERE state_province = ""maryland"" AND league = ""mlb"";",1 How much gold did South Korea get?,"CREATE TABLE table_name_49 (gold INTEGER, nation VARCHAR);","SELECT SUM(gold) FROM table_name_49 WHERE nation = ""south korea"";","SELECT SUM(gold) FROM table_name_49 WHERE nation = ""south korea"";",1 What is the street address of Oliver Building?,"CREATE TABLE table_name_20 (street_address VARCHAR, name VARCHAR);","SELECT street_address FROM table_name_20 WHERE name = ""oliver building"";","SELECT street_address FROM table_name_20 WHERE name = ""oliver building"";",1 What was the total number of marine species by country?,"CREATE TABLE marine_species_by_country (country VARCHAR(255), species_count INT); ","SELECT country, SUM(species_count) FROM marine_species_by_country GROUP BY country;","SELECT country, SUM(species_count) FROM marine_species_by_country GROUP BY country;",1 Which fans have not attended any events?,"CREATE TABLE fans (fan_id INT, state VARCHAR(255)); CREATE TABLE events (fan_id INT, event_id INT); ","SELECT f.fan_id, f.state FROM fans f LEFT JOIN events e ON f.fan_id = e.fan_id WHERE e.fan_id IS NULL;",SELECT f.state FROM fans f INNER JOIN events e ON f.fan_id = e.fan_id WHERE e.event_id IS NULL;,0 What was the attendance at war memorial stadium?,"CREATE TABLE table_name_8 (attenmdance VARCHAR, stadium VARCHAR);","SELECT attenmdance FROM table_name_8 WHERE stadium = ""war memorial stadium"";","SELECT attenmdance FROM table_name_8 WHERE stadium = ""war memorial stadium"";",1 List all military technologies introduced in 2022 and their respective budgets.,"CREATE SCHEMA if not exists military_tech (Year INT, Tech VARCHAR(255), Budget DECIMAL(10,2)); ",SELECT * FROM military_tech WHERE Year = 2022;,"SELECT Tech, Budget FROM military_tech WHERE Year = 2022;",0 What was the result of the election in the Arkansas 4 district? ,"CREATE TABLE table_1342359_4 (result VARCHAR, district VARCHAR);","SELECT result FROM table_1342359_4 WHERE district = ""Arkansas 4"";","SELECT result FROM table_1342359_4 WHERE district = ""Arkansas 4"";",1 What are the unique IP addresses that have attempted a connection to both the database server and the web application server in the past week?,"CREATE TABLE database_server (ip_address VARCHAR(255), connection_time TIMESTAMP); CREATE TABLE web_application_server (ip_address VARCHAR(255), connection_time TIMESTAMP);",SELECT ip_address FROM database_server WHERE connection_time >= NOW() - INTERVAL '1 week' INTERSECT SELECT ip_address FROM web_application_server WHERE connection_time >= NOW() - INTERVAL '1 week';,"SELECT DISTINCT ip_address FROM database_server WHERE connection_time >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 WEEK) INTERSECT SELECT ip_address FROM web_application_server WHERE connection_time >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 WEEK);",0 What is the distinguished service cross when the navy cross is Coast Guard commendation medal?,"CREATE TABLE table_2104176_1 (distinguished_service_cross VARCHAR, navy_cross VARCHAR);","SELECT distinguished_service_cross FROM table_2104176_1 WHERE navy_cross = ""Coast Guard Commendation Medal"";","SELECT distinguished_service_cross FROM table_2104176_1 WHERE navy_cross = ""Coast Guard Commendation Medal"";",1 "What is the Time/Retired for the BMW Sauber, and Nick Heidfeld?","CREATE TABLE table_name_80 (time_retired VARCHAR, constructor VARCHAR, driver VARCHAR);","SELECT time_retired FROM table_name_80 WHERE constructor = ""bmw sauber"" AND driver = ""nick heidfeld"";","SELECT time_retired FROM table_name_80 WHERE constructor = ""bmw sauber"" AND driver = ""nick heidfeld"";",1 What is the Final Four with a win percentage of .750?,"CREATE TABLE table_name_32 (final_four VARCHAR, win__percentage VARCHAR);","SELECT final_four FROM table_name_32 WHERE win__percentage = "".750"";","SELECT final_four FROM table_name_32 WHERE win__percentage = "".750"";",1 What is the minimum diversity score for startups founded by immigrants in the e-commerce sector?,"CREATE TABLE company (id INT, name TEXT, industry TEXT, founder_country TEXT, diversity_score INT); ",SELECT MIN(company.diversity_score) FROM company WHERE company.industry = 'E-commerce' AND company.founder_country IS NOT NULL;,SELECT MIN(diversity_score) FROM company WHERE industry = 'e-commerce' AND founder_country = 'Immigrant';,0 When did the opponent knockout Barry Prior in more than 2 rounds?,"CREATE TABLE table_name_53 (date VARCHAR, opponent VARCHAR, method VARCHAR, round VARCHAR);","SELECT date FROM table_name_53 WHERE method = ""knockout"" AND round > 2 AND opponent = ""barry prior"";","SELECT date FROM table_name_53 WHERE method = ""knockout"" AND round > 2 AND opponent = ""barry prior"";",1 "When columbia, south carolina is the hometown what is the lowest age?","CREATE TABLE table_1859855_2 (age INTEGER, hometown VARCHAR);","SELECT MIN(age) FROM table_1859855_2 WHERE hometown = ""Columbia, South Carolina"";","SELECT MIN(age) FROM table_1859855_2 WHERE hometown = ""Columbia, South Carolina"";",1 What is the name of the City with December 21 as a Date?,"CREATE TABLE table_name_94 (city VARCHAR, date VARCHAR);","SELECT city FROM table_name_94 WHERE date = ""december 21"";","SELECT city FROM table_name_94 WHERE date = ""december 21"";",1 What is the crowd size of the game when Fitzroy is the away team?,"CREATE TABLE table_name_96 (crowd VARCHAR, away_team VARCHAR);","SELECT COUNT(crowd) FROM table_name_96 WHERE away_team = ""fitzroy"";","SELECT crowd FROM table_name_96 WHERE away_team = ""fitzroy"";",0 What is the total budget for deep-sea exploration programs?,"CREATE TABLE countries_2 (country_id INT, name VARCHAR(255), deep_sea_program BOOLEAN, budget FLOAT);",SELECT SUM(budget) FROM countries_2 WHERE deep_sea_program = TRUE;,SELECT SUM(budget) FROM countries_2 WHERE deep_sea_program = TRUE;,1 Create a view named 'StudentNames' based on 'Students' table,"CREATE TABLE Students (StudentId INT, Name VARCHAR(50)); ",CREATE VIEW StudentNames AS SELECT * FROM Students;,"CREATE VIEW StudentNames AS SELECT StudentId, Name FROM Students;",0 What is the team name from Hammond Bishop Noll?,"CREATE TABLE table_name_42 (team_name VARCHAR, school VARCHAR);","SELECT team_name FROM table_name_42 WHERE school = ""hammond bishop noll"";","SELECT team_name FROM table_name_42 WHERE school = ""hammond bishop noll"";",1 What is the screen size and pixel amount of model p5000 when the dimensions are 98×64.5×41?,"CREATE TABLE table_name_28 (screen_size VARCHAR, pixels VARCHAR, dimensions_w×h×d__mm_ VARCHAR, model VARCHAR);","SELECT screen_size, pixels FROM table_name_28 WHERE dimensions_w×h×d__mm_ = ""98×64.5×41"" AND model = ""p5000"";","SELECT screen_size, pixels FROM table_name_28 WHERE dimensions_whd__mm_ = ""9864.541"" AND model = ""p5000"";",0 What are the highest points with 2012 as the year?,"CREATE TABLE table_name_70 (points INTEGER, year VARCHAR);","SELECT MAX(points) FROM table_name_70 WHERE year = ""2012"";",SELECT MAX(points) FROM table_name_70 WHERE year = 2012;,0 Which country has a reaction time of under 0.242 seconds and over 1041 points?,"CREATE TABLE table_name_58 (country VARCHAR, react VARCHAR, points VARCHAR);",SELECT country FROM table_name_58 WHERE react < 0.242 AND points > 1041;,SELECT country FROM table_name_58 WHERE react 0.242 AND points > 1041;,0 "Can you tell me the average Figures that has the Placings of 34, and the Total larger than 1247.51?","CREATE TABLE table_name_63 (figures INTEGER, placings VARCHAR, total VARCHAR);",SELECT AVG(figures) FROM table_name_63 WHERE placings = 34 AND total > 1247.51;,SELECT AVG(figures) FROM table_name_63 WHERE placings = 34 AND total > 1247.51;,1 Which sustainable sourcing practices were implemented in Texas in Q1 2022?,"CREATE TABLE sustainable_sourcing (practice VARCHAR(255), location VARCHAR(255), quarter INT, year INT); ",SELECT DISTINCT practice FROM sustainable_sourcing WHERE location = 'Texas' AND quarter = 1 AND year = 2022;,SELECT practice FROM sustainable_sourcing WHERE location = 'Texas' AND quarter = 1 AND year = 2022;,0 What is the total number of wins in FPS games for players from Africa?,"CREATE TABLE PlayerGameType (PlayerID int, PlayerName varchar(50), Country varchar(50), GameType varchar(50), Wins int); ","SELECT SUM(Wins) FROM PlayerGameType WHERE Country IN ('Egypt', 'Kenya', 'Ghana') AND GameType = 'FPS';",SELECT SUM(Wins) FROM PlayerGameType WHERE Country = 'Africa' AND GameType = 'FPS';,0 What is the 2nd leg for the team #2 junior?,CREATE TABLE table_name_18 (team__number2 VARCHAR);,"SELECT 2 AS nd_leg FROM table_name_18 WHERE team__number2 = ""junior"";","SELECT 2 AS nd_leg FROM table_name_18 WHERE team__number2 = ""junior"";",1 What are the total donations made by individual donors from 'country_US' who have made donations in the last 6 months?,"CREATE TABLE donor (donor_id INT, name VARCHAR(50), country VARCHAR(50)); CREATE TABLE donation (donation_id INT, donor_id INT, amount DECIMAL(10, 2), donation_date DATE); ","SELECT SUM(d.amount) as total_donations FROM donation d INNER JOIN donor don ON d.donor_id = don.donor_id WHERE don.country = 'country_US' AND d.donation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);","SELECT SUM(donation.amount) FROM donation INNER JOIN donor ON donation.donor_id = donor.donor_id WHERE donor.country = 'country_US' AND donation.donation_date >= DATEADD(month, -6, GETDATE());",0 "What is the distribution of renewable energy sources (solar, wind, hydro, geothermal, and biomass) in the Latin American region?","CREATE TABLE sources (region VARCHAR(255), energy_source VARCHAR(255), capacity FLOAT); ","SELECT energy_source, SUM(capacity) as total_capacity FROM sources WHERE region = 'Latin America' GROUP BY energy_source;","SELECT region, energy_source, SUM(capacity) as total_capacity FROM sources WHERE region = 'Latin America' GROUP BY region, energy_source;",0 Delete records with a biomass value lower than 10 in the 'species_data' table.,"CREATE TABLE species_data (species_id INT, species_name VARCHAR(255), biomass FLOAT); ",DELETE FROM species_data WHERE biomass < 10;,DELETE FROM species_data WHERE biomass 10;,0 Which Games had a Name of manuel felix diaz?,"CREATE TABLE table_name_64 (games VARCHAR, name VARCHAR);","SELECT games FROM table_name_64 WHERE name = ""manuel felix diaz"";","SELECT games FROM table_name_64 WHERE name = ""manuel felix diaz"";",1 Update labor_practices_rating for factories in 'factory_labor_practices' table that are in the same country as the supplier,"CREATE TABLE factories (id INT, name TEXT, country TEXT);CREATE TABLE supplier_factories (supplier_id INT, factory_id INT);CREATE TABLE factory_labor_practices (factory_id INT, labor_practices_rating INT);",UPDATE factory_labor_practices flp SET labor_practices_rating = 5 WHERE flp.factory_id IN (SELECT sf.factory_id FROM supplier_factories sf JOIN factories f ON sf.factory_id = f.id WHERE f.country IN (SELECT s.country FROM suppliers s WHERE s.id = sf.supplier_id) GROUP BY sf.factory_id HAVING COUNT(DISTINCT sf.supplier_id) > 1);,UPDATE factory_labor_practices SET labor_practices_rating = labor_practices_rating = labor_practices_rating WHERE factory_id IN (SELECT id FROM factories WHERE country = 'USA');,0 Calculate the percentage of sales of a certain product category,"CREATE TABLE sales (id INT, product_id INT, category VARCHAR(255), quantity INT);","SELECT category, (SUM(quantity) * 100.0 / (SELECT SUM(quantity) FROM sales)) as percentage FROM sales WHERE category = 'category' GROUP BY category;",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM sales WHERE category = 'Product')) AS percentage FROM sales WHERE category = 'Product';,0 What is the minimum donation amount for the 'philanthropic_trends' category?,"CREATE TABLE donation_records (category TEXT, donation_amount FLOAT); ",SELECT MIN(donation_amount) FROM donation_records WHERE category = 'philanthropic_trends';,SELECT MIN(donation_amount) FROM donation_records WHERE category = 'philanthropic_trends';,1 How many hospitals are there in Texas that have less than 50 beds?,"CREATE TABLE hospitals (id INT, name VARCHAR(50), state VARCHAR(25), num_beds INT); ",SELECT COUNT(*) FROM hospitals WHERE state = 'Texas' AND num_beds < 50;,SELECT COUNT(*) FROM hospitals WHERE state = 'Texas' AND num_beds 50;,0 "What is the lowest against value with less than 2 draws, 10 points, and less than 4 lost?","CREATE TABLE table_name_17 (against INTEGER, lost VARCHAR, drawn VARCHAR, points VARCHAR);",SELECT MIN(against) FROM table_name_17 WHERE drawn < 2 AND points = 10 AND lost < 4;,SELECT MIN(against) FROM table_name_17 WHERE drawn 2 AND points = 10 AND lost 4;,0 Find the average age of players who have played VR games and those who have not.,"CREATE TABLE Players (PlayerID INT, VR TEXT); CREATE TABLE PlayerAges (PlayerID INT, Age INT); ","SELECT AVG(CASE WHEN VR = 'Yes' THEN Age END) AS AvgAgeVRPlayers, AVG(CASE WHEN VR = 'No' THEN Age END) AS AvgAgeNonVRPlayers FROM Players INNER JOIN PlayerAges ON Players.PlayerID = PlayerAges.PlayerID;",SELECT AVG(Age) FROM PlayerAges JOIN Players ON PlayerAges.PlayerID = Players.PlayerID WHERE Players.VR = 0;,0 "List all ports, their respective countries, and the number of unique cargo types handled","CREATE TABLE port(port_id INT, name VARCHAR(255), country VARCHAR(255));CREATE TABLE handling(handling_id INT, port_id INT, cargo_id INT);CREATE TABLE cargo(cargo_id INT, cargo_type VARCHAR(255));","SELECT p.name AS port_name, p.country, COUNT(DISTINCT c.cargo_type) AS number_of_cargo_types FROM port p JOIN handling h ON p.port_id = h.port_id JOIN cargo c ON h.cargo_id = c.cargo_id GROUP BY p.port_id;","SELECT p.name, p.country, COUNT(DISTINCT c.cargo_type) as unique_cargo_types FROM port p JOIN handling h ON p.port_id = h.port_id JOIN cargo c ON h.cargo_id = c.cargo_id GROUP BY p.name, p.country;",0 "Count the products that have the color description ""white"" or have the characteristic name ""hot"".","CREATE TABLE CHARACTERISTICS (characteristic_id VARCHAR, characteristic_name VARCHAR); CREATE TABLE ref_colors (color_code VARCHAR, color_description VARCHAR); CREATE TABLE products (product_id VARCHAR, color_code VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR);","SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = ""white"" OR t3.characteristic_name = ""hot"";","SELECT COUNT(*) FROM products AS T1 JOIN product_characteristics AS T2 ON T1.product_id = T2.product_id JOIN CHARACTERISTICS AS T3 ON T2.characteristic_id = T3.characteristic_id WHERE T3.color_description = ""white"" OR T3.characteristic_name = ""hot"";",0 Name the team of darren manning,"CREATE TABLE table_17271495_1 (team VARCHAR, driver VARCHAR);","SELECT team FROM table_17271495_1 WHERE driver = ""Darren Manning"";","SELECT team FROM table_17271495_1 WHERE driver = ""Darren Manning"";",1 What is the CHI (Carvill Hurricane Index) when the NHC advisory number is equal to 49b?,"CREATE TABLE table_15416002_1 (chi VARCHAR, nhc_advisory_number VARCHAR);","SELECT chi FROM table_15416002_1 WHERE nhc_advisory_number = ""49B"";","SELECT chi FROM table_15416002_1 WHERE nhc_advisory_number = ""49b"";",0 Calculate the average claim amount for policy types 'Life' and 'Health' in the Risk Assessment department in H2 2023?,"CREATE TABLE Claims (ClaimID INT, PolicyType VARCHAR(20), ProcessingDepartment VARCHAR(20), ProcessingDate DATE, ClaimAmount INT); ","SELECT PolicyType, AVG(ClaimAmount) as AverageClaimAmount FROM Claims WHERE ProcessingDepartment = 'Risk Assessment' AND ProcessingDate BETWEEN '2023-07-01' AND '2023-12-31' AND PolicyType IN ('Life', 'Health') GROUP BY PolicyType;","SELECT AVG(ClaimAmount) FROM Claims WHERE PolicyType IN ('Life', 'Health') AND ProcessingDepartment = 'Risk Assessment' AND ProcessingDate BETWEEN '2023-01-01' AND '2023-06-30';",0 What was Tom Kite's to par?,"CREATE TABLE table_name_63 (to_par VARCHAR, player VARCHAR);","SELECT to_par FROM table_name_63 WHERE player = ""tom kite"";","SELECT to_par FROM table_name_63 WHERE player = ""tom kite"";",1 What area is named Mackenzie college?,"CREATE TABLE table_name_50 (area VARCHAR, name VARCHAR);","SELECT area FROM table_name_50 WHERE name = ""mackenzie college"";","SELECT area FROM table_name_50 WHERE name = ""mackenzie college"";",1 "What is the ratio of male to female healthcare providers in the ""rural_clinics_2"" table?","CREATE TABLE rural_clinics_2 (id INT, name TEXT, age INT, gender TEXT); ","SELECT ROUND(COUNT(CASE WHEN gender = 'Male' THEN 1 END)/COUNT(CASE WHEN gender = 'Female' THEN 1 END), 2) FROM rural_clinics_2;",SELECT (COUNT(*) FILTER (WHERE gender = 'Male') * 100.0 / COUNT(*)) FROM rural_clinics_2;,0 "Identify the number of farmers in each region, along with the total area of farmland they manage, in the 'indigenous_systems' schema?","CREATE SCHEMA indigenous_systems;CREATE TABLE farmers (id INT, name VARCHAR(50), region VARCHAR(50), area_ha FLOAT);","SELECT region, COUNT(*), SUM(area_ha) FROM indigenous_systems.farmers GROUP BY region;","SELECT region, COUNT(*), SUM(area_ha) FROM indigenous_systems.farmers GROUP BY region;",1 What is the name of the airport located in Russia with an IATA of AER?,"CREATE TABLE table_name_34 (airport VARCHAR, country VARCHAR, iata VARCHAR);","SELECT airport FROM table_name_34 WHERE country = ""russia"" AND iata = ""aer"";","SELECT airport FROM table_name_34 WHERE country = ""russia"" AND iata = ""aer"";",1 What is the total number of community development projects completed in Africa in the past decade?,"CREATE TABLE community_development (id INT, location VARCHAR(255), year INT, completed BOOLEAN);",SELECT SUM(completed) FROM community_development WHERE location LIKE '%Africa%' AND completed = TRUE AND year > (SELECT MAX(year) FROM community_development WHERE location LIKE '%Africa%' AND completed = TRUE) - 10;,SELECT COUNT(*) FROM community_development WHERE location = 'Africa' AND year BETWEEN 2017 AND 2021 AND completed = TRUE;,0 How many entries are there for type for the cyrillic name other names is падина (slovak: padina)?,"CREATE TABLE table_2562572_43 (type VARCHAR, cyrillic_name_other_names VARCHAR);","SELECT COUNT(type) FROM table_2562572_43 WHERE cyrillic_name_other_names = ""Падина (Slovak: Padina)"";","SELECT COUNT(type) FROM table_2562572_43 WHERE cyrillic_name_other_names = ""адина (Slovak: Padina)"";",0 "Which sites have experienced equipment failures in the past month, and what was the most commonly failing equipment?","CREATE TABLE EquipmentData (SiteName VARCHAR(50), Equipment VARCHAR(50), FailureDate DATE); ","SELECT SiteName, Equipment, COUNT(*) FROM EquipmentData WHERE FailureDate >= CURRENT_DATE - INTERVAL '1 month' GROUP BY SiteName, Equipment ORDER BY COUNT(*) DESC;","SELECT SiteName, Equipment, COUNT(*) as FailureCount FROM EquipmentData WHERE FailureDate >= DATEADD(month, -1, GETDATE()) GROUP BY SiteName, Equipment ORDER BY FailureCount DESC LIMIT 1;",0 Name the party for bensalem,"CREATE TABLE table_1979619_3 (party VARCHAR, residence VARCHAR);","SELECT party FROM table_1979619_3 WHERE residence = ""Bensalem"";","SELECT party FROM table_1979619_3 WHERE residence = ""Bensalem"";",1 "What are the names of all employees who work in the 'Assembly' department and earn a salary greater than $50,000?","CREATE TABLE Employees (EmployeeID INT, FirstName VARCHAR(50), LastName VARCHAR(50), Department VARCHAR(50), Salary DECIMAL(10,2)); ","SELECT FirstName, LastName FROM Employees WHERE Department = 'Assembly' AND Salary > 50000;",SELECT FirstName FROM Employees WHERE Department = 'Assembly' AND Salary > 50000;,0 "For a Lost of 10 and a Try Bonus of 4, what are the points against them?","CREATE TABLE table_name_54 (points_against VARCHAR, try_bonus VARCHAR, lost VARCHAR);","SELECT points_against FROM table_name_54 WHERE try_bonus = ""4"" AND lost = ""10"";","SELECT points_against FROM table_name_54 WHERE try_bonus = ""4"" AND lost = 10;",0 Show total hours per week and number of games played for student David Shieber.,"CREATE TABLE Student (StuID VARCHAR, Fname VARCHAR, Lname VARCHAR); CREATE TABLE Sportsinfo (StuID VARCHAR);","SELECT SUM(hoursperweek), SUM(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = ""David"" AND T2.Lname = ""Shieber"";","SELECT T1.StuID, T1.Fname, T1.Lname FROM Student AS T1 JOIN Sportsinfo AS T2 ON T1.StuID = T2.StuID WHERE T2.StuID = ""David Shieber"" GROUP BY T1.StuID;",0 "Which Census Ranking has a Population smaller than 879, and an Area km 2 larger than 537.62?","CREATE TABLE table_name_36 (census_ranking VARCHAR, population VARCHAR, area_km_2 VARCHAR);",SELECT census_ranking FROM table_name_36 WHERE population < 879 AND area_km_2 > 537.62;,SELECT census_ranking FROM table_name_36 WHERE population 879 AND area_km_2 > 537.62;,0 "Find the bank with the lowest average loan amount for socially responsible lending, along with their average loan amount?","CREATE TABLE SOCIALLY_RESPONSIBLE_LOANS (BANK_NAME VARCHAR(50), AMOUNT NUMBER(12,2)); ","SELECT BANK_NAME, AVG(AMOUNT) AVERAGE_LOAN FROM SOCIALLY_RESPONSIBLE_LOANS GROUP BY BANK_NAME HAVING COUNT(*) = (SELECT MIN(COUNT(*)) FROM SOCIALLY_RESPONSIBLE_LOANS GROUP BY BANK_NAME);","SELECT BANK_NAME, AVG(AMOUNT) FROM SOCIALLY_RESPONSIBLE_LOANS GROUP BY BANK_NAME ORDER BY AVG(AMOUNT) DESC LIMIT 1;",0 "What is Attendance, when Date is ""26 December 2004""?","CREATE TABLE table_name_56 (attendance VARCHAR, date VARCHAR);","SELECT attendance FROM table_name_56 WHERE date = ""26 december 2004"";","SELECT attendance FROM table_name_56 WHERE date = ""26 december 2004"";",1 Where was the location of the Mong Kok Stadium?,"CREATE TABLE table_name_12 (location VARCHAR, home_ground VARCHAR);","SELECT location FROM table_name_12 WHERE home_ground = ""mong kok stadium"";","SELECT location FROM table_name_12 WHERE home_ground = ""mong kok stadium"";",1 "Delete the ""UnderwaterVolcanoes"" view",CREATE VIEW UnderwaterVolcanoes AS SELECT * FROM Volcanoes WHERE Type = 'Underwater';,DROP VIEW UnderwaterVolcanoes;,DELETE FROM UnderwaterVolcanoes;,0 Name the number of silver when gold is less than 1 and bronze is 0 when total is less than 2,"CREATE TABLE table_name_18 (silver VARCHAR, total VARCHAR, gold VARCHAR, bronze VARCHAR);",SELECT COUNT(silver) FROM table_name_18 WHERE gold < 1 AND bronze = 0 AND total < 2;,SELECT COUNT(silver) FROM table_name_18 WHERE gold 1 AND bronze = 0 AND total 2;,0 What is the total quantity of sustainable fashion garments sold in Japan?,"CREATE TABLE Sales (id INT, garmentID INT, quantity INT, saleDate DATE, isSustainable BOOLEAN); CREATE TABLE Garments (id INT, garmentID INT, country VARCHAR(50)); CREATE TABLE Sustainable (id INT, garmentID INT, isSustainable BOOLEAN); ",SELECT SUM(quantity) FROM Sales INNER JOIN Garments ON Sales.garmentID = Garments.garmentID INNER JOIN Sustainable ON Sales.garmentID = Sustainable.garmentID WHERE isSustainable = true AND Garments.country = 'Japan';,SELECT SUM(Sales.quantity) FROM Sales INNER JOIN Garments ON Sales.garmentID = Garments.garmentID INNER JOIN Sustainable ON Garments.garmentID = Sustainable.garmentID WHERE Garments.country = 'Japan' AND Sustainable.isSustainable = TRUE;,0 What is the percentage of the Mediterranean Sea that is covered by marine protected areas?,"CREATE TABLE mediterranean_mpas (mpa_name TEXT, size INTEGER, location TEXT); ","SELECT ROUND(SUM(size) / (SELECT SUM(size) FROM mediterranean_mpas), 2) FROM mediterranean_mpas;",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM mediterranean_mpas)) FROM mediterranean_mpas WHERE location = 'Mediterranean Sea';,0 What is the earliest publication date for each topic?,"CREATE TABLE news_articles (article_id INT PRIMARY KEY, title TEXT, topic TEXT, author TEXT, publication_date DATE);","SELECT topic, MIN(publication_date) FROM news_articles GROUP BY topic;","SELECT topic, MIN(publication_date) FROM news_articles GROUP BY topic;",1 Find the average capacity of renewable energy projects in Canada.,"CREATE TABLE renewable_projects (id INT PRIMARY KEY, project_name VARCHAR(255), project_location VARCHAR(255), project_type VARCHAR(255), capacity_mw FLOAT); CREATE VIEW canada_projects AS SELECT * FROM renewable_projects WHERE project_location = 'Canada';",SELECT AVG(capacity_mw) FROM canada_projects;,SELECT AVG(capacity_mw) FROM canada_projects;,1 "What was the total investment in agricultural innovation projects in Nigeria between 2016 and 2018, and how many were implemented?","CREATE TABLE agri_innovation_projects (project VARCHAR(50), country VARCHAR(50), start_year INT, end_year INT, investment FLOAT); ","SELECT SUM(investment), COUNT(*) FROM agri_innovation_projects WHERE country = 'Nigeria' AND start_year BETWEEN 2016 AND 2018 AND end_year BETWEEN 2016 AND 2018;","SELECT SUM(investment) as total_investment, COUNT(*) as total_implemented FROM agri_innovation_projects WHERE country = 'Nigeria' AND start_year BETWEEN 2016 AND 2018 GROUP BY start_year;",0 "Delete users with less than 100 followers, pivoted by continent in the ""users"" table","CREATE TABLE users (id INT, username VARCHAR(255), followers INT, continent VARCHAR(255));","DELETE u FROM users u JOIN (SELECT continent, username FROM users GROUP BY continent, username HAVING SUM(followers) < 100) t ON u.continent = t.continent AND u.username = t.username;",DELETE FROM users WHERE followers 100;,0 Which ZIP codes in California have the most construction job openings?,"CREATE TABLE ca_jobs (zip VARCHAR(5), job_openings INT); ","SELECT zip, MAX(job_openings) FROM ca_jobs GROUP BY zip;","SELECT zip, MAX(job_openings) FROM ca_jobs GROUP BY zip;",1 Minimum R&D expenditure for Oncology drugs,"CREATE TABLE rd_expenditure (expenditure_id INT, drug_name TEXT, disease_area TEXT, year INT, amount DECIMAL); ",SELECT MIN(amount) FROM rd_expenditure WHERE disease_area = 'Oncology';,SELECT MIN(amount) FROM rd_expenditure WHERE disease_area = 'Oncology';,1 Show the stadium names without any concert.,"CREATE TABLE stadium (name VARCHAR, stadium_id VARCHAR); CREATE TABLE concert (name VARCHAR, stadium_id VARCHAR);",SELECT name FROM stadium WHERE NOT stadium_id IN (SELECT stadium_id FROM concert);,SELECT T1.name FROM stadium AS T1 JOIN concert AS T2 ON T1.stadium_id = T2.stadium_id WHERE T2.name IS NULL;,0 What did the away team score at Kardinia Park?,"CREATE TABLE table_name_85 (away_team VARCHAR, venue VARCHAR);","SELECT away_team AS score FROM table_name_85 WHERE venue = ""kardinia park"";","SELECT away_team AS score FROM table_name_85 WHERE venue = ""kardinia park"";",1 Delete all records for drug 'DrugZ' from the 'sales_data' table.,"CREATE TABLE sales_data (sales_id INT, drug_name VARCHAR(255), quantity_sold INT, sales_date DATE, region VARCHAR(255));",DELETE FROM sales_data WHERE drug_name = 'DrugZ';,DELETE FROM sales_data WHERE drug_name = 'DrugZ';,1 Who are the top 5 streamed Latin music artists in the United States in 2022?,"CREATE TABLE Streams (StreamID INT, UserID INT, ArtistID INT, SongID INT, Country VARCHAR(50), StreamDate DATE); ","SELECT ArtistID, COUNT(*) AS StreamCount FROM Streams WHERE Country = 'United States' AND StreamDate >= '2022-01-01' AND Genre = 'Latin' GROUP BY ArtistID ORDER BY StreamCount DESC LIMIT 5;","SELECT ArtistID, Country, StreamDate, ROW_NUMBER() OVER (ORDER BY StreamDate DESC) as Rank FROM Streams WHERE Country = 'United States' AND StreamDate BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY ArtistID, Country ORDER BY Rank DESC LIMIT 5;",0 Which country has an IATA of JFK?,"CREATE TABLE table_name_3 (country VARCHAR, iata VARCHAR);","SELECT country FROM table_name_3 WHERE iata = ""jfk"";","SELECT country FROM table_name_3 WHERE iata = ""jfk"";",1 Name the reason for change pennsylvania 13th,"CREATE TABLE table_225102_4 (reason_for_change VARCHAR, district VARCHAR);","SELECT reason_for_change FROM table_225102_4 WHERE district = ""Pennsylvania 13th"";","SELECT reason_for_change FROM table_225102_4 WHERE district = ""Pennsylvania 13th"";",1 Find the average rating of museums in New York with more than 100 reviews.,"CREATE TABLE museums(id INT, name TEXT, city TEXT, rating INT, reviews INT);",SELECT AVG(rating) FROM museums WHERE city = 'New York' AND reviews > 100;,SELECT AVG(rating) FROM museums WHERE city = 'New York' AND reviews > 100;,1 What is the maximum funding amount for biotech startups located in each state?,"CREATE SCHEMA if not exists biotech;USE biotech;CREATE TABLE if not exists startups(id INT, name VARCHAR(255), location VARCHAR(255), funding FLOAT);","SELECT location, MAX(funding) FROM biotech.startups GROUP BY location;","SELECT location, MAX(funding) FROM startups GROUP BY location;",0 Who are the top 5 customers by transaction value in the last week?,"CREATE TABLE customers (customer_id INT, transaction_date DATE, transaction_value FLOAT); ","SELECT customer_id, RANK() OVER (ORDER BY SUM(transaction_value) DESC ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) AS customer_rank FROM customers WHERE transaction_date >= DATEADD(week, -1, CURRENT_DATE) GROUP BY customer_id HAVING COUNT(*) >= 7;","SELECT customer_id, transaction_value FROM customers WHERE transaction_date >= DATEADD(week, -1, GETDATE()) GROUP BY customer_id ORDER BY transaction_value DESC LIMIT 5;",0 What are the meanings of the flag whose name transliterates to semërka?,"CREATE TABLE table_29997112_3 (meaning VARCHAR, transliteration VARCHAR);","SELECT meaning FROM table_29997112_3 WHERE transliteration = ""semërka"";","SELECT meaning FROM table_29997112_3 WHERE transliteration = ""Semrka"";",0 "List the renewable energy projects in California and their respective investment types, and the total number of renewable energy projects in California","CREATE TABLE renewable_energy_projects (project_id INT, project_name VARCHAR(255), location VARCHAR(255), total_investment INT, investment_type VARCHAR(255)); ",SELECT * FROM renewable_energy_projects WHERE location = 'California'; SELECT COUNT(*) FROM renewable_energy_projects WHERE location = 'California';,"SELECT project_name, investment_type, COUNT(*) FROM renewable_energy_projects WHERE location = 'California' GROUP BY project_name, investment_type;",0 "How many workers in the supply chain were provided with safety training in 2019, by each country?","CREATE TABLE SupplyChainSafety (safety_training BOOLEAN, country VARCHAR(255), year INT);","SELECT country, COUNT(*) FROM SupplyChainSafety WHERE safety_training = TRUE AND year = 2019 GROUP BY country;","SELECT country, COUNT(*) FROM SupplyChainSafety WHERE safety_training = TRUE AND year = 2019 GROUP BY country;",1 How many hospitals are there in the state of New York?,"CREATE TABLE Hospitals (ID INT, Name VARCHAR(100), State VARCHAR(50)); ",SELECT COUNT(*) FROM Hospitals WHERE State = 'New York';,SELECT COUNT(*) FROM Hospitals WHERE State = 'New York';,1 "Who is the candidate in Race for State representative, hd18?","CREATE TABLE table_name_57 (candidate VARCHAR, race VARCHAR);","SELECT candidate FROM table_name_57 WHERE race = ""state representative, hd18"";","SELECT candidate FROM table_name_57 WHERE race = ""state representative, hd18"";",1 What Team had less than 1 point with a Zakspeed 871 chassis?,"CREATE TABLE table_name_44 (team VARCHAR, points VARCHAR, chassis VARCHAR);","SELECT team FROM table_name_44 WHERE points < 1 AND chassis = ""zakspeed 871"";","SELECT team FROM table_name_44 WHERE points 1 AND chassis = ""zakspeed 871"";",0 Rank ethical fashion brands by their total sustainability score in ascending order.,"CREATE TABLE ethical_fashion_brands (brand_id INT, brand_name VARCHAR(255), score INT); ","SELECT brand_name, score, RANK() OVER (ORDER BY score ASC) as sustainability_rank FROM ethical_fashion_brands;","SELECT brand_name, SUM(score) as total_score FROM ethical_fashion_brands GROUP BY brand_name ORDER BY total_score DESC;",0 What's the total number of volunteers for each program category?,"CREATE TABLE ProgramCategories (CategoryID INT, Category VARCHAR(20)); CREATE TABLE Programs (ProgramID INT, CategoryID INT, ProgramName VARCHAR(50)); CREATE TABLE Volunteers (VolunteerID INT, ProgramID INT, VolunteerName VARCHAR(50)); ","SELECT pc.Category, COUNT(v.VolunteerID) AS TotalVolunteers FROM ProgramCategories pc JOIN Programs p ON pc.CategoryID = p.CategoryID JOIN Volunteers v ON p.ProgramID = v.ProgramID GROUP BY pc.Category;","SELECT ProgramCategories.Category, COUNT(Volunteers.VolunteerID) as TotalVolunteers FROM ProgramCategories INNER JOIN Programs ON ProgramCategories.CategoryID = Programs.CategoryID INNER JOIN Volunteers ON ProgramCategories.CategoryID = Volunteers.ProgramID GROUP BY ProgramCategories.Category;",0 Which award show had the category of best supporting actress?,"CREATE TABLE table_name_22 (award VARCHAR, category VARCHAR);","SELECT award FROM table_name_22 WHERE category = ""best supporting actress"";","SELECT award FROM table_name_22 WHERE category = ""best supporting actress"";",1 How many aircraft accidents were there per manufacturer in the last 3 years?,"CREATE TABLE Accidents (Id INT, Manufacturer VARCHAR(50), Date DATE); ","SELECT Manufacturer, COUNT(*) FROM Accidents WHERE Date >= DATEADD(YEAR, -3, GETDATE()) GROUP BY Manufacturer;","SELECT Manufacturer, COUNT(*) FROM Accidents WHERE Date >= DATEADD(year, -3, GETDATE()) GROUP BY Manufacturer;",0 How many climate change adaptation projects were implemented in India before 2010?,"CREATE TABLE climate_change_projects (id INT, name VARCHAR(255), type VARCHAR(255), location VARCHAR(255), start_year INT, end_year INT, funding_amount DECIMAL(10,2));",SELECT COUNT(*) FROM climate_change_projects WHERE type = 'climate change adaptation' AND location = 'India' AND start_year < 2010;,SELECT COUNT(*) FROM climate_change_projects WHERE type = 'Adaptation' AND location = 'India' AND start_year 2010;,0 What is the average workforce diversity score of mining operations in South America?,"CREATE TABLE mining_operation (id INT, name VARCHAR(50), location VARCHAR(50), diversity_score INT); ",SELECT AVG(diversity_score) FROM mining_operation WHERE location = 'South America';,SELECT AVG(diversity_score) FROM mining_operation WHERE location = 'South America';,1 List destinations in Africa with sustainable tourism certifications,"CREATE TABLE destinations (name VARCHAR(255), continent VARCHAR(255), certification VARCHAR(255)); ",SELECT name FROM destinations WHERE continent = 'Africa' AND certification IS NOT NULL;,SELECT name FROM destinations WHERE continent = 'Africa' AND certification = 'Sustainable Tourism';,0 How many fans attended the game at Bye?,"CREATE TABLE table_name_53 (attendance VARCHAR, game_site VARCHAR);","SELECT attendance FROM table_name_53 WHERE game_site = ""bye"";","SELECT attendance FROM table_name_53 WHERE game_site = ""bye"";",1 What is the sum of transactions for all digital assets with a 'Low' risk level on a specific date?,"CREATE TABLE digital_assets (asset_id INT, asset_name VARCHAR(50), risk_level VARCHAR(50)); CREATE TABLE transactions (transaction_id INT, asset_id INT, quantity DECIMAL(10, 2), transaction_date DATE); ",SELECT SUM(quantity) as total_transactions FROM transactions t JOIN digital_assets d ON t.asset_id = d.asset_id WHERE d.risk_level = 'Low' AND transaction_date = '2022-01-01';,"SELECT SUM(quantity) FROM transactions JOIN digital_assets ON transactions.asset_id = digital_assets.asset_id WHERE digital_assets.risk_level = 'Low' AND transactions.transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 What is the average fare for buses and trams in the city center?,"CREATE TABLE Routes (RouteID int, RouteType varchar(10), StartingLocation varchar(20)); CREATE TABLE Fares (RouteID int, Fare float); ",SELECT AVG(Fares.Fare) FROM Fares INNER JOIN Routes ON Fares.RouteID = Routes.RouteID WHERE Routes.StartingLocation = 'City Center' AND (Routes.RouteType = 'Bus' OR Routes.RouteType = 'Tram');,"SELECT AVG(Fares.Fare) FROM Routes INNER JOIN Fares ON Routes.RouteID = Fares.RouteID WHERE Routes.StartingLocation = 'City Center' AND Routes.RouteType IN ('Bus', 'Tram');",0 what is the division southwest when division south was kožuf and division east was osogovo,"CREATE TABLE table_17881033_1 (division_southwest VARCHAR, division_south VARCHAR, division_east VARCHAR);","SELECT division_southwest FROM table_17881033_1 WHERE division_south = ""Kožuf"" AND division_east = ""Osogovo"";","SELECT division_southwest FROM table_17881033_1 WHERE division_south = ""Kouf"" AND division_east = ""Osogovo"";",0 Who is the builder of the locomotives with wheel arrangement of 2-4-2 T?,"CREATE TABLE table_1157867_2 (builder VARCHAR, wheel_arrangement VARCHAR);","SELECT builder FROM table_1157867_2 WHERE wheel_arrangement = ""2-4-2 T"";","SELECT builder FROM table_1157867_2 WHERE wheel_arrangement = ""2-4-2 T"";",1 "What city of license has an ERP W smaller than 500, Class A, and Frequency MHz larger than 89.7?","CREATE TABLE table_name_76 (city_of_license VARCHAR, frequency_mhz VARCHAR, erp_w VARCHAR, class VARCHAR);","SELECT city_of_license FROM table_name_76 WHERE erp_w < 500 AND class = ""a"" AND frequency_mhz > 89.7;","SELECT city_of_license FROM table_name_76 WHERE erp_w 500 AND class = ""a"" AND frequency_mhz > 89.7;",0 What location had the opponent Hiroyuki Abe?,"CREATE TABLE table_name_56 (location VARCHAR, opponent VARCHAR);","SELECT location FROM table_name_56 WHERE opponent = ""hiroyuki abe"";","SELECT location FROM table_name_56 WHERE opponent = ""hiroyuki abe"";",1 How many deep-sea species have been discovered in the Indian Ocean since 2010?,"CREATE TABLE indian_ocean (id INT, name VARCHAR(100), region VARCHAR(50)); CREATE TABLE deep_sea_species (id INT, name VARCHAR(100), species_type VARCHAR(50), discovery_year INT, ocean_id INT); ",SELECT COUNT(*) FROM deep_sea_species dss WHERE dss.ocean_id = (SELECT id FROM indian_ocean WHERE name = 'Indian Ocean') AND discovery_year >= 2010;,SELECT COUNT(DISTINCT deep_sea_species.species_type) FROM deep_sea_species INNER JOIN indian_ocean ON deep_sea_species.ocean_id = indian_ocean.id WHERE deep_sea_species.discovery_year >= 2010;,0 "What is the position of the competition in Tampere, Finland?","CREATE TABLE table_name_62 (position VARCHAR, venue VARCHAR);","SELECT position FROM table_name_62 WHERE venue = ""tampere, finland"";","SELECT position FROM table_name_62 WHERE venue = ""tampere, finnish"";",0 What is the maximum number of corners won by a team in a single Serie A season?,"CREATE TABLE italian_teams (team_id INT, team_name VARCHAR(50)); CREATE TABLE italian_matches (match_id INT, home_team_id INT, away_team_id INT, home_team_corners INT, away_team_corners INT); ",SELECT MAX(home_team_corners + away_team_corners) AS max_corners FROM italian_matches;,SELECT MAX(home_team_corners) FROM italian_matches JOIN italian_teams ON italian_matches.away_team_id = italian_teams.team_id WHERE italian_teams.team_name = 'Serie A';,0 Which college has a defensive end with a round less than 6?,"CREATE TABLE table_name_84 (college VARCHAR, round VARCHAR, position VARCHAR);","SELECT college FROM table_name_84 WHERE round > 6 AND position = ""defensive end"";","SELECT college FROM table_name_84 WHERE round 6 AND position = ""defensive end"";",0 What is the adoption rate of electric vehicles in South Korea in 2020?,"CREATE TABLE EV_ADOPTION (country VARCHAR(20), year INT, adoption_rate DECIMAL(5,2));",SELECT adoption_rate FROM EV_ADOPTION WHERE country = 'South Korea' AND year = 2020;,SELECT adoption_rate FROM EV_ADOPTION WHERE country = 'South Korea' AND year = 2020;,1 Get the total number of treatments provided by 'Dr. Jane' in February 2021.,"CREATE TABLE treatment (treatment_id INT, patient_id INT, condition VARCHAR(50), provider VARCHAR(50), date DATE); ",SELECT COUNT(*) FROM treatment WHERE provider = 'Dr. Jane' AND date BETWEEN '2021-02-01' AND '2021-02-28';,SELECT COUNT(*) FROM treatment WHERE provider = 'Dr. Jane' AND date BETWEEN '2021-02-01' AND '2021-02-28';,1 "What is Record, when H/A/N is n?","CREATE TABLE table_name_42 (record VARCHAR, h_a_n VARCHAR);","SELECT record FROM table_name_42 WHERE h_a_n = ""n"";","SELECT record FROM table_name_42 WHERE h_a_n = ""n"";",1 Name the total number of segment d for wooden s barrel,"CREATE TABLE table_15187735_10 (segment_d VARCHAR, segment_a VARCHAR);","SELECT COUNT(segment_d) FROM table_15187735_10 WHERE segment_a = ""Wooden s Barrel"";","SELECT COUNT(segment_d) FROM table_15187735_10 WHERE segment_a = ""wooden s barrel"";",0 What is the policy type and effective date of policies with a risk score less than 700 and that have a claim in 2021?,"CREATE TABLE Policy (PolicyID int, PolicyType varchar(50), EffectiveDate date, RiskScore int); CREATE TABLE Claim (ClaimID int, PolicyID int, ClaimDate date, ClaimAmount int, State varchar(50)); ","SELECT Policy.PolicyType, Policy.EffectiveDate FROM Policy INNER JOIN Claim ON Policy.PolicyID = Claim.PolicyID WHERE Policy.RiskScore < 700 AND Claim.ClaimDate BETWEEN '2021-01-01' AND '2021-12-31';","SELECT Policy.PolicyType, Policy.EffectiveDate FROM Policy INNER JOIN Claim ON Policy.PolicyID = Claim.PolicyID WHERE Policy.RiskScore 700 AND Claim.ClaimDate BETWEEN '2021-01-01' AND '2021-12-31';",0 "What is Opponent In Final, when Surface is Hard, when Location is Wellington, New Zealand, and when Date is 6 February 2000?","CREATE TABLE table_name_72 (opponent_in_final VARCHAR, date VARCHAR, surface VARCHAR, location VARCHAR);","SELECT opponent_in_final FROM table_name_72 WHERE surface = ""hard"" AND location = ""wellington, new zealand"" AND date = ""6 february 2000"";","SELECT opponent_in_final FROM table_name_72 WHERE surface = ""hard"" AND location = ""wellington, new zealand"" AND date = ""6 february 2000"";",1 What is the average time between train cleanings for each route in the city of Tokyo?,"CREATE TABLE trains (id INT, route_id INT, clean_date DATE); ","SELECT route_id, AVG(DATEDIFF('day', LAG(clean_date) OVER (PARTITION BY route_id ORDER BY clean_date), clean_date)) FROM trains WHERE city = 'Tokyo' GROUP BY route_id;","SELECT route_id, AVG(DATEDIFF(clean_date, '%Y-%m')) as avg_time_between_cleaning FROM trains WHERE city = 'Tokyo' GROUP BY route_id;",0 List of high assists with high rebounds for k. mchale (10),"CREATE TABLE table_17344582_11 (high_assists VARCHAR, high_rebounds VARCHAR);","SELECT high_assists FROM table_17344582_11 WHERE high_rebounds = ""K. McHale (10)"";","SELECT high_assists FROM table_17344582_11 WHERE high_rebounds = ""K. Mchale (10)"";",0 Insert a new exhibition record for 'Paris' with the title 'Artistic Revolutions'.,"CREATE TABLE Exhibitions (id INT, curator VARCHAR(50), title VARCHAR(100), location VARCHAR(100), start_date DATE, end_date DATE);","INSERT INTO Exhibitions (id, curator, title, location, start_date, end_date) VALUES (2, 'Aria F. Heller', 'Artistic Revolutions', 'Paris', '2023-06-15', '2023-09-30');","INSERT INTO Exhibitions (id, curator, title, location, start_date, end_date) VALUES (1, 'Artistic Revolutions', 'Paris', '2022-03-01', '2022-03-31');",0 What is the high grid total for maserati?,"CREATE TABLE table_name_68 (grid INTEGER, constructor VARCHAR);","SELECT MAX(grid) FROM table_name_68 WHERE constructor = ""maserati"";","SELECT MAX(grid) FROM table_name_68 WHERE constructor = ""maserati"";",1 What is the minimum salary of athletes in the tennis_players table?,"CREATE TABLE tennis_players (player_id INT, name VARCHAR(50), country VARCHAR(50), ranking INT, salary DECIMAL(10, 2)); ",SELECT MIN(salary) FROM tennis_players;,SELECT MIN(salary) FROM tennis_players;,1 "What is the total number of traffic violations in Toronto in the year 2021, and what was the most common type?","CREATE TABLE violations (id INT, city VARCHAR(255), date DATE, type VARCHAR(255), description TEXT); ","SELECT COUNT(*) FROM violations WHERE city = 'Toronto' AND YEAR(date) = 2021; SELECT type, COUNT(*) FROM violations WHERE city = 'Toronto' AND YEAR(date) = 2021 GROUP BY type ORDER BY COUNT(*) DESC LIMIT 1;","SELECT type, COUNT(*) FROM violations WHERE city = 'Toronto' AND date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY type ORDER BY COUNT(*) DESC LIMIT 1;",0 "What years have a duration of 18 years, and patrizio rispo as the actor?","CREATE TABLE table_name_26 (years VARCHAR, duration VARCHAR, actor VARCHAR);","SELECT years FROM table_name_26 WHERE duration = ""18 years"" AND actor = ""patrizio rispo"";","SELECT years FROM table_name_26 WHERE duration = ""18 years"" AND actor = ""patrocio rispo"";",0 "What is the total amount spent on equipment maintenance, by type, in the 'maintenance_expenses' table?","CREATE TABLE maintenance_expenses (id INT, equipment_type VARCHAR(50), maintenance_date DATE, expense DECIMAL(10,2)); ","SELECT equipment_type, SUM(expense) as total_expense FROM maintenance_expenses GROUP BY equipment_type;","SELECT equipment_type, SUM(expenditure) FROM maintenance_expenses GROUP BY equipment_type;",0 what is the nhl team for round 10?,"CREATE TABLE table_name_92 (nhl_team VARCHAR, round VARCHAR);",SELECT nhl_team FROM table_name_92 WHERE round = 10;,SELECT nhl_team FROM table_name_92 WHERE round = 10;,1 How many users have not logged any workouts in the past month?,"CREATE SCHEMA fitness; CREATE TABLE users (id INT, user_name VARCHAR(255), state VARCHAR(255)); CREATE TABLE workouts (id INT, user_id INT, workout_date DATE);",SELECT COUNT(DISTINCT users.id) FROM fitness.users LEFT JOIN fitness.workouts ON users.id = workouts.user_id WHERE workouts.workout_date IS NULL OR workouts.workout_date < NOW() - INTERVAL 1 MONTH;,"SELECT COUNT(DISTINCT users.id) FROM fitness.users INNER JOIN workouts ON users.id = workouts.user_id WHERE workouts.workout_date DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);",0 How many values of total top 3 placements does Taiwan have?,"CREATE TABLE table_2876467_3 (total_top_3_placements VARCHAR, region_represented VARCHAR);","SELECT COUNT(total_top_3_placements) FROM table_2876467_3 WHERE region_represented = ""Taiwan"";","SELECT COUNT(total_top_3_placements) FROM table_2876467_3 WHERE region_represented = ""Taiwan"";",1 How many marine protected areas are there in the Indian Ocean?,"CREATE TABLE marine_protected_areas (name TEXT, ocean TEXT);",SELECT COUNT(*) FROM marine_protected_areas WHERE ocean = 'Indian Ocean';,SELECT COUNT(*) FROM marine_protected_areas WHERE ocean = 'Indian';,0 What is the average donation amount for donors aged 18-24 who have donated to organizations focused on global health?,"CREATE TABLE donors (id INT, age INT, name VARCHAR(255)); CREATE TABLE donations (id INT, donor_id INT, organization_id INT, amount DECIMAL(10,2), donation_date DATE); CREATE TABLE organizations (id INT, name VARCHAR(255), focus VARCHAR(255)); ",SELECT AVG(amount) FROM donations JOIN donors ON donations.donor_id = donors.id JOIN organizations ON donations.organization_id = organizations.id WHERE donors.age BETWEEN 18 AND 24 AND organizations.focus = 'Global Health';,SELECT AVG(donations.amount) FROM donations INNER JOIN donors ON donations.donor_id = donors.id INNER JOIN organizations ON donations.organization_id = organizations.id WHERE donors.age BETWEEN 18 AND 24 AND organizations.focus = 'Global Health';,0 How many schools did Derrick Green attend?,"CREATE TABLE table_11677691_11 (school VARCHAR, player VARCHAR);","SELECT COUNT(school) FROM table_11677691_11 WHERE player = ""Derrick Green"";","SELECT COUNT(school) FROM table_11677691_11 WHERE player = ""Derrick Green"";",1 "What is Opponent, when Event is ""ISCF - Southeast Championships""?","CREATE TABLE table_name_17 (opponent VARCHAR, event VARCHAR);","SELECT opponent FROM table_name_17 WHERE event = ""iscf - southeast championships"";","SELECT opponent FROM table_name_17 WHERE event = ""iscf - southeast championships"";",1 Show the number of programs and their total expenses for each location.,"CREATE TABLE Programs (ProgramID INT, ProgramName TEXT, Location TEXT, Expenses DECIMAL(10,2), Impact INT); ","SELECT Location, COUNT(*) AS NumberOfPrograms, SUM(Expenses) AS TotalExpenses FROM Programs GROUP BY Location;","SELECT Location, COUNT(*), SUM(Expenses) FROM Programs GROUP BY Location;",0 "What is the points number when 20 shows for played, and lost is 0?","CREATE TABLE table_name_19 (points_for VARCHAR, played VARCHAR, lost VARCHAR);","SELECT points_for FROM table_name_19 WHERE played = ""20"" AND lost = ""0"";",SELECT points_for FROM table_name_19 WHERE played = 20 AND lost = 0;,0 Who is the outgoing manager when they were replaced by pablo centrone?,"CREATE TABLE table_name_16 (outgoing_manager VARCHAR, replaced_by VARCHAR);","SELECT outgoing_manager FROM table_name_16 WHERE replaced_by = ""pablo centrone"";","SELECT outgoing_manager FROM table_name_16 WHERE replaced_by = ""pablo centrone"";",1 What years were the inactive Idaho chapter active?,"CREATE TABLE table_name_99 (charter_range VARCHAR, status VARCHAR, state VARCHAR);","SELECT charter_range FROM table_name_99 WHERE status = ""inactive"" AND state = ""idaho"";","SELECT charter_range FROM table_name_99 WHERE status = ""active"" AND state = ""idaho"";",0 Who is the primary sponsor for crew cheif Rick Ren's team?,"CREATE TABLE table_19908313_2 (primary_sponsor_s_ VARCHAR, crew_chief VARCHAR);","SELECT primary_sponsor_s_ FROM table_19908313_2 WHERE crew_chief = ""Rick Ren"";","SELECT primary_sponsor_s_ FROM table_19908313_2 WHERE crew_chief = ""Rick Ren"";",1 What was the monthly sales trend for each product category in 2022?,"CREATE TABLE product_category_sales (product_category VARCHAR(255), sale_date DATE, revenue DECIMAL(10,2)); ","SELECT product_category, EXTRACT(MONTH FROM sale_date) as month, AVG(revenue) as avg_monthly_sales FROM product_category_sales WHERE sale_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY product_category, EXTRACT(MONTH FROM sale_date);","SELECT product_category, DATE_FORMAT(sale_date, '%Y-%m') as month, SUM(revenue) as total_revenue FROM product_category_sales WHERE YEAR(sale_date) = 2022 GROUP BY product_category;",0 Update the company_name to 'NewBioCorp' for all biosensors produced by BioCorp,"CREATE TABLE biosensors (id INT, name VARCHAR(50), type VARCHAR(50), sensitivity FLOAT, specificity FLOAT, company_name VARCHAR(50)); ",UPDATE biosensors SET company_name = 'NewBioCorp' WHERE company_name = 'BioCorp';,UPDATE biosensors SET company_name = 'NewBioCorp' WHERE company_name = 'BioCorp';,1 What is the minimum age of artists who have performed at Lollapalooza?,"CREATE TABLE Artists (id INT, name VARCHAR(255), age INT); CREATE TABLE Festivals (id INT, name VARCHAR(255), year INT, artist_id INT); ",SELECT MIN(age) FROM Artists INNER JOIN Festivals ON Artists.id = Festivals.artist_id WHERE Festivals.name = 'Lollapalooza';,SELECT MIN(age) FROM Artists JOIN Festivals ON Artists.id = Festivals.artist_id WHERE Festivals.name = 'Lollapalooza';,0 "How many unique fans attended cricket games in the last year, broken down by team and gender?","CREATE TABLE cricket_attendance (fan_id INT, game_date DATE, team VARCHAR(50), gender VARCHAR(50)); ","SELECT team, gender, COUNT(DISTINCT fan_id) FROM cricket_attendance WHERE game_date >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR) GROUP BY team, gender;","SELECT team, gender, COUNT(DISTINCT fan_id) as unique_fans FROM cricket_attendance WHERE game_date >= DATEADD(year, -1, GETDATE()) GROUP BY team, gender;",0 "In the Ohio 4 district, that is the first elected date that has a result of re-elected?","CREATE TABLE table_name_66 (first_elected INTEGER, result VARCHAR, district VARCHAR);","SELECT SUM(first_elected) FROM table_name_66 WHERE result = ""re-elected"" AND district = ""ohio 4"";","SELECT SUM(first_elected) FROM table_name_66 WHERE result = ""re-elected"" AND district = ""ohio 4"";",1 What is the score of the game with the San Diego Padres as the opponent and a record of 11-23?,"CREATE TABLE table_name_29 (score VARCHAR, opponent VARCHAR, record VARCHAR);","SELECT score FROM table_name_29 WHERE opponent = ""san diego padres"" AND record = ""11-23"";","SELECT score FROM table_name_29 WHERE opponent = ""san diego padres"" AND record = ""11-23"";",1 Count the number of games won by teams with a mascot starting with the letter 'C' in the MLB.,"CREATE TABLE mlb_teams_mascots (id INT, name VARCHAR(100), mascot VARCHAR(50), wins INT); ",SELECT SUM(wins) FROM mlb_teams_mascots WHERE mascot LIKE 'C%';,SELECT SUM(wins) FROM mlb_teams_mascots WHERE mascot LIKE 'C%';,1 How many points does mia martini have?,"CREATE TABLE table_name_1 (points VARCHAR, artist VARCHAR);","SELECT COUNT(points) FROM table_name_1 WHERE artist = ""mia martini"";","SELECT points FROM table_name_1 WHERE artist = ""mia martini"";",0 Delete all employees who joined in January 2020,"CREATE SCHEMA IF NOT EXISTS hr;CREATE TABLE IF NOT EXISTS employees (id INT, name VARCHAR(50), department VARCHAR(50), hire_date DATE);",DELETE FROM hr.employees WHERE MONTH(hire_date) = 1 AND YEAR(hire_date) = 2020;,DELETE FROM employees WHERE hire_date BETWEEN '2020-01-01' AND '2020-12-31';,0 How many cuts did he make in the tournament with 3 top 25s and under 13 events?,"CREATE TABLE table_name_44 (cuts_made INTEGER, top_25 VARCHAR, events VARCHAR);",SELECT MAX(cuts_made) FROM table_name_44 WHERE top_25 = 3 AND events < 13;,SELECT SUM(cuts_made) FROM table_name_44 WHERE top_25 = 3 AND events 13;,0 Delete the community development initiative with ID 2 from the 'community_development' table.,"CREATE TABLE community_development(id INT, region TEXT, initiative_name TEXT, status TEXT); ",DELETE FROM community_development WHERE id = 2;,DELETE FROM community_development WHERE id = 2;,1 What was the score when Mark parterned with lorenzo manta?,"CREATE TABLE table_name_19 (score VARCHAR, partner VARCHAR);","SELECT score FROM table_name_19 WHERE partner = ""lorenzo manta"";","SELECT score FROM table_name_19 WHERE partner = ""lorenzo manta"";",1 "What is the total number of opinion pieces and investigative journalism articles published by news sources in the northern region, excluding articles published by NewsSourceG and NewsSourceH?","CREATE SCHEMA news;CREATE TABLE NewsSource (name varchar(255), type varchar(10), region varchar(10));","SELECT COUNT(*) FROM ( (SELECT * FROM news.NewsSource WHERE (region = 'northern') AND type IN ('investigative', 'opinion') AND name NOT IN ('NewsSourceG', 'NewsSourceH')) ) AS northern_opinion_investigative",SELECT COUNT(*) FROM news.newsSource WHERE type = 'opinion' AND region = 'Northern' AND type!= 'investigative';,0 How many people got vaccinated in African countries in Q1 2021?,"CREATE TABLE Vaccinations (Country VARCHAR(50), Continent VARCHAR(50), Date DATE, Vaccinated INT); ",SELECT COUNT(*) FROM Vaccinations WHERE Continent = 'Africa' AND Date BETWEEN '2021-01-01' AND '2021-03-31';,SELECT SUM(Vaccinated) FROM Vaccinations WHERE Continent = 'Africa' AND Date BETWEEN '2021-01-01' AND '2021-03-31';,0 Min. CO2 offset for green building certification,"CREATE TABLE green_buildings_certifications (id INT, name VARCHAR(255), certification VARCHAR(255), co2_offset FLOAT);",SELECT MIN(co2_offset) FROM green_buildings_certifications WHERE certification IS NOT NULL;,SELECT MIN(co2_offset) FROM green_buildings_certifications;,0 What is the total University of Dublin value with a labour panel greater than 11?,"CREATE TABLE table_name_45 (university_of_dublin VARCHAR, labour_panel INTEGER);",SELECT COUNT(university_of_dublin) FROM table_name_45 WHERE labour_panel > 11;,SELECT COUNT(university_of_dublin) FROM table_name_45 WHERE labour_panel > 11;,1 Find the number of different crop types being grown in fields with satellite imagery analysis performed in the last month.,"CREATE TABLE Fields (FieldID varchar(5), FieldName varchar(10), CropType varchar(10), SatelliteImageAnalysis timestamp); ",SELECT COUNT(DISTINCT CropType) FROM Fields WHERE SatelliteImageAnalysis > NOW() - INTERVAL '1 month';,"SELECT COUNT(DISTINCT CropType) FROM Fields WHERE SatelliteImageAnalysis timestamp >= DATEADD(month, -1, GETDATE());",0 What is the average duration of Korean dramas?,"CREATE TABLE korean_dramas (id INT, title VARCHAR(255), duration INT); ",SELECT AVG(duration) FROM korean_dramas;,SELECT AVG(duration) FROM korean_dramas;,1 "WHAT IS THE OPENING WITH A WORLDWIDE NUMBER OF $559,852,396?","CREATE TABLE table_name_85 (opening VARCHAR, worldwide VARCHAR);","SELECT opening FROM table_name_85 WHERE worldwide = ""$559,852,396"";","SELECT opening FROM table_name_85 WHERE worldwide = ""$559,852,396"";",1 "Which Bronze has a Total larger than 7 and a Silver of 3, and a Games of summer, and a Gold of 5?","CREATE TABLE table_name_65 (bronze VARCHAR, gold VARCHAR, games VARCHAR, total VARCHAR, silver VARCHAR);","SELECT bronze FROM table_name_65 WHERE total > 7 AND silver = 3 AND games = ""summer"" AND gold = 5;","SELECT bronze FROM table_name_65 WHERE total > 7 AND silver = 3 AND games = ""summer"" AND gold = 5;",1 Show the distribution of labor rights violations by factory and country.,"CREATE TABLE labor_violations (id INT, factory VARCHAR(100), country VARCHAR(50), violations INT); ","SELECT country, factory, SUM(violations) as total_violations FROM labor_violations GROUP BY country, factory;","SELECT factory, country, SUM(violations) as total_violations FROM labor_violations GROUP BY factory, country;",0 Find the number of unique marine species in the Arctic Ocean region.,"CREATE TABLE arctic_marine_species (id INT, species TEXT, region TEXT); ",SELECT COUNT(DISTINCT species) FROM arctic_marine_species WHERE region = 'Arctic';,SELECT COUNT(DISTINCT species) FROM arctic_marine_species WHERE region = 'Arctic Ocean';,0 How many genetic research projects have been conducted in total?,"CREATE SCHEMA if not exists genetics;CREATE TABLE if not exists genetics.projects (id INT PRIMARY KEY, name VARCHAR(100), country VARCHAR(50)); ",SELECT COUNT(*) FROM genetics.projects;,SELECT COUNT(*) FROM genetics.projects;,1 "What are the details of the intelligence operations that have been conducted in the African region in the last 5 years, and what was the outcome of each operation?","CREATE TABLE intelligence_operations (id INT, region VARCHAR(50), year INT, operation_name VARCHAR(50), operation_details VARCHAR(50), outcome VARCHAR(50)); ",SELECT * FROM intelligence_operations WHERE region = 'Africa' AND year BETWEEN 2018 AND 2022;,"SELECT region, operation_name, operation_details, outcome FROM intelligence_operations WHERE region = 'Africa' AND year BETWEEN 2017 AND 2021 GROUP BY region, operation_name;",0 "What is the most number of touchdowns that have fewer than 105 points, averages over 4.7, and fewer than 487 rushing yards?","CREATE TABLE table_name_77 (touchdowns INTEGER, rushing_yards VARCHAR, points VARCHAR, average VARCHAR);",SELECT MAX(touchdowns) FROM table_name_77 WHERE points < 105 AND average > 4.7 AND rushing_yards < 487;,SELECT MAX(touchdowns) FROM table_name_77 WHERE points 105 AND average > 4.7 AND rushing_yards 487;,0 Update the 'health_equity_metrics' table and change the 'Score' to 85 where 'Metric_Name' is 'Racial Disparities',"CREATE TABLE health_equity_metrics (id INT, metric_name VARCHAR(255), score INT);",UPDATE health_equity_metrics SET score = 85 WHERE metric_name = 'Racial Disparities';,UPDATE health_equity_metrics SET score = 85 WHERE metric_name = 'Racial Disparities';,1 What is the sum of the attendance on November 24?,"CREATE TABLE table_name_58 (attendance INTEGER, date VARCHAR);","SELECT SUM(attendance) FROM table_name_58 WHERE date = ""november 24"";","SELECT SUM(attendance) FROM table_name_58 WHERE date = ""november 24"";",1 List military equipment types with no maintenance activities in the 'equipment_maintenance' table,"CREATE TABLE equipment_maintenance (maintenance_id INT, equipment_type VARCHAR(50), maintenance_activity VARCHAR(100), maintenance_date DATE);",SELECT equipment_type FROM equipment_maintenance GROUP BY equipment_type HAVING COUNT(*) = 0;,SELECT equipment_type FROM equipment_maintenance WHERE maintenance_activity IS NULL;,0 "List the dates of enrollment and completion of the student with personal name ""Karson"".","CREATE TABLE Student_Course_Enrolment (date_of_enrolment VARCHAR, date_of_completion VARCHAR, student_id VARCHAR); CREATE TABLE Students (student_id VARCHAR, personal_name VARCHAR);","SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = ""Karson"";","SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = ""Karson"";",1 Who was the opponent on carpet in a final?,"CREATE TABLE table_name_55 (opponent_in_final VARCHAR, surface VARCHAR);","SELECT opponent_in_final FROM table_name_55 WHERE surface = ""carpet"";","SELECT opponent_in_final FROM table_name_55 WHERE surface = ""carpet"";",1 Find the state with the lowest water usage in Mega Liters.,"CREATE TABLE state_water_usage (state VARCHAR(50), usage BIGINT); ","SELECT state, usage FROM state_water_usage ORDER BY usage ASC LIMIT 1;","SELECT state, MIN(usage) FROM state_water_usage GROUP BY state;",0 What is the total number of military equipment units by type?,"CREATE TABLE military_equipment (equipment_type VARCHAR(255), unit_count INT); ","SELECT equipment_type, SUM(unit_count) FROM military_equipment;","SELECT equipment_type, SUM(unit_count) FROM military_equipment GROUP BY equipment_type;",0 "Delete records from the ""nursing_homes"" table where the ""state"" is ""IL"" and ""total_beds"" are less than 50","CREATE TABLE nursing_homes (id INT PRIMARY KEY, name TEXT, state TEXT, total_beds INT); ",DELETE FROM nursing_homes WHERE state = 'IL' AND total_beds < 50;,DELETE FROM nursing_homes WHERE state = 'IL' AND total_beds 50;,0 The player Cecil Martin with an overall less than 268 has what total pick?,"CREATE TABLE table_name_32 (pick INTEGER, name VARCHAR, overall VARCHAR);","SELECT SUM(pick) FROM table_name_32 WHERE name = ""cecil martin"" AND overall < 268;","SELECT SUM(pick) FROM table_name_32 WHERE name = ""cecil martin"" AND overall 268;",0 Who was the rider with 120.953 mph speed?,"CREATE TABLE table_name_79 (rider VARCHAR, speed VARCHAR);","SELECT rider FROM table_name_79 WHERE speed = ""120.953 mph"";","SELECT rider FROM table_name_79 WHERE speed = ""120.953"";",0 What is the difference in property prices between the most expensive and least expensive property in each city?,"CREATE TABLE cities (city_id INT, city_name VARCHAR(255));CREATE TABLE properties (property_id INT, city_id INT, price DECIMAL(10,2)); ","SELECT city_id, MAX(price) - MIN(price) as price_difference FROM properties GROUP BY city_id;","SELECT c.city_name, MAX(p.price) - MIN(p.price) as price_difference FROM properties p JOIN cities c ON p.city_id = c.city_id GROUP BY c.city_name;",0 Add a new wheelchair-accessible train station in Chicago,"CREATE TABLE train_stations (station_id INT, city VARCHAR(50), accessible BOOLEAN); ","INSERT INTO train_stations (station_id, city, accessible) VALUES (6, 'Chicago', true);","INSERT INTO train_stations (station_id, city, accessible) VALUES (1, 'Chicago', TRUE);",0 What is the total 'renewable energy' consumption in 'Germany'?,"CREATE TABLE energy_consumption (id INT, name TEXT, energy_type TEXT, consumption FLOAT); ",SELECT SUM(consumption) FROM energy_consumption WHERE name = 'Germany' AND energy_type = 'renewable energy';,SELECT SUM(consumption) FROM energy_consumption WHERE energy_type ='renewable' AND country = 'Germany';,0 How many silver medals were won with a total medal of 3 and a rank above 9?,"CREATE TABLE table_name_49 (silver INTEGER, total VARCHAR, rank VARCHAR);",SELECT AVG(silver) FROM table_name_49 WHERE total < 3 AND rank > 9;,SELECT SUM(silver) FROM table_name_49 WHERE total = 3 AND rank > 9;,0 Who is the oldest user who has never liked an article?,"CREATE TABLE users (id INT, age INT, gender TEXT); CREATE TABLE likes (user_id INT, article_id INT); ",SELECT users.age FROM users LEFT JOIN likes ON users.id = likes.user_id WHERE likes.user_id IS NULL ORDER BY users.age DESC LIMIT 1;,SELECT u.age FROM users u JOIN likes l ON u.id = l.user_id WHERE l.article_id IS NULL;,0 How many clinical trials were successful per country?,"CREATE TABLE clinical_trials (trial_id INT, country TEXT, success BOOLEAN); ","SELECT country, COUNT(*) as successful_trials FROM clinical_trials WHERE success = TRUE GROUP BY country;","SELECT country, COUNT(*) FROM clinical_trials WHERE success = TRUE GROUP BY country;",0 What was the format for the region of europe?,"CREATE TABLE table_name_81 (format VARCHAR, region VARCHAR);","SELECT format FROM table_name_81 WHERE region = ""europe"";","SELECT format FROM table_name_81 WHERE region = ""europe"";",1 What is the total revenue of eco-tourism businesses in Costa Rica?,"CREATE TABLE Revenue (id INT, country TEXT, type TEXT, amount FLOAT); ",SELECT SUM(amount) FROM Revenue WHERE country = 'Costa Rica' AND type = 'Eco-tourism';,SELECT SUM(amount) FROM Revenue WHERE country = 'Costa Rica' AND type = 'Eco-tourism';,1 Name the number of wins for 30 starts,"CREATE TABLE table_2181798_1 (wins VARCHAR, starts VARCHAR);",SELECT COUNT(wins) FROM table_2181798_1 WHERE starts = 30;,SELECT COUNT(wins) FROM table_2181798_1 WHERE starts = 30;,1 What's the total distance covered in runs for each member?,"CREATE TABLE Runs (MemberID INT, Distance FLOAT); ","SELECT MemberID, SUM(Distance) FROM Runs GROUP BY MemberID;","SELECT MemberID, SUM(Distance) FROM Runs GROUP BY MemberID;",1 What date was M. Grabovski the first start of the game?,"CREATE TABLE table_27537518_7 (date VARCHAR, first_star VARCHAR);","SELECT date FROM table_27537518_7 WHERE first_star = ""M. Grabovski"";","SELECT date FROM table_27537518_7 WHERE first_star = ""M. Grabovski"";",1 What is the energy efficiency score for the top 5 countries in renewable energy consumption?,"CREATE TABLE renewable_energy (country TEXT, consumption FLOAT); CREATE TABLE energy_efficiency (country TEXT, score FLOAT); ","SELECT e.country, e.score FROM (SELECT country FROM renewable_energy ORDER BY consumption DESC LIMIT 5) AS r JOIN energy_efficiency AS e ON r.country = e.country","SELECT energy_efficiency.country, energy_efficiency.score FROM renewable_energy INNER JOIN energy_efficiency ON renewable_energy.country = energy_efficiency.country GROUP BY renewable_energy.country ORDER BY energy_efficiency.score DESC LIMIT 5;",0 Calculate the total number of courses offered by 'Stanford U' in each 'Spring' and 'Fall' season.,"CREATE TABLE university_courses (course_id INT, university VARCHAR(20), season VARCHAR(10), num_courses INT); ","SELECT university, season, SUM(num_courses) FROM university_courses WHERE university = 'Stanford U' AND season IN ('Spring', 'Fall') GROUP BY university, season;","SELECT season, SUM(num_courses) FROM university_courses WHERE university = 'Stanford U' GROUP BY season;",0 What is the average number of accommodations per month for students with mobility impairments?,"CREATE TABLE accommodation (student_id INT, accommodation_type TEXT, accommodation_date DATE); CREATE TABLE student (student_id INT, disability TEXT); ","SELECT AVG(COUNT(*)) as avg_accommodations FROM accommodation WHERE student_id IN (SELECT student_id FROM student WHERE disability = 'Mobility Impairment') GROUP BY DATE_TRUNC('month', accommodation_date);",SELECT AVG(COUNT(*)) FROM accommodation JOIN student ON accommodation.student_id = student.student_id WHERE disability = 'Mobility Impairment';,0 What was the lowest V(mph) for a Saffir-Simpson of 4 in 2005?,"CREATE TABLE table_name_36 (v_mph_ INTEGER, saffir_simpson_category VARCHAR, year VARCHAR);",SELECT MIN(v_mph_) FROM table_name_36 WHERE saffir_simpson_category = 4 AND year = 2005;,"SELECT MIN(v_mph_) FROM table_name_36 WHERE saffir_simpson_category = ""4"" AND year = 2005;",0 Which Year of Issue has a Thickness of 1.42mm?,"CREATE TABLE table_name_52 (year_of_issue INTEGER, thickness VARCHAR);","SELECT MAX(year_of_issue) FROM table_name_52 WHERE thickness = ""1.42mm"";","SELECT MAX(year_of_issue) FROM table_name_52 WHERE thickness = ""1.42mm"";",1 What is the number of tourists visiting Japan from each continent?,"CREATE TABLE tourists (tourist_id INT, name TEXT, country TEXT, continent TEXT); ","SELECT continent, COUNT(DISTINCT country) FROM tourists WHERE country = 'Japan' GROUP BY continent;","SELECT continent, COUNT(*) FROM tourists WHERE country = 'Japan' GROUP BY continent;",0 "What opponent had an attendance of 10,089?","CREATE TABLE table_name_11 (opponent VARCHAR, attendance VARCHAR);","SELECT opponent FROM table_name_11 WHERE attendance = ""10,089"";","SELECT opponent FROM table_name_11 WHERE attendance = ""10,089"";",1 "For each union chapter, find the number of members who have been active for more than 5 years, ranked by the highest number of long-term members.","CREATE TABLE union_members (id INT, chapter VARCHAR(255), years_active INT); ","SELECT chapter, ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) as rank, COUNT(*) as long_term_members FROM union_members WHERE years_active > 5 GROUP BY chapter ORDER BY rank;","SELECT chapter, COUNT(*) as long_term_members FROM union_members WHERE years_active > 5 GROUP BY chapter ORDER BY long_term_members DESC;",0 What was the highest points where there were less than 2 drawn and the games were less than 6?,"CREATE TABLE table_name_26 (points INTEGER, drawn VARCHAR, games VARCHAR);",SELECT MAX(points) FROM table_name_26 WHERE drawn < 2 AND games < 6;,SELECT MAX(points) FROM table_name_26 WHERE drawn 2 AND games 6;,0 What is the number of the name for number 4?,"CREATE TABLE table_12803263_1 (name VARCHAR, _number VARCHAR);",SELECT COUNT(name) FROM table_12803263_1 WHERE _number = 4;,SELECT COUNT(name) FROM table_12803263_1 WHERE _number = 4;,1 "What is the percentage of employees who have completed leadership training, by department?","CREATE TABLE EmployeeTraining (EmployeeID INT, Department VARCHAR(255), TrainingID INT); CREATE TABLE TrainingCourses (TrainingID INT, TrainingName VARCHAR(255), Completed DATE); ","SELECT Department, COUNT(DISTINCT e.EmployeeID) * 100.0 / (SELECT COUNT(DISTINCT EmployeeID) FROM Employees WHERE Department = e.Department) AS Percentage FROM EmployeeTraining e JOIN TrainingCourses t ON e.TrainingID = t.TrainingID WHERE t.Completed IS NOT NULL GROUP BY e.Department;","SELECT Department, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM EmployeeTraining WHERE TrainingID = TrainingCourses.TrainingID) as Percentage FROM EmployeeTraining INNER JOIN TrainingCourses ON EmployeeTraining.TrainingID = TrainingCourses.TrainingID GROUP BY Department;",0 What is the Tries against when lost shows 12 for pontycymmer rfc?,"CREATE TABLE table_name_79 (tries_against VARCHAR, lost VARCHAR, club VARCHAR);","SELECT tries_against FROM table_name_79 WHERE lost = ""12"" AND club = ""pontycymmer rfc"";","SELECT tries_against FROM table_name_79 WHERE lost = 12 AND club = ""pontycymmer rfc"";",0 "Show the number of biosensor technology patents filed in the USA and China, pivoted to display technology type as columns.","CREATE SCHEMA if not exists biosensors; CREATE TABLE if not exists biosensors.patents (id INT, name VARCHAR(100), country VARCHAR(50), technology VARCHAR(50)); ","SELECT country, SUM(CASE WHEN technology = 'Optical' THEN 1 ELSE 0 END) as optical, SUM(CASE WHEN technology = 'Electrochemical' THEN 1 ELSE 0 END) as electrochemical, SUM(CASE WHEN technology = 'Mass Spectrometry' THEN 1 ELSE 0 END) as mass_spectrometry FROM biosensors.patents WHERE country IN ('USA', 'China') GROUP BY country;","SELECT COUNT(*) FROM biosensors.patents WHERE country IN ('USA', 'China');",0 Delete records of customers who have not taken out any Shariah-compliant loans in the past year.,"CREATE TABLE customer_data (id INT PRIMARY KEY, customer_id INT, last_loan_date DATE); CREATE TABLE shariah_compliant_loans (id INT PRIMARY KEY, customer_id INT, amount DECIMAL(10,2), loan_date DATE); CREATE VIEW past_year_loans AS SELECT customer_id FROM shariah_compliant_loans WHERE loan_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",DELETE c FROM customer_data c WHERE c.customer_id NOT IN (SELECT s.customer_id FROM past_year_loans s);,DELETE FROM customer_data WHERE customer_id NOT IN (SELECT customer_id FROM past_year_loans);,0 Delete flight safety records from 2017,"CREATE SCHEMA if not exists aerospace;CREATE TABLE if not exists aerospace.flight_safety (id INT, incident VARCHAR(255), incident_date DATE);",DELETE FROM aerospace.flight_safety WHERE incident_date >= '2017-01-01' AND incident_date < '2018-01-01';,DELETE FROM aerospace.flight_safety WHERE incident_date >= '2017-01-01';,0 List all menu items with a sustainability_rating of 5,"CREATE TABLE menu_items (menu_item_id INT, name VARCHAR(255), description TEXT, price DECIMAL(5,2), category VARCHAR(255), sustainability_rating INT);",SELECT * FROM menu_items WHERE sustainability_rating = 5;,SELECT name FROM menu_items WHERE sustainability_rating = 5;,0 "Find the average soil moisture for each farm, partitioned by month.","CREATE TABLE farm_soil_moisture (farm_id INT, timestamp TIMESTAMP, soil_moisture INT);","SELECT farm_id, EXTRACT(MONTH FROM timestamp) AS month, AVG(soil_moisture) AS avg_moisture FROM farm_soil_moisture GROUP BY farm_id, month;","SELECT farm_id, EXTRACT(MONTH FROM timestamp) AS month, AVG(soil_moisture) AS avg_soil_moisture FROM farm_soil_moisture GROUP BY farm_id, month;",0 What is the average number of hours volunteered by volunteers in the Food Distribution program?,"CREATE TABLE volunteers (id INT, name TEXT, program TEXT, hours INT); ",SELECT AVG(hours) FROM volunteers WHERE program = 'Food Distribution';,SELECT AVG(hours) FROM volunteers WHERE program = 'Food Distribution';,1 How many professional development courses have been completed by teachers from each school?,"CREATE TABLE schools (school_id INT, school_name TEXT); CREATE TABLE teachers (teacher_id INT, teacher_name TEXT, school_id INT); CREATE TABLE courses (course_id INT, course_name TEXT, completion_date DATE); CREATE TABLE teacher_courses (teacher_id INT, course_id INT); ","SELECT s.school_name, COUNT(tc.course_id) FROM schools s INNER JOIN teachers t ON s.school_id = t.school_id INNER JOIN teacher_courses tc ON t.teacher_id = tc.teacher_id INNER JOIN courses c ON tc.course_id = c.course_id GROUP BY s.school_id;","SELECT schools.school_name, COUNT(teacher_courses.course_id) FROM schools INNER JOIN teacher_courses ON schools.school_id = teacher_courses.school_id INNER JOIN teachers ON teacher_courses.teacher_id = teachers.teacher_id INNER JOIN courses ON teacher_courses.course_id = courses.course_id GROUP BY schools.school_name;",0 Which school has a roll larger than 26 and is located in Fairfield?,"CREATE TABLE table_name_5 (name VARCHAR, roll VARCHAR, area VARCHAR);","SELECT name FROM table_name_5 WHERE roll > 26 AND area = ""fairfield"";","SELECT name FROM table_name_5 WHERE roll > 26 AND area = ""fairfield"";",1 How many eco-friendly accommodations are available in Australia and France?,"CREATE TABLE Accommodations(id INT, name TEXT, country TEXT, eco_friendly BOOLEAN); ","SELECT country, COUNT(*) FROM Accommodations WHERE eco_friendly = true AND country IN ('Australia', 'France') GROUP BY country;","SELECT COUNT(*) FROM Accommodations WHERE country IN ('Australia', 'France') AND eco_friendly = true;",0 "Insert a new record for a community health worker with ID 3, age 30, and ethnicity Caucasian.","CREATE TABLE community_health_workers (worker_id INT, age INT, race VARCHAR(255)); ","INSERT INTO community_health_workers (worker_id, age, race) VALUES (3, 30, 'Caucasian');","INSERT INTO community_health_workers (worker_id, age, race) VALUES (3, 30, 'Caucasian');",1 What is the minimum number of volunteer hours for the top 5 organizations with the most volunteer hours?,"CREATE TABLE volunteer_hours (id INT, organization TEXT, volunteer_hours INT); ","SELECT organization, MIN(volunteer_hours) as min_hours FROM volunteer_hours GROUP BY organization ORDER BY min_hours DESC LIMIT 5;","SELECT organization, MIN(volunteer_hours) FROM volunteer_hours GROUP BY organization ORDER BY volunteer_hours DESC LIMIT 5;",0 What is the average confidence score for 'image_classifier'?,"CREATE TABLE image_classifier (id INT PRIMARY KEY, image_url TEXT, label TEXT, confidence FLOAT); ",SELECT AVG(confidence) FROM image_classifier WHERE label = 'image_classifier';,SELECT AVG(confidence) FROM image_classifier;,0 which country did participated in the most number of Tournament competitions?,"CREATE TABLE competition (country VARCHAR, competition_type VARCHAR);",SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1;,SELECT country FROM competition ORDER BY COUNT(*) DESC LIMIT 1;,0 How many members have a platinum membership and have never used the swimming pool?,"CREATE TABLE Members (MemberID INT, Age INT, MembershipType VARCHAR(20)); CREATE TABLE Workout (MemberID INT, Equipment VARCHAR(20), Duration INT); ",SELECT COUNT(*) FROM Members LEFT JOIN Workout ON Members.MemberID = Workout.MemberID WHERE Members.MembershipType = 'Platinum' AND Workout.Equipment IS NULL;,SELECT COUNT(*) FROM Members JOIN Workout ON Members.MemberID = Workout.MemberID WHERE Members.MembershipType = 'Platinum' AND Workout.Equipment = 'Swimming Pool';,0 Name the least year for goalscore of ortiz and goals more than 25,"CREATE TABLE table_name_81 (year INTEGER, top_goalscorer VARCHAR, goals VARCHAR);","SELECT MIN(year) FROM table_name_81 WHERE top_goalscorer = ""ortiz"" AND goals > 25;","SELECT MIN(year) FROM table_name_81 WHERE top_goalscorer = ""ortiz"" AND goals > 25;",1 Who is the player with a 70-68-74=212 score?,"CREATE TABLE table_name_73 (player VARCHAR, score VARCHAR);",SELECT player FROM table_name_73 WHERE score = 70 - 68 - 74 = 212;,SELECT player FROM table_name_73 WHERE score = 70 - 68 - 74 = 212;,1 What was the total sales revenue for 'DrugE' in Q4 2021 in 'North America'?,"CREATE TABLE sales (drug_name TEXT, sale_date DATE, revenue FLOAT); ",SELECT SUM(revenue) FROM sales WHERE drug_name = 'DrugE' AND sale_date BETWEEN '2021-10-01' AND '2021-10-31';,SELECT SUM(revenue) FROM sales WHERE drug_name = 'DrugE' AND sale_date BETWEEN '2021-04-01' AND '2021-06-30' AND region = 'North America';,0 What is the venue that Saint Joseph's University hosted at?,"CREATE TABLE table_name_38 (venue VARCHAR, host VARCHAR);","SELECT venue FROM table_name_38 WHERE host = ""saint joseph's university"";","SELECT venue FROM table_name_38 WHERE host = ""saint joseph's university"";",1 Which team drafted a player from HC Slavia Praha (Czechoslovakia)? ,"CREATE TABLE table_2850912_10 (nhl_team VARCHAR, college_junior_club_team VARCHAR);","SELECT nhl_team FROM table_2850912_10 WHERE college_junior_club_team = ""HC Slavia Praha (Czechoslovakia)"";","SELECT nhl_team FROM table_2850912_10 WHERE college_junior_club_team = ""HC Slavia Praha (Czechoslovakia)"";",1 "What was the total amount of Value ($M), when the Country was Spain, the Rank was 19, and the Debt as % of value was larger than 159?","CREATE TABLE table_name_54 (value__ VARCHAR, debt_as__percentageof_value VARCHAR, country VARCHAR, rank VARCHAR);","SELECT COUNT(value__) AS $m_ FROM table_name_54 WHERE country = ""spain"" AND rank = 19 AND debt_as__percentageof_value > 159;","SELECT COUNT(value__) FROM table_name_54 WHERE country = ""spain"" AND rank = 19 AND debt_as__percentageof_value > 159;",0 What is the fewest number of bronze medals won among the nations ranked 12 that won no gold medals and 1 medal overall?,"CREATE TABLE table_name_51 (bronze INTEGER, gold VARCHAR, total VARCHAR, rank VARCHAR);","SELECT MIN(bronze) FROM table_name_51 WHERE total = 1 AND rank = ""12"" AND gold < 1;",SELECT MIN(bronze) FROM table_name_51 WHERE total = 1 AND rank = 12 AND gold 1;,0 What is the position of the player from Temple?,"CREATE TABLE table_name_7 (position VARCHAR, school_country VARCHAR);","SELECT position FROM table_name_7 WHERE school_country = ""temple"";","SELECT position FROM table_name_7 WHERE school_country = ""temple"";",1 How many years did he have an average finish of 11.7?,"CREATE TABLE table_2387790_2 (avg_start VARCHAR, avg_finish VARCHAR);","SELECT COUNT(avg_start) FROM table_2387790_2 WHERE avg_finish = ""11.7"";","SELECT COUNT(avg_start) FROM table_2387790_2 WHERE avg_finish = ""11.7"";",1 Who are the top 5 users in India by number of posts?,"CREATE TABLE users (id INT, country VARCHAR(255)); CREATE TABLE posts (id INT, user_id INT, content TEXT); ","SELECT users.id, users.country, COUNT(posts.id) AS post_count FROM users JOIN posts ON users.id = posts.user_id WHERE users.country = 'India' GROUP BY users.id ORDER BY post_count DESC LIMIT 5;","SELECT users.id, COUNT(posts.id) as num_posts FROM users INNER JOIN posts ON users.id = posts.user_id WHERE users.country = 'India' GROUP BY users.id ORDER BY num_posts DESC LIMIT 5;",0 What is the average number of people served by technology for social good programs in the 'rural' area in the 'digital_divide' table?,"CREATE TABLE digital_divide (area TEXT, program TEXT, people_served INTEGER); ",SELECT AVG(people_served) FROM digital_divide WHERE area = 'Rural';,SELECT AVG(people_served) FROM digital_divide WHERE area = 'rural' AND program ='social good';,0 "What is the average safety score for each AI algorithm, partitioned by algorithm type, ordered by score in descending order?","CREATE TABLE ai_algorithms (algorithm_id INT, algorithm_name VARCHAR(50), safety_score DECIMAL(5,2)); ","SELECT algorithm_name, AVG(safety_score) as avg_safety_score FROM ai_algorithms GROUP BY algorithm_name ORDER BY avg_safety_score DESC;","SELECT algorithm_name, AVG(safety_score) as avg_safety_score FROM ai_algorithms GROUP BY algorithm_name ORDER BY avg_safety_score DESC;",1 "Identify the number of farmers in each country, along with the total area of farmland they manage, in the 'indigenous_systems' schema.","CREATE SCHEMA indigenous_systems;CREATE TABLE farmers (id INT, name VARCHAR(50), country VARCHAR(50), area_ha FLOAT);","SELECT country, COUNT(*), SUM(area_ha) FROM indigenous_systems.farmers GROUP BY country;","SELECT country, COUNT(*) as num_farmers, SUM(area_ha) as total_area FROM indigenous_systems.farmers GROUP BY country;",0 How many body builders are there?,CREATE TABLE body_builder (Id VARCHAR);,SELECT COUNT(*) FROM body_builder;,SELECT COUNT(*) FROM body_builder;,1 what is the date for the week larger than 1 and the opponent detroit lions?,"CREATE TABLE table_name_23 (date VARCHAR, week VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_23 WHERE week > 1 AND opponent = ""detroit lions"";","SELECT date FROM table_name_23 WHERE week > 1 AND opponent = ""detroit lions"";",1 "Insert new records into the crime_statistics table for the following crime types, counts, and dates: ('Theft', 25, '2022-06-01'), ('Vandalism', 15, '2022-06-02')?","CREATE TABLE crime_statistics (crime_type VARCHAR(255), crime_count INT, date DATE); ","INSERT INTO crime_statistics (crime_type, crime_count, date) VALUES ('Theft', 25, '2022-06-01'), ('Vandalism', 15, '2022-06-02');","INSERT INTO crime_statistics (crime_type, crime_count, date) VALUES ('Theft', 25, '2022-06-01'), ('Vandalism', 15, '2022-06-02');",1 How many visitors attended each cultural event in the last month?,"CREATE TABLE cultural_events (id INT, name TEXT, location TEXT, start_date DATE, end_date DATE);CREATE TABLE event_attendance (id INT, visitor_id INT, event_id INT);CREATE TABLE visitors (id INT, name TEXT);","SELECT c.name, COUNT(e.id) as num_visitors FROM cultural_events c JOIN event_attendance ea ON c.id = ea.event_id JOIN visitors v ON ea.visitor_id = v.id WHERE c.start_date <= GETDATE() AND c.end_date >= GETDATE() GROUP BY c.name;","SELECT c.name, COUNT(ea.id) FROM cultural_events c JOIN event_attendance ea ON c.id = ea.event_id JOIN visitors v ON ea.visitor_id = v.id WHERE ea.start_date >= DATEADD(month, -1, GETDATE()) GROUP BY c.name;",0 "What is the date of the game with an attendance larger than 62,491?","CREATE TABLE table_name_55 (date VARCHAR, attendance INTEGER);",SELECT date FROM table_name_55 WHERE attendance > 62 OFFSET 491;,SELECT date FROM table_name_55 WHERE attendance > 62 OFFSET 491;,1 What is the total number of art pieces and historical artifacts in Museum A and Museum B?,"CREATE TABLE MuseumA(id INT, type VARCHAR(20), artist VARCHAR(30)); CREATE TABLE MuseumB(id INT, type VARCHAR(20), artist VARCHAR(30)); ",SELECT COUNT(*) FROM MuseumA UNION ALL SELECT COUNT(*) FROM MuseumB;,SELECT COUNT(*) FROM MuseumA INNER JOIN MuseumB ON MuseumA.artist = MuseumB.artist;,0 "Which Alliance Constituency has Seamus Close, position 2 and an election smaller than 1997?","CREATE TABLE table_name_41 (constituency VARCHAR, candidate VARCHAR, position VARCHAR, party VARCHAR, election VARCHAR);","SELECT constituency FROM table_name_41 WHERE party = ""alliance"" AND election < 1997 AND position = 2 AND candidate = ""seamus close"";","SELECT constituency FROM table_name_41 WHERE party = ""alliance"" AND election 1997 AND position = ""seamus close"" AND candidate = ""seamus close"";",0 What is the total amount of Shariah-compliant loans issued to clients in rural areas?,"CREATE TABLE shariah_compliant_loans(id INT, client_id INT);CREATE TABLE clients(id INT, name TEXT, location TEXT);",SELECT SUM(1) FROM shariah_compliant_loans s INNER JOIN clients c ON s.client_id = c.id WHERE c.location LIKE '%rural%';,SELECT SUM(shariah_compliant_loans.amount) FROM shariah_compliant_loans INNER JOIN clients ON shariah_compliant_loans.client_id = clients.id WHERE clients.location = 'Rural';,0 How much money does the player with a to par less than 4 and a score of 74-72-68-73=287 have?,"CREATE TABLE table_name_75 (money___$__ VARCHAR, to_par VARCHAR, score VARCHAR);",SELECT money___$__ FROM table_name_75 WHERE to_par < 4 AND score = 74 - 72 - 68 - 73 = 287;,SELECT money___$__ FROM table_name_75 WHERE to_par 4 AND score = 74 - 72 - 68 - 73 = 287;,0 what is the attendance when the week is 5?,"CREATE TABLE table_name_28 (attendance VARCHAR, week VARCHAR);",SELECT attendance FROM table_name_28 WHERE week = 5;,SELECT attendance FROM table_name_28 WHERE week = 5;,1 What is the launch date for the Ushio dd-54?,"CREATE TABLE table_name_55 (launched VARCHAR, name VARCHAR);","SELECT launched FROM table_name_55 WHERE name = ""ushio dd-54"";","SELECT launched FROM table_name_55 WHERE name = ""ushio dd-54"";",1 Name the highest cuts made when top 5 is less than 3 and top ten is more than 4,"CREATE TABLE table_name_99 (cuts_made INTEGER, top_5 VARCHAR, top_10 VARCHAR);",SELECT MAX(cuts_made) FROM table_name_99 WHERE top_5 < 3 AND top_10 > 4;,SELECT MAX(cuts_made) FROM table_name_99 WHERE top_5 3 AND top_10 > 4;,0 The country of Laos is in what region?,"CREATE TABLE table_name_77 (region VARCHAR, country VARCHAR);","SELECT region FROM table_name_77 WHERE country = ""laos"";","SELECT region FROM table_name_77 WHERE country = ""laos"";",1 "List all the captains who have operated Container vessels in the last month, along with the number of dockings for each captain.","CREATE TABLE Captains (captain_name VARCHAR(50), captain_id INT); CREATE TABLE CaptainVessels (captain_id INT, vessel_name VARCHAR(50), vessel_type VARCHAR(50)); ","SELECT C.captain_name, COUNT(CV.vessel_name) as dock_count FROM Captains C INNER JOIN CaptainVessels CV ON C.captain_id = CV.captain_id INNER JOIN Vessels V ON CV.vessel_name = V.vessel_name WHERE V.vessel_type = 'Container' AND V.last_dock_date >= DATEADD(WEEK, -1, GETDATE()) GROUP BY C.captain_name;","SELECT c.captain_name, COUNT(cv.captain_id) as docking_count FROM Captains c JOIN CaptainVessels cv ON c.captain_id = cv.captain_id WHERE cv.vessel_type = 'Container' AND cv.vessel_type = 'Container' AND cv.vessel_type = 'Container' GROUP BY c.captain_name;",0 Select all marine species research grants from the 'research_grants' view,"CREATE VIEW research_grants AS SELECT g.id, g.grant_name, g.amount, g.start_date, g.end_date, m.species_name FROM grants g JOIN marine_species m ON g.species_id = m.id;",SELECT * FROM research_grants;,"SELECT g.grant_name, g.amount, g.start_date, g.end_date, m.species_name FROM research_grants g JOIN marine_species m ON g.species_id = m.id;",0 How many points were scored by car number 10 that ended with a collision?,"CREATE TABLE table_name_20 (points VARCHAR, time_retired VARCHAR, car_no VARCHAR);","SELECT points FROM table_name_20 WHERE time_retired = ""collision"" AND car_no = ""10"";","SELECT points FROM table_name_20 WHERE time_retired = ""collision"" AND car_no = ""10"";",1 "What's the size of the cylinders built by Longbottom, Barnsley?","CREATE TABLE table_1157867_2 (cylinders VARCHAR, builder VARCHAR);","SELECT cylinders FROM table_1157867_2 WHERE builder = ""Longbottom, Barnsley"";","SELECT cylinders FROM table_1157867_2 WHERE builder = ""Longbottom, Barnsley"";",1 List the names and birth dates of people in ascending alphabetical order of name.,"CREATE TABLE people (Name VARCHAR, Birth_Date VARCHAR);","SELECT Name, Birth_Date FROM people ORDER BY Name;","SELECT Name, Birth_Date FROM people ORDER BY Name;",1 Which Attendance has an Away of real juventud?,"CREATE TABLE table_name_50 (attendance INTEGER, away VARCHAR);","SELECT SUM(attendance) FROM table_name_50 WHERE away = ""real juventud"";","SELECT SUM(attendance) FROM table_name_50 WHERE away = ""real juventud"";",1 What is the total distance traveled by each route?,"CREATE TABLE route (route_id INT, line TEXT);CREATE TABLE trip_distance (distance INT, trip_id INT, route_id INT);","SELECT r.line, SUM(td.distance) FROM route r INNER JOIN trip_distance td ON r.route_id = td.route_id GROUP BY r.line;","SELECT r.line, SUM(td.distance) as total_distance FROM route r JOIN trip_distance td ON r.route_id = td.route_id GROUP BY r.line;",0 What is the average CO2 emission for car rentals in France?,"CREATE TABLE IF NOT EXISTS car_rentals (id INT PRIMARY KEY, name TEXT, country TEXT, co2_emission FLOAT); ",SELECT AVG(co2_emission) FROM car_rentals WHERE country = 'France';,SELECT AVG(co2_emission) FROM car_rentals WHERE country = 'France';,1 Show me which cruelty-free makeup products have a preference rating above 7.,"CREATE TABLE products (product_id INT, category VARCHAR(50), cruelty_free BOOLEAN, preference_rating INT); ",SELECT products.name FROM products WHERE products.cruelty_free = true AND products.preference_rating > 7;,"SELECT product_id, category, cruelty_free, preference_rating FROM products WHERE cruelty_free = true AND preference_rating > 7;",0 How many vessels with flag_state 'Marshall Islands' were active in the last week?,"CREATE TABLE vessel_activity (id INT, vessel_name VARCHAR(50), flag_state VARCHAR(50), activity_date DATE); ","SELECT COUNT(DISTINCT vessel_name) FROM vessel_activity WHERE flag_state = 'Marshall Islands' AND activity_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) AND CURRENT_DATE;","SELECT COUNT(*) FROM vessel_activity WHERE flag_state = 'Marshall Islands' AND activity_date >= DATEADD(week, -1, GETDATE());",0 What's the total byes for more than 1 draw?,"CREATE TABLE table_name_74 (byes VARCHAR, draws INTEGER);",SELECT COUNT(byes) FROM table_name_74 WHERE draws > 1;,SELECT COUNT(byes) FROM table_name_74 WHERE draws > 1;,1 What Frequency's Branding is Your Cure for Corporate Radio?,"CREATE TABLE table_name_23 (frequency VARCHAR, branding VARCHAR);","SELECT frequency FROM table_name_23 WHERE branding = ""your cure for corporate radio"";","SELECT frequency FROM table_name_23 WHERE branding = ""your cure for corporate radio"";",1 "What is the average age of trees in the mature_forest table, grouped by their species?","CREATE TABLE mature_forest (tree_id INT, species VARCHAR(50), age INT);","SELECT species, AVG(age) FROM mature_forest GROUP BY species;","SELECT species, AVG(age) FROM mature_forest GROUP BY species;",1 What is the total attendance of the game with Toronto as the visitor team?,"CREATE TABLE table_name_82 (attendance VARCHAR, visitor VARCHAR);","SELECT COUNT(attendance) FROM table_name_82 WHERE visitor = ""toronto"";","SELECT COUNT(attendance) FROM table_name_82 WHERE visitor = ""toronto"";",1 Find the total count of defense contracts awarded to vendors based in California,"CREATE TABLE defense_contracts (contract_id INT, vendor_state VARCHAR(2));",SELECT COUNT(*) FROM defense_contracts WHERE vendor_state = 'CA';,SELECT COUNT(*) FROM defense_contracts WHERE vendor_state = 'California';,0 Count the number of permits issued per month in 'Sydney' for the 'Commercial' category in 2019.,"CREATE TABLE permit_data_2 (permit_number INT, city VARCHAR(20), category VARCHAR(20), cost INT, issue_date DATE); ","SELECT EXTRACT(MONTH FROM issue_date) AS month, COUNT(*) FROM permit_data_2 WHERE city = 'Sydney' AND category = 'Commercial' AND EXTRACT(YEAR FROM issue_date) = 2019 GROUP BY month;","SELECT EXTRACT(MONTH FROM issue_date) AS month, COUNT(*) FROM permit_data_2 WHERE city = 'Sydney' AND category = 'Commercial' AND EXTRACT(YEAR FROM issue_date) = 2019 GROUP BY month;",1 "What is the name of the player with more than 0 assists, a position of forward, 19 goals, and more than 84 apps?","CREATE TABLE table_name_22 (name VARCHAR, goals VARCHAR, apps VARCHAR, assists VARCHAR, position VARCHAR);","SELECT name FROM table_name_22 WHERE assists > 0 AND position = ""forward"" AND apps > 84 AND goals = 19;","SELECT name FROM table_name_22 WHERE assists > 0 AND position = ""forward"" AND goals = 19 AND apps > 84;",0 What average bronze has a total less than 1?,"CREATE TABLE table_name_29 (bronze INTEGER, total INTEGER);",SELECT AVG(bronze) FROM table_name_29 WHERE total < 1;,SELECT AVG(bronze) FROM table_name_29 WHERE total 1;,0 How many county councils for the communist party of norway,"CREATE TABLE table_203802_2 (county_councils___2011__ INTEGER, english_party_name VARCHAR);","SELECT MAX(county_councils___2011__) FROM table_203802_2 WHERE english_party_name = ""Communist Party of Norway"";","SELECT MAX(county_councils___2011__) FROM table_203802_2 WHERE english_party_name = ""Communist Party of Norway"";",1 Who is the Driver on Bob Keselowski's team?,"CREATE TABLE table_name_57 (driver_s_ VARCHAR, owner_s_ VARCHAR);","SELECT driver_s_ FROM table_name_57 WHERE owner_s_ = ""bob keselowski"";","SELECT driver_s_ FROM table_name_57 WHERE owner_s_ = ""bob keselowski"";",1 "What is the average nitrogen level for each crop type in the past year, grouped by quarters?","CREATE TABLE crop_nutrient_data (id INT, crop_type VARCHAR(255), nitrogen INT, timestamp TIMESTAMP); ","SELECT crop_type, QUARTER(timestamp) AS quarter, AVG(nitrogen) FROM crop_nutrient_data WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 YEAR) GROUP BY crop_type, quarter;","SELECT crop_type, AVG(nitrogen) as avg_nitrogen FROM crop_nutrient_data WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 YEAR) GROUP BY crop_type, quarter;",0 "What is the week for November 28, 1982?","CREATE TABLE table_name_14 (week INTEGER, date VARCHAR);","SELECT MIN(week) FROM table_name_14 WHERE date = ""november 28, 1982"";","SELECT SUM(week) FROM table_name_14 WHERE date = ""november 28, 1982"";",0 Find the top 3 states with the most policyholders for home insurance.,"CREATE TABLE Policyholder_State (ID INT, State VARCHAR(20), Insurance_Type VARCHAR(20)); ","SELECT State, COUNT(*) AS Policyholder_Count FROM Policyholder_State WHERE Insurance_Type = 'Home' GROUP BY State ORDER BY Policyholder_Count DESC LIMIT 3;","SELECT State, COUNT(*) FROM Policyholder_State WHERE Insurance_Type = 'Home' GROUP BY State ORDER BY COUNT(*) DESC LIMIT 3;",0 What is the total waste generated by factory 3?,"CREATE TABLE factories (factory_id INT, waste_generated_kg INT); ",SELECT SUM(waste_generated_kg) FROM factories WHERE factory_id = 3;,SELECT SUM(waste_generated_kg) FROM factories WHERE factory_id = 3;,1 What is the minimum depth of all trenches in the Atlantic Ocean?,"CREATE TABLE atlantic_ocean (name VARCHAR(255), depth FLOAT); ",SELECT MIN(depth) FROM atlantic_ocean WHERE name = 'Puerto Rico';,SELECT MIN(depth) FROM atlantic_ocean;,0 "What is the latitude, longitude, city of the station from which the shortest trip started?","CREATE TABLE trip (start_station_id VARCHAR, duration VARCHAR); CREATE TABLE station (lat VARCHAR, long VARCHAR, city VARCHAR, id VARCHAR);","SELECT T1.lat, T1.long, T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration LIMIT 1;","SELECT T1.lat, T1.long, T1.city FROM station AS T1 JOIN trip AS T2 ON T1.start_station_id = T2.start_station_id GROUP BY T1.start_station_id ORDER BY COUNT(*) DESC LIMIT 1;",0 How many years had a total earnings amount of 2254598?,"CREATE TABLE table_22834834_12 (year VARCHAR, earnings__$_ VARCHAR);",SELECT COUNT(year) FROM table_22834834_12 WHERE earnings__$_ = 2254598;,"SELECT COUNT(year) FROM table_22834834_12 WHERE earnings__$_ = ""2254598"";",0 Insert a new network usage record into the network_usage table,"CREATE TABLE network_usage (usage_id INT, subscriber_id INT, usage_date DATE, usage_type VARCHAR(50), usage_duration INT);","INSERT INTO network_usage (usage_id, subscriber_id, usage_date, usage_type, usage_duration) VALUES (3001, 1001, '2022-01-01', 'Mobile', 150);","INSERT INTO network_usage (usage_id, subscriber_id, usage_date, usage_type, usage_duration) VALUES (1, 'Network usage', '2022-03-01', '2022-03-31'), (2, 'Network usage', '2022-03-31'), (3, 'Network usage', '2022-03-31'), (4, 'Network usage', '2022-03-31', '2022-03-31');",0 Which artist has the most songs in the songs table?,"CREATE TABLE songs (id INT, title VARCHAR(255), artist VARCHAR(255)); ","SELECT artist, COUNT(*) as song_count FROM songs GROUP BY artist ORDER BY song_count DESC LIMIT 1;","SELECT artist, COUNT(*) as song_count FROM songs GROUP BY artist ORDER BY song_count DESC LIMIT 1;",1 insert a new investment strategy with associated ESG factors,"CREATE TABLE if not exists esg_factors (id INT PRIMARY KEY, strategy_id INT, factor_type TEXT, factor TEXT);","INSERT INTO investment_strategies (strategy) VALUES ('Impact Bond Strategy'); INSERT INTO esg_factors (strategy_id, factor_type, factor) VALUES (CURRVAL('investment_strategies_id_seq'), 'environmental', 'Low Carbon Footprint');","INSERT INTO esg_factors (id, strategy_id, factor_type, factor) VALUES (1, 'Investment Strategy', 'ESG', 'ESG');",0 List the unique names of all satellites owned by Japan and South Korea?,"CREATE TABLE satellites (satellite_id INT, name VARCHAR(100), owner_country VARCHAR(50)); ","SELECT DISTINCT name FROM satellites WHERE owner_country IN ('Japan', 'South Korea');","SELECT DISTINCT name FROM satellites WHERE owner_country IN ('Japan', 'South Korea');",1 What is the highest number of losses with 23 points and 22 plays?,"CREATE TABLE table_name_58 (lost INTEGER, points VARCHAR, played VARCHAR);",SELECT MAX(lost) FROM table_name_58 WHERE points = 23 AND played > 22;,SELECT MAX(lost) FROM table_name_58 WHERE points = 23 AND played = 22;,0 Show the average rating for hotels that offer 'spa' facilities.,"CREATE TABLE spahotels (id INT, name VARCHAR(255), rating FLOAT, has_spa BOOLEAN); ",SELECT AVG(rating) FROM spahotels WHERE has_spa = 1;,SELECT AVG(rating) FROM spahotels WHERE has_spa = true;,0 How many production stage managers worked with Gabriel di Chiara as the Male Rep?,"CREATE TABLE table_22410780_1 (production_stagemanager VARCHAR, male_rep VARCHAR);","SELECT COUNT(production_stagemanager) FROM table_22410780_1 WHERE male_rep = ""Gabriel Di Chiara"";","SELECT COUNT(production_stagemanager) FROM table_22410780_1 WHERE male_rep = ""Gabriel di Chiara"";",0 Who was the stage winner of the letua cycling team on stage 2? ,"CREATE TABLE table_27112708_2 (stage VARCHAR, team_classification VARCHAR);","SELECT stage AS winner FROM table_27112708_2 WHERE team_classification = ""LeTua Cycling Team"" AND stage = 2;","SELECT stage FROM table_27112708_2 WHERE team_classification = ""Letua Cycling"";",0 What mountains classification corresponds to Mark Cavendish and the Garmin-Chipotle-H30?,"CREATE TABLE table_name_80 (mountains_classification VARCHAR, general_classification VARCHAR, team_classification VARCHAR);","SELECT mountains_classification FROM table_name_80 WHERE general_classification = ""mark cavendish"" AND team_classification = ""garmin-chipotle-h30"";","SELECT mountains_classification FROM table_name_80 WHERE general_classification = ""mark cavendish"" AND team_classification = ""garmin-chipotle-h30"";",1 how many date with score being w 113–87,"CREATE TABLE table_13480122_5 (date VARCHAR, score VARCHAR);","SELECT COUNT(date) FROM table_13480122_5 WHERE score = ""W 113–87"";","SELECT COUNT(date) FROM table_13480122_5 WHERE score = ""W 113–87"";",1 When george hill (29) has the highest amount of points what is the date?,"CREATE TABLE table_22883210_11 (date VARCHAR, high_points VARCHAR);","SELECT date FROM table_22883210_11 WHERE high_points = ""George Hill (29)"";","SELECT date FROM table_22883210_11 WHERE high_points = ""George Hill (29)"";",1 What episode did tomoyuki furumaya,"CREATE TABLE table_29039942_1 (title VARCHAR, director VARCHAR);","SELECT title FROM table_29039942_1 WHERE director = ""Tomoyuki Furumaya"";","SELECT title FROM table_29039942_1 WHERE director = ""Tomoyuki Furumaya"";",1 "What is the average quantity of garments sold made from organic cotton, excluding outliers with more than 200 units sold?","CREATE TABLE materials (id INT PRIMARY KEY, type VARCHAR(255), organic BOOLEAN); CREATE TABLE garments (id INT PRIMARY KEY, material_id INT, FOREIGN KEY (material_id) REFERENCES materials(id)); CREATE TABLE sales (id INT PRIMARY KEY, garment_id INT, date DATE, quantity INT, price DECIMAL(5,2));",SELECT AVG(sales.quantity) as avg_quantity_sold FROM sales INNER JOIN garments ON sales.garment_id = garments.id INNER JOIN materials ON garments.material_id = materials.id WHERE materials.organic = TRUE HAVING COUNT(DISTINCT sales.id) > 50 AND sales.quantity < 200;,SELECT AVG(quantity) FROM sales JOIN garments ON sales.garment_id = garments.id JOIN materials ON garments.material_id = materials.id WHERE materials.organic = true AND sales.quantity > 200 AND sales.quantity 200;,0 Which location includes Coast Mountains with a rank less than 18 at Skihist Mountain?,"CREATE TABLE table_name_41 (location VARCHAR, mountain_peak VARCHAR, mountain_range VARCHAR, rank VARCHAR);","SELECT location FROM table_name_41 WHERE mountain_range = ""coast mountains"" AND rank < 18 AND mountain_peak = ""skihist mountain"";","SELECT location FROM table_name_41 WHERE mountain_range = ""coast mountains"" AND rank 18 AND mountain_peak = ""skihist mountain"";",0 How much is the purse worth (¥) after 2012?,"CREATE TABLE table_name_42 (purse__ INTEGER, year INTEGER);",SELECT SUM(purse__) AS ¥_ FROM table_name_42 WHERE year > 2012;,SELECT SUM(purse__) FROM table_name_42 WHERE year > 2012;,0 Which public defenders have represented the most clients in indigenous communities?,"CREATE TABLE public_defenders (defender_id INT, defender_name VARCHAR(50), defender_state VARCHAR(2), court_type_id INT); CREATE TABLE court_types (court_type_id INT, court_type_name VARCHAR(20), community_type VARCHAR(20)); CREATE TABLE defendant_data (defendant_id INT, defendant_state VARCHAR(2), defender_id INT); ","SELECT pd.defender_name, COUNT(dd.defendant_id) FROM public_defenders pd INNER JOIN defendant_data dd ON pd.defender_id = dd.defender_id INNER JOIN court_types ct ON pd.court_type_id = ct.court_type_id WHERE ct.community_type = 'Indigenous' GROUP BY pd.defender_name ORDER BY COUNT(dd.defendant_id) DESC;","SELECT p.defender_name, COUNT(dd.defendant_id) as num_clients FROM public_defenders p JOIN court_types ct ON p.court_type_id = ct.court_type_id JOIN defendant_data dd ON ct.court_type_id = dd.defender_id WHERE ct.community_type = 'Indigenous' GROUP BY p.defender_name ORDER BY num_clients DESC LIMIT 1;",0 "Show codes and fates of missions, and names of ships involved.","CREATE TABLE mission (Code VARCHAR, Fate VARCHAR, Ship_ID VARCHAR); CREATE TABLE ship (Name VARCHAR, Ship_ID VARCHAR);","SELECT T1.Code, T1.Fate, T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID;","SELECT T1.Code, T1.Fate, T1.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID;",0 What is the percentage of cruelty-free products in the cosmetics database?,"CREATE TABLE products (product_id INT, name VARCHAR(255), cruelty_free BOOLEAN); ",SELECT (COUNT(*) FILTER (WHERE cruelty_free = true)) * 100.0 / COUNT(*) FROM products;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM products WHERE cruelty_free = true)) AS percentage FROM products WHERE cruelty_free = true;,0 What is the total energy generated by wind farms in Germany and France?,"CREATE TABLE wind_farms (id INT, country VARCHAR(255), energy_generated FLOAT); ","SELECT SUM(energy_generated) FROM wind_farms WHERE country IN ('Germany', 'France');","SELECT SUM(energy_generated) FROM wind_farms WHERE country IN ('Germany', 'France');",1 "Find the difference in energy efficiency scores between consecutive months for each city in the ""MonthlyCityEnergyEfficiency"" table.","CREATE TABLE MonthlyCityEnergyEfficiency (City VARCHAR(50), Month INT, EnergyEfficiencyScore FLOAT);","SELECT City, EnergyEfficiencyScore, LAG(EnergyEfficiencyScore) OVER (PARTITION BY City ORDER BY Month) AS PreviousEnergyEfficiencyScore, EnergyEfficiencyScore - LAG(EnergyEfficiencyScore) OVER (PARTITION BY City ORDER BY Month) AS Difference FROM MonthlyCityEnergyEfficiency;","SELECT City, Month, EnergyEfficiencyScore, EnergyEfficiencyScore - EnergyEfficiencyScore - EnergyEfficiencyScore - EnergyEfficiencyScore - EnergyEfficiencyScore - EnergyEfficiencyScore - EnergyEfficiencyScore - EnergyEfficiencyScore - EnergyEfficiencyScore - EnergyEfficiencyScore - EnergyEfficiencyScore - EnergyEfficiencyScore FROM MonthlyCityEnergyEfficiency GROUP BY City, Month;",0 What is the total watch time for educational videos in Africa in the last week?,"CREATE TABLE video_views (id INT, user_id INT, video_id INT, watch_time INT, video_type TEXT, view_date DATE); ","SELECT SUM(watch_time) FROM video_views WHERE video_type = 'educational' AND view_date >= DATEADD(week, -1, GETDATE()) AND country = 'Africa';","SELECT SUM(watch_time) FROM video_views WHERE video_type = 'Educational' AND view_date >= DATEADD(week, -1, GETDATE());",0 which Place has a Player of mark brooks?,"CREATE TABLE table_name_30 (place VARCHAR, player VARCHAR);","SELECT place FROM table_name_30 WHERE player = ""mark brooks"";","SELECT place FROM table_name_30 WHERE player = ""mark brooks"";",1 Find the student ID and middle name for all the students with at most two enrollments.,"CREATE TABLE Student_Course_Enrolment (student_id VARCHAR); CREATE TABLE Students (middle_name VARCHAR, student_id VARCHAR);","SELECT T1.student_id, T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) <= 2;","SELECT T1.student_id, T1.middle_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T2.student_id HAVING COUNT(*) >= 2;",0 "Which label had a CD format and a date of June 25, 2002?","CREATE TABLE table_name_38 (label VARCHAR, format VARCHAR, date VARCHAR);","SELECT label FROM table_name_38 WHERE format = ""cd"" AND date = ""june 25, 2002"";","SELECT label FROM table_name_38 WHERE format = ""cd"" AND date = ""june 25, 2002"";",1 Who is the home team with tie number 9?,"CREATE TABLE table_name_93 (home_team VARCHAR, tie_no VARCHAR);","SELECT home_team FROM table_name_93 WHERE tie_no = ""9"";",SELECT home_team FROM table_name_93 WHERE tie_no = 9;,0 "Find the name, type, and flag of the ship that is built in the most recent year.","CREATE TABLE ship (name VARCHAR, TYPE VARCHAR, flag VARCHAR, built_year VARCHAR);","SELECT name, TYPE, flag FROM ship ORDER BY built_year DESC LIMIT 1;","SELECT name, TYPE, flag FROM ship WHERE built_year = (SELECT MAX(built_year) FROM ship);",0 What is the average time taken for each tram line in Berlin to complete a route?,"CREATE TABLE trams (route_id INT, time INT, line VARCHAR(10)); CREATE TABLE routes (route_id INT, line VARCHAR(10));","SELECT r.line, AVG(t.time) FROM trams t JOIN routes r ON t.route_id = r.route_id GROUP BY r.line;","SELECT r.line, AVG(t.time) as avg_time FROM trams t JOIN routes r ON t.route_id = r.route_id GROUP BY r.line;",0 How many vegan dishes are offered by each vendor?,"CREATE TABLE Vendors (VendorID INT, VendorName TEXT); CREATE TABLE MenuItems (MenuItemID INT, MenuItemName TEXT, Vegan BOOLEAN, VendorID INT);","SELECT VendorName, COUNT(*) as VeganDishes FROM Vendors JOIN MenuItems ON Vendors.VendorID = MenuItems.VendorID WHERE Vegan = TRUE GROUP BY VendorName;","SELECT Vendors.VendorName, COUNT(MenuItems.MenuItemID) FROM Vendors INNER JOIN MenuItems ON Vendors.VendorID = MenuItems.VendorID WHERE MenuItems.Vegan = true GROUP BY Vendors.VendorName;",0 Show the number of drilling rigs added or removed in the North Sea in 2021,"CREATE TABLE if not exists rig_movement (rig_id INT, rig_name TEXT, location TEXT, movement_year INT, movement_type TEXT); ","SELECT location, SUM(CASE WHEN movement_type = 'added' THEN 1 WHEN movement_type = 'removed' THEN -1 ELSE 0 END) AS net_movement FROM rig_movement WHERE location = 'North Sea' AND movement_year = 2021 GROUP BY location;",SELECT COUNT(*) FROM rig_movement WHERE location = 'North Sea' AND movement_year = 2021;,0 What is the score when away team is Crystal Palace?,"CREATE TABLE table_name_8 (score VARCHAR, away_team VARCHAR);","SELECT score FROM table_name_8 WHERE away_team = ""crystal palace"";","SELECT score FROM table_name_8 WHERE away_team = ""crystal palace"";",1 What is the maximum number of working hours per week for fair trade certified manufacturers in Europe?,"CREATE TABLE fair_trade_manufacturers (id INT, country VARCHAR(255), working_hours INT); ","SELECT MAX(working_hours) FROM fair_trade_manufacturers WHERE country IN ('France', 'Spain', 'Sweden');","SELECT MAX(working_hours) FROM fair_trade_manufacturers WHERE country IN ('Germany', 'France');",0 "What is the average attendance for cultural events by month and city, pivoted to display the month and city in separate columns?","CREATE TABLE cultural_events (id INT, city VARCHAR(50), event VARCHAR(50), month VARCHAR(50), attendance INT); ","SELECT city, SUM(CASE month WHEN 'January' THEN attendance ELSE 0 END) as January, SUM(CASE month WHEN 'February' THEN attendance ELSE 0 END) as February, SUM(CASE month WHEN 'March' THEN attendance ELSE 0 END) as March FROM cultural_events GROUP BY city;","SELECT month, city, AVG(attendance) as avg_attendance FROM cultural_events GROUP BY month, city;",0 Get the total area of the ocean floor mapped in the Arctic and Indian oceans,"CREATE TABLE ocean_floor_mapping (mapping_id INT, region VARCHAR(255), area INT); CREATE VIEW arctic_indian_mapping AS SELECT * FROM ocean_floor_mapping WHERE region IN ('Arctic ocean', 'Indian ocean');","SELECT region, SUM(area) FROM arctic_indian_mapping GROUP BY region;","SELECT SUM(area) FROM ocean_floor_mapping WHERE region IN ('Arctic ocean', 'Indian ocean');",0 "What is the total number of crime incidents, emergency calls, and fire incidents in the last week?","CREATE TABLE crime_incidents (id INT, date DATE, type VARCHAR(20)); CREATE TABLE emergency_calls (id INT, date DATE, type VARCHAR(20)); CREATE TABLE fire_incidents (id INT, date DATE, type VARCHAR(20)); ","SELECT 'crime incidents' AS type, COUNT(*) FROM crime_incidents WHERE date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) UNION ALL SELECT 'emergency calls' AS type, COUNT(*) FROM emergency_calls WHERE date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) UNION ALL SELECT 'fire incidents' AS type, COUNT(*) FROM fire_incidents WHERE date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK);","SELECT COUNT(*) FROM crime_incidents JOIN emergency_calls ON crime_incidents.date = emergency_calls.date JOIN fire_incidents ON emergency_calls.type = fire_incidents.type WHERE date >= DATEADD(week, -1, GETDATE());",0 What was the average economic diversification score for African countries in Q3 2021?,"CREATE TABLE EconomicDiversification (id INT, country VARCHAR(20), quarter INT, score FLOAT); ","SELECT AVG(score) FROM EconomicDiversification WHERE country IN ('Nigeria', 'Kenya', 'Egypt', 'South Africa', 'Morocco') AND quarter = 3;","SELECT AVG(score) FROM EconomicDiversification WHERE country IN ('Nigeria', 'Egypt', 'South Africa') AND quarter = 3;",0 What is the set 5 for the game with a set 2 of 21-25 and a set 1 of 41633?,"CREATE TABLE table_name_62 (set_5 VARCHAR, set_2 VARCHAR, set_1 VARCHAR);","SELECT set_5 FROM table_name_62 WHERE set_2 = ""21-25"" AND set_1 = ""41633"";","SELECT set_5 FROM table_name_62 WHERE set_2 = ""21-25"" AND set_1 = ""41633"";",1 "What is Notes, when App(L/C/E) is 13 (7/2/4)?","CREATE TABLE table_name_89 (notes VARCHAR, app_l_c_e_ VARCHAR);","SELECT notes FROM table_name_89 WHERE app_l_c_e_ = ""13 (7/2/4)"";","SELECT notes FROM table_name_89 WHERE app_l_c_e_ = ""13 (7/2/4)"";",1 Tell me the 2012 when 2005 is 314,CREATE TABLE table_name_82 (Id VARCHAR);,"SELECT 2012 FROM table_name_82 WHERE 2005 = ""314"";",SELECT 2012 FROM table_name_82 WHERE 2005 = 314;,0 "What is the catalog of the record released on May 27, 2009?","CREATE TABLE table_name_94 (catalog VARCHAR, date VARCHAR);","SELECT catalog FROM table_name_94 WHERE date = ""may 27, 2009"";","SELECT catalog FROM table_name_94 WHERE date = ""may 27, 2009"";",1 How many employees were hired each year?,"CREATE TABLE Employees (EmployeeID INT, HireDate DATE); ","SELECT YEAR(HireDate) as HireYear, COUNT(*) as NumHired FROM Employees GROUP BY HireYear ORDER BY HireYear;","SELECT HireDate, COUNT(*) FROM Employees GROUP BY HireDate;",0 What is the transmission when the production was 2002-2005?,"CREATE TABLE table_name_29 (transmission VARCHAR, production VARCHAR);","SELECT transmission FROM table_name_29 WHERE production = ""2002-2005"";","SELECT transmission FROM table_name_29 WHERE production = ""2002-2005"";",1 Add a new spacecraft to the Spacecrafts table.,"CREATE TABLE Spacecrafts (Sid INT, Name VARCHAR, Manufacturer VARCHAR, Launch_Date DATE, Status VARCHAR);","WITH new_spacecraft AS (VALUES (1, 'New Horizons 2', 'NASA', '2025-01-01', 'Active')) INSERT INTO Spacecrafts (Sid, Name, Manufacturer, Launch_Date, Status) SELECT * FROM new_spacecraft;","INSERT INTO Spacecrafts (Sid, Name, Manufacturer, Launch_Date, Status) VALUES (1, 'Spacecraft X', '2020-01-01', 'Future');",0 "Add a column ""last_maintenance"" to the ""vehicles"" table.",ALTER TABLE vehicles ADD COLUMN last_maintenance DATE;,ALTER TABLE vehicles ADD COLUMN last_maintenance DATE;,ALTER TABLE vehicles ADD COLUMN last_maintenance DATE;,1 How high was the amount of winnings (in $) in the year with 15 starts?,"CREATE TABLE table_2182562_2 (winnings VARCHAR, starts VARCHAR);",SELECT winnings FROM table_2182562_2 WHERE starts = 15;,SELECT winnings FROM table_2182562_2 WHERE starts = 15;,1 Add a view that shows the total revenue by team and country,"CREATE TABLE ticket_sales (ticket_id INT, team_id INT, country VARCHAR(50), price DECIMAL(5,2)); CREATE TABLE sports_teams (team_id INT, team_name VARCHAR(50)); ","CREATE VIEW total_revenue_by_team_country AS SELECT s.team_name, t.country, SUM(t.price) FROM ticket_sales t INNER JOIN sports_teams s ON t.team_id = s.team_id GROUP BY s.team_name, t.country;","INSERT INTO ticket_sales (ticket_id, team_id, country, price) VALUES (4, 'USA', 'France', 'UK'); INSERT INTO sports_teams (team_id, team_name) VALUES (4, 'USA', 'Canada');",0 What is the name of the team that has 13 points?,"CREATE TABLE table_name_47 (team VARCHAR, points VARCHAR);",SELECT team FROM table_name_47 WHERE points = 13;,SELECT team FROM table_name_47 WHERE points = 13;,1 "What is the game number when the Toronto Maple Leafs were the opponent, and the February was less than 17?","CREATE TABLE table_name_49 (game INTEGER, opponent VARCHAR, february VARCHAR);","SELECT AVG(game) FROM table_name_49 WHERE opponent = ""toronto maple leafs"" AND february < 17;","SELECT SUM(game) FROM table_name_49 WHERE opponent = ""toronto maple leafs"" AND february 17;",0 How many 4wi were recorded by the player with an economy of 4.17?,CREATE TABLE table_27922491_20 (economy VARCHAR);,"SELECT 4 AS wi FROM table_27922491_20 WHERE economy = ""4.17"";","SELECT COUNT(4WI) FROM table_27922491_20 WHERE economy = ""4.17"";",0 Update the 'workforce' table and set the 'safety_training_hours' to 24 for all workers in the 'electronics' department,"CREATE TABLE workforce (id INT, name VARCHAR(255), department VARCHAR(255), safety_training_hours INT);",UPDATE workforce SET safety_training_hours = 24 WHERE department = 'electronics';,UPDATE workforce SET safety_training_hours = 24 WHERE department = 'electronics';,1 What are the top 3 most common artifact types found in France and Germany?,"CREATE TABLE ArtifactsByCountry (Country TEXT, ArtifactType TEXT, Quantity INT); ","SELECT Country, ArtifactType, Quantity FROM ArtifactsByCountry WHERE Country IN ('France', 'Germany') GROUP BY ArtifactType ORDER BY SUM(Quantity) DESC LIMIT 3;","SELECT ArtifactType, COUNT(*) as Count FROM ArtifactsByCountry WHERE Country IN ('France', 'Germany') GROUP BY ArtifactType ORDER BY Count DESC LIMIT 3;",0 "What is the total number of wells that were drilled in the North Atlantic Ocean before 2015, and what is the total amount of oil they produced?","CREATE TABLE north_atlantic_ocean (id INT, well_name VARCHAR(255), drill_date DATE, production_oil INT);","SELECT COUNT(*) as total_wells, SUM(production_oil) as total_oil_produced FROM north_atlantic_ocean WHERE drill_date < '2015-01-01';","SELECT COUNT(*), SUM(production_oil) FROM north_atlantic_ocean WHERE drill_date '2015-01-01';",0 What is the average length of news articles published in each quarter of 2021?,"CREATE TABLE articles (id INT, title VARCHAR(100), publication_date DATE, word_count INT);","SELECT EXTRACT(QUARTER FROM publication_date) AS quarter, AVG(word_count) AS avg_word_count FROM articles WHERE EXTRACT(YEAR FROM publication_date) = 2021 GROUP BY quarter;","SELECT DATE_FORMAT(publication_date, '%Y-%m') as quarter, AVG(word_count) as avg_word_count FROM articles WHERE publication_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY quarter;",0 What is the average price of sustainable fashion products in each country?,"CREATE TABLE sales (id INT, product_type VARCHAR(20), price DECIMAL, country VARCHAR(20)); ","SELECT country, AVG(price) FROM sales WHERE product_type = 'sustainable' GROUP BY country;","SELECT country, AVG(price) FROM sales WHERE product_type ='sustainable fashion' GROUP BY country;",0 Insert a new record into the 'Craft Workshops' table for the participant 'Lila' who attended the 'Pottery' event.,"CREATE TABLE craft_workshops (workshop_id INT, participant_name VARCHAR(50), event_type VARCHAR(50)); ","INSERT INTO craft_workshops (workshop_id, participant_name, event_type) VALUES (4, 'Lila', 'Pottery');","INSERT INTO craft_workshops (workshop_id, participant_name, event_type) VALUES (1, 'Lila', 'Pottery');",0 How many fourth places were there in 2003?,"CREATE TABLE table_1149495_1 (fourth_place VARCHAR, year VARCHAR);","SELECT COUNT(fourth_place) FROM table_1149495_1 WHERE year = ""2003"";",SELECT COUNT(fourth_place) FROM table_1149495_1 WHERE year = 2003;,0 How many members have a heart rate over 100 while doing Yoga?,"CREATE TABLE workouts (id INT, member_id INT, workout_type VARCHAR(50), heart_rate INT); CREATE TABLE members (id INT, name VARCHAR(50), age INT); ",SELECT COUNT(*) FROM workouts JOIN members ON workouts.member_id = members.id WHERE workout_type = 'Yoga' AND heart_rate > 100;,SELECT COUNT(*) FROM workouts w JOIN members m ON w.member_id = m.id WHERE w.workout_type = 'Yoga' AND w.heart_rate > 100;,0 Calculate the average number of construction labor hours per week in Texas,"CREATE TABLE labor_hours (worker_id INT, state VARCHAR(20), hours_per_week DECIMAL(5,2)); ",SELECT AVG(hours_per_week) FROM labor_hours WHERE state = 'TX';,SELECT AVG(hours_per_week) FROM labor_hours WHERE state = 'Texas';,0 "What is the total quantity of garments sold, grouped by size, for those sizes that have more than 1000 units sold?","CREATE TABLE garments (id INT PRIMARY KEY, size VARCHAR(255)); CREATE TABLE sales (id INT PRIMARY KEY, garment_id INT, date DATE, quantity INT, price DECIMAL(5,2)); ALTER TABLE sales ADD FOREIGN KEY (garment_id) REFERENCES garments(id);","SELECT garments.size, SUM(sales.quantity) as total_quantity_sold FROM garments INNER JOIN sales ON garments.id = sales.garment_id GROUP BY garments.size HAVING SUM(sales.quantity) > 1000;","SELECT g.size, SUM(s.quantity) as total_quantity FROM garments g INNER JOIN sales s ON g.id = s.garment_id INNER JOIN sales s ON g.id = s.garment_id WHERE s.quantity > 1000 GROUP BY g.size;",0 What is the waste generation trend in the city of Sydney between 2015 and 2020?,"CREATE TABLE waste_trends (city varchar(255), year int, generation int); ","SELECT year, generation FROM waste_trends WHERE city = 'Sydney' AND year BETWEEN 2015 AND 2020;",SELECT generation FROM waste_trends WHERE city = 'Sydney' AND year BETWEEN 2015 AND 2020;,0 What is the maximum price of vegan products sold by suppliers in the UK?,"CREATE TABLE Suppliers (SupplierID INT, SupplierName TEXT, Country TEXT);CREATE TABLE Products (ProductID INT, ProductName TEXT, Price DECIMAL, Vegan BOOLEAN, SupplierID INT); ",SELECT MAX(Price) FROM Products JOIN Suppliers ON Products.SupplierID = Suppliers.SupplierID WHERE Vegan = true AND Country = 'UK';,SELECT MAX(Price) FROM Products p JOIN Suppliers s ON p.SupplierID = s.SupplierID WHERE s.Country = 'UK' AND p.Vegan = true;,0 Who is the home team when melbourne is the away team?,"CREATE TABLE table_name_47 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team AS score FROM table_name_47 WHERE away_team = ""melbourne"";","SELECT home_team FROM table_name_47 WHERE away_team = ""melbourne"";",0 Compute the 5-day moving average of humidity for 'Field_9' from the 'humidity_data' table.,"CREATE TABLE humidity_data (field VARCHAR(255), humidity FLOAT, timestamp TIMESTAMP);","SELECT field, AVG(humidity) OVER (PARTITION BY field ORDER BY timestamp RANGE BETWEEN INTERVAL '5 day' PRECEDING AND CURRENT ROW) as moving_avg FROM humidity_data WHERE field = 'Field_9';",SELECT AVG(humidity) FROM humidity_data WHERE field = 'Field_9' AND timestamp >= NOW() - INTERVAL 5 DAY;,0 Which libraries had the most and least visitors in the last month?,"CREATE TABLE Visitors (Library text, Visitors int, VisitDate date); ","SELECT Library, Visitors FROM (SELECT Library, Visitors, ROW_NUMBER() OVER (ORDER BY Visitors) as Rank FROM Visitors WHERE VisitDate >= DATEADD(month, -1, CURRENT_DATE)) as Subquery WHERE Rank IN (1, (SELECT COUNT(*) FROM Visitors WHERE VisitDate >= DATEADD(month, -1, CURRENT_DATE)) * 0.01);","SELECT Library, MAX(Visitors) as MaxVisitors, MIN(Visitors) as MinVisitors FROM Visitors WHERE VisitDate >= DATEADD(month, -1, GETDATE()) GROUP BY Library;",0 What is the round of pick 63?,"CREATE TABLE table_name_36 (round VARCHAR, pick VARCHAR);",SELECT round FROM table_name_36 WHERE pick = 63;,SELECT round FROM table_name_36 WHERE pick = 63;,1 "What is the Outcome of the match with a Score of 6–1, 6–1?","CREATE TABLE table_name_22 (outcome VARCHAR, score VARCHAR);","SELECT outcome FROM table_name_22 WHERE score = ""6–1, 6–1"";","SELECT outcome FROM table_name_22 WHERE score = ""6–1, 6–1"";",1 What is the percentage of successful login attempts for the 'admin' user?,"CREATE TABLE login_attempts (user_id INT, success BOOLEAN, timestamp TIMESTAMP); ",SELECT (SUM(success) * 100.0 / COUNT(*)) as percentage_successful_login_attempts FROM login_attempts WHERE user_id = 1;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM login_attempts)) FROM login_attempts WHERE user_id = (SELECT user_id FROM login_attempts WHERE user_id = (SELECT user_id FROM login_attempts WHERE user_id = (SELECT user_id FROM login_attempts WHERE user_id = (SELECT user_id FROM login_attempts WHERE success = TRUE) FROM login_attempts WHERE user_id = (SELECT user_id FROM login_attempts WHERE user_id = (SELECT user_id FROM login_attempts WHERE login_attempts WHERE login_attempts WHERE login_attempts WHERE login_attempts WHERE login_attempts WHERE login_attempts WHERE login_attempts WHERE login_attempts WHERE login_attempts WHERE login_attempts WHERE login_attempts WHERE login_attempts WHERE login_attempts WHERE login_attempts WHERE login_attempts WHERE login_attempts = TRUE);,0 What is the average delivery time for shipments from Asia to Africa?,"CREATE TABLE shipments (id INT, origin_continent VARCHAR(255), destination_continent VARCHAR(255), delivery_time INT); ",SELECT AVG(delivery_time) FROM shipments WHERE origin_continent = 'Asia' AND destination_continent = 'Africa';,SELECT AVG(delivery_time) FROM shipments WHERE origin_continent = 'Asia' AND destination_continent = 'Africa';,1 Name the location on 2006-04-07 for direct fire,"CREATE TABLE table_name_9 (location VARCHAR, date VARCHAR, circumstances VARCHAR);","SELECT location FROM table_name_9 WHERE date = ""2006-04-07"" AND circumstances = ""direct fire"";","SELECT location FROM table_name_9 WHERE date = ""2006-04-07"" AND circumstances = ""direct fire"";",1 who was the semifinalist for the Key Biscane tournament?,"CREATE TABLE table_name_12 (semifinalists VARCHAR, tournament VARCHAR);","SELECT semifinalists FROM table_name_12 WHERE tournament = ""key biscane"";","SELECT semifinalists FROM table_name_12 WHERE tournament = ""key biscane"";",1 Show the artists with the most songs released in the latin genre.,"CREATE TABLE song_releases (song_id INT, artist_name VARCHAR(50), genre VARCHAR(20));","SELECT artist_name, COUNT(*) as num_songs FROM song_releases WHERE genre = 'latin' GROUP BY artist_name ORDER BY num_songs DESC LIMIT 1;","SELECT artist_name, COUNT(*) as song_count FROM song_releases WHERE genre = 'Latin' GROUP BY artist_name ORDER BY song_count DESC LIMIT 1;",0 Update the cost of spacecraft with id 3 to 32000000 if it was manufactured in Europe.,"CREATE TABLE SpacecraftManufacturing(id INT, country VARCHAR(50), cost FLOAT); ",UPDATE SpacecraftManufacturing SET cost = 32000000 WHERE id = 3 AND country = 'France';,UPDATE SpacecraftManufacturing SET cost = 32000000 WHERE id = 3 AND country = 'Europe';,0 Find the average price of garments in each category in the garments table,"CREATE TABLE garments (id INT, name VARCHAR(100), price DECIMAL(5,2), category VARCHAR(50));","SELECT category, AVG(price) as avg_price FROM garments GROUP BY category;","SELECT category, AVG(price) as avg_price FROM garments GROUP BY category;",1 Who is the spokesperson after 2012?,"CREATE TABLE table_name_33 (spokesperson VARCHAR, year_s_ INTEGER);",SELECT spokesperson FROM table_name_33 WHERE year_s_ > 2012;,SELECT spokesperson FROM table_name_33 WHERE year_s_ > 2012;,1 Who are the top 5 impact investors in terms of the number of investments made in the climate change sector?,"CREATE TABLE investors (investor_id INT, investor_name TEXT, country TEXT); CREATE TABLE investments (investment_id INT, investor_id INT, sector TEXT); ","SELECT i.investor_name, COUNT(i.investment_id) as total_investments FROM investors i JOIN investments j ON i.investor_id = j.investor_id WHERE j.sector = 'Climate Change' GROUP BY i.investor_id ORDER BY total_investments DESC LIMIT 5;","SELECT investors.investor_name, COUNT(investments.investment_id) as investment_count FROM investors INNER JOIN investments ON investors.investor_id = investments.investor_id WHERE investments.sector = 'Climate Change' GROUP BY investors.investor_name ORDER BY investment_count DESC LIMIT 5;",0 What is the total quantity of locally sourced ingredients used in the past month?,"CREATE TABLE inventory (ingredient_id INT, ingredient_name VARCHAR(255), quantity INT, source VARCHAR(255), last_update DATE); ","SELECT SUM(quantity) FROM inventory WHERE source = 'Local Farm' AND last_update >= DATEADD(month, -1, GETDATE());","SELECT SUM(quantity) FROM inventory WHERE source = 'local' AND last_update >= DATEADD(month, -1, GETDATE());",0 Which Weekly Rank for a Live Final Show has an Official Ratings (millions) greater than 5.2?,"CREATE TABLE table_name_8 (weekly_rank VARCHAR, official_ratings__millions_ VARCHAR, show VARCHAR);","SELECT weekly_rank FROM table_name_8 WHERE official_ratings__millions_ > 5.2 AND show = ""live final"";","SELECT weekly_rank FROM table_name_8 WHERE official_ratings__millions_ > 5.2 AND show = ""live final"";",1 What date has a Game site of bye?,"CREATE TABLE table_name_77 (date VARCHAR, game_site VARCHAR);","SELECT date FROM table_name_77 WHERE game_site = ""bye"";","SELECT date FROM table_name_77 WHERE game_site = ""bye"";",1 What is the total biomass of fish in marine cages in Greece?,"CREATE TABLE fish_biomass (id INT, farm_id INT, species TEXT, biomass INT, country TEXT, water_type TEXT); ",SELECT SUM(biomass) FROM fish_biomass WHERE country = 'Greece' AND water_type = 'Marine';,SELECT SUM(biomass) FROM fish_biomass WHERE country = 'Greece' AND water_type ='marine cage';,0 What is the average project timeline for green buildings in each state?,"CREATE TABLE project_timeline_green_data (state VARCHAR(255), building_type VARCHAR(255), timeline INT); ","SELECT state, AVG(timeline) FROM project_timeline_green_data WHERE building_type = 'Green' GROUP BY state;","SELECT state, AVG(timeline) FROM project_timeline_green_data WHERE building_type = 'Green' GROUP BY state;",1 What is the current quantity of 'Medicine X' at the 'Rural Clinic'?,"CREATE TABLE resources (id INT PRIMARY KEY, name TEXT, quantity INT, city TEXT, state TEXT); ",SELECT quantity FROM resources WHERE name = 'Medicine X' AND city = 'Rural Clinic';,SELECT quantity FROM resources WHERE name = 'Medicine X' AND city = 'Rural Clinic';,1 Which race resulted in 2nd place in the 1996 season on 20-Jan-1996?,"CREATE TABLE table_name_80 (race VARCHAR, date VARCHAR, place VARCHAR, season VARCHAR);","SELECT race FROM table_name_80 WHERE place = ""2nd"" AND season = 1996 AND date = ""20-jan-1996"";","SELECT race FROM table_name_80 WHERE place = ""2nd"" AND season = ""1996"" AND date = ""20-jan-1996"";",0 "What is the total data usage for postpaid and prepaid customers, sorted by data usage in descending order?","CREATE TABLE mobile_customers (customer_id INT, plan_type VARCHAR(10), data_usage FLOAT, region VARCHAR(20)); CREATE TABLE plan_types (plan_type VARCHAR(10)); ","SELECT pt.plan_type, SUM(mc.data_usage) AS total_data_usage FROM mobile_customers mc JOIN plan_types pt ON mc.plan_type = pt.plan_type GROUP BY pt.plan_type ORDER BY total_data_usage DESC;","SELECT plan_type, SUM(data_usage) as total_data_usage FROM mobile_customers JOIN plan_types ON mobile_customers.plan_type = plan_types.plan_type GROUP BY plan_type ORDER BY total_data_usage DESC;",0 "What is the total number of construction projects in the state of New York for the year 2019, including both sustainable and non-sustainable projects?","CREATE TABLE project_timeline (state TEXT, city TEXT, sustainable INTEGER, timeline INTEGER);",SELECT COUNT(*) FROM project_timeline WHERE state = 'New York' AND year = 2019;,SELECT COUNT(*) FROM project_timeline WHERE state = 'New York' AND city = 'New York' AND sustainable = 'non-sustainable' AND timeline = 2019;,0 Delete all organizations based in 'Africa' from the 'rural_development' database's 'organizations' table,"CREATE TABLE organizations (organization_id INT PRIMARY KEY, organization_name VARCHAR(100), continent VARCHAR(50), country VARCHAR(50), year_founded INT);",DELETE FROM organizations WHERE continent = 'Africa';,DELETE FROM organizations WHERE continent = 'Africa';,1 "Which Week has an Attendance larger than 63,369?","CREATE TABLE table_name_90 (week INTEGER, attendance INTEGER);",SELECT MIN(week) FROM table_name_90 WHERE attendance > 63 OFFSET 369;,SELECT AVG(week) FROM table_name_90 WHERE attendance > 63 OFFSET 369;,0 What is the total rank of the athlete with a total larger than 19.42 and a taijiquan less than 9.87?,"CREATE TABLE table_name_67 (rank VARCHAR, total VARCHAR, taijiquan VARCHAR);",SELECT COUNT(rank) FROM table_name_67 WHERE total > 19.42 AND taijiquan < 9.87;,SELECT COUNT(rank) FROM table_name_67 WHERE total > 19.42 AND taijiquan 9.87;,0 How many artists are in our database from Asia?,"CREATE TABLE Artists (ArtistID INT, Name VARCHAR(255), Nationality VARCHAR(255), Genre VARCHAR(255)); ",SELECT COUNT(*) FROM Artists WHERE Nationality = 'Asian';,SELECT COUNT(*) FROM Artists WHERE Nationality = 'Asia';,0 "What is the total installed capacity of wind energy projects in Tokyo, Japan?","CREATE TABLE wind_energy_projects (id INT, project_name VARCHAR(50), city VARCHAR(50), country VARCHAR(50), capacity FLOAT); ",SELECT SUM(capacity) FROM wind_energy_projects WHERE city = 'Tokyo' AND country = 'Japan';,SELECT SUM(capacity) FROM wind_energy_projects WHERE city = 'Tokyo' AND country = 'Japan';,1 What is the average package weight for each country?,"CREATE TABLE package_weights (package_id INT, country VARCHAR(20), weight DECIMAL(5,2)); ","SELECT country, AVG(weight) FROM package_weights GROUP BY country;","SELECT country, AVG(weight) FROM package_weights GROUP BY country;",1 how any were gained as the chan,"CREATE TABLE table_1397655_1 (year_acquired VARCHAR, station VARCHAR);","SELECT COUNT(year_acquired) FROM table_1397655_1 WHERE station = ""CHAN"";","SELECT year_acquired FROM table_1397655_1 WHERE station = ""Chan"";",0 how many countries had 21 points,"CREATE TABLE table_29302711_12 (country VARCHAR, points VARCHAR);",SELECT COUNT(country) FROM table_29302711_12 WHERE points = 21;,SELECT COUNT(country) FROM table_29302711_12 WHERE points = 21;,1 How many organic farms are in 'Africa' with a certification?,"CREATE TABLE organic_farms (id INT, country VARCHAR(50), region VARCHAR(50), no_farms INT, certified BOOLEAN); ",SELECT SUM(no_farms) FROM organic_farms WHERE region = 'Africa' AND certified = TRUE;,SELECT COUNT(*) FROM organic_farms WHERE region = 'Africa' AND certified = TRUE;,0 What is the total capacity of all vessels owned by the ACME Shipping Company?,"CREATE TABLE vessels (id INT, company VARCHAR(255), name VARCHAR(255), capacity INT); ",SELECT SUM(capacity) FROM vessels WHERE company = 'ACME Shipping';,SELECT SUM(capacity) FROM vessels WHERE company = 'ACME Shipping Company';,0 What is the theme of the Year 2002 which was created by Artist Dan Fell?,"CREATE TABLE table_name_86 (theme VARCHAR, year VARCHAR, artist VARCHAR);","SELECT theme FROM table_name_86 WHERE year = 2002 AND artist = ""dan fell"";","SELECT theme FROM table_name_86 WHERE year = 2002 AND artist = ""dan fleur"";",0 When hermann uhde is the count who is the conductor?,"CREATE TABLE table_29728787_1 (conductor VARCHAR, count VARCHAR);","SELECT conductor FROM table_29728787_1 WHERE count = ""Hermann Uhde"";","SELECT conductor FROM table_29728787_1 WHERE count = ""Hermann Uhde"";",1 Which teams are part of the eastern_conference in the ticket_sales table?,"CREATE TABLE ticket_sales (id INT, team VARCHAR(50), conference VARCHAR(50), tickets_sold INT, revenue FLOAT);",SELECT DISTINCT team FROM ticket_sales WHERE conference = 'eastern_conference';,SELECT team FROM ticket_sales WHERE conference = 'Eastern';,0 "Show the number of times each material is used in the entire dataset, ordered from most used to least used?","CREATE TABLE Materials (Material VARCHAR(50), Quantity INT);","SELECT Material, SUM(Quantity) as TotalQuantity FROM Materials GROUP BY Material ORDER BY TotalQuantity DESC;","SELECT Material, SUM(Quantity) as Total_Quantity FROM Materials GROUP BY Material ORDER BY Total_Quantity DESC;",0 List all Green building certifications and their corresponding certification authorities,"CREATE TABLE green_buildings ( id INT PRIMARY KEY, building_name VARCHAR(255), certification VARCHAR(255), certification_authority VARCHAR(255) ); ","SELECT certification, certification_authority FROM green_buildings;","SELECT certification, certification_authority FROM green_buildings;",1 Update the names of all users who have a name that matches a specified pattern.,"CREATE TABLE users (user_id INT, name VARCHAR(255));","UPDATE users SET name = REPLACE(name, 'Smith', 'Black') WHERE name LIKE '%Smith%';",UPDATE users SET name = name WHERE user_id IN (SELECT user_id FROM users WHERE name IN (SELECT user_id FROM users WHERE name IN (SELECT user_id FROM users WHERE name IN (SELECT user_id FROM users WHERE name IN (SELECT user_id FROM users WHERE name IN (SELECT user_id FROM users WHERE name IN (SELECT user_id FROM users));,0 What is the total number of employees from diverse backgrounds in the Mining Operations department?,"CREATE TABLE Employees (EmployeeID INT, Department VARCHAR(255), Diversity VARCHAR(50)); CREATE VIEW MiningDiverseEmployees AS SELECT * FROM Employees WHERE Department = 'Mining Operations';",SELECT COUNT(*) FROM MiningDiverseEmployees;,SELECT COUNT(*) FROM MiningDiverseEmployees WHERE Department = 'Mining Operations' AND Diversity = 'Diversity';,0 "What is the total number of military technologies and cybersecurity strategies, according to the military_technologies and cybersecurity_strategies tables?","CREATE TABLE military_technologies (id INT, name VARCHAR(100), branch VARCHAR(50), year_developed INT); CREATE TABLE cybersecurity_strategies (id INT, strategy VARCHAR(100), budget INT);",SELECT COUNT(*) FROM military_technologies UNION SELECT COUNT(*) FROM cybersecurity_strategies;,SELECT COUNT(*) FROM military_technologies INNER JOIN cybersecurity_strategies ON military_technologies.id = cybersecurity_strategies.id;,0 What is the average age of attendees for theater performances in the Midwest region?,"CREATE TABLE theater_performances (id INT, event_name VARCHAR(255), attendee_age INT); CREATE TABLE regions (id INT, region_name VARCHAR(255));",SELECT AVG(theater_performances.attendee_age) as avg_age FROM theater_performances INNER JOIN regions ON 1 = 1 WHERE regions.region_name = 'Midwest';,SELECT AVG(attendee_age) FROM theater_performances JOIN regions ON theater_performances.region_name = regions.region_name WHERE regions.region_name = 'Midwest';,0 What was the average price per gram for each cultivar in Washington in Q2 2022?,"CREATE TABLE Cultivars (id INT, name TEXT, type TEXT);CREATE TABLE Harvests (id INT, cultivar_id INT, quantity INT, gram_price DECIMAL(10,2), harvest_date DATE); ","SELECT c.name, AVG(h.gram_price) as avg_price_per_gram FROM Cultivars c JOIN Harvests h ON c.id = h.cultivar_id WHERE c.state = 'Washington' AND h.harvest_date BETWEEN '2022-04-01' AND '2022-06-30' GROUP BY c.name;","SELECT c.name, AVG(h.gram_price) as avg_price_per_gram FROM Cultivars c INNER JOIN Harvests h ON c.id = h.cultivar_id WHERE h.harvest_date BETWEEN '2022-04-01' AND '2022-06-30' GROUP BY c.name;",0 What is the name of the partner who played in the final against Lucas Arnold Ker Martín García?,"CREATE TABLE table_name_39 (partner VARCHAR, opponents_in_final VARCHAR);","SELECT partner FROM table_name_39 WHERE opponents_in_final = ""lucas arnold ker martín garcía"";","SELECT partner FROM table_name_39 WHERE opponents_in_final = ""lucas arnold ker martn garca"";",0 "Update the ""nursing_homes"" table to reflect the correct ""total_beds"" for the nursing home with id 2","CREATE TABLE nursing_homes (id INT PRIMARY KEY, name TEXT, state TEXT, total_beds INT); ",UPDATE nursing_homes SET total_beds = 160 WHERE id = 2;,UPDATE nursing_homes SET total_beds = (SELECT total_beds FROM nursing_homes WHERE id = 2);,0 Calculate the percentage of time each reactor was in operation during Q1 2021.,"CREATE TABLE ReactorOperation (ID INT, ReactorID INT, StartTime TIME, EndTime TIME); ","SELECT ReactorID, SUM(TIMESTAMPDIFF(HOUR, StartTime, EndTime)) / (SELECT SUM(TIMESTAMPDIFF(HOUR, StartTime, EndTime)) FROM ReactorOperation WHERE ReactorOperation.ReactorID = Reactors.ID AND ReactorOperation.StartTime >= '2021-01-01' AND ReactorOperation.StartTime < '2021-04-01') * 100 AS Percentage FROM Reactors WHERE ReactorID IN (SELECT ReactorID FROM ReactorOperation WHERE ReactorOperation.StartTime >= '2021-01-01' AND ReactorOperation.StartTime < '2021-04-01') GROUP BY ReactorID;","SELECT ReactorID, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM ReactorOperation WHERE StartTime BETWEEN '2021-01-01' AND '2021-06-30') as Percentage FROM ReactorOperation WHERE StartTime BETWEEN '2021-01-01' AND '2021-06-30' GROUP BY ReactorID;",0 How many species have been sighted more than 5 times in the Indian Ocean since 2015?,"CREATE TABLE Sightings ( id INT PRIMARY KEY, species VARCHAR(50), location VARCHAR(50), date DATE ); ",SELECT COUNT(*) FROM (SELECT species FROM Sightings WHERE location = 'Indian Ocean' AND date > '2015-01-01' GROUP BY species HAVING COUNT(*) > 5) AS subquery;,SELECT COUNT(*) FROM Sightings WHERE location = 'Indian Ocean' AND date >= '2015-01-01';,0 What is the maximum quantity of waste produced per day for each chemical?,"CREATE TABLE Waste (id INT, chemical_name VARCHAR(255), date DATE, quantity INT); ","SELECT chemical_name, MAX(quantity) as max_quantity FROM Waste GROUP BY chemical_name;","SELECT chemical_name, MAX(quantity) as max_quantity FROM Waste GROUP BY chemical_name;",1 "What is the moving average of the quantity of products sold, for each product, over the last 30 days?","CREATE TABLE sales_by_day (sale_date DATE, product_id INT, quantity INT); ","SELECT sale_date, product_id, AVG(quantity) OVER (PARTITION BY product_id ORDER BY sale_date ROWS BETWEEN 29 PRECEDING AND CURRENT ROW) as moving_avg FROM sales_by_day ORDER BY sale_date, product_id;","SELECT product_id, AVG(quantity) as moving_avg FROM sales_by_day WHERE sale_date >= DATEADD(day, -30, GETDATE()) GROUP BY product_id;",0 How many 3rd ru does Costa Rica have? ,CREATE TABLE table_17522854_6 (country VARCHAR);,"SELECT MAX(3 AS rd_ru) FROM table_17522854_6 WHERE country = ""Costa Rica"";","SELECT COUNT(3 AS rd_ru) FROM table_17522854_6 WHERE country = ""Costa Rica"";",0 Delete rural infrastructure projects that were completed before 2020 in the 'rural_infra_completion_dates' table.,"CREATE TABLE rural_infra_completion_dates (id INT, project_name VARCHAR(50), completion_date DATE); ",DELETE FROM rural_infra_completion_dates WHERE completion_date < '2020-01-01';,DELETE FROM rural_infra_completion_dates WHERE completion_date '2020-01-01';,0 Who lost on May 31?,"CREATE TABLE table_name_94 (loss VARCHAR, date VARCHAR);","SELECT loss FROM table_name_94 WHERE date = ""may 31"";","SELECT loss FROM table_name_94 WHERE date = ""may 31"";",1 What is the average number of passengers per train during rush hour on the Yellow Line?,"CREATE TABLE if not exists trains (train_id serial primary key,name varchar(255),line_id int);CREATE TABLE if not exists train_passengers (passenger_id serial primary key,train_id int,passengers int,time_of_day varchar(255));",SELECT AVG(passengers) FROM trains t JOIN train_passengers p ON t.train_id = p.train_id WHERE t.line_id = 2 AND time_of_day = 'rush hour';,SELECT AVG(passengers) FROM train_passengers WHERE time_of_day = 'rush hour' AND train_id IN (SELECT train_id FROM trains WHERE line_id = 1);,0 Delete records with a CO2 emission value lower than 100 in the 'emissions' table for the year 2005.,"CREATE TABLE emissions (country VARCHAR(255), year INT, co2_emission FLOAT); ",DELETE FROM emissions WHERE year = 2005 AND co2_emission < 100;,DELETE FROM emissions WHERE year = 2005 AND co2_emission 100;,0 What is the maximum production of Gadolinium and Terbium for each quarter in 2019?,"CREATE TABLE RareEarthsProduction (year INT, quarter INT, element TEXT, production INT); ","SELECT year, quarter, MAX(production) as max_production FROM RareEarthsProduction WHERE element IN ('Gadolinium', 'Terbium') GROUP BY year, quarter;","SELECT year, quarter, MAX(production) FROM RareEarthsProduction WHERE element IN ('Gadolinium', 'Terbium') GROUP BY year, quarter;",0 List the number of assists for the DF.,"CREATE TABLE table_28068645_8 (total INTEGER, position VARCHAR);","SELECT MAX(total) FROM table_28068645_8 WHERE position = ""DF"";","SELECT SUM(total) FROM table_28068645_8 WHERE position = ""DF"";",0 "How many golds for nations ranked below 4, over 5 medals, and under 6 silvers?","CREATE TABLE table_name_26 (gold VARCHAR, silver VARCHAR, rank VARCHAR, total VARCHAR);",SELECT COUNT(gold) FROM table_name_26 WHERE rank > 4 AND total > 5 AND silver < 6;,SELECT COUNT(gold) FROM table_name_26 WHERE rank 4 AND total 5 AND silver 6;,0 Name the most rank for uk and wins more than 5,"CREATE TABLE table_name_1 (rank INTEGER, country VARCHAR, wins__indoor_ VARCHAR);","SELECT MAX(rank) FROM table_name_1 WHERE country = ""uk"" AND wins__indoor_ > 5;","SELECT MAX(rank) FROM table_name_1 WHERE country = ""uk"" AND wins__indoor_ > 5;",1 How many years have an Opponent in the final of welby van horn?,"CREATE TABLE table_name_74 (year INTEGER, opponent_in_the_final VARCHAR);","SELECT SUM(year) FROM table_name_74 WHERE opponent_in_the_final = ""welby van horn"";","SELECT SUM(year) FROM table_name_74 WHERE opponent_in_the_final = ""welby van horn"";",1 What is the average age of all gymnasts?,"CREATE TABLE people (Age INTEGER, People_ID VARCHAR); CREATE TABLE gymnast (Gymnast_ID VARCHAR);",SELECT AVG(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID;,SELECT AVG(T1.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID;,0 Delete the 'Tie Dye' trend from the 'Trend' table,"CREATE TABLE Trend (id INT PRIMARY KEY, name VARCHAR(50), popularity_score INT);",DELETE FROM Trend WHERE name = 'Tie Dye';,DELETE FROM Trend WHERE name = 'Tie Dye';,1 "Which party has a first elected of 1966, qld as the state, and donald milner cameron as the member?","CREATE TABLE table_name_25 (party VARCHAR, member VARCHAR, first_elected VARCHAR, state VARCHAR);","SELECT party FROM table_name_25 WHERE first_elected = ""1966"" AND state = ""qld"" AND member = ""donald milner cameron"";","SELECT party FROM table_name_25 WHERE first_elected = 1966 AND state = ""qld"" AND member = ""donald milner cameron"";",0 Name the episode for viewers bigger than 5.63 and the households rating is 4.5/7,"CREATE TABLE table_name_62 (episode VARCHAR, viewers__m_ VARCHAR, households__rating_share_ VARCHAR);","SELECT episode FROM table_name_62 WHERE viewers__m_ > 5.63 AND households__rating_share_ = ""4.5/7"";","SELECT episode FROM table_name_62 WHERE viewers__m_ > 5.63 AND households__rating_share_ = ""4.5/7"";",1 What is the number of volunteers who have not made a donation?,"CREATE TABLE donor (id INT, name VARCHAR(50)); CREATE TABLE donation (id INT, donor_id INT, amount DECIMAL(10,2), donation_date DATE); CREATE TABLE volunteer (id INT, donor_id INT, volunteer_date DATE);",SELECT COUNT(DISTINCT v.id) as total_volunteers FROM volunteer v LEFT JOIN donation d ON v.donor_id = d.donor_id WHERE d.id IS NULL;,SELECT COUNT(DISTINCT volunteer.id) FROM volunteer INNER JOIN donation ON volunteer.donor_id = donation.donor_id INNER JOIN donor ON donation.donor_id = donor.id WHERE donation.donation_date IS NULL;,0 "What is the average data usage for postpaid customers in each region, sorted by usage in descending order?","CREATE TABLE mobile_customers (customer_id INT, plan_type VARCHAR(10), data_usage FLOAT, region VARCHAR(20)); CREATE TABLE regions (region VARCHAR(20)); CREATE TABLE plan_types (plan_type VARCHAR(10)); ","SELECT r.region, AVG(mc.data_usage) AS avg_data_usage FROM mobile_customers mc JOIN regions r ON mc.region = r.region JOIN plan_types pt ON mc.plan_type = pt.plan_type WHERE pt.plan_type = 'postpaid' GROUP BY r.region ORDER BY avg_data_usage DESC;","SELECT r.region, AVG(mc.data_usage) as avg_data_usage FROM mobile_customers mc JOIN regions r ON mc.region = r.region JOIN plan_types pt ON mc.plan_type = pt.plan_type GROUP BY r.region ORDER BY avg_data_usage DESC;",0 What is the total funding allocated for climate adaptation projects in Latin America and the Caribbean?,"CREATE TABLE climate_finance (year INT, region VARCHAR(50), funding_type VARCHAR(50), amount INT);",SELECT SUM(amount) FROM climate_finance WHERE region = 'Latin America' AND funding_type = 'climate adaptation';,"SELECT SUM(amount) FROM climate_finance WHERE region IN ('Latin America', 'Caribbean') AND funding_type = 'climate adaptation';",0 "What is the total amount of points for a position less than 7, 68 goals for, and less than 30 played?","CREATE TABLE table_name_59 (points VARCHAR, played VARCHAR, position VARCHAR, goals_for VARCHAR);",SELECT COUNT(points) FROM table_name_59 WHERE position < 7 AND goals_for = 68 AND played < 30;,SELECT COUNT(points) FROM table_name_59 WHERE position 7 AND goals_for = 68 AND played 30;,0 "Calculate the moving average of animal populations for each species over the last three records, if available.","CREATE TABLE animal_population (species VARCHAR(255), year INT, population INT); ","SELECT species, year, AVG(population) OVER (PARTITION BY species ORDER BY year ROWS BETWEEN 2 PRECEDING AND CURRENT ROW) AS moving_average FROM animal_population;","SELECT species, AVG(population) OVER (PARTITION BY species ORDER BY year) as moving_avg FROM animal_population WHERE year >= YEAR(CURRENT_DATE) GROUP BY species;",0 Name the ends lost for canada,"CREATE TABLE table_26745426_2 (Ends VARCHAR, country VARCHAR, Canada VARCHAR);",SELECT Ends AS lost FROM table_26745426_2 WHERE country = Canada;,"SELECT Ends FROM table_26745426_2 WHERE country = ""Canada"";",0 "What is the party of re-elected, incumbent Charles H. Grosvenor, who was first elected before 1894?","CREATE TABLE table_name_3 (party VARCHAR, incumbent VARCHAR, result VARCHAR, first_elected VARCHAR);","SELECT party FROM table_name_3 WHERE result = ""re-elected"" AND first_elected < 1894 AND incumbent = ""charles h. grosvenor"";","SELECT party FROM table_name_3 WHERE result = ""re-elected"" AND first_elected 1894 AND incumbent = ""charles h. grosvenor"";",0 How many users from India and Brazil interacted with political posts in the last month?,"CREATE TABLE posts (post_id INT, post_country VARCHAR(255), post_topic VARCHAR(255), post_date DATE); CREATE TABLE user_interactions (interaction_id INT, user_id INT, post_id INT, interaction_type VARCHAR(10)); ","SELECT SUM(interaction_type = 'like') + SUM(interaction_type = 'share') + SUM(interaction_type = 'comment') AS total_interactions FROM user_interactions WHERE post_id IN (SELECT post_id FROM posts WHERE post_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) AND CURRENT_DATE AND post_country IN ('India', 'Brazil') AND post_topic = 'politics');","SELECT COUNT(DISTINCT user_id) FROM user_interactions ui JOIN posts p ON ui.post_id = p.post_id WHERE p.post_country IN ('India', 'Brazil') AND p.post_date >= DATEADD(month, -1, GETDATE());",0 What is the average heart rate for each workout type in the West region?,"CREATE TABLE memberships (id INT, member_type VARCHAR(50), region VARCHAR(50)); CREATE TABLE workout_data (member_id INT, workout_type VARCHAR(50), duration INT, heart_rate_avg INT, calories_burned INT, workout_date DATE);","SELECT w.workout_type, AVG(w.heart_rate_avg) as avg_heart_rate FROM memberships m JOIN workout_data w ON m.id = w.member_id WHERE m.region = 'West' GROUP BY w.workout_type;","SELECT m.member_type, AVG(w.heart_rate_avg) as avg_heart_rate FROM memberships m JOIN workout_data w ON m.id = w.member_id WHERE m.region = 'West' GROUP BY m.member_type;",0 "Create a table named ""tourist_attractions"" with columns ""attraction_id"", ""name"", ""type"", ""location"", ""cultural_significance"" of types integer, text, text, text, and text respectively","CREATE TABLE tourist_attractions (attraction_id integer, name text, type text, location text, cultural_significance text);","CREATE TABLE tourist_attractions (attraction_id integer, name text, type text, location text, cultural_significance text);","CREATE TABLE tourist_attractions (attraction_id integer, name text, type text, location text, cultural_significance text) AS SELECT * FROM tourist_attractions;",0 Show the number of new garments added per month by each manufacturer.,"CREATE TABLE Manufacturers (ManufacturerID INT, ManufacturerName VARCHAR(50));CREATE TABLE GarmentDates (GarmentID INT, ManufacturerID INT, AddedDate DATE);","SELECT M.ManufacturerName, EXTRACT(MONTH FROM G.AddedDate) AS Month, COUNT(G.GarmentID) AS NewGarments FROM GarmentDates G JOIN Manufacturers M ON G.ManufacturerID = M.ManufacturerID GROUP BY M.ManufacturerName, EXTRACT(MONTH FROM G.AddedDate);","SELECT m.ManufacturerName, DATE_FORMAT(gd.AddedDate, '%Y-%m') AS Month, COUNT(gd.GarmentID) AS NewGarments FROM Manufacturers m JOIN GarmentDates gd ON m.ManufacturerID = gd.ManufacturerID GROUP BY m.ManufacturerName, DATE_FORMAT(gd.AddedDate, '%Y-%m') GROUP BY m.ManufacturerName;",0 "Name the vacator for resigned february 26, 1836 because of ill health","CREATE TABLE table_225200_4 (vacator VARCHAR, reason_for_change VARCHAR);","SELECT vacator FROM table_225200_4 WHERE reason_for_change = ""Resigned February 26, 1836 because of ill health"";","SELECT vacator FROM table_225200_4 WHERE reason_for_change = ""Resigned February 26, 1836"";",0 What is the sum of Floors at st. joseph church?,"CREATE TABLE table_name_52 (floors INTEGER, name VARCHAR);","SELECT SUM(floors) FROM table_name_52 WHERE name = ""st. joseph church"";","SELECT SUM(floors) FROM table_name_52 WHERE name = ""st. joseph church"";",1 Name the trine dehli cleve for english waltz,"CREATE TABLE table_28677723_14 (trine_dehli_cleve INTEGER, style VARCHAR);","SELECT MIN(trine_dehli_cleve) FROM table_28677723_14 WHERE style = ""English Waltz"";","SELECT MAX(trine_dehli_cleve) FROM table_28677723_14 WHERE style = ""English Waltz"";",0 Insert a new record into the 'Customers' table for a customer named 'MNO Corp' located in the 'Europe' region with a spent on air freight of 45000.00.,"CREATE TABLE Customers (CustomerID INT, CustomerName VARCHAR(255), Region VARCHAR(255), SpentOnAirFreight DECIMAL(10,2)); ","INSERT INTO Customers (CustomerName, Region, SpentOnAirFreight) VALUES ('MNO Corp', 'Europe', 45000.00);","INSERT INTO Customers (CustomerID, CustomerName, Region, SpentOnAirFreight) VALUES ('MNO Corp', 'Europe', 45000.00);",0 What is the total revenue generated by each art category?,"CREATE TABLE ArtSales (id INT, art_category VARCHAR(255), revenue DECIMAL(10,2)); ","SELECT art_category, SUM(revenue) FROM ArtSales GROUP BY art_category;","SELECT art_category, SUM(revenue) FROM ArtSales GROUP BY art_category;",1 Who volunteered the most hours in program E in 2021?,"CREATE TABLE Volunteers (id INT, user_id INT, program VARCHAR(50), hours DECIMAL(10, 2), volunteer_date DATE); ","SELECT user_id, SUM(hours) FROM Volunteers WHERE program = 'program E' AND volunteer_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY user_id ORDER BY SUM(hours) DESC LIMIT 1;","SELECT program, SUM(hours) as total_hours FROM Volunteers WHERE program = 'Program E' AND YEAR(volunteer_date) = 2021 GROUP BY program ORDER BY total_hours DESC;",0 Update the 'num_passengers' column in the 'public_transit' table for the 'route_id' 33 to 40,"CREATE TABLE public_transit (route_id INT, num_passengers INT, route_type VARCHAR(255), route_length FLOAT);",UPDATE public_transit SET num_passengers = 40 WHERE route_id = 33;,UPDATE public_transit SET num_passengers = 40 WHERE route_id = 33;,1 What is the average disaster preparedness score in the year 2020?,"CREATE TABLE public.disaster_preparedness (id serial PRIMARY KEY, year int, score int); ",SELECT AVG(score) FROM public.disaster_preparedness WHERE year = 2020;,SELECT AVG(score) FROM public.disaster_preparedness WHERE year = 2020;,1 What was the Sat 21 Aug time for the rider whose Tues 24 Aug time was 20' 38.40 109.680mph?,"CREATE TABLE table_26986076_6 (sat_21_aug VARCHAR, tues_24_aug VARCHAR);","SELECT sat_21_aug FROM table_26986076_6 WHERE tues_24_aug = ""20' 38.40 109.680mph"";","SELECT sat_21_aug FROM table_26986076_6 WHERE tues_24_aug = ""20' 38.40 109.680mph"";",1 Delete the mobile_plans with a plan_id of 3.,"CREATE TABLE mobile_plans (plan_id INT, plan_name VARCHAR(255), company_name VARCHAR(255), data_limit INT, monthly_cost DECIMAL(10, 2)); ",DELETE FROM mobile_plans WHERE plan_id = 3;,DELETE FROM mobile_plans WHERE plan_id = 3;,1 Which team has the location attendance of American Airlines Center 19954?,"CREATE TABLE table_23285805_8 (team VARCHAR, location_attendance VARCHAR);","SELECT team FROM table_23285805_8 WHERE location_attendance = ""American Airlines Center 19954"";","SELECT team FROM table_23285805_8 WHERE location_attendance = ""American Airlines Center 19954"";",1 What is the maximum property size in Vancouver for properties built after 2010?,"CREATE TABLE properties (property_id INT, size FLOAT, city VARCHAR(20), build_year INT); ",SELECT MAX(size) FROM properties WHERE city = 'Vancouver' AND build_year > 2010;,SELECT MAX(size) FROM properties WHERE city = 'Vancouver' AND build_year > 2010;,1 What is the number of employees in each role in dispensaries in Oregon?,"CREATE TABLE Dispensaries (id INT, name TEXT, state TEXT);CREATE TABLE Employees (id INT, dispensary_id INT, role TEXT);","SELECT D.name, E.role, COUNT(*) FROM Dispensaries D JOIN Employees E ON D.id = E.dispensary_id WHERE D.state = 'Oregon' GROUP BY D.id, E.role;","SELECT e.role, COUNT(e.id) FROM Employees e JOIN Dispensaries d ON e.dispensary_id = d.id WHERE d.state = 'Oregon' GROUP BY e.role;",0 "What is 1984, when 1979 is ""1R""?",CREATE TABLE table_name_94 (Id VARCHAR);,"SELECT 1984 FROM table_name_94 WHERE 1979 = ""1r"";","SELECT 1984 FROM table_name_94 WHERE 1979 = ""1r"";",1 What is the average hydroelectric power generation in Australia and New Zealand?,"CREATE TABLE hydro_generation (country VARCHAR(30), generation FLOAT); ","SELECT AVG(generation) FROM hydro_generation WHERE country IN ('Australia', 'New Zealand') GROUP BY country;","SELECT AVG(generation) FROM hydro_generation WHERE country IN ('Australia', 'New Zealand');",0 How many items appear in the area column when Glasvaunta is the townland?,"CREATE TABLE table_30120556_1 (area__acres__ VARCHAR, townland VARCHAR);","SELECT COUNT(area__acres__) FROM table_30120556_1 WHERE townland = ""Glasvaunta"";","SELECT COUNT(area__acres__) FROM table_30120556_1 WHERE townland = ""Glasvaunta"";",1 What was the highest claim amount processed in California?,"CREATE TABLE claims (id INT, state VARCHAR(2), amount DECIMAL(10, 2)); ",SELECT MAX(amount) FROM claims WHERE state = 'CA';,SELECT MAX(amount) FROM claims WHERE state = 'California';,0 Who were the opponents in the game that ended in a score of 116-106?,"CREATE TABLE table_name_64 (opponent VARCHAR, score VARCHAR);","SELECT opponent FROM table_name_64 WHERE score = ""116-106"";","SELECT opponent FROM table_name_64 WHERE score = ""116-106"";",1 Who are the top 3 donors of traditional art pieces?,"CREATE TABLE top_donors(id INT, donor_name TEXT, art_donated INT); ",SELECT donor_name FROM top_donors ORDER BY art_donated DESC LIMIT 3;,"SELECT donor_name, art_donated FROM top_donors ORDER BY art_donated DESC LIMIT 3;",0 Which website was started in 2008?,"CREATE TABLE table_name_25 (website VARCHAR, year_started VARCHAR);",SELECT website FROM table_name_25 WHERE year_started = 2008;,SELECT website FROM table_name_25 WHERE year_started = 2008;,1 Insert a new virtual reality game 'Stellar Odyssey' into the GameDesign table.,"CREATE TABLE GameDesign (GameName VARCHAR(100), Genre VARCHAR(50), Developer VARCHAR(100), VR BOOLEAN); ","INSERT INTO GameDesign (GameName, Genre, Developer, VR) VALUES ('Stellar Odyssey', 'Adventure', 'Intergalactic Studios', TRUE);","INSERT INTO GameDesign (GameName, Genre, Developer, VR) VALUES ('Stellar Odyssey', TRUE);",0 How many community health workers have a low cultural competency level?,"CREATE TABLE community_health_workers (id INT, cultural_competency VARCHAR(20)); ",SELECT COUNT(*) FROM community_health_workers WHERE cultural_competency = 'Low';,SELECT COUNT(*) FROM community_health_workers WHERE cultural_competency = 'Low';,1 Which landfills in country Z have exceeded their capacity?,"CREATE TABLE landfills(country TEXT, landfill_name TEXT, capacity_remaining FLOAT); ",SELECT landfill_name FROM landfills WHERE country = 'Z' AND capacity_remaining < 0;,SELECT landfill_name FROM landfills WHERE country = 'Z' AND capacity_remaining > (SELECT MAX(capacity_remaining) FROM landfills WHERE country = 'Z');,0 "List the farms and their soil moisture levels, if available.","CREATE TABLE farm (id INT, name VARCHAR(50), size FLOAT, PRIMARY KEY(id)); CREATE TABLE soil_moisture (id INT, farm_id INT, moisture FLOAT, PRIMARY KEY(id)); ","SELECT f.name, s.moisture FROM farm f LEFT JOIN soil_moisture s ON f.id = s.farm_id;","SELECT farm.name, soil_moisture.moisture FROM farm INNER JOIN soil_moisture ON farm.id = soil_moisture.farm_id;",0 "Display the number of public services, schools, and hospitals in each city, grouped by region.","CREATE TABLE regions (region_id INT, region_name VARCHAR(255)); CREATE TABLE cities (city_id INT, city_name VARCHAR(255), region_id INT); CREATE TABLE public_services (service_id INT, service_name VARCHAR(255), city_id INT); CREATE TABLE schools (school_id INT, school_name VARCHAR(255), city_id INT); CREATE TABLE hospitals (hospital_id INT, hospital_name VARCHAR(255), city_id INT);","SELECT r.region_name, COUNT(DISTINCT c.city_id) as num_cities, COUNT(DISTINCT ps.service_id) as num_services, COUNT(DISTINCT s.school_id) as num_schools, COUNT(DISTINCT h.hospital_id) as num_hospitals FROM regions r JOIN cities c ON r.region_id = c.region_id LEFT JOIN public_services ps ON c.city_id = ps.city_id LEFT JOIN schools s ON c.city_id = s.city_id LEFT JOIN hospitals h ON c.city_id = h.city_id GROUP BY r.region_name;","SELECT r.region_name, COUNT(ps.service_id) as num_services, COUNT(s.school_id) as num_schools, COUNT(h.hospital_id) as num_hospitals FROM regions r JOIN cities c ON r.region_id = c.region_id JOIN public_services ps ON c.city_id = ps.city_id JOIN hospitals h ON c.city_id = h.city_id GROUP BY r.region_name;",0 "WHAT IS THE RATING THAT HAD A SHARE SMALLER THAN 4, AND 2.47 MILLION VIEWERS?","CREATE TABLE table_name_70 (rating VARCHAR, share VARCHAR, viewers__millions_ VARCHAR);",SELECT COUNT(rating) FROM table_name_70 WHERE share < 4 AND viewers__millions_ > 2.47;,"SELECT rating FROM table_name_70 WHERE share 4 AND viewers__millions_ = ""2.47"";",0 Show the top 5 most frequently used payment methods,"CREATE TABLE hotel_reservations (reservation_id INT, hotel_id INT, guest_name TEXT, arrival_date DATE, departure_date DATE, num_guests INT, payment_amount FLOAT, is_cancelled BOOLEAN, payment_method TEXT);","SELECT payment_method, COUNT(*) FROM hotel_reservations GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 5;","SELECT payment_method, COUNT(*) FROM hotel_reservations GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 5;",1 What is the total number of volunteer hours for each program in 2022?,"CREATE TABLE programs (id INT, name VARCHAR(255)); CREATE TABLE volunteer_hours (id INT, program_id INT, hours INT); ","SELECT program_id, SUM(hours) as total_volunteer_hours FROM volunteer_hours WHERE YEAR(donation_date) = 2022 GROUP BY program_id;","SELECT programs.name, SUM(volunteer_hours.hours) as total_hours FROM programs INNER JOIN volunteer_hours ON programs.id = volunteer_hours.program_id WHERE YEAR(volunteer_hours.id) = 2022 GROUP BY programs.name;",0 What team was the away team for the game with 916 in attendance?,"CREATE TABLE table_name_45 (away VARCHAR, attendance VARCHAR);",SELECT away FROM table_name_45 WHERE attendance = 916;,SELECT away FROM table_name_45 WHERE attendance = 916;,1 Update the installed capacity of wind energy project 'Windfarm 1' in Germany to 150 MW.,"CREATE TABLE wind_energy (project_id INT, project_name VARCHAR(255), country VARCHAR(255), installed_capacity FLOAT);",UPDATE wind_energy SET installed_capacity = 150 WHERE project_name = 'Windfarm 1' AND country = 'Germany';,UPDATE wind_energy SET installed_capacity = 150 WHERE project_name = 'Windfarm 1' AND country = 'Germany';,1 What is the average salary for each department?,"CREATE TABLE departments (id INT, name TEXT, budget INT); CREATE TABLE faculty (id INT, name TEXT, department TEXT, salary INT); ","SELECT d.name, AVG(f.salary) FROM departments d INNER JOIN faculty f ON d.name = f.department GROUP BY d.name;","SELECT d.name, AVG(f.salary) as avg_salary FROM departments d JOIN faculty f ON d.id = f.department GROUP BY d.name;",0 Who was the Winner in the AMC Round 4 at Lakeside International Raceway?,"CREATE TABLE table_name_96 (winner VARCHAR, circuit VARCHAR, series VARCHAR);","SELECT winner FROM table_name_96 WHERE circuit = ""lakeside international raceway"" AND series = ""amc round 4"";","SELECT winner FROM table_name_96 WHERE circuit = ""lakeside international raceway"" AND series = ""amc round 4"";",1 List all policies for policyholders who are 30 or younger.,"CREATE TABLE Policyholders (PolicyholderID INT, Age INT, Region VARCHAR(10)); CREATE TABLE Claims (ClaimID INT, PolicyID INT, Amount INT, Region VARCHAR(10)); ",SELECT * FROM Claims INNER JOIN Policyholders ON Claims.PolicyholderID = Policyholders.PolicyholderID WHERE Policyholders.Age <= 30;,"SELECT Policyholders.PolicyholderID, Policyholders.Age, Policyholders.Region FROM Policyholders INNER JOIN Claims ON Policyholders.PolicyholderID = Claims.PolicyID WHERE Policyholders.Age 30;",0 What is the De Laet term for a Munsee Delaware term of ní·ša?,"CREATE TABLE table_name_12 (de_laet__1633_ VARCHAR, munsee_delaware VARCHAR);","SELECT de_laet__1633_ FROM table_name_12 WHERE munsee_delaware = ""ní·ša"";","SELECT de_laet__1633_ FROM table_name_12 WHERE munsee_delaware = ""na"";",0 "Name the format on july 27, 1994 for alfa records","CREATE TABLE table_name_59 (format VARCHAR, label VARCHAR, date VARCHAR);","SELECT format FROM table_name_59 WHERE label = ""alfa records"" AND date = ""july 27, 1994"";","SELECT format FROM table_name_59 WHERE label = ""alfa records"" AND date = ""july 27, 1994"";",1 What is the total amount of aid provided by all organizations in South America in 2019?,"CREATE TABLE aid (id INT, organization VARCHAR(255), location VARCHAR(255), amount DECIMAL(10, 2), provide_date DATE); ",SELECT SUM(amount) as total_amount FROM aid WHERE location = 'South America' AND YEAR(provide_date) = 2019;,SELECT SUM(amount) FROM aid WHERE location = 'South America' AND YEAR(provide_date) = 2019;,0 What was the original title of 3.19?,"CREATE TABLE table_20124413_3 (original_title VARCHAR, production_code VARCHAR);","SELECT original_title FROM table_20124413_3 WHERE production_code = ""3.19"";","SELECT original_title FROM table_20124413_3 WHERE production_code = ""3.19"";",1 What is the minimum and maximum yield for soybeans in agroecological farming?,"CREATE TABLE Yields (FarmingType VARCHAR(20), Crop VARCHAR(20), Yield FLOAT); ","SELECT MIN(Yield), MAX(Yield) FROM Yields WHERE FarmingType = 'Agroecological' AND Crop = 'Soybeans';","SELECT MIN(Yield), MAX(Yield) FROM Yields WHERE FarmingType = 'Agroecological' AND Crop = 'Soybeans';",1 List the names and salaries of state employees with salaries above the average state employee salary in the 'state_employees' table?,"CREATE TABLE state_employees (id INT, first_name VARCHAR(50), last_name VARCHAR(50), salary DECIMAL(10,2)); ","SELECT first_name, last_name, salary FROM state_employees WHERE salary > (SELECT AVG(salary) FROM state_employees);","SELECT first_name, last_name, salary FROM state_employees WHERE salary > (SELECT AVG(salary) FROM state_employees);",1 COunt the average Enrollment in hope?,"CREATE TABLE table_name_32 (enrollment INTEGER, location VARCHAR);","SELECT AVG(enrollment) FROM table_name_32 WHERE location = ""hope"";","SELECT AVG(enrollment) FROM table_name_32 WHERE location = ""hope"";",1 What is the sum of gold produced by mines in South Africa?,"CREATE TABLE south_africa_gold_mines (id INT, name TEXT, location TEXT, gold_production FLOAT); ",SELECT SUM(gold_production) FROM south_africa_gold_mines WHERE location LIKE '%South Africa%';,SELECT SUM(gold_production) FROM south_africa_gold_mines;,0 What is the earliest year that had under 26 points and a toyota v8 engine?,"CREATE TABLE table_name_99 (year INTEGER, engine VARCHAR, points VARCHAR);","SELECT MIN(year) FROM table_name_99 WHERE engine = ""toyota v8"" AND points < 26;","SELECT MIN(year) FROM table_name_99 WHERE engine = ""toyota v8"" AND points 26;",0 What is the average production by crop type and region for food justice initiatives?,"CREATE TABLE crop_production (id INT, crop_name VARCHAR(255), region VARCHAR(255), production INT); ","SELECT crop_name, region, AVG(production) as avg_production FROM crop_production WHERE region IN ('Asia', 'North America', 'South America', 'Europe') AND crop_name IN ('Rice', 'Corn', 'Potatoes', 'Wheat') GROUP BY crop_name, region;","SELECT crop_name, region, AVG(production) as avg_production FROM crop_production GROUP BY crop_name, region;",0 "For location Caversham, what is the name of the captain?","CREATE TABLE table_18752986_1 (captain VARCHAR, location VARCHAR);","SELECT captain FROM table_18752986_1 WHERE location = ""Caversham"";","SELECT captain FROM table_18752986_1 WHERE location = ""Caversham"";",1 Find the semester and year which has the least number of student taking any class.,"CREATE TABLE takes (semester VARCHAR, YEAR VARCHAR);","SELECT semester, YEAR FROM takes GROUP BY semester, YEAR ORDER BY COUNT(*) LIMIT 1;","SELECT semester, YEAR FROM takes ORDER BY COUNT(*) DESC LIMIT 1;",0 What is the enzyme involved in the disorder of Ornithine Transcarbamylase deficiency?,"CREATE TABLE table_name_66 (enzyme VARCHAR, disorder VARCHAR);","SELECT enzyme FROM table_name_66 WHERE disorder = ""ornithine transcarbamylase deficiency"";","SELECT enzyme FROM table_name_66 WHERE disorder = ""ornithine transcarbamylase deficiency"";",1 What was the total revenue for 'Burger King' in January 2021?,"CREATE TABLE restaurants (restaurant_name VARCHAR(255), revenue FLOAT); ",SELECT revenue FROM restaurants WHERE restaurant_name = 'Burger King' AND EXTRACT(MONTH FROM timestamp) = 1 AND EXTRACT(YEAR FROM timestamp) = 2021;,SELECT SUM(revenue) FROM restaurants WHERE restaurant_name = 'Burger King' AND YEAR(date) = 2021;,0 What is the number of military innovation patents filed by each country in Asia in 2020?,"CREATE TABLE military_innovation (country VARCHAR(50), continent VARCHAR(50), year INT, patent_id INT); ","SELECT country, COUNT(DISTINCT patent_id) FROM military_innovation WHERE continent = 'Asia' AND year = 2020 GROUP BY country;","SELECT country, COUNT(*) FROM military_innovation WHERE continent = 'Asia' AND year = 2020 GROUP BY country;",0 What was the score on August 8?,"CREATE TABLE table_name_82 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_82 WHERE date = ""august 8"";","SELECT score FROM table_name_82 WHERE date = ""august 8"";",1 Which Attendance is the highest one that has a Loss of batista (4-5)?,"CREATE TABLE table_name_3 (attendance INTEGER, loss VARCHAR);","SELECT MAX(attendance) FROM table_name_3 WHERE loss = ""batista (4-5)"";","SELECT MAX(attendance) FROM table_name_3 WHERE loss = ""batista (4-5)"";",1 On what game sites are there where the team record is 0–5?,"CREATE TABLE table_25380472_2 (game_site VARCHAR, team_record VARCHAR);","SELECT game_site FROM table_25380472_2 WHERE team_record = ""0–5"";","SELECT game_site FROM table_25380472_2 WHERE team_record = ""0–5"";",1 What builder has a 2001-02 order year?,"CREATE TABLE table_name_93 (builder VARCHAR, order_year VARCHAR);","SELECT builder FROM table_name_93 WHERE order_year = ""2001-02"";","SELECT builder FROM table_name_93 WHERE order_year = ""2001-02"";",1 How many player eliminated an opponent within the time frame of 32:32?,"CREATE TABLE table_18598175_2 (eliminated_by VARCHAR, time VARCHAR);","SELECT COUNT(eliminated_by) FROM table_18598175_2 WHERE time = ""32:32"";","SELECT COUNT(eliminated_by) FROM table_18598175_2 WHERE time = ""32:32"";",1 "Add a new workout with workout_id 6, member_id 3, gym_id 2, workout_date '2022-01-05', calories 700","CREATE TABLE workouts (workout_id INT, member_id INT, gym_id INT, workout_date DATE, calories INT);","INSERT INTO workouts (workout_id, member_id, gym_id, workout_date, calories) VALUES (6, 3, 2, '2022-01-05', 700);","INSERT INTO workouts (workout_id, member_id, gym_id, workout_date, calories) VALUES (6, 3, 2, '2022-01-05', 700);",1 "What is the minimum and maximum creativity score for each application in the 'creative_ai' table, grouped by algorithm?","CREATE TABLE creative_ai (algorithm VARCHAR(255), application VARCHAR(255), creativity_score FLOAT); ","SELECT algorithm, application, MIN(creativity_score) as min_creativity, MAX(creativity_score) as max_creativity FROM creative_ai GROUP BY algorithm, application;","SELECT algorithm, application, MIN(creativity_score) as min_creativity_score, MAX(creativity_score) as max_creativity_score FROM creative_ai GROUP BY algorithm;",0 Show the number of deep-sea expeditions per year from the 'expeditions' table.,"CREATE TABLE expeditions (expedition_id INT, name VARCHAR(255), year INT, location VARCHAR(255), depth INT);","SELECT year, COUNT(*) FROM expeditions GROUP BY year;","SELECT year, COUNT(*) FROM expeditions GROUP BY year;",1 What is the NFL team for Toledo?,"CREATE TABLE table_name_23 (nfl_team VARCHAR, college VARCHAR);","SELECT nfl_team FROM table_name_23 WHERE college = ""toledo"";","SELECT nfl_team FROM table_name_23 WHERE college = ""toledo"";",1 How many nations do the FMS international team represent?,"CREATE TABLE table_19312274_3 (nation VARCHAR, name VARCHAR);","SELECT COUNT(nation) FROM table_19312274_3 WHERE name = ""FMS International"";","SELECT COUNT(nation) FROM table_19312274_3 WHERE name = ""FMS International Team"";",0 What class was ren alde?,"CREATE TABLE table_22824312_1 (class VARCHAR, player VARCHAR);","SELECT class FROM table_22824312_1 WHERE player = ""Ren Alde"";","SELECT class FROM table_22824312_1 WHERE player = ""Ren Alde"";",1 What is the average ocean acidity level in the Indian Ocean?,"CREATE TABLE ocean_ph (location TEXT, ph FLOAT); ",SELECT AVG(ph) FROM ocean_ph WHERE location = 'Indian Ocean';,SELECT AVG(ph) FROM ocean_ph WHERE location = 'Indian Ocean';,1 What is the frame size that was nicknamed Grand Central?,"CREATE TABLE table_name_10 (framed_size VARCHAR, nickname VARCHAR);","SELECT framed_size FROM table_name_10 WHERE nickname = ""grand central"";","SELECT framed_size FROM table_name_10 WHERE nickname = ""grand central"";",1 "Insert a new record into the ""inventory"" table with the following details: product_id 1, quantity 100, and location ""Warehouse 1""","CREATE TABLE inventory (id INT PRIMARY KEY, product_id INT, quantity INT, location VARCHAR(50));","INSERT INTO inventory (product_id, quantity, location) VALUES (1, 100, 'Warehouse 1');","INSERT INTO inventory (id, product_id, quantity, location) VALUES (1, 100, 'Warehouse 1');",0 What year was the US Open that had a partnering of Maikel Scheffers?,"CREATE TABLE table_name_56 (year INTEGER, partnering VARCHAR, championship VARCHAR);","SELECT SUM(year) FROM table_name_56 WHERE partnering = ""maikel scheffers"" AND championship = ""us open"";","SELECT SUM(year) FROM table_name_56 WHERE partnering = ""maikel scheffers"" AND championship = ""us open"";",1 Which warehouse has the least inventory?,"CREATE TABLE inventory (warehouse_id VARCHAR(5), total_quantity INT); ",SELECT warehouse_id FROM inventory ORDER BY total_quantity LIMIT 1;,"SELECT warehouse_id, MIN(total_quantity) FROM inventory GROUP BY warehouse_id;",0 "What is the total fare collected from the 'Red Line' on June 1st, 2022?","CREATE TABLE route (route_id INT, route_name VARCHAR(50)); CREATE TABLE fare (fare_id INT, route_id INT, fare_amount DECIMAL(5,2), collection_date DATE); ",SELECT SUM(fare_amount) FROM fare WHERE route_id = 1 AND collection_date = '2022-06-01';,SELECT SUM(fare_amount) FROM fare f JOIN route r ON f.route_id = r.route_id WHERE r.route_name = 'Red Line' AND f.collection_date BETWEEN '2022-01-01' AND '2022-06-01';,0 Count the number of new female members who joined in the last month from the 'Asia' region.,"CREATE TABLE members (id INT, gender VARCHAR(50), join_date DATE, region VARCHAR(50)); ","SELECT COUNT(id) FROM members WHERE gender = 'Female' AND join_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) AND region = 'Asia';","SELECT COUNT(*) FROM members WHERE gender = 'Female' AND region = 'Asia' AND join_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);",0 What is the average CO2 emission per vehicle type in the transportation sector?,"CREATE TABLE Vehicles (ID INT, VehicleType VARCHAR(255), CO2Emission INT); ","SELECT VehicleType, AVG(CO2Emission) FROM Vehicles GROUP BY VehicleType;","SELECT VehicleType, AVG(CO2Emission) FROM Vehicles GROUP BY VehicleType;",1 Who are the most influential artists in the 'Influential_Artists' table?,"CREATE TABLE Influential_Artists (artist_id INT, artist_name VARCHAR(255), influence_score FLOAT);",SELECT artist_name FROM Influential_Artists ORDER BY influence_score DESC LIMIT 1;,"SELECT artist_name, influence_score FROM Influential_Artists ORDER BY influence_score DESC LIMIT 1;",0 What is the total budget allocated for education and healthcare services in each city?,"CREATE TABLE cities (city_id INT PRIMARY KEY, city_name VARCHAR(50)); CREATE TABLE budget_allocation (city_id INT, service VARCHAR(50), allocation INT); ","SELECT c.city_name, SUM(CASE WHEN ba.service = 'Education' THEN ba.allocation ELSE 0 END) AS education_budget, SUM(CASE WHEN ba.service = 'Healthcare' THEN ba.allocation ELSE 0 END) AS healthcare_budget FROM cities c JOIN budget_allocation ba ON c.city_id = ba.city_id GROUP BY c.city_id;","SELECT c.city_name, SUM(b.allocation) as total_budget FROM cities c JOIN budget_allocation b ON c.city_id = b.city_id WHERE c.service IN ('Education', 'Healthcare') GROUP BY c.city_name;",0 What is the road team of the game with Philadelphia as the home team with a result of 105-102?,"CREATE TABLE table_name_53 (road_team VARCHAR, home_team VARCHAR, result VARCHAR);","SELECT road_team FROM table_name_53 WHERE home_team = ""philadelphia"" AND result = ""105-102"";","SELECT road_team FROM table_name_53 WHERE home_team = ""philadelphia"" AND result = ""105-102"";",1 Find the number of community health workers by county in California.,"CREATE TABLE community_health_workers(county VARCHAR(50), state VARCHAR(2), workers INT); ","SELECT county, workers FROM community_health_workers WHERE state = 'CA';","SELECT county, SUM(workers) FROM community_health_workers WHERE state = 'California' GROUP BY county;",0 What's the score on february 18 when the visitors are the montreal canadiens?,"CREATE TABLE table_name_46 (score VARCHAR, visitor VARCHAR, date VARCHAR);","SELECT score FROM table_name_46 WHERE visitor = ""montreal canadiens"" AND date = ""february 18"";","SELECT score FROM table_name_46 WHERE visitor = ""montreal canadiens"" AND date = ""february 18"";",1 What is the total cost of construction permits issued in Los Angeles in Q2 of 2019?,"CREATE TABLE Permit_Data_LA (PermitID INT, City VARCHAR(50), Quarter INT, Year INT, Cost FLOAT);",SELECT SUM(Cost) FROM Permit_Data_LA WHERE City = 'Los Angeles' AND Quarter = 2 AND Year = 2019;,SELECT SUM(Cost) FROM Permit_Data_LA WHERE City = 'Los Angeles' AND Quarter = 2 AND Year = 2019;,1 In what City/State did John Bowe win at Phillip Island Grand Prix Circuit?,"CREATE TABLE table_name_12 (city___state VARCHAR, winner VARCHAR, circuit VARCHAR);","SELECT city___state FROM table_name_12 WHERE winner = ""john bowe"" AND circuit = ""phillip island grand prix circuit"";","SELECT city___state FROM table_name_12 WHERE winner = ""john bowe"" AND circuit = ""phillip island grand prix circuit"";",1 "What are the details of the national security meetings that took place in Europe in the last 2 years, including attendees and discussed topics?","CREATE TABLE national_security_meetings (id INT, location VARCHAR(50), year INT, month INT, attendees VARCHAR(50), topics VARCHAR(50)); ",SELECT * FROM national_security_meetings WHERE location LIKE 'Europe%' AND year BETWEEN 2020 AND 2021;,"SELECT location, attendees, topics FROM national_security_meetings WHERE location = 'Europe' AND year BETWEEN 2018 AND 2021;",0 What is the average score for each tool category?,"CREATE TABLE tool (category VARCHAR(20), tool VARCHAR(20), score INT); ","SELECT category AS tool_category, AVG(score) AS avg_score FROM tool GROUP BY category;","SELECT category, AVG(score) as avg_score FROM tool GROUP BY category;",0 "What is Result, when Venue is Götzis , Austria?","CREATE TABLE table_name_77 (result VARCHAR, venue VARCHAR);","SELECT result FROM table_name_77 WHERE venue = ""götzis , austria"";","SELECT result FROM table_name_77 WHERE venue = ""götzis, austria"";",0 How many investment accounts are held by clients in the Midwest region?,"CREATE TABLE investment_accounts (account_id INT, client_id INT, region VARCHAR(50)); CREATE TABLE clients (client_id INT, name VARCHAR(50)); ",SELECT COUNT(DISTINCT client_id) FROM investment_accounts WHERE region = 'Midwest';,SELECT COUNT(*) FROM investment_accounts ia JOIN clients c ON ia.client_id = c.client_id WHERE ia.region = 'Midwest';,0 "What bronze has tatiana ryabkina as the silver, anne margrethe hausken as the gold?","CREATE TABLE table_name_55 (bronze VARCHAR, silver VARCHAR, gold VARCHAR);","SELECT bronze FROM table_name_55 WHERE silver = ""tatiana ryabkina"" AND gold = ""anne margrethe hausken"";","SELECT bronze FROM table_name_55 WHERE silver = ""tatiana ryabkina"" AND gold = ""anne margrethe hausken"";",1 Name the total number of valid poll with seats more than 4 and candidates more than 9,"CREATE TABLE table_name_67 (valid_poll VARCHAR, seats VARCHAR, candidates VARCHAR);",SELECT COUNT(valid_poll) FROM table_name_67 WHERE seats > 4 AND candidates > 9;,SELECT COUNT(valid_poll) FROM table_name_67 WHERE seats > 4 AND candidates > 9;,1 Update the name of the workplace with ID 1 to 'TUV Company'.,"CREATE TABLE workplaces (id INT, name TEXT, state TEXT); ",UPDATE workplaces SET name = 'TUV Company' WHERE id = 1;,UPDATE workplaces SET name = 'TUV Company' WHERE id = 1;,1 What is the minimum depth of the Puerto Rico Trench?,"CREATE TABLE ocean_floor_mapping (name VARCHAR(255), location VARCHAR(255), min_depth FLOAT); ",SELECT min_depth FROM ocean_floor_mapping WHERE name = 'Puerto Rico Trench';,SELECT MIN(min_depth) FROM ocean_floor_mapping WHERE name = 'Puerto Rico Trench';,0 What category of the British Soap Awards resulted in nominated?,"CREATE TABLE table_name_18 (category VARCHAR, awards VARCHAR, result VARCHAR);","SELECT category FROM table_name_18 WHERE awards = ""british soap awards"" AND result = ""nominated"";","SELECT category FROM table_name_18 WHERE awards = ""british soap awards"" AND result = ""nominated"";",1 "What is the average media literacy score for users in Asia, grouped by age?","CREATE TABLE users (user_id INT, age INT, country VARCHAR(50), media_literacy_score INT); ","SELECT age, AVG(media_literacy_score) as avg_score FROM users WHERE country IN ('India', 'China', 'Japan', 'South Korea', 'Indonesia') GROUP BY age;","SELECT age, AVG(media_literacy_score) as avg_score FROM users WHERE country IN ('China', 'India') GROUP BY age;",0 "When a variant without niqqud is as middle letter: וו with a phonemic value of /v/, what is the variant with niqqud?","CREATE TABLE table_name_53 (variant__with_niqqud__ VARCHAR, phonemic_value VARCHAR, without_niqqud VARCHAR);","SELECT variant__with_niqqud__ FROM table_name_53 WHERE phonemic_value = ""/v/"" AND without_niqqud = ""as middle letter: וו"";","SELECT variant__with_niqqud__ FROM table_name_53 WHERE phonemic_value = ""/v/"" AND without_niqqud = ""middle letter: "";",0 What is the maximum capacity for fish farming in a single African country?,"CREATE TABLE Farm (FarmID INT, FishSpecies VARCHAR(50), Capacity INT, Location VARCHAR(50)); ",SELECT MAX(Capacity) FROM Farm WHERE Location LIKE 'Africa%';,SELECT MAX(Capacity) FROM Farm WHERE Location = 'Africa';,0 What is the set 5 with a 19-25 set 1?,"CREATE TABLE table_name_44 (set_5 VARCHAR, set_1 VARCHAR);","SELECT set_5 FROM table_name_44 WHERE set_1 = ""19-25"";","SELECT set_5 FROM table_name_44 WHERE set_1 = ""19-25"";",1 "Name the sum of cuts with wins less than 2, top-25 more than 7 and top-10 less than 2","CREATE TABLE table_name_80 (cuts_made INTEGER, top_10 VARCHAR, wins VARCHAR, top_25 VARCHAR);",SELECT SUM(cuts_made) FROM table_name_80 WHERE wins < 2 AND top_25 > 7 AND top_10 < 2;,SELECT SUM(cuts_made) FROM table_name_80 WHERE wins 2 AND top_25 > 7 AND top_10 2;,0 Calculate the average claim amount for policyholders in Texas.,"CREATE TABLE policyholders (id INT, name VARCHAR(100), state VARCHAR(20)); CREATE TABLE policies (id INT, policy_number VARCHAR(50), policyholder_id INT, state VARCHAR(20)); CREATE TABLE claims (id INT, claim_number VARCHAR(50), policy_id INT, amount DECIMAL(10, 2)); ",SELECT AVG(claims.amount) FROM claims JOIN policies ON claims.policy_id = policies.id WHERE policies.state = 'TX';,SELECT AVG(claims.amount) FROM claims INNER JOIN policies ON claims.policy_id = policies.policyholder_id WHERE policies.state = 'Texas';,0 "What date did the institution that left in 2013 and that is nicknamed Corsairs, join? ","CREATE TABLE table_261927_2 (joined VARCHAR, left VARCHAR, nickname VARCHAR);","SELECT joined FROM table_261927_2 WHERE left = ""2013"" AND nickname = ""Corsairs"";","SELECT joined FROM table_261927_2 WHERE left = 2013 AND nickname = ""Corsairs"";",0 "What is the average budget for ethical AI initiatives, ordered by the average budget in descending order?","CREATE TABLE ethical_ai_budget (initiative_id INT, initiative_name VARCHAR(255), region VARCHAR(255), budget DECIMAL(10,2)); ",SELECT AVG(budget) as avg_budget FROM ethical_ai_budget GROUP BY initiative_id ORDER BY avg_budget DESC;,SELECT AVG(budget) as avg_budget FROM ethical_ai_budget ORDER BY avg_budget DESC;,0 Delete all artists who have never had a music stream or ticket sale.,"CREATE TABLE artist_activity(artist_id INT, streams INT, sales INT); CREATE TABLE artists(artist_id INT, name VARCHAR(50));",DELETE FROM artists WHERE artist_id NOT IN (SELECT artist_id FROM artist_activity);,DELETE FROM artists WHERE artist_id NOT IN (SELECT artist_id FROM artist_activity);,1 Name the year model for 4-cyl straight engine dohc 16v and 1.5 crdi,"CREATE TABLE table_1444201_1 (year_model VARCHAR, engine VARCHAR, model VARCHAR);","SELECT year_model FROM table_1444201_1 WHERE engine = ""4-cyl Straight engine DOHC 16V"" AND model = ""1.5 CRDi"";","SELECT year_model FROM table_1444201_1 WHERE engine = ""4 Cyl Straight"" AND model = ""Dohc 16V and 1.5 Crdi"";",0 What is the 3-dart average with a high checkout of 112?,CREATE TABLE table_20948329_1 (high_checkout VARCHAR);,SELECT 3 AS _dart_average FROM table_20948329_1 WHERE high_checkout = 112;,SELECT AVG(3 AS 3-Dart) FROM table_20948329_1 WHERE high_checkout = 112;,0 Delete all artists who have not released any songs.,"CREATE SCHEMA if not exists music_schema;CREATE TABLE if not exists artists (id INT, name VARCHAR, num_songs INT);",DELETE FROM music_schema.artists WHERE num_songs = 0;,DELETE FROM music_schema.artists WHERE num_songs IS NULL;,0 What is the average age of bridges in 'Bridges' table for each state?,"CREATE TABLE Bridges(bridge_id INT, age INT, state VARCHAR(255)); ","SELECT state, AVG(age) FROM Bridges GROUP BY state;","SELECT state, AVG(age) FROM Bridges GROUP BY state;",1 What's the maximum and minimum gas price for smart contracts in Asia in the last week?,"CREATE TABLE smart_contracts (id INT, gas_price DECIMAL(10, 2), country VARCHAR(255)); CREATE TABLE smart_contract_transactions (id INT, smart_contract_id INT, transaction_date DATE, gas_price DECIMAL(10, 2)); ","SELECT MAX(gas_price), MIN(gas_price) FROM smart_contract_transactions JOIN smart_contracts ON smart_contract_transactions.smart_contract_id = smart_contracts.id WHERE transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) AND country IN ('China', 'Japan', 'India', 'Singapore', 'Vietnam');","SELECT MAX(sct.gas_price) AS max_gas_price, MIN(sct.gas_price) AS min_gas_price FROM smart_contracts sct JOIN smart_contract_transactions sct ON sct.id = sct.smart_contract_id WHERE sct.country = 'Asia' AND sct.transaction_date >= DATEADD(week, -1, GETDATE());",0 What year shows as Runner-up of england (24 pts)?,"CREATE TABLE table_name_6 (year VARCHAR, runner_up VARCHAR);","SELECT year FROM table_name_6 WHERE runner_up = ""england (24 pts)"";","SELECT year FROM table_name_6 WHERE runner_up = ""england (24 pts)"";",1 Mike Reid from the United States has what score?,"CREATE TABLE table_name_12 (score VARCHAR, country VARCHAR, player VARCHAR);","SELECT score FROM table_name_12 WHERE country = ""united states"" AND player = ""mike reid"";","SELECT score FROM table_name_12 WHERE country = ""united states"" AND player = ""mike reid"";",1 Who had the high assists in the game against Memphis?,"CREATE TABLE table_name_13 (high_assists VARCHAR, team VARCHAR);","SELECT high_assists FROM table_name_13 WHERE team = ""memphis"";","SELECT high_assists FROM table_name_13 WHERE team = ""memphis"";",1 Who is the oldest person whose job is student?,"CREATE TABLE person (name VARCHAR, job VARCHAR, age INTEGER); CREATE TABLE Person (name VARCHAR, job VARCHAR, age INTEGER);",SELECT name FROM Person WHERE job = 'student' AND age = (SELECT MAX(age) FROM person WHERE job = 'student');,SELECT name FROM Person WHERE job = 'Student' ORDER BY age DESC LIMIT 1;,0 Who was the opponent at the away game with a score of 5-4?,"CREATE TABLE table_name_67 (opponents VARCHAR, venue VARCHAR, score VARCHAR);","SELECT opponents FROM table_name_67 WHERE venue = ""away"" AND score = ""5-4"";","SELECT opponents FROM table_name_67 WHERE venue = ""away"" AND score = ""5-4"";",1 Calculate the average number of members per union in each region.,"CREATE TABLE union_region (union_id INT, region_id INT, total_members INT); CREATE TABLE regions (region_id INT, region_name TEXT); ","SELECT regions.region_name, AVG(union_region.total_members) FROM union_region INNER JOIN regions ON union_region.region_id = regions.region_id GROUP BY regions.region_name;","SELECT r.region_name, AVG(u.total_members) as avg_members FROM union_region u JOIN regions r ON u.region_id = r.region_id GROUP BY r.region_name;",0 Name the total number of record for 61,"CREATE TABLE table_27722408_10 (record VARCHAR, game VARCHAR);",SELECT COUNT(record) FROM table_27722408_10 WHERE game = 61;,SELECT COUNT(record) FROM table_27722408_10 WHERE game = 61;,1 "What is the average playtime for each game in the ""Simulation"" category?","CREATE TABLE GameStats (GameID int, GameName varchar(50), Category varchar(50), Playtime decimal(10,2));","SELECT Category, AVG(Playtime) OVER(PARTITION BY Category) as AvgPlaytime FROM GameStats;","SELECT GameName, AVG(Playtime) as AvgPlaytime FROM GameStats WHERE Category = 'Simulation' GROUP BY GameName;",0 Show the names of the drivers without a school bus.,"CREATE TABLE school_bus (name VARCHAR, driver_id VARCHAR); CREATE TABLE driver (name VARCHAR, driver_id VARCHAR);",SELECT name FROM driver WHERE NOT driver_id IN (SELECT driver_id FROM school_bus);,SELECT T1.name FROM driver AS T1 JOIN school_bus AS T2 ON T1.driver_id = T2.driver_id WHERE T2.name IS NULL;,0 What is the average age of visual artists who received funding in 2021?,"CREATE TABLE artists (id INT, age INT, received_funding BOOLEAN); CREATE TABLE artist_funding (id INT, artist_id INT, year INT); ",SELECT AVG(age) FROM artists INNER JOIN artist_funding ON artists.id = artist_funding.artist_id WHERE artist_funding.year = 2021;,SELECT AVG(age) FROM artists JOIN artist_funding ON artists.id = artist_funding.artist_id WHERE received_funding = TRUE AND year = 2021;,0 What is the name of the captain when teh shirt sponsor is n/a?,"CREATE TABLE table_27631756_2 (captain VARCHAR, shirt_sponsor VARCHAR);","SELECT captain FROM table_27631756_2 WHERE shirt_sponsor = ""N/A"";","SELECT captain FROM table_27631756_2 WHERE shirt_sponsor = ""N/A"";",1 "What is the example for the American of ɪ, ə, and a Semi-closed initial unstressed vowels of y /ɨ/?","CREATE TABLE table_name_73 (examples VARCHAR, american VARCHAR, semi_closed_initial_unstressed_vowels VARCHAR);","SELECT examples FROM table_name_73 WHERE american = ""ɪ, ə"" AND semi_closed_initial_unstressed_vowels = ""y /ɨ/"";","SELECT examples FROM table_name_73 WHERE american = "", "" AND semi_closed_initial_unstressed_vowels = ""y //"";",0 Identify the regions with highest carbon sequestration in 2020.,"CREATE TABLE carbon_sequestration (year INT, region VARCHAR(255), sequestration FLOAT); ",SELECT region FROM carbon_sequestration WHERE sequestration = (SELECT MAX(sequestration) FROM carbon_sequestration WHERE year = 2020);,"SELECT region, sequestration FROM carbon_sequestration WHERE year = 2020 ORDER BY sequestration DESC LIMIT 1;",0 Add up all the Ends columns that have goals smaller than 0.,"CREATE TABLE table_name_65 (ends INTEGER, goals INTEGER);",SELECT SUM(ends) FROM table_name_65 WHERE goals < 0;,SELECT MAX(ends) FROM table_name_65 WHERE goals 0;,0 Which regions have the highest impact investing?,"CREATE TABLE Investments (InvestmentID int, Region varchar(20), InvestmentAmount decimal(10,2)); ","SELECT Region, SUM(InvestmentAmount) AS TotalInvestment FROM Investments GROUP BY Region ORDER BY TotalInvestment DESC;","SELECT Region, MAX(InvestmentAmount) FROM Investments GROUP BY Region;",0 "What is Date (Closing), when Opening Film is ""Deconstruction of Korean Housewife""?","CREATE TABLE table_name_95 (date__closing_ VARCHAR, opening_film VARCHAR);","SELECT date__closing_ FROM table_name_95 WHERE opening_film = ""deconstruction of korean housewife"";","SELECT date__closing_ FROM table_name_95 WHERE opening_film = ""deconstruction of korean housewife"";",1 What is the maximum altitude reached by any satellite deployed by Orbital Inc.?,"CREATE TABLE SatelliteAltitude (satellite_id INT, company VARCHAR(255), altitude INT);",SELECT MAX(altitude) FROM SatelliteAltitude WHERE company = 'Orbital Inc.';,SELECT MAX(altitude) FROM SatelliteAltitude WHERE company = 'Orbital Inc.';,1 "How many train maintenance incidents were reported in Tokyo in the past year, broken down by month?","CREATE TABLE tokyo_train_maintenance (incident_id INT, incident_date DATE);","SELECT DATE_FORMAT(incident_date, '%Y-%m') AS month, COUNT(*) FROM tokyo_train_maintenance WHERE incident_date >= DATE_SUB(NOW(), INTERVAL 1 YEAR) GROUP BY month;","SELECT EXTRACT(MONTH FROM incident_date) AS month, COUNT(*) FROM tokyo_train_maintenance WHERE incident_date >= DATEADD(year, -1, GETDATE()) GROUP BY month;",0 What was the average donation amount for recurring donors to human rights nonprofits in Latin America in 2020?,"CREATE TABLE donors (id INT, donor_type VARCHAR(255), gender VARCHAR(10), recurring BOOLEAN); CREATE TABLE donations (id INT, donation_amount DECIMAL(10, 2), donation_date DATE, donor_id INT, nonprofit_focus VARCHAR(255), nonprofit_region VARCHAR(255)); ",SELECT AVG(donation_amount) FROM donations d JOIN donors don ON d.donor_id = don.id WHERE don.recurring = true AND don.donor_type = 'Individual' AND d.nonprofit_focus = 'Human Rights' AND d.nonprofit_region = 'Latin America' AND EXTRACT(YEAR FROM donation_date) = 2020;,SELECT AVG(donation_amount) FROM donations JOIN donors ON donations.donor_id = donors.id WHERE donors.recurring = true AND donors.nonprofit_focus = 'human rights' AND donors.nonprofit_region = 'Latin America' AND donations.donation_date BETWEEN '2020-01-01' AND '2020-12-31';,0 What is the financial capability score distribution across different genders?,"CREATE TABLE financial_capability_by_gender (id INT, gender VARCHAR(50), score FLOAT); ","SELECT gender, AVG(score) as avg_score, STDDEV(score) as std_dev FROM financial_capability_by_gender GROUP BY gender;","SELECT gender, SUM(score) as total_score FROM financial_capability_by_gender GROUP BY gender;",0 Which position in the table is the team watford?,"CREATE TABLE table_18784280_3 (position_in_table VARCHAR, team VARCHAR);","SELECT position_in_table FROM table_18784280_3 WHERE team = ""Watford"";","SELECT position_in_table FROM table_18784280_3 WHERE team = ""Watford"";",1 How many matches as captain were played where Asian Cup played as a captain is Qatar 1988,"CREATE TABLE table_272865_20 (matches_as_captain VARCHAR, asian_cup_played_as_a_captain VARCHAR);","SELECT matches_as_captain FROM table_272865_20 WHERE asian_cup_played_as_a_captain = ""Qatar 1988"";","SELECT matches_as_captain FROM table_272865_20 WHERE asian_cup_played_as_a_captain = ""Qatar 1988"";",1 "Which Overall has a Round larger than 7, a Pick larger than 13, and a Name of tony hall?","CREATE TABLE table_name_88 (overall INTEGER, name VARCHAR, round VARCHAR, pick VARCHAR);","SELECT AVG(overall) FROM table_name_88 WHERE round > 7 AND pick > 13 AND name = ""tony hall"";","SELECT SUM(overall) FROM table_name_88 WHERE round > 7 AND pick > 13 AND name = ""tony hall"";",0 Find the salaries of all distinct instructors that are less than the largest salary.,CREATE TABLE instructor (salary INTEGER);,SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT MAX(salary) FROM instructor);,SELECT DISTINCT salary FROM instructor WHERE salary (SELECT MAX(salary) FROM instructor);,0 "Update the source of a sustainable material in the ""materials"" table","CREATE TABLE materials (material_id INT, name VARCHAR(255), source VARCHAR(255), recyclable BOOLEAN);",UPDATE materials SET source = 'Textile Waste' WHERE material_id = 3001;,UPDATE materials SET source = 'Sustainable' WHERE material_id = 1;,0 What was the result with a record of 58–11?,"CREATE TABLE table_name_49 (result VARCHAR, record VARCHAR);","SELECT result FROM table_name_49 WHERE record = ""58–11"";","SELECT result FROM table_name_49 WHERE record = ""58–11"";",1 Which countries had the highest space exploration budgets in 2021?,"CREATE TABLE Space_Exploration_Budgets (id INT, country VARCHAR(50), year INT, budget DECIMAL(10,2)); ","SELECT country, budget FROM Space_Exploration_Budgets WHERE year = 2021 ORDER BY budget DESC LIMIT 2;","SELECT country, MAX(budget) FROM Space_Exploration_Budgets WHERE year = 2021 GROUP BY country;",0 What is the distribution of crime types in different cities?,"CREATE TABLE cities (city_id INT, city_name VARCHAR(255)); CREATE TABLE crimes (crime_id INT, crime_type VARCHAR(255), city_id INT); ","SELECT city_id, crime_type, COUNT(*) as num_crimes FROM crimes GROUP BY city_id, crime_type ORDER BY city_id, num_crimes DESC","SELECT c.city_name, COUNT(c.crime_id) as crime_count FROM cities c JOIN crimes c ON c.city_id = c.city_id GROUP BY c.city_name;",0 "in 1833, how many institutions were created?","CREATE TABLE table_261895_1 (institution VARCHAR, founded VARCHAR);",SELECT COUNT(institution) FROM table_261895_1 WHERE founded = 1833;,SELECT COUNT(institution) FROM table_261895_1 WHERE founded = 1833;,1 What is the airport name that has nos listed as the IATA?,"CREATE TABLE table_name_78 (airport VARCHAR, iata VARCHAR);","SELECT airport FROM table_name_78 WHERE iata = ""nos"";","SELECT airport FROM table_name_78 WHERE iata = ""nos"";",1 Delete all records of Europium production from the 'processing_plants' table that occurred before 2015.,"CREATE TABLE processing_plants (id INT, name TEXT, location TEXT, Europium_production DATE, production_quantity INT);",DELETE FROM processing_plants WHERE Europium_production < '2015-01-01';,DELETE FROM processing_plants WHERE Europium_production '2015-01-01';,0 What visitor has tim duncan (16) as the leading scorer?,"CREATE TABLE table_name_18 (visitor VARCHAR, leading_scorer VARCHAR);","SELECT visitor FROM table_name_18 WHERE leading_scorer = ""tim duncan (16)"";","SELECT visitor FROM table_name_18 WHERE leading_scorer = ""tim duncan (16)"";",1 How many autonomous driving research papers were published by authors from the United States and Germany?,"CREATE TABLE research_papers (title VARCHAR(100), author_country VARCHAR(50), publication_year INT);","SELECT COUNT(*) FROM research_papers WHERE author_country IN ('United States', 'Germany') AND publication_year >= 2015;","SELECT COUNT(*) FROM research_papers WHERE author_country IN ('USA', 'Germany');",0 What is the average investment in climate adaptation projects in Small Island Developing States (SIDS) between 2015 and 2020?,"CREATE TABLE climate_adaptation_projects (project_id INT, location VARCHAR(50), investment_amount FLOAT, investment_year INT); ",SELECT AVG(investment_amount) FROM climate_adaptation_projects WHERE location LIKE 'SIDS' AND investment_year BETWEEN 2015 AND 2020;,SELECT AVG(investment_amount) FROM climate_adaptation_projects WHERE location = 'SIDS' AND investment_year BETWEEN 2015 AND 2020;,0 What was the total revenue generated from users in the United States for the month of January 2022?,"CREATE TABLE users (user_id INT, country VARCHAR(255));CREATE TABLE transactions (transaction_id INT, user_id INT, revenue DECIMAL(10,2), transaction_date DATE); ",SELECT SUM(revenue) FROM transactions JOIN users ON transactions.user_id = users.user_id WHERE users.country = 'United States' AND transaction_date >= '2022-01-01' AND transaction_date < '2022-02-01';,SELECT SUM(revenue) FROM transactions t JOIN users u ON t.user_id = u.user_id WHERE u.country = 'United States' AND t.transaction_date BETWEEN '2022-01-01' AND '2022-01-31';,0 "Identify vessels with a CO2 emission level above the average, for vessels that have handled cargo at the port of 'Rotterdam'.","CREATE TABLE vessels (vessel_id INT, vessel_name VARCHAR(50), type VARCHAR(50), CO2_emission_level FLOAT); CREATE TABLE handling (handling_id INT, vessel_id INT, port_id INT, handling_date DATE);","SELECT v.vessel_name, v.CO2_emission_level FROM vessels v JOIN handling h ON v.vessel_id = h.vessel_id WHERE h.port_id = (SELECT port_id FROM ports WHERE port_name = 'Rotterdam') GROUP BY v.vessel_name, v.CO2_emission_level HAVING CO2_emission_level > (SELECT AVG(CO2_emission_level) FROM vessels);",SELECT v.vessel_name FROM vessels v JOIN handling h ON v.vessel_id = h.vessel_id WHERE v.CO2_emission_level > (SELECT AVG(CO2_emission_level) FROM vessels WHERE port_id = 'Rotterdam');,0 What is the total donation amount for programs in the 'Environment' category?,"CREATE TABLE programs (id INT, name TEXT, category TEXT, budget DECIMAL(10,2)); ",SELECT SUM(budget) FROM programs WHERE category = 'Environment';,SELECT SUM(budget) FROM programs WHERE category = 'Environment';,1 Which excavation sites have more than 5 'Metalwork' artifacts and their corresponding category percentages?,"CREATE TABLE excavation_sites_metalwork (site_id INT, artifact_count INT); CREATE TABLE artifacts_categories_count (site_id INT, category VARCHAR(255), artifact_count INT); ","SELECT a.site_id, a.artifact_count, 100.0 * a.artifact_count / SUM(b.artifact_count) OVER (PARTITION BY a.site_id) AS category_percentage FROM excavation_sites_metalwork a JOIN artifacts_categories_count b ON a.site_id = b.site_id WHERE b.category = 'Metalwork' AND a.artifact_count > 5;","SELECT excavation_sites_metalwork.site_id, excavation_sites_metalwork.artifact_count, artifacts_categories_count.artifact_count FROM excavation_sites_metalwork INNER JOIN artifacts_categories_count ON excavation_sites_metalwork.site_id = artifacts_categories_count.site_id WHERE excavation_sites_metalwork.artifact_count > 5;",0 Find the number of Influenza cases reported in South America in 2020.,"CREATE TABLE FluData (Year INT, Region VARCHAR(20), Cases INT); ",SELECT SUM(Cases) FROM FluData WHERE Region = 'South America' AND Year = 2020;,SELECT SUM(Cases) FROM FluData WHERE Year = 2020 AND Region = 'South America';,0 What is the current version of windows 8 with an RTM build of 9200?,"CREATE TABLE table_name_14 (current_version VARCHAR, rtm_build VARCHAR, name VARCHAR);","SELECT current_version FROM table_name_14 WHERE rtm_build = ""9200"" AND name = ""windows 8"";","SELECT current_version FROM table_name_14 WHERE rtm_build = 9200 AND name = ""windows 8"";",0 "If Tuesday 1 June is 20' 59.60 107.834mph, what is the rank maximum?","CREATE TABLE table_25220821_3 (rank INTEGER, tues_1_june VARCHAR);","SELECT MAX(rank) FROM table_25220821_3 WHERE tues_1_june = ""20' 59.60 107.834mph"";","SELECT MAX(rank) FROM table_25220821_3 WHERE tues_1_june = ""20' 59.60 107.834"";",0 Find the total count of defense contracts by type,"CREATE TABLE defense_contracts (id INT, contract_type VARCHAR(255)); ","SELECT contract_type, COUNT(*) FROM defense_contracts GROUP BY contract_type;","SELECT contract_type, COUNT(*) FROM defense_contracts GROUP BY contract_type;",1 What was the total number of visitors to the 'Classic' exhibitions?,"CREATE TABLE exhibitions (id INT, name VARCHAR(255), type VARCHAR(255), visits INT); ",SELECT SUM(visits) FROM exhibitions WHERE type = 'Classic';,SELECT SUM(visitors) FROM exhibitions WHERE type = 'Classic';,0 What is the average rating of 'eco-friendly' hotels worldwide?,"CREATE TABLE hotels (hotel_id INT, name TEXT, city TEXT, country TEXT, rating FLOAT, eco_friendly BOOLEAN);",SELECT AVG(rating) FROM hotels WHERE eco_friendly = TRUE;,SELECT AVG(rating) FROM hotels WHERE eco_friendly = true;,0 What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'?,"CREATE TABLE department (creation VARCHAR, department_id VARCHAR); CREATE TABLE management (department_id VARCHAR, head_id VARCHAR); CREATE TABLE head (head_id VARCHAR, born_state VARCHAR);",SELECT DISTINCT T1.creation FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T3.born_state = 'Alabama';,SELECT DISTINCT T1.creation FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.head_id JOIN head AS T3 ON T1.head_id = T3.head_id WHERE T3.born_state = 'Alabama';,0 "How many seasons have Losses larger than 1, and a Competition of fiba europe cup, and Wins smaller than 4?","CREATE TABLE table_name_53 (season VARCHAR, wins VARCHAR, loses VARCHAR, competition VARCHAR);","SELECT COUNT(season) FROM table_name_53 WHERE loses > 1 AND competition = ""fiba europe cup"" AND wins < 4;","SELECT COUNT(season) FROM table_name_53 WHERE loses > 1 AND competition = ""fiba europe cup"" AND wins 4;",0 List all satellite image filenames for the 'central_field' and 'eastern_field' from the 'imagery_archive' table?,"CREATE TABLE imagery_archive (id INT, field_name VARCHAR(20), filename VARCHAR(30)); ","SELECT filename FROM imagery_archive WHERE field_name IN ('central_field', 'eastern_field');","SELECT filename FROM imagery_archive WHERE field_name IN ('central_field', 'eastern_field');",1 Who won Division North when Division Southwest was won by Novaci and Division West by Vrapčište?,"CREATE TABLE table_name_75 (division_north VARCHAR, division_southwest VARCHAR, division_west VARCHAR);","SELECT division_north FROM table_name_75 WHERE division_southwest = ""novaci"" AND division_west = ""vrapčište"";","SELECT division_north FROM table_name_75 WHERE division_southwest = ""novaci"" AND division_west = ""vrapite"";",0 Name the district for nairs 8.2,"CREATE TABLE table_23214055_2 (district VARCHAR, nairs VARCHAR);","SELECT district FROM table_23214055_2 WHERE nairs = ""8.2"";","SELECT district FROM table_23214055_2 WHERE nairs = ""8.2"";",1 Calculate the total water usage in the United States in 2021.,"CREATE TABLE water_usage(state VARCHAR(20), year INT, usage FLOAT);","SELECT SUM(usage) FROM water_usage WHERE year=2021 AND state IN ('Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming');",SELECT SUM(usage) FROM water_usage WHERE state = 'United States' AND year = 2021;,0 At what milepost is Beacon Falls? ,"CREATE TABLE table_2572788_1 (milepost VARCHAR, town_city VARCHAR);","SELECT milepost FROM table_2572788_1 WHERE town_city = ""Beacon Falls"";","SELECT milepost FROM table_2572788_1 WHERE town_city = ""Beacon Falls"";",1 What is the maximum water usage per day for a commercial customer in New York?,"CREATE TABLE commercial_customers (customer_id INT, location VARCHAR(255), daily_water_usage FLOAT); ",SELECT MAX(daily_water_usage) FROM commercial_customers WHERE location = 'New York';,SELECT MAX(daily_water_usage) FROM commercial_customers WHERE location = 'New York';,1 What is the average water consumption per capita in New York City for the year 2020?,"CREATE TABLE new_york_water_use (year INT, population INT, water_consumption INT); ",SELECT AVG(new_york_water_use.water_consumption / new_york_water_use.population) as avg_water_consumption FROM new_york_water_use WHERE new_york_water_use.year = 2020;,SELECT AVG(water_consumption / population) FROM new_york_water_use WHERE year = 2020;,0 What's the total power of the unit whose construction finished on 14.06.1963?,"CREATE TABLE table_12983929_1 (total_power VARCHAR, construction_finish VARCHAR);","SELECT total_power FROM table_12983929_1 WHERE construction_finish = ""14.06.1963"";","SELECT total_power FROM table_12983929_1 WHERE construction_finish = ""14.06.1963"";",1 Which contractors have worked on more than one project in the 'construction_projects' table?,"CREATE TABLE construction_projects (project_name VARCHAR(255), contractor_name VARCHAR(255));","select contractor_name, count(distinct project_name) as project_count from construction_projects group by contractor_name having count(distinct project_name) > 1;",SELECT contractor_name FROM construction_projects GROUP BY contractor_name HAVING COUNT(*) > 1;,0 Which organizations have the highest climate change adaptation budgets in 2023?,"CREATE TABLE climate_adaptation (organization VARCHAR(50), year INT, budget FLOAT); ","SELECT organization, budget FROM climate_adaptation WHERE year = 2023 ORDER BY budget DESC LIMIT 5;","SELECT organization, MAX(budget) FROM climate_adaptation WHERE year = 2023 GROUP BY organization;",0 "Add a column ""sustainability_rating"" to the ""buildings"" table","CREATE TABLE buildings (building_id INT, property_id INT, building_name VARCHAR(255), sustainability_rating INT);",ALTER TABLE buildings ADD COLUMN sustainability_rating INT;,"INSERT INTO buildings (building_id, property_id, building_name, sustainability_rating) VALUES (1, 'House', 'House', 'House', 'House'), (2, 'House', 'House', 'House', 'House'), (3, 'House', 'House', 'House', 'House'), (4, 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', 'House', ",0 What is the score of match 15?,"CREATE TABLE table_name_30 (score VARCHAR, match_no VARCHAR);","SELECT score FROM table_name_30 WHERE match_no = ""15"";","SELECT score FROM table_name_30 WHERE match_no = ""15"";",1 Name the german voice actor for alain dorval,"CREATE TABLE table_14960574_6 (german_voice_actor VARCHAR, french_voice_actor VARCHAR);","SELECT german_voice_actor FROM table_14960574_6 WHERE french_voice_actor = ""Alain Dorval"";","SELECT german_voice_actor FROM table_14960574_6 WHERE french_voice_actor = ""Alain Dorval"";",1 "Which Pick # has a Nationality of canada, and a Team from of sudbury wolves?","CREATE TABLE table_name_44 (pick__number INTEGER, nationality VARCHAR, team_from VARCHAR);","SELECT MIN(pick__number) FROM table_name_44 WHERE nationality = ""canada"" AND team_from = ""sudbury wolves"";","SELECT SUM(pick__number) FROM table_name_44 WHERE nationality = ""canada"" AND team_from = ""sudbury wolves"";",0 What is the average claim amount and number of claims for policyholders who are male and have a policy type of 'Auto'?,"CREATE TABLE Policyholders (Id INT PRIMARY KEY, FirstName VARCHAR(50), LastName VARCHAR(50), Age INT, Gender VARCHAR(10)); CREATE TABLE Policies (Id INT PRIMARY KEY, PolicyholderId INT, PolicyType VARCHAR(50), CoverageAmount DECIMAL(10,2), FOREIGN KEY (PolicyholderId) REFERENCES Policyholders(Id)); CREATE TABLE Claims (Id INT PRIMARY KEY, PolicyId INT, ClaimAmount DECIMAL(10,2), ClaimDate DATE, FOREIGN KEY (PolicyId) REFERENCES Policies(Id));","SELECT P.Gender, PL.PolicyType, AVG(C.ClaimAmount) as AverageClaimAmount, COUNT(C.Id) as NumberOfClaims FROM Policyholders P JOIN Policies PL ON P.Id = PL.PolicyholderId JOIN Claims C ON PL.Id = C.PolicyId WHERE P.Gender = 'Male' AND PL.PolicyType = 'Auto' GROUP BY P.Gender, PL.PolicyType ORDER BY AverageClaimAmount DESC;","SELECT AVG(Claims.ClaimAmount) AS AvgClaimAmount, COUNT(Claims.Id) AS NumberOfClaims FROM Claims INNER JOIN Policyholders ON Claims.PolicyId = Policyholders.Id INNER JOIN Policies ON Claims.PolicyId = Policies.PolicyId WHERE Policyholders.Gender = 'Male' AND Policies.PolicyType = 'Auto';",0 Insert a new record for gold production in Q1 2021,"mining_production(mine_id, product, production_quantity, production_date)","INSERT INTO mining_production (mine_id, product, production_quantity, production_date) VALUES (1, 'gold', 1500, '2021-04-01');","INSERT INTO mining_production (mine_id, product, production_quantity, production_date) VALUES (1, 'Gold', '2021-07-01'), (2, 'Gold', '2021-09-30'), (3, 'Gold', '2021-09-30'), (4, 'Gold', '2021-09-30'), (5, 'Gold', '2021-09-30'), (5, 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', 'Gold', '",0 What is the maximum rainfall recorded in Washington in the past month?,"CREATE TABLE Weather (location VARCHAR(50), rainfall INT, timestamp TIMESTAMP);",SELECT MAX(rainfall) FROM Weather WHERE location = 'Washington' AND timestamp > NOW() - INTERVAL '1 month';,"SELECT MAX(rainfall) FROM Weather WHERE location = 'Washington' AND timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH);",0 What 2002 tournament has 2008 career statistics?,CREATE TABLE table_name_21 (Id VARCHAR);,"SELECT 2002 FROM table_name_21 WHERE 2008 = ""career statistics"";","SELECT 2002 FROM table_name_21 WHERE 2008 = ""career statistics"";",1 What is the average treatment cost for patients with depression who have completed a treatment program?,"CREATE TABLE PatientTreatmentCosts (PatientID INT, Condition VARCHAR(50), TreatmentCost DECIMAL(10,2), CompletedProgram BOOLEAN);",SELECT AVG(TreatmentCost) FROM PatientTreatmentCosts WHERE Condition = 'depression' AND CompletedProgram = TRUE;,SELECT AVG(TreatmentCost) FROM PatientTreatmentCosts WHERE Condition = 'Depression' AND CompletedProgram = TRUE;,0 What is the dma when the format is rhythmic contemporary?,"CREATE TABLE table_19131921_1 (dma INTEGER, format VARCHAR);","SELECT MIN(dma) FROM table_19131921_1 WHERE format = ""Rhythmic Contemporary"";","SELECT MAX(dma) FROM table_19131921_1 WHERE format = ""Rhythmic Contemporary"";",0 What is thursday day five when friday day six is პარასკევი p'arask'evi?,"CREATE TABLE table_1277350_7 (thursday_day_five VARCHAR, friday_day_six VARCHAR);","SELECT thursday_day_five FROM table_1277350_7 WHERE friday_day_six = ""პარასკევი p'arask'evi"";","SELECT thursday_day_five FROM table_1277350_7 WHERE friday_day_six = "" p'arask'evi"";",0 Who is that player from South Africa who had a total score under 293?,"CREATE TABLE table_name_93 (player VARCHAR, total VARCHAR, country VARCHAR);","SELECT player FROM table_name_93 WHERE total < 293 AND country = ""south africa"";","SELECT player FROM table_name_93 WHERE total 293 AND country = ""south africa"";",0 What is the average Year for the Royal Canadian Mint Engravers Artist when the Mintage is under 200?,"CREATE TABLE table_name_35 (year INTEGER, artist VARCHAR, mintage VARCHAR);","SELECT AVG(year) FROM table_name_35 WHERE artist = ""royal canadian mint engravers"" AND mintage < 200;","SELECT AVG(year) FROM table_name_35 WHERE artist = ""royal canadian mint engravingers"" AND mintage 200;",0 How many carbon offset initiatives have been launched by the city government of Paris in the last 2 years?,"CREATE TABLE carbon_offset_initiatives (initiative_id INT, initiative_name VARCHAR(100), launch_date DATE, city VARCHAR(100)); ","SELECT COUNT(*) FROM carbon_offset_initiatives WHERE city = 'Paris' AND launch_date >= DATE_SUB(CURRENT_DATE, INTERVAL 2 YEAR);","SELECT COUNT(*) FROM carbon_offset_initiatives WHERE city = 'Paris' AND launch_date >= DATEADD(year, -2, GETDATE());",0 How many safety incidents were reported at the facility located in the Southeast region in 2022?,"CREATE TABLE Incidents (facility VARCHAR(20), year INT, incidents INT); ",SELECT incidents FROM Incidents WHERE facility = 'Southeast' AND year = 2022;,SELECT SUM(incidents) FROM Incidents WHERE facility = 'Southeast' AND year = 2022;,0 "How many articles were published in French and English news websites in 2021, and what is the total word count for each language?","CREATE TABLE articles (id INT, title VARCHAR(255), publish_date DATE, language VARCHAR(5), word_count INT, website VARCHAR(255)); ","SELECT language, COUNT(*) as article_count, SUM(word_count) as total_word_count FROM articles WHERE publish_date >= '2021-01-01' AND publish_date < '2022-01-01' GROUP BY language;","SELECT language, COUNT(*) as article_count, SUM(word_count) as total_word_count FROM articles WHERE YEAR(publish_date) = 2021 AND language IN ('French', 'English') GROUP BY language;",0 What party was Lane Evans?,"CREATE TABLE table_1341568_14 (party VARCHAR, incumbent VARCHAR);","SELECT party FROM table_1341568_14 WHERE incumbent = ""Lane Evans"";","SELECT party FROM table_1341568_14 WHERE incumbent = ""Lane Evans"";",1 Name the 2nd runner-up for yuming lai (賴銘偉),CREATE TABLE table_name_89 (winner VARCHAR);,"SELECT 2 AS nd_runner_up FROM table_name_89 WHERE winner = ""yuming lai (賴銘偉)"";","SELECT 2 AS nd_runner_up FROM table_name_89 WHERE winner = ""yuming lai ()"";",0 What date was the U21 pennant laid down?,"CREATE TABLE table_name_26 (laid_down VARCHAR, pennant VARCHAR);","SELECT laid_down FROM table_name_26 WHERE pennant = ""u21"";","SELECT laid_down FROM table_name_26 WHERE pennant = ""u21"";",1 What is the maximum price of halal-certified makeup products?,"CREATE TABLE products (product_id INT, product_name VARCHAR(100), price DECIMAL(5,2), is_halal_certified BOOLEAN, category VARCHAR(50));",SELECT MAX(price) FROM products WHERE category = 'Makeup' AND is_halal_certified = TRUE;,SELECT MAX(price) FROM products WHERE is_halal_certified = true AND category ='makeup';,0 "What is the total quantity of containers loaded on vessels in the ports of Oakland and Seattle for the year 2020, excluding vessels that have less than 500 containers?","CREATE TABLE port (port_id INT, port_name VARCHAR(50)); CREATE TABLE vessels (vessel_id INT, port_id INT, quantity_containers INT, year INT); ",SELECT SUM(quantity_containers) FROM vessels JOIN port ON vessels.port_id = port.port_id WHERE (port.port_name = 'Oakland' OR port.port_name = 'Seattle') AND vessels.year = 2020 AND vessels.quantity_containers >= 500;,"SELECT SUM(quantity_containers) FROM vessels JOIN port ON vessels.port_id = port.port_id WHERE port.port_name IN ('Oakland', 'Seattle') AND vessels.year = 2020 AND vessels.quantity_containers 500;",0 What is the total amount of foreign aid received by indigenous communities in rural Mexico for community development projects in the last 3 years?,"CREATE TABLE aid (aid_id INT, country TEXT, community TEXT, year INT, amount FLOAT); ",SELECT SUM(amount) as total_aid FROM aid WHERE country = 'Mexico' AND community IS NOT NULL AND year BETWEEN (SELECT EXTRACT(YEAR FROM CURRENT_DATE) - 3) AND (SELECT EXTRACT(YEAR FROM CURRENT_DATE));,SELECT SUM(amount) FROM aid WHERE country = 'Mexico' AND community = 'Indigenous' AND year BETWEEN 2017 AND 2021;,0 What is the total quantity of size 16 clothing items sold in the US and Canada?,"CREATE TABLE Inventory (item_id INT, item_size INT, item_price DECIMAL(5,2), quantity INT); CREATE TABLE Orders (order_id INT, order_date DATE, item_id INT, customer_country VARCHAR(20)); ",SELECT SUM(Inventory.quantity) FROM Inventory JOIN Orders ON Inventory.item_id = Orders.item_id WHERE (Orders.customer_country = 'USA' OR Orders.customer_country = 'Canada') AND Inventory.item_size = 16;,"SELECT SUM(quantity) FROM Inventory i JOIN Orders o ON i.item_id = o.item_id WHERE i.item_size = 16 AND o.customer_country IN ('USA', 'Canada');",0 What is the best time for a team with a first-qualifying time of 59.448?,"CREATE TABLE table_name_6 (best VARCHAR, qual_1 VARCHAR);","SELECT best FROM table_name_6 WHERE qual_1 = ""59.448"";","SELECT best FROM table_name_6 WHERE qual_1 = ""59.448"";",1 "List all market approvals, including those without any drugs approved, for a specific region in the 'market_approvals' and 'drugs' tables?","CREATE TABLE market_approvals (market_approval_id INT, region_id INT, approval_date DATE); CREATE TABLE drugs (drug_id INT, drug_name TEXT, market_approval_id INT); ","SELECT ma.approval_date, COALESCE(COUNT(d.drug_id), 0) AS drug_count FROM market_approvals ma LEFT JOIN drugs d ON ma.market_approval_id = d.market_approval_id WHERE ma.region_id = 1 GROUP BY ma.approval_date;","SELECT m.region_id, m.approval_date, d.drug_name FROM market_approvals m JOIN drugs d ON m.region_id = d.market_approval_id GROUP BY m.region_id, d.drug_name;",0 What is the total amount donated by each donor in the past year?,"CREATE TABLE Donors (DonorID INT, Name TEXT, TotalDonation DECIMAL(10,2)); ","SELECT Name, SUM(TotalDonation) FROM Donors WHERE DonationDate >= DATEADD(year, -1, GETDATE()) GROUP BY Name;","SELECT Name, SUM(TotalDonation) as TotalDonation FROM Donors WHERE TotalDonation >= 0 AND TotalDonation >= 0 GROUP BY Name;",0 "What city is ranked greater than 6, and the airport is St. Petersburg/Clearwater (PIE)","CREATE TABLE table_name_79 (city VARCHAR, rank VARCHAR, airport VARCHAR);","SELECT city FROM table_name_79 WHERE rank > 6 AND airport = ""st. petersburg/clearwater (pie)"";","SELECT city FROM table_name_79 WHERE rank > 6 AND airport = ""st. petersburg/clearwater (pei)"";",0 What is the maximum depth of any marine life research station in the Pacific ocean?,"CREATE TABLE marine_life (id INT, name TEXT, region TEXT, depth FLOAT); ",SELECT MAX(depth) FROM marine_life WHERE region = 'Pacific';,SELECT MAX(depth) FROM marine_life WHERE region = 'Pacific';,1 Show the names of all players who have played more than 50 hours on any game,"CREATE TABLE players (player_id INT, name VARCHAR(255)); CREATE TABLE player_games (player_id INT, game_id INT, hours_played INT);",SELECT players.name FROM players JOIN player_games ON players.player_id = player_games.player_id WHERE player_games.hours_played > 50;,SELECT players.name FROM players INNER JOIN player_games ON players.player_id = player_games.player_id WHERE player_games.hours_played > 50;,0 Show the names and ages of clients who invested in all types of investments?,"CREATE TABLE clients (client_id INT, name TEXT, age INT, gender TEXT); CREATE TABLE investments (client_id INT, investment_type TEXT); ","SELECT c.name, c.age FROM clients c WHERE c.client_id IN (SELECT i1.client_id FROM investments i1 GROUP BY i1.client_id HAVING COUNT(DISTINCT i1.investment_type) = (SELECT COUNT(DISTINCT investment_type) FROM investments));","SELECT c.name, c.age FROM clients c INNER JOIN investments i ON c.client_id = i.client_id WHERE i.investment_type = 'Investment';",0 List all transactions and customers from the 'Africa' region.,"CREATE TABLE customers (customer_id INT, name VARCHAR(50), region VARCHAR(50)); CREATE TABLE transactions (transaction_id INT, customer_id INT, transaction_value DECIMAL(10, 2)); ","SELECT customers.name, transactions.transaction_id, transactions.transaction_value FROM customers JOIN transactions ON customers.customer_id = transactions.customer_id WHERE customers.region = 'Africa';","SELECT t.transaction_id, t.customer_id, t.transaction_value FROM transactions t JOIN customers c ON t.customer_id = c.customer_id WHERE c.region = 'Africa';",0 "When the laps driven were under 9 and the time/retired recorded was engine, what's the total number of grid values?","CREATE TABLE table_name_69 (grid VARCHAR, laps VARCHAR, time_retired VARCHAR);","SELECT COUNT(grid) FROM table_name_69 WHERE laps < 9 AND time_retired = ""engine"";","SELECT COUNT(grid) FROM table_name_69 WHERE laps 9 AND time_retired = ""engine"";",0 What is the average production of Neodymium in North America per year?,"CREATE TABLE neodymium_production (year INT, region VARCHAR(20), quantity INT); ","SELECT AVG(quantity) FROM neodymium_production WHERE region IN ('USA', 'Canada') AND element = 'Neodymium';",SELECT AVG(quantity) FROM neodymium_production WHERE region = 'North America';,0 What is the change in average property price in inclusive housing policies compared to standard housing?,"CREATE TABLE property_prices ( id INT PRIMARY KEY, price FLOAT, policy_type VARCHAR(255) ); ",SELECT AVG(pp1.price) - AVG(pp2.price) FROM property_prices pp1 JOIN property_prices pp2 ON pp1.id = pp2.id + 1 WHERE pp1.policy_type = 'inclusive' AND pp2.policy_type = 'standard';,SELECT AVG(price) - AVG(price) FROM property_prices WHERE policy_type = 'inclusive';,0 What is the capacity for the Home Venue of the New Zealand Breakers club?,"CREATE TABLE table_283203_1 (capacity VARCHAR, club VARCHAR);","SELECT capacity FROM table_283203_1 WHERE club = ""New Zealand Breakers"";","SELECT capacity FROM table_283203_1 WHERE club = ""New Zealand Breakers"";",1 Which continent has the most diverse languages?,"CREATE TABLE countrylanguage (CountryCode VARCHAR); CREATE TABLE country (Continent VARCHAR, Code VARCHAR);",SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1;,SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1;,1 How many bridges are there in New York with a length greater than 500 feet?,"CREATE TABLE Bridges (BridgeID int, State varchar(2), Length int); ",SELECT COUNT(*) FROM Bridges WHERE State = 'NY' AND Length > 500;,SELECT COUNT(*) FROM Bridges WHERE State = 'New York' AND Length > 500;,0 "List the labor productivity metrics for each mine, including the total amount of minerals extracted, the number of employees, and the total operational costs. Calculate the productivity metric for each mine.","CREATE TABLE labor_productivity (mine_id INT, amount_extracted INT, num_employees INT, operational_costs INT); CREATE TABLE mines (mine_id INT, mine_name TEXT); ","SELECT m.mine_name, AVG(lp.amount_extracted / lp.num_employees) AS productivity_metric FROM labor_productivity lp JOIN mines m ON lp.mine_id = m.mine_id GROUP BY m.mine_name;","SELECT m.mine_name, SUM(lp.amount_extracted) AS total_minerals, SUM(lp.num_employees) AS total_employees, SUM(lp.operational_costs) AS total_operational_costs FROM labor_productivity lp JOIN mines m ON lp.mine_id = m.mine_id GROUP BY m.mine_name;",0 what is the highest year that the U.S. captain is ken venturi?,"CREATE TABLE table_name_61 (year INTEGER, us_captain VARCHAR);","SELECT MAX(year) FROM table_name_61 WHERE us_captain = ""ken venturi"";","SELECT MAX(year) FROM table_name_61 WHERE us_captain = ""ken venturi"";",1 Find the most recent cybersecurity incident for each country.,"CREATE TABLE CountryIncidents (Country varchar(50), IncidentID int, IncidentDate date); ","SELECT Country, MAX(IncidentDate) as MaxDate FROM CountryIncidents GROUP BY Country;","SELECT Country, MAX(IncidentDate) FROM CountryIncidents GROUP BY Country;",0 Name the sum of year for connaught engineering and points less than 0,"CREATE TABLE table_name_49 (year INTEGER, entrant VARCHAR, points VARCHAR);","SELECT SUM(year) FROM table_name_49 WHERE entrant = ""connaught engineering"" AND points < 0;","SELECT SUM(year) FROM table_name_49 WHERE entrant = ""connaught engineering"" AND points 0;",0 What is the total biomass (in tons) of fish species in the fish_biomass_data table not included in the protected_species table?,"CREATE TABLE fish_biomass_data (species VARCHAR(50), biomass INT); CREATE TABLE protected_species (species VARCHAR(50)); ",SELECT SUM(fb.biomass) as total_biomass FROM fish_biomass_data fb WHERE fb.species NOT IN (SELECT ps.species FROM protected_species ps);,SELECT SUM(biomass) FROM fish_biomass_data WHERE species NOT IN (SELECT species FROM protected_species);,0 List all financial institutions that offer both Shariah-compliant and conventional loans.,"CREATE TABLE financial_institutions (id INT, name VARCHAR(255), type VARCHAR(255), location VARCHAR(255)); CREATE TABLE loans (id INT, institution_id INT, type VARCHAR(255), amount DECIMAL(10,2), date DATE); ",SELECT name FROM financial_institutions WHERE id IN (SELECT institution_id FROM loans WHERE type = 'Islamic') AND id IN (SELECT institution_id FROM loans WHERE type = 'Conventional');,SELECT f.name FROM financial_institutions f INNER JOIN loans l ON f.id = l.institution_id WHERE f.type = 'Shariah-compliant' INTERSECT SELECT f.name FROM financial_institutions f INNER JOIN loans l ON f.id = l.institution_id WHERE l.type = 'Conventional';,0 "Which result has a Goal of deacon 3/5, bridge 2/2?","CREATE TABLE table_name_38 (result VARCHAR, goals VARCHAR);","SELECT result FROM table_name_38 WHERE goals = ""deacon 3/5, bridge 2/2"";","SELECT result FROM table_name_38 WHERE goals = ""deacon 3/5, bridge 2/2"";",1 Remove the electric vehicle charging station with ID 303 from the electric_vehicle_charging_stations table,"CREATE TABLE electric_vehicle_charging_stations (station_id INT, station_name TEXT, level_1 BOOLEAN, level_2 BOOLEAN, level_3 BOOLEAN, city TEXT, country TEXT);",DELETE FROM electric_vehicle_charging_stations WHERE station_id = 303;,DELETE FROM electric_vehicle_charging_stations WHERE station_id = 303;,1 How many drought-affected areas were there in the year 2020 and what was the average water consumption in those areas?,"CREATE TABLE drought_areas (id INT, area VARCHAR(50), event_date DATE, water_consumption FLOAT); ","SELECT area, AVG(water_consumption) as avg_water_consumption FROM drought_areas WHERE YEAR(event_date) = 2020 GROUP BY area;","SELECT COUNT(*), AVG(water_consumption) FROM drought_areas WHERE event_date BETWEEN '2020-01-01' AND '2020-12-31';",0 Identify the number of electric vehicles in Paris per month.,"CREATE TABLE paris_evs (id INT, vehicle_type VARCHAR(20), registration_date DATE);","SELECT EXTRACT(MONTH FROM registration_date) AS month, COUNT(*) FROM paris_evs WHERE vehicle_type = 'electric' GROUP BY month;","SELECT EXTRACT(MONTH FROM registration_date) AS month, COUNT(*) FROM paris_evs WHERE vehicle_type = 'Electric' GROUP BY month;",0 What is the model of the enginge d5252 t?,"CREATE TABLE table_1147701_5 (model_name VARCHAR, engine_code VARCHAR);","SELECT model_name FROM table_1147701_5 WHERE engine_code = ""D5252 T"";","SELECT model_name FROM table_1147701_5 WHERE engine_code = ""D5252 T"";",1 What was the method in round 1 of the UFC 20 event?,"CREATE TABLE table_name_87 (method VARCHAR, round VARCHAR, event VARCHAR);","SELECT method FROM table_name_87 WHERE round = 1 AND event = ""ufc 20"";","SELECT method FROM table_name_87 WHERE round = 1 AND event = ""ufc 20"";",1 Who is the designer of the Christmas: Winter Fun (USA) stamp?,"CREATE TABLE table_11900773_6 (design VARCHAR, theme VARCHAR);","SELECT design FROM table_11900773_6 WHERE theme = ""Christmas: Winter Fun (USA)"";","SELECT design FROM table_11900773_6 WHERE theme = ""Christmas: Winter Fun (USA)"";",1 Insert new record into ai_ethics table for 'Tegnbit' with 'Machine Learning' method in 2021,"CREATE TABLE ai_ethics (tool VARCHAR(255), method VARCHAR(255), year INT, ethical_rating FLOAT);","INSERT INTO ai_ethics (tool, method, year, ethical_rating) VALUES ('Tegnbit', 'Machine Learning', 2021, NULL);","INSERT INTO ai_ethics (tool, method, year, ethical_rating) VALUES ('Tegnbit', 'Machine Learning', 2021);",0 What round was the gto winning team #48 greenwood racing?,"CREATE TABLE table_13657883_2 (rnd VARCHAR, gto_winning_team VARCHAR);","SELECT rnd FROM table_13657883_2 WHERE gto_winning_team = ""#48 Greenwood Racing"";","SELECT rnd FROM table_13657883_2 WHERE gto_winning_team = ""#48 Greenwood Racing"";",1 What is the highest value in April with a record of 35–37–11 and more than 81 points?,"CREATE TABLE table_name_99 (april INTEGER, record VARCHAR, points VARCHAR);","SELECT MAX(april) FROM table_name_99 WHERE record = ""35–37–11"" AND points > 81;","SELECT MAX(april) FROM table_name_99 WHERE record = ""35–37–11"" AND points > 81;",1 Which home team had a score of 100-86?,"CREATE TABLE table_name_29 (home_team VARCHAR, score VARCHAR);","SELECT home_team FROM table_name_29 WHERE score = ""100-86"";","SELECT home_team FROM table_name_29 WHERE score = ""100-86"";",1 How many times has each artwork been viewed by visitors from different countries?,"CREATE TABLE artworks (id INT, name TEXT); CREATE TABLE views (id INT, visitor_id INT, artwork_id INT, country TEXT); ","SELECT artwork_id, country, COUNT(DISTINCT visitor_id) FROM views GROUP BY artwork_id, country;","SELECT artworks.name, COUNT(views.id) FROM artworks INNER JOIN views ON artworks.id = views.artwork_id GROUP BY artworks.name;",0 "What position belonged to the player from Paramus, New Jersey?","CREATE TABLE table_11677691_10 (position VARCHAR, hometown VARCHAR);","SELECT position FROM table_11677691_10 WHERE hometown = ""Paramus, New Jersey"";","SELECT position FROM table_11677691_10 WHERE hometown = ""Paramus, New Jersey"";",1 "Identify the garment with the highest sales for each transaction, partitioned by salesperson and ordered by date.","CREATE TABLE sales (salesperson VARCHAR(50), garment VARCHAR(50), quantity INT, transaction_date DATE); ","SELECT salesperson, transaction_date, FIRST_VALUE(garment) OVER (PARTITION BY salesperson ORDER BY quantity DESC, transaction_date DESC) as top_garment FROM sales;","SELECT salesperson, garment, SUM(quantity) as total_sales FROM sales GROUP BY salesperson, garment ORDER BY total_sales DESC;",0 Who are all the writers of episodes in season 24?,"CREATE TABLE table_25800134_2 (writer_s_ VARCHAR, season__number VARCHAR);",SELECT writer_s_ FROM table_25800134_2 WHERE season__number = 24;,SELECT writer_s_ FROM table_25800134_2 WHERE season__number = 24;,1 Who are the language preservation organizations in France?,"CREATE TABLE Orgs (OrgID INT, Name TEXT, Type TEXT); ",SELECT Name FROM Orgs WHERE Type = 'Language Preservation' AND Country = 'France';,SELECT Name FROM Orgs WHERE Type = 'Language Preservation' AND Country = 'France';,1 "What is the minimum number of peacekeeping personnel trained by the African Union in cybersecurity between 2016 and 2020, inclusive?","CREATE TABLE peacekeeping_training(id INT, personnel_id INT, trained_by VARCHAR(255), trained_in VARCHAR(255), training_year INT); ",SELECT MIN(personnel_id) FROM peacekeeping_training WHERE trained_by = 'AU' AND trained_in = 'Cybersecurity' AND training_year BETWEEN 2016 AND 2020;,SELECT MIN(personnel_id) FROM peacekeeping_training WHERE trained_by = 'African Union' AND trained_in = 'Cybersecurity' AND training_year BETWEEN 2016 AND 2020;,0 What is the total capacity of renewable energy plants in Japan?,"CREATE TABLE renewable_plants (id INT PRIMARY KEY, country VARCHAR(50), name VARCHAR(50), capacity FLOAT); ",SELECT SUM(capacity) FROM renewable_plants WHERE country = 'Japan';,SELECT SUM(capacity) FROM renewable_plants WHERE country = 'Japan';,1 What is the total number of sustainable tours in Canada?,"CREATE TABLE sustainable_tours (tour_id INT, tour_name TEXT, country TEXT); ",SELECT COUNT(*) FROM sustainable_tours WHERE country = 'Canada';,SELECT COUNT(*) FROM sustainable_tours WHERE country = 'Canada';,1 What is the total for Austria when there is less than 1 bronze?,"CREATE TABLE table_name_47 (total INTEGER, nation VARCHAR, bronze VARCHAR);","SELECT AVG(total) FROM table_name_47 WHERE nation = ""austria"" AND bronze < 1;","SELECT SUM(total) FROM table_name_47 WHERE nation = ""austria"" AND bronze 1;",0 Catalog Nebdj068 was released when?,"CREATE TABLE table_name_26 (date VARCHAR, catalog VARCHAR);","SELECT date FROM table_name_26 WHERE catalog = ""nebdj068"";","SELECT date FROM table_name_26 WHERE catalog = ""nebdj068"";",1 What is the number of cases won by attorneys with more than 10 years of experience?,"CREATE TABLE attorneys (attorney_id INT, years_of_experience INT, cases_handled INT); CREATE TABLE case_outcomes (case_id INT, attorney_id INT, won BOOLEAN); ",SELECT COUNT(*) FROM case_outcomes INNER JOIN attorneys ON case_outcomes.attorney_id = attorneys.attorney_id WHERE attorneys.years_of_experience > 10 AND case_outcomes.won = true;,SELECT COUNT(*) FROM case_outcomes JOIN attorneys ON case_outcomes.attorney_id = attorneys.attorney_id WHERE attorneys.years_of_experience > 10;,0 Who were the scorers in round 3?,"CREATE TABLE table_name_83 (scorers VARCHAR, round VARCHAR);","SELECT scorers FROM table_name_83 WHERE round = ""round 3"";",SELECT scorers FROM table_name_83 WHERE round = 3;,0 What is the incidence rate of tuberculosis in Eastern Europe since 2015?,"CREATE TABLE tb (country VARCHAR(255), region VARCHAR(255), year INT, rate DECIMAL(5,2)); ","SELECT country, AVG(rate) FROM tb WHERE region = 'Eastern Europe' AND year >= 2015 GROUP BY country;",SELECT rate FROM tb WHERE region = 'Eastern Europe' AND year >= 2015;,0 "Which are the longest pipelines and their respective types, constructed between 1985 and 2000?","CREATE TABLE pipelines (id INT, name TEXT, location TEXT, length INT, type TEXT, year INT); ","SELECT name, type, length FROM pipelines WHERE year > 1985 AND year < 2000 ORDER BY length DESC;","SELECT name, type, length FROM pipelines WHERE year BETWEEN 1985 AND 2000 ORDER BY length DESC LIMIT 1;",0 "Add a new program named ""Environmental Education"" that started on 2022-01-01 and is not discontinued.","CREATE TABLE programs (id INT, program_name TEXT, start_date DATE, is_discontinued BOOLEAN);","INSERT INTO programs (program_name, start_date, is_discontinued) VALUES ('Environmental Education', '2022-01-01', FALSE);","INSERT INTO programs (program_name, start_date, is_discontinued) VALUES ('Environmental Education', '2022-01-01', true);",0 "What is the average age of female turtles in the ""turtles"" table?","CREATE TABLE turtles (id INT, name VARCHAR(20), species VARCHAR(20), age INT, gender VARCHAR(10)); ",SELECT AVG(age) FROM turtles WHERE gender = 'Female' AND species = 'Turtle';,SELECT AVG(age) FROM turtles WHERE gender = 'Female';,0 "On what date was the attendance of the crowd 78,431?","CREATE TABLE table_name_54 (date VARCHAR, attendance VARCHAR);","SELECT date FROM table_name_54 WHERE attendance = ""78,431"";","SELECT date FROM table_name_54 WHERE attendance = ""78,431"";",1 What is the name and country of manufacturers who are not certified fair trade?,"CREATE TABLE manufacturers (id INT, name VARCHAR(255), country VARCHAR(255), certified_fair_trade BOOLEAN); ","SELECT name, country FROM manufacturers WHERE certified_fair_trade = false;","SELECT name, country FROM manufacturers WHERE certified_fair_trade = false;",1 Who are the top 5 donors by total donation amount in 2022?,"CREATE TABLE Donors (DonorID INT, DonorName VARCHAR(50)); CREATE TABLE Donations (DonationID INT, DonorID INT, DonationDate DATE, Amount DECIMAL(10,2)); ","SELECT DonorName, SUM(Amount) as TotalDonation FROM Donors INNER JOIN Donations ON Donors.DonorID = Donations.DonorID WHERE YEAR(DonationDate) = 2022 GROUP BY DonorName ORDER BY TotalDonation DESC LIMIT 5;","SELECT DonorName, SUM(Amount) as TotalDonation FROM Donations JOIN Donors ON Donations.DonorID = Donors.DonorID WHERE YEAR(DonationDate) = 2022 GROUP BY DonorName ORDER BY TotalDonation DESC LIMIT 5;",0 What are the ends for the player with a transfer fee of loan?,"CREATE TABLE table_name_33 (ends VARCHAR, transfer_fee VARCHAR);","SELECT ends FROM table_name_33 WHERE transfer_fee = ""loan"";","SELECT ends FROM table_name_33 WHERE transfer_fee = ""loan"";",1 Calculate the average grant amount for successful grant applications in the Engineering department.,"CREATE TABLE grant_applications (id INT, status VARCHAR(10), department VARCHAR(50), amount DECIMAL(10,2));",SELECT AVG(amount) FROM grant_applications WHERE status = 'successful' AND department = 'Engineering';,SELECT AVG(amount) FROM grant_applications WHERE status = 'Successful' AND department = 'Engineering';,0 "What is the total production quantity of Scandium and Terbium combined for each year, for companies located in the Europe region?","CREATE TABLE Producers (ProducerID INT PRIMARY KEY, Name TEXT, ProductionYear INT, RareEarth TEXT, Quantity INT, Location TEXT);","SELECT ProductionYear, SUM(Quantity) FROM Producers WHERE (RareEarth = 'Scandium' OR RareEarth = 'Terbium') AND Location LIKE '%Europe%' GROUP BY ProductionYear ORDER BY ProductionYear ASC;","SELECT ProductionYear, SUM(Quantity) FROM Producers WHERE RareEarth IN ('Scandium', 'Terbium') AND Location = 'Europe' GROUP BY ProductionYear;",0 Which player is Andre Owens in Year for Jazz?,"CREATE TABLE table_name_38 (years_for_jazz VARCHAR, player VARCHAR);","SELECT years_for_jazz FROM table_name_38 WHERE player = ""andre owens"";","SELECT years_for_jazz FROM table_name_38 WHERE player = ""andre owens"";",1 Delete cargo records that have been at the destination for over a year,"CREATE SCHEMA if not exists ocean_shipping;CREATE TABLE if not exists ocean_shipping.cargo (id INT, cargo_type VARCHAR(255), arrived_at DATE);","DELETE FROM ocean_shipping.cargo WHERE arrived_at < DATE_SUB(CURRENT_DATE, INTERVAL 365 DAY);","DELETE FROM ocean_shipping.cargo WHERE arrived_at > DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 What is the sum of all road lengths in 'Central America'?,"CREATE TABLE Roads (id INT, name TEXT, country TEXT, length FLOAT); ",SELECT SUM(length) FROM Roads WHERE country IN (SELECT name FROM Countries WHERE continent = 'Central America');,SELECT SUM(length) FROM Roads WHERE country = 'Central America';,0 What is the season # when ther are 5.3 million U.S viewers?,"CREATE TABLE table_29102612_1 (season__number INTEGER, us_viewers__millions_ VARCHAR);","SELECT MAX(season__number) FROM table_29102612_1 WHERE us_viewers__millions_ = ""5.3"";","SELECT MAX(season__number) FROM table_29102612_1 WHERE us_viewers__millions_ = ""5.3"";",1 Delete records with a TotalDonation less than $100.,"CREATE TABLE Donors (DonorID INT, DonorName VARCHAR(50), TotalDonation DECIMAL(10,2));",DELETE FROM Donors WHERE TotalDonation < 100;,DELETE FROM Donors WHERE TotalDonation 100;,0 Who is in February where has September is kristine hanson?,"CREATE TABLE table_name_13 (february VARCHAR, september VARCHAR);","SELECT february FROM table_name_13 WHERE september = ""kristine hanson"";","SELECT february FROM table_name_13 WHERE september = ""kristine hanson"";",1 what is the maximum freight (metric tonnes) with airport being liverpool,"CREATE TABLE table_13836704_9 (freight__metric_tonnes_ INTEGER, airport VARCHAR);","SELECT MAX(freight__metric_tonnes_) FROM table_13836704_9 WHERE airport = ""Liverpool"";","SELECT MAX(freight__metric_tonnes_) FROM table_13836704_9 WHERE airport = ""Liverpool"";",1 Which departments had the most budget cuts in 'budget' table?,"CREATE TABLE budget (program_id INT, program_name VARCHAR(255), budget DECIMAL(10,2), fiscal_year INT);","SELECT program_name, (LAG(budget, 1) OVER (ORDER BY fiscal_year) - budget) AS budget_cuts FROM budget WHERE (LAG(budget, 1) OVER (ORDER BY fiscal_year) - budget) = (SELECT MAX((LAG(budget, 1) OVER (ORDER BY fiscal_year) - budget)) FROM budget) ORDER BY budget_cuts DESC LIMIT 1;","SELECT program_name, SUM(budget) as total_budget_cuts FROM budget GROUP BY program_name ORDER BY total_budget_cuts DESC;",0 How many intelligence personnel have been deployed in Operation Enduring Freedom?,"CREATE TABLE intelligence_personnel (personnel_id INT PRIMARY KEY, operation_name VARCHAR(255), personnel_count INT); ",SELECT personnel_count FROM intelligence_personnel WHERE operation_name = 'Operation Enduring Freedom';,SELECT personnel_count FROM intelligence_personnel WHERE operation_name = 'Operation Enduring Freedom';,1 Identify the restaurants that serve vegan dishes.,"CREATE TABLE menu_items_all_restaurants (id INT, name VARCHAR(50), vegetarian BOOLEAN, vegan BOOLEAN, restaurant_id INT); ",SELECT restaurant_id FROM menu_items_all_restaurants WHERE vegan = true;,SELECT name FROM menu_items_all_restaurants WHERE vegan = true;,0 What is the mark for Grenada in group A?,"CREATE TABLE table_name_73 (mark VARCHAR, group VARCHAR, nationality VARCHAR);","SELECT mark FROM table_name_73 WHERE group = ""a"" AND nationality = ""grenada"";","SELECT mark FROM table_name_73 WHERE group = ""a"" AND nationality = ""grenada"";",1 Find the number of unique donors supporting literary arts programs and exhibitions.,"CREATE TABLE programs (id INT, type VARCHAR(20)); CREATE TABLE donations (id INT, program_id INT, donor_id INT); ","SELECT COUNT(DISTINCT d.donor_id) FROM donations d WHERE d.program_id IN (SELECT p.id FROM programs p WHERE p.type IN ('Literary Arts', 'Exhibition'));","SELECT COUNT(DISTINCT d.donor_id) FROM donations d JOIN programs p ON d.program_id = p.id WHERE p.type IN ('Literary Arts', 'Exhibition');",0 What is the minimum and maximum food justice score in Asia?,"CREATE TABLE food_justice_scores (country VARCHAR(50), score FLOAT); ","SELECT MIN(score), MAX(score) FROM food_justice_scores WHERE country IN ('India', 'China', 'Indonesia');","SELECT MIN(score) as min_score, MAX(score) as max_score FROM food_justice_scores WHERE country IN ('China', 'India', 'Japan', 'India');",0 Which Team 2 had a Team 1of joe public?,"CREATE TABLE table_name_52 (team_2 VARCHAR, team_1 VARCHAR);","SELECT team_2 FROM table_name_52 WHERE team_1 = ""joe public"";","SELECT team_2 FROM table_name_52 WHERE team_1 = ""joe public"";",1 What was the score at the end of the match number 4?,"CREATE TABLE table_19072602_1 (score VARCHAR, match_no VARCHAR);",SELECT score FROM table_19072602_1 WHERE match_no = 4;,SELECT score FROM table_19072602_1 WHERE match_no = 4;,1 What is the total revenue generated by sustainable tourism businesses in Asia in Q1 2023?,"CREATE TABLE Regions (id INT, name VARCHAR(255)); CREATE TABLE Businesses (id INT, region_id INT, type VARCHAR(255), revenue INT); ",SELECT SUM(b.revenue) as total_revenue FROM Businesses b JOIN Regions r ON b.region_id = r.id WHERE r.name = 'Asia' AND b.type = 'Sustainable' AND b.revenue IS NOT NULL AND QUARTER(b.revenue_date) = 1 AND YEAR(b.revenue_date) = 2023;,SELECT SUM(b.revenue) FROM Businesses b JOIN Regions r ON b.region_id = r.id WHERE b.type = 'Sustainable Tourism' AND r.name = 'Asia' AND q1 = 2023;,0 What transmitter location has digital power of 570kw?,"CREATE TABLE table_name_62 (transmitter_location VARCHAR, digital_power VARCHAR);","SELECT transmitter_location FROM table_name_62 WHERE digital_power = ""570kw"";","SELECT transmitter_location FROM table_name_62 WHERE digital_power = ""570kw"";",1 What is the total weight of recycled materials used by each manufacturer in the plastics industry?,"CREATE TABLE manufacturers (id INT, name TEXT, industry TEXT, weight FLOAT); CREATE TABLE recycled_materials (id INT, manufacturer_id INT, weight FLOAT); ","SELECT m.name, SUM(rm.weight) FROM manufacturers m JOIN recycled_materials rm ON m.id = rm.manufacturer_id WHERE m.industry = 'plastics' GROUP BY m.name;","SELECT manufacturers.name, SUM(recycled_materials.weight) FROM manufacturers INNER JOIN recycled_materials ON manufacturers.id = recycled_materials.manufacturer_id WHERE manufacturers.industry = 'plastics' GROUP BY manufacturers.name;",0 "Find all 200 meter and 300 meter results of swimmers with nationality ""Australia"".","CREATE TABLE swimmer (meter_200 VARCHAR, meter_300 VARCHAR, nationality VARCHAR);","SELECT meter_200, meter_300 FROM swimmer WHERE nationality = 'Australia';","SELECT meter_200, meter_300 FROM swimmer WHERE nationality = ""Australia"";",0 How many capacities are given for FF Jaro club?,"CREATE TABLE table_25129482_1 (capacity VARCHAR, club VARCHAR);","SELECT COUNT(capacity) FROM table_25129482_1 WHERE club = ""FF Jaro"";","SELECT COUNT(capacity) FROM table_25129482_1 WHERE club = ""FF Jaro"";",1 Find the number of affordable housing units in London built since 2010.,"CREATE TABLE London_Housing (Location VARCHAR(255), Year INT, Units INT, Affordable BOOLEAN); ",SELECT COUNT(*) FROM London_Housing WHERE Year >= 2010 AND Affordable = true;,SELECT SUM(Units) FROM London_Housing WHERE Year >= 2010 AND Affordable = TRUE;,0 "What is the number of electric vehicles sold in each country, grouped by manufacturer and year of sale?","CREATE TABLE electric_vehicles (id INT, country VARCHAR(100), manufacturer VARCHAR(50), year_of_sale INT, num_vehicles INT); ","SELECT country, manufacturer, YEAR(year_of_sale) AS sale_year, SUM(num_vehicles) AS total_sold FROM electric_vehicles GROUP BY country, manufacturer, YEAR(year_of_sale);","SELECT country, manufacturer, year_of_sale, SUM(num_vehicles) FROM electric_vehicles GROUP BY country, manufacturer, year_of_sale;",0 Show the names of members who are in both 'legal_services' and 'real_estate' unions.,"CREATE TABLE legal_services_union (id INT, name VARCHAR); CREATE TABLE real_estate_union (id INT, name VARCHAR); ",SELECT name FROM legal_services_union WHERE name IN (SELECT name FROM real_estate_union);,SELECT l.name FROM legal_services_union l LEFT JOIN real_estate_union r ON l.id = r.id;,0 What is the total revenue for 'Restaurant E' from sustainable sourced ingredients in the year 2022?,"CREATE TABLE revenue (restaurant_id INT, sustainable BOOLEAN, amount DECIMAL(10,2)); ",SELECT SUM(amount) FROM revenue WHERE restaurant_id = 5 AND sustainable = true;,SELECT SUM(amount) FROM revenue WHERE restaurant_id = 'Restaurant E' AND sustainable = true AND year = 2022;,0 What is the minimum number of students enrolled in a course in each department?,"CREATE TABLE departments (dept_id INT, dept_name TEXT); CREATE TABLE courses (course_id INT, course_name TEXT, dept_id INT, num_students INT); ","SELECT dept_name, MIN(num_students) as min_enrollment FROM departments JOIN courses ON departments.dept_id = courses.dept_id GROUP BY dept_name;","SELECT d.dept_name, MIN(c.num_students) FROM departments d JOIN courses c ON d.dept_id = c.dept_id GROUP BY d.dept_name;",0 "What are the top 5 most purchased lipsticks by customers located in California, considering sales from the past 6 months?","CREATE TABLE sales (product_id INT, product_name TEXT, customer_location TEXT, purchase_date DATE); ","SELECT product_name, COUNT(*) AS sales_count FROM sales WHERE customer_location = 'California' AND purchase_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) AND CURRENT_DATE GROUP BY product_name ORDER BY sales_count DESC LIMIT 5;","SELECT product_name, COUNT(*) as total_sales FROM sales WHERE customer_location = 'California' AND purchase_date >= DATEADD(month, -6, GETDATE()) GROUP BY product_name ORDER BY total_sales DESC LIMIT 5;",0 Which clinical trials had a higher total sales revenue than the average R&D expenditure for drugs approved in 2020?,"CREATE TABLE clinical_trials_3(trial_name TEXT, start_date DATE, end_date DATE, sales_revenue FLOAT, rd_expenditure FLOAT); CREATE TABLE drugs_4(drug_name TEXT, approval_year INT, rd_expenditure FLOAT); ",SELECT trial_name FROM clinical_trials_3 WHERE sales_revenue > (SELECT AVG(rd_expenditure) FROM drugs_4 WHERE approval_year = 2020);,SELECT trial_name FROM clinical_trials_3 WHERE sales_revenue > (SELECT AVG(rd_expenditure) FROM drugs_4 WHERE approval_year = 2020) AND rd_expenditure > (SELECT AVG(rd_expenditure) FROM drugs_4 WHERE approval_year = 2020);,0 "Which director had a worldwide gross of $30,471?","CREATE TABLE table_name_97 (director VARCHAR, gross__worldwide_ VARCHAR);","SELECT director FROM table_name_97 WHERE gross__worldwide_ = ""$30,471"";","SELECT director FROM table_name_97 WHERE gross__worldwide_ = ""$30,471"";",1 "List all employees with their corresponding job position, salary, and department from the 'employee', 'position', and 'department' tables","CREATE TABLE employee (id INT, name VARCHAR(50), gender VARCHAR(50), department_id INT, position_id INT, salary INT); CREATE TABLE position (id INT, title VARCHAR(50), department_id INT); CREATE TABLE department (id INT, name VARCHAR(50));","SELECT employee.name, position.title, employee.salary, department.name AS department_name FROM employee INNER JOIN position ON employee.position_id = position.id INNER JOIN department ON position.department_id = department.id;","SELECT e.name, e.position_id, e.salary, d.name FROM employee e INNER JOIN position p ON e.position_id = p.department_id INNER JOIN department d ON p.department_id = d.id;",0 What are the names and weights of the five heaviest satellites?,"CREATE TABLE heavy_satellites (satellite_name TEXT, satellite_weight REAL); ","SELECT satellite_name, satellite_weight FROM heavy_satellites ORDER BY satellite_weight DESC LIMIT 5;","SELECT satellite_name, satellite_weight FROM heavy_satellites ORDER BY satellite_weight DESC LIMIT 5;",1 What is the minimum visitor age for each exhibition?,"CREATE TABLE exhibitions (id INT, exhibition_name VARCHAR(50), visitor_age INT); ","SELECT exhibition_name, MIN(visitor_age) FROM exhibitions GROUP BY exhibition_name;","SELECT exhibition_name, MIN(visitor_age) FROM exhibitions GROUP BY exhibition_name;",1 Find the name and hours of the students whose tryout decision is yes.,"CREATE TABLE player (pName VARCHAR, HS VARCHAR, pID VARCHAR); CREATE TABLE tryout (pID VARCHAR, decision VARCHAR);","SELECT T1.pName, T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes';","SELECT T1.pName, T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = ""yes"";",0 "Insert a new virtual tour for the city of Istanbul on July 4, 2022 with ID 5.","CREATE TABLE virtual_tours (tour_id INT, location VARCHAR(50), tour_date DATE);","INSERT INTO virtual_tours (tour_id, location, tour_date) VALUES (5, 'Istanbul', '2022-07-04');","INSERT INTO virtual_tours (tour_id, location, tour_date) VALUES (5, 'Istanbul', '2022-07-04');",1 What is the total number of fraudulent transactions made by clients in the Middle East in Q1 2023?,"CREATE TABLE transactions (transaction_id INT, client_id INT, transaction_date DATE, country VARCHAR(50), is_fraudulent BOOLEAN); ","SELECT COUNT(*) as total_fraudulent_transactions FROM transactions WHERE country IN ('Egypt', 'Saudi Arabia', 'UAE') AND is_fraudulent = true AND transaction_date BETWEEN '2023-01-01' AND '2023-03-31';",SELECT COUNT(*) FROM transactions WHERE country = 'Middle East' AND is_fraudulent = true AND transaction_date BETWEEN '2023-01-01' AND '2023-03-31';,0 "Which Date has a Road Team of new york, and a Result of 79-75?","CREATE TABLE table_name_42 (date VARCHAR, road_team VARCHAR, result VARCHAR);","SELECT date FROM table_name_42 WHERE road_team = ""new york"" AND result = ""79-75"";","SELECT date FROM table_name_42 WHERE road_team = ""new york"" AND result = ""79-75"";",1 What is the total number of high-risk customers and their combined account balance for each investment strategy?,"CREATE TABLE High_Risk_Customers (customer_id INT, strategy_name VARCHAR(30), account_balance DECIMAL(10,2)); ","SELECT strategy_name, COUNT(customer_id) AS total_customers, SUM(account_balance) AS total_balance FROM High_Risk_Customers GROUP BY strategy_name;","SELECT strategy_name, COUNT(*) as total_high_risk_customers, SUM(account_balance) as total_account_balance FROM High_Risk_Customers GROUP BY strategy_name;",0 Delete workouts older than 30 days in the workouts table,"CREATE TABLE workouts (member_id INT, workout_date DATE, workout_type VARCHAR(50), duration INT, calories_burned INT);","DELETE FROM workouts WHERE workout_date <= DATE_SUB(CURRENT_DATE, INTERVAL 30 DAY);","DELETE FROM workouts WHERE workout_date DATE_SUB(CURRENT_DATE, INTERVAL 30 DAY);",0 What is the percentage of donations from each continent in the last year?,"CREATE TABLE donations (id INT, donation_amount DECIMAL(10, 2), donation_date DATE, continent TEXT); ","SELECT continent, SUM(donation_amount) / SUM(SUM(donation_amount)) OVER (PARTITION BY NULL) * 100.0 AS percentage FROM donations WHERE donation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) GROUP BY continent;","SELECT continent, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM donations WHERE donation_date >= DATEADD(year, -1, GETDATE()) GROUP BY continent) as percentage FROM donations WHERE donation_date >= DATEADD(year, -1, GETDATE()) GROUP BY continent;",0 What was the time of the game on April 5?,"CREATE TABLE table_name_87 (time VARCHAR, date VARCHAR);","SELECT time FROM table_name_87 WHERE date = ""april 5"";","SELECT time FROM table_name_87 WHERE date = ""april 5"";",1 Who was the opponent at the game that had a loss of Hendrickson (0-1)?,"CREATE TABLE table_name_93 (opponent VARCHAR, loss VARCHAR);","SELECT opponent FROM table_name_93 WHERE loss = ""hendrickson (0-1)"";","SELECT opponent FROM table_name_93 WHERE loss = ""hendrickson (0-1)"";",1 What is the total quantity of 'Veggie Wrap' sold last week?,"CREATE TABLE sandwiches (id INT, name VARCHAR(255), qty_sold INT); CREATE TABLE date (id INT, date DATE); ","SELECT SUM(qty_sold) AS total_qty_sold FROM sandwiches WHERE name = 'Veggie Wrap' AND date IN (SELECT date FROM date WHERE date BETWEEN DATE_SUB(NOW(), INTERVAL 1 WEEK) AND NOW());","SELECT SUM(qty_sold) FROM sandwiches WHERE name = 'Veggie Wrap' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK);",0 Who was the incumbent who was first elected in 1876?,"CREATE TABLE table_name_43 (incumbent VARCHAR, first_elected VARCHAR);","SELECT incumbent FROM table_name_43 WHERE first_elected = ""1876"";",SELECT incumbent FROM table_name_43 WHERE first_elected = 1876;,0 Which artists have order number 6?,"CREATE TABLE table_29756040_1 (original_artist VARCHAR, order__number VARCHAR);","SELECT original_artist FROM table_29756040_1 WHERE order__number = ""6"";",SELECT original_artist FROM table_29756040_1 WHERE order__number = 6;,0 How many 'youth' passengers traveled on 'monorail' routes in August 2022?,"CREATE TABLE public.trips (trip_id SERIAL PRIMARY KEY, passenger_type VARCHAR(20), fare DECIMAL(5,2), route_type_id INTEGER, FOREIGN KEY (route_type_id) REFERENCES public.route_type(route_type_id)); ",SELECT COUNT(*) FROM public.trips WHERE passenger_type = 'youth' AND route_type_id = (SELECT route_type_id FROM public.route_type WHERE route_type = 'monorail') AND fare_date >= '2022-08-01' AND fare_date <= '2022-08-31',SELECT COUNT(*) FROM public.trips WHERE passenger_type = 'youth' AND route_type_id = (SELECT route_type_id FROM public.route_type WHERE route_type_id = (SELECT route_type_id FROM public.route_type WHERE route_type_id = (SELECT route_type_id FROM public.route_type WHERE route_type_id = (SELECT route_type_id FROM public.route_type WHERE passenger_type ='monorail')) AND route_type_id = (SELECT route_type_id FROM public.route_type WHERE passenger_type = 'youth');,0 What is the average water temperature in 'Salmon_farms' located in 'Norway'?,"CREATE TABLE Salmon_farms (id INT, name TEXT, country TEXT, water_temp FLOAT); ",SELECT AVG(water_temp) FROM Salmon_farms WHERE country = 'Norway';,SELECT AVG(water_temp) FROM Salmon_farms WHERE country = 'Norway';,1 Show the carbon offset programs initiated before 2015 and the total CO2 savings for each,"CREATE TABLE carbon_offset_programs (program_id INT, program_name VARCHAR(255), initiation_date DATE, co2_savings INT); ","SELECT program_name, SUM(co2_savings) FROM carbon_offset_programs WHERE initiation_date < '2015-01-01' GROUP BY program_name;","SELECT program_name, SUM(co2_savings) FROM carbon_offset_programs WHERE initiation_date '2015-01-01' GROUP BY program_name;",0 What was the total value of socially responsible loans issued to women in H2 2021?,"CREATE TABLE socially_responsible_loans (id INT, value DECIMAL(10, 2), client_gender VARCHAR(10), date DATE);",SELECT SUM(value) FROM socially_responsible_loans WHERE client_gender = 'female' AND date BETWEEN '2021-07-01' AND '2021-12-31';,SELECT SUM(value) FROM socially_responsible_loans WHERE client_gender = 'Female' AND date BETWEEN '2021-01-01' AND '2021-06-30';,0 What is the total revenue generated in the last week?,"CREATE TABLE Sales (sale_date DATE, revenue INT); ","SELECT SUM(revenue) AS total_revenue FROM Sales WHERE sale_date BETWEEN DATEADD(day, -7, CURRENT_DATE) AND CURRENT_DATE;","SELECT SUM(revenue) FROM Sales WHERE sale_date >= DATEADD(week, -1, GETDATE());",0 "Insert a new record into the ""public_transportation"" table with the following values: ""Light Rail"", ""Los Angeles"", ""Metro"", 12, ""2022-01-01""","CREATE TABLE public_transportation (type VARCHAR(50), city VARCHAR(50), system VARCHAR(50), lines INT, last_updated DATE, PRIMARY KEY (type, city, system));","INSERT INTO public_transportation (type, city, system, lines, last_updated) VALUES ('Light Rail', 'Los Angeles', 'Metro', 12, '2022-01-01');","INSERT INTO public_transportation (type, city, system, lines, last_updated) VALUES ('Light Rail', 'Los Angeles', 'Metro', 12, '2022-01-01');",1 What is the minimum price of vegan dishes across all cuisine types?,"CREATE TABLE VeganDishes (menu_item VARCHAR(50), cuisine VARCHAR(20), type VARCHAR(20), price DECIMAL(5,2)); ",SELECT MIN(price) FROM VeganDishes WHERE type = 'Vegan';,SELECT MIN(price) FROM VeganDishes WHERE cuisine = 'Vegan';,0 Count the number of cases in 'cases' table for each attorney,"CREATE TABLE cases (case_id INT, case_number VARCHAR(50), client_name VARCHAR(50), attorney_id INT);","SELECT attorney_id, COUNT(*) FROM cases GROUP BY attorney_id;","SELECT attorney_id, COUNT(*) FROM cases GROUP BY attorney_id;",1 What is the total amount of water saved through conservation initiatives in New York state in 2021?,"CREATE TABLE conservation_initiatives (state VARCHAR(20), water_saved FLOAT, year INT); ",SELECT SUM(water_saved) FROM conservation_initiatives WHERE state = 'New York' AND year = 2021;,SELECT SUM(water_saved) FROM conservation_initiatives WHERE state = 'New York' AND year = 2021;,1 How many platinum points were awarded when 9 gold points were awarded?,"CREATE TABLE table_11254821_2 (points_awarded__platinum_ VARCHAR, points_awarded__gold_ VARCHAR);",SELECT points_awarded__platinum_ FROM table_11254821_2 WHERE points_awarded__gold_ = 9;,SELECT points_awarded__platinum_ FROM table_11254821_2 WHERE points_awarded__gold_ = 9;,1 "What year was the BBC two total viewing 7,530,000?","CREATE TABLE table_103084_4 (year INTEGER, bbc_two_total_viewing VARCHAR);","SELECT MIN(year) FROM table_103084_4 WHERE bbc_two_total_viewing = ""7,530,000"";","SELECT MAX(year) FROM table_103084_4 WHERE bbc_two_total_viewing = ""7,530,000"";",0 "How many foundeds have sousse as the city, with a capacity greater than 25,000?","CREATE TABLE table_name_25 (founded VARCHAR, city VARCHAR, capacity VARCHAR);","SELECT COUNT(founded) FROM table_name_25 WHERE city = ""sousse"" AND capacity > 25 OFFSET 000;","SELECT COUNT(founded) FROM table_name_25 WHERE city = ""sousse"" AND capacity > 25 OFFSET 000;",1 Which network had unknown games and a title of hvem kan slå ylvis hvem kan slå aamodt & kjus?,"CREATE TABLE table_name_4 (network VARCHAR, games VARCHAR, title VARCHAR);","SELECT network FROM table_name_4 WHERE games = ""unknown"" AND title = ""hvem kan slå ylvis hvem kan slå aamodt & kjus"";","SELECT network FROM table_name_4 WHERE games = ""unknown"" AND title = ""hvem kan sl ylvis hvem kan sl aamodt & kjus"";",0 What is the average water usage per crop type in the United States?,"CREATE TABLE crops (id INT, name TEXT, water_requirement INT); ","SELECT crops.name, AVG(irrigation.irrigation_amount) FROM crops JOIN irrigation ON crops.id = irrigation.farm_id JOIN farms ON irrigation.farm_id = farms.id JOIN provinces ON farms.id = provinces.id WHERE provinces.country = 'United States' GROUP BY crops.name;","SELECT name, AVG(water_requirement) as avg_water_usage FROM crops WHERE country = 'United States' GROUP BY name;",0 Who are the sideline reporter(s) on NBC with al michaels on the play-by-play after 2013?,"CREATE TABLE table_name_22 (sideline_reporter_s_ VARCHAR, year VARCHAR, network VARCHAR, play_by_play VARCHAR);","SELECT sideline_reporter_s_ FROM table_name_22 WHERE network = ""nbc"" AND play_by_play = ""al michaels"" AND year > 2013;","SELECT sideline_reporter_s_ FROM table_name_22 WHERE network = ""nbc"" AND play_by_play = ""al michaels"" AND year > 2013;",1 What was the maximum value of military equipment sales to the African governments in 2020?,"CREATE TABLE military_sales (id INT, year INT, region VARCHAR(20), equipment_type VARCHAR(20), value FLOAT); ",SELECT MAX(value) FROM military_sales WHERE year = 2020 AND region = 'Africa';,SELECT MAX(value) FROM military_sales WHERE year = 2020 AND region = 'Africa';,1 How many districts have John C. Calhoun as the incumbent?,"CREATE TABLE table_2668352_16 (district VARCHAR, incumbent VARCHAR);","SELECT COUNT(district) FROM table_2668352_16 WHERE incumbent = ""John C. Calhoun"";","SELECT COUNT(district) FROM table_2668352_16 WHERE incumbent = ""John C. Calhoun"";",1 How many original air dates did the episode directed by Bethany rooney have?,"CREATE TABLE table_28859177_3 (original_air_date VARCHAR, directed_by VARCHAR);","SELECT COUNT(original_air_date) FROM table_28859177_3 WHERE directed_by = ""Bethany Rooney"";","SELECT COUNT(original_air_date) FROM table_28859177_3 WHERE directed_by = ""Bethany Rooney"";",1 Which skipper has barclays adventurer as the name of the yacht?,"CREATE TABLE table_name_92 (skipper VARCHAR, yacht_name VARCHAR);","SELECT skipper FROM table_name_92 WHERE yacht_name = ""barclays adventurer"";","SELECT skipper FROM table_name_92 WHERE yacht_name = ""barclays adventurer"";",1 What is the percentage of food safety inspections with critical violations for each location in the past year?,"CREATE TABLE food_safety_inspections (location VARCHAR(255), inspection_date DATE, critical_violations INT); ","SELECT location, (SUM(critical_violations) * 100.00 / COUNT(*)) as percentage_critical_violations FROM food_safety_inspections WHERE inspection_date BETWEEN DATEADD(year, -1, GETDATE()) AND GETDATE() GROUP BY location;","SELECT location, (SUM(critical_violations) / (SELECT SUM(critical_violations) FROM food_safety_inspections WHERE inspection_date >= DATEADD(year, -1, GETDATE()))) * 100 AS percentage FROM food_safety_inspections WHERE inspection_date >= DATEADD(year, -1, GETDATE()) GROUP BY location;",0 What is the total budget for all resilience projects in the state of 'California'?,"CREATE TABLE Infrastructure(id INT, state VARCHAR(20), project VARCHAR(30), budget DECIMAL(10,2)); ",SELECT SUM(budget) FROM Infrastructure WHERE state = 'California';,SELECT SUM(budget) FROM Infrastructure WHERE state = 'California' AND project LIKE 'Resilience%';,0 Find the names of athletes in the hockey_players table who earn more than the average salary.,"CREATE TABLE hockey_players (player_id INT, name VARCHAR(50), position VARCHAR(50), salary DECIMAL(5,2)); ",SELECT name FROM hockey_players WHERE salary > (SELECT AVG(salary) FROM hockey_players);,SELECT name FROM hockey_players WHERE salary > (SELECT AVG(salary) FROM hockey_players);,1 What was the Home team Carlton's Ground?,"CREATE TABLE table_name_55 (ground VARCHAR, home_team VARCHAR);","SELECT ground FROM table_name_55 WHERE home_team = ""carlton"";","SELECT ground FROM table_name_55 WHERE home_team = ""carlton"";",1 Which opponent's march was 31?,"CREATE TABLE table_name_19 (opponent VARCHAR, march VARCHAR);",SELECT opponent FROM table_name_19 WHERE march = 31;,SELECT opponent FROM table_name_19 WHERE march = 31;,1 Who had the high points on December 17?,"CREATE TABLE table_17323042_6 (high_points VARCHAR, date VARCHAR);","SELECT high_points FROM table_17323042_6 WHERE date = ""December 17"";","SELECT high_points FROM table_17323042_6 WHERE date = ""December 17"";",1 Update the rank of faculty member with ID 105 in the faculty table,"CREATE TABLE faculty (id INT, name VARCHAR(50), department VARCHAR(50), rank VARCHAR(10)); ",UPDATE faculty SET rank = 'Full Professor' WHERE id = 105;,UPDATE faculty SET rank = 'Rank' WHERE id = 105;,0 What is the average Entre Ríos Municipality with less than 9 Pojo Municipalities?,"CREATE TABLE table_name_99 (entre_ríos_municipality INTEGER, pojo_municipality INTEGER);",SELECT AVG(entre_ríos_municipality) FROM table_name_99 WHERE pojo_municipality < 9;,SELECT AVG(entre_ros_municipality) FROM table_name_99 WHERE pojo_municipality 9;,0 What was the Opponent in the Tarragona Tournament?,"CREATE TABLE table_name_9 (opponent VARCHAR, tournament VARCHAR);","SELECT opponent FROM table_name_9 WHERE tournament = ""tarragona"";","SELECT opponent FROM table_name_9 WHERE tournament = ""tarragona"";",1 "WHAT IS THE YEAR WITH DARI, AND TITLE osama (أسامة)?","CREATE TABLE table_name_38 (year__ceremony_ VARCHAR, language_s_ VARCHAR, original_title VARCHAR);","SELECT year__ceremony_ FROM table_name_38 WHERE language_s_ = ""dari"" AND original_title = ""osama (أسامة)"";","SELECT year__ceremony_ FROM table_name_38 WHERE language_s_ = ""dari"" AND original_title = ""osama ()"";",0 What's the record of the game with number 40?,"CREATE TABLE table_23285761_7 (record VARCHAR, game VARCHAR);",SELECT record FROM table_23285761_7 WHERE game = 40;,SELECT record FROM table_23285761_7 WHERE game = 40;,1 On which date was the opponent ireland and the status Five Nations?,"CREATE TABLE table_name_67 (date VARCHAR, status VARCHAR, opposing_teams VARCHAR);","SELECT date FROM table_name_67 WHERE status = ""five nations"" AND opposing_teams = ""ireland"";","SELECT date FROM table_name_67 WHERE status = ""five nations"" AND opposing_teams = ""ireland"";",1 "What year is Winter Olympics when Holmenkollen is 1957, 1960?","CREATE TABLE table_174491_2 (winter_olympics VARCHAR, holmenkollen VARCHAR);","SELECT winter_olympics FROM table_174491_2 WHERE holmenkollen = ""1957, 1960"";","SELECT winter_olympics FROM table_174491_2 WHERE holmenkollen = ""1957, 1960"";",1 "Show the total production volume for each mine and year in the ""mine_production"", ""mines"", and ""calendar"" tables","CREATE TABLE mines (id INT, name VARCHAR(20)); CREATE TABLE calendar (year INT); CREATE TABLE mine_production (mine_id INT, year INT, volume INT); ","SELECT m.name, c.year, SUM(mp.volume) as total_volume FROM mines m JOIN mine_production mp ON m.id = mp.mine_id JOIN calendar c ON mp.year = c.year GROUP BY m.name, c.year;","SELECT mines.name, calendar.year, SUM(mine_production.volume) as total_volume FROM mines INNER JOIN mine_production ON mines.id = mine_production.mine_id INNER JOIN calendar ON mine_production.year = calendar.year GROUP BY mines.name, calendar.year;",0 What is the country/region for the releases from Beat Records?,"CREATE TABLE table_name_9 (country_region VARCHAR, label VARCHAR);","SELECT country_region FROM table_name_9 WHERE label = ""beat records"";","SELECT country_region FROM table_name_9 WHERE label = ""beat records"";",1 "What is the average number of likes on posts by users from the United States, having more than 500 followers, in the last month?","CREATE TABLE users (id INT, name TEXT, country TEXT, followers INT); CREATE TABLE posts (id INT, user_id INT, likes INT, timestamp DATETIME); ","SELECT AVG(posts.likes) FROM posts JOIN users ON posts.user_id = users.id WHERE users.country = 'USA' AND users.followers > 500 AND posts.timestamp >= DATE_SUB(NOW(), INTERVAL 1 MONTH);","SELECT AVG(posts.likes) FROM posts INNER JOIN users ON posts.user_id = users.id WHERE users.country = 'United States' AND posts.timestamp >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) AND users.followers > 500;",0 Who was the home team when Manchester City was the away team?,"CREATE TABLE table_name_89 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_89 WHERE away_team = ""manchester city"";","SELECT home_team FROM table_name_89 WHERE away_team = ""manchester city"";",1 "Which drilling rigs in Africa have the lowest drilling depths, and what are their operational_status values?","CREATE TABLE drilling_rigs (rig_id INT, rig_name VARCHAR(100), location VARCHAR(100), drilling_depth FLOAT, operational_status VARCHAR(50)); ","SELECT rig_id, rig_name, location, drilling_depth, operational_status, MIN(drilling_depth) OVER (PARTITION BY operational_status) as lowest_depth FROM drilling_rigs WHERE location = 'Nigeria' OR location = 'Algeria';","SELECT rig_name, location, drilling_depth, operational_status FROM drilling_rigs WHERE location = 'Africa' ORDER BY drilling_depth DESC LIMIT 1;",0 "When the phillies 1:15 pm played on April 9, what was the attendance?","CREATE TABLE table_name_21 (attendance VARCHAR, opponent VARCHAR, date VARCHAR);","SELECT attendance FROM table_name_21 WHERE opponent = ""phillies 1:15 pm"" AND date = ""april 9"";","SELECT attendance FROM table_name_21 WHERE opponent = ""phillies 1:15 pm"" AND date = ""april 9"";",1 Delete players with a score below the average score in the 'Simulation' game category.,"CREATE TABLE SimulationScores (PlayerID int, PlayerName varchar(50), Game varchar(50), Score int); ",DELETE FROM SimulationScores WHERE Game = 'Game4' AND Score < (SELECT AVG(Score) FROM SimulationScores WHERE Game = 'Game4');,DELETE FROM SimulationScores WHERE Score (SELECT AVG(Score) FROM SimulationScores WHERE Game = 'Simulation');,0 Where was the match that had 119 points for played?,"CREATE TABLE table_name_55 (played_in VARCHAR, points_for VARCHAR);","SELECT played_in FROM table_name_55 WHERE points_for = ""119"";","SELECT played_in FROM table_name_55 WHERE points_for = ""119"";",1 What is the total donation amount for organizations focused on Education?,"CREATE TABLE organizations (id INT PRIMARY KEY, name VARCHAR(255), city VARCHAR(255), cause VARCHAR(255)); ","SELECT o.name as organization_name, SUM(d.donation_amount) as total_donation FROM donations d JOIN organizations o ON d.organization_id = o.id WHERE o.cause = 'Education' GROUP BY o.name;",SELECT SUM(donation_amount) FROM donations JOIN organizations ON donations.organization_id = organizations.id WHERE organizations.cause = 'Education';,0 What is the total investment in social impact bonds in the education sector?,"CREATE TABLE social_impact_bonds (sector VARCHAR(50), investment_amount INT); ",SELECT SUM(investment_amount) as total_investment FROM social_impact_bonds WHERE sector = 'Education';,SELECT SUM(investment_amount) FROM social_impact_bonds WHERE sector = 'Education';,0 "What is the average salary of employees in each department, excluding any departments with fewer than 5 employees?","CREATE TABLE employees (employee_id INT, department TEXT, salary DECIMAL); ","SELECT department, AVG(salary) FROM employees GROUP BY department HAVING COUNT(*) >= 5;","SELECT department, AVG(salary) as avg_salary FROM employees GROUP BY department HAVING COUNT(*) >= 5 GROUP BY department;",0 Which astrophysics research projects have the most observations?,"CREATE TABLE astrophysics_observations (id INT PRIMARY KEY, project_name VARCHAR(50), num_of_observations INT);","SELECT project_name, SUM(num_of_observations) as total_observations FROM astrophysics_observations GROUP BY project_name;","SELECT project_name, num_of_observations FROM astrophysics_observations ORDER BY num_of_observations DESC LIMIT 1;",0 What is the average number of research grants awarded per year to each country?,"CREATE TABLE country_grants_by_year (id INT, country VARCHAR(255), year INT, grant_amount INT); ","SELECT country, AVG(grant_amount) as avg_grants FROM country_grants_by_year GROUP BY country;","SELECT country, AVG(grant_amount) as avg_grants_per_year FROM country_grants_by_year GROUP BY country;",0 Determine the number of artists who have released music in more than one genre.,"CREATE TABLE artist_genre (artist_id INT, genre VARCHAR(10));",SELECT COUNT(DISTINCT artist_id) FROM artist_genre GROUP BY artist_id HAVING COUNT(DISTINCT genre) > 1;,SELECT COUNT(*) FROM artist_genre GROUP BY artist_id HAVING COUNT(*) > 1;,0 "What's Italtrans Racing Team's, with 0 pts, class?","CREATE TABLE table_20016339_1 (class VARCHAR, pts VARCHAR, team VARCHAR);","SELECT class FROM table_20016339_1 WHERE pts = 0 AND team = ""Italtrans Racing team"";","SELECT class FROM table_20016339_1 WHERE pts = 0 AND team = ""Italtrans Racing Team"";",0 "What is Nation, when Date is ""2004-07-22""?","CREATE TABLE table_name_67 (nation VARCHAR, date VARCHAR);","SELECT nation FROM table_name_67 WHERE date = ""2004-07-22"";","SELECT nation FROM table_name_67 WHERE date = ""2004-07-22"";",1 "What is the total number of Total, when To Par is ""7""?","CREATE TABLE table_name_50 (total VARCHAR, to_par VARCHAR);",SELECT COUNT(total) FROM table_name_50 WHERE to_par = 7;,"SELECT COUNT(total) FROM table_name_50 WHERE to_par = ""7"";",0 What was the total amount donated by individuals in the city of Seattle in 2021?,"CREATE TABLE donors (donor_id INT, donation_amount DECIMAL(10,2), donation_date DATE, city VARCHAR(50));",SELECT SUM(donation_amount) FROM donors WHERE city = 'Seattle' AND YEAR(donation_date) = 2021 AND donor_id NOT IN (SELECT donor_id FROM organizations);,SELECT SUM(donation_amount) FROM donors WHERE city = 'Seattle' AND YEAR(donation_date) = 2021;,0 "What is Away Team, when Tie No is ""37""?","CREATE TABLE table_name_23 (away_team VARCHAR, tie_no VARCHAR);","SELECT away_team FROM table_name_23 WHERE tie_no = ""37"";","SELECT away_team FROM table_name_23 WHERE tie_no = ""37"";",1 "What is the total code number for places with a population greater than 87,585?","CREATE TABLE table_name_41 (code VARCHAR, population INTEGER);",SELECT COUNT(code) FROM table_name_41 WHERE population > 87 OFFSET 585;,SELECT COUNT(code) FROM table_name_41 WHERE population > 87 OFFSET 585;,1 What is the total humanitarian assistance budget for Oceania countries in 2021?,"CREATE TABLE humanitarian_assistance_oceania (country VARCHAR(50), year INT, budget INT); ","SELECT SUM(budget) total_budget FROM humanitarian_assistance_oceania WHERE country IN ('Australia', 'New Zealand', 'Papua New Guinea') AND year = 2021;",SELECT SUM(budget) FROM humanitarian_assistance_oceania WHERE year = 2021;,0 What was the score on 3 may 2009?,"CREATE TABLE table_name_82 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_82 WHERE date = ""3 may 2009"";","SELECT score FROM table_name_82 WHERE date = ""3 may 2009"";",1 "On the date April 11, what were the high points?","CREATE TABLE table_name_71 (high_points VARCHAR, date VARCHAR);","SELECT high_points FROM table_name_71 WHERE date = ""april 11"";","SELECT high_points FROM table_name_71 WHERE date = ""april 11"";",1 What are the top 3 states with the highest number of bridges built before 1950?,"CREATE TABLE bridges (id INT, bridge_name VARCHAR(255), built_year INT, state VARCHAR(255)); ","SELECT state, COUNT(*) as bridge_count FROM bridges WHERE built_year < 1950 GROUP BY state ORDER BY bridge_count DESC LIMIT 3;","SELECT state, COUNT(*) as num_bridges FROM bridges WHERE built_year 1950 GROUP BY state ORDER BY num_bridges DESC LIMIT 3;",0 What is the total amount spent on supplies by each organization in 2021?,"CREATE TABLE Supplies (org_name TEXT, supply_cost INTEGER, supply_date DATE); ","SELECT org_name, SUM(supply_cost) FROM Supplies WHERE supply_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY org_name;","SELECT org_name, SUM(supply_cost) FROM Supplies WHERE YEAR(supply_date) = 2021 GROUP BY org_name;",0 What are the episode numbers of episodes featuring Hurley?,"CREATE TABLE table_11562149_1 (no_in_series VARCHAR, featured_character_s_ VARCHAR);","SELECT no_in_series FROM table_11562149_1 WHERE featured_character_s_ = ""Hurley"";","SELECT no_in_series FROM table_11562149_1 WHERE featured_character_s_ = ""Hurley"";",1 What is the maximum mental health score for students who have not participated in open pedagogy activities?,"CREATE TABLE students (student_id INT, mental_health_score INT, participated_in_open_pedagogy BOOLEAN); ",SELECT MAX(mental_health_score) FROM students WHERE participated_in_open_pedagogy = FALSE;,SELECT MAX(mental_health_score) FROM students WHERE participated_in_open_pedagogy = FALSE;,1 "What is the largest bronze with a Rank of 2, and a Gold smaller than 8?","CREATE TABLE table_name_86 (bronze INTEGER, rank VARCHAR, gold VARCHAR);",SELECT MAX(bronze) FROM table_name_86 WHERE rank = 2 AND gold < 8;,SELECT MAX(bronze) FROM table_name_86 WHERE rank = 2 AND gold 8;,0 What was the average revenue per user in the Middle East in Q3 2022?,"CREATE SCHEMA socialmedia;CREATE TABLE users (id INT, country VARCHAR(255), revenue DECIMAL(10,2));",SELECT AVG(revenue) FROM socialmedia.users WHERE country = 'Middle East' AND EXTRACT(MONTH FROM timestamp) BETWEEN 7 AND 9;,SELECT AVG(revenue) FROM socialmedia.users WHERE country = 'Middle East' AND QUARTER(revenue) = 3 AND YEAR(revenue) = 2022;,0 "Retrieve transaction IDs and their corresponding investment IDs where the transaction is non-compliant, ordered by transaction date in descending order.","CREATE TABLE investment_data (id INT, transaction_id INT, investment_id INT, is_compliant BOOLEAN, transaction_date DATE); ","SELECT transaction_id, investment_id FROM investment_data WHERE is_compliant = FALSE ORDER BY transaction_date DESC;","SELECT transaction_id, investment_id FROM investment_data WHERE is_compliant = false ORDER BY transaction_date DESC;",0 What is the daily revenue trend for the last quarter?,"CREATE TABLE daily_revenue(date DATE, revenue INT); ","SELECT date, revenue, ROW_NUMBER() OVER (ORDER BY revenue DESC) as ranking FROM daily_revenue WHERE date >= CURRENT_DATE - INTERVAL '3 months' ORDER BY date;","SELECT date, revenue FROM daily_revenue WHERE date >= DATEADD(quarter, -1, GETDATE());",0 What is the 1st(m) score for the Person who had a total points of 272.7,CREATE TABLE table_14407512_9 (points VARCHAR);,"SELECT 1 AS st__m_ FROM table_14407512_9 WHERE points = ""272.7"";",SELECT 1 AS st(m) FROM table_14407512_9 WHERE points = 272.7;,0 From where did Train No. 15929/30 originate?,"CREATE TABLE table_name_15 (origin VARCHAR, train_no VARCHAR);","SELECT origin FROM table_name_15 WHERE train_no = ""15929/30"";","SELECT origin FROM table_name_15 WHERE train_no = ""15929/30"";",1 How tall is nerlens noel?,"CREATE TABLE table_name_11 (height VARCHAR, player VARCHAR);","SELECT height FROM table_name_11 WHERE player = ""nerlens noel"";","SELECT height FROM table_name_11 WHERE player = ""nerlens noel"";",1 What is the date of debut that has a date of birth listed at 24-10-1887?,"CREATE TABLE table_11585313_1 (date_of_debut VARCHAR, date_of_birth VARCHAR);","SELECT date_of_debut FROM table_11585313_1 WHERE date_of_birth = ""24-10-1887"";","SELECT date_of_debut FROM table_11585313_1 WHERE date_of_birth = ""24-10-1887"";",1 What is the success rate of agricultural innovation projects in Asia?,"CREATE TABLE project (project_id INT, name VARCHAR(50), location VARCHAR(50), success_rate FLOAT); CREATE TABLE continent (continent_id INT, name VARCHAR(50), description TEXT);","SELECT p.name, AVG(p.success_rate) FROM project p JOIN continent c ON p.location = c.name WHERE c.name = 'Asia' GROUP BY p.name;",SELECT SUM(project.success_rate) FROM project INNER JOIN continent ON project.location = continent.name WHERE continent.name = 'Asia';,0 How many total episodes aired over all seasons with 7.79 million viewers?,"CREATE TABLE table_name_86 (episode_count VARCHAR, viewers__in_millions_ VARCHAR);",SELECT COUNT(episode_count) FROM table_name_86 WHERE viewers__in_millions_ = 7.79;,"SELECT COUNT(episode_count) FROM table_name_86 WHERE viewers__in_millions_ = ""7.79"";",0 What is the minimum fare collected for the 'Red Line' during any given month?,"CREATE TABLE fare_by_month (route_name VARCHAR(50), month_year DATE, fare_amount DECIMAL(10,2)); ",SELECT MIN(fare_amount) FROM fare_by_month WHERE route_name = 'Red Line';,SELECT MIN(fare_amount) FROM fare_by_month WHERE route_name = 'Red Line';,1 Determine the number of volunteers for each program and the total number of volunteers,"CREATE TABLE volunteers (id INT, name VARCHAR, email VARCHAR, phone VARCHAR); CREATE TABLE volunteer_assignments (id INT, volunteer_id INT, program_id INT);","SELECT volunteer_assignments.program_id, COUNT(DISTINCT volunteers.id) as total_volunteers, COUNT(DISTINCT volunteer_assignments.volunteer_id) as num_volunteers FROM volunteers JOIN volunteer_assignments ON volunteers.id = volunteer_assignments.volunteer_id GROUP BY volunteer_assignments.program_id;","SELECT program_id, COUNT(*) as num_volunteers, COUNT(*) as total_volunteers FROM volunteer_assignments JOIN volunteers ON volunteer_assignments.volunteer_id = volunteers.id GROUP BY program_id;",0 what's the lowest point with highest point being mount greylock,"CREATE TABLE table_1416612_1 (lowest_point VARCHAR, highest_point VARCHAR);","SELECT lowest_point FROM table_1416612_1 WHERE highest_point = ""Mount Greylock"";","SELECT lowest_point FROM table_1416612_1 WHERE highest_point = ""Mount Greylock"";",1 Which countries had geopolitical risk assessments in Q3 2022?,"CREATE TABLE RiskAssessments (country_name VARCHAR(255), assessment_date DATE); ",SELECT DISTINCT country_name FROM RiskAssessments WHERE assessment_date BETWEEN '2022-07-01' AND '2022-09-30';,SELECT country_name FROM RiskAssessments WHERE assessment_date BETWEEN '2022-04-01' AND '2022-06-30';,0 What is the date with Ellis as the decision and St. Louis as the visitor?,"CREATE TABLE table_name_27 (date VARCHAR, decision VARCHAR, visitor VARCHAR);","SELECT date FROM table_name_27 WHERE decision = ""ellis"" AND visitor = ""st. louis"";","SELECT date FROM table_name_27 WHERE decision = ""ellis"" AND visitor = ""st. louis"";",1 When london irish was eliminated from competition who proceeded to quarter final?,"CREATE TABLE table_27987767_3 (proceed_to_quarter_final VARCHAR, eliminated_from_competition VARCHAR);","SELECT proceed_to_quarter_final FROM table_27987767_3 WHERE eliminated_from_competition = ""London Irish"";","SELECT proceed_to_quarter_final FROM table_27987767_3 WHERE eliminated_from_competition = ""London Ireland"";",0 "What is the lowest rank of the team with 0 bronze, 1 silver, and more than 0 gold?","CREATE TABLE table_name_69 (rank INTEGER, gold VARCHAR, bronze VARCHAR, silver VARCHAR);",SELECT MIN(rank) FROM table_name_69 WHERE bronze = 0 AND silver = 1 AND gold > 0;,SELECT MIN(rank) FROM table_name_69 WHERE bronze = 0 AND silver = 1 AND gold > 0;,1 "How many disability support programs were implemented in each city in the last 3 years, sorted by the number of programs?","CREATE TABLE Support_Programs (city VARCHAR(255), program_date DATE); ","SELECT city, COUNT(*) as num_programs FROM Support_Programs WHERE program_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR) GROUP BY city ORDER BY num_programs DESC;","SELECT city, COUNT(*) FROM Support_Programs WHERE program_date >= DATEADD(year, -3, GETDATE()) GROUP BY city ORDER BY COUNT(*) DESC;",0 How many circular economy initiatives were launched by country from 2017 to 2021?,"CREATE TABLE circular_economy_initiatives (country VARCHAR(255), year INT, initiative_id INT); ","SELECT country, COUNT(DISTINCT initiative_id) FROM circular_economy_initiatives WHERE year BETWEEN 2017 AND 2021 GROUP BY country;","SELECT country, COUNT(*) FROM circular_economy_initiatives WHERE year BETWEEN 2017 AND 2021 GROUP BY country;",0 What is the total number of 5G mobile customers in the state of California?,"CREATE TABLE mobile_customers (customer_id INT, state VARCHAR(20), network_type VARCHAR(10)); ",SELECT COUNT(*) FROM mobile_customers WHERE state = 'California' AND network_type = '5G';,SELECT COUNT(*) FROM mobile_customers WHERE state = 'California' AND network_type = '5G';,1 What is NK Rijeka's away score in Round 2?,"CREATE TABLE table_name_97 (away VARCHAR, round VARCHAR, club VARCHAR);","SELECT away FROM table_name_97 WHERE round < 2 AND club = ""nk rijeka"";","SELECT away FROM table_name_97 WHERE round = 2 AND club = ""nk rijeka"";",0 What are the galleries displaying modern art in Paris?,"CREATE TABLE Exhibitions (ExhibitionID INT, Gallery VARCHAR(100), ArtworkID INT, Country VARCHAR(50), Year INT);",SELECT DISTINCT Exhibitions.Gallery FROM Exhibitions INNER JOIN Artworks ON Exhibitions.ArtworkID = Artworks.ArtworkID WHERE Artworks.Year >= 1900 AND Exhibitions.Country = 'France';,SELECT Gallery FROM Exhibitions WHERE Country = 'Paris' AND ArtworkID IN (SELECT ArtworkID FROM Exhibitions WHERE Country = 'Paris');,0 What is the average carbon offset per green building in each country?,"CREATE TABLE green_buildings (id INT, country VARCHAR(50), offset INT); ","SELECT g.country, AVG(g.offset) as avg_offset FROM green_buildings g GROUP BY g.country;","SELECT country, AVG(offset) FROM green_buildings GROUP BY country;",0 What is the sum of the averages when there are 68 caps and less than 9 goals?,"CREATE TABLE table_name_16 (average INTEGER, caps VARCHAR, goals VARCHAR);",SELECT SUM(average) FROM table_name_16 WHERE caps = 68 AND goals < 9;,SELECT SUM(average) FROM table_name_16 WHERE caps = 68 AND goals 9;,0 What is the branding for callsign DWFM?,"CREATE TABLE table_name_53 (branding VARCHAR, callsign VARCHAR);","SELECT branding FROM table_name_53 WHERE callsign = ""dwfm"";","SELECT branding FROM table_name_53 WHERE callsign = ""dwfm"";",1 What is the average fuel efficiency for compact cars?,"CREATE TABLE vehicles (vehicle_id INT, model VARCHAR(20), manufacture VARCHAR(20), fuel_efficiency FLOAT, vehicle_type VARCHAR(20));",SELECT AVG(fuel_efficiency) FROM vehicles WHERE vehicle_type = 'compact';,SELECT AVG(fuel_efficiency) FROM vehicles WHERE vehicle_type = 'Compact';,0 What is the highest ranked nation with 15 silver medals and no more than 47 total?,"CREATE TABLE table_name_53 (rank INTEGER, silver VARCHAR, total VARCHAR);",SELECT MAX(rank) FROM table_name_53 WHERE silver = 15 AND total < 47;,SELECT MAX(rank) FROM table_name_53 WHERE silver = 15 AND total 47;,0 What is the total quantity of eco-friendly textiles used in manufacturing for each trend?,"CREATE TABLE EcoManufacturing (id INT, trend VARCHAR(20), fabric VARCHAR(20), quantity INT); ","SELECT trend, SUM(quantity) FROM EcoManufacturing WHERE fabric LIKE '%eco%' GROUP BY trend;","SELECT trend, SUM(quantity) FROM EcoManufacturing GROUP BY trend;",0 What is the total number of donations for each organization?,"CREATE TABLE org_donation (org_id INT, donation_id INT, donation_amount INT); ","SELECT org_id, COUNT(*) as total_donations FROM org_donation GROUP BY org_id;","SELECT org_id, SUM(donation_amount) as total_donations FROM org_donation GROUP BY org_id;",0 What is the total number of vehicles in the system for each mode of transportation?,"CREATE TABLE vehicles (vehicle_id INT, vehicle_type VARCHAR(255), mode_id INT); ","SELECT m.mode_name, COUNT(v.vehicle_id) as total_vehicles FROM vehicles v JOIN transportation_modes m ON v.mode_id = m.mode_id GROUP BY m.mode_name;","SELECT mode_id, COUNT(*) FROM vehicles GROUP BY mode_id;",0 What is the average value of artworks from the Renaissance period?,"CREATE TABLE ArtWorks (ArtworkID int, Title varchar(100), Value int, Period varchar(100));",SELECT AVG(Value) FROM ArtWorks WHERE Period = 'Renaissance',SELECT AVG(Value) FROM ArtWorks WHERE Period = 'Renaissance';,0 How many assists does cam long average in under 132 games?,"CREATE TABLE table_name_28 (ast_avg INTEGER, player VARCHAR, games VARCHAR);","SELECT MAX(ast_avg) FROM table_name_28 WHERE player = ""cam long"" AND games < 132;","SELECT AVG(ast_avg) FROM table_name_28 WHERE player = ""cam long"" AND games 132;",0 What is the average safety rating for vehicles released in 2018?,"CREATE TABLE SafetyTesting (Id INT, Name VARCHAR(50), Year INT, SafetyRating INT); ",SELECT AVG(SafetyRating) FROM SafetyTesting WHERE Year = 2018;,SELECT AVG(SafetyRating) FROM SafetyTesting WHERE Year = 2018;,1 Which decentralized applications are available in Japan?,"CREATE TABLE decentralized_apps (app_id INT PRIMARY KEY, app_name TEXT, location TEXT); ",SELECT app_name FROM decentralized_apps WHERE location = 'Japan';,SELECT app_name FROM decentralized_apps WHERE location = 'Japan';,1 "Calculate the average revenue for each brand in the skincare category, ordered by average revenue in descending order.","CREATE TABLE sales (product_id INT, brand VARCHAR(50), category VARCHAR(50), revenue FLOAT); ","SELECT brand, AVG(revenue) as avg_revenue FROM sales WHERE category = 'skincare' GROUP BY brand ORDER BY avg_revenue DESC;","SELECT brand, AVG(revenue) as avg_revenue FROM sales WHERE category = 'Skincare' GROUP BY brand ORDER BY avg_revenue DESC;",0 What is the average rating of articles published by non-local news outlets in the USA?,"CREATE TABLE news_outlets (id INT, name VARCHAR(255), location VARCHAR(64), is_local BOOLEAN); CREATE TABLE articles (id INT, title VARCHAR(255), rating INT, publication_date DATE, outlet_id INT, PRIMARY KEY (id), FOREIGN KEY (outlet_id) REFERENCES news_outlets(id)); ",SELECT AVG(articles.rating) FROM articles INNER JOIN news_outlets ON articles.outlet_id = news_outlets.id WHERE news_outlets.location = 'USA' AND news_outlets.is_local = false;,SELECT AVG(articles.rating) FROM articles INNER JOIN news_outlets ON articles.outlet_id = news_outlets.id WHERE news_outlets.location = 'USA' AND news_outlets.is_local = true;,0 "Identify military technology transactions that have an increasing trend over the last 6 months, per technology.","CREATE TABLE tech_transactions (tech_id INT, transact_date DATE, transact_count INT); ","SELECT tech_id, transact_date, transact_count, LAG(transact_count, 1) OVER (PARTITION BY tech_id ORDER BY transact_date) as previous_count, transact_count - LAG(transact_count, 1) OVER (PARTITION BY tech_id ORDER BY transact_date) as trend FROM tech_transactions WHERE transact_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);","SELECT tech_id, transact_date, transact_count FROM tech_transactions WHERE transact_date >= DATEADD(month, -6, GETDATE()) GROUP BY tech_id, transact_date;",0 Which athletes in the 'Athletes' table have the same name as a team in the 'Teams' table?,"CREATE TABLE athletes (athlete_id INT, name VARCHAR(50)); CREATE TABLE teams (team_id INT, name VARCHAR(50)); ",SELECT a.name FROM athletes a INNER JOIN teams t ON a.name = t.name;,SELECT athletes.name FROM athletes INNER JOIN teams ON athletes.team_id = teams.team_id;,0 Insert a new exit strategy for a startup in the agriculture sector founded by a woman entrepreneur.,"CREATE TABLE exit_strategy (id INT, company_id INT, strategy TEXT); CREATE TABLE company (id INT, name TEXT, industry TEXT, founder_gender TEXT); ","INSERT INTO exit_strategy (id, company_id, strategy) VALUES (2, (SELECT id FROM company WHERE name = 'GreenBounty'), 'Acquisition');","INSERT INTO exit_strategy (id, company_id, strategy) VALUES (1, 'Agriculture', 'Female'); INSERT INTO company (id, name, industry, founder_gender) VALUES (1, 'Agriculture', 'Female'); INSERT INTO company (id, name, industry, founder_gender) VALUES (1, 'Agriculture', 'Female');",0 What is the maximum co-ownership percentage in the co_ownership_agreements table?,"CREATE TABLE co_ownership_agreements (agreement_id INT, property_id INT, co_owner_id INT, co_ownership_percentage FLOAT); ",SELECT MAX(co_ownership_percentage) FROM co_ownership_agreements;,SELECT MAX(co_ownership_percentage) FROM co_ownership_agreements;,1 Which country has the highest number of fair trade certified factories?,"CREATE TABLE FairTradeFactories (FactoryID int, Country varchar(50));","SELECT Country, COUNT(FactoryID) AS FactoryCount FROM FairTradeFactories GROUP BY Country ORDER BY FactoryCount DESC LIMIT 1;","SELECT Country, COUNT(*) FROM FairTradeFactories GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1;",0 Find the earliest call date and call type in the 'park_patrol' table.,"CREATE TABLE park_patrol (id INT, call_type VARCHAR(20), call_date TIMESTAMP); ","SELECT call_type, MIN(call_date) FROM park_patrol;","SELECT MIN(call_date) as earliest_call_date, call_type FROM park_patrol;",0 What is the average length of songs released by independent artists in the Pop genre?,"CREATE TABLE indie_artists (artist_id INT, name VARCHAR(100), genre VARCHAR(20)); CREATE TABLE songs (song_id INT, title VARCHAR(100), length FLOAT, artist_id INT); ","SELECT AVG(length) FROM songs JOIN indie_artists ON songs.artist_id = indie_artists.artist_id WHERE indie_artists.genre = 'Pop' AND indie_artists.name IN ('Taylor Swift', 'Billie Eilish');",SELECT AVG(length) FROM songs JOIN indie_artists ON songs.artist_id = indie_artists.artist_id WHERE indie_artists.genre = 'Pop';,0 Find the company with the most electric vehicles in the ElectricVehicles table.,"CREATE TABLE ElectricVehicles (id INT, company VARCHAR(20), vehicle_type VARCHAR(20), num_vehicles INT); ",SELECT company FROM ElectricVehicles WHERE num_vehicles = (SELECT MAX(num_vehicles) FROM ElectricVehicles);,"SELECT company, SUM(num_vehicles) FROM ElectricVehicles GROUP BY company ORDER BY SUM(num_vehicles) DESC LIMIT 1;",0 List the total budget for community development initiatives by state and initiative type in the 'community_development_budget' table.,"CREATE TABLE community_development_budget (state VARCHAR(255), initiative_type VARCHAR(255), budget INT); ","SELECT state, initiative_type, SUM(budget) FROM community_development_budget GROUP BY state, initiative_type;","SELECT state, initiative_type, SUM(budget) FROM community_development_budget GROUP BY state, initiative_type;",1 "What is the rank when the game was at dnipro stadium , kremenchuk?","CREATE TABLE table_name_55 (rank VARCHAR, location VARCHAR);","SELECT rank FROM table_name_55 WHERE location = ""dnipro stadium , kremenchuk"";","SELECT rank FROM table_name_55 WHERE location = ""dnipro stadium, kremenchuk"";",0 Name the number of master recording for doobie brothers the doobie brothers,"CREATE TABLE table_22457674_1 (master_recording VARCHAR, artist VARCHAR);","SELECT COUNT(master_recording) FROM table_22457674_1 WHERE artist = ""Doobie Brothers The Doobie Brothers"";","SELECT COUNT(master_recording) FROM table_22457674_1 WHERE artist = ""Doobie Brothers"";",0 Name the original airdate for robin mukherjee and margy kinmonth,"CREATE TABLE table_27208814_1 (original_airdate VARCHAR, writer VARCHAR, director VARCHAR);","SELECT original_airdate FROM table_27208814_1 WHERE writer = ""Robin Mukherjee"" AND director = ""Margy Kinmonth"";","SELECT original_airdate FROM table_27208814_1 WHERE writer = ""Robin Mukherjee"" AND director = ""Margy Kinmonth"";",1 What is the most expensive artwork created by an artist from 'Asia'?,"CREATE TABLE Artworks (artwork_id INTEGER, title TEXT, artist_name TEXT, artist_origin TEXT, price FLOAT); ","SELECT title, price FROM Artworks WHERE artist_origin = 'Asia' AND price = (SELECT MAX(price) FROM Artworks WHERE artist_origin = 'Asia')","SELECT title, artist_name, price FROM Artworks WHERE artist_origin = 'Asia' ORDER BY price DESC LIMIT 1;",0 "How many losses are there in the CD Sabadell club with a goal difference less than -2, and more than 38 played?","CREATE TABLE table_name_26 (losses INTEGER, played VARCHAR, goal_difference VARCHAR, club VARCHAR);","SELECT SUM(losses) FROM table_name_26 WHERE goal_difference < -2 AND club = ""cd sabadell"" AND played > 38;","SELECT SUM(losses) FROM table_name_26 WHERE goal_difference -2 AND club = ""cd sabadell"" AND played > 38;",0 Compare production figures of unconventional shale oil in the United States and Argentina.,"CREATE TABLE production_figures(country VARCHAR(255), resource VARCHAR(255), year INT, production INT);","SELECT country, (production * 100 / (SELECT SUM(production) FROM production_figures WHERE country = pf.country AND resource = 'Shale Oil') ) AS production_percentage FROM production_figures pf WHERE country IN ('United States', 'Argentina') AND resource = 'Shale Oil' GROUP BY country, production;","SELECT country, production FROM production_figures WHERE resource = 'Unconventional Shale Oil' AND country IN ('United States', 'Argentina');",0 what is the round when the college is north carolina and the overall is more than 124?,"CREATE TABLE table_name_68 (round INTEGER, college VARCHAR, overall VARCHAR);","SELECT SUM(round) FROM table_name_68 WHERE college = ""north carolina"" AND overall > 124;","SELECT AVG(round) FROM table_name_68 WHERE college = ""north carolina"" AND overall > 124;",0 What is the total quantity of textiles sourced from Africa?,"CREATE TABLE textile_sourcing (id INT, material VARCHAR(20), country VARCHAR(20), quantity INT); ","SELECT SUM(quantity) FROM textile_sourcing WHERE country IN ('Egypt', 'Morocco', 'South Africa');",SELECT SUM(quantity) FROM textile_sourcing WHERE country = 'Africa';,0 What is the number of vulnerabilities with a severity greater than 7 in the 'HR' department?,"CREATE TABLE vulnerabilities (id INT, department VARCHAR(20), severity FLOAT); ",SELECT COUNT(*) FROM vulnerabilities WHERE department = 'HR' AND severity > 7;,SELECT COUNT(*) FROM vulnerabilities WHERE department = 'HR' AND severity > 7;,1 Delete records for menu items that have not been ordered in the last 6 months.,"CREATE TABLE orders (order_id INT, menu_id INT, order_date DATE); ","DELETE FROM orders WHERE order_date < DATE_SUB(CURDATE(), INTERVAL 6 MONTH);","DELETE FROM orders WHERE menu_id NOT IN (SELECT menu_id FROM menus WHERE order_date DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",0 "Calculate the total REE production cost for each company, including the average CO2 emissions.","CREATE TABLE costs (company_id INT, year INT, ree_production_cost INT, co2_emissions INT); ","SELECT company_id, SUM(ree_production_cost) as total_cost, AVG(co2_emissions) as avg_co2_emissions FROM costs GROUP BY company_id;","SELECT company_id, SUM(ree_production_cost) as total_cost, AVG(co2_emissions) as avg_co2_emissions FROM costs GROUP BY company_id;",1 What is the percentage change in water conservation initiatives in the San Francisco region compared to the same time last year?,"CREATE TABLE conservation_initiatives (region VARCHAR(20), initiative VARCHAR(50), usage FLOAT, timestamp TIMESTAMP); ","SELECT 100.0 * (SUM(CASE WHEN timestamp BETWEEN DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 YEAR) AND DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 11 MONTH) THEN usage ELSE 0 END) - SUM(CASE WHEN timestamp BETWEEN DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 2 YEAR) AND DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 13 MONTH) THEN usage ELSE 0 END)) / SUM(CASE WHEN timestamp BETWEEN DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 2 YEAR) AND DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 13 MONTH) THEN usage ELSE 0 END) AS percentage_change FROM conservation_initiatives WHERE region = 'San Francisco';",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM conservation_initiatives WHERE region = 'San Francisco')) AS percentage_change FROM conservation_initiatives WHERE region = 'San Francisco' AND timestamp >= NOW() - INTERVAL '1 year';,0 "Which IHSAA Football Class has an IHSAA Class of aa, and an Enrollment of 475?","CREATE TABLE table_name_14 (ihsaa_football_class VARCHAR, ihsaa_class VARCHAR, enrollment VARCHAR);","SELECT ihsaa_football_class FROM table_name_14 WHERE ihsaa_class = ""aa"" AND enrollment = 475;","SELECT ihsaa_football_class FROM table_name_14 WHERE ihsaa_class = ""aa"" AND enrollment = ""475"";",0 What is the maximum age for 'Pinus' species in the 'forestry' DB?,"CREATE TABLE forestry.trees (id INT, species VARCHAR(50), age INT);",SELECT MAX(age) FROM forestry.trees WHERE species = 'Pinus';,SELECT MAX(age) FROM forestry.trees WHERE species = 'Pinus';,1 What game site had a result at l 21–13?,"CREATE TABLE table_name_27 (game_site VARCHAR, result VARCHAR);","SELECT game_site FROM table_name_27 WHERE result = ""l 21–13"";","SELECT game_site FROM table_name_27 WHERE result = ""l 21–13"";",1 What is the sum of Wins when draws shows 0 in 1964?,"CREATE TABLE table_name_46 (wins INTEGER, draws VARCHAR, season VARCHAR);",SELECT SUM(wins) FROM table_name_46 WHERE draws = 0 AND season = 1964;,SELECT SUM(wins) FROM table_name_46 WHERE draws = 0 AND season = 1964;,1 What is the average temperature for all regions growing 'Corn'?,"CREATE TABLE farm (id INT PRIMARY KEY, name VARCHAR(50), region_id INT, avg_temp DECIMAL(5,2)); CREATE TABLE region (id INT PRIMARY KEY, name VARCHAR(50)); ",SELECT AVG(f.avg_temp) FROM farm f INNER JOIN region r ON f.region_id = r.id WHERE r.name IN (SELECT name FROM region WHERE id IN (SELECT region_id FROM farm WHERE name = 'Corn'));,SELECT AVG(f.avg_temp) FROM farm f INNER JOIN region r ON f.region_id = r.id WHERE r.name = 'Corn';,0 Which menu items contribute to more than 25% of the revenue?,"CREATE TABLE MenuItems (item TEXT, category TEXT, price INT, revenue INT); ","SELECT category, item, revenue, SUM(revenue) OVER (PARTITION BY category) as category_total FROM MenuItems WHERE revenue / SUM(revenue) OVER (PARTITION BY category) > 0.25;",SELECT item FROM MenuItems WHERE revenue > 25;,0 Delete records of cosmetic products not meeting safety standards.,"CREATE TABLE Products (ProductID INT, ProductName VARCHAR(50), IsSafe BOOLEAN); ",DELETE FROM Products WHERE IsSafe = false;,DELETE FROM Products WHERE IsSafe = false;,1 "Get the names of all archaeologists who have analyzed artifacts from the 'Ancient Egypt' excavation site in the 'excavation_sites', 'archaeologists', and 'artifact_analysis' tables.","CREATE TABLE excavation_sites (id INT, site_name VARCHAR(50), country VARCHAR(50), start_date DATE, end_date DATE); CREATE TABLE archaeologists (id INT, name VARCHAR(50), age INT, gender VARCHAR(10), country VARCHAR(50)); CREATE TABLE artifact_analysis (id INT, archaeologist_id INT, artifact_id INT, analysis_date DATE, excavation_site_id INT);",SELECT archaeologists.name FROM archaeologists JOIN artifact_analysis ON archaeologists.id = artifact_analysis.archaeologist_id JOIN excavation_sites ON artifact_analysis.excavation_site_id = excavation_sites.id WHERE excavation_sites.site_name = 'Ancient Egypt';,SELECT archaeologists.name FROM archaeologists INNER JOIN artifact_analysis ON archaeologists.id = artifact_analysis.archaeologist_id INNER JOIN excavation_sites ON artifact_analysis.excavation_site_id = excavation_sites.id WHERE excavation_sites.site_name = 'Ancient Egypt';,0 Which kingdom has Suin as its capital?,"CREATE TABLE table_name_65 (name_of_kingdom VARCHAR, capital VARCHAR);","SELECT name_of_kingdom FROM table_name_65 WHERE capital = ""suin"";","SELECT name_of_kingdom FROM table_name_65 WHERE capital = ""suin"";",1 What is the total revenue of products with ethical labor practices?,"CREATE TABLE products (product_id INT, name TEXT, revenue FLOAT, ethical_labor_practices BOOLEAN); ",SELECT SUM(revenue) FROM products WHERE ethical_labor_practices = true;,SELECT SUM(revenue) FROM products WHERE ethical_labor_practices = true;,1 "Name of David Kimball, and an Overall smaller than 229 is what highest round?","CREATE TABLE table_name_51 (round INTEGER, name VARCHAR, overall VARCHAR);","SELECT MAX(round) FROM table_name_51 WHERE name = ""david kimball"" AND overall < 229;","SELECT MAX(round) FROM table_name_51 WHERE name = ""david kimball"" AND overall 229;",0 "Insert a new record of an accessibility audit for a university with a score of 85, conducted on April 15, 2022.","CREATE TABLE accessibility_audits (id INT PRIMARY KEY, university VARCHAR(255), score INT, audit_date DATE);","INSERT INTO accessibility_audits (university, score, audit_date) VALUES ('Stanford University', 85, '2022-04-15');","INSERT INTO accessibility_audits (id, university, score, audit_date) VALUES (1, 'University of California', 85, '2022-04-15');",0 Name the number of semifinalists for 19 rank,"CREATE TABLE table_30007505_1 (semifinalists VARCHAR, rank VARCHAR);",SELECT COUNT(semifinalists) FROM table_30007505_1 WHERE rank = 19;,SELECT COUNT(semifinalists) FROM table_30007505_1 WHERE rank = 19;,1 Which show had a part 3 before 2011?,"CREATE TABLE table_name_45 (show VARCHAR, year VARCHAR, episode_title VARCHAR);","SELECT show FROM table_name_45 WHERE year < 2011 AND episode_title = ""part 3"";","SELECT show FROM table_name_45 WHERE year 2011 AND episode_title = ""part 3"";",0 "Which Founded has a League of women's flat track derby association, and a Club of omaha rollergirls?","CREATE TABLE table_name_14 (founded INTEGER, league VARCHAR, club VARCHAR);","SELECT AVG(founded) FROM table_name_14 WHERE league = ""women's flat track derby association"" AND club = ""omaha rollergirls"";","SELECT SUM(founded) FROM table_name_14 WHERE league = ""women's flat track derby association"" AND club = ""omaha rollergirls"";",0 "What is the total watch time, in minutes, for videos in the 'Education' category, produced in Asia, by gender of the content creators?","CREATE TABLE videos (video_id INT, title VARCHAR(50), category VARCHAR(50), production_country VARCHAR(50), producer_gender VARCHAR(50), watch_time INT); ","SELECT producer_gender, SUM(watch_time) as total_watch_time_minutes FROM videos WHERE category = 'Education' AND production_country IN ('Japan', 'China', 'India') GROUP BY producer_gender;","SELECT producer_gender, SUM(watch_time) as total_watch_time FROM videos WHERE category = 'Education' AND production_country = 'Asia' GROUP BY producer_gender;",0 what is the total number of nicknames for southwestern college?,"CREATE TABLE table_262527_1 (nickname VARCHAR, institution VARCHAR);","SELECT COUNT(nickname) FROM table_262527_1 WHERE institution = ""Southwestern College"";","SELECT COUNT(nickname) FROM table_262527_1 WHERE institution = ""Southwestern College"";",1 How many high points were there in the game 67?,"CREATE TABLE table_11960944_7 (high_points VARCHAR, game VARCHAR);",SELECT COUNT(high_points) FROM table_11960944_7 WHERE game = 67;,SELECT high_points FROM table_11960944_7 WHERE game = 67;,0 Delete all records from the Employees table that have a null value in the LastName column,"CREATE TABLE Employees (EmployeeID INT, FirstName VARCHAR(50), LastName VARCHAR(50), Department VARCHAR(50), StartDate DATE); ",DELETE FROM Employees WHERE LastName IS NULL;,DELETE FROM Employees WHERE LastName IS NULL;,1 What is the maximum quantity of fish caught per species in the Pacific Ocean in 2021?,"CREATE TABLE FishCaught (year INT, species VARCHAR(50), ocean VARCHAR(50), quantity INT); ","SELECT species, MAX(quantity) as max_quantity FROM FishCaught WHERE ocean = 'Pacific Ocean' AND year = 2021 GROUP BY species;","SELECT species, MAX(quantity) FROM FishCaught WHERE ocean = 'Pacific Ocean' AND year = 2021 GROUP BY species;",0 "Update the name of the satellite with ID 456 to ""Hubble"".","CREATE TABLE satellites (id INT, name VARCHAR(255), country_of_origin VARCHAR(255), avg_distance FLOAT);",UPDATE satellites SET name = 'Hubble' WHERE id = 456;,UPDATE satellites SET name = 'Hubble' WHERE id = 456;,1 "List all traditional arts and their origins from the ""arts"" table.","CREATE TABLE arts (id INT, art_name VARCHAR(50), origin_country VARCHAR(50)); ","SELECT art_name, origin_country FROM arts;","SELECT art_name, origin_country FROM arts;",1 What were the sales figures for 'CompanyY' in Q2 2019?,"CREATE TABLE company_sales(company_name TEXT, sale_amount INT, sale_quarter INT, sale_year INT); ",SELECT SUM(sale_amount) FROM company_sales WHERE company_name = 'CompanyY' AND sale_quarter = 2 AND sale_year = 2019;,SELECT SUM(sale_amount) FROM company_sales WHERE company_name = 'CompanyY' AND sale_quarter = 2 AND sale_year = 2019;,1 Which countries have received the most climate finance for mitigation projects?,"CREATE TABLE climate_finance (country VARCHAR(255), sector VARCHAR(255), amount DECIMAL(10,2)); ","SELECT country, SUM(amount) as total_amount FROM climate_finance WHERE sector = 'mitigation' GROUP BY country ORDER BY total_amount DESC;","SELECT country, SUM(amount) as total_finance FROM climate_finance WHERE sector = 'Mitigation' GROUP BY country ORDER BY total_finance DESC;",0 Which Year has a nominated outstanding actor in a musical?,"CREATE TABLE table_name_88 (year VARCHAR, result VARCHAR, category VARCHAR);","SELECT year FROM table_name_88 WHERE result = ""nominated"" AND category = ""outstanding actor in a musical"";","SELECT year FROM table_name_88 WHERE result = ""nominated outstanding actor"" AND category = ""musical"";",0 Who won the womens doubles in 2002?,"CREATE TABLE table_12194021_1 (womens_doubles VARCHAR, season VARCHAR);",SELECT womens_doubles FROM table_12194021_1 WHERE season = 2002;,SELECT womens_doubles FROM table_12194021_1 WHERE season = 2002;,1 What is the number of climate communication campaigns in the Sub-Saharan Africa region that targeted coastal communities and were launched in the last 2 years?,"CREATE TABLE climate_communication (campaign VARCHAR(50), region VARCHAR(50), target VARCHAR(50), year INT); ",SELECT COUNT(*) FROM climate_communication WHERE region = 'Sub-Saharan Africa' AND target = 'Coastal Communities' AND year BETWEEN 2020 AND 2021;,SELECT COUNT(*) FROM climate_communication WHERE region = 'Sub-Saharan Africa' AND target = 'Coastal Communities' AND year BETWEEN 2019 AND 2021;,0 what is the pick for adam gettis?,"CREATE TABLE table_name_12 (pick INTEGER, name VARCHAR);","SELECT MIN(pick) FROM table_name_12 WHERE name = ""adam gettis"";","SELECT SUM(pick) FROM table_name_12 WHERE name = ""adam gettis"";",0 "Which New/Returning/Same Network has a Previous Network of nbc, and a Show of blockbusters?","CREATE TABLE table_name_12 (new_returning_same_network VARCHAR, previous_network VARCHAR, show VARCHAR);","SELECT new_returning_same_network FROM table_name_12 WHERE previous_network = ""nbc"" AND show = ""blockbusters"";","SELECT new_returning_same_network FROM table_name_12 WHERE previous_network = ""nbc"" AND show = ""blockbusters"";",1 How many military vehicles were serviced in Canada in the past 6 months?,"CREATE TABLE military_equipment (equipment_id INT, equipment_type VARCHAR(50), last_service_date DATE, country VARCHAR(50));","SELECT COUNT(equipment_id) FROM military_equipment WHERE equipment_type NOT LIKE '%aircraft%' AND country = 'Canada' AND last_service_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);","SELECT COUNT(*) FROM military_equipment WHERE last_service_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) AND country = 'Canada';",0 "What is the total number of smart city projects in the country of Japan, and what is their total budget?","CREATE TABLE smart_city_projects (id INT, name VARCHAR(255), country VARCHAR(255), budget FLOAT);","SELECT COUNT(*) AS total_projects, SUM(budget) AS total_budget FROM smart_city_projects WHERE country = 'Japan';","SELECT COUNT(*), SUM(budget) FROM smart_city_projects WHERE country = 'Japan';",0 Which biosensor technology patents were filed in China in 2021?,"CREATE TABLE Patents (patent_id INT, patent_name TEXT, patent_date DATE, country TEXT);",SELECT COUNT(*) FROM Patents WHERE patent_date >= '2021-01-01' AND patent_date < '2022-01-01' AND country = 'China';,SELECT patent_name FROM Patents WHERE patent_date BETWEEN '2021-01-01' AND '2021-12-31' AND country = 'China';,0 "What was the record after the game on May 1, 2004?","CREATE TABLE table_name_62 (record VARCHAR, date VARCHAR);","SELECT record FROM table_name_62 WHERE date = ""may 1, 2004"";","SELECT record FROM table_name_62 WHERE date = ""may 1, 2004"";",1 What is the average size of customers in the Europe region?,"CREATE TABLE customers (customer_id INT PRIMARY KEY, region VARCHAR(50), size INT); ",SELECT AVG(size) FROM customers WHERE region = 'Europe';,SELECT AVG(size) FROM customers WHERE region = 'Europe';,1 "Which American football players have the highest and lowest salaries, along with their positions and team names?","CREATE TABLE football_players (player_id INT, player_name VARCHAR(255), position VARCHAR(255), team_name VARCHAR(255), salary INT); ","SELECT player_name, position, team_name, salary FROM (SELECT player_name, position, team_name, salary, ROW_NUMBER() OVER (ORDER BY salary DESC) as rnk FROM football_players) ft WHERE rnk = 1 OR rnk = (SELECT COUNT(*) FROM football_players);","SELECT player_name, position, team_name, salary FROM football_players ORDER BY salary DESC LIMIT 1; SELECT player_name, position, team_name, salary FROM football_players ORDER BY salary DESC LIMIT 1;",0 What's the genre of developer(s) Lionhead Studios?,"CREATE TABLE table_name_41 (genre VARCHAR, developer_s_ VARCHAR);","SELECT genre FROM table_name_41 WHERE developer_s_ = ""lionhead studios"";","SELECT genre FROM table_name_41 WHERE developer_s_ = ""lionhead studios"";",1 Insert records for 700 units of Samarium production in Nigeria for 2023.,"CREATE TABLE production (year INT, element VARCHAR(10), country VARCHAR(10), quantity INT);","INSERT INTO production (year, element, country, quantity) VALUES (2023, 'Samarium', 'Nigeria', 700);","INSERT INTO production (year, element, country, quantity) VALUES ('Samarium', 2023, 700);",0 What was the away team score at Western Oval?,"CREATE TABLE table_name_64 (away_team VARCHAR, venue VARCHAR);","SELECT away_team AS score FROM table_name_64 WHERE venue = ""western oval"";","SELECT away_team AS score FROM table_name_64 WHERE venue = ""western oval"";",1 Find the number of unique viewers for each TV show and the total number of views for each show,"CREATE TABLE views (viewer_id INT, show_title VARCHAR(255), views INT); ","SELECT show_title, COUNT(DISTINCT viewer_id) as unique_viewers, SUM(views) as total_views FROM views GROUP BY show_title;","SELECT show_title, COUNT(DISTINCT viewer_id) as unique_viewers, SUM(views) as total_views FROM views GROUP BY show_title;",1 Update the record in the 'community_engagement' table with an engagement ID of 9 to reflect a total of 200 social media shares,"CREATE TABLE community_engagement (engagement_id INT, engagement_type VARCHAR(10), total_shares INT);",UPDATE community_engagement SET total_shares = 200 WHERE engagement_id = 9;,UPDATE community_engagement SET total_shares = 200 WHERE engagement_id = 9;,1 What is the average fine for traffic violations in each district?,"CREATE TABLE TrafficViolations (ID INT, District VARCHAR(20), Fine FLOAT); ","SELECT District, AVG(Fine) OVER (PARTITION BY District) AS AvgFine FROM TrafficViolations;","SELECT District, AVG(Fine) FROM TrafficViolations GROUP BY District;",0 What is the 3'utr sequence with a variant id of acd'6a 3?,CREATE TABLE table_14332822_1 (variant_id VARCHAR);,"SELECT 3 AS ’utr_sequence FROM table_14332822_1 WHERE variant_id = ""ACD'6A 3"";","SELECT 3 AS 'utr' FROM table_14332822_1 WHERE variant_id = ""Acd'6a 3"";",0 What's the platform of Super Mario All-Stars?,"CREATE TABLE table_name_89 (platform VARCHAR, title VARCHAR);","SELECT platform FROM table_name_89 WHERE title = ""super mario all-stars"";","SELECT platform FROM table_name_89 WHERE title = ""super mario all-stars"";",1 Who is the entrant when the chassis is ferrari 125?,"CREATE TABLE table_name_88 (entrant VARCHAR, chassis VARCHAR);","SELECT entrant FROM table_name_88 WHERE chassis = ""ferrari 125"";","SELECT entrant FROM table_name_88 WHERE chassis = ""ferrari 125"";",1 What is the remaining budget for each program?,"CREATE TABLE budgets (program_id VARCHAR(20), budget DECIMAL(10,2)); ","SELECT program_id, budget - SUM(amount) AS remaining_budget FROM budgets JOIN donations ON budgets.program_id = donations.program_id GROUP BY program_id;","SELECT program_id, SUM(budget) as remaining_budget FROM budgets GROUP BY program_id;",0 Which country does the player pele belong to?,"CREATE TABLE table_name_85 (country VARCHAR, name VARCHAR);","SELECT country FROM table_name_85 WHERE name = ""pele"";","SELECT country FROM table_name_85 WHERE name = ""pele"";",1 What was the title of the episode written by Mark Goffman?,"CREATE TABLE table_23255941_1 (title VARCHAR, written_by VARCHAR);","SELECT title FROM table_23255941_1 WHERE written_by = ""Mark Goffman"";","SELECT title FROM table_23255941_1 WHERE written_by = ""Mark Goffman"";",1 Who was the away team with a tie of 14?,"CREATE TABLE table_name_4 (away_team VARCHAR, tie_no VARCHAR);","SELECT away_team FROM table_name_4 WHERE tie_no = ""14"";","SELECT away_team FROM table_name_4 WHERE tie_no = ""14"";",1 Who are the co-drivers before 2010 with under 326 laps?,"CREATE TABLE table_name_76 (co_drivers VARCHAR, year VARCHAR, laps VARCHAR);",SELECT co_drivers FROM table_name_76 WHERE year < 2010 AND laps < 326;,SELECT co_drivers FROM table_name_76 WHERE year 2010 AND laps 326;,0 "Count the number of luxury hotel bookings from the OTA 'Agoda' in the last month, grouped by week.","CREATE TABLE bookings (id INT, hotel_type TEXT, agency TEXT, booking_date DATE); ","SELECT WEEK(booking_date) AS week, COUNT(*) FROM bookings WHERE hotel_type = 'Luxury' AND agency = 'Agoda' AND booking_date >= DATE_SUB(NOW(), INTERVAL 1 MONTH) GROUP BY week;","SELECT EXTRACT(WEEK FROM booking_date) AS week, COUNT(*) FROM bookings WHERE hotel_type = 'luxury' AND agency = 'Agoda' AND booking_date >= DATEADD(month, -1, GETDATE()) GROUP BY week;",0 Which destinations in the Middle East have the best travel safety records?,"CREATE TABLE middle_east_destinations (destination VARCHAR(50), safety_record VARCHAR(50)); ",SELECT destination FROM middle_east_destinations WHERE safety_record = 'Excellent';,"SELECT destination, safety_record FROM middle_east_destinations ORDER BY safety_record DESC LIMIT 1;",0 What's the nickname of the team with enrollment of 40747?,"CREATE TABLE table_28243691_2 (team_nickname VARCHAR, enrollment VARCHAR);",SELECT team_nickname FROM table_28243691_2 WHERE enrollment = 40747;,"SELECT team_nickname FROM table_28243691_2 WHERE enrollment = ""40747"";",0 What is the total number of mobile and broadband customers in the city of Houston?,"CREATE TABLE service_locations (id INT, city VARCHAR(50), service VARCHAR(50)); ",SELECT COUNT(*) FROM service_locations WHERE city = 'Houston';,"SELECT COUNT(*) FROM service_locations WHERE city = 'Houston' AND service IN ('mobile', 'broadband');",0 "What is the total number of posts for users from the ""social_media"" platform who have more than 100000 followers?","CREATE TABLE user_data (user_id INT, username VARCHAR(50), country VARCHAR(50), followers INT, posts INT); ",SELECT SUM(posts) as total_posts FROM user_data WHERE followers > 100000;,SELECT SUM(posts) FROM user_data WHERE country = 'USA' AND followers > 100000;,0 Which sustainable material brands have not been updated in the past month?,"CREATE TABLE sustainable_material_brands (brand_id INT PRIMARY KEY, brand_name VARCHAR(100), last_updated TIMESTAMP);",SELECT brand_name FROM sustainable_material_brands WHERE last_updated < NOW() - INTERVAL '1 month';,"SELECT brand_name FROM sustainable_material_brands WHERE last_updated DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH);",0 What is the average daily trading volume of non-fungible tokens (NFT) in South America?,"CREATE TABLE nft_trading (id INT, date DATE, country VARCHAR(50), volume DECIMAL(10, 2)); ","SELECT AVG(volume) FROM nft_trading WHERE country IN ('Brazil', 'Argentina', 'Chile') AND date BETWEEN '2022-01-01' AND '2022-01-31';",SELECT AVG(volume) FROM nft_trading WHERE country = 'South America';,0 What is the total number of cybersecurity incidents reported by European countries in 2020?,"CREATE TABLE CybersecurityIncidents (id INT PRIMARY KEY, country VARCHAR(50), incident_type VARCHAR(50), incident_date DATE); ","SELECT country, COUNT(*) as total_incidents FROM CybersecurityIncidents WHERE YEAR(incident_date) = 2020 AND country IN ('Germany', 'France', 'UK') GROUP BY country;","SELECT COUNT(*) FROM CybersecurityIncidents WHERE country IN ('Germany', 'France', 'Italy', 'Italy', 'Spain') AND incident_date BETWEEN '2020-01-01' AND '2020-12-31';",0 Delete green buildings in a specific location,"CREATE TABLE green_buildings (id INT, name VARCHAR(50), location VARCHAR(50), carbon_offset_value FLOAT);",DELETE FROM green_buildings WHERE location = 'City B';,DELETE FROM green_buildings WHERE location = 'New York';,0 How many items are produced in the top 2 countries with the most productions?,"CREATE TABLE CountryProduction (item_id INT, country VARCHAR(255)); ","SELECT COUNT(*) FROM (SELECT country, ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) rn FROM CountryProduction GROUP BY country) t WHERE rn <= 2;",SELECT COUNT(*) FROM CountryProduction GROUP BY country ORDER BY COUNT(*) DESC LIMIT 2;,0 Where did Geelong play a home game?,"CREATE TABLE table_name_74 (venue VARCHAR, home_team VARCHAR);","SELECT venue FROM table_name_74 WHERE home_team = ""geelong"";","SELECT venue FROM table_name_74 WHERE home_team = ""geelong"";",1 Find the bioprocess engineering projects led by 'Dr. Maria Rodriguez' that started in 2020.,"CREATE TABLE bioprocess_engineering (id INT PRIMARY KEY, project_name VARCHAR(255), lead_scientist VARCHAR(255), start_date DATE, end_date DATE); ","SELECT project_name, lead_scientist FROM bioprocess_engineering WHERE lead_scientist = 'Dr. Maria Rodriguez' AND start_date >= '2020-01-01' AND start_date <= '2020-12-31';",SELECT project_name FROM bioprocess_engineering WHERE lead_scientist = 'Dr. Maria Rodriguez' AND start_date BETWEEN '2020-01-01' AND '2020-12-31';,0 What's the average digital asset price for each type?,"CREATE TABLE digital_assets (id INT, name VARCHAR(255), type VARCHAR(50), price DECIMAL(10,2)); ","SELECT type, AVG(price) FROM digital_assets GROUP BY type;","SELECT type, AVG(price) as avg_price FROM digital_assets GROUP BY type;",0 What is the average time taken to resolve citizen complaints in Ward 9?,"CREATE TABLE CitizenComplaints (Ward INT, ComplaintID INT, ComplaintDate DATE, ResolutionDate DATE); ","SELECT AVG(DATEDIFF(ResolutionDate, ComplaintDate)) FROM CitizenComplaints WHERE Ward = 9 AND ResolutionDate IS NOT NULL;","SELECT AVG(DATEDIFF(ResolutionDate, ComplaintDate)) FROM CitizenComplaints WHERE Ward = 9;",0 Name the Theaters that has a Rank larger than 7?,"CREATE TABLE table_name_83 (theaters INTEGER, rank INTEGER);",SELECT MAX(theaters) FROM table_name_83 WHERE rank > 7;,SELECT AVG(theaters) FROM table_name_83 WHERE rank > 7;,0 "How many countries were sampled in the index created by The Economist, published in 2007 and ranked 2nd in the LA Ranking?","CREATE TABLE table_19948664_1 (countries_sampled INTEGER, ranking_la__2_ VARCHAR, author___editor___source VARCHAR, year_of_publication VARCHAR);","SELECT MAX(countries_sampled) FROM table_19948664_1 WHERE author___editor___source = ""The Economist"" AND year_of_publication = ""2007"" AND ranking_la__2_ = ""2nd"";","SELECT SUM(countries_sampled) FROM table_19948664_1 WHERE author___editor___source = ""The Economist"" AND year_of_publication = 2007 AND ranking_la__2_ = ""2nd"";",0 Which Transfer fee has a From club of blackburn rovers?,"CREATE TABLE table_name_80 (transfer_fee VARCHAR, from_club VARCHAR);","SELECT transfer_fee FROM table_name_80 WHERE from_club = ""blackburn rovers"";","SELECT transfer_fee FROM table_name_80 WHERE from_club = ""blackburn rovers"";",1 What is the total revenue of games with a single-player mode?,"CREATE TABLE GameDesignData (GameID INT, SinglePlayer BOOLEAN, Revenue DECIMAL(10,2)); ",SELECT SUM(Revenue) FROM GameDesignData WHERE SinglePlayer = TRUE;,SELECT SUM(Revenue) FROM GameDesignData WHERE SinglePlayer = TRUE;,1 Which 2009 tournament was french open?,CREATE TABLE table_name_51 (tournament VARCHAR);,"SELECT 2009 FROM table_name_51 WHERE tournament = ""french open"";","SELECT 2009 FROM table_name_51 WHERE tournament = ""french open"";",1 What is the date of week 11?,"CREATE TABLE table_name_20 (date VARCHAR, week VARCHAR);",SELECT date FROM table_name_20 WHERE week = 11;,SELECT date FROM table_name_20 WHERE week = 11;,1 What is the title of Melsrose Place episode number 168?,"CREATE TABLE table_name_90 (title VARCHAR, no_in_series VARCHAR);",SELECT title FROM table_name_90 WHERE no_in_series = 168;,SELECT title FROM table_name_90 WHERE no_in_series = 168;,1 What is the average production cost for items made of organic cotton?,"CREATE TABLE products (id INT, name TEXT, material TEXT, production_cost FLOAT); ",SELECT AVG(production_cost) FROM products WHERE material = 'Organic Cotton';,SELECT AVG(production_cost) FROM products WHERE material = 'organic cotton';,0 "Find the top 5 countries with the highest average sustainability score for their manufacturers, along with the total number of manufacturers.","CREATE TABLE manufacturers (id INT PRIMARY KEY, name VARCHAR(255), country VARCHAR(255), sustainability_score INT);","SELECT m.country, AVG(m.sustainability_score) as avg_score, COUNT(*) as total_manufacturers, RANK() OVER (ORDER BY avg_score DESC) as rank FROM manufacturers m GROUP BY m.country HAVING rank <= 5;","SELECT country, AVG(sustainability_score) as avg_sustainability_score, COUNT(*) as total_manufacturers FROM manufacturers GROUP BY country ORDER BY avg_sustainability_score DESC LIMIT 5;",0 What is the total cost of construction projects in Texas?,"CREATE TABLE Construction_Projects (id INT, project_name VARCHAR(255), cost FLOAT, state VARCHAR(255)); ",SELECT SUM(cost) FROM Construction_Projects WHERE state = 'Texas';,SELECT SUM(cost) FROM Construction_Projects WHERE state = 'Texas';,1 What is the total number of vessels involved in maritime safety incidents?,"CREATE TABLE maritime_safety_incidents (region text, vessel_id integer); ",SELECT COUNT(DISTINCT vessel_id) FROM maritime_safety_incidents;,SELECT COUNT(*) FROM maritime_safety_incidents;,0 Which team has an unknown coach and location of Athelstone?,"CREATE TABLE table_name_98 (team VARCHAR, coach VARCHAR, location VARCHAR);","SELECT team FROM table_name_98 WHERE coach = ""unknown"" AND location = ""athelstone"";","SELECT team FROM table_name_98 WHERE coach = ""unknown"" AND location = ""athelstone"";",1 How many teachers have completed a professional development course in each school?,"CREATE TABLE schools (school_id INT, school_name VARCHAR(255)); CREATE TABLE teachers (teacher_id INT, school_id INT); CREATE TABLE courses (course_id INT, course_name VARCHAR(255), completion_date DATE); CREATE TABLE teacher_courses (teacher_id INT, course_id INT);","SELECT s.school_name, COUNT(tc.teacher_id) FROM schools s JOIN teachers t ON s.school_id = t.school_id JOIN teacher_courses tc ON t.teacher_id = tc.teacher_id JOIN courses c ON tc.course_id = c.course_id WHERE c.completion_date >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR) GROUP BY s.school_id;","SELECT s.school_name, COUNT(t.teacher_id) as num_teachers FROM schools s JOIN teachers t ON s.school_id = t.school_id JOIN teacher_courses tc ON t.teacher_id = tc.teacher_id JOIN courses c ON tc.course_id = c.course_id GROUP BY s.school_name;",0 What language is the Lyrics of the release with Catalog number 560 6111?,"CREATE TABLE table_name_59 (lyrics VARCHAR, catalog_number VARCHAR);","SELECT lyrics FROM table_name_59 WHERE catalog_number = ""560 6111"";","SELECT lyrics FROM table_name_59 WHERE catalog_number = ""560 6111"";",1 What's the total amount of impact investments in Mexico?,"CREATE TABLE impact_investments (id INT, country VARCHAR(255), amount FLOAT, strategy_id INT); ",SELECT SUM(amount) FROM impact_investments WHERE country = 'Mexico';,SELECT SUM(amount) FROM impact_investments WHERE country = 'Mexico';,1 When is the French Open when serena williams is the player?,"CREATE TABLE table_197638_7 (french_open INTEGER, player VARCHAR);","SELECT MIN(french_open) FROM table_197638_7 WHERE player = ""Serena Williams"";","SELECT MAX(french_open) FROM table_197638_7 WHERE player = ""Serena Williams"";",0 What was the total amount donated by each donor in Q1 2020?,"CREATE TABLE Donors (DonorID int, DonorName varchar(50), AmountDonated numeric(10,2)); ","SELECT DonorName, SUM(AmountDonated) as TotalDonated FROM Donors WHERE AmountDonated >= 0 AND AmountDonated < 999.99 GROUP BY DonorName;","SELECT DonorName, SUM(AmountDonated) as TotalDonated FROM Donors WHERE YEAR(DonationDate) = 2020 GROUP BY DonorName;",0 display the emails of the employees who have no commission percentage and salary within the range 7000 to 12000 and works in that department which number is 50.,"CREATE TABLE employees (email VARCHAR, department_id VARCHAR, commission_pct VARCHAR, salary VARCHAR);","SELECT email FROM employees WHERE commission_pct = ""null"" AND salary BETWEEN 7000 AND 12000 AND department_id = 50;",SELECT email FROM employees WHERE commission_pct = 0 AND salary BETWEEN 7000 AND 12000 AND department_id = 50;,0 Which country has the fewest marine research stations?,"CREATE TABLE countries (country_name TEXT, num_research_stations INT); ",SELECT country_name FROM countries ORDER BY num_research_stations LIMIT 1;,"SELECT country_name, num_research_stations FROM countries ORDER BY num_research_stations DESC LIMIT 1;",0 "What is the record for game where Columbus is visitor, Phoenix is home, and decision is made by Denis?","CREATE TABLE table_name_3 (record VARCHAR, home VARCHAR, visitor VARCHAR, decision VARCHAR);","SELECT record FROM table_name_3 WHERE visitor = ""columbus"" AND decision = ""denis"" AND home = ""phoenix"";","SELECT record FROM table_name_3 WHERE visitor = ""columbus"" AND decision = ""denis"" AND home = ""phoenix"";",1 Who was the opponent in week 13?,"CREATE TABLE table_name_25 (opponent VARCHAR, week VARCHAR);",SELECT opponent FROM table_name_25 WHERE week = 13;,SELECT opponent FROM table_name_25 WHERE week = 13;,1 The golfer from the United states with a score of 72-70-69=211 is in what place?,"CREATE TABLE table_name_46 (place VARCHAR, country VARCHAR, score VARCHAR);","SELECT place FROM table_name_46 WHERE country = ""united states"" AND score = 72 - 70 - 69 = 211;","SELECT place FROM table_name_46 WHERE country = ""united states"" AND score = 72 - 70 - 69 = 211;",1 Insert new records for 5 volunteers from the 'Volunteers' table,"CREATE TABLE Volunteers (VolunteerID INT, FirstName VARCHAR(50), LastName VARCHAR(50), Skills VARCHAR(100), Hours INT);","INSERT INTO Volunteers (VolunteerID, FirstName, LastName, Skills, Hours) VALUES (1, 'Jamal', 'Smith', 'Fundraising, Event Planning', 10), (2, 'Leah', 'Gonzales', 'Tutoring, Mentoring', 20), (3, 'Hiroshi', 'Tanaka', 'Graphic Design, Social Media', 15), (4, 'Claudia', 'Rodriguez', 'Finance, Accounting', 25), (5, 'Mohammed', 'Ali', 'IT Support, Networking', 30);","INSERT INTO Volunteers (VolunteerID, FirstName, LastName, Skills, Hours) VALUES (1, 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James'), (2, 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', 'James', '",0 What is the Sport with a Name that is gustav larsson?,"CREATE TABLE table_name_9 (sport VARCHAR, name VARCHAR);","SELECT sport FROM table_name_9 WHERE name = ""gustav larsson"";","SELECT sport FROM table_name_9 WHERE name = ""gustav larsson"";",1 "What is the lowest week that has November 30, 2003 as the date?","CREATE TABLE table_name_19 (week INTEGER, date VARCHAR);","SELECT MIN(week) FROM table_name_19 WHERE date = ""november 30, 2003"";","SELECT MIN(week) FROM table_name_19 WHERE date = ""november 30, 2003"";",1 How many spectators watched when the away team was Collingwood?,"CREATE TABLE table_name_8 (crowd VARCHAR, away_team VARCHAR);","SELECT crowd FROM table_name_8 WHERE away_team = ""collingwood"";","SELECT crowd FROM table_name_8 WHERE away_team = ""collingwood"";",1 What is every institution with the nickname of Quakers?,"CREATE TABLE table_261954_1 (institution VARCHAR, nickname VARCHAR);","SELECT institution FROM table_261954_1 WHERE nickname = ""Quakers"";","SELECT institution FROM table_261954_1 WHERE nickname = ""Quakers"";",1 Find users who have made at least one post per day for the last 7 days.,"CREATE TABLE users (id INT, name VARCHAR(50)); CREATE TABLE posts (id INT, user_id INT, timestamp DATETIME); ","SELECT users.name FROM users INNER JOIN posts ON users.id = posts.user_id WHERE posts.timestamp >= DATE_SUB(NOW(), INTERVAL 7 DAY) GROUP BY users.name HAVING COUNT(DISTINCT DATE(posts.timestamp)) = 7;","SELECT users.name FROM users INNER JOIN posts ON users.id = posts.user_id WHERE posts.timestamp >= DATE_SUB(CURRENT_DATE, INTERVAL 7 DAY);",0 How many games were played where the height of the player is 1.92m?,"CREATE TABLE table_26847237_2 (games VARCHAR, height VARCHAR);","SELECT COUNT(games) FROM table_26847237_2 WHERE height = ""1.92m"";","SELECT COUNT(games) FROM table_26847237_2 WHERE height = ""1.92m"";",1 What was the first season for Syrianska FC,"CREATE TABLE table_1560673_1 (first_season VARCHAR, club VARCHAR);","SELECT first_season FROM table_1560673_1 WHERE club = ""Syrianska FC"";","SELECT first_season FROM table_1560673_1 WHERE club = ""Syrianska FC"";",1 What was the score of the game that had a loss of Williams (1-1)?,"CREATE TABLE table_name_48 (score VARCHAR, loss VARCHAR);","SELECT score FROM table_name_48 WHERE loss = ""williams (1-1)"";","SELECT score FROM table_name_48 WHERE loss = ""williams (1-1)"";",1 "What's the lowest Floors with Feet that's larger htan 262, has a Name of Standard Bank Building, and Metres that's larger htan 138.8?","CREATE TABLE table_name_29 (floors INTEGER, metres VARCHAR, feet VARCHAR, name VARCHAR);","SELECT MIN(floors) FROM table_name_29 WHERE feet > 262 AND name = ""standard bank building"" AND metres > 138.8;","SELECT MIN(floors) FROM table_name_29 WHERE feet > 262 AND name = ""standard bank building"" AND metres > 138.8;",1 What Song has a Length of 2:50?,"CREATE TABLE table_name_7 (song_title VARCHAR, length VARCHAR);","SELECT song_title FROM table_name_7 WHERE length = ""2:50"";","SELECT song_title FROM table_name_7 WHERE length = ""2:50"";",1 What day is north melbourne the away side?,"CREATE TABLE table_name_51 (date VARCHAR, away_team VARCHAR);","SELECT date FROM table_name_51 WHERE away_team = ""north melbourne"";","SELECT date FROM table_name_51 WHERE away_team = ""north melbourne"";",1 What is the density when simplified shows 南山区?,"CREATE TABLE table_name_33 (density VARCHAR, simplified VARCHAR);","SELECT density FROM table_name_33 WHERE simplified = ""南山区"";","SELECT density FROM table_name_33 WHERE simplified = """";",0 What name that has a DCSF number bigger than 2448 and an Ofsted number of 131319?,"CREATE TABLE table_name_95 (name VARCHAR, dcsf_number VARCHAR, ofsted_number VARCHAR);",SELECT name FROM table_name_95 WHERE dcsf_number > 2448 AND ofsted_number = 131319;,SELECT name FROM table_name_95 WHERE dcsf_number > 2448 AND ofsted_number = 131319;,1 What is the theme of the song by Soul Brothers Six,"CREATE TABLE table_21501518_1 (theme VARCHAR, original_artist VARCHAR);","SELECT theme FROM table_21501518_1 WHERE original_artist = ""Soul Brothers Six"";","SELECT theme FROM table_21501518_1 WHERE original_artist = ""Soul Brothers Six"";",1 "List all jazz and blues songs that have been streamed more than 1 million times, sorted by stream count in descending order.","CREATE TABLE streams (song_id INT, genre VARCHAR(10), stream_count BIGINT);","SELECT genre, song_id, stream_count FROM streams WHERE genre IN ('jazz', 'blues') AND stream_count > 1000000 ORDER BY stream_count DESC;","SELECT genre, stream_count FROM streams WHERE genre IN ('jazz', 'blues') GROUP BY genre ORDER BY stream_count DESC;",0 What is the average water usage per capita in drought-impacted areas since 2015?,"CREATE TABLE drought_impact (id INT, area VARCHAR(50), year INT, PRIMARY KEY(id, year)); CREATE TABLE water_usage (id INT, area VARCHAR(50), year INT, usage FLOAT, PRIMARY KEY(id, year), FOREIGN KEY (id) REFERENCES drought_impact(id)); ",SELECT AVG(wu.usage) as avg_usage FROM drought_impact di JOIN water_usage wu ON di.id = wu.id WHERE di.year >= 2015;,SELECT AVG(water_usage.usage) FROM water_usage INNER JOIN drought_impact ON water_usage.area = drought_impact.area WHERE drought_impact.year >= 2015;,0 What is the Position of the person with a total less than 16.65 and an A score of 7.4?,"CREATE TABLE table_name_40 (position INTEGER, total VARCHAR, a_score VARCHAR);",SELECT MIN(position) FROM table_name_40 WHERE total < 16.65 AND a_score = 7.4;,SELECT SUM(position) FROM table_name_40 WHERE total 16.65 AND a_score = 7.4;,0 Who was the winner of the race in monza?,"CREATE TABLE table_name_89 (race VARCHAR, location VARCHAR);","SELECT race AS Winner FROM table_name_89 WHERE location = ""monza"";","SELECT race FROM table_name_89 WHERE location = ""monza"";",0 What is the highest number of goals scored,CREATE TABLE table_24565004_7 (goals¹ INTEGER);,SELECT MAX(goals¹) FROM table_24565004_7;,SELECT MAX(goals1) FROM table_24565004_7;,0 "What venue had gross revenues of $1,325,153 in 2011?","CREATE TABLE table_name_84 (venue VARCHAR, gross_revenue__2011_ VARCHAR);","SELECT venue FROM table_name_84 WHERE gross_revenue__2011_ = ""$1,325,153"";","SELECT venue FROM table_name_84 WHERE gross_revenue__2011_ = ""$1,325,153"";",1 What is the 17th c. pronunciation when the british is əʊ?,CREATE TABLE table_name_68 (british VARCHAR);,"SELECT 17 AS th_c FROM table_name_68 WHERE british = ""əʊ"";","SELECT 17 AS th_c. FROM table_name_68 WHERE british = """";",0 How many local cultural events are organized in Japan annually?,"CREATE TABLE CulturalEvents (event_id INT, event_name TEXT, country TEXT, year_of_occurrence INT); ",SELECT COUNT(*) FROM CulturalEvents WHERE country = 'Japan' GROUP BY year_of_occurrence;,SELECT COUNT(*) FROM CulturalEvents WHERE country = 'Japan';,0 What is the average no opinion score during 1954 November that is more favorable than 35?,"CREATE TABLE table_name_94 (no_opinion INTEGER, date VARCHAR, favorable VARCHAR);","SELECT AVG(no_opinion) FROM table_name_94 WHERE date = ""1954 november"" AND favorable > 35;","SELECT AVG(no_opinion) FROM table_name_94 WHERE date = ""1954 november"" AND favorable > 35;",1 "How many individuals have been incarcerated in the past month, broken down by the type of facility and the number of prior offenses?","CREATE TABLE incarceration_records (id INT, facility_type TEXT, num_prior_offenses INT, incarceration_date DATE);","SELECT facility_type, num_prior_offenses, COUNT(*) FROM incarceration_records WHERE incarceration_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY facility_type, num_prior_offenses;","SELECT facility_type, num_prior_offenses FROM incarceration_records WHERE incarceration_date >= DATEADD(month, -1, GETDATE()) GROUP BY facility_type, num_prior_offenses;",0 What season number did production code 2wab12?,"CREATE TABLE table_20726262_3 (no_in_season VARCHAR, production_code VARCHAR);","SELECT no_in_season FROM table_20726262_3 WHERE production_code = ""2WAB12"";","SELECT no_in_season FROM table_20726262_3 WHERE production_code = ""2WAB12"";",1 What was the time on Monday August 23rd for Steve Linsdell 499cc royal enfield seeley?,"CREATE TABLE table_26986076_3 (mon_23_aug VARCHAR, rider VARCHAR);","SELECT mon_23_aug FROM table_26986076_3 WHERE rider = ""Steve Linsdell 499cc Royal Enfield Seeley"";","SELECT mon_23_aug FROM table_26986076_3 WHERE rider = ""Steve Linsdell 499cc Royal Enfield Seeley"";",1 "Which attendance number was taken on november 21, 2004?","CREATE TABLE table_name_54 (attendance VARCHAR, date VARCHAR);","SELECT attendance FROM table_name_54 WHERE date = ""november 21, 2004"";","SELECT attendance FROM table_name_54 WHERE date = ""november 21, 2004"";",1 What is the highest number of laps led with 16 points?,"CREATE TABLE table_17319931_1 (laps INTEGER, points VARCHAR);","SELECT MAX(laps) AS Led FROM table_17319931_1 WHERE points = ""16"";",SELECT MAX(laps) FROM table_17319931_1 WHERE points = 16;,0 "What is the total quantity of organic skincare products sold in Canada between January 1, 2021 and January 31, 2021?","CREATE TABLE products (id INT, name VARCHAR(50), category VARCHAR(50), price DECIMAL(5,2), supplier_country VARCHAR(50), organic BOOLEAN);CREATE TABLE sales (id INT, product_id INT, quantity INT, sale_date DATE);",SELECT SUM(sales.quantity) FROM sales JOIN products ON sales.product_id = products.id WHERE products.category = 'Skincare' AND products.supplier_country = 'Canada' AND products.organic = TRUE AND sales.sale_date BETWEEN '2021-01-01' AND '2021-01-31';,SELECT SUM(sales.quantity) FROM sales JOIN products ON sales.product_id = products.id WHERE products.supplier_country = 'Canada' AND products.organic = true AND sales.sale_date BETWEEN '2021-01-01' AND '2021-01-31';,0 What is the average number of volunteers per program?,"CREATE TABLE Programs (ProgramID INT, ProgramName TEXT, VolunteerCount INT); ",SELECT AVG(VolunteerCount) FROM Programs;,"SELECT ProgramName, AVG(VolunteerCount) FROM Programs GROUP BY ProgramName;",0 What was the result for the award for best current affairs presenter?,"CREATE TABLE table_name_68 (result VARCHAR, award VARCHAR);","SELECT result FROM table_name_68 WHERE award = ""best current affairs presenter"";","SELECT result FROM table_name_68 WHERE award = ""best current affairs presenter"";",1 Calculate the average water savings,"CREATE TABLE water_conservation (id INT PRIMARY KEY, location VARCHAR(50), water_savings FLOAT);",SELECT AVG(water_savings) FROM water_conservation;,SELECT AVG(water_savings) FROM water_conservation;,1 List the number of mental health parity incidents in each state for the last 6 months.,"CREATE TABLE MentalHealthParity (IncidentID INT, IncidentDate DATE, State VARCHAR(255)); ","SELECT State, COUNT(*) FROM MentalHealthParity WHERE IncidentDate >= DATEADD(month, -6, GETDATE()) GROUP BY State;","SELECT State, COUNT(*) FROM MentalHealthParity WHERE IncidentDate >= DATEADD(month, -6, GETDATE()) GROUP BY State;",1 Find the difference in the number of public transportation users in Tokyo and Sydney.,"CREATE TABLE tokyo_public_transport (user_id INT, mode VARCHAR(20)); CREATE TABLE sydney_public_transport (user_id INT, mode VARCHAR(20)); ",SELECT COUNT(*) FROM tokyo_public_transport EXCEPT SELECT COUNT(*) FROM sydney_public_transport;,SELECT COUNT(DISTINCT user_id) FROM tokyo_public_transport; SELECT COUNT(DISTINCT user_id) FROM sydney_public_transport;,0 What is the average CO2 emission (in grams) of factories in the 'Europe' region that manufactured 'Wool Sweaters' in Q4 of 2021?,"CREATE TABLE CO2Emission (id INT PRIMARY KEY, factory_name VARCHAR(50), region VARCHAR(50), garment_type VARCHAR(50), co2_emission INT, manufacturing_date DATE); ",SELECT AVG(co2_emission) as avg_co2_emission FROM CO2Emission WHERE region = 'Europe' AND garment_type = 'Wool Sweaters' AND manufacturing_date BETWEEN '2021-10-01' AND '2021-12-31';,SELECT AVG(co2_emission) FROM CO2Emission WHERE region = 'Europe' AND garment_type = 'Wool Sweaters' AND manufacturing_date BETWEEN '2021-04-01' AND '2021-06-30';,0 "Calculate the total amount of resources depleted in the mining industry, broken down by resource type.","CREATE TABLE resource_depletion (id INT, mining_operation_id INT, resource_type VARCHAR(50), amount_depleted FLOAT);","SELECT resource_type, SUM(amount_depleted) FROM resource_depletion GROUP BY resource_type;","SELECT resource_type, SUM(amount_depleted) FROM resource_depletion GROUP BY resource_type;",1 "What is the total energy consumption (in TWh) for residential buildings in the United States, categorized by energy source, for the year 2020?","CREATE TABLE residential_buildings (id INT, country VARCHAR(2), energy_consumption FLOAT); CREATE TABLE energy_source (id INT, source VARCHAR(20), residential_buildings_id INT); ","SELECT e.source, SUM(rb.energy_consumption) as total_energy_consumption FROM residential_buildings rb JOIN energy_source e ON rb.id = e.residential_buildings_id WHERE rb.country = 'USA' AND YEAR(rb.timestamp) = 2020 GROUP BY e.source;","SELECT e.source, SUM(rb.energy_consumption) as total_energy_consumption FROM residential_buildings rb JOIN energy_source e ON rb.id = e.residential_buildings_id WHERE rb.country = 'United States' AND rb.year = 2020 GROUP BY e.source;",0 "What is the power output (kw) of builder zhuzhou, model hxd1d, with a total production of 2?","CREATE TABLE table_name_79 (power_output__kw_ VARCHAR, model VARCHAR, total_production VARCHAR, builder__family_ VARCHAR);","SELECT power_output__kw_ FROM table_name_79 WHERE total_production = ""2"" AND builder__family_ = ""zhuzhou"" AND model = ""hxd1d"";","SELECT power_output__kw_ FROM table_name_79 WHERE total_production = 2 AND builder__family_ = ""zhuzhou"" AND model = ""hxd1d"";",0 List the drivers who have collected the highest total fare in the past month.,"CREATE TABLE driver (driver_id INT, driver_name TEXT);CREATE TABLE fare (fare_id INT, driver_id INT, fare_amount DECIMAL, collection_date DATE); ","SELECT d.driver_name, SUM(f.fare_amount) as total_fare FROM driver d JOIN fare f ON d.driver_id = f.driver_id WHERE f.collection_date BETWEEN DATEADD(month, -1, GETDATE()) AND GETDATE() GROUP BY d.driver_id ORDER BY total_fare DESC;","SELECT driver_name, SUM(fare_amount) as total_fare FROM driver JOIN fare ON driver.driver_id = fare.driver_id WHERE collection_date >= DATEADD(month, -1, GETDATE()) GROUP BY driver_name ORDER BY total_fare DESC LIMIT 1;",0 What is the average funding per climate mitigation project in Asia?,"CREATE TABLE climate_mitigation_projects (id INT, project_name VARCHAR(100), location VARCHAR(100), funding FLOAT, year INT); ",SELECT AVG(funding) FROM climate_mitigation_projects WHERE location = 'Asia';,SELECT AVG(funding) FROM climate_mitigation_projects WHERE location = 'Asia';,1 What are the total number of articles and videos from each source in the 'media_library'?,"CREATE TABLE media_library (id INT, type VARCHAR(10), title VARCHAR(50), length FLOAT, source VARCHAR(50)); ","SELECT source, COUNT(*) FROM media_library WHERE type IN ('article', 'video') GROUP BY source;","SELECT source, COUNT(*) FROM media_library GROUP BY source;",0 Delete all records from the programs table where the program name is 'Education Support'.,"CREATE TABLE programs (id INT, name VARCHAR(50)); ",DELETE FROM programs WHERE name = 'Education Support';,DELETE FROM programs WHERE name = 'Education Support';,1 How many biosensor technology patents have been filed in Mexico since 2016?,"USE biotech; CREATE TABLE if not exists patents (id INT, name VARCHAR(255), country VARCHAR(255), filed_date DATE); ",SELECT COUNT(*) FROM patents WHERE country = 'Mexico' AND filed_date >= '2016-01-01';,SELECT COUNT(*) FROM biotech.patents WHERE country = 'Mexico' AND filed_date >= '2016-01-01';,0 Find the name and price of the product that has been ordered the greatest number of times.,"CREATE TABLE products (product_name VARCHAR, product_price VARCHAR, product_id VARCHAR); CREATE TABLE regular_order_products (product_id VARCHAR);","SELECT t1.product_name, t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY COUNT(*) DESC LIMIT 1;","SELECT T1.product_name, T1.product_price FROM products AS T1 JOIN regular_order_products AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id ORDER BY COUNT(*) DESC LIMIT 1;",0 "Which Competition has a Year smaller than 2009, and Notes of 56.16 m?","CREATE TABLE table_name_13 (competition VARCHAR, year VARCHAR, notes VARCHAR);","SELECT competition FROM table_name_13 WHERE year < 2009 AND notes = ""56.16 m"";","SELECT competition FROM table_name_13 WHERE year 2009 AND notes = ""56.16 m"";",0 What is the average calorie intake per person for each continent in 2021?,"CREATE TABLE CountryFoodIntake (CountryName VARCHAR(50), Continent VARCHAR(50), Year INT, CaloriesPerPerson INT); ","SELECT Continent, AVG(CaloriesPerPerson) FROM CountryFoodIntake WHERE Year = 2021 GROUP BY Continent;","SELECT Continent, AVG(CaloriesPerPerson) FROM CountryFoodIntake WHERE Year = 2021 GROUP BY Continent;",1 "Calculate the percentage of the total cargo tonnage that each shipping line is responsible for, for all shipping lines operating in the North America region.","CREATE TABLE shipping_lines(line_id INT, line_name TEXT, region TEXT);CREATE TABLE cargo(cargo_id INT, line_id INT, port_id INT, tonnage INT);","SELECT s.line_name, (SUM(c.tonnage) * 100.0 / (SELECT SUM(tonnage) FROM cargo)) as percentage FROM shipping_lines s JOIN cargo c ON s.line_id = c.line_id WHERE s.region = 'North America' GROUP BY s.line_name;","SELECT sl.line_name, (COUNT(c.cargo_id) * 100.0 / (SELECT COUNT(*) FROM cargo c JOIN shipping_lines sl ON c.line_id = sl.line_id WHERE sl.region = 'North America')) as percentage FROM shipping_lines sl JOIN cargo c ON sl.line_id = c.line_id WHERE sl.region = 'North America' GROUP BY sl.line_name;",0 What was the operator of the ensemble from Yorkshire?,"CREATE TABLE table_name_89 (operator VARCHAR, region VARCHAR);","SELECT operator FROM table_name_89 WHERE region = ""yorkshire"";","SELECT operator FROM table_name_89 WHERE region = ""yorkshire"";",1 What are the different types of intelligence operations that intersect with military operations?,"CREATE TABLE IntelligenceOperations (Operation VARCHAR(50), Type VARCHAR(50)); ",SELECT Operation FROM IntelligenceOperations WHERE Type = 'Military' INTERSECT SELECT Operation FROM IntelligenceOperations WHERE Type = 'Cybersecurity';,SELECT DISTINCT Type FROM IntelligenceOperations;,0 What is was the Chassis in 1967?,"CREATE TABLE table_name_38 (chassis VARCHAR, year VARCHAR);",SELECT chassis FROM table_name_38 WHERE year = 1967;,SELECT chassis FROM table_name_38 WHERE year = 1967;,1 Driving Force EX of 25cm (10-inch) involves what feature?,"CREATE TABLE table_name_46 (feature VARCHAR, driving_force_ex VARCHAR);","SELECT feature FROM table_name_46 WHERE driving_force_ex = ""25cm (10-inch)"";","SELECT feature FROM table_name_46 WHERE driving_force_ex = ""25cm (10-inch)"";",1 what's the earliest year that there was a cosworth v8 engine and 12 points?,"CREATE TABLE table_name_39 (year INTEGER, engine VARCHAR, points VARCHAR);","SELECT MIN(year) FROM table_name_39 WHERE engine = ""cosworth v8"" AND points = 12;","SELECT MIN(year) FROM table_name_39 WHERE engine = ""cosworth v8"" AND points = 12;",1 What's the total number of league cup apps when the league goals were less than 0?,"CREATE TABLE table_name_15 (league_cup_apps VARCHAR, league_goals INTEGER);",SELECT COUNT(league_cup_apps) FROM table_name_15 WHERE league_goals < 0;,SELECT COUNT(league_cup_apps) FROM table_name_15 WHERE league_goals 0;,0 "What is the number of losses when there were less than 4 draws, and points were 9?","CREATE TABLE table_name_36 (losses VARCHAR, draws VARCHAR, points VARCHAR);",SELECT losses FROM table_name_36 WHERE draws < 4 AND points = 9;,SELECT COUNT(losses) FROM table_name_36 WHERE draws 4 AND points = 9;,0 Name the least episode number for anne brooksbank and vicki madden,"CREATE TABLE table_25764073_3 (episode__number INTEGER, writer_s_ VARCHAR);","SELECT MIN(episode__number) FROM table_25764073_3 WHERE writer_s_ = ""Anne Brooksbank and Vicki Madden"";","SELECT MIN(episode__number) FROM table_25764073_3 WHERE writer_s_ = ""Anne Brooksbank and Vicki Madden"";",1 Name the 3 where weightlifter is m. van der goten ( bel ),CREATE TABLE table_16779068_5 (weightlifter VARCHAR);,"SELECT 3 FROM table_16779068_5 WHERE weightlifter = ""M. Van der Goten ( BEL )"";","SELECT 3 AS _weightlifters FROM table_16779068_5 WHERE weightlifter = ""M. Van der Goten ( Bel )"";",0 Show names of climbers and the names of mountains they climb.,"CREATE TABLE mountain (Name VARCHAR, Mountain_ID VARCHAR); CREATE TABLE climber (Name VARCHAR, Mountain_ID VARCHAR);","SELECT T1.Name, T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID;","SELECT T1.Name, T1.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID;",0 How many cruelty-free makeup products were sold in Canada last year?,"CREATE TABLE sales (id INT, product_id INT, quantity INT, sale_date DATE); CREATE TABLE products (id INT, name TEXT, is_cruelty_free BOOLEAN, country TEXT);",SELECT COUNT(*) FROM sales JOIN products ON sales.product_id = products.id WHERE products.is_cruelty_free = true AND YEAR(sale_date) = YEAR(CURRENT_DATE) - 1 AND products.country = 'Canada';,"SELECT SUM(quantity) FROM sales JOIN products ON sales.product_id = products.id WHERE products.is_cruelty_free = true AND sales.sale_date >= DATEADD(year, -1, GETDATE()) AND products.country = 'Canada';",0 What is the Power when the acceleration 0–100km/h (0–62mph) is 9.1 s?,"CREATE TABLE table_name_49 (power VARCHAR, acceleration_0_100km_h__0_62mph_ VARCHAR);","SELECT power FROM table_name_49 WHERE acceleration_0_100km_h__0_62mph_ = ""9.1 s"";","SELECT power FROM table_name_49 WHERE acceleration_0_100km_h__0_62mph_ = ""9.1 s"";",1 What Date has a label of alfa records?,"CREATE TABLE table_name_35 (date VARCHAR, label VARCHAR);","SELECT date FROM table_name_35 WHERE label = ""alfa records"";","SELECT date FROM table_name_35 WHERE label = ""alfa records"";",1 When 90.7 fm is the frequency who is the licensee?,"CREATE TABLE table_1949746_1 (licensee VARCHAR, frequency VARCHAR);","SELECT licensee FROM table_1949746_1 WHERE frequency = ""90.7 FM"";","SELECT licensee FROM table_1949746_1 WHERE frequency = ""90.7 FM"";",1 When did the king who entered office in 1012 leave office?,"CREATE TABLE table_name_34 (left_office VARCHAR, entered_office VARCHAR);","SELECT left_office FROM table_name_34 WHERE entered_office = ""1012"";","SELECT left_office FROM table_name_34 WHERE entered_office = ""1012"";",1 Which Record has an Event of inoki bom-ba-ye 2002?,"CREATE TABLE table_name_1 (record VARCHAR, event VARCHAR);","SELECT record FROM table_name_1 WHERE event = ""inoki bom-ba-ye 2002"";","SELECT record FROM table_name_1 WHERE event = ""inoki bom-ba-ye 2002"";",1 "Update the 'Grape Ape' sales record from July 20, 2021 to 7 units.","CREATE TABLE Sales (id INT, product VARCHAR(255), sold_date DATE, quantity INT); ",UPDATE Sales SET quantity = 7 WHERE product = 'Grape Ape' AND sold_date = '2021-07-20';,UPDATE Sales SET quantity = 7 WHERE product = 'Grape Ape' AND sold_date BETWEEN '2021-07-20' AND '2021-07-20';,0 Which Record has a Date of may 31?,"CREATE TABLE table_name_55 (record VARCHAR, date VARCHAR);","SELECT record FROM table_name_55 WHERE date = ""may 31"";","SELECT record FROM table_name_55 WHERE date = ""may 31"";",1 Which steal/intercept ball has no for both the sliding tackle and dump tackle?,"CREATE TABLE table_name_37 (steal_intercept_ball VARCHAR, sliding_tackle VARCHAR, dump_tackle VARCHAR);","SELECT steal_intercept_ball FROM table_name_37 WHERE sliding_tackle = ""no"" AND dump_tackle = ""no"";","SELECT steal_intercept_ball FROM table_name_37 WHERE sliding_tackle = ""no"" AND dump_tackle = ""no"";",1 List all policies and their related support programs in disability services.,"CREATE TABLE Policies (id INT, name VARCHAR(50), description VARCHAR(255));","CREATE VIEW Support_Programs AS SELECT DISTINCT sp.program_id, sp.name, sp.description FROM Support_Program_Policies spp JOIN Support_Programs sp ON spp.program_id = sp.id;","SELECT name, description FROM Policies WHERE description LIKE '%disability%';",0 What is the most common type of crime in the city of Miami?,"CREATE TABLE crimes (id INT, city VARCHAR(255), type VARCHAR(255), number_of_crimes INT); ","SELECT type, COUNT(*) AS count FROM crimes WHERE city = 'Miami' GROUP BY type ORDER BY count DESC LIMIT 1;","SELECT type, COUNT(*) as count FROM crimes WHERE city = 'Miami' GROUP BY type ORDER BY count DESC LIMIT 1;",0 How many cyber threat intelligence reports were generated each quarter in 2021 and 2022?,"CREATE TABLE threat_intelligence (report_id INT, report_date DATE, report_type TEXT); ","SELECT YEAR(report_date) as Year, DATEPART(QUARTER, report_date) as Quarter, COUNT(*) as Number_of_Reports FROM threat_intelligence WHERE report_date BETWEEN '2021-01-01' AND '2022-12-31' AND report_type = 'Cyber' GROUP BY YEAR(report_date), DATEPART(QUARTER, report_date);","SELECT DATE_FORMAT(report_date, '%Y-%m') as quarter, COUNT(*) as num_reports FROM threat_intelligence WHERE report_date BETWEEN '2021-01-01' AND '2022-12-31' GROUP BY quarter;",0 What did the team score at home in north melbourne?,"CREATE TABLE table_name_10 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team AS score FROM table_name_10 WHERE away_team = ""north melbourne"";","SELECT home_team AS score FROM table_name_10 WHERE away_team = ""north melbourne"";",1 "What was the pick number for the compensation-a round, for player Frank Catalanotto?","CREATE TABLE table_name_93 (pick VARCHAR, round VARCHAR, player VARCHAR);","SELECT pick FROM table_name_93 WHERE round = ""compensation-a"" AND player = ""frank catalanotto"";","SELECT COUNT(pick) FROM table_name_93 WHERE round = ""compensation-a"" AND player = ""frank catalanotto"";",0 Find the 2nd least visited sustainable destination for each year in the 'sustainable_visits' table.,"CREATE TABLE sustainable_visits (visit_id INT, destination TEXT, visit_date DATE); CREATE TABLE sustainable_destinations (destination TEXT, sustainability_rank INT); ","SELECT destination, EXTRACT(YEAR FROM visit_date) AS visit_year, RANK() OVER (PARTITION BY EXTRACT(YEAR FROM visit_date) ORDER BY COUNT(*) ASC) AS visit_rank FROM sustainable_visits GROUP BY destination, EXTRACT(YEAR FROM visit_date) HAVING visit_rank = 2;","SELECT sv.destination, sv.visit_date, sv.visit_rank FROM sustainable_visits sv JOIN sustainable_destinations sd ON sv.destination = sd.destination GROUP BY sv.destination, sv.visit_date ORDER BY sv.visit_rank DESC;",0 How many startups have exited via acquisition or IPO in the E-commerce sector?,"CREATE TABLE startups(id INT, name TEXT, sector TEXT, exit_strategy TEXT); ","SELECT COUNT(*) FROM startups WHERE sector = 'E-commerce' AND exit_strategy IN ('Acquisition', 'IPO');",SELECT COUNT(*) FROM startups WHERE sector = 'E-commerce' AND exit_strategy = 'acquisition' OR exit_strategy = 'IPO';,0 What is the total number of births in the state of Texas in the year 2020?,"CREATE TABLE births (id INT, state TEXT, year INT, num_births INT); ",SELECT SUM(num_births) FROM births WHERE state = 'Texas' AND year = 2020;,SELECT SUM(num_births) FROM births WHERE state = 'Texas' AND year = 2020;,1 "What is the total quantity of garments with 'wool' material sold online, per payment method, in the 'London' region?","CREATE TABLE sales (id INT PRIMARY KEY, transaction_date DATE, quantity_sold INT, payment_method VARCHAR(255), region VARCHAR(255), garment_material VARCHAR(255));","SELECT payment_method, SUM(quantity_sold) as total_quantity_sold_online FROM sales WHERE region = 'London' AND garment_material = 'wool' AND transaction_date >= '2022-01-01' AND transaction_date <= '2022-12-31' AND payment_method IS NOT NULL GROUP BY payment_method;","SELECT payment_method, SUM(quantity_sold) FROM sales WHERE garment_material = 'wool' AND region = 'London' GROUP BY payment_method;",0 "What is the year total for teams with under 37 games tied, over 33 games, and 15 losses?","CREATE TABLE table_name_7 (years INTEGER, lost VARCHAR, tied VARCHAR, total_games VARCHAR);",SELECT SUM(years) FROM table_name_7 WHERE tied < 37 AND total_games > 33 AND lost = 15;,SELECT SUM(years) FROM table_name_7 WHERE tied 37 AND total_games > 33 AND lost = 15;,0 How many security incidents were there in the healthcare sector in the first half of this year?,"CREATE TABLE security_incidents (id INT, sector VARCHAR(255), incident_date DATE); ",SELECT COUNT(*) FROM security_incidents WHERE sector = 'healthcare' AND incident_date >= '2021-01-01' AND incident_date < '2021-07-01';,"SELECT COUNT(*) FROM security_incidents WHERE sector = 'Healthcare' AND incident_date >= DATEADD(year, -1, GETDATE());",0 What is the total amount of climate finance invested in renewable energy projects in Africa in the year 2020?,"CREATE TABLE renewable_energy_projects (project_id INT, location VARCHAR(50), investment_amount FLOAT, investment_year INT); ",SELECT SUM(investment_amount) FROM renewable_energy_projects WHERE location LIKE 'Africa' AND investment_year = 2020;,SELECT SUM(investment_amount) FROM renewable_energy_projects WHERE location = 'Africa' AND investment_year = 2020;,0 Which indigenous community has the highest population in Greenland?,"CREATE TABLE IndigenousCommunities (community VARCHAR(50), country VARCHAR(50), population INT); ","SELECT community, population FROM IndigenousCommunities WHERE country = 'Greenland' ORDER BY population DESC LIMIT 1;","SELECT community, population FROM IndigenousCommunities WHERE country = 'Greenland' ORDER BY population DESC LIMIT 1;",1 What is the average billing amount for cases in California?,"CREATE TABLE cases (id INT, state VARCHAR(2), billing_amount DECIMAL(10,2));",SELECT AVG(billing_amount) FROM cases WHERE state = 'CA';,SELECT AVG(billing_amount) FROM cases WHERE state = 'California';,0 Which team was the home team when playing South Melbourne?,"CREATE TABLE table_name_43 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team AS score FROM table_name_43 WHERE away_team = ""south melbourne"";","SELECT home_team FROM table_name_43 WHERE away_team = ""south melbourne"";",0 What is the ISBN of the Conan the Barbarian series that has the title of Queen of the Black Coast?,"CREATE TABLE table_name_75 (isbn VARCHAR, series VARCHAR, title VARCHAR);","SELECT isbn FROM table_name_75 WHERE series = ""conan the barbarian"" AND title = ""queen of the black coast"";","SELECT isbn FROM table_name_75 WHERE series = ""conan the barbarian"" AND title = ""queen of the black coast"";",1 "Find the intersection of open data sets related to immigration in 'nation', 'province', and 'territory' schemas.","CREATE SCHEMA nation; CREATE SCHEMA province; CREATE SCHEMA territory; CREATE TABLE nation.immigration_data (id INT, name VARCHAR(255), is_open BOOLEAN); CREATE TABLE province.immigration_data (id INT, name VARCHAR(255), is_open BOOLEAN); CREATE TABLE territory.immigration_data (id INT, name VARCHAR(255), is_open BOOLEAN); ",SELECT * FROM ( (SELECT * FROM nation.immigration_data WHERE is_open = true) INTERSECT (SELECT * FROM province.immigration_data WHERE is_open = true) INTERSECT (SELECT * FROM territory.immigration_data WHERE is_open = true) ) AS intersected_data;,"SELECT n.name, t.name FROM nation.immigration_data n JOIN province.immigration_data t ON n.id = t.id JOIN territory.immigration_data t ON t.name = t.name WHERE t.is_open = true;",0 What was the total donation amount by gender in Q2 2020?,"CREATE TABLE Donors (DonorID INT, DonorName TEXT, Gender TEXT); CREATE TABLE Donations (DonationID INT, DonationAmount NUMERIC, DonorID INT);","SELECT Gender, SUM(DonationAmount) FROM Donations JOIN Donors ON Donations.DonorID = Donors.DonorID WHERE Donors.Gender IS NOT NULL AND QUARTER(DonationDate) = 2 AND YEAR(DonationDate) = 2020 GROUP BY Gender;","SELECT Gender, SUM(DonationAmount) FROM Donations JOIN Donors ON Donations.DonorID = Donors.DonorID WHERE QUARTER(DonationDate) = 2 AND YEAR(DonationDate) = 2020 GROUP BY Gender;",0 how many city with name being providence tower,"CREATE TABLE table_13463790_2 (city VARCHAR, name VARCHAR);","SELECT COUNT(city) FROM table_13463790_2 WHERE name = ""Providence Tower"";","SELECT COUNT(city) FROM table_13463790_2 WHERE name = ""Provision Tower"";",0 Who is the visiting team when Dipietro received a decision on October 27?,"CREATE TABLE table_name_50 (visitor VARCHAR, decision VARCHAR, date VARCHAR);","SELECT visitor FROM table_name_50 WHERE decision = ""dipietro"" AND date = ""october 27"";","SELECT visitor FROM table_name_50 WHERE decision = ""dipietro"" AND date = ""october 27"";",1 Calculate the total revenue generated from the sales of sustainable denim jeans in France.,"CREATE TABLE garment_sales (id INT, garment_type VARCHAR(50), sustainability_rating INT, country VARCHAR(50), price DECIMAL(5,2), quantity INT); ",SELECT SUM(price * quantity) FROM garment_sales WHERE garment_type = 'jeans' AND country = 'France' AND sustainability_rating >= 4;,SELECT SUM(price * quantity) FROM garment_sales WHERE garment_type = 'Denim Jeans' AND country = 'France';,0 "Which country is ranked higher than 68, with a city named Santa Fe and a stadium that has a capacity of 32,000?","CREATE TABLE table_name_10 (country VARCHAR, city VARCHAR, rank VARCHAR, capacity VARCHAR);","SELECT country FROM table_name_10 WHERE rank > 68 AND capacity = ""32,000"" AND city = ""santa fe"";","SELECT country FROM table_name_10 WHERE rank > 68 AND capacity = ""32 000"" AND city = ""santa fe"";",0 Show the top 5 players with the highest scores in game 'Fortnite',"CREATE TABLE players (id INT, name VARCHAR(100), game_id INT, high_score INT); CREATE TABLE games (id INT, name VARCHAR(100)); ","SELECT players.name, players.high_score FROM players JOIN games ON players.game_id = games.id WHERE games.name = 'Fortnite' ORDER BY players.high_score DESC LIMIT 5;","SELECT players.name, players.high_score FROM players INNER JOIN games ON players.game_id = games.id WHERE games.name = 'Fortnite' GROUP BY players.name ORDER BY high_score DESC LIMIT 5;",0 Who was the constitutional ticket when william karlin was the socialist ticket?,"CREATE TABLE table_name_95 (constitutional_ticket VARCHAR, socialist_ticket VARCHAR);","SELECT constitutional_ticket FROM table_name_95 WHERE socialist_ticket = ""william karlin"";","SELECT constitutional_ticket FROM table_name_95 WHERE socialist_ticket = ""william karlin"";",1 What was the score for the episode with Matt Smith as Andrew and Jack's guest?,"CREATE TABLE table_29141354_7 (scores VARCHAR, andrew_and_jacks_guest VARCHAR);","SELECT scores FROM table_29141354_7 WHERE andrew_and_jacks_guest = ""Matt Smith"";","SELECT scores FROM table_29141354_7 WHERE andrew_and_jacks_guest = ""Matt Smith"";",1 What is the prevalence of diabetes in rural Alabama?,"CREATE TABLE diabetes (id INT, state VARCHAR(20), rural BOOLEAN, prevalence FLOAT); ",SELECT prevalence FROM diabetes WHERE state = 'Alabama' AND rural = true;,SELECT prevalence FROM diabetes WHERE state = 'Alabama' AND rural = true;,1 Update mobile subscribers to the latest technology '5G'.,"CREATE TABLE subscribers(id INT, technology VARCHAR(20), type VARCHAR(10)); ",UPDATE subscribers SET technology = '5G' WHERE type = 'mobile';,UPDATE subscribers SET technology = '5G' WHERE type ='mobile';,0 "Where did Rick Mears win, after starting in Pole Position?","CREATE TABLE table_name_70 (city_location VARCHAR, pole_position VARCHAR, winning_driver VARCHAR);","SELECT city_location FROM table_name_70 WHERE pole_position = ""rick mears"" AND winning_driver = ""rick mears"";","SELECT city_location FROM table_name_70 WHERE pole_position = ""starting"" AND winning_driver = ""rick mears"";",0 What is the average claim amount for policyholders residing in New York?,"CREATE TABLE policyholders (id INT, age INT, gender VARCHAR(10), policy_type VARCHAR(20), premium FLOAT, state VARCHAR(20)); CREATE TABLE claims (id INT, policyholder_id INT, claim_amount FLOAT, claim_date DATE); ",SELECT AVG(claim_amount) FROM claims JOIN policyholders ON claims.policyholder_id = policyholders.id WHERE policyholders.state = 'New York';,SELECT AVG(claim_amount) FROM claims JOIN policyholders ON claims.policyholder_id = policyholders.id WHERE policyholders.state = 'New York';,1 Name the away team score for geelong away team,CREATE TABLE table_name_25 (away_team VARCHAR);,"SELECT away_team AS score FROM table_name_25 WHERE away_team = ""geelong"";","SELECT away_team AS score FROM table_name_25 WHERE away_team = ""geelong"";",1 "What is the number of 'completed_orders' and total orders for each salesperson per day, for the 'e-commerce' database, ordered by salesperson and day?","CREATE TABLE e_commerce (id INT, salesperson VARCHAR(50), completed_orders INT, total_orders INT, order_date DATE); ","SELECT salesperson, order_date, SUM(completed_orders) OVER (PARTITION BY salesperson ORDER BY order_date) as completed_orders, SUM(total_orders) OVER (PARTITION BY salesperson ORDER BY order_date) as total_orders FROM e_commerce;","SELECT salesperson, DATE_FORMAT(order_date, '%Y-%m') as day, SUM(completed_orders) as total_orders, SUM(total_orders) as total_orders FROM e_commerce GROUP BY salesperson, day;",0 Find the top 5 players with the highest number of kills in the 'battle_royale_games' table.,"CREATE TABLE battle_royale_games (player_id INT, player_name TEXT, kills INT);","SELECT player_name, SUM(kills) as total_kills FROM battle_royale_games GROUP BY player_id ORDER BY total_kills DESC LIMIT 5;","SELECT player_name, SUM(kills) as total_kills FROM battle_royale_games GROUP BY player_name ORDER BY total_kills DESC LIMIT 5;",0 Update the vegan status for a specific certification,"CREATE TABLE certifications (certification_id INT, certification_name TEXT, cruelty_free BOOLEAN, vegan BOOLEAN); ",UPDATE certifications SET vegan = TRUE WHERE certification_name = 'Choose Cruelty Free';,UPDATE certifications SET vegan = TRUE WHERE certification_id = 1;,0 "Which Novick has a Source of surveyusa, and a Neville of 8%?","CREATE TABLE table_name_59 (novick VARCHAR, source VARCHAR, neville VARCHAR);","SELECT novick FROM table_name_59 WHERE source = ""surveyusa"" AND neville = ""8%"";","SELECT novick FROM table_name_59 WHERE source = ""surveyusa"" AND neville = ""8%"";",1 Who won the most recent favorite rap/hip-hop new artist at the American music awards?,"CREATE TABLE table_name_55 (year INTEGER, association VARCHAR, category VARCHAR);","SELECT MAX(year) FROM table_name_55 WHERE association = ""american music awards"" AND category = ""favorite rap/hip-hop new artist"";","SELECT MAX(year) FROM table_name_55 WHERE association = ""american music awards"" AND category = ""rap/hip-hop new artist"";",0 What is the total number of news articles published in Spanish in the last week?,"CREATE TABLE news_articles (id INT, title VARCHAR(255), language VARCHAR(255), publication_date DATE); ","SELECT COUNT(*) FROM news_articles WHERE language = 'Spanish' AND publication_date >= DATEADD(day, -7, GETDATE());","SELECT COUNT(*) FROM news_articles WHERE language = 'Spanish' AND publication_date >= DATEADD(week, -1, GETDATE());",0 "What is the average Bronze when silver is more than 2, and rank is 2, and gold more than 2","CREATE TABLE table_name_62 (bronze INTEGER, gold VARCHAR, silver VARCHAR, rank VARCHAR);","SELECT AVG(bronze) FROM table_name_62 WHERE silver > ""2"" AND rank = ""2"" AND gold > 2;",SELECT AVG(bronze) FROM table_name_62 WHERE silver > 2 AND rank = 2 AND gold > 2;,0 What is the highest number played with a goal difference less than -27?,"CREATE TABLE table_name_57 (played INTEGER, goal_difference INTEGER);",SELECT MAX(played) FROM table_name_57 WHERE goal_difference < -27;,SELECT MAX(played) FROM table_name_57 WHERE goal_difference -27;,0 "What is the maximum ticket price for home games of each team, excluding games with attendance less than 10000?","CREATE TABLE teams (team_id INT, team_name VARCHAR(50));CREATE TABLE games (game_id INT, team_id INT, home_team BOOLEAN, price DECIMAL(5,2), attendance INT);","SELECT t.team_name, MAX(g.price) AS max_price FROM teams t INNER JOIN games g ON t.team_id = g.team_id AND g.home_team = t.team_id WHERE g.attendance >= 10000 GROUP BY t.team_name;","SELECT t.team_name, MAX(g.price) as max_price FROM teams t JOIN games g ON t.team_id = g.team_id WHERE g.home_team = true AND g.attendance 10000 GROUP BY t.team_name;",0 What is the total data usage for customers with a subscription older than 6 months?,"CREATE TABLE subscriptions (id INT, customer_id INT, start_date DATE); CREATE TABLE subscribers (id INT, name VARCHAR(50), data_usage FLOAT, subscription_id INT); ","SELECT SUM(data_usage) FROM subscribers s JOIN subscriptions subs ON s.subscription_id = subs.id WHERE subs.start_date <= DATE_SUB(CURDATE(), INTERVAL 6 MONTH);","SELECT SUM(data_usage) FROM subscribers JOIN subscriptions ON subscribers.subscription_id = subscriptions.id WHERE subscriptions.start_date DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",0 Identify forests with the largest wildlife habitat in India and China?,"CREATE TABLE forests (id INT, name VARCHAR(255), hectares FLOAT, country VARCHAR(255)); ","SELECT forests.name FROM forests WHERE forests.country IN ('India', 'China') AND forests.hectares = (SELECT MAX(hectares) FROM forests WHERE forests.country IN ('India', 'China'));","SELECT name, hectares FROM forests WHERE country IN ('India', 'China') GROUP BY name ORDER BY hectares DESC LIMIT 1;",0 How many production codes had a US viewership of 4.43 million?,"CREATE TABLE table_26429658_1 (production_code VARCHAR, us_viewers__millions_ VARCHAR);","SELECT COUNT(production_code) FROM table_26429658_1 WHERE us_viewers__millions_ = ""4.43"";","SELECT COUNT(production_code) FROM table_26429658_1 WHERE us_viewers__millions_ = ""4.43"";",1 "What is the average Spike, when Name is Gustavo Porporatto, and when Block is greater than 323?","CREATE TABLE table_name_67 (spike INTEGER, name VARCHAR, block VARCHAR);","SELECT AVG(spike) FROM table_name_67 WHERE name = ""gustavo porporatto"" AND block > 323;","SELECT AVG(spike) FROM table_name_67 WHERE name = ""gustavuto porporatto"" AND block > 323;",0 What is the Score of 2007 afc asian cup qualification with a Result of 8–0?,"CREATE TABLE table_name_81 (score VARCHAR, competition VARCHAR, result VARCHAR);","SELECT score FROM table_name_81 WHERE competition = ""2007 afc asian cup qualification"" AND result = ""8–0"";","SELECT score FROM table_name_81 WHERE competition = ""2007 afc asian cup qualification"" AND result = ""8–0"";",1 Insert a new policy record into the policy table for policy number 5 with a policy type of 'Home' and effective date of '2021-01-01',"CREATE TABLE policy (policy_number INT, policy_type VARCHAR(255), effective_date DATE);","INSERT INTO policy (policy_number, policy_type, effective_date) VALUES (5, 'Home', '2021-01-01');","INSERT INTO policy (policy_number, policy_type, effective_date) VALUES (5, 'Home', '2021-01-01');",1 "Insert new records of 2 workout sessions into the ""WorkoutSessions"" table","CREATE TABLE WorkoutSessions (Id INT PRIMARY KEY, MemberId INT, WorkoutTypeId INT, Duration INT, SessionDate DATETIME);","INSERT INTO WorkoutSessions (Id, MemberId, WorkoutTypeId, Duration, SessionDate) VALUES (101, 10, 5, 60, '2022-01-10'), (102, 12, 7, 45, '2022-01-12');","INSERT INTO WorkoutSessions (Id, MemberId, WorkoutTypeId, Duration, SessionDate) VALUES (1, 'Women', 'Women', '2022-01-01'), (2, 'Women', '2022-12-31'), (3, 'Women', '2022-12-31'), (4, 'Women', '2022-12-31');",0 Which song has a Picturization of Vijay?,"CREATE TABLE table_name_86 (song VARCHAR, picturization VARCHAR);","SELECT song FROM table_name_86 WHERE picturization = ""vijay"";","SELECT song FROM table_name_86 WHERE picturization = ""vijay"";",1 What was the venue when the score was 24–28?,"CREATE TABLE table_name_43 (venue VARCHAR, score VARCHAR);","SELECT venue FROM table_name_43 WHERE score = ""24–28"";","SELECT venue FROM table_name_43 WHERE score = ""24–28"";",1 what is the name of the townships with 32.222 land,"CREATE TABLE table_18600760_19 (township VARCHAR, land___sqmi__ VARCHAR);","SELECT township FROM table_18600760_19 WHERE land___sqmi__ = ""32.222"";","SELECT township FROM table_18600760_19 WHERE land___sqmi__ = ""32.222"";",1 What is the total number of McCain vote totals where Obama percentages was 17.34%?,"CREATE TABLE table_20684390_1 (mccain_number VARCHAR, obama_percentage VARCHAR);","SELECT COUNT(mccain_number) FROM table_20684390_1 WHERE obama_percentage = ""17.34%"";","SELECT COUNT(mccain_number) FROM table_20684390_1 WHERE obama_percentage = ""17.34%"";",1 "What average total has cuba as the nation, and a bronze greater than 1?","CREATE TABLE table_name_8 (total INTEGER, nation VARCHAR, bronze VARCHAR);","SELECT AVG(total) FROM table_name_8 WHERE nation = ""cuba"" AND bronze > 1;","SELECT AVG(total) FROM table_name_8 WHERE nation = ""cuba"" AND bronze > 1;",1 what is the year when the date is not played?,"CREATE TABLE table_name_84 (year VARCHAR, date VARCHAR);","SELECT year FROM table_name_84 WHERE date = ""not played"";","SELECT year FROM table_name_84 WHERE date = ""not played"";",1 What is the frequency for katherine?,"CREATE TABLE table_name_99 (frequency VARCHAR, area_served VARCHAR);","SELECT frequency FROM table_name_99 WHERE area_served = ""katherine"";","SELECT frequency FROM table_name_99 WHERE area_served = ""katherine"";",1 "Score of 6–4, and a Opponent of @ marlins had what record?","CREATE TABLE table_name_96 (record VARCHAR, score VARCHAR, opponent VARCHAR);","SELECT record FROM table_name_96 WHERE score = ""6–4"" AND opponent = ""@ marlins"";","SELECT record FROM table_name_96 WHERE score = ""6–4"" AND opponent = ""@ marlins"";",1 "For player Les Ames, what was the venue?","CREATE TABLE table_name_29 (venue VARCHAR, player VARCHAR);","SELECT venue FROM table_name_29 WHERE player = ""les ames"";","SELECT venue FROM table_name_29 WHERE player = ""les ames"";",1 Update the threat level for all cybersecurity incidents related to a specific IP address.," CREATE TABLE IPIncidentThreatLevel (IncidentID INT, IncidentIP VARCHAR(50), ThreatLevel INT); ", UPDATE IPIncidentThreatLevel SET ThreatLevel = 6 WHERE IncidentIP = '10.0.0.1';,UPDATE IPIncidentThreatLevel SET ThreatLevel = ThreatLevel WHERE IncidentIP = 'IP';,0 What is the rank of the player with the 39.69 average?,"CREATE TABLE table_26041144_11 (rank VARCHAR, average VARCHAR);","SELECT rank FROM table_26041144_11 WHERE average = ""39.69"";","SELECT rank FROM table_26041144_11 WHERE average = ""39.69"";",1 On what date did the Pistons play @ toronto?,"CREATE TABLE table_22822559_4 (date VARCHAR, team VARCHAR);","SELECT date FROM table_22822559_4 WHERE team = ""@ Toronto"";","SELECT date FROM table_22822559_4 WHERE team = ""@ Toronto"";",1 What is the average size of co-owned properties in Oakland?,"CREATE TABLE co_ownership (property_id INT, size FLOAT, city VARCHAR(20)); ",SELECT AVG(size) FROM co_ownership WHERE city = 'Oakland';,SELECT AVG(size) FROM co_ownership WHERE city = 'Oakland';,1 How many properties in the Bronx have a SustainabilityRating of at least 2?,"CREATE TABLE Properties (PropertyID int, Price int, SustainabilityRating int, Borough varchar(255)); ",SELECT COUNT(*) as PropertyCount FROM Properties WHERE Borough = 'Bronx' AND SustainabilityRating >= 2;,SELECT COUNT(*) FROM Properties WHERE Borough = 'Bronx' AND SustainabilityRating >= 2;,0 List all who wrote for production code 1ark07.,"CREATE TABLE table_22835602_1 (written_by VARCHAR, production_code VARCHAR);","SELECT written_by FROM table_22835602_1 WHERE production_code = ""1ARK07"";","SELECT written_by FROM table_22835602_1 WHERE production_code = ""1ark07"";",0 Who is the winner of event # 1h and dateca is Apr 2?,"CREATE TABLE table_22050544_1 (winner VARCHAR, dateca VARCHAR, event__number VARCHAR);","SELECT winner FROM table_22050544_1 WHERE dateca = ""Apr 2"" AND event__number = ""1H"";","SELECT winner FROM table_22050544_1 WHERE dateca = ""Apr 2"" AND event__number = ""1h"";",0 What is the 2004 Lukoil oil prodroduction when in 2011 oil production 90.917 million tonnes?,CREATE TABLE table_name_40 (Id VARCHAR);,"SELECT 2004 FROM table_name_40 WHERE 2011 = ""90.917"";","SELECT 2004 FROM table_name_40 WHERE 2011 = ""90.917 million tonnes"";",0 What is the highest round number with a time of 4:39?,"CREATE TABLE table_name_28 (round INTEGER, time VARCHAR);","SELECT MAX(round) FROM table_name_28 WHERE time = ""4:39"";","SELECT MAX(round) FROM table_name_28 WHERE time = ""4:39"";",1 "How many non-profit organizations are there in the 'environment' sector with an annual revenue less than $250,000?","CREATE TABLE organizations (org_id INT, org_name TEXT, sector TEXT, annual_revenue FLOAT); ",SELECT COUNT(*) FROM organizations WHERE sector = 'environment' AND annual_revenue < 250000.00;,SELECT COUNT(*) FROM organizations WHERE sector = 'environment' AND annual_revenue 250000;,0 What is the total number of building permits issued in Q2 2021 for New York?,"CREATE TABLE BuildingPermits (id INT, permit_date DATE, state VARCHAR(20)); ",SELECT COUNT(*) FROM BuildingPermits WHERE state = 'New York' AND MONTH(permit_date) BETWEEN 4 AND 6;,SELECT COUNT(*) FROM BuildingPermits WHERE permit_date BETWEEN '2021-04-01' AND '2021-06-30' AND state = 'New York';,0 What are the recycling initiatives and their respective budgets for the top 2 clothing brands committed to sustainability?,"CREATE TABLE recycling_initiatives (brand VARCHAR(50), initiative VARCHAR(50), budget FLOAT); ","SELECT initiative, budget FROM recycling_initiatives WHERE brand IN ('Brand N', 'Brand O') ORDER BY budget DESC LIMIT 2;","SELECT initiative, budget FROM recycling_initiatives ORDER BY budget DESC LIMIT 2;",0 Find the top 2 countries with the most program impact in 2022?,"CREATE TABLE program_impact (program_id INT, country VARCHAR(50), impact INT); ","SELECT country, SUM(impact) as total_impact FROM program_impact WHERE program_id IN (SELECT program_id FROM program_impact WHERE program_id IN (SELECT program_id FROM program_impact WHERE year = 2022 GROUP BY country HAVING COUNT(*) > 1) GROUP BY country HAVING COUNT(*) > 1) GROUP BY country ORDER BY total_impact DESC LIMIT 2;","SELECT country, SUM(impact) as total_impact FROM program_impact WHERE YEAR(program_id) = 2022 GROUP BY country ORDER BY total_impact DESC LIMIT 2;",0 What was the home for season 1949-50?,"CREATE TABLE table_name_79 (home VARCHAR, season VARCHAR);","SELECT home FROM table_name_79 WHERE season = ""1949-50"";","SELECT home FROM table_name_79 WHERE season = ""1949-50"";",1 Which cell type has a conduction speed of 35?,"CREATE TABLE table_name_15 (cell_type VARCHAR, conduction_speed__m_s_ VARCHAR);","SELECT cell_type FROM table_name_15 WHERE conduction_speed__m_s_ = ""35"";","SELECT cell_type FROM table_name_15 WHERE conduction_speed__m_s_ = ""35"";",1 What is Andrea Suarez Lazaro's height?,"CREATE TABLE table_name_25 (height VARCHAR, contestant VARCHAR);","SELECT height FROM table_name_25 WHERE contestant = ""andrea suarez lazaro"";","SELECT height FROM table_name_25 WHERE contestant = ""andrea suarez lazaro"";",1 "If the language is Native and Spanish, what is the Vinto Municipality minimum?","CREATE TABLE table_2509113_2 (vinto_municipality INTEGER, language VARCHAR);","SELECT MIN(vinto_municipality) FROM table_2509113_2 WHERE language = ""Native and Spanish"";","SELECT MIN(vinto_municipality) FROM table_2509113_2 WHERE language = ""Native"" AND language = ""Spanish"";",0 How many transactions were processed by each node in the Stellar network in the last week?,"CREATE TABLE stellar_transactions (transaction_id INT, node_id VARCHAR(50), timestamp BIGINT);","SELECT node_id, COUNT(*) FROM stellar_transactions WHERE timestamp BETWEEN UNIX_TIMESTAMP() - 604800 AND UNIX_TIMESTAMP() GROUP BY node_id;","SELECT node_id, COUNT(*) FROM stellar_transactions WHERE timestamp >= DATEADD(week, -1, GETDATE()) GROUP BY node_id;",0 "What is the average altitude of all space missions launched by a specific country, according to the Space_Missions table?","CREATE TABLE Space_Missions (ID INT, Mission_Name VARCHAR(255), Country VARCHAR(255), Avg_Altitude FLOAT); ","SELECT Country, AVG(Avg_Altitude) FROM Space_Missions GROUP BY Country;","SELECT Country, AVG(Avg_Altitude) FROM Space_Missions GROUP BY Country;",1 What is the sambalpuri saree with a samaleswari temple as sambalpuri language?,"CREATE TABLE table_name_22 (sambalpuri_saree VARCHAR, sambalpuri_language VARCHAR);","SELECT sambalpuri_saree FROM table_name_22 WHERE sambalpuri_language = ""samaleswari temple"";","SELECT sambalpuri_saree FROM table_name_22 WHERE sambalpuri_language = ""samaleswari temple"";",1 what's the loss with try bonus being 5 and points for being 390,"CREATE TABLE table_12828723_3 (lost VARCHAR, try_bonus VARCHAR, points_for VARCHAR);","SELECT lost FROM table_12828723_3 WHERE try_bonus = ""5"" AND points_for = ""390"";","SELECT lost FROM table_12828723_3 WHERE try_bonus = ""5"" AND points_for = ""390"";",1 On what day was Utah Blaze the opponent?,"CREATE TABLE table_name_6 (date VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_6 WHERE opponent = ""utah blaze"";","SELECT date FROM table_name_6 WHERE opponent = ""utah blaze"";",1 What is the maximum number of incidents per product in a single day?,"CREATE TABLE product_daily_incidents (product_id INT, incident_date DATE, num_incidents INT); ","SELECT product_id, MAX(num_incidents) as max_incidents_per_day FROM product_daily_incidents GROUP BY product_id;","SELECT product_id, MAX(num_incidents) FROM product_daily_incidents GROUP BY product_id;",0 "What is the number of bronze that Scotland, which has less than 7 total medals, has?","CREATE TABLE table_name_55 (bronze INTEGER, nation VARCHAR, total VARCHAR);","SELECT SUM(bronze) FROM table_name_55 WHERE nation = ""scotland"" AND total < 7;","SELECT SUM(bronze) FROM table_name_55 WHERE nation = ""scotland"" AND total 7;",0 How many seats were forfeited in the revolutionary socialist party?,"CREATE TABLE table_20728138_1 (seats_forfeited VARCHAR, party VARCHAR);","SELECT COUNT(seats_forfeited) FROM table_20728138_1 WHERE party = ""Revolutionary Socialist party"";","SELECT seats_forfeited FROM table_20728138_1 WHERE party = ""Revolutionary Socialist"";",0 What is the highest rank of an athlete from Switzerland in a heat larger than 3?,"CREATE TABLE table_name_54 (rank INTEGER, heat VARCHAR, nationality VARCHAR);","SELECT MAX(rank) FROM table_name_54 WHERE heat > 3 AND nationality = ""switzerland"";","SELECT MAX(rank) FROM table_name_54 WHERE heat > 3 AND nationality = ""switzerland"";",1 What record has a Score of 9–6?,"CREATE TABLE table_name_15 (record VARCHAR, score VARCHAR);","SELECT record FROM table_name_15 WHERE score = ""9–6"";","SELECT record FROM table_name_15 WHERE score = ""9–6"";",1 What was the score in the tournament in which Michael Stich took third place?,"CREATE TABLE table_name_32 (score VARCHAR, third_place VARCHAR);","SELECT score FROM table_name_32 WHERE third_place = ""michael stich"";","SELECT score FROM table_name_32 WHERE third_place = ""michael stich"";",1 Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies.,CREATE TABLE Circulation_History (Id VARCHAR); CREATE TABLE Employees (Id VARCHAR);,"SELECT Employees.employee_name, COUNT(*) FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id GROUP BY Circulation_History.document_id, Circulation_History.draft_number, Circulation_History.copy_number ORDER BY COUNT(*) DESC LIMIT 1;","SELECT T1.Name, COUNT(*) FROM Circulation_History AS T1 JOIN Employees AS T2 ON T1.Id = T2.Id GROUP BY T1.Id ORDER BY COUNT(*) DESC LIMIT 1;",0 Which organizations have volunteers from both the US and Canada?,"CREATE TABLE organization (org_id INT, org_name TEXT); CREATE TABLE volunteer (vol_id INT, org_id INT, vol_country TEXT); ","SELECT org_name FROM organization WHERE org_id IN (SELECT org_id FROM volunteer WHERE vol_country IN ('USA', 'Canada') GROUP BY org_id HAVING COUNT(DISTINCT vol_country) = 2);","SELECT o.org_name FROM organization o INNER JOIN volunteer v ON o.org_id = v.org_id WHERE v.vol_country IN ('USA', 'Canada');",0 What is the record when the time is 1:11?,"CREATE TABLE table_name_91 (record VARCHAR, time VARCHAR);","SELECT record FROM table_name_91 WHERE time = ""1:11"";","SELECT record FROM table_name_91 WHERE time = ""1:11"";",1 When was the coin with the mass of 3.7 g first minted?,"CREATE TABLE table_1307572_1 (first_minting VARCHAR, mass VARCHAR);","SELECT first_minting FROM table_1307572_1 WHERE mass = ""3.7 g"";","SELECT first_minting FROM table_1307572_1 WHERE mass = ""3.7 g"";",1 What is the average mental health parity score for providers in urban areas?,"CREATE TABLE Areas (area_id INT, area_type TEXT); CREATE TABLE Providers (provider_id INT, provider_parity_score INT, area_id INT);",SELECT AVG(provider_parity_score) as avg_parity_score FROM Providers p JOIN Areas a ON p.area_id = a.area_id WHERE a.area_type = 'urban';,SELECT AVG(provider_parity_score) FROM Providers JOIN Areas ON Providers.area_id = Areas.area_id WHERE Areas.area_type = 'Urban';,0 Which of the lowest years had a Wheel arrangement that was 0-4-2t?,"CREATE TABLE table_name_86 (year_made INTEGER, wheel_arrangement VARCHAR);","SELECT MIN(year_made) FROM table_name_86 WHERE wheel_arrangement = ""0-4-2t"";","SELECT MIN(year_made) FROM table_name_86 WHERE wheel_arrangement = ""0-4-2t"";",1 Which autonomous driving research studies received funding in 2021?,"CREATE TABLE ResearchStudies (Study VARCHAR(50), Year INT, Funding VARCHAR(50)); ",SELECT Study FROM ResearchStudies WHERE Year = 2021 AND Funding = 'Public';,SELECT Study FROM ResearchStudies WHERE Year = 2021 AND Funding = 'Autonomous Driving';,0 What is the average broadband speed for each technology?,"CREATE TABLE broadband_speeds (speed_test_id INT, technology VARCHAR(10), median_speed INT);","SELECT technology, AVG(median_speed) AS avg_median_speed FROM broadband_speeds GROUP BY technology;","SELECT technology, AVG(median_speed) FROM broadband_speeds GROUP BY technology;",0 Add a new view called 'top_violations' that contains the top 5 violation codes and their respective fine amounts from the 'violations' table,"CREATE TABLE violations (id INT, vehicle_type VARCHAR(10), violation_code INT, fine_amount DECIMAL(5,2));","CREATE VIEW top_violations AS SELECT violation_code, fine_amount, COUNT(*) as count FROM violations GROUP BY violation_code, fine_amount ORDER BY count DESC LIMIT 5;","INSERT INTO violations (violation_code, fine_amount) VALUES (5, 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V'), (5, 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'Vehicle Type V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'VehicleType V', 'V', 'V', 'V', 'V', 'V', 'V', 'V', 'V', ",0 Find the total number of marine species in the 'MarineLife' table,"CREATE TABLE MarineLife (id INT PRIMARY KEY, species VARCHAR(255), population INT);",SELECT COUNT(*) FROM MarineLife;,SELECT COUNT(*) FROM MarineLife;,1 Update the 'zip_code' column value to '90210' for records in the 'affordable_housing' table where the 'city' is 'Beverly Hills',"CREATE TABLE affordable_housing (property_id INT, address VARCHAR(255), city VARCHAR(255), state VARCHAR(255), zip_code VARCHAR(10), rent FLOAT);",UPDATE affordable_housing SET zip_code = '90210' WHERE city = 'Beverly Hills';,UPDATE affordable_housing SET zip_code = '90210' WHERE city = 'Beverly Hills';,1 Insert a new traditional art in Asia into the 'traditional_arts' table,"CREATE TABLE traditional_arts (id INT PRIMARY KEY, name VARCHAR(255), type VARCHAR(255), region VARCHAR(255));","INSERT INTO traditional_arts (id, name, type, region) VALUES (2, 'Kasuri Textiles', 'Textile', 'East Asia');","INSERT INTO traditional_arts (id, name, type, region) VALUES (1, 'Chinese Traditional Art', 'Asia');",0 What is the total cost of water conservation initiatives in New York?,"CREATE TABLE ConservationInitiatives (Initiative VARCHAR(50), Location VARCHAR(50), Cost INT); ","SELECT Initiative, SUM(Cost) as TotalCost FROM ConservationInitiatives WHERE Location = 'New York' GROUP BY Initiative;",SELECT SUM(Cost) FROM ConservationInitiatives WHERE Location = 'New York';,0 "What is the total number of animals in the 'wildlife_sanctuary' table, separated by species?","CREATE TABLE wildlife_sanctuary (id INT, species VARCHAR(20), population INT); ","SELECT species, SUM(population) FROM wildlife_sanctuary GROUP BY species;","SELECT species, SUM(population) FROM wildlife_sanctuary GROUP BY species;",1 "Which album is the royal g's club mix version, which is remixed by royal garden sound, from?","CREATE TABLE table_name_20 (album VARCHAR, remixed_by VARCHAR, version VARCHAR);","SELECT album FROM table_name_20 WHERE remixed_by = ""royal garden sound"" AND version = ""royal g's club mix"";","SELECT album FROM table_name_20 WHERE remixed_by = ""royal garden sound"" AND version = ""royal g's club mix"";",1 What is the Craft used at Coniston Water?,"CREATE TABLE table_name_15 (craft VARCHAR, location VARCHAR);","SELECT craft FROM table_name_15 WHERE location = ""coniston water"";","SELECT craft FROM table_name_15 WHERE location = ""coniston water"";",1 "List the number of emergency calls for each type and day of the week in the third quarter of 2020, sorted by type and day of the week","CREATE TABLE emergency_calls_q3_2020 (id INT, call_date DATE, call_type VARCHAR(20), day_of_week VARCHAR(10)); ","SELECT call_type, day_of_week, COUNT(*) as total_calls FROM emergency_calls_q3_2020 WHERE call_date BETWEEN '2020-07-01' AND '2020-09-30' GROUP BY call_type, day_of_week ORDER BY call_type, day_of_week;","SELECT call_type, day_of_week, COUNT(*) FROM emergency_calls_q3_2020 WHERE call_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY call_type, day_of_week ORDER BY call_type, day_of_week;",0 What is the median listing price for co-op properties in Philadelphia?,"CREATE TABLE philadelphia_properties (type VARCHAR(10), price INT); ",SELECT AVG(price) FROM (SELECT DISTINCT price FROM philadelphia_properties WHERE type = 'Co-op' ORDER BY price LIMIT 2 OFFSET 1) AS subquery;,SELECT AVG(price) FROM philadelphia_properties WHERE type = 'Co-op';,0 What is the total amount donated to organizations in the Effective Altruism sector?,"CREATE TABLE Organizations (OrgID INT PRIMARY KEY, OrgName TEXT, Sector TEXT); CREATE TABLE Donors_Organizations (DonorID INT, OrgID INT, DonationAmount DECIMAL(10,2), DonationDate DATE); ",SELECT SUM(DonationAmount) FROM Donors_Organizations WHERE OrgID IN (SELECT OrgID FROM Organizations WHERE Sector = 'Effective Altruism');,SELECT SUM(DonationAmount) FROM Donors_Organizations JOIN Organizations ON Donors_Organizations.OrgID = Organizations.OrgID WHERE Organizations.Sector = 'Effective Altruism';,0 What is the minimum rating of hotels in the 'Economy' category?,"CREATE TABLE Hotels (hotel_id INT, hotel_name VARCHAR(100), category VARCHAR(50), rating FLOAT); ",SELECT MIN(rating) FROM Hotels WHERE category = 'Economy';,SELECT MIN(rating) FROM Hotels WHERE category = 'Economy';,1 What is the average running time for marathons in Kenya?,"CREATE TABLE marathons (location TEXT, country TEXT, running_time FLOAT);",SELECT AVG(running_time) FROM marathons WHERE country = 'Kenya';,SELECT AVG(running_time) FROM marathons WHERE country = 'Kenya';,1 "What is the average fine amount issued in traffic court, broken down by the day of the week?","CREATE TABLE traffic_court_fines (id INT, fine_amount DECIMAL(5,2), fine_date DATE);","SELECT DATE_FORMAT(fine_date, '%W') AS day_of_week, AVG(fine_amount) FROM traffic_court_fines GROUP BY day_of_week;","SELECT DATE_FORMAT(fine_date, '%Y-%m') as day_of_week, AVG(fine_amount) as avg_fine_amount FROM traffic_court_fines GROUP BY day_of_week;",0 "Identify the top 10 volunteers with the most volunteer hours in the last year, by state.","CREATE TABLE volunteers (id INT, volunteer_name TEXT, hours_served DECIMAL, volunteer_state TEXT, volunteer_date DATE); ","SELECT volunteer_state, volunteer_name, SUM(hours_served) as total_hours FROM volunteers WHERE volunteer_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) GROUP BY volunteer_state, volunteer_name ORDER BY total_hours DESC LIMIT 10;","SELECT volunteer_state, SUM(hours_served) as total_hours FROM volunteers WHERE volunteer_date >= DATEADD(year, -1, GETDATE()) GROUP BY volunteer_state ORDER BY total_hours DESC LIMIT 10;",0 What is the age distribution of visitors who engaged with digital installations?,"CREATE TABLE Visitor_Demographics (visitor_id INT, age INT, gender VARCHAR(10)); CREATE TABLE Digital_Interactions (visitor_id INT, interaction_date DATE); ","SELECT Age_Range, COUNT(*) AS Count FROM ( SELECT CASE WHEN Age < 18 THEN 'Minor' WHEN Age BETWEEN 18 AND 64 THEN 'Adult' ELSE 'Senior' END AS Age_Range FROM Visitor_Demographics JOIN Digital_Interactions ON Visitor_Demographics.visitor_id = Digital_Interactions.visitor_id ) AS Subquery GROUP BY Age_Range;","SELECT vd.age, COUNT(DISTINCT d.visitor_id) as num_visitors FROM Visitor_Demographics vd JOIN Digital_Interactions d ON vd.visitor_id = d.visitor_id GROUP BY vd.age;",0 How many viewers are aged 35-44 and 45-54 for TV show with ID 4?,"CREATE TABLE tv_show_viewers(viewer_id INT, age_group VARCHAR(10), show_id INT); ",SELECT COUNT(*) FROM tv_show_viewers WHERE (age_group = '35-44' OR age_group = '45-54') AND show_id = 4;,"SELECT COUNT(*) FROM tv_show_viewers WHERE age_group IN ('35-44', '45-54') AND show_id = 4;",0 How many different drivers were there for the team when the manufacturer was Toyota?,"CREATE TABLE table_2241101_1 (driver VARCHAR, manufacturer VARCHAR);","SELECT COUNT(driver) FROM table_2241101_1 WHERE manufacturer = ""Toyota"";","SELECT COUNT(driver) FROM table_2241101_1 WHERE manufacturer = ""Toyota"";",1 What is the average rating for vegan products?,"CREATE TABLE product_ingredient (product_id INT, is_vegan BOOLEAN, rating FLOAT); ",SELECT AVG(rating) as avg_rating FROM product_ingredient WHERE is_vegan = true;,SELECT AVG(rating) FROM product_ingredient WHERE is_vegan = true;,0 Find the first name and age of students who have a pet.,"CREATE TABLE student (fname VARCHAR, age VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR);","SELECT DISTINCT T1.fname, T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid;","SELECT T1.fname, T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid;",0 What is the height that has a year after 1983 and is named Phoenix Tower?,"CREATE TABLE table_name_28 (height_ft___m VARCHAR, year VARCHAR, name VARCHAR);","SELECT height_ft___m FROM table_name_28 WHERE year > 1983 AND name = ""phoenix tower"";","SELECT height_ft___m FROM table_name_28 WHERE year > 1983 AND name = ""phoenix tower"";",1 "What is the total number of Matches, when Clubs is 588 → 406?","CREATE TABLE table_name_16 (matches VARCHAR, clubs VARCHAR);","SELECT COUNT(matches) FROM table_name_16 WHERE clubs = ""588 → 406"";","SELECT COUNT(matches) FROM table_name_16 WHERE clubs = ""588 406"";",0 What are the Notes of the Country of finland?,"CREATE TABLE table_name_16 (notes VARCHAR, country VARCHAR);","SELECT notes FROM table_name_16 WHERE country = ""finland"";","SELECT notes FROM table_name_16 WHERE country = ""finland"";",1 Show the transaction type code that occurs the fewest times.,CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR);,SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) LIMIT 1;,SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1;,0 What is the record of the opponent that has a bye?,"CREATE TABLE table_name_35 (record VARCHAR, opponent VARCHAR);","SELECT record FROM table_name_35 WHERE opponent = ""bye"";","SELECT record FROM table_name_35 WHERE opponent = ""bye"";",1 Who is the driver for the Forsythe Racing team that has the best time of 1:00.099?,"CREATE TABLE table_name_42 (name VARCHAR, team VARCHAR, best VARCHAR);","SELECT name FROM table_name_42 WHERE team = ""forsythe racing"" AND best = ""1:00.099"";","SELECT name FROM table_name_42 WHERE team = ""forsythe racing"" AND best = ""1:00.099"";",1 Who was the home team on January 4?,"CREATE TABLE table_name_85 (home VARCHAR, date VARCHAR);","SELECT home FROM table_name_85 WHERE date = ""january 4"";","SELECT home FROM table_name_85 WHERE date = ""january 4"";",1 Name the un region for 378000 population,"CREATE TABLE table_16278349_1 (un_region VARCHAR, population VARCHAR);",SELECT un_region FROM table_16278349_1 WHERE population = 378000;,SELECT un_region FROM table_16278349_1 WHERE population = 378000;,1 What is the total number of unions that have collective bargaining agreements and are in the 'Retail' industry?,"CREATE TABLE unions (id INT, industry VARCHAR(255), has_cba BOOLEAN);",SELECT COUNT(*) FROM unions WHERE industry = 'Retail' AND has_cba = TRUE;,SELECT COUNT(*) FROM unions WHERE industry = 'Retail' AND has_cba = TRUE;,1 How many cultural events took place in 'Paris' between 2020 and 2021?,"CREATE TABLE events (id INT, name VARCHAR(255), city VARCHAR(255), start_date DATE, end_date DATE); ",SELECT COUNT(*) FROM events WHERE city = 'Paris' AND start_date BETWEEN '2020-01-01' AND '2021-12-31';,SELECT COUNT(*) FROM events WHERE city = 'Paris' AND start_date BETWEEN '2020-01-01' AND '2021-12-31';,1 "What is the average donation amount per month, for the last 12 months, excluding records with a donation amount of 0?","CREATE TABLE donations (donation_date DATE, donation_amount DECIMAL(10, 2)); ","SELECT AVG(donation_amount) as avg_donation_amount FROM (SELECT donation_amount FROM donations WHERE donation_date >= DATEADD(year, -1, GETDATE()) AND donation_amount > 0) t GROUP BY DATEPART(year, donation_date), DATEPART(month, donation_date);","SELECT AVG(donation_amount) FROM donations WHERE donation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 12 MONTH) AND donation_amount 0;",0 "What is the average monthly income for clients who have received Shariah-compliant loans, but not socially responsible loans?","CREATE TABLE shariah_loans (id INT, client_id INT); CREATE TABLE socially_responsible_loans (id INT, client_id INT); CREATE TABLE client_info (id INT, name VARCHAR, monthly_income DECIMAL); ",SELECT AVG(monthly_income) FROM client_info JOIN shariah_loans ON client_info.id = shariah_loans.client_id LEFT JOIN socially_responsible_loans ON shariah_loans.client_id = socially_responsible_loans.client_id WHERE socially_responsible_loans.client_id IS NULL;,SELECT AVG(client_info.monthly_income) FROM client_info INNER JOIN shariah_loans ON client_info.client_id = shariah_loans.client_id INNER JOIN socially_responsible_loans ON client_info.id = socially_responsible_loans.client_id;,0 What is the average number of research grants awarded per year to the Department of Chemistry in the College of Science?,"CREATE TABLE department (id INT, name VARCHAR(255), college VARCHAR(255));CREATE TABLE grant (id INT, department_id INT, title VARCHAR(255), amount DECIMAL(10,2), year INT);",SELECT AVG(amount) FROM grant g JOIN department d ON g.department_id = d.id WHERE d.name = 'Department of Chemistry' AND d.college = 'College of Science' GROUP BY g.year;,SELECT AVG(g.amount) FROM grant g JOIN department d ON g.department_id = d.id WHERE d.name = 'Department of Chemistry' AND d.college = 'College of Science';,0 What player loaned to of Leeds United?,"CREATE TABLE table_name_29 (player VARCHAR, loaned_to VARCHAR);","SELECT player FROM table_name_29 WHERE loaned_to = ""leeds united"";","SELECT player FROM table_name_29 WHERE loaned_to = ""leeds united"";",1 Which rugby players have scored the most tries in their careers?,"CREATE TABLE tries (player_id INT, name TEXT, career_tries INT); ","SELECT t.name, t.career_tries FROM tries t ORDER BY t.career_tries DESC;","SELECT player_id, name, career_tries FROM tries GROUP BY player_id, name ORDER BY career_tries DESC LIMIT 1;",0 "Can you tell me the average Total that has the Silver larger than 1, and the Bronze smaller than 8?","CREATE TABLE table_name_15 (total INTEGER, silver VARCHAR, bronze VARCHAR);",SELECT AVG(total) FROM table_name_15 WHERE silver > 1 AND bronze < 8;,SELECT AVG(total) FROM table_name_15 WHERE silver > 1 AND bronze 8;,0 "WHAT IS THE TV TIME WOTH A WEEK BIGGER THAN 15, WITH THE OAKLAND RAIDERS AS OPPONENT?","CREATE TABLE table_name_33 (tv_time VARCHAR, week VARCHAR, opponent VARCHAR);","SELECT tv_time FROM table_name_33 WHERE week > 15 AND opponent = ""oakland raiders"";","SELECT tv_time FROM table_name_33 WHERE week > 15 AND opponent = ""oakland ravens"";",0 "Who had a rank larger than 7, less than 305 goals, and 418 matches?","CREATE TABLE table_name_36 (name VARCHAR, matches VARCHAR, rank VARCHAR, goals VARCHAR);","SELECT name FROM table_name_36 WHERE rank > 7 AND goals < 305 AND matches = ""418"";",SELECT name FROM table_name_36 WHERE rank > 7 AND goals 305 AND matches = 418;,0 Insert a new record of a new budget allocation for the 'Health' department in the 'BudgetAllocation' table,"CREATE TABLE BudgetAllocation (department VARCHAR(20), budget INT);","INSERT INTO BudgetAllocation (department, budget) VALUES ('Health', 800000);","INSERT INTO BudgetAllocation (department, budget) VALUES (4, 'Health', '$100 million');",0 What is Australia´s finish?,"CREATE TABLE table_name_79 (finish VARCHAR, country VARCHAR);","SELECT finish FROM table_name_79 WHERE country = ""australia"";","SELECT finish FROM table_name_79 WHERE country = ""australia"";",1 How many active space missions are currently being conducted by India?,"CREATE TABLE active_missions (id INT, name VARCHAR(50), agency VARCHAR(50), start_date DATE, end_date DATE); ",SELECT COUNT(*) FROM active_missions WHERE agency = 'ISRO' AND end_date = 'ONGOING';,SELECT COUNT(*) FROM active_missions WHERE agency = 'India';,0 What is the total revenue for each drug in Q2 2018?,"CREATE TABLE sales (drug_name TEXT, quarter TEXT, year INTEGER, revenue INTEGER); ","SELECT drug_name, SUM(revenue) FROM sales WHERE quarter = 'Q2' AND year = 2018 GROUP BY drug_name;","SELECT drug_name, SUM(revenue) FROM sales WHERE quarter = 'Q2' AND year = 2018 GROUP BY drug_name;",1 Which round has pain and glory 2006 as the event?,"CREATE TABLE table_name_94 (round VARCHAR, event VARCHAR);","SELECT round FROM table_name_94 WHERE event = ""pain and glory 2006"";","SELECT round FROM table_name_94 WHERE event = ""pain and glory 2006"";",1 Name the date of vacancy for 29 december 2008 being date of appointment,"CREATE TABLE table_18522916_5 (date_of_vacancy VARCHAR, date_of_appointment VARCHAR);","SELECT date_of_vacancy FROM table_18522916_5 WHERE date_of_appointment = ""29 December 2008"";","SELECT date_of_vacancy FROM table_18522916_5 WHERE date_of_appointment = ""29 December 2008"";",1 What is the average length of songs (in seconds) by female artists in the pop genre released since 2010?,"CREATE TABLE artists (id INT, name VARCHAR(255), gender VARCHAR(10), genre VARCHAR(255)); CREATE TABLE songs (id INT, title VARCHAR(255), length INT, artist_id INT); ",SELECT AVG(length) FROM songs JOIN artists ON songs.artist_id = artists.id WHERE artists.gender = 'Female' AND artists.genre = 'Pop' AND songs.length > 0 AND songs.id > 0 AND YEAR(songs.id) >= 2010;,SELECT AVG(length) FROM songs JOIN artists ON songs.artist_id = artists.id WHERE artists.gender = 'Female' AND artists.genre = 'Pop' AND songs.length >= (SELECT AVG(length) FROM songs WHERE artists.genre = 'Pop') AND songs.length >= (SELECT AVG(length) FROM songs WHERE artists.genre = 'Pop') AND songs.length >= (SELECT AVG(length) FROM songs WHERE artists.genre = 'Pop' AND artists.genre = 'Pop');,0 Which vessels had more than 5 safety inspections in the South China Sea?,"CREATE TABLE inspections (id INT, vessel_name VARCHAR(255), inspection_date DATE, latitude DECIMAL(9,6), longitude DECIMAL(9,6)); ",SELECT vessel_name FROM inspections WHERE latitude BETWEEN 0.0 AND 25.0 AND longitude BETWEEN 95.0 AND 125.0 GROUP BY vessel_name HAVING COUNT(*) > 5;,"SELECT vessel_name FROM inspections WHERE latitude > 0 AND longitude > 0 AND inspection_date >= DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR) GROUP BY vessel_name HAVING COUNT(*) > 5;",0 What is the daily water consumption of the mining operation with the highest daily water consumption?,"CREATE TABLE daily_water_consumption (operation TEXT, date DATE, consumption FLOAT); ","SELECT operation, MAX(consumption) FROM daily_water_consumption GROUP BY operation;","SELECT operation, MAX(consumption) FROM daily_water_consumption GROUP BY operation;",0 What is the total number of offshore drilling platforms in the Gulf of Mexico that were installed before 2010?,"CREATE TABLE OffshorePlatforms (PlatformID INT, InstallationYear INT, Location VARCHAR(20)); ",SELECT COUNT(*) FROM OffshorePlatforms WHERE InstallationYear < 2010 AND Location = 'Gulf of Mexico';,SELECT COUNT(*) FROM OffshorePlatforms WHERE InstallationYear 2010 AND Location = 'Gulf of Mexico';,0 What is the minimum altitude of any satellite in orbit?,"CREATE TABLE Satellite (Id INT, Name VARCHAR(100), LaunchDate DATETIME, Country VARCHAR(50), Function VARCHAR(50), OrbitType VARCHAR(50), Altitude INT); ",SELECT MIN(Altitude) FROM Satellite;,SELECT MIN(Altitude) FROM Satellite WHERE OrbitType = 'Orbit';,0 What was the home team score for the game where Hawthorn is the home team?,CREATE TABLE table_name_83 (home_team VARCHAR);,"SELECT home_team AS score FROM table_name_83 WHERE home_team = ""hawthorn"";","SELECT home_team AS score FROM table_name_83 WHERE home_team = ""hawthorn"";",1 "What is the total number of multimodal trips taken in Los Angeles, California using electric vehicles?","CREATE TABLE multimodal_trips (trip_id INT, trip_duration INT, start_time TIMESTAMP, end_time TIMESTAMP, start_station TEXT, end_station TEXT, city TEXT, mode TEXT, electric BOOLEAN);",SELECT COUNT(*) FROM multimodal_trips WHERE city = 'Los Angeles' AND electric = TRUE;,SELECT COUNT(*) FROM multimodal_trips WHERE city = 'Los Angeles' AND mode = 'electric' AND electric = true;,0 Which smart contracts were deployed in the United States?,"CREATE TABLE smart_contracts (id INT PRIMARY KEY, name VARCHAR(255), country VARCHAR(255)); ",SELECT name FROM smart_contracts WHERE country = 'USA';,SELECT name FROM smart_contracts WHERE country = 'United States';,0 How many landfills are there in South America with a capacity greater than 8000 tons as of 2021?',"CREATE TABLE landfills (country VARCHAR(50), capacity INT, year INT); ","SELECT COUNT(*) as num_landfills FROM landfills WHERE capacity > 8000 AND year = 2021 AND country IN ('Brazil', 'Argentina', 'Colombia', 'Peru', 'Venezuela');",SELECT COUNT(*) FROM landfills WHERE country = 'South America' AND capacity > 8000 AND year = 2021;,0 What is the total number of publications in the 'Journal of Data Science'?,"CREATE TABLE Publications (ID INT, Journal VARCHAR(50), Year INT, CitationCount INT); ",SELECT SUM(CitationCount) FROM Publications WHERE Journal = 'Journal of Data Science';,SELECT SUM(CitationCount) FROM Publications WHERE Journal = 'Journal of Data Science';,1 What is the average food safety inspection score for restaurants in LA?,"CREATE TABLE food_safety_inspections (restaurant_id INT, restaurant_name VARCHAR(255), city VARCHAR(255), inspection_score INT); ",SELECT AVG(inspection_score) as avg_inspection_score FROM food_safety_inspections WHERE city = 'LA';,SELECT AVG(inspection_score) FROM food_safety_inspections WHERE city = 'LA';,0 "What is the average area of carbon sequestration sites, in hectares, for each continent, broken down by year of establishment?","CREATE TABLE carbon_sequestration_2 (id INT, continent VARCHAR(255), site_name VARCHAR(255), area FLOAT, establishment_year INT); ","SELECT continent, establishment_year, AVG(area) FROM carbon_sequestration_2 GROUP BY continent, establishment_year;","SELECT continent, establishment_year, AVG(area) as avg_area FROM carbon_sequestration_2 GROUP BY continent, establishment_year;",0 "How many sustainable fabric types does each supplier offer, excluding duplicates?","CREATE TABLE suppliers (id INT, name TEXT); CREATE TABLE supplier_fabrics (id INT, supplier INT, fabric TEXT); ","SELECT supplier, COUNT(DISTINCT fabric) as unique_fabrics FROM supplier_fabrics GROUP BY supplier HAVING COUNT(DISTINCT fabric) > 1;","SELECT s.name, COUNT(sf.fabric) FROM suppliers s JOIN supplier_fabrics sf ON s.id = sf.supplier GROUP BY s.name;",0 Create a view that displays ocean health metrics by location and year,"CREATE TABLE ocean_health_indicators (indicator_id INT PRIMARY KEY, indicator_name VARCHAR(255)); CREATE TABLE farm_locations (location_id INT PRIMARY KEY, location_name VARCHAR(255), country VARCHAR(255), ocean VARCHAR(255)); CREATE TABLE ocean_health_metrics (metric_id INT PRIMARY KEY, location_id INT, indicator_id INT, year INT, value FLOAT, FOREIGN KEY (location_id) REFERENCES farm_locations(location_id), FOREIGN KEY (indicator_id) REFERENCES ocean_health_indicators(indicator_id));","CREATE VIEW ocean_health_metrics_by_location_year AS SELECT ohm.location_id, ohm.year, ohi.indicator_name, ohm.value FROM ocean_health_metrics ohm JOIN ocean_health_indicators ohi ON ohm.indicator_id = ohi.indicator_id JOIN farm_locations fl ON ohm.location_id = fl.location_id;","CREATE VIEW ocean_health_metrics AS SELECT oh.location_name, oh.year FROM ocean_health_indicators oh INNER JOIN farm_locations fl ON oh.location_id = fl.location_id INNER JOIN ocean_health_metrics oh ON fl.location_id = oh.location_id INNER JOIN ocean_health_metrics oh ON fl.indicator_id = oh.indicator_id WHERE oh.indicator_id = oh.indicator_id;",0 Delete all comments with a score less than 0.,"CREATE TABLE posts (id INT PRIMARY KEY, title TEXT, content TEXT); CREATE TABLE comments (id INT PRIMARY KEY, post_id INT, content TEXT, score INT); ",DELETE FROM comments WHERE score < 0;,DELETE FROM comments WHERE score 0;,0 "Find the brand and name for each camera lens, and sort in descending order of maximum aperture.","CREATE TABLE camera_lens (brand VARCHAR, name VARCHAR, max_aperture VARCHAR);","SELECT brand, name FROM camera_lens ORDER BY max_aperture DESC;","SELECT brand, name FROM camera_lens ORDER BY max_aperture DESC;",1 What stain is used commonly for elastic fibers?,"CREATE TABLE table_13570_1 (stain VARCHAR, common_use VARCHAR);","SELECT stain FROM table_13570_1 WHERE common_use = ""Elastic fibers"";","SELECT stain FROM table_13570_1 WHERE common_use = ""Elastic Fibers"";",0 "If the end (UTC) is January 31, 2007 23:09, what is the name of the spacewalkers?","CREATE TABLE table_22385461_8 (spacewalkers VARCHAR, end__utc_ VARCHAR);","SELECT spacewalkers FROM table_22385461_8 WHERE end__utc_ = ""January 31, 2007 23:09"";","SELECT spacewalkers FROM table_22385461_8 WHERE end__utc_ = ""January 31, 2007 23:09"";",1 What is the maximum recycling rate for glass waste in Russia and Ukraine?,"CREATE TABLE RecyclingRates (country VARCHAR(50), year INT, glass_recycling_rate FLOAT);","SELECT MAX(glass_recycling_rate) FROM RecyclingRates WHERE country IN ('Russia', 'Ukraine');","SELECT MAX(glass_recycling_rate) FROM RecyclingRates WHERE country IN ('Russia', 'Ukraine');",1 Who wrote the series number 49 with a season larger than 4?,"CREATE TABLE table_name_27 (written_by VARCHAR, season_no VARCHAR, series_no VARCHAR);",SELECT written_by FROM table_name_27 WHERE season_no > 4 AND series_no = 49;,SELECT written_by FROM table_name_27 WHERE season_no > 4 AND series_no = 49;,1 How many league goals did Dunne have in the season where he had 2 league apps?,"CREATE TABLE table_2980024_1 (league_goals VARCHAR, league_apps VARCHAR);",SELECT league_goals FROM table_2980024_1 WHERE league_apps = 2;,SELECT league_goals FROM table_2980024_1 WHERE league_apps = 2;,1 List all smart city technology adoptions and their corresponding costs from the 'smart_city_technology' table.,"CREATE TABLE smart_city_technology (technology_name TEXT, cost REAL);","SELECT technology_name, cost FROM smart_city_technology;","SELECT technology_name, cost FROM smart_city_technology;",1 Show the total number of military vehicles by type,"CREATE TABLE MilitaryInventory (id INT, type VARCHAR(50), quantity INT); ","SELECT type, SUM(quantity) FROM MilitaryInventory GROUP BY type;","SELECT type, SUM(quantity) FROM MilitaryInventory GROUP BY type;",1 "What is the total number of refugees supported by each organization, grouped by the type of support, in the Asia-Pacific region?","CREATE TABLE refugee (refugee_id INT, ngo_id INT, support_type VARCHAR(255), location VARCHAR(255)); ","SELECT support_type, COUNT(*) as total_refugees_supported, ngo.name as organization FROM refugee JOIN ngo ON refugee.ngo_id = ngo.ngo_id WHERE ngo.region = 'Asia-Pacific' GROUP BY support_type, ngo.name;","SELECT ngo_id, support_type, COUNT(*) as total_refugees FROM refugee WHERE location = 'Asia-Pacific' GROUP BY ngo_id, support_type;",0 "What is the average time to market approval (in months) for drugs in the market_approval table, grouped by drug name?","CREATE TABLE market_approval (approval_id INT, drug_id INT, approval_date DATE); ","SELECT drug_id, AVG(DATEDIFF('month', MIN(approval_date), MAX(approval_date))) AS avg_time_to_market_approval FROM market_approval GROUP BY drug_id;","SELECT drug_id, AVG(DATEDIFF(month, approval_date)) as avg_time_to_market_approval FROM market_approval GROUP BY drug_id;",0 How many schools are in Kenya with no reported issues?,"CREATE TABLE Schools (SchoolID INT, SchoolName TEXT, SchoolCountry TEXT, Issue TEXT); ",SELECT COUNT(*) FROM Schools WHERE Schools.SchoolCountry = 'Kenya' AND Schools.Issue IS NULL;,SELECT COUNT(*) FROM Schools WHERE SchoolCountry = 'Kenya' AND Issue IS NULL;,0 "Which AI safety research papers were published in 2021, and what journals published them?","CREATE TABLE safety_papers (id INT, title VARCHAR(255), year INT, journal VARCHAR(255)); ","SELECT title, journal FROM safety_papers WHERE year = 2021;","SELECT title, journal FROM safety_papers WHERE year = 2021;",1 What is the maximum capacity of Wind Farms in Germany?,"CREATE TABLE Wind_Farms (project_id INT, location VARCHAR(50), capacity FLOAT); ",SELECT MAX(capacity) FROM Wind_Farms WHERE location = 'Germany';,SELECT MAX(capacity) FROM Wind_Farms WHERE location = 'Germany';,1 What's the average age of players who play sports games in South America?,"CREATE TABLE Players (PlayerID INT, Age INT, Gender VARCHAR(10), Location VARCHAR(20)); CREATE TABLE Games (GameID INT, GameName VARCHAR(20), Genre VARCHAR(20)); ","SELECT AVG(Players.Age) FROM Players INNER JOIN Games ON Players.Location = Games.GameName WHERE Games.Genre = 'Sports' AND Players.Location IN ('Brazil', 'Argentina');",SELECT AVG(Players.Age) FROM Players INNER JOIN Games ON Players.GameID = Games.GameID WHERE Players.Location = 'South America' AND Games.Genre = 'Sports';,0 What is the minimum and maximum mass of space debris?,"CREATE TABLE space_debris_v2 (id INT, name VARCHAR(255), mass FLOAT); ","SELECT MIN(mass) AS minimum_mass, MAX(mass) AS maximum_mass FROM space_debris_v2;","SELECT MIN(mass), MAX(mass) FROM space_debris_v2;",0 What is shown for Chassis for the year of 2007?,"CREATE TABLE table_name_70 (chassis VARCHAR, year VARCHAR);",SELECT chassis FROM table_name_70 WHERE year = 2007;,SELECT chassis FROM table_name_70 WHERE year = 2007;,1 What is the trend of maritime safety incidents in the Indian and Southern oceans over time?,"CREATE TABLE maritime_safety_incidents (year INT, incidents INT, ocean TEXT); ","SELECT year, incidents, (SELECT COUNT(*) FROM maritime_safety_incidents AS sub WHERE sub.year <= main.year AND sub.ocean IN ('Indian', 'Southern')) AS cumulative_incidents FROM maritime_safety_incidents AS main WHERE ocean IN ('Indian', 'Southern') ORDER BY year;","SELECT year, SUM(incidents) as total_incidents FROM maritime_safety_incidents WHERE ocean IN ('Indian', 'Southern') GROUP BY year;",0 What is the maximum serving size of our vegetarian entrées?,"CREATE TABLE entrees (id INT, name VARCHAR(255), type VARCHAR(255), serving_size INT); ",SELECT MAX(serving_size) FROM entrees WHERE type = 'Vegetarian';,SELECT MAX(serving_size) FROM entrees WHERE type ='vegetarian';,0 Who had the high rebounds when the score was l 122–93?,"CREATE TABLE table_name_7 (high_rebounds VARCHAR, score VARCHAR);","SELECT high_rebounds FROM table_name_7 WHERE score = ""l 122–93"";","SELECT high_rebounds FROM table_name_7 WHERE score = ""l 122–93"";",1 Name the segment d for s cufflink,"CREATE TABLE table_15187735_18 (segment_d VARCHAR, segment_a VARCHAR);","SELECT segment_d FROM table_15187735_18 WHERE segment_a = ""s Cufflink"";","SELECT segment_d FROM table_15187735_18 WHERE segment_a = ""S Cufflink"";",0 What are the details of the top 3 most common types of security incidents in the last month for the engineering department?,"CREATE TABLE incident_reports (incident_id INT, department VARCHAR(255), incident_type VARCHAR(255), reported_date TIMESTAMP);","SELECT department, incident_type, COUNT(*) as count FROM incident_reports WHERE department = 'Engineering' AND reported_date >= NOW() - INTERVAL '1 month' GROUP BY department, incident_type ORDER BY count DESC LIMIT 3;","SELECT incident_type, COUNT(*) as count FROM incident_reports WHERE department = 'Engineering' AND reported_date >= DATEADD(month, -1, GETDATE()) GROUP BY incident_type ORDER BY count DESC LIMIT 3;",0 What is the total CO2 emissions for all mines located in Canada?,"CREATE TABLE EnvironmentalImpact (ImpactID INT, MineSite VARCHAR(50), Country VARCHAR(50), CO2Emissions INT); ",SELECT SUM(CO2Emissions) FROM EnvironmentalImpact WHERE Country = 'Canada';,SELECT SUM(CO2Emissions) FROM EnvironmentalImpact WHERE Country = 'Canada';,1 "Identify financial institutions that have not yet provided financial wellbeing programs to their employees, in the UK and Canada?","CREATE TABLE financial_institutions (institution_id INT, institution_name TEXT, country TEXT); CREATE TABLE employees (employee_id INT, institution_id INT, employee_name TEXT, receives_wellbeing_program BOOLEAN); ","SELECT institution_name FROM financial_institutions LEFT JOIN employees ON financial_institutions.institution_id = employees.institution_id WHERE country IN ('UK', 'Canada') AND receives_wellbeing_program IS NULL;","SELECT f.institution_name FROM financial_institutions f INNER JOIN employees e ON f.institution_id = e.institution_id WHERE f.country IN ('UK', 'Canada') AND e.receives_wellbeing_program IS NULL;",0 What is the lowest-rated eco-friendly hotel in the United Kingdom?,"CREATE TABLE Hotels (id INT, name TEXT, country TEXT, rating FLOAT, eco_friendly BOOLEAN); ","SELECT name, rating FROM Hotels WHERE country = 'United Kingdom' AND eco_friendly = true ORDER BY rating ASC LIMIT 1;",SELECT name FROM Hotels WHERE country = 'United Kingdom' AND rating = (SELECT MIN(rating) FROM Hotels WHERE eco_friendly = true);,0 How many employees do we have?,CREATE TABLE Employee (Id VARCHAR);,SELECT COUNT(*) FROM Employee;,SELECT COUNT(*) FROM Employee;,1 What home score has an Away team of fitzroy?,"CREATE TABLE table_name_82 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team AS score FROM table_name_82 WHERE away_team = ""fitzroy"";","SELECT home_team AS score FROM table_name_82 WHERE away_team = ""fitzroy"";",1 "Insert a new record of a citizen who has provided feedback in the ""citizen_feedback"" table","CREATE TABLE citizen_feedback (citizen_id INT, feedback TEXT, feedback_date DATE);","INSERT INTO citizen_feedback (citizen_id, feedback, feedback_date) VALUES (1, 'Great job on fixing the potholes!', '2022-03-15');","INSERT INTO citizen_feedback (citizen_id, feedback, feedback_date) VALUES (1, 1, '2022-03-01', '2022-03-31');",0 "Find the three sites with the highest chemical waste production and their corresponding ranks, in South America.","CREATE TABLE chemical_waste (site_name VARCHAR(50), waste_amount FLOAT, region VARCHAR(50)); ","SELECT site_name, waste_amount, RANK() OVER (PARTITION BY region ORDER BY waste_amount DESC) as waste_rank FROM chemical_waste WHERE region = 'South America' AND waste_rank <= 3;","SELECT site_name, waste_amount FROM chemical_waste WHERE region = 'South America' ORDER BY waste_amount DESC LIMIT 3;",0 What are the titles of segment c for series episode is 21-08?,"CREATE TABLE table_15187735_21 (segment_c VARCHAR, series_ep VARCHAR);","SELECT segment_c FROM table_15187735_21 WHERE series_ep = ""21-08"";","SELECT segment_c FROM table_15187735_21 WHERE series_ep = ""21-08"";",1 "Who was the Opponent in the Auckland, New Zealand Tournament?","CREATE TABLE table_name_50 (opponent VARCHAR, tournament VARCHAR);","SELECT opponent FROM table_name_50 WHERE tournament = ""auckland, new zealand"";","SELECT opponent FROM table_name_50 WHERE tournament = ""auckland, new zealand"";",1 List all policy types that have a claim amount greater than $1500.,"CREATE TABLE PolicyTypes (PolicyTypeID int, PolicyType varchar(20)); CREATE TABLE Claims (ClaimID int, PolicyTypeID int, ClaimAmount decimal); ",SELECT PolicyTypes.PolicyType FROM PolicyTypes INNER JOIN Claims ON PolicyTypes.PolicyTypeID = Claims.PolicyTypeID WHERE Claims.ClaimAmount > 1500;,SELECT PolicyTypes.PolicyType FROM PolicyTypes INNER JOIN Claims ON PolicyTypes.PolicyTypeID = Claims.PolicyTypeID WHERE Claims.ClaimAmount > 1500;,1 Which 'accessories' category product has the highest revenue?,"CREATE TABLE sales (sale_id INT, product_id INT, category VARCHAR(20), revenue DECIMAL(5,2)); ","SELECT product_id, MAX(revenue) FROM sales WHERE category = 'accessories' GROUP BY product_id;","SELECT category, MAX(revenue) FROM sales WHERE category = 'accessories' GROUP BY category;",0 Which Yonguk has a Halang of ran¹?,"CREATE TABLE table_name_35 (yonguk VARCHAR, halang VARCHAR);","SELECT yonguk FROM table_name_35 WHERE halang = ""ran¹"";","SELECT yonguk FROM table_name_35 WHERE halang = ""ran1"";",0 Name number first elected for tennessee 2?,"CREATE TABLE table_1341586_43 (first_elected VARCHAR, district VARCHAR);","SELECT COUNT(first_elected) FROM table_1341586_43 WHERE district = ""Tennessee 2"";","SELECT first_elected FROM table_1341586_43 WHERE district = ""Tennessee 2"";",0 "What is the percentage of players who prefer multiplayer games, by continent?","CREATE TABLE player_demographics (player_id INT, player_name TEXT, age INT, country TEXT, game_type TEXT, continent TEXT); CREATE TABLE countries (country_id INT, country TEXT, continent TEXT); ","SELECT countries.continent, (COUNT(player_demographics.player_id) FILTER (WHERE player_demographics.game_type = 'Multiplayer') * 100.0 / COUNT(player_demographics.player_id)) AS percentage FROM player_demographics JOIN countries ON player_demographics.country = countries.country GROUP BY countries.continent;","SELECT continent, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM player_demographics WHERE game_type = 'Multiplayer')) AS percentage FROM player_demographics WHERE game_type = 'Multiplayer' GROUP BY continent;",0 What is the Record for April 13?,"CREATE TABLE table_name_14 (record VARCHAR, date VARCHAR);","SELECT record FROM table_name_14 WHERE date = ""april 13"";","SELECT record FROM table_name_14 WHERE date = ""april 13"";",1 Find the CO2 emissions (t) of the transportation sector in Canada,"CREATE TABLE co2_emissions (id INT, country VARCHAR(50), sector VARCHAR(50), emissions FLOAT); ",SELECT emissions FROM co2_emissions WHERE country = 'Canada' AND sector = 'Transportation';,SELECT emissions FROM co2_emissions WHERE country = 'Canada' AND sector = 'Transportation';,1 Find the number of water conservation initiatives in the state of New York.,"CREATE TABLE WaterConservationInitiatives (ID INT, State VARCHAR(20), Initiative VARCHAR(50)); ",SELECT COUNT(*) FROM WaterConservationInitiatives WHERE State = 'New York',SELECT COUNT(*) FROM WaterConservationInitiatives WHERE State = 'New York';,0 What is the total number of police patrols in districts with high crime rates?,"CREATE TABLE crime_rates (did INT, rate INT, PRIMARY KEY(did)); CREATE TABLE patrols (pid INT, did INT, PRIMARY KEY(pid), FOREIGN KEY(did) REFERENCES districts(did));",SELECT SUM(1) FROM patrols p JOIN crime_rates cr ON p.did = cr.did WHERE cr.rate > (SELECT AVG(rate) FROM crime_rates);,SELECT COUNT(p.did) FROM patrols p INNER JOIN crime_rates cr ON p.did = cr.did WHERE cr.rate = (SELECT MAX(crime_rates.rate) FROM crime_rates GROUP BY cr.did);,0 How many cybersecurity incidents were reported in the last 30 days in the 'North' region?,"CREATE TABLE cybersecurity_incidents (region TEXT, incident_date DATE); ",SELECT COUNT(*) FROM cybersecurity_incidents WHERE region = 'North' AND incident_date >= (CURRENT_DATE - INTERVAL '30 days');,"SELECT COUNT(*) FROM cybersecurity_incidents WHERE region = 'North' AND incident_date >= DATEADD(day, -30, GETDATE());",0 What is the average age of players who use VR technology and play games on weekends?,"CREATE TABLE Players (PlayerID INT, Age INT, VRUser CHAR(1), Day BIT); ",SELECT AVG(Players.Age) FROM Players WHERE Players.VRUser = 'Y' AND Players.Day = 1;,SELECT AVG(Age) FROM Players WHERE VRUser = 'VR' AND Day = 'Weekend';,0 how many episode have 8.4 millions viewer.,"CREATE TABLE table_2112766_1 (episode VARCHAR, viewers__in_millions_ VARCHAR);","SELECT COUNT(episode) FROM table_2112766_1 WHERE viewers__in_millions_ = ""8.4"";","SELECT COUNT(episode) FROM table_2112766_1 WHERE viewers__in_millions_ = ""8.4"";",1 How many years was ensign n180b a Chassis with 4 points?,"CREATE TABLE table_name_12 (year INTEGER, points VARCHAR, chassis VARCHAR);","SELECT SUM(year) FROM table_name_12 WHERE points = 4 AND chassis = ""ensign n180b"";","SELECT SUM(year) FROM table_name_12 WHERE points = 4 AND chassis = ""ensign n180b"";",1 "What is Agg., when Team 2 is Mukungwa?","CREATE TABLE table_name_42 (agg VARCHAR, team_2 VARCHAR);","SELECT agg FROM table_name_42 WHERE team_2 = ""mukungwa"";","SELECT agg FROM table_name_42 WHERE team_2 = ""mukungwa"";",1 What was gabriella ferrone's result on the 5th evening?,CREATE TABLE table_29857115_4 (singer VARCHAR);,"SELECT 5 AS th_evening FROM table_29857115_4 WHERE singer = ""Gabriella Ferrone"";","SELECT gabriella ferrone AS result FROM table_29857115_4 WHERE singer = ""Gabriella Ferrone"";",0 What is the percentage of donations made by first-time donors in the last month?,"CREATE TABLE donations (id INT, donor_id INT, is_first_time_donor BOOLEAN, amount DECIMAL(10, 2), donation_date DATE);",SELECT 100.0 * SUM(CASE WHEN is_first_time_donor THEN amount ELSE 0 END) / SUM(amount) as pct_first_time_donors,"SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM donations WHERE is_first_time_donor = true AND donation_date >= DATEADD(month, -1, GETDATE()))) AS percentage FROM donations WHERE is_first_time_donor = true AND donation_date >= DATEADD(month, -1, GETDATE());",0 What incumbent has a re-elected result and first elected larger than 1884?,"CREATE TABLE table_name_15 (incumbent VARCHAR, result VARCHAR, first_elected VARCHAR);","SELECT incumbent FROM table_name_15 WHERE result = ""re-elected"" AND first_elected > 1884;","SELECT incumbent FROM table_name_15 WHERE result = ""re-elected"" AND first_elected > 1884;",1 "what being the maximum year where regular season is 4th, northwest","CREATE TABLE table_1046454_1 (year INTEGER, regular_season VARCHAR);","SELECT MAX(year) FROM table_1046454_1 WHERE regular_season = ""4th, Northwest"";","SELECT MAX(year) FROM table_1046454_1 WHERE regular_season = ""4th, Northwest"";",1 What was the total REE production in 2018?,"CREATE TABLE production (year INT, element TEXT, quantity INT); ","SELECT SUM(quantity) FROM production WHERE year = 2018 AND element IN ('Dysprosium', 'Neodymium');",SELECT SUM(quantity) FROM production WHERE element = 'REE' AND year = 2018;,0 "What is the highest Goals Against, when Club is ""Pontevedra CF"", and when Played is less than 38?","CREATE TABLE table_name_74 (goals_against INTEGER, club VARCHAR, played VARCHAR);","SELECT MAX(goals_against) FROM table_name_74 WHERE club = ""pontevedra cf"" AND played < 38;","SELECT MAX(goals_against) FROM table_name_74 WHERE club = ""pontevedra cf"" AND played 38;",0 What is the total number of transactions for models with a fairness score greater than 0.8?,"CREATE TABLE model_fairness (model_id INT, fairness_score DECIMAL(3,2)); ",SELECT COUNT(*) FROM model_fairness WHERE fairness_score > 0.8;,SELECT COUNT(*) FROM model_fairness WHERE fairness_score > 0.8;,1 What is the recycling rate for plastic waste in 2019?,"CREATE TABLE recycling_rates (id INT, material VARCHAR(20), year INT, recycling_rate DECIMAL(5,2)); ",SELECT recycling_rate FROM recycling_rates WHERE material = 'plastic' AND year = 2019;,SELECT recycling_rate FROM recycling_rates WHERE material = 'plastic' AND year = 2019;,1 Which county includes Himco Dump?,"CREATE TABLE table_name_80 (county VARCHAR, name VARCHAR);","SELECT county FROM table_name_80 WHERE name = ""himco dump"";","SELECT county FROM table_name_80 WHERE name = ""himco dump"";",1 What is the score for set 3 with a time at 15:04?,"CREATE TABLE table_name_46 (set_3 VARCHAR, time VARCHAR);","SELECT set_3 FROM table_name_46 WHERE time = ""15:04"";","SELECT set_3 FROM table_name_46 WHERE time = ""15:04"";",1 Which countries have the highest and lowest defense diplomacy spending in the field of military innovation?,"CREATE TABLE DefenseDiplomacySpending (Country VARCHAR(50), Spending DECIMAL(10,2)); ","SELECT Country, Spending FROM (SELECT Country, Spending, ROW_NUMBER() OVER (ORDER BY Spending DESC) AS Rank, ROW_NUMBER() OVER (ORDER BY Spending ASC) AS LowRank FROM DefenseDiplomacySpending) AS RankedSpenders WHERE Rank = 1 OR LowRank = 1;","SELECT Country, Spending FROM DefenseDiplomacySpending ORDER BY Spending DESC LIMIT 1;",0 "Identify the number of spacecraft missions per month, and rank them in descending order?","CREATE TABLE spacecraft_missions (spacecraft_name TEXT, mission_date DATE);","SELECT DATE_TRUNC('month', mission_date) as mission_month, COUNT(*) as mission_count, RANK() OVER (ORDER BY COUNT(*) DESC) as mission_rank FROM spacecraft_missions GROUP BY mission_month ORDER BY mission_rank;","SELECT EXTRACT(MONTH FROM mission_date) AS month, COUNT(*) AS missions FROM spacecraft_missions GROUP BY month ORDER BY missions DESC;",0 Can you tell me the highest Capacity that has the Team of torpedo?,"CREATE TABLE table_name_66 (capacity INTEGER, team VARCHAR);","SELECT MAX(capacity) FROM table_name_66 WHERE team = ""torpedo"";","SELECT MAX(capacity) FROM table_name_66 WHERE team = ""torpedo"";",1 How many glacier melting incidents were recorded in each region per year?,"CREATE TABLE glacier_data (region VARCHAR(255), year INT, melting_incidents INT);","SELECT region, year, COUNT(melting_incidents) OVER (PARTITION BY region, year) FROM glacier_data;","SELECT region, year, SUM(melted_incidents) FROM glacier_data GROUP BY region, year;",0 What are the top 3 genres with the most songs in the song_releases table?,"CREATE TABLE song_releases (song_id INT, genre VARCHAR(20));","SELECT genre, COUNT(*) FROM song_releases GROUP BY genre ORDER BY COUNT(*) DESC LIMIT 3;","SELECT genre, COUNT(*) as song_count FROM song_releases GROUP BY genre ORDER BY song_count DESC LIMIT 3;",0 What Team had a 1:24.365 Qual 2?,"CREATE TABLE table_name_60 (team VARCHAR, qual_2 VARCHAR);","SELECT team FROM table_name_60 WHERE qual_2 = ""1:24.365"";","SELECT team FROM table_name_60 WHERE qual_2 = ""1:24.365"";",1 What is the location of the tournament with more than 6 OWGR points and Ryu Hyun-Woo as the winner?,"CREATE TABLE table_name_74 (location VARCHAR, owgr_points VARCHAR, winner VARCHAR);","SELECT location FROM table_name_74 WHERE owgr_points > 6 AND winner = ""ryu hyun-woo"";","SELECT location FROM table_name_74 WHERE owgr_points > 6 AND winner = ""ryu hyun-woo"";",1 Find labor productivity for Newmont Corp,"CREATE TABLE productivity (id INT PRIMARY KEY, company VARCHAR(100), value DECIMAL(5,2));",SELECT value FROM productivity WHERE company = 'Newmont Corp';,SELECT value FROM productivity WHERE company = 'Newmont Corp';,1 List all sensors and their last known location for the past week.,"CREATE TABLE Sensor (sensor_id INT, location VARCHAR(20), last_seen DATE);","SELECT sensor_id, location, MAX(last_seen) FROM Sensor WHERE last_seen >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) GROUP BY sensor_id;","SELECT sensor_id, location, last_seen FROM Sensor WHERE last_seen >= DATEADD(week, -1, GETDATE());",0 What is the maximum depth in the Atlantic Ocean?,"CREATE TABLE ocean_depths (ocean TEXT, depth FLOAT); ",SELECT MAX(depth) FROM ocean_depths WHERE ocean = 'Atlantic Ocean';,SELECT MAX(depth) FROM ocean_depths WHERE ocean = 'Atlantic';,0 "What is the total number of Pick, when Position is OT, when Overall is greater than 91, when Round is greater than 21, and when College is Mississippi?","CREATE TABLE table_name_98 (pick VARCHAR, college VARCHAR, round VARCHAR, position VARCHAR, overall VARCHAR);","SELECT COUNT(pick) FROM table_name_98 WHERE position = ""ot"" AND overall > 91 AND round > 21 AND college = ""mississippi"";","SELECT COUNT(pick) FROM table_name_98 WHERE position = ""ot"" AND overall > 91 AND round > 21 AND college = ""mississippi"";",1 What is the total number of mental health parity violations recorded for each state?,"CREATE TABLE mental_health_parity (id INT, location VARCHAR(50), violation_date DATE); ","SELECT location, COUNT(*) FROM mental_health_parity GROUP BY location;","SELECT location, COUNT(*) as total_violations FROM mental_health_parity GROUP BY location;",0 What is the maximum gas limit for transactions in each block of the Ethereum network?,"CREATE TABLE block_transactions (block_height INT, tx_gas_limit BIGINT);","SELECT block_height, MAX(tx_gas_limit) as max_tx_gas_limit FROM block_transactions GROUP BY block_height;","SELECT block_height, MAX(tx_gas_limit) FROM block_transactions GROUP BY block_height;",0 Update the 'charging_stations' table to set the charging speed to 150 kW for electric vehicle charging stations in California.,"CREATE TABLE charging_stations (station_id INT, location VARCHAR(50), state VARCHAR(2), charging_speed DECIMAL(5,2));",UPDATE charging_stations SET charging_speed = 150 WHERE state = 'CA';,UPDATE charging_stations SET charging_speed = 150 WHERE location = 'California';,0 What is the average cost of assistive technology devices per student?,"CREATE TABLE Assistive_Technology (student_id INT, device_name TEXT, cost DECIMAL(5,2));",SELECT AVG(cost) FROM Assistive_Technology;,SELECT AVG(cost) FROM Assistive_Technology;,1 Which Display size (in) has a Model of vaio pcg-u3?,"CREATE TABLE table_name_29 (display_size__in_ VARCHAR, model VARCHAR);","SELECT COUNT(display_size__in_) FROM table_name_29 WHERE model = ""vaio pcg-u3"";","SELECT display_size__in_ FROM table_name_29 WHERE model = ""vaio pcg-u3"";",0 What was the date of the game against Northwestern?,"CREATE TABLE table_name_62 (date VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_62 WHERE opponent = ""northwestern"";","SELECT date FROM table_name_62 WHERE opponent = ""northwestern"";",1 "What is Runner-up, when Event is Mancora Peru Classic?","CREATE TABLE table_name_87 (runner_up VARCHAR, event VARCHAR);","SELECT runner_up FROM table_name_87 WHERE event = ""mancora peru classic"";","SELECT runner_up FROM table_name_87 WHERE event = ""mancora peru classic"";",1 "What is the release year of the most recent movie in the ""movies"" table?","CREATE TABLE movies (id INT, title VARCHAR(100), release_year INT);",SELECT MAX(release_year) FROM movies;,SELECT release_year FROM movies ORDER BY release_year DESC LIMIT 1;,0 What was the away score when the home team was Melbourne?,"CREATE TABLE table_name_84 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team AS score FROM table_name_84 WHERE home_team = ""melbourne"";","SELECT away_team AS score FROM table_name_84 WHERE home_team = ""melbourne"";",1 That is the value for Try bonus when the value for Points is 418?,"CREATE TABLE table_name_82 (try_bonus VARCHAR, points_for VARCHAR);","SELECT try_bonus FROM table_name_82 WHERE points_for = ""418"";",SELECT try_bonus FROM table_name_82 WHERE points_for = 418;,0 Insert a new artifact 'Artifact4' from the 'Iron Age' site with ID 3.,"CREATE TABLE ExcavationSites (site_id INT, site_name TEXT, period TEXT); CREATE TABLE Artifacts (artifact_id INT, site_id INT, artifact_name TEXT);","INSERT INTO Artifacts (artifact_id, site_id, artifact_name, period) VALUES (4, 3, 'Artifact4', 'Iron Age');","INSERT INTO Artifacts (artifact_id, site_id, artifact_name) VALUES (3, 'Artifact4', 'Iron Age');",0 What is the total revenue generated from ethical fashion brands for the past quarter?,"CREATE TABLE Sales (sale_id INT, sale_date DATE, sale_amount FLOAT, brand_name VARCHAR(50));","SELECT SUM(Sales.sale_amount) as total_revenue FROM Sales WHERE Sales.sale_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH) AND Sales.brand_name IN (SELECT DISTINCT brand_name FROM Ethical_Fashion_Brands);","SELECT SUM(sale_amount) FROM Sales WHERE sale_date >= DATEADD(quarter, -1, GETDATE());",0 "How many male, female, and non-binary employees work at each company?","CREATE TABLE Company (id INT, name VARCHAR(50)); CREATE TABLE Diversity (company_id INT, gender VARCHAR(10), employee_count INT); ","SELECT company_id, gender, SUM(employee_count) as total FROM Diversity GROUP BY company_id, gender;","SELECT Company.name, Diversity.gender, Diversity.employee_count FROM Company INNER JOIN Diversity ON Company.id = Diversity.company_id GROUP BY Company.name, Diversity.gender;",0 Name the finished for exited day 13,"CREATE TABLE table_14345690_4 (finished VARCHAR, exited VARCHAR);","SELECT finished FROM table_14345690_4 WHERE exited = ""Day 13"";","SELECT finished FROM table_14345690_4 WHERE exited = ""Day 13"";",1 Which Object type has a NGC number of 2787?,"CREATE TABLE table_name_19 (object_type VARCHAR, ngc_number VARCHAR);",SELECT object_type FROM table_name_19 WHERE ngc_number = 2787;,SELECT object_type FROM table_name_19 WHERE ngc_number = 2787;,1 List all athletes in the soccer team who participated in wellbeing programs and their corresponding program names.,"CREATE TABLE athletes (athlete_id INT, name VARCHAR(30), team VARCHAR(20)); CREATE TABLE wellbeing_programs (program_id INT, athlete_id INT, program_name VARCHAR(30)); ","SELECT athletes.name, wellbeing_programs.program_name FROM athletes INNER JOIN wellbeing_programs ON athletes.athlete_id = wellbeing_programs.athlete_id;","SELECT athletes.name, wellbeing_programs.program_name FROM athletes INNER JOIN wellbeing_programs ON athletes.athlete_id = wellbeing_programs.athlete_id WHERE athletes.team = 'Soccer';",0 Name the total number of industry for maxis,"CREATE TABLE table_19112_3 (industry VARCHAR, company VARCHAR);","SELECT COUNT(industry) FROM table_19112_3 WHERE company = ""Maxis"";","SELECT COUNT(industry) FROM table_19112_3 WHERE company = ""Maxis"";",1 What is the total number of losses for the over 30 games played?,"CREATE TABLE table_name_50 (losses VARCHAR, played INTEGER);",SELECT COUNT(losses) FROM table_name_50 WHERE played > 30;,SELECT COUNT(losses) FROM table_name_50 WHERE played > 30;,1 With a date of Aldershot and Aldershot as the away team what was the score of the game?,"CREATE TABLE table_name_27 (score VARCHAR, away_team VARCHAR, date VARCHAR);","SELECT score FROM table_name_27 WHERE away_team = ""aldershot"" AND date = ""aldershot"";","SELECT score FROM table_name_27 WHERE away_team = ""aldershot"" AND date = ""aldershot"";",1 List all clinical trials that were conducted in Canada and have a status of 'Completed' or 'Terminated'.,"CREATE TABLE clinical_trials (country TEXT, trial_status TEXT); ","SELECT * FROM clinical_trials WHERE country = 'Canada' AND trial_status IN ('Completed', 'Terminated');",SELECT * FROM clinical_trials WHERE country = 'Canada' AND trial_status = 'Completed' OR trial_status = 'Terminated';,0 What is the attendance before week 1?,"CREATE TABLE table_name_75 (attendance VARCHAR, week INTEGER);",SELECT COUNT(attendance) FROM table_name_75 WHERE week < 1;,SELECT attendance FROM table_name_75 WHERE week 1;,0 List the names of donors who have given to both education and health programs?,"CREATE TABLE donors (id INT, name TEXT, program TEXT); ","SELECT name FROM donors WHERE program IN ('Education', 'Health') GROUP BY name HAVING COUNT(DISTINCT program) = 2;","SELECT name FROM donors WHERE program IN ('Education', 'Health');",0 "What college, junior, or club team did defence player Rory Fitzpatrick play for?","CREATE TABLE table_name_81 (college_junior_club_team VARCHAR, position VARCHAR, player VARCHAR);","SELECT college_junior_club_team FROM table_name_81 WHERE position = ""defence"" AND player = ""rory fitzpatrick"";","SELECT college_junior_club_team FROM table_name_81 WHERE position = ""defence"" AND player = ""roy fitzpatrick"";",0 What is the minimum temperature recorded during the mission 'Ares 3'?,"CREATE TABLE TemperatureRecords (Id INT, Mission VARCHAR(50), Temperature INT); ",SELECT MIN(Temperature) FROM TemperatureRecords WHERE Mission = 'Ares 3',SELECT MIN(Temperature) FROM TemperatureRecords WHERE Mission = 'Ares 3';,0 Which Played has a Points difference of +261?,"CREATE TABLE table_name_50 (played VARCHAR, points_difference VARCHAR);","SELECT played FROM table_name_50 WHERE points_difference = ""+261"";","SELECT played FROM table_name_50 WHERE points_difference = ""+261"";",1 What's the CR number that has an LMS number less than 14761 and works of Hawthorn Leslie 3100?,"CREATE TABLE table_name_23 (cr_no INTEGER, works VARCHAR, lms_no VARCHAR);","SELECT AVG(cr_no) FROM table_name_23 WHERE works = ""hawthorn leslie 3100"" AND lms_no < 14761;","SELECT SUM(cr_no) FROM table_name_23 WHERE works = ""hawthorn leslie 3100"" AND lms_no 14761;",0 "How many patients have received treatment for each mental health condition in the patient_conditions table, and what is the percentage of patients who have recovered?","CREATE TABLE patient_conditions (patient_id INT, condition VARCHAR(255), received_treatment BOOLEAN, recovered BOOLEAN);","SELECT condition, COUNT(*) AS total_patients, 100.0 * SUM(recovered AND received_treatment) / COUNT(*) AS recovery_percentage FROM patient_conditions GROUP BY condition;","SELECT condition, COUNT(*) as num_patients, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM patient_conditions)) as recovery_percentage FROM patient_conditions WHERE received_treatment = TRUE GROUP BY condition;",0 What is the total number of autonomous vehicles sold in urban and rural areas?,"CREATE TABLE av_sales (id INT, make VARCHAR, model VARCHAR, year INT, region VARCHAR, sold INT);","SELECT region, SUM(sold) as total_sold FROM av_sales WHERE model LIKE '%autonomous%' GROUP BY region;","SELECT SUM(sold) FROM av_sales WHERE region IN ('urban', 'rural');",0 What is the goals for Round 15?,"CREATE TABLE table_name_29 (goals VARCHAR, round VARCHAR);","SELECT goals FROM table_name_29 WHERE round = ""round 15"";",SELECT goals FROM table_name_29 WHERE round = 15;,0 Delete all records with an ESG rating above 8 for 'climate_change_mitigation' initiatives.,"CREATE TABLE climate_initiatives (id INT, initiative_type VARCHAR(20), ESG_rating FLOAT); ",DELETE FROM climate_initiatives WHERE initiative_type = 'climate_change_mitigation' AND ESG_rating > 8;,DELETE FROM climate_initiatives WHERE ESG_rating > 8 AND initiative_type = 'climate_change_mitigation';,0 "List the top 3 mines with the highest copper production in 2019, for mines located in Chile?","CREATE TABLE mine_details (mine_name VARCHAR(255), country VARCHAR(255), mineral VARCHAR(255), quantity INT, year INT); ","SELECT mine_name, quantity FROM (SELECT mine_name, quantity, ROW_NUMBER() OVER (PARTITION BY country ORDER BY quantity DESC) as row FROM mine_details WHERE country = 'Chile' AND mineral = 'Copper' AND year = 2019) t WHERE row <= 3;","SELECT mine_name, SUM(quantity) as total_quantity FROM mine_details WHERE country = 'Chile' AND mineral = 'Copper' AND year = 2019 GROUP BY mine_name ORDER BY total_quantity DESC LIMIT 3;",0 List diversity metrics for companies in the 'finance' sector.,"CREATE TABLE company_diversity (company_id INT, sector VARCHAR(20), female_percent FLOAT, minority_percent FLOAT); ","SELECT sector, female_percent, minority_percent FROM company_diversity WHERE sector = 'finance';",SELECT * FROM company_diversity WHERE sector = 'finance';,0 "What is the sum of Races, when Series is Toyota Racing Series, and when Podiums is greater than 3?","CREATE TABLE table_name_9 (races INTEGER, series VARCHAR, podiums VARCHAR);","SELECT SUM(races) FROM table_name_9 WHERE series = ""toyota racing series"" AND podiums > 3;","SELECT SUM(races) FROM table_name_9 WHERE series = ""toyota racing series"" AND podiums > 3;",1 What is the number of new customers acquired each month in 2022?,"CREATE TABLE customer_activity (activity_id INT, customer_id INT, activity_date DATE); ","SELECT EXTRACT(MONTH FROM activity_date) AS month, COUNT(DISTINCT customer_id) AS new_customers FROM customer_activity WHERE EXTRACT(YEAR FROM activity_date) = 2022 GROUP BY month;","SELECT EXTRACT(MONTH FROM activity_date) as month, COUNT(*) as new_customers FROM customer_activity WHERE EXTRACT(YEAR FROM activity_date) = 2022 GROUP BY month;",0 Which Country has a Margin of victory of 2 strokes?,"CREATE TABLE table_name_91 (country VARCHAR, margin_of_victory VARCHAR);","SELECT country FROM table_name_91 WHERE margin_of_victory = ""2 strokes"";","SELECT country FROM table_name_91 WHERE margin_of_victory = ""2 strokes"";",1 "Which City has a Result of w, and a Competition of international friendly (unofficial match), and a Score of 1-0?","CREATE TABLE table_name_91 (city VARCHAR, score VARCHAR, result VARCHAR, competition VARCHAR);","SELECT city FROM table_name_91 WHERE result = ""w"" AND competition = ""international friendly (unofficial match)"" AND score = ""1-0"";","SELECT city FROM table_name_91 WHERE result = ""w"" AND competition = ""international friendly (unofficial match)"" AND score = ""1-0"";",1 what was the drawn when the tries for was 46?,"CREATE TABLE table_12792876_3 (drawn VARCHAR, tries_for VARCHAR);","SELECT drawn FROM table_12792876_3 WHERE tries_for = ""46"";",SELECT drawn FROM table_12792876_3 WHERE tries_for = 46;,0 What is the average monthly data usage for customers in the state of New York who have been active for more than 6 months?,"CREATE TABLE customer_activity (customer_id INT, start_date DATE, end_date DATE); CREATE TABLE customers (customer_id INT, data_usage FLOAT);",SELECT AVG(data_usage) FROM customers INNER JOIN customer_activity ON customers.customer_id = customer_activity.customer_id WHERE customers.data_usage IS NOT NULL AND customer_activity.start_date <= CURDATE() - INTERVAL 6 MONTH AND (customer_activity.end_date IS NULL OR customer_activity.end_date >= CURDATE() - INTERVAL 6 MONTH) AND customer_activity.state = 'New York';,"SELECT AVG(data_usage) FROM customers JOIN customer_activity ON customers.customer_id = customer_activity.customer_id WHERE customer_activity.start_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) AND customer_activity.end_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",0 How many total wins does Ballarat FL of East point have when the against is greater than 1000?,"CREATE TABLE table_name_61 (wins VARCHAR, ballarat_fl VARCHAR, against VARCHAR);","SELECT COUNT(wins) FROM table_name_61 WHERE ballarat_fl = ""east point"" AND against > 1000;","SELECT COUNT(wins) FROM table_name_61 WHERE ballarat_fl = ""east point"" AND against > 1000;",1 "What school is in Radford, Va?","CREATE TABLE table_name_74 (school VARCHAR, location VARCHAR);","SELECT school FROM table_name_74 WHERE location = ""radford, va"";","SELECT school FROM table_name_74 WHERE location = ""radford, va"";",1 "How many marine species are present in the 'Coral Reef' habitat type, and what is the total biomass of those species?","CREATE TABLE marine_species (id INT, species_name TEXT, habitat_type TEXT, biomass FLOAT); ","SELECT COUNT(*), SUM(biomass) FROM marine_species WHERE habitat_type = 'Coral Reef';","SELECT COUNT(*), SUM(biomass) FROM marine_species WHERE habitat_type = 'Coral Reef';",1 What is the total number of high-risk vulnerabilities that have been open for more than 60 days?,"CREATE TABLE Vulnerabilities (id INT, name VARCHAR(255), risk_score INT, open_date DATE, resolved DATE); ","SELECT COUNT(*) FROM Vulnerabilities WHERE risk_score >= 9 AND open_date <= DATE_SUB(CURDATE(), INTERVAL 60 DAY) AND resolved IS NULL;","SELECT COUNT(*) FROM Vulnerabilities WHERE risk_score = (SELECT risk_score FROM Vulnerabilities WHERE open_date >= DATEADD(day, -60, GETDATE());",0 Identify the top 3 funding sources for renewable energy projects and the total funding amount from the Funding and Sources tables,"CREATE TABLE Funding (id INT, project_id INT, amount FLOAT, source_id INT);CREATE TABLE Sources (id INT, name VARCHAR(50));","SELECT s.name, SUM(f.amount) as total_funding FROM Funding f INNER JOIN Sources s ON f.source_id = s.id WHERE f.project_id IN (SELECT id FROM RenewableProjects WHERE type = 'renewable') GROUP BY s.id ORDER BY total_funding DESC LIMIT 3;","SELECT Funding.source_id, SUM(Funding.amount) as total_funding FROM Funding INNER JOIN Sources ON Funding.source_id = Sources.id GROUP BY Funding.source_id ORDER BY total_funding DESC LIMIT 3;",0 Which player had more than 25 events?,"CREATE TABLE table_name_60 (player VARCHAR, events INTEGER);",SELECT player FROM table_name_60 WHERE events > 25;,SELECT player FROM table_name_60 WHERE events > 25;,1 "Calculate the 6-month moving average of product ratings for each brand, in order of date.","CREATE TABLE brands (brand_id INT, brand_name VARCHAR(50)); CREATE TABLE ratings (rating_id INT, brand_id INT, product_rating DECIMAL(3,2), rating_date DATE);","SELECT r.brand_id, r.rating_date, AVG(r.product_rating) OVER (PARTITION BY r.brand_id ORDER BY r.rating_date ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) as moving_avg FROM ratings r;","SELECT b.brand_name, AVG(r.product_rating) as moving_avg FROM brands b JOIN ratings r ON b.brand_id = r.brand_id GROUP BY b.brand_name ORDER BY rating_date DESC;",0 "Which Vice President has a President of daniel masny, and a Treasurer of rebecca t. altmann?","CREATE TABLE table_name_29 (Vice VARCHAR, president VARCHAR, treasurer VARCHAR);","SELECT Vice AS president FROM table_name_29 WHERE president = ""daniel masny"" AND treasurer = ""rebecca t. altmann"";","SELECT Vice FROM table_name_29 WHERE president = ""daniel masny"" AND treasurer = ""rebecca t. altmann"";",0 Find the name of route that has the highest number of deliveries.,"CREATE TABLE Delivery_Routes (route_name VARCHAR, route_id VARCHAR); CREATE TABLE Delivery_Route_Locations (route_id VARCHAR);",SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY COUNT(*) DESC LIMIT 1;,SELECT T1.route_name FROM Delivery_Routes AS T1 JOIN Delivery_Route_Locations AS T2 ON T1.route_id = T2.route_id GROUP BY T1.route_name ORDER BY COUNT(*) DESC LIMIT 1;,0 What is the average budget for climate adaptation projects in Oceania?,"CREATE TABLE project_budget (project_id INT, budget DECIMAL); ",SELECT AVG(budget) FROM project_budget JOIN climate_project ON project_budget.project_id = climate_project.project_id WHERE climate_project.project_type = 'Adaptation' AND climate_project.project_region = 'Oceania';,SELECT AVG(budget) FROM project_budget WHERE project_id IN (SELECT project_id FROM projects WHERE region = 'Oceania');,0 What is the average daily fuel consumption for container ships?,"CREATE TABLE VesselTypes (Id INT, Type VARCHAR(50)); CREATE TABLE FuelConsumption (Id INT, VesselId INT, Date DATETIME, Amount FLOAT); ","SELECT VesselId, AVG(Amount) AS AverageDailyFuelConsumption FROM FuelConsumption WHERE Type = 'Container Ship' GROUP BY VesselId;",SELECT AVG(FuelConsumption.Amount) FROM FuelConsumption INNER JOIN VesselTypes ON FuelConsumption.VesselId = VesselTypes.Id WHERE VesselTypes.Type = 'Container';,0 "Home result of 1–0, and a Away result of 0–1 involves what club?","CREATE TABLE table_name_56 (club VARCHAR, home_result VARCHAR, away_result VARCHAR);","SELECT club FROM table_name_56 WHERE home_result = ""1–0"" AND away_result = ""0–1"";","SELECT club FROM table_name_56 WHERE home_result = ""1–0"" AND away_result = ""0–1"";",1 What is the average age of all female news reporters?,"CREATE TABLE reporters (id INT, name VARCHAR(50), gender VARCHAR(10), age INT, position VARCHAR(20)); ",SELECT AVG(age) FROM reporters WHERE gender = 'Female';,SELECT AVG(age) FROM reporters WHERE gender = 'Female';,1 "Insert a new record into the ""player_demographics"" table with player_id 5, age 30, and gender ""Transgender Male""","CREATE TABLE player_demographics (player_id INT, age INT, gender VARCHAR(50)); ","INSERT INTO player_demographics (player_id, age, gender) VALUES (5, 30, 'Transgender Male');","INSERT INTO player_demographics (player_id, age, gender) VALUES (5, 30, 'Transgender Male');",1 Find the total rainfall for each crop type in the past 30 days.,"CREATE TABLE crop_rainfall (crop_type VARCHAR(255), rainfall DECIMAL(5,2), record_date DATE); ","SELECT c.crop_type, SUM(rainfall) AS total_rainfall FROM crop_rainfall c JOIN (SELECT CURDATE() - INTERVAL 30 DAY AS start_date) d ON c.record_date >= d.start_date GROUP BY c.crop_type;","SELECT crop_type, SUM(rainfall) as total_rainfall FROM crop_rainfall WHERE record_date >= DATEADD(day, -30, GETDATE()) GROUP BY crop_type;",0 What is the total amount of water consumed by the mining operations in California last year?,"CREATE TABLE mining_operations (id INT, name TEXT, location TEXT, water_consumption FLOAT); ",SELECT SUM(water_consumption) FROM mining_operations WHERE location = 'California' AND EXTRACT(YEAR FROM timestamp) = EXTRACT(YEAR FROM CURRENT_DATE) - 1;,SELECT SUM(water_consumption) FROM mining_operations WHERE location = 'California' AND year = 2021;,0 Who won the race on August 15?,"CREATE TABLE table_28925058_1 (race_winner VARCHAR, date VARCHAR);","SELECT race_winner FROM table_28925058_1 WHERE date = ""August 15"";","SELECT race_winner FROM table_28925058_1 WHERE date = ""August 15"";",1 What is the total waste generation by material type in the city of Seattle in 2020?',"CREATE TABLE waste_generation(city VARCHAR(20), year INT, material_type VARCHAR(20), amount INT); ","SELECT material_type, SUM(amount) FROM waste_generation WHERE city = 'Seattle' AND year = 2020 GROUP BY material_type;","SELECT material_type, SUM(amount) FROM waste_generation WHERE city = 'Seattle' AND year = 2020 GROUP BY material_type;",1 What is the To par when the score was 72-67-68-71=278?,"CREATE TABLE table_name_20 (to_par VARCHAR, score VARCHAR);",SELECT to_par FROM table_name_20 WHERE score = 72 - 67 - 68 - 71 = 278;,SELECT to_par FROM table_name_20 WHERE score = 72 - 67 - 68 - 71 = 278;,1 Find the earliest health equity metric by state.,"CREATE TABLE HealthEquityMetrics (HEMId INT, Metric VARCHAR(255), State VARCHAR(50), MetricDate DATE); ","SELECT State, Metric, MetricDate FROM HealthEquityMetrics WHERE MetricDate = (SELECT MIN(MetricDate) FROM HealthEquityMetrics);","SELECT State, MIN(MetricDate) FROM HealthEquityMetrics GROUP BY State;",0 What is the average number of vessels per fleet?,"CREATE TABLE fleets (fleet_id INT, number_of_vessels INT); ",SELECT AVG(number_of_vessels) FROM fleets;,SELECT AVG(number_of_vessels) FROM fleets;,1 "What position does the Wales player who made more than 167 appearances, had more than 0 goals, and had a Leeds career from 1977–1982 play?","CREATE TABLE table_name_56 (position VARCHAR, leeds_career VARCHAR, goals VARCHAR, appearances VARCHAR, nationality VARCHAR);","SELECT position FROM table_name_56 WHERE appearances > 167 AND nationality = ""wales"" AND goals > 0 AND leeds_career = ""1977–1982"";","SELECT position FROM table_name_56 WHERE appearances > 167 AND nationality = ""wales"" AND goals > 0 AND leeds_career = ""1977–1982"";",1 What's the event of Guadeloupe?,"CREATE TABLE table_name_17 (event VARCHAR, nationality VARCHAR);","SELECT event FROM table_name_17 WHERE nationality = ""guadeloupe"";","SELECT event FROM table_name_17 WHERE nationality = ""guadeloupe"";",1 What are the names of vessels that arrived in the Port of Oakland in the last week?,"CREATE TABLE ports (id INT, name TEXT); CREATE TABLE vessel_arrivals (id INT, port_id INT, arrival_date DATE); ","SELECT v.vessel_name FROM vessels v JOIN vessel_arrivals va ON v.id = va.vessel_id WHERE va.arrival_date BETWEEN DATEADD(day, -7, CURRENT_DATE) AND CURRENT_DATE AND va.port_id = (SELECT id FROM ports WHERE name = 'Port of Oakland');","SELECT v.name FROM vessel_arrivals v JOIN ports p ON v.port_id = p.id WHERE p.name = 'Port of Oakland' AND v.arrival_date >= DATEADD(week, -1, GETDATE());",0 What was the total investment in renewable energy projects in Asia in 2021?,"CREATE TABLE renewable_energy_projects (id INT, name TEXT, year INT, investment FLOAT);",SELECT SUM(investment) FROM renewable_energy_projects WHERE year = 2021 AND country = 'Asia';,SELECT SUM(investment) FROM renewable_energy_projects WHERE year = 2021 AND region = 'Asia';,0 Which cruelty-free cosmetic brands are most popular in the US?,"CREATE TABLE brands (brand_id INT, brand_name TEXT, is_cruelty_free BOOLEAN); CREATE TABLE sales (sale_id INT, brand_id INT, sale_quantity INT, sale_country TEXT); ","SELECT b.brand_name, SUM(s.sale_quantity) as total_sales_quantity FROM sales s JOIN brands b ON s.brand_id = b.brand_id WHERE b.is_cruelty_free = true AND s.sale_country = 'US' GROUP BY b.brand_name ORDER BY total_sales_quantity DESC;",SELECT brands.brand_name FROM brands INNER JOIN sales ON brands.brand_id = sales.brand_id WHERE brands.is_cruelty_free = true AND sales.sale_country = 'US' GROUP BY brands.brand_name ORDER BY COUNT(*) DESC LIMIT 1;,0 Which artists have created more than 10 works in the 'Surrealism' category?,"CREATE TABLE Artists (ArtistID INT PRIMARY KEY, Name TEXT); CREATE TABLE Artworks (ArtworkID INT PRIMARY KEY, Title TEXT, ArtistID INT, Category TEXT, Quantity INT);",SELECT Artists.Name FROM Artists INNER JOIN Artworks ON Artists.ArtistID = Artworks.ArtistID WHERE Artworks.Category = 'Surrealism' GROUP BY Artists.Name HAVING SUM(Artworks.Quantity) > 10;,SELECT Artists.Name FROM Artists INNER JOIN Artworks ON Artists.ArtistID = Artworks.ArtistID WHERE Artworks.Category = 'Surrealism' GROUP BY Artists.Name HAVING COUNT(Artworks.ArtworkID) > 10;,0 What is the average total value for Spain?,"CREATE TABLE table_name_58 (total INTEGER, nation VARCHAR);","SELECT AVG(total) FROM table_name_58 WHERE nation = ""spain"";","SELECT AVG(total) FROM table_name_58 WHERE nation = ""spain"";",1 Which Born-Died has a Term start of 4 november 1943?,"CREATE TABLE table_name_52 (born_died VARCHAR, term_start VARCHAR);","SELECT born_died FROM table_name_52 WHERE term_start = ""4 november 1943"";","SELECT born_died FROM table_name_52 WHERE term_start = ""4 november 1943"";",1 What is the average ticket price for TeamA's home games?,"CREATE TABLE tickets (id INT, team VARCHAR(50), location VARCHAR(50), price DECIMAL(5, 2)); ",SELECT AVG(price) FROM tickets WHERE team = 'TeamA' AND location = 'Home';,SELECT AVG(price) FROM tickets WHERE team = 'TeamA' AND location = 'Home';,1 Which year has a Main of Eintracht Frankfurt and Hessen of FSV Mainz 05?,"CREATE TABLE table_name_3 (year VARCHAR, main VARCHAR, hessen VARCHAR);","SELECT year FROM table_name_3 WHERE main = ""eintracht frankfurt"" AND hessen = ""fsv mainz 05"";","SELECT year FROM table_name_3 WHERE main = ""eintracht frankfurt"" AND hessen = ""fsv mainz 05"";",1 What is the total waste generation by material type in New York City in 2021?,"CREATE TABLE waste_generation(city VARCHAR(20), material VARCHAR(20), quantity INT); ","SELECT material, SUM(quantity) as total_waste FROM waste_generation WHERE city = 'New York City' AND YEAR(event_date) = 2021 GROUP BY material;","SELECT material, SUM(quantity) FROM waste_generation WHERE city = 'New York City' AND YEAR(date) = 2021 GROUP BY material;",0 What is the average age of attendees for events by artist 'Picasso'?,"CREATE TABLE Artists (ArtistID INT PRIMARY KEY, ArtistName VARCHAR(255)); CREATE TABLE Events (EventID INT PRIMARY KEY, EventName VARCHAR(255), Attendance INT, ArtistID INT, FOREIGN KEY (ArtistID) REFERENCES Artists(ArtistID)); ",SELECT AVG(Audience.Age) FROM Audience INNER JOIN Events ON Audience.EventID = Events.EventID INNER JOIN Artists ON Events.ArtistID = Artists.ArtistID WHERE Artists.ArtistName = 'Picasso';,SELECT AVG(Attendance) FROM Events JOIN Artists ON Events.ArtistID = Artists.ArtistID WHERE Artists.ArtistName = 'Picasso';,0 What competition has a Result of 1–2?,"CREATE TABLE table_name_73 (competition VARCHAR, result VARCHAR);","SELECT competition FROM table_name_73 WHERE result = ""1–2"";","SELECT competition FROM table_name_73 WHERE result = ""1–2"";",1 Delete a talent acquisition record from the 'talent_acquisition' table,"CREATE TABLE talent_acquisition (id INT PRIMARY KEY, job_title VARCHAR(50), job_location VARCHAR(50), number_of_openings INT, source VARCHAR(50));",DELETE FROM talent_acquisition WHERE id = 2001;,DELETE FROM talent_acquisition WHERE id = 1;,0 "Find the number of workplace incidents per union in the last 6 months, ordered by the number of incidents in descending order","CREATE TABLE UnionSafety (UnionID INT, IncidentDate DATE, IncidentType VARCHAR(20)); ","SELECT UnionID, COUNT(*) as IncidentCount FROM UnionSafety WHERE IncidentDate >= DATEADD(month, -6, GETDATE()) GROUP BY UnionID ORDER BY IncidentCount DESC;","SELECT UnionID, COUNT(*) as IncidentCount FROM UnionSafety WHERE IncidentDate >= DATEADD(month, -6, GETDATE()) GROUP BY UnionID ORDER BY IncidentCount DESC;",1 Nagua has the area (km²) of?,"CREATE TABLE table_1888051_1 (area__km²_ VARCHAR, capital VARCHAR);","SELECT area__km²_ FROM table_1888051_1 WHERE capital = ""Nagua"";","SELECT area__km2_ FROM table_1888051_1 WHERE capital = ""Nagua"";",0 "List all the satellite images taken in the past month, along with the average temperature and humidity at the time of capture.","CREATE TABLE satellite_data (id INT, image_id VARCHAR(255), temperature INT, humidity INT, timestamp DATETIME); ","SELECT image_id, AVG(temperature) as avg_temp, AVG(humidity) as avg_humidity FROM satellite_data WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 MONTH) GROUP BY image_id;","SELECT image_id, AVG(temperature) as avg_temperature, AVG(humidity) as avg_humidity FROM satellite_data WHERE timestamp >= DATEADD(month, -1, GETDATE()) GROUP BY image_id;",0 How many titles got a viewership of 26.53 million?,"CREATE TABLE table_10718525_2 (title VARCHAR, us_viewers__millions_ VARCHAR);","SELECT COUNT(title) FROM table_10718525_2 WHERE us_viewers__millions_ = ""26.53"";","SELECT COUNT(title) FROM table_10718525_2 WHERE us_viewers__millions_ = ""26.53"";",1 How many news articles were published on the website in each month of 2021?,"CREATE TABLE news_articles (id INT, title TEXT, publish_date DATE); CREATE VIEW news_summary AS SELECT id, title, publish_date, EXTRACT(MONTH FROM publish_date) as month, EXTRACT(YEAR FROM publish_date) as year FROM news_articles;","SELECT month, COUNT(*) as num_articles FROM news_summary WHERE year = 2021 GROUP BY month;","SELECT MONTH(publish_date), COUNT(*) FROM news_summary WHERE YEAR(publish_date) = 2021 GROUP BY MONTH(publish_date);",0 Which entrant before 1965 scored more than 0 point with the lotus 25 chassis?,"CREATE TABLE table_name_23 (entrant VARCHAR, chassis VARCHAR, year VARCHAR, points VARCHAR);","SELECT entrant FROM table_name_23 WHERE year < 1965 AND points > 0 AND chassis = ""lotus 25"";","SELECT entrant FROM table_name_23 WHERE year 1965 AND points > 0 AND chassis = ""lotus 25"";",0 How many starts for an average finish greater than 43?,"CREATE TABLE table_name_54 (starts INTEGER, avg_finish INTEGER);",SELECT SUM(starts) FROM table_name_54 WHERE avg_finish > 43;,SELECT SUM(starts) FROM table_name_54 WHERE avg_finish > 43;,1 List all adaptation projects in 'adaptation_projects' table,"CREATE TABLE adaptation_projects (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), budget FLOAT, start_date DATE, end_date DATE); ",SELECT * FROM adaptation_projects;,SELECT * FROM adaptation_projects;,1 What is the team 1 in the match with a team 2 of Karabakh?,"CREATE TABLE table_name_20 (team_1 VARCHAR, team_2 VARCHAR);","SELECT team_1 FROM table_name_20 WHERE team_2 = ""karabakh"";","SELECT team_1 FROM table_name_20 WHERE team_2 = ""karabakh"";",1 "What is the sum of Against when the drawn is less than 2, the position is more than 8, and the lost is more than 6.","CREATE TABLE table_name_35 (against INTEGER, lost VARCHAR, drawn VARCHAR, position VARCHAR);",SELECT SUM(against) FROM table_name_35 WHERE drawn < 2 AND position > 8 AND lost > 6;,SELECT SUM(against) FROM table_name_35 WHERE drawn 2 AND position > 8 AND lost > 6;,0 What was the percentage of visitors who engaged with digital installations?,"CREATE TABLE engagement (visitor_id INT, engaged BOOLEAN); ",SELECT (COUNT(engaged) * 100.0 / (SELECT COUNT(*) FROM engagement)) AS percentage_engagement FROM engagement WHERE engaged = TRUE;,SELECT (COUNT(*) FILTER (WHERE engaged = TRUE)) * 100.0 / COUNT(*) FROM engagement;,0 What was Brian Moran's tally in the Survey USA poll where Creigh Deeds had 26%?,"CREATE TABLE table_21535453_1 (brian_moran VARCHAR, source VARCHAR, creigh_deeds VARCHAR);","SELECT brian_moran FROM table_21535453_1 WHERE source = ""Survey USA"" AND creigh_deeds = ""26%"";","SELECT brian_moran FROM table_21535453_1 WHERE source = ""Survey USA"" AND creigh_deeds = ""26%"";",1 Add a new team 'Los Angeles Lakers' with id 3,"CREATE TABLE teams (id INT, name VARCHAR(255));","INSERT INTO teams (id, name) VALUES (3, 'Los Angeles Lakers');","INSERT INTO teams (id, name) VALUES (3, 'Los Angeles Lakers');",1 How many clinical trials were conducted for each drug in 2018?,"CREATE TABLE trials_by_drug (drug_name TEXT, year INT, phase INT); ","SELECT drug_name, year, COUNT(*) FROM trials_by_drug GROUP BY drug_name, year;","SELECT drug_name, COUNT(*) FROM trials_by_drug WHERE year = 2018 GROUP BY drug_name;",0 How many cultural competency trainings have been attended by community health workers in each region?,"CREATE TABLE CommunityHealthWorkers (CHW_ID INT, CHW_Name TEXT, Region TEXT); CREATE TABLE CulturalCompetencyTrainings (Training_ID INT, CHW_ID INT, Training_Type TEXT); ","SELECT c.Region, COUNT(cc.CHW_ID) as Number_of_Trainings FROM CommunityHealthWorkers c INNER JOIN CulturalCompetencyTrainings cc ON c.CHW_ID = cc.CHW_ID GROUP BY c.Region;","SELECT c.Region, COUNT(ct.Training_ID) FROM CommunityHealthWorkers c JOIN CulturalCompetencyTrainings ct ON c.CHW_ID = ct.CHW_ID GROUP BY c.Region;",0 Who was eliminated when the vote was 8-1?,"CREATE TABLE table_25016824_2 (eliminated VARCHAR, vote VARCHAR);","SELECT eliminated FROM table_25016824_2 WHERE vote = ""8-1"";","SELECT eliminated FROM table_25016824_2 WHERE vote = ""8-1"";",1 "What is the lowest value for 1960, when the value for 2000 is less than 8.4, when the value for 1950 is greater than 3.5, and when the value for 1990 is less than 3.3?",CREATE TABLE table_name_66 (Id VARCHAR);,SELECT MIN(1960) FROM table_name_66 WHERE 2000 < 8.4 AND 1950 > 3.5 AND 1990 < 3.3;,SELECT MIN(1960) FROM table_name_66 WHERE 2000 8.4 AND 1950 > 3.5 AND 1990 3.3;,0 Find the number of vessels with a loading capacity between 30000 and 50000 tons,"CREATE TABLE Vessels (VesselID INT, VesselName VARCHAR(100), LoadingCapacity FLOAT); ",SELECT COUNT(*) FROM Vessels WHERE LoadingCapacity BETWEEN 30000 AND 50000;,SELECT COUNT(*) FROM Vessels WHERE LoadingCapacity BETWEEN 30000 AND 50000;,1 Which cruelty-free skincare products have the highest sales quantity?,"CREATE TABLE Transparency (transparency_id INT, product_id INT, is_cruelty_free BOOLEAN); CREATE TABLE Sales (sales_id INT, product_id INT, quantity INT, sales_date DATE); ","SELECT Product.product_name, SUM(Sales.quantity) as total_quantity FROM Product INNER JOIN Transparency ON Product.product_id = Transparency.product_id INNER JOIN Sales ON Product.product_id = Sales.product_id WHERE Transparency.is_cruelty_free = TRUE AND Product.category = 'Skincare' GROUP BY Product.product_name ORDER BY total_quantity DESC LIMIT 1;","SELECT t.product_id, SUM(s.quantity) as total_quantity FROM Transparency t JOIN Sales s ON t.product_id = s.product_id WHERE t.is_cruelty_free = true GROUP BY t.product_id ORDER BY total_quantity DESC LIMIT 1;",0 Which line was green?,"CREATE TABLE table_name_95 (line VARCHAR, colour VARCHAR);","SELECT line FROM table_name_95 WHERE colour = ""green"";","SELECT line FROM table_name_95 WHERE colour = ""green"";",1 What is the average points scored by Team B in their last 5 games?,"CREATE TABLE team_scores (team_id INT, game_date DATE, points INT); ",SELECT AVG(points) FROM (SELECT points FROM team_scores WHERE team_id = 2 AND game_date >= (SELECT MAX(game_date) FROM team_scores WHERE team_id = 2) - INTERVAL '180 days' ORDER BY game_date DESC LIMIT 5) AS subquery;,"SELECT AVG(points) FROM team_scores WHERE team_id = 5 AND game_date >= DATEADD(day, -5, GETDATE());",0 "Calculate the average accommodation cost for students with visual impairments in the ""accommodations"" table","CREATE TABLE accommodations (id INT, student_id INT, accommodation_type VARCHAR(255), cost FLOAT); ",SELECT AVG(cost) FROM accommodations WHERE accommodation_type = 'visual_aids';,SELECT AVG(cost) FROM accommodations WHERE accommodation_type = 'Visual Impairment';,0 Count the number of 'Bamboo Viscose Pants' sold in Spain in the second quarter of 2022.,"CREATE TABLE garments (id INT, name VARCHAR(255), category VARCHAR(255), country VARCHAR(255)); CREATE TABLE orders (id INT, garment_id INT, quantity INT, order_date DATE);",SELECT SUM(quantity) FROM orders INNER JOIN garments ON orders.garment_id = garments.id WHERE garments.name = 'Bamboo Viscose Pants' AND garments.country = 'Spain' AND QUARTER(order_date) = 2 AND YEAR(order_date) = 2022;,SELECT SUM(quantity) FROM orders JOIN garments ON orders.garment_id = garments.id WHERE garments.name = 'Bamboo Viscose Pants' AND garments.country = 'Spain' AND order_date BETWEEN '2022-04-01' AND '2022-03-31';,0 Delete all records in the 'weapons' table where 'manufacturer' is 'ABC Corporation',"CREATE TABLE weapons (id INT, name VARCHAR(255), manufacturer VARCHAR(255));",DELETE FROM weapons WHERE manufacturer = 'ABC Corporation';,DELETE FROM weapons WHERE manufacturer = 'ABC Corporation';,1 What is the maximum number of 2nd places for Tajikistan?,"CREATE TABLE table_2876467_3 (second_place INTEGER, region_represented VARCHAR);","SELECT MAX(second_place) FROM table_2876467_3 WHERE region_represented = ""Tajikistan"";","SELECT MAX(second_place) FROM table_2876467_3 WHERE region_represented = ""Tadjikistan"";",0 what was the largest attendance at kardinia park?,"CREATE TABLE table_name_74 (crowd INTEGER, venue VARCHAR);","SELECT MAX(crowd) FROM table_name_74 WHERE venue = ""kardinia park"";","SELECT MAX(crowd) FROM table_name_74 WHERE venue = ""kardinia park"";",1 What is the total for danny allsopp?,"CREATE TABLE table_name_98 (total VARCHAR, name VARCHAR);","SELECT total FROM table_name_98 WHERE name = ""danny allsopp"";","SELECT total FROM table_name_98 WHERE name = ""danny allsopp"";",1 What is the 7-day moving average of transaction amounts for each customer?,"CREATE TABLE transactions (customer_id INT, transaction_date DATE, amount DECIMAL(10,2)); ","SELECT customer_id, transaction_date, AVG(amount) OVER (PARTITION BY customer_id ORDER BY transaction_date ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) AS moving_avg FROM transactions ORDER BY customer_id, transaction_date;","SELECT customer_id, AVG(amount) as moving_avg FROM transactions WHERE transaction_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 7 DAY) AND CURRENT_DATE GROUP BY customer_id;",0 What was the average R&D expenditure per country in '2020'?,"CREATE TABLE rd_2020(country varchar(20), expenditure int); ","SELECT country, AVG(expenditure) FROM rd_2020 GROUP BY country","SELECT country, AVG(expenditure) as avg_expenditure FROM rd_2020 GROUP BY country;",0 Count the number of healthcare workers in the 'healthcare_union' table who have received a vaccine booster and are located in 'California'.,"CREATE TABLE healthcare_union (id INT, name VARCHAR(50), occupation VARCHAR(50), booster BOOLEAN, state VARCHAR(50)); ",SELECT COUNT(*) FROM healthcare_union WHERE occupation LIKE '%Healthcare%' AND booster = true AND state = 'California';,SELECT COUNT(*) FROM healthcare_union WHERE booster = TRUE AND state = 'California';,0 Which defense contractor has the highest contract value for drone technology?,"CREATE TABLE ContractNegotiations (ContractID INT, Company VARCHAR(50), Equipment VARCHAR(50), NegotiationDate DATE, ContractValue DECIMAL(10, 2)); ","SELECT ContractID, Company, Equipment, NegotiationDate, ContractValue, RANK() OVER(PARTITION BY Equipment ORDER BY ContractValue DESC) AS HighestValueContract FROM ContractNegotiations WHERE Equipment = 'Drone Technology'","SELECT Company, MAX(ContractValue) FROM ContractNegotiations WHERE Equipment = 'Drone' GROUP BY Company;",0 In which season was there a competition in the Champions League?,"CREATE TABLE table_name_70 (season VARCHAR, competition VARCHAR);","SELECT season FROM table_name_70 WHERE competition = ""champions league"";","SELECT season FROM table_name_70 WHERE competition = ""champions league"";",1 What is the cultural competency score for each community health worker by their language proficiency?,"CREATE TABLE CulturalCompetency (WorkerID INT, LanguageProficiency VARCHAR(255), Score INT); ","SELECT LanguageProficiency, AVG(Score) as AvgScore FROM CulturalCompetency GROUP BY LanguageProficiency;","SELECT WorkerID, LanguageProficiency, Score FROM CulturalCompetency;",0 What is every entry for Tuesday August 23 if the entry for Wednesday August 24 is 22' 23.29 101.116mph?,"CREATE TABLE table_30058355_7 (tues_23_aug VARCHAR, wed_24_aug VARCHAR);","SELECT tues_23_aug FROM table_30058355_7 WHERE wed_24_aug = ""22' 23.29 101.116mph"";","SELECT tues_23_aug FROM table_30058355_7 WHERE wed_24_aug = ""22' 23.29 101.116mph"";",1 "What is the average hotel rating for each country, ordered by the highest rating first?","CREATE TABLE Hotels (HotelID int, HotelName varchar(255), Country varchar(255), Rating float); ","SELECT Country, AVG(Rating) as AvgRating FROM Hotels GROUP BY Country ORDER BY AvgRating DESC;","SELECT Country, AVG(Rating) as AvgRating FROM Hotels GROUP BY Country ORDER BY AvgRating DESC;",1 List all marine species that inhabit more than one oceanographic station.,"CREATE TABLE marine_species (id INT, name VARCHAR(255)); CREATE TABLE oceanography_stations (id INT, station_name VARCHAR(255), species_id INT); ",SELECT marine_species.name FROM marine_species INNER JOIN oceanography_stations ON marine_species.id = oceanography_stations.species_id GROUP BY marine_species.name HAVING COUNT(DISTINCT oceanography_stations.station_name) > 1;,SELECT marine_species.name FROM marine_species INNER JOIN oceanography_stations ON marine_species.id = oceanography_stations.species_id GROUP BY marine_species.name HAVING COUNT(DISTINCT oceanography_stations.id) > 1;,0 Which crop type in each country has the highest total moisture level in the past 30 days?,"CREATE TABLE crop_moisture_data (country VARCHAR(255), crop_type VARCHAR(255), moisture_level INT, measurement_date DATE); ","SELECT country, crop_type, moisture_level FROM (SELECT country, crop_type, moisture_level, RANK() OVER (PARTITION BY country ORDER BY moisture_level DESC) as moisture_rank FROM crop_moisture_data WHERE measurement_date BETWEEN '2022-05-16' AND '2022-06-15' GROUP BY country, crop_type) subquery WHERE moisture_rank = 1;","SELECT country, crop_type, SUM(moisture_level) as total_moisture FROM crop_moisture_data WHERE measurement_date >= DATEADD(day, -30, GETDATE()) GROUP BY country, crop_type ORDER BY total_moisture DESC;",0 What is the average funding amount for startups founded by women in the healthcare industry?,"CREATE TABLE startups(id INT, name TEXT, industry TEXT, founding_date DATE, founder_gender TEXT); ",SELECT AVG(funding_amount) FROM funding JOIN startups ON startups.id = funding.startup_id WHERE startups.industry = 'Healthcare' AND startups.founder_gender = 'Female';,SELECT AVG(funding_amount) FROM startups WHERE industry = 'Healthcare' AND founder_gender = 'Female';,0 What is the total number of containers with a weight greater than 40 metric tons that were transported by vessels in the Baltic Sea in Q2 2021?,"CREATE TABLE Heavy_Containers_2 (container_id INTEGER, weight INTEGER, vessel_name TEXT, handling_date DATE); ",SELECT COUNT(*) FROM Heavy_Containers_2 WHERE weight > 40 AND vessel_name IN (SELECT vessel_name FROM Heavy_Containers_2 WHERE handling_date >= '2021-04-01' AND handling_date <= '2021-06-30' AND location = 'Baltic Sea');,SELECT COUNT(*) FROM Heavy_Containers_2 WHERE weight > 40 AND vessel_name LIKE '%Baltic Sea%' AND handling_date BETWEEN '2021-04-01' AND '2021-06-30';,0 "How many positions have 15 for the points, with a drawn less than 3?","CREATE TABLE table_name_57 (position INTEGER, points VARCHAR, drawn VARCHAR);",SELECT SUM(position) FROM table_name_57 WHERE points = 15 AND drawn < 3;,SELECT SUM(position) FROM table_name_57 WHERE points = 15 AND drawn 3;,0 How many clean energy policy trends were implemented in India in the last 3 years?,"CREATE TABLE clean_energy_policy_trends (id INT, name VARCHAR(255), location VARCHAR(255), start_date DATE);","SELECT COUNT(*) FROM clean_energy_policy_trends WHERE location LIKE '%India%' AND start_date >= DATE_SUB(CURDATE(), INTERVAL 3 YEAR);","SELECT COUNT(*) FROM clean_energy_policy_trends WHERE location = 'India' AND start_date >= DATEADD(year, -3, GETDATE());",0 What is the minimum dissolved oxygen level for each month in 2021?,"CREATE TABLE ocean_health (date DATE, location VARCHAR(255), dissolved_oxygen FLOAT);","SELECT EXTRACT(MONTH FROM date) AS month, MIN(dissolved_oxygen) AS min_dissolved_oxygen FROM ocean_health WHERE date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY EXTRACT(MONTH FROM date);","SELECT EXTRACT(MONTH FROM date) AS month, MIN(dissolved_oxygen) AS min_dissolved_oxygen FROM ocean_health WHERE date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY month;",0 "Determine the average ticket price for each sport, sorted in descending order.","CREATE TABLE Sports (SportID INT, Sport VARCHAR(255));CREATE TABLE Games (GameID INT, SportID INT, TicketPrice DECIMAL(5,2));","SELECT AVG(TicketPrice) AS AvgPrice, Sport FROM Games JOIN Sports ON Games.SportID = Sports.SportID GROUP BY Sport ORDER BY AvgPrice DESC;","SELECT s.Sport, AVG(g.TicketPrice) as AvgTicketPrice FROM Sports s JOIN Games g ON s.SportID = g.SportID GROUP BY s.Sport ORDER BY AvgTicketPrice DESC;",0 What is the average temperature for each port?,"CREATE TABLE Port (PortID INT, PortName VARCHAR(50), Location VARCHAR(50)); CREATE TABLE Weather (WeatherID INT, VoyageID INT, PortID INT, Temperature FLOAT, Date DATE); ","SELECT p.PortName, AVG(w.Temperature) as AvgTemperature FROM Port p JOIN Weather w ON p.PortID = w.PortID GROUP BY p.PortName;","SELECT p.PortName, AVG(w.Temperature) as AvgTemperature FROM Port p JOIN Weather w ON p.PortID = w.PortID GROUP BY p.PortName;",1 What was the total revenue generated by autonomous vehicle companies in Q3 2021?,"CREATE TABLE Revenue (Id INT, Company VARCHAR(100), Quarter INT, Revenue FLOAT); ","SELECT SUM(Revenue) FROM Revenue WHERE Quarter = 3 AND Company IN ('Wayve', 'Nuro', 'Zoox', 'Aptiv')",SELECT SUM(Revenue) FROM Revenue WHERE Company = 'Autonomous Vehicle' AND Quarter = 3;,0 "Which team has a location attendance of Air Canada Centre 19,800 with a record of 41–33?","CREATE TABLE table_name_53 (team VARCHAR, location_attendance VARCHAR, record VARCHAR);","SELECT team FROM table_name_53 WHERE location_attendance = ""air canada centre 19,800"" AND record = ""41–33"";","SELECT team FROM table_name_53 WHERE location_attendance = ""air canada centre 19,800"" AND record = ""41–33"";",1 What is the average price of sustainable materials in the USA?,"CREATE TABLE SustainableMaterials (Material VARCHAR(50), Price FLOAT, Country VARCHAR(50)); ",SELECT AVG(Price) FROM SustainableMaterials WHERE Country = 'USA';,SELECT AVG(Price) FROM SustainableMaterials WHERE Country = 'USA';,1 "Which competition did Târlea come in 4th place, in 2003 at Budapest, Hungary?","CREATE TABLE table_name_55 (competition VARCHAR, venue VARCHAR, position VARCHAR, year VARCHAR);","SELECT competition FROM table_name_55 WHERE position = ""4th"" AND year > 2003 AND venue = ""budapest, hungary"";","SELECT competition FROM table_name_55 WHERE position = ""4th"" AND year = 2003 AND venue = ""budapest, hungary"";",0 How many movies were released per year in India?,"CREATE TABLE movie (id INT PRIMARY KEY, title VARCHAR(255), year INT, country VARCHAR(255)); ","SELECT year, COUNT(id) AS movies_released FROM movie GROUP BY year;","SELECT year, COUNT(*) FROM movie WHERE country = 'India' GROUP BY year;",0 What is the average depth of the deepest ocean trenches located in the Pacific Ocean?,"CREATE TABLE pacific_ocean_trenches (id INT, name TEXT, min_depth INT); ",SELECT AVG(min_depth) as avg_depth FROM pacific_ocean_trenches;,SELECT AVG(min_depth) FROM pacific_ocean_trenches;,0 Which railway has a class of 250 and year 1936?,"CREATE TABLE table_name_76 (railway VARCHAR, class VARCHAR, year VARCHAR);","SELECT railway FROM table_name_76 WHERE class = ""250"" AND year = ""1936"";","SELECT railway FROM table_name_76 WHERE class = ""250"" AND year = 1936;",0 "What is the larges week for the date august 9, 1968 and less than 64,020 in attendance?","CREATE TABLE table_name_14 (week INTEGER, date VARCHAR, attendance VARCHAR);","SELECT MAX(week) FROM table_name_14 WHERE date = ""august 9, 1968"" AND attendance < 64 OFFSET 020;","SELECT MAX(week) FROM table_name_14 WHERE date = ""august 9, 1968"" AND attendance 64 OFFSET 020;",0 How many losses did the club with 22 played and 334 points against have?,"CREATE TABLE table_name_1 (lost VARCHAR, played VARCHAR, points_against VARCHAR);","SELECT lost FROM table_name_1 WHERE played = ""22"" AND points_against = ""334"";","SELECT lost FROM table_name_1 WHERE played = ""22"" AND points_against = ""334"";",1 "What are the total hours worked by construction laborers for permits issued in 2020, grouped by permit_id?","CREATE TABLE construction_labor (labor_id INT, permit_id INT, worker_name TEXT, hours_worked INT, wage FLOAT); ","SELECT permit_id, SUM(hours_worked) FROM construction_labor WHERE permit_id IN (SELECT permit_id FROM building_permits WHERE EXTRACT(YEAR FROM issue_date) = 2020) GROUP BY permit_id;","SELECT permit_id, SUM(hours_worked) FROM construction_labor WHERE YEAR(permit_id) = 2020 GROUP BY permit_id;",0 What is the name of the player from after 1989 from Washington State?,"CREATE TABLE table_name_48 (player_name VARCHAR, year VARCHAR, college VARCHAR);","SELECT player_name FROM table_name_48 WHERE year > 1989 AND college = ""washington state"";","SELECT player_name FROM table_name_48 WHERE year > 1989 AND college = ""washington state"";",1 How many traditional dances are present in 'Africa' and 'Asia'?,"CREATE TABLE TraditionalDances (DanceID INT PRIMARY KEY, DanceName VARCHAR(50), Location VARCHAR(50), Type VARCHAR(50)); ","SELECT COUNT(*) FROM TraditionalDances WHERE Location IN ('Africa', 'Asia');","SELECT COUNT(*) FROM TraditionalDances WHERE Location IN ('Africa', 'Asia');",1 Name the 1st match for brisbane bears,CREATE TABLE table_name_61 (team VARCHAR);,"SELECT 1 AS st_match FROM table_name_61 WHERE team = ""brisbane bears"";","SELECT 1 AS st_match FROM table_name_61 WHERE team = ""brisbane bears"";",1 Show all 'warehouse_location' and their corresponding 'warehouse_size' from the 'warehouse_management' table,"CREATE TABLE warehouse_management (warehouse_id INT, warehouse_location VARCHAR(50), warehouse_size INT); ","SELECT warehouse_location, warehouse_size FROM warehouse_management;","SELECT warehouse_location, warehouse_size FROM warehouse_management;",1 Result of w 21–7 had what average week?,"CREATE TABLE table_name_96 (week INTEGER, result VARCHAR);","SELECT AVG(week) FROM table_name_96 WHERE result = ""w 21–7"";","SELECT AVG(week) FROM table_name_96 WHERE result = ""w 21–7"";",1 Delete records for sanctuaries with less than 100 hectares from the wildlife_sanctuaries table.,"CREATE TABLE wildlife_sanctuaries (id INT, sanctuary_name VARCHAR(50), hectares DECIMAL(5,2), country VARCHAR(50)); ",DELETE FROM wildlife_sanctuaries WHERE hectares < 100;,DELETE FROM wildlife_sanctuaries WHERE hectares 100;,0 List all unique donor_id and their total donation amounts for organizations located in 'California' and 'Texas',"CREATE TABLE Organizations (org_id INT, org_name TEXT, org_location TEXT); CREATE TABLE Donors (donor_id INT, donor_name TEXT, org_id INT, donation_amount DECIMAL(10,2));","SELECT D.donor_id, SUM(D.donation_amount) as total_donations FROM Donors D INNER JOIN Organizations O ON D.org_id = O.org_id WHERE O.org_location IN ('California', 'Texas') GROUP BY D.donor_id;","SELECT DISTINCT donor_id, SUM(donation_amount) FROM Donors JOIN Organizations ON Donors.org_id = Organizations.org_id WHERE Organizations.org_location IN ('California', 'Texas') GROUP BY donor_id;",0 What is the infection rate of TB in Texas compared to California?,"CREATE TABLE infections (id INT, disease TEXT, location TEXT, cases INT); ","SELECT (infections.cases/populations.population)*100000 AS 'TX infection rate', (infections.cases/populations.population)*100000 AS 'CA infection rate' FROM infections INNER JOIN populations ON 1=1 WHERE infections.disease = 'TB' AND infections.location IN ('Texas', 'California');","SELECT location, SUM(cases) as total_cases FROM infections WHERE disease = 'TB' AND location = 'Texas' AND location = 'California' GROUP BY location;",0 What was the total energy consumption by sector in 2020?,"CREATE TABLE energy_consumption (year INT, sector VARCHAR(255), consumption FLOAT); ","SELECT sector, SUM(consumption) as total_consumption FROM energy_consumption WHERE year = 2020 GROUP BY sector;","SELECT sector, SUM(consumption) FROM energy_consumption WHERE year = 2020 GROUP BY sector;",0 What is the average number of medical visits per person in Afghanistan and Pakistan?,"CREATE TABLE medical_visits (id INT, country VARCHAR(255), person_id INT, visits INT); ","SELECT country, AVG(visits) FROM medical_visits GROUP BY country;","SELECT AVG(visits) FROM medical_visits WHERE country IN ('Afghanistan', 'Pakistan');",0 "What is the Season of the game with a Score of 0–2 (a), 3–1 (h)?","CREATE TABLE table_name_24 (season VARCHAR, score VARCHAR);","SELECT season FROM table_name_24 WHERE score = ""0–2 (a), 3–1 (h)"";","SELECT season FROM table_name_24 WHERE score = ""0–2 (a), 3–1 (h)"";",1 "What is the average word count for news articles in each category, sorted by average word count?","CREATE TABLE News (news_id INT, title TEXT, category TEXT, word_count INT); ","SELECT category, AVG(word_count) as avg_word_count FROM News GROUP BY category ORDER BY avg_word_count DESC;","SELECT category, AVG(word_count) as avg_word_count FROM News GROUP BY category ORDER BY avg_word_count DESC;",1 What is the maximum number of court appearances for a single case?,"CREATE TABLE appearances (id INT, case_id INT, appearance_date DATE); ","SELECT MAX(count) FROM (SELECT case_id, COUNT(*) as count FROM appearances GROUP BY case_id) as subquery;","SELECT case_id, MAX(count) FROM appearances GROUP BY case_id;",0 Which program had the highest average donation amount?,"CREATE TABLE Donations (DonationID int, Amount decimal(10,2), PaymentMethod varchar(50), DonationDate date, Program varchar(50)); ","SELECT Program, AVG(Amount) as AverageDonationAmount FROM Donations GROUP BY Program ORDER BY AverageDonationAmount DESC LIMIT 1;","SELECT Program, AVG(Amount) as AvgDonation FROM Donations GROUP BY Program ORDER BY AvgDonation DESC LIMIT 1;",0 What is the date for the tournament McDonald's wpga championship?,"CREATE TABLE table_2167226_3 (date VARCHAR, tournament VARCHAR);","SELECT date FROM table_2167226_3 WHERE tournament = ""McDonald's WPGA Championship"";","SELECT date FROM table_2167226_3 WHERE tournament = ""McDonald's WPGA Championship"";",1 What is the average duration of missions for astronauts who have completed more than 3 missions?,"CREATE TABLE Astronaut_Missions (id INT, astronaut_id INT, mission_id INT, role VARCHAR, assignment_date DATE); CREATE TABLE Astronauts (id INT, name VARCHAR, age INT, gender VARCHAR, mission_count INT);","SELECT AVG(DATEDIFF(day, MISSION.assignment_date, LEAD(MISSION.assignment_date) OVER (PARTITION BY ASTRONAUT.id ORDER BY MISSION.assignment_date))) as average_duration FROM Astronauts ASTRONAUT JOIN Astronaut_Missions MISSION ON ASTRONAUT.id = MISSION.astronaut_id WHERE ASTRONAUT.mission_count > 3;",SELECT AVG(duration) FROM Astronaut_Missions JOIN Astronauts ON Astronaut_Missions.astronaut_id = Astronauts.id WHERE Astronauts.mission_count > 3;,0 What is the total quantity of textile waste for each material?,"CREATE TABLE textile_waste (material VARCHAR(255), quantity INT); ","SELECT material, SUM(quantity) as total_waste FROM textile_waste GROUP BY material;","SELECT material, SUM(quantity) FROM textile_waste GROUP BY material;",0 What is the average budget spent on language preservation programs per region?,"CREATE TABLE LanguagePreservation (Region VARCHAR(255), Budget INT); ","SELECT Region, AVG(Budget) as Avg_Budget FROM LanguagePreservation GROUP BY Region;","SELECT Region, AVG(Budget) FROM LanguagePreservation GROUP BY Region;",0 What is the water usage for customers in 'City E'?,"CREATE TABLE Water_Meters (id INT, customer_id INT, meter_reading FLOAT, read_date DATE); ",SELECT SUM(meter_reading) FROM Water_Meters WHERE customer_id IN (SELECT id FROM Customers WHERE city = 'City E');,"SELECT customer_id, SUM(meter_reading) as total_meter_reading FROM Water_Meters WHERE city = 'City E' GROUP BY customer_id;",0 "On July 8, what was the score?","CREATE TABLE table_17104539_10 (score VARCHAR, date VARCHAR);","SELECT score FROM table_17104539_10 WHERE date = ""July 8"";","SELECT score FROM table_17104539_10 WHERE date = ""July 8"";",1 What score has 33 as the points?,"CREATE TABLE table_name_93 (score VARCHAR, points VARCHAR);",SELECT score FROM table_name_93 WHERE points = 33;,SELECT score FROM table_name_93 WHERE points = 33;,1 "What is the Name of the Junior from Fayetteville, NC?","CREATE TABLE table_name_69 (name VARCHAR, year VARCHAR, home_town VARCHAR);","SELECT name FROM table_name_69 WHERE year = ""junior"" AND home_town = ""fayetteville, nc"";","SELECT name FROM table_name_69 WHERE year = ""junior"" AND home_town = ""fayetteville, nc"";",1 Which cruelty-free brands are available in the UK?,"CREATE TABLE Brands (brand_id INT, brand_name TEXT, cruelty_free BOOLEAN, country TEXT); ",SELECT brand_name FROM Brands WHERE country = 'UK' AND cruelty_free = TRUE;,SELECT brand_name FROM Brands WHERE cruelty_free = true AND country = 'UK';,0 What is the number of vaccinations administered in New York state?,"CREATE TABLE vaccinations (state VARCHAR(20), date DATE, doses INT);",SELECT SUM(doses) FROM vaccinations WHERE state = 'New York';,SELECT SUM(doses) FROM vaccinations WHERE state = 'New York';,1 "Who is the Partner in the match with a Score of 6-4, 2-6, 7-6?","CREATE TABLE table_name_52 (partnering VARCHAR, score VARCHAR);","SELECT partnering FROM table_name_52 WHERE score = ""6-4, 2-6, 7-6"";","SELECT partnering FROM table_name_52 WHERE score = ""6-4, 2-6, 7-6"";",1 What is the average number of community safety participants in the neighborhoods of 'Southside' and 'Downtown' in 2022?,"CREATE TABLE Community_Safety (id INT PRIMARY KEY, safety_initiative VARCHAR(50), neighborhood VARCHAR(50), date DATE, participants INT);","SELECT neighborhood, AVG(participants) as avg_participants FROM Community_Safety WHERE neighborhood IN ('Southside', 'Downtown') AND date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY neighborhood;","SELECT AVG(participants) FROM Community_Safety WHERE neighborhood IN ('Southside', 'Downtown') AND date BETWEEN '2022-01-01' AND '2022-12-31';",0 "List all defense diplomacy events that have taken place in the North Atlantic Treaty Organization (NATO) countries in the last 5 years, along with the number of participating countries.","CREATE TABLE DefenseDiplomacy (ID INT, EventName TEXT, EventDate DATE, ParticipatingCountries TEXT); CREATE VIEW NATO AS SELECT Country FROM DefenseDiplomacy WHERE Country IN ('USA', 'Canada', 'UK', 'France', 'Germany');","SELECT EventName, ParticipatingCountries, COUNT(DISTINCT SUBSTRING_INDEX(ParticipatingCountries, ',', n)) as NumberOfCountries FROM DefenseDiplomacy d CROSS JOIN (SELECT numbers.N FROM (SELECT 1 as N UNION ALL SELECT 2 UNION ALL SELECT 3) numbers) n JOIN NATO nato ON FIND_IN_SET(nato.Country, ParticipatingCountries) > 0 WHERE EventDate BETWEEN DATEADD(year, -5, GETDATE()) AND GETDATE() GROUP BY EventName, ParticipatingCountries;","SELECT EventName, ParticipatingCountries FROM DefenseDiplomacy WHERE EventDate >= DATEADD(year, -5, GETDATE()) AND ParticipatingCountries IN ('USA', 'Canada', 'UK', 'France', 'Germany');",0 Delete the artworks of an artist.,"CREATE TABLE artists (id INT, name VARCHAR(50));CREATE TABLE artworks (id INT, title VARCHAR(50), artist_id INT); ",DELETE FROM artworks WHERE artist_id = 1;,DELETE FROM artworks WHERE artist_id = 1;,1 which entrant after 1987 had 12 points and a benetton b188 chassis?,"CREATE TABLE table_name_22 (entrant VARCHAR, points VARCHAR, year VARCHAR, chassis VARCHAR);","SELECT entrant FROM table_name_22 WHERE year > 1987 AND chassis = ""benetton b188"" AND points = 12;","SELECT entrant FROM table_name_22 WHERE year > 1987 AND chassis = ""benetton b188"" AND points = ""12"";",0 What is the total number of tickets sold by each team?,"CREATE TABLE TicketSales (SaleID INT, Team VARCHAR(255), QuantitySold INT); ","SELECT Team, SUM(QuantitySold) as Total_Tickets_Sold FROM TicketSales GROUP BY Team;","SELECT Team, SUM(QuantitySold) FROM TicketSales GROUP BY Team;",0 What is the rank with 0 bronze?,"CREATE TABLE table_name_9 (rank INTEGER, bronze INTEGER);",SELECT AVG(rank) FROM table_name_9 WHERE bronze < 0;,SELECT AVG(rank) FROM table_name_9 WHERE bronze 0;,0 Compute the average daily production rate for wells in Texas,"CREATE TABLE wells (id INT, well_name VARCHAR(255), location VARCHAR(255), drill_year INT, company VARCHAR(255), daily_production_rate DECIMAL(5,2)); ",SELECT AVG(daily_production_rate) FROM wells WHERE location = 'Texas';,SELECT AVG(daily_production_rate) FROM wells WHERE location = 'Texas';,1 "What is the total funding raised by companies founded by minorities, in descending order?","CREATE TABLE company (id INT, name TEXT, founder TEXT, industry TEXT, funding FLOAT); ",SELECT SUM(funding) FROM company WHERE founder LIKE '%Minority%' ORDER BY SUM(funding) DESC;,SELECT SUM(funding) FROM company WHERE founder LIKE '%Minority%' GROUP BY founder ORDER BY SUM(funding) DESC;,0 What is the average labor cost for manufacturing in Africa?,"CREATE TABLE suppliers (id INT, name VARCHAR(255), location VARCHAR(255), sustainable_practices BOOLEAN); CREATE TABLE garments (id INT, name VARCHAR(255), category VARCHAR(255), price DECIMAL(5,2), quantity INT, supplier_id INT); CREATE TABLE manufacturing_costs (id INT, garment_id INT, labor_cost DECIMAL(5,2), material_cost DECIMAL(5,2), manufacturing_time INT); ",SELECT AVG(manufacturing_costs.labor_cost) FROM manufacturing_costs JOIN suppliers ON manufacturing_costs.supplier_id = suppliers.id WHERE suppliers.location = 'Africa';,SELECT AVG(labor_cost) FROM manufacturing_costs mc JOIN garments g ON mc.garment_id = g.id JOIN suppliers s ON g.supplier_id = s.id WHERE s.location = 'Africa';,0 What is the English character for Lin Ming Kuan (林明寬)?,"CREATE TABLE table_name_88 (english VARCHAR, character VARCHAR);","SELECT english FROM table_name_88 WHERE character = ""lin ming kuan (林明寬)"";","SELECT english FROM table_name_88 WHERE character = ""lin ming kuan ()"";",0 Which cruelty-free certified products were purchased in the last month from the US region?,"CREATE TABLE product (product_id INT, product_name TEXT, is_cruelty_free BOOLEAN); CREATE TABLE purchase (purchase_id INT, product_id INT, purchase_date DATE, region TEXT); ",SELECT p.product_name FROM purchase p JOIN product pr ON p.product_id = pr.product_id WHERE pr.is_cruelty_free = true AND p.purchase_date >= '2022-02-01' AND p.region = 'US';,"SELECT p.product_name FROM product p JOIN purchase p ON p.product_id = p.product_id WHERE p.is_cruelty_free = true AND p.purchase_date >= DATEADD(month, -1, GETDATE()) AND p.region = 'US';",0 "What was the average year that Xuxa 3 earned the certification 2x platinum, and that the sales were higher than 750,000?","CREATE TABLE table_name_60 (year INTEGER, sales VARCHAR, certification VARCHAR, álbum VARCHAR);","SELECT AVG(year) FROM table_name_60 WHERE certification = ""2x platinum"" AND álbum = ""xuxa 3"" AND sales > 750 OFFSET 000;","SELECT AVG(year) FROM table_name_60 WHERE certification = ""2x platinum"" AND álbum = ""xuxa 3"" AND sales > 75000;",0 List the top 3 most preferred dishes by customers in the last 30 days?,"CREATE TABLE orders (dish VARCHAR(255), order_date DATE); ","SELECT dish, COUNT(dish) AS count FROM orders WHERE order_date >= DATEADD(day, -30, GETDATE()) GROUP BY dish ORDER BY count DESC LIMIT 3;","SELECT dish, COUNT(*) as preferred_dish FROM orders WHERE order_date >= DATEADD(day, -30, GETDATE()) GROUP BY dish ORDER BY preferred_dish DESC LIMIT 3;",0 What is the 2nd leg for the team 2 Milano?,CREATE TABLE table_name_72 (team_2 VARCHAR);,"SELECT 2 AS nd_leg FROM table_name_72 WHERE team_2 = ""milano"";","SELECT 2 AS nd_leg FROM table_name_72 WHERE team_2 = ""milano"";",1 What was the game number of the game played against Charlotte?,"CREATE TABLE table_name_67 (game VARCHAR, team VARCHAR);","SELECT COUNT(game) FROM table_name_67 WHERE team = ""charlotte"";","SELECT game FROM table_name_67 WHERE team = ""charlotte"";",0 What is the total of all YARDS with 0 SACK and less than 14 P/KO RET?,"CREATE TABLE table_name_31 (yards VARCHAR, sack VARCHAR, p_ko_ret VARCHAR);",SELECT COUNT(yards) FROM table_name_31 WHERE sack = 0 AND p_ko_ret < 14;,SELECT COUNT(yards) FROM table_name_31 WHERE sack = 0 AND p_ko_ret 14;,0 what is the finishes when points is more than 337 and starts is more than 26?,"CREATE TABLE table_name_90 (finishes INTEGER, points VARCHAR, starts VARCHAR);",SELECT SUM(finishes) FROM table_name_90 WHERE points > 337 AND starts > 26;,SELECT SUM(finishes) FROM table_name_90 WHERE points > 337 AND starts > 26;,1 What is the average age of astronauts from Brazil?,"CREATE TABLE Astronauts (id INT, name VARCHAR(255), country VARCHAR(255), age INT); ",SELECT AVG(age) FROM Astronauts WHERE country = 'Brazil';,SELECT AVG(age) FROM Astronauts WHERE country = 'Brazil';,1 How many ranks by average for the couple Tana and Stuart?,"CREATE TABLE table_26375386_28 (rank_by_average VARCHAR, couple VARCHAR);","SELECT COUNT(rank_by_average) FROM table_26375386_28 WHERE couple = ""Tana and Stuart"";","SELECT COUNT(rank_by_average) FROM table_26375386_28 WHERE couple = ""Tana and Stuart"";",1 What is the total number of articles published in each month of the year in the 'investigative_reports' table?,"CREATE TABLE investigative_reports (id INT, title VARCHAR(255), author VARCHAR(255), publication_date DATE);","SELECT EXTRACT(MONTH FROM publication_date) as month, COUNT(*) as total_articles FROM investigative_reports GROUP BY month;","SELECT EXTRACT(MONTH FROM publication_date) AS month, COUNT(*) FROM investigative_reports GROUP BY month;",0 How many news articles were published by 'The Guardian' between 2015 and 2018?,"CREATE TABLE news_articles (id INT, title TEXT, source TEXT, year INT); ",SELECT COUNT(*) FROM news_articles WHERE source = 'The Guardian' AND year BETWEEN 2015 AND 2018;,SELECT COUNT(*) FROM news_articles WHERE source = 'The Guardian' AND year BETWEEN 2015 AND 2018;,1 what number is associated with the baltic fleet and leninets (ленинец)?,"CREATE TABLE table_name_49 (number VARCHAR, fleet VARCHAR, name VARCHAR);","SELECT number FROM table_name_49 WHERE fleet = ""baltic"" AND name = ""leninets (ленинец)"";","SELECT number FROM table_name_49 WHERE fleet = ""baltic"" AND name = ""leninets (ленине)"";",0 What is the Traditional Chinese of 国殇 which is over 9?,"CREATE TABLE table_name_14 (traditional_chinese VARCHAR, standard_order VARCHAR, simplified_chinese VARCHAR);","SELECT traditional_chinese FROM table_name_14 WHERE standard_order > 9 AND simplified_chinese = ""国殇"";","SELECT traditional_chinese FROM table_name_14 WHERE standard_order > 9 AND simplified_chinese = """";",0 What is the total number of Union members in the Transportation sector?,"CREATE TABLE UnionMembership (id INT, sector VARCHAR(255), members INT); ",SELECT SUM(members) FROM UnionMembership WHERE sector = 'Transportation';,SELECT SUM(members) FROM UnionMembership WHERE sector = 'Transportation';,1 "Which expeditions have a budget greater than $500,000 and were completed in the last 3 years?","CREATE TABLE expeditions (id INT PRIMARY KEY, name VARCHAR(255), objective VARCHAR(255), start_date DATE, end_date DATE, budget FLOAT);","SELECT name, budget FROM expeditions WHERE budget > 500000 AND end_date >= DATE_SUB(CURDATE(), INTERVAL 3 YEAR);","SELECT name FROM expeditions WHERE budget > 500000 AND end_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR);",0 When did Jacques Chirac stop being a G8 leader?,"CREATE TABLE table_10026563_1 (ended_time_as_senior_g8_leader VARCHAR, person VARCHAR);","SELECT ended_time_as_senior_g8_leader FROM table_10026563_1 WHERE person = ""Jacques Chirac"";","SELECT ended_time_as_senior_g8_leader FROM table_10026563_1 WHERE person = ""Jacques Chirac"";",1 What is the minimum response time for emergency calls in the city of Chicago?,"CREATE TABLE EmergencyCalls (id INT, city VARCHAR(20), response_time FLOAT);",SELECT MIN(response_time) FROM EmergencyCalls WHERE city = 'Chicago';,SELECT MIN(response_time) FROM EmergencyCalls WHERE city = 'Chicago';,1 "What is the total quantity of coal mined by each mine, sorted by the highest quantity?","CREATE TABLE Mine (MineID int, MineName varchar(50), Location varchar(50), TotalCoalQuantity int); ","SELECT MineName, SUM(TotalCoalQuantity) as TotalCoalQuantity FROM Mine GROUP BY MineName ORDER BY TotalCoalQuantity DESC;","SELECT MineName, SUM(TotalCoalQuantity) as TotalCoalQuantity FROM Mine GROUP BY MineName ORDER BY TotalCoalQuantity DESC;",1 Which letter has an operator of VeriSign and an AS-number of AS26415?,"CREATE TABLE table_name_45 (letter VARCHAR, operator VARCHAR, as_number VARCHAR);","SELECT letter FROM table_name_45 WHERE operator = ""verisign"" AND as_number = ""as26415"";","SELECT letter FROM table_name_45 WHERE operator = ""verisign"" AND as_number = ""as26415"";",1 Show the percentage of meals in Brazil with more than 1000 calories.,"CREATE TABLE meals (user_id INT, meal_date DATE, calories INT); CREATE TABLE users (user_id INT, country VARCHAR(255)); ",SELECT 100.0 * COUNT(*) / (SELECT COUNT(*) FROM meals JOIN users ON meals.user_id = users.user_id WHERE users.country = 'Brazil') as pct_meals FROM meals JOIN users ON meals.user_id = users.user_id WHERE users.country = 'Brazil' AND calories > 1000;,SELECT (COUNT(*) FILTER (WHERE calories > 1000)) * 100.0 / COUNT(*) FROM meals JOIN users ON meals.user_id = users.user_id WHERE users.country = 'Brazil';,0 Which providers use version 2008?,"CREATE TABLE table_14465871_2 (provider VARCHAR, version VARCHAR);","SELECT provider FROM table_14465871_2 WHERE version = ""2008"";",SELECT provider FROM table_14465871_2 WHERE version = 2008;,0 What is the report for races where Will Power had both pole position and fastest lap?,"CREATE TABLE table_16099880_5 (report VARCHAR, pole_position VARCHAR, fastest_lap VARCHAR);","SELECT report FROM table_16099880_5 WHERE pole_position = ""Will Power"" AND fastest_lap = ""Will Power"";","SELECT report FROM table_16099880_5 WHERE pole_position = ""Will Power"" AND fastest_lap = ""Will Power"";",1 What is the maximum installed capacity (in MW) for a solar energy project in the state of Arizona?,"CREATE TABLE Projects (project_id INT, project_name VARCHAR(100), state VARCHAR(100), project_type VARCHAR(100), installed_capacity FLOAT);",SELECT MAX(installed_capacity) FROM Projects WHERE state = 'Arizona' AND project_type = 'Solar';,SELECT MAX(installed_capacity) FROM Projects WHERE state = 'Arizona' AND project_type = 'Solar';,1 "What is the earliest report date for each committee in the ""committee_reports"" table?","CREATE TABLE committee (id INT, name TEXT);CREATE TABLE committee_reports (committee_id INT, report_date DATE, title TEXT);","SELECT committee.name, MIN(committee_reports.report_date) FROM committee JOIN committee_reports ON committee.id = committee_reports.committee_id GROUP BY committee.name;","SELECT committee_id, MIN(report_date) FROM committee_reports GROUP BY committee_id;",0 What is the Venue for Goal number 1?,"CREATE TABLE table_name_24 (venue VARCHAR, goal VARCHAR);",SELECT venue FROM table_name_24 WHERE goal = 1;,SELECT venue FROM table_name_24 WHERE goal = 1;,1 Which Long has redshirt for its Avg/G?,"CREATE TABLE table_name_97 (long VARCHAR, avg_g VARCHAR);","SELECT long FROM table_name_97 WHERE avg_g = ""redshirt"";","SELECT long FROM table_name_97 WHERE avg_g = ""redshirt"";",1 What is the day 1 when day 5 is math?,"CREATE TABLE table_name_35 (day_1 VARCHAR, day_5 VARCHAR);","SELECT day_1 FROM table_name_35 WHERE day_5 = ""math"";","SELECT day_1 FROM table_name_35 WHERE day_5 = ""math"";",1 What was the score in the game on November 21? ,"CREATE TABLE table_27733909_5 (score VARCHAR, date VARCHAR);","SELECT score FROM table_27733909_5 WHERE date = ""November 21"";","SELECT score FROM table_27733909_5 WHERE date = ""November 21"";",1 Update the rating of all lipsticks with the name 'Ruby Red' to 4.8.,"CREATE TABLE products (product_id INT, name VARCHAR(255), category VARCHAR(255), rating FLOAT);",UPDATE products SET rating = 4.8 WHERE name = 'Ruby Red' AND category = 'lipstick';,UPDATE products SET rating = 4.8 WHERE name = 'Ruby Red';,0 List all cybersecurity incidents with their corresponding threat level in descending order by date.,"CREATE TABLE CyberIncidents (IncidentID int, IncidentDate date, ThreatLevel varchar(50)); ","SELECT * FROM CyberIncidents ORDER BY IncidentDate DESC, ThreatLevel DESC;","SELECT IncidentID, IncidentDate, ThreatLevel FROM CyberIncidents ORDER BY IncidentDate DESC;",0 "Calculate the average claim amount for policyholders with home insurance policies, excluding those who have also made car insurance claims.","CREATE TABLE home_insurance (policyholder_name TEXT, claim_amount INTEGER); CREATE TABLE car_insurance (policyholder_name TEXT); ",SELECT AVG(claim_amount) FROM home_insurance WHERE policyholder_name NOT IN (SELECT policyholder_name FROM car_insurance);,SELECT AVG(claim_amount) FROM home_insurance JOIN car_insurance ON home_insurance.policyholder_name = car_insurance.policyholder_name;,0 What is the average age of clients in the 'Texas' region?,"CREATE TABLE clients (id INT, name TEXT, age INT, region TEXT); ",SELECT AVG(age) FROM clients WHERE region = 'Texas';,SELECT AVG(age) FROM clients WHERE region = 'Texas';,1 What is the highest Gold that has a Silver less than 7 and Bronze less than 0,"CREATE TABLE table_name_17 (gold INTEGER, silver VARCHAR, bronze VARCHAR);",SELECT MAX(gold) FROM table_name_17 WHERE silver < 7 AND bronze < 0;,SELECT MAX(gold) FROM table_name_17 WHERE silver 7 AND bronze 0;,0 What is the total number of voyages and total cargo weight for vessels with 'HMM' prefix in the Arctic Ocean in 2019?,"CREATE TABLE Vessels (ID INT, Name TEXT, Voyages INT, Cargo_Weight INT, Prefix TEXT, Year INT);CREATE VIEW Arctic_Ocean_Vessels AS SELECT * FROM Vessels WHERE Region = 'Arctic Ocean';","SELECT SUM(Voyages), SUM(Cargo_Weight) FROM Arctic_Ocean_Vessels WHERE Prefix = 'HMM' AND Year = 2019;","SELECT SUM(Voyages) as Total_Voyages, SUM(Cargo_Weight) as Total_Cargo_Weight FROM Arctic_Ocean_Vessels WHERE Prefix = 'HMM' AND Year = 2019;",0 Update the percentage of 'organic_cotton' use in 'India' to 76.5,"CREATE TABLE organic_materials (country VARCHAR(50), fashion_production_sector VARCHAR(50), organic_material_type VARCHAR(50), percentage_use FLOAT); ",UPDATE organic_materials SET percentage_use = 76.5 WHERE country = 'India' AND organic_material_type = 'organic_cotton';,UPDATE organic_materials SET percentage_use = 76.5 WHERE country = 'India' AND organic_material_type = 'organic_cotton';,1 Which Date has a Venue of lake oval?,"CREATE TABLE table_name_36 (date VARCHAR, venue VARCHAR);","SELECT date FROM table_name_36 WHERE venue = ""lake oval"";","SELECT date FROM table_name_36 WHERE venue = ""lake oval"";",1 How many points were there when the try bonus was 2?,"CREATE TABLE table_name_35 (points VARCHAR, try_bonus VARCHAR);","SELECT points FROM table_name_35 WHERE try_bonus = ""2"";","SELECT points FROM table_name_35 WHERE try_bonus = ""2"";",1 Identify the number of projects with a focus on diversity and inclusion that were funded in the last year.,"CREATE TABLE projects_funding (id INT, name TEXT, focus TEXT, funding_date DATE); ","SELECT COUNT(*) FROM projects_funding WHERE focus = 'Diversity and Inclusion' AND funding_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT COUNT(*) FROM projects_funding WHERE focus = 'Diversity and Inclusion' AND funding_date >= DATEADD(year, -1, GETDATE());",0 What was the average rare earth element production in 2020?,"CREATE TABLE production (country VARCHAR(255), year INT, amount INT); ",SELECT AVG(amount) AS avg_production FROM production WHERE year = 2020;,SELECT AVG(amount) FROM production WHERE year = 2020;,0 display all the information for all employees who have the letters D or S in their first name and also arrange the result in descending order by salary.,"CREATE TABLE employees (salary VARCHAR, first_name VARCHAR);",SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC;,"SELECT salary FROM employees WHERE first_name IN ('D', 'S') GROUP BY salary ORDER BY salary DESC;",0 How many strongs transliteration of the english spelling of the work jehojakin?,"CREATE TABLE table_1242447_1 (strongs_transliteration VARCHAR, english_spelling VARCHAR);","SELECT COUNT(strongs_transliteration) FROM table_1242447_1 WHERE english_spelling = ""Jehojakin"";","SELECT strongs_transliteration FROM table_1242447_1 WHERE english_spelling = ""Jehojakin"";",0 "What is the final result of the game that was played on October 8, 2000?","CREATE TABLE table_name_70 (result VARCHAR, date VARCHAR);","SELECT result FROM table_name_70 WHERE date = ""october 8, 2000"";","SELECT result FROM table_name_70 WHERE date = ""october 8, 2000"";",1 Find the full name of employee who supported the most number of customers.,"CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, id VARCHAR); CREATE TABLE customers (support_rep_id VARCHAR);","SELECT T1.first_name, T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1;","SELECT T1.first_name, T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1;",1 "Which Wins is the highest one that has a Pos of 2nd, and Poles larger than 2?","CREATE TABLE table_name_3 (wins INTEGER, pos VARCHAR, poles VARCHAR);","SELECT MAX(wins) FROM table_name_3 WHERE pos = ""2nd"" AND poles > 2;","SELECT MAX(wins) FROM table_name_3 WHERE pos = ""2nd"" AND poles > 2;",1 "List the open date of open year of the shop named ""Apple"".","CREATE TABLE shop (Open_Date VARCHAR, Open_Year VARCHAR, Shop_Name VARCHAR);","SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = ""Apple"";","SELECT Open_Date FROM shop WHERE Open_Year = ""Open"" AND Shop_Name = ""Apple"";",0 What is the minimum salary in the Logistics department?,"CREATE TABLE Employees (id INT, name VARCHAR(50), department VARCHAR(50), salary DECIMAL(10,2));",SELECT MIN(salary) FROM Employees WHERE department = 'Logistics';,SELECT MIN(salary) FROM Employees WHERE department = 'Logistics';,1 What are week 4 results? ,"CREATE TABLE table_14608759_1 (result VARCHAR, week VARCHAR);",SELECT result FROM table_14608759_1 WHERE week = 4;,SELECT result FROM table_14608759_1 WHERE week = 4;,1 "What is the total number of publications by faculty members in the last 3 years, grouped by department?","CREATE TABLE publications(id INT, author VARCHAR(50), department VARCHAR(50), pub_date DATE); ","SELECT department, COUNT(*) FROM publications WHERE pub_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR) GROUP BY department;","SELECT department, COUNT(*) FROM publications WHERE pub_date >= DATEADD(year, -3, GETDATE()) GROUP BY department;",0 What is the maximum number of people in a single space mission?,"CREATE TABLE Space_Mission_Table (id INT, mission_name VARCHAR(100), crew_size INT);",SELECT MAX(CREW_SIZE) FROM Space_Mission_Table;,SELECT MAX(crew_size) FROM Space_Mission_Table;,0 "What year has a nomination title of ""sangrador""?","CREATE TABLE table_name_84 (year__ceremony_ VARCHAR, film_title_used_in_nomination VARCHAR);","SELECT year__ceremony_ FROM table_name_84 WHERE film_title_used_in_nomination = ""sangrador"";","SELECT year__ceremony_ FROM table_name_84 WHERE film_title_used_in_nomination = ""sangrador"";",1 Where did Steve Gotsche win?,"CREATE TABLE table_name_26 (venue VARCHAR, champion VARCHAR);","SELECT venue FROM table_name_26 WHERE champion = ""steve gotsche"";","SELECT venue FROM table_name_26 WHERE champion = ""steve gotsche"";",1 What date shows the Outcome of winner against nikola fraňková carmen klaschka?,"CREATE TABLE table_name_54 (date VARCHAR, outcome VARCHAR, opponents_in_the_final VARCHAR);","SELECT date FROM table_name_54 WHERE outcome = ""winner"" AND opponents_in_the_final = ""nikola fraňková carmen klaschka"";","SELECT date FROM table_name_54 WHERE outcome = ""winner"" AND opponents_in_the_final = ""nikola fraková carmen klaschka"";",0 What is the total revenue for 'Seafood' dishes in February 2022?,"CREATE TABLE Orders (id INT, order_date DATE, menu_item VARCHAR(50), price DECIMAL(5,2), quantity INT);",SELECT SUM(price * quantity) FROM Orders WHERE menu_item IN (SELECT item_name FROM Menus WHERE restaurant_name = 'Seafood Shack' AND category = 'Seafood') AND MONTH(order_date) = 2 AND YEAR(order_date) = 2022;,SELECT SUM(price * quantity) FROM Orders WHERE menu_item = 'Seafood' AND order_date BETWEEN '2022-02-01' AND '2022-02-28';,0 How many incumbents were first elected in 1797 with the candidates abram trigg (dr)?,"CREATE TABLE table_2668393_18 (incumbent VARCHAR, first_elected VARCHAR, candidates VARCHAR);","SELECT COUNT(incumbent) FROM table_2668393_18 WHERE first_elected = ""1797"" AND candidates = ""Abram Trigg (DR)"";","SELECT COUNT(incumbent) FROM table_2668393_18 WHERE first_elected = 1797 AND candidates = ""Abram Trigg (DR)"";",0 Calculate the percentage of destinations in each region with a sustainability score above 4.5.,"CREATE TABLE destinations (destination TEXT, region TEXT, sustainability_score FLOAT); ","SELECT region, 100.0 * AVG(CASE WHEN sustainability_score > 4.5 THEN 1.0 ELSE 0.0 END) OVER (PARTITION BY region) AS pct_sustainability_score FROM destinations;","SELECT region, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM destinations WHERE sustainability_score > 4.5) FROM destinations GROUP BY region;",0 What was the sample size for the poll featuring Republican Ron Paul?,"CREATE TABLE table_name_80 (sample_size VARCHAR, republican VARCHAR);","SELECT sample_size FROM table_name_80 WHERE republican = ""ron paul"";","SELECT sample_size FROM table_name_80 WHERE republican = ""ron paul"";",1 What day was the record 14-27?,"CREATE TABLE table_23274514_6 (date VARCHAR, record VARCHAR);","SELECT date FROM table_23274514_6 WHERE record = ""14-27"";","SELECT date FROM table_23274514_6 WHERE record = ""14-27"";",1 Who had the most assists and how many did they have on October 5? ,"CREATE TABLE table_27704187_2 (high_assists VARCHAR, date VARCHAR);","SELECT high_assists FROM table_27704187_2 WHERE date = ""October 5"";","SELECT high_assists FROM table_27704187_2 WHERE date = ""October 5"";",1 "Let's say position was linebacker with a pick number less than 5, what was the highest round?","CREATE TABLE table_name_61 (round INTEGER, position VARCHAR, pick__number VARCHAR);","SELECT MAX(round) FROM table_name_61 WHERE position = ""linebacker"" AND pick__number > 5;","SELECT MAX(round) FROM table_name_61 WHERE position = ""linebacker"" AND pick__number 5;",0 What is the total impact investment in climate change?,"CREATE TABLE organizations (org_id INT, org_name VARCHAR(50)); CREATE TABLE impact_investments",SUM(i.investment_amount) AS total_investment,SELECT SUM(impact_investments) FROM impact_investments;,0 What is the total cost of all projects in the 'Water_Distribution' table?,"CREATE TABLE Water_Distribution (project_id INT, project_name VARCHAR(50), location VARCHAR(50), total_cost FLOAT); ",SELECT SUM(total_cost) FROM Water_Distribution;,SELECT SUM(total_cost) FROM Water_Distribution;,1 Which countries have the highest number of museum visitors?,"CREATE TABLE MuseumVisitors (visitor_id INT, museum_id INT, country VARCHAR(50)); ","SELECT country, COUNT(*) as visitor_count FROM MuseumVisitors GROUP BY country ORDER BY visitor_count DESC;","SELECT country, COUNT(*) as visitor_count FROM MuseumVisitors GROUP BY country ORDER BY visitor_count DESC LIMIT 1;",0 What is the total number of art pieces in museums that are not part of a permanent collection?,"CREATE TABLE Museums (MuseumID INT, Name TEXT, PermanentCollection BOOLEAN); ",SELECT COUNT(*) FROM Museums WHERE PermanentCollection = FALSE;,SELECT COUNT(*) FROM Museums WHERE PermanentCollection = FALSE;,1 "What was the earliest year where USL PDL played in 3rd, Southeast season?","CREATE TABLE table_2402864_1 (year INTEGER, regular_season VARCHAR, league VARCHAR);","SELECT MIN(year) FROM table_2402864_1 WHERE regular_season = ""3rd, Southeast"" AND league = ""USL PDL"";","SELECT MIN(year) FROM table_2402864_1 WHERE regular_season = ""3rd, Southeast"" AND league = ""USL PDL"";",1 What game ended with a final score of 126-108?,"CREATE TABLE table_name_16 (game INTEGER, score VARCHAR);","SELECT MAX(game) FROM table_name_16 WHERE score = ""126-108"";","SELECT SUM(game) FROM table_name_16 WHERE score = ""126-108"";",0 What date did the episode written by Mitch Watson and directed by Curt Geda originally air in the U.S.?,"CREATE TABLE table_28511558_2 (original_air_date__us_ VARCHAR, directed_by VARCHAR, written_by VARCHAR);","SELECT original_air_date__us_ FROM table_28511558_2 WHERE directed_by = ""Curt Geda"" AND written_by = ""Mitch Watson"";","SELECT original_air_date__us_ FROM table_28511558_2 WHERE directed_by = ""Curt Geda"" AND written_by = ""Mitch Watson"";",1 "What is the average mental health score of students in the 'Fall 2021' semester, grouped by their 'Education Level'?","CREATE TABLE Students (StudentID INT, EducationLevel VARCHAR(20), MentalHealthScore INT, Semester VARCHAR(10)); ","SELECT EducationLevel, AVG(MentalHealthScore) FROM Students WHERE Semester = 'Fall 2021' GROUP BY EducationLevel;","SELECT EducationLevel, AVG(MentalHealthScore) FROM Students WHERE Semester = 'Fall 2021' GROUP BY EducationLevel;",1 Name the number of artists for panel points being 5,"CREATE TABLE table_21378339_5 (artist VARCHAR, panel_points VARCHAR);",SELECT COUNT(artist) FROM table_21378339_5 WHERE panel_points = 5;,SELECT COUNT(artist) FROM table_21378339_5 WHERE panel_points = 5;,1 Delete all records of funiculars in the 'Istanbul' region with a fare less than 5.00.,"CREATE TABLE funiculars (id INT, region VARCHAR(20), fare DECIMAL(5,2)); ",DELETE FROM funiculars WHERE region = 'Istanbul' AND fare < 5.00;,DELETE FROM funiculars WHERE region = 'Istanbul' AND fare 5.00;,0 What was the percentage for T. Papadopoulos when D. Christofias was 28.4%?,"CREATE TABLE table_name_48 (t_papadopoulos VARCHAR, d_christofias VARCHAR);","SELECT t_papadopoulos FROM table_name_48 WHERE d_christofias = ""28.4%"";","SELECT t_papadopoulos FROM table_name_48 WHERE d_christofias = ""28.4%"";",1 "What tournament or series was played in England, when games played was 4, points for were 121?","CREATE TABLE table_name_15 (tournament_or_series VARCHAR, points_for___tests__ VARCHAR, played_in VARCHAR, games_played___tests__ VARCHAR);","SELECT tournament_or_series FROM table_name_15 WHERE played_in = ""england"" AND games_played___tests__ = ""4"" AND points_for___tests__ = ""121"";","SELECT tournament_or_series FROM table_name_15 WHERE played_in = ""england"" AND games_played___tests__ = ""4"" AND points_for___tests__ = 121;",0 What school does the Blue Raiders belong to?,"CREATE TABLE table_name_16 (school VARCHAR, team VARCHAR);","SELECT school FROM table_name_16 WHERE team = ""blue raiders"";","SELECT school FROM table_name_16 WHERE team = ""blue raiders"";",1 What is the lowest rank of a swimmer named Elizabeth Van Welie with a lane larger than 5?,"CREATE TABLE table_name_85 (rank INTEGER, lane VARCHAR, name VARCHAR);","SELECT MIN(rank) FROM table_name_85 WHERE lane > 5 AND name = ""elizabeth van welie"";","SELECT MIN(rank) FROM table_name_85 WHERE lane > 5 AND name = ""elizabeth van welie"";",1 What is the average number of natural disasters reported in each region per year?,"CREATE TABLE disasters (id INT, type TEXT, location TEXT, year INT); ","SELECT AVG(total_disasters) FROM (SELECT location, COUNT(*) AS total_disasters FROM disasters GROUP BY location, year) AS disaster_counts GROUP BY location;","SELECT location, AVG(COUNT(*)) as avg_disasters FROM disasters GROUP BY location, year;",0 What is the total research grant amount awarded to professors in the Biology department who have published at least one paper?,"CREATE TABLE department (name VARCHAR(255), id INT);CREATE TABLE professor (name VARCHAR(255), department_id INT, grant_amount DECIMAL(10,2), publication_year INT);",SELECT SUM(grant_amount) FROM professor WHERE department_id IN (SELECT id FROM department WHERE name = 'Biology') AND publication_year IS NOT NULL;,SELECT SUM(grant_amount) FROM professor WHERE department_id = (SELECT id FROM department WHERE name = 'Biology') AND publication_year >= YEAR(CURRENT_DATE);,0 What is the total number of polar bears in each Arctic region?,"CREATE TABLE PolarBears(region VARCHAR(255), population_size FLOAT);","SELECT region, SUM(population_size) FROM PolarBears GROUP BY region;","SELECT region, SUM(population_size) FROM PolarBears GROUP BY region;",1 What is the average calorie count for organic meals served in restaurants located in California?,"CREATE TABLE Restaurants (RestaurantID int, Name varchar(50), Location varchar(50)); CREATE TABLE Meals (MealID int, Name varchar(50), Type varchar(20), Calories int); ",SELECT AVG(Meals.Calories) FROM Meals INNER JOIN Restaurants ON Meals.Name = Restaurants.Name WHERE Restaurants.Location = 'California' AND Meals.Type = 'Organic';,SELECT AVG(Calories) FROM Meals INNER JOIN Restaurants ON Meals.RestaurantID = Restaurants.RestaurantID WHERE Restaurants.Location = 'California' AND Meals.Type = 'Organic';,0 What was the method of resolution for the fight at cage warriors 39?,"CREATE TABLE table_name_87 (method VARCHAR, event VARCHAR);","SELECT method FROM table_name_87 WHERE event = ""cage warriors 39"";","SELECT method FROM table_name_87 WHERE event = ""cage warriors 39"";",1 Which team has Pick 13 in Round 2?,"CREATE TABLE table_name_88 (team VARCHAR, round VARCHAR, pick VARCHAR);","SELECT team FROM table_name_88 WHERE round = ""2"" AND pick = ""13"";",SELECT team FROM table_name_88 WHERE round = 2 AND pick = 13;,0 What are the total expenses for restorative justice programs in the state of New York?,"CREATE TABLE restorative_justice_programs (program_id INT, program_name TEXT, state TEXT, expenses DECIMAL(10,2)); ",SELECT SUM(expenses) FROM restorative_justice_programs WHERE state = 'New York';,SELECT SUM(expenses) FROM restorative_justice_programs WHERE state = 'New York';,1 Calculate the total water usage in cubic meters for the years 2018 and 2021,"CREATE TABLE water_usage (year INT, usage FLOAT); ","SELECT SUM(usage) FROM water_usage WHERE year IN (2018, 2021);","SELECT SUM(usage) FROM water_usage WHERE year IN (2018, 2021);",1 "Find the number of AI safety incidents and their impact level, partitioned by incident location, ordered by impact level in ascending order?","CREATE TABLE ai_safety_incidents_location (incident_id INT, incident_location VARCHAR(50), impact_level DECIMAL(3,2)); ","SELECT incident_location, COUNT(*) as num_incidents, MIN(impact_level) as min_impact_level FROM ai_safety_incidents_location GROUP BY incident_location ORDER BY min_impact_level ASC;","SELECT incident_location, COUNT(*), impact_level FROM ai_safety_incidents_location ORDER BY impact_level ASC;",0 What is the healthcare provider cultural competency training completion rate by region?,"CREATE TABLE provider_training (provider_id INT, provider_name VARCHAR(50), region_id INT, training_completion DATE);","SELECT region_id, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM provider_training WHERE region_id = pt.region_id)) as completion_rate FROM provider_training pt WHERE training_completion IS NOT NULL GROUP BY region_id;","SELECT region_id, COUNT(*) as completion_rate FROM provider_training GROUP BY region_id;",0 Delete all threat intelligence indicators related to the APT29 group from the last 6 months.,"CREATE TABLE threat_intelligence (indicator_id INT, indicator_value VARCHAR(255), group_name VARCHAR(255), last_updated TIMESTAMP);",DELETE FROM threat_intelligence WHERE group_name = 'APT29' AND last_updated >= NOW() - INTERVAL '6 months';,"DELETE FROM threat_intelligence WHERE group_name = 'APT29' AND last_updated >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 6 MONTH);",0 Identify the bridges in the transportation division that require maintenance in the next 6 months and display their maintenance schedule.,"CREATE TABLE bridges (id INT, name VARCHAR(50), division VARCHAR(50), maintenance_date DATE); ","SELECT name, maintenance_date FROM bridges WHERE division = 'Transportation' AND maintenance_date BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 6 MONTH);","SELECT name, maintenance_date FROM bridges WHERE division = 'Transportation' AND maintenance_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) AND CURRENT_DATE;",0 Calculate the average miles per gallon for electric vehicles in the 'ElectricVehicleAdoption' table.,"CREATE TABLE ElectricVehicleAdoption (Vehicle VARCHAR(255), MPG INT); ",SELECT AVG(MPG) as AverageMPG FROM ElectricVehicleAdoption WHERE Vehicle LIKE '%Tesla%' OR Vehicle LIKE '%Nissan%' OR Vehicle LIKE '%Chevrolet%';,SELECT AVG(MPG) FROM ElectricVehicleAdoption;,0 Who was promoted to the league when Coventry was relegated to the league?,"CREATE TABLE table_23927423_4 (promoted_to_league VARCHAR, relegated_to_league VARCHAR);","SELECT promoted_to_league FROM table_23927423_4 WHERE relegated_to_league = ""Coventry"";","SELECT promoted_to_league FROM table_23927423_4 WHERE relegated_to_league = ""Coventry"";",1 "Update team names in the ""teams"" table","CREATE TABLE teams (id INT PRIMARY KEY, name VARCHAR(50), league VARCHAR(50), founded DATE);",UPDATE teams SET name = 'Lakers' WHERE id = 1;,UPDATE teams SET name = name WHERE id = 1;,0 What is the speed of model x5560?,"CREATE TABLE table_269920_17 (speed__ghz_ VARCHAR, model VARCHAR);","SELECT speed__ghz_ FROM table_269920_17 WHERE model = ""X5560"";","SELECT speed__ghz_ FROM table_269920_17 WHERE model = ""X5560"";",1 How many users are from Germany in the Workout table?,"CREATE TABLE Workout (user_id INT, workout_duration INT, country VARCHAR(50)); ",SELECT COUNT(*) FROM Workout WHERE country = 'Germany';,SELECT COUNT(*) FROM Workout WHERE country = 'Germany';,1 "How much was the prize money for rwe-sporthalle, mülheim ?","CREATE TABLE table_18828487_1 (prize_fund VARCHAR, venue VARCHAR);","SELECT prize_fund FROM table_18828487_1 WHERE venue = ""RWE-Sporthalle, Mülheim"";","SELECT prize_fund FROM table_18828487_1 WHERE venue = ""Rwe-Sporthalle, Mülheim"";",0 What was the average program impact score for programs focused on diversity and inclusion in 2021?,"CREATE TABLE ProgramImpact (program_id INT, program_focus VARCHAR(50), impact_score DECIMAL(10,2), program_date DATE); ",SELECT AVG(impact_score) AS avg_impact_score FROM ProgramImpact WHERE program_focus = 'Diversity and Inclusion' AND program_date BETWEEN '2021-01-01' AND '2021-12-31';,SELECT AVG(impact_score) FROM ProgramImpact WHERE program_focus = 'Diversity and Inclusion' AND YEAR(program_date) = 2021;,0 What year does robin buck go 44 laps?,"CREATE TABLE table_name_78 (year VARCHAR, distance_duration VARCHAR, driver VARCHAR);","SELECT year FROM table_name_78 WHERE distance_duration = ""44 laps"" AND driver = ""robin buck"";","SELECT year FROM table_name_78 WHERE distance_duration = ""44 laps"" AND driver = ""robin buck"";",1 What was the date of the game in week 14?,"CREATE TABLE table_13023925_2 (date VARCHAR, week VARCHAR);",SELECT date FROM table_13023925_2 WHERE week = 14;,SELECT date FROM table_13023925_2 WHERE week = 14;,1 What is the maximum depth of all marine trenches?,"CREATE TABLE marine_trenches (id INT, name TEXT, depth FLOAT); ",SELECT MAX(depth) FROM marine_trenches;,SELECT MAX(depth) FROM marine_trenches;,1 "What is Shot Pct., when Stolen Ends is 2?","CREATE TABLE table_name_67 (shot_pct VARCHAR, stolen_ends VARCHAR);",SELECT shot_pct FROM table_name_67 WHERE stolen_ends = 2;,SELECT shot_pct FROM table_name_67 WHERE stolen_ends = 2;,1 What is the name of the top-rated virtual tour in Paris?,"CREATE TABLE tours (id INT, name TEXT, city TEXT, rating FLOAT); ",SELECT name FROM tours WHERE city = 'Paris' AND rating = (SELECT MAX(rating) FROM tours WHERE city = 'Paris');,SELECT name FROM tours WHERE city = 'Paris' ORDER BY rating DESC LIMIT 1;,0 What is the total quantity of sustainable materials used in production by month?,"CREATE TABLE production (item_name VARCHAR(255), material VARCHAR(255), quantity INT, production_date DATE); ","SELECT material, SUM(quantity), DATE_FORMAT(production_date, '%Y-%m') as Month FROM production GROUP BY material, Month ORDER BY Month ASC;","SELECT DATE_FORMAT(production_date, '%Y-%m') AS month, SUM(quantity) AS total_quantity FROM production GROUP BY month;",0 "Delete records of citizens who have not provided feedback in the last 2 years from the ""citizen_feedback"" table","CREATE TABLE citizen_feedback (citizen_id INT, feedback TEXT, feedback_date DATE);",DELETE FROM citizen_feedback WHERE feedback_date < (SELECT DATE(NOW()) - INTERVAL 2 YEAR);,"DELETE FROM citizen_feedback WHERE feedback IS NULL AND feedback_date DATE_SUB(CURRENT_DATE, INTERVAL 2 YEAR);",0 Which player who played for the Rockets for the years 1986-92?,"CREATE TABLE table_11734041_9 (player VARCHAR, years_for_rockets VARCHAR);","SELECT player FROM table_11734041_9 WHERE years_for_rockets = ""1986-92"";","SELECT player FROM table_11734041_9 WHERE years_for_rockets = ""1986-92"";",1 "What is the percentage of sustainable material used by each brand, based on the total quantity of sustainable material used by all brands?","CREATE TABLE Brands (BrandID INT, BrandName VARCHAR(50)); CREATE TABLE Materials (MaterialID INT, MaterialName VARCHAR(50), BrandID INT, QuantityUsed INT, TotalQuantity INT); ","SELECT BrandName, (SUM(QuantityUsed) * 100.0 / (SELECT SUM(QuantityUsed) FROM Materials WHERE MaterialName IN ('Organic Cotton', 'Recycled Polyester', 'Recycled Cotton', 'Hemp'))) AS Percentage FROM Materials GROUP BY BrandName;","SELECT Brands.BrandName, SUM(Materials.QuantityUsed) * 100.0 / SUM(Materials.TotalQuantity) as Percentage FROM Brands INNER JOIN Materials ON Brands.BrandID = Materials.BrandID GROUP BY Brands.BrandName;",0 List all mobile subscribers in the Middle East who have not used their data services in the last month.,"CREATE TABLE mobile_subscribers (id INT, region VARCHAR(20), data_usage INT, usage_date DATE);","SELECT m.id, m.region, m.data_usage, m.usage_date FROM mobile_subscribers m LEFT JOIN (SELECT subscriber_id FROM mobile_subscribers WHERE usage_date > DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH)) d ON m.id = d.subscriber_id WHERE m.region = 'Middle East' AND d.subscriber_id IS NULL;","SELECT * FROM mobile_subscribers WHERE region = 'Middle East' AND data_usage IS NULL AND usage_date >= DATEADD(month, -1, GETDATE());",0 Insert a new investor 'Investor P' and their investments in Org 17 (focused on Climate Change) with an investment_amount of 70000 and Org 18 (focused on Social Equality) with an investment_amount of 80000.,"CREATE TABLE investments (investment_id INT, investor_id INT, org_id INT, investment_amount INT); CREATE TABLE investors (investor_id INT, investor_name TEXT); CREATE TABLE organizations (org_id INT, org_name TEXT, focus_topic TEXT); ","INSERT INTO investments (investment_id, investor_id, org_id, investment_amount) VALUES (6, 4, 17, 70000), (7, 4, 18, 80000); INSERT INTO investors (investor_id, investor_name) VALUES (4, 'Investor P');","INSERT INTO investments (investment_id, investor_id, investor_name) VALUES (17, 'Investor P', 70000); INSERT INTO organizations (org_id, org_name, focus_topic) VALUES (17, 'Climate Change', 'Social Equality'); INSERT INTO investors (investor_id, investor_name) VALUES (17, 'Investor P', 70000);",0 How many episodes received rating of 8.2?,"CREATE TABLE table_24910733_2 (episode VARCHAR, rating VARCHAR);","SELECT COUNT(episode) FROM table_24910733_2 WHERE rating = ""8.2"";","SELECT COUNT(episode) FROM table_24910733_2 WHERE rating = ""8.2"";",1 "What was the Indians record during the game that had 19,823 fans attending?","CREATE TABLE table_name_75 (record VARCHAR, attendance VARCHAR);","SELECT record FROM table_name_75 WHERE attendance = ""19,823"";","SELECT record FROM table_name_75 WHERE attendance = ""19,823"";",1 Which season did the Burnaby Lakers have less than 16 points and less than 18 losses?,"CREATE TABLE table_name_19 (season VARCHAR, points VARCHAR, losses VARCHAR);",SELECT season FROM table_name_19 WHERE points < 16 AND losses = 18;,SELECT season FROM table_name_19 WHERE points 16 AND losses 18;,0 How many counties are there?,CREATE TABLE county_public_safety (Id VARCHAR);,SELECT COUNT(*) FROM county_public_safety;,SELECT COUNT(*) FROM county_public_safety;,1 What is the total amount donated by donors in the healthcare industry in the year 2020?,"CREATE TABLE Donors (DonorID INT, DonorName TEXT, Industry TEXT); CREATE TABLE Donations (DonationID INT, DonorID INT, DonationAmount INT, DonationYear INT); ",SELECT SUM(DonationAmount) FROM Donations JOIN Donors ON Donations.DonorID = Donors.DonorID WHERE Donors.Industry = 'Healthcare' AND DonationYear = 2020;,SELECT SUM(DonationAmount) FROM Donations JOIN Donors ON Donations.DonorID = Donors.DonorID WHERE Donors.Industry = 'Healthcare' AND Donations.DonationYear = 2020;,0 What is the average quantity of rice produced annually per farmer in the 'agriculture' schema?,"CREATE SCHEMA agriculture; CREATE TABLE rice_farmers (farmer_id INT, rice_quantity INT); ",SELECT AVG(rice_quantity) FROM agriculture.rice_farmers;,"SELECT farmer_id, AVG(rice_quantity) FROM agriculture.rice_farmers GROUP BY farmer_id;",0 "What is the maximum number of games when the season is more recent than 2001 and the average is less than 10,838?","CREATE TABLE table_name_90 (games INTEGER, season VARCHAR, average VARCHAR);",SELECT MAX(games) FROM table_name_90 WHERE season > 2001 AND average < 10 OFFSET 838;,SELECT MAX(games) FROM table_name_90 WHERE season > 2001 AND average 10 OFFSET 838;,0 What is the total biomass of farmed fish in each country's aquatic farms?,"CREATE TABLE aquatic_farms (id INT, country VARCHAR(50), biomass FLOAT); ","SELECT country, SUM(biomass) as total_biomass FROM aquatic_farms GROUP BY country;","SELECT country, SUM(biomass) FROM aquatic_farms GROUP BY country;",0 Which player did the green bay packers pick?,"CREATE TABLE table_2508633_5 (player VARCHAR, nfl_team VARCHAR);","SELECT player FROM table_2508633_5 WHERE nfl_team = ""Green Bay Packers"";","SELECT player FROM table_2508633_5 WHERE nfl_team = ""Green Bay Packers"";",1 Who was the home team when the Tie no was 7?,"CREATE TABLE table_name_60 (home_team VARCHAR, tie_no VARCHAR);","SELECT home_team FROM table_name_60 WHERE tie_no = ""7"";","SELECT home_team FROM table_name_60 WHERE tie_no = ""7"";",1 What is the average household size in each city in the state of California?,"CREATE TABLE households (id INT, city VARCHAR(50), state VARCHAR(50), size INT); ","SELECT state, city, AVG(size) as avg_size FROM households WHERE state = 'California' GROUP BY state, city;","SELECT city, AVG(size) FROM households WHERE state = 'California' GROUP BY city;",0 What's the United States team that played for the Grizzlies in 1995-1996?,"CREATE TABLE table_name_51 (school_club_team VARCHAR, nationality VARCHAR, years_for_grizzlies VARCHAR);","SELECT school_club_team FROM table_name_51 WHERE nationality = ""united states"" AND years_for_grizzlies = ""1995-1996"";","SELECT school_club_team FROM table_name_51 WHERE nationality = ""united states"" AND years_for_grizzlies = ""1995-1996"";",1 List the names and total costs of all projects that started before 2018 and were completed after 2016.,"CREATE TABLE Projects ( ProjectID INT, Name VARCHAR(255), StartDate DATE, EndDate DATE, TotalCost DECIMAL(10, 2));","SELECT Name, SUM(TotalCost) as TotalCost FROM Projects WHERE StartDate < '2018-01-01' AND EndDate > '2016-12-31' GROUP BY Name;","SELECT Name, TotalCost FROM Projects WHERE StartDate '2018-01-01' AND EndDate > '2016-12-31';",0 What is the total salary cost for each company in the 'renewable energy' industry?,"CREATE TABLE companies (company_id INT, industry VARCHAR(20));CREATE TABLE worker_salaries (worker_id INT, company_id INT, salary INT);","SELECT companies.industry, SUM(worker_salaries.salary) FROM worker_salaries INNER JOIN companies ON worker_salaries.company_id = companies.company_id WHERE companies.industry = 'renewable energy' GROUP BY companies.industry;","SELECT companies.industry, SUM(worker_salaries.salary) as total_salary_cost FROM companies INNER JOIN worker_salaries ON companies.company_id = worker_salaries.company_id WHERE companies.industry ='renewable energy' GROUP BY companies.industry;",0 "What is the maximum number of emergency calls received in a single day in the ""northside"" neighborhood?","CREATE TABLE daily_emergency_calls (date DATE, neighborhood VARCHAR(20), calls INT); ",SELECT MAX(calls) FROM daily_emergency_calls WHERE neighborhood = 'northside';,SELECT MAX(calls) FROM daily_emergency_calls WHERE neighborhood = 'northside';,1 What is the Label when the album shows cover version vi?,"CREATE TABLE table_name_26 (label VARCHAR, album VARCHAR);","SELECT label FROM table_name_26 WHERE album = ""cover version vi"";","SELECT label FROM table_name_26 WHERE album = ""cover version vi"";",1 "Delete all records from the table ""maritime_safety"" where region is 'South Pacific'","CREATE TABLE maritime_safety (id INT, region VARCHAR(50), incidents INT, date DATE);",DELETE FROM maritime_safety WHERE region = 'South Pacific';,DELETE FROM maritime_safety WHERE region = 'South Pacific';,1 Who did the most high rebounds on April 6?,"CREATE TABLE table_27756314_11 (high_rebounds VARCHAR, date VARCHAR);","SELECT high_rebounds FROM table_27756314_11 WHERE date = ""April 6"";","SELECT high_rebounds FROM table_27756314_11 WHERE date = ""April 6"";",1 "Show all policy records for policy type 'Renters' as separate columns for policy ID, effective date, and a column for each policy type value","CREATE TABLE policy (policy_id INT, policy_type VARCHAR(20), effective_date DATE); ","SELECT policy_id, effective_date, MAX(CASE WHEN policy_type = 'Renters' THEN policy_type END) AS Renters, MAX(CASE WHEN policy_type = 'Personal Auto' THEN policy_type END) AS Personal_Auto FROM policy GROUP BY policy_id, effective_date;","SELECT policy_id, policy_type, effective_date, ROW_NUMBER() OVER (PARTITION BY policy_id ORDER BY effective_date DESC) as row FROM policy WHERE policy_type = 'Renters';",0 Who was the Long Beach constructor?,"CREATE TABLE table_name_24 (constructor VARCHAR, location VARCHAR);","SELECT constructor FROM table_name_24 WHERE location = ""long beach"";","SELECT constructor FROM table_name_24 WHERE location = ""long beach"";",1 What is the average heart rate of members from Australia during evening workouts?,"CREATE TABLE members (id INT, country VARCHAR(50)); CREATE TABLE workouts (id INT, member_id INT, date DATE, heart_rate INT); ",SELECT AVG(heart_rate) FROM members JOIN workouts ON members.id = workouts.member_id WHERE members.country = 'Australia' AND HOUR(workouts.date) BETWEEN 17 AND 23;,SELECT AVG(heart_rate) FROM workouts w JOIN members m ON w.member_id = m.id WHERE m.country = 'Australia' AND w.date BETWEEN '2022-01-01' AND '2022-12-31';,0 Show the member name and hometown who registered a branch in 2016.,"CREATE TABLE member (name VARCHAR, hometown VARCHAR, member_id VARCHAR); CREATE TABLE membership_register_branch (member_id VARCHAR, register_year VARCHAR);","SELECT T2.name, T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016;","SELECT T1.name, T1.hometown FROM member AS T1 JOIN membership_register_branch AS T2 ON T1.member_id = T2.member_id WHERE T2.register_year = 2016;",0 What is the 2010 value with a 2r in 2008 and A in 2013?,CREATE TABLE table_name_83 (Id VARCHAR);,"SELECT 2010 FROM table_name_83 WHERE 2008 = ""2r"" AND 2013 = ""a"";","SELECT 2010 FROM table_name_83 WHERE 2008 = ""2r"" AND 2013 = ""a"";",1 In what venue did the fielding team Sri Lanka play?,"CREATE TABLE table_name_86 (venue VARCHAR, fielding_team VARCHAR);","SELECT venue FROM table_name_86 WHERE fielding_team = ""sri lanka"";","SELECT venue FROM table_name_86 WHERE fielding_team = ""sri lanka"";",1 List the 1st air date for season 12.,"CREATE TABLE table_27437601_2 (original_air_date VARCHAR, no_in_season VARCHAR);",SELECT original_air_date FROM table_27437601_2 WHERE no_in_season = 12;,SELECT original_air_date FROM table_27437601_2 WHERE no_in_season = 12;,1 "Delete records in the ""SmartBuildings"" table where the ""city"" is ""Austin""","CREATE TABLE SmartBuildings (id INT, city VARCHAR(20), type VARCHAR(20), capacity INT); ",DELETE FROM SmartBuildings WHERE city = 'Austin';,DELETE FROM SmartBuildings WHERE city = 'Austin';,1 Determine the maximum and minimum legal catch limits for all marine species in maritime law compliance data.,"CREATE SCHEMA MaritimeLaw;CREATE TABLE SpeciesCatchLimits(species_id INT, species_name TEXT, min_limit INT, max_limit INT);","SELECT species_name, MAX(max_limit) FROM MaritimeLaw.SpeciesCatchLimits; SELECT species_name, MIN(min_limit) FROM MaritimeLaw.SpeciesCatchLimits;","SELECT MAX(max_limit), MIN(min_limit) FROM MaritimeLaw.SpeciesCatchLimits;",0 What is the Date that chicago black hawks has a Record of 2–2?,"CREATE TABLE table_name_5 (date VARCHAR, visitor VARCHAR, record VARCHAR);","SELECT date FROM table_name_5 WHERE visitor = ""chicago black hawks"" AND record = ""2–2"";","SELECT date FROM table_name_5 WHERE visitor = ""chicago black hawks"" AND record = ""2–2"";",1 Open pedagogy courses with enrollment greater than or equal to 400,"CREATE TABLE courses (id INT, name VARCHAR(50), open_pedagogy BOOLEAN, enrollment INT); ",SELECT name FROM courses WHERE open_pedagogy = true AND enrollment >= 400;,SELECT name FROM courses WHERE open_pedagogy = TRUE AND enrollment > 400;,0 What's the First Day Cover Cancellation with Denomination of $0.50 and Date of Issue as 13 June 2005?,"CREATE TABLE table_name_68 (first_day_cover_cancellation VARCHAR, denomination VARCHAR, date_of_issue VARCHAR);","SELECT first_day_cover_cancellation FROM table_name_68 WHERE denomination = ""$0.50"" AND date_of_issue = ""13 june 2005"";","SELECT first_day_cover_cancellation FROM table_name_68 WHERE denomination = ""$0.50"" AND date_of_issue = ""13 june 2005"";",1 Delete all records in the 'ocean_acidification' table where the 'level' is above 8.0,"CREATE TABLE ocean_acidification (id INT, date DATE, location VARCHAR(50), level DECIMAL(3,1)); ",DELETE FROM ocean_acidification WHERE level > 8.0;,DELETE FROM ocean_acidification WHERE level > 8.0;,1 What is the weight of the player from pvk jadran club?,"CREATE TABLE table_name_96 (weight VARCHAR, club VARCHAR);","SELECT weight FROM table_name_96 WHERE club = ""pvk jadran"";","SELECT weight FROM table_name_96 WHERE club = ""pvk jadran"";",1 "Display the number of cases for each client, ordered by the number of cases in descending order.","CREATE TABLE ClientCases (ClientID INT, ClientName VARCHAR(50), CaseID INT, CaseName VARCHAR(50), Billing FLOAT); ","SELECT c.ClientName, COUNT(cc.CaseID) AS CaseCount FROM ClientCases cc JOIN Clients c ON cc.ClientID = c.ClientID GROUP BY c.ClientName ORDER BY CaseCount DESC;","SELECT ClientName, COUNT(*) as CaseCount FROM ClientCases GROUP BY ClientName ORDER BY CaseCount DESC;",0 Which African countries have the highest water usage?,"CREATE TABLE african_countries (country VARCHAR(255), water_usage INT); ","SELECT country, water_usage FROM african_countries ORDER BY water_usage DESC LIMIT 2;","SELECT country, water_usage FROM african_countries ORDER BY water_usage DESC LIMIT 1;",0 How many types of settlement if Neradin?,"CREATE TABLE table_2562572_50 (type VARCHAR, settlement VARCHAR);","SELECT COUNT(type) FROM table_2562572_50 WHERE settlement = ""Neradin"";","SELECT COUNT(type) FROM table_2562572_50 WHERE settlement = ""Neradin"";",1 What was Chris Hanburger's position?,"CREATE TABLE table_name_93 (position VARCHAR, name VARCHAR);","SELECT position FROM table_name_93 WHERE name = ""chris hanburger"";","SELECT position FROM table_name_93 WHERE name = ""chris hanburger"";",1 Find the total number of wells drilled by XYZ Oil & Gas in Texas and California.,"CREATE TABLE wells (company VARCHAR(255), state VARCHAR(255), num_wells INT); ","SELECT SUM(num_wells) FROM wells WHERE company = 'XYZ Oil & Gas' AND state IN ('Texas', 'California');","SELECT SUM(num_wells) FROM wells WHERE company = 'XYZ Oil & Gas' AND state IN ('Texas', 'California');",1 What is the area of Austria's territory in square kilometers?,"CREATE TABLE table_24066938_1 (area_km_2 VARCHAR, member_state VARCHAR);","SELECT area_km_2 FROM table_24066938_1 WHERE member_state = ""Austria"";","SELECT area_km_2 FROM table_24066938_1 WHERE member_state = ""Austria"";",1 Which player weighs 76kg?,"CREATE TABLE table_26847237_2 (player VARCHAR, weight VARCHAR);","SELECT player FROM table_26847237_2 WHERE weight = ""76kg"";","SELECT player FROM table_26847237_2 WHERE weight = ""76kg"";",1 "Which opponent played a 1990 wcq type of game, where the results were 0:0?","CREATE TABLE table_name_99 (opponent VARCHAR, type_of_game VARCHAR, results¹ VARCHAR);","SELECT opponent FROM table_name_99 WHERE type_of_game = ""1990 wcq"" AND results¹ = ""0:0"";","SELECT opponent FROM table_name_99 WHERE type_of_game = ""1990 wcq"" AND results1 = ""0:0"";",0 what is the pick # when the nhl team is montreal canadiens and the college/junior/club team is trois-rivières draveurs (qmjhl)?,"CREATE TABLE table_2679061_2 (pick__number INTEGER, nhl_team VARCHAR, college_junior_club_team VARCHAR);","SELECT MIN(pick__number) FROM table_2679061_2 WHERE nhl_team = ""Montreal Canadiens"" AND college_junior_club_team = ""Trois-Rivières Draveurs (QMJHL)"";","SELECT MAX(pick__number) FROM table_2679061_2 WHERE nhl_team = ""Montreal Canadians"" AND college_junior_club_team = ""Trois-rivières Draveurs (QMJHL)"";",0 Which Manufacturer has a Time of accident and a Grid greater than 15?,"CREATE TABLE table_name_61 (manufacturer VARCHAR, time VARCHAR, grid VARCHAR);","SELECT manufacturer FROM table_name_61 WHERE time = ""accident"" AND grid > 15;","SELECT manufacturer FROM table_name_61 WHERE time = ""accident"" AND grid > 15;",1 What is the highest administrative panel with a cultural and educational panel of 2 plus an industrial and commercial panel larger than 4?,"CREATE TABLE table_name_14 (administrative_panel INTEGER, cultural_and_educational_panel VARCHAR, industrial_and_commercial_panel VARCHAR);",SELECT MAX(administrative_panel) FROM table_name_14 WHERE cultural_and_educational_panel = 2 AND industrial_and_commercial_panel > 4;,SELECT MAX(administrative_panel) FROM table_name_14 WHERE cultural_and_educational_panel = 2 AND industrial_and_commercial_panel > 4;,1 Which award took place after 2009?,"CREATE TABLE table_name_88 (award VARCHAR, year INTEGER);",SELECT award FROM table_name_88 WHERE year > 2009;,SELECT award FROM table_name_88 WHERE year > 2009;,1 Which countries have the highest yield for soybean in the 'yields' table?,"CREATE TABLE yields (id INT, crop VARCHAR(255), year INT, country VARCHAR(255), yield INT); ","SELECT country, yield FROM yields WHERE crop = 'Soybean' ORDER BY yield DESC;","SELECT country, MAX(yield) FROM yields WHERE crop = 'Soybean' GROUP BY country;",0 "What is the total production for offshore wells, partitioned by the well's region and status?","CREATE TABLE offshore_wells (well_id INT, well_name VARCHAR(255), location VARCHAR(255), production FLOAT, well_status VARCHAR(50), region VARCHAR(50)); ","SELECT region, well_status, SUM(production) OVER (PARTITION BY region, well_status) as total_production FROM offshore_wells WHERE location = 'offshore';","SELECT region, well_status, SUM(production) as total_production FROM offshore_wells GROUP BY region, well_status;",0 What is the total installed renewable energy capacity for each country in the RenewableCapacities table?,"CREATE TABLE RenewableCapacities (country TEXT, capacity INT); ","SELECT country, SUM(capacity) FROM RenewableCapacities GROUP BY country;","SELECT country, SUM(capacity) FROM RenewableCapacities GROUP BY country;",1 Update the name of the pollution control initiative in the Arctic Ocean,"CREATE TABLE pollution_control_initiatives (id INT PRIMARY KEY, initiative_name VARCHAR(255), region VARCHAR(255)); ",UPDATE pollution_control_initiatives SET initiative_name = 'Arctic Clean-Up' WHERE region = 'Arctic Ocean';,UPDATE pollution_control_initiatives SET initiative_name = 'Pollution Control Initiative' WHERE region = 'Arctic Ocean';,0 How many points did Carlin have when they had 3 wins?,"CREATE TABLE table_name_90 (points VARCHAR, wins VARCHAR, team VARCHAR);","SELECT points FROM table_name_90 WHERE wins = ""3"" AND team = ""carlin"";","SELECT points FROM table_name_90 WHERE wins = 3 AND team = ""carlin"";",0 What is the total number of construction laborers in Michigan in 2019?,"CREATE TABLE ConstructionLaborers (id INT, name TEXT, state TEXT, year INT, hourlyWage FLOAT);",SELECT COUNT(*) FROM ConstructionLaborers WHERE state = 'Michigan' AND year = 2019;,SELECT COUNT(*) FROM ConstructionLaborers WHERE state = 'Michigan' AND year = 2019;,1 Discover the top 2 countries with the highest oil production,"CREATE TABLE production_by_country (country VARCHAR(50), oil_production FLOAT); ","SELECT country, oil_production FROM production_by_country ORDER BY oil_production DESC LIMIT 2;","SELECT country, oil_production FROM production_by_country ORDER BY oil_production DESC LIMIT 2;",1 Where was South Melbourne played?,"CREATE TABLE table_name_13 (venue VARCHAR, home_team VARCHAR);","SELECT venue FROM table_name_13 WHERE home_team = ""south melbourne"";","SELECT venue FROM table_name_13 WHERE home_team = ""south melbourne"";",1 "Name the women's nickname when the enrollment is 1500 in mobile, Alabama.","CREATE TABLE table_10577579_3 (women’s_nickname VARCHAR, enrollment VARCHAR, location VARCHAR);","SELECT women’s_nickname FROM table_10577579_3 WHERE enrollment = 1500 AND location = ""Mobile, Alabama"";","SELECT women’s_nickname FROM table_10577579_3 WHERE enrollment = 1500 AND location = ""Mobile, Alabama"";",1 What is the total production of electric vehicles in South America?,"CREATE TABLE factories (id INT, name VARCHAR(50), location VARCHAR(50), type VARCHAR(50), production_count INT); ",SELECT SUM(production_count) FROM factories WHERE location = 'South America' AND type = 'Electric Vehicle';,SELECT SUM(production_count) FROM factories WHERE type = 'Electric' AND location = 'South America';,0 what is the dadar xi b where pifa colaba is sporting options?,"CREATE TABLE table_28759261_5 (dadar_xi_‘b’ VARCHAR, pifa_colaba_fc_u_17 VARCHAR);","SELECT dadar_xi_‘b’ FROM table_28759261_5 WHERE pifa_colaba_fc_u_17 = ""Sporting Options"";","SELECT dadar_xi_‘b’ FROM table_28759261_5 WHERE pifa_colaba_fc_u_17 = ""Sporting Options"";",1 Insert new users from Mexico and their posts about local culture.,"CREATE TABLE users (id INT, name VARCHAR(255), country VARCHAR(255)); CREATE TABLE posts (id INT, user_id INT, content TEXT, created_at TIMESTAMP); CREATE VIEW latest_post AS SELECT posts.user_id, MAX(posts.created_at) AS latest_post FROM posts GROUP BY posts.user_id;","INSERT INTO users (id, name, country) VALUES (5, 'Edith', 'Mexico'), (6, 'Fernando', 'Mexico'); INSERT INTO posts (id, user_id, content, created_at) SELECT NULL, users.id, 'Discovering the richness of Mexican culture! #localculture', NOW() FROM users WHERE users.id NOT IN (SELECT latest_post.user_id FROM latest_post) AND users.country = 'Mexico';","INSERT INTO latest_post (id, user_id, content, created_at) VALUES (1, 'Users', 'Mexico', 'local culture'); INSERT INTO latest_post (id, user_id, content, created_at) VALUES (1, 'Users', 'Mexico'); INSERT INTO latest_post (id, user_id, content, created_at) VALUES (1, 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico', 'Mexico'",0 Who directed the episode with 4.82 million U.S. viewers?,"CREATE TABLE table_25851971_1 (directed_by VARCHAR, us_viewers__million_ VARCHAR);","SELECT directed_by FROM table_25851971_1 WHERE us_viewers__million_ = ""4.82"";","SELECT directed_by FROM table_25851971_1 WHERE us_viewers__million_ = ""4.82"";",1 How many events were hosted by the National Museum of African American History and Culture in 2021?,"CREATE TABLE MuseumEvents (EventID int, EventName varchar(100), EventDate date, MuseumName varchar(100)); ",SELECT COUNT(*) FROM MuseumEvents WHERE MuseumName = 'National Museum of African American History and Culture' AND YEAR(EventDate) = 2021;,SELECT COUNT(*) FROM MuseumEvents WHERE MuseumName = 'National Museum of African American History and Culture' AND YEAR(EventDate) = 2021;,1 "What is the maximum and minimum number of art forms practiced at each heritage site, and the average number?","CREATE TABLE HeritageSites (id INT, name VARCHAR(255), num_art_forms INT, UNIQUE(id)); CREATE TABLE ArtFormsPracticed (id INT, heritage_site_id INT, form_id INT, UNIQUE(id)); CREATE TABLE ArtForms (id INT, name VARCHAR(255), UNIQUE(id));","SELECT HeritageSites.name, MAX(ArtFormsPracticed.num_art_forms) as max_art_forms, MIN(ArtFormsPracticed.num_art_forms) as min_art_forms, AVG(ArtFormsPracticed.num_art_forms) as avg_art_forms FROM HeritageSites INNER JOIN (SELECT heritage_site_id, COUNT(DISTINCT form_id) as num_art_forms FROM ArtFormsPracticed GROUP BY heritage_site_id) as ArtFormsPracticed ON HeritageSites.id = ArtFormsPracticed.heritage_site_id;","SELECT HeritageSites.name, MAX(ArtFormsPracticed.num_art_forms) AS max_art_forms, MIN(ArtFormsPracticed.form_id) AS min_art_forms, AVG(ArtFormsPracticed.num_art_forms) AS avg_art_forms FROM HeritageSites INNER JOIN ArtFormsPracticed ON HeritageSites.id = ArtForms.id GROUP BY HeritageSites.name;",0 Name the score for april 28,"CREATE TABLE table_name_66 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_66 WHERE date = ""april 28"";","SELECT score FROM table_name_66 WHERE date = ""april 28"";",1 What home team played the away team South Melbourne?,"CREATE TABLE table_name_56 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_56 WHERE away_team = ""south melbourne"";","SELECT home_team FROM table_name_56 WHERE away_team = ""south melbourne"";",1 When dennis ross (r) unopposed is the candidate what is the party?,"CREATE TABLE table_25030512_12 (party VARCHAR, candidates VARCHAR);","SELECT party FROM table_25030512_12 WHERE candidates = ""Dennis Ross (R) unopposed"";","SELECT party FROM table_25030512_12 WHERE candidates = ""Dennis Ross (R) Unopposed"";",0 Insert records of new mineral extractions in the 'South America' region.,"CREATE TABLE New_Extractions_2 (country TEXT, mineral TEXT, quantity INTEGER, region TEXT);","INSERT INTO New_Extractions_2 (country, mineral, quantity, region) VALUES ('Brazil', 'Diamond', 120, 'South America'); INSERT INTO New_Extractions_2 (country, mineral, quantity, region) VALUES ('Peru', 'Emerald', 90, 'South America');","INSERT INTO New_Extractions_2 (country, mineral, quantity, region) VALUES ('Argentina', 'Mexico', 'South America');",0 Name the number of families for uk30,"CREATE TABLE table_19897294_8 (family_families VARCHAR, no_overall VARCHAR);","SELECT COUNT(family_families) FROM table_19897294_8 WHERE no_overall = ""UK30"";","SELECT COUNT(family_families) FROM table_19897294_8 WHERE no_overall = ""UK30"";",1 "Who are the top five intelligence agency directors with the longest tenures, and what are their start and end dates?","CREATE TABLE intelligence_agency (id INT, name VARCHAR(255), director VARCHAR(255), start_date DATE, end_date DATE); ","SELECT director, start_date, end_date FROM intelligence_agency ORDER BY DATEDIFF(end_date, start_date) DESC LIMIT 5;","SELECT director, start_date, end_date FROM intelligence_agency ORDER BY start_date DESC LIMIT 5;",0 What is the total number of hospital beds in each country in the Oceania continent?,"CREATE TABLE Countries (Country VARCHAR(50), Continent VARCHAR(50), Hospital_Beds INT); ","SELECT Country, SUM(Hospital_Beds) FROM Countries WHERE Continent = 'Oceania' GROUP BY Country WITH ROLLUP;","SELECT Country, SUM(Hospital_Beds) FROM Countries WHERE Continent = 'Oceania' GROUP BY Country;",0 How many bridges in Texas have a condition rating below 5 and what is the total budget needed for their repairs?,"CREATE TABLE bridges (bridge_id INT, name VARCHAR(50), condition_rating INT, state VARCHAR(2)); CREATE TABLE repair_budgets (bridge_id INT, budget DECIMAL(10,2));",SELECT SUM(rb.budget) AS total_budget FROM bridges b INNER JOIN repair_budgets rb ON b.bridge_id = rb.bridge_id WHERE b.condition_rating < 5 AND b.state = 'TX';,SELECT COUNT(*) FROM bridges INNER JOIN repair_budgets ON bridges.bridge_id = repair_budgets.bridge_id WHERE bridges.condition_rating 5 AND bridges.state = 'Texas';,0 "What is Tournament, when Opponent is ""Lu Jiaxiang""?","CREATE TABLE table_name_98 (tournament VARCHAR, opponent VARCHAR);","SELECT tournament FROM table_name_98 WHERE opponent = ""lu jiaxiang"";","SELECT tournament FROM table_name_98 WHERE opponent = ""lu jiaxiang"";",1 What was the location that had an accident by the F-27-600RF aircraft with tail number 6O-SAZ?,"CREATE TABLE table_name_42 (location VARCHAR, aircraft VARCHAR, tail_number VARCHAR);","SELECT location FROM table_name_42 WHERE aircraft = ""f-27-600rf"" AND tail_number = ""6o-saz"";","SELECT location FROM table_name_42 WHERE aircraft = ""f-27-600rf"" AND tail_number = ""6o-saz"";",1 What is the combined attendance of all games that had a result of w 35-14?,"CREATE TABLE table_name_65 (attendance INTEGER, result VARCHAR);","SELECT SUM(attendance) FROM table_name_65 WHERE result = ""w 35-14"";","SELECT SUM(attendance) FROM table_name_65 WHERE result = ""w 35-14"";",1 What is the total funding amount for genetic research in India?,"CREATE SCHEMA if not exists genetics;CREATE TABLE if not exists genetics.research_funding (id INT, name TEXT, location TEXT, type TEXT, funding DECIMAL(10,2)); ",SELECT SUM(funding) FROM genetics.research_funding WHERE location = 'IN' AND type = 'Genetic';,SELECT SUM(funding) FROM genetics.research_funding WHERE location = 'India';,0 How many reservations for sc/st are there in constituency 191?,"CREATE TABLE table_29785324_4 (reservation_for_sc_st VARCHAR, constituency_no VARCHAR);",SELECT COUNT(reservation_for_sc_st) FROM table_29785324_4 WHERE constituency_no = 191;,SELECT reservation_for_sc_st FROM table_29785324_4 WHERE constituency_no = 191;,0 List the top 3 regions with the highest number of technology for social good projects in 2021.,"CREATE TABLE Social_Good (region VARCHAR(50), year INT, projects INT); ","SELECT region, projects FROM Social_Good WHERE year = 2021 ORDER BY projects DESC LIMIT 3;","SELECT region, SUM(projects) as total_projects FROM Social_Good WHERE year = 2021 GROUP BY region ORDER BY total_projects DESC LIMIT 3;",0 How many points were scored against with a losing bonus of 1 for Blaenavon RFC?,"CREATE TABLE table_name_67 (points_against VARCHAR, losing_bonus VARCHAR, club VARCHAR);","SELECT points_against FROM table_name_67 WHERE losing_bonus = ""1"" AND club = ""blaenavon rfc"";","SELECT points_against FROM table_name_67 WHERE losing_bonus = ""1"" AND club = ""blaenavon rfc"";",1 Name the nation where jeff barker is from,"CREATE TABLE table_19730892_1 (nation VARCHAR, name VARCHAR);","SELECT nation FROM table_19730892_1 WHERE name = ""Jeff Barker"";","SELECT nation FROM table_19730892_1 WHERE name = ""Jeff Barker"";",1 What is the home team score for Footscray?,CREATE TABLE table_name_22 (home_team VARCHAR);,"SELECT home_team AS score FROM table_name_22 WHERE home_team = ""footscray"";","SELECT home_team AS score FROM table_name_22 WHERE home_team = ""footscray"";",1 What is the average media literacy score for users from a specific ethnic background?,"CREATE TABLE user_profiles (id INT, user_id INT, ethnicity VARCHAR, media_literacy_score INT); ","SELECT ethnicity, AVG(media_literacy_score) as avg_score FROM user_profiles WHERE ethnicity IN ('Asian American', 'African American', 'Hispanic American') GROUP BY ethnicity;",SELECT AVG(media_literacy_score) FROM user_profiles WHERE ethnicity = 'African American';,0 What is the average severity score of threat intelligence in the finance sector?,"CREATE TABLE threat_intelligence (id INT, sector VARCHAR(20), severity FLOAT); ",SELECT AVG(severity) FROM threat_intelligence WHERE sector = 'Finance';,SELECT AVG(severity) FROM threat_intelligence WHERE sector = 'Finance';,1 How many alt names does 1964-011a have?,"CREATE TABLE table_12141496_1 (alt_name VARCHAR, id VARCHAR);","SELECT COUNT(alt_name) FROM table_12141496_1 WHERE id = ""1964-011A"";","SELECT COUNT(alt_name) FROM table_12141496_1 WHERE id = ""1964-011A"";",1 Which Event has a Medal of gold and a Name of barney henricus?,"CREATE TABLE table_name_69 (event VARCHAR, medal VARCHAR, name VARCHAR);","SELECT event FROM table_name_69 WHERE medal = ""gold"" AND name = ""barney henricus"";","SELECT event FROM table_name_69 WHERE medal = ""gold"" AND name = ""barney henricus"";",1 Which character had a title rank of various?,"CREATE TABLE table_name_4 (character VARCHAR, title_rank VARCHAR);","SELECT character FROM table_name_4 WHERE title_rank = ""various"";","SELECT character FROM table_name_4 WHERE title_rank = ""varying"";",0 "List the concert venues with a capacity greater than 20,000 that have hosted artists in the 'Pop' genre?","CREATE TABLE Concerts (ConcertID INT, VenueID INT, ArtistID INT, VenueCapacity INT); ","SELECT VenueID, VenueCapacity FROM Concerts JOIN Artists ON Concerts.ArtistID = Artists.ArtistID WHERE Genre = 'Pop' AND VenueCapacity > 20000;","SELECT VenueID, ArtistID, VenueCapacity FROM Concerts WHERE VenueCapacity > 20000 AND ArtistID IN (SELECT ArtistID FROM Artists WHERE Genre = 'Pop');",0 How many construction workers were employed in each state for green building projects in 2020?,"CREATE TABLE employment_green_data (state VARCHAR(255), employees INT, year INT); ","SELECT state, employees FROM employment_green_data WHERE year = 2020;","SELECT state, SUM(employees) FROM employment_green_data WHERE year = 2020 GROUP BY state;",0 What is the maximum price of eco-friendly tours in Spain?,"CREATE TABLE eco_tours (tour_id INT, name VARCHAR(255), country VARCHAR(255), price FLOAT, eco_friendly BOOLEAN); ",SELECT MAX(price) FROM eco_tours WHERE country = 'Spain' AND eco_friendly = true;,SELECT MAX(price) FROM eco_tours WHERE country = 'Spain' AND eco_friendly = true;,1 How many people were at the match on July 13/,"CREATE TABLE table_name_66 (attendance VARCHAR, date VARCHAR);","SELECT attendance FROM table_name_66 WHERE date = ""july 13"";","SELECT attendance FROM table_name_66 WHERE date = ""july 13/"";",0 What is the lowest number of total race points for the country of Belgium?,"CREATE TABLE table_23293785_2 (race_total_pts_ INTEGER, country VARCHAR);","SELECT MIN(race_total_pts_) FROM table_23293785_2 WHERE country = ""Belgium"";","SELECT MIN(race_total_pts_) FROM table_23293785_2 WHERE country = ""Belgium"";",1 Find the average temperature and humidity for the month of August for all crops in the 'NorthWest' region.,"CREATE TABLE Weather (date DATE, crop VARCHAR(20), temperature FLOAT, humidity FLOAT); CREATE TABLE Region (region VARCHAR(20), crop VARCHAR(20), PRIMARY KEY (region, crop));","SELECT AVG(temperature), AVG(humidity) FROM Weather JOIN Region ON Weather.crop = Region.crop WHERE Region.region = 'NorthWest' AND EXTRACT(MONTH FROM Weather.date) = 8;","SELECT AVG(weather.temperature) AS avg_temperature, AVG(weather.humidity) AS avg_humidity FROM Weather INNER JOIN Region ON Weather.crop = Region.crop WHERE Region.region = 'NorthWest' AND EXTRACT(MONTH FROM Weather.date) = 8;",0 How many urban farms are there in Canada that use hydroponics?,"CREATE TABLE urban_farms (farm_id INT, country VARCHAR(50), growing_method VARCHAR(50)); ",SELECT COUNT(*) FROM urban_farms WHERE country = 'Canada' AND growing_method = 'Hydroponics';,SELECT COUNT(*) FROM urban_farms WHERE country = 'Canada' AND growing_method = 'Hydroponics';,1 WHAT IS THE AWAY WITH HOME AT 2-2?,"CREATE TABLE table_name_15 (away VARCHAR, home VARCHAR);","SELECT away FROM table_name_15 WHERE home = ""2-2"";","SELECT away FROM table_name_15 WHERE home = ""2-2"";",1 Who was the director for Tango Bar?,"CREATE TABLE table_27423508_1 (director VARCHAR, spanish_title VARCHAR);","SELECT director FROM table_27423508_1 WHERE spanish_title = ""Tango Bar"";","SELECT director FROM table_27423508_1 WHERE spanish_title = ""Tango Bar"";",1 What is the average donation amount for recurring donors?,"CREATE TABLE Donors (donor_id INT, name VARCHAR(255), country VARCHAR(255), recurring BOOLEAN); CREATE TABLE Donations (donation_id INT, donor_id INT, event_id INT, amount DECIMAL(10, 2));",SELECT AVG(amount) FROM Donations D JOIN Donors DD ON D.donor_id = DD.donor_id WHERE DD.recurring = TRUE;,SELECT AVG(amount) FROM Donations JOIN Donors ON Donations.donor_id = Donors.donor_id WHERE Donors.recurring = TRUE;,0 Create a table named 'animals',"CREATE TABLE animals (id INT PRIMARY KEY, name VARCHAR(50), species VARCHAR(50), population INT);","CREATE TABLE animals (id INT PRIMARY KEY, name VARCHAR(50), species VARCHAR(50), population INT);","CREATE TABLE animals (id INT PRIMARY KEY, name VARCHAR(50), species VARCHAR(50), population INT);",1 What is the total humanitarian assistance provided by Japan in 2020?,"CREATE TABLE humanitarian_assistance (assistance_id INT, provider TEXT, recipient TEXT, amount FLOAT, year INT); ",SELECT SUM(amount) FROM humanitarian_assistance WHERE provider = 'Japan' AND year = 2020,SELECT SUM(amount) FROM humanitarian_assistance WHERE provider = 'Japan' AND year = 2020;,0 Report all advisors that advise more than 2 students.,CREATE TABLE STUDENT (Advisor VARCHAR);,SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2;,SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2;,1 Which Third has a Nation of scotland?,"CREATE TABLE table_name_14 (third VARCHAR, nation VARCHAR);","SELECT third FROM table_name_14 WHERE nation = ""scotland"";","SELECT third FROM table_name_14 WHERE nation = ""scotland"";",1 what is robin's stat when jason was 2.5,"CREATE TABLE table_19744915_3 (robin VARCHAR, jason VARCHAR);","SELECT robin FROM table_19744915_3 WHERE jason = ""2.5"";","SELECT robin FROM table_19744915_3 WHERE jason = ""2.5"";",1 "What score has ipswich town as the home team, and replay as the tie no.?","CREATE TABLE table_name_74 (score VARCHAR, home_team VARCHAR, tie_no VARCHAR);","SELECT score FROM table_name_74 WHERE home_team = ""ipswich town"" AND tie_no = ""replay"";","SELECT score FROM table_name_74 WHERE home_team = ""ipswich town"" AND tie_no = ""replay"";",1 "What ward was she nominated at for her work, Flare Path for the category of best featured actress in a play?","CREATE TABLE table_name_62 (award VARCHAR, nominated_work VARCHAR, category VARCHAR);","SELECT award FROM table_name_62 WHERE nominated_work = ""flare path"" AND category = ""best featured actress in a play"";","SELECT award FROM table_name_62 WHERE nominated_work = ""flame path"" AND category = ""best featured actress in a play"";",0 What is the percentage of employees who have completed diversity and inclusion training in each department?,"CREATE TABLE EmployeeTraining(EmployeeID INT, Department VARCHAR(255), TrainingType VARCHAR(255), CompletionDate DATE);","SELECT Department, (COUNT(CASE WHEN TrainingType = 'Diversity and Inclusion' THEN 1 END) / COUNT(*)) * 100 AS Percentage FROM EmployeeTraining GROUP BY Department;","SELECT Department, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM EmployeeTraining WHERE TrainingType = 'Diversity and Inclusion' GROUP BY Department) as Percentage FROM EmployeeTraining WHERE TrainingType = 'Diversity and Inclusion' GROUP BY Department;",0 Insert new legal aid providers into the 'legal_aid' table that do not already exist in the 'providers_history' table?,"CREATE TABLE legal_aid (provider_id INT, provider VARCHAR(255), location VARCHAR(255)); CREATE TABLE providers_history (provider_id INT, provider VARCHAR(255), location VARCHAR(255));","INSERT INTO legal_aid (provider_id, provider, location) SELECT provider_id, provider, location FROM (SELECT ROW_NUMBER() OVER (ORDER BY provider) AS provider_id, provider, location FROM (VALUES ('1001', 'Advocacy Inc.', 'NY'), ('1002', 'Justice League', 'CA')) AS t(provider_id, provider, location) EXCEPT SELECT provider_id, provider, location FROM providers_history) AS x WHERE provider_id NOT IN (SELECT provider_id FROM providers_history);","INSERT INTO legal_aid (provider_id, provider, location) VALUES (1, 'Local Legal Aid', 'New York'); INSERT INTO providers_history (provider_id, provider, location) VALUES (1, 'Local Legal Aid', 'New York');",0 What is the total quantity of each product shipped in the last week?,"CREATE TABLE Shipments (ShipmentID int, WarehouseID int, ProductName varchar(255), Quantity int, ShippedDate date); ","SELECT ProductName, SUM(Quantity) AS TotalQuantity FROM Shipments WHERE ShippedDate BETWEEN DATEADD(day, -7, GETDATE()) AND GETDATE() GROUP BY ProductName;","SELECT ProductName, SUM(Quantity) as TotalQuantity FROM Shipments WHERE ShippedDate >= DATEADD(week, -1, GETDATE()) GROUP BY ProductName;",0 What is the percentage of veteran unemployment in each state?,"CREATE TABLE veteran_unemployment (state TEXT, num_veterans INT, total_population INT); ","SELECT state, (num_veterans::DECIMAL(10,2) / total_population::DECIMAL(10,2)) * 100 AS veteran_unemployment_percentage FROM veteran_unemployment;","SELECT state, (num_veterans * 100.0 / total_population) * 100.0 / total_population FROM veteran_unemployment GROUP BY state;",0 What Position has a Time of 3:01.78?,"CREATE TABLE table_name_78 (position VARCHAR, time VARCHAR);","SELECT position FROM table_name_78 WHERE time = ""3:01.78"";","SELECT position FROM table_name_78 WHERE time = ""3:01.78"";",1 "Which Prominence (m) has an Elevation (m) of 3,095?","CREATE TABLE table_name_67 (prominence__m_ INTEGER, elevation__m_ VARCHAR);",SELECT MIN(prominence__m_) FROM table_name_67 WHERE elevation__m_ = 3 OFFSET 095;,"SELECT MAX(prominence__m_) FROM table_name_67 WHERE elevation__m_ = ""3,095"";",0 Delete all records from the 'Bikes' table where 'bike_type' is 'Cargo Bike',"CREATE TABLE Bikes (bike_id INT, bike_type VARCHAR(20)); ",DELETE FROM Bikes WHERE bike_type = 'Cargo Bike';,DELETE FROM Bikes WHERE bike_type = 'Cargo Bike';,1 How many artworks were created in France between 1850 and 1950?,"CREATE TABLE Artworks (ArtworkID INT, Title TEXT, Year INT, Country TEXT);",SELECT COUNT(*) FROM Artworks WHERE Year BETWEEN 1850 AND 1950 AND Country = 'France';,SELECT COUNT(*) FROM Artworks WHERE Country = 'France' AND Year BETWEEN 1850 AND 1950;,0 What position was played at the World Athletics Final Competition in a year more recent than 2008?,"CREATE TABLE table_name_62 (position VARCHAR, competition VARCHAR, year VARCHAR);","SELECT position FROM table_name_62 WHERE competition = ""world athletics final"" AND year > 2008;","SELECT position FROM table_name_62 WHERE competition = ""world athletics final"" AND year > 2008;",1 What chassis has more than 0 points?,"CREATE TABLE table_name_40 (chassis VARCHAR, points INTEGER);",SELECT chassis FROM table_name_40 WHERE points > 0;,SELECT chassis FROM table_name_40 WHERE points > 0;,1 Who did the high rebounds in the game in which Brandon Jennings (8) did the high assists?,"CREATE TABLE table_22871316_6 (high_rebounds VARCHAR, high_assists VARCHAR);","SELECT high_rebounds FROM table_22871316_6 WHERE high_assists = ""Brandon Jennings (8)"";","SELECT high_rebounds FROM table_22871316_6 WHERE high_assists = ""Brandon Jennings (8)"";",1 What is the minimum mental health score of students in each country?,"CREATE TABLE students (id INT, country TEXT, mental_health_score INT);","SELECT country, MIN(mental_health_score) FROM students GROUP BY country;","SELECT country, MIN(mental_health_score) FROM students GROUP BY country;",1 What is the maximum number of assists made by a player in the 'WNBA' league in a single game?,"CREATE TABLE players (player_id INT, name VARCHAR(50), position VARCHAR(50), height FLOAT, weight INT, team_id INT, league VARCHAR(50), assists INT); ",SELECT MAX(assists) FROM players WHERE league = 'WNBA';,SELECT MAX(assists) FROM players WHERE league = 'WNBA';,1 "How many positions have 9 as a drawn, 5 as a difference, with a lost less than 14?","CREATE TABLE table_name_9 (position VARCHAR, lost VARCHAR, drawn VARCHAR, difference VARCHAR);","SELECT COUNT(position) FROM table_name_9 WHERE drawn = 9 AND difference = ""5"" AND lost < 14;",SELECT COUNT(position) FROM table_name_9 WHERE drawn = 9 AND difference = 5 AND lost 14;,0 What is the lowest played with a lost bigger than 10?,"CREATE TABLE table_name_85 (played INTEGER, lost INTEGER);",SELECT MIN(played) FROM table_name_85 WHERE lost > 10;,SELECT MIN(played) FROM table_name_85 WHERE lost > 10;,1 "Update the status of defense project ""Project Y"" to ""In Progress"" and its planned start date to 2022-12-01.","CREATE TABLE defense_projects (id INT PRIMARY KEY, project_name VARCHAR(255), status VARCHAR(255), planned_start_date DATE);","UPDATE defense_projects SET status = 'In Progress', planned_start_date = '2022-12-01' WHERE project_name = 'Project Y';",UPDATE defense_projects SET status = 'In Progress' WHERE project_name = 'Project Y' AND planned_start_date = '2022-12-01';,0 What is the highest episode number in which Jamie Oliver guest-hosted?,"CREATE TABLE table_name_89 (episode_number INTEGER, guest_host VARCHAR);","SELECT MAX(episode_number) FROM table_name_89 WHERE guest_host = ""jamie oliver"";","SELECT MAX(episode_number) FROM table_name_89 WHERE guest_host = ""jamie oliver"";",1 Who wrote the episode that had 6.05 million U.s. viewers?,"CREATE TABLE table_28037619_2 (written_by VARCHAR, us_viewers__million_ VARCHAR);","SELECT written_by FROM table_28037619_2 WHERE us_viewers__million_ = ""6.05"";","SELECT written_by FROM table_28037619_2 WHERE us_viewers__million_ = ""6.05"";",1 How many community development initiatives were completed in the region of Patagonia between 2015 and 2017?,"CREATE TABLE community_development (id INT, region VARCHAR(50), initiative_type VARCHAR(50), start_date DATE, end_date DATE); ",SELECT COUNT(*) FROM community_development WHERE region = 'Patagonia' AND start_date <= '2017-12-31' AND end_date >= '2015-01-01';,SELECT COUNT(*) FROM community_development WHERE region = 'Patagonia' AND start_date BETWEEN '2015-01-01' AND '2017-12-31';,0 What is the total revenue generated by museum memberships?,"CREATE TABLE memberships (id INT, member_id INT, start_date DATE, end_date DATE, price DECIMAL(5,2)); CREATE TABLE members (id INT, name VARCHAR(255), type VARCHAR(255)); ",SELECT SUM(price) FROM memberships JOIN members ON memberships.member_id = members.id WHERE members.type = 'Individual' OR members.type = 'Family' OR members.type = 'Senior';,SELECT SUM(price) FROM memberships JOIN members ON memberships.member_id = members.id WHERE members.type = 'Museum';,0 What is the average donation amount by donor gender?,"CREATE TABLE Donors (DonorID INT, DonorName TEXT, Gender TEXT); ","SELECT Gender, AVG(DonationAmount) AS AvgDonationAmount FROM Donors JOIN Donations ON Donors.DonorID = Donations.DonorID GROUP BY Gender;","SELECT Gender, AVG(DonationAmount) FROM Donors GROUP BY Gender;",0 "What was the total amount of cannabis sold in the state of Washington in 2021, broken down by month?","CREATE TABLE sales (id INT, dispensary_name TEXT, state TEXT, product TEXT, revenue INT, date DATE); ","SELECT state, EXTRACT(MONTH FROM date) AS month, SUM(revenue) AS total_revenue FROM sales WHERE state = 'Washington' AND date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY state, month;","SELECT DATE_FORMAT(date, '%Y-%m') as month, SUM(revenue) as total_revenue FROM sales WHERE state = 'Washington' AND product = 'Cannabis' AND date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY month;",0 Get the total number of treatments provided by 'Dr. Bob' in January 2021.,"CREATE TABLE treatment (treatment_id INT, patient_id INT, condition VARCHAR(50), provider VARCHAR(50), date DATE); ",SELECT COUNT(*) FROM treatment WHERE provider = 'Dr. Bob' AND date BETWEEN '2021-01-01' AND '2021-01-31';,SELECT COUNT(*) FROM treatment WHERE provider = 'Dr. Bob' AND date BETWEEN '2021-01-01' AND '2021-01-31';,1 What is the percentage of organic facial creams sold in Canada in Q2 2021?,"CREATE TABLE facial_cream_sales (sale_id INT, product_id INT, sale_quantity INT, is_organic BOOLEAN, sale_date DATE, country VARCHAR(20)); ","SELECT ROUND((SUM(CASE WHEN is_organic = true THEN sale_quantity ELSE 0 END) / SUM(sale_quantity)) * 100, 2) FROM facial_cream_sales WHERE sale_date BETWEEN '2021-04-01' AND '2021-06-30' AND country = 'Canada';",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM facial_cream_sales WHERE is_organic = true AND sale_date BETWEEN '2021-04-01' AND '2021-06-30')) AS percentage FROM facial_cream_sales WHERE country = 'Canada' AND sale_date BETWEEN '2021-04-01' AND '2021-06-30';,0 Which genetic research data tables have more than 1000 records?,"CREATE TABLE genetic_data_1 (id INT, data TEXT); CREATE TABLE genetic_data_2 (id INT, data TEXT); ","SELECT name FROM (SELECT COUNT(*) as count, 'genetic_data_1' as name FROM genetic_data_1 UNION ALL SELECT COUNT(*), 'genetic_data_2' FROM genetic_data_2) as subquery WHERE count > 1000;",SELECT gd.data FROM genetic_data_1 gd JOIN genetic_data_2 gd ON gd.data = gd.data GROUP BY gd.data HAVING COUNT(gd.id) > 1000;,0 How many climate communication campaigns has the Government of India launched in the last 5 years?,"CREATE TABLE climate_communication_campaigns (campaign_id INT, campaign_name VARCHAR(50), launch_date DATE, sponsor VARCHAR(50)); ","SELECT COUNT(campaign_id) FROM climate_communication_campaigns WHERE sponsor = 'Government of India' AND launch_date >= DATEADD(year, -5, GETDATE());","SELECT COUNT(*) FROM climate_communication_campaigns WHERE sponsor = 'Government of India' AND launch_date >= DATEADD(year, -5, GETDATE());",0 Show the multimodal trips with the shortest duration in each city,"CREATE TABLE multimodal_trips_3 (trip_id INT, trip_duration INT, city_id INT);","SELECT city_id, MIN(trip_duration) as min_duration FROM multimodal_trips_3 GROUP BY city_id;","SELECT city_id, MIN(trip_duration) as min_duration FROM multimodal_trips_3 GROUP BY city_id;",1 "Show all peacekeeping operations that have been conducted by the UN in the last decade, along with the number of participating countries.","CREATE TABLE PeacekeepingOperations (ID INT, OperationName TEXT, OperationDate DATE, ParticipatingCountries TEXT); ","SELECT OperationName, ParticipatingCountries, COUNT(DISTINCT SUBSTRING_INDEX(ParticipatingCountries, ',', n)) as NumberOfCountries FROM PeacekeepingOperations p CROSS JOIN (SELECT numbers.N FROM (SELECT 1 as N UNION ALL SELECT 2 UNION ALL SELECT 3) numbers) n WHERE OperationDate BETWEEN DATEADD(year, -10, GETDATE()) AND GETDATE() GROUP BY OperationName, ParticipatingCountries;","SELECT OperationName, ParticipatingCountries FROM PeacekeepingOperations WHERE OperationDate >= DATEADD(year, -1, GETDATE());",0 "What is the average Founded for chicopee, massachusetts?","CREATE TABLE table_name_59 (founded INTEGER, location VARCHAR);","SELECT AVG(founded) FROM table_name_59 WHERE location = ""chicopee, massachusetts"";","SELECT AVG(founded) FROM table_name_59 WHERE location = ""chicago, massachusetts"";",0 "What is the sum for December that has 0.36 in July, and lager than 0.35000000000000003 in February?","CREATE TABLE table_name_95 (december INTEGER, july VARCHAR, february VARCHAR);",SELECT SUM(december) FROM table_name_95 WHERE july = 0.36 AND february > 0.35000000000000003;,"SELECT SUM(december) FROM table_name_95 WHERE july = ""0.336"" AND february > 0.35000000000000003;",0 "When was Tree Cornered Tweety, directed by Friz Freleng, released?","CREATE TABLE table_name_35 (release_date VARCHAR, director VARCHAR, title VARCHAR);","SELECT release_date FROM table_name_35 WHERE director = ""friz freleng"" AND title = ""tree cornered tweety"";","SELECT release_date FROM table_name_35 WHERE director = ""friz freleng"" AND title = ""tree cornered tweety"";",1 Which Finalist has a Week of may 3?,"CREATE TABLE table_name_17 (finalist VARCHAR, week VARCHAR);","SELECT finalist FROM table_name_17 WHERE week = ""may 3"";","SELECT finalist FROM table_name_17 WHERE week = ""may 3"";",1 What are the grades served at Manchester Junior-Senior High School?,"CREATE TABLE table_1984697_85 (grades VARCHAR, school VARCHAR);","SELECT grades FROM table_1984697_85 WHERE school = ""Manchester Junior-Senior High school"";","SELECT grades FROM table_1984697_85 WHERE school = ""Manchester Junior-Senior High School"";",0 How many people watched season 1?,"CREATE TABLE table_name_69 (viewers__in_millions_ VARCHAR, season VARCHAR);","SELECT viewers__in_millions_ FROM table_name_69 WHERE season = ""1"";",SELECT viewers__in_millions_ FROM table_name_69 WHERE season = 1;,0 What is the African Spoonbill when the Hadeda Ibis is Flernecked Nightjar?,"CREATE TABLE table_20042805_2 (african_spoonbill VARCHAR, hadeda_ibis VARCHAR);","SELECT african_spoonbill FROM table_20042805_2 WHERE hadeda_ibis = ""Flernecked Nightjar"";","SELECT african_spoonbill FROM table_20042805_2 WHERE hadeda_ibis = ""Flernecked Nightjar"";",1 What's the nationality of Livio Berruti?,"CREATE TABLE table_name_53 (nationality VARCHAR, athlete VARCHAR);","SELECT nationality FROM table_name_53 WHERE athlete = ""livio berruti"";","SELECT nationality FROM table_name_53 WHERE athlete = ""livio berruti"";",1 How many episodes did Eve Weston write?,"CREATE TABLE table_27462177_1 (no_in_series VARCHAR, written_by VARCHAR);","SELECT COUNT(no_in_series) FROM table_27462177_1 WHERE written_by = ""Eve Weston"";","SELECT no_in_series FROM table_27462177_1 WHERE written_by = ""Eve Weston"";",0 "Which position did the player from the hometown of Dallas, TX play?","CREATE TABLE table_11677100_12 (position VARCHAR, hometown VARCHAR);","SELECT position FROM table_11677100_12 WHERE hometown = ""Dallas, TX"";","SELECT position FROM table_11677100_12 WHERE hometown = ""Dallas, TX"";",1 What is the average tonnage of the ship named proletarij?,"CREATE TABLE table_name_81 (tonnage INTEGER, name_of_ship VARCHAR);","SELECT AVG(tonnage) FROM table_name_81 WHERE name_of_ship = ""proletarij"";","SELECT AVG(tonnage) FROM table_name_81 WHERE name_of_ship = ""proletarij"";",1 "Which Year started is the highest one that has a Current car of arctic sun, and a Number of cars smaller than 1?","CREATE TABLE table_name_38 (year_started INTEGER, current_car VARCHAR, number_of_cars VARCHAR);","SELECT MAX(year_started) FROM table_name_38 WHERE current_car = ""arctic sun"" AND number_of_cars < 1;","SELECT MAX(year_started) FROM table_name_38 WHERE current_car = ""arctic sun"" AND number_of_cars 1;",0 "Who is the Electorate, when the year for First elected is 1974, and when the Party is Country?","CREATE TABLE table_name_16 (electorate VARCHAR, first_elected VARCHAR, party VARCHAR);","SELECT electorate FROM table_name_16 WHERE first_elected = ""1974"" AND party = ""country"";","SELECT electorate FROM table_name_16 WHERE first_elected = 1974 AND party = ""country"";",0 What is the average Gadolinium production by month for 2021 and 2022?,"CREATE TABLE mines (id INT, name TEXT, location TEXT, gadolinium_production FLOAT, timestamp DATE); ","SELECT MONTH(timestamp), AVG(gadolinium_production) FROM mines WHERE YEAR(timestamp) IN (2021, 2022) GROUP BY MONTH(timestamp);","SELECT EXTRACT(MONTH FROM timestamp) AS month, AVG(gadolinium_production) AS avg_gadolinium_production FROM mines WHERE timestamp BETWEEN '2021-01-01' AND '2022-12-31' GROUP BY month;",0 "What is the Outcome with a Date that is may 5, 2012?","CREATE TABLE table_name_49 (outcome VARCHAR, date VARCHAR);","SELECT outcome FROM table_name_49 WHERE date = ""may 5, 2012"";","SELECT outcome FROM table_name_49 WHERE date = ""may 5, 2012"";",1 List all veteran employment stats for New York state.,"CREATE TABLE states (id INT, name VARCHAR(255)); CREATE TABLE veteran_stats (id INT, state_id INT, employed INT, unemployed INT); ","SELECT state_id, employed, unemployed FROM veteran_stats WHERE state_id = (SELECT id FROM states WHERE name = 'New York');",SELECT vs.employed FROM veteran_stats vs JOIN states s ON vs.state_id = s.id WHERE s.name = 'New York';,0 Return the cell phone number and email address for all students.,"CREATE TABLE STUDENTS (cell_mobile_number VARCHAR, email_address VARCHAR);","SELECT cell_mobile_number, email_address FROM STUDENTS;","SELECT cell_mobile_number, email_address FROM STUDENTS;",1 What is the maximum safety score of AI models used in healthcare applications?,"CREATE TABLE model_applications (model_id INT, application VARCHAR(50), safety FLOAT); ",SELECT MAX(safety) FROM model_applications WHERE application = 'Healthcare';,SELECT MAX(safety) FROM model_applications WHERE application = 'Healthcare';,1 What is the average water usage for linen production in France?,"CREATE TABLE LinenProduction (id INT, country VARCHAR, water_usage DECIMAL);",SELECT AVG(water_usage) FROM LinenProduction WHERE country = 'France';,SELECT AVG(water_usage) FROM LinenProduction WHERE country = 'France';,1 WHAT YEAR DID MIKE BRADY GET RUNNER-UP?,"CREATE TABLE table_1507806_1 (year INTEGER, runner_up VARCHAR);","SELECT MIN(year) FROM table_1507806_1 WHERE runner_up = ""Mike Brady"";","SELECT MAX(year) FROM table_1507806_1 WHERE runner_up = ""Mike Brady"";",0 Name the school/club team/country for the player that is 6-5 ft,"CREATE TABLE table_name_11 (school_club_team_country VARCHAR, height_in_ft VARCHAR);","SELECT school_club_team_country FROM table_name_11 WHERE height_in_ft = ""6-5"";","SELECT school_club_team_country FROM table_name_11 WHERE height_in_ft = ""6-5"";",1 What is the nature of the incident in Kabul on 2004-01-28?,"CREATE TABLE table_name_62 (nature_of_incident VARCHAR, location VARCHAR, date VARCHAR);","SELECT nature_of_incident FROM table_name_62 WHERE location = ""kabul"" AND date = ""2004-01-28"";","SELECT nature_of_incident FROM table_name_62 WHERE location = ""kabul"" AND date = ""2004-01-28"";",1 Who was the radio commentator when the final television commentator was John Dunn? ,"CREATE TABLE table_17766232_7 (radio_commentator VARCHAR, final_television_commentator VARCHAR);","SELECT radio_commentator FROM table_17766232_7 WHERE final_television_commentator = ""John Dunn"";","SELECT radio_commentator FROM table_17766232_7 WHERE final_television_commentator = ""John Dunn"";",1 "What is the average number of participants per defense diplomacy event, ordered from highest to lowest?","CREATE TABLE defense_diplomacy_2 (id INT, event VARCHAR(255), participants INT); ",SELECT AVG(participants) AS avg_participants FROM defense_diplomacy_2 GROUP BY event ORDER BY avg_participants DESC;,"SELECT event, AVG(participants) as avg_participants FROM defense_diplomacy_2 GROUP BY event ORDER BY avg_participants DESC;",0 What is the average salary of employees who identify as male and were hired in 2021?,"CREATE TABLE Employees (EmployeeID INT, HireYear INT, GenderIdentity VARCHAR(20), Department VARCHAR(20), Salary DECIMAL(10,2)); ",SELECT AVG(Salary) FROM Employees WHERE GenderIdentity = 'Male' AND HireYear = 2021;,SELECT AVG(Salary) FROM Employees WHERE GenderIdentity = 'Male' AND HireYear = 2021;,1 Which military technologies have been developed in Asia since 2015?,"CREATE TABLE MilitaryTechnology (id INT, technology_name VARCHAR(255), location VARCHAR(255), year INT); ","SELECT technology_name, location, year FROM MilitaryTechnology WHERE year >= 2015 AND location LIKE '%Asia%';",SELECT technology_name FROM MilitaryTechnology WHERE location = 'Asia' AND year >= 2015;,0 "Insert new mining sites with provided environmental impact scores, preserving the original records.","CREATE TABLE NewMiningSites(SiteID INT, Country VARCHAR(50), EnvironmentalImpactScore FLOAT); ",INSERT INTO MiningSites (SELECT * FROM NewMiningSites);,"INSERT INTO NewMiningSites (SiteID, Country, EnvironmentalImpactScore) VALUES (4, 'Canada', 'Environmental ImpactScore');",0 Who was the contestant eliminated on episode 8 of RW: Key West season?,"CREATE TABLE table_18974269_1 (player VARCHAR, original_season VARCHAR, eliminated VARCHAR);","SELECT player FROM table_18974269_1 WHERE original_season = ""RW: Key West"" AND eliminated = ""Episode 8"";","SELECT player FROM table_18974269_1 WHERE original_season = ""RW: Key West"" AND eliminated = 8;",0 How many students are not involved in any behavior incident?,CREATE TABLE STUDENTS (student_id VARCHAR); CREATE TABLE Behavior_Incident (student_id VARCHAR);,SELECT COUNT(*) FROM STUDENTS WHERE NOT student_id IN (SELECT student_id FROM Behavior_Incident);,SELECT COUNT(*) FROM STUDENTS AS T1 JOIN Behavior_Incident AS T2 ON T1.student_id = T2.student_id WHERE T2.student_id IS NULL;,0 Where is the lacrosse school located?,"CREATE TABLE table_name_98 (location VARCHAR, school VARCHAR);","SELECT location FROM table_name_98 WHERE school = ""lacrosse"";","SELECT location FROM table_name_98 WHERE school = ""lacrosse"";",1 Calculate the CO2 emissions reduction from using sustainable fabrics compared to conventional fabrics.,"CREATE TABLE co2_emissions (id INT PRIMARY KEY, fabric_type VARCHAR(255), co2_emissions FLOAT); ",SELECT (co2_emissions::float - (SELECT co2_emissions FROM co2_emissions WHERE fabric_type = 'Conventional cotton')) AS co2_emissions_reduction FROM co2_emissions WHERE fabric_type = 'Organic cotton';,"SELECT fabric_type, SUM(co2_emissions) as total_emissions FROM co2_emissions GROUP BY fabric_type;",0 What is the total salary expense for the 'HR' department?,"CREATE TABLE Employees (EmployeeID INT, Department VARCHAR(255), Gender VARCHAR(255), Salary DECIMAL(10,2)); ",SELECT SUM(Salary) FROM Employees WHERE Department = 'HR';,SELECT SUM(Salary) FROM Employees WHERE Department = 'HR';,1 What is the average and total transaction amount?,CREATE TABLE Financial_transactions (transaction_amount INTEGER);,"SELECT AVG(transaction_amount), SUM(transaction_amount) FROM Financial_transactions;","SELECT AVG(transaction_amount), SUM(transaction_amount) FROM Financial_transactions;",1 What car does Scott Deware own that has rounds under 12?,"CREATE TABLE table_name_24 (car_s_ VARCHAR, rounds VARCHAR, owner_s_ VARCHAR);","SELECT car_s_ FROM table_name_24 WHERE rounds < 12 AND owner_s_ = ""scott deware"";","SELECT car_s_ FROM table_name_24 WHERE rounds 12 AND owner_s_ = ""scott deware"";",0 Find the total CO2 emissions reduction achieved by renewable energy projects in the European Union since 2015,"CREATE TABLE co2_emissions_reduction (project_id INT, project_name VARCHAR(255), co2_reduction FLOAT, reduction_year INT, country VARCHAR(255));",SELECT SUM(co2_reduction) FROM co2_emissions_reduction WHERE reduction_year >= 2015 AND country IN (SELECT country FROM (SELECT DISTINCT country FROM co2_emissions_reduction WHERE country = 'European Union') as temp);,SELECT SUM(co2_reduction) FROM co2_emissions_reduction WHERE country = 'European Union' AND reduction_year >= 2015;,0 How many astronauts have flown more than three missions?,"CREATE TABLE astronauts (badge_id INT, first_name VARCHAR(50), last_name VARCHAR(50), dob DATE, gender VARCHAR(10), missions INT); CREATE TABLE space_missions (mission_id INT, mission_name VARCHAR(50), launch_date DATE, return_date DATE, astronaut_badge_id INT);",SELECT COUNT(*) FROM astronauts WHERE missions > 3;,SELECT COUNT(*) FROM astronauts JOIN space_missions ON astronauts.badge_id = space_missions.astronaut_badge_id WHERE missions > 3;,0 How many towns or cities are at milepost 71.1? ,"CREATE TABLE table_2572788_1 (town_city VARCHAR, milepost VARCHAR);","SELECT COUNT(town_city) FROM table_2572788_1 WHERE milepost = ""71.1"";","SELECT COUNT(town_city) FROM table_2572788_1 WHERE milepost = ""71.1"";",1 List all info about all people.,CREATE TABLE people (Id VARCHAR);,SELECT * FROM people;,SELECT * FROM people;,1 What number was the game resulting in a 5-11 record?,"CREATE TABLE table_17118657_8 (game INTEGER, record VARCHAR);","SELECT MIN(game) FROM table_17118657_8 WHERE record = ""5-11"";","SELECT SUM(game) FROM table_17118657_8 WHERE record = ""5-11"";",0 How many breadth entries are there when propulsion is jet?,"CREATE TABLE table_28132970_5 (breadth VARCHAR, propulsion VARCHAR);","SELECT COUNT(breadth) FROM table_28132970_5 WHERE propulsion = ""Jet"";","SELECT COUNT(breadth) FROM table_28132970_5 WHERE propulsion = ""Jet"";",1 "For model volvo, how many cylinders does the car with the least accelerate have?","CREATE TABLE CARS_DATA (cylinders VARCHAR, Id VARCHAR, accelerate VARCHAR); CREATE TABLE CAR_NAMES (MakeId VARCHAR, Model VARCHAR);",SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate LIMIT 1;,"SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = ""Volvo"" AND T2.accelerate = ""Least"";",0 What is the lowest round with a place of t15 in a year earlier than 1998?,"CREATE TABLE table_name_15 (round_1 INTEGER, place VARCHAR, year VARCHAR);","SELECT MIN(round_1) FROM table_name_15 WHERE place = ""t15"" AND year < 1998;","SELECT MIN(round_1) FROM table_name_15 WHERE place = ""t15"" AND year 1998;",0 "Insert a new virtual tour into the ""virtual_tours"" table for 'Paris' with an ID of 22, a description of 'A virtual tour of the Louvre', and a price of 18.99","CREATE TABLE virtual_tours (tour_id INT, location VARCHAR(50), description TEXT, price DECIMAL(5,2));","INSERT INTO virtual_tours (tour_id, location, description, price) VALUES (22, 'Paris', 'A virtual tour of the Louvre', 18.99);","INSERT INTO virtual_tours (tour_id, location, description, price) VALUES (22, 'Paris', 'A virtual tour of the Louvre', 18.99);",1 What is the total number of Ethereum transactions and their corresponding timestamps?,"CREATE TABLE ethereum_transactions (tx_id INT, tx_time DATETIME);","SELECT COUNT(tx_id), tx_time FROM ethereum_transactions;","SELECT COUNT(*), tx_time FROM ethereum_transactions;",0 "Insert new records into the community_policing table for the following user_id, follow_up, and date: (3001, 'pending', '2022-07-01')?","CREATE TABLE community_policing (id INT, user_id INT, follow_up VARCHAR(10), interaction_date DATE); ","INSERT INTO community_policing (user_id, follow_up, interaction_date) VALUES (3001, 'pending', '2022-07-01');","INSERT INTO community_policing (id, user_id, follow_up, interaction_date) VALUES (3001, 'pending', '2022-07-01');",0 Which Info has an Album of romeo?,"CREATE TABLE table_name_95 (info VARCHAR, album VARCHAR);","SELECT info FROM table_name_95 WHERE album = ""romeo"";","SELECT info FROM table_name_95 WHERE album = ""romeo"";",1 What is the average depth of marine protected areas with a conservation status of 'Least Concern'?,"CREATE TABLE marine_protected_areas (id INT, name VARCHAR(255), area_size FLOAT, avg_depth FLOAT, conservation_status VARCHAR(100)); ",SELECT AVG(avg_depth) FROM marine_protected_areas WHERE conservation_status = 'Least Concern';,SELECT AVG(avg_depth) FROM marine_protected_areas WHERE conservation_status = 'Least Concern';,1 "What is the distribution of case types by victim's gender, ordered by the number of cases?","CREATE TABLE victims (id INT, case_id INT, gender VARCHAR(255)); ","SELECT gender, type, COUNT(*) as case_count, ROW_NUMBER() OVER(PARTITION BY gender ORDER BY COUNT(*) DESC) as sequence FROM victims JOIN cases ON victims.case_id = cases.id GROUP BY gender, type;","SELECT gender, COUNT(*) as num_cases FROM victims GROUP BY gender ORDER BY num_cases DESC;",0 Which mid-hill zone has a slightly warm temperature?,"CREATE TABLE table_name_87 (high_hill_zone VARCHAR, mid_hill_zone VARCHAR);","SELECT high_hill_zone FROM table_name_87 WHERE mid_hill_zone = ""slightly warm temperature"";","SELECT high_hill_zone FROM table_name_87 WHERE mid_hill_zone = ""slightly warm"";",0 What is the Score of the game with a Record of 31–37–9?,"CREATE TABLE table_name_3 (score VARCHAR, record VARCHAR);","SELECT score FROM table_name_3 WHERE record = ""31–37–9"";","SELECT score FROM table_name_3 WHERE record = ""31–37–9"";",1 What is the time of the swimmer in rank 40?,"CREATE TABLE table_name_47 (time VARCHAR, rank VARCHAR);",SELECT time FROM table_name_47 WHERE rank = 40;,"SELECT time FROM table_name_47 WHERE rank = ""40"";",0 What date was the game played when it was located at bells beach?,"CREATE TABLE table_name_8 (date VARCHAR, location VARCHAR);","SELECT date FROM table_name_8 WHERE location = ""bells beach"";","SELECT date FROM table_name_8 WHERE location = ""bells beach"";",1 Which total number of starts has more than 2 wins and a money list rank greater than 1?,"CREATE TABLE table_name_18 (starts VARCHAR, wins VARCHAR, money_list_rank VARCHAR);",SELECT COUNT(starts) FROM table_name_18 WHERE wins > 2 AND money_list_rank > 1;,SELECT COUNT(starts) FROM table_name_18 WHERE wins > 2 AND money_list_rank > 1;,1 "List astronauts who have participated in missions to Mars, along with their medical records?","CREATE TABLE Astronauts (id INT, name VARCHAR(50), missions VARCHAR(50)); CREATE TABLE MedicalRecords (id INT, astronaut_id INT, height FLOAT, weight FLOAT); ","SELECT Astronauts.name, MedicalRecords.height, MedicalRecords.weight FROM Astronauts INNER JOIN MedicalRecords ON Astronauts.id = MedicalRecords.astronaut_id WHERE Astronauts.missions LIKE '%Mars%';","SELECT Astronauts.name, MedicalRecords.height, MedicalRecords.weight FROM Astronauts INNER JOIN MedicalRecords ON Astronauts.id = MedicalRecords.astronaut_id WHERE Astronauts.missions = 'Mars';",0 How many times is the new points 2690?,"CREATE TABLE table_24431348_20 (status VARCHAR, new_points VARCHAR);",SELECT COUNT(status) FROM table_24431348_20 WHERE new_points = 2690;,SELECT COUNT(status) FROM table_24431348_20 WHERE new_points = 2690;,1 what was the ACC home game record for the team who's ACC winning percentage was .813?,"CREATE TABLE table_16372911_1 (acc_home VARCHAR, acc__percentage VARCHAR);","SELECT acc_home FROM table_16372911_1 WHERE acc__percentage = "".813"";","SELECT acc_home FROM table_16372911_1 WHERE acc__percentage = "".813"";",1 What is the maximum carbon sequestration value for each region over the last 5 years?,"CREATE TABLE forest_carbon_max (id INT, region VARCHAR(20), year INT, carbon_value FLOAT);","SELECT region, MAX(carbon_value) as max_carbon_value FROM forest_carbon_max WHERE year BETWEEN 2017 AND 2021 GROUP BY region;","SELECT region, MAX(carbon_value) FROM forest_carbon_max WHERE year >= YEAR(CURRENT_DATE) - 5 GROUP BY region;",0 What is the L2 cache for the Mobile Pentium 333?,"CREATE TABLE table_name_48 (l2_cache VARCHAR, model_number VARCHAR);","SELECT l2_cache FROM table_name_48 WHERE model_number = ""mobile pentium 333"";","SELECT l2_cache FROM table_name_48 WHERE model_number = ""mobile pentium 333"";",1 What is the total number of autonomous vehicles in the London public transportation system?,"CREATE TABLE vehicles (vehicle_id INT, is_autonomous BOOLEAN, system_type VARCHAR(20)); ",SELECT COUNT(*) FROM vehicles WHERE is_autonomous = true AND system_type = 'Public Transportation';,SELECT COUNT(*) FROM vehicles WHERE is_autonomous = true AND system_type = 'London Public Transportation';,0 What is the highest number of goals Eisbären Berlin had along with 13 points and 10 assists?,"CREATE TABLE table_name_4 (goals INTEGER, club VARCHAR, points VARCHAR, assists VARCHAR);","SELECT MAX(goals) FROM table_name_4 WHERE points = 13 AND assists = 10 AND club = ""eisbären berlin"";","SELECT MAX(goals) FROM table_name_4 WHERE points = 13 AND assists = 10 AND club = ""eisbären berlin"";",1 How many players from Africa and South America have adopted VR technology?,"CREATE TABLE players (player_id INT, age INT, platform VARCHAR(20), region VARCHAR(50)); CREATE TABLE vr_tech (player_id INT, vr_platform VARCHAR(20)); ","SELECT 'Africa' AS continent, COUNT(DISTINCT p.player_id) AS num_players FROM players p JOIN vr_tech v ON p.player_id = v.player_id WHERE p.region = 'Africa' UNION ALL SELECT 'South America' AS continent, COUNT(DISTINCT p.player_id) AS num_players FROM players p JOIN vr_tech v ON p.player_id = v.player_id WHERE p.region = 'South America';","SELECT COUNT(*) FROM players INNER JOIN vr_tech ON players.player_id = vr_tech.player_id WHERE players.region IN ('Africa', 'South America');",0 In 1983 what is the tournament that is 0 / 1?,CREATE TABLE table_name_24 (tournament VARCHAR);,"SELECT tournament FROM table_name_24 WHERE 1983 = ""0 / 1"";","SELECT 1983 FROM table_name_24 WHERE tournament = ""0 / 1"";",0 What's the tail number of the airplane involved in the accident described as crashed?,"CREATE TABLE table_229917_2 (tail_number VARCHAR, brief_description VARCHAR);","SELECT tail_number FROM table_229917_2 WHERE brief_description = ""Crashed"";","SELECT tail_number FROM table_229917_2 WHERE brief_description = ""Crashed"";",1 What line has Newmarket Junction terminus?,"CREATE TABLE table_name_4 (line_name VARCHAR, terminus VARCHAR);","SELECT line_name FROM table_name_4 WHERE terminus = ""newmarket junction"";","SELECT line_name FROM table_name_4 WHERE terminus = ""newmarket junction"";",1 Create a view 'smart_grid_view' for 'smart_grid',"CREATE TABLE smart_grid (id INT PRIMARY KEY, city VARCHAR(50), power_sources VARCHAR(50), renewable_energy_percentage INT);",CREATE VIEW smart_grid_view AS SELECT * FROM smart_grid;,CREATE VIEW smart_grid_view AS SELECT * FROM smart_grid;,1 What was the score in the game in which Michael Beasley (26) did the high points?,"CREATE TABLE table_27756314_11 (score VARCHAR, high_points VARCHAR);","SELECT score FROM table_27756314_11 WHERE high_points = ""Michael Beasley (26)"";","SELECT score FROM table_27756314_11 WHERE high_points = ""Michael Beasley (26)"";",1 Which driver had a grid number of 18?,"CREATE TABLE table_name_55 (driver VARCHAR, grid VARCHAR);","SELECT driver FROM table_name_55 WHERE grid = ""18"";",SELECT driver FROM table_name_55 WHERE grid = 18;,0 How many safety incidents have been reported for each satellite deployment project?,"CREATE TABLE safety_incidents (incident_id INT, satellite_id INT, incident_description VARCHAR(500)); CREATE TABLE satellite_deployment (satellite_id INT, project_name VARCHAR(50));","SELECT project_name, COUNT(safety_incidents.incident_id) as num_incidents FROM safety_incidents JOIN satellite_deployment ON safety_incidents.satellite_id = satellite_deployment.satellite_id GROUP BY project_name;","SELECT satellite_deployment.project_name, COUNT(safety_incidents.incident_id) FROM safety_incidents INNER JOIN satellite_deployment ON safety_incidents.satellite_id = satellite_deployment.satellite_id GROUP BY satellite_deployment.project_name;",0 Name the memory for meodel number for atom e640t,"CREATE TABLE table_16729930_17 (memory VARCHAR, model_number VARCHAR);","SELECT memory FROM table_16729930_17 WHERE model_number = ""Atom E640T"";","SELECT memory FROM table_16729930_17 WHERE model_number = ""Atom E640T"";",1 What is the infection rate of HIV in North America?,"CREATE TABLE Disease (Name TEXT, Region TEXT, InfectionRate FLOAT); ",SELECT InfectionRate FROM Disease WHERE Name = 'HIV' AND Region = 'North America';,SELECT InfectionRate FROM Disease WHERE Region = 'North America';,0 What was the away team for the New Zealand breakers?,"CREATE TABLE table_name_59 (report VARCHAR, away_team VARCHAR);","SELECT report FROM table_name_59 WHERE away_team = ""new zealand breakers"";","SELECT report FROM table_name_59 WHERE away_team = ""new zealand breakers"";",1 What number of years did the red bull sauber petronas have greater than 6 points?,"CREATE TABLE table_name_90 (year VARCHAR, entrant VARCHAR, points VARCHAR);","SELECT COUNT(year) FROM table_name_90 WHERE entrant = ""red bull sauber petronas"" AND points > 6;","SELECT COUNT(year) FROM table_name_90 WHERE entrant = ""red bull sauber petronas"" AND points > 6;",1 What is the contribution rank of each donor within their location?,"CREATE TABLE donors (id INT, name TEXT, age INT, gender TEXT, contribution FLOAT, location TEXT); ","SELECT *, DENSE_RANK() OVER (PARTITION BY location ORDER BY contribution DESC) as contribution_rank FROM donors;","SELECT location, contribution, RANK() OVER (ORDER BY contribution DESC) as rank FROM donors;",0 How many field goals does the player with 84 rebounds have?,"CREATE TABLE table_24912693_4 (field_goals INTEGER, rebounds VARCHAR);",SELECT MIN(field_goals) FROM table_24912693_4 WHERE rebounds = 84;,SELECT MAX(field_goals) FROM table_24912693_4 WHERE rebounds = 84;,0 Which Name has a Bullett of 10.57 (.416) and a Base of 14.96 (.589)?,"CREATE TABLE table_name_86 (name VARCHAR, bullet VARCHAR, base VARCHAR);","SELECT name FROM table_name_86 WHERE bullet = ""10.57 (.416)"" AND base = ""14.96 (.589)"";","SELECT name FROM table_name_86 WHERE bullet = ""10.57 (.416)"" AND base = ""14.96 (.589)"";",1 What is the average GRE score for students in the Computer Science department?,"CREATE TABLE students (id INT, name VARCHAR(50), department VARCHAR(50), gre_score INT); ",SELECT AVG(gre_score) FROM students WHERE department = 'Computer Science';,SELECT AVG(gre_score) FROM students WHERE department = 'Computer Science';,1 Identify AI models with inconsistent safety and fairness scores.,"CREATE TABLE ai_models (model_name TEXT, safety_score INTEGER, fairness_score INTEGER); ",SELECT model_name FROM ai_models WHERE safety_score < 80 AND fairness_score < 80;,SELECT model_name FROM ai_models WHERE safety_score IN (SELECT MAX(safety_score) FROM ai_models);,0 What is the total research grant amount awarded to the 'Physics' department in the year 2020?,"CREATE TABLE departments (id INT, name TEXT); CREATE TABLE grants (id INT, department_id INT, amount INT, year INT); ",SELECT SUM(amount) FROM grants WHERE department_id = (SELECT id FROM departments WHERE name = 'Physics') AND year = 2020;,SELECT SUM(grants.amount) FROM grants JOIN departments ON grants.department_id = departments.id WHERE departments.name = 'Physics' AND grants.year = 2020;,0 what is the time when the event is bellator 89?,"CREATE TABLE table_name_15 (time VARCHAR, event VARCHAR);","SELECT time FROM table_name_15 WHERE event = ""bellator 89"";","SELECT time FROM table_name_15 WHERE event = ""bellator 89"";",1 What is the maximum budget of a SIGINT agency?,"CREATE SCHEMA if not exists sigint_max_budget AUTHORIZATION defsec;CREATE TABLE if not exists sigint_max_budget.info (id INT, name VARCHAR(100), budget INT);",SELECT MAX(budget) as max_budget FROM sigint_max_budget.info WHERE name LIKE '%SIGINT%';,SELECT MAX(budget) FROM sigint_max_budget.info WHERE name = 'SIGINT Agency';,0 What average year contains the title of machineries of joy vol. 4?,"CREATE TABLE table_name_54 (year INTEGER, title VARCHAR);","SELECT AVG(year) FROM table_name_54 WHERE title = ""machineries of joy vol. 4"";","SELECT AVG(year) FROM table_name_54 WHERE title = ""machines of joy vol. 4"";",0 What is the distribution of language preservation initiatives by language and country?,"CREATE TABLE language_preservation (id INT, language VARCHAR(255), initiative VARCHAR(255), country VARCHAR(255)); CREATE VIEW language_preservation_by_country_language AS SELECT country, language, COUNT(*) as initiative_count FROM language_preservation GROUP BY country, language;","SELECT country, language, initiative_count FROM language_preservation_by_country_language;","SELECT language, country, initiative_count, COUNT(*) as initiative_count FROM language_preservation_by_country_language GROUP BY language, country;",0 Which grid is the highest and has a time/retired of +0.3?,"CREATE TABLE table_name_11 (grid INTEGER, time_retired VARCHAR);","SELECT MAX(grid) FROM table_name_11 WHERE time_retired = ""+0.3"";","SELECT MAX(grid) FROM table_name_11 WHERE time_retired = ""+0.3"";",1 How many donors have made donations in each quarter of the year?,"CREATE TABLE donor_transactions (donor_id INT, donation_date DATE); ","SELECT DATE_PART('quarter', donation_date) AS quarter, COUNT(DISTINCT donor_id) AS donor_count FROM donor_transactions GROUP BY quarter;","SELECT DATE_FORMAT(donation_date, '%Y-%m') as quarter, COUNT(DISTINCT donor_id) as num_donors FROM donor_transactions GROUP BY quarter;",0 what's current club with position being center and no being bigger than 12.0,"CREATE TABLE table_12962773_1 (current_club VARCHAR, position VARCHAR, no VARCHAR);","SELECT current_club FROM table_12962773_1 WHERE position = ""Center"" AND no > 12.0;","SELECT current_club FROM table_12962773_1 WHERE position = ""Center"" AND no > 12.0;",1 What is the maximum number of disaster response teams available in each region?,"CREATE TABLE regions (rid INT, region_name VARCHAR(255)); CREATE TABLE response_teams (tid INT, rid INT, team_size INT);","SELECT r.region_name, MAX(t.team_size) FROM regions r INNER JOIN response_teams t ON r.rid = t.rid GROUP BY r.region_name;","SELECT regions.rid, MAX(response_teams.team_size) FROM regions INNER JOIN response_teams ON regions.rid = response_teams.rid GROUP BY regions.rid;",0 Insert a new employee into the employees table,"CREATE SCHEMA hr; CREATE TABLE employees (id INT, name VARCHAR(50), department VARCHAR(50), salary DECIMAL(10,2));","INSERT INTO employees (id, name, department, salary) VALUES (4, 'Alice Davis', 'IT', 80000.00);","INSERT INTO hr.employees (id, name, department, salary) VALUES (1, 'Jane', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees'), (2, 'Jane', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees'), (3, 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees', 'Employees');",0 How many containers were shipped from the US to the Netherlands in Q1 of 2019?,"CREATE TABLE ports (port_id INT, port_name TEXT, country TEXT);CREATE TABLE shipments (shipment_id INT, shipment_weight INT, ship_date DATE, port_id INT); ",SELECT COUNT(*) FROM shipments JOIN ports ON shipments.port_id = ports.port_id WHERE ports.country = 'USA' AND ports.port_name = 'Port of Oakland' AND ship_date BETWEEN '2019-01-01' AND '2019-03-31';,SELECT COUNT(*) FROM shipments JOIN ports ON shipments.port_id = ports.port_id WHERE ports.country = 'USA' AND shipments.ship_date BETWEEN '2019-01-01' AND '2019-03-31';,0 What was the overall record of the game lost by A. Pracher (4-1)?,"CREATE TABLE table_27862483_3 (overall_record VARCHAR, loss VARCHAR);","SELECT overall_record FROM table_27862483_3 WHERE loss = ""A. Pracher (4-1)"";","SELECT overall_record FROM table_27862483_3 WHERE loss = ""A. Pracher (4-1)"";",1 Who is the player for Zimbabwe?,"CREATE TABLE table_name_45 (player VARCHAR, country VARCHAR);","SELECT player FROM table_name_45 WHERE country = ""zimbabwe"";","SELECT player FROM table_name_45 WHERE country = ""zimbabwe"";",1 "List the number of employees by job level from the ""positions"" table","CREATE TABLE positions (id INT, employee_id INT, position_title TEXT, job_level INT);","SELECT position_title, job_level, COUNT(*) as count FROM positions GROUP BY position_title, job_level;","SELECT job_level, COUNT(*) FROM positions GROUP BY job_level;",0 What are the communication strategies used by organizations in the climate adaptation sector?,"CREATE TABLE climate_adaptation (org_name VARCHAR(50), strategy TEXT); ","SELECT strategy FROM climate_adaptation WHERE org_name IN ('UNFCCC', 'WRI', 'WWF');",SELECT strategy FROM climate_adaptation;,0 "What were the total sales revenues for the drug ""Keytruda"" by company in 2020?","CREATE TABLE pharmaceutical_sales (company VARCHAR(255), drug VARCHAR(255), qty_sold INT, sales_revenue FLOAT, sale_date DATE); ","SELECT company, SUM(sales_revenue) FROM pharmaceutical_sales WHERE drug = 'Keytruda' AND sale_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY company;","SELECT company, SUM(sales_revenue) FROM pharmaceutical_sales WHERE drug = 'Keytruda' AND YEAR(sale_date) = 2020 GROUP BY company;",0 What is the type of sco country?,"CREATE TABLE table_name_92 (type VARCHAR, country VARCHAR);","SELECT type FROM table_name_92 WHERE country = ""sco"";","SELECT type FROM table_name_92 WHERE country = ""sco"";",1 What year did maggs magnificent mild bear win overall at the camra reading branch beer festival?,"CREATE TABLE table_name_62 (year INTEGER, category VARCHAR, beer_name VARCHAR, competition VARCHAR);","SELECT MAX(year) FROM table_name_62 WHERE beer_name = ""maggs magnificent mild"" AND competition = ""camra reading branch beer festival"" AND category = ""overall"";","SELECT AVG(year) FROM table_name_62 WHERE beer_name = ""maggs magnificent mild bear"" AND competition = ""camra reading branch beer festival"";",0 What are the scores when total score/week is 41/60 and co-contestant is Shalini Chandran?,"CREATE TABLE table_name_10 (scores_by_each_individual_judge VARCHAR, total_score_week VARCHAR, co_contestant__yaar_vs_pyaar_ VARCHAR);","SELECT scores_by_each_individual_judge FROM table_name_10 WHERE total_score_week = ""41/60"" AND co_contestant__yaar_vs_pyaar_ = ""shalini chandran"";","SELECT scores_by_each_individual_judge FROM table_name_10 WHERE total_score_week = ""41/60"" AND co_contestant__yaar_vs_pyaar_ = ""shalini chandran"";",1 Show the total revenue generated from sustainable tourism in Barcelona in the last 12 months.,"CREATE TABLE bookings (id INT, hotel_id INT, date DATE, revenue INT); CREATE TABLE hotels (id INT, city VARCHAR(20), sustainable BOOLEAN); ","SELECT SUM(b.revenue) FROM bookings b JOIN hotels h ON b.hotel_id = h.id WHERE h.city = 'Barcelona' AND b.date BETWEEN DATE_SUB(NOW(), INTERVAL 12 MONTH) AND NOW() AND h.sustainable = true;","SELECT SUM(bookings.revenue) FROM bookings INNER JOIN hotels ON bookings.hotel_id = hotels.id WHERE hotels.city = 'Barcelona' AND hotels.sustainable = true AND bookings.date >= DATEADD(month, -12, GETDATE());",0 How many genetic research patents have been filed in Brazil and Argentina?,"CREATE SCHEMA if not exists genetic_research; CREATE TABLE if not exists genetic_research.patents (id INT, country VARCHAR(50), patent_type VARCHAR(50), status VARCHAR(50)); ","SELECT COUNT(*) FROM genetic_research.patents WHERE country IN ('Brazil', 'Argentina') AND patent_type IN ('Utility', 'Design');","SELECT COUNT(*) FROM genetic_research.patents WHERE country IN ('Brazil', 'Argentina');",0 List unique AI-powered hotel features in the Middle East and South America.,"CREATE TABLE hotel_features (hotel_id INT, location VARCHAR(20), feature VARCHAR(30));","SELECT DISTINCT feature FROM hotel_features WHERE location IN ('Middle East', 'South America') AND feature LIKE '%AI%'","SELECT DISTINCT feature FROM hotel_features WHERE location IN ('Middle East', 'South America');",0 "What is the highest To Par, when Year(s) Won is ""1962 , 1967""?","CREATE TABLE table_name_66 (to_par INTEGER, year_s__won VARCHAR);","SELECT MAX(to_par) FROM table_name_66 WHERE year_s__won = ""1962 , 1967"";","SELECT MAX(to_par) FROM table_name_66 WHERE year_s__won = ""1962, 1967"";",0 Which languages are spoken in the same countries as the language 'Swahili'?,"CREATE TABLE Languages (id INT, country VARCHAR(50), language VARCHAR(50), spoken INT);",SELECT language FROM Languages WHERE country IN (SELECT country FROM Languages WHERE language = 'Swahili');,SELECT language FROM Languages WHERE language = 'Swahili';,0 What is the total 'carbon footprint' of 'manufacturing' in 'China'?,"CREATE TABLE processes (id INT, name TEXT, type TEXT, carbon_footprint FLOAT); ",SELECT SUM(carbon_footprint) FROM processes WHERE type = 'manufacturing' AND location = 'China';,SELECT SUM(carbon_footprint) FROM processes WHERE type ='manufacturing' AND country = 'China';,0 Get the number of unique visitors who attended workshops in the last month,"CREATE TABLE WorkshopAttendance (id INT, visitor_id INT, date DATE); ","SELECT COUNT(DISTINCT visitor_id) FROM WorkshopAttendance WHERE date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 30 DAY) AND CURRENT_DATE;","SELECT COUNT(DISTINCT visitor_id) FROM WorkshopAttendance WHERE date >= DATEADD(month, -1, GETDATE());",0 How many clinics are there in the state of New York that specialize in primary care?,"CREATE TABLE clinics (name TEXT, state TEXT, specialty TEXT); ",SELECT COUNT(*) FROM clinics WHERE state = 'New York' AND specialty = 'Primary Care';,SELECT COUNT(*) FROM clinics WHERE state = 'New York' AND specialty = 'Primary Care';,1 "Which party belongs to district 41, and is delegated by Jill P. Carter?","CREATE TABLE table_name_61 (party VARCHAR, district VARCHAR, delegate VARCHAR);","SELECT party FROM table_name_61 WHERE district = 41 AND delegate = ""jill p. carter"";","SELECT party FROM table_name_61 WHERE district = 41 AND delegate = ""jill p. carroll"";",0 How many scores are there when the championship game opponent is Miami University?,"CREATE TABLE table_22165661_3 (score VARCHAR, championship_game_opponent VARCHAR);","SELECT COUNT(score) FROM table_22165661_3 WHERE championship_game_opponent = ""Miami University"";","SELECT COUNT(score) FROM table_22165661_3 WHERE championship_game_opponent = ""Miami University"";",1 What is the name of the person with a total of 22?,"CREATE TABLE table_name_6 (name VARCHAR, total VARCHAR);",SELECT name FROM table_name_6 WHERE total = 22;,SELECT name FROM table_name_6 WHERE total = 22;,1 What is the lowest grid number for Yamaha?,"CREATE TABLE table_name_3 (grid INTEGER, manufacturer VARCHAR);","SELECT MIN(grid) FROM table_name_3 WHERE manufacturer = ""yamaha"";","SELECT MIN(grid) FROM table_name_3 WHERE manufacturer = ""yamaha"";",1 What was the largest crowd at a game where Collingwood was the away team?,"CREATE TABLE table_name_13 (crowd INTEGER, away_team VARCHAR);","SELECT MAX(crowd) FROM table_name_13 WHERE away_team = ""collingwood"";","SELECT MAX(crowd) FROM table_name_13 WHERE away_team = ""collingwood"";",1 "What is the minimum range of electric scooters in the ""electric_scooters"" table?","CREATE TABLE electric_scooters (id INT, scooter_type VARCHAR(255), range INT); ",SELECT MIN(range) FROM electric_scooters WHERE scooter_type = 'Stand-Up';,SELECT MIN(range) FROM electric_scooters;,0 "What is the date of the tournament played in Madrid, Spain?","CREATE TABLE table_name_90 (date VARCHAR, tournament VARCHAR);","SELECT date FROM table_name_90 WHERE tournament = ""madrid, spain"";","SELECT date FROM table_name_90 WHERE tournament = ""madrid, spain"";",1 What is the total number of cases for each justice category in a given year and their resolution status?,"CREATE TABLE CasesByJusticeCategory (Year INT, Category TEXT, Resolution TEXT, TotalCases INT); ","SELECT Category, Resolution, SUM(TotalCases) FROM CasesByJusticeCategory GROUP BY Category, Resolution;","SELECT Category, SUM(TotalCases) FROM CasesByJusticeCategory GROUP BY Category;",0 "Delete records in recycling_rates table where the region is not 'Asia', 'NA', 'EU'","CREATE TABLE recycling_rates (region VARCHAR(50), recycling_rate INT); ","DELETE FROM recycling_rates WHERE region NOT IN ('Asia', 'NA', 'EU');","DELETE FROM recycling_rates WHERE region!= 'Asia', 'NA', 'EU';",0 How many millions of U.S. viewers watched the episode with the production code of 6AKY07?,"CREATE TABLE table_28027307_1 (us_viewers__millions_ VARCHAR, production_code VARCHAR);","SELECT us_viewers__millions_ FROM table_28027307_1 WHERE production_code = ""6AKY07"";","SELECT us_viewers__millions_ FROM table_28027307_1 WHERE production_code = ""6AKY07"";",1 Show the hometowns shared by at least two teachers.,CREATE TABLE teacher (Hometown VARCHAR);,SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2;,SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2;,1 What is the average data usage for mobile subscribers in each country?,"CREATE TABLE mobile_subscribers (subscriber_id INT, country VARCHAR(50), data_usage INT); ","SELECT country, AVG(data_usage) AS avg_data_usage FROM mobile_subscribers GROUP BY country;","SELECT country, AVG(data_usage) FROM mobile_subscribers GROUP BY country;",0 What explosion had an altitude of 539 km?,"CREATE TABLE table_148578_1 (explosion VARCHAR, altitude__km_ VARCHAR);","SELECT explosion FROM table_148578_1 WHERE altitude__km_ = ""539"";","SELECT explosion FROM table_148578_1 WHERE altitude__km_ = ""539"";",1 "Determine the average age of visitors and their ranking by continent, grouped into 10-year intervals.","CREATE TABLE Continent (Id INT, Continent VARCHAR(50)); CREATE TABLE Visitor (Id INT, Age INT, ContinentId INT);","SELECT RANK() OVER (PARTITION BY c.Continent ORDER BY AVG(v.Age) DESC) as AgeRank, c.Continent, FLOOR(v.Age/10)*10 as AgeGroup, AVG(v.Age) as AverageAge FROM Continent c JOIN Visitor v ON c.Id = v.ContinentId GROUP BY c.Continent, AgeRank, AgeGroup ORDER BY c.Continent, AgeRank;","SELECT Continent, AVG(Age) as AvgAge, RANK() OVER (ORDER BY AVG(Age) DESC) as Rank FROM Visitor JOIN Continent ON Visitor.ContinentId = Continent.Id GROUP BY Continent ORDER BY Rank DESC;",0 Find the average number of electric trams per city in Australia.,"CREATE TABLE electric_trams (city VARCHAR(20), num_trams INT); ",SELECT AVG(num_trams) FROM electric_trams WHERE city LIKE 'M%' OR city LIKE 'S%' OR city LIKE 'B%' OR city LIKE 'A%' OR city LIKE 'P%';,"SELECT city, AVG(num_trams) FROM electric_trams GROUP BY city;",0 Which batter has the last name Graham?,"CREATE TABLE table_name_61 (bats VARCHAR, surname VARCHAR);","SELECT bats FROM table_name_61 WHERE surname = ""graham"";","SELECT batters FROM table_name_61 WHERE surname = ""graham"";",0 What is the difference in the number of members between unions 'N' and 'O'?,CREATE TABLE UnionN(member_id INT); CREATE TABLE UnionO(member_id INT); ,SELECT COUNT(*) FROM UnionN EXCEPT SELECT COUNT(*) FROM UnionO;,SELECT COUNT(DISTINCT member_id) - COUNT(DISTINCT member_id) FROM UnionN JOIN UnionO ON UnionN.member_id = UnionO.member_id;,0 What is the success rate of each astrophysics research project in terms of successful experiments?,"CREATE TABLE ResearchProjects (id INT, name VARCHAR(255), successful_experiments INT, total_experiments INT); ","SELECT name, (successful_experiments * 100 / total_experiments) AS success_rate FROM ResearchProjects;","SELECT name, success_experiments, SUM(total_experiments) as total_experiments FROM ResearchProjects GROUP BY name;",0 Which venue was used on 10 september 2010?,"CREATE TABLE table_name_28 (venue VARCHAR, date VARCHAR);","SELECT venue FROM table_name_28 WHERE date = ""10 september 2010"";","SELECT venue FROM table_name_28 WHERE date = ""10 september 2010"";",1 what's the report with race argentine grand prix,"CREATE TABLE table_1140080_2 (report VARCHAR, race VARCHAR);","SELECT report FROM table_1140080_2 WHERE race = ""Argentine Grand Prix"";","SELECT report FROM table_1140080_2 WHERE race = ""Argentine Grand Prix"";",1 "What was the position of the player picked after 94, by the Boston Patriots?","CREATE TABLE table_name_96 (position VARCHAR, pick VARCHAR, team VARCHAR);","SELECT position FROM table_name_96 WHERE pick > 94 AND team = ""boston patriots"";","SELECT position FROM table_name_96 WHERE pick > 94 AND team = ""boston patriots"";",1 What is the distribution of policyholder ages by policy type?,"CREATE TABLE Policyholder (PolicyholderID INT, Age INT, PolicyType VARCHAR(20)); ","SELECT PolicyType, Age, COUNT(*) OVER (PARTITION BY PolicyType, Age) AS CountByTypeAge, ROW_NUMBER() OVER (PARTITION BY PolicyType ORDER BY Age) AS RankByPolicyType FROM Policyholder;","SELECT PolicyType, COUNT(*) FROM Policyholder GROUP BY PolicyType;",0 What is the minimum listing price for properties in New York that are co-owned?,"CREATE TABLE properties (id INT, city VARCHAR(50), listing_price DECIMAL(10, 2), co_owned BOOLEAN); ",SELECT MIN(listing_price) FROM properties WHERE city = 'New York' AND co_owned = TRUE;,SELECT MIN(listing_price) FROM properties WHERE city = 'New York' AND co_owned = true;,0 What is the distribution of weights lifted by members who identify as non-binary?,"CREATE TABLE weights (id INT, member_id INT, weight FLOAT); CREATE TABLE members (id INT, gender VARCHAR(10)); ","SELECT gender, AVG(weight) as avg_weight, STDDEV(weight) as stddev_weight FROM weights JOIN members ON weights.member_id = members.id WHERE members.gender = 'non-binary' GROUP BY gender;",SELECT COUNT(*) FROM weights JOIN members ON weights.member_id = members.id WHERE members.gender = 'Non-binary';,0 What is the average age of attendees for music and dance events in Texas and their total funding?,"CREATE TABLE tx_events (id INT, event_type VARCHAR(10), avg_age FLOAT, funding INT); ","SELECT AVG(txe.avg_age), SUM(txe.funding) FROM tx_events txe WHERE txe.event_type IN ('Music', 'Dance') AND txe.state = 'TX';","SELECT event_type, AVG(avg_age) as avg_age, SUM(funding) as total_funding FROM tx_events WHERE event_type IN ('music', 'dance') GROUP BY event_type;",0 Find the most recent mission for each spacecraft that had a female commander.,"CREATE TABLE Spacecraft_Missions (id INT, spacecraft_id INT, mission_name VARCHAR(100), mission_date DATE, commander_gender VARCHAR(10)); ","SELECT spacecraft_id, MAX(mission_date) as most_recent_mission FROM Spacecraft_Missions WHERE commander_gender = 'Female' GROUP BY spacecraft_id","SELECT spacecraft_id, MAX(mission_date) FROM Spacecraft_Missions WHERE commander_gender = 'Female' GROUP BY spacecraft_id;",0 Which Album has a Label of msb 801?,"CREATE TABLE table_name_87 (album VARCHAR, label VARCHAR);","SELECT album FROM table_name_87 WHERE label = ""msb 801"";","SELECT album FROM table_name_87 WHERE label = ""msb 801"";",1 What is the average to par for a score of 78-67-73=218?,"CREATE TABLE table_name_2 (to_par INTEGER, score VARCHAR);",SELECT AVG(to_par) FROM table_name_2 WHERE score = 78 - 67 - 73 = 218;,SELECT AVG(to_par) FROM table_name_2 WHERE score = 78 - 67 - 73 = 218;,1 Insert a new record of a shark sighting in the Indian Ocean,"CREATE TABLE shark_sightings (id INT PRIMARY KEY, species VARCHAR(255), location VARCHAR(255), sighting_date DATE);","INSERT INTO shark_sightings (id, species, location, sighting_date) VALUES (1, 'Great White Shark', 'Indian Ocean', '2023-03-12');","INSERT INTO shark_sightings (id, species, location, sighting_date) VALUES (1, 'Hawk', 'Indian Ocean', '2022-03-01');",0 "What is the mean number of wins for the norton team in 1966, when there are 8 points?","CREATE TABLE table_name_8 (wins INTEGER, points VARCHAR, team VARCHAR, year VARCHAR);","SELECT AVG(wins) FROM table_name_8 WHERE team = ""norton"" AND year = 1966 AND points = 8;","SELECT AVG(wins) FROM table_name_8 WHERE team = ""norton"" AND year = 1966 AND points = 8;",1 What was the grid for Bruno Junqueira for Dale Coyne Racing?,"CREATE TABLE table_name_45 (grid VARCHAR, team VARCHAR, driver VARCHAR);","SELECT grid FROM table_name_45 WHERE team = ""dale coyne racing"" AND driver = ""bruno junqueira"";","SELECT grid FROM table_name_45 WHERE team = ""dale coyne racing"" AND driver = ""bruno junqueira"";",1 How many accessible technology initiatives were launched in Africa per year?,"CREATE TABLE accessibility_initiatives (initiative_id INT, initiative_name VARCHAR(50), region VARCHAR(50), launch_year INT); ","SELECT launch_year, COUNT(*) as count FROM accessibility_initiatives WHERE region = 'Africa' GROUP BY launch_year;","SELECT launch_year, COUNT(*) FROM accessibility_initiatives WHERE region = 'Africa' GROUP BY launch_year;",0 Delete a record from the 'VolunteerHours' table,"CREATE TABLE VolunteerHours (VolunteerHoursID INT PRIMARY KEY, VolunteerID INT, Hours DECIMAL(10, 2), VolunteerDate DATE);",DELETE FROM VolunteerHours WHERE VolunteerHoursID = 401;,DELETE FROM VolunteerHours;,0 How many fish farms in Japan have experienced a disease outbreak in the past year?,"CREATE TABLE japanfarms (country VARCHAR(20), disease_outbreak BOOLEAN, year INTEGER); ",SELECT COUNT(*) FROM japanfarms WHERE country = 'Japan' AND disease_outbreak = true AND year = 2021;,SELECT COUNT(*) FROM japanfarms WHERE country = 'Japan' AND disease_outbreak = true AND year >= YEAR(CURRENT_DATE) - 1;,0 Name the least year for walter hagen,"CREATE TABLE table_225880_1 (year INTEGER, runner_s__up VARCHAR);","SELECT MIN(year) FROM table_225880_1 WHERE runner_s__up = ""Walter Hagen"";","SELECT MIN(year) FROM table_225880_1 WHERE runner_s__up = ""Walter Hagen"";",1 Add a new healthcare facility 'RuralHealthFacility11' with 50 beds.,"CREATE TABLE RuralHealthFacility11 (facility_id INT, facility_name VARCHAR(50), num_beds INT);","INSERT INTO RuralHealthFacility11 (facility_id, facility_name, num_beds) VALUES (31, 'RuralHealthFacility11', 50);","INSERT INTO RuralHealthFacility11 (facility_id, facility_name, num_beds) VALUES (1, 'RuralHealthFacility11', 50);",0 Find the number of community health workers by county in Florida.,"CREATE TABLE community_health_workers_fl(county VARCHAR(50), state VARCHAR(2), workers INT); ","SELECT county, workers FROM community_health_workers_fl WHERE state = 'FL';","SELECT county, SUM(workers) FROM community_health_workers_fl GROUP BY county;",0 Who the Owner that has a Lengths Behind of 5½?,"CREATE TABLE table_name_87 (owner VARCHAR, lengths_behind VARCHAR);","SELECT owner FROM table_name_87 WHERE lengths_behind = ""5½"";","SELECT owner FROM table_name_87 WHERE lengths_behind = ""512"";",0 What is the percentage of dairy products that are organic?,"CREATE TABLE products (product_id INT, name VARCHAR(50), dairy BOOLEAN, organic BOOLEAN); ",SELECT 100.0 * COUNT(*) / (SELECT COUNT(*) FROM products WHERE dairy = true) AS percentage FROM products WHERE dairy = true AND organic = true;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM products WHERE dairy = true AND organic = true)) * 100.0 / (SELECT COUNT(*) FROM products WHERE dairy = true AND organic = true);,0 Which country placed t9 and had the player jiyai shin?,"CREATE TABLE table_name_95 (country VARCHAR, place VARCHAR, player VARCHAR);","SELECT country FROM table_name_95 WHERE place = ""t9"" AND player = ""jiyai shin"";","SELECT country FROM table_name_95 WHERE place = ""t9"" AND player = ""jiyai shin"";",1 What is the hotel with the lowest number of virtual tour engagements in Q2 2022?,"CREATE TABLE hotel_vt_stats (id INT, quarter TEXT, hotel_name TEXT, virtual_tour_views INT); ","SELECT hotel_name, MIN(virtual_tour_views) FROM hotel_vt_stats WHERE quarter = 'Q2 2022' GROUP BY hotel_name;","SELECT hotel_name, MIN(virtual_tour_views) FROM hotel_vt_stats WHERE quarter = 2 GROUP BY hotel_name;",0 What is the total amount of waste produced by companies in the circular economy in the past year?,"CREATE TABLE companies (id INT, name TEXT, industry TEXT, circular_economy TEXT, waste_production_tonnes FLOAT, year INT); ",SELECT SUM(waste_production_tonnes) as total_waste FROM companies WHERE circular_economy = 'Circular Economy' AND year = 2021;,SELECT SUM(waste_production_tonnes) FROM companies WHERE circular_economy = 'Circular Economy' AND year BETWEEN 2017 AND 2021;,0 How many satellites were deployed each year?,"CREATE TABLE Satellites (satellite_id INT, deployment_year INT, cost FLOAT); ","SELECT deployment_year, COUNT(*) FROM Satellites GROUP BY deployment_year;","SELECT deployment_year, COUNT(*) FROM Satellites GROUP BY deployment_year;",1 Opponent of leonardo castello branco had what record?,"CREATE TABLE table_name_66 (record VARCHAR, opponent VARCHAR);","SELECT record FROM table_name_66 WHERE opponent = ""leonardo castello branco"";","SELECT record FROM table_name_66 WHERE opponent = ""leonardo castello branco"";",1 What is the official name of the municipality whose name in Spanish is Vitoria? ,"CREATE TABLE table_300283_1 (official_name VARCHAR, name_in_spanish VARCHAR);","SELECT official_name FROM table_300283_1 WHERE name_in_spanish = ""Vitoria"";","SELECT official_name FROM table_300283_1 WHERE name_in_spanish = ""Vitoria"";",1 What is Mike Harris' lowest overall?,"CREATE TABLE table_name_61 (overall INTEGER, name VARCHAR);","SELECT MIN(overall) FROM table_name_61 WHERE name = ""mike harris"";","SELECT MIN(overall) FROM table_name_61 WHERE name = ""mike harrison"";",0 "What location has a home ground of n/a, and position in 2012-13 of 13th, third division?","CREATE TABLE table_name_2 (location VARCHAR, home_ground VARCHAR, position_in_2012_13 VARCHAR);","SELECT location FROM table_name_2 WHERE home_ground = ""n/a"" AND position_in_2012_13 = ""13th, third division"";","SELECT location FROM table_name_2 WHERE home_ground = ""n/a"" AND position_in_2012_13 = ""13th, third division"";",1 What is the smallest number?,CREATE TABLE table_18424435_5 (_number INTEGER);,SELECT MIN(_number) FROM table_18424435_5;,SELECT MIN(_number) FROM table_18424435_5;,1 Delete the record with the highest water_usage in the month of June 2022 from the residential table.,"CREATE TABLE residential (customer_id INT, water_usage FLOAT, usage_date DATE); ",DELETE FROM residential WHERE customer_id = (SELECT customer_id FROM residential WHERE usage_date BETWEEN '2022-06-01' AND '2022-06-30' ORDER BY water_usage DESC LIMIT 1);,DELETE FROM residential WHERE water_usage = (SELECT MAX(water_usage) FROM residential WHERE usage_date BETWEEN '2022-06-01' AND '2022-06-30');,0 What is the average number of laps in 1949?,"CREATE TABLE table_name_15 (laps INTEGER, year VARCHAR);","SELECT AVG(laps) FROM table_name_15 WHERE year = ""1949"";",SELECT AVG(laps) FROM table_name_15 WHERE year = 1949;,0 "What is the number of hospitals and clinics in rural areas of Texas and California, and their respective total bed counts?","CREATE TABLE hospitals (id INT, name TEXT, location TEXT, num_beds INT); CREATE TABLE clinics (id INT, name TEXT, location TEXT, num_beds INT); ","SELECT h.location, COUNT(h.id) AS num_hospitals, SUM(h.num_beds) AS hospital_beds, COUNT(c.id) AS num_clinics, SUM(c.num_beds) AS clinic_beds FROM hospitals h INNER JOIN clinics c ON h.location = c.location GROUP BY h.location;","SELECT h.location, COUNT(h.id) as num_hospitals, SUM(c.num_beds) as total_beds FROM hospitals h INNER JOIN clinics c ON h.location = c.location WHERE h.location IN ('Texas', 'California') GROUP BY h.location;",0 Show all the defense contracts that have 'cyber' in their title or description?,"CREATE TABLE Contracts (id INT, title VARCHAR(100), value FLOAT); CREATE TABLE Contract_Details (contract_id INT, description TEXT); ","SELECT Contracts.id, Contracts.title, Contracts.value FROM Contracts JOIN Contract_Details ON Contracts.id = Contract_Details.contract_id WHERE Contracts.title LIKE '%cyber%' OR Contract_Details.description LIKE '%cyber%';","SELECT Contracts.title, Contract_Details.description FROM Contracts INNER JOIN Contract_Details ON Contracts.id = Contract_Details.contract_id WHERE Contracts.title LIKE '%cyber%';",0 What is the total waste generation in 'CountyG' as of the earliest date?,"CREATE TABLE CountyG (Location VARCHAR(50), Quantity INT, Date DATE); ","SELECT SUM(Quantity) FROM (SELECT Quantity, ROW_NUMBER() OVER (PARTITION BY Location ORDER BY Date ASC) as rn FROM CountyG) tmp WHERE rn = 1;",SELECT SUM(Quantity) FROM CountyG WHERE Location = 'CountyG' AND Date = (SELECT MIN(Date) FROM CountyG);,0 List the countries with the highest ocean health metrics in the last 5 years.,"CREATE TABLE OceanHealth (country VARCHAR(20), year INT, metric FLOAT); ","SELECT country, MAX(metric) FROM OceanHealth WHERE year BETWEEN 2016 AND 2020 GROUP BY country ORDER BY MAX(metric) DESC;","SELECT country, MAX(metric) FROM OceanHealth WHERE year >= YEAR(CURRENT_DATE) - 5 GROUP BY country;",0 Which rural infrastructure projects in South Asia had the highest and lowest budget allocations in 2021?,"CREATE TABLE infrastructure_projects (project_id INT, project_type VARCHAR(255), budget INT, region VARCHAR(255), year INT); ","SELECT project_type, MAX(budget) AS highest_budget, MIN(budget) AS lowest_budget FROM infrastructure_projects WHERE year = 2021 AND region = 'South Asia' GROUP BY project_type;","SELECT project_type, budget FROM infrastructure_projects WHERE region = 'South Asia' AND year = 2021 ORDER BY budget DESC LIMIT 1;",0 What is the total waste generated by the chemical production in the European region in the last quarter?,"CREATE TABLE waste_generated (id INT, waste_date DATE, region VARCHAR(255), waste_amount INT); ",SELECT SUM(waste_amount) FROM waste_generated WHERE region = 'Europe' AND waste_date >= '2022-01-01' AND waste_date < '2022-04-01';,"SELECT SUM(waste_amount) FROM waste_generated WHERE region = 'Europe' AND waste_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH);",0 What is the last when the first was January 2001 and more than 26 total?,"CREATE TABLE table_name_72 (last VARCHAR, total VARCHAR, first VARCHAR);","SELECT last FROM table_name_72 WHERE total > 26 AND first = ""january 2001"";","SELECT last FROM table_name_72 WHERE total > 26 AND first = ""january 2001"";",1 What is the maximum amount of funding allocated to a business in the Finance sector?,"CREATE TABLE businesses (id INT, name TEXT, industry TEXT, ownership TEXT, funding FLOAT); ",SELECT MAX(funding) FROM businesses WHERE industry = 'Finance';,SELECT MAX(funding) FROM businesses WHERE industry = 'Finance';,1 "What's the total of Games with a Lost that's larger than 2, and has Points that's smaller than 0?","CREATE TABLE table_name_75 (games INTEGER, lost VARCHAR, points VARCHAR);",SELECT SUM(games) FROM table_name_75 WHERE lost > 2 AND points < 0;,SELECT SUM(games) FROM table_name_75 WHERE lost > 2 AND points 0;,0 Who is the original broadway performer for the character Colin Craven?,"CREATE TABLE table_1901751_1 (original_broadway_performer VARCHAR, character VARCHAR);","SELECT original_broadway_performer FROM table_1901751_1 WHERE character = ""Colin Craven"";","SELECT original_broadway_performer FROM table_1901751_1 WHERE character = ""Colin Craven"";",1 List all charging stations in California and their respective capacities.,"CREATE TABLE charging_station (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), capacity INT); ",SELECT * FROM charging_station WHERE location = 'California';,"SELECT name, capacity FROM charging_station WHERE location = 'California';",0 What is the average military expenditure for the top 2 countries with the highest military technology expenditure in 2020?,"CREATE TABLE MilitaryExpenditure(id INT PRIMARY KEY, country VARCHAR(50), expenditure INT, year INT);",SELECT AVG(expenditure) FROM (SELECT expenditure FROM MilitaryExpenditure WHERE year = 2020 ORDER BY expenditure DESC LIMIT 2) AS subquery;,"SELECT country, AVG(expenditure) as avg_expenditure FROM MilitaryExpenditure WHERE year = 2020 GROUP BY country ORDER BY avg_expenditure DESC LIMIT 2;",0 How many diversity and inclusion trainings have been conducted in each department?,"CREATE TABLE trainings (training_id INT, department VARCHAR(50), training_type VARCHAR(50), trainings_conducted INT); ","SELECT department, training_type, SUM(trainings_conducted) as total_trainings_conducted FROM trainings GROUP BY department, training_type;","SELECT department, SUM(trainings_conducted) FROM trainings GROUP BY department;",0 "Which Season originally aired on September 17, 1955","CREATE TABLE table_15824796_4 (season__number VARCHAR, original_air_date VARCHAR);","SELECT season__number FROM table_15824796_4 WHERE original_air_date = ""September 17, 1955"";","SELECT season__number FROM table_15824796_4 WHERE original_air_date = ""September 17, 1955"";",1 "Insert a new record into the 'CommunityPrograms' table with the following data: 'CitizensOnPatrol', '2022-12-31'","CREATE TABLE CommunityPrograms (ProgramName VARCHAR(50), StartDate DATE);","INSERT INTO CommunityPrograms (ProgramName, StartDate) VALUES ('CitizensOnPatrol', '2022-12-31');","INSERT INTO CommunityPrograms (ProgramName, StartDate) VALUES ('CitizensOnPatrol', '2022-12-31');",1 Find the total number of AI safety research papers published by each organization.,"CREATE TABLE organization (org_id INT, org_name VARCHAR(255)); CREATE TABLE paper (paper_id INT, org_id INT, title VARCHAR(255), topic VARCHAR(255)); ","SELECT o.org_name, COUNT(p.paper_id) as total_papers FROM organization o INNER JOIN paper p ON o.org_id = p.org_id WHERE p.topic = 'AI Safety' GROUP BY o.org_name;","SELECT o.org_name, COUNT(p.paper_id) as total_papers FROM organization o JOIN paper p ON o.org_id = p.org_id WHERE p.topic = 'AI Safety' GROUP BY o.org_name;",0 What is the listed crowd when hawthorn is away?,"CREATE TABLE table_name_72 (crowd VARCHAR, away_team VARCHAR);","SELECT COUNT(crowd) FROM table_name_72 WHERE away_team = ""hawthorn"";","SELECT crowd FROM table_name_72 WHERE away_team = ""hawthorn"";",0 Name the athelte for enkhzorig ( mgl ) l 1–10,"CREATE TABLE table_17417383_6 (athlete VARCHAR, round_of_32 VARCHAR);","SELECT athlete FROM table_17417383_6 WHERE round_of_32 = ""Enkhzorig ( MGL ) L 1–10"";","SELECT athlete FROM table_17417383_6 WHERE round_of_32 = ""Enkhzorig ( mgl ) l 1–10"";",0 What is the maximum water usage in a single day for the city of Chicago?,"CREATE TABLE water_usage (usage_id INT, city VARCHAR(20), usage FLOAT, date DATE); ",SELECT MAX(usage) FROM water_usage WHERE city = 'Chicago';,SELECT MAX(usage) FROM water_usage WHERE city = 'Chicago';,1 Which Date had an Opponent of buffalo bills?,"CREATE TABLE table_name_50 (date VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_50 WHERE opponent = ""buffalo bills"";","SELECT date FROM table_name_50 WHERE opponent = ""buffalo bills"";",1 Which date was the team playing @ Memphis?,"CREATE TABLE table_11960944_4 (date VARCHAR, team VARCHAR);","SELECT date FROM table_11960944_4 WHERE team = ""@ Memphis"";","SELECT date FROM table_11960944_4 WHERE team = ""@ Memphis"";",1 "What is the final score of the tournament played in Clearwater, Florida?","CREATE TABLE table_name_47 (score VARCHAR, tournament VARCHAR);","SELECT score FROM table_name_47 WHERE tournament = ""clearwater, florida"";","SELECT score FROM table_name_47 WHERE tournament = ""clearwater, florida"";",1 who was the successor for district ohio 15th?,"CREATE TABLE table_1652224_5 (successor VARCHAR, district VARCHAR);","SELECT successor FROM table_1652224_5 WHERE district = ""Ohio 15th"";","SELECT successor FROM table_1652224_5 WHERE district = ""Ohio 15th"";",1 Which dams in the 'public_works' schema have a capacity lower than the dam named 'Hoover'?,"CREATE TABLE dams (name VARCHAR(255), capacity INT); ",SELECT name FROM dams WHERE capacity < (SELECT capacity FROM dams WHERE name = 'Hoover');,SELECT name FROM dams WHERE capacity (SELECT capacity FROM dams WHERE name = 'Hoover');,0 Add a new player 'Mateo' from 'Argentina' with level 15 to the 'players' table,"CREATE TABLE players (id INT, name VARCHAR(50), country VARCHAR(50), level INT);","INSERT INTO players (name, country, level) VALUES ('Mateo', 'Argentina', 15);","INSERT INTO players (name, country, level) VALUES ('Mateo', 'Argentina', 15);",1 What city is the Stadium estádio cidade de barcelos in?,"CREATE TABLE table_name_93 (city VARCHAR, stadium VARCHAR);","SELECT city FROM table_name_93 WHERE stadium = ""estádio cidade de barcelos"";","SELECT city FROM table_name_93 WHERE stadium = ""estádio cidade de barcelos"";",1 "What is the average sea level rise, grouped by year and continent?","CREATE TABLE sea_level_rise_2 (id INT, year INT, rise FLOAT, continent VARCHAR(255)); ","SELECT year, continent, AVG(rise) FROM sea_level_rise_2 GROUP BY year, continent;","SELECT year, continent, AVG(rise) as avg_rise FROM sea_level_rise_2 GROUP BY year, continent;",0 "What is the lowest amount of losses the United States, ranked higher than 3 with more than 6 wins, have?","CREATE TABLE table_name_96 (losses INTEGER, wins VARCHAR, rank VARCHAR, team VARCHAR);","SELECT MIN(losses) FROM table_name_96 WHERE rank < 3 AND team = ""united states"" AND wins > 6;","SELECT MIN(losses) FROM table_name_96 WHERE rank > 3 AND team = ""united states"" AND wins > 6;",0 Who played Mixed Doubles in 1991?,"CREATE TABLE table_2486023_1 (mixed_doubles VARCHAR, year VARCHAR);",SELECT mixed_doubles FROM table_2486023_1 WHERE year = 1991;,SELECT mixed_doubles FROM table_2486023_1 WHERE year = 1991;,1 On the date of June 15 what was the score?,"CREATE TABLE table_name_32 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_32 WHERE date = ""june 15"";","SELECT score FROM table_name_32 WHERE date = ""june 15"";",1 How many organic cotton products are there?,"CREATE TABLE cotton_products (product_id INT, name VARCHAR(255), type VARCHAR(50)); ",SELECT COUNT(*) FROM cotton_products WHERE type = 'Organic';,SELECT COUNT(*) FROM cotton_products WHERE type = 'Organic Cotton';,0 "What is the maximum and minimum number of construction workers employed by each company in the construction industry, in the US and Canada?","CREATE TABLE company_workers (id INT, country VARCHAR(50), company_name VARCHAR(100), num_workers INT); ","SELECT cw.country, cw.company_name, MAX(cw.num_workers) as max_workers, MIN(cw.num_workers) as min_workers FROM company_workers cw WHERE cw.country IN ('USA', 'Canada') GROUP BY cw.country, cw.company_name;","SELECT company_name, MAX(num_workers) as max_workers, MIN(num_workers) as min_workers FROM company_workers WHERE country IN ('USA', 'Canada') GROUP BY company_name;",0 What is the number of cases for each attorney and their respective success rates?,"CREATE TABLE attorneys (attorney_id INT, name TEXT); CREATE TABLE cases (case_id INT, attorney_id INT, won BOOLEAN);","SELECT a.attorney_id, a.name, COUNT(c.case_id) AS cases_handled, AVG(CASE WHEN won THEN 1.0 ELSE 0.0 END) * 100.0 AS success_rate FROM attorneys a JOIN cases c ON a.attorney_id = c.attorney_id GROUP BY a.attorney_id, a.name;","SELECT attorneys.name, COUNT(cases.case_id) as cases_count, SUM(cases.won) as success_rate FROM attorneys INNER JOIN cases ON attorneys.attorney_id = cases.attorney_id GROUP BY attorneys.name;",0 "For the 1948-49 season, what was the At Home record?","CREATE TABLE table_name_31 (home VARCHAR, season VARCHAR);","SELECT home FROM table_name_31 WHERE season = ""1948-49"";","SELECT home FROM table_name_31 WHERE season = ""1948-49"";",1 What is the veteran unemployment rate by state in Q1 2021?,"CREATE TABLE veteran_employment (state VARCHAR(255), date DATE, unemployed INT, total_veterans INT); ","SELECT state, (unemployed::FLOAT / total_veterans::FLOAT) * 100 as unemployment_rate FROM veteran_employment WHERE date = '2021-03-31' GROUP BY state;","SELECT state, SUM(unemployed) as total_unemployed FROM veteran_employment WHERE date BETWEEN '2021-01-01' AND '2021-03-31' GROUP BY state;",0 "What is To Par, when Place is 3?","CREATE TABLE table_name_43 (to_par VARCHAR, place VARCHAR);","SELECT to_par FROM table_name_43 WHERE place = ""3"";","SELECT to_par FROM table_name_43 WHERE place = ""3"";",1 "List the top 10 most active users in terms of total number of posts, along with the number of followers they have.","CREATE TABLE users (id INT, username VARCHAR(50), followers INT); CREATE TABLE posts (id INT, user_id INT, content VARCHAR(500));","SELECT u.username, u.followers, COUNT(p.id) as total_posts FROM users u JOIN posts p ON u.id = p.user_id GROUP BY u.id ORDER BY total_posts DESC LIMIT 10;","SELECT u.username, SUM(p.content) as total_posts, SUM(p.followers) as total_followers FROM users u JOIN posts p ON u.id = p.user_id GROUP BY u.username ORDER BY total_followers DESC LIMIT 10;",0 What is the comp for the year 1989?,"CREATE TABLE table_name_42 (comp VARCHAR, year VARCHAR);","SELECT comp FROM table_name_42 WHERE year = ""1989"";",SELECT comp FROM table_name_42 WHERE year = 1989;,0 List the names and billing rates of all attorneys in the 'new_york' office.,"CREATE TABLE office (office_id INT, office_name VARCHAR(20)); CREATE TABLE attorney (attorney_id INT, attorney_name VARCHAR(30), office_id INT, billing_rate DECIMAL(5,2));","SELECT attorney_name, billing_rate FROM attorney WHERE office_id = (SELECT office_id FROM office WHERE office_name = 'new_york');","SELECT attorney_name, billing_rate FROM attorney WHERE office_id = (SELECT office_id FROM office WHERE office_name = 'new_york');",1 Which element had the highest production increase from 2017 to 2018 in Asia?,"CREATE TABLE production (year INT, region VARCHAR(10), element VARCHAR(10), quantity INT); ","SELECT element, (MAX(quantity) - MIN(quantity)) AS production_increase FROM production WHERE region = 'Asia' AND year IN (2017, 2018) GROUP BY element ORDER BY production_increase DESC LIMIT 1;","SELECT element, MAX(quantity) FROM production WHERE region = 'Asia' AND year BETWEEN 2017 AND 2018 GROUP BY element;",0 Name the package/option for number being 543,"CREATE TABLE table_15887683_8 (package_option VARCHAR, n° VARCHAR);",SELECT package_option FROM table_15887683_8 WHERE n° = 543;,SELECT package_option FROM table_15887683_8 WHERE n° = 543;,1 what are all the pole position where date is 26 july,"CREATE TABLE table_1137704_2 (pole_position VARCHAR, date VARCHAR);","SELECT pole_position FROM table_1137704_2 WHERE date = ""26 July"";","SELECT pole_position FROM table_1137704_2 WHERE date = ""26 July"";",1 What was the country of the player at +5?,"CREATE TABLE table_name_68 (country VARCHAR, to_par VARCHAR);","SELECT country FROM table_name_68 WHERE to_par = ""+5"";","SELECT country FROM table_name_68 WHERE to_par = ""+5"";",1 What is the total number of volunteers who have worked on projects related to 'disaster relief' or 'housing'?,"CREATE TABLE volunteers (id INT, name VARCHAR(30), cause_area VARCHAR(20)); ","SELECT COUNT(*) FROM volunteers WHERE cause_area IN ('disaster relief', 'housing');","SELECT COUNT(*) FROM volunteers WHERE cause_area IN ('disaster relief', 'housing');",1 What is the average investment in climate finance for Oceania and Europe in 2020?,"CREATE TABLE climate_finance (region VARCHAR(50), investment INT, year INT); ","SELECT region, AVG(investment) as avg_investment FROM climate_finance WHERE year = 2020 AND region IN ('Oceania', 'Europe') GROUP BY region;","SELECT AVG(investment) FROM climate_finance WHERE region IN ('Oceania', 'Europe') AND year = 2020;",0 What percentage of people voted for Obama in Burlington?,"CREATE TABLE table_20278716_2 (obama__percentage VARCHAR, county VARCHAR);","SELECT obama__percentage FROM table_20278716_2 WHERE county = ""Burlington"";","SELECT obama__percentage FROM table_20278716_2 WHERE county = ""Burlington"";",1 Select all players over 30,"CREATE TABLE PlayerDemographics (PlayerID INT PRIMARY KEY, Age INT, Gender VARCHAR(10), Location VARCHAR(50)); ",SELECT * FROM PlayerDemographics WHERE Age > 30;,SELECT * FROM PlayerDemographics WHERE Age > 30;,1 "Add a new record to the ""routes"" table with the following data: route_id = 5, origin = ""Seattle"", destination = ""New York"", distance = 2500, and eta = '2022-07-01'","CREATE TABLE routes (route_id INT, origin VARCHAR(50), destination VARCHAR(50), distance INT, eta DATE);","INSERT INTO routes (route_id, origin, destination, distance, eta) VALUES (5, 'Seattle', 'New York', 2500, '2022-07-01');","INSERT INTO routes (route_id, origin, destination, distance, eta) VALUES (5, 'Seattle', 'New York', 2500, '2022-07-01');",1 "Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'.","CREATE TABLE Accounts (account_id VARCHAR, date_account_opened VARCHAR, account_name VARCHAR, other_account_details VARCHAR, customer_id VARCHAR); CREATE TABLE Customers (customer_id VARCHAR, customer_first_name VARCHAR);","SELECT T1.account_id, T1.date_account_opened, T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan';","SELECT T1.account_id, T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan';",0 What is the numeral where the English name is Florin?,"CREATE TABLE table_1682865_1 (numeral VARCHAR, english_name VARCHAR);","SELECT numeral FROM table_1682865_1 WHERE english_name = ""Florin"";","SELECT numeral FROM table_1682865_1 WHERE english_name = ""Florida"";",0 "What was the result of the game on august 30, 1968?","CREATE TABLE table_name_69 (result VARCHAR, date VARCHAR);","SELECT result FROM table_name_69 WHERE date = ""august 30, 1968"";","SELECT result FROM table_name_69 WHERE date = ""august 30, 1968"";",1 What is the percentage of students who have access to open educational resources in each country?,"CREATE TABLE students (student_id INT, student_name TEXT, country TEXT); CREATE TABLE open_educational_resources (oer_id INT, student_id INT, has_access BOOLEAN); ","SELECT s.country, 100.0 * AVG(CASE WHEN oer.has_access THEN 1.0 ELSE 0.0 END) as pct_students_oer_access FROM students s JOIN open_educational_resources oer ON s.student_id = oer.student_id GROUP BY s.country;","SELECT s.country, (COUNT(oer.student_id) * 100.0 / (SELECT COUNT(oer.student_id) FROM students s JOIN open_educational_resources oER ON s.student_id = oer.student_id GROUP BY s.country)) as percentage FROM students s JOIN open_educational_resources oER ON s.student_id = oer.student_id GROUP BY s.country;",0 What is the lowest attandance recorded at Cappielow?,"CREATE TABLE table_11207040_5 (lowest INTEGER, stadium VARCHAR);","SELECT MIN(lowest) FROM table_11207040_5 WHERE stadium = ""Cappielow"";","SELECT MIN(lowest) FROM table_11207040_5 WHERE stadium = ""Cappielow"";",1 What is the maximum carbon emissions for each mine located in the USA?,"CREATE TABLE environmental_impact (id INT, mine_id INT, carbon_emissions INT, water_usage INT); CREATE TABLE mine_locations (id INT, mine_id INT, location VARCHAR(255)); ","SELECT mine_id, MAX(carbon_emissions) as max_emissions FROM environmental_impact JOIN mine_locations ON environmental_impact.mine_id = mine_locations.mine_id WHERE location = 'USA' GROUP BY mine_id;","SELECT mine_id, MAX(carbon_emissions) FROM environmental_impact JOIN mine_locations ON environmental_impact.mine_id = mine_locations.mine_id WHERE location = 'USA' GROUP BY mine_id;",0 What is the lowest food safety score for restaurants in California?,"CREATE TABLE restaurant_inspections(location VARCHAR(255), score INT); ",SELECT MIN(score) FROM restaurant_inspections WHERE location LIKE '%California%';,SELECT MIN(score) FROM restaurant_inspections WHERE location = 'California';,0 What was the loss of the game against the Angels with a 26-30 record?,"CREATE TABLE table_name_9 (loss VARCHAR, opponent VARCHAR, record VARCHAR);","SELECT loss FROM table_name_9 WHERE opponent = ""angels"" AND record = ""26-30"";","SELECT loss FROM table_name_9 WHERE opponent = ""angels"" AND record = ""26-30"";",1 Total amount of impact investments in the technology sector with an ESG score above 85?,"CREATE TABLE impact_investments_tech (id INT, sector VARCHAR(20), ESG_score FLOAT, investment_amount FLOAT); ",SELECT SUM(investment_amount) FROM impact_investments_tech WHERE sector = 'Technology' AND ESG_score > 85;,SELECT SUM(investment_amount) FROM impact_investments_tech WHERE sector = 'Technology' AND ESG_score > 85;,1 What Race 3 is Round 5?,"CREATE TABLE table_name_4 (race_3 VARCHAR, round VARCHAR);","SELECT race_3 FROM table_name_4 WHERE round = ""round 5"";",SELECT race_3 FROM table_name_4 WHERE round = 5;,0 What is the average donation amount in 'april' and 'august' for the 'westregion'?,"CREATE TABLE donations (donation_id INT, donation_amount DECIMAL(10,2), donation_date DATE, region VARCHAR(20)); ","SELECT AVG(donation_amount) FROM donations WHERE MONTH(donation_date) IN (4, 8) AND region = 'westregion';",SELECT AVG(donation_amount) FROM donations WHERE donation_date BETWEEN '2022-04-01' AND '2022-06-30' AND region = 'westregion';,0 What is the average salary of workers in textile factories in India?,"CREATE TABLE Workers (WorkerID INT, Salary FLOAT, Country VARCHAR(20)); ",SELECT AVG(Salary) FROM Workers WHERE Country = 'India';,SELECT AVG(Salary) FROM Workers WHERE Country = 'India';,1 Show the total number of marine species in the Indian Ocean.,"CREATE TABLE marine_species (name TEXT, location TEXT, num_individuals INT); ",SELECT SUM(num_individuals) FROM marine_species WHERE location = 'Indian Ocean';,SELECT SUM(num_individuals) FROM marine_species WHERE location = 'Indian Ocean';,1 What are the names and details of all policies that have been altered in the last week?,"CREATE TABLE policies (id INT, name VARCHAR(255), details TEXT, last_modified DATE); ","SELECT name, details FROM policies WHERE last_modified >= DATE(NOW()) - INTERVAL 7 DAY;","SELECT name, details FROM policies WHERE last_modified >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK);",0 How many tries where points is 77?,"CREATE TABLE table_13758945_1 (tries_for VARCHAR, points VARCHAR);","SELECT tries_for FROM table_13758945_1 WHERE points = ""77"";",SELECT tries_for FROM table_13758945_1 WHERE points = 77;,0 "Who is the Driver, when the Engine is Chevrolet, and when the Date is October 3?","CREATE TABLE table_name_90 (driver VARCHAR, engine VARCHAR, date VARCHAR);","SELECT driver FROM table_name_90 WHERE engine = ""chevrolet"" AND date = ""october 3"";","SELECT driver FROM table_name_90 WHERE engine = ""chevrolet"" AND date = ""october 3"";",1 What's the highest bronze with a less than 1 Rank?,"CREATE TABLE table_name_40 (bronze INTEGER, rank INTEGER);",SELECT MAX(bronze) FROM table_name_40 WHERE rank < 1;,SELECT MAX(bronze) FROM table_name_40 WHERE rank 1;,0 What is the number of graduate students in each department who have at least one publication?,"CREATE TABLE Graduate_Students_3 (id INT, name VARCHAR(50), department VARCHAR(50)); CREATE TABLE Publications_3 (id INT, student_id INT, year INT, title VARCHAR(100)); ","SELECT Graduate_Students_3.department, COUNT(DISTINCT Graduate_Students_3.id) FROM Graduate_Students_3 JOIN Publications_3 ON Graduate_Students_3.id = Publications_3.student_id GROUP BY Graduate_Students_3.department HAVING COUNT(DISTINCT Graduate_Students_3.id) > 0;","SELECT gs.department, COUNT(gs.id) FROM Graduate_Students_3 gs JOIN Publications_3 p ON gs.id = p.student_id GROUP BY gs.department HAVING COUNT(gs.id) >= 1 GROUP BY gs.department;",0 What are the total sales for each menu category?,"CREATE TABLE menu_sales(menu_category VARCHAR(255), total_sales DECIMAL(10,2)); ","SELECT menu_category, SUM(total_sales) FROM menu_sales GROUP BY menu_category;","SELECT menu_category, SUM(total_sales) FROM menu_sales GROUP BY menu_category;",1 Name the guest for 1.64m ratings,"CREATE TABLE table_29135051_2 (guest_s_ VARCHAR, ratings VARCHAR);","SELECT guest_s_ FROM table_29135051_2 WHERE ratings = ""1.64m"";","SELECT guest_s_ FROM table_29135051_2 WHERE ratings = ""1.66m"";",0 Which classrooms are used by grade 4?,"CREATE TABLE list (classroom VARCHAR, grade VARCHAR);",SELECT DISTINCT classroom FROM list WHERE grade = 4;,SELECT classroom FROM list WHERE grade = 4;,0 What is the total playtime for players who use VR technology?,"CREATE TABLE player_sessions (id INT, player_id INT, playtime INT, uses_vr BOOLEAN); ",SELECT SUM(playtime) FROM player_sessions WHERE uses_vr = true;,SELECT SUM(playtime) FROM player_sessions WHERE uses_vr = true;,1 How many policies were issued for 'High Risk' drivers in the last year?,"CREATE TABLE policies (id INT, policyholder_id INT, issue_date DATE); CREATE TABLE policyholders (id INT, risk_level TEXT); ","SELECT COUNT(*) FROM policies JOIN policyholders ON policies.policyholder_id = policyholders.id WHERE policyholders.risk_level = 'High Risk' AND policies.issue_date >= DATEADD(year, -1, GETDATE());","SELECT COUNT(*) FROM policies JOIN policyholders ON policies.policyholder_id = policyholders.id WHERE policyholders.risk_level = 'High Risk' AND policyholders.issue_date >= DATEADD(year, -1, GETDATE());",0 "What is the total number of healthcare visits in the ""rural_clinic_d"" table?","CREATE TABLE rural_clinic_d (id INT, visit_date DATE); ",SELECT COUNT(*) FROM rural_clinic_d;,SELECT COUNT(*) FROM rural_clinic_d;,1 What is the average number of Byes when there were less than 0 losses and were against 1247?,"CREATE TABLE table_name_75 (byes INTEGER, against VARCHAR, draws VARCHAR);",SELECT AVG(byes) FROM table_name_75 WHERE against = 1247 AND draws < 0;,SELECT AVG(byes) FROM table_name_75 WHERE against = 1247 AND draws 0;,0 Which event led to a 4-0 record?,"CREATE TABLE table_name_98 (event VARCHAR, record VARCHAR);","SELECT event FROM table_name_98 WHERE record = ""4-0"";","SELECT event FROM table_name_98 WHERE record = ""4-0"";",1 What was the total R&D expenditure for the top 2 countries in 2022?,"CREATE TABLE rd_expenditures (country VARCHAR(255), amount FLOAT, year INT); ","SELECT SUM(amount) as total_expenditure FROM (SELECT country, SUM(amount) as amount FROM rd_expenditures WHERE year = 2022 GROUP BY country ORDER BY amount DESC LIMIT 2);","SELECT country, SUM(amount) FROM rd_expenditures WHERE year = 2022 GROUP BY country ORDER BY SUM(amount) DESC LIMIT 2;",0 What are the total numbers of crimes reported for both 'Theft' and 'Vandalism' categories in the 'CrimeStats' table?,"CREATE TABLE CrimeStats (id INT, crimeType VARCHAR(20), number INT);","SELECT SUM(number) FROM CrimeStats WHERE crimeType IN ('Theft', 'Vandalism');","SELECT SUM(number) FROM CrimeStats WHERE crimeType IN ('Theft', 'Vandalism');",1 How many times is the score 98–90?,"CREATE TABLE table_11959669_6 (location_attendance VARCHAR, score VARCHAR);","SELECT COUNT(location_attendance) FROM table_11959669_6 WHERE score = ""98–90"";","SELECT COUNT(location_attendance) FROM table_11959669_6 WHERE score = ""98–90"";",1 "what is the to par for $242,813 with score 68-72-74-66=280","CREATE TABLE table_name_83 (to_par VARCHAR, money___$__ VARCHAR, score VARCHAR);","SELECT to_par FROM table_name_83 WHERE money___$__ = ""242,813"" AND score = 68 - 72 - 74 - 66 = 280;","SELECT to_par FROM table_name_83 WHERE money___$__ = ""$242,813"" AND score = 68 - 72 - 74 - 66 = 280;",0 How many cases were won by each attorney in the Northeast region?,"CREATE TABLE Cases ( CaseID INT, AttorneyID INT, Region VARCHAR(50), CaseOutcome VARCHAR(50) ); ","SELECT a.Name AS AttorneyName, COUNT(c.CaseID) AS WonCases FROM Attorneys a JOIN Cases c ON a.AttorneyID = c.AttorneyID WHERE a.Region = 'Northeast' AND c.CaseOutcome = 'Won' GROUP BY a.Name;","SELECT AttorneyID, COUNT(*) FROM Cases WHERE Region = 'Northeast' AND CaseOutcome = 'Won' GROUP BY AttorneyID;",0 Who was the opponent on Oct. 4?,"CREATE TABLE table_24560733_1 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_24560733_1 WHERE date = ""Oct. 4"";","SELECT opponent FROM table_24560733_1 WHERE date = ""Oct. 4"";",1 "Identify the city with the highest total attendance for events funded by ""Government"" and its total attendance","CREATE TABLE events (event_id INT, event_name VARCHAR(50), city VARCHAR(30), funding_source VARCHAR(30), attendance INT); ","SELECT city, SUM(attendance) as total_attendance FROM events WHERE funding_source = 'Government' GROUP BY city ORDER BY total_attendance DESC LIMIT 1;","SELECT city, SUM(attendance) as total_attendance FROM events WHERE funding_source = 'Government' GROUP BY city ORDER BY total_attendance DESC LIMIT 1;",1 How many citizen feedback records were created by each citizen in 2022?,"CREATE TABLE feedback (id INT, citizen_id INT, created_at DATETIME); ","SELECT citizen_id, COUNT(*) as num_records FROM feedback WHERE created_at BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY citizen_id;","SELECT citizen_id, COUNT(*) FROM feedback WHERE created_at BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY citizen_id;",0 "Which Home has a Competition of european cup, and a Round of qf?","CREATE TABLE table_name_70 (home VARCHAR, competition VARCHAR, round VARCHAR);","SELECT home FROM table_name_70 WHERE competition = ""european cup"" AND round = ""qf"";","SELECT home FROM table_name_70 WHERE competition = ""european cup"" AND round = ""qf"";",1 What is the average rating of products with cruelty-free certification?,"CREATE TABLE products (product_id INT, rating FLOAT, cruelty_free BOOLEAN); ",SELECT AVG(rating) FROM products WHERE cruelty_free = true;,SELECT AVG(rating) FROM products WHERE cruelty_free = true;,1 Which competition was played on 8 June 2005?,"CREATE TABLE table_name_90 (competition VARCHAR, date VARCHAR);","SELECT competition FROM table_name_90 WHERE date = ""8 june 2005"";","SELECT competition FROM table_name_90 WHERE date = ""8 june 2005"";",1 What was the Green-Communist percentage in the poll in which the Socialist Party earned 41.0%?,"CREATE TABLE table_name_59 (green_communist VARCHAR, socialist VARCHAR);","SELECT green_communist FROM table_name_59 WHERE socialist = ""41.0%"";","SELECT green_communist FROM table_name_59 WHERE socialist = ""41.0%"";",1 Which venue is the friendly match in?,"CREATE TABLE table_name_7 (venue VARCHAR, competition VARCHAR);","SELECT venue FROM table_name_7 WHERE competition = ""friendly match"";","SELECT venue FROM table_name_7 WHERE competition = ""friendly match"";",1 What was the crowd attendance in the match at punt road oval?,"CREATE TABLE table_name_58 (crowd INTEGER, venue VARCHAR);","SELECT SUM(crowd) FROM table_name_58 WHERE venue = ""punt road oval"";","SELECT SUM(crowd) FROM table_name_58 WHERE venue = ""punt road oval"";",1 What is the average investment amount for Asian-founded startups in the fintech industry?,"CREATE TABLE investment (id INT, company_id INT, investor TEXT, year INT, amount FLOAT); CREATE TABLE company (id INT, name TEXT, industry TEXT, founder TEXT, PRIMARY KEY (id)); ",SELECT AVG(i.amount) FROM investment i JOIN company c ON i.company_id = c.id WHERE c.founder = 'Asian' AND c.industry = 'Fintech';,SELECT AVG(investment.amount) FROM investment INNER JOIN company ON investment.company_id = company.id WHERE company.industry = 'Fintech' AND company.founder = 'Asian';,0 How many precincts are in the county where G. Hager received 19 (20%) votes?,"CREATE TABLE table_17820556_4 (precincts VARCHAR, g_hager VARCHAR);","SELECT precincts FROM table_17820556_4 WHERE g_hager = ""19 (20%)"";","SELECT COUNT(precincts) FROM table_17820556_4 WHERE g_hager = ""19 (20%)"";",0 What were the total sales of drug 'Dolorol' in the United States for 2021?,"CREATE TABLE sales (drug_name TEXT, country TEXT, sales_amount INT, sale_date DATE); ",SELECT SUM(sales_amount) FROM sales WHERE drug_name = 'Dolorol' AND country = 'USA' AND sale_date BETWEEN '2021-01-01' AND '2021-12-31';,SELECT SUM(sales_amount) FROM sales WHERE drug_name = 'Dolorol' AND country = 'United States' AND sale_date BETWEEN '2021-01-01' AND '2021-12-31';,0 How many factories are producing garments using circular economy principles in Europe?,"CREATE TABLE CircularEconomyFactories (id INT, factory_location VARCHAR(255), is_circular_economy BOOLEAN); ",SELECT COUNT(*) FROM CircularEconomyFactories WHERE factory_location LIKE '%Europe%' AND is_circular_economy = true;,SELECT COUNT(*) FROM CircularEconomyFactories WHERE factory_location = 'Europe' AND is_circular_economy = true;,0 What year did Ferrari win the Kyalami circuit?,"CREATE TABLE table_name_16 (year VARCHAR, circuit VARCHAR, winning_constructor VARCHAR);","SELECT year FROM table_name_16 WHERE circuit = ""kyalami"" AND winning_constructor = ""ferrari"";","SELECT year FROM table_name_16 WHERE circuit = ""kyalami"" AND winning_constructor = ""ferrari"";",1 What is the deleted for tolland?,"CREATE TABLE table_name_71 (deleted VARCHAR, county VARCHAR);","SELECT deleted FROM table_name_71 WHERE county = ""tolland"";","SELECT deleted FROM table_name_71 WHERE county = ""tolland"";",1 How many criminal cases were handled by attorney 'John Doe'?,"CREATE TABLE cases (case_id INT, attorney_name VARCHAR(50), case_type VARCHAR(50)); ",SELECT COUNT(*) FROM cases WHERE attorney_name = 'John Doe' AND case_type = 'criminal';,SELECT COUNT(*) FROM cases WHERE attorney_name = 'John Doe' AND case_type = 'criminal';,1 Who are the traditional instrument makers in Senegal?,"CREATE TABLE instrument_makers (id INT PRIMARY KEY, name TEXT, instrument TEXT, country TEXT);",SELECT name FROM instrument_makers WHERE country = 'Senegal';,SELECT name FROM instrument_makers WHERE country = 'Senegal';,1 What is the maximum number of therapy sessions attended by a patient?,"CREATE TABLE patients (patient_id INT, therapy_sessions INT); ",SELECT MAX(therapy_sessions) FROM patients;,SELECT MAX(therapy_sessions) FROM patients;,1 "For Jo Siffert, what was the highest grid with the number of laps above 12?","CREATE TABLE table_name_5 (grid INTEGER, driver VARCHAR, laps VARCHAR);","SELECT MAX(grid) FROM table_name_5 WHERE driver = ""jo siffert"" AND laps > 12;","SELECT MAX(grid) FROM table_name_5 WHERE driver = ""jo siffert"" AND laps > 12;",1 What are the contractors with the most permits in New York?,"CREATE TABLE Contractors (Contractor_ID INT, Contractor_Name VARCHAR(100), License_Number INT, City VARCHAR(50), State CHAR(2), Zipcode INT); CREATE VIEW Building_Permits_With_Contractors AS SELECT bp.*, c.Contractor_Name FROM Building_Permits bp INNER JOIN Contractors c ON bp.Permit_ID = c.Contractor_ID;","SELECT bpwc.Contractor_Name, COUNT(*) as Total_Permits FROM Building_Permits_With_Contractors bpwc WHERE bpwc.City = 'New York' GROUP BY bpwc.Contractor_Name ORDER BY Total_Permits DESC;","SELECT c.Contractor_Name, COUNT(*) as Permit_Count FROM Contractors c JOIN Building_Permits_With_Contractors bp ON c.Contractor_ID = bp.Contractor_ID WHERE c.City = 'New York' GROUP BY c.Contractor_Name ORDER BY Permit_Count DESC LIMIT 1;",0 What was the total amount donated by individual donors to the 'Education' cause in '2021'?,"CREATE TABLE Donations (donor_id INT, donation_amount FLOAT, donation_date DATE, cause VARCHAR(255)); ",SELECT SUM(donation_amount) FROM Donations WHERE donation_date >= '2021-01-01' AND donation_date < '2022-01-01' AND cause = 'Education';,SELECT SUM(donation_amount) FROM Donations WHERE cause = 'Education' AND donation_date BETWEEN '2021-01-01' AND '2021-12-31';,0 What is the name of the church that is located in florø?,"CREATE TABLE table_name_29 (church_name VARCHAR, location_of_the_church VARCHAR);","SELECT church_name FROM table_name_29 WHERE location_of_the_church = ""florø"";","SELECT church_name FROM table_name_29 WHERE location_of_the_church = ""flor"";",0 What chasis did the maserati l6s have?,"CREATE TABLE table_21977627_1 (chassis VARCHAR, engine VARCHAR);","SELECT chassis FROM table_21977627_1 WHERE engine = ""Maserati L6s"";","SELECT chassis FROM table_21977627_1 WHERE engine = ""Maserati L6S"";",0 "What is the total number of traditional arts centers and the number of centers dedicated to dance in each continent, excluding Antarctica?","CREATE TABLE Arts_Centers (Center_Name VARCHAR(50), Country VARCHAR(50), Type VARCHAR(50)); ","SELECT Continent, COUNT(*) AS Total_Arts_Centers, SUM(CASE WHEN Type = 'Dance' THEN 1 ELSE 0 END) AS Dance_Centers FROM Arts_Centers JOIN (SELECT 'Australia' AS Country, 'Oceania' AS Continent UNION ALL SELECT 'Argentina' AS Country, 'South America' AS Continent) AS Continents ON Arts_Centers.Country = Continents.Country GROUP BY Continent;","SELECT Country, COUNT(*) as Total_Centers, COUNT(*) as Total_Centers FROM Arts_Centers WHERE Type = 'Dance' AND Country!= 'Antarctica' GROUP BY Country;",0 Update the 'age' of athlete 'Samantha Green' in the 'players' table,"CREATE TABLE players (id INT PRIMARY KEY, first_name VARCHAR(50), last_name VARCHAR(50), age INT, position VARCHAR(50), team VARCHAR(50));",UPDATE players SET age = 25 WHERE first_name = 'Samantha' AND last_name = 'Green';,UPDATE players SET age = 18 WHERE first_name = 'Samantha Green' AND last_name = 'Samantha Green';,0 Determine the number of successful ransomware attacks in the healthcare sector in the first quarter of 2022.,"CREATE TABLE attacks (id INT, type VARCHAR(255), result VARCHAR(255), sector VARCHAR(255), date DATE); ",SELECT COUNT(*) FROM attacks WHERE type = 'ransomware' AND result = 'successful' AND sector = 'healthcare' AND date >= '2022-01-01' AND date < '2022-04-01';,SELECT COUNT(*) FROM attacks WHERE type = 'Ransomware' AND result = 'Successful' AND sector = 'Healthcare' AND date BETWEEN '2022-01-01' AND '2022-03-31';,0 Which Engine has a Model of s430?,"CREATE TABLE table_name_71 (engine VARCHAR, model VARCHAR);","SELECT engine FROM table_name_71 WHERE model = ""s430"";","SELECT engine FROM table_name_71 WHERE model = ""s430"";",1 Count the number of cultivators in the Pacific Northwest region without a valid compliance certificate.,"CREATE TABLE Cultivators (cultivator_id INT, region TEXT, compliance_certificate BOOLEAN);",SELECT COUNT(cultivator_id) FROM Cultivators WHERE region = 'Pacific Northwest' AND compliance_certificate = FALSE;,SELECT COUNT(*) FROM Cultivators WHERE region = 'Pacific Northwest' AND compliance_certificate = false;,0 Name the total number of peletier for shortscale comparison billion,"CREATE TABLE table_260938_1 (peletier VARCHAR, shortscale_comparison VARCHAR);","SELECT COUNT(peletier) FROM table_260938_1 WHERE shortscale_comparison = ""Billion"";","SELECT COUNT(peletier) FROM table_260938_1 WHERE shortscale_comparison = ""Billion"";",1 What is the maximum number of volunteer hours contributed by a single volunteer in Q3 2025?,"CREATE TABLE Volunteers (VolunteerID INT, Name TEXT);CREATE TABLE VolunteerHours (HourID INT, VolunteerID INT, Hours DECIMAL(10,2), HourDate DATE);","SELECT V.Name, MAX(VH.Hours) as MaxHours FROM VolunteerHours VH JOIN Volunteers V ON VH.VolunteerID = Volunteers.VolunteerID WHERE VH.HourDate BETWEEN '2025-07-01' AND '2025-09-30' GROUP BY V.VolunteerID, V.Name;",SELECT MAX(Hours) FROM VolunteerHours JOIN Volunteers ON VolunteerHours.VolunteerID = Volunteers.VolunteerID WHERE QUARTER(Hours.Hours) = 3 AND YEAR(Hours.Hours) = 2025;,0 "What is Player, when Score is ""66-74-76=216""?","CREATE TABLE table_name_48 (player VARCHAR, score VARCHAR);",SELECT player FROM table_name_48 WHERE score = 66 - 74 - 76 = 216;,SELECT player FROM table_name_48 WHERE score = 66 - 74 - 76 = 216;,1 "Get the total value of construction projects in each city in Washington, grouped by city","CREATE TABLE construction_projects_3 (project_id INT, city VARCHAR(20), state VARCHAR(20), value DECIMAL(10,2)); ","SELECT city, SUM(value) FROM construction_projects_3 WHERE state = 'WA' GROUP BY city;","SELECT city, SUM(value) FROM construction_projects_3 WHERE state = 'Washington' GROUP BY city;",0 What is the median time to contain a vulnerability for the finance department?,"CREATE TABLE vulnerabilities (id INT, incident_id INT, department VARCHAR(255), containment_time INT); ",SELECT AVG(containment_time) FROM (SELECT containment_time FROM vulnerabilities WHERE department = 'finance' ORDER BY containment_time LIMIT 2) AS subquery;,SELECT AVG(containment_time) FROM vulnerabilities WHERE department = 'Finance';,0 Update the age of 'ArtistB' to 45.,"CREATE TABLE Artist (ArtistID INT, ArtistName VARCHAR(50), Age INT); ",UPDATE Artist SET Age = 45 WHERE ArtistName = 'ArtistB';,UPDATE Artist SET Age = 45 WHERE ArtistName = 'ArtistB';,1 "What is the policy type and corresponding weight for each policy, ordered by weight in descending order, for policies issued in 'Ohio'?","CREATE TABLE Policies (PolicyID INT, PolicyType VARCHAR(20), IssueState VARCHAR(20), Weight DECIMAL(5,2)); ","SELECT PolicyType, Weight FROM Policies WHERE IssueState = 'Ohio' ORDER BY Weight DESC;","SELECT PolicyType, Weight FROM Policies WHERE IssueState = 'Ohio' ORDER BY Weight DESC;",1 Update the production count for well 'B02' in 'Alaska' to 6500.,"CREATE TABLE wells (well_id VARCHAR(10), well_location VARCHAR(20)); CREATE TABLE production (well_id VARCHAR(10), production_count INT); ",UPDATE production SET production_count = 6500 WHERE well_id = 'B02';,UPDATE production SET production_count = 6500 WHERE well_id = 'B02' AND well_location = 'Alaska';,0 What is the Championship Game that has 4 Bids and a .600 Win %?,"CREATE TABLE table_name_40 (championship_game VARCHAR, _number_of_bids VARCHAR, win__percentage VARCHAR);","SELECT championship_game FROM table_name_40 WHERE _number_of_bids = 4 AND win__percentage = "".600"";","SELECT championship_game FROM table_name_40 WHERE _number_of_bids = 4 AND win__percentage = "".600"";",1 "Determine the percentage of total energy production for each energy source (wind, solar, hydro) in a given year.","CREATE TABLE energy_production (energy_source VARCHAR(255), year INT, monthly_production FLOAT); ","SELECT energy_source, SUM(monthly_production) / SUM(SUM(monthly_production)) OVER () AS percentage_of_total FROM energy_production WHERE year = 2022 GROUP BY energy_source;","SELECT energy_source, (SUM(monthly_production) / (SELECT SUM(monthly_production) FROM energy_production WHERE year = 2021)) * 100.0 / (SELECT SUM(monthly_production) FROM energy_production WHERE year = 2021)) AS percentage FROM energy_production WHERE energy_source IN ('wind','solar', 'hydro') GROUP BY energy_source;",0 What is the average water usage for each brand?,"CREATE TABLE water_usage (id INT, brand VARCHAR(255), usage FLOAT);","SELECT brand, AVG(usage) FROM water_usage GROUP BY brand;","SELECT brand, AVG(usage) FROM water_usage GROUP BY brand;",1 Count the number of new safety protocols added each year,"CREATE TABLE safety_protocols (year INT, protocol VARCHAR(20)); ","SELECT year, COUNT(protocol) FROM safety_protocols GROUP BY year;","SELECT year, COUNT(*) FROM safety_protocols GROUP BY year;",0 "What is the total amount donated and total number of donations for each program, excluding 'Medical Research'?","CREATE TABLE Donors (DonorID INT, DonorName TEXT, TotalDonated DECIMAL(10,2));CREATE TABLE Donations (DonationID INT, DonorID INT, Program TEXT, Amount DECIMAL(10,2), Success BOOLEAN);","SELECT D.Program, SUM(D.Amount) as TotalAmount, COUNT(*) as TotalDonations FROM Donations D WHERE D.Program != 'Medical Research' GROUP BY D.Program;","SELECT Program, SUM(Amount) as TotalDonated, COUNT(*) as TotalDonated FROM Donations JOIN Donors ON Donations.DonorID = Donors.DonorID WHERE Program!= 'Medical Research' GROUP BY Program;",0 What is the total amount of rainfall for each region in the past year?,"CREATE TABLE region_rainfall (region TEXT, date DATE, rainfall INTEGER);","SELECT region, SUM(rainfall) as total_rainfall FROM region_rainfall WHERE date >= DATEADD(year, -1, GETDATE()) GROUP BY region;","SELECT region, SUM(rainfall) FROM region_rainfall WHERE date >= DATEADD(year, -1, GETDATE()) GROUP BY region;",0 What is the smallest position with less than 7 points piloted by Didier Hauss?,"CREATE TABLE table_name_29 (position INTEGER, points VARCHAR, pilot VARCHAR);","SELECT MIN(position) FROM table_name_29 WHERE points < 7 AND pilot = ""didier hauss"";","SELECT MIN(position) FROM table_name_29 WHERE points 7 AND pilot = ""didier hauss"";",0 "What are the military equipment sales for the last six months, grouped by equipment type and country, for contracts with a value greater than $5M?","CREATE TABLE EquipmentSales (sale_id INT, equipment_type VARCHAR(50), sale_value FLOAT, sale_date DATE, contract_country VARCHAR(50)); ","SELECT equipment_type, contract_country, SUM(sale_value) FROM EquipmentSales WHERE sale_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 6 MONTH) AND CURDATE() GROUP BY equipment_type, contract_country HAVING SUM(sale_value) > 5000000;","SELECT equipment_type, contract_country, SUM(sale_value) as total_sales FROM EquipmentSales WHERE sale_date >= DATEADD(month, -6, GETDATE()) GROUP BY equipment_type, contract_country;",0 Which opponent has a week of 11?,"CREATE TABLE table_name_49 (opponent VARCHAR, week VARCHAR);",SELECT opponent FROM table_name_49 WHERE week = 11;,SELECT opponent FROM table_name_49 WHERE week = 11;,1 What are the least Top-5 finish when the events are greater than 18?,"CREATE TABLE table_name_82 (top_5 INTEGER, events INTEGER);",SELECT MIN(top_5) FROM table_name_82 WHERE events > 18;,SELECT MIN(top_5) FROM table_name_82 WHERE events > 18;,1 What is the average price of fair trade materials in the materials table?,"CREATE TABLE materials (material_id INT, material_name TEXT, is_fair_trade BOOLEAN, price DECIMAL); ",SELECT AVG(price) FROM materials WHERE is_fair_trade = TRUE;,SELECT AVG(price) FROM materials WHERE is_fair_trade = true;,0 "What is the highest decile of Tarras school, which had a state authority?","CREATE TABLE table_name_58 (decile INTEGER, authority VARCHAR, name VARCHAR);","SELECT MAX(decile) FROM table_name_58 WHERE authority = ""state"" AND name = ""tarras school"";","SELECT MAX(decile) FROM table_name_58 WHERE authority = ""state"" AND name = ""tarras school"";",1 What is the maximum production rate (bbl/day) for wells in the 'Gulf of Mexico'?,"CREATE TABLE wells (well_id INT, region VARCHAR(20), production_rate FLOAT); ",SELECT MAX(production_rate) FROM wells WHERE region = 'Gulf of Mexico';,SELECT MAX(production_rate) FROM wells WHERE region = 'Gulf of Mexico';,1 What was the total quantity of products sold in each category?,"CREATE TABLE sales (sale_id int, product_id int, quantity int, date date); CREATE TABLE products (product_id int, product_name varchar(255), category varchar(255), price decimal(10, 2), quantity int); ","SELECT p.category, SUM(s.quantity) as total_quantity_sold FROM sales s JOIN products p ON s.product_id = p.product_id GROUP BY p.category;","SELECT category, SUM(quantity) as total_quantity FROM sales JOIN products ON sales.product_id = products.product_id GROUP BY category;",0 Who were the running candidates when Samuel Riker was the incumbent?,"CREATE TABLE table_2668374_10 (candidates VARCHAR, incumbent VARCHAR);","SELECT candidates FROM table_2668374_10 WHERE incumbent = ""Samuel Riker"";","SELECT candidates FROM table_2668374_10 WHERE incumbent = ""Samuel Riker"";",1 What is the average number of hours spent by volunteers on 'Community Education' programs?;,"CREATE TABLE volunteer_hours (id INT, volunteer_name VARCHAR(50), project_name VARCHAR(50), hours_spent DECIMAL(5, 2)); ",SELECT AVG(hours_spent) FROM volunteer_hours WHERE project_name = 'Community Education';,SELECT AVG(hours_spent) FROM volunteer_hours WHERE project_name = 'Community Education';,1 "Which Class has a ERP W larger than 205, and a Frequency MHz smaller than 93.9, and a Call sign of k210cb?","CREATE TABLE table_name_54 (class VARCHAR, call_sign VARCHAR, erp_w VARCHAR, frequency_mhz VARCHAR);","SELECT class FROM table_name_54 WHERE erp_w > 205 AND frequency_mhz < 93.9 AND call_sign = ""k210cb"";","SELECT class FROM table_name_54 WHERE erp_w > 205 AND frequency_mhz 93.9 AND call_sign = ""k210cb"";",0 What is the distribution of articles published by day of the week in the 'news_reports' table?,"CREATE TABLE news_reports (id INT, title VARCHAR(255), author VARCHAR(255), published_date DATE, topic VARCHAR(255));","SELECT DAYNAME(published_date) as day_of_week, COUNT(*) as articles_published FROM news_reports GROUP BY day_of_week;","SELECT DATE_FORMAT(published_date, '%Y-%m') as day_of_week, COUNT(*) as article_count FROM news_reports GROUP BY day_of_week;",0 What is the average response time for emergency calls in 'Downtown East' and 'Downtown West' during the first quarter of the year?,"CREATE TABLE emergency_calls (id INT, region VARCHAR(20), response_time INT, quarter INT, year INT);","SELECT AVG(response_time) FROM emergency_calls WHERE region IN ('Downtown East', 'Downtown West') AND quarter = 1 AND year = YEAR(CURRENT_DATE);","SELECT region, AVG(response_time) as avg_response_time FROM emergency_calls WHERE region IN ('Downtown East', 'Downtown West') AND quarter = 1 GROUP BY region;",0 On how many dates was the average speed of the race 91.033 MPH?,"CREATE TABLE table_2266762_1 (date VARCHAR, average_speed__mph_ VARCHAR);","SELECT COUNT(date) FROM table_2266762_1 WHERE average_speed__mph_ = ""91.033"";","SELECT COUNT(date) FROM table_2266762_1 WHERE average_speed__mph_ = ""91.033"";",1 What is the average donation amount for organizations with a focus on education in the UK?,"CREATE TABLE donations (id INT, donation_amount INT, organization_id INT); CREATE TABLE organizations (id INT, name TEXT, country TEXT, focus TEXT); ",SELECT AVG(donations.donation_amount) FROM donations INNER JOIN organizations ON donations.organization_id = organizations.id WHERE organizations.country = 'UK' AND organizations.focus = 'education';,SELECT AVG(donation_amount) FROM donations JOIN organizations ON donations.organization_id = organizations.id WHERE organizations.focus = 'Education' AND organizations.country = 'UK';,0 What is the maximum gas limit for transactions involving the digital asset 'ETH' in the past week?,"CREATE TABLE transactions (asset_name VARCHAR(10), gas_limit INT); CREATE TABLE dates (transaction_date DATE); ",SELECT MAX(gas_limit) FROM transactions WHERE asset_name = 'ETH' AND transaction_date BETWEEN '2022-01-01' AND '2022-01-07';,"SELECT MAX(gas_limit) FROM transactions WHERE asset_name = 'ETH' AND transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK);",0 What is the average age of farmers in urban areas?,"CREATE TABLE farmers (id INT PRIMARY KEY, name TEXT, location TEXT, age INT); ",SELECT AVG(age) FROM farmers WHERE location = 'Urban';,SELECT AVG(age) FROM farmers WHERE location = 'Urban';,1 What is the total budget for criminal justice reform programs in each state?,"CREATE TABLE criminal_justice_reform_programs (program_id INT, state TEXT, budget INT); ","SELECT state, SUM(budget) FROM criminal_justice_reform_programs GROUP BY state;","SELECT state, SUM(budget) FROM criminal_justice_reform_programs GROUP BY state;",1 What is the average cost of spacecraft manufactured by companies in Oceania?,"CREATE TABLE SpacecraftManufacturing (id INT, company VARCHAR(255), cost INT, country VARCHAR(255));","SELECT AVG(cost) FROM SpacecraftManufacturing WHERE country IN ('Australia', 'New Zealand');",SELECT AVG(cost) FROM SpacecraftManufacturing WHERE country = 'Oceania';,0 What is the average speed of vehicles on each route?,"CREATE TABLE routes (route_id INT, route_name TEXT);CREATE TABLE vehicles (vehicle_id INT, route_id INT, speed INT); ","SELECT routes.route_name, AVG(vehicles.speed) FROM routes INNER JOIN vehicles ON routes.route_id = vehicles.route_id GROUP BY routes.route_name;","SELECT r.route_name, AVG(v.speed) as avg_speed FROM routes r JOIN vehicles v ON r.route_id = v.route_id GROUP BY r.route_name;",0 What is the sum of losses for Against values over 1510?,"CREATE TABLE table_name_70 (losses INTEGER, against INTEGER);",SELECT SUM(losses) FROM table_name_70 WHERE against > 1510;,SELECT SUM(losses) FROM table_name_70 WHERE against > 1510;,1 What is the total quantity of products supplied by women-owned businesses in the US?,"CREATE TABLE suppliers (supplier_id INT, name VARCHAR(50), owner VARCHAR(50), country VARCHAR(50), sustainable_practices BOOLEAN); CREATE TABLE inventory (product_id INT, supplier_id INT, quantity INT); CREATE VIEW supplier_inventory_view AS SELECT suppliers.supplier_id, suppliers.name, suppliers.owner, suppliers.country, SUM(inventory.quantity) as total_quantity FROM suppliers INNER JOIN inventory ON suppliers.supplier_id = inventory.supplier_id GROUP BY suppliers.supplier_id, suppliers.name, suppliers.owner, suppliers.country;",SELECT total_quantity FROM supplier_inventory_view WHERE owner = 'Women-owned' AND country = 'United States';,SELECT SUM(total_quantity) FROM supplier_inventory_view JOIN suppliers ON supplier_inventory_view.supplier_id = suppliers.supplier_id JOIN suppliers ON supplier_inventory_view.supplier_id = suppliers.supplier_id WHERE suppliers.owner = 'Female' AND suppliers.country = 'US';,0 What is the earliest year in which the result is championship US Open (2)?,"CREATE TABLE table_29163303_2 (year INTEGER, championship VARCHAR);","SELECT MIN(year) FROM table_29163303_2 WHERE championship = ""US Open (2)"";","SELECT MIN(year) FROM table_29163303_2 WHERE championship = ""US Open (2)"";",1 Who had the fastest lap on september 4?,"CREATE TABLE table_30134667_2 (fastest_lap VARCHAR, date VARCHAR);","SELECT fastest_lap FROM table_30134667_2 WHERE date = ""September 4"";","SELECT fastest_lap FROM table_30134667_2 WHERE date = ""September 4"";",1 How many menu items are there for each cuisine type?,"CREATE TABLE MenuItems (MenuItemID int, RestaurantID int, CuisineType varchar(255)); ","SELECT R.CuisineType, COUNT(MI.MenuItemID) as Count FROM Restaurants R INNER JOIN MenuItems MI ON R.RestaurantID = MI.RestaurantID GROUP BY R.CuisineType;","SELECT CuisineType, COUNT(*) FROM MenuItems GROUP BY CuisineType;",0 In what round did Mike Newton Thomas Erdos Ben Collins won the LMP2?,"CREATE TABLE table_24865763_2 (rnd VARCHAR, lmp2_winning_team VARCHAR);","SELECT rnd FROM table_24865763_2 WHERE lmp2_winning_team = ""Mike Newton Thomas Erdos Ben Collins"";","SELECT rnd FROM table_24865763_2 WHERE lmp2_winning_team = ""Mike Newton Thomas Erdos Ben Collins"";",1 What authority does the rototuna area have?,"CREATE TABLE table_name_35 (authority VARCHAR, area VARCHAR);","SELECT authority FROM table_name_35 WHERE area = ""rototuna"";","SELECT authority FROM table_name_35 WHERE area = ""rototuna"";",1 How many users have posted more than 10 times in the last week from Germany?,"CREATE TABLE users (id INT, name VARCHAR(50), country VARCHAR(50)); CREATE TABLE posts (id INT, user_id INT, timestamp DATETIME); ","SELECT COUNT(DISTINCT users.id) FROM users INNER JOIN posts ON users.id = posts.user_id WHERE users.country = 'Germany' AND posts.timestamp >= DATE_SUB(NOW(), INTERVAL 1 WEEK) GROUP BY users.id HAVING COUNT(posts.id) > 10;","SELECT COUNT(DISTINCT users.id) FROM users INNER JOIN posts ON users.id = posts.user_id WHERE users.country = 'Germany' AND posts.timestamp >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK);",0 Constructor with total time of 2:45.416,"CREATE TABLE table_name_72 (constructor VARCHAR, q1 VARCHAR, q2_time VARCHAR);","SELECT constructor FROM table_name_72 WHERE q1 + q2_time = ""2:45.416"";","SELECT constructor FROM table_name_72 WHERE q1 = ""2:45.416"" AND q2_time = ""2:45.416"";",0 What is the total number of employees working in the mining sector in the state of Utah?,"CREATE TABLE employees (id INT, company TEXT, location TEXT, department TEXT, number_of_employees INT); ",SELECT SUM(number_of_employees) FROM employees WHERE location = 'Utah' AND department = 'Mining';,SELECT SUM(number_of_employees) FROM employees WHERE location = 'Utah' AND department = 'Mining';,1 Swimmer Jiao Liuyang has what for the sum of lane?,"CREATE TABLE table_name_50 (lane VARCHAR, name VARCHAR);","SELECT COUNT(lane) FROM table_name_50 WHERE name = ""jiao liuyang"";","SELECT COUNT(lane) FROM table_name_50 WHERE name = ""jiao liuyang"";",1 Which grand prix had gerhard berger in his fastest lap and a jacques villeneuve pole position?,"CREATE TABLE table_name_24 (grand_prix VARCHAR, fastest_lap VARCHAR, pole_position VARCHAR);","SELECT grand_prix FROM table_name_24 WHERE fastest_lap = ""gerhard berger"" AND pole_position = ""jacques villeneuve"";","SELECT grand_prix FROM table_name_24 WHERE fastest_lap = ""gerhard berger"" AND pole_position = ""jacques villeneuve"";",1 Who wrote the episode that has a production code 3x7557?,"CREATE TABLE table_22347090_6 (written_by VARCHAR, production_code VARCHAR);","SELECT written_by FROM table_22347090_6 WHERE production_code = ""3X7557"";","SELECT written_by FROM table_22347090_6 WHERE production_code = ""3X7557"";",1 What is the salary of the employee with the highest salary in the 'IT' department?,"CREATE TABLE Employees (Employee_ID INT, First_Name VARCHAR(50), Last_Name VARCHAR(50), Department VARCHAR(50), Salary DECIMAL(10,2)); ",SELECT Salary FROM Employees WHERE Employee_ID = (SELECT Employee_ID FROM Employees WHERE Department = 'IT' ORDER BY Salary DESC LIMIT 1);,SELECT Salary FROM Employees WHERE Department = 'IT' ORDER BY Salary DESC LIMIT 1;,0 What tms were built nzr addington in the year 1913,"CREATE TABLE table_1166023_1 (TMS VARCHAR, builder VARCHAR, year_built VARCHAR);","SELECT TMS AS number FROM table_1166023_1 WHERE builder = ""NZR Addington"" AND year_built = 1913;","SELECT TMS FROM table_1166023_1 WHERE builder = ""NZR Addington"" AND year_built = 1913;",0 List the top 3 most water-consuming states in the United States in 2021.,"CREATE TABLE water_consumption_us (state VARCHAR, year INT, water_consumption FLOAT); ","SELECT state, water_consumption FROM water_consumption_us ORDER BY water_consumption DESC LIMIT 3;","SELECT state, water_consumption FROM water_consumption_us WHERE year = 2021 ORDER BY water_consumption DESC LIMIT 3;",0 "What is the average survival rate of fish in our aquatic farms, grouped by farm location?","CREATE TABLE FarmLocations (LocationID int, FarmName varchar(50), City varchar(50), State varchar(50), Country varchar(50)); CREATE TABLE FishStock (StockID int, FarmLocationID int, FishSpecies varchar(50), Quantity int, SurvivalRate float); ","SELECT fl.Country, AVG(fs.SurvivalRate) as Avg_SurvivalRate FROM FishStock fs JOIN FarmLocations fl ON fs.FarmLocationID = fl.LocationID GROUP BY fl.Country;","SELECT FarmLocations.FarmName, AVG(FishStock.SurvivalRate) as AvgSurvivalRate FROM FarmLocations INNER JOIN FishStock ON FarmLocations.FarmLocationID = FishStock.FarmLocationID WHERE FishStock.FishSpecies = 'Aquatic' GROUP BY FarmLocations.FarmName;",0 What is the adoption rate of AI-powered chatbots in the hotel industry for the 'Europe' region?,"CREATE TABLE ai_chatbots (id INT, hotel_id INT, region TEXT, adoption_rate FLOAT); CREATE TABLE hotels (id INT, name TEXT, region TEXT); ","SELECT region, AVG(adoption_rate) FROM ai_chatbots a JOIN hotels h ON a.hotel_id = h.id WHERE h.region = 'Europe' GROUP BY region;",SELECT adoption_rate FROM ai_chatbots INNER JOIN hotels ON ai_chatbots.hotel_id = hotels.id WHERE hotels.region = 'Europe';,0 what's the turing complete with name being atanasoff–berry computer (us),"CREATE TABLE table_13636_1 (turing_complete VARCHAR, name VARCHAR);","SELECT turing_complete FROM table_13636_1 WHERE name = ""Atanasoff–Berry Computer (US)"";","SELECT turing_complete FROM table_13636_1 WHERE name = ""Atanasoff–Berry Computer (US)"";",1 "What is the average time to complete threat intelligence reports, by region, for the top three contractors in the defense industry in the past year?","CREATE TABLE threat_intelligence_reports (report_id INT, report_date DATE, contractor TEXT, region TEXT, report_description TEXT, completion_date DATE); ","SELECT region, AVG(DATEDIFF(completion_date, report_date)) as avg_time_to_complete FROM threat_intelligence_reports WHERE contractor IN (SELECT contractor FROM (SELECT contractor, COUNT(*) as num_reports FROM threat_intelligence_reports GROUP BY contractor ORDER BY num_reports DESC LIMIT 3) as top_three_contractors) GROUP BY region;","SELECT region, AVG(DATEDIFF(completion_date, report_description, completion_date)) as avg_time_to_complete FROM threat_intelligence_reports WHERE report_date >= DATEADD(year, -1, GETDATE()) GROUP BY region ORDER BY avg_time_to_complete DESC LIMIT 3;",0 What is the total number of disability accommodations requested and approved by type and month?,"CREATE TABLE Accommodation_Data (Request_ID INT, Request_Date DATE, Accommodation_Type VARCHAR(50), Request_Status VARCHAR(10));","SELECT DATE_PART('month', Request_Date) as Month, Accommodation_Type, COUNT(*) as Total_Requests FROM Accommodation_Data WHERE Request_Status = 'Approved' GROUP BY Month, Accommodation_Type;","SELECT Accommodation_Type, DATE_FORMAT(Request_Date, '%Y-%m') as Month, COUNT(*) as Total_Accommodations FROM Accommodation_Data GROUP BY Month, Accommodation_Type;",0 "What is the number of professional development events attended by teachers in each region, ordered by attendance?","CREATE TABLE teacher_events (teacher_id INT, region VARCHAR(20), event_attended INT); ","SELECT region, SUM(event_attended) as total_events, ROW_NUMBER() OVER (ORDER BY SUM(event_attended) DESC) as rank FROM teacher_events GROUP BY region ORDER BY rank;","SELECT region, COUNT(*) as num_events FROM teacher_events GROUP BY region ORDER BY num_events DESC;",0 "Which Year has a Producer of viva films, and a Title of magkapatid?","CREATE TABLE table_name_41 (year VARCHAR, producer VARCHAR, title VARCHAR);","SELECT year FROM table_name_41 WHERE producer = ""viva films"" AND title = ""magkapatid"";","SELECT year FROM table_name_41 WHERE producer = ""viva films"" AND title = ""magkapatid"";",1 What country was the player who was 11 off par from?,"CREATE TABLE table_name_88 (country VARCHAR, to_par VARCHAR);",SELECT country FROM table_name_88 WHERE to_par = 11;,"SELECT country FROM table_name_88 WHERE to_par = ""11 off par"";",0 Update the name of the member with member_id 2 to 'Claire Johnson',"CREATE TABLE members (member_id INT, name TEXT, age INT, gender TEXT); ",UPDATE members SET name = 'Claire Johnson' WHERE member_id = 2;,UPDATE members SET name = 'Claire Johnson' WHERE member_id = 2;,1 What is the average crowd to watch Hawthorn as the away team?,"CREATE TABLE table_name_29 (crowd INTEGER, away_team VARCHAR);","SELECT AVG(crowd) FROM table_name_29 WHERE away_team = ""hawthorn"";","SELECT AVG(crowd) FROM table_name_29 WHERE away_team = ""hawthorn"";",1 Which species have the highest average carbon sequestration?,"CREATE TABLE Species (SpeciesID INT, SpeciesName TEXT, CarbonSequestration REAL); ","SELECT SpeciesName, AVG(CarbonSequestration) as AverageSequestration FROM Species GROUP BY SpeciesName ORDER BY AverageSequestration DESC LIMIT 1;","SELECT SpeciesName, AVG(CarbonSequestration) as AvgCarbonSequestration FROM Species GROUP BY SpeciesName ORDER BY AvgCarbonSequestration DESC LIMIT 1;",0 What is the minimum amount of funds spent on community development in Africa?,"CREATE TABLE funds (id INT, category TEXT, region TEXT, amount DECIMAL(10,2)); ",SELECT MIN(amount) FROM funds WHERE category = 'Community Development' AND region = 'Africa';,SELECT MIN(amount) FROM funds WHERE category = 'Community Development' AND region = 'Africa';,1 Find the average mental health score of students in the 'Spring' semester,"CREATE TABLE student_mental_health (student_id INT, semester VARCHAR(10), mental_health_score INT); ",SELECT AVG(mental_health_score) FROM student_mental_health WHERE semester = 'Spring';,SELECT AVG(mental_health_score) FROM student_mental_health WHERE semester = 'Spring';,1 "Van Meter has a water(sqmi) of 0 and a longitude larger than -98.444062, what was their highest ANSI code?","CREATE TABLE table_name_63 (ansi_code INTEGER, longitude VARCHAR, water__sqmi_ VARCHAR, township VARCHAR);","SELECT MAX(ansi_code) FROM table_name_63 WHERE water__sqmi_ = 0 AND township = ""van meter"" AND longitude > -98.444062;","SELECT MAX(ansi_code) FROM table_name_63 WHERE water__sqmi_ = 0 AND township = ""van meters"" AND longitude > -98.444062;",0 Delete models developed in South America.,"CREATE TABLE models (id INT, name TEXT, country TEXT); ",DELETE FROM models WHERE country = 'Brazil';,DELETE FROM models WHERE country = 'South America';,0 Can you tell me the Club that has the Lost of 19?,"CREATE TABLE table_name_34 (club VARCHAR, lost VARCHAR);","SELECT club FROM table_name_34 WHERE lost = ""19"";",SELECT club FROM table_name_34 WHERE lost = 19;,0 Tell me the player from dallas burn,"CREATE TABLE table_name_64 (player VARCHAR, mls_team VARCHAR);","SELECT player FROM table_name_64 WHERE mls_team = ""dallas burn"";","SELECT player FROM table_name_64 WHERE mls_team = ""dallas burn"";",1 Where was the game where attendance was 51478?,"CREATE TABLE table_17848578_1 (game_site VARCHAR, attendance VARCHAR);",SELECT game_site FROM table_17848578_1 WHERE attendance = 51478;,SELECT game_site FROM table_17848578_1 WHERE attendance = 51478;,1 What driver had a time/retired of + 10 laps and more than 6 points?,"CREATE TABLE table_name_80 (driver VARCHAR, time_retired VARCHAR, points VARCHAR);","SELECT driver FROM table_name_80 WHERE time_retired = ""+ 10 laps"" AND points > 6;","SELECT driver FROM table_name_80 WHERE time_retired = ""+ 10 laps"" AND points > 6;",1 What is the dissolved date of the parliament assembled on 3 June 1467?,"CREATE TABLE table_name_31 (dissolved VARCHAR, assembled VARCHAR);","SELECT dissolved FROM table_name_31 WHERE assembled = ""3 june 1467"";","SELECT dissolved FROM table_name_31 WHERE assembled = ""3 june 1467"";",1 Name the Report has a Name of lyon grand prix?,"CREATE TABLE table_name_70 (report VARCHAR, name VARCHAR);","SELECT report FROM table_name_70 WHERE name = ""lyon grand prix"";","SELECT report FROM table_name_70 WHERE name = ""lyon grand prix"";",1 How many tourists visited each destination in the last 3 months of 2022?,"CREATE TABLE Destinations_2022 (id INT, destination VARCHAR(50), tourist_arrivals INT, month INT, year INT); ","SELECT destination, SUM(tourist_arrivals) as total_arrivals FROM Destinations_2022 WHERE month >= 10 AND year = 2022 GROUP BY destination;","SELECT destination, SUM(tourist_arrivals) FROM Destinations_2022 WHERE month >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH) AND year = 2022 GROUP BY destination;",0 How many students have engaged in lifelong learning activities in each district in '2021'?,"CREATE TABLE districts (district_id INT, district_name VARCHAR(50)); CREATE TABLE students (student_id INT, district_id INT, engaged_in_lifelong_learning_activities BOOLEAN, lifelong_learning_year INT); ","SELECT d.district_name, COUNT(s.student_id) AS number_of_students FROM districts d JOIN students s ON d.district_id = s.district_id WHERE s.lifelong_learning_year = 2021 AND s.engaged_in_lifelong_learning_activities = TRUE GROUP BY d.district_name;","SELECT d.district_name, COUNT(s.student_id) FROM districts d JOIN students s ON d.district_id = s.district_id WHERE s.engaged_in_lifelong_learning_activities = TRUE AND s.lifelong_learning_year = 2021 GROUP BY d.district_name;",0 How many broadband customers does the Tokyo regional office have?,"CREATE TABLE broadband_subscribers (subscriber_id INT, regional_office VARCHAR(20)); ",SELECT COUNT(*) FROM broadband_subscribers WHERE regional_office = 'Tokyo';,SELECT COUNT(*) FROM broadband_subscribers WHERE regional_office = 'Tokyo';,1 What is the population (1991) where population (2002) was 14250?,"CREATE TABLE table_2562572_7 (population__1991_ VARCHAR, population__2002_ VARCHAR);",SELECT COUNT(population__1991_) FROM table_2562572_7 WHERE population__2002_ = 14250;,SELECT population__1991_ FROM table_2562572_7 WHERE population__2002_ = 14250;,0 Who was the player in 1981?,"CREATE TABLE table_name_67 (player VARCHAR, year VARCHAR);","SELECT player FROM table_name_67 WHERE year = ""1981"";",SELECT player FROM table_name_67 WHERE year = 1981;,0 "What was the latest week that had a game on November 18, 1951?","CREATE TABLE table_name_91 (week INTEGER, date VARCHAR);","SELECT MAX(week) FROM table_name_91 WHERE date = ""november 18, 1951"";","SELECT MAX(week) FROM table_name_91 WHERE date = ""november 18, 1951"";",1 What District has a College or Campus Name of anna university college of engineering kanchipuram?,"CREATE TABLE table_name_31 (district VARCHAR, college_or_campus_name VARCHAR);","SELECT district FROM table_name_31 WHERE college_or_campus_name = ""anna university college of engineering kanchipuram"";","SELECT district FROM table_name_31 WHERE college_or_campus_name = ""anna university college of engineering kanchipuram"";",1 Obtain the top 3 states with the highest veteran employment rate,"CREATE TABLE veteran_occupations (state VARCHAR(2), occupation VARCHAR(50), employed_veterans INT, total_veterans INT); ","SELECT state, (employed_veterans/total_veterans) as employment_rate FROM veteran_occupations ORDER BY employment_rate DESC LIMIT 3;","SELECT state, employed_veterans, total_veterans FROM veteran_occupations ORDER BY employed_veterans DESC LIMIT 3;",0 Which Paul McCartney has a Linda McCartney of keyboards or drum?,"CREATE TABLE table_name_15 (paul_mccartney VARCHAR, linda_mccartney VARCHAR);","SELECT paul_mccartney FROM table_name_15 WHERE linda_mccartney = ""keyboards or drum"";","SELECT paul_mccartney FROM table_name_15 WHERE linda_mccartney = ""keyboards or drum"";",1 Which party was re-elected in south carolina 5 district?,"CREATE TABLE table_name_2 (party VARCHAR, result VARCHAR, district VARCHAR);","SELECT party FROM table_name_2 WHERE result = ""re-elected"" AND district = ""south carolina 5"";","SELECT party FROM table_name_2 WHERE result = ""re-elected"" AND district = ""south carolina 5"";",1 What is the total cost of sustainable building projects in OR?,"CREATE TABLE SustainableCosts (ProjectID int, State varchar(25), Sustainable bit, Cost decimal(10,2)); ","SELECT State, SUM(Cost) AS TotalCost FROM SustainableCosts WHERE State = 'OR' AND Sustainable = 1 GROUP BY State;",SELECT SUM(Cost) FROM SustainableCosts WHERE State = 'OR' AND Sustainable = 1;,0 What are the names and types of all plates in the oceanography domain?,"CREATE TABLE Plate (plate_name VARCHAR(50), plate_type VARCHAR(50)); ","SELECT plate_name, plate_type FROM Plate;","SELECT plate_name, plate_type FROM Plate WHERE plate_type LIKE '%Oceanography%';",0 Delete records from the 'temperature_data' table where the temperature is below -25 degrees,"CREATE TABLE temperature_data (id INT PRIMARY KEY, year INT, month INT, temperature DECIMAL(5,2)); ",DELETE FROM temperature_data WHERE temperature < -25.0;,DELETE FROM temperature_data WHERE temperature -25;,0 How many farms in the aquaculture industry have a water usage above the average for that industry?,"CREATE TABLE IndustryFarms (farm_id INT, industry VARCHAR(10), water_usage FLOAT); ",SELECT farm_id FROM IndustryFarms WHERE industry = 'Aquaculture' GROUP BY farm_id HAVING AVG(water_usage) < water_usage;,SELECT COUNT(*) FROM IndustryFarms WHERE industry = 'Aquaculture' AND water_usage > (SELECT AVG(water_usage) FROM IndustryFarms);,0 "Insert a new sustainable menu item ""Impossible Burger"" in the ""Sustainable"" category with a MenuID of 2003.","CREATE TABLE Menu (MenuID int, ItemName varchar(50), Category varchar(50));","INSERT INTO Menu (MenuID, ItemName, Category) VALUES (2003, 'Impossible Burger', 'Sustainable');","INSERT INTO Menu (MenuID, ItemName, Category) VALUES (2003, 'Impossible Burger', 'Sustainable');",1 What years did the player with a t71 finish win?,"CREATE TABLE table_name_68 (year_s__won VARCHAR, finish VARCHAR);","SELECT year_s__won FROM table_name_68 WHERE finish = ""t71"";","SELECT year_s__won FROM table_name_68 WHERE finish = ""t71"";",1 Which party experienced a result of lost re-election democratic-republican hold?,"CREATE TABLE table_2668352_16 (party VARCHAR, result VARCHAR);","SELECT party FROM table_2668352_16 WHERE result = ""Lost re-election Democratic-Republican hold"";","SELECT party FROM table_2668352_16 WHERE result = ""Lost re-election democratic-republican hold"";",0 What are the monthly production quantities for a specific chemical category?,"CREATE TABLE production_data (chemical_id INT, category VARCHAR(255), production_date DATE, quantity INT); ","SELECT category, DATE_FORMAT(production_date, '%Y-%m') AS Month, SUM(quantity) FROM production_data GROUP BY Month, category;","SELECT category, DATE_FORMAT(production_date, '%Y-%m') as month, quantity FROM production_data GROUP BY category, month;",0 "Determine the percentage of digital divide funding received by organizations in the last year, partitioned by organization size.","CREATE TABLE org_size (org_name VARCHAR(50), size VARCHAR(50), funding INT); CREATE TABLE funding_data (org_name VARCHAR(50), year INT, funding INT); ","SELECT o.org_name, o.size, (o.funding * 100.0 / f.funding) as percentage FROM org_size o JOIN funding_data f ON o.org_name = f.org_name WHERE f.year = 2021 GROUP BY o.org_name, o.size ORDER BY percentage DESC;","SELECT size, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM org_size WHERE funding_data.year = funding_data.year)) * 100.0 / (SELECT COUNT(*) FROM funding_data WHERE funding_data.year = funding_data.year) AS percentage FROM org_size WHERE funding_data.year = funding_data.year GROUP BY size;",0 What is the average duration of dance performances in Paris in the last 3 years?,"CREATE TABLE performance_durations (id INT, city VARCHAR(20), year INT, type VARCHAR(10), duration INT); ",SELECT AVG(duration) FROM performance_durations WHERE city = 'Paris' AND type = 'dance' AND year BETWEEN 2018 AND 2020;,SELECT AVG(duration) FROM performance_durations WHERE city = 'Paris' AND type = 'Dance' AND year BETWEEN 2019 AND 2021;,0 What is the total number of volunteer hours served by volunteers who identify as Indigenous in the month of April 2021?,"CREATE TABLE VolunteerTransactions (VolunteerID INT, Hours DECIMAL(5,2), VolunteerIdentity TEXT, TransactionMonth INT); ",SELECT SUM(Hours) FROM VolunteerTransactions WHERE VolunteerIdentity = 'Indigenous' AND TransactionMonth = 4;,SELECT SUM(Hours) FROM VolunteerTransactions WHERE VolunteerIdentity = 'Indigenous' AND TransactionMonth = 4;,1 What is the maximum weight of containers handled by a single crane in 'Tokyo'?,"CREATE TABLE port (port_id INT, name TEXT);CREATE TABLE crane (crane_id INT, port_id INT, name TEXT);CREATE TABLE container (container_id INT, crane_id INT, weight INT);","SELECT crane.name, MAX(container.weight) FROM crane JOIN port ON crane.port_id = port.port_id JOIN container ON crane.crane_id = container.crane_id WHERE port.name = 'Tokyo' GROUP BY crane.name;",SELECT MAX(container.weight) FROM crane INNER JOIN port ON crane.port_id = port.port_id INNER JOIN container ON crane.crane_id = container.crane_id WHERE port.name = 'Tokyo';,0 What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?,"CREATE TABLE Tourist_Attractions (Name VARCHAR, Location_ID VARCHAR, How_to_Get_There VARCHAR); CREATE TABLE Locations (Location_ID VARCHAR, Address VARCHAR);","SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = ""254 Ottilie Junction"" OR T2.How_to_Get_There = ""bus"";","SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Locations AS T2 ON T1.Location_ID = T2.Location_ID WHERE T2.How_to_Get_There = ""Bus"" OR T2.Adresse = ""254 Ottilie Junction"";",0 "What is the total cost of ingredients for vegan dishes, updated to reflect the current inventory levels?","CREATE TABLE ingredients (id INT, ingredient_name TEXT, unit_price DECIMAL, quantity INT);",SELECT SUM(unit_price * quantity) FROM ingredients WHERE ingredient_name IN (SELECT ingredient_name FROM menu_items WHERE is_vegan = TRUE);,SELECT SUM(unit_price) FROM ingredients WHERE ingredient_name LIKE '%vegan%';,0 What are the lowest points when poles were 0 and races were 10?,"CREATE TABLE table_24405773_1 (points INTEGER, poles VARCHAR, races VARCHAR);",SELECT MIN(points) FROM table_24405773_1 WHERE poles = 0 AND races = 10;,SELECT MIN(points) FROM table_24405773_1 WHERE poles = 0 AND races = 10;,1 List all unique environmental impact assessment IDs for products manufactured in the USA and Canada.,"CREATE TABLE product (id INT, name VARCHAR(255), manufacturer_country VARCHAR(255)); CREATE TABLE eia (id INT, product_id INT, assessment_date DATE, impact_score INT); ","SELECT DISTINCT eia.id FROM eia INNER JOIN product p ON eia.product_id = p.id WHERE p.manufacturer_country IN ('USA', 'Canada');","SELECT DISTINCT eia.product_id FROM eia INNER JOIN product ON eia.product_id = product.id WHERE product.manufacturer_country IN ('USA', 'Canada');",0 Which EL places have a Rank 2013 of 15?,"CREATE TABLE table_name_4 (el_places INTEGER, rank_2013 VARCHAR);","SELECT MAX(el_places) FROM table_name_4 WHERE rank_2013 = ""15"";",SELECT MAX(el_places) FROM table_name_4 WHERE rank_2013 = 15;,0 What is the percentage of water recycled in the wastewater treatment plants in Mexico in the month of May 2022?,"CREATE TABLE wastewater_treatment_plants (plant_id INT, region VARCHAR(20), water_recycled FLOAT, usage_date DATE); ",SELECT 100.0 * AVG(water_recycled) FROM wastewater_treatment_plants WHERE region = 'Mexico' AND EXTRACT(MONTH FROM usage_date) = 5 AND EXTRACT(YEAR FROM usage_date) = 2022;,SELECT (water_recycled * 100.0 / (SELECT COUNT(*) FROM wastewater_treatment_plants WHERE region = 'Mexico')) AS percentage FROM wastewater_treatment_plants WHERE region = 'Mexico' AND usage_date BETWEEN '2022-01-01' AND '2022-05-30';,0 "Find the daily average transaction amount for the past 30 days, starting from the most recent date?","CREATE TABLE transactions (transaction_date DATE, amount DECIMAL(10,2)); ","SELECT transaction_date, AVG(amount) OVER (ORDER BY transaction_date ROWS BETWEEN 29 PRECEDING AND CURRENT ROW) AS moving_avg FROM transactions ORDER BY transaction_date DESC;","SELECT AVG(amount) FROM transactions WHERE transaction_date >= DATEADD(day, -30, GETDATE());",0 "List name, dates active, and number of deaths for all storms with at least 1 death.","CREATE TABLE storm (name VARCHAR, dates_active VARCHAR, number_deaths VARCHAR);","SELECT name, dates_active, number_deaths FROM storm WHERE number_deaths >= 1;","SELECT name, dates_active, number_deaths FROM storm WHERE number_deaths >= 1;",1 What is the average monthly data usage for 'ABC Internet' customers?,"CREATE TABLE customers (id INT, name TEXT, isp TEXT, data_usage FLOAT); ",SELECT AVG(data_usage) FROM customers WHERE isp = 'ABC Internet';,SELECT AVG(data_usage) FROM customers WHERE isp = 'ABC Internet';,1 How many afc titles did the Cleveland Browns have?,"CREATE TABLE table_1952065_4 (afc_titles INTEGER, teams_with_division_titles VARCHAR);","SELECT MAX(afc_titles) FROM table_1952065_4 WHERE teams_with_division_titles = ""Cleveland Browns"";","SELECT MAX(afc_titles) FROM table_1952065_4 WHERE teams_with_division_titles = ""Cleveland Browns"";",1 What is the most current year that had a BB CW of 78?,"CREATE TABLE table_name_8 (year INTEGER, bb_cw VARCHAR);","SELECT MAX(year) FROM table_name_8 WHERE bb_cw = ""78"";",SELECT MAX(year) FROM table_name_8 WHERE bb_cw = 78;,0 How many patients in the USA have received psychotherapy treatment?,"CREATE TABLE patients (id INT, country VARCHAR(50)); CREATE TABLE treatments (id INT, patient_id INT, treatment VARCHAR(50)); ",SELECT COUNT(*) FROM (SELECT treatments.id FROM patients INNER JOIN treatments ON patients.id = treatments.patient_id WHERE patients.country = 'USA' AND treatments.treatment = 'Psychotherapy') AS subquery;,SELECT COUNT(*) FROM patients JOIN treatments ON patients.id = treatments.patient_id WHERE patients.country = 'USA' AND treatments.treatment = 'Psychotherapy';,0 What is the average checking account balance in the Boston branch?,"CREATE TABLE accounts (customer_id INT, account_type VARCHAR(20), branch VARCHAR(20), balance DECIMAL(10,2)); ",SELECT AVG(balance) FROM accounts WHERE account_type = 'Checking' AND branch = 'Boston';,SELECT AVG(balance) FROM accounts WHERE branch = 'Boston' AND account_type = 'Checking';,0 What is the surface made of if the opponent in the final is Hewitt McMillan?,"CREATE TABLE table_22597626_2 (surface VARCHAR, opponents_in_the_final VARCHAR);","SELECT surface FROM table_22597626_2 WHERE opponents_in_the_final = ""Hewitt McMillan"";","SELECT surface FROM table_22597626_2 WHERE opponents_in_the_final = ""Hewitt McMillan"";",1 "List the number of mental health facilities in ""Colorado"" state","CREATE TABLE mental_health_facilities(id INT, name TEXT, state TEXT, type TEXT); ","SELECT state, COUNT(*) FROM mental_health_facilities WHERE state = 'Colorado' GROUP BY state;",SELECT COUNT(*) FROM mental_health_facilities WHERE state = 'Colorado';,0 Where was the decision draw before round 5?,"CREATE TABLE table_name_13 (location VARCHAR, method VARCHAR, round VARCHAR);","SELECT location FROM table_name_13 WHERE method = ""decision draw"" AND round < 5;","SELECT location FROM table_name_13 WHERE method = ""decision draw"" AND round 5;",0 What was the Score on March 1?,"CREATE TABLE table_name_18 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_18 WHERE date = ""march 1"";","SELECT score FROM table_name_18 WHERE date = ""march 1"";",1 What is the minimum monthly production quantity for a specific chemical category?,"CREATE TABLE production_data_v2 (chemical_id INT, category VARCHAR(255), production_date DATE, quantity INT); ","SELECT category, MIN(quantity) FROM production_data_v2 GROUP BY category;",SELECT MIN(quantity) FROM production_data_v2 WHERE category = 'Chemical';,0 What are the distinct secretary votes in the fall election cycle?,"CREATE TABLE VOTING_RECORD (Secretary_Vote VARCHAR, ELECTION_CYCLE VARCHAR);","SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = ""Fall"";","SELECT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = ""Fall"";",0 What's the first elected year of the district who's been the last one to do so?,CREATE TABLE table_1341472_12 (first_elected INTEGER);,SELECT MAX(first_elected) FROM table_1341472_12;,SELECT MAX(first_elected) FROM table_1341472_12;,1 what is the reference when the strain is msb8?,"CREATE TABLE table_name_38 (reference VARCHAR, strain VARCHAR);","SELECT reference FROM table_name_38 WHERE strain = ""msb8"";","SELECT reference FROM table_name_38 WHERE strain = ""msb8"";",1 "What was their record on Wed. Dec. 5, when they played in Boston Garden?","CREATE TABLE table_name_11 (record VARCHAR, location VARCHAR, date VARCHAR);","SELECT record FROM table_name_11 WHERE location = ""boston garden"" AND date = ""wed. dec. 5"";","SELECT record FROM table_name_11 WHERE location = ""boston garden"" AND date = ""wed. dec. 5"";",1 How many places are named manolo fortich?,"CREATE TABLE table_261222_1 (area__km_2__ VARCHAR, city___municipality VARCHAR);","SELECT COUNT(area__km_2__) FROM table_261222_1 WHERE city___municipality = ""Manolo Fortich"";","SELECT COUNT(area__km_2__) FROM table_261222_1 WHERE city___municipality = ""Manolo Fortich"";",1 What is the total market capitalization for digital assets issued in the Caribbean region?,"CREATE TABLE digital_assets (asset_id INT, asset_name VARCHAR(50), region VARCHAR(50), market_cap DECIMAL(18,2)); ",SELECT SUM(market_cap) FROM digital_assets WHERE region = 'Caribbean';,SELECT SUM(market_cap) FROM digital_assets WHERE region = 'Caribbean';,1 What is the maximum number of crimes committed in a single day for each crime type in the past year?,"CREATE TABLE crimes (crime_id INT, crime_type VARCHAR(255), committed_date DATE); ","SELECT c.crime_type, MAX(COUNT(c.crime_id)) FROM crimes c WHERE c.committed_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) GROUP BY c.crime_type;","SELECT crime_type, MAX(COUNT(*)) FROM crimes WHERE committed_date >= DATEADD(year, -1, GETDATE()) GROUP BY crime_type;",0 List the names of attorneys who have not won a case in Washington D.C.,"CREATE TABLE attorneys (id INT, name TEXT, city TEXT); CREATE TABLE cases (id INT, attorney_id INT, result TEXT, city TEXT); ",SELECT attorneys.name FROM attorneys LEFT JOIN cases ON attorneys.id = cases.attorney_id AND cases.result = 'won' WHERE attorneys.city = 'Washington D.C' AND cases.id IS NULL;,SELECT attorneys.name FROM attorneys INNER JOIN cases ON attorneys.id = cases.attorney_id WHERE cases.city = 'Washington D.C' AND cases.result IS NULL;,0 How many visitors attended exhibitions in each state?,"CREATE TABLE Exhibition_Visitors (id INT, visitor_state VARCHAR(255)); ","SELECT visitor_state, COUNT(*) FROM Exhibition_Visitors GROUP BY visitor_state;","SELECT visitor_state, COUNT(*) FROM Exhibition_Visitors GROUP BY visitor_state;",1 How may drawn equal points against at 129?,"CREATE TABLE table_20760802_1 (drawn VARCHAR, points_against VARCHAR);","SELECT drawn FROM table_20760802_1 WHERE points_against = ""129"";","SELECT drawn FROM table_20760802_1 WHERE points_against = ""129"";",1 Which Centerfold model has a Cover model of irina voronina?,"CREATE TABLE table_name_81 (centerfold_model VARCHAR, cover_model VARCHAR);","SELECT centerfold_model FROM table_name_81 WHERE cover_model = ""irina voronina"";","SELECT centerfold_model FROM table_name_81 WHERE cover_model = ""irina voronina"";",1 "What is the total number of cases heard in community courts for each community name, sorted alphabetically?","CREATE TABLE community_court (community_name VARCHAR(50), cases_heard INT); ","SELECT community_name, SUM(cases_heard) FROM community_court GROUP BY community_name ORDER BY community_name;","SELECT community_name, SUM(cases_heard) as total_cases FROM community_court GROUP BY community_name ORDER BY total_cases DESC;",0 Which city includes the Target Center arena?,"CREATE TABLE table_name_62 (city VARCHAR, home_arena VARCHAR);","SELECT city FROM table_name_62 WHERE home_arena = ""target center"";","SELECT city FROM table_name_62 WHERE home_arena = ""target center arena"";",0 What is the total area (in hectares) of all urban agriculture plots in the 'public_farms' table?,"CREATE TABLE public_farms (id INT, name TEXT, location TEXT, size_ha FLOAT, type TEXT); ",SELECT SUM(size_ha) FROM public_farms WHERE type = 'Urban';,SELECT SUM(size_ha) FROM public_farms WHERE type = 'Urban Agriculture';,0 "Insert records for new heritage sites into ""heritage_sites"" table","CREATE TABLE IF NOT EXISTS heritage_sites (id INT, name VARCHAR(255), status VARCHAR(255));","INSERT INTO heritage_sites (id, name, status) VALUES (4, 'Taj Mahal', 'World Heritage'), (5, 'Galapagos Islands', 'World Heritage');","INSERT INTO heritage_sites (id, name, status) VALUES (1, 'New Heritage Site', 'New');",0 what is the final-rank for the uneven bars and the competition is u.s. championships?,"CREATE TABLE table_13114949_3 (final_rank VARCHAR, event VARCHAR, competition VARCHAR);","SELECT final_rank FROM table_13114949_3 WHERE event = ""Uneven Bars"" AND competition = ""U.S. Championships"";","SELECT final_rank FROM table_13114949_3 WHERE event = ""Uneven Bars"" AND competition = ""U.S. Championships"";",1 List all suppliers of cruelty-free skincare products and their contact information.,"CREATE TABLE SkincareSuppliers (supplier_id INT, supplier_name VARCHAR(100), address VARCHAR(255), phone VARCHAR(20), product_id INT, cruelty_free BOOLEAN);","SELECT supplier_name, address, phone FROM SkincareSuppliers WHERE cruelty_free = TRUE;","SELECT supplier_name, contact_information FROM SkincareSuppliers WHERE cruelty_free = true;",0 "Identify cities with the highest obesity rates, by age group and gender.","CREATE TABLE demographics (id INT, city VARCHAR, age_group INT, gender VARCHAR, obesity_rate DECIMAL);","SELECT d.city, d.age_group, d.gender, AVG(d.obesity_rate) AS avg_obesity_rate FROM demographics d GROUP BY d.city, d.age_group, d.gender ORDER BY avg_obesity_rate DESC LIMIT 10;","SELECT city, age_group, gender, obesity_rate FROM demographics ORDER BY obesity_rate DESC LIMIT 1;",0 What is the average price of products in the 'Organic' category?,"CREATE TABLE products (id INT, name VARCHAR(255), category VARCHAR(255), price DECIMAL(10, 2)); ",SELECT AVG(price) FROM products WHERE category = 'Organic';,SELECT AVG(price) FROM products WHERE category = 'Organic';,1 What is the minimum age of male 'service' union members?,"CREATE TABLE service_union_members (member_id INT, gender VARCHAR(10), union VARCHAR(20), age INT); ",SELECT MIN(age) FROM service_union_members WHERE gender = 'Male';,SELECT MIN(age) FROM service_union_members WHERE gender = 'Male';,1 What is the PEPE Michinoku value for a Ryuji Hijikata value of sabin (12:33)?,"CREATE TABLE table_name_28 (pepe_michinoku VARCHAR, ryuji_hijikata VARCHAR);","SELECT pepe_michinoku FROM table_name_28 WHERE ryuji_hijikata = ""sabin (12:33)"";","SELECT pepe_michinoku FROM table_name_28 WHERE ryuji_hijikata = ""sabin (12:33)"";",1 WHAT CHARTING HAS NO BLOGS OR DISCUSSION?,"CREATE TABLE table_name_96 (charting VARCHAR, blogs VARCHAR, discussion VARCHAR);","SELECT charting FROM table_name_96 WHERE blogs = ""no"" AND discussion = ""no"";","SELECT COUNT(charting) FROM table_name_96 WHERE blogs = ""no"" AND discussion = ""no"";",0 Who directed the movie when John Wayne played the role of John Travers?,"CREATE TABLE table_name_54 (director VARCHAR, role VARCHAR);","SELECT director FROM table_name_54 WHERE role = ""john travers"";","SELECT director FROM table_name_54 WHERE role = ""john wayne"";",0 What is the total quantity of a specific strain sold by dispensaries in California?,"CREATE TABLE DispensaryStrainSales (DispensaryName TEXT, StrainName TEXT, QuantitySold INTEGER); CREATE TABLE CaliforniaDispensaries (DispensaryName TEXT, Location TEXT); ",SELECT SUM(QuantitySold) FROM DispensaryStrainSales WHERE StrainName = 'Gelato' AND DispensaryName IN (SELECT DispensaryName FROM CaliforniaDispensaries);,SELECT SUM(QuantitySold) FROM DispensaryStrainSales INNER JOIN CaliforniaDispensaries ON DispensaryStrainSales.DispensaryName = CaliforniaDispensaries.DispensaryName;,0 What is the week when type is cardio workout?,"CREATE TABLE table_27512025_1 (week VARCHAR, type VARCHAR);","SELECT week FROM table_27512025_1 WHERE type = ""Cardio Workout"";","SELECT week FROM table_27512025_1 WHERE type = ""Cardio Workout"";",1 What is the average budget for agricultural innovation projects in 2022?,"CREATE TABLE agricultural_innovation_budget (id INT, project_id INT, budget DECIMAL(10,2)); CREATE TABLE rural_innovation (id INT, project_name VARCHAR(255), sector VARCHAR(255), location VARCHAR(255), start_date DATE, end_date DATE); ",SELECT AVG(budget) FROM agricultural_innovation_budget JOIN rural_innovation ON agricultural_innovation_budget.project_id = rural_innovation.id WHERE YEAR(start_date) = 2022 AND YEAR(end_date) = 2022;,SELECT AVG(budget) FROM agricultural_innovation_budget INNER JOIN rural_innovation ON agricultural_innovation_budget.project_id = rural_innovation.id WHERE YEAR(start_date) = 2022 AND YEAR(end_date) = 2022;,0 What label is from the Region of Spain?,"CREATE TABLE table_name_93 (label VARCHAR, region VARCHAR);","SELECT label FROM table_name_93 WHERE region = ""spain"";","SELECT label FROM table_name_93 WHERE region = ""spain"";",1 What is the average funding amount received by companies founded by women in the healthcare industry?,"CREATE TABLE company (id INT, name TEXT, industry TEXT, founder_gender TEXT);CREATE TABLE funding (id INT, company_id INT, amount INT); ",SELECT AVG(funding.amount) FROM funding INNER JOIN company ON funding.company_id = company.id WHERE company.founder_gender = 'Female' AND company.industry = 'Healthcare';,SELECT AVG(funding.amount) FROM funding INNER JOIN company ON funding.company_id = company.id WHERE company.founder_gender = 'Female' AND company.industry = 'Healthcare';,1 What is the total number of total viewers with a share of 18.8% and a weekly ranking under 16?,"CREATE TABLE table_name_84 (total_viewers VARCHAR, share VARCHAR, bbc_one_weekly_ranking VARCHAR);","SELECT COUNT(total_viewers) FROM table_name_84 WHERE share = ""18.8%"" AND bbc_one_weekly_ranking < 16;","SELECT COUNT(total_viewers) FROM table_name_84 WHERE share = ""18.8%"" AND bbc_one_weekly_ranking 16;",0 Which Thickness has a Diameter of 21.9mm?,"CREATE TABLE table_name_56 (thickness VARCHAR, diameter VARCHAR);","SELECT thickness FROM table_name_56 WHERE diameter = ""21.9mm"";","SELECT thickness FROM table_name_56 WHERE diameter = ""21.9mm"";",1 Determine the number of defense contracts awarded per month in the 'defense_contracts' table,"CREATE TABLE defense_contracts (contract_id INT, company_name VARCHAR(100), contract_value DECIMAL(10, 2), contract_date DATE);","SELECT EXTRACT(MONTH FROM contract_date) as month, COUNT(*) as num_contracts FROM defense_contracts GROUP BY month;","SELECT DATE_FORMAT(contract_date, '%Y-%m') AS month, COUNT(*) AS contract_count FROM defense_contracts GROUP BY month;",0 Create a table named 'StudentsMentalHealth',"CREATE TABLE StudentsMentalHealth (StudentID INT PRIMARY KEY, MentalHealthScore INT, AssessmentDate DATE);","CREATE TABLE StudentsMentalHealth (StudentID INT PRIMARY KEY, MentalHealthScore INT, AssessmentDate DATE);","CREATE TABLE StudentsMentalHealth (StudentID INT PRIMARY KEY, MentalHealthScore INT, AssessmentDate DATE);",1 What county is the team with the mascot of the Tigers in?,"CREATE TABLE table_name_2 (county VARCHAR, mascot VARCHAR);","SELECT county FROM table_name_2 WHERE mascot = ""tigers"";","SELECT county FROM table_name_2 WHERE mascot = ""tigers"";",1 What is the total number of Rolls of State schools in Hapuku with a Decile greater than 4?,"CREATE TABLE table_name_56 (roll VARCHAR, decile VARCHAR, authority VARCHAR, area VARCHAR);","SELECT COUNT(roll) FROM table_name_56 WHERE authority = ""state"" AND area = ""hapuku"" AND decile > 4;","SELECT COUNT(roll) FROM table_name_56 WHERE authority = ""state schools"" AND area = ""hapuku"" AND decile > 4;",0 What was the score on April 22?,"CREATE TABLE table_name_17 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_17 WHERE date = ""april 22"";","SELECT score FROM table_name_17 WHERE date = ""april 22"";",1 "What is Pos., when From Club is ""Chelsea"", and when Date is ""30 July 2008""?","CREATE TABLE table_name_66 (pos VARCHAR, from_club VARCHAR, date VARCHAR);","SELECT pos FROM table_name_66 WHERE from_club = ""chelsea"" AND date = ""30 july 2008"";","SELECT pos FROM table_name_66 WHERE from_club = ""chelsea"" AND date = ""30 july 2008"";",1 What is the total billing amount for cases resolved in January 2021?,"CREATE TABLE cases (case_id INT, case_status VARCHAR(10), resolved_date DATE, billing_amount DECIMAL); ",SELECT SUM(billing_amount) FROM cases WHERE resolved_date >= '2021-01-01' AND resolved_date < '2021-02-01';,SELECT SUM(billing_amount) FROM cases WHERE resolved_date BETWEEN '2021-01-01' AND '2021-01-31';,0 Who constructed juan manuel fangio's car with over 76 laps and a grid under 10?,"CREATE TABLE table_name_47 (constructor VARCHAR, driver VARCHAR, grid VARCHAR, laps VARCHAR);","SELECT constructor FROM table_name_47 WHERE grid < 10 AND laps > 76 AND driver = ""juan manuel fangio"";","SELECT constructor FROM table_name_47 WHERE grid 10 AND laps > 76 AND driver = ""juan manuel fangio"";",0 How many times was the incumbent mike capuano,"CREATE TABLE table_1341395_22 (result VARCHAR, incumbent VARCHAR);","SELECT COUNT(result) FROM table_1341395_22 WHERE incumbent = ""Mike Capuano"";","SELECT COUNT(result) FROM table_1341395_22 WHERE incumbent = ""Mike Capuano"";",1 What is the average severity of vulnerabilities found in 'web applications' in the last 6 months?,"CREATE TABLE webapp_vulnerabilities (id INT, asset_type VARCHAR(255), vulnerability_type VARCHAR(255), severity INT, discovered_time TIMESTAMP);","SELECT AVG(severity) as avg_severity FROM webapp_vulnerabilities WHERE asset_type = 'web applications' AND discovered_time >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 6 MONTH);","SELECT AVG(severity) FROM webapp_vulnerabilities WHERE asset_type = 'web applications' AND discovered_time >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 6 MONTH);",0 List all products with circular supply chains?,"CREATE TABLE products (product_id INT, product_name VARCHAR(50), supply_chain VARCHAR(20)); ",SELECT * FROM products WHERE supply_chain = 'Circular';,SELECT * FROM products WHERE supply_chain = 'circular';,0 Which team was the second semi finalist in 2007?,"CREATE TABLE table_11214772_2 (semi_finalist__number2 VARCHAR, year VARCHAR);",SELECT semi_finalist__number2 FROM table_11214772_2 WHERE year = 2007;,SELECT semi_finalist__number2 FROM table_11214772_2 WHERE year = 2007;,1 What is the average rating of hotels in the US that have an AI concierge?,"CREATE TABLE hotels (hotel_id INT, hotel_name TEXT, country TEXT, ai_concierge BOOLEAN); ",SELECT AVG(hotel_rating) FROM hotels WHERE country = 'USA' AND ai_concierge = true;,SELECT AVG(rating) FROM hotels WHERE country = 'USA' AND ai_concierge = TRUE;,0 How many mobile customers are there in each city with a population over 1 million?,"CREATE TABLE city_populations (subscriber_id INT, city VARCHAR(50), population INT); ","SELECT city, COUNT(*) FROM city_populations WHERE population > 1000000 GROUP BY city;","SELECT city, COUNT(*) FROM city_populations WHERE population > 10000000 GROUP BY city;",0 What is the distribution of lifelong learning course enrollments by age group and race/ethnicity?,"CREATE TABLE lifelong_learning (student_id INT, age_group VARCHAR(255), race_ethnicity VARCHAR(255), course_id INT); CREATE TABLE courses (course_id INT, course_name VARCHAR(255));","SELECT l.age_group, l.race_ethnicity, COUNT(l.course_id) FROM lifelong_learning l INNER JOIN courses c ON l.course_id = c.course_id GROUP BY l.age_group, l.race_ethnicity;","SELECT l.age_group, l.race_ethnicity, COUNT(l.student_id) as enrollment_count FROM lifelong_learning l JOIN courses c ON l.course_id = c.course_id GROUP BY l.age_group, l.race_ethnicity;",0 What position did the draft pick going to saskatchewan play?,"CREATE TABLE table_28059992_5 (position VARCHAR, cfl_team VARCHAR);","SELECT position FROM table_28059992_5 WHERE cfl_team = ""Saskatchewan"";","SELECT position FROM table_28059992_5 WHERE cfl_team = ""Saskatchewan"";",1 What rider is on an aprilia that went under 18 laps with a grid total of 17?,"CREATE TABLE table_name_14 (rider VARCHAR, grid VARCHAR, manufacturer VARCHAR, laps VARCHAR);","SELECT rider FROM table_name_14 WHERE manufacturer = ""aprilia"" AND laps < 18 AND grid = 17;","SELECT rider FROM table_name_14 WHERE manufacturer = ""aprilia"" AND laps 18 AND grid = 17;",0 "How many wins for billy casper over 8 events and uner $71,979 in earnings?","CREATE TABLE table_name_62 (wins INTEGER, earnings___$__ VARCHAR, events VARCHAR, player VARCHAR);","SELECT MIN(wins) FROM table_name_62 WHERE events = 8 AND player = ""billy casper"" AND earnings___$__ < 71 OFFSET 979;","SELECT SUM(wins) FROM table_name_62 WHERE events > 8 AND player = ""billy casper"" AND earnings___$__ = ""uner"";",0 "How many times has the rule ""Unusual outbound traffic"" been triggered in the last quarter?","CREATE TABLE alert_rules (id INT, rule_name VARCHAR(255)); CREATE TABLE alerts (id INT, rule_id INT, timestamp DATETIME); ","SELECT COUNT(*) FROM alerts WHERE rule_id IN (SELECT id FROM alert_rules WHERE rule_name = 'Unusual outbound traffic') AND timestamp >= DATE_SUB(NOW(), INTERVAL 3 MONTH);","SELECT COUNT(*) FROM alerts a JOIN alert_rules r ON a.rule_id = r.id WHERE r.rule_name = 'Unusual outbound traffic' AND a.timestamp >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH);",0 How many community policing programs were implemented in Denver in 2018?,"CREATE TABLE community_programs (id INT, program VARCHAR(30), city VARCHAR(20), start_year INT); ",SELECT COUNT(*) as total FROM community_programs WHERE city = 'Denver' AND start_year = 2018;,SELECT COUNT(*) FROM community_programs WHERE city = 'Denver' AND start_year = 2018;,0 What is the Time/Retired when the grid is larger than 9 and Rolf Stommelen is the driver?,"CREATE TABLE table_name_25 (time_retired VARCHAR, grid VARCHAR, driver VARCHAR);","SELECT time_retired FROM table_name_25 WHERE grid > 9 AND driver = ""rolf stommelen"";","SELECT time_retired FROM table_name_25 WHERE grid > 9 AND driver = ""rolf sommelen"";",0 "What is the maximum and minimum transaction volume for each customer in the past month, along with the transaction date?","CREATE TABLE customer (customer_id INT, primary_advisor VARCHAR(255)); CREATE TABLE transaction (transaction_date DATE, customer_id INT, transaction_volume DECIMAL(10,2));","SELECT c.customer_id, c.primary_advisor, t.transaction_date, MAX(t.transaction_volume) as max_volume, MIN(t.transaction_volume) as min_volume FROM customer c JOIN transaction t ON c.customer_id = t.customer_id WHERE t.transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY c.customer_id, t.transaction_date HAVING COUNT(*) = 1;","SELECT c.customer_id, MAX(t.transaction_volume) as max_volume, MIN(t.transaction_volume) as min_volume FROM customer c JOIN transaction t ON c.customer_id = t.customer_id WHERE t.transaction_date >= DATEADD(month, -1, GETDATE()) GROUP BY c.customer_id;",0 Which organizations have received donations from donors with the last name 'Garcia'?,"CREATE TABLE donors (donor_id INT, first_name TEXT, last_name TEXT, donation_amount FLOAT); CREATE TABLE donations (donation_id INT, donor_id INT, organization_id INT, donation_amount FLOAT); CREATE TABLE organizations (organization_id INT, organization_name TEXT); ",SELECT organizations.organization_name FROM organizations INNER JOIN donations ON organizations.organization_id = donations.organization_id INNER JOIN donors ON donations.donor_id = donors.donor_id WHERE donors.last_name = 'Garcia';,SELECT organizations.organization_name FROM organizations INNER JOIN donations ON organizations.organization_id = donations.organization_id INNER JOIN donors ON donations.donor_id = donors.donor_id INNER JOIN organizations ON donations.organization_id = organizations.organization_id WHERE donors.last_name = 'Garcia';,0 How many solar power projects are there in renewable_projects table for each country?,"CREATE TABLE renewable_projects (id INT, name VARCHAR(50), type VARCHAR(50), country VARCHAR(50)); ","SELECT country, COUNT(*) as solar_projects_count FROM renewable_projects WHERE type = 'Solar' GROUP BY country;","SELECT country, COUNT(*) FROM renewable_projects WHERE type = 'Solar' GROUP BY country;",0 How many policies were active in each month of the year 2021?,"CREATE TABLE Policy (PolicyID INT, ActiveDate DATE); ","SELECT EXTRACT(MONTH FROM ActiveDate) AS Month, COUNT(PolicyID) AS ActivePolicies FROM Policy WHERE EXTRACT(YEAR FROM ActiveDate) = 2021 GROUP BY Month ORDER BY Month;","SELECT EXTRACT(MONTH FROM ActiveDate) AS Month, COUNT(*) FROM Policy WHERE ActiveDate BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY Month;",0 Tell me the model with fuel or propulsion of diesel and orion manufacturer in 2005,"CREATE TABLE table_name_68 (model VARCHAR, year VARCHAR, fuel_or_propulsion VARCHAR, manufacturer VARCHAR);","SELECT model FROM table_name_68 WHERE fuel_or_propulsion = ""diesel"" AND manufacturer = ""orion"" AND year = 2005;","SELECT model FROM table_name_68 WHERE fuel_or_propulsion = ""diesel"" AND manufacturer = ""orion"" AND year = 2005;",1 What was the score in the match against Sergi Bruguera?,"CREATE TABLE table_name_70 (score VARCHAR, opponent VARCHAR);","SELECT score FROM table_name_70 WHERE opponent = ""sergi bruguera"";","SELECT score FROM table_name_70 WHERE opponent = ""sergio bruguera"";",0 What is the 2nd leg where Team 2 is fc 105 libreville?,CREATE TABLE table_name_9 (team_2 VARCHAR);,"SELECT 2 AS nd_leg FROM table_name_9 WHERE team_2 = ""fc 105 libreville"";","SELECT 2 AS nd_leg FROM table_name_9 WHERE team_2 = ""fc 105 libreville"";",1 What is the maximum price of products made from sustainable materials in the Asian market?,"CREATE TABLE products (product_id INT, material VARCHAR(20), price DECIMAL(5,2), market VARCHAR(20)); ","SELECT MAX(price) FROM products WHERE market = 'Asia' AND material IN ('organic cotton', 'sustainable wood', 'recycled polyester', 'organic linen');",SELECT MAX(price) FROM products WHERE market = 'Asia' AND material LIKE '%Sustainable%';,0 Which Notes have a Year of 2002?,"CREATE TABLE table_name_48 (notes VARCHAR, year VARCHAR);",SELECT notes FROM table_name_48 WHERE year = 2002;,SELECT notes FROM table_name_48 WHERE year = 2002;,1 What is the minimum price of eco-friendly tours in Costa Rica?,"CREATE TABLE eco_tours (tour_id INT, name VARCHAR(255), country VARCHAR(255), price FLOAT, eco_friendly BOOLEAN); ",SELECT MIN(price) FROM eco_tours WHERE country = 'Costa Rica' AND eco_friendly = true;,SELECT MIN(price) FROM eco_tours WHERE country = 'Costa Rica' AND eco_friendly = true;,1 Which week did the Seattle Seahawks have a record of 6-6?,"CREATE TABLE table_name_7 (week INTEGER, record VARCHAR);","SELECT AVG(week) FROM table_name_7 WHERE record = ""6-6"";","SELECT SUM(week) FROM table_name_7 WHERE record = ""6-6"";",0 What is the total revenue for 'Pizzeria Yum'?,"CREATE TABLE restaurants (name TEXT, revenue FLOAT); ",SELECT SUM(revenue) FROM restaurants WHERE name = 'Pizzeria Yum';,SELECT SUM(revenue) FROM restaurants WHERE name = 'Pizzeria Yum';,1 What is the latest launch date in the spacecrafts table?,"CREATE TABLE spacecrafts (spacecraft_id INT, name VARCHAR(100), launch_date DATE); ",SELECT MAX(launch_date) FROM spacecrafts;,SELECT MAX(launch_date) FROM spacecrafts;,1 What is the production code for the episode with 8.56 million U.S. viewers?,"CREATE TABLE table_22181917_2 (production_code VARCHAR, us_viewers__millions_ VARCHAR);","SELECT production_code FROM table_22181917_2 WHERE us_viewers__millions_ = ""8.56"";","SELECT production_code FROM table_22181917_2 WHERE us_viewers__millions_ = ""8.56"";",1 What was the total number of donations made by each donor in '2021'?,"CREATE TABLE DonorHistory (donor_id INT, donation_date DATE, donation_amount DECIMAL(10,2)); ","SELECT donor_id, COUNT(*) AS total_donations FROM DonorHistory WHERE YEAR(donation_date) = 2021 GROUP BY donor_id;","SELECT donor_id, COUNT(*) as total_donations FROM DonorHistory WHERE donation_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY donor_id;",0 Name the Nationality of södertälje sk?,"CREATE TABLE table_name_78 (nationality VARCHAR, team_from VARCHAR);","SELECT nationality FROM table_name_78 WHERE team_from = ""södertälje sk"";","SELECT nationality FROM table_name_78 WHERE team_from = ""södertälje sk"";",1 Who was the finalist when the MVP was Romain Sato?,"CREATE TABLE table_19651669_1 (finalist VARCHAR, mvp VARCHAR);","SELECT finalist FROM table_19651669_1 WHERE mvp = ""Romain Sato"";","SELECT finalist FROM table_19651669_1 WHERE mvp = ""Romain Sato"";",1 Update the 'launch_site' for the 'Mars_2023' satellite mission to 'Cape Canaveral' in the 'satellite_deployment' table.,"CREATE TABLE satellite_deployment (mission VARCHAR(50), launch_site VARCHAR(50)); ",UPDATE satellite_deployment SET launch_site = 'Cape_Canaveral' WHERE mission = 'Mars_2023';,UPDATE satellite_deployment SET launch_site = 'Cape Canaveral' WHERE mission = 'Mars_2023';,0 What is the total fare collected by accessible trams in Berlin?,"CREATE TABLE Trams (TramID int, Accessible bit, Fare decimal(5,2)); ",SELECT SUM(Fare) FROM Trams WHERE Accessible = 1;,SELECT SUM(Fare) FROM Trams WHERE Accessible = 1;,1 Delete all records from the 'biosensors' table where the sensitivity is less than 0.0005 mV/decade,"CREATE TABLE biosensors (biosensor_id INT PRIMARY KEY, biosensor_name VARCHAR(50), biosensor_sensitivity DECIMAL(5,4));",DELETE FROM biosensors WHERE biosensor_sensitivity < 0.0005;,DELETE FROM biosensors WHERE biosensor_sensitivity 0.0005;,0 Which countries has the most number of airlines whose active status is 'Y'?,"CREATE TABLE airlines (country VARCHAR, active VARCHAR);",SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1;,SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1;,1 "What is the average mental health score of students in each district, ordered by average score?","CREATE TABLE districts (district_id INT, district_name TEXT); CREATE TABLE students (student_id INT, student_name TEXT, district_id INT, mental_health_score INT); ","SELECT d.district_name, AVG(s.mental_health_score) as avg_score FROM students s JOIN districts d ON s.district_id = d.district_id GROUP BY s.district_id ORDER BY avg_score DESC;","SELECT d.district_name, AVG(s.mental_health_score) as avg_score FROM districts d JOIN students s ON d.district_id = s.district_id GROUP BY d.district_name ORDER BY avg_score DESC;",0 "What is average quantity, when DRG number is 99 011?","CREATE TABLE table_name_85 (quantity INTEGER, drg_number_s_ VARCHAR);","SELECT AVG(quantity) FROM table_name_85 WHERE drg_number_s_ = ""99 011"";","SELECT AVG(quantity) FROM table_name_85 WHERE drg_number_s_ = ""99 011"";",1 What is theW-L of the tournament listed as A for 1976?,CREATE TABLE table_name_82 (career_w_l VARCHAR);,"SELECT career_w_l FROM table_name_82 WHERE 1976 = ""a"";","SELECT career_w_l FROM table_name_82 WHERE 1976 = ""a"";",1 What bike has 26 as the grid?,"CREATE TABLE table_name_20 (bike VARCHAR, grid VARCHAR);",SELECT bike FROM table_name_20 WHERE grid = 26;,SELECT bike FROM table_name_20 WHERE grid = 26;,1 What species have been studied in Canada?,"CREATE TABLE species (id INT, name VARCHAR(50), population INT, conservation_status VARCHAR(20)); CREATE TABLE species_research (id INT, species_id INT, year INT, location VARCHAR(50), observations INT); CREATE TABLE location (id INT, name VARCHAR(50)); ",SELECT s.name FROM species s JOIN species_research r ON s.id = s.species_id JOIN location l ON r.location = l.name WHERE l.name = 'Canada';,SELECT s.name FROM species s INNER JOIN species_research sr ON s.id = sr.species_id INNER JOIN location l ON sr.location = l.name WHERE l.name = 'Canada';,0 Which sustainable tourism activities are available in Tokyo?,"CREATE TABLE sustainable_activities (activity_id INT, name TEXT, city TEXT); ",SELECT name FROM sustainable_activities WHERE city = 'Tokyo';,SELECT name FROM sustainable_activities WHERE city = 'Tokyo';,1 Which Navigator has a Total Time of 08:29?,"CREATE TABLE table_name_37 (navigator VARCHAR, total_time VARCHAR);","SELECT navigator FROM table_name_37 WHERE total_time = ""08:29"";","SELECT navigator FROM table_name_37 WHERE total_time = ""08:29"";",1 What i the try bonus with 12 losses?,"CREATE TABLE table_name_78 (try_bonus VARCHAR, lost VARCHAR);","SELECT try_bonus FROM table_name_78 WHERE lost = ""12"";",SELECT try_bonus FROM table_name_78 WHERE lost = 12;,0 What was the total revenue for the 'Purple Haze' strain last month?,"CREATE TABLE strains (id INT, name TEXT, price DECIMAL(5,2), quantity INT); ",SELECT SUM(price * quantity) AS total_revenue FROM strains WHERE name = 'Purple Haze' AND EXTRACT(MONTH FROM order_date) = EXTRACT(MONTH FROM CURRENT_DATE) - 1;,SELECT SUM(price * quantity) FROM strains WHERE name = 'Purple Haze' AND MONTH(date) = 1;,0 "How many wins did SD Eibar, which played less than 38 games, have?","CREATE TABLE table_name_24 (wins INTEGER, club VARCHAR, played VARCHAR);","SELECT SUM(wins) FROM table_name_24 WHERE club = ""sd eibar"" AND played < 38;","SELECT SUM(wins) FROM table_name_24 WHERE club = ""sd eibar"" AND played 38;",0 Find the top 3 menu items contributing to daily revenue in 'fine_dining' restaurant,"CREATE TABLE restaurant (id INT, name VARCHAR(255)); CREATE TABLE menu (id INT, item VARCHAR(255), price DECIMAL(5,2), daily_sales INT, restaurant_id INT);","SELECT i.item, SUM(m.price * m.daily_sales) as revenue FROM menu m JOIN restaurant r ON m.restaurant_id = r.id WHERE r.name = 'fine_dining' GROUP BY i.item ORDER BY revenue DESC LIMIT 3;","SELECT item, daily_sales FROM menu WHERE restaurant_id = 3 GROUP BY item ORDER BY daily_sales DESC LIMIT 3;",0 Name the others % for bush number 1372,"CREATE TABLE table_23014476_1 (others__percentage VARCHAR, bush__number VARCHAR);",SELECT others__percentage FROM table_23014476_1 WHERE bush__number = 1372;,SELECT others__percentage FROM table_23014476_1 WHERE bush__number = 1372;,1 what is the numbr for fri may 30 and mon may 26 is 19' 02.890 118.847mph?,"CREATE TABLE table_14209455_1 (fri_30_may VARCHAR, mon_26_may VARCHAR);","SELECT fri_30_may FROM table_14209455_1 WHERE mon_26_may = ""19' 02.890 118.847mph"";","SELECT fri_30_may FROM table_14209455_1 WHERE mon_26_may = ""19' 02.890 118.847mph"";",1 What is the average total with 1 FA cup and more than 0 FA trophies?,"CREATE TABLE table_name_61 (total INTEGER, fa_cup VARCHAR, fa_trophy VARCHAR);",SELECT AVG(total) FROM table_name_61 WHERE fa_cup = 1 AND fa_trophy > 0;,SELECT AVG(total) FROM table_name_61 WHERE fa_cup = 1 AND fa_trophy > 0;,1 What is the average for the gymnast with a 9.9 start value and a total of 9.612?,"CREATE TABLE table_name_33 (average INTEGER, start_value VARCHAR, total VARCHAR);",SELECT AVG(average) FROM table_name_33 WHERE start_value = 9.9 AND total = 9.612;,SELECT AVG(average) FROM table_name_33 WHERE start_value = 9.9 AND total = 9.612;,1 How did the episode rank that had 2.65 million viewers?,"CREATE TABLE table_11274401_2 (rank___number_ VARCHAR, viewers__m_ VARCHAR);","SELECT rank___number_ FROM table_11274401_2 WHERE viewers__m_ = ""2.65"";","SELECT rank___number_ FROM table_11274401_2 WHERE viewers__m_ = ""2.65"";",1 "What is the sum of Pick #, when Position is Guard, and when Round is greater than 2?","CREATE TABLE table_name_36 (pick__number INTEGER, position VARCHAR, round VARCHAR);","SELECT SUM(pick__number) FROM table_name_36 WHERE position = ""guard"" AND round > 2;","SELECT SUM(pick__number) FROM table_name_36 WHERE position = ""guard"" AND round > 2;",1 How many seats does the party of others have with a change of -1 and more than 0% votes?,"CREATE TABLE table_name_9 (seats INTEGER, _percentage_votes VARCHAR, change VARCHAR, party VARCHAR);","SELECT SUM(seats) FROM table_name_9 WHERE change = -1 AND party = ""others"" AND _percentage_votes > 0;","SELECT SUM(seats) FROM table_name_9 WHERE change = ""-1"" AND party = ""others"" AND _percentage_votes > 0;",0 On what date did Northerly place 6th?,"CREATE TABLE table_1358608_4 (date VARCHAR, result VARCHAR);","SELECT date FROM table_1358608_4 WHERE result = ""6th"";","SELECT date FROM table_1358608_4 WHERE result = ""6th"";",1 With the game that was less than 16 what was the high assists?,"CREATE TABLE table_name_60 (high_assists VARCHAR, game INTEGER);",SELECT high_assists FROM table_name_60 WHERE game < 16;,SELECT high_assists FROM table_name_60 WHERE game 16;,0 What is the percentage of Atheism associated with an other percentage of 0.08%?,"CREATE TABLE table_name_90 (atheism VARCHAR, other VARCHAR);","SELECT atheism FROM table_name_90 WHERE other = ""0.08%"";","SELECT atheism FROM table_name_90 WHERE other = ""0.08%"";",1 What are the ingredient sourcing details for product 101?,"CREATE TABLE ingredient_sourcing (id INT, product_id INT, ingredient_id INT, supplier_id INT, country VARCHAR(50)); ","SELECT ingredient_id, supplier_id, country FROM ingredient_sourcing WHERE product_id = 101;","SELECT ingredient_id, supplier_id, country FROM ingredient_sourcing WHERE product_id = 101;",1 Which Name has a Yes Saturday and a Yes Evening?,"CREATE TABLE table_name_49 (name VARCHAR, saturday VARCHAR, evening VARCHAR);","SELECT name FROM table_name_49 WHERE saturday = ""yes"" AND evening = ""yes"";","SELECT name FROM table_name_49 WHERE saturday = ""yes"" AND evening = ""yes"";",1 Find the average funding for companies with diverse founding teams,"CREATE TABLE company_founding (company_name VARCHAR(255), founder_gender VARCHAR(10), founder_minority VARCHAR(10)); CREATE TABLE funding (company_name VARCHAR(255), funding_amount INT); ",SELECT AVG(funding.funding_amount) FROM company_founding INNER JOIN funding ON company_founding.company_name = funding.company_name WHERE company_founding.founder_gender != 'Male' AND company_founding.founder_minority = 'Yes';,SELECT AVG(funding.funding_amount) FROM company_founding INNER JOIN funding ON company_founding.company_name = funding.company_name WHERE company_founding.founder_gender = 'Diversity';,0 What is Guard Kerri Shields Hometown?,"CREATE TABLE table_name_94 (hometown VARCHAR, position VARCHAR, name VARCHAR);","SELECT hometown FROM table_name_94 WHERE position = ""guard"" AND name = ""kerri shields"";","SELECT hometown FROM table_name_94 WHERE position = ""guard kerri shields"" AND name = ""guard kerri shields"";",0 Delete all concert records for the artist 'Billie Eilish' in the 'concerts' table.,"CREATE TABLE concerts (id INT, artist VARCHAR(255), city VARCHAR(255), tickets_sold INT, price DECIMAL(10,2));",DELETE FROM concerts WHERE artist = 'Billie Eilish';,DELETE FROM concerts WHERE artist = 'Billie Eilish';,1 What is the minimum number of hours worked per week for union workers in the 'Agriculture' industry to be eligible for overtime pay?,"CREATE TABLE OvertimeEligibility (id INT, UnionID INT, Industry TEXT, HoursWorkedPerWeek INT, OvertimeEligibility BOOLEAN);",SELECT MIN(HoursWorkedPerWeek) FROM OvertimeEligibility WHERE Industry = 'Agriculture' AND OvertimeEligibility = TRUE;,SELECT MIN(HoursWorkedPerWeek) FROM OvertimeEligibility WHERE Industry = 'Agriculture' AND OvertimeEligibility = TRUE;,1 Name the segment A for netflix of s05e01,"CREATE TABLE table_name_89 (segment_a VARCHAR, netflix VARCHAR);","SELECT segment_a FROM table_name_89 WHERE netflix = ""s05e01"";","SELECT segment_a FROM table_name_89 WHERE netflix = ""s05e01"";",1 What competitors are scored 124.51 points?,"CREATE TABLE table_name_88 (name VARCHAR, points VARCHAR);",SELECT name FROM table_name_88 WHERE points = 124.51;,"SELECT name FROM table_name_88 WHERE points = ""124.51"";",0 Name the format for 12cm note and catalog of alca-9198,"CREATE TABLE table_name_28 (format VARCHAR, note VARCHAR, catalog VARCHAR);","SELECT format FROM table_name_28 WHERE note = ""12cm"" AND catalog = ""alca-9198"";","SELECT format FROM table_name_28 WHERE note = ""12 cm"" AND catalog = ""alca-9198"";",0 What is the average calorie count for vegan meals in organic_meals table?,"CREATE TABLE organic_meals (meal_id INT, meal_name VARCHAR(50), category VARCHAR(20), calories INT); ",SELECT AVG(calories) FROM organic_meals WHERE category = 'Vegan';,SELECT AVG(calories) FROM organic_meals WHERE category = 'Vegan';,1 What is the Election date for Member william richmond category:articles with hcards?,"CREATE TABLE table_name_49 (election_date VARCHAR, member VARCHAR);","SELECT election_date FROM table_name_49 WHERE member = ""william richmond category:articles with hcards"";","SELECT election_date FROM table_name_49 WHERE member = ""william richmond category:articles with hcards"";",1 "For the Indian Wells Masters tournament, what was the country?","CREATE TABLE table_name_96 (country VARCHAR, tournament VARCHAR);","SELECT country FROM table_name_96 WHERE tournament = ""indian wells masters"";","SELECT country FROM table_name_96 WHERE tournament = ""indian wells masters"";",1 What is the total revenue of gluten-free beauty products in Denmark?,"CREATE TABLE GlutenFreeProducts (product VARCHAR(255), country VARCHAR(255), revenue DECIMAL(10,2)); ",SELECT SUM(revenue) FROM GlutenFreeProducts WHERE country = 'Denmark';,SELECT SUM(revenue) FROM GlutenFreeProducts WHERE country = 'Denmark';,1 when was the ship completed that was laid down on 23 march 1926?,"CREATE TABLE table_name_31 (completed VARCHAR, laid_down VARCHAR);","SELECT completed FROM table_name_31 WHERE laid_down = ""23 march 1926"";","SELECT completed FROM table_name_31 WHERE laid_down = ""23 march 1926"";",1 How many community policing events were held in 'Precinct 5' last year?,"CREATE TABLE community_policing (id INT, precinct VARCHAR(20), year INT, events INT);",SELECT SUM(events) FROM community_policing WHERE precinct = 'Precinct 5' AND year = 2021;,SELECT SUM(events) FROM community_policing WHERE precinct = 'Precinct 5' AND year = 2021;,1 Find the first names of all instructors who have taught some course and the course code.,"CREATE TABLE CLASS (crs_code VARCHAR, prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR);","SELECT T2.emp_fname, T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num;","SELECT T1.emp_fname, T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.crs_code = T2.emp_num;",0 When slblw(b1) is the sspec number what is the mult.?,"CREATE TABLE table_18823880_10 (mult VARCHAR, sspec_number VARCHAR);","SELECT mult FROM table_18823880_10 WHERE sspec_number = ""SLBLW(B1)"";","SELECT mult FROM table_18823880_10 WHERE sspec_number = ""SLBLW(B1)"";",1 What is the maximum number of medical staff members in a rural health center in India and South Africa?,"CREATE TABLE medical_staff (country VARCHAR(20), center_name VARCHAR(50), num_staff INT); ","SELECT country, MAX(num_staff) FROM medical_staff GROUP BY country;","SELECT MAX(num_staff) FROM medical_staff WHERE country IN ('India', 'South Africa');",0 "Which Total is the highest one that has a Bronze of 0, and a Nation of poland, and a Gold smaller than 0?","CREATE TABLE table_name_87 (total INTEGER, gold VARCHAR, bronze VARCHAR, nation VARCHAR);","SELECT MAX(total) FROM table_name_87 WHERE bronze = 0 AND nation = ""poland"" AND gold < 0;","SELECT MAX(total) FROM table_name_87 WHERE bronze = 0 AND nation = ""poland"" AND gold 0;",0 How many tracks were Recorded 1964-01-08?,"CREATE TABLE table_name_75 (track VARCHAR, recorded VARCHAR);","SELECT COUNT(track) FROM table_name_75 WHERE recorded = ""1964-01-08"";","SELECT COUNT(track) FROM table_name_75 WHERE recorded = ""1964-01-08"";",1 What are the won games with losing bonus of 0?,"CREATE TABLE table_13758945_1 (won VARCHAR, losing_bonus VARCHAR);","SELECT won FROM table_13758945_1 WHERE losing_bonus = ""0"";","SELECT won FROM table_13758945_1 WHERE losing_bonus = ""0"";",1 How many indigenous food systems were active in each state in 2019 and 2020?,"CREATE TABLE indigenous_food_systems_years (name TEXT, state TEXT, year NUMERIC, active BOOLEAN); ","SELECT state, COUNT(*) as num_active_systems FROM indigenous_food_systems_years WHERE year IN (2019, 2020) AND active = TRUE GROUP BY state;","SELECT state, SUM(active) FROM indigenous_food_systems_years WHERE year IN (2019, 2020) GROUP BY state;",0 List all TV shows that have the same genre as the movie with the highest production budget.,"CREATE TABLE Movies (id INT, title VARCHAR(255), genre VARCHAR(50), budget INT); CREATE TABLE TVShows (id INT, title VARCHAR(255), genre VARCHAR(50));","SELECT TVShows.title FROM TVShows, Movies WHERE TVShows.genre = (SELECT genre FROM Movies WHERE budget = (SELECT MAX(budget) FROM Movies));",SELECT TVShows.title FROM TVShows INNER JOIN Movies ON TVShows.genre = Movies.genre WHERE Movies.budget = (SELECT MAX(Movies.budget) FROM Movies);,0 How many female employees have completed diversity and inclusion training in the last six months?,"CREATE TABLE Employees (EmployeeID INT, Gender VARCHAR(10)); CREATE TABLE Training (TrainingID INT, EmployeeID INT, TrainingType VARCHAR(25), TrainingDate DATE); ","SELECT COUNT(*) FROM Employees e JOIN Training t ON e.EmployeeID = t.EmployeeID WHERE e.Gender = 'Female' AND t.TrainingType = 'Diversity and Inclusion' AND t.TrainingDate >= DATEADD(month, -6, GETDATE());","SELECT COUNT(*) FROM Employees e JOIN Training t ON e.EmployeeID = t.EmployeeID WHERE e.Gender = 'Female' AND t.TrainingType = 'Diversity and Inclusion' AND t.TrainingDate >= DATEADD(month, -6, GETDATE());",1 Add a new marine conservation law in the Caribbean Sea,"CREATE TABLE marine_conservation_laws (id INT PRIMARY KEY, law_name VARCHAR(255), region VARCHAR(255));","INSERT INTO marine_conservation_laws (id, law_name, region) VALUES (1, 'Caribbean Marine Protected Areas Act', 'Caribbean Sea');","INSERT INTO marine_conservation_laws (id, law_name, region) VALUES (1, 'Caribbean Conservation Law', 'Caribbean Sea');",0 What is the number of volunteers who have signed up in each of the last 12 months?,"CREATE TABLE volunteers (id INT, signup_date DATE); ","SELECT EXTRACT(MONTH FROM signup_date) as month, COUNT(*) as num_volunteers FROM volunteers WHERE signup_date >= DATE_SUB(CURRENT_DATE, INTERVAL 12 MONTH) GROUP BY month;","SELECT signup_date, COUNT(*) FROM volunteers WHERE signup_date >= DATEADD(month, -12, GETDATE()) GROUP BY signup_date;",0 "How many workers in the supply chain were paid a living wage or higher in 2019, by each country?","CREATE TABLE SupplyChainWorkers (wage DECIMAL(10,2), country VARCHAR(255), year INT); CREATE VIEW LivingWage AS SELECT country, 10.00 AS living_wage;","SELECT country, COUNT(*) FROM SupplyChainWorkers JOIN LivingWage ON 1=1 WHERE wage >= living_wage AND year = 2019 GROUP BY country;","SELECT country, COUNT(*) FROM SupplyChainWorkers WHERE year = 2019 AND living_wage >= 10.00 GROUP BY country;",0 "Which match had more than 1,490 people in attendance to watch FCR 2001 Duisburg have a result of 0:3 (0:2)?","CREATE TABLE table_name_91 (match INTEGER, attnd VARCHAR, result VARCHAR, opponent VARCHAR);","SELECT SUM(match) FROM table_name_91 WHERE result = ""0:3 (0:2)"" AND opponent = ""fcr 2001 duisburg"" AND attnd > 1 OFFSET 490;","SELECT SUM(match) FROM table_name_91 WHERE result = ""0:3 (0:2)"" AND opponent = ""fcr 2001 duisburg"" AND attendance > 1 OFFSET 490;",0 Find the average age of athletes in 'athletes_table',"CREATE TABLE athletes_table (athlete_id INT, name VARCHAR(50), age INT, sport VARCHAR(20)); ",SELECT AVG(age) FROM athletes_table;,SELECT AVG(age) FROM athletes_table;,1 "What is the area (in km2) for the community that has a status of village, a census ranking of 2,471 of 5,008, and a population of less than 748?","CREATE TABLE table_name_10 (area_km_2 INTEGER, population VARCHAR, status VARCHAR, census_ranking VARCHAR);","SELECT SUM(area_km_2) FROM table_name_10 WHERE status = ""village"" AND census_ranking = ""2,471 of 5,008"" AND population < 748;","SELECT SUM(area_km_2) FROM table_name_10 WHERE status = ""villain"" AND census_ranking = ""2,471 of 5,008"" AND population 748;",0 Can you tell me the total number of Laps that has the Team of wps racing?,"CREATE TABLE table_name_94 (laps VARCHAR, team VARCHAR);","SELECT COUNT(laps) FROM table_name_94 WHERE team = ""wps racing"";","SELECT COUNT(laps) FROM table_name_94 WHERE team = ""wps racing"";",1 Find the month with the highest water consumption in 'ResidentialWaterUse' table,"CREATE TABLE ResidentialWaterUse (household_id INT, consumption FLOAT, month DATE);","SELECT month, MAX(SUM(consumption)) FROM ResidentialWaterUse GROUP BY month;","SELECT month, MAX(consumption) FROM ResidentialWaterUse GROUP BY month;",0 What was the episode number that had 797000 viewers?,"CREATE TABLE table_25737761_3 (no VARCHAR, viewing_figure VARCHAR);",SELECT no FROM table_25737761_3 WHERE viewing_figure = 797000;,"SELECT no FROM table_25737761_3 WHERE viewing_figure = ""797000"";",0 "What is the hospital with the highest patient capacity in each region, ordered by region?","CREATE TABLE hospitals (id INT, region VARCHAR(255), name VARCHAR(255), patient_capacity INT); ","SELECT region, name FROM (SELECT region, name, patient_capacity, RANK() OVER (PARTITION BY region ORDER BY patient_capacity DESC) as rank FROM hospitals) subquery WHERE rank = 1 ORDER BY region;","SELECT region, name, patient_capacity FROM hospitals ORDER BY region, patient_capacity DESC;",0 "If the rebounds are at 87, what are the amount of steals?","CREATE TABLE table_25342713_5 (steals VARCHAR, rebounds VARCHAR);",SELECT steals FROM table_25342713_5 WHERE rebounds = 87;,SELECT steals FROM table_25342713_5 WHERE rebounds = 87;,1 What is the average speed of vessels that have a maximum speed greater than 20 knots?,"CREATE TABLE Vessels (ID INT PRIMARY KEY, Name TEXT, MaxSpeed FLOAT); ",SELECT AVG(MaxSpeed) FROM Vessels WHERE MaxSpeed > 20;,SELECT AVG(MaxSpeed) FROM Vessels WHERE MaxSpeed > 20;,1 Which marine protected areas in the Atlantic region have a higher average depth than 2000 meters?,"CREATE TABLE marine_protected_areas (name VARCHAR(255), location VARCHAR(255), avg_depth FLOAT); CREATE TABLE atlantic_region (name VARCHAR(255), region_type VARCHAR(255)); ",SELECT mpa.name FROM marine_protected_areas mpa INNER JOIN atlantic_region ar ON mpa.name = ar.name WHERE mpa.avg_depth > 2000;,SELECT marine_protected_areas.name FROM marine_protected_areas INNER JOIN atlantic_region ON marine_protected_areas.location = atlantic_region.name WHERE marine_protected_areas.avg_depth > 2000;,0 "Delete records with ticket sales over 5000$ from the ""ticket_sales"" table","CREATE TABLE ticket_sales (id INT PRIMARY KEY, team VARCHAR(50), event_date DATE, tickets_sold INT, total_sales DECIMAL(10,2));",DELETE FROM ticket_sales WHERE total_sales > 5000;,DELETE FROM ticket_sales WHERE total_sales > 5000;,1 When 5 is the rank of 2011 what is the country?,"CREATE TABLE table_293465_1 (country VARCHAR, rank_2011 VARCHAR);",SELECT country FROM table_293465_1 WHERE rank_2011 = 5;,"SELECT country FROM table_293465_1 WHERE rank_2011 = ""5"";",0 "What was the total for David O'Callaghan, and a Tally of 1-9?","CREATE TABLE table_name_45 (total INTEGER, player VARCHAR, tally VARCHAR);","SELECT SUM(total) FROM table_name_45 WHERE player = ""david o'callaghan"" AND tally = ""1-9"";","SELECT SUM(total) FROM table_name_45 WHERE player = ""david o'callaghan"" AND tally = ""1-9"";",1 "Show the total number of research grants awarded to each gender, sorted by the total amount.","CREATE TABLE grant (id INT, researcher VARCHAR(50), gender VARCHAR(10), department VARCHAR(30), amount FLOAT, date DATE); ","SELECT gender, SUM(amount) as total_amount FROM grant GROUP BY gender ORDER BY total_amount DESC;","SELECT gender, SUM(amount) as total_grants FROM grant GROUP BY gender ORDER BY total_grants DESC;",0 What are the names and descriptions of all vulnerabilities with a medium severity rating?,"CREATE TABLE vulnerabilities (id INT, name VARCHAR(255), description TEXT, severity INT); ","SELECT name, description FROM vulnerabilities WHERE severity = 6;","SELECT name, description FROM vulnerabilities WHERE severity ='medium';",0 Can you tell me the manufacturer behind Race Hill Farm Team?,"CREATE TABLE table_2267465_1 (manufacturer VARCHAR, team VARCHAR);","SELECT manufacturer FROM table_2267465_1 WHERE team = ""Race Hill Farm team"";","SELECT manufacturer FROM table_2267465_1 WHERE team = ""Race Hill Farm Team"";",0 Who were the opponents in the final on 9 January 1994?,"CREATE TABLE table_name_29 (opponents_in_final VARCHAR, date VARCHAR);","SELECT opponents_in_final FROM table_name_29 WHERE date = ""9 january 1994"";","SELECT opponents_in_final FROM table_name_29 WHERE date = ""9 january 1994"";",1 "What is the maximum number of goals scored in a single game by any player in the last year, and who scored it, broken down by team?","CREATE TABLE games (id INT, game_date DATE, team VARCHAR(20)); CREATE TABLE goals (id INT, game_id INT, player VARCHAR(20), goals INT);","SELECT team, player, MAX(goals) FROM goals JOIN games ON goals.game_id = games.id WHERE games.game_date >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR) GROUP BY team, player;","SELECT g.team, MAX(g.goals) as max_goals, g.player FROM games g JOIN goals g ON g.game_id = g.game_id WHERE g.game_date >= DATEADD(year, -1, GETDATE()) GROUP BY g.team;",0 "What is the number of people impacted by disasters in each country, sorted by the total number of people impacted, for the last 3 years?","CREATE TABLE disaster (disaster_id INT, name VARCHAR(255), location VARCHAR(255), start_date DATE, people_impacted INT); ","SELECT location as country, SUM(people_impacted) as total_people_impacted FROM disaster WHERE start_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR) GROUP BY location ORDER BY total_people_impacted DESC;","SELECT location, SUM(people_impacted) as total_people_impacted FROM disaster WHERE start_date >= DATEADD(year, -3, GETDATE()) GROUP BY location ORDER BY total_people_impacted DESC;",0 Which animals are present in both 'National Park G' and 'Conservation Area H' but are not endangered?,"CREATE TABLE Habitats (HabitatID INT, HabitatName TEXT, Location TEXT); CREATE TABLE AnimalHabitats (AnimalID INT, HabitatID INT); CREATE TABLE AnimalPopulation (AnimalID INT, AnimalName TEXT, HabitatID INT, Status TEXT); ",SELECT AnimalID FROM AnimalHabitats WHERE HabitatID = 2 INTERSECT SELECT AnimalID FROM AnimalHabitats WHERE HabitatID = 3 EXCEPT SELECT AnimalID FROM AnimalPopulation WHERE Status = 'Endangered';,"SELECT AnimalName FROM AnimalPopulation JOIN AnimalHabitats ON AnimalPopulation.AnimalID = AnimalHabitats.AnimalID JOIN Habitats ON AnimalPopulation.HabitatID = Habitats.HabitatID WHERE Habitats.Location IN ('National Park G', 'Conservation Area H') AND AnimalPopulation.Status IS NULL;",0 What is the average number of tourists visiting Canada and Australia per year?,"CREATE TABLE canada_tourists (year INT, tourists INT);CREATE TABLE australia_tourists (year INT, tourists INT);","SELECT AVG(tourists) FROM (SELECT year, AVG(tourists) AS tourists FROM canada_tourists GROUP BY year UNION ALL SELECT year, AVG(tourists) AS tourists FROM australia_tourists GROUP BY year) AS avg_tourists;",SELECT AVG(canadian_tourists.tourists) FROM canada_tourists INNER JOIN australia_tourists ON canada_tourists.year = australia_tourists.year;,0 How many stations are transmitted on frequency 7 uhf?,"CREATE TABLE table_1601792_4 (transmitted VARCHAR, frequency VARCHAR);","SELECT COUNT(transmitted) FROM table_1601792_4 WHERE frequency = ""7 UHF"";","SELECT COUNT(transmitted) FROM table_1601792_4 WHERE frequency = ""7 UHF"";",1 when deland is the fcsl team and 2008 is the year played who is the mlb team?,"CREATE TABLE table_18373863_2 (mlb_team VARCHAR, years_played VARCHAR, fcsl_team VARCHAR);","SELECT mlb_team FROM table_18373863_2 WHERE years_played = ""2008"" AND fcsl_team = ""DeLand"";","SELECT mlb_team FROM table_18373863_2 WHERE years_played = 2008 AND fcsl_team = ""Deland"";",0 "What is the name in the UK, with a release date of December 1966?","CREATE TABLE table_name_24 (name VARCHAR, location VARCHAR, release_date VARCHAR);","SELECT name FROM table_name_24 WHERE location = ""uk"" AND release_date = ""december 1966"";","SELECT name FROM table_name_24 WHERE location = ""uk"" AND release_date = ""december 1966"";",1 What is the total energy storage capacity in Japan and South Korea?,"CREATE TABLE energy_storage (country VARCHAR(20), capacity FLOAT); ","SELECT SUM(capacity) as total_capacity, country FROM energy_storage GROUP BY country;","SELECT SUM(capacity) FROM energy_storage WHERE country IN ('Japan', 'South Korea');",0 Find the total installed capacity of renewable energy projects in Texas,"CREATE TABLE renewable_projects (id INT, name TEXT, location TEXT, capacity INT);",SELECT SUM(capacity) FROM renewable_projects WHERE location = 'Texas';,SELECT SUM(capacity) FROM renewable_projects WHERE location = 'Texas';,1 "Which Wins is the highest one that has a Country of united states, and a Player of andy bean, and a Rank smaller than 4?","CREATE TABLE table_name_66 (wins INTEGER, rank VARCHAR, country VARCHAR, player VARCHAR);","SELECT MAX(wins) FROM table_name_66 WHERE country = ""united states"" AND player = ""andy bean"" AND rank < 4;","SELECT MAX(wins) FROM table_name_66 WHERE country = ""united states"" AND player = ""andy bean"" AND rank 4;",0 What is the average energy generation from geothermal sources in the state of California for the year 2021?,"CREATE TABLE geothermal_energy (state VARCHAR(20), energy_generation DECIMAL(10,2), year INT); ",SELECT AVG(energy_generation) FROM geothermal_energy WHERE state = 'California' AND year = 2021;,SELECT AVG(energy_generation) FROM geothermal_energy WHERE state = 'California' AND year = 2021;,1 What is the highest number of laps with an accident time and a suzuki gsx-r1000 bike?,"CREATE TABLE table_name_56 (laps INTEGER, time VARCHAR, bike VARCHAR);","SELECT MAX(laps) FROM table_name_56 WHERE time = ""accident"" AND bike = ""suzuki gsx-r1000"";","SELECT MAX(laps) FROM table_name_56 WHERE time = ""accident"" AND bike = ""suzuki gsx-r1000"";",1 How many decile has a roll less than 20?,"CREATE TABLE table_name_6 (decile INTEGER, roll INTEGER);",SELECT AVG(decile) FROM table_name_6 WHERE roll < 20;,SELECT SUM(decile) FROM table_name_6 WHERE roll 20;,0 Who are the top 3 suppliers by average item price?,"CREATE TABLE supplier_items (id INT, supplier_id INT, item_id INT, price DECIMAL(5,2)); CREATE TABLE suppliers (id INT, name VARCHAR(50), country VARCHAR(50)); ","SELECT suppliers.name, AVG(supplier_items.price) AS avg_price FROM supplier_items INNER JOIN suppliers ON supplier_items.supplier_id = suppliers.id GROUP BY suppliers.id ORDER BY avg_price DESC LIMIT 3;","SELECT s.name, AVG(s.price) as avg_price FROM supplier_items s JOIN suppliers s ON s.id = s.supplier_id GROUP BY s.name ORDER BY avg_price DESC LIMIT 3;",0 What is the total gold from New zealand and a rank less than 14?,"CREATE TABLE table_name_18 (gold INTEGER, nation VARCHAR, rank VARCHAR);","SELECT SUM(gold) FROM table_name_18 WHERE nation = ""new zealand"" AND rank < 14;","SELECT SUM(gold) FROM table_name_18 WHERE nation = ""new zealand"" AND rank 14;",0 What is the difference in response time between the fastest and slowest medical emergencies?,"CREATE TABLE emergencies (type VARCHAR(255), response_time INT); ","SELECT type, MAX(response_time) OVER (PARTITION BY type) - MIN(response_time) OVER (PARTITION BY type) AS response_time_difference FROM emergencies WHERE type = 'Medical';",SELECT MAX(response_time) - MIN(response_time) FROM emergencies;,0 List all factories in Southeast Asia with fair labor certifications.,"CREATE TABLE Factories (factoryID INT, location VARCHAR(50), certificationLevel VARCHAR(20)); ","SELECT factoryID, location FROM Factories WHERE location LIKE '%Southeast Asia%' AND certificationLevel = 'Fair Trade';",SELECT * FROM Factories WHERE location = 'Southeast Asia' AND certificationLevel = 'Fair Labor';,0 List all unique investment rounds for startups in the biotechnology sector founded by Black entrepreneurs.,"CREATE TABLE investment (id INT, company_id INT, round_number INT, round_date DATE, funding_amount INT); CREATE TABLE company (id INT, name TEXT, industry TEXT, founder_race TEXT); ","SELECT DISTINCT company_id, round_number FROM investment WHERE industry = 'Biotechnology' AND founder_race = 'Black';",SELECT DISTINCT i.round_number FROM investment i JOIN company c ON i.company_id = c.id WHERE c.industry = 'Biotechnology' AND c.founder_race = 'Black';,0 How many seats in 2001 with a quantity greater than 4?,"CREATE TABLE table_name_17 (number_of_seats VARCHAR, year VARCHAR, quantity VARCHAR);","SELECT COUNT(number_of_seats) FROM table_name_17 WHERE year = ""2001"" AND quantity > 4;",SELECT number_of_seats FROM table_name_17 WHERE year = 2001 AND quantity > 4;,0 How many top 10s belong to the team with a start of 7 and an average finish less than 16.7?,"CREATE TABLE table_name_69 (top_10 VARCHAR, starts VARCHAR, avg_finish VARCHAR);",SELECT COUNT(top_10) FROM table_name_69 WHERE starts = 7 AND avg_finish < 16.7;,SELECT COUNT(top_10) FROM table_name_69 WHERE starts = 7 AND avg_finish 16.7;,0 What is the average income in each city?,"CREATE TABLE Cities (City VARCHAR(50), Income DECIMAL(5,2)); ","SELECT City, AVG(Income) FROM Cities GROUP BY City;","SELECT City, AVG(Income) FROM Cities GROUP BY City;",1 What is the percentage of the population in Florida that has been vaccinated against influenza?,"CREATE TABLE population (person_id INT, state VARCHAR(255), vaccinated BOOLEAN); CREATE TABLE census (state VARCHAR(255), population INT); ",SELECT (COUNT(*) * 100.0 / (SELECT population FROM census WHERE state = 'FL')) AS pct_vaccinated FROM population WHERE state = 'FL' AND vaccinated = TRUE;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM census WHERE state = 'Florida')) AS percentage FROM population WHERE state = 'Florida' AND vaccinated = true;,0 Who are the traditional artists in Europe?,"CREATE TABLE TraditionalArtists (id INT, name VARCHAR(50), country VARCHAR(50), art_form VARCHAR(50)); ","SELECT TraditionalArtists.name FROM TraditionalArtists WHERE TraditionalArtists.country IN ('Albania', 'Andorra', 'Austria', 'Belarus', 'Belgium', 'Bosnia and Herzegovina', 'Bulgaria', 'Croatia', 'Cyprus', 'Czech Republic', 'Denmark', 'Estonia', 'Finland', 'France', 'Germany', 'Greece', 'Hungary', 'Iceland', 'Ireland', 'Italy', 'Kosovo', 'Latvia', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Malta', 'Moldova', 'Monaco', 'Montenegro', 'North Macedonia', 'Norway', 'Poland', 'Portugal', 'Romania', 'San Marino', 'Serbia', 'Slovakia', 'Slovenia', 'Spain', 'Sweden', 'Switzerland', 'The Netherlands', 'Turkey', 'Ukraine', 'United Kingdom', 'Vatican City')","SELECT name FROM TraditionalArtists WHERE country IN ('Germany', 'France', 'Italy', 'Germany', 'France', 'Italy', 'Germany', 'Italy', 'France', 'Germany', 'Italy', 'France', 'Italy', 'Italy', 'Germany', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'I",0 "How many 'part-time' workers are there, and what is the minimum wage for this group?","CREATE TABLE employee_details (id INT, employment_status VARCHAR(10), hourly_wage FLOAT); ","SELECT COUNT(*), MIN(hourly_wage) FROM employee_details WHERE employment_status = 'part-time';","SELECT COUNT(*), MIN(hourly_wage) FROM employee_details WHERE employment_status = 'part-time';",1 Find the total production of Europium in Q1 and Q3 of 2020 from the Production_Quarterly table?,"CREATE TABLE Production_Quarterly (year INT, quarter INT, europium_production FLOAT);","SELECT SUM(europium_production) FROM Production_Quarterly WHERE (year = 2020 AND quarter IN (1, 3));","SELECT SUM(europium_production) FROM Production_Quarterly WHERE year = 2020 AND quarter IN ('Q1', 'Q3');",0 "What league apps with 1 flt apps, 0 goals, and more than 1 league goals?","CREATE TABLE table_name_38 (league_apps VARCHAR, league_goals VARCHAR, flt_apps VARCHAR, total_goals VARCHAR);","SELECT league_apps FROM table_name_38 WHERE flt_apps = ""1"" AND total_goals > 0 AND league_goals > 1;","SELECT league_apps FROM table_name_38 WHERE flt_apps = ""1"" AND total_goals = ""0"" AND league_goals > 1;",0 What is the average rating of hip-hop songs released in 2015?,"CREATE TABLE Hip_Hop_Songs (title TEXT, year INTEGER, rating FLOAT); ",SELECT AVG(rating) FROM Hip_Hop_Songs WHERE year = 2015;,SELECT AVG(rating) FROM Hip_Hop_Songs WHERE year = 2015;,1 Show the latest 5 records of ocean temperature measurements from the 'temperature_measurements' table.,"CREATE TABLE temperature_measurements (measurement_time TIMESTAMP, temperature FLOAT, location TEXT); ","SELECT * FROM (SELECT ROW_NUMBER() OVER (ORDER BY measurement_time DESC) as rn, * FROM temperature_measurements) tmp WHERE rn <= 5;",SELECT MAX(measurement_time) FROM temperature_measurements WHERE location = 'Oceania';,0 "What is the average number of citations for algorithmic fairness research papers, grouped by author's country of origin?","CREATE TABLE ai_fairness_citations (id INT, paper_name VARCHAR(50), citations INT, author_country VARCHAR(50)); ","SELECT author_country, AVG(citations) FROM ai_fairness_citations GROUP BY author_country;","SELECT author_country, AVG(citations) as avg_citations FROM ai_fairness_citations GROUP BY author_country;",0 What is the percentage of students who passed the last exam in each district?,"CREATE TABLE students (student_id INT, district_id INT, passed_last_exam BOOLEAN); CREATE TABLE districts (district_id INT, district_name VARCHAR(100));","SELECT d.district_name, (COUNT(s.student_id) - SUM(CASE WHEN s.passed_last_exam = FALSE THEN 1 ELSE 0 END)) * 100.0 / COUNT(s.student_id) as pass_percentage FROM students s JOIN districts d ON s.district_id = d.district_id GROUP BY d.district_name;","SELECT d.district_name, (COUNT(s.student_id) * 100.0 / (SELECT COUNT(s.student_id) FROM students s JOIN districts d ON s.district_id = d.district_id)) as percentage FROM students s JOIN districts d ON s.district_id = d.district_id GROUP BY d.district_name;",0 What is the maximum daily water usage in the Amazon river basin in the past year?,"CREATE TABLE amazon_river_basin (daily_usage FLOAT, timestamp TIMESTAMP); ","SELECT MAX(daily_usage) FROM amazon_river_basin WHERE timestamp BETWEEN DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 YEAR) AND CURRENT_TIMESTAMP;","SELECT MAX(daily_usage) FROM amazon_river_basin WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 YEAR);",0 What is the maximum crime severity score in the 'urban' schema?,"CREATE SCHEMA if not exists urban; CREATE TABLE if not exists urban.crime_data (id INT, crime_severity_score INT); ",SELECT MAX(crime_severity_score) FROM urban.crime_data;,SELECT MAX(crime_severity_score) FROM urban.crime_data;,1 How many volunteers signed up in each program in 2020?,"CREATE TABLE Volunteers (VolunteerID INT, ProgramID INT, SignUpDate DATE); CREATE TABLE Programs (ProgramID INT, ProgramName VARCHAR(255));","SELECT ProgramID, ProgramName, COUNT(VolunteerID) as NumVolunteers FROM Volunteers INNER JOIN Programs ON Volunteers.ProgramID = Programs.ProgramID WHERE YEAR(SignUpDate) = 2020 GROUP BY ProgramID, ProgramName;","SELECT p.ProgramName, COUNT(v.VolunteerID) FROM Volunteers v JOIN Programs p ON v.ProgramID = p.ProgramID WHERE YEAR(v.SignUpDate) = 2020 GROUP BY p.ProgramName;",0 What was the average donation amount for recurring donors from India?,"CREATE TABLE donors (donor_id INT, is_recurring BOOLEAN, country VARCHAR(50)); CREATE TABLE donations (donor_id INT, donation_amount DECIMAL(10,2), donation_date DATE); ",SELECT AVG(donation_amount) FROM donations d JOIN donors don ON d.donor_id = don.donor_id WHERE don.is_recurring = true AND don.country = 'India';,SELECT AVG(donation_amount) FROM donations JOIN donors ON donations.donor_id = donors.donor_id WHERE donors.is_recurring = true AND donors.country = 'India';,0 What is the percentage of uninsured residents in rural county 'Mississippi'?,"CREATE TABLE residents (county TEXT, uninsured_rate FLOAT); ",SELECT (uninsured_rate / 100) * 100 AS percentage_uninsured FROM residents WHERE county = 'Mississippi';,SELECT (uninsured_rate * 100.0 / uninsured_rate) * 100.0 / uninsured_rate FROM residents WHERE county = 'Mississippi';,0 What is the treatment duration for the patient with ID 3?,"CREATE TABLE treatments (id INT PRIMARY KEY, patient_id INT, name VARCHAR(255), duration INT); ",SELECT duration FROM treatments WHERE patient_id = 3;,SELECT duration FROM treatments WHERE patient_id = 3;,1 What is the total number of gold medals of the nation with 1 bronze and less than 1 total medal?,"CREATE TABLE table_name_49 (gold VARCHAR, bronze VARCHAR, total VARCHAR);",SELECT COUNT(gold) FROM table_name_49 WHERE bronze = 1 AND total < 1;,SELECT COUNT(gold) FROM table_name_49 WHERE bronze = 1 AND total 1;,0 What is the average virtual tour engagement in the last month for each ota_id?,"CREATE TABLE virtual_tours_3 (tour_id INT, tour_name TEXT, date DATE, engagement INT); CREATE TABLE online_travel_agencies_3 (ota_id INT, ota_name TEXT, tour_id INT); ","SELECT ota_id, AVG(virtual_tours_3.engagement) as avg_engagement FROM online_travel_agencies_3 INNER JOIN virtual_tours_3 ON online_travel_agencies_3.tour_id = virtual_tours_3.tour_id WHERE date >= DATEADD(month, -1, GETDATE()) GROUP BY ota_id;","SELECT ota_id, AVG(engagement) as avg_engagement FROM virtual_tours_3 INNER JOIN online_travel_agencies_3 ON virtual_tours_3.tour_id = online_travel_agencies_3.tour_id WHERE date >= DATEADD(month, -1, GETDATE()) GROUP BY ota_id;",0 What Vehicle Flight # has Pilot Peterson and Velocity (km/h) of 649?,"CREATE TABLE table_name_31 (vehicle_flight__number VARCHAR, pilot VARCHAR, velocity__km_h_ VARCHAR);","SELECT vehicle_flight__number FROM table_name_31 WHERE pilot = ""peterson"" AND velocity__km_h_ = 649;","SELECT vehicle_flight__number FROM table_name_31 WHERE pilot = ""peterson"" AND velocity__km_h_ = 649;",1 What is the total number of top-25s for the major that has 11 top-10s?,"CREATE TABLE table_name_95 (top_25 VARCHAR, top_10 VARCHAR);",SELECT COUNT(top_25) FROM table_name_95 WHERE top_10 = 11;,SELECT COUNT(top_25) FROM table_name_95 WHERE top_10 = 11;,1 What is the distribution of job titles by department?,"CREATE TABLE job_titles (id INT, department_id INT, title VARCHAR(255)); ","SELECT department_id, title, COUNT(*) as count FROM job_titles GROUP BY department_id, title;","SELECT department_id, COUNT(*) as num_titles FROM job_titles GROUP BY department_id;",0 At what location and what was the attendance when Rafer Alston (10) achieved high assists? ,"CREATE TABLE table_17288825_7 (location_attendance VARCHAR, high_assists VARCHAR);","SELECT location_attendance FROM table_17288825_7 WHERE high_assists = ""Rafer Alston (10)"";","SELECT location_attendance FROM table_17288825_7 WHERE high_assists = ""Rafer Alston (10)"";",1 "What is the U.S. Rap chart number of the album west coast bad boyz, vol. 3: poppin' collars?","CREATE TABLE table_name_98 (us_rap VARCHAR, album VARCHAR);","SELECT us_rap FROM table_name_98 WHERE album = ""west coast bad boyz, vol. 3: poppin' collars"";","SELECT us_rap FROM table_name_98 WHERE album = ""west coast bad boyz, vol. 3: poppin' collars"";",1 Who is the opponent in the final with a clay surface at the Tournament of Lyneham?,"CREATE TABLE table_name_20 (opponent_in_the_final VARCHAR, surface VARCHAR, tournament VARCHAR);","SELECT opponent_in_the_final FROM table_name_20 WHERE surface = ""clay"" AND tournament = ""lyneham"";","SELECT opponent_in_the_final FROM table_name_20 WHERE surface = ""clay"" AND tournament = ""lyneham"";",1 How many wins for average start less than 25?,"CREATE TABLE table_name_4 (wins VARCHAR, avg_start INTEGER);",SELECT COUNT(wins) FROM table_name_4 WHERE avg_start < 25;,SELECT COUNT(wins) FROM table_name_4 WHERE avg_start 25;,0 Which sites have artifacts from the 'Stone Age' and 'Iron Age'?,"CREATE TABLE excavation_sites (site_id INT, site_name VARCHAR(255)); CREATE TABLE artifacts (artifact_id INT, site_id INT, artifact_type VARCHAR(255), historical_period VARCHAR(255)); ","SELECT site_name FROM excavation_sites s JOIN artifacts a ON s.site_id = a.site_id WHERE historical_period IN ('Stone Age', 'Iron Age') GROUP BY site_name;","SELECT excavation_sites.site_name FROM excavation_sites INNER JOIN artifacts ON excavation_sites.site_id = artifacts.site_id WHERE artifacts.historical_period IN ('Stone Age', 'Iron Age');",0 Find the name of each user and number of tweets tweeted by each of them.,"CREATE TABLE tweets (uid VARCHAR); CREATE TABLE user_profiles (name VARCHAR, uid VARCHAR);","SELECT T1.name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid;","SELECT T1.name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T1.uid;",0 What is the maximum ocean acidification level in the Arctic Ocean in the last 5 years?,"CREATE TABLE Acidification(id INT, level DECIMAL(5,2), date DATE); ","SELECT MAX(level) FROM (SELECT level FROM Acidification WHERE YEAR(date) >= 2017 GROUP BY level, YEAR(date)) AS LastFiveYears;","SELECT MAX(level) FROM Acidification WHERE date >= DATEADD(year, -5, GETDATE());",0 Find the total digital engagement for exhibitions related to African history.,"CREATE TABLE Digital_Engagement (id INT, visitor_id INT, exhibition_id INT, platform VARCHAR(255), views INT, clicks INT); CREATE TABLE Exhibitions (id INT, name VARCHAR(255), theme VARCHAR(255)); ",SELECT SUM(views + clicks) FROM Digital_Engagement de JOIN Exhibitions e ON de.exhibition_id = e.id WHERE e.theme LIKE '%African%';,SELECT SUM(Digital_Engagement.views * Digital_Engagement.clicks) FROM Digital_Engagement INNER JOIN Exhibitions ON Digital_Engagement.exhibition_id = Exhibitions.id WHERE Exhibitions.theme = 'African History';,0 What is the average funding amount received by female founders?,"CREATE TABLE company (id INT, name VARCHAR(50), founder_gender VARCHAR(10)); CREATE TABLE investment_round (id INT, company_id INT, funding_amount INT); ",SELECT AVG(ir.funding_amount) AS avg_funding_amount FROM company c JOIN investment_round ir ON c.id = ir.company_id WHERE c.founder_gender = 'Female';,SELECT AVG(funding_amount) FROM investment_round INNER JOIN company ON investment_round.company_id = company.id WHERE company.founder_gender = 'Female';,0 What is the sum of ESG scores for 'CleanTech Inc' in H1 2022?,"CREATE TABLE company_scores (id INT, company VARCHAR(255), esg_score FLOAT, year INT, quarter INT); ",SELECT SUM(esg_score) FROM company_scores WHERE company = 'CleanTech Inc' AND year = 2022 AND quarter BETWEEN 1 AND 2;,SELECT SUM(esg_score) FROM company_scores WHERE company = 'CleanTech Inc' AND year = 2022 AND quarter = 1;,0 Show the most common apartment type code among apartments with more than 1 bathroom.,"CREATE TABLE Apartments (apt_type_code VARCHAR, bathroom_count INTEGER);",SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1;,SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1;,1 List the names and launch dates of all satellites launched by a specific country,"CREATE TABLE Satellites (SatelliteID INT, Name VARCHAR(50), LaunchDate DATE, Manufacturer VARCHAR(50), Country VARCHAR(50), Weight DECIMAL(10,2)); ","SELECT Name, LaunchDate, Country FROM Satellites WHERE Country = 'India';","SELECT Name, LaunchDate FROM Satellites WHERE Country = 'USA';",0 Who is the composer on the tracks less than 4?,"CREATE TABLE table_name_36 (composer VARCHAR, track INTEGER);",SELECT composer FROM table_name_36 WHERE track < 4;,SELECT composer FROM table_name_36 WHERE track 4;,0 Which products were sold in the first quarter of the year?,"CREATE TABLE products (product_id INT, product_name VARCHAR(255)); CREATE TABLE sales (sale_id INT, sale_date DATE, product_id INT);",SELECT products.product_name FROM products JOIN sales ON products.product_id = sales.product_id WHERE QUARTER(sales.sale_date) = 1;,"SELECT p.product_name FROM products p JOIN sales s ON p.product_id = s.product_id WHERE s.sale_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH) AND CURRENT_DATE;",0 "Calculate the percentage of employees who are people of color, by department","CREATE TABLE employee_demographics(emp_id INT, dept_id INT, race VARCHAR(50)); ","SELECT d.dept_name, (COUNT(CASE WHEN e.race IN ('Black', 'Asian', 'Hispanic') THEN 1 END) / COUNT(e.emp_id)) * 100 as pct_employees_of_color FROM departments d JOIN employee_demographics e ON d.dept_id = e.dept_id GROUP BY d.dept_name;","SELECT dept_id, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM employee_demographics WHERE race = 'African American') as percentage FROM employee_demographics WHERE race = 'African American' GROUP BY dept_id;",0 "List all mental health conditions and their corresponding awareness campaigns, if any.","CREATE TABLE conditions (condition_id INT, condition_name TEXT); CREATE TABLE campaigns (campaign_id INT, condition_id INT, campaign_name TEXT); ","SELECT conditions.condition_name, campaigns.campaign_name FROM conditions LEFT JOIN campaigns ON conditions.condition_id = campaigns.condition_id;","SELECT conditions.condition_name, campaigns.campaign_name FROM conditions INNER JOIN campaigns ON conditions.condition_id = campaigns.condition_id;",0 What is the percentage change in virtual tour engagement for hotels in the 'Asia' region between Q2 and Q3 2022?,"CREATE TABLE virtual_tours (id INT, hotel_id INT, region TEXT, quarter INT, engagement FLOAT);","SELECT region, (SUM(CASE WHEN quarter = 3 THEN engagement ELSE 0 END) - SUM(CASE WHEN quarter = 2 THEN engagement ELSE 0 END)) * 100.0 / SUM(CASE WHEN quarter = 2 THEN engagement ELSE 0 END) as q2_to_q3_change FROM virtual_tours WHERE region = 'Asia' GROUP BY region;",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM virtual_tours WHERE region = 'Asia')) as percentage_change FROM virtual_tours WHERE region = 'Asia' AND quarter BETWEEN 2 AND 3;,0 What is the percentage change in international visitors from the previous year for each country?,"CREATE TABLE international_visitors (visitor_id INT, visitor_name VARCHAR(50), passport_number VARCHAR(50), entry_year INT, exit_year INT, country_of_origin_id INT, PRIMARY KEY (visitor_id), FOREIGN KEY (country_of_origin_id) REFERENCES countries(country_id));CREATE TABLE countries (country_id INT, country_name VARCHAR(50), region_id INT, PRIMARY KEY (country_id));CREATE TABLE regions (region_id INT, region_name VARCHAR(50), PRIMARY KEY (region_id));","SELECT c.country_name, (COUNT(CASE WHEN iv.entry_year = YEAR(CURRENT_DATE()) - 1 THEN iv.visitor_id END) - COUNT(CASE WHEN iv.entry_year = YEAR(CURRENT_DATE()) - 2 THEN iv.visitor_id END)) * 100.0 / COUNT(CASE WHEN iv.entry_year = YEAR(CURRENT_DATE()) - 2 THEN iv.visitor_id END) as percentage_change FROM international_visitors iv JOIN countries c ON iv.country_of_origin_id = c.country_id GROUP BY c.country_name;","SELECT c.country_name, (COUNT(iv.visitor_id) * 100.0 / (SELECT COUNT(iv.visitor_id) FROM international_visitors iv JOIN countries c ON iv.country_id = c.country_id JOIN regions r ON iv.region_id = r.region_id GROUP BY c.country_name)) * 100.0 / (SELECT COUNT(iv.visitor_id) FROM international_visitors iv JOIN countries c ON c.country_id = c.country_id GROUP BY c.country_id;",0 What is the maximum budget for any project in the 'wildlife' category?,"CREATE TABLE projects_3 (project_id INT, project_name VARCHAR(50), budget DECIMAL(10,2), category VARCHAR(50)); ",SELECT MAX(budget) FROM projects_3 WHERE category = 'wildlife';,SELECT MAX(budget) FROM projects_3 WHERE category = 'wildlife';,1 How many defense contracts were awarded to companies from Canada in 2021?,"CREATE TABLE defense_contracts (id INT, company VARCHAR(50), country VARCHAR(50), year INT, contract_value FLOAT); ",SELECT COUNT(*) FROM defense_contracts WHERE country = 'Canada' AND year = 2021;,SELECT COUNT(*) FROM defense_contracts WHERE country = 'Canada' AND year = 2021;,1 What is the maximum duration of outdoor cycling classes taken by members from underrepresented communities in the last month?,"CREATE TABLE Members (MemberID INT, Community VARCHAR(20), Region VARCHAR(20)); CREATE TABLE Classes (ClassID INT, ClassType VARCHAR(20), Duration INT, MemberID INT); ","SELECT MAX(Classes.Duration) FROM Members INNER JOIN Classes ON Members.MemberID = Classes.MemberID WHERE Members.Community IN ('Latinx', 'African American', 'Native American') AND Members.Region = 'West' AND Classes.ClassType = 'Outdoor Cycling' AND Classes.ClassDate >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);","SELECT MAX(Duration) FROM Classes INNER JOIN Members ON Classes.MemberID = Members.MemberID WHERE Members.Community = 'Underrepresented' AND Classes.ClassType = 'Outdoor Cycling' AND Classes.Date >= DATEADD(month, -1, GETDATE());",0 What was the outcome in 1982 with Kang Haeng-Suk as partner?,"CREATE TABLE table_name_88 (outcome VARCHAR, partner VARCHAR, year VARCHAR);","SELECT outcome FROM table_name_88 WHERE partner = ""kang haeng-suk"" AND year = ""1982"";","SELECT outcome FROM table_name_88 WHERE partner = ""kang haeng-suk"" AND year = 1982;",0 What club began in 1976?,"CREATE TABLE table_name_21 (current_club VARCHAR, year_born VARCHAR);",SELECT current_club FROM table_name_21 WHERE year_born = 1976;,SELECT current_club FROM table_name_21 WHERE year_born = 1976;,1 When did Pakistan win a Silver Medal in a Men's Competition?,"CREATE TABLE table_name_56 (games VARCHAR, event VARCHAR, medal VARCHAR);","SELECT games FROM table_name_56 WHERE event = ""men's competition"" AND medal = ""silver"";","SELECT games FROM table_name_56 WHERE event = ""men's competition"" AND medal = ""silver"";",1 What are the top 3 genres by total number of songs in the music streaming platform?,"CREATE TABLE genres (genre_id INT, genre VARCHAR(50)); CREATE TABLE songs (song_id INT, song VARCHAR(50), genre_id INT); ","SELECT g.genre, COUNT(s.song_id) as song_count FROM genres g JOIN songs s ON g.genre_id = s.genre_id GROUP BY g.genre ORDER BY song_count DESC LIMIT 3;","SELECT g.genre, COUNT(s.song_id) as total_songs FROM genres g JOIN songs s ON g.genre_id = s.genre_id GROUP BY g.genre ORDER BY total_songs DESC LIMIT 3;",0 What's the score of Jeff Maggert in T2 place?,"CREATE TABLE table_name_36 (score VARCHAR, place VARCHAR, player VARCHAR);","SELECT score FROM table_name_36 WHERE place = ""t2"" AND player = ""jeff maggert"";","SELECT score FROM table_name_36 WHERE place = ""t2"" AND player = ""jeff maggert"";",1 Delete all records from the 'mental_health_parity' table where 'parity_law' is NULL,"CREATE TABLE mental_health_parity (id INT, state VARCHAR(2), parity_law VARCHAR(255));",DELETE FROM mental_health_parity WHERE parity_law IS NULL;,DELETE FROM mental_health_parity WHERE parity_law = 'NULL';,0 what is the number of different channel owners?,CREATE TABLE channel (OWNER VARCHAR);,SELECT COUNT(DISTINCT OWNER) FROM channel;,SELECT COUNT(DISTINCT OWNER) FROM channel;,1 Who was the visiting team at the game when the Canadiens had a record of 30–19–9?,"CREATE TABLE table_name_29 (visitor VARCHAR, record VARCHAR);","SELECT visitor FROM table_name_29 WHERE record = ""30–19–9"";","SELECT visitor FROM table_name_29 WHERE record = ""30–19–9"";",1 Who are the top 2 suppliers of Fair Trade certified products?,"CREATE TABLE suppliers (id INT, name TEXT, type TEXT); CREATE TABLE products (id INT, name TEXT, supplier_id INT, fair_trade BOOLEAN); ",SELECT suppliers.name FROM suppliers INNER JOIN products ON suppliers.id = products.supplier_id WHERE products.fair_trade = true GROUP BY suppliers.name ORDER BY COUNT(*) DESC LIMIT 2;,"SELECT s.name, COUNT(p.id) as num_fair_trade_products FROM suppliers s JOIN products p ON s.id = p.supplier_id WHERE p.fair_trade = TRUE GROUP BY s.name ORDER BY num_fair_trade_products DESC LIMIT 2;",0 Update artifact records with conservation status,"CREATE TABLE ArtifactConservationStatus (StatusID INT, StatusName TEXT);",UPDATE Artifacts SET ConservationStatusID = (SELECT StatusID FROM ArtifactConservationStatus WHERE StatusName = 'Good') WHERE SiteID = 123;,UPDATE ArtifactConservationStatus SET StatusName = 'Conservation';,0 what is the surface when the opponent is selma babic?,"CREATE TABLE table_name_31 (surface VARCHAR, opponent VARCHAR);","SELECT surface FROM table_name_31 WHERE opponent = ""selma babic"";","SELECT surface FROM table_name_31 WHERE opponent = ""selma babic"";",1 What's the total number of songs originally performed by Anna Nalick?,"CREATE TABLE table_12310814_1 (song_choice VARCHAR, original_artist VARCHAR);","SELECT COUNT(song_choice) FROM table_12310814_1 WHERE original_artist = ""Anna Nalick"";","SELECT COUNT(song_choice) FROM table_12310814_1 WHERE original_artist = ""Anna Nalick"";",1 List all communication campaigns that focus on climate adaptation in the US and their respective budgets.,"CREATE TABLE communication_campaigns (id INT, campaign_name VARCHAR(100), focus VARCHAR(50), country VARCHAR(50), budget FLOAT); ","SELECT campaign_name, budget FROM communication_campaigns WHERE focus = 'climate adaptation' AND country = 'US';","SELECT campaign_name, budget FROM communication_campaigns WHERE focus = 'climate adaptation' AND country = 'USA';",0 What is the change in infectious disease cases between consecutive months?,"CREATE TABLE infectious_disease_monthly (month INT, district VARCHAR(20), cases INT); ","SELECT month, district, cases, LAG(cases, 1) OVER (PARTITION BY district ORDER BY month) AS prev_cases, cases - LAG(cases, 1) OVER (PARTITION BY district ORDER BY month) AS change FROM infectious_disease_monthly;","SELECT month, SUM(cases) as total_cases FROM infectious_disease_monthly GROUP BY month;",0 "What competition has a result of W on June 30, 1966?","CREATE TABLE table_name_31 (competition VARCHAR, result VARCHAR, date VARCHAR);","SELECT competition FROM table_name_31 WHERE result = ""w"" AND date = ""june 30, 1966"";","SELECT competition FROM table_name_31 WHERE result = ""w"" AND date = ""june 30, 1966"";",1 What is the minimum response time for citizen complaints in each city quarter in the last 3 months?,"CREATE TABLE Complaints (Complaint_Date DATE, City_Quarter VARCHAR(255), Response_Time INT); ","SELECT City_Quarter, MIN(Response_Time) OVER (PARTITION BY City_Quarter) AS Min_Response_Time FROM Complaints WHERE Complaint_Date >= DATEADD(month, -3, GETDATE());","SELECT City_Quarter, MIN(Response_Time) as Min_Response_Time FROM Complaints WHERE Complaint_Date >= DATEADD(month, -3, GETDATE()) GROUP BY City_Quarter;",0 What is the average billing amount for cases handled by attorneys from Indigenous communities?,"CREATE TABLE Attorneys (AttorneyID int, Community varchar(20), HourlyRate decimal(5,2)); CREATE TABLE Cases (CaseID int, AttorneyID int); ",SELECT AVG(HourlyRate * 8 * 22) AS AverageBillingAmount FROM Attorneys WHERE Community = 'Indigenous';,SELECT AVG(HourlyRate) FROM Attorneys INNER JOIN Cases ON Attorneys.AttorneyID = Cases.AttorneyID WHERE Attorneys.Community = 'Indigenous';,0 During which competition were a total of 36 points scored?,"CREATE TABLE table_name_31 (details VARCHAR, points VARCHAR);",SELECT details FROM table_name_31 WHERE points = 36;,SELECT details FROM table_name_31 WHERE points = 36;,1 What is the pick number for the College of Central Missouri State?,"CREATE TABLE table_name_45 (pick__number VARCHAR, college VARCHAR);","SELECT pick__number FROM table_name_45 WHERE college = ""central missouri state"";","SELECT pick__number FROM table_name_45 WHERE college = ""central michigan state"";",0 "Calculate the total revenue for each salesperson in the top 2 sales regions, who has generated more than $50,000 in revenue.","CREATE TABLE SalesRegions (id INT, region VARCHAR(50)); CREATE TABLE Sales (id INT, salesperson_id INT, salesregion_id INT, revenue DECIMAL(10,2)); ","SELECT sr.region, s.salesperson_id, SUM(s.revenue) as total_revenue FROM Sales s JOIN SalesRegions sr ON s.salesregion_id = sr.id GROUP BY sr.region, s.salesperson_id HAVING total_revenue > 50000 AND sr.id IN (1, 2) ORDER BY total_revenue DESC;","SELECT salesperson_id, SUM(revenue) as total_revenue FROM Sales JOIN SalesRegions ON Sales.salesregion_id = SalesRegions.id WHERE revenue > 50000 GROUP BY salesperson_id ORDER BY total_revenue DESC LIMIT 2;",0 What are the names of the military branches in the 'Military_Branches' table?,"CREATE TABLE Military_Branches (id INT, branch VARCHAR(50)); ",SELECT DISTINCT branch FROM Military_Branches;,SELECT branch FROM Military_Branches;,0 Count the number of educational programs for each community outreach coordinator,"CREATE TABLE community_outreach_coordinators (id INT, name VARCHAR(255));CREATE TABLE education_programs (id INT, coordinator_id INT, name VARCHAR(255)); ","SELECT co.name AS coordinator_name, COUNT(e.id) AS program_count FROM community_outreach_coordinators co LEFT JOIN education_programs e ON co.id = e.coordinator_id GROUP BY co.name;","SELECT c.name, COUNT(ep.id) FROM community_outreach_coordinators c JOIN education_programs ep ON c.id = ep.coordinator_id GROUP BY c.name;",0 Which Articulatory class has and Aspirated stop of ㅍ?,"CREATE TABLE table_name_34 (articulatory_class VARCHAR, aspirated_stop VARCHAR);","SELECT articulatory_class FROM table_name_34 WHERE aspirated_stop = ""ㅍ"";","SELECT articulatory_class FROM table_name_34 WHERE aspirated_stop = """";",0 What company focuses on Engine Overhaul for their principal activity?,"CREATE TABLE table_name_7 (company VARCHAR, principal_activities VARCHAR);","SELECT company FROM table_name_7 WHERE principal_activities = ""engine overhaul"";","SELECT company FROM table_name_7 WHERE principal_activities = ""engine overhaul"";",1 When was the winning score −9 (72-68-64-67=271)?,"CREATE TABLE table_name_89 (date VARCHAR, winning_score VARCHAR);",SELECT date FROM table_name_89 WHERE winning_score = −9(72 - 68 - 64 - 67 = 271);,SELECT date FROM table_name_89 WHERE winning_score = 9(72 - 68 - 64 - 67 = 271);,0 What's the series number of the episode with a broadcast order s04 e07?,"CREATE TABLE table_1231892_4 (number_in_series INTEGER, broadcast_order VARCHAR);","SELECT MAX(number_in_series) FROM table_1231892_4 WHERE broadcast_order = ""S04 E07"";","SELECT MAX(number_in_series) FROM table_1231892_4 WHERE broadcast_order = ""S04 E07"";",1 What is the total number of animals in the 'Wetland' and 'Grassland' habitats?,"CREATE TABLE habitat (type TEXT, animal_count INTEGER); ","SELECT type, SUM(animal_count) FROM habitat WHERE type IN ('Wetland', 'Grassland') GROUP BY type;","SELECT SUM(animal_count) FROM habitat WHERE type IN ('Wetland', 'Grassland');",0 What is the average duration of TV shows produced in the UK?,"CREATE TABLE tv_shows (title VARCHAR(255), duration MINUTE, production_country VARCHAR(64));",SELECT AVG(duration) FROM tv_shows WHERE production_country = 'UK';,SELECT AVG(duration) FROM tv_shows WHERE production_country = 'UK';,1 What is the longitude of the township at ANSI code 1759682?,"CREATE TABLE table_18600760_9 (longitude VARCHAR, ansi_code VARCHAR);",SELECT longitude FROM table_18600760_9 WHERE ansi_code = 1759682;,SELECT longitude FROM table_18600760_9 WHERE ansi_code = 1759682;,1 What is the average founding year for startups founded by individuals who identify as Indigenous in the e-commerce industry?,"CREATE TABLE startups(id INT, name TEXT, founders TEXT, founding_year INT, industry TEXT); CREATE TABLE investments(startup_id INT, round INT, funding INT); ",SELECT AVG(founding_year) FROM startups WHERE industry = 'E-commerce' AND founders LIKE '%Aisha%';,SELECT AVG(founding_year) FROM startups JOIN investments ON startups.id = investments.startup_id WHERE startups.founders LIKE 'Indigenous%' AND startups.industry = 'e-commerce';,0 What is the total number of eco-friendly accommodations in Africa and their average sustainability scores?,"CREATE TABLE Scores (id INT, country VARCHAR(50), score INT); CREATE TABLE Accommodations_Africa (id INT, country VARCHAR(50), type VARCHAR(50)); ","SELECT AVG(Scores.score) FROM Scores INNER JOIN Accommodations_Africa ON Scores.country = Accommodations_Africa.country WHERE Accommodations_Africa.type = 'Eco-Friendly' AND Scores.country IN ('Egypt', 'South Africa');","SELECT COUNT(*), AVG(score) FROM Scores JOIN Accommodations_Africa ON Scores.country = Accommodations_Africa.country WHERE Accommodations_Africa.type = 'Eco-Friendly';",0 What is the lowest total medals for the united states who had more than 11 silver medals?,"CREATE TABLE table_name_80 (total INTEGER, country VARCHAR, silver VARCHAR);","SELECT MIN(total) FROM table_name_80 WHERE country = ""united states"" AND silver > 11;","SELECT MIN(total) FROM table_name_80 WHERE country = ""united states"" AND silver > 11;",1 "When they played at Chicago Bulls, what was the Location/Attendance?","CREATE TABLE table_name_47 (location_attendance VARCHAR, opponent VARCHAR);","SELECT location_attendance FROM table_name_47 WHERE opponent = ""at chicago bulls"";","SELECT location_attendance FROM table_name_47 WHERE opponent = ""chicago bulls"";",0 "What is the stage of Fabiano Fontanelli, who had a Trofeo Fast Team of Gewiss Playbus and a point classification of Fabrizio Guidi?","CREATE TABLE table_name_13 (stage VARCHAR, winner VARCHAR, trofeo_fast_team VARCHAR, points_classification VARCHAR);","SELECT stage FROM table_name_13 WHERE trofeo_fast_team = ""gewiss playbus"" AND points_classification = ""fabrizio guidi"" AND winner = ""fabiano fontanelli"";","SELECT stage FROM table_name_13 WHERE trofeo_fast_team = ""gewiss playbus"" AND points_classification = ""fabrizio guidi"" AND winner = ""fabiano fontanelli"";",1 What is the average energy consumption of green buildings in the USA?,"CREATE TABLE green_buildings (id INT, country VARCHAR(255), city VARCHAR(255), energy_consumption FLOAT); ",SELECT AVG(energy_consumption) FROM green_buildings WHERE country = 'USA';,SELECT AVG(energy_consumption) FROM green_buildings WHERE country = 'USA';,1 Name the most goals for algeria,"CREATE TABLE table_24565004_20 (goals¹ INTEGER, nationality² VARCHAR);","SELECT MIN(goals¹) FROM table_24565004_20 WHERE nationality² = ""Algeria"";","SELECT MAX(goals1) FROM table_24565004_20 WHERE nationality2 = ""Algeria"";",0 Update the name of the dish 'Quinoa Salad' to 'Quinoa Power Bowl' in the lunch menu.,"CREATE TABLE menu (id INT, category VARCHAR(255), item VARCHAR(255)); ",UPDATE menu SET item = 'Quinoa Power Bowl' WHERE category = 'lunch' AND item = 'Quinoa Salad';,UPDATE menu SET item = 'Quinoa Power Bowl' WHERE category = 'Lunch' AND item = 'Quinoa Salad';,0 What is the average monthly voice call duration for postpaid mobile customers in California?,"CREATE TABLE mobile_customers (customer_id INT, name VARCHAR(50), voice_call_duration FLOAT, state VARCHAR(20), payment_type VARCHAR(20)); ",SELECT AVG(voice_call_duration) FROM mobile_customers WHERE state = 'California' AND payment_type = 'postpaid';,SELECT AVG(voice_call_duration) FROM mobile_customers WHERE state = 'California' AND payment_type = 'Postpaid';,0 "Find the number of rural healthcare providers in each region, ranked by total.","CREATE TABLE providers (provider_id INT, name TEXT, location TEXT, rural BOOLEAN);CREATE TABLE regions (region_id INT, name TEXT, state TEXT, rural_population INT);","SELECT region, COUNT(*) AS providers FROM providers WHERE rural GROUP BY region ORDER BY providers DESC;","SELECT r.name, COUNT(p.provider_id) as total_providers FROM providers p JOIN regions r ON p.region_id = r.region_id WHERE p.rural = true GROUP BY r.name ORDER BY total_providers DESC;",0 What is the result when team 1 is ICL Pakistan?,"CREATE TABLE table_17103566_1 (result VARCHAR, team_1 VARCHAR);","SELECT result FROM table_17103566_1 WHERE team_1 = ""ICL Pakistan"";","SELECT result FROM table_17103566_1 WHERE team_1 = ""ICCL Pakistan"";",0 "What is the total number of safety incidents per chemical family and the average incidents per plant for the Southeast region, for incidents that occurred in the last 6 months?","CREATE TABLE incidents (id INT, plant TEXT, incident_date DATE, incident_type TEXT, chemical_family TEXT); ","SELECT chemical_family, COUNT(*) AS total_incidents, AVG(incidents_per_plant) AS avg_incidents_per_plant FROM (SELECT incident_date, plant, incident_type, chemical_family, COUNT(*) OVER (PARTITION BY plant) AS incidents_per_plant FROM incidents WHERE plant LIKE 'Southeast%' AND incident_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH)) AS incidents_per_plant GROUP BY chemical_family;","SELECT chemical_family, COUNT(*) as total_incidents, AVG(incidents_per_plant) as avg_incidents_per_plant FROM incidents WHERE incident_date >= DATEADD(month, -6, GETDATE()) GROUP BY chemical_family;",0 "Which Driver has a Date of 16th september 1951, and a Race of dns?","CREATE TABLE table_name_8 (driver VARCHAR, date VARCHAR, race VARCHAR);","SELECT driver FROM table_name_8 WHERE date = ""16th september 1951"" AND race = ""dns"";","SELECT driver FROM table_name_8 WHERE date = ""16th september 1951"" AND race = ""dns"";",1 "What is the most gold medals that a team ranked higher than 6, have 1 silver medal, and more than 4 total medals have?","CREATE TABLE table_name_96 (gold INTEGER, total VARCHAR, rank VARCHAR, silver VARCHAR);",SELECT MAX(gold) FROM table_name_96 WHERE rank < 6 AND silver = 1 AND total > 4;,SELECT MAX(gold) FROM table_name_96 WHERE rank > 6 AND silver = 1 AND total > 4;,0 What is the lowest grid number that a race took place doing more than 21 laps?,"CREATE TABLE table_name_54 (grid INTEGER, laps INTEGER);",SELECT MIN(grid) FROM table_name_54 WHERE laps > 21;,SELECT MIN(grid) FROM table_name_54 WHERE laps > 21;,1 What is the average duration of arson incidents in 'south_central' precinct?,"CREATE TABLE arson_incidents (id INT, incident_time TIMESTAMP, precinct VARCHAR(20), duration INTEGER); ",SELECT AVG(duration) FROM arson_incidents WHERE precinct = 'south_central';,SELECT AVG(duration) FROM arson_incidents WHERE precinct ='south_central';,0 Show me the top 2 gluten-free grains by protein content.,"CREATE TABLE GlutenFreeGrains (id INT, name VARCHAR(50), protein INT); ",SELECT * FROM GlutenFreeGrains ORDER BY protein DESC LIMIT 2;,"SELECT name, protein FROM GlutenFreeGrains ORDER BY protein DESC LIMIT 2;",0 What was the position in 1959-1960 for the club that had 14 seasons at this level?,"CREATE TABLE table_name_45 (position_in_1959_1960 VARCHAR, seasons_at_this_level VARCHAR);","SELECT position_in_1959_1960 FROM table_name_45 WHERE seasons_at_this_level = ""14 seasons"";",SELECT position_in_1959_1960 FROM table_name_45 WHERE seasons_at_this_level = 14;,0 How many patients have been treated with psychodynamic therapy in New York?,"CREATE TABLE patients (id INT, name TEXT, state TEXT);CREATE TABLE treatments (id INT, patient_id INT, therapy TEXT);",SELECT COUNT(DISTINCT patients.id) FROM patients INNER JOIN treatments ON patients.id = treatments.patient_id WHERE patients.state = 'New York' AND treatments.therapy = 'Psychodynamic';,SELECT COUNT(DISTINCT patients.id) FROM patients INNER JOIN treatments ON patients.id = treatments.patient_id WHERE patients.state = 'New York' AND treatments.therapy = 'Psychodynamic Therapy';,0 Which virtual reality (VR) game has the highest total playtime in the USA?,"CREATE TABLE games (game_id INT, name VARCHAR(50), genre VARCHAR(20), release_date DATE, platform VARCHAR(20), studio VARCHAR(30)); ","SELECT name, SUM(playtime) as total_playtime FROM game_sessions WHERE country = 'USA' GROUP BY name ORDER BY total_playtime DESC LIMIT 1;","SELECT name, SUM(playtime) as total_playtime FROM games WHERE genre = 'VR' AND country = 'USA' GROUP BY name ORDER BY total_playtime DESC LIMIT 1;",0 What is the minimum number of followers for users from Japan?,"CREATE TABLE users (id INT, name VARCHAR(50), country VARCHAR(2), followers INT); ",SELECT MIN(users.followers) as min_followers FROM users WHERE users.country = 'JP';,SELECT MIN(followers) FROM users WHERE country = 'Japan';,0 What is the seat percentage when vote percentage is 2.4% (-8.3)?,"CREATE TABLE table_name_73 (seat_percentage VARCHAR, vote_percentage VARCHAR);","SELECT seat_percentage FROM table_name_73 WHERE vote_percentage = ""2.4% (-8.3)"";","SELECT seat_percentage FROM table_name_73 WHERE vote_percentage = ""2.4% (-8.3)"";",1 What is the latest cybersecurity strategy published in the 'CyberSecurityStrategies' table?,"CREATE TABLE CyberSecurityStrategies (id INT PRIMARY KEY, title VARCHAR(100), description TEXT, publish_date DATE, category VARCHAR(50)); ","SELECT title, description, publish_date FROM CyberSecurityStrategies ORDER BY publish_date DESC LIMIT 1;","SELECT title, description, publish_date FROM CyberSecurityStrategies ORDER BY publish_date DESC LIMIT 1;",1 How many incumbents had a district of Arkansas 3?,"CREATE TABLE table_1342233_5 (incumbent VARCHAR, district VARCHAR);","SELECT COUNT(incumbent) FROM table_1342233_5 WHERE district = ""Arkansas 3"";","SELECT COUNT(incumbent) FROM table_1342233_5 WHERE district = ""Arkansas 3"";",1 What is the average ticket price for football and basketball games?,"CREATE TABLE games (game_type VARCHAR(20), ticket_price DECIMAL(5,2)); ","SELECT AVG(ticket_price) FROM games WHERE game_type IN ('Football', 'Basketball');","SELECT AVG(ticket_price) FROM games WHERE game_type IN ('Football', 'Basketball');",1 What is the total number of visitors to Japan in Q1 2023?,"CREATE TABLE visitor_statistics (id INT, country TEXT, year INT, quarter INT, visitors INT); ",SELECT SUM(visitors) FROM visitor_statistics WHERE country = 'Japan' AND quarter = 1 AND year = 2023;,SELECT SUM(visitors) FROM visitor_statistics WHERE country = 'Japan' AND quarter = 1;,0 "Which Event has a Surface of semifinal, and a Winner of hard (i)?","CREATE TABLE table_name_23 (MAX VARCHAR, surface VARCHAR, winner VARCHAR);","SELECT NOT MAX AS event FROM table_name_23 WHERE surface = ""semifinal"" AND winner = ""hard (i)"";","SELECT MAX FROM table_name_23 WHERE surface = ""semifinal"" AND winner = ""hard (i)"";",0 What's the island with a summit of Haleakalā?,"CREATE TABLE table_name_74 (island VARCHAR, summit VARCHAR);","SELECT island FROM table_name_74 WHERE summit = ""haleakalā"";","SELECT island FROM table_name_74 WHERE summit = ""haleakal"";",0 Show the total number of community health workers,"CREATE TABLE healthcare.CommunityHealthWorker( worker_id INT PRIMARY KEY, name VARCHAR(100), cultural_competency_score FLOAT); ",SELECT COUNT(*) FROM healthcare.CommunityHealthWorker;,SELECT COUNT(*) FROM healthcare.CommunityHealthWorker;,1 What catalog has the United Kingdom as the country?,"CREATE TABLE table_name_9 (catalog VARCHAR, country VARCHAR);","SELECT catalog FROM table_name_9 WHERE country = ""united kingdom"";","SELECT catalog FROM table_name_9 WHERE country = ""united kingdom"";",1 What is the Country of the T8 Place Player with a Score of 68-74=142?,"CREATE TABLE table_name_99 (country VARCHAR, place VARCHAR, score VARCHAR);","SELECT country FROM table_name_99 WHERE place = ""t8"" AND score = 68 - 74 = 142;","SELECT country FROM table_name_99 WHERE place = ""t8"" AND score = 68 - 74 = 142;",1 What is the total attendance at heritage sites in Asia in the last 5 years?,"CREATE TABLE heritage_sites (id INT, name VARCHAR(50), location VARCHAR(50), year INT, attendance INT); ",SELECT SUM(attendance) FROM heritage_sites WHERE location = 'Asia' AND year BETWEEN 2017 AND 2021;,SELECT SUM(attendance) FROM heritage_sites WHERE location LIKE '%Asia%' AND year BETWEEN 2019 AND 2021;,0 "Create a view named ""cargo_summary"" that displays the average delivery time for cargo to each destination.","CREATE TABLE cargo (cargo_id INT, vessel_id INT, destination VARCHAR(50), delivery_date DATE);","CREATE VIEW cargo_summary AS SELECT destination, AVG(DATEDIFF(delivery_date, GETDATE())) AS avg_delivery_time FROM cargo GROUP BY destination;","CREATE VIEW cargo_summary AS SELECT destination, AVG(DATEDIFF(delivery_date, '%Y-%m')) AS avg_delivery_time FROM cargo GROUP BY destination;",0 "Which GDP per capita (US$) (2004) is the highest one that has an Area (km²) larger than 148825.6, and a State of roraima?","CREATE TABLE table_name_37 (gdp_per_capita__us INTEGER, area__km²_ VARCHAR, state VARCHAR);","SELECT MAX(gdp_per_capita__us) AS $___2004_ FROM table_name_37 WHERE area__km²_ > 148825.6 AND state = ""roraima"";","SELECT MAX(gdp_per_capita__us) FROM table_name_37 WHERE area__km2_ > 148825.6 AND state = ""roraima"";",0 What is the total number of languages preserved?,"CREATE TABLE languages (language_id INT, country_id INT, language_name VARCHAR(255), status VARCHAR(255)); ",SELECT COUNT(*) FROM languages WHERE status = 'Preserved';,SELECT COUNT(*) FROM languages WHERE status = 'Preserved';,1 Post University has what nickname?,"CREATE TABLE table_name_4 (nickname VARCHAR, institution VARCHAR);","SELECT nickname FROM table_name_4 WHERE institution = ""post university"";","SELECT nickname FROM table_name_4 WHERE institution = ""post university"";",1 Rank the top 3 countries with the highest increase in military spending between 2016 and 2018 in the North Atlantic Treaty Organization (NATO)?,"CREATE TABLE MilitarySpending (Year INT, Country VARCHAR(50), Spending FLOAT, Region VARCHAR(50)); ","SELECT Country, MAX(Spending) - MIN(Spending) as Increase FROM MilitarySpending WHERE Year IN (2016, 2018) AND Region = 'NATO' GROUP BY Country ORDER BY Increase DESC LIMIT 3;","SELECT Country, Spending, ROW_NUMBER() OVER (ORDER BY Spending DESC) as rn FROM MilitarySpending WHERE Year BETWEEN 2016 AND 2018 AND Region = 'NATO' GROUP BY Country ORDER BY rn DESC LIMIT 3;",0 Find the name of the user who has the largest number of followers.,"CREATE TABLE user_profiles (name VARCHAR, followers VARCHAR);",SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 1;,SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 1;,1 Which locations in South Africa had the highest drought impact in the last 10 years?,"CREATE TABLE drought_impact_south_africa(id INT, location VARCHAR(50), impact FLOAT, year INT); ","SELECT location, MAX(impact) as max_impact FROM drought_impact_south_africa WHERE year BETWEEN (SELECT MAX(year) - 10 FROM drought_impact_south_africa) AND MAX(year) GROUP BY location ORDER BY max_impact DESC;","SELECT location, MAX(impact) FROM drought_impact_south_africa WHERE year BETWEEN 2019 AND 2021 GROUP BY location;",0 Which party was joseph t. johnson in?,"CREATE TABLE table_name_86 (party VARCHAR, incumbent VARCHAR);","SELECT party FROM table_name_86 WHERE incumbent = ""joseph t. johnson"";","SELECT party FROM table_name_86 WHERE incumbent = ""joseph t. johnson"";",1 "What is the average cost of public works projects in New York and California, grouped by project type?","CREATE TABLE public_works_projects (project_id INT, project_name VARCHAR(255), state VARCHAR(255), project_type VARCHAR(255), cost FLOAT); ","SELECT project_type, AVG(cost) as avg_cost FROM public_works_projects WHERE state IN ('New York', 'California') GROUP BY project_type;","SELECT project_type, AVG(cost) as avg_cost FROM public_works_projects WHERE state IN ('New York', 'California') GROUP BY project_type;",1 What's the official website of Burning Flame 烈火雄心 with 22 episodes?,"CREATE TABLE table_name_33 (official_website VARCHAR, number_of_episodes VARCHAR, english_title__chinese_title_ VARCHAR);","SELECT official_website FROM table_name_33 WHERE number_of_episodes > 22 AND english_title__chinese_title_ = ""burning flame 烈火雄心"";","SELECT official_website FROM table_name_33 WHERE number_of_episodes = 22 AND english_title__chinese_title_ = ""burning flame "";",0 "How many rounds have an Overall larger than 17, and a Position of quarterback?","CREATE TABLE table_name_66 (round VARCHAR, overall VARCHAR, position VARCHAR);","SELECT COUNT(round) FROM table_name_66 WHERE overall > 17 AND position = ""quarterback"";","SELECT COUNT(round) FROM table_name_66 WHERE overall > 17 AND position = ""quarterback"";",1 "Which National team has a Club of arsenal, and Apps smaller than 4, and a Year of 2010?","CREATE TABLE table_name_95 (national_team VARCHAR, year VARCHAR, club VARCHAR, apps VARCHAR);","SELECT national_team FROM table_name_95 WHERE club = ""arsenal"" AND apps < 4 AND year = ""2010"";","SELECT national_team FROM table_name_95 WHERE club = ""arsenal"" AND apps 4 AND year = 2010;",0 Who earned the save in the game against the Sinon Bulls when Jeriome Robertson took the loss?,"CREATE TABLE table_name_32 (save VARCHAR, opponent VARCHAR, loss VARCHAR);","SELECT save FROM table_name_32 WHERE opponent = ""sinon bulls"" AND loss = ""jeriome robertson"";","SELECT save FROM table_name_32 WHERE opponent = ""sinon bulls"" AND loss = ""jeriome robertson"";",1 Who has the lead in Norway?,"CREATE TABLE table_name_89 (lead VARCHAR, nation VARCHAR);","SELECT lead FROM table_name_89 WHERE nation = ""norway"";","SELECT lead FROM table_name_89 WHERE nation = ""norway"";",1 What is the ranking for the United States when the money is $200?,"CREATE TABLE table_name_52 (place VARCHAR, country VARCHAR, money___$__ VARCHAR);","SELECT place FROM table_name_52 WHERE country = ""united states"" AND money___$__ = ""200"";","SELECT place FROM table_name_52 WHERE country = ""united states"" AND money___$__ = ""$200"";",0 What is the average word count for articles in each language?,"CREATE TABLE word_counts (id INT PRIMARY KEY, article_id INT, language VARCHAR(50), word_count INT, FOREIGN KEY (article_id) REFERENCES articles(id));","SELECT language, AVG(word_count) as avg_word_count FROM word_counts GROUP BY language;","SELECT language, AVG(word_count) FROM word_counts GROUP BY language;",0 What are the names of all suppliers that provide more than 1000 tons of organic produce?,"CREATE TABLE suppliers (id INT, name TEXT, produce_type TEXT, quantity INT, is_organic BOOLEAN); ",SELECT name FROM suppliers WHERE produce_type = 'Produce' AND is_organic = true AND quantity > 1000;,SELECT name FROM suppliers WHERE quantity > 1000 AND is_organic = true;,0 What are the total ticket sales for each conference in the ticket_sales table?,"CREATE TABLE ticket_sales (id INT, team VARCHAR(50), conference VARCHAR(50), tickets_sold INT, revenue FLOAT);","SELECT conference, SUM(tickets_sold) AS total_tickets_sold FROM ticket_sales GROUP BY conference;","SELECT conference, SUM(tickets_sold) FROM ticket_sales GROUP BY conference;",0 Insert a new record of 200 containers shipped from the port of 'Sydney' to 'Brazil' on '2021-07-01' into the shipment table.,"CREATE TABLE port (port_id INT, port_name TEXT, country TEXT);CREATE TABLE shipment (shipment_id INT, container_count INT, ship_date DATE, port_id INT); ","INSERT INTO shipment (shipment_id, container_count, ship_date, port_id) VALUES (3, 200, '2021-07-01', (SELECT port_id FROM port WHERE port_name = 'Sydney' AND country = 'Australia'));","INSERT INTO shipment (shipment_id, container_count, ship_date, port_id) VALUES ('Sydney', 200, '2021-07-01');",0 What is the average duration of mental health campaigns in Canada?,"CREATE TABLE campaigns (campaign_id INT, campaign_name TEXT, city TEXT, start_date DATE, end_date DATE, country TEXT); ","SELECT AVG(DATEDIFF('day', start_date, end_date)) as avg_duration FROM campaigns WHERE country = 'Canada';","SELECT AVG(DATEDIFF(end_date, start_date)) FROM campaigns WHERE country = 'Canada';",0 What is the population density of bandung regency?,"CREATE TABLE table_21734764_1 (population_density___km²_2010_ VARCHAR, administrative_division VARCHAR);","SELECT population_density___km²_2010_ FROM table_21734764_1 WHERE administrative_division = ""Bandung Regency"";","SELECT population_density___km2_2010_ FROM table_21734764_1 WHERE administrative_division = ""Bandung Regency"";",0 How many refugees were supported by each organization by age group and gender in Q1 2021?,"CREATE TABLE refugee_support (refugee_id INT, organization_id INT, age INT, gender VARCHAR(10), support_date DATE); ","SELECT organization_id, gender, age_group, COUNT(*) as supported_refugees FROM (SELECT organization_id, gender, CASE WHEN age <= 17 THEN 'Minor' WHEN age BETWEEN 18 AND 64 THEN 'Adult' ELSE 'Senior' END as age_group FROM refugee_support WHERE EXTRACT(QUARTER FROM support_date) = 1 AND EXTRACT(YEAR FROM support_date) = 2021) t GROUP BY organization_id, gender, age_group;","SELECT organization_id, age, gender, COUNT(*) as num_refugees FROM refugee_support WHERE support_date BETWEEN '2021-01-01' AND '2021-03-31' GROUP BY organization_id, age, gender;",0 which is the former pageant in the country where the new pageant is miss bahamas?,"CREATE TABLE table_14308895_2 (former_pageant VARCHAR, new_pageant VARCHAR);","SELECT former_pageant FROM table_14308895_2 WHERE new_pageant = ""Miss Bahamas"";","SELECT former_pageant FROM table_14308895_2 WHERE new_pageant = ""Miss Bahamas"";",1 List pollution control initiatives by country?,"CREATE TABLE pollution_control_initiatives (id INT, initiative_name TEXT, country TEXT);","SELECT initiative_name, country FROM pollution_control_initiatives;","SELECT country, initiative_name FROM pollution_control_initiatives GROUP BY country;",0 Show the details and star ratings of the 3 least expensive hotels.,"CREATE TABLE HOTELS (other_hotel_details VARCHAR, star_rating_code VARCHAR, price_range VARCHAR);","SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range LIMIT 3;","SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range LIMIT 3;",1 Which Year has a Start of 14?,"CREATE TABLE table_name_66 (year INTEGER, start VARCHAR);","SELECT AVG(year) FROM table_name_66 WHERE start = ""14"";",SELECT SUM(year) FROM table_name_66 WHERE start = 14;,0 Which country had the highest rare earth element production in 2020?,"CREATE TABLE production (country VARCHAR(255), year INT, amount INT); ","SELECT country, MAX(amount) AS max_amount FROM production WHERE year = 2020 GROUP BY country;","SELECT country, MAX(amount) FROM production WHERE year = 2020 GROUP BY country;",0 "List the top 5 most energy efficient states in the USA, based on energy efficiency statistics?","CREATE TABLE state (id INT, name VARCHAR(50), energy_efficiency_rating INT); ","SELECT name, energy_efficiency_rating FROM state ORDER BY energy_efficiency_rating DESC LIMIT 5;","SELECT name, energy_efficiency_rating FROM state ORDER BY energy_efficiency_rating DESC LIMIT 5;",1 What is the average rating of comedy shows produced in the USA?,"CREATE TABLE IF NOT EXISTS show (id INT PRIMARY KEY, title VARCHAR(100), genre VARCHAR(50), release_year INT, country VARCHAR(50)); CREATE TABLE IF NOT EXISTS rating (id INT PRIMARY KEY, value DECIMAL(2,1), show_id INT, FOREIGN KEY (show_id) REFERENCES show(id));",SELECT AVG(rating.value) as average_rating FROM rating JOIN show ON rating.show_id = show.id WHERE show.genre = 'comedy' AND show.country = 'USA';,SELECT AVG(rating.value) FROM rating INNER JOIN show ON rating.show_id = show.id WHERE show.genre = 'Comic' AND show.country = 'USA';,0 List the top 3 countries with the highest quantity of fair trade certified textile factories.,"CREATE TABLE textile_factories (country VARCHAR(255), certification VARCHAR(255), quantity INT); ","SELECT country, SUM(quantity) as total_quantity FROM textile_factories WHERE certification = 'Fair Trade' GROUP BY country ORDER BY total_quantity DESC LIMIT 3;","SELECT country, quantity FROM textile_factories WHERE certification = 'Fair Trade' ORDER BY quantity DESC LIMIT 3;",0 Who held the Male Sports Rep position in 2011?,CREATE TABLE table_name_73 (position VARCHAR);,"SELECT 2011 FROM table_name_73 WHERE position = ""male sports rep"";","SELECT 2011 FROM table_name_73 WHERE position = ""male sports rep"";",1 What is the smallest all around when the total is 19.85 and the hoop is less than 9.85?,"CREATE TABLE table_name_70 (all_around INTEGER, total VARCHAR, hoop VARCHAR);",SELECT MIN(all_around) FROM table_name_70 WHERE total = 19.85 AND hoop < 9.85;,SELECT MIN(all_around) FROM table_name_70 WHERE total = 19.85 AND hoop 9.85;,0 Find the total number of visits for each exhibition in descending order.,"CREATE TABLE Exhibitions (id INT, city VARCHAR(20), visitors INT); CREATE TABLE VisitorExhibitions (visitor_id INT, exhibition_id INT); ","SELECT e.id, e.city, COUNT(ve.visitor_id) AS total_visits FROM Exhibitions e JOIN VisitorExhibitions ve ON e.id = ve.exhibition_id GROUP BY e.id ORDER BY total_visits DESC;","SELECT Exhibitions.city, COUNT(VisitorExhibitions.visitor_id) as total_visitors FROM Exhibitions INNER JOIN VisitorExhibitions ON Exhibitions.id = VisitorExhibitions.exhibition_id GROUP BY Exhibitions.city ORDER BY total_visitors DESC;",0 Delete all spacecraft records with the engine 'Raptor',"CREATE TABLE spacecraft (id INT PRIMARY KEY, name VARCHAR(50), engine VARCHAR(50), status VARCHAR(10));",DELETE FROM spacecraft WHERE engine = 'Raptor';,DELETE FROM spacecraft WHERE engine = 'Raptor';,1 Identify the average production volume for wells drilled in the year 2020,"CREATE TABLE wells (well_id INT, well_name VARCHAR(50), production_volume FLOAT, drill_year INT); ",SELECT AVG(production_volume) FROM wells WHERE drill_year = 2020;,SELECT AVG(production_volume) FROM wells WHERE drill_year = 2020;,1 What was the maximum duration of space missions launched before 2010?,"CREATE TABLE SpaceMissions (id INT, name VARCHAR(255), launch_date DATE, duration INT);",SELECT MAX(duration) FROM SpaceMissions WHERE launch_date < '2010-01-01';,SELECT MAX(duration) FROM SpaceMissions WHERE launch_date '2010-01-01';,0 "What is the total revenue of OTA bookings in New York, USA?","CREATE TABLE ota_bookings (booking_id INT, hotel_name VARCHAR(255), city VARCHAR(255), country VARCHAR(255), revenue FLOAT); ",SELECT SUM(revenue) FROM ota_bookings WHERE city = 'New York' AND country = 'USA';,SELECT SUM(revenue) FROM ota_bookings WHERE city = 'New York' AND country = 'USA';,1 How many seals are in the Arctic Ocean?,"CREATE TABLE Animals (name VARCHAR(50), species VARCHAR(50), location VARCHAR(50)); ",SELECT COUNT(*) FROM Animals WHERE species = 'Seal' AND location = 'Arctic Ocean';,SELECT COUNT(*) FROM Animals WHERE location = 'Arctic Ocean' AND species = 'Seal';,0 What is the Winner of the Event in Panama City?,"CREATE TABLE table_name_5 (winner VARCHAR, city VARCHAR);","SELECT winner FROM table_name_5 WHERE city = ""panama city"";","SELECT winner FROM table_name_5 WHERE city = ""panama city"";",1 What is the total amount donated by individual donors from the USA in the last 3 years?,"CREATE TABLE donors (id INT, name TEXT, country TEXT, donation_amount DECIMAL(10,2), donation_date DATE); ","SELECT SUM(donation_amount) FROM donors WHERE country = 'USA' AND donation_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR);","SELECT SUM(donation_amount) FROM donors WHERE country = 'USA' AND donation_date >= DATEADD(year, -3, GETDATE());",0 What was the total number of volunteer hours for the year 2021?,"CREATE TABLE volunteers (volunteer_id INT, volunteer_name VARCHAR(50), volunteer_hours DECIMAL(10,2), volunteer_date DATE);",SELECT SUM(volunteer_hours) FROM volunteers WHERE YEAR(volunteer_date) = 2021;,SELECT SUM(volunteer_hours) FROM volunteers WHERE YEAR(volunteer_date) = 2021;,1 Find the number of destinations with a travel advisory level higher than 3 for each region,"CREATE TABLE destinations (id INT, name VARCHAR(50), travel_advisory_level INT, region VARCHAR(50)); ","SELECT region, COUNT(*) FROM destinations WHERE travel_advisory_level > 3 GROUP BY region;","SELECT region, COUNT(*) FROM destinations WHERE travel_advisory_level > 3 GROUP BY region;",1 Which season did jackie stewart enter with entries less than 215?,"CREATE TABLE table_name_67 (seasons VARCHAR, entries VARCHAR, driver VARCHAR);","SELECT seasons FROM table_name_67 WHERE entries < 215 AND driver = ""jackie stewart"";","SELECT seasons FROM table_name_67 WHERE entries 215 AND driver = ""jackie stewart"";",0 What's the constituency number of the Seoni district and has none reserved?,"CREATE TABLE table_name_94 (constituency_number VARCHAR, reserved_for___sc___st__none_ VARCHAR, district VARCHAR);","SELECT constituency_number FROM table_name_94 WHERE reserved_for___sc___st__none_ = ""none"" AND district = ""seoni"";","SELECT constituency_number FROM table_name_94 WHERE reserved_for___sc___st__none_ = ""none"" AND district = ""seoni"";",1 Which non-organic products contain milk as an allergen?,"CREATE TABLE Food_Allergens (Product_ID INT, Allergen_ID INT); CREATE TABLE Allergens (Allergen_ID INT, Allergen_Name TEXT); CREATE TABLE Products (Product_ID INT, Product_Name TEXT, Organic_Certified INT); CREATE VIEW Products_With_Milk_Allergen AS SELECT Food_Allergens.Product_ID FROM Food_Allergens INNER JOIN Allergens ON Food_Allergens.Allergen_ID = Allergens.Allergen_ID WHERE Allergens.Allergen_Name = 'Milk'; CREATE VIEW Non_Organic_Products_With_Milk_Allergen AS SELECT * FROM Products_With_Milk_Allergen WHERE Products.Organic_Certified = 0;",SELECT Product_Name FROM Non_Organic_Products_With_Milk_Allergen;,SELECT Non_Organic_Products_With_Milk_Allergen FROM Non_Organic_Products_With_Milk_Allergen;,0 Update soil pH values for a specific farm,"CREATE TABLE SoilTypes (id INT PRIMARY KEY, type VARCHAR(50), pH DECIMAL(3,1), farm_id INT); ",UPDATE SoilTypes SET pH = 6.8 WHERE farm_id = 1001;,UPDATE SoilTypes SET pH = 7.0 WHERE farm_id = 1;,0 How many volunteers from Mexico have participated in health-related programs in the past year?,"CREATE TABLE volunteers (id INT, country VARCHAR(50), program_id INT, participation_date DATE); CREATE TABLE programs (id INT, focus_area VARCHAR(50)); ","SELECT COUNT(DISTINCT volunteers.id) FROM volunteers JOIN programs ON volunteers.program_id = programs.id WHERE volunteers.country = 'Mexico' AND programs.focus_area = 'health-related programs' AND participation_date >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR);","SELECT COUNT(*) FROM volunteers JOIN programs ON volunteers.program_id = programs.id WHERE volunteers.country = 'Mexico' AND programs.focus_area = 'Health' AND participation_date >= DATEADD(year, -1, GETDATE());",0 What is the sum of all the years that Landon Donovan won the ESPY award?,"CREATE TABLE table_name_32 (year VARCHAR, player VARCHAR);","SELECT COUNT(year) FROM table_name_32 WHERE player = ""landon donovan"";","SELECT COUNT(year) FROM table_name_32 WHERE player = ""landon donovan"";",1 What school/club team did Amal McCaskill play for?,"CREATE TABLE table_name_40 (school_club_team VARCHAR, player VARCHAR);","SELECT school_club_team FROM table_name_40 WHERE player = ""amal mccaskill"";","SELECT school_club_team FROM table_name_40 WHERE player = ""amal mccaskill"";",1 Show the average safety rating for each brand,"CREATE TABLE safety_tests (id INT PRIMARY KEY, company VARCHAR(255), brand VARCHAR(255), test_location VARCHAR(255), test_date DATE, safety_rating INT);","SELECT brand, AVG(safety_rating) as avg_rating FROM safety_tests GROUP BY brand;","SELECT brand, AVG(safety_rating) as avg_safety_rating FROM safety_tests GROUP BY brand;",0 "What is the rated power for the reactor that ended construction on May 10, 1978?","CREATE TABLE table_name_52 (rated_power VARCHAR, finish_construction VARCHAR);","SELECT rated_power FROM table_name_52 WHERE finish_construction = ""may 10, 1978"";","SELECT rated_power FROM table_name_52 WHERE finish_construction = ""may 10, 1978"";",1 Which item has the suffix containing thiocyanato- (-scn) as a prefix?,"CREATE TABLE table_name_77 (suffix VARCHAR, prefix VARCHAR);","SELECT suffix FROM table_name_77 WHERE prefix = ""thiocyanato- (-scn)"";","SELECT suffix FROM table_name_77 WHERE prefix = ""thiocyanato- (-scn)"";",1 Who are the coaches who have won the 'Coach of the Year' award and their corresponding teams?,"CREATE TABLE Coaches (CoachID INT PRIMARY KEY, Name VARCHAR(100), TeamID INT, Salary DECIMAL(10,2)); CREATE TABLE Awards (AwardID INT PRIMARY KEY, CoachID INT, Award VARCHAR(50), Year INT); CREATE TABLE Teams (TeamID INT PRIMARY KEY, TeamName VARCHAR(100), City VARCHAR(50));","SELECT Coaches.Name, Teams.TeamName FROM Coaches INNER JOIN Awards ON Coaches.CoachID = Awards.CoachID INNER JOIN Teams ON Coaches.TeamID = Teams.TeamID WHERE Awards.Award = 'Coach of the Year';","SELECT Coaches.Name, Teams.TeamName FROM Coaches INNER JOIN Awards ON Coaches.CoachID = Awards.CoachID INNER JOIN Teams ON Awards.TeamID = Teams.TeamID WHERE Awards.Award = 'Coach of the Year';",0 List the auto show events that are happening in 2024.,"CREATE TABLE AutoShows (name VARCHAR(20), year INT); ",SELECT name FROM AutoShows WHERE year = 2024;,SELECT name FROM AutoShows WHERE year = 2024;,1 Tell me the competition for half marathon,"CREATE TABLE table_name_70 (competition VARCHAR, notes VARCHAR);","SELECT competition FROM table_name_70 WHERE notes = ""half marathon"";","SELECT competition FROM table_name_70 WHERE notes = ""half marathon"";",1 What are the top 5 countries with the highest military spending in 2021?,"CREATE TABLE military_spending (id INT, country VARCHAR(50), spending DECIMAL(10,2), year INT); ","SELECT country, spending FROM military_spending WHERE year = 2021 ORDER BY spending DESC LIMIT 5;","SELECT country, spending FROM military_spending WHERE year = 2021 ORDER BY spending DESC LIMIT 5;",1 What is the total amount of funding received for each art program in the past year?,"CREATE TABLE art_programs (id INT, program_type VARCHAR(20), start_date DATE, end_date DATE); CREATE TABLE funding_received (id INT, program_id INT, amount INT); ","SELECT p.program_type, SUM(r.amount) FROM art_programs p INNER JOIN funding_received r ON p.id = r.program_id WHERE p.start_date <= '2022-12-31' AND p.end_date >= '2022-01-01' GROUP BY p.program_type;","SELECT art_programs.program_type, SUM(funding_received.amount) as total_funding FROM art_programs INNER JOIN funding_received ON art_programs.id = funding_received.program_id WHERE art_programs.start_date >= DATEADD(year, -1, GETDATE()) GROUP BY art_programs.program_type;",0 "Update the capacity of the cargo ship named 'Sea Titan' to 175,000.","CREATE TABLE cargo_ships (id INT, name VARCHAR(50), capacity INT, owner_id INT); ",UPDATE cargo_ships SET capacity = 175000 WHERE name = 'Sea Titan';,"UPDATE cargo_ships SET capacity = 175,000 WHERE name = 'Sea Titan';",0 Update the funding amount for 'Startup A' to 10000000.,"CREATE TABLE biotech_startups (id INT, name VARCHAR(100), location VARCHAR(100), funding FLOAT); ",UPDATE biotech_startups SET funding = 10000000 WHERE name = 'Startup A';,UPDATE biotech_startups SET funding = 10000000 WHERE name = 'Startup A';,1 "What is Club, when Drawn is ""0"", and when Try Bonus is ""5""?","CREATE TABLE table_name_9 (club VARCHAR, drawn VARCHAR, try_bonus VARCHAR);","SELECT club FROM table_name_9 WHERE drawn = ""0"" AND try_bonus = ""5"";","SELECT club FROM table_name_9 WHERE drawn = ""0"" AND try_bonus = ""5"";",1 Find the second-highest salary in the 'administrative' department?,"CREATE TABLE departments (id INT, name VARCHAR(50)); CREATE TABLE employees (id INT, name VARCHAR(50), dept_id INT, salary DECIMAL(10, 2));",SELECT salary FROM (SELECT salary FROM employees WHERE dept_id = (SELECT id FROM departments WHERE name = 'administrative') ORDER BY salary DESC LIMIT 2) t ORDER BY salary LIMIT 1;,"SELECT e.name, e.salary FROM employees e JOIN departments d ON e.dept_id = d.id WHERE d.name = 'administrative' ORDER BY e.salary DESC LIMIT 2;",0 How many bids does Atlantic 10 have?,"CREATE TABLE table_name_98 (_number_of_bids VARCHAR, conference VARCHAR);","SELECT _number_of_bids FROM table_name_98 WHERE conference = ""atlantic 10"";","SELECT _number_of_bids FROM table_name_98 WHERE conference = ""atlantic 10"";",1 "On what date was the race in Melbourne, Victoria?","CREATE TABLE table_name_42 (date VARCHAR, city___state VARCHAR);","SELECT date FROM table_name_42 WHERE city___state = ""melbourne, victoria"";","SELECT date FROM table_name_42 WHERE city___state = ""melbourne, victoria"";",1 Find the number of unique accommodations provided per instructor in CA.,"CREATE TABLE Instructor_Accommodations (instructor_id INT, accommodation_id INT, cost FLOAT);","SELECT i.name, COUNT(DISTINCT ia.accommodation_id) as unique_accommodations_count FROM Instructors i JOIN Instructor_Accommodations ia ON i.id = ia.instructor_id WHERE i.state = 'CA' GROUP BY i.name;","SELECT instructor_id, COUNT(DISTINCT accommodation_id) as unique_accommodations FROM Instructor_Accommodations WHERE location = 'CA' GROUP BY instructor_id;",0 What is the total number of successful and failed launches for each agency?,"CREATE TABLE launch_results (agency VARCHAR(10), launch_outcome VARCHAR(10), year INT); ","SELECT agency, launch_outcome, COUNT(*) FROM launch_results GROUP BY agency, launch_outcome;","SELECT agency, SUM(launch_outcome) as total_launches, SUM(failed_launches) as total_failed_launches FROM launch_results GROUP BY agency;",0 What was the away team's score in the game against North Melbourne?,"CREATE TABLE table_name_35 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team AS score FROM table_name_35 WHERE home_team = ""north melbourne"";","SELECT away_team AS score FROM table_name_35 WHERE home_team = ""north melbourne"";",1 Find the names of artists who have not received any funding.,"CREATE TABLE artists (id INT, name VARCHAR(255)); CREATE TABLE funding (artist_id INT, source VARCHAR(255), amount FLOAT); ",SELECT name FROM artists WHERE id NOT IN (SELECT artist_id FROM funding);,SELECT artists.name FROM artists INNER JOIN funding ON artists.id = funding.artist_id WHERE funding.source IS NULL;,0 Which cultural heritage sites have more than 1000 reviews?,"CREATE TABLE attractions (id INT PRIMARY KEY, name VARCHAR(255), type VARCHAR(255), num_reviews INT);","SELECT name, type FROM attractions WHERE num_reviews > 1000 GROUP BY name, type HAVING COUNT(*) > 1;",SELECT name FROM attractions WHERE type = 'Cultural Heritage' AND num_reviews > 1000;,0 Who was the high rebounds of team @ Detroit?,"CREATE TABLE table_27721131_10 (high_rebounds VARCHAR, team VARCHAR);","SELECT high_rebounds FROM table_27721131_10 WHERE team = ""@ Detroit"";","SELECT high_rebounds FROM table_27721131_10 WHERE team = ""@ Detroit"";",1 What is Nick Price's score?,"CREATE TABLE table_name_20 (score VARCHAR, player VARCHAR);","SELECT score FROM table_name_20 WHERE player = ""nick price"";","SELECT score FROM table_name_20 WHERE player = ""nick price"";",1 What was the wicket ranking for the match featuring partners Mohammad Azharuddin and Ajay Jadeja and also a fielding team of Sri Lanka?,"CREATE TABLE table_name_93 (wicket VARCHAR, batting_partners VARCHAR, fielding_team VARCHAR);","SELECT wicket FROM table_name_93 WHERE batting_partners = ""mohammad azharuddin and ajay jadeja"" AND fielding_team = ""sri lanka"";","SELECT wicket FROM table_name_93 WHERE batting_partners = ""mohammad azharuddin and ajay jadeja"" AND fielding_team = ""sri lanka"";",1 How many patients with mental health disorders were seen by each community health worker?,"CREATE TABLE patients (patient_id INT, worker_id INT, mental_health_disorder BOOLEAN); ","SELECT worker_id, COUNT(*) as num_patients FROM patients WHERE mental_health_disorder = true GROUP BY worker_id;","SELECT worker_id, COUNT(*) FROM patients WHERE mental_health_disorder = TRUE GROUP BY worker_id;",0 Tell me the city of license with frequency of Mhz of 90.3 fm,"CREATE TABLE table_name_26 (city_of_license VARCHAR, frequency_mhz VARCHAR);","SELECT city_of_license FROM table_name_26 WHERE frequency_mhz = ""90.3 fm"";","SELECT city_of_license FROM table_name_26 WHERE frequency_mhz = ""90.3 fm"";",1 What round was Craig Erickson drafted?,"CREATE TABLE table_name_58 (round VARCHAR, player VARCHAR);","SELECT round FROM table_name_58 WHERE player = ""craig erickson"";","SELECT round FROM table_name_58 WHERE player = ""craig erickson"";",1 Find the total revenue and CO2 emissions for each garment category in 2022.,"CREATE TABLE sales (sale_id INT, product_category VARCHAR(255), sale_date DATE, revenue DECIMAL(10,2)); CREATE TABLE garment_manufacturing (garment_category VARCHAR(255), manufacturing_date DATE, co2_emissions INT);","SELECT sales.product_category, SUM(sales.revenue) as total_revenue, SUM(garment_manufacturing.co2_emissions) as total_co2_emissions FROM sales JOIN garment_manufacturing ON sales.product_category = garment_manufacturing.garment_category WHERE sales.sale_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY sales.product_category;","SELECT garment_category, SUM(revenue) as total_revenue, SUM(co2_emissions) as total_co2_emissions FROM sales JOIN garment_manufacturing ON sales.product_category = garment_manufacturing.garment_category WHERE YEAR(sale_date) = 2022 GROUP BY garment_category;",0 Count the number of unique programs held in 'LA'.,"CREATE TABLE programs (id INT, city TEXT, program TEXT); ",SELECT COUNT(DISTINCT program) FROM programs WHERE city = 'LA';,SELECT COUNT(DISTINCT program) FROM programs WHERE city = 'LA';,1 What is the total revenue of skincare products that are sustainably sourced?,"CREATE TABLE skincare_sales (product_name TEXT, price DECIMAL(5,2), is_sustainable BOOLEAN); ",SELECT SUM(price) FROM skincare_sales WHERE is_sustainable = true;,SELECT SUM(price) FROM skincare_sales WHERE is_sustainable = true;,1 Create a view named 'eastern_programs' showing programs in the eastern region,"CREATE TABLE programs( id INT PRIMARY KEY NOT NULL, program_name VARCHAR(50), location VARCHAR(50), budget DECIMAL(10, 2) ); ","CREATE VIEW eastern_programs AS SELECT * FROM programs WHERE location IN ('New York', 'Boston', 'Philadelphia');",CREATE VIEW eastern_programs AS SELECT * FROM programs WHERE location = 'Eastern';,0 List the top 5 chemical manufacturers based on their environmental impact assessment scores.,"CREATE TABLE manufacturers (id INT, name VARCHAR(255), eia_score FLOAT); ","SELECT name, eia_score FROM manufacturers ORDER BY eia_score DESC LIMIT 5","SELECT name, eia_score FROM manufacturers ORDER BY eia_score DESC LIMIT 5;",0 "Identify the number of articles published daily in 'Denver Post' and 'San Francisco Chronicle' for the month of July 2022, excluding weekends.","CREATE TABLE DP_Articles(id INT, title VARCHAR(50), publication DATE, category VARCHAR(20));CREATE TABLE SFC_Articles(id INT, title VARCHAR(50), publication DATE, category VARCHAR(20));","SELECT CASE WHEN DATEPART(dw, publication) IN (1,7) THEN 'Weekend' ELSE 'Weekday' END AS DayType, COUNT(*) FROM DP_Articles WHERE publication BETWEEN '2022-07-01' AND '2022-07-31' AND DATEPART(dw, publication) NOT IN (1,7) GROUP BY CASE WHEN DATEPART(dw, publication) IN (1,7) THEN 'Weekend' ELSE 'Weekday' END UNION ALL SELECT CASE WHEN DATEPART(dw, publication) IN (1,7) THEN 'Weekend' ELSE 'Weekday' END AS DayType, COUNT(*) FROM SFC_Articles WHERE publication BETWEEN '2022-07-01' AND '2022-07-31' AND DATEPART(dw, publication) NOT IN (1,7) GROUP BY CASE WHEN DATEPART(dw, publication) IN (1,7) THEN 'Weekend' ELSE 'Weekday' END;",SELECT COUNT(*) FROM DP_Articles WHERE publication BETWEEN '2022-07-01' AND '2022-07-31' AND publication BETWEEN '2022-07-01' AND '2022-07-31';,0 How many waste generation records are missing a year value?,"CREATE TABLE waste_generation (year INT, sector TEXT, amount INT); ",SELECT COUNT(*) FROM waste_generation WHERE year IS NULL;,SELECT COUNT(*) FROM waste_generation WHERE year IS NULL;,1 "What is the total number of disaster preparedness centers in coastal areas and the total number of training sessions conducted at these centers, broken down by training type?","CREATE TABLE disaster_preparedness_centers (id INT, center_name TEXT, location TEXT); CREATE TABLE training_sessions (id INT, center_id INT, training_type TEXT, session_count INT); ","SELECT c.location, training_type, SUM(session_count) AS total_sessions FROM disaster_preparedness_centers c JOIN training_sessions s ON c.id = s.center_id WHERE c.location = 'Coastal' GROUP BY c.location, training_type;","SELECT dpc.location, dpc.center_name, SUM(ts.session_count) as total_sessions FROM disaster_preparedness_centers dpc JOIN training_sessions ts ON dpc.id = ts.center_id WHERE dpc.location = 'Coastal' GROUP BY dpc.location, dpc.center_name;",0 What is the total number of heritage sites (tangible and intangible) in the Caribbean region?,"CREATE TABLE tangible_heritage (id INT, name VARCHAR(255), region VARCHAR(255)); CREATE TABLE intangible_heritage (id INT, name VARCHAR(255), region VARCHAR(255)); ","SELECT COUNT(*) FROM (SELECT 'tangible' as type, t.name FROM tangible_heritage t WHERE t.region = 'Caribbean' UNION ALL SELECT 'intangible' as type, i.name FROM intangible_heritage i WHERE i.region = 'Caribbean') AS h;",SELECT COUNT(*) FROM tangible_heritage INNER JOIN intangible_heritage ON tangible_heritage.region = intangible_heritage.region WHERE tangible_heritage.region = 'Caribbean';,0 What is the average citizen satisfaction score for public services in Tokyo in 2021?,"CREATE TABLE TokyoSatisfaction (service VARCHAR(30), score INT, year INT); ",SELECT AVG(score) FROM TokyoSatisfaction WHERE service = 'Public Services' AND year = 2021;,SELECT AVG(score) FROM TokyoSatisfaction WHERE service = 'Public' AND year = 2021;,0 What is the total number of artworks in the 'Artworks' table created by artists from Asia?,"CREATE TABLE Artworks (id INT, title VARCHAR(50), artist VARCHAR(50), date DATE, type VARCHAR(50)); ",SELECT COUNT(*) FROM Artworks WHERE artist LIKE 'Li%';,SELECT COUNT(*) FROM Artworks WHERE artist LIKE '%Asia%';,0 How many electric vehicle charging stations are there by city?,"CREATE TABLE charging_stations (station_id INT, city VARCHAR(50), is_ev_charging BOOLEAN);","SELECT city, COUNT(*) as num_stations FROM charging_stations WHERE is_ev_charging = true GROUP BY city;","SELECT city, COUNT(*) FROM charging_stations WHERE is_ev_charging = true GROUP BY city;",0 "What is the average number of comments on articles about education in the ""LA Times""?","CREATE TABLE ArticleComments (id INT, article_id INT, comment TEXT, newspaper VARCHAR(20)); CREATE TABLE EducationArticles (id INT, publication DATE, newspaper VARCHAR(20)); ALTER TABLE ArticleComments ADD COLUMN article_id INT REFERENCES EducationArticles (id); UPDATE ArticleComments SET article_id = e.id FROM ArticleComments c JOIN EducationArticles e ON c.publication = e.publication AND c.newspaper = e.newspaper;",SELECT AVG(COUNT(*)) FROM ArticleComments c1 JOIN ArticleComments c2 ON c1.article_id = c2.article_id GROUP BY c1.article_id HAVING c1.newspaper = 'LA Times' AND c1.publication BETWEEN '2022-01-01' AND '2022-01-31' AND c1.category = 'education';,SELECT AVG(COUNT(*)) FROM ArticleComments JOIN EducationArticles ON ArticleComments.article_id = EducationArticles.id WHERE EducationArticles.paper = 'LA Times';,0 David James Elliott directed which episode number within the series?,"CREATE TABLE table_228973_11 (no_in_series VARCHAR, directed_by VARCHAR);","SELECT no_in_series FROM table_228973_11 WHERE directed_by = ""David James Elliott"";","SELECT no_in_series FROM table_228973_11 WHERE directed_by = ""David James Elliott"";",1 What is the most common genre of TV shows in Canada?,"CREATE TABLE tv_shows (id INT, title VARCHAR(255), genre VARCHAR(50), location VARCHAR(50)); ","SELECT genre, COUNT(*) AS count FROM tv_shows WHERE location = 'Canada' GROUP BY genre ORDER BY count DESC LIMIT 1;","SELECT genre, COUNT(*) as count FROM tv_shows WHERE location = 'Canada' GROUP BY genre ORDER BY count DESC LIMIT 1;",0 Which opponent has a 26-12 record?,"CREATE TABLE table_name_44 (opponent VARCHAR, record VARCHAR);","SELECT opponent FROM table_name_44 WHERE record = ""26-12"";","SELECT opponent FROM table_name_44 WHERE record = ""26-12"";",1 Show the total budget allocated to each department in the city of Toronto for the year 2021,"CREATE TABLE toronto_departments (dept_id INT, dept_name VARCHAR(50), city VARCHAR(20), year INT, budget INT); ","SELECT dept_name, SUM(budget) FROM toronto_departments WHERE city = 'Toronto' AND year = 2021 GROUP BY dept_name;","SELECT dept_name, SUM(budget) FROM toronto_departments WHERE city = 'Toronto' AND year = 2021 GROUP BY dept_name;",1 What is the total revenue of cosmetics products that are vegan and were sold in Europe?,"CREATE TABLE sales_data (id INT, product VARCHAR(255), vegan BOOLEAN, region VARCHAR(255), revenue INT); ",SELECT SUM(revenue) FROM sales_data WHERE vegan = true AND region = 'Europe';,SELECT SUM(revenue) FROM sales_data WHERE vegan = true AND region = 'Europe';,1 "Which average Drawn has Points smaller than 14, and a Lost smaller than 4, and a Played larger than 9?","CREATE TABLE table_name_56 (drawn INTEGER, played VARCHAR, points VARCHAR, lost VARCHAR);",SELECT AVG(drawn) FROM table_name_56 WHERE points < 14 AND lost < 4 AND played > 9;,SELECT AVG(drawn) FROM table_name_56 WHERE points 14 AND lost 4 AND played > 9;,0 What is the maximum and minimum military innovation budget for South American countries in 2020?,"CREATE TABLE military_innovation_south_amer_2 (country VARCHAR(50), year INT, budget INT); ","SELECT country, MAX(budget) max_budget, MIN(budget) min_budget FROM military_innovation_south_amer_2 WHERE year = 2020 GROUP BY country;","SELECT country, MAX(budget) as max_budget, MIN(budget) as min_budget FROM military_innovation_south_amer_2 WHERE year = 2020 GROUP BY country;",0 What is the average ticket price for events in Paris and London?,"CREATE TABLE events (id INT, city VARCHAR(20), price DECIMAL(5,2)); ","SELECT AVG(price) FROM events WHERE city IN ('Paris', 'London');","SELECT AVG(price) FROM events WHERE city IN ('Paris', 'London');",1 What's Italy's rank?,"CREATE TABLE table_name_36 (rank INTEGER, country VARCHAR);","SELECT SUM(rank) FROM table_name_36 WHERE country = ""italy"";","SELECT SUM(rank) FROM table_name_36 WHERE country = ""italy"";",1 "What is the total number of smart contracts in the 'smart_contracts' table for each 'jurisdiction' in the 'regulations' table, ordered by the total number of smart contracts in descending order?","CREATE TABLE smart_contracts (smart_contract_id INT, name VARCHAR(255), version VARCHAR(255), jurisdiction VARCHAR(255), last_updated DATE); CREATE TABLE regulations (regulation_id INT, jurisdiction VARCHAR(255), subject VARCHAR(255), publication_date DATE, status VARCHAR(255));"," SELECT r.jurisdiction, COUNT(sc.smart_contract_id) as total_smart_contracts FROM smart_contracts sc JOIN regulations r ON sc.jurisdiction = r.jurisdiction GROUP BY r.jurisdiction ORDER BY total_smart_contracts DESC;","SELECT r.jurisdiction, COUNT(s.smart_contract_id) as total_smart_contracts FROM smart_contracts s JOIN regulations r ON s.jurisdiction = r.jurisdiction GROUP BY r.jurisdiction ORDER BY total_smart_contracts DESC;",0 "What is Date, when Winning Score is −14 (68-68-67-71=274)?","CREATE TABLE table_name_38 (date VARCHAR, winning_score VARCHAR);",SELECT date FROM table_name_38 WHERE winning_score = −14(68 - 68 - 67 - 71 = 274);,SELECT date FROM table_name_38 WHERE winning_score = 14(68 - 68 - 67 - 71 = 274);,0 Who was the opponent with the record of 4-0-0?,"CREATE TABLE table_name_46 (opponent VARCHAR, record VARCHAR);","SELECT opponent FROM table_name_46 WHERE record = ""4-0-0"";","SELECT opponent FROM table_name_46 WHERE record = ""4-0-0"";",1 Calculate the average grant amount awarded to each principal investigator,"CREATE TABLE PIs (PIID INT, PIName VARCHAR(50)); CREATE TABLE Grants (GrantID INT, PIID INT, GrantAmount DECIMAL(10,2)); ","SELECT p.PIName, AVG(g.GrantAmount) as AvgGrantAmount FROM PIs p JOIN Grants g ON p.PIID = g.PIID GROUP BY p.PIName;","SELECT PIs.PIName, AVG(Grants.GrantAmount) as AvgGrantAmount FROM PIs INNER JOIN Grants ON PIs.PIID = Grants.PIID GROUP BY PIs.PIName;",0 What is team 2 if Team 1 is Numancia?,"CREATE TABLE table_name_61 (team_2 VARCHAR, team_1 VARCHAR);","SELECT team_2 FROM table_name_61 WHERE team_1 = ""numancia"";","SELECT team_2 FROM table_name_61 WHERE team_1 = ""numancia"";",1 What is the average age of athletes in 'NBA' and 'NFL' wellbeing programs?,"CREATE TABLE Athletes (athlete_id INT, athlete_name VARCHAR(255), age INT, team VARCHAR(255)); CREATE VIEW WellbeingPrograms AS SELECT athlete_id, team FROM Programs WHERE program_type IN ('NBA', 'NFL');","SELECT AVG(Athletes.age) FROM Athletes INNER JOIN WellbeingPrograms ON Athletes.athlete_id = WellbeingPrograms.athlete_id WHERE Athletes.team IN ('NBA', 'NFL');","SELECT AVG(Athletes.age) FROM Athletes INNER JOIN WellbeingPrograms ON Athletes.athlete_id = WellbeingPrograms.athlete_id WHERE WellbeingPrograms.program_type IN ('NBA', 'NFL');",0 What is the total billing rate for attorneys in the Los Angeles office?,"CREATE TABLE attorneys (attorney_id INT, office_location VARCHAR(255), billing_rate DECIMAL(5,2)); ",SELECT SUM(billing_rate) FROM attorneys WHERE office_location = 'Los Angeles';,SELECT SUM(billing_rate) FROM attorneys WHERE office_location = 'Los Angeles';,1 What is the total number of Green_Infrastructure projects in 'City O' and 'City P'?,"CREATE TABLE Green_Infrastructure (id INT, project_name VARCHAR(50), location VARCHAR(50), cost FLOAT); ","SELECT COUNT(*) FROM Green_Infrastructure WHERE location IN ('City O', 'City P');","SELECT COUNT(*) FROM Green_Infrastructure WHERE location IN ('City O', 'City P');",1 What is the average network investment for each continent in the past 2 years?,"CREATE TABLE network_investments (investment_id INT, amount_usd FLOAT, investment_date DATE, continent VARCHAR(50)); ","SELECT continent, AVG(amount_usd) as avg_investment, EXTRACT(YEAR FROM investment_date) as investment_year FROM network_investments WHERE investment_date >= DATEADD(year, -2, CURRENT_DATE) GROUP BY continent, investment_year;","SELECT continent, AVG(amount_usd) as avg_investment FROM network_investments WHERE investment_date >= DATEADD(year, -2, GETDATE()) GROUP BY continent;",0 What is the average ESG score for companies in the healthcare sector in Q1 2021?,"CREATE TABLE if not exists companies (company_id INT, sector VARCHAR(50), esg_score DECIMAL(3,2), quarter INT, year INT); ",SELECT AVG(esg_score) FROM companies WHERE sector = 'Healthcare' AND quarter = 1 AND year = 2021;,SELECT AVG(esg_score) FROM companies WHERE sector = 'Healthcare' AND quarter = 1 AND year = 2021;,1 "What is the total number of goals for entries that have more than 7 draws, 8 wins, and more than 5 losses?","CREATE TABLE table_name_62 (goals_for VARCHAR, losses VARCHAR, draws VARCHAR, wins VARCHAR);",SELECT COUNT(goals_for) FROM table_name_62 WHERE draws > 7 AND wins > 8 AND losses > 5;,SELECT COUNT(goals_for) FROM table_name_62 WHERE draws > 7 AND wins = 8 AND losses > 5;,0 "Insert a new safety protocol record for a specific manufacturing plant, specifying its effective date and a description.","CREATE TABLE safety_protocols (id INT, plant_id INT, effective_date DATE, description VARCHAR(100)); ","INSERT INTO safety_protocols (id, plant_id, effective_date, description) VALUES (1, 1, '2022-03-01', 'Wear protective gear at all times');","INSERT INTO safety_protocols (id, plant_id, effective_date, description) VALUES (1, (SELECT plant_id FROM plants WHERE plant_id = 1);",0 What is the total number of episodes where jim sweeney was the 1st performer and steve steen was the 2nd performer?,"CREATE TABLE table_name_78 (episode VARCHAR, performer_1 VARCHAR, performer_2 VARCHAR);","SELECT COUNT(episode) FROM table_name_78 WHERE performer_1 = ""jim sweeney"" AND performer_2 = ""steve steen"";","SELECT COUNT(episode) FROM table_name_78 WHERE performer_1 = ""jim sweeney"" AND performer_2 = ""steve steen"";",1 What is the average AI ethics budget per organization in North America?,"CREATE TABLE org_ai_ethics_budget (org_name VARCHAR(255), budget NUMERIC(10,2)); ",SELECT AVG(budget) OVER (PARTITION BY CASE WHEN org_name LIKE 'North%' THEN 1 ELSE 0 END) as avg_budget FROM org_ai_ethics_budget;,SELECT AVG(budget) FROM org_ai_ethics_budget WHERE region = 'North America';,0 Show safety testing scores for vehicles manufactured in Japan,"CREATE TABLE safety_scores (id INT, vehicle VARCHAR(50), make VARCHAR(50), country VARCHAR(50), score INT); ",SELECT * FROM safety_scores WHERE country = 'Japan';,SELECT * FROM safety_scores WHERE country = 'Japan';,1 What is the total time spent on treadmill workouts by users aged 30-40?,"CREATE TABLE workouts (id INT, user_id INT, workout_type VARCHAR(20), duration INT); CREATE TABLE users (id INT, birthdate DATE); ",SELECT SUM(duration) as total_time FROM workouts JOIN users ON workouts.user_id = users.id WHERE users.birthdate BETWEEN '1980-01-01' AND '1990-12-31' AND workout_type = 'Treadmill';,SELECT SUM(duration) FROM workouts w JOIN users u ON w.user_id = u.id WHERE w.workout_type = 'Training' AND u.birthdate BETWEEN '2022-01-01' AND '2022-12-31';,0 "Calculate the average satisfaction score for public services in each state, excluding records with a satisfaction score of 0.","CREATE TABLE state_services (state VARCHAR(20), service_type VARCHAR(50), satisfaction_score INT); ","SELECT state, AVG(satisfaction_score) FROM state_services WHERE satisfaction_score > 0 GROUP BY state;","SELECT state, AVG(satisfaction_score) FROM state_services WHERE service_type = 'Public' GROUP BY state;",0 "What is the average top 10 score for 2 starts, winnings of $135,984 and an average finish more than 43?","CREATE TABLE table_name_68 (top_10 INTEGER, avg_finish VARCHAR, starts VARCHAR, winnings VARCHAR);","SELECT AVG(top_10) FROM table_name_68 WHERE starts = 2 AND winnings = ""$135,984"" AND avg_finish > 43;","SELECT AVG(top_10) FROM table_name_68 WHERE starts = 2 AND winnings = ""$135,984"" AND avg_finish > 43;",1 Who is the oldest athlete in the 'golf_players' table?,"CREATE TABLE golf_players (player_id INT, name VARCHAR(50), age INT); ","SELECT name, MAX(age) FROM golf_players;","SELECT name, age FROM golf_players ORDER BY age DESC LIMIT 1;",0 What is the total number of local businesses partnered with tourism initiatives in Canada?,"CREATE TABLE local_businesses (id INT, name TEXT, partnered_with_tourism BOOLEAN); ",SELECT COUNT(*) FROM local_businesses WHERE partnered_with_tourism = true AND country = 'Canada';,SELECT COUNT(*) FROM local_businesses WHERE partnered_with_tourism = TRUE;,0 Which renewable energy projects have a capacity greater than 150 MW?,"CREATE TABLE wind_farms (id INT, name TEXT, region TEXT, capacity_mw FLOAT); CREATE TABLE solar_power_plants (id INT, name TEXT, region TEXT, capacity_mw FLOAT); ","SELECT name, capacity_mw FROM wind_farms WHERE capacity_mw > 150 UNION ALL SELECT name, capacity_mw FROM solar_power_plants WHERE capacity_mw > 150;",SELECT w.name FROM wind_farms w INNER JOIN solar_power_plants sp ON w.region = sp.region WHERE w.capacity_mw > 150;,0 What is the maximum data usage for customers in 'Mumbai'?,"CREATE TABLE customer_data_india (customer_id INT, data_usage FLOAT, city VARCHAR(50)); ",SELECT MAX(data_usage) FROM customer_data_india WHERE city = 'Mumbai';,SELECT MAX(data_usage) FROM customer_data_india WHERE city = 'Mumbai';,1 The pink cytoplasm will have a nucleus of what color?,"CREATE TABLE table_13570_1 (nucleus VARCHAR, cytoplasm VARCHAR);","SELECT nucleus FROM table_13570_1 WHERE cytoplasm = ""Pink"";","SELECT nucleus FROM table_13570_1 WHERE cytoplasm = ""Pink"";",1 What is the total number of medical procedures and their respective categories in low-income areas of Mississippi?,"CREATE TABLE medical_procedures(id INT, name TEXT, location TEXT, category TEXT); ","SELECT COUNT(*) as procedure_count, category FROM medical_procedures WHERE location = 'Mississippi Low-Income' GROUP BY category;","SELECT COUNT(*), category FROM medical_procedures WHERE location LIKE '%Mississippi%' AND category LIKE '%low-income%';",0 What country has a 72-70-75-72=289 score?,"CREATE TABLE table_name_23 (country VARCHAR, score VARCHAR);",SELECT country FROM table_name_23 WHERE score = 72 - 70 - 75 - 72 = 289;,SELECT country FROM table_name_23 WHERE score = 72 - 70 - 75 - 72 = 289;,1 List all peacekeeping operations led by NATO in 2016.,"CREATE TABLE peacekeeping_operations (org_name VARCHAR(255), year INT, operation_name VARCHAR(255)); ",SELECT operation_name FROM peacekeeping_operations WHERE org_name = 'NATO' AND year = 2016;,SELECT * FROM peacekeeping_operations WHERE org_name = 'NATO' AND year = 2016;,0 What film was released in 1996?,"CREATE TABLE table_name_76 (film VARCHAR, year VARCHAR);",SELECT film FROM table_name_76 WHERE year = 1996;,SELECT film FROM table_name_76 WHERE year = 1996;,1 How many startups were founded by underrepresented minorities in the FinTech sector?,"CREATE TABLE startups (id INT, name TEXT, industry TEXT, founder_minority TEXT); ",SELECT COUNT(*) FROM startups WHERE founder_minority = 'Yes' AND industry = 'FinTech';,SELECT COUNT(*) FROM startups WHERE industry = 'FinTech' AND founder_minority = 'Underrepresented Minority';,0 What was the result(s) in the event 3 squatlift for the man from the United states with a result of 1 (42.66s) in the event 2 truck pull?,"CREATE TABLE table_24302700_2 (event_3_squat_lift VARCHAR, nationality VARCHAR, event_2_truck_pull VARCHAR);","SELECT event_3_squat_lift FROM table_24302700_2 WHERE nationality = ""United States"" AND event_2_truck_pull = ""1 (42.66s)"";","SELECT event_3_squat_lift FROM table_24302700_2 WHERE nationality = ""United States"" AND event_2_truck_pull = ""1 (42.66s)"";",1 "List defense contract negotiations with their start and end dates, ordered by negotiation_id.","CREATE SCHEMA IF NOT EXISTS contract_negotiations;CREATE TABLE IF NOT EXISTS contract_negotiations (negotiation_id INT, negotiation_start_date DATE, negotiation_end_date DATE);","SELECT negotiation_id, negotiation_start_date, negotiation_end_date FROM contract_negotiations ORDER BY negotiation_id;","SELECT negotiation_id, negotiation_start_date, negotiation_end_date FROM contract_negotiations GROUP BY negotiation_id ORDER BY negotiation_id;",0 What is the total quantity of gold and silver extracted by each location?,"CREATE TABLE geological_survey (location VARCHAR(255), mineral VARCHAR(255), quantity FLOAT, year INT); ","SELECT location, SUM(CASE WHEN mineral = 'Gold' THEN quantity ELSE 0 END) as total_gold, SUM(CASE WHEN mineral = 'Silver' THEN quantity ELSE 0 END) as total_silver FROM geological_survey GROUP BY location;","SELECT location, SUM(quantity) FROM geological_survey WHERE mineral IN ('gold','silver') GROUP BY location;",0 Which rd. took place at Hockenheimring?,"CREATE TABLE table_1137718_2 (rd INTEGER, location VARCHAR);","SELECT MIN(rd) FROM table_1137718_2 WHERE location = ""Hockenheimring"";","SELECT MAX(rd) FROM table_1137718_2 WHERE location = ""Hockenheimring"";",0 What is the total revenue generated by each mobile plan in the last quarter?,"CREATE TABLE mobile_plans (id INT, plan_name VARCHAR(50), num_subscribers INT, price FLOAT);","SELECT plan_name, SUM(price * num_subscribers) FROM mobile_plans JOIN mobile_subscribers ON mobile_plans.id = mobile_subscribers.plan_id WHERE mobile_subscribers.subscription_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH) GROUP BY plan_name;","SELECT plan_name, SUM(price) as total_revenue FROM mobile_plans WHERE num_subscribers > 0 GROUP BY plan_name;",0 How many vehicles of each type does the 'vehicles' table contain?,"CREATE TABLE vehicles (vehicle_id INT, vehicle_type VARCHAR(255));","SELECT vehicle_type, COUNT(*) as vehicle_count FROM vehicles GROUP BY vehicle_type;","SELECT vehicle_type, COUNT(*) FROM vehicles GROUP BY vehicle_type;",0 Name the number of swimsuit for israel,"CREATE TABLE table_11674683_2 (swimsuit VARCHAR, delegate VARCHAR);","SELECT COUNT(swimsuit) FROM table_11674683_2 WHERE delegate = ""Israel"";","SELECT COUNT(swimsuit) FROM table_11674683_2 WHERE delegate = ""Israel"";",1 "What is the lowest To par of gary player, with more than 145 total?","CREATE TABLE table_name_8 (to_par INTEGER, player VARCHAR, total VARCHAR);","SELECT MIN(to_par) FROM table_name_8 WHERE player = ""gary player"" AND total > 145;","SELECT MIN(to_par) FROM table_name_8 WHERE player = ""gary"" AND total > 145;",0 Which segment c's segment b is refrigerators?,"CREATE TABLE table_name_58 (segment_c VARCHAR, segment_b VARCHAR);","SELECT segment_c FROM table_name_58 WHERE segment_b = ""refrigerators"";","SELECT segment_c FROM table_name_58 WHERE segment_b = ""refrigerators"";",1 William Fadjo Cravens serves the fourth district of Arkansas.,"CREATE TABLE table_1342270_5 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_1342270_5 WHERE incumbent = ""William Fadjo Cravens"";","SELECT district FROM table_1342270_5 WHERE incumbent = ""William Fadjo Cravens"";",1 How many settlements are named ђурђин (croatian: đurđin)?,"CREATE TABLE table_2562572_26 (settlement VARCHAR, cyrillic_name_other_names VARCHAR);","SELECT COUNT(settlement) FROM table_2562572_26 WHERE cyrillic_name_other_names = ""Ђурђин (Croatian: Đurđin)"";","SELECT COUNT(settlement) FROM table_2562572_26 WHERE cyrillic_name_other_names = ""урин (croatian: urin)"";",0 "Which industries have the lowest average salary for union members, compared to non-union members?","CREATE TABLE workers (id INT, name TEXT, industry TEXT, union_member BOOLEAN, salary REAL); ","SELECT industry, AVG(salary) FROM workers WHERE union_member = true GROUP BY industry HAVING AVG(salary) < (SELECT AVG(salary) FROM workers WHERE union_member = false AND industry = workers.industry);","SELECT industry, AVG(salary) as avg_salary FROM workers WHERE union_member = true GROUP BY industry ORDER BY avg_salary DESC LIMIT 1;",0 Who replaced the previous manager of Altay?,"CREATE TABLE table_27091128_2 (replaced_by VARCHAR, team VARCHAR);","SELECT replaced_by FROM table_27091128_2 WHERE team = ""Altay"";","SELECT replaced_by FROM table_27091128_2 WHERE team = ""Altay"";",1 Who was the constructor in the location Monza?,"CREATE TABLE table_1140076_2 (constructor VARCHAR, location VARCHAR);","SELECT constructor FROM table_1140076_2 WHERE location = ""Monza"";","SELECT constructor FROM table_1140076_2 WHERE location = ""Monza"";",1 "What is the total amount of each chemical stored in the storage facilities, sorted by the quantity in descending order?","CREATE TABLE StorageFacilities (FacilityID INT, FacilityName TEXT, Chemical TEXT, Quantity DECIMAL(5,2)); ","SELECT Chemical, SUM(Quantity) AS TotalQuantity FROM StorageFacilities GROUP BY Chemical ORDER BY TotalQuantity DESC;","SELECT Chemical, SUM(Quantity) as TotalQuantity FROM StorageFacilities GROUP BY Chemical ORDER BY TotalQuantity DESC;",0 "List all farming tools in the 'agroecology' schema along with their corresponding categories, and calculate the average cost of tools in each category.","CREATE SCHEMA agroecology;CREATE TABLE tools (id INT, name VARCHAR(50), category VARCHAR(50), cost FLOAT);","SELECT category, AVG(cost) FROM agroecology.tools GROUP BY category;","SELECT name, category, AVG(cost) FROM agroecology.tools GROUP BY name, category;",0 What is the Notes of the Frequency with Format of talk radio?,"CREATE TABLE table_name_63 (notes VARCHAR, format VARCHAR);","SELECT notes FROM table_name_63 WHERE format = ""talk radio"";","SELECT notes FROM table_name_63 WHERE format = ""talk radio"";",1 What is the maximum number of workers for any construction labor statistics in the state of New York for the year 2020?,"CREATE TABLE labor_statistics (state TEXT, year INTEGER, workers INTEGER, hours_worked INTEGER);",SELECT MAX(workers) FROM labor_statistics WHERE state = 'New York' AND year = 2020;,SELECT MAX(workers) FROM labor_statistics WHERE state = 'New York' AND year = 2020;,1 What was the total military innovation funding in 2011?,"CREATE TABLE MilitaryInnovation (Year INT, Funding FLOAT); ",SELECT Funding FROM MilitaryInnovation WHERE Year = 2011;,SELECT SUM(Funding) FROM MilitaryInnovation WHERE Year = 2011;,0 What are the details of all sales and purchases?,"CREATE TABLE purchases (sales_details VARCHAR, purchase_details VARCHAR); CREATE TABLE sales (sales_details VARCHAR, purchase_details VARCHAR);",SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases;,SELECT T1.sales_details FROM sales AS T1 JOIN purchases AS T2 ON T1.purchase_details = T2.sales_details;,0 What is the NBA draft for ohio state?,"CREATE TABLE table_name_58 (nba_draft VARCHAR, college VARCHAR);","SELECT nba_draft FROM table_name_58 WHERE college = ""ohio state"";","SELECT nba_draft FROM table_name_58 WHERE college = ""ohio state"";",1 Show the energy efficiency (kWh/m2) of buildings in Tokyo,"CREATE TABLE building_efficiency (id INT, city VARCHAR(50), efficiency FLOAT); ",SELECT efficiency FROM building_efficiency WHERE city = 'Tokyo';,"SELECT city, efficiency FROM building_efficiency WHERE city = 'Tokyo';",0 What did the Dallara chassis with a 5 start in 2006 finish?,"CREATE TABLE table_name_91 (finish VARCHAR, year VARCHAR, chassis VARCHAR, start VARCHAR);","SELECT finish FROM table_name_91 WHERE chassis = ""dallara"" AND start = ""5"" AND year = 2006;","SELECT finish FROM table_name_91 WHERE chassis = ""dallara"" AND start = ""5"" AND year = 2006;",1 What was the host of the round in the Montagne Center in Texas?,"CREATE TABLE table_name_62 (host VARCHAR, state VARCHAR, venue VARCHAR);","SELECT host FROM table_name_62 WHERE state = ""texas"" AND venue = ""montagne center"";","SELECT host FROM table_name_62 WHERE state = ""texas"" AND venue = ""montagne center"";",1 What is the highest rank from the year greater than 2010 with 430 main span metres?,"CREATE TABLE table_name_69 (rank INTEGER, year_opened VARCHAR, main_span_metres VARCHAR);","SELECT MAX(rank) FROM table_name_69 WHERE year_opened > 2010 AND main_span_metres = ""430"";",SELECT MAX(rank) FROM table_name_69 WHERE year_opened > 2010 AND main_span_metres = 430;,0 Which network aired the program Schlag den Raab?,"CREATE TABLE table_name_70 (network VARCHAR, title VARCHAR);","SELECT network FROM table_name_70 WHERE title = ""schlag den raab"";","SELECT network FROM table_name_70 WHERE title = ""schlag den raab"";",1 "What is the total amount donated by each organization, for organizations with at least one donation above $1000?","CREATE TABLE donors (id INT, name TEXT, organization TEXT);CREATE TABLE donations (id INT, donor_id INT, amount DECIMAL(10,2)); ","SELECT donors.organization, SUM(donations.amount) FROM donors INNER JOIN donations ON donors.id = donations.donor_id WHERE donations.amount > 1000 GROUP BY donors.organization;","SELECT d.organization, SUM(d.amount) FROM donations d JOIN donors d ON d.id = d.donor_id GROUP BY d.organization HAVING COUNT(d.id) > 1000 GROUP BY d.organization;",0 What is the total salary cost of the 'Industry 4.0' department?,"CREATE TABLE Employees (EmployeeID INT, Name VARCHAR(50), Department VARCHAR(50), Salary FLOAT); ",SELECT SUM(Salary) FROM Employees WHERE Department = 'Industry 4.0';,SELECT SUM(Salary) FROM Employees WHERE Department = 'Industry 4.0';,1 What is the total billing amount for cases handled by attorneys in the 'New York' region who specialize in 'Personal Injury'?,"CREATE TABLE attorneys (id INT, name TEXT, region TEXT, specialty TEXT); CREATE TABLE cases (id INT, attorney_id INT, billing_amount INT); ",SELECT SUM(billing_amount) FROM cases INNER JOIN attorneys ON cases.attorney_id = attorneys.id WHERE attorneys.region = 'New York' AND attorneys.specialty = 'Personal Injury';,SELECT SUM(cases.billing_amount) FROM cases INNER JOIN attorneys ON cases.attorney_id = attorneys.id WHERE attorneys.region = 'New York' AND attorneys.specialty = 'Personal Injury';,0 Who directed the episode with a production code greater than 4301103.585233785 that was written by Curtis Kheel?,"CREATE TABLE table_21312845_1 (directed_by VARCHAR, production_code VARCHAR, written_by VARCHAR);","SELECT directed_by FROM table_21312845_1 WHERE production_code > 4301103.585233785 AND written_by = ""Curtis Kheel"";","SELECT directed_by FROM table_21312845_1 WHERE production_code > 4301103.585233785 AND written_by = ""Curtis Kheel"";",1 Determine the average number of students enrolled in courses offered by 'Columbia U' each season.,"CREATE TABLE course_enrollment (course_id INT, university VARCHAR(20), num_students INT); ",SELECT AVG(num_students) FROM course_enrollment WHERE university = 'Columbia U';,SELECT AVG(num_students) FROM course_enrollment WHERE university = 'Columbia U' GROUP BY season;,0 What is the total budget for AI projects in the 'americas' region in the 'ai_ethics' table?,"CREATE TABLE ai_ethics (region TEXT, project TEXT, budget INTEGER); ",SELECT SUM(budget) FROM ai_ethics WHERE region = 'Americas';,SELECT SUM(budget) FROM ai_ethics WHERE region = 'americas';,0 What year was the expansion in the city of San Juan?,"CREATE TABLE table_name_31 (year VARCHAR, city VARCHAR);","SELECT COUNT(year) FROM table_name_31 WHERE city = ""san juan"";","SELECT year FROM table_name_31 WHERE city = ""san juan"";",0 What is the total revenue of products that are part of a circular supply chain and are produced in a developed country?,"CREATE TABLE products (product_id INT, is_circular BOOLEAN, country VARCHAR(20), price INT, quantity INT); CREATE TABLE sales (product_id INT, revenue INT); ",SELECT SUM(sales.revenue) FROM sales INNER JOIN products ON sales.product_id = products.product_id WHERE products.is_circular = true AND products.country = 'Developed';,SELECT SUM(sales.revenue) FROM sales INNER JOIN products ON sales.product_id = products.product_id WHERE products.is_circular = true AND products.country = 'developed';,0 What is the team 2 for the match with a team 1 of Panathinaikos?,"CREATE TABLE table_name_34 (team_2 VARCHAR, team_1 VARCHAR);","SELECT team_2 FROM table_name_34 WHERE team_1 = ""panathinaikos"";","SELECT team_2 FROM table_name_34 WHERE team_1 = ""panathinaikos"";",1 Which DOB has a Surname of cresswell?,"CREATE TABLE table_name_40 (dob VARCHAR, surname VARCHAR);","SELECT dob FROM table_name_40 WHERE surname = ""cresswell"";","SELECT dob FROM table_name_40 WHERE surname = ""cresswell"";",1 Find dishes that contain both tomatoes and onions as ingredients.,"CREATE TABLE ingredients (id INT, name VARCHAR(255)); CREATE TABLE dish_ingredients (dish_id INT, ingredient_id INT); ","SELECT dish_ingredients.dish_id FROM dish_ingredients INNER JOIN ingredients ON dish_ingredients.ingredient_id = ingredients.id WHERE ingredients.name IN ('Tomatoes', 'Onions') GROUP BY dish_ingredients.dish_id HAVING COUNT(DISTINCT ingredients.name) = 2;","SELECT dish_ingredients.dish_id, dish_ingredients.ingredient_id FROM dish_ingredients INNER JOIN ingredients ON dish_ingredients.ingredient_id = ingredients.id WHERE ingredients.name IN ('Tomattox', 'Onions');",0 What is the average heart rate for each member during 'Yoga' workouts in January 2022?,"CREATE TABLE memberships (id INT, member_type VARCHAR(50), region VARCHAR(50)); CREATE TABLE workout_data (member_id INT, workout_type VARCHAR(50), duration INT, heart_rate_avg INT, calories_burned INT, workout_date DATE);","SELECT m.id, AVG(w.heart_rate_avg) as avg_heart_rate FROM memberships m JOIN workout_data w ON m.id = w.member_id WHERE w.workout_type = 'Yoga' AND w.workout_date >= DATE '2022-01-01' AND w.workout_date < DATE '2022-02-01' GROUP BY m.id;","SELECT m.member_type, AVG(w.heart_rate_avg) as avg_heart_rate FROM memberships m JOIN workout_data w ON m.id = w.member_id WHERE w.workout_type = 'Yoga' AND w.workout_date BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY m.member_type;",0 What rank did the United States swimmer come in who posted 11.26 seconds in the 100-meter youth female division?,"CREATE TABLE table_name_71 (rank VARCHAR, fastest_time__s_ VARCHAR, nation VARCHAR);","SELECT COUNT(rank) FROM table_name_71 WHERE fastest_time__s_ = ""11.26"" AND nation = ""united states"";","SELECT rank FROM table_name_71 WHERE fastest_time__s_ = ""11.26"" AND nation = ""united states"";",0 "What is the total number of military innovation projects per country, ordered by the total count in descending order?","CREATE TABLE military_innovation (id INT, country VARCHAR(255), project VARCHAR(255)); ","SELECT country, COUNT(project) AS total_projects FROM military_innovation GROUP BY country ORDER BY total_projects DESC;","SELECT country, COUNT(*) as total_projects FROM military_innovation GROUP BY country ORDER BY total_projects DESC;",0 How many users have a body fat percentage less than 15% and weigh more than 200 pounds?,"CREATE TABLE Members (id INT, gender VARCHAR(10), membershipLength INT, joinDate DATE); CREATE TABLE BodyMetrics (id INT, memberId INT, bodyFatPercentage DECIMAL(3,2), weight DECIMAL(5,2)); ",SELECT COUNT(*) FROM BodyMetrics JOIN Members ON BodyMetrics.memberId = Members.id WHERE bodyFatPercentage < 0.15 AND weight > 200.0;,SELECT COUNT(DISTINCT Members.id) FROM Members INNER JOIN BodyMetrics ON Members.id = BodyMetrics.memberId WHERE BodyMetrics.bodyFatPercentage 15 AND BodyMetrics.weight > 200;,0 Remove the marine research project in the Indian Ocean,"CREATE TABLE marine_research_projects (id INT PRIMARY KEY, project_name VARCHAR(255), region VARCHAR(255)); ",DELETE FROM marine_research_projects WHERE region = 'Indian Ocean';,DELETE FROM marine_research_projects WHERE region = 'Indian Ocean';,1 How many hotels in each country have adopted AI-powered chatbots for customer support?,"CREATE TABLE hotels (hotel_id INT, hotel_name TEXT, country TEXT);CREATE TABLE ai_chatbots (chatbot_id INT, hotel_id INT, installation_date DATE); ","SELECT h.country, COUNT(DISTINCT h.hotel_id) as hotel_count FROM hotels h INNER JOIN ai_chatbots ac ON h.hotel_id = ac.hotel_id GROUP BY h.country;","SELECT h.country, COUNT(*) FROM hotels h JOIN ai_chatbots ac ON h.hotel_id = ac.hotel_id GROUP BY h.country;",0 What country has OF-1 Locotenent?,"CREATE TABLE table_name_1 (country VARCHAR, of_1 VARCHAR);","SELECT country FROM table_name_1 WHERE of_1 = ""locotenent"";","SELECT country FROM table_name_1 WHERE of_1 = ""locotenent"";",1 How many marine species are present in each ocean basin?,"CREATE TABLE marine_species (id INT, species_name TEXT, ocean_basin TEXT);","SELECT species_name, ocean_basin, COUNT(*) FROM marine_species GROUP BY ocean_basin;","SELECT ocean_basin, COUNT(*) FROM marine_species GROUP BY ocean_basin;",0 What is the Place of the Player with a Score of 73-75-71-73=292?,"CREATE TABLE table_name_32 (place VARCHAR, score VARCHAR);",SELECT place FROM table_name_32 WHERE score = 73 - 75 - 71 - 73 = 292;,SELECT place FROM table_name_32 WHERE score = 73 - 75 - 71 - 73 = 292;,1 "Which Height Metres / feet has a Rank of 8, and Floors of 3x17?","CREATE TABLE table_name_18 (height_metres___feet VARCHAR, rank VARCHAR, floors VARCHAR);","SELECT height_metres___feet FROM table_name_18 WHERE rank = 8 AND floors = ""3x17"";","SELECT height_metres___feet FROM table_name_18 WHERE rank = ""8"" AND floors = ""3x17"";",0 What is the date of game 3 with Boston as the road team?,"CREATE TABLE table_name_56 (date VARCHAR, road_team VARCHAR, game VARCHAR);","SELECT date FROM table_name_56 WHERE road_team = ""boston"" AND game = ""game 3"";","SELECT date FROM table_name_56 WHERE road_team = ""boston"" AND game = 3;",0 Where was the game played on 20 may?,"CREATE TABLE table_name_19 (venue VARCHAR, date VARCHAR);","SELECT venue FROM table_name_19 WHERE date = ""20 may"";","SELECT venue FROM table_name_19 WHERE date = ""20 may"";",1 List all restorative justice programs in the Middle East and their completion rates.,"CREATE TABLE programs (program_id INT, program_name VARCHAR(50), country VARCHAR(20), completion_rate DECIMAL(5,2)); ","SELECT program_name, country, completion_rate FROM programs WHERE country LIKE 'Middle East%';","SELECT program_name, completion_rate FROM programs WHERE country LIKE 'Middle East%';",0 How many public parks are there in urban areas with a population greater than 500000?,"CREATE TABLE Parks (Location VARCHAR(25), Type VARCHAR(25), Population INT); ",SELECT COUNT(*) FROM Parks WHERE Type = 'Urban' AND Population > 500000;,SELECT COUNT(*) FROM Parks WHERE Location = 'Urban' AND Population > 500000;,0 What is the total salary cost for the Industry 4.0 department?,"CREATE TABLE Departments (id INT, name VARCHAR(50), budget DECIMAL(10,2));",SELECT SUM(d.budget) FROM Departments d JOIN Employees e ON d.name = e.department WHERE d.name = 'Industry 4.0';,SELECT SUM(budget) FROM Departments WHERE name = 'Industry 4.0';,0 I want to know the total number of national university of ireland with agricultural panel of 0 and labour panel more than 0,"CREATE TABLE table_name_34 (national_university_of_ireland VARCHAR, agricultural_panel VARCHAR, labour_panel VARCHAR);",SELECT COUNT(national_university_of_ireland) FROM table_name_34 WHERE agricultural_panel = 0 AND labour_panel > 0;,SELECT COUNT(national_university_of_ireland) FROM table_name_34 WHERE agricultural_panel = 0 AND labour_panel > 0;,1 "How many freedom of information requests were submitted in the UK in the last 12 months, broken down by government department?","CREATE TABLE countries (id INT, name VARCHAR(255)); CREATE TABLE departments (id INT, country_id INT, name VARCHAR(255)); CREATE TABLE requests (id INT, department_id INT, date DATE); ","SELECT departments.name, COUNT(requests.id) AS num_requests FROM requests INNER JOIN departments ON requests.department_id = departments.id WHERE requests.date >= DATE_SUB(CURRENT_DATE, INTERVAL 12 MONTH) GROUP BY departments.name;","SELECT d.name, COUNT(r.id) as num_requests FROM requests r JOIN departments d ON r.department_id = d.id JOIN countries c ON d.country_id = c.id WHERE c.name = 'UK' AND r.date >= DATEADD(month, -12, GETDATE()) GROUP BY d.name;",0 How many companies are present in each sector?,"CREATE TABLE companies_extended (company_id INT, sector VARCHAR(20)); ","SELECT sector, COUNT(*) FROM companies_extended GROUP BY sector;","SELECT sector, COUNT(*) FROM companies_extended GROUP BY sector;",1 what is the location where the record is 1-0,"CREATE TABLE table_26173058_2 (ahli VARCHAR, ramtha VARCHAR);","SELECT ahli FROM table_26173058_2 WHERE ramtha = ""1-0"";","SELECT ahli FROM table_26173058_2 WHERE ramtha = ""1-0"";",1 List the union membership statistics for unions in the 'north_region' that have more than 3000 members?,"CREATE TABLE union_stats (union_name TEXT, region TEXT, members INTEGER); ","SELECT union_name, members FROM union_stats WHERE region = 'north_region' AND members > 3000;","SELECT union_name, members FROM union_stats WHERE region = 'north_region' AND members > 3000;",1 "What is the Score of the match on May 21, 1984 with Outcome of runner-up?","CREATE TABLE table_name_94 (score VARCHAR, outcome VARCHAR, date VARCHAR);","SELECT score FROM table_name_94 WHERE outcome = ""runner-up"" AND date = ""may 21, 1984"";","SELECT score FROM table_name_94 WHERE outcome = ""runner-up"" AND date = ""may 21, 1984"";",1 What are the top digital wallets in the Latin American market?,"CREATE TABLE wallets (wallet_id INT, name VARCHAR(100), market VARCHAR(50)); ",SELECT name FROM wallets WHERE market = 'Latin America';,"SELECT wallet_id, name FROM wallets WHERE market = 'Latin America' ORDER BY name DESC LIMIT 1;",0 Add a record to 'mitigation_projects' table,"CREATE TABLE mitigation_projects (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), budget FLOAT, start_date DATE, end_date DATE); ","INSERT INTO mitigation_projects (id, name, location, budget, start_date, end_date) VALUES (2, 'Wind Turbines', 'Rio de Janeiro, Brazil', 1500000, '2022-05-15', '2024-04-30');","INSERT INTO mitigation_projects (id, name, location, budget, start_date, end_date) VALUES (1, 'Mitigation Projects', 'New York', '2022-03-01', '2022-03-31'), (2, 'Mitigation Projects', 'New York', '2022-03-31', '2022-03-31'), (3, 'Mitigation Projects', '2022-03-31', '2022-03-31');",0 What is the average response time for the three types of incidents with the shortest average response time?,"CREATE TABLE EmergencyResponse (Id INT, Incident VARCHAR(20), ResponseTime INT, City VARCHAR(20), State VARCHAR(20)); CREATE VIEW EmergencyResponseView AS SELECT Incident, ResponseTime, ROW_NUMBER() OVER (PARTITION BY Incident ORDER BY ResponseTime) as Rank FROM EmergencyResponse;","SELECT e.Incident, AVG(e.ResponseTime) as AvgResponseTime FROM EmergencyResponseView e WHERE e.Rank <= 3 GROUP BY e.Incident;","SELECT Incident, AVG(ResponseTime) as AvgResponseTime FROM EmergencyResponseView GROUP BY Incident ORDER BY AvgResponseTime DESC LIMIT 3;",0 What is the total biomass of all seals in the 'seals' table?,"CREATE TABLE seals (id INT, name VARCHAR(255), biomass FLOAT);",SELECT SUM(biomass) FROM seals;,SELECT SUM(biomass) FROM seals;,1 Who has a place of T7 and is from the United States?,"CREATE TABLE table_name_90 (player VARCHAR, place VARCHAR, country VARCHAR);","SELECT player FROM table_name_90 WHERE place = ""t7"" AND country = ""united states"";","SELECT player FROM table_name_90 WHERE place = ""t7"" AND country = ""united states"";",1 What is the release date of the song with the longest duration?,"CREATE TABLE songs (song_id INT, release_date DATE, song_length FLOAT); ",SELECT release_date FROM songs WHERE song_length = (SELECT MAX(song_length) FROM songs);,SELECT release_date FROM songs ORDER BY song_length DESC LIMIT 1;,0 Update the CVSS score for a specific system to 8.3 if it was previously 7.5.,"CREATE TABLE systems (system_id INT, system_name VARCHAR(255), cvss_score DECIMAL(3,2), last_updated TIMESTAMP);",UPDATE systems SET cvss_score = 8.3 WHERE system_name = 'example_system' AND cvss_score = 7.5;,UPDATE systems SET cvss_score = 8.3 WHERE system_id = 7.5;,0 In which district is the incumbent Carl W. Rich?,"CREATE TABLE table_1341865_37 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_1341865_37 WHERE incumbent = ""Carl W. Rich"";","SELECT district FROM table_1341865_37 WHERE incumbent = ""Carl W. Rich"";",1 What Date has the Region Europe and a Catalog of 74321 45851 2?,"CREATE TABLE table_name_33 (date VARCHAR, region VARCHAR, catalog VARCHAR);","SELECT date FROM table_name_33 WHERE region = ""europe"" AND catalog = ""74321 45851 2"";","SELECT date FROM table_name_33 WHERE region = ""europe"" AND catalog = ""734321 45851 2"";",0 What day did they play on week 4?,"CREATE TABLE table_name_56 (date VARCHAR, week VARCHAR);",SELECT date FROM table_name_56 WHERE week = 4;,SELECT date FROM table_name_56 WHERE week = 4;,1 What is the total assets under management (AUM) for each investment strategy?,"CREATE TABLE investment_strategies (strategy_id INT, strategy_name VARCHAR(50), AUM DECIMAL(10, 2)); ","SELECT strategy_name, SUM(AUM) FROM investment_strategies GROUP BY strategy_name;","SELECT strategy_name, SUM(AUM) FROM investment_strategies GROUP BY strategy_name;",1 What is the name of the union with the most members?,"CREATE TABLE union_membership (id INT, union VARCHAR(20), member_count INT); ",SELECT union FROM union_membership WHERE member_count = (SELECT MAX(member_count) FROM union_membership);,SELECT union FROM union_membership ORDER BY member_count DESC LIMIT 1;,0 What is Gareth Morgan's Secondary Military Specialty?,"CREATE TABLE table_name_21 (secondary_military_speciality VARCHAR, real_name VARCHAR);","SELECT secondary_military_speciality FROM table_name_21 WHERE real_name = ""gareth morgan"";","SELECT secondary_military_speciality FROM table_name_21 WHERE real_name = ""gareth morgan"";",1 What was the total expenditure on community development initiatives in Pakistan in Q1 2021?,"CREATE TABLE community_initiatives (id INT, initiative_id INT, country VARCHAR(50), initiative VARCHAR(50), expenditure DECIMAL(10,2), start_date DATE, end_date DATE); ",SELECT SUM(expenditure) FROM community_initiatives WHERE country = 'Pakistan' AND start_date >= '2021-01-01' AND end_date <= '2021-03-31';,SELECT SUM(expenditure) FROM community_initiatives WHERE country = 'Pakistan' AND start_date BETWEEN '2021-01-01' AND '2021-03-31';,0 Which 2008 has an Airport of julius nyerere international airport?,CREATE TABLE table_name_74 (airport VARCHAR);,"SELECT AVG(2008) FROM table_name_74 WHERE airport = ""julius nyerere international airport"";","SELECT 2008 FROM table_name_74 WHERE airport = ""julius nyerere international airport"";",0 What climate mitigation projects have been funded by the private sector?,"CREATE TABLE climate_projects (id INT PRIMARY KEY, title VARCHAR(255), description TEXT, start_date DATE, end_date DATE, funding_source VARCHAR(255)); ",SELECT * FROM climate_projects WHERE funding_source = 'Private Investment';,SELECT title FROM climate_projects WHERE funding_source = 'Private';,0 Add a new record to the 'Trend' table for the 'Animal Print' trend,"CREATE TABLE Trend (id INT PRIMARY KEY, name VARCHAR(50), popularity_score INT);","INSERT INTO Trend (id, name, popularity_score) VALUES (20, 'Animal Print', 90);","INSERT INTO Trend (id, name, popularity_score) VALUES (1, 'Animal Print', 'Animal Print');",0 What is the average accommodation cost per student by disability type in California?,"CREATE TABLE Accommodations (StudentID INT, DisabilityType TEXT, AccommodationCost DECIMAL); ","SELECT DisabilityType, AVG(AccommodationCost) as AvgCost FROM Accommodations WHERE State='California' GROUP BY DisabilityType;","SELECT DisabilityType, AVG(AccommodationCost) FROM Accommodations WHERE State = 'California' GROUP BY DisabilityType;",0 What is the sum of a grid for driver Patrick Carpentier and less than 103 laps?,"CREATE TABLE table_name_58 (grid INTEGER, driver VARCHAR, laps VARCHAR);","SELECT SUM(grid) FROM table_name_58 WHERE driver = ""patrick carpentier"" AND laps < 103;","SELECT SUM(grid) FROM table_name_58 WHERE driver = ""patrick carpentier"" AND laps 103;",0 Determine the percentage of total sales revenue generated by strains with 'OG' in their name in Colorado dispensaries during Q4 2021.,"CREATE TABLE strains (id INT, name TEXT, type TEXT); CREATE TABLE sales (id INT, strain_id INT, retail_price DECIMAL, sale_date DATE, state TEXT); ",SELECT 100.0 * SUM(retail_price) / (SELECT SUM(retail_price) FROM sales WHERE state = 'Colorado' AND sale_date >= '2021-10-01' AND sale_date < '2022-01-01') FROM sales INNER JOIN strains ON sales.strain_id = strains.id WHERE state = 'Colorado' AND sale_date >= '2021-10-01' AND sale_date < '2022-01-01' AND strains.name LIKE '%OG%';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM sales WHERE strain_id = sales.strain_id AND sale_date BETWEEN '2021-04-01' AND '2021-06-30')) AS percentage FROM sales INNER JOIN strains ON sales.strain_id = strains.id WHERE strains.type = 'OG' AND sales.state = 'Colorado' AND sales.sale_date BETWEEN '2021-06-30' AND '2021-06-30';,0 What is the average ethical labor compliance score for suppliers from the Philippines?,"CREATE TABLE suppliers (supplier_id INT PRIMARY KEY, country VARCHAR(255)); CREATE TABLE ethical_labor_practices (supplier_id INT, wage_compliance FLOAT, worker_safety FLOAT); ",SELECT AVG(elp.wage_compliance + elp.worker_safety) as avg_compliance FROM ethical_labor_practices elp INNER JOIN suppliers s ON elp.supplier_id = s.supplier_id WHERE s.country = 'Philippines';,SELECT AVG(elp.wage_compliance) FROM ethical_labor_practices elp JOIN suppliers s ON elp.supplier_id = s.supplier_id WHERE s.country = 'Philippines';,0 How many times is the incoming head coach abdollah veysi?,"CREATE TABLE table_27383390_4 (team VARCHAR, incoming_head_coach VARCHAR);","SELECT COUNT(team) FROM table_27383390_4 WHERE incoming_head_coach = ""Abdollah Veysi"";","SELECT COUNT(team) FROM table_27383390_4 WHERE incoming_head_coach = ""Abdollah Veysi"";",1 "List policy numbers, claim amounts, and claim dates for claims that were processed between '2020-01-01' and '2020-12-31'","CREATE TABLE claims (claim_id INT, policy_number INT, claim_amount DECIMAL(10,2), claim_date DATE);","SELECT policy_number, claim_amount, claim_date FROM claims WHERE claim_date BETWEEN '2020-01-01' AND '2020-12-31';","SELECT policy_number, claim_amount, claim_date FROM claims WHERE claim_date BETWEEN '2020-01-01' AND '2020-12-31';",1 Who are the top three employees with the highest salaries in the Engineering department?,"CREATE TABLE Employees (EmployeeID INT, FirstName VARCHAR(50), LastName VARCHAR(50), Department VARCHAR(50), Salary DECIMAL(10,2)); ","SELECT EmployeeID, FirstName, LastName, Department, Salary, RANK() OVER (PARTITION BY Department ORDER BY Salary DESC) AS Rank FROM Employees WHERE Department = 'Engineering';","SELECT FirstName, LastName, Salary FROM Employees WHERE Department = 'Engineering' ORDER BY Salary DESC LIMIT 3;",0 What numbr on the list had a peak rating of 42?,"CREATE TABLE table_11926114_1 (rank INTEGER, peak VARCHAR);",SELECT MIN(rank) FROM table_11926114_1 WHERE peak = 42;,SELECT MAX(rank) FROM table_11926114_1 WHERE peak = 42;,0 How many research stations are in each region without any species?,"CREATE TABLE ResearchStations (id INT PRIMARY KEY, name VARCHAR(100), location VARCHAR(100), region VARCHAR(50)); ","SELECT ResearchStations.region, COUNT(DISTINCT ResearchStations.name) FROM ResearchStations LEFT JOIN Species ON ResearchStations.region = Species.region WHERE Species.id IS NULL GROUP BY ResearchStations.region;","SELECT region, COUNT(*) FROM ResearchStations GROUP BY region;",0 What is the Gender of students at a school with a Decile of 5 and a Roll of 90?,"CREATE TABLE table_name_86 (gender VARCHAR, decile VARCHAR, roll VARCHAR);",SELECT gender FROM table_name_86 WHERE decile = 5 AND roll = 90;,SELECT gender FROM table_name_86 WHERE decile = 5 AND roll = 90;,1 What is the average number of days to resolve security incidents in the Pacific Islands for the current year?,"CREATE TABLE incident_resolution (id INT, resolution_days INT, region VARCHAR(255), resolution_date DATE); ","SELECT AVG(resolution_days) AS avg_resolution_days FROM incident_resolution WHERE region = 'Pacific Islands' AND resolution_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT AVG(resolution_days) FROM incident_resolution WHERE region = 'Pacific Islands' AND resolution_date >= DATEADD(year, -1, GETDATE());",0 Find the number of distinct health equity metrics in each state.,"CREATE TABLE health_equity_metrics (id INT, metric TEXT, state TEXT); ","SELECT state, COUNT(DISTINCT metric) as num_metrics FROM health_equity_metrics GROUP BY state;","SELECT state, COUNT(DISTINCT metric) FROM health_equity_metrics GROUP BY state;",0 What is the total score earned by players from Europe?,"CREATE TABLE Players (PlayerID int, PlayerName varchar(50), Country varchar(50)); CREATE TABLE PlayerScores (PlayerID int, GameID int, Score int); ",SELECT SUM(Score) FROM PlayerScores INNER JOIN Players ON PlayerScores.PlayerID = Players.PlayerID WHERE Players.Country LIKE 'Europe%';,SELECT SUM(Score) FROM PlayerScores INNER JOIN Players ON PlayerScores.PlayerID = Players.PlayerID WHERE Players.Country = 'Europe';,0 What is the total weight of sustainable seafood used in the last month?,"CREATE TABLE Inventory (id INT, item_name VARCHAR(255), item_type VARCHAR(255), quantity INT, sustainable BOOLEAN, purchase_date DATE); ","SELECT SUM(quantity) FROM Inventory WHERE item_type = 'Seafood' AND sustainable = true AND purchase_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 1 MONTH) AND CURDATE();","SELECT SUM(quantity) FROM Inventory WHERE sustainable = true AND purchase_date >= DATEADD(month, -1, GETDATE());",0 What is the minimum year of construction for vessels that have reported incidents of illegal fishing activities in the Arctic Ocean?,"CREATE TABLE vessels (id INT, name VARCHAR(255), year_built INT, incidents INT, region VARCHAR(255)); ",SELECT MIN(year_built) FROM vessels WHERE region = 'Arctic' AND incidents > 0;,SELECT MIN(year_built) FROM vessels WHERE incidents = 'illegal fishing activities' AND region = 'Arctic Ocean';,0 What is the distribution of media content genres?,"CREATE TABLE genres (content_id INTEGER, genre VARCHAR(100)); ","SELECT genre, COUNT(*) FROM genres GROUP BY genre;","SELECT genre, COUNT(*) FROM genres GROUP BY genre;",1 What is the total number for a total when the nation is netherlands and silver is larger than 0?,"CREATE TABLE table_name_12 (total VARCHAR, nation VARCHAR, silver VARCHAR);","SELECT COUNT(total) FROM table_name_12 WHERE nation = ""netherlands"" AND silver > 0;","SELECT COUNT(total) FROM table_name_12 WHERE nation = ""netherlands"" AND silver > 0;",1 "What is Downstream, when Upstream is ""384 kbit""?","CREATE TABLE table_name_88 (downstream VARCHAR, upstream VARCHAR);","SELECT downstream FROM table_name_88 WHERE upstream = ""384 kbit"";","SELECT downstream FROM table_name_88 WHERE upstream = ""384 kbit"";",1 "Which city has the most addresses? List the city name, number of addresses, and city id.","CREATE TABLE address (city_id VARCHAR); CREATE TABLE city (city VARCHAR, city_id VARCHAR);","SELECT T2.city, COUNT(*), T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY COUNT(*) DESC LIMIT 1;","SELECT T1.city, COUNT(*) as num_addresses FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city ORDER BY num_addresses DESC LIMIT 1;",0 Find the number of streams and revenue for songs by the top 3 artists in Japan.,"CREATE TABLE Streams (song_id INT, artist VARCHAR(50), country VARCHAR(50), streams INT, revenue FLOAT);","SELECT artist, SUM(streams), SUM(revenue) FROM Streams WHERE country = 'Japan' GROUP BY artist ORDER BY SUM(streams) DESC LIMIT 3;","SELECT artist, SUM(streams) as total_streams, SUM(revenue) as total_revenue FROM Streams WHERE country = 'Japan' GROUP BY artist ORDER BY total_revenue DESC LIMIT 3;",0 Determine the number of safety incidents per vessel,"VESSEL(vessel_id, safety_record_id); SAFETY_INCIDENT(safety_record_id, incident_type)","SELECT v.vessel_id, COUNT(si.safety_record_id) AS num_of_incidents FROM VESSEL v JOIN SAFETY_INCIDENT si ON v.safety_record_id = si.safety_record_id GROUP BY v.vessel_id;","SELECT vessel_id, COUNT(*) as incident_count FROM SAFETY_INCIDENT WHERE safety_record_id = 1 GROUP BY vessel_id;",0 "What is the average daily carbon price in Ontario between January 1 and January 5, 2023?","CREATE TABLE carbon_prices (id INT PRIMARY KEY, date DATE, region VARCHAR, price FLOAT); ","SELECT c.region, AVG(c.price) as avg_region_price FROM carbon_prices c WHERE c.region = 'Ontario' AND c.date BETWEEN '2023-01-01' AND '2023-01-05' GROUP BY c.region;",SELECT AVG(price) FROM carbon_prices WHERE date BETWEEN '2023-01-01' AND '2023-01-35' AND region = 'Ontario';,0 What is the ranking of BNP Paribas?,"CREATE TABLE table_1682026_3 (rank INTEGER, company VARCHAR);","SELECT MIN(rank) FROM table_1682026_3 WHERE company = ""BNP Paribas"";","SELECT MAX(rank) FROM table_1682026_3 WHERE company = ""BPP Paribas"";",0 Who was Fourth in the 2008 Telstra Men's Pro Event?,"CREATE TABLE table_name_93 (fourth VARCHAR, event VARCHAR);","SELECT fourth FROM table_name_93 WHERE event = ""2008 telstra men's pro"";","SELECT fourth FROM table_name_93 WHERE event = ""2008 telstra men's pro"";",1 How many satellites were deployed per year by each country?,"CREATE SCHEMA if not exists aerospace;CREATE TABLE if not exists aerospace.satellites (id INT PRIMARY KEY, country VARCHAR(50), name VARCHAR(50), launch_date DATE); ","SELECT EXTRACT(YEAR FROM launch_date) as launch_year, country, COUNT(*) as total_satellites FROM aerospace.satellites GROUP BY launch_year, country;","SELECT country, DATE_FORMAT(launch_date, '%Y-%m') as year, COUNT(*) as num_satellites FROM aerospace.satellites GROUP BY country, year;",0 What's the Period with # found of 5?,"CREATE TABLE table_name_81 (period VARCHAR, _number_found VARCHAR);","SELECT period FROM table_name_81 WHERE _number_found = ""5"";","SELECT period FROM table_name_81 WHERE _number_found = ""5"";",1 What player has a total of 290 points?,"CREATE TABLE table_name_46 (player VARCHAR, total VARCHAR);",SELECT player FROM table_name_46 WHERE total = 290;,SELECT player FROM table_name_46 WHERE total = 290;,1 How many animals from endangered species are in the 'North America' habitat?,"CREATE TABLE Animals (AnimalID INT, Species VARCHAR(20), Habitat VARCHAR(20)); ",SELECT COUNT(*) FROM Animals WHERE Species IN (SELECT Species FROM Endangered_Species WHERE Habitat = 'North America');,SELECT COUNT(*) FROM Animals WHERE Species = 'Endangered' AND Habitat = 'North America';,0 What venue is the home field of Richmond?,"CREATE TABLE table_name_46 (venue VARCHAR, home_team VARCHAR);","SELECT venue FROM table_name_46 WHERE home_team = ""richmond"";","SELECT venue FROM table_name_46 WHERE home_team = ""richmond"";",1 Which Spoofed title is from February 1998?,"CREATE TABLE table_name_47 (spoofed_title VARCHAR, date VARCHAR);","SELECT spoofed_title FROM table_name_47 WHERE date = ""february 1998"";","SELECT spoofed_title FROM table_name_47 WHERE date = ""february 1998"";",1 Who was the new Santos manager?,"CREATE TABLE table_29414946_3 (replaced_by VARCHAR, team VARCHAR);","SELECT replaced_by FROM table_29414946_3 WHERE team = ""Santos"";","SELECT replaced_by FROM table_29414946_3 WHERE team = ""Santos"";",1 Delete all records from the temperature table for the past month.,"CREATE TABLE temperature (id INT, field_id INT, value INT, timestamp TIMESTAMP);",DELETE FROM temperature WHERE timestamp >= NOW() - INTERVAL '1 month';,"DELETE FROM temperature WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH);",0 What is the total number of tickets sold for rugby matches in '2018' and '2019'?,"CREATE TABLE rugby_matches (match_id INT, season INT, tickets_sold INT); ","SELECT SUM(tickets_sold) FROM rugby_matches WHERE season IN (2018, 2019);","SELECT SUM(tickets_sold) FROM rugby_matches WHERE season IN (2018, 2019);",1 What is the percentage of students who prefer open pedagogy in each school district?,"CREATE TABLE student_preference (student_id INT, district_id INT, preference VARCHAR(10)); ","SELECT district_id, 100.0 * SUM(CASE WHEN preference = 'open' THEN 1 ELSE 0 END) / COUNT(*) AS pct_open FROM student_preference GROUP BY district_id;","SELECT district_id, (COUNT(*) FILTER (WHERE preference = 'Open')) * 100.0 / COUNT(*) FROM student_preference GROUP BY district_id;",0 What is the average rent for properties built before 2000 with green-certified building status in Dubai?,"CREATE TABLE units (id INT, city VARCHAR, build_year INT, rent DECIMAL, green_certified BOOLEAN);",SELECT AVG(rent) FROM units WHERE city = 'Dubai' AND build_year < 2000 AND green_certified = TRUE;,SELECT AVG(rent) FROM units WHERE city = 'Dubai' AND build_year 2000 AND green_certified = true;,0 What was the highest number of games played when they had over 14 against and 3 losses?,"CREATE TABLE table_name_27 (played INTEGER, against VARCHAR, lost VARCHAR);",SELECT MAX(played) FROM table_name_27 WHERE against > 14 AND lost = 3;,SELECT MAX(played) FROM table_name_27 WHERE against > 14 AND lost = 3;,1 What place is Fredrik Jacobson from?,"CREATE TABLE table_name_87 (place VARCHAR, player VARCHAR);","SELECT place FROM table_name_87 WHERE player = ""fredrik jacobson"";","SELECT place FROM table_name_87 WHERE player = ""fredrik jacobson"";",1 What is the total revenue from ethical fashion brands in 2021 and 2022?,"CREATE TABLE Revenue (id INT, brand_id INT, year INT, revenue INT); ","SELECT SUM(revenue) FROM Revenue WHERE year IN (2021, 2022) AND brand_id IN (SELECT brand_id FROM Brands WHERE ethical = 'true');","SELECT SUM(revenue) FROM Revenue WHERE year IN (2021, 2022) AND brand_id IN (SELECT id FROM Brands WHERE brand_id IN (SELECT brand_id FROM Brands WHERE brand_id IN (SELECT brand_id FROM Brands WHERE brand_id IN (SELECT brand_id FROM Brands WHERE brand_id IN (SELECT brand_id FROM Brands WHERE brand_id IN (SELECT brand_id FROM Brands WHERE year = 2021) AND year = 2022);",0 What is the average score of players who joined the game in 2021?,"CREATE TABLE players (player_id INT, join_date DATE, score INT); ",SELECT AVG(score) FROM players WHERE YEAR(join_date) = 2021;,SELECT AVG(score) FROM players WHERE join_date BETWEEN '2021-01-01' AND '2021-12-31';,0 What Player has a +3 To par?,"CREATE TABLE table_name_11 (player VARCHAR, to_par VARCHAR);","SELECT player FROM table_name_11 WHERE to_par = ""+3"";","SELECT player FROM table_name_11 WHERE to_par = ""+3"";",1 Who was the 2nd member of the parliament that was assembled on 3 november 1529?,CREATE TABLE table_name_37 (assembled VARCHAR);,"SELECT 2 AS nd_member FROM table_name_37 WHERE assembled = ""3 november 1529"";","SELECT 2 AS nd_member FROM table_name_37 WHERE assembled = ""3 november 1529"";",1 List the top 3 sustainable brands by sales in the US.,"CREATE TABLE Brands (BrandID INT, BrandName VARCHAR(100), SustainabilityScore INT, TotalSales DECIMAL(10,2)); ","SELECT BrandName, SustainabilityScore, TotalSales FROM (SELECT BrandName, SustainabilityScore, TotalSales, ROW_NUMBER() OVER (ORDER BY TotalSales DESC) as rn FROM Brands WHERE Country = 'US') t WHERE rn <= 3;","SELECT BrandName, TotalSales FROM Brands WHERE SustainabilityScore = (SELECT SustainabilityScore FROM Brands WHERE Country = 'USA') ORDER BY TotalSales DESC LIMIT 3;",0 What was rickie winslow's number?,"CREATE TABLE table_22496374_1 (_number INTEGER, name VARCHAR);","SELECT MAX(_number) FROM table_22496374_1 WHERE name = ""Rickie Winslow"";","SELECT MAX(_number) FROM table_22496374_1 WHERE name = ""Rickie Winslow"";",1 "Find the number of athletes in each sport in the athlete_info table, grouped by the sport column.","CREATE TABLE athlete_info (athlete_id INT, name VARCHAR(50), sport VARCHAR(20), age INT, country VARCHAR(50)); ","SELECT sport, COUNT(*) FROM athlete_info GROUP BY sport;","SELECT sport, COUNT(*) FROM athlete_info GROUP BY sport;",1 Name the most finish for 2006,"CREATE TABLE table_name_9 (finish INTEGER, year VARCHAR);",SELECT MAX(finish) FROM table_name_9 WHERE year = 2006;,SELECT MAX(finish) FROM table_name_9 WHERE year = 2006;,1 Name the most attendance,CREATE TABLE table_16227492_1 (attendance INTEGER);,SELECT MAX(attendance) FROM table_16227492_1;,SELECT MAX(attendance) FROM table_16227492_1;,1 Find the total quantity of fish in the 'SeaBreeze' farm.,"CREATE TABLE Farm (id INT, farm_name TEXT, species TEXT, weight FLOAT, age INT); ",SELECT SUM(weight) FROM Farm WHERE farm_name = 'SeaBreeze';,SELECT SUM(weight) FROM Farm WHERE farm_name = 'SeaBreeze';,1 The common of Chieri has what population density?,"CREATE TABLE table_1449176_1 (density__inhabitants_km_2__ VARCHAR, common_of VARCHAR);","SELECT density__inhabitants_km_2__ FROM table_1449176_1 WHERE common_of = ""Chieri"";","SELECT density__inhabitants_km_2__ FROM table_1449176_1 WHERE common_of = ""Chieri"";",1 "Delete a cargo handling operation from the ""cargo_operations"" table","CREATE TABLE cargo_operations (id INT PRIMARY KEY, vessel_id INT, port_id INT, operation_type VARCHAR(255), amount INT, timestamp TIMESTAMP);",DELETE FROM cargo_operations WHERE id = 1;,DELETE FROM cargo_operations WHERE operation_type = 'handling';,0 Retrieve the number of posts per day for the last 7 days,"CREATE TABLE posts (id INT PRIMARY KEY, user_id INT, content TEXT, created_at TIMESTAMP);","SELECT DATE_TRUNC('day', created_at) AS day, COUNT(*) FROM posts WHERE created_at >= NOW() - INTERVAL '7 days' GROUP BY day;","SELECT DATE_TRUNC('day', created_at) AS day, COUNT(*) AS posts_per_day FROM posts WHERE created_at >= DATE_TRUNC('day', created_at) GROUP BY day;",0 What number is shown for january 15-16 when november 3 is 133?,"CREATE TABLE table_25252080_3 (january_15_16 VARCHAR, november_3 VARCHAR);","SELECT january_15_16 FROM table_25252080_3 WHERE november_3 = ""133"";",SELECT january_15_16 FROM table_25252080_3 WHERE november_3 = 133;,0 What is the total number of home games played by each team?,"CREATE TABLE teams (team_id INT, team_name VARCHAR(255)); CREATE TABLE games (game_id INT, home_team_id INT, away_team_id INT); ","SELECT t.team_name, COUNT(CASE WHEN g.home_team_id = t.team_id THEN 1 END) as home_games_played FROM teams t INNER JOIN games g ON t.team_id IN (g.home_team_id, g.away_team_id) GROUP BY t.team_name;","SELECT t.team_name, COUNT(g.game_id) as total_home_games FROM teams t JOIN games g ON t.team_id = g.home_team_id GROUP BY t.team_name;",0 Which language is spoken by the largest number of countries?,CREATE TABLE countrylanguage (LANGUAGE VARCHAR);,SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY COUNT(*) DESC LIMIT 1;,SELECT LANGUAGE FROM countrylanguage ORDER BY COUNT(*) DESC LIMIT 1;,0 What percentage of cosmetics contains palm oil and is not vegan?,"CREATE TABLE Cosmetics (id INT, name TEXT, has_palm_oil BOOLEAN, is_vegan BOOLEAN); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Cosmetics)) AS percentage FROM Cosmetics WHERE has_palm_oil = true AND is_vegan = false;,SELECT 100.0 * COUNT(*) / (SELECT COUNT(*) FROM Cosmetics WHERE has_palm_oil = true AND is_vegan = false) AS percentage FROM Cosmetics WHERE is_vegan = false;,0 What is the percentage of ethical fashion products made from sustainable materials?,"CREATE TABLE Products (Product VARCHAR(50), SustainableMaterial BOOLEAN); ",SELECT COUNT(*) FILTER (WHERE SustainableMaterial = TRUE) * 100.0 / COUNT(*) FROM Products;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Products WHERE SustainableMaterial = TRUE)) AS Percentage FROM Products WHERE SustainableMaterial = TRUE;,0 What is the name of the team from the Elverado Trico school in football? ,"CREATE TABLE table_18304058_2 (team_name VARCHAR, sports VARCHAR, schools VARCHAR);","SELECT team_name FROM table_18304058_2 WHERE sports = ""Football"" AND schools = ""Elverado Trico"";","SELECT team_name FROM table_18304058_2 WHERE sports = ""Football"" AND schools = ""Elverado Trico"";",1 "Who is the friday presenter for each show, when the monday presenter is Emma Willis Jamie East?","CREATE TABLE table_11748792_2 (friday VARCHAR, monday VARCHAR);","SELECT friday FROM table_11748792_2 WHERE monday = ""Emma Willis Jamie East"";","SELECT friday FROM table_11748792_2 WHERE monday = ""Emma Willis Jamie East"";",1 Which format is in St. George with a frequency of 0 107.3 fm?,"CREATE TABLE table_name_31 (format VARCHAR, city_of_license VARCHAR, frequency VARCHAR);","SELECT format FROM table_name_31 WHERE city_of_license = ""st. george"" AND frequency = ""0 107.3 fm"";","SELECT format FROM table_name_31 WHERE city_of_license = ""st. george"" AND frequency = ""0 107.3 fm"";",1 Who directed episode 11 in the series?,"CREATE TABLE table_26136228_3 (directed_by VARCHAR, series_no VARCHAR);",SELECT directed_by FROM table_26136228_3 WHERE series_no = 11;,SELECT directed_by FROM table_26136228_3 WHERE series_no = 11;,1 What is the maximum number of intelligence operations conducted in a single region last year?,"CREATE TABLE IntelligenceOperations (region TEXT, year INTEGER, num_operations INTEGER); ",SELECT MAX(num_operations) FROM IntelligenceOperations WHERE year = 2021;,"SELECT region, MAX(num_operations) FROM IntelligenceOperations WHERE year = 2021 GROUP BY region;",0 Count the number of users who have posted more than 20 times in the 'social_media' database.,"CREATE TABLE users (user_id INT, num_posts INT); ",SELECT COUNT(*) FROM users WHERE num_posts > 20;,SELECT COUNT(*) FROM users WHERE num_posts > 20;,1 What is the sum of all total values for Switzerland?,"CREATE TABLE table_name_25 (total INTEGER, nation VARCHAR);","SELECT SUM(total) FROM table_name_25 WHERE nation = ""switzerland"";","SELECT SUM(total) FROM table_name_25 WHERE nation = ""switzerland"";",1 What is the lowest number of laps with a grid larger than 24?,"CREATE TABLE table_name_14 (laps INTEGER, grid INTEGER);",SELECT MIN(laps) FROM table_name_14 WHERE grid > 24;,SELECT MIN(laps) FROM table_name_14 WHERE grid > 24;,1 "What is the saturated fat when the total fat is 100g, and polyunsaturated fat is 69g (4g in high oleic variety)?","CREATE TABLE table_name_63 (saturated_fat VARCHAR, total_fat VARCHAR, polyunsaturated_fat VARCHAR);","SELECT saturated_fat FROM table_name_63 WHERE total_fat = ""100g"" AND polyunsaturated_fat = ""69g (4g in high oleic variety)"";","SELECT saturated_fat FROM table_name_63 WHERE total_fat = ""100g"" AND polyunsaturated_fat = ""69g (4g in high oleic variety)"";",1 Which Score has a Record of 9–8?,"CREATE TABLE table_name_35 (score VARCHAR, record VARCHAR);","SELECT score FROM table_name_35 WHERE record = ""9–8"";","SELECT score FROM table_name_35 WHERE record = ""9–8"";",1 What is the Date of the Competition with Man of the Match Ollie Bronnimann?,"CREATE TABLE table_name_41 (date VARCHAR, man_of_the_match VARCHAR);","SELECT date FROM table_name_41 WHERE man_of_the_match = ""ollie bronnimann"";","SELECT date FROM table_name_41 WHERE man_of_the_match = ""ollie bronnimann"";",1 What is the total revenue of military equipment sales in the Asia-Pacific region for each year?,"CREATE TABLE military_sales (id INT, year INT, region VARCHAR(20), equipment_type VARCHAR(30), revenue DECIMAL(10,2));","SELECT year, SUM(revenue) as total_revenue FROM military_sales WHERE region = 'Asia-Pacific' GROUP BY year ORDER BY year;","SELECT year, SUM(revenue) FROM military_sales WHERE region = 'Asia-Pacific' GROUP BY year;",0 "Insert a new record into the 'community_education' table with these values: 'Brazil', 'Wildlife Conservation Program', '2024-01-01', '2024-12-31'","CREATE TABLE community_education (id INT PRIMARY KEY, country VARCHAR(20), program_name VARCHAR(30), start_date DATE, end_date DATE);","INSERT INTO community_education (country, program_name, start_date, end_date) VALUES ('Brazil', 'Wildlife Conservation Program', '2024-01-01', '2024-12-31');","INSERT INTO community_education (country, program_name, start_date, end_date) VALUES ('Brazil', 'Wildlife Conservation Program', '2024-01-01', '2024-12-31');",1 "Can you tell me the lowest Long that has the Yards 293, and the Returns smaller than 16?","CREATE TABLE table_name_56 (long INTEGER, yards VARCHAR, returns VARCHAR);",SELECT MIN(long) FROM table_name_56 WHERE yards = 293 AND returns < 16;,SELECT MIN(long) FROM table_name_56 WHERE yards = 293 AND returns 16;,0 Name the incumbent for lost renomination republican hold,"CREATE TABLE table_19753079_4 (incumbent VARCHAR, result VARCHAR);","SELECT incumbent FROM table_19753079_4 WHERE result = ""Lost renomination Republican hold"";","SELECT incumbent FROM table_19753079_4 WHERE result = ""Lost renomination republican hold"";",0 In the 250 series on clay what were the scores?,"CREATE TABLE table_29026564_10 (score VARCHAR, surface VARCHAR, category VARCHAR);","SELECT score FROM table_29026564_10 WHERE surface = ""Clay"" AND category = ""250 series"";","SELECT score FROM table_29026564_10 WHERE surface = ""Clay"" AND category = ""250 Series"";",0 Find the top 2 countries with the highest average budget for ethical AI initiatives.,"CREATE TABLE EthicalAI (Country TEXT, Budget FLOAT); ","SELECT Country, AVG(Budget) FROM EthicalAI GROUP BY Country ORDER BY AVG(Budget) DESC LIMIT 2;","SELECT Country, AVG(Budget) AS AvgBudget FROM EthicalAI GROUP BY Country ORDER BY AvgBudget DESC LIMIT 2;",0 "List the top 3 producing countries of Dysprosium in 2019, ordered by production amount.","CREATE TABLE production (country VARCHAR(255), element VARCHAR(255), amount INT, year INT); CREATE TABLE price (element VARCHAR(255), year INT, price DECIMAL(10, 2)); ","SELECT country, SUM(amount) as total_production FROM production WHERE element = 'Dysprosium' AND year = 2019 GROUP BY country ORDER BY total_production DESC LIMIT 3;","SELECT country, AVG(amount) as avg_production FROM production WHERE element = 'Dysprosium' AND year = 2019 GROUP BY country ORDER BY avg_production DESC LIMIT 3;",0 "What is the Length, when the Name is Himos?","CREATE TABLE table_name_68 (length VARCHAR, name VARCHAR);","SELECT length FROM table_name_68 WHERE name = ""himos"";","SELECT length FROM table_name_68 WHERE name = ""himos"";",1 "Return the apartment numbers of the apartments with type code ""Flat"".","CREATE TABLE Apartments (apt_number VARCHAR, apt_type_code VARCHAR);","SELECT apt_number FROM Apartments WHERE apt_type_code = ""Flat"";","SELECT apt_number FROM Apartments WHERE apt_type_code = ""Flat"";",1 What is the mascot for texas tech university?,"CREATE TABLE table_28243691_1 (team_nickname VARCHAR, institution VARCHAR);","SELECT team_nickname FROM table_28243691_1 WHERE institution = ""Texas Tech University"";","SELECT team_nickname FROM table_28243691_1 WHERE institution = ""Texas Tech University"";",1 "What is the number of hospitals in urban areas, grouped by the region they are located in?","CREATE TABLE Hospitals (HospitalID INT, Name VARCHAR(255), Location VARCHAR(255), Region VARCHAR(255)); ","SELECT Region, COUNT(*) FROM Hospitals WHERE Location = 'Urban' GROUP BY Region;","SELECT Region, COUNT(*) FROM Hospitals WHERE Region = 'Urban' GROUP BY Region;",0 What team did the player represent that was picked after 196?,"CREATE TABLE table_name_35 (nfl_club VARCHAR, pick INTEGER);",SELECT nfl_club FROM table_name_35 WHERE pick > 196;,SELECT nfl_club FROM table_name_35 WHERE pick > 196;,1 What is the Score when the set 3 is 26–28?,"CREATE TABLE table_name_68 (score VARCHAR, set_3 VARCHAR);","SELECT score FROM table_name_68 WHERE set_3 = ""26–28"";","SELECT score FROM table_name_68 WHERE set_3 = ""26–28"";",1 "Which Election has a Party of democratic party, and a Mayor of leonardo betti?","CREATE TABLE table_name_52 (election INTEGER, party VARCHAR, mayor VARCHAR);","SELECT MAX(election) FROM table_name_52 WHERE party = ""democratic party"" AND mayor = ""leonardo betti"";","SELECT SUM(election) FROM table_name_52 WHERE party = ""democratic party"" AND mayor = ""leonardo betti"";",0 How many public transportation users are there in New York City?,"CREATE TABLE public_transportation (user_id int, city varchar(20), transport_type varchar(20)); ",SELECT COUNT(DISTINCT user_id) FROM public_transportation WHERE city = 'New York City';,SELECT COUNT(*) FROM public_transportation WHERE city = 'New York City';,0 What is the total number of streams for each country in Asia?,"CREATE TABLE streams (id INT, country VARCHAR(255), streams INT); ","SELECT country, SUM(streams) AS total_streams FROM streams WHERE country IN ('China', 'Japan', 'India', 'South Korea') GROUP BY country;","SELECT country, SUM(streams) FROM streams GROUP BY country;",0 What coach had 15 wins?,"CREATE TABLE table_14594528_6 (name__alma_mater_ VARCHAR, wins VARCHAR);",SELECT name__alma_mater_ FROM table_14594528_6 WHERE wins = 15;,SELECT name__alma_mater_ FROM table_14594528_6 WHERE wins = 15;,1 What is the number of cases in each state?,"CREATE TABLE Cases (CaseID INT, State VARCHAR(20)); ","SELECT State, COUNT(*) AS NumberOfCases FROM Cases GROUP BY State;","SELECT State, COUNT(*) FROM Cases GROUP BY State;",0 What is the success rate of biotech startups in the USA?,"CREATE SCHEMA if not exists biotech;CREATE TABLE if not exists biotech.startups (id INT PRIMARY KEY, name VARCHAR(100), location VARCHAR(50), funding FLOAT, success BOOLEAN);",SELECT AVG(success) FROM biotech.startups WHERE location = 'USA';,SELECT success FROM biotech.startups WHERE location = 'USA';,0 "How many teams lost at the sydney football stadium, sydney (11)?","CREATE TABLE table_11236195_5 (losingteam VARCHAR, location VARCHAR);","SELECT COUNT(losingteam) FROM table_11236195_5 WHERE location = ""Sydney Football Stadium, Sydney (11)"";","SELECT COUNT(losingteam) FROM table_11236195_5 WHERE location = ""Sydney Football Stadium, Sydney (11)"";",1 How many played has an against greater than 57 and a lost bigger than 14?,"CREATE TABLE table_name_83 (played VARCHAR, against VARCHAR, lost VARCHAR);",SELECT COUNT(played) FROM table_name_83 WHERE against > 57 AND lost > 14;,SELECT played FROM table_name_83 WHERE against > 57 AND lost > 14;,0 What is the % identity to C7orf38 of the animal whose genus & species is Mus Musculus?,"CREATE TABLE table_26957063_3 (_percentage_identity_to_c7orf38 INTEGER, genus_ VARCHAR, _species VARCHAR);","SELECT MAX(_percentage_identity_to_c7orf38) FROM table_26957063_3 WHERE genus_ & _species = ""Mus musculus"";","SELECT MIN(_percentage_identity_to_c7orf38) FROM table_26957063_3 WHERE genus_ & _species = ""Mus Musculus"";",0 "Insert a new author ""Alex Garcia"" with id 21 and email ""[alex.garcia@example.com](mailto:alex.garcia@example.com)"" into the ""authors"" table","CREATE TABLE authors (author_id INT, first_name VARCHAR(255), last_name VARCHAR(255), email VARCHAR(255));","INSERT INTO authors (author_id, first_name, last_name, email) VALUES (21, 'Alex', 'Garcia', '[alex.garcia@example.com](mailto:alex.garcia@example.com)');","INSERT INTO authors (author_id, first_name, last_name, email) VALUES (21, 'Alex Garcia', '@example.com', '@example.com');",0 "What is the total number of sustainable building projects in each state, and what percentage of total projects do they represent?","CREATE TABLE Sustainable_Building_Projects (Project_ID INT, State TEXT); CREATE TABLE Building_Projects (Project_ID INT, State TEXT); ","SELECT sp.State, COUNT(sp.Project_ID) AS Sustainable_Projects, COUNT(bp.Project_ID) AS Total_Projects, (COUNT(sp.Project_ID) / COUNT(bp.Project_ID)) * 100 AS Percentage FROM Sustainable_Building_Projects sp INNER JOIN Building_Projects bp ON sp.Project_ID = bp.Project_ID GROUP BY sp.State;","SELECT State, COUNT(*) as Total_Projects, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Sustainable_Building_Projects)) as Percentage FROM Sustainable_Building_Projects GROUP BY State;",0 Delete all local businesses in 'Australia' associated with hotels that are not eco-friendly,"CREATE TABLE local_businesses (id INT, name TEXT, country TEXT, hotel_name TEXT, is_eco BOOLEAN); ",DELETE FROM local_businesses WHERE country = 'Australia' AND is_eco = FALSE;,DELETE FROM local_businesses WHERE country = 'Australia' AND is_eco = false;,0 What are the original air date(s) for episodes written by aron eli coleite?,"CREATE TABLE table_28215780_4 (original_air_date VARCHAR, written_by VARCHAR);","SELECT original_air_date FROM table_28215780_4 WHERE written_by = ""Aron Eli Coleite"";","SELECT original_air_date FROM table_28215780_4 WHERE written_by = ""Aron Eli Coleite"";",1 "Which Format has a Date of may 24, 2008?","CREATE TABLE table_name_44 (format VARCHAR, date VARCHAR);","SELECT format FROM table_name_44 WHERE date = ""may 24, 2008"";","SELECT format FROM table_name_44 WHERE date = ""may 24, 2008"";",1 What was the finish with less than 200 laps in 1953?,"CREATE TABLE table_name_85 (finish VARCHAR, laps VARCHAR, year VARCHAR);","SELECT finish FROM table_name_85 WHERE laps < 200 AND year = ""1953"";",SELECT finish FROM table_name_85 WHERE laps 200 AND year = 1953;,0 "What is the minimum amount of funding for series A rounds for companies in the ""renewable energy"" sector?","CREATE TABLE funding (company_id INT, round TEXT, amount INT); ",SELECT MIN(amount) FROM funding JOIN company ON funding.company_id = company.id WHERE company.industry = 'renewable energy' AND round = 'series A';,SELECT MIN(amount) FROM funding WHERE round ='series A' AND company_id IN (SELECT company_id FROM companies WHERE sector ='renewable energy');,0 what country was the player drafted by the toronto maple leafs,"CREATE TABLE table_1473672_7 (nationality VARCHAR, nhl_team VARCHAR);","SELECT nationality FROM table_1473672_7 WHERE nhl_team = ""Toronto Maple Leafs"";","SELECT nationality FROM table_1473672_7 WHERE nhl_team = ""Toronto Maple Leafs"";",1 What is the average CO2 emission of electric vehicles sold in Canada in 2020?,"CREATE TABLE ElectricVehicles (vehicle_id INT, model VARCHAR(100), co2_emissions DECIMAL(5,2), country VARCHAR(50), year INT); ",SELECT AVG(co2_emissions) FROM ElectricVehicles WHERE country = 'Canada' AND year = 2020;,SELECT AVG(co2_emissions) FROM ElectricVehicles WHERE country = 'Canada' AND year = 2020;,1 Find the name and account balance of the customers who have loans with a total amount of more than 5000.,"CREATE TABLE loan (cust_id VARCHAR, amount INTEGER); CREATE TABLE customer (cust_name VARCHAR, acc_type VARCHAR, cust_id VARCHAR);","SELECT T1.cust_name, T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING SUM(T2.amount) > 5000;","SELECT T1.cust_name, T1.ac_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.amount > 5000;",0 What is the average score of players who have achieved more than 5 victories in the game 'Galactic Combat'?,"CREATE TABLE Galactic_Combat (player_id INT, player_name VARCHAR(50), score INT, victories INT); ",SELECT AVG(score) FROM Galactic_Combat WHERE victories > 5;,SELECT AVG(score) FROM Galactic_Combat WHERE victories > 5;,1 Who is the player who went to Stanford?,"CREATE TABLE table_name_8 (player VARCHAR, school_club_team VARCHAR);","SELECT player FROM table_name_8 WHERE school_club_team = ""stanford"";","SELECT player FROM table_name_8 WHERE school_club_team = ""stanford"";",1 Which regio has a label of zzt and a date of 27 september 2004?,"CREATE TABLE table_name_5 (region VARCHAR, label VARCHAR, date VARCHAR);","SELECT region FROM table_name_5 WHERE label = ""zzt"" AND date = ""27 september 2004"";","SELECT region FROM table_name_5 WHERE label = ""zzt"" AND date = ""27 september 2004"";",1 What is Lawson Little's Money ($) amount?,"CREATE TABLE table_name_30 (money___$__ VARCHAR, player VARCHAR);","SELECT money___$__ FROM table_name_30 WHERE player = ""lawson little"";","SELECT money___$__ FROM table_name_30 WHERE player = ""lawson little"";",1 Compute the average price of all products with manufacturer code equal to 2.,"CREATE TABLE products (price INTEGER, Manufacturer VARCHAR);",SELECT AVG(price) FROM products WHERE Manufacturer = 2;,SELECT AVG(price) FROM products WHERE Manufacturer = 2;,1 How many public libraries and community centers were opened in 2021 and 2022?,"CREATE TABLE Facilities (Year INT, FacilityType TEXT); ","SELECT FacilityType, COUNT(*) FROM Facilities WHERE Year IN (2021, 2022) GROUP BY FacilityType;","SELECT COUNT(*) FROM Facilities WHERE Year IN (2021, 2022) AND FacilityType IN ('Public Library', 'Community Center');",0 What is the average energy consumption of buildings constructed after 2015 and located in 'Urban' areas in the 'GreenBuildings' table?,"CREATE TABLE GreenBuildings (id INT, name VARCHAR(50), constructionDate DATE, location VARCHAR(50), energyConsumption DECIMAL(5,2));",SELECT AVG(energyConsumption) FROM GreenBuildings WHERE constructionDate > '2015-01-01' AND location = 'Urban';,SELECT AVG(energyConsumption) FROM GreenBuildings WHERE constructionDate > '2015-01-01' AND location = 'Urban';,1 What is the total quantity of coal and iron ore mined by each company?,"CREATE TABLE coal_mine (company_id INT, quantity_mined INT);CREATE TABLE iron_ore_mine (company_id INT, quantity_mined INT);","SELECT m.company_name, SUM(cm.quantity_mined) AS total_coal_mined, SUM(iom.quantity_mined) AS total_iron_ore_mined FROM mining_companies m JOIN coal_mine cm ON m.company_id = cm.company_id JOIN iron_ore_mine iom ON m.company_id = iom.company_id GROUP BY m.company_name;","SELECT c.company_id, SUM(c.quantity_mined) as total_coal_mined, SUM(i.quantity_mined) as total_iron_ore_mined FROM coal_mine c JOIN iron_ore_mine i ON c.company_id = i.company_id GROUP BY c.company_id;",0 What is the CO2 emissions reduction in the past 12 months?,"CREATE TABLE co2_emissions (emission_id INT, emission_value INT, emission_date DATE);",SELECT SUM(emission_value) AS total_emissions_reduction FROM co2_emissions WHERE emission_date >= DATE(NOW()) - INTERVAL 12 MONTH AND emission_value < 0,"SELECT emission_value FROM co2_emissions WHERE emission_date >= DATEADD(month, -12, GETDATE());",0 What is the number of students enrolled in lifelong learning programs by country?,"CREATE TABLE students (student_id INT, student_name VARCHAR(50), country VARCHAR(50)); CREATE TABLE lifelong_learning (ll_id INT, student_id INT, program_name VARCHAR(50)); ","SELECT students.country, COUNT(DISTINCT students.student_id) as num_students FROM students INNER JOIN lifelong_learning ON students.student_id = lifelong_learning.student_id GROUP BY students.country;","SELECT s.country, COUNT(l.student_id) FROM students s JOIN lifelong_learning l ON s.student_id = l.student_id GROUP BY s.country;",0 What was the class when there were 325 laps?,"CREATE TABLE table_name_32 (class VARCHAR, laps VARCHAR);",SELECT class FROM table_name_32 WHERE laps = 325;,"SELECT class FROM table_name_32 WHERE laps = ""325"";",0 "List the top 2 menu items by revenue in the 'European' menu category in the last 60 days, including their revenue and the number of orders.","CREATE TABLE menu_items(item_name VARCHAR(30), menu_category VARCHAR(20), revenue DECIMAL(10, 2), orders INT); ","SELECT item_name, SUM(revenue) AS total_revenue, SUM(orders) AS total_orders FROM menu_items WHERE menu_category = 'European' AND orders >= (SELECT AVG(orders) FROM menu_items WHERE menu_category = 'European') AND menu_items.item_name IN (SELECT item_name FROM menu_items WHERE menu_category = 'European' GROUP BY item_name ORDER BY SUM(revenue) DESC LIMIT 2) GROUP BY item_name ORDER BY total_revenue DESC, total_orders DESC;","SELECT item_name, revenue, orders FROM menu_items WHERE menu_category = 'European' AND revenue >= (SELECT MAX(revenue) FROM menu_items WHERE menu_category = 'European') AND orders >= (SELECT MAX(orders) FROM menu_items WHERE menu_category = 'European') AND orders >= (SELECT MAX(orders) FROM menu_items WHERE menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European') AND orders >= (SELECT MAX(orders) FROM menu_items WHERE menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European' AND menu_category = 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European' AND 'European';",0 What is the average energy efficiency rating for buildings in London?,"CREATE TABLE buildings (id INT, city TEXT, rating FLOAT); ",SELECT AVG(rating) FROM buildings WHERE city = 'London';,SELECT AVG(rating) FROM buildings WHERE city = 'London';,1 What is the date for the game where Platense was the home side?,"CREATE TABLE table_name_99 (date VARCHAR, home VARCHAR);","SELECT date FROM table_name_99 WHERE home = ""platense"";","SELECT date FROM table_name_99 WHERE home = ""platense"";",1 "What is the rank when bronze was more than 0, gold more than 1, Nation is japan, and silver less than 0?","CREATE TABLE table_name_73 (rank INTEGER, silver VARCHAR, nation VARCHAR, bronze VARCHAR, gold VARCHAR);","SELECT AVG(rank) FROM table_name_73 WHERE bronze > 0 AND gold > 1 AND nation = ""japan"" AND silver < 0;","SELECT AVG(rank) FROM table_name_73 WHERE bronze > 0 AND gold > 1 AND nation = ""japan"" AND silver 0;",0 Find the number of rural hospitals and clinics that offer heart disease treatment.,"CREATE TABLE hospitals (id INT, name TEXT, heart_disease_treatment BOOLEAN); CREATE TABLE clinics (id INT, name TEXT, heart_disease_treatment BOOLEAN); ",SELECT COUNT(*) FROM hospitals WHERE heart_disease_treatment = TRUE UNION SELECT COUNT(*) FROM clinics WHERE heart_disease_treatment = TRUE;,SELECT COUNT(*) FROM hospitals INNER JOIN clinics ON hospitals.id = clinics.id WHERE hospitals.heart_disease_treatment = TRUE;,0 What is the time of the rider who has a rank smaller than 8 and speed of 104.567mph?,"CREATE TABLE table_name_24 (time VARCHAR, rank VARCHAR, speed VARCHAR);","SELECT time FROM table_name_24 WHERE rank < 8 AND speed = ""104.567mph"";","SELECT time FROM table_name_24 WHERE rank 8 AND speed = ""104.567mph"";",0 What is the total number of emergency incidents recorded per community policing station?,"CREATE TABLE community_policing_station (id INT, name TEXT, location TEXT); CREATE TABLE emergency_incidents (id INT, station_id INT, type TEXT, date DATE); ","SELECT s.name, COUNT(e.id) as total_incidents FROM community_policing_station s JOIN emergency_incidents e ON s.id = e.station_id GROUP BY s.id;","SELECT cps.name, COUNT(ei.id) as total_incidents FROM community_policing_station cps INNER JOIN emergency_incidents ei ON cps.id = ei.station_id GROUP BY cps.name;",0 What is the average environmental impact score for chemical B?,"CREATE TABLE environmental_impact (chemical VARCHAR(20), score INT); ",SELECT avg(score) as avg_score FROM environmental_impact WHERE chemical = 'chemical B';,SELECT AVG(score) FROM environmental_impact WHERE chemical = 'chemical B';,0 Who are the top 2 retailers with the highest revenue from sales in City Y?,"CREATE TABLE retailers (id INT PRIMARY KEY, name VARCHAR(100), location VARCHAR(100)); CREATE TABLE sales (id INT PRIMARY KEY, retailer_id INT, quantity INT, revenue INT); ","SELECT r.name, s.revenue FROM retailers r INNER JOIN sales s ON r.id = s.retailer_id WHERE r.location = 'City Y' GROUP BY r.name ORDER BY SUM(s.revenue) DESC LIMIT 2;","SELECT r.name, SUM(s.revenue) as total_revenue FROM retailers r JOIN sales s ON r.id = s.retailer_id WHERE r.location = 'City Y' GROUP BY r.name ORDER BY total_revenue DESC LIMIT 2;",0 "How many clinical trials were conducted in the USA between 2018 and 2020, and what was the success rate?","CREATE TABLE clinical_trials (trial_name VARCHAR(50), country VARCHAR(50), start_date DATE, end_date DATE, status VARCHAR(50)); ","SELECT COUNT(*) AS total_trials, ROUND(100.0 * SUM(CASE WHEN status = 'Success' THEN 1 ELSE 0 END) / COUNT(*), 2) AS success_rate FROM clinical_trials WHERE country = 'USA' AND start_date BETWEEN '2018-01-01' AND '2020-12-31';","SELECT COUNT(*) as num_trials, SUM(CASE WHEN status = 'Success' THEN 1 ELSE 0 END) / COUNT(*) as success_rate FROM clinical_trials WHERE country = 'USA' AND start_date BETWEEN '2018-01-01' AND '2020-12-31' GROUP BY num_trials;",0 "Delete products in the products table that have not been manufactured in the last 5 years, based on the manufacturing_date column.","CREATE TABLE products (product_id INT, product_name VARCHAR(50), country_of_manufacture VARCHAR(50), manufacturing_date DATE); ","DELETE FROM products WHERE manufacturing_date < DATE_SUB(CURRENT_DATE(), INTERVAL 5 YEAR);","DELETE FROM products WHERE manufacturing_date DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR);",0 "What was the score for the away team, southport?","CREATE TABLE table_name_19 (score VARCHAR, away_team VARCHAR);","SELECT score FROM table_name_19 WHERE away_team = ""southport"";","SELECT score FROM table_name_19 WHERE away_team = ""southport"";",1 "What is the sum of Position, when Points 1 is greater than 23, and when Goals For is ""77""?","CREATE TABLE table_name_44 (position INTEGER, points_1 VARCHAR, goals_for VARCHAR);",SELECT SUM(position) FROM table_name_44 WHERE points_1 > 23 AND goals_for = 77;,SELECT SUM(position) FROM table_name_44 WHERE points_1 > 23 AND goals_for = 77;,1 List all the members who have not done any workout?,"CREATE TABLE Members (Id INT, Name VARCHAR(50), Age INT, Nationality VARCHAR(50)); CREATE TABLE Workouts (Id INT, MemberId INT, WorkoutType VARCHAR(50), Duration INT, Date DATE); ","SELECT m.Id, m.Name, m.Age, m.Nationality FROM Members m LEFT JOIN Workouts w ON m.Id = w.MemberId WHERE w.Id IS NULL;",SELECT Members.Name FROM Members INNER JOIN Workouts ON Members.Id = Workouts.MemberId WHERE Workouts.WorkoutType IS NULL;,0 What is the total number of peacekeeping operations conducted by the 'African Union'?,"CREATE TABLE peacekeeping_operations (id INT, organization VARCHAR(255), operation VARCHAR(255), start_date DATE, end_date DATE); ",SELECT COUNT(*) FROM peacekeeping_operations WHERE organization = 'African Union';,SELECT COUNT(*) FROM peacekeeping_operations WHERE organization = 'African Union';,1 How many patients have a primary diagnosis of depression and have attended at least one therapy session?,"CREATE TABLE patients (id INT, name TEXT, age INT, condition TEXT, therapy_sessions INT);",SELECT COUNT(*) FROM patients WHERE condition = 'depression' AND therapy_sessions > 0;,SELECT COUNT(*) FROM patients WHERE condition = 'Primary Depression' AND therapy_sessions >= 1;,0 What was the total quantity of Chemical D produced in Q1 2022?,"CREATE TABLE production (id INT, product VARCHAR(255), quantity FLOAT, production_date DATE); ",SELECT SUM(quantity) FROM production WHERE product = 'Chemical D' AND production_date >= '2022-01-01' AND production_date < '2022-04-01',SELECT SUM(quantity) FROM production WHERE product = 'Chemical D' AND production_date BETWEEN '2022-01-01' AND '2022-03-31';,0 Which Major League Soccer team for the 2005 season has the lowest goals?,"CREATE TABLE table_name_63 (goals INTEGER, league VARCHAR, season VARCHAR);","SELECT MIN(goals) FROM table_name_63 WHERE league = ""major league soccer"" AND season = ""2005"";","SELECT MIN(goals) FROM table_name_63 WHERE league = ""major league soccer"" AND season = ""2005"";",1 "Result of l, and a Date of 15-oct-64 had what score?","CREATE TABLE table_name_45 (score VARCHAR, result VARCHAR, date VARCHAR);","SELECT score FROM table_name_45 WHERE result = ""l"" AND date = ""15-oct-64"";","SELECT score FROM table_name_45 WHERE result = ""l"" AND date = ""15-oct-64"";",1 What is the average price of each garment type in the North American market?,"CREATE TABLE garment_prices (id INT, garment_type VARCHAR(255), region VARCHAR(255), price INT); ","SELECT garment_type, AVG(price) as avg_price FROM garment_prices WHERE region = 'North America' GROUP BY garment_type;","SELECT garment_type, AVG(price) as avg_price FROM garment_prices WHERE region = 'North America' GROUP BY garment_type;",1 What is the geo id of the land at 35.999?,"CREATE TABLE table_18600760_12 (geo_id INTEGER, land___sqmi__ VARCHAR);","SELECT MAX(geo_id) FROM table_18600760_12 WHERE land___sqmi__ = ""35.999"";","SELECT MAX(geo_id) FROM table_18600760_12 WHERE land___sqmi__ = ""35.999"";",1 "Delete records with sale amount less than $50,000 in the MilitaryEquipmentSales table","CREATE TABLE MilitaryEquipmentSales (id INT, equipment_name VARCHAR(50), sale_amount INT, sale_date DATE); ",DELETE FROM MilitaryEquipmentSales WHERE sale_amount < 50000;,DELETE FROM MilitaryEquipmentSales WHERE sale_amount 50000;,0 "When the team is @ Milwaukee, what is the name of the location where the game is played?","CREATE TABLE table_name_78 (location_attendance VARCHAR, team VARCHAR);","SELECT location_attendance FROM table_name_78 WHERE team = ""@ milwaukee"";","SELECT location_attendance FROM table_name_78 WHERE team = ""@ milwaukee"";",1 How many tries against got the club with 62 tries for?,"CREATE TABLE table_13564702_4 (tries_against VARCHAR, tries_for VARCHAR);","SELECT tries_against FROM table_13564702_4 WHERE tries_for = ""62"";","SELECT tries_against FROM table_13564702_4 WHERE tries_for = ""62"";",1 "Identify the restaurant with the highest revenue in the ""rural"" area.","CREATE TABLE revenue_by_restaurant (restaurant_id INT, revenue INT, area VARCHAR(255));","SELECT revenue_by_restaurant.restaurant_id, MAX(revenue_by_restaurant.revenue) FROM revenue_by_restaurant WHERE revenue_by_restaurant.area = 'rural';","SELECT restaurant_id, MAX(revenue) FROM revenue_by_restaurant WHERE area = 'rural' GROUP BY restaurant_id;",0 Update the 'status' column to 'inactive' for all vessels in the 'vessels' table that are older than 30 years.,"CREATE TABLE vessels (id INT, name VARCHAR(50), year_built INT, status VARCHAR(10), PRIMARY KEY(id));",UPDATE vessels v1 SET status = 'inactive' WHERE year_built < YEAR(NOW()) - 30 AND NOT EXISTS (SELECT 1 FROM vessels v2 WHERE v2.id = v1.id AND v2.status = 'active');,UPDATE vessels SET status = 'inactive' WHERE year_built 30;,0 Insert a new record for a warehouse in Tokyo with the warehouse_id 20,"CREATE TABLE warehouse (warehouse_id INT, warehouse_name VARCHAR(50), city VARCHAR(50), country VARCHAR(50));","INSERT INTO warehouse (warehouse_id, warehouse_name, city, country) VALUES (20, 'Tokyo Warehouse', 'Tokyo', 'Japan');","INSERT INTO warehouse (warehouse_id, warehouse_name, city, country) VALUES (20, 'Tokyo', 'Tokyo');",0 What 1992 has atp masters series for the 1995?,CREATE TABLE table_name_50 (Id VARCHAR);,"SELECT 1992 FROM table_name_50 WHERE 1995 = ""atp masters series"";","SELECT 1992 FROM table_name_50 WHERE 1995 = ""atp masters series"";",1 What's the Croatian word for Saturday?,"CREATE TABLE table_1277350_5 (saturday_sixth_day VARCHAR, day__see_irregularities__ VARCHAR);","SELECT saturday_sixth_day FROM table_1277350_5 WHERE day__see_irregularities__ = ""Croatian"";","SELECT saturday_sixth_day FROM table_1277350_5 WHERE day__see_irregularities__ = ""Croatia"";",0 "Insert a new Hydroelectric Project in Brazil with an ID of 3, a name of 'Project 3', and a capacity of 120 MW","CREATE TABLE hydroelectric_projects (id INT, name VARCHAR(100), country VARCHAR(50), capacity_mw FLOAT);","INSERT INTO hydroelectric_projects (id, name, country, capacity_mw) VALUES (3, 'Project 3', 'Brazil', 120);","INSERT INTO hydroelectric_projects (id, name, country, capacity_mw) VALUES (3, 'Project 3', 120);",0 Which suppliers in the 'suppliers' table have a certification of 'GOTS' or 'Fair Trade' and are located in 'India' or 'Bangladesh'?,"CREATE TABLE suppliers(id INT, name VARCHAR(255), country VARCHAR(255), certification VARCHAR(255)); ",SELECT * FROM suppliers WHERE (certification = 'GOTS' OR certification = 'Fair Trade') AND (country = 'India' OR country = 'Bangladesh');,"SELECT name FROM suppliers WHERE certification IN ('GOTS', 'Fair Trade') AND country IN ('India', 'Bangladesh');",0 Can you tell me the Country that has the Year(s) Won of 1988?,"CREATE TABLE table_name_21 (country VARCHAR, year_s__won VARCHAR);","SELECT country FROM table_name_21 WHERE year_s__won = ""1988"";","SELECT country FROM table_name_21 WHERE year_s__won = ""1988"";",1 What is the Date of the Everton Away game?,"CREATE TABLE table_name_95 (date VARCHAR, away_team VARCHAR);","SELECT date FROM table_name_95 WHERE away_team = ""everton"";","SELECT date FROM table_name_95 WHERE away_team = ""everton"";",1 Determine the number of military equipment maintenance requests in H2 2022,"CREATE TABLE military_equipment_maintenance (request_id INT, request_date DATE); ",SELECT COUNT(*) FROM military_equipment_maintenance WHERE request_date >= '2022-07-01' AND request_date < '2023-01-01';,SELECT COUNT(*) FROM military_equipment_maintenance WHERE request_date BETWEEN '2022-01-01' AND '2022-06-30';,0 How many vegetarian menu items are available?,"CREATE TABLE menu (menu_id INT, menu_name VARCHAR(50), category VARCHAR(50), quantity_sold INT, price DECIMAL(5,2), month_sold INT, is_vegetarian BOOLEAN); ",SELECT COUNT(*) FROM menu WHERE is_vegetarian = true;,SELECT COUNT(*) FROM menu WHERE is_vegetarian = true;,1 What is the production volume of organic seafood in the United States and Canada?,"CREATE TABLE seafood_production (id INT, country VARCHAR(20), production_volume DECIMAL(10,2), organic BOOLEAN); ","SELECT SUM(production_volume) FROM seafood_production WHERE country IN ('US', 'Canada') AND organic = TRUE;","SELECT country, production_volume FROM seafood_production WHERE organic = true AND country IN ('United States', 'Canada');",0 What was the total cost of all sustainable building projects in 2020?,"CREATE TABLE sustainable_projects (project_id INT, project_name VARCHAR(100), project_cost FLOAT, year INT); ",SELECT SUM(project_cost) FROM sustainable_projects WHERE year = 2020;,SELECT SUM(project_cost) FROM sustainable_projects WHERE year = 2020;,1 How many points did the Ford V8 with a Tyrrell 007 have?,"CREATE TABLE table_name_3 (points VARCHAR, engine VARCHAR, chassis VARCHAR);","SELECT points FROM table_name_3 WHERE engine = ""ford v8"" AND chassis = ""tyrrell 007"";","SELECT points FROM table_name_3 WHERE engine = ""ford v8"" AND chassis = ""tyrrell 007"";",1 What is the Date of the at&t pebble beach national pro-am Tournament?,"CREATE TABLE table_name_91 (date VARCHAR, tournament VARCHAR);","SELECT date FROM table_name_91 WHERE tournament = ""at&t pebble beach national pro-am"";","SELECT date FROM table_name_91 WHERE tournament = ""at&t pebble beach national pro-am"";",1 Which episode/s were written by Evan Gore?,"CREATE TABLE table_29087004_3 (series__number VARCHAR, written_by VARCHAR);","SELECT series__number FROM table_29087004_3 WHERE written_by = ""Evan Gore"";","SELECT series__number FROM table_29087004_3 WHERE written_by = ""Evan Gore"";",1 Who is the winning pitcher when attendance is 38109?,"CREATE TABLE table_12125069_2 (winning_pitcher VARCHAR, attendance VARCHAR);",SELECT winning_pitcher FROM table_12125069_2 WHERE attendance = 38109;,SELECT winning_pitcher FROM table_12125069_2 WHERE attendance = 38109;,1 Which marine conservation initiatives received funding in the past 5 years?',"CREATE TABLE marine_conservation_initiatives (initiative_id INT, name VARCHAR(50), year INT, funding FLOAT);","SELECT name, funding FROM marine_conservation_initiatives WHERE year BETWEEN YEAR(CURRENT_DATE) - 5 AND YEAR(CURRENT_DATE);",SELECT name FROM marine_conservation_initiatives WHERE year >= YEAR(CURRENT_DATE) - 5;,0 What was the maximum sales amount for cardiovascular drugs?,"CREATE TABLE sales (drug_class TEXT, sales_amount INTEGER);",SELECT MAX(sales_amount) FROM sales WHERE drug_class = 'cardiovascular';,SELECT MAX(sales_amount) FROM sales WHERE drug_class = 'Cardiovascular';,0 Delete records of donors who have not donated more than $1000 in the 'africa' region.,"CREATE TABLE donors (id INT, name TEXT, region TEXT, donation_amount FLOAT); ",DELETE FROM donors WHERE region = 'Africa' AND donation_amount < 1000;,DELETE FROM donors WHERE region = 'africa' AND donation_amount 1000;,0 Insert a new vehicle safety testing result for a Tesla Model 3,"CREATE TABLE VehicleSafetyTesting (id INT, make VARCHAR(255), model VARCHAR(255), safety_rating FLOAT, test_date DATE);","INSERT INTO VehicleSafetyTesting (id, make, model, safety_rating, test_date) VALUES (1, 'Tesla', 'Model 3', 5.3, '2023-02-01');","INSERT INTO VehicleSafetyTesting (id, make, model, safety_rating, test_date) VALUES (1, 'Tesla Model 3', 'Safety', '2022-01-01');",0 What is the total number of races won by each athlete in the 'runners' table?,"CREATE TABLE runners (athlete_id INT, name VARCHAR(50), races_won INT); ","SELECT name, SUM(races_won) FROM runners GROUP BY name;","SELECT name, SUM(races_won) FROM runners GROUP BY name;",1 - INNER JOIN sustainable_fabrics ON suppliers.fabric = sustainable_fabrics.fabric_type,"CREATE TABLE sustainable_fabrics (fabric_id INT, fabric_type VARCHAR(50), sustainability_score FLOAT);","FROM suppliers WHERE country IN ('Indonesia', 'Malaysia') AND sustainable_fabrics.fabric_type = 'sustainable viscose'","SELECT fabric_type, SUM(sustainability_score) as total_sustainability FROM sustainable_fabrics GROUP BY fabric_type;",0 Which public transportation routes have the highest frequency in Southeast Asia?,"CREATE TABLE Public_Transit_Routes (id INT PRIMARY KEY, route VARCHAR(50), mode VARCHAR(50), frequency INT, region VARCHAR(50));","SELECT Public_Transit_Routes.route, Public_Transit_Routes.frequency FROM Public_Transit_Routes WHERE Public_Transit_Routes.region = 'Southeast Asia' ORDER BY Public_Transit_Routes.frequency DESC;","SELECT route, frequency FROM Public_Transit_Routes WHERE region = 'Southeast Asia' ORDER BY frequency DESC LIMIT 1;",0 What is the total revenue generated from each city for the year 2022?,"CREATE SCHEMA fitness; CREATE TABLE memberships (id INT, member_name VARCHAR(255), city VARCHAR(255), state VARCHAR(255), join_date DATE, membership_type VARCHAR(255), price DECIMAL(10, 2));","SELECT city, SUM(price) FROM fitness.memberships WHERE YEAR(join_date) = 2022 GROUP BY city;","SELECT city, SUM(price) as total_revenue FROM fitness.memberships WHERE YEAR(join_date) = 2022 GROUP BY city;",0 What is the minimum age of underrepresented farmers in the 'rural_development' database?,"CREATE TABLE underrepresented_farmer_age (farmer_id INT, name VARCHAR(50), age INT, ethnicity VARCHAR(50), location VARCHAR(50)); ",SELECT MIN(age) FROM underrepresented_farmer_age;,SELECT MIN(age) FROM underrepresented_farmer_age;,1 "How many mobile subscribers are there in total, and how many of them are prepaid customers?","CREATE TABLE mobile_subscribers (subscriber_id INT, data_usage FLOAT, plan_type VARCHAR(10), region VARCHAR(20)); ",SELECT COUNT(*) FROM mobile_subscribers; SELECT COUNT(*) FROM mobile_subscribers WHERE plan_type = 'prepaid';,SELECT COUNT(*) FROM mobile_subscribers WHERE plan_type = 'prepaid';,0 What was the vacancy date of the manager appointed on 11 March 2010?,"CREATE TABLE table_name_45 (date_of_vacancy VARCHAR, date_of_appointment VARCHAR);","SELECT date_of_vacancy FROM table_name_45 WHERE date_of_appointment = ""11 march 2010"";","SELECT date_of_vacancy FROM table_name_45 WHERE date_of_appointment = ""11 march 2010"";",1 In what tournament did Cipolla face Sergio Roitman?,"CREATE TABLE table_name_5 (tournament VARCHAR, opponent VARCHAR);","SELECT tournament FROM table_name_5 WHERE opponent = ""sergio roitman"";","SELECT tournament FROM table_name_5 WHERE opponent = ""sergio rogman"";",0 Find the maximum mass of a satellite launched by SpaceX before 2015.,"CREATE TABLE SpaceX_Satellites ( id INT, satellite_name VARCHAR(255), launch_date DATE, mass FLOAT );",SELECT MAX(mass) FROM SpaceX_Satellites WHERE launch_date < '2015-01-01';,SELECT MAX(mass) FROM SpaceX_Satellites WHERE launch_date '2015-01-01';,0 "Which competition has a Goal of deacon 10/10, and a Score of 40–12?","CREATE TABLE table_name_52 (competition VARCHAR, goals VARCHAR, score VARCHAR);","SELECT competition FROM table_name_52 WHERE goals = ""deacon 10/10"" AND score = ""40–12"";","SELECT competition FROM table_name_52 WHERE goals = ""deacon 10/10"" AND score = ""40–12"";",1 "What is the total number of penalty minutes served by players in the IceHockeyPlayers and IceHockeyPenalties tables, for players who have served more than 500 penalty minutes in total?","CREATE TABLE IceHockeyPlayers (PlayerID INT, Name VARCHAR(50)); CREATE TABLE IceHockeyPenalties (PlayerID INT, MatchID INT, PenaltyMinutes INT);","SELECT SUM(PenaltyMinutes) FROM IceHockeyPenalties INNER JOIN (SELECT PlayerID, SUM(PenaltyMinutes) as TotalPenaltyMinutes FROM IceHockeyPenalties GROUP BY PlayerID HAVING SUM(PenaltyMinutes) > 500) as Subquery ON IceHockeyPenalties.PlayerID = Subquery.PlayerID;",SELECT SUM(IceHockeyPenalties.PenaltyMinutes) FROM IceHockeyPlayers INNER JOIN IceHockeyPenalties ON IceHockeyPlayers.PlayerID = IceHockeyPenalties.PlayerID WHERE IceHockeyPenalties.PenaltyMinutes > 500;,0 Which products have been sold in stores located in Asia with a total quantity of more than 100?,"CREATE TABLE stores (id INT PRIMARY KEY, name VARCHAR(50), country VARCHAR(50), region VARCHAR(50)); CREATE TABLE inventory (id INT PRIMARY KEY, store_id INT, product_id INT, quantity INT, FOREIGN KEY (store_id) REFERENCES stores(id), FOREIGN KEY (product_id) REFERENCES products(id)); CREATE TABLE products (id INT PRIMARY KEY, name VARCHAR(50), price DECIMAL(5,2), supplier_id INT, FOREIGN KEY (supplier_id) REFERENCES suppliers(id));","SELECT products.name AS product_name, SUM(inventory.quantity) AS total_quantity FROM products INNER JOIN inventory ON products.id = inventory.product_id INNER JOIN stores ON inventory.store_id = stores.id WHERE stores.region = 'Asia' GROUP BY products.name HAVING total_quantity > 100;",SELECT p.name FROM products p JOIN inventory i ON p.id = i.product_id JOIN stores s ON i.store_id = s.id JOIN inventory i ON p.supplier_id = i.supplier_id WHERE s.region = 'Asia' AND i.quantity > 100;,0 What are the total claim amounts for policyholders who have made claims in both the car and health insurance categories?,"CREATE TABLE car_claims (policyholder_name TEXT, claim_amount INTEGER); CREATE TABLE health_claims (policyholder_name TEXT, claim_amount INTEGER); ",SELECT SUM(claim_amount) FROM car_claims WHERE policyholder_name IN (SELECT policyholder_name FROM health_claims);,SELECT SUM(car_claims.claim_amount) FROM car_claims INNER JOIN health_claims ON car_claims.policyholder_name = health_claims.policyholder_name;,0 "Find the top 5 countries with the most user engagement on posts related to ""travel"" in 2022.","CREATE TABLE posts (id INT, content TEXT, likes INT, created_at TIMESTAMP, user_location VARCHAR(255)); CREATE VIEW user_country AS SELECT user_location, COUNT(DISTINCT id) AS num_users FROM users GROUP BY user_location;","SELECT user_country.user_location, SUM(posts.likes) AS total_likes FROM posts JOIN user_country ON posts.user_location = user_country.user_location WHERE posts.content LIKE '%travel%' AND YEAR(posts.created_at) = 2022 GROUP BY user_country.user_location ORDER BY total_likes DESC LIMIT 5;","SELECT user_country, SUM(likes) as total_likes FROM posts WHERE content LIKE '%travel%' AND created_at >= '2022-01-01' AND created_at '2023-01-01' GROUP BY user_country ORDER BY total_likes DESC LIMIT 5;",0 "What Loss had an Attendance of 17,675?","CREATE TABLE table_name_27 (loss VARCHAR, attendance VARCHAR);","SELECT loss FROM table_name_27 WHERE attendance = ""17,675"";","SELECT loss FROM table_name_27 WHERE attendance = ""17,675"";",1 What is the number of customers with financial capability in Oceania?,"CREATE TABLE financial_capability_oceania (id INT, customer_id INT, country VARCHAR(255), capable BOOLEAN); ","SELECT COUNT(*) FROM financial_capability_oceania WHERE capable = true AND country IN ('Australia', 'New Zealand');",SELECT COUNT(*) FROM financial_capability_oceania WHERE country = 'Oceania' AND capable = true;,0 What is the average property price in the 'urban' neighborhood?,"CREATE TABLE property (id INT, price FLOAT, neighborhood VARCHAR(20)); ",SELECT AVG(price) FROM property WHERE neighborhood = 'urban';,SELECT AVG(price) FROM property WHERE neighborhood = 'urban';,1 What is the Chassis from before 1997 with a Lamborghini v12 engine?,"CREATE TABLE table_name_98 (chassis VARCHAR, year VARCHAR, engine VARCHAR);","SELECT chassis FROM table_name_98 WHERE year < 1997 AND engine = ""lamborghini v12"";","SELECT chassis FROM table_name_98 WHERE year 1997 AND engine = ""lamborghini v12"";",0 What was the smallest crowd at a game when Richmond was the away team?,"CREATE TABLE table_name_6 (crowd INTEGER, away_team VARCHAR);","SELECT MIN(crowd) FROM table_name_6 WHERE away_team = ""richmond"";","SELECT MIN(crowd) FROM table_name_6 WHERE away_team = ""richmond"";",1 What is the total number of posts in German?,"CREATE TABLE posts (id INT, language VARCHAR(255)); ",SELECT COUNT(*) FROM posts WHERE language = 'German';,SELECT COUNT(*) FROM posts WHERE language = 'German';,1 Where was the game with result 7-2 played?,"CREATE TABLE table_name_11 (venue VARCHAR, result VARCHAR);","SELECT venue FROM table_name_11 WHERE result = ""7-2"";","SELECT venue FROM table_name_11 WHERE result = ""7-2"";",1 What is the minimum mental health parity score for patients by community health worker?,"CREATE TABLE community_health_workers (worker_id INT, name VARCHAR(20)); CREATE TABLE patients (patient_id INT, mental_health_parity_score INT, worker_id INT); ","SELECT MIN(mental_health_parity_score), worker_id FROM patients GROUP BY worker_id;","SELECT c.name, MIN(p.mental_health_parity_score) FROM community_health_workers c JOIN patients p ON c.worker_id = p.worker_id GROUP BY c.name;",0 What did the phase 2b status target?,"CREATE TABLE table_name_50 (indication VARCHAR, status VARCHAR);","SELECT indication FROM table_name_50 WHERE status = ""phase 2b"";","SELECT indication FROM table_name_50 WHERE status = ""phase 2b"";",1 What is the number of laps of the grid larger than 22 with a +1:29.001 time?,"CREATE TABLE table_name_44 (laps VARCHAR, grid VARCHAR, time VARCHAR);","SELECT laps FROM table_name_44 WHERE grid > 22 AND time = ""+1:29.001"";","SELECT COUNT(laps) FROM table_name_44 WHERE grid > 22 AND time = ""+1:29.001"";",0 What is the total capacity for fish farming in Colombia?,"CREATE TABLE Farm (FarmID INT, FishSpecies VARCHAR(50), Capacity INT, Location VARCHAR(50)); ",SELECT SUM(Capacity) FROM Farm WHERE Location = 'Colombia';,SELECT SUM(Capacity) FROM Farm WHERE Location = 'Colombia';,1 What is the total volume of timber sold by each supplier in a specific year?,"CREATE TABLE Suppliers (SupplierID int, SupplierName varchar(50)); CREATE TABLE Sales (SaleID int, SupplierID int, TimberVolume float, SaleYear int); ","SELECT Suppliers.SupplierName, Sales.SaleYear, SUM(Sales.TimberVolume) as TotalTimberVolume FROM Suppliers INNER JOIN Sales ON Suppliers.SupplierID = Sales.SupplierID GROUP BY Suppliers.SupplierName, Sales.SaleYear;","SELECT s.SupplierName, SUM(s.TimberVolume) as TotalTimberVolume FROM Suppliers s INNER JOIN Sales s ON s.SupplierID = s.SupplierID WHERE s.SaleYear = YEAR(CURRENT_DATE) GROUP BY s.SupplierName;",0 What is the average word count of articles that were published in 2020?,"CREATE TABLE Articles (id INT, publication_date DATE, word_count INT); ",SELECT AVG(word_count) as avg_word_count FROM Articles WHERE YEAR(publication_date) = 2020;,SELECT AVG(word_count) FROM Articles WHERE YEAR(publication_date) = 2020;,0 What is the date of game 59?,"CREATE TABLE table_name_96 (date VARCHAR, game VARCHAR);",SELECT date FROM table_name_96 WHERE game = 59;,SELECT date FROM table_name_96 WHERE game = 59;,1 What is the average daily production of oil from wells owned by Chevron in the Marcellus Shale?,"CREATE TABLE well_production (well_id INT, company VARCHAR(255), basin VARCHAR(255), daily_production INT); ",SELECT AVG(daily_production) FROM well_production WHERE company = 'Chevron' AND basin = 'Marcellus Shale';,SELECT AVG(daily_production) FROM well_production WHERE company = 'Chevron' AND basin = 'Marcellus Shale';,1 "Identify the daily trend of user posts about 'veganism' in the past month, and the average number of likes for those posts.","CREATE TABLE users (user_id INT, username VARCHAR(255), post_date DATE); CREATE TABLE posts (post_id INT, user_id INT, content VARCHAR(255), likes INT, post_date DATE);","SELECT DATE(p.post_date) as post_day, COUNT(p.post_id) as daily_posts, AVG(p.likes) as avg_likes FROM posts p INNER JOIN users u ON p.user_id = u.user_id WHERE p.content LIKE '%veganism%' AND p.post_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) GROUP BY post_day ORDER BY post_day;","SELECT users.username, AVG(posts.likes) as avg_likes FROM users INNER JOIN posts ON users.user_id = posts.user_id WHERE posts.content LIKE '%veganism%' AND posts.post_date >= DATEADD(month, -1, GETDATE()) GROUP BY users.username;",0 Which country has a score of 71-72-73-69=285?,"CREATE TABLE table_name_44 (country VARCHAR, score VARCHAR);",SELECT country FROM table_name_44 WHERE score = 71 - 72 - 73 - 69 = 285;,SELECT country FROM table_name_44 WHERE score = 71 - 72 - 73 - 69 = 285;,1 "What is the total number of fish in each aquaculture farm, and which farms have the highest total number of fish?","CREATE TABLE FarmStocks (FarmID INT, Species VARCHAR(20), Quantity INT); CREATE TABLE Farms (FarmID INT, FarmName VARCHAR(50)); ","SELECT FarmName, SUM(Quantity) FROM FarmStocks JOIN Farms ON FarmStocks.FarmID = Farms.FarmID GROUP BY FarmName ORDER BY SUM(Quantity) DESC;","SELECT f.FarmName, SUM(fs.Quantity) as TotalQuantity FROM FarmStocks fs JOIN Farms f ON fs.FarmID = f.FarmID GROUP BY f.FarmName ORDER BY TotalQuantity DESC;",0 What is the total number of fans for each basketball team by age group?,"CREATE TABLE fan_demographics (fan_id INT, age INT, team_id INT); CREATE TABLE teams (team_id INT, team_name VARCHAR(255), sport VARCHAR(255)); CREATE TABLE age_groups (age_group VARCHAR(255), min_age INT, max_age INT); ","SELECT t.team_name, ag.age_group, COUNT(fd.fan_id) fan_count FROM fan_demographics fd JOIN teams t ON fd.team_id = t.team_id JOIN age_groups ag ON fd.age BETWEEN ag.min_age AND ag.max_age WHERE t.sport = 'Basketball' GROUP BY t.team_name, ag.age_group;","SELECT ag.age_group, COUNT(fd.fan_id) as total_fans FROM fan_demographics fd JOIN teams t ON fd.team_id = t.team_id JOIN age_groups ag ON t.team_id = ag.age_group GROUP BY ag.age_group;",0 Name the averae top 25 with events less than 0,"CREATE TABLE table_name_31 (top_25 INTEGER, events INTEGER);",SELECT AVG(top_25) FROM table_name_31 WHERE events < 0;,SELECT MAX(top_25) FROM table_name_31 WHERE events 0;,0 What is the average age of audience members who attended performing arts events in urban areas of New York and Pennsylvania?,"CREATE TABLE Events (id INT, state VARCHAR(2), city VARCHAR(20), category VARCHAR(20), attendees INT, event_date DATE); CREATE TABLE Audience (id INT, state VARCHAR(2), zip INT, age INT); CREATE TABLE Zipcodes (zip INT, city VARCHAR(20), urban VARCHAR(5)); ","SELECT AVG(Audience.age) FROM Events INNER JOIN Audience ON Events.state = Audience.state INNER JOIN Zipcodes ON Audience.zip = Zipcodes.zip WHERE urban = 'yes' AND Events.category IN ('Theater', 'Dance') AND Events.state IN ('NY', 'PA');","SELECT AVG(Audience.age) FROM Audience INNER JOIN Events ON Audience.state = Events.state INNER JOIN Zipcodes ON Audience.zip = Zipcodes.zip WHERE Events.category = 'Performing Arts' AND Events.city IN ('New York', 'Pennsylvania');",0 Delete all records with a donation amount greater than 5000 in the 'donations' table.,"CREATE TABLE donations (donation_id INT, donor_id INT, donation_amount DECIMAL(10,2));",DELETE FROM donations WHERE donation_amount > 5000;,DELETE FROM donations WHERE donation_amount > 5000;,1 Please show the team that has the most number of technicians.,CREATE TABLE technician (Team VARCHAR);,SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1;,SELECT Team FROM technician ORDER BY COUNT(*) DESC LIMIT 1;,0 What was the position in 2006?,"CREATE TABLE table_name_66 (pos VARCHAR, year VARCHAR);",SELECT pos FROM table_name_66 WHERE year = 2006;,SELECT pos FROM table_name_66 WHERE year = 2006;,1 Find the total grant amount awarded to faculty members in the College of Fine Arts who are from outside the United States.,"CREATE TABLE faculty (id INT, name VARCHAR(50), department VARCHAR(50), country VARCHAR(50)); CREATE TABLE grants (id INT, faculty_id INT, amount INT); ",SELECT SUM(amount) FROM grants INNER JOIN faculty ON grants.faculty_id = faculty.id WHERE country != 'USA';,SELECT SUM(grants.amount) FROM grants INNER JOIN faculty ON grants.faculty_id = faculty.id WHERE faculty.department = 'College of Fine Arts' AND faculty.country!= 'USA';,0 What is the NHL team that has a team (League) of Mississauga Icedogs (ohl)?,"CREATE TABLE table_name_59 (nhl_team VARCHAR, college_junior_club_team__league_ VARCHAR);","SELECT nhl_team FROM table_name_59 WHERE college_junior_club_team__league_ = ""mississauga icedogs (ohl)"";","SELECT nhl_team FROM table_name_59 WHERE college_junior_club_team__league_ = ""mississauga icedogs (ohl)"";",1 How much is the total with a time at 16:00 and score for set 3 of 18–25?,"CREATE TABLE table_name_41 (total VARCHAR, time VARCHAR, set_3 VARCHAR);","SELECT total FROM table_name_41 WHERE time = ""16:00"" AND set_3 = ""18–25"";","SELECT COUNT(total) FROM table_name_41 WHERE time = ""16:00"" AND set_3 = ""18–25"";",0 What's the average crowd size when the venue is western oval?,"CREATE TABLE table_name_91 (crowd INTEGER, venue VARCHAR);","SELECT AVG(crowd) FROM table_name_91 WHERE venue = ""western oval"";","SELECT AVG(crowd) FROM table_name_91 WHERE venue = ""western oval"";",1 "What was the average year for a coin that had a mintage smaller than 10,000?","CREATE TABLE table_name_13 (year INTEGER, mintage INTEGER);",SELECT AVG(year) FROM table_name_13 WHERE mintage < 10 OFFSET 000;,SELECT AVG(year) FROM table_name_13 WHERE mintage 10000;,0 Who was the home team in the match with an away team of Millwall?,"CREATE TABLE table_name_6 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_6 WHERE away_team = ""millwall"";","SELECT home_team FROM table_name_6 WHERE away_team = ""millwall"";",1 List the year in which the driver was in 1st place.,"CREATE TABLE table_25561038_1 (season VARCHAR, position VARCHAR);","SELECT season FROM table_25561038_1 WHERE position = ""1st"";","SELECT season FROM table_25561038_1 WHERE position = ""1st"";",1 From what catalog was the release from Sundazed label?,"CREATE TABLE table_name_33 (catalog VARCHAR, label VARCHAR);","SELECT catalog FROM table_name_33 WHERE label = ""sundazed"";","SELECT catalog FROM table_name_33 WHERE label = ""sundazed"";",1 "Which countries have manufacturing facilities that produce more than 5000 units per month, and list the corresponding facility name and production capacity.","CREATE TABLE facilities_production (id INT, country VARCHAR(50), facility_name VARCHAR(50), production_capacity INT); ","SELECT country, facility_name, production_capacity FROM facilities_production WHERE production_capacity > 5000;","SELECT country, facility_name, production_capacity FROM facilities_production WHERE production_capacity > 5000;",1 What country had the runner abubaker kaki khamis in lane 5?,"CREATE TABLE table_name_9 (country VARCHAR, lane VARCHAR, name VARCHAR);","SELECT country FROM table_name_9 WHERE lane = 5 AND name = ""abubaker kaki khamis"";","SELECT country FROM table_name_9 WHERE lane = 5 AND name = ""runner abubaker kaki khamis"";",0 Report the number of threat intelligence metrics collected by each agency for the category 'Cyber Attacks'.,"CREATE TABLE threat_intelligence_cyber (metric_id INT, agency VARCHAR(255), category VARCHAR(255));","SELECT agency, COUNT(*) as cyber_attack_metrics FROM threat_intelligence_cyber WHERE category = 'Cyber Attacks' GROUP BY agency;","SELECT agency, COUNT(*) FROM threat_intelligence_cyber WHERE category = 'Cyber Attacks' GROUP BY agency;",0 What is the maximum depth of all trenches in the Atlantic region?,"CREATE TABLE ocean_trenches (id INT, trench_name TEXT, region TEXT, max_depth INT); ",SELECT MAX(max_depth) FROM ocean_trenches WHERE region = 'Atlantic';,SELECT MAX(max_depth) FROM ocean_trenches WHERE region = 'Atlantic';,1 Delete peacekeeping operation records with missing start dates,"CREATE TABLE peacekeeping (id INT PRIMARY KEY, operation_name VARCHAR(100), start_date DATE, end_date DATE, status VARCHAR(50));",DELETE FROM peacekeeping WHERE start_date IS NULL;,DELETE FROM peacekeeping WHERE start_date IS NULL;,1 what is the highest goals against when the wins is less than 1?,"CREATE TABLE table_name_54 (goals_against INTEGER, wins INTEGER);",SELECT MAX(goals_against) FROM table_name_54 WHERE wins < 1;,SELECT MAX(goals_against) FROM table_name_54 WHERE wins 1;,0 "Between November 25–30, 2008 the sellout rate was at 75%, indicating that the ration between shows to sellout was what?","CREATE TABLE table_22123920_4 (shows___sellout VARCHAR, sellout___percentage_ VARCHAR);","SELECT shows___sellout FROM table_22123920_4 WHERE sellout___percentage_ = ""75%"";","SELECT shows___sellout FROM table_22123920_4 WHERE sellout___percentage_ = ""75%"";",1 "What is Place, when Player is ""Mike Souchak""?","CREATE TABLE table_name_68 (place VARCHAR, player VARCHAR);","SELECT place FROM table_name_68 WHERE player = ""mike souchak"";","SELECT place FROM table_name_68 WHERE player = ""mike souchak"";",1 who is the provider when up (up to kbit/s) is 1180?,"CREATE TABLE table_name_10 (provider VARCHAR, up__up_to_kbit_s_ VARCHAR);",SELECT provider FROM table_name_10 WHERE up__up_to_kbit_s_ = 1180;,SELECT provider FROM table_name_10 WHERE up__up_to_kbit_s_ = 1180;,1 What is the water usage of 'Ethical Supplies'?,"CREATE TABLE suppliers (id INT PRIMARY KEY, name VARCHAR(100)); CREATE TABLE sustainability_reports (id INT PRIMARY KEY, company_id INT, year INT, water_usage INT); ",SELECT sr.water_usage FROM suppliers s INNER JOIN sustainability_reports sr ON s.id = sr.company_id WHERE s.name = 'Ethical Supplies';,SELECT water_usage FROM sustainability_reports WHERE company_id = (SELECT id FROM suppliers WHERE name = 'Ethical Supplies');,0 What is the name of the hospital with id 1?,"CREATE TABLE rural_hospitals( hospital_id INT PRIMARY KEY, name VARCHAR(255), bed_count INT, rural_population_served INT);",SELECT name FROM rural_hospitals WHERE hospital_id = 1;,SELECT name FROM rural_hospitals WHERE hospital_id = 1;,1 What are the medical conditions and dates for the top 25% of medical conditions by date?,"CREATE TABLE medical (id INT, astronaut_id INT, medical_condition VARCHAR(50), medical_date DATE); ","SELECT medical_condition, medical_date FROM (SELECT medical_condition, medical_date, NTILE(4) OVER (ORDER BY medical_date) as medical_group FROM medical) AS subquery WHERE medical_group = 4;","SELECT medical_condition, medical_date FROM medical ORDER BY medical_date DESC LIMIT 1;",0 How many safety incidents were reported per month in the chemical manufacturing plant located in New Delhi in 2021?,"CREATE TABLE safety_incidents_india (plant_location VARCHAR(50), incident_date DATE); ","SELECT date_format(incident_date, '%Y-%m') as month, count(*) as total_incidents FROM safety_incidents_india WHERE plant_location = 'New Delhi chemical plant' GROUP BY month;","SELECT EXTRACT(MONTH FROM incident_date) AS month, COUNT(*) FROM safety_incidents_india WHERE plant_location = 'New Delhi' AND EXTRACT(YEAR FROM incident_date) = 2021 GROUP BY month;",0 What is the average water consumption per textile type?,"CREATE TABLE textiles (textile_id INT, textile_name VARCHAR(50), country VARCHAR(50), water_consumption INT); ","SELECT textile_name, AVG(water_consumption) as avg_water_consumption FROM textiles GROUP BY textile_name;","SELECT textile_name, AVG(water_consumption) as avg_water_consumption FROM textiles GROUP BY textile_name;",1 Which loss has a Record of 54-39?,"CREATE TABLE table_name_68 (loss VARCHAR, record VARCHAR);","SELECT loss FROM table_name_68 WHERE record = ""54-39"";","SELECT loss FROM table_name_68 WHERE record = ""54-39"";",1 "Show the total revenue for each region in the ""regional_sales"" and ""regions"" tables, considering only regions with at least one sale.","CREATE TABLE regions (id INT PRIMARY KEY, region_name VARCHAR(50)); CREATE TABLE regional_sales (id INT PRIMARY KEY, plan_id INT, region_id INT, quantity INT); ","SELECT r.region_name, SUM(regional_sales.quantity * plans.monthly_cost) AS total_revenue FROM regional_sales INNER JOIN plans ON regional_sales.plan_id = plans.id INNER JOIN regions ON regional_sales.region_id = regions.id GROUP BY regions.region_name HAVING COUNT(regions.id) > 0;","SELECT r.region_name, SUM(rs.quantity) as total_revenue FROM regions r JOIN regional_sales rs ON r.id = rs.region_id GROUP BY r.region_name;",0 Name the average goal difference for draw of 7 and played more than 18,"CREATE TABLE table_name_2 (goal_difference INTEGER, draw VARCHAR, played VARCHAR);",SELECT AVG(goal_difference) FROM table_name_2 WHERE draw = 7 AND played > 18;,SELECT AVG(goal_difference) FROM table_name_2 WHERE draw = 7 AND played > 18;,1 What's the against when the draw was more than 0 and had 13 losses?,"CREATE TABLE table_name_47 (against VARCHAR, losses VARCHAR, draws VARCHAR);",SELECT COUNT(against) FROM table_name_47 WHERE losses = 13 AND draws > 0;,SELECT against FROM table_name_47 WHERE losses = 13 AND draws > 0;,0 Who is the oldest donor in Sydney?,"CREATE TABLE donors (id INT PRIMARY KEY, name TEXT, age INT, city TEXT, amount_donated DECIMAL(10,2)); ","SELECT name, age FROM donors WHERE id = (SELECT MIN(id) FROM donors WHERE age = (SELECT MAX(age) FROM donors));",SELECT name FROM donors WHERE city = 'Sydney' ORDER BY age DESC LIMIT 1;,0 Which combined score has an overall of 8?,"CREATE TABLE table_name_80 (combined VARCHAR, overall VARCHAR);","SELECT combined FROM table_name_80 WHERE overall = ""8"";",SELECT combined FROM table_name_80 WHERE overall = 8;,0 How many ethical fashion brands have implemented water recycling systems in the past 3 years?,"CREATE TABLE WaterRecyclingSystems(brand VARCHAR(255), implementation_year INT);","SELECT brand, COUNT(*) FROM WaterRecyclingSystems WHERE implementation_year >= YEAR(CURRENT_DATE) - 3 GROUP BY brand HAVING COUNT(*) > 0;",SELECT COUNT(*) FROM WaterRecyclingSystems WHERE implementation_year >= YEAR(CURRENT_DATE) - 3;,0 What is the Total for the Player with a To par of +11?,"CREATE TABLE table_name_17 (total INTEGER, to_par VARCHAR);","SELECT MAX(total) FROM table_name_17 WHERE to_par = ""+11"";","SELECT SUM(total) FROM table_name_17 WHERE to_par = ""+11"";",0 What are the menu items that are served by restaurants in both 'NYC' and 'San Francisco'?,"CREATE TABLE Restaurants (RestaurantID INT, Name VARCHAR(50), Location VARCHAR(50)); CREATE TABLE MenuItems (MenuItemID INT, RestaurantID INT, Name VARCHAR(50), Price DECIMAL(5,2));",SELECT MenuItems.Name FROM MenuItems JOIN Restaurants ON MenuItems.RestaurantID = Restaurants.RestaurantID WHERE Restaurants.Location = 'NYC' INTERSECT SELECT MenuItems.Name FROM MenuItems JOIN Restaurants ON MenuItems.RestaurantID = Restaurants.RestaurantID WHERE Restaurants.Location = 'San Francisco';,"SELECT MenuItems.Name FROM MenuItems INNER JOIN Restaurants ON MenuItems.RestaurantID = Restaurants.RestaurantID WHERE Restaurants.Location IN ('NYC', 'San Francisco') GROUP BY MenuItems.Name HAVING COUNT(DISTINCT Restaurants.Location) = 2;",0 What percentage was the others vote when McCain had 52.9% and less than 45205.0 voters?,"CREATE TABLE table_20693870_1 (others_percentage VARCHAR, mccain_percentage VARCHAR, mccain_number VARCHAR);","SELECT others_percentage FROM table_20693870_1 WHERE mccain_percentage = ""52.9%"" AND mccain_number < 45205.0;","SELECT others_percentage FROM table_20693870_1 WHERE mccain_percentage = ""52.9%"" AND mccain_number 45205.0;",0 What is the total number of Tuberculosis cases reported in Chicago in 2020?,"CREATE TABLE CasesByYear (CaseID INT, Age INT, Gender VARCHAR(10), City VARCHAR(20), Disease VARCHAR(20), Year INT); ",SELECT COUNT(*) FROM CasesByYear WHERE City = 'Chicago' AND Year = 2020 AND Disease = 'Tuberculosis';,SELECT COUNT(*) FROM CasesByYear WHERE City = 'Chicago' AND Disease = 'Tuberculosis' AND Year = 2020;,0 Insert missing vessel_performance records with average values,"CREATE TABLE vessel_performance_averages (vessel_id INT, avg_engine_power INT, avg_fuel_consumption INT); ","INSERT INTO vessel_performance (vessel_id, engine_power, fuel_consumption) SELECT vpavg.vessel_id, vpavg.avg_engine_power, vpavg.avg_fuel_consumption FROM vessel_performance_averages vpavg LEFT JOIN vessel_performance vp ON vpavg.vessel_id = vp.vessel_id WHERE vp.vessel_id IS NULL;","INSERT INTO vessel_performance_averages (vessel_id, avg_engine_power, avg_fuel_consumption) VALUES (1, 'A', 'A');",0 What is the highest number of matches?,CREATE TABLE table_16570286_2 (matches INTEGER);,SELECT MAX(matches) FROM table_16570286_2;,SELECT MAX(matches) FROM table_16570286_2;,1 Name the Prominence of the Mountain Peak of matchless mountain pb?,"CREATE TABLE table_name_81 (prominence VARCHAR, mountain_peak VARCHAR);","SELECT prominence FROM table_name_81 WHERE mountain_peak = ""matchless mountain pb"";","SELECT prominence FROM table_name_81 WHERE mountain_peak = ""matchless mountain pb"";",1 Who was the lead when Jamie Meikle was the skip?,"CREATE TABLE table_name_11 (lead VARCHAR, skip VARCHAR);","SELECT lead FROM table_name_11 WHERE skip = ""jamie meikle"";","SELECT lead FROM table_name_11 WHERE skip = ""jamie meikle"";",1 How many wrestlers are recorded for the chamber that's method of elimination was pinned after being hit by a lead pipe? ,"CREATE TABLE table_24628683_2 (wrestler VARCHAR, method_of_elimination VARCHAR);","SELECT COUNT(wrestler) FROM table_24628683_2 WHERE method_of_elimination = ""Pinned after being hit by a lead pipe"";","SELECT COUNT(wrestler) FROM table_24628683_2 WHERE method_of_elimination = ""Pinned"";",0 What was the first year Fabrice Soulier was a runner-up?,"CREATE TABLE table_name_43 (year INTEGER, runner_up VARCHAR);","SELECT MIN(year) FROM table_name_43 WHERE runner_up = ""fabrice soulier"";","SELECT MIN(year) FROM table_name_43 WHERE runner_up = ""fabrice soulier"";",1 What is the minimum case duration for cases in the civil category?,"CREATE TABLE cases (case_id INT, category VARCHAR(255), case_duration INT); ",SELECT MIN(case_duration) FROM cases WHERE category = 'Civil';,SELECT MIN(case_duration) FROM cases WHERE category = 'civil';,0 What is the maximum number of total employees in workplaces that have successful collective bargaining?,"CREATE TABLE workplaces (id INT, name TEXT, location TEXT, sector TEXT, total_employees INT, union_members INT, successful_cb BOOLEAN, cb_year INT);",SELECT MAX(total_employees) FROM workplaces WHERE successful_cb = TRUE;,SELECT MAX(total_employees) FROM workplaces WHERE successful_cb = TRUE;,1 "Which chassis had Rounds of 7, and an Entrant of Ecurie Rosier?","CREATE TABLE table_name_15 (chassis VARCHAR, rounds VARCHAR, entrant VARCHAR);","SELECT chassis FROM table_name_15 WHERE rounds = ""7"" AND entrant = ""ecurie rosier"";","SELECT chassis FROM table_name_15 WHERE rounds = 7 AND entrant = ""ecurie rosier"";",0 On how many different dates was event 1 Suspension Bridge?,"CREATE TABLE table_17257687_1 (air_date VARCHAR, event_1 VARCHAR);","SELECT COUNT(air_date) FROM table_17257687_1 WHERE event_1 = ""Suspension Bridge"";","SELECT COUNT(air_date) FROM table_17257687_1 WHERE event_1 = ""Suspension Bridge"";",1 Determine the number of factories in each location and the average worker count.,"CREATE TABLE factories (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), capacity INT); CREATE TABLE labor_practices (id INT PRIMARY KEY, factory_id INT, worker_count INT); ","SELECT f.location, COUNT(f.id) AS factory_count, AVG(lp.worker_count) AS avg_worker_count FROM factories f INNER JOIN labor_practices lp ON f.id = lp.factory_id GROUP BY f.location;","SELECT f.location, COUNT(lp.factory_id) as num_factories, AVG(lp.worker_count) as avg_worker_count FROM factories f JOIN labor_practices lp ON f.id = lp.factory_id GROUP BY f.location;",0 What candidates were in the election when james patrick sutton was incumbent?,"CREATE TABLE table_1342013_41 (candidates VARCHAR, incumbent VARCHAR);","SELECT candidates FROM table_1342013_41 WHERE incumbent = ""James Patrick Sutton"";","SELECT candidates FROM table_1342013_41 WHERE incumbent = ""James Patrick Sutton"";",1 "What is the average number of international visitors for each continent, and the total number of visitors worldwide?","CREATE TABLE global_tourism (destination VARCHAR(255), continent VARCHAR(255), visitors INT); ","SELECT continent, AVG(visitors) as avg_visitors_per_continent, SUM(visitors) as total_visitors_worldwide FROM global_tourism GROUP BY continent;","SELECT continent, AVG(visitors) as avg_visitors, SUM(visitors) as total_visitors FROM global_tourism GROUP BY continent;",0 Insert a new satellite 'Tanpopo' launched by Japan in 2013 into the 'satellites' table,"CREATE TABLE satellites (id INT PRIMARY KEY, name VARCHAR(50), launch_year INT, country VARCHAR(50));","INSERT INTO satellites (id, name, launch_year, country) VALUES (6, 'Tanpopo', 2013, 'Japan');","INSERT INTO satellites (id, name, launch_year, country) VALUES (1, 'Tanpopo', 'Japan', 2013);",0 Which donors have contributed the most to a specific program?,"CREATE TABLE donations (id INT, donor_name VARCHAR, donation_amount DECIMAL, donation_date DATE, program VARCHAR); ","SELECT donor_name, SUM(donation_amount) FROM donations WHERE program = 'Education' GROUP BY donor_name ORDER BY SUM(donation_amount) DESC;","SELECT donor_name, SUM(donation_amount) as total_donation FROM donations WHERE program = 'Program A' GROUP BY donor_name ORDER BY total_donation DESC LIMIT 1;",0 What is the total number of electric buses in the German public transportation system?,"CREATE TABLE public_transportation (id INT, country VARCHAR(255), type VARCHAR(255), quantity INT); ",SELECT SUM(quantity) FROM public_transportation WHERE country = 'Germany' AND type = 'Electric Bus';,SELECT SUM(quantity) FROM public_transportation WHERE country = 'Germany' AND type = 'Electric Bus';,1 Name the home with visitor of kings,"CREATE TABLE table_name_81 (home VARCHAR, visitor VARCHAR);","SELECT home FROM table_name_81 WHERE visitor = ""kings"";","SELECT home FROM table_name_81 WHERE visitor = ""kings"";",1 What is the title that had 13.59 u.s. viewers (millions)?,"CREATE TABLE table_22078691_2 (title VARCHAR, us_viewers__millions_ VARCHAR);","SELECT title FROM table_22078691_2 WHERE us_viewers__millions_ = ""13.59"";","SELECT title FROM table_22078691_2 WHERE us_viewers__millions_ = ""13.59"";",1 "Who is the winning driver of Penske Racing, and what was Rick Mears' pole position?","CREATE TABLE table_name_30 (winning_driver VARCHAR, winning_team VARCHAR, pole_position VARCHAR);","SELECT winning_driver FROM table_name_30 WHERE winning_team = ""penske racing"" AND pole_position = ""rick mears"";","SELECT winning_driver FROM table_name_30 WHERE winning_team = ""penske racing"" AND pole_position = ""rick mears"";",1 What are the top 3 countries with the highest CO2 emissions from chemical manufacturing?,"CREATE TABLE CO2_Emissions (Country VARCHAR(255), Emission_Amount INT); ","SELECT Country, Emission_Amount FROM CO2_Emissions ORDER BY Emission_Amount DESC LIMIT 3;","SELECT Country, Emission_Amount FROM CO2_Emissions ORDER BY Emission_Amount DESC LIMIT 3;",1 What is the total number of members in the 'healthcare_union' table?,"CREATE TABLE healthcare_union (member_id INT, union_name VARCHAR(20)); ",SELECT COUNT(*) FROM healthcare_union;,SELECT COUNT(*) FROM healthcare_union;,1 Which bioprocess engineering projects have received funding from VCs in the past year?,"CREATE TABLE Funding (project_id INT, project_name TEXT, funding_amount FLOAT, funding_date DATE); CREATE VIEW BioprocessEngineeringProjects AS SELECT * FROM Projects WHERE domain = 'Bioprocess Engineering';","SELECT project_id, project_name FROM Funding INNER JOIN BioprocessEngineeringProjects ON Funding.project_id = BioprocessEngineeringProjects.project_id WHERE funding_date >= DATEADD(year, -1, GETDATE());","SELECT project_name FROM BioprocessEngineeringProjects WHERE funding_date >= DATEADD(year, -1, GETDATE());",0 What was the total revenue for the state of New York in the third quarter of 2022?,"CREATE TABLE sales (id INT, state VARCHAR(50), month VARCHAR(50), revenue FLOAT); ",SELECT SUM(revenue) FROM sales WHERE state = 'New York' AND (month = 'July' OR month = 'August' OR month = 'September');,SELECT SUM(revenue) FROM sales WHERE state = 'New York' AND month = 'third quarter';,0 Get the total waste generation in EMEA for countries with a generation rate greater than 5.,"CREATE TABLE WasteGenerationEMEA (id INT, country VARCHAR(50), region VARCHAR(50), generation_rate FLOAT); ",SELECT SUM(generation_rate) FROM WasteGenerationEMEA WHERE generation_rate > 5 AND region = 'EMEA';,SELECT SUM(generation_rate) FROM WasteGenerationEMEA WHERE region = 'EMEA' AND generation_rate > 5;,0 What was the election result before 2004 where Eric Cantor was the incumbent?,"CREATE TABLE table_name_61 (results VARCHAR, first_elected VARCHAR, incumbent VARCHAR);","SELECT results FROM table_name_61 WHERE first_elected < 2004 AND incumbent = ""eric cantor"";","SELECT results FROM table_name_61 WHERE first_elected 2004 AND incumbent = ""eric cantor"";",0 What venue did the partnership of herschelle gibbs / justin kemp happen?,"CREATE TABLE table_name_74 (venue VARCHAR, partnerships VARCHAR);","SELECT venue FROM table_name_74 WHERE partnerships = ""herschelle gibbs / justin kemp"";","SELECT venue FROM table_name_74 WHERE partnerships = ""herschelle gibbs / justin kemp"";",1 What nation has a bronze of 2 with a total less than 5 and rank of 6?,"CREATE TABLE table_name_84 (nation VARCHAR, rank VARCHAR, bronze VARCHAR, total VARCHAR);","SELECT nation FROM table_name_84 WHERE bronze = 2 AND total < 5 AND rank = ""6"";",SELECT nation FROM table_name_84 WHERE bronze = 2 AND total 5 AND rank = 6;,0 Which city has an IATA of AUH?,"CREATE TABLE table_name_42 (city VARCHAR, iata VARCHAR);","SELECT city FROM table_name_42 WHERE iata = ""auh"";","SELECT city FROM table_name_42 WHERE iata = ""auh"";",1 "According to W3Counter, what percentage of browsers used Firefox?","CREATE TABLE table_name_60 (firefox VARCHAR, source VARCHAR);","SELECT firefox FROM table_name_60 WHERE source = ""w3counter"";","SELECT firefox FROM table_name_60 WHERE source = ""w3counter"";",1 Which countries have the highest and lowest average streams per user for Hip Hop songs on Spotify?,"CREATE TABLE UserStreamingData (UserID INT, Country VARCHAR(50), Platform VARCHAR(50), Genre VARCHAR(50), Streams INT); ","SELECT Country, AVG(Streams) as AvgStreams FROM UserStreamingData WHERE Platform = 'Spotify' AND Genre = 'Hip Hop' GROUP BY Country ORDER BY AvgStreams DESC LIMIT 1; SELECT Country, AVG(Streams) as AvgStreams FROM UserStreamingData WHERE Platform = 'Spotify' AND Genre = 'Hip Hop' GROUP BY Country ORDER BY AvgStreams ASC LIMIT 1;","SELECT Country, AVG(Streams) as AvgStreamsPerUser FROM UserStreamingData WHERE Platform = 'Spotify' AND Genre = 'Hip Hop' GROUP BY Country ORDER BY AvgStreamsPerUser DESC;",0 Can you tell me the High points that has the Date of january 31?,"CREATE TABLE table_name_32 (high_points VARCHAR, date VARCHAR);","SELECT high_points FROM table_name_32 WHERE date = ""january 31"";","SELECT high_points FROM table_name_32 WHERE date = ""january 31"";",1 "List all suppliers and their certifications, sorted alphabetically by supplier name and certification type?","CREATE TABLE suppliers (supplier_id INT, supplier_name TEXT, country TEXT); CREATE TABLE certifications (certification_id INT, supplier_id INT, certification_type TEXT); ","SELECT supplier_name, certification_type FROM suppliers JOIN certifications ON suppliers.supplier_id = certifications.supplier_id ORDER BY supplier_name, certification_type;","SELECT suppliers.supplier_name, certifications.certification_type FROM suppliers INNER JOIN certifications ON suppliers.supplier_id = certifications.supplier_id ORDER BY suppliers.supplier_name, certifications.certification_type;",0 What is the earliest number in before?,CREATE TABLE table_24108789_4 (before INTEGER);,SELECT MIN(before) FROM table_24108789_4;,SELECT MIN(before) FROM table_24108789_4;,1 What is the number of hotels in Canada that have adopted AI technology for guest services?,"CREATE TABLE hotel_tech (hotel_id INT, hotel_name VARCHAR(255), ai_adoption BOOLEAN, country VARCHAR(255)); ",SELECT COUNT(*) FROM hotel_tech WHERE ai_adoption = TRUE AND country = 'Canada';,SELECT COUNT(*) FROM hotel_tech WHERE country = 'Canada' AND ai_adoption = true;,0 What is the average number of kills per match for players who have played Apex Legends?,"CREATE TABLE matches (id INT, player_id INT, game VARCHAR(50), kills INT); ",SELECT AVG(kills) AS avg_kills_per_match FROM matches WHERE game = 'Apex Legends';,SELECT AVG(kills) FROM matches WHERE game = 'Apex Legends';,0 "List major versions released on May 12, 2009, that had a minor version of 3.2.3.","CREATE TABLE table_24257833_4 (major_version VARCHAR, release_date VARCHAR, minor_version VARCHAR);","SELECT major_version FROM table_24257833_4 WHERE release_date = ""May 12, 2009"" AND minor_version = ""3.2.3"";","SELECT major_version FROM table_24257833_4 WHERE release_date = ""May 12, 2009"" AND minor_version = ""3.2.3"";",1 "What is the total CO2 emissions, in metric tons, from the 'emissions_data' table?","CREATE TABLE emissions_data (id INT, location VARCHAR(50), year INT, co2_emissions DECIMAL(10,2)); ",SELECT SUM(co2_emissions) FROM emissions_data WHERE year BETWEEN 2019 AND 2020;,SELECT SUM(co2_emissions) FROM emissions_data;,0 What are the top 10 interests of users who engaged with political ads in the US?,"CREATE TABLE users (user_id INT, name VARCHAR(100), location VARCHAR(100), interests VARCHAR(100)); CREATE TABLE ads (ad_id INT, ad_type VARCHAR(50), location VARCHAR(100)); CREATE TABLE user_ad_interactions (user_id INT, ad_id INT);","SELECT u.interests, COUNT(*) as interaction_count FROM users u JOIN user_ad_interactions ia ON u.user_id = ia.user_id JOIN ads a ON ia.ad_id = a.ad_id WHERE a.location = 'US' AND a.ad_type = 'Political' GROUP BY u.interests ORDER BY interaction_count DESC LIMIT 10;",SELECT users.interests FROM users INNER JOIN user_ad_interactions ON users.user_id = user_ad_interactions.user_id INNER JOIN ads ON user_ad_interactions.ad_id = ads.ad_id WHERE ads.location = 'US' AND user_ad_interactions.ad_type = 'Political' GROUP BY users.interests DESC LIMIT 10;,0 Show the percentage of reactors that exceed the maximum temperature limit (80 degrees Celsius) per site.,"CREATE TABLE site (site_id INT, site_name VARCHAR(50)); CREATE TABLE reactor (reactor_id INT, site_id INT, temperature DECIMAL(5,2)); ","SELECT site_name, 100.0 * AVG(CASE WHEN temperature > 80 THEN 1 ELSE 0 END) AS pct_exceeded FROM reactor JOIN site ON reactor.site_id = site.site_id GROUP BY site_name;","SELECT site_id, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM reactor WHERE temperature > (SELECT MAX(temperature) FROM reactor WHERE temperature > (SELECT MAX(temperature) FROM reactor WHERE temperature > (SELECT MAX(temperature) FROM reactor WHERE temperature > (SELECT MAX(temperature) FROM reactor WHERE temperature > (SELECT MAX(temperature) FROM reactor WHERE site_id = site_id) FROM reactor WHERE temperature > (SELECT MAX(temperature) FROM reactor WHERE temperature > (SELECT MAX(temperature) FROM reactor WHERE site_id) FROM reactor WHERE site_id) FROM reactor WHERE site_id = site_id)) GROUP BY site_id;",0 What engine does Galles Racing use?,"CREATE TABLE table_15736385_1 (engine VARCHAR, team VARCHAR);","SELECT engine FROM table_15736385_1 WHERE team = ""Galles Racing"";","SELECT engine FROM table_15736385_1 WHERE team = ""Galles Racing"";",1 "What is the record at the opponent's venue against the team for which the record for the last 5 meetings is mu, 4-1 and the record at the neutral site is tied, 0-0?","CREATE TABLE table_16201038_4 (at_opponents_venue VARCHAR, last_5_meetings VARCHAR, at_neutral_site VARCHAR);","SELECT at_opponents_venue FROM table_16201038_4 WHERE last_5_meetings = ""MU, 4-1"" AND at_neutral_site = ""Tied, 0-0"";","SELECT at_opponents_venue FROM table_16201038_4 WHERE last_5_meetings = ""Mu, 4-1"" AND at_neutral_site = ""Tied, 0-0"";",0 "Update records in the ""labor_rights_advocacy"" table by setting the ""year"" column to 2023 for the row where the ""advocacy_type"" column is ""protest"" and the ""advocacy_id"" is 2","CREATE TABLE labor_rights_advocacy (advocacy_id INT, advocacy_type VARCHAR(10), year INT); ",UPDATE labor_rights_advocacy SET year = 2023 WHERE advocacy_type = 'protest' AND advocacy_id = 2;,UPDATE labor_rights_advocacy SET year = 2023 WHERE advocacy_type = 'protest' AND advocacy_id = 2;,1 "How many marine farms are located in the Pacific Ocean, using data from the marine_farms table?","CREATE TABLE marine_farms (farm_id INT, farm_name VARCHAR(255), location VARCHAR(255)); ",SELECT COUNT(*) FROM marine_farms WHERE location = 'Pacific Ocean';,SELECT COUNT(*) FROM marine_farms WHERE location = 'Pacific Ocean';,1 "Which regions have the least and most digital divide issues, based on the digital_divide table?","CREATE TABLE digital_divide (region VARCHAR(255), issues INT);","SELECT region, issues FROM digital_divide ORDER BY issues ASC LIMIT 1; SELECT region, issues FROM digital_divide ORDER BY issues DESC LIMIT 1;","SELECT region, MIN(issues) AS min_issues, MAX(issues) AS max_issues FROM digital_divide GROUP BY region;",0 What are the total billable hours for attorneys in the 'personal_injury' case type?,"CREATE TABLE attorney_billing(attorney_id INT, case_type VARCHAR(20), billable_hours DECIMAL(5,2)); ",SELECT SUM(billable_hours) FROM attorney_billing WHERE case_type = 'personal_injury';,SELECT SUM(billable_hours) FROM attorney_billing WHERE case_type = 'personal_injury';,1 "What is the total installed capacity (in MW) of wind power projects in Germany, France, and Spain?","CREATE TABLE wind_projects (project_id INT, country VARCHAR(50), capacity_mw FLOAT); ","SELECT SUM(capacity_mw) FROM wind_projects WHERE country IN ('Germany', 'France', 'Spain');","SELECT SUM(capacity_mw) FROM wind_projects WHERE country IN ('Germany', 'France', 'Spain');",1 Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot.,"CREATE TABLE pilot (Pilot_name VARCHAR, Pilot_ID VARCHAR, Rank VARCHAR); CREATE TABLE pilot_record (Aircraft_ID VARCHAR, Pilot_ID VARCHAR); CREATE TABLE aircraft (Fleet_Series VARCHAR, Aircraft_ID VARCHAR);","SELECT T3.Pilot_name, T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID ORDER BY T3.Rank;","SELECT T1.Pilot_name, T2.Fleet_Series FROM pilot AS T1 JOIN pilot_record AS T2 ON T1.Pilot_ID = T2.Pilot_ID JOIN aircraft AS T3 ON T1.Aircraft_ID = T3.Aircraft_ID ORDER BY T3.Rank ASC;",0 "What is the format for the catalogue number GAD 2014 CD on July 6, 1998?","CREATE TABLE table_name_40 (format VARCHAR, catalogue__number VARCHAR, date VARCHAR);","SELECT format FROM table_name_40 WHERE catalogue__number = ""gad 2014 cd"" AND date = ""july 6, 1998"";","SELECT format FROM table_name_40 WHERE catalogue__number = ""gad 2014 cd"" AND date = ""july 6, 1998"";",1 What is the highest scoring game for the top 5 NBA teams?,"CREATE TABLE teams (id INT, name TEXT, city TEXT, league TEXT, rank INT); CREATE TABLE games (id INT, home_team_id INT, away_team_id INT, points_home INT, points_away INT);","SELECT MAX(GREATEST(points_home, points_away)) FROM games JOIN teams ON games.home_team_id = teams.id OR games.away_team_id = teams.id WHERE teams.rank <= 5;","SELECT t.name, MAX(g.points_home) as max_points FROM teams t JOIN games g ON t.id = g.home_team_id JOIN teams t ON g.away_team_id = t.id WHERE t.league = 'NBA' GROUP BY t.name ORDER BY max_points DESC LIMIT 5;",0 What is listed for the Lengtht that has a Version of Single Version?,"CREATE TABLE table_name_32 (length VARCHAR, version VARCHAR);","SELECT length FROM table_name_32 WHERE version = ""single version"";","SELECT length FROM table_name_32 WHERE version = ""single version"";",1 What was the team's position when the new manager was Lucas Alcaraz?,"CREATE TABLE table_17201869_3 (position_in_table VARCHAR, replaced_by VARCHAR);","SELECT position_in_table FROM table_17201869_3 WHERE replaced_by = ""Lucas Alcaraz"";","SELECT position_in_table FROM table_17201869_3 WHERE replaced_by = ""Lucas Alcaraz"";",1 What are the total sales figures for each department?,"CREATE TABLE drugs (id INT, name VARCHAR(50), department VARCHAR(50), sales FLOAT); ","SELECT department, SUM(sales) as total_sales FROM drugs GROUP BY department;","SELECT department, SUM(sales) FROM drugs GROUP BY department;",0 "What is the label for October 21, 1981?","CREATE TABLE table_name_37 (label VARCHAR, date VARCHAR);","SELECT label FROM table_name_37 WHERE date = ""october 21, 1981"";","SELECT label FROM table_name_37 WHERE date = ""october 21, 1981"";",1 On what surface was the tournament with opponents kathleen horvath marcella mesker in the finals?,"CREATE TABLE table_name_1 (surface VARCHAR, opponents_in_the_final VARCHAR);","SELECT surface FROM table_name_1 WHERE opponents_in_the_final = ""kathleen horvath marcella mesker"";","SELECT surface FROM table_name_1 WHERE opponents_in_the_final = ""kathleen horvath marcella mesker"";",1 Name the total number of losses with number result less than 0,"CREATE TABLE table_name_5 (losses VARCHAR, no_result INTEGER);",SELECT COUNT(losses) FROM table_name_5 WHERE no_result < 0;,SELECT COUNT(losses) FROM table_name_5 WHERE no_result 0;,0 "If the proto-semitic is *bayt-, what are the geez?","CREATE TABLE table_26919_7 (geez VARCHAR, proto_semitic VARCHAR);","SELECT geez FROM table_26919_7 WHERE proto_semitic = ""*bayt-"";","SELECT geez FROM table_26919_7 WHERE proto_semitic = ""*bayt-"";",1 Who is the president from the Union for a Popular Movement party that represents the Hautes-Alpes department?,"CREATE TABLE table_name_36 (président VARCHAR, party VARCHAR, départment__or_collectivity_ VARCHAR);","SELECT président FROM table_name_36 WHERE party = ""union for a popular movement"" AND départment__or_collectivity_ = ""hautes-alpes"";","SELECT président FROM table_name_36 WHERE party = ""union for a popular movement"" AND départment__or_collectivity_ = ""hautes-Alpes"";",0 Leading Scorer of Ian rush is what lowest # of goals?,"CREATE TABLE table_name_45 (goals INTEGER, leading_scorer VARCHAR);","SELECT MIN(goals) FROM table_name_45 WHERE leading_scorer = ""ian rush"";","SELECT MIN(goals) FROM table_name_45 WHERE leading_scorer = ""ian rush"";",1 Show the revenue for each product category,"CREATE TABLE products (product_id INT, product_name VARCHAR(255), category VARCHAR(255)); CREATE TABLE sales (sale_id INT, product_id INT, revenue INT); ","SELECT products.category, SUM(sales.revenue) FROM sales INNER JOIN products ON sales.product_id = products.product_id GROUP BY products.category;","SELECT p.category, SUM(s.revenue) as total_revenue FROM products p JOIN sales s ON p.product_id = s.product_id GROUP BY p.category;",0 Find the total budget spent on defense diplomacy in the last 5 years.,"CREATE TABLE defense_diplomacy (id INT, year INT, budget INT);",SELECT SUM(budget) FROM defense_diplomacy WHERE year BETWEEN (SELECT EXTRACT(YEAR FROM NOW()) - 5) AND EXTRACT(YEAR FROM NOW());,SELECT SUM(budget) FROM defense_diplomacy WHERE year BETWEEN 2017 AND 2021;,0 What is the total energy generation from solar and wind in the province of Alberta for the year 2022?,"CREATE TABLE energy_generation (province VARCHAR(20), energy_source VARCHAR(20), generation INT, year INT); ",SELECT SUM(generation) FROM energy_generation WHERE province = 'Alberta' AND (energy_source = 'Solar' OR energy_source = 'Wind') AND year = 2022;,"SELECT SUM(generation) FROM energy_generation WHERE province = 'Alberta' AND energy_source IN ('Solar', 'Wind') AND year = 2022;",0 How many items are there in each category?,"CREATE TABLE Menu (menu_id INT PRIMARY KEY, item_name VARCHAR(255), category VARCHAR(255), price DECIMAL(5,2));","SELECT category, COUNT(*) FROM Menu GROUP BY category;","SELECT category, COUNT(*) FROM Menu GROUP BY category;",1 What was the result in the election in the Kentucky 1 district? ,"CREATE TABLE table_2668367_7 (result VARCHAR, district VARCHAR);","SELECT result FROM table_2668367_7 WHERE district = ""Kentucky 1"";","SELECT result FROM table_2668367_7 WHERE district = ""Kentucky 1"";",1 What was the crowd size for the game with a score of 101-105?,"CREATE TABLE table_name_13 (crowd VARCHAR, score VARCHAR);","SELECT crowd FROM table_name_13 WHERE score = ""101-105"";","SELECT crowd FROM table_name_13 WHERE score = ""101-105"";",1 Update the name of the founder of the company with id 3 to 'Alex',"CREATE TABLE founder (id INT, name TEXT);",UPDATE company SET founder_gender = 'Other' WHERE id = 3; UPDATE founder SET name = 'Alex' WHERE id = 3;,UPDATE founder SET name = 'Alex' WHERE id = 3;,0 "What role did John Wayne play in The Trail Beyond, directed by R.N. Bradbury?","CREATE TABLE table_name_56 (role VARCHAR, director VARCHAR, title VARCHAR);","SELECT role FROM table_name_56 WHERE director = ""r.n. bradbury"" AND title = ""the trail beyond"";","SELECT role FROM table_name_56 WHERE director = ""r.n. bradbury"" AND title = ""the trail beyond"";",1 How many international tourists visited Germany and spent more than 500 EUR in 2019?,"CREATE TABLE german_tourism (country VARCHAR(50), year INT, expenses DECIMAL(6,2)); ",SELECT COUNT(*) FROM german_tourism WHERE country = 'Germany' AND year = 2019 AND expenses > 500;,SELECT COUNT(*) FROM german_tourism WHERE country = 'Germany' AND year = 2019 AND expenses > 500;,1 What is the total quantity of eco-friendly fabric in stock?,"CREATE TABLE fabric_stock (id INT PRIMARY KEY, fabric VARCHAR(20), quantity INT);",SELECT SUM(quantity) FROM fabric_stock WHERE fabric = 'eco-friendly';,SELECT SUM(quantity) FROM fabric_stock WHERE fabric LIKE '%eco%';,0 Update the professional development course 'Critical Pedagogy' to cost $300 for 'Teachers' with a 'Certification Year' of 2023.,"CREATE TABLE Courses (CourseID INT, CourseName VARCHAR(50), Cost INT, CertificationYear INT, TargetAudience VARCHAR(20)); ",UPDATE Courses SET Cost = 300 WHERE CourseName = 'Critical Pedagogy' AND CertificationYear = 2023 AND TargetAudience = 'Teachers';,UPDATE Courses SET Cost = 300 WHERE CourseName = 'Critical Pedagogy' AND CertificationYear = 2023 AND TargetAudience = 'Teachers';,1 How many professional development courses have been completed by teachers from underrepresented communities?,"CREATE TABLE teachers (teacher_id INT, teacher_name VARCHAR(50), community_id INT); CREATE TABLE communities (community_id INT, community_name VARCHAR(50)); CREATE TABLE courses (course_id INT, course_name VARCHAR(50), teacher_id INT); ","SELECT communities.community_name, COUNT(DISTINCT courses.course_id) as course_count FROM teachers JOIN communities ON teachers.community_id = communities.community_id JOIN courses ON teachers.teacher_id = courses.teacher_id GROUP BY communities.community_name;",SELECT COUNT(*) FROM courses JOIN teachers ON courses.teacher_id = teachers.teacher_id JOIN communities ON teachers.community_id = communities.community_id WHERE communities.community_name LIKE '%Underrepresented%';,0 What is the enrollment for the hawks? ,"CREATE TABLE table_2562113_1 (enrollment INTEGER, nickname VARCHAR);","SELECT MAX(enrollment) FROM table_2562113_1 WHERE nickname = ""Hawks"";","SELECT MAX(enrollment) FROM table_2562113_1 WHERE nickname = ""Hawks"";",1 Show the names of all mutual funds that have been rated highly by at least one rating agency.,"CREATE TABLE mutual_funds (fund_id INT, fund_name VARCHAR(50), agency_1_rating DECIMAL(3,1), agency_2_rating DECIMAL(3,1), agency_3_rating DECIMAL(3,1)); ",SELECT fund_name FROM mutual_funds WHERE agency_1_rating IS NOT NULL AND agency_1_rating >= 4.5 OR agency_2_rating IS NOT NULL AND agency_2_rating >= 4.5 OR agency_3_rating IS NOT NULL AND agency_3_rating >= 4.5;,SELECT fund_name FROM mutual_funds WHERE agency_1_rating >= 1;,0 Who is the vocal percussionist for Sex Bomb?,"CREATE TABLE table_28715942_6 (vocal_percussionist VARCHAR, track VARCHAR);","SELECT vocal_percussionist FROM table_28715942_6 WHERE track = ""Sex Bomb"";","SELECT vocal_percussionist FROM table_28715942_6 WHERE track = ""Sex Bomb"";",1 What is the total energy consumption per quarter for the past two years?,"CREATE TABLE energy_consumption (year INT, quarter INT, energy_consumption FLOAT); ","SELECT quarter, YEAR(DATE_ADD(MAKEDATE(year, 1), INTERVAL (quarter - 1) QUARTER)) AS year, SUM(energy_consumption) AS total_energy_consumption FROM energy_consumption GROUP BY quarter, year ORDER BY year, quarter;","SELECT year, quarter, SUM(energy_consumption) as total_energy_consumption FROM energy_consumption WHERE year BETWEEN 2018 AND 2021 GROUP BY year, quarter;",0 How many mining operations are in each country?,"CREATE TABLE mining_operations(id INT, name VARCHAR, country VARCHAR); ","SELECT country, COUNT(*) FROM mining_operations GROUP BY country;","SELECT country, COUNT(*) FROM mining_operations GROUP BY country;",1 Find the total production of Gadolinium in Q1 and Q3 of 2020 from the Production_Quarterly_2 table?,"CREATE TABLE Production_Quarterly_2 (year INT, quarter INT, gadolinium_production FLOAT);","SELECT SUM(gadolinium_production) FROM Production_Quarterly_2 WHERE (year = 2020 AND quarter IN (1, 3));","SELECT SUM(gadolinium_production) FROM Production_Quarterly_2 WHERE year = 2020 AND quarter IN ('Q1', 'Q3');",0 What is the maximum budget for AI projects?,"CREATE TABLE ai_projects (sector VARCHAR(20), budget INT); ",SELECT MAX(budget) FROM ai_projects;,SELECT MAX(budget) FROM ai_projects;,1 "What is 02-03, when School Year is % Learning In Latvian?",CREATE TABLE table_name_33 (school_year VARCHAR);,"SELECT 02 AS _03 FROM table_name_33 WHERE school_year = ""% learning in latvian"";","SELECT 02 AS _03 FROM table_name_33 WHERE school_year = ""% learning in letton"";",0 How many songs have 4 minute duration?,CREATE TABLE files (duration VARCHAR);,"SELECT COUNT(*) FROM files WHERE duration LIKE ""4:%"";","SELECT COUNT(*) FROM files WHERE duration = ""4 minute"";",0 How many goals were scored by the top scorer in 2022?,"CREATE TABLE scores (id INT, player TEXT, team TEXT, goals INT, year INT); ","SELECT player, SUM(goals) FROM scores WHERE year = 2022 GROUP BY player ORDER BY SUM(goals) DESC LIMIT 1;",SELECT SUM(goals) FROM scores WHERE year = 2022 AND player IN (SELECT player FROM teams WHERE year = 2022) GROUP BY player ORDER BY SUM(goals) DESC LIMIT 1;,0 How many security incidents were caused by insider threats in the government sector in the last year?,"CREATE TABLE security_incidents (incident_id INT, sector VARCHAR(50), incident_type VARCHAR(50), incident_date DATE, incident_cause VARCHAR(50)); ","SELECT sector, incident_type, COUNT(*) as count FROM security_incidents WHERE sector = 'Government' AND incident_cause = 'Insider threat' AND incident_date >= DATEADD(year, -1, GETDATE()) GROUP BY sector, incident_type;","SELECT COUNT(*) FROM security_incidents WHERE sector = 'Government' AND incident_cause = 'Insider Threat' AND incident_date >= DATEADD(year, -1, GETDATE());",0 When was –16 (62-71-71-68=272) the winning score?,"CREATE TABLE table_name_20 (date VARCHAR, winning_score VARCHAR);",SELECT date FROM table_name_20 WHERE winning_score = –16(62 - 71 - 71 - 68 = 272);,SELECT date FROM table_name_20 WHERE winning_score = –16(62 - 71 - 71 - 68 = 272);,1 "What are the names of all exploration projects in the 'Middle East' region, along with the number of wells drilled for each project?","CREATE TABLE exploration_projects (project_id INT, project_name VARCHAR(50), region VARCHAR(50)); CREATE TABLE wells (well_id INT, well_name VARCHAR(50), project_id INT); ","SELECT exploration_projects.project_name, COUNT(wells.well_id) FROM exploration_projects INNER JOIN wells ON exploration_projects.project_id = wells.project_id WHERE exploration_projects.region = 'Middle East' GROUP BY exploration_projects.project_name;","SELECT exploration_projects.project_name, COUNT(wells.well_id) FROM exploration_projects INNER JOIN wells ON exploration_projects.project_id = wells.project_id WHERE exploration_projects.region = 'Middle East' GROUP BY exploration_projects.project_name;",1 Which teachers have led the most professional development courses?,"CREATE TABLE teachers (id INT, name VARCHAR(255)); CREATE TABLE courses (id INT, teacher_id INT, name VARCHAR(255)); ","SELECT t.name AS teacher_name, COUNT(c.id) AS num_courses FROM teachers t JOIN courses c ON t.id = c.teacher_id GROUP BY t.name ORDER BY num_courses DESC;","SELECT t.name, COUNT(c.id) as num_courses FROM teachers t JOIN courses c ON t.id = c.teacher_id GROUP BY t.name ORDER BY num_courses DESC;",0 Which Time/Retired has a Rider of daijiro kato?,"CREATE TABLE table_name_43 (time_retired VARCHAR, rider VARCHAR);","SELECT time_retired FROM table_name_43 WHERE rider = ""daijiro kato"";","SELECT time_retired FROM table_name_43 WHERE rider = ""daijiro kato"";",1 I want the total number of rank for Grid less than 20 and dick rathmann and Qual more than 130.92,"CREATE TABLE table_name_73 (rank VARCHAR, qual VARCHAR, grid VARCHAR, driver VARCHAR);","SELECT COUNT(rank) FROM table_name_73 WHERE grid < 20 AND driver = ""dick rathmann"" AND qual > 130.92;","SELECT COUNT(rank) FROM table_name_73 WHERE grid 20 AND driver = ""dick rathmann"" AND qual > 130.92;",0 "Find the policy numbers, policyholder names, and birth dates for policyholders over 60 years old with a car make of 'Toyota'","CREATE TABLE policyholders (policy_number INT, policyholder_name VARCHAR(50), policyholder_dob DATE);CREATE TABLE cars (policy_number INT, car_make VARCHAR(20));","SELECT p.policy_number, p.policyholder_name, p.policyholder_dob FROM policyholders p INNER JOIN cars c ON p.policy_number = c.policy_number WHERE DATEDIFF(year, p.policyholder_dob, GETDATE()) > 60 AND c.car_make = 'Toyota';","SELECT policyholders.policy_number, policyholders.policyholder_name, policyholders.policyholder_dob FROM policyholders INNER JOIN cars ON policyholders.policy_number = cars.policy_number WHERE policyholders.policyholder_age > 60 AND cars.car_make = 'Toyota';",0 How many sightings of the 'Blue Whale' species were reported in the 'Southern Ocean' region in the year 2021?,"CREATE TABLE whale_sightings (id INT, sighting_date DATE, region TEXT, species TEXT); ",SELECT COUNT(*) FROM whale_sightings WHERE region = 'Southern Ocean' AND species = 'Blue Whale' AND sighting_date BETWEEN '2021-01-01' AND '2021-12-31';,SELECT COUNT(*) FROM whale_sightings WHERE region = 'Southern Ocean' AND species = 'Blue Whale' AND sighting_date BETWEEN '2021-01-01' AND '2021-12-31';,1 What is the maximum length of videos in the 'education' category?,"CREATE TABLE videos_2 (id INT, title TEXT, length INT, category TEXT); ",SELECT MAX(length) FROM videos_2 WHERE category = 'education';,SELECT MAX(length) FROM videos_2 WHERE category = 'education';,1 What was the total funding received for programs focused on accessibility in H1 2022?,"CREATE TABLE Funding (program_id INT, program_focus VARCHAR(50), funding DECIMAL(10,2), funding_date DATE); ",SELECT SUM(funding) AS total_funding FROM Funding WHERE program_focus = 'Accessibility' AND funding_date BETWEEN '2022-01-01' AND '2022-06-30';,SELECT SUM(funding) FROM Funding WHERE program_focus = 'Accessibility' AND funding_date BETWEEN '2022-01-01' AND '2022-06-30';,0 What date has 113-115 (ot) as the score?,"CREATE TABLE table_name_20 (date VARCHAR, score VARCHAR);","SELECT date FROM table_name_20 WHERE score = ""113-115 (ot)"";","SELECT date FROM table_name_20 WHERE score = ""113-115 (ot)"";",1 "What is the position when the League is the malaysian super league, and a Year of 2011?","CREATE TABLE table_name_85 (position VARCHAR, league VARCHAR, year VARCHAR);","SELECT position FROM table_name_85 WHERE league = ""malaysian super league"" AND year = ""2011"";","SELECT position FROM table_name_85 WHERE league = ""malaysian super league"" AND year = 2011;",0 "At maximum, what are our goals?",CREATE TABLE table_1474099_6 (goals INTEGER);,SELECT MAX(goals) FROM table_1474099_6;,SELECT MAX(goals) FROM table_1474099_6;,1 Calculate the total defense diplomacy events in 2020 and 2021,"CREATE TABLE defense_diplomacy (event_date DATE, event_type VARCHAR(255)); ","SELECT YEAR(event_date) as year, COUNT(*) as total_events FROM defense_diplomacy WHERE YEAR(event_date) IN (2020, 2021) GROUP BY year;",SELECT SUM(event_type) FROM defense_diplomacy WHERE event_date BETWEEN '2020-01-01' AND '2021-12-31';,0 What are the names of mining operations that have the highest workforce diversity scores?,"CREATE TABLE mining_operation (id INT, name VARCHAR(50), diversity_score INT); ",SELECT name FROM mining_operation ORDER BY diversity_score DESC LIMIT 5;,SELECT name FROM mining_operation WHERE diversity_score = (SELECT MAX(diversity_score) FROM mining_operation);,0 What is the maximum budget allocated to humanitarian assistance missions in Asia since 2017?,"CREATE TABLE humanitarian_assistance (id INT, mission_name VARCHAR(50), location VARCHAR(50), year INT, budget INT);",SELECT MAX(budget) FROM humanitarian_assistance WHERE location LIKE '%Asia%' AND year >= 2017;,SELECT MAX(budget) FROM humanitarian_assistance WHERE location LIKE '%Asia%' AND year >= 2017;,1 When 6.00 is the land area in kilometers squared what is the highest population of 2011?,"CREATE TABLE table_189598_7 (population__2011_ INTEGER, land_area__km²_ VARCHAR);","SELECT MAX(population__2011_) FROM table_189598_7 WHERE land_area__km²_ = ""6.00"";","SELECT MAX(population__2011_) FROM table_189598_7 WHERE land_area__km2_ = ""6.00"";",0 List the names of all factories that have not implemented ethical manufacturing practices and the countries they are located in.,"CREATE TABLE factories (id INT, name VARCHAR(50), country VARCHAR(50)); CREATE TABLE ethical_manufacturing (id INT, factory_id INT); ","SELECT f.name, f.country FROM factories f LEFT JOIN ethical_manufacturing em ON f.id = em.factory_id WHERE em.factory_id IS NULL;","SELECT f.name, f.country FROM factories f INNER JOIN ethical_manufacturing em ON f.id = em.factory_id WHERE em.factory_id IS NULL;",0 What is the total number of founders for companies founded by people from underrepresented communities in the healthcare sector?,"CREATE TABLE Companies (id INT, name TEXT, industry TEXT, founders INT, diversity TEXT); ",SELECT SUM(founders) FROM Companies WHERE industry = 'Healthcare' AND diversity = 'Diverse Team';,SELECT SUM(founders) FROM Companies WHERE industry = 'Healthcare' AND diversity = 'Underrepresented';,0 What is the recycling rate for each waste type in the landfill?,"CREATE TABLE waste_types (id INT, type VARCHAR(255)); CREATE TABLE landfill (id INT, waste_type_id INT, weight INT, recycled INT); ","SELECT waste_type_id, (SUM(recycled) OVER (PARTITION BY waste_type_id) * 100.0 / SUM(weight) OVER (PARTITION BY waste_type_id)) as recycling_rate FROM landfill;","SELECT waste_types.type, SUM(landfill.recycled) as total_recycling_rate FROM waste_types INNER JOIN landfill ON waste_types.id = landfill.waste_type_id GROUP BY waste_types.type;",0 Which races did they accumulate at least 125 points?,"CREATE TABLE table_name_38 (races VARCHAR, points VARCHAR);","SELECT races FROM table_name_38 WHERE points = ""125"";","SELECT races FROM table_name_38 WHERE points = ""at least 125"";",0 What is the minimum heart rate recorded for users in the morning?,"CREATE TABLE heart_rate_times (user_id INT, heart_rate INT, measurement_time TIME); ",SELECT MIN(heart_rate) FROM heart_rate_times WHERE EXTRACT(HOUR FROM measurement_time) BETWEEN 6 AND 11;,"SELECT MIN(heart_rate) FROM heart_rate_times WHERE measurement_time BETWEEN DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) AND CURRENT_TIMESTAMP;",0 What is the average donation per month for each donor?,"CREATE TABLE donations (donor_id INT, donation_date DATE, amount DECIMAL(10,2)); ","SELECT donor_id, DATE_FORMAT(donation_date, '%Y-%m') AS month, AVG(amount) AS avg_donation FROM donations GROUP BY donor_id, month;","SELECT donor_id, DATE_FORMAT(donation_date, '%Y-%m') as month, AVG(amount) as avg_donation FROM donations GROUP BY donor_id, month;",0 what's the percent yes where voted yes is 2410119,"CREATE TABLE table_120778_2 (percent_yes VARCHAR, voted_yes VARCHAR);",SELECT percent_yes FROM table_120778_2 WHERE voted_yes = 2410119;,SELECT percent_yes FROM table_120778_2 WHERE voted_yes = 2410119;,1 What is the average production of wells in the 'Gulf of Mexico'?,"CREATE TABLE OilWells (WellID VARCHAR(10), Location VARCHAR(50), Production FLOAT);",SELECT AVG(Production) FROM OilWells WHERE Location = 'Gulf of Mexico';,SELECT AVG(Production) FROM OilWells WHERE Location = 'Gulf of Mexico';,1 List the names of companies that have had at least one round of funding over $100 million and have a female CEO.,"CREATE TABLE companies (id INT, name TEXT, industry TEXT, founding_date DATE, CEO_gender TEXT);CREATE TABLE funds (id INT, company_id INT, amount INT, funding_round TEXT);",SELECT companies.name FROM companies INNER JOIN funds ON companies.id = funds.company_id WHERE funds.amount > 100000000 AND companies.CEO_gender = 'woman';,SELECT companies.name FROM companies INNER JOIN funds ON companies.id = funds.company_id WHERE funds.funding_round > 100000000 AND companies.CEO_gender = 'Female';,0 What is the loss for the record of 42-36?,"CREATE TABLE table_name_82 (loss VARCHAR, record VARCHAR);","SELECT loss FROM table_name_82 WHERE record = ""42-36"";","SELECT loss FROM table_name_82 WHERE record = ""42-36"";",1 What college has pick 45,"CREATE TABLE table_name_33 (college VARCHAR, pick VARCHAR);",SELECT college FROM table_name_33 WHERE pick = 45;,SELECT college FROM table_name_33 WHERE pick = 45;,1 What name ran for the Prohibition ticket when the Progressive ticket was Eugene M. Travis?,"CREATE TABLE table_name_14 (prohibition_ticket VARCHAR, progressive_ticket VARCHAR);","SELECT prohibition_ticket FROM table_name_14 WHERE progressive_ticket = ""eugene m. travis"";","SELECT prohibition_ticket FROM table_name_14 WHERE progressive_ticket = ""eugene m. travis"";",1 how much prize money (in USD) did bob lutz win,"CREATE TABLE table_29302711_12 (prize_money__usd_ INTEGER, name VARCHAR);","SELECT MAX(prize_money__usd_) FROM table_29302711_12 WHERE name = ""Bob Lutz"";","SELECT MAX(prize_money__usd_) FROM table_29302711_12 WHERE name = ""Bob Lutz"";",1 What is the total number of points combined from the teams that played over 14 games?,"CREATE TABLE table_name_52 (points VARCHAR, played INTEGER);",SELECT COUNT(points) FROM table_name_52 WHERE played > 14;,SELECT COUNT(points) FROM table_name_52 WHERE played > 14;,1 "what is the tie no, on 24 november 1971 and the away team is king's lynn?","CREATE TABLE table_name_65 (tie_no VARCHAR, date VARCHAR, away_team VARCHAR);","SELECT tie_no FROM table_name_65 WHERE date = ""24 november 1971"" AND away_team = ""king's lynn"";","SELECT tie_no FROM table_name_65 WHERE date = ""24 november 1971"" AND away_team = ""king's lynn"";",1 What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.,"CREATE TABLE organisation_Types (organisation_type VARCHAR, organisation_type_description VARCHAR); CREATE TABLE Organisations (organisation_type VARCHAR);",SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details;,SELECT T1.organisation_type FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type_description WHERE T2.organisation_type_description = 'Sponsor';,0 What was the record for Dec 16?,"CREATE TABLE table_name_36 (record VARCHAR, date VARCHAR);","SELECT record FROM table_name_36 WHERE date = ""dec 16"";","SELECT record FROM table_name_36 WHERE date = ""dec 16"";",1 What is the average number of climate change adaptation projects per year in the Middle East from 2010 to 2020?,"CREATE TABLE adaptation_projects (id INT, region VARCHAR(255), year INT, type VARCHAR(255), cost FLOAT); ",SELECT AVG(cost) FROM adaptation_projects WHERE region = 'Middle East' AND type = 'climate change adaptation' AND year BETWEEN 2010 AND 2020;,SELECT AVG(cost) FROM adaptation_projects WHERE region = 'Middle East' AND year BETWEEN 2010 AND 2020 AND type = 'climate change adaptation';,0 "Which Total has Gold smaller than 12, and a Nation of hong kong (hkg)?","CREATE TABLE table_name_43 (total INTEGER, gold VARCHAR, nation VARCHAR);","SELECT MAX(total) FROM table_name_43 WHERE gold < 12 AND nation = ""hong kong (hkg)"";","SELECT SUM(total) FROM table_name_43 WHERE gold 12 AND nation = ""hong kong (hkg)"";",0 How much did the company spend on R&D in 2020?,"CREATE TABLE company_financials (financial_year INT, rd_expenses FLOAT); ",SELECT SUM(rd_expenses) FROM company_financials WHERE financial_year = 2020;,SELECT SUM(rd_expenses) FROM company_financials WHERE financial_year = 2020;,1 Identify the top 5 countries with the most unique volunteers in the last 6 months.,"CREATE TABLE volunteers (id INT, volunteer_country TEXT, volunteer_name TEXT, volunteer_date DATE); ","SELECT volunteer_country, COUNT(DISTINCT volunteer_name) as unique_volunteers FROM volunteers WHERE volunteer_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) GROUP BY volunteer_country ORDER BY unique_volunteers DESC LIMIT 5;","SELECT volunteer_country, COUNT(DISTINCT volunteer_name) as unique_volunteers FROM volunteers WHERE volunteer_date >= DATEADD(month, -6, GETDATE()) GROUP BY volunteer_country ORDER BY unique_volunteers DESC LIMIT 5;",0 What album had a peak position of 6 and a certification of 3x platinum?,"CREATE TABLE table_name_25 (album VARCHAR, certification VARCHAR, peak_position VARCHAR);","SELECT album FROM table_name_25 WHERE certification = ""3x platinum"" AND peak_position = 6;","SELECT album FROM table_name_25 WHERE certification = ""3x platinum"" AND peak_position = ""6"";",0 What date has 10 for the week?,"CREATE TABLE table_name_66 (date VARCHAR, week VARCHAR);",SELECT date FROM table_name_66 WHERE week = 10;,SELECT date FROM table_name_66 WHERE week = 10;,1 "What is the record from the 2,500 in attendance?","CREATE TABLE table_name_12 (record VARCHAR, attendance VARCHAR);","SELECT record FROM table_name_12 WHERE attendance = ""2,500"";","SELECT record FROM table_name_12 WHERE attendance = ""2,500"";",1 What Name has a Winning constructor of ansaldo?,"CREATE TABLE table_name_56 (name VARCHAR, winning_constructor VARCHAR);","SELECT name FROM table_name_56 WHERE winning_constructor = ""ansaldo"";","SELECT name FROM table_name_56 WHERE winning_constructor = ""ansaldo"";",1 What is the A330 and the A310 wide?,"CREATE TABLE table_name_62 (a330 VARCHAR, a310 VARCHAR);","SELECT a330 FROM table_name_62 WHERE a310 = ""wide"";","SELECT a330 FROM table_name_62 WHERE a310 = ""wide"";",1 How many points are in the scored category for the team that played less than 18 games?,"CREATE TABLE table_name_41 (scored INTEGER, played INTEGER);",SELECT SUM(scored) FROM table_name_41 WHERE played < 18;,SELECT SUM(scored) FROM table_name_41 WHERE played 18;,0 What is the total number of steps taken and the total duration of workouts for each user in the past week?,"CREATE TABLE Users (ID INT PRIMARY KEY, Name VARCHAR(50)); CREATE TABLE Workouts (ID INT PRIMARY KEY, UserID INT, Steps INT, Duration DECIMAL(10,2), Date DATE);","SELECT Users.Name, SUM(Workouts.Steps) AS TotalSteps, SUM(Workouts.Duration) AS TotalDuration FROM Users JOIN Workouts ON Users.ID = Workouts.UserID WHERE Workouts.Date >= DATEADD(week, -1, GETDATE()) GROUP BY Users.Name;","SELECT Users.Name, COUNT(Workouts.Steps) AS TotalSteps, SUM(Workouts.Duration) AS TotalDuration FROM Users INNER JOIN Workouts ON Users.ID = Workouts.UserID WHERE Workouts.Date >= DATEADD(week, -1, GETDATE()) GROUP BY Users.Name;",0 "List all the broadband subscribers who have used more than 100 GB data in a month and their monthly data usage, sorted by the data usage in descending order.","CREATE TABLE broadband_subscribers (subscriber_id INT, subscriber_name VARCHAR(50), monthly_data_usage DECIMAL(10,2)); ","SELECT subscriber_id, subscriber_name, monthly_data_usage FROM broadband_subscribers WHERE monthly_data_usage > 100 ORDER BY monthly_data_usage DESC;","SELECT subscriber_name, monthly_data_usage FROM broadband_subscribers WHERE monthly_data_usage > 100 ORDER BY monthly_data_usage DESC;",0 How many synthesis are there for 5~16.2 pw per cycle (calculated) output power?,"CREATE TABLE table_30057479_1 (synthesis VARCHAR, output_power VARCHAR);","SELECT COUNT(synthesis) FROM table_30057479_1 WHERE output_power = ""5~16.2 pW per cycle (calculated)"";","SELECT COUNT(synthesis) FROM table_30057479_1 WHERE output_power = ""516.2 pw per cycle (calculated)"";",0 What is the number of eco-certified accommodations in Tokyo?,"CREATE TABLE accommodations (accommodation_id INT, name TEXT, city TEXT, eco_certified INT); ",SELECT COUNT(*) FROM accommodations WHERE city = 'Tokyo' AND eco_certified = 1;,SELECT COUNT(*) FROM accommodations WHERE city = 'Tokyo' AND eco_certified = 1;,1 What was the date of natural cause situation?,"CREATE TABLE table_name_12 (date VARCHAR, circumstances VARCHAR);","SELECT date FROM table_name_12 WHERE circumstances = ""natural cause"";","SELECT date FROM table_name_12 WHERE circumstances = ""natural cause"";",1 Display the legal precedents for a specific attorney,"CREATE TABLE attorney_precedents (precedent_id INT PRIMARY KEY, case_id INT, attorney_id INT);",SELECT region FROM attorney_precedents WHERE attorney_id = 123 GROUP BY region;,"SELECT precedent_id, case_id, attorney_id FROM attorney_precedents GROUP BY precedent_id, case_id;",0 How many movies were directed by individuals who identify as Latinx and released after 2010?,"CREATE TABLE Directors (id INT, director_name VARCHAR(100), ethnicity VARCHAR(50)); CREATE TABLE Movies (id INT, title VARCHAR(100), director_id INT, release_year INT); ",SELECT COUNT(*) FROM Movies WHERE director_id IN (SELECT id FROM Directors WHERE ethnicity = 'Latinx') AND release_year > 2010;,SELECT COUNT(*) FROM Movies JOIN Directors ON Movies.director_id = Directors.id WHERE Directors.ethnicity = 'Latinx' AND Movies.release_year > 2010;,0 What was the attendance of the game November 24,"CREATE TABLE table_11959669_3 (location_attendance VARCHAR, date VARCHAR);","SELECT location_attendance FROM table_11959669_3 WHERE date = ""November 24"";","SELECT location_attendance FROM table_11959669_3 WHERE date = ""November 24"";",1 "Create a new table named ""sustainable_materials"" with columns ""material_name"" (text), ""manufacturing_emissions"" (integer), and ""recycling_potential"" (real)","CREATE TABLE sustainable_materials (material_name text, manufacturing_emissions integer, recycling_potential real);","CREATE TABLE sustainable_materials (material_name text, manufacturing_emissions integer, recycling_potential real);","CREATE TABLE sustainable_materials (material_name text, manufacturing_emissions integer, recycling_potential real);",1 On which island is Esperadinha airport located?,"CREATE TABLE table_name_53 (island VARCHAR, airportname VARCHAR);","SELECT island FROM table_name_53 WHERE airportname = ""esperadinha airport"";","SELECT island FROM table_name_53 WHERE airportname = ""esperadinha airport"";",1 List the stars hosting at least 2 habitable exoplanets in the Libra constellation.,"CREATE TABLE exoplanets (id INT, name VARCHAR(50), discovery_date DATE, discovery_method VARCHAR(50), host_star VARCHAR(50), right_ascension FLOAT, declination FLOAT, habitable BOOLEAN); CREATE VIEW habitable_exoplanets AS SELECT * FROM exoplanets WHERE habitable = TRUE; CREATE VIEW libra_exoplanets AS SELECT * FROM habitable_exoplanets WHERE right_ascension BETWEEN 14.5 AND 16 AND declination BETWEEN -20 AND -5;",SELECT host_star FROM libra_exoplanets GROUP BY host_star HAVING COUNT(*) >= 2;,SELECT host_star FROM exoplanets WHERE right_ascension = 1 AND declination = 0 AND habitable = true GROUP BY host_star HAVING COUNT(*) >= 2;,0 What is the average daily step count for all members with a Platinum membership?,"CREATE TABLE Members (MemberID INT, Name VARCHAR(50), Age INT, Membership VARCHAR(20)); CREATE TABLE Steps (StepID INT, MemberID INT, Steps INT, Date DATE); ",SELECT AVG(Steps) FROM Members JOIN Steps ON Members.MemberID = Steps.MemberID WHERE Membership = 'Platinum';,SELECT AVG(Steps) FROM Steps JOIN Members ON Steps.MemberID = Members.MemberID WHERE Membership = 'Platinum';,0 Who was the away team at the game held at Arden Street Oval?,"CREATE TABLE table_name_53 (away_team VARCHAR, venue VARCHAR);","SELECT away_team FROM table_name_53 WHERE venue = ""arden street oval"";","SELECT away_team FROM table_name_53 WHERE venue = ""arden street oval"";",1 What is the average distance run by users in the afternoon workouts in the past month?,"CREATE TABLE runs (id INT, user_id INT, run_distance DECIMAL(10,2), run_time TIME); ","SELECT AVG(run_distance) FROM (SELECT run_distance FROM runs WHERE DATE(run_time) BETWEEN DATE_SUB(CURRENT_DATE(), INTERVAL 1 MONTH) AND CURRENT_DATE() AND HOUR(run_time) BETWEEN 12 AND 17) AS subquery;","SELECT AVG(run_distance) FROM runs WHERE run_time >= DATEADD(month, -1, GETDATE());",0 List the names and prices of dishes that are either in the pizza or burger categories and cost more than 12 dollars.,"CREATE TABLE dishes (id INT, name VARCHAR(50), category VARCHAR(50), price DECIMAL(5,2)); ","SELECT name, price FROM dishes WHERE category IN ('Pizza', 'Burger') AND price > 12;","SELECT name, price FROM dishes WHERE category IN ('Pizza', 'Burger') AND price > 12;",1 What is the smallest number of innings with a strike rate of 72.05 and under 297 balls faced?,"CREATE TABLE table_name_89 (innings INTEGER, sr VARCHAR, balls_faced VARCHAR);",SELECT MIN(innings) FROM table_name_89 WHERE sr = 72.05 AND balls_faced < 297;,SELECT MIN(innings) FROM table_name_89 WHERE sr = 72.05 AND balls_faced 297;,0 What was the manner of departure replaced by tita?,"CREATE TABLE table_name_34 (manner_of_departure VARCHAR, replaced_by VARCHAR);","SELECT manner_of_departure FROM table_name_34 WHERE replaced_by = ""tita"";","SELECT manner_of_departure FROM table_name_34 WHERE replaced_by = ""tita"";",1 "Where was the game that the attendance was 24,694?","CREATE TABLE table_name_99 (game INTEGER, attendance VARCHAR);",SELECT MIN(game) FROM table_name_99 WHERE attendance = 24 OFFSET 694;,SELECT SUM(game) FROM table_name_99 WHERE attendance = 24 OFFSET 694;,0 Find total network infrastructure investments for each month in the year 2021.,"CREATE TABLE investments(id INT, investment VARCHAR(25), date DATE); ","SELECT MONTH(date), SUM(id) FROM investments WHERE YEAR(date) = 2021 GROUP BY MONTH(date);","SELECT EXTRACT(MONTH FROM date) AS month, SUM(investment) AS total_investments FROM investments WHERE date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY month;",0 Find the number of students who are older than 18 and do not have allergy to either food or animal.,"CREATE TABLE Allergy_Type (Allergy VARCHAR, allergytype VARCHAR); CREATE TABLE Has_allergy (Allergy VARCHAR); CREATE TABLE Student (age VARCHAR, StuID VARCHAR);","SELECT COUNT(*) FROM Student WHERE age > 18 AND NOT StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = ""food"" OR T2.allergytype = ""animal"");",SELECT COUNT(*) FROM Student AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = 'Food' INTERSECT SELECT COUNT(*) FROM Student AS T1 JOIN Has_allergy AS T2 ON T1.StuID = T2.StuID WHERE T2.age > 18 AND T2.allergytype = 'Animal';,0 What is the average rating of movies produced in the USA?,"CREATE TABLE movies (title VARCHAR(255), rating FLOAT, production_country VARCHAR(64));",SELECT AVG(rating) FROM movies WHERE production_country = 'USA';,SELECT AVG(rating) FROM movies WHERE production_country = 'USA';,1 Which date had the catalog designation of ha-m 2230?,"CREATE TABLE table_name_37 (date VARCHAR, catalog VARCHAR);","SELECT date FROM table_name_37 WHERE catalog = ""ha-m 2230"";","SELECT date FROM table_name_37 WHERE catalog = ""ha-m 2230"";",1 Which FA Cup has a Total smaller than 1?,"CREATE TABLE table_name_24 (fa_cup INTEGER, total INTEGER);",SELECT AVG(fa_cup) FROM table_name_24 WHERE total < 1;,SELECT AVG(fa_cup) FROM table_name_24 WHERE total 1;,0 What is the score of the game with 22 points and the capitals as the opponent?,"CREATE TABLE table_name_37 (score VARCHAR, points VARCHAR, opponent VARCHAR);","SELECT score FROM table_name_37 WHERE points = 22 AND opponent = ""capitals"";","SELECT score FROM table_name_37 WHERE points = 22 AND opponent = ""capitals"";",1 "What's the median family income with a household income of $25,583?","CREATE TABLE table_name_72 (median_family_income VARCHAR, median_household_income VARCHAR);","SELECT median_family_income FROM table_name_72 WHERE median_household_income = ""$25,583"";","SELECT median_family_income FROM table_name_72 WHERE median_household_income = ""$25,583"";",1 Increase the budget of a specific renewable energy project by 10%,"CREATE TABLE renewable_energy_projects (id INT, name TEXT, budget FLOAT); ",WITH project_update AS (UPDATE renewable_energy_projects SET budget = budget * 1.10 WHERE id = 1) SELECT * FROM project_update;,UPDATE renewable_energy_projects SET budget = budget * 1.10 WHERE name = 'Renewable Energy';,0 "Show the name, home city, and age for all drivers.","CREATE TABLE driver (name VARCHAR, home_city VARCHAR, age VARCHAR);","SELECT name, home_city, age FROM driver;","SELECT name, home_city, age FROM driver;",1 What is the average population of marine life species in the 'MarineLife' schema's protected zones?,"CREATE SCHEMA MarineLife; CREATE TABLE Species (id INT, name TEXT, population INT); CREATE TABLE ProtectedZones (zone_id INT, species_id INT);",SELECT AVG(s.population) FROM MarineLife.Species s JOIN MarineLife.ProtectedZones pz ON s.id = pz.species_id;,SELECT AVG(Species.population) FROM MarineLife.Species INNER JOIN ProtectedZones ON MarineLife.Species.id = ProtectedZones.species_id;,0 Which gender had a decile of more than 1 and featured the South Auckland Seventh-Day Adventist School?,"CREATE TABLE table_name_16 (gender VARCHAR, decile VARCHAR, name VARCHAR);","SELECT gender FROM table_name_16 WHERE decile > 1 AND name = ""south auckland seventh-day adventist school"";","SELECT gender FROM table_name_16 WHERE decile > 1 AND name = ""south auckland seventh-day adventist school"";",1 What is the number of public meetings held in the 'meetings_data' table for the state of 'CA'?,"CREATE TABLE meetings_data (meeting_id INT, meeting_date DATE, location VARCHAR(100), state VARCHAR(50), attendees INT);",SELECT COUNT(*) FROM meetings_data WHERE state = 'CA';,SELECT SUM(attendees) FROM meetings_data WHERE state = 'CA';,0 Which Attendance has a Tie number of 5?,"CREATE TABLE table_name_63 (attendance VARCHAR, tie_no VARCHAR);","SELECT attendance FROM table_name_63 WHERE tie_no = ""5"";","SELECT attendance FROM table_name_63 WHERE tie_no = ""5"";",1 What is the total number of impact investments in the 'renewable energy' sector?,"CREATE TABLE company_impact_investments (company_id INT, sector VARCHAR(20), investment_amount FLOAT); CREATE TABLE companies (id INT, sector VARCHAR(20)); ",SELECT COUNT(*) FROM company_impact_investments INNER JOIN companies ON company_impact_investments.company_id = companies.id WHERE companies.sector = 'renewable energy';,SELECT COUNT(*) FROM company_impact_investments JOIN companies ON company_impact_investments.company_id = companies.id WHERE companies.sector ='renewable energy';,0 What is the average number of posts per day for users in Canada?,"CREATE TABLE users (id INT, country VARCHAR(255)); CREATE TABLE posts (id INT, user_id INT, post_date DATE); ","SELECT AVG(post_count) FROM (SELECT COUNT(post_date) AS post_count FROM posts GROUP BY user_id, DATE_TRUNC('day', post_date) HAVING COUNT(DISTINCT user_id) = (SELECT COUNT(DISTINCT id) FROM users WHERE country = 'Canada')) subquery;",SELECT AVG(posts_per_day) FROM posts JOIN users ON posts.user_id = users.id WHERE users.country = 'Canada';,0 "What chassis has patrick racing as an entrant, with a start greater than 6?","CREATE TABLE table_name_69 (chassis VARCHAR, entrant VARCHAR, start VARCHAR);","SELECT chassis FROM table_name_69 WHERE entrant = ""patrick racing"" AND start > 6;","SELECT chassis FROM table_name_69 WHERE entrant = ""patrick racing"" AND start > 6;",1 What is the total number of labor hours worked on mining projects in South America in 2020?,"CREATE TABLE labor (project_id INT, region TEXT, hours INT, year INT); ",SELECT SUM(hours) FROM labor WHERE region = 'South America' AND year = 2020;,SELECT SUM(hours) FROM labor WHERE region = 'South America' AND year = 2020;,1 Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.,"CREATE TABLE film_actor (actor_id VARCHAR); CREATE TABLE actor (first_name VARCHAR, last_name VARCHAR, actor_id VARCHAR);","SELECT T2.first_name, T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING COUNT(*) > 30;","SELECT T1.first_name, T1.last_name FROM actor AS T1 JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING COUNT(*) > 30;",0 What is the Venue with a Date with 14 april 2002?,"CREATE TABLE table_name_57 (venue VARCHAR, date VARCHAR);","SELECT venue FROM table_name_57 WHERE date = ""14 april 2002"";","SELECT venue FROM table_name_57 WHERE date = ""14 april 2002"";",1 Rank policies for a system based on their last update date.,"CREATE TABLE policies (id INT, policy_id TEXT, system TEXT, description TEXT, last_updated DATE);","SELECT policy_id, system, description, last_updated, RANK() OVER (PARTITION BY system ORDER BY last_updated DESC) as rank FROM policies WHERE system = 'firewall';","SELECT policy_id, system, description, last_updated, RANK() OVER (ORDER BY last_updated DESC) as rank FROM policies;",0 What is the total number of public transportation vehicles in use in the transportation system?,"CREATE TABLE transportation_system (id INT, vehicle_name TEXT, type TEXT);",SELECT COUNT(*) FROM transportation_system WHERE type = 'Public';,SELECT COUNT(*) FROM transportation_system WHERE type = 'Public';,1 What is the save when Yankees are the opponents on July 25?,"CREATE TABLE table_name_82 (save VARCHAR, opponent VARCHAR, date VARCHAR);","SELECT save FROM table_name_82 WHERE opponent = ""yankees"" AND date = ""july 25"";","SELECT save FROM table_name_82 WHERE opponent = ""yankees"" AND date = ""july 25"";",1 What is the average number of hours spent on esports events by teams from Africa?,"CREATE TABLE EsportsTeamsAfrica (TeamID INT, TeamName VARCHAR(100), Country VARCHAR(50), HoursSpent DECIMAL(10,2)); ",SELECT AVG(HoursSpent) FROM EsportsTeamsAfrica WHERE Country = 'Africa';,SELECT AVG(HoursSpent) FROM EsportsTeamsAfrica WHERE Country = 'Africa';,1 What is the average funding amount for genetic research projects in the UK?,"CREATE SCHEMA if not exists genetic;CREATE TABLE if not exists genetic.projects (id INT PRIMARY KEY, name VARCHAR(100), location VARCHAR(50), funding FLOAT);",SELECT AVG(funding) FROM genetic.projects WHERE location = 'UK';,SELECT AVG(funding) FROM genetic.projects WHERE location = 'UK';,1 How many auto shows have featured electric vehicles in the past 2 years?,"CREATE TABLE AutoShows (id INT, event_name VARCHAR(50), event_date DATE); ","SELECT COUNT(*) FROM AutoShows WHERE event_date >= DATEADD(year, -2, GETDATE()) AND event_name LIKE '%Electric%';","SELECT COUNT(*) FROM AutoShows WHERE event_date >= DATEADD(year, -2, GETDATE());",0 What is Trevard Lindley's height?,"CREATE TABLE table_name_42 (height VARCHAR, name VARCHAR);","SELECT height FROM table_name_42 WHERE name = ""trevard lindley"";","SELECT height FROM table_name_42 WHERE name = ""trevard lindley"";",1 What is the total revenue generated by hotels in the LATAM region (Latin America) that have adopted hospitality AI in Q3 2022?,"CREATE TABLE hotel_revenue (hotel_id INT, region TEXT, revenue FLOAT, date DATE, ai_adoption BOOLEAN); ",SELECT SUM(revenue) FROM hotel_revenue WHERE region = 'LATAM' AND ai_adoption = true AND date = '2022-07-01';,SELECT SUM(revenue) FROM hotel_revenue WHERE region = 'LATAM' AND date BETWEEN '2022-04-01' AND '2022-06-30' AND ai_adoption = TRUE;,0 Which events have the same number of attendees as the average number of attendees for all events?,"CREATE TABLE events (id INT, name VARCHAR(255), attendees INT); ",SELECT name FROM events WHERE attendees = (SELECT AVG(attendees) FROM events);,SELECT name FROM events WHERE attendees = (SELECT AVG(attendees) FROM events);,1 What is the market share of Raytheon Technologies in the military radar systems market in 2019?,"CREATE SCHEMA if not exists market_shares;CREATE TABLE if not exists military_radar_systems_sales(supplier text, quantity integer, sale_year integer);",SELECT (SUM(CASE WHEN supplier = 'Raytheon Technologies' THEN quantity ELSE 0 END) * 100.0 / SUM(quantity)) AS market_share FROM military_radar_systems_sales WHERE sale_year = 2019;,SELECT SUM(quantity) FROM military_radar_systems_sales WHERE supplier = 'Raytheon Technologies' AND sale_year = 2019;,0 What is the average of the total when t11 is the finish?,"CREATE TABLE table_name_39 (total INTEGER, finish VARCHAR);","SELECT AVG(total) FROM table_name_39 WHERE finish = ""t11"";","SELECT AVG(total) FROM table_name_39 WHERE finish = ""t11"";",1 How many pollution control initiatives were launched in each region?,"CREATE TABLE pollution_initiatives (id INT, initiative_name VARCHAR(255), launch_date DATE, region VARCHAR(255));","SELECT region, count(*) FROM pollution_initiatives GROUP BY region;","SELECT region, COUNT(*) FROM pollution_initiatives GROUP BY region;",0 What is the total work number of Gowrie after 1875?,"CREATE TABLE table_name_45 (works_number INTEGER, date VARCHAR, name VARCHAR);","SELECT SUM(works_number) FROM table_name_45 WHERE date > 1875 AND name = ""gowrie"";","SELECT SUM(works_number) FROM table_name_45 WHERE date > 1875 AND name = ""gowrie"";",1 Update the 'fare' column in the 'fares' table for 'Zone 1' to $2.50,"CREATE TABLE fares (zone TEXT, fare DECIMAL(5,2), effective_date DATE);",UPDATE fares SET fare = 2.50 WHERE zone = 'Zone 1';,UPDATE fares SET fare = 2.50 WHERE zone = 'Zone 1';,1 How many yards per attempt have net yards greater than 631?,"CREATE TABLE table_name_17 (yards_per_attempt INTEGER, net_yards INTEGER);",SELECT SUM(yards_per_attempt) FROM table_name_17 WHERE net_yards > 631;,SELECT SUM(yards_per_attempt) FROM table_name_17 WHERE net_yards > 631;,1 What is the balance of the customer in the third row?,"CREATE TABLE customers (id INT, name VARCHAR(255), country VARCHAR(255), balance DECIMAL(10, 2)); ",SELECT balance FROM customers WHERE ROW_NUMBER() OVER (ORDER BY id) = 3;,SELECT balance FROM customers ORDER BY balance DESC LIMIT 3;,0 What is the average pick of Florida State?,"CREATE TABLE table_name_28 (pick INTEGER, college VARCHAR);","SELECT AVG(pick) FROM table_name_28 WHERE college = ""florida state"";","SELECT AVG(pick) FROM table_name_28 WHERE college = ""florida state"";",1 What is the total amount of research funding received by the Mathematics department in 2019 and 2020?,"CREATE TABLE funding (id INT, department VARCHAR(10), year INT, amount INT); ","SELECT SUM(amount) FROM funding WHERE department = 'Mathematics' AND year IN (2019, 2020);","SELECT SUM(amount) FROM funding WHERE department = 'Mathematics' AND year IN (2019, 2020);",1 What is the name of episode 120 in the series that Mike Rohl directed?,"CREATE TABLE table_27892955_1 (title VARCHAR, directed_by VARCHAR, no_in_series VARCHAR);","SELECT title FROM table_27892955_1 WHERE directed_by = ""Mike Rohl"" AND no_in_series = 120;","SELECT title FROM table_27892955_1 WHERE directed_by = ""Mike Rohl"" AND no_in_series = 120;",1 how many times did tunde abdulrahman leave the team?,"CREATE TABLE table_28164986_4 (date_of_vacancy VARCHAR, outgoing_manager VARCHAR);","SELECT COUNT(date_of_vacancy) FROM table_28164986_4 WHERE outgoing_manager = ""Tunde Abdulrahman"";","SELECT COUNT(date_of_vacancy) FROM table_28164986_4 WHERE outgoing_manager = ""Tunde Abdulrahman"";",1 What team was the player that received a penalty at time 32:17 playing for?,"CREATE TABLE table_name_13 (team VARCHAR, time VARCHAR);","SELECT team FROM table_name_13 WHERE time = ""32:17"";","SELECT team FROM table_name_13 WHERE time = ""32:17"";",1 Who is the Director of the Filmography with Production Number of 11-14?,"CREATE TABLE table_name_76 (director VARCHAR, production_number VARCHAR);","SELECT director FROM table_name_76 WHERE production_number = ""11-14"";","SELECT director FROM table_name_76 WHERE production_number = ""11-14"";",1 How many field goals had 597 points?,"CREATE TABLE table_24915964_4 (field_goals VARCHAR, points VARCHAR);",SELECT COUNT(field_goals) FROM table_24915964_4 WHERE points = 597;,SELECT COUNT(field_goals) FROM table_24915964_4 WHERE points = 597;,1 Insert records for 3 players into 'player_achievements',"CREATE TABLE player_achievements (player_id INT, achievement_name VARCHAR(255), achievement_date DATE);","INSERT INTO player_achievements (player_id, achievement_name, achievement_date) VALUES (1, 'First Blood', '2021-05-01'), (2, 'Top Fragger', '2021-04-15'), (3, 'MVP', '2021-03-28');","INSERT INTO player_achievements (player_id, achievement_name, achievement_date) VALUES (3, 'James Bond', '2022-01-01');",0 What is the total volume of packages shipped to the Asia-Pacific region from our Los Angeles warehouse in the last quarter?,"CREATE TABLE Warehouse (id INT, name VARCHAR(50), location VARCHAR(50)); CREATE TABLE Shipment (id INT, warehouse_id INT, region VARCHAR(50), volume INT); ","SELECT SUM(volume) FROM Shipment WHERE warehouse_id = (SELECT id FROM Warehouse WHERE location = 'Los Angeles') AND region = 'Asia-Pacific' AND shipment_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 3 MONTH) AND CURDATE();","SELECT SUM(volume) FROM Shipment WHERE warehouse_id = (SELECT id FROM Warehouse WHERE location = 'Los Angeles') AND region = 'Asia-Pacific' AND shipment_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH);",0 How many users streamed a song per day in 'music_streaming' table?,"CREATE TABLE music_streaming (user_id INT, song_id INT, duration FLOAT, date DATE);","SELECT date, COUNT(DISTINCT user_id) as users_per_day FROM music_streaming GROUP BY date ORDER BY date;","SELECT DATE_FORMAT(date, '%Y-%m') as day, COUNT(DISTINCT user_id) as num_users FROM music_streaming GROUP BY day;",0 Find the personal names of students not enrolled in any course.,"CREATE TABLE Student_Course_Enrolment (student_id VARCHAR); CREATE TABLE Students (personal_name VARCHAR); CREATE TABLE Students (personal_name VARCHAR, student_id VARCHAR);",SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id;,SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id;,0 "How many part-time workers are there in total in the 'retail' industry, and how many of them are union members?","CREATE TABLE parttime_workers (id INT, industry VARCHAR(20), salary FLOAT, union_member BOOLEAN); ","SELECT COUNT(*), SUM(union_member) FROM parttime_workers WHERE industry = 'retail';",SELECT COUNT(*) FROM parttime_workers WHERE industry ='retail' AND union_member = TRUE;,0 What is the average population of cities in 'Germany' and 'Spain'?,"CREATE TABLE City (Id INT PRIMARY KEY, Name VARCHAR(50), Population INT, Country VARCHAR(50)); ","SELECT Country, AVG(Population) as AvgPopulation FROM City WHERE Country IN ('Germany', 'Spain') GROUP BY Country;","SELECT AVG(Population) FROM City WHERE Country IN ('Germany', 'Spain');",0 On which date was the opponent the Chicago Bears?,"CREATE TABLE table_name_54 (date VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_54 WHERE opponent = ""chicago bears"";","SELECT date FROM table_name_54 WHERE opponent = ""chicago bears"";",1 Which volunteers have contributed the most hours to the 'Environment' program in 2021?,"CREATE TABLE Volunteers (VolunteerID int, VolunteerName varchar(50), ProgramID int, Hours decimal(10,2), VolunteerDate date); CREATE TABLE Programs (ProgramID int, ProgramName varchar(50), ProgramCategory varchar(50));","SELECT VolunteerName, SUM(Hours) as TotalHours FROM Volunteers INNER JOIN Programs ON Volunteers.ProgramID = Programs.ProgramID WHERE ProgramName = 'Environment' AND YEAR(VolunteerDate) = 2021 GROUP BY VolunteerName ORDER BY TotalHours DESC;","SELECT v.VolunteerName, SUM(v.Hours) as TotalHours FROM Volunteers v JOIN Programs p ON v.ProgramID = p.ProgramID WHERE p.ProgramCategory = 'Environment' AND YEAR(v.VolunteerDate) = 2021 GROUP BY v.VolunteerName ORDER BY TotalHours DESC;",0 How many steals did Kelly Miller have?,"CREATE TABLE table_25353861_5 (steals INTEGER, player VARCHAR);","SELECT MIN(steals) FROM table_25353861_5 WHERE player = ""Kelly Miller"";","SELECT SUM(steals) FROM table_25353861_5 WHERE player = ""Kelly Miller"";",0 What was the earliest game with a record of 23–6–4?,"CREATE TABLE table_name_48 (game INTEGER, record VARCHAR);","SELECT MIN(game) FROM table_name_48 WHERE record = ""23–6–4"";","SELECT MIN(game) FROM table_name_48 WHERE record = ""23–6–4"";",1 Find the average number of animals per species in the 'animal_population' table.,"CREATE TABLE animal_population (species VARCHAR(50), animal_count INT);",SELECT AVG(animal_count) FROM animal_population GROUP BY species;,"SELECT species, AVG(animal_count) FROM animal_population GROUP BY species;",0 What was the total amount of funds spent by UN agencies in Syria in 2017?,"CREATE TABLE un_agencies (agency_name VARCHAR(255), country VARCHAR(255), funds_spent DECIMAL(10,2), funds_date DATE); ",SELECT SUM(funds_spent) FROM un_agencies WHERE country = 'Syria' AND YEAR(funds_date) = 2017;,SELECT SUM(funds_spent) FROM un_agencies WHERE country = 'Syria' AND YEAR(funds_date) = 2017;,1 What were the lowest goals when there were mor than 15 wins and the goal difference was larger than 35?,"CREATE TABLE table_name_25 (goals_for INTEGER, wins VARCHAR, goal_difference VARCHAR);",SELECT MIN(goals_for) FROM table_name_25 WHERE wins > 15 AND goal_difference > 35;,SELECT MIN(goals_for) FROM table_name_25 WHERE wins > 15 AND goal_difference > 35;,1 What is the rank of each defendant's age within their court case?,"CREATE TABLE court_cases (case_id INT, court_date DATE); CREATE TABLE defendant_info (defendant_id INT, case_id INT, age INT, gender VARCHAR(50)); ","SELECT defendant_id, case_id, age, ROW_NUMBER() OVER (PARTITION BY case_id ORDER BY age) as age_rank FROM defendant_info;","SELECT d.defendant_id, d.age, d.gender, ROW_NUMBER() OVER (PARTITION BY d.defendant_id ORDER BY d.age DESC) as rank FROM defendant_info d JOIN court_cases c ON d.case_id = c.case_id;",0 What is the maximum size of marine protected areas in the Indian Ocean?,"CREATE TABLE marine_protected_areas (id INT, name VARCHAR(255), location VARCHAR(255), size FLOAT); ",SELECT MAX(size) FROM marine_protected_areas WHERE location = 'Indian Ocean';,SELECT MAX(size) FROM marine_protected_areas WHERE location = 'Indian Ocean';,1 What is the average carbon offset by country?,"CREATE TABLE CarbonOffsetsByCountry (Country VARCHAR(50), CarbonOffset FLOAT); ","SELECT Country, AVG(CarbonOffset) AS AvgCarbonOffset FROM CarbonOffsetsByCountry GROUP BY Country;","SELECT Country, AVG(CarbonOffset) FROM CarbonOffsetsByCountry GROUP BY Country;",0 When did St Kilda play a home game?,"CREATE TABLE table_name_91 (date VARCHAR, home_team VARCHAR);","SELECT date FROM table_name_91 WHERE home_team = ""st kilda"";","SELECT date FROM table_name_91 WHERE home_team = ""st kilda"";",1 Find vessels that have never loaded cargo.,"CREATE TABLE VesselCargo (VesselID INT, CargoID INT); ",SELECT VesselID FROM VesselCargo WHERE CargoID IS NULL;,SELECT VesselID FROM VesselCargo WHERE CargoID IS NULL;,1 List all suppliers in France that supplied sustainable materials in the last 6 months.,"CREATE TABLE Suppliers (supplierID int, supplierName varchar(255), country varchar(255), sustainableMaterials varchar(5)); CREATE TABLE Supply (supplyID int, supplierID int, productID int, date datetime); ","SELECT S.supplierName FROM Suppliers S INNER JOIN Supply Supp ON S.supplierID = Supp.supplierID WHERE S.country = 'France' AND Supp.date >= DATE_SUB(NOW(), INTERVAL 6 MONTH) AND S.sustainableMaterials = 'Y';","SELECT Suppliers.supplierName FROM Suppliers INNER JOIN Supply ON Suppliers.supplierID = Supply.supplierID WHERE Suppliers.country = 'France' AND Supply.date >= DATEADD(month, -6, GETDATE());",0 What is the highest ERP W with a w216bo call sign?,"CREATE TABLE table_name_10 (erp_w INTEGER, call_sign VARCHAR);","SELECT MAX(erp_w) FROM table_name_10 WHERE call_sign = ""w216bo"";","SELECT MAX(erp_w) FROM table_name_10 WHERE call_sign = ""w216bo"";",1 display the total number of buses and trains in each depot,"CREATE TABLE Depots (name VARCHAR(20), num_buses INT, num_trains INT); ","SELECT name, SUM(num_buses + num_trains) as total FROM Depots GROUP BY name;","SELECT name, SUM(num_buses) as total_buses, SUM(num_trains) as total_trains FROM Depots GROUP BY name;",0 "List the names and total word count of articles published by ""The Daily Times"" newspaper in October 2020.","CREATE TABLE articles (id INT, title TEXT, content TEXT, publication_date DATE, newspaper TEXT); CREATE TABLE words (id INT, article_id INT, word TEXT);","SELECT a.title, COUNT(w.word) AS word_count FROM articles a INNER JOIN words w ON a.id = w.article_id WHERE a.newspaper = 'The Daily Times' AND a.publication_date BETWEEN '2020-10-01' AND '2020-10-31' GROUP BY a.id;","SELECT articles.title, SUM(words.word) FROM articles INNER JOIN words ON articles.id = words.article_id WHERE articles.publication_date >= '2020-10-01' AND articles.paper = 'The Daily Times' GROUP BY articles.title;",0 "What is Director, when Season is 1.4?","CREATE TABLE table_name_11 (director VARCHAR, season VARCHAR);",SELECT director FROM table_name_11 WHERE season = 1.4;,"SELECT director FROM table_name_11 WHERE season = ""1.4"";",0 Who is the mens singles and womens singlses is wang shixian?,"CREATE TABLE table_13553701_1 (mens_singles VARCHAR, womens_singles VARCHAR);","SELECT mens_singles FROM table_13553701_1 WHERE womens_singles = ""Wang Shixian"";","SELECT mens_singles FROM table_13553701_1 WHERE womens_singles = ""Wang Shixian"";",1 What is the total number of cultural heritage sites in Italy and Spain?,"CREATE TABLE sites (id INT, country VARCHAR(50), type VARCHAR(50)); ","SELECT SUM(CASE WHEN type = 'Cultural' THEN 1 ELSE 0 END) FROM sites WHERE country IN ('Italy', 'Spain');","SELECT COUNT(*) FROM sites WHERE country IN ('Italy', 'Spain');",0 "Insert new records into the ""health_data"" table, unpivoting the data by region","CREATE TABLE health_data (region VARCHAR(50), Cancer INT, Heart_Disease INT); ","INSERT INTO health_data (region, disease, cases) SELECT region, 'Cancer' AS disease, Cancer AS cases FROM health_data UNION ALL SELECT region, 'Heart Disease' AS disease, Heart_Disease AS cases FROM health_data;","INSERT INTO health_data (region, Cancer, Heart_Disease) VALUES ('North America', 'Mexico');",0 "What is the average rating of movies produced by studios based in India, ordered by the production year in ascending order?","CREATE TABLE movies (title VARCHAR(255), studio VARCHAR(255), production_year INT, rating FLOAT); ",SELECT AVG(rating) FROM movies WHERE studio LIKE '%India%' GROUP BY production_year ORDER BY production_year ASC;,"SELECT studio, production_year, AVG(rating) as avg_rating FROM movies WHERE studio LIKE '%India%' GROUP BY studio, production_year ORDER BY production_year ASC;",0 What is the total cargo weight transported by Indonesian-flagged vessels to Port K in Q3 2021?,"CREATE TABLE Vessels (id INT, name TEXT, cargo_weight INT, flag_country TEXT, arrive_port TEXT, arrive_date DATE); ",SELECT SUM(cargo_weight) FROM Vessels WHERE flag_country = 'Indonesia' AND arrive_port = 'Port K' AND EXTRACT(YEAR FROM arrive_date) = 2021 AND EXTRACT(QUARTER FROM arrive_date) = 3;,SELECT SUM(cargo_weight) FROM Vessels WHERE flag_country = 'Indonesia' AND arrive_port = 'Port K' AND arrive_date BETWEEN '2021-04-01' AND '2021-06-30';,0 What is the total quantity of dishes sold in each region in 2022?,"CREATE TABLE Orders (order_id INT PRIMARY KEY, customer_id INT, menu_id INT, order_date DATETIME, quantity INT); CREATE TABLE Menu (menu_id INT PRIMARY KEY, menu_item VARCHAR(255), category VARCHAR(255), price DECIMAL(5,2), region VARCHAR(255));","SELECT Menu.region, SUM(Orders.quantity) as total_quantity FROM Orders INNER JOIN Menu ON Orders.menu_id = Menu.menu_id WHERE EXTRACT(YEAR FROM Orders.order_date) = 2022 GROUP BY Menu.region;","SELECT m.region, SUM(o.quantity) as total_quantity FROM Orders o JOIN Menu m ON o.menu_id = m.menu_id WHERE o.order_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY m.region;",0 What is the lowest 06-10 totals with a pubs 2010 of 68 and a 07-11 totals larger than 305?,"CREATE TABLE table_name_15 (totals_06_10 INTEGER, pubs_2010 VARCHAR, totals_07_11 VARCHAR);",SELECT MIN(totals_06_10) FROM table_name_15 WHERE pubs_2010 = 68 AND totals_07_11 > 305;,SELECT MIN(totals_06_10) FROM table_name_15 WHERE pubs_2010 = 68 AND totals_07_11 > 305;,1 "What is the littlest round that has Matt Delahey, and a greater than 112 pick?","CREATE TABLE table_name_58 (round INTEGER, player VARCHAR, pick VARCHAR);","SELECT MIN(round) FROM table_name_58 WHERE player = ""matt delahey"" AND pick > 112;","SELECT MIN(round) FROM table_name_58 WHERE player = ""matt delahey"" AND pick > 112;",1 What is the geographical region for hometown Imbert?,"CREATE TABLE table_name_1 (geographical_regions VARCHAR, hometown VARCHAR);","SELECT geographical_regions FROM table_name_1 WHERE hometown = ""imbert"";","SELECT geographical_regions FROM table_name_1 WHERE hometown = ""imbert"";",1 What is the average speed of vessels arriving from the Caribbean region in the past month?,"CREATE TABLE vessels (id INT, name TEXT, speed DECIMAL(5,2), region TEXT, arrival_date DATE); ","SELECT AVG(speed) FROM vessels WHERE region = 'Caribbean' AND arrival_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);","SELECT AVG(speed) FROM vessels WHERE region = 'Caribbean' AND arrival_date >= DATEADD(month, -1, GETDATE());",0 Which Fuel has an Output of ps (kw; hp) @6000 rpm?,"CREATE TABLE table_name_50 (fuel VARCHAR, output VARCHAR);","SELECT fuel FROM table_name_50 WHERE output = ""ps (kw; hp) @6000 rpm"";","SELECT fuel FROM table_name_50 WHERE output = ""ps (kw; hp) @6000 rpm"";",1 "Which Grid has a Driver of cristiano da matta, and Points smaller than 33?","CREATE TABLE table_name_98 (grid INTEGER, driver VARCHAR, points VARCHAR);","SELECT SUM(grid) FROM table_name_98 WHERE driver = ""cristiano da matta"" AND points < 33;","SELECT SUM(grid) FROM table_name_98 WHERE driver = ""cristian da matta"" AND points 33;",0 What is the percentage of lifelong learning courses that were completed successfully by teachers in rural areas in Africa?,"CREATE TABLE lifelong_learning (course_id INT, teacher_id INT, completed BOOLEAN, location VARCHAR(50)); ","SELECT COUNT(ll.course_id) as completed_courses, COUNT(*) as total_courses, (COUNT(ll.course_id) * 100.0 / COUNT(*)) as completion_percentage FROM lifelong_learning ll WHERE ll.completed = true AND ll.location = 'Rural Africa';",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM lifelong_learning WHERE completed = TRUE)) FROM lifelong_learning WHERE location = 'Rural Africa' AND teacher_id IN (SELECT teacher_id FROM lifelong_learning WHERE location = 'Rural Africa');,0 What is the average carbon offset for green building certifications in each country in the European Union?,"CREATE TABLE green_buildings (building_id INT, building_name VARCHAR(255), country VARCHAR(255), certification_level VARCHAR(255), carbon_offset_tons INT); CREATE TABLE eu_countries (country_code VARCHAR(255), country_name VARCHAR(255));","SELECT e.country_name, AVG(g.carbon_offset_tons) FROM green_buildings g INNER JOIN eu_countries e ON g.country = e.country_code GROUP BY e.country_name;","SELECT eu_countries.country_name, AVG(green_buildings.carbon_offset_tons) as avg_carbon_offset FROM green_buildings INNER JOIN eu_countries ON green_buildings.country = eu_countries.country_code GROUP BY eu_countries.country_name;",0 How many fish are there in fish farms located in the Mediterranean Sea with a density greater than 300 fish/m3?,"CREATE TABLE fish_farms (id INT, name TEXT, location TEXT, fish_density INT); ",SELECT COUNT(*) FROM fish_farms WHERE location = 'Mediterranean Sea' AND fish_density > 300;,SELECT COUNT(*) FROM fish_farms WHERE location = 'Mediterranean Sea' AND fish_density > 300;,1 In what year was the partner Wesley Moodie?,"CREATE TABLE table_2199290_2 (year INTEGER, partner VARCHAR);","SELECT MAX(year) FROM table_2199290_2 WHERE partner = ""Wesley Moodie"";","SELECT MAX(year) FROM table_2199290_2 WHERE partner = ""Wesley Moodie"";",1 Get the names of publishers who have never published an article on 'Sunday'.,"CREATE TABLE articles (id INT, title TEXT, publication_day TEXT, publisher TEXT);",SELECT DISTINCT publisher FROM articles WHERE publication_day != 'Sunday';,SELECT publisher FROM articles WHERE publication_day = 'Sunday';,0 What are the top 3 genres with the highest average song length in the '80s?,"CREATE TABLE songs (id INT, title VARCHAR(255), genre VARCHAR(50), length FLOAT, release_year INT); ","SELECT genre, AVG(length) as avg_length FROM songs WHERE release_year BETWEEN 1980 AND 1989 GROUP BY genre ORDER BY avg_length DESC LIMIT 3;","SELECT genre, AVG(length) as avg_length FROM songs WHERE release_year >= 1980 GROUP BY genre ORDER BY avg_length DESC LIMIT 3;",0 What is the purpose of Euromarine?,"CREATE TABLE table_name_52 (purpose VARCHAR, payee VARCHAR);","SELECT purpose FROM table_name_52 WHERE payee = ""euromarine"";","SELECT purpose FROM table_name_52 WHERE payee = ""euromarine"";",1 What are the names of all the marine pollutants that have been found in the Atlantic Ocean and Mediterranean Sea?,"CREATE TABLE marine_pollutants (id INT, name TEXT, location TEXT); ",SELECT DISTINCT name FROM marine_pollutants WHERE location = 'Atlantic Ocean' OR location = 'Mediterranean Sea';,"SELECT name FROM marine_pollutants WHERE location IN ('Atlantic Ocean', 'Mediterranean Sea');",0 List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007.,"CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, player_id VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR); CREATE TABLE salary (player_id VARCHAR, team_id VARCHAR, year VARCHAR);","SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals';","SELECT T1.name_first, T1.name_last FROM player AS T1 JOIN salary AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T1.team_id_br = T3.team_id WHERE T3.year = 2005 INTERSECT SELECT T3.name_first FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T2.name = ""Washington Nationals"";",0 What is the name and launch date of satellites launched by JAXA?,"CREATE TABLE Satellites (id INT PRIMARY KEY, name TEXT, launch_date DATE, type TEXT, agency TEXT); ","SELECT Satellites.name, Satellites.launch_date FROM Satellites WHERE Satellites.agency = 'JAXA' ORDER BY Satellites.launch_date DESC;","SELECT name, launch_date FROM Satellites WHERE agency = 'JAXA';",0 What is the total number of users who have posted a story on Snapchat in the past week and who are located in a state with a population of over 10 million?,"CREATE TABLE snapchat_stories (story_id INT, user_id INT, story_date DATE);CREATE TABLE users (user_id INT, state VARCHAR(50), registration_date DATE);CREATE TABLE state_populations (state VARCHAR(50), population INT);",SELECT COUNT(DISTINCT s.user_id) as num_users FROM snapchat_stories s JOIN users u ON s.user_id = u.user_id JOIN state_populations sp ON u.state = sp.state WHERE s.story_date >= DATE(NOW()) - INTERVAL 1 WEEK AND sp.population > 10000000;,"SELECT COUNT(DISTINCT users.user_id) FROM users INNER JOIN snapchat_stories ON users.user_id = snapchat_stories.user_id INNER JOIN state_populations ON users.state = state_populations.state WHERE story_date >= DATEADD(week, -1, GETDATE());",0 How many mental health providers are there in each county in California?,"CREATE TABLE counties (id INT, name VARCHAR(255), state VARCHAR(255)); CREATE TABLE mental_health_providers (id INT, name VARCHAR(255), county_id INT); ","SELECT c.name, COUNT(m.id) FROM counties c JOIN mental_health_providers m ON c.id = m.county_id WHERE c.state = 'California' GROUP BY c.name;","SELECT c.name, COUNT(mhp.id) FROM counties c JOIN mental_health_providers mhp ON c.id = mhp.county_id WHERE c.state = 'California' GROUP BY c.name;",0 find the total carbon sequestration by country for 2020,"CREATE TABLE country (country_id INT, country_name VARCHAR(255)); CREATE TABLE forest (forest_id INT, country_id INT, carbon_sequestration INT); ","SELECT c.country_name, SUM(f.carbon_sequestration) as total_carbon_sequestration FROM forest f JOIN country c ON f.country_id = c.country_id WHERE f.year = 2020 GROUP BY c.country_name;","SELECT c.country_name, SUM(f.carbon_sequestration) as total_carbon_sequestration FROM country c JOIN forest f ON c.country_id = f.country_id WHERE YEAR(f.forest_date) = 2020 GROUP BY c.country_name;",0 How many employees work in each factory and what are their total salaries?,"CREATE TABLE factories (factory_id INT, name TEXT, total_employees INT, avg_salary INT); ","SELECT name, total_employees * avg_salary AS total_salaries FROM factories;","SELECT name, total_employees, SUM(avg_salary) FROM factories GROUP BY name;",0 Count the number of incidents for each vessel type,"CREATE TABLE VesselTypes (id INT, vessel_type VARCHAR(50)); CREATE TABLE IncidentLog (id INT, vessel_id INT, incident_type VARCHAR(50), time TIMESTAMP);","SELECT vt.vessel_type, COUNT(il.id) FROM VesselTypes vt JOIN IncidentLog il ON vt.id = il.vessel_id GROUP BY vt.vessel_type;","SELECT VesselTypes.vessel_type, COUNT(*) FROM VesselTypes INNER JOIN IncidentLog ON VesselTypes.id = IncidentLog.vessel_id GROUP BY VesselTypes.vessel_type;",0 What is the percentage of mobile customers in each city who have broadband subscriptions?,"CREATE TABLE broadband_subscriptions (customer_id INT, subscription BOOLEAN); CREATE TABLE city_customers (customer_id INT, city VARCHAR(50)); ","SELECT mc.city, (COUNT(CASE WHEN bs.subscription = TRUE THEN 1 END) * 100.0 / COUNT(bs.customer_id)) AS percentage FROM city_customers cc JOIN broadband_subscriptions bs ON cc.customer_id = bs.customer_id JOIN mobile_customers mc ON cc.customer_id = mc.customer_id GROUP BY mc.city;","SELECT city, (COUNT(*) FILTER (WHERE subscription = TRUE)) * 100.0 / COUNT(*) FROM city_customers GROUP BY city;",0 List all suppliers from India that provide organic ingredients.,"CREATE TABLE suppliers (id INT, name VARCHAR(50), country VARCHAR(50), organic BOOLEAN); ",SELECT suppliers.name FROM suppliers WHERE suppliers.country = 'India' AND suppliers.organic = true;,SELECT * FROM suppliers WHERE country = 'India' AND organic = true;,0 What is the average rating of hotels in 'Europe' that have a spa?,"CREATE TABLE hotels (id INT, name TEXT, rating FLOAT, country TEXT, has_spa BOOLEAN); ",SELECT AVG(rating) FROM hotels WHERE country LIKE 'Europe%' AND has_spa = true;,SELECT AVG(rating) FROM hotels WHERE country = 'Europe' AND has_spa = true;,0 Add a new property owner to the property_owners table,"CREATE TABLE public.property_owners (id SERIAL PRIMARY KEY, property_owner_name VARCHAR(255), property_owner_email VARCHAR(255)); ","INSERT INTO public.property_owners (property_owner_name, property_owner_email) VALUES ('Mohammad Ahmad', 'mohammad.ahmad@example.com');",ALTER TABLE public.property_owners ADD property_owner_name VARCHAR(255);,0 Find the total financial assets of Shariah-compliant institutions in Gulf Cooperation Council countries?,"CREATE TABLE if not exists gcc_financial_assets (id INT, institution_name VARCHAR(100), country VARCHAR(50), is_shariah_compliant BOOLEAN, assets DECIMAL(15,2));","SELECT SUM(assets) FROM gcc_financial_assets WHERE country IN ('Saudi Arabia', 'Kuwait', 'Bahrain', 'United Arab Emirates', 'Oman', 'Qatar') AND is_shariah_compliant = TRUE;",SELECT SUM(assets) FROM gcc_financial_assets WHERE is_shariah_compliant = true AND country = 'Gulf Cooperation Council';,0 When was Windy Hill used as a venue?,"CREATE TABLE table_name_90 (date VARCHAR, venue VARCHAR);","SELECT date FROM table_name_90 WHERE venue = ""windy hill"";","SELECT date FROM table_name_90 WHERE venue = ""windy hill"";",1 Name the date which has type of plain stage,"CREATE TABLE table_name_2 (date VARCHAR, type VARCHAR);","SELECT date FROM table_name_2 WHERE type = ""plain stage"";","SELECT date FROM table_name_2 WHERE type = ""plain stage"";",1 Create a table to archive resolved complaints,"CREATE TABLE resolved_complaints (id INT PRIMARY KEY, complaint TEXT, date DATE);","CREATE TABLE resolved_complaints AS SELECT id, complaint, date FROM customer_complaints WHERE resolved = true;","CREATE TABLE resolved_complaints (id INT PRIMARY KEY, complaint TEXT, date DATE);",0 "What is every value for % 40-59 if % 60-74 is 12,42%?","CREATE TABLE table_23606500_4 (_percentage_40_59 VARCHAR, _percentage_60_74 VARCHAR);","SELECT _percentage_40_59 FROM table_23606500_4 WHERE _percentage_60_74 = ""12,42%"";","SELECT _percentage_40_59 FROM table_23606500_4 WHERE _percentage_60_74 = ""12,42%"";",1 "What is the number of workers in each department, grouped by their ethnicity?","CREATE TABLE department (dept_id INT, dept_name VARCHAR(50), worker_id INT); CREATE TABLE worker_demographics (worker_id INT, worker_ethnicity VARCHAR(50)); ","SELECT dept_name, worker_ethnicity, COUNT(*) as count FROM department d JOIN worker_demographics w ON d.worker_id = w.worker_id GROUP BY dept_name, worker_ethnicity;","SELECT dept_name, worker_ethnicity, COUNT(*) FROM department d JOIN worker_demographics wd ON d.worker_id = wd.worker_id GROUP BY dept_name, worker_ethnicity;",0 What is the average budget for peacekeeping operations in Africa since 2015?,"CREATE TABLE PeacekeepingOperations (id INT PRIMARY KEY, operation VARCHAR(100), location VARCHAR(50), year INT, budget INT); ",SELECT AVG(budget) FROM PeacekeepingOperations WHERE location LIKE '%Africa%' AND year >= 2015;,SELECT AVG(budget) FROM PeacekeepingOperations WHERE location = 'Africa' AND year >= 2015;,0 What is the average heart rate of users who did more than 15000 steps?,"CREATE TABLE steps (id INT, user_id INT, hr INT, steps INT); ",SELECT AVG(hr) FROM steps WHERE steps > 15000;,SELECT AVG(hr) FROM steps WHERE steps > 15000;,1 "Which causes have donations greater than $10,000?","CREATE TABLE cause (id INT PRIMARY KEY, name VARCHAR(255));CREATE TABLE donation (id INT PRIMARY KEY, cause_id INT, amount DECIMAL(10,2));",SELECT c.name FROM cause c JOIN donation d ON c.id = d.cause_id WHERE d.amount > 10000;,SELECT c.name FROM cause c JOIN donation d ON c.id = d.cause_id WHERE d.amount > 10000;,1 What was the Attendance when Oxford United was the Home team?,"CREATE TABLE table_name_58 (attendance INTEGER, home_team VARCHAR);","SELECT SUM(attendance) FROM table_name_58 WHERE home_team = ""oxford united"";","SELECT AVG(attendance) FROM table_name_58 WHERE home_team = ""oxford united"";",0 Insert data into the new table for athlete wellbeing programs,"CREATE TABLE wellbeing_programs (program_id INT, athlete_id INT, program_name VARCHAR(255), start_date DATE, end_date DATE);","INSERT INTO wellbeing_programs (program_id, athlete_id, program_name, start_date, end_date) VALUES (1, 1, 'Yoga', '2022-01-01', '2022-12-31'), (2, 2, 'Meditation', '2022-06-01', '2022-12-31'), (3, 3, 'Nutrition counseling', '2022-04-01', '2022-09-30');","INSERT INTO wellbeing_programs (program_id, athlete_id, program_name, start_date, end_date) VALUES (1, 'Athlete Wellness Program', '2022-03-01', '2022-03-31');",0 List the total number of open pedagogy projects per month in 2021,"CREATE TABLE open_pedagogy_projects (id INT PRIMARY KEY, project_id INT, title VARCHAR(255), description TEXT, submission_date DATE);","SELECT DATE_FORMAT(submission_date, '%Y-%m') AS month, COUNT(*) AS total_projects FROM open_pedagogy_projects WHERE YEAR(submission_date) = 2021 GROUP BY month;","SELECT EXTRACT(MONTH FROM submission_date) AS month, COUNT(*) FROM open_pedagogy_projects WHERE EXTRACT(YEAR FROM submission_date) = 2021 GROUP BY month;",0 "What is the total number of construction workers in the state of New York, grouped by occupation and gender?","CREATE TABLE construction_workers (worker_id INT, occupation VARCHAR(50), state VARCHAR(50), gender VARCHAR(50), salary INT); ","SELECT occupation, gender, COUNT(*) FROM construction_workers WHERE state = 'New York' GROUP BY occupation, gender;","SELECT occupation, gender, COUNT(*) FROM construction_workers WHERE state = 'New York' GROUP BY occupation, gender;",1 "Which Attendance has an Arena of arrowhead pond of anaheim, and Points smaller than 5?","CREATE TABLE table_name_20 (attendance VARCHAR, arena VARCHAR, points VARCHAR);","SELECT attendance FROM table_name_20 WHERE arena = ""arrowhead pond of anaheim"" AND points < 5;","SELECT attendance FROM table_name_20 WHERE arena = ""arrowhead pond of anaheim"" AND points 5;",0 What is the maximum quantity sold for each size in each quarter?,"CREATE TABLE sales (id INT PRIMARY KEY, garment_id INT, size VARCHAR(10), quantity INT, date DATE); ","SELECT date_trunc('quarter', date) AS quarter, size, MAX(quantity) FROM sales GROUP BY quarter, size;","SELECT size, MAX(quantity) as max_quantity FROM sales GROUP BY size;",0 What is the 1st leg of the team with a 2-1 agg.?,CREATE TABLE table_name_13 (agg VARCHAR);,"SELECT 1 AS st_leg FROM table_name_13 WHERE agg = ""2-1"";","SELECT 1 AS st_leg FROM table_name_13 WHERE agg = ""2-1"";",1 "Name the Score which has a Partner of jorge lozano, an Outcome of runner-up, and Opponents in the final of udo riglewski michael stich?","CREATE TABLE table_name_85 (score_in_the_final VARCHAR, opponents_in_the_final VARCHAR, partner VARCHAR, outcome VARCHAR);","SELECT score_in_the_final FROM table_name_85 WHERE partner = ""jorge lozano"" AND outcome = ""runner-up"" AND opponents_in_the_final = ""udo riglewski michael stich"";","SELECT score_in_the_final FROM table_name_85 WHERE partner = ""jorge lozano"" AND outcome = ""runner-up"" AND opponents_in_the_final = ""udo riglewski michael stich"";",1 "Avg/G that has a Att-Cmp-Int of 1–1–0, and an Effic larger than 394 is what total?","CREATE TABLE table_name_62 (avg_g VARCHAR, att_cmp_int VARCHAR, effic VARCHAR);","SELECT COUNT(avg_g) FROM table_name_62 WHERE att_cmp_int = ""1–1–0"" AND effic > 394;","SELECT COUNT(avg_g) FROM table_name_62 WHERE att_cmp_int = ""1–1–0"" AND effic > 394;",1 "Name the production for alpina model being b10 4,6","CREATE TABLE table_2477085_1 (production VARCHAR, alpina_model VARCHAR);","SELECT production FROM table_2477085_1 WHERE alpina_model = ""B10 4,6"";","SELECT production FROM table_2477085_1 WHERE alpina_model = ""B10 4,6"";",1 What is the production cost when the producer is raintree pictures?,"CREATE TABLE table_name_63 (production_cost VARCHAR, producer VARCHAR);","SELECT production_cost FROM table_name_63 WHERE producer = ""raintree pictures"";","SELECT production_cost FROM table_name_63 WHERE producer = ""raintree pictures"";",1 Delete records of all cargoes that have been at sea for more than 60 days.,"CREATE TABLE cargoes (id INT, name VARCHAR(50), at_sea INT); ",DELETE FROM cargoes WHERE at_sea > 60;,DELETE FROM cargoes WHERE at_sea > 60;,1 Which Score has an Opponent of melanie south?,"CREATE TABLE table_name_58 (score VARCHAR, opponent VARCHAR);","SELECT score FROM table_name_58 WHERE opponent = ""melanie south"";","SELECT score FROM table_name_58 WHERE opponent = ""melanie south"";",1 Who had the most rebounds in the game against New York?,"CREATE TABLE table_name_74 (high_rebounds VARCHAR, opponent VARCHAR);","SELECT high_rebounds FROM table_name_74 WHERE opponent = ""new york"";","SELECT high_rebounds FROM table_name_74 WHERE opponent = ""new york"";",1 List the name of the county with the largest population.,"CREATE TABLE county_public_safety (Name VARCHAR, Population VARCHAR);",SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1;,SELECT Name FROM county_public_safety WHERE Population = (SELECT MAX(Population) FROM county_public_safety);,0 What year is the player whose number is 31?,"CREATE TABLE table_29418619_1 (year VARCHAR, _number VARCHAR);",SELECT year FROM table_29418619_1 WHERE _number = 31;,SELECT year FROM table_29418619_1 WHERE _number = 31;,1 WHAT POINTS 1 HAD A 22 LOST?,"CREATE TABLE table_name_88 (points_1 VARCHAR, lost VARCHAR);",SELECT points_1 FROM table_name_88 WHERE lost = 22;,"SELECT points_1 FROM table_name_88 WHERE lost = ""22"";",0 Which Nation has a Lead of alexandra bruckmiller?,"CREATE TABLE table_name_73 (nation VARCHAR, lead VARCHAR);","SELECT nation FROM table_name_73 WHERE lead = ""alexandra bruckmiller"";","SELECT nation FROM table_name_73 WHERE lead = ""alexandra bruckmiller"";",1 What is the minimum donation amount for donors from the United Kingdom?,"CREATE TABLE Donors (DonorID INT, DonorName TEXT, Country TEXT, DonationAmount DECIMAL); ",SELECT MIN(DonationAmount) FROM Donors WHERE Country = 'United Kingdom';,SELECT MIN(DonationAmount) FROM Donors WHERE Country = 'United Kingdom';,1 What is the most goals for when there are fewer than 4 draws?,"CREATE TABLE table_name_1 (goals_for INTEGER, drawn INTEGER);",SELECT MAX(goals_for) FROM table_name_1 WHERE drawn < 4;,SELECT MAX(goals_for) FROM table_name_1 WHERE drawn 4;,0 What is the average time to resolution for cases in each category?,"CREATE TABLE cases (case_id INT, case_category VARCHAR(255), resolution_date DATE);","SELECT case_category, AVG(DATEDIFF(resolution_date, case_date)) as avg_time_to_resolution FROM cases GROUP BY case_category;","SELECT case_category, AVG(DATEDIFF(resolution_date, '%Y-%m')) as avg_time_to_resolution FROM cases GROUP BY case_category;",0 what is the year that the position was 1st in paris?,"CREATE TABLE table_name_26 (year VARCHAR, position VARCHAR, venue VARCHAR);","SELECT year FROM table_name_26 WHERE position = ""1st"" AND venue = ""paris"";","SELECT year FROM table_name_26 WHERE position = ""1st"" AND venue = ""paris"";",1 What are the top 3 cities with the highest number of hotels that have adopted AI-powered chatbots for customer service?,"CREATE TABLE hotel_data (hotel_id INT, hotel_name TEXT, city TEXT, country TEXT, stars INT, ai_chatbot BOOLEAN); ","SELECT city, COUNT(DISTINCT hotel_id) as hotel_count FROM hotel_data WHERE ai_chatbot = true GROUP BY city ORDER BY hotel_count DESC LIMIT 3;","SELECT city, COUNT(*) as num_hotels FROM hotel_data WHERE ai_chatbot = true GROUP BY city ORDER BY num_hotels DESC LIMIT 3;",0 "What is the average temperature recorded in the 'arctic_weather' table for each month in 2020, grouped by month?","CREATE TABLE arctic_weather (measurement_id INT, measurement_date DATE, temperature DECIMAL(5,2)); ","SELECT AVG(temperature) as avg_temperature, EXTRACT(MONTH FROM measurement_date) as month FROM arctic_weather WHERE EXTRACT(YEAR FROM measurement_date) = 2020 GROUP BY month;","SELECT EXTRACT(MONTH FROM measurement_date) AS month, AVG(temperature) AS avg_temperature FROM arctic_weather WHERE EXTRACT(YEAR FROM measurement_date) = 2020 GROUP BY month;",0 What is the earliest season that Pisico Bình ðinh is team 2?,"CREATE TABLE table_name_95 (season INTEGER, team_2 VARCHAR);","SELECT MIN(season) FROM table_name_95 WHERE team_2 = ""pisico bình ðinh"";","SELECT MIN(season) FROM table_name_95 WHERE team_2 = ""pisico bnh inh"";",0 List the restaurants that have a revenue greater than the average revenue for restaurants in the same city.,"CREATE TABLE restaurants (id INT, name VARCHAR(255), type VARCHAR(255), city VARCHAR(255), revenue FLOAT); ",SELECT name FROM restaurants r1 WHERE revenue > (SELECT AVG(revenue) FROM restaurants r2 WHERE r1.city = r2.city);,SELECT name FROM restaurants WHERE city = 'New York' AND revenue > (SELECT AVG(revenue) FROM restaurants WHERE city = 'New York');,0 Display the number of user signups per day for the social_media_users table for the last month in a line chart format.,"CREATE TABLE social_media_users (user_id INT, signup_date DATE, country VARCHAR(50));","SELECT signup_date, COUNT(*) as new_users FROM social_media_users WHERE signup_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) GROUP BY signup_date;","SELECT signup_date, COUNT(*) FROM social_media_users WHERE signup_date >= DATEADD(month, -1, GETDATE()) GROUP BY signup_date;",0 Identify the number of investments in the Energy sector with a risk assessment score greater than 70.,"CREATE TABLE investments (id INT, company_id INT, sector VARCHAR(255), risk_assessment_score INT); ",SELECT COUNT(*) FROM investments WHERE sector = 'Energy' AND risk_assessment_score > 70;,SELECT COUNT(*) FROM investments WHERE sector = 'Energy' AND risk_assessment_score > 70;,1 "What's the sum of the population for the place simplified 上杭县 with an area smaller than 2,879?","CREATE TABLE table_name_68 (population INTEGER, simplified VARCHAR, area VARCHAR);","SELECT SUM(population) FROM table_name_68 WHERE simplified = ""上杭县"" AND area < 2 OFFSET 879;","SELECT SUM(population) FROM table_name_68 WHERE simplified = """" AND area 2 OFFSET 879;",0 What are the names and average temperatures of the top 3 coldest months in the 'monthly_temperature' table?,"CREATE TABLE monthly_temperature (month TEXT, temperature FLOAT, other_data TEXT);","SELECT mt1.month, AVG(mt1.temperature) as avg_temp FROM monthly_temperature mt1 JOIN (SELECT month, MIN(temperature) as min_temp FROM monthly_temperature GROUP BY month LIMIT 3) mt2 ON mt1.month = mt2.month GROUP BY mt1.month ORDER BY avg_temp ASC;","SELECT month, AVG(temperature) FROM monthly_temperature GROUP BY month ORDER BY AVG(temperature) DESC LIMIT 3;",0 What is the highest-value military equipment sale in the Middle East in 2022?,"CREATE TABLE MilitaryEquipmentSales (id INT, region VARCHAR(50), amount FLOAT, sale_date DATE); ","SELECT region, MAX(amount) FROM MilitaryEquipmentSales WHERE region = 'Middle East' AND sale_date >= '2022-01-01' GROUP BY region;",SELECT MAX(amount) FROM MilitaryEquipmentSales WHERE region = 'Middle East' AND sale_date BETWEEN '2022-01-01' AND '2022-12-31';,0 What is the total local economic impact of eco-friendly hotels in Tokyo and Berlin last year?,"CREATE TABLE economic_impact (impact_id INT, hotel_id INT, city TEXT, amount DECIMAL(10,2)); ","SELECT SUM(amount) FROM economic_impact WHERE city IN ('Tokyo', 'Berlin') AND DATE_TRUNC('year', timestamp) = DATE_TRUNC('year', NOW() - INTERVAL '1 year');","SELECT SUM(amount) FROM economic_impact WHERE city IN ('Tokyo', 'Berlin') AND hotel_id IN (SELECT hotel_id FROM hotels WHERE city IN ('Tokyo', 'Berlin') AND year = 2021;",0 "Show the total number of maintenance activities for components ""engine"" and ""propeller"" from the ""vessel_maintenance"" table.","CREATE TABLE vessel_maintenance (vessel_id VARCHAR(20), component VARCHAR(255), action VARCHAR(255), maintenance_date DATE);","SELECT COUNT(*) FROM vessel_maintenance WHERE component IN ('engine', 'propeller');","SELECT COUNT(*) FROM vessel_maintenance WHERE component IN ('engine', 'propeller');",1 Insert records into 'marine_protected_areas',"CREATE TABLE marine_protected_areas (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), size FLOAT, year_established INT);","INSERT INTO marine_protected_areas (id, name, location, size, year_established) VALUES (1, 'Great Barrier Reef', 'Australia', 344400, 1975), (2, 'Galapagos Marine Reserve', 'Ecuador', 133000, 1998);","INSERT INTO marine_protected_areas (id, name, location, size, year_established);",0 "Which week's game had an attendance of 90,138?","CREATE TABLE table_name_37 (week VARCHAR, attendance VARCHAR);","SELECT week FROM table_name_37 WHERE attendance = ""90,138"";","SELECT week FROM table_name_37 WHERE attendance = ""90,138"";",1 What is the percentage of teachers who have completed more than 5 hours of professional development in the past month?,"CREATE TABLE teacher_development (teacher_id INT, professional_development TEXT, hours INT, completion_date DATE); ","SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM teacher_development WHERE completion_date >= DATEADD(month, -1, GETDATE()))) AS percentage FROM teacher_development WHERE hours > 5 AND completion_date >= DATEADD(month, -1, GETDATE());","SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM teacher_development WHERE completion_date >= DATEADD(month, -1, GETDATE()))) AS percentage FROM teacher_development WHERE professional_development > 5 AND completion_date >= DATEADD(month, -1, GETDATE());",0 What is shown on Tuesday when Monday is showing Fox Sports Primetime?,"CREATE TABLE table_name_77 (tuesday VARCHAR, monday VARCHAR);","SELECT tuesday FROM table_name_77 WHERE monday = ""fox sports primetime"";","SELECT tuesday FROM table_name_77 WHERE monday = ""fox sports primetime"";",1 Show all cities without a branch having more than 100 memberships.,"CREATE TABLE branch (city VARCHAR, membership_amount INTEGER);",SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100;,SELECT city FROM branch WHERE membership_amount 100;,0 "Insert a new record in the network_equipment table for a new router in New York, NY in the amount of 15000.00","CREATE TABLE network_equipment (equipment_id INT, equipment_type VARCHAR(50), location VARCHAR(50), equipment_cost DECIMAL(10,2));","INSERT INTO network_equipment (equipment_id, equipment_type, location, equipment_cost) VALUES ((SELECT MAX(equipment_id) FROM network_equipment) + 1, 'router', 'New York, NY', 15000.00);","INSERT INTO network_equipment (equipment_id, equipment_type, location, equipment_cost) VALUES (1, 'Router', 'New York', 15000.00);",0 What is the chassis more recent than 1967?,"CREATE TABLE table_name_90 (chassis VARCHAR, year INTEGER);",SELECT chassis FROM table_name_90 WHERE year > 1967;,SELECT chassis FROM table_name_90 WHERE year > 1967;,1 Which exhibition had the highest number of visitors on a weekend?,"CREATE TABLE attendance (visitor_id INT, exhibition_name VARCHAR(255), visit_date DATE); ","SELECT exhibition_name, MAX(visit_date) AS max_weekend_visit FROM attendance WHERE EXTRACT(DAY FROM visit_date) BETWEEN 6 AND 7 GROUP BY exhibition_name;","SELECT exhibition_name, COUNT(*) as visitor_count FROM attendance WHERE visit_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) AND CURRENT_DATE GROUP BY exhibition_name ORDER BY visitor_count DESC LIMIT 1;",0 What is the average score of all football matches played in the 'Stadium X'?,"CREATE TABLE Stadiums (stadium_name TEXT, capacity INTEGER); CREATE TABLE FootballMatches (match_id INTEGER, home_team TEXT, away_team TEXT, stadium_name TEXT, home_score INTEGER, away_score INTEGER); ",SELECT AVG(home_score + away_score) FROM FootballMatches WHERE stadium_name = 'Stadium X';,SELECT AVG(home_score) FROM FootballMatches WHERE stadium_name = 'Stadium X';,0 What was the attendance on may 21?,"CREATE TABLE table_name_75 (attendance INTEGER, date VARCHAR);","SELECT MAX(attendance) FROM table_name_75 WHERE date = ""may 21"";","SELECT SUM(attendance) FROM table_name_75 WHERE date = ""may 21"";",0 How many public schools are there in London and Paris?,"CREATE TABLE Schools (City VARCHAR(20), Type VARCHAR(20), Number INT); ","SELECT SUM(Number) FROM Schools WHERE City IN ('London', 'Paris') AND Type = 'Public';","SELECT SUM(Number) FROM Schools WHERE City IN ('London', 'Paris');",0 What is the score [A] of the match at Vanuatu (n) on 5 September 1998?,"CREATE TABLE table_name_39 (score_ VARCHAR, a_ VARCHAR, venue VARCHAR, date VARCHAR);","SELECT score_[a_] FROM table_name_39 WHERE venue = ""vanuatu (n)"" AND date = ""5 september 1998"";","SELECT score_[a_] FROM table_name_39 WHERE venue = ""vanuatu (n)"" AND date = ""5 september 1998"";",1 "Which Result has a Party of republican, and a First elected smaller than 1856?","CREATE TABLE table_name_26 (result VARCHAR, party VARCHAR, first_elected VARCHAR);","SELECT result FROM table_name_26 WHERE party = ""republican"" AND first_elected < 1856;","SELECT result FROM table_name_26 WHERE party = ""republican"" AND first_elected 1856;",0 What is the minimum response time for emergency calls in each region in the last month?,"CREATE TABLE EmergencyCalls (id INT, region VARCHAR(20), response_time INT, date DATE);","SELECT region, MIN(response_time) FROM EmergencyCalls WHERE date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) GROUP BY region;","SELECT region, MIN(response_time) FROM EmergencyCalls WHERE date >= DATEADD(month, -1, GETDATE()) GROUP BY region;",0 What is the minimum production quantity (in metric tons) of Terbium for the year 2017?,"CREATE TABLE production (id INT, mine_id INT, year INT, element TEXT, production_quantity INT); ",SELECT MIN(production_quantity) FROM production WHERE year = 2017 AND element = 'Terbium';,SELECT MIN(production_quantity) FROM production WHERE element = 'Terbium' AND year = 2017;,0 What time has a Set 3 of 25–16?,"CREATE TABLE table_name_14 (time VARCHAR, set_3 VARCHAR);","SELECT time FROM table_name_14 WHERE set_3 = ""25–16"";","SELECT time FROM table_name_14 WHERE set_3 = ""25–16"";",1 How many virtual tours were conducted in Japan in the year 2022?,"CREATE TABLE virtual_tours (id INT, country VARCHAR(255), year INT, num_tours INT); ",SELECT SUM(num_tours) FROM virtual_tours WHERE country = 'Japan' AND year = 2022;,SELECT SUM(num_tours) FROM virtual_tours WHERE country = 'Japan' AND year = 2022;,1 What is the total enrollment of the aa IHSAA class?,"CREATE TABLE table_name_61 (enrollment VARCHAR, ihsaa_class VARCHAR);","SELECT COUNT(enrollment) FROM table_name_61 WHERE ihsaa_class = ""aa"";","SELECT COUNT(enrollment) FROM table_name_61 WHERE ihsaa_class = ""aa"";",1 What's the viewership trend for TV shows in Australia over the last 3 years?,"CREATE TABLE tv_shows (id INT, title VARCHAR(255), release_year INT, country VARCHAR(100), viewership INT);","SELECT release_year, AVG(viewership) as avg_viewership FROM tv_shows WHERE country = 'Australia' GROUP BY release_year ORDER BY release_year DESC LIMIT 3;","SELECT release_year, SUM(viewership) as total_viewers FROM tv_shows WHERE country = 'Australia' AND release_year >= YEAR(CURRENT_DATE) - 3 GROUP BY release_year;",0 "What is the sum of the round of the new york jets NFL club, which has a pick less than 166?","CREATE TABLE table_name_60 (round INTEGER, nfl_club VARCHAR, pick VARCHAR);","SELECT SUM(round) FROM table_name_60 WHERE nfl_club = ""new york jets"" AND pick < 166;","SELECT SUM(round) FROM table_name_60 WHERE nfl_club = ""new york jets"" AND pick 166;",0 "How many institutions are located in wilmore, kentucky and private","CREATE TABLE table_10581768_2 (founded INTEGER, type VARCHAR, location VARCHAR);","SELECT MAX(founded) FROM table_10581768_2 WHERE type = ""Private"" AND location = ""Wilmore, Kentucky"";","SELECT SUM(founded) FROM table_10581768_2 WHERE type = ""Private"" AND location = ""Wilmore, Kentucky"";",0 Valmir Benavides won pole position at which circuit?,"CREATE TABLE table_29361707_2 (circuit VARCHAR, pole_position VARCHAR);","SELECT circuit FROM table_29361707_2 WHERE pole_position = ""Valmir Benavides"";","SELECT circuit FROM table_29361707_2 WHERE pole_position = ""Valmir Benavides"";",1 Delete AI-powered chatbot records with no adoption date in the EMEA region.,"CREATE TABLE chatbot_adoption (chatbot_id INT, hotel_id INT, region VARCHAR(20), adoption_date DATE);",DELETE FROM chatbot_adoption WHERE region = 'EMEA' AND adoption_date IS NULL;,DELETE FROM chatbot_adoption WHERE region = 'EMEA' AND adoption_date IS NULL;,1 What is the total capacity of renewable energy projects in the city of Berlin?,"CREATE TABLE berlin_renewable_energy (project_id INT, project_name VARCHAR(255), city VARCHAR(255), type VARCHAR(255), capacity FLOAT); ",SELECT SUM(capacity) FROM berlin_renewable_energy WHERE city = 'Berlin';,SELECT SUM(capacity) FROM berlin_renewable_energy WHERE city = 'Berlin' AND type = 'Renewable';,0 What percentage of factories comply with labor laws?,"CREATE TABLE labor_compliance (factory_id INT, complies BOOLEAN); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM labor_compliance)) as percentage FROM labor_compliance WHERE complies = TRUE;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM labor_compliance)) FROM labor_compliance WHERE complies = TRUE;,0 What is the average distance traveled per ride in Singapore taxis?,"CREATE TABLE taxi_data (id INT, city VARCHAR(50), distance FLOAT); ",SELECT AVG(distance) FROM taxi_data WHERE city = 'Singapore';,SELECT AVG(distance) FROM taxi_data WHERE city = 'Singapore';,1 What is the total property value in the sustainable urbanism district of Vancouver?,"CREATE TABLE Properties (PropertyID INT, Price DECIMAL(10,2), District VARCHAR(255)); ",SELECT SUM(Price) FROM Properties WHERE District = 'Sustainable Urbanism';,SELECT SUM(Price) FROM Properties WHERE District = 'Vancouver' AND SustainableUrbanism = 'Sustainable Urbanism';,0 How many people on average attend round f?,"CREATE TABLE table_name_28 (attendance INTEGER, round VARCHAR);","SELECT AVG(attendance) FROM table_name_28 WHERE round = ""f"";","SELECT AVG(attendance) FROM table_name_28 WHERE round = ""f"";",1 What is the Jobbik percentage with a Fidesz of 61% and others of 2%?,"CREATE TABLE table_name_41 (jobbik VARCHAR, fidesz VARCHAR, others VARCHAR);","SELECT jobbik FROM table_name_41 WHERE fidesz = ""61%"" AND others = ""2%"";","SELECT jobbik FROM table_name_41 WHERE fidesz = ""61"" AND others = ""2%"";",0 What is the away team's score when footscray is the away team?,CREATE TABLE table_name_74 (away_team VARCHAR);,"SELECT away_team AS score FROM table_name_74 WHERE away_team = ""footscray"";","SELECT away_team AS score FROM table_name_74 WHERE away_team = ""footscray"";",1 What is the average number of electorates (2009) when the district is indore?,"CREATE TABLE table_name_58 (number_of_electorates__2009_ INTEGER, district VARCHAR);","SELECT AVG(number_of_electorates__2009_) FROM table_name_58 WHERE district = ""indore"";","SELECT AVG(number_of_electorates__2009_) FROM table_name_58 WHERE district = ""indore"";",1 How many different results of the population count in 2001 are there for the census division whose population in 1996 is 880859?,"CREATE TABLE table_2134521_1 (pop__2001_ VARCHAR, pop__1996_ VARCHAR);",SELECT COUNT(pop__2001_) FROM table_2134521_1 WHERE pop__1996_ = 880859;,"SELECT COUNT(pop__2001_) FROM table_2134521_1 WHERE pop__1996_ = ""880859"";",0 What was the team's record against philadelphia?,"CREATE TABLE table_27882867_8 (record VARCHAR, team VARCHAR);","SELECT record FROM table_27882867_8 WHERE team = ""Philadelphia"";","SELECT record FROM table_27882867_8 WHERE team = ""Philadelphia"";",1 Find the top 3 countries with the highest defense diplomacy engagement scores in South America and display their corresponding scores.,"CREATE TABLE DefenseDiplomacy (country VARCHAR(255), score INT, region VARCHAR(255)); ","SELECT country, score FROM (SELECT country, score, ROW_NUMBER() OVER (ORDER BY score DESC) as rnk FROM DefenseDiplomacy WHERE region = 'South America') sub WHERE rnk <= 3;","SELECT country, score FROM DefenseDiplomacy WHERE region = 'South America' ORDER BY score DESC LIMIT 3;",0 What is the total number of events with a top-25 less than 0?,"CREATE TABLE table_name_44 (events VARCHAR, top_25 INTEGER);",SELECT COUNT(events) FROM table_name_44 WHERE top_25 < 0;,SELECT COUNT(events) FROM table_name_44 WHERE top_25 0;,0 Which circuit was held on 25–28 march?,"CREATE TABLE table_26686908_2 (circuit VARCHAR, date VARCHAR);","SELECT circuit FROM table_26686908_2 WHERE date = ""25–28 March"";","SELECT circuit FROM table_26686908_2 WHERE date = ""25–28 March"";",1 "What eliminated contestant has October 10, 2009 as the date premiered?","CREATE TABLE table_name_25 (eliminated_contestant VARCHAR, date_premiered__2009_ VARCHAR);","SELECT eliminated_contestant FROM table_name_25 WHERE date_premiered__2009_ = ""october 10"";","SELECT eliminated_contestant FROM table_name_25 WHERE date_premiered__2009_ = ""october 10, 2009"";",0 "What is the rank of each mediator based on the number of cases handled, with ties broken by age and ethnicity?","CREATE TABLE Mediators (MediatorID INT, Name VARCHAR(50), Age INT, Experience INT, Ethnicity VARCHAR(50)); CREATE TABLE Cases (CaseID INT, MediatorID INT, Date DATE); ","SELECT MediatorID, Name, RANK() OVER (ORDER BY COUNT(*) DESC, Age, Ethnicity) as Rank FROM Mediators JOIN Cases ON Mediators.MediatorID = Cases.MediatorID GROUP BY MediatorID, Name;","SELECT m.MediatorID, m.Age, m.Ethnicity, COUNT(c.CaseID) as CaseCount FROM Mediators m JOIN Cases c ON m.MediatorID = c.MediatorID GROUP BY m.MediatorID, m.Age, m.Ethnicity ORDER BY CaseCount DESC;",0 What is the total number of community events in Chicago this year?,"CREATE TABLE CommunityEvents (id INT, city VARCHAR(50), event_date DATE, event_type VARCHAR(50));","SELECT COUNT(*) FROM CommunityEvents WHERE city = 'Chicago' AND event_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND event_type = 'community';","SELECT COUNT(*) FROM CommunityEvents WHERE city = 'Chicago' AND event_date >= DATEADD(year, -1, GETDATE());",0 What is the number of players living in each country?,"CREATE TABLE players (id INT, name VARCHAR(255), age INT, country VARCHAR(255)); ","SELECT country, COUNT(DISTINCT id) AS players_count FROM players GROUP BY country;","SELECT country, COUNT(*) FROM players GROUP BY country;",0 state el canal de las estrellas where mañana es para siempre is impreuna pentru totdeauna,"CREATE TABLE table_18498743_1 (el_canal_de_las_estrellas VARCHAR, mañana_es_para_siempre VARCHAR);","SELECT el_canal_de_las_estrellas FROM table_18498743_1 WHERE mañana_es_para_siempre = ""Impreuna pentru totdeauna"";","SELECT el_canal_de_las_estrellas FROM table_18498743_1 WHERE maana_es_para_siempre = ""Bird pentru totdeauna"";",0 "What is City / State, when Circuit is Eastern Creek Raceway, and when Winner is Michael Donaher?","CREATE TABLE table_name_83 (city___state VARCHAR, circuit VARCHAR, winner VARCHAR);","SELECT city___state FROM table_name_83 WHERE circuit = ""eastern creek raceway"" AND winner = ""michael donaher"";","SELECT city___state FROM table_name_83 WHERE circuit = ""eastern creek raceway"" AND winner = ""michael donaher"";",1 "Which name had a bodyweight bigger than 89.64, a total (kg) bigger than 310, a clean and jerk less than 207.5, and a snatch that is bigger than 165?","CREATE TABLE table_name_89 (name VARCHAR, snatch VARCHAR, bodyweight VARCHAR, total__kg_ VARCHAR, clean_ VARCHAR, _jerk VARCHAR);",SELECT name FROM table_name_89 WHERE bodyweight > 89.64 AND total__kg_ > 310 AND clean_ & _jerk < 207.5 AND snatch > 165;,SELECT name FROM table_name_89 WHERE bodyweight > 89.64 AND total__kg_ > 310 AND clean_ AND _jerk 207.5 AND snatch > 165;,0 What is the total number of animals in the 'AnimalPopulation' table grouped by 'AnimalName'?,"CREATE TABLE AnimalPopulation (AnimalID int, AnimalName varchar(50), Population int); ","SELECT AnimalName, SUM(Population) FROM AnimalPopulation GROUP BY AnimalName;","SELECT AnimalName, SUM(Population) FROM AnimalPopulation GROUP BY AnimalName;",1 What was the outcome in the 2010 Europe/Africa Group IIB edition? ,"CREATE TABLE table_27877656_8 (outcome VARCHAR, edition VARCHAR);","SELECT outcome FROM table_27877656_8 WHERE edition = ""2010 Europe/Africa Group IIB"";","SELECT outcome FROM table_27877656_8 WHERE edition = ""2010 Europe/Africa Group IIB"";",1 What is the name and launch date of the first satellite launched by each country?,"CREATE TABLE countries (id INT, name TEXT); CREATE TABLE satellites (id INT, country_id INT, name TEXT, launch_date DATE, manufacturer TEXT); ","SELECT c.name, s.name, s.launch_date FROM satellites s JOIN countries c ON s.country_id = c.id WHERE s.launch_date = (SELECT MIN(launch_date) FROM satellites WHERE country_id = c.id) GROUP BY c.name;","SELECT c.name, s.launch_date FROM countries c JOIN satellites s ON c.id = s.country_id GROUP BY c.name, s.launch_date ORDER BY s.launch_date DESC;",0 "Find the number of autonomous vehicles in each city, for taxis and shuttles","CREATE TABLE autonomous_vehicles_by_type (id INT PRIMARY KEY, city VARCHAR(255), type VARCHAR(255), num_vehicles INT);","CREATE VIEW autonomous_vehicles_by_type_city AS SELECT city, type, COUNT(*) as num_vehicles FROM autonomous_vehicles WHERE make = 'Wayve' GROUP BY city, type; SELECT * FROM autonomous_vehicles_by_type_city WHERE type IN ('Taxi', 'Shuttle');","SELECT city, type, num_vehicles FROM autonomous_vehicles_by_type WHERE type IN ('Taxi', 'Shuttle') GROUP BY city, type;",0 What country uses the title Marele Câștigător The Big Winner?,"CREATE TABLE table_20780285_1 (country_region VARCHAR, title VARCHAR);","SELECT country_region FROM table_20780285_1 WHERE title = ""Marele câștigător The Big Winner"";","SELECT country_region FROM table_20780285_1 WHERE title = ""Marele Câștigător The Big Winner"";",0 "What is the maximum size of a food justice organization in hectares, grouped by country, and only considering organizations with more than 50 organizations?","CREATE TABLE food_justice_organizations (id INT, name VARCHAR(255), size FLOAT, country VARCHAR(255)); ","SELECT country, MAX(size) as max_size FROM food_justice_organizations GROUP BY country HAVING COUNT(*) > 50;","SELECT country, MAX(size) FROM food_justice_organizations GROUP BY country HAVING COUNT(*) > 50;",0 List the production figures for gas wells in Texas owned by DEF Gas in 2019,"CREATE TABLE production (id INT, well_name VARCHAR(50), location VARCHAR(50), company VARCHAR(50), production_type VARCHAR(10), production_quantity INT, production_date DATE); ",SELECT production_quantity FROM production WHERE location = 'Texas' AND company = 'DEF Gas' AND production_type = 'Gas' AND production_date BETWEEN '2019-01-01' AND '2019-12-31';,SELECT production_quantity FROM production WHERE location = 'Texas' AND company = 'Def Gas' AND production_date BETWEEN '2019-01-01' AND '2019-12-31';,0 What was the score of the home game at Tampa Bay?,"CREATE TABLE table_name_56 (score VARCHAR, home VARCHAR);","SELECT score FROM table_name_56 WHERE home = ""tampa bay"";","SELECT score FROM table_name_56 WHERE home = ""tampa bay"";",1 What's the Ball Diameter with the Culture of Olmec?,"CREATE TABLE table_name_54 (ball_diameter VARCHAR, culture VARCHAR);","SELECT ball_diameter FROM table_name_54 WHERE culture = ""olmec"";","SELECT ball_diameter FROM table_name_54 WHERE culture = ""olmec"";",1 "What is the minimum satisfaction score for models trained on dataset D, for each continent, excluding Europe?","CREATE TABLE models (id INT, dataset VARCHAR(20), satisfaction FLOAT, continent VARCHAR(20)); ","SELECT continent, MIN(satisfaction) FROM models WHERE dataset = 'datasetD' AND continent != 'Europe' GROUP BY continent;","SELECT continent, MIN(satisfaction) FROM models WHERE dataset = 'D' AND continent!= 'Europe' GROUP BY continent;",0 List the wastewater treatment plants and their corresponding capacities in the state of New York.,"CREATE TABLE plants (id INT, plant_name VARCHAR(50), state VARCHAR(50), capacity INT); ","SELECT plant_name, capacity FROM plants WHERE state = 'New York';","SELECT plant_name, capacity FROM plants WHERE state = 'New York';",1 List the names of healthcare providers offering Mental Health services in Texas.,"CREATE TABLE Providers (ProviderID INT, ProviderName VARCHAR(50), Specialty VARCHAR(30), City VARCHAR(20)); ",SELECT ProviderName FROM Providers WHERE Specialty = 'Mental Health' AND City = 'Texas';,SELECT ProviderName FROM Providers WHERE Specialty = 'Mental Health' AND City = 'Texas';,1 Determine the vessels that docked in 'Dubai' and their maximum loading capacity,"CREATE TABLE vessel(vessel_id INT, name VARCHAR(255), loading_capacity INT); CREATE TABLE docking(docking_id INT, vessel_id INT, port VARCHAR(255)); ","SELECT v.name, MAX(v.loading_capacity) as max_loading_capacity FROM vessel v JOIN docking d ON v.vessel_id = d.vessel_id WHERE d.port = 'Dubai';","SELECT v.name, MAX(v.loading_capacity) FROM vessel v JOIN docking d ON v.vessel_id = d.vessel_id WHERE d.port = 'Dubai' GROUP BY v.name;",0 "Which Position has a Played larger than 9, and a Points smaller than 11, and a Drawn smaller than 0?","CREATE TABLE table_name_95 (position INTEGER, drawn VARCHAR, played VARCHAR, points VARCHAR);",SELECT MIN(position) FROM table_name_95 WHERE played > 9 AND points < 11 AND drawn < 0;,SELECT SUM(position) FROM table_name_95 WHERE played > 9 AND points 11 AND drawn 0;,0 Find the intersection of size-inclusive items between brands in Canada and the UK.,"CREATE TABLE Brands (brand_id INT, brand_name TEXT, country TEXT); CREATE TABLE Items (item_id INT, brand_id INT, is_size_inclusive BOOLEAN); CREATE TABLE Sizes (size_id INT, size_name TEXT);",SELECT i.item_id FROM Items i JOIN Brands b1 ON i.brand_id = b1.brand_id JOIN Brands b2 ON i.brand_id = b2.brand_id WHERE b1.country = 'Canada' AND b2.country = 'UK' AND i.is_size_inclusive = TRUE;,"SELECT Brands.brand_name, I.is_size_inclusive FROM Brands INNER JOIN Items ON Brands.brand_id = Items.brand_id INNER JOIN Sizes ON Items.size_id = Sizes.size_id WHERE Brands.country IN ('Canada', 'UK') AND Items.is_size_inclusive = true;",0 How many spacecraft have been manufactured in each country?,"CREATE TABLE Spacecraft (SpacecraftID INT, ManufacturingCountry VARCHAR);","SELECT ManufacturingCountry, COUNT(*) FROM Spacecraft GROUP BY ManufacturingCountry;","SELECT ManufacturingCountry, COUNT(*) FROM Spacecraft GROUP BY ManufacturingCountry;",1 Which event had a decision method?,"CREATE TABLE table_name_12 (event VARCHAR, method VARCHAR);","SELECT event FROM table_name_12 WHERE method = ""decision"";","SELECT event FROM table_name_12 WHERE method = ""decision"";",1 What is the total quantity of locally sourced fruits supplied in Q2 2022?,"CREATE TABLE sourcing (id INT, region VARCHAR(50), product VARCHAR(50), quantity INT, local BOOLEAN); ","SELECT region, SUM(quantity) as total_quantity FROM sourcing WHERE local = true AND datepart(yy, date) = 2022 AND datepart(qq, date) = 2 GROUP BY region;",SELECT SUM(quantity) FROM sourcing WHERE region = 'North America' AND product = 'Fruits' AND local = true AND Q2 = 2022;,0 Delete the record with ID 2 from the oceanography_data table,"CREATE TABLE oceanography_data (id INT PRIMARY KEY, location VARCHAR(255), temperature DECIMAL(5,2), salinity DECIMAL(5,2), depth DECIMAL(5,2));",WITH deleted_data AS (DELETE FROM oceanography_data WHERE id = 2 RETURNING *) SELECT * FROM deleted_data;,DELETE FROM oceanography_data WHERE id = 2;,0 What is the total area (in hectares) of land under conservation agriculture in each country?,"CREATE TABLE conservation_agriculture (country VARCHAR(50), area INT); ","SELECT country, area FROM conservation_agriculture;","SELECT country, SUM(area) FROM conservation_agriculture GROUP BY country;",0 What is the rank where the gold is 0?,"CREATE TABLE table_name_70 (rank INTEGER, gold INTEGER);",SELECT AVG(rank) FROM table_name_70 WHERE gold < 0;,SELECT AVG(rank) FROM table_name_70 WHERE gold = 0;,0 "What is the number of floors when the r Rank larger than 41, and a City of parel?","CREATE TABLE table_name_72 (floors VARCHAR, rank VARCHAR, city VARCHAR);","SELECT floors FROM table_name_72 WHERE rank > 41 AND city = ""parel"";","SELECT COUNT(floors) FROM table_name_72 WHERE rank > 41 AND city = ""parel"";",0 How many customers have a Shariah-compliant mortgage?,"CREATE TABLE shariah_compliant_mortgages (mortgage_id INT, customer_id INT); ",SELECT COUNT(DISTINCT customer_id) FROM shariah_compliant_mortgages;,SELECT COUNT(*) FROM shariah_compliant_mortgages;,0 Insert a new textile supplier 'Sustainable Textiles Inc.' from 'Bangladesh' into the 'Supplier' table,"CREATE TABLE Supplier (id INT PRIMARY KEY, name VARCHAR(50), country VARCHAR(50), sustainability_score INT);","INSERT INTO Supplier (id, name, country, sustainability_score) VALUES (15, 'Sustainable Textiles Inc.', 'Bangladesh', 80);","INSERT INTO Supplier (name, country, sustainability_score) VALUES ('Sustainable Textiles Inc.', 'Bangladesh');",0 What are the names and birthdates of policyholders who have a policy in both the 'Auto' and 'Life' categories?,"CREATE TABLE Policyholder (PolicyholderID INT, Name TEXT, Birthdate DATE, PolicyType TEXT); ","SELECT Name, Birthdate FROM Policyholder WHERE PolicyType = 'Auto' INTERSECT SELECT Name, Birthdate FROM Policyholder WHERE PolicyType = 'Life';","SELECT Name, Birthdate FROM Policyholder WHERE PolicyType IN ('Auto', 'Life');",0 "What is Pick #, when Round is ""10""?","CREATE TABLE table_name_49 (pick__number VARCHAR, round VARCHAR);",SELECT pick__number FROM table_name_49 WHERE round = 10;,"SELECT pick__number FROM table_name_49 WHERE round = ""10"";",0 What is the number of articles published per month for each author in the 'articles' table?,"CREATE TABLE articles (pub_date DATE, title TEXT, author TEXT);","SELECT DATE_TRUNC('month', pub_date) AS month, author, COUNT(*) FROM articles GROUP BY month, author;","SELECT author, DATE_FORMAT(pub_date, '%Y-%m') as month, COUNT(*) as articles_per_month FROM articles GROUP BY author, month;",0 What is the scoreof the away team Collingwood?,CREATE TABLE table_name_83 (away_team VARCHAR);,"SELECT away_team AS score FROM table_name_83 WHERE away_team = ""collingwood"";","SELECT away_team AS score FROM table_name_83 WHERE away_team = ""collingwood"";",1 What is the total revenue for restaurants that source at least 50% of their ingredients locally?,"CREATE TABLE restaurant_revenue(restaurant_id INT, cuisine_type TEXT, revenue FLOAT), local_sourcing(restaurant_id INT, local_source BOOLEAN); ",SELECT SUM(revenue) FROM restaurant_revenue WHERE restaurant_id IN (SELECT restaurant_id FROM local_sourcing WHERE local_source = TRUE) AND cuisine_type IN (SELECT cuisine_type FROM local_sourcing WHERE local_source = TRUE) GROUP BY cuisine_type;,SELECT SUM(revenue) FROM restaurant_revenue WHERE local_sourcing = TRUE AND local_source = true AND cuisine_type = 'Cuisine';,0 Which vulnerabilities have been detected in the last 30 days and have a CVSS score higher than 7?,"CREATE TABLE vulnerabilities (vulnerability_id INT PRIMARY KEY, vulnerability_name VARCHAR(255), cvss_score INT, last_detected TIMESTAMP);","SELECT vulnerability_name, cvss_score FROM vulnerabilities WHERE last_detected >= NOW() - INTERVAL 30 DAY AND cvss_score > 7;","SELECT vulnerability_name FROM vulnerabilities WHERE last_detected >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 30 DAY) AND cvss_score > 7;",0 What is the total quantity of items shipped from the USA to Canada?,"CREATE TABLE Warehouse (id INT, location VARCHAR(50), quantity INT); ",SELECT SUM(quantity) FROM Warehouse WHERE location = 'USA';,SELECT SUM(quantity) FROM Warehouse WHERE location = 'USA' AND location = 'Canada';,0 What is the most common type of orbit for satellites in the 'Satellites' table?,"CREATE TABLE Satellites (Satellite_ID INT, Name VARCHAR(100), Orbit VARCHAR(50)); ","SELECT Orbit, COUNT(*) FROM Satellites GROUP BY Orbit ORDER BY COUNT(*) DESC LIMIT 1;","SELECT Orbit, COUNT(*) FROM Satellites GROUP BY Orbit ORDER BY COUNT(*) DESC LIMIT 1;",1 Who visited phoenix with a Record of 2–5–0?,"CREATE TABLE table_name_64 (visitor VARCHAR, home VARCHAR, record VARCHAR);","SELECT visitor FROM table_name_64 WHERE home = ""phoenix"" AND record = ""2–5–0"";","SELECT visitor FROM table_name_64 WHERE home = ""phoenix"" AND record = ""2–5–0"";",1 How many laps have an average speed (mph) of 140.22?,"CREATE TABLE table_2226343_1 (laps VARCHAR, average_speed__mph_ VARCHAR);","SELECT laps FROM table_2226343_1 WHERE average_speed__mph_ = ""140.22"";","SELECT laps FROM table_2226343_1 WHERE average_speed__mph_ = ""140.22"";",1 What is the average financial wellbeing score of customers who took out a financial capability loan in the last quarter?,"CREATE TABLE financial_capability_loans (id INT PRIMARY KEY, customer_id INT, amount DECIMAL(10,2), date DATE, wellbeing_score INT); CREATE VIEW last_quarter_loans AS SELECT * FROM financial_capability_loans WHERE date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH);",SELECT AVG(wellbeing_score) FROM last_quarter_loans WHERE amount > 0;,SELECT AVG(wellbeing_score) FROM last_quarter_loans;,0 What is the maximum heart rate recorded for users who ran more than 10 miles?,"CREATE TABLE runs (id INT, user_id INT, distance FLOAT, hr INT); ",SELECT MAX(hr) FROM runs WHERE distance > 10;,SELECT MAX(hr) FROM runs WHERE distance > 10;,1 What was the reward when immunity went to martin and finish is 13th voted out 8th jury member day 46?,"CREATE TABLE table_25016824_2 (reward VARCHAR, immunity VARCHAR, finish VARCHAR);","SELECT reward FROM table_25016824_2 WHERE immunity = ""Martin"" AND finish = ""13th voted Out 8th Jury Member Day 46"";","SELECT reward FROM table_25016824_2 WHERE immunity = ""Martin"" AND finish = ""13th voted out 8th jury member day 46"";",0 "What was the kickoff time on monday, may 13?","CREATE TABLE table_1639689_2 (kickoff VARCHAR, date VARCHAR);","SELECT kickoff FROM table_1639689_2 WHERE date = ""Monday, May 13"";","SELECT kickoff FROM table_1639689_2 WHERE date = ""Monday, May 13"";",1 Insert a new farm with the ID 501,"CREATE TABLE farms (farm_id INT, name VARCHAR(50), location VARCHAR(50));","INSERT INTO farms (farm_id, name, location) VALUES (501, 'Maplewood Farm', 'California');","INSERT INTO farms (farm_id, name, location) VALUES (501);",0 What is the total quantity of recycled nylon sourced from Asia?,"CREATE TABLE recycled_fabric (id INT, fabric_type VARCHAR(20), quantity INT, continent VARCHAR(20)); ",SELECT SUM(quantity) FROM recycled_fabric WHERE fabric_type = 'recycled_nylon' AND continent = 'Asia';,SELECT SUM(quantity) FROM recycled_fabric WHERE fabric_type = 'Nylon' AND continent = 'Asia';,0 "What is the total energy generated by wind and solar sources, and the corresponding carbon pricing in 2021?","CREATE TABLE wind_energy (year INT, region VARCHAR(20), energy_generated INT);CREATE TABLE solar_energy (year INT, region VARCHAR(20), energy_generated INT);CREATE TABLE carbon_pricing (region VARCHAR(20), price DECIMAL(5,2));","SELECT SUM(w.energy_generated) + SUM(s.energy_generated) AS total_energy, c.price FROM wind_energy w JOIN solar_energy s ON w.year = s.year JOIN carbon_pricing c ON w.region = c.region WHERE w.year = 2021 GROUP BY w.region;","SELECT SUM(wind_energy.energy_generated) as total_energy, SUM(solar_energy.energy_generated) as total_energy FROM wind_energy INNER JOIN carbon_pricing ON wind_energy.region = carbon_pricing.region WHERE wind_energy.year = 2021 GROUP BY solar_energy.region;",0 "What is the pos from 2003, and the f event?","CREATE TABLE table_name_64 (pos VARCHAR, year VARCHAR, event VARCHAR);","SELECT pos FROM table_name_64 WHERE year = ""2003"" AND event = ""f"";","SELECT pos FROM table_name_64 WHERE year = 2003 AND event = ""f"";",0 What is the total health equity metric for each region in 2022?,"CREATE TABLE HealthEquityMetrics (MetricID INT, Region VARCHAR(255), MetricValue INT, ReportDate DATE); ","SELECT Region, SUM(MetricValue) FROM HealthEquityMetrics WHERE YEAR(ReportDate) = 2022 GROUP BY Region;","SELECT Region, SUM(MetricValue) FROM HealthEquityMetrics WHERE YEAR(ReportDate) = 2022 GROUP BY Region;",1 Which maritime laws were enacted in the Mediterranean Sea since 2010?,"CREATE TABLE maritime_laws (region TEXT, year INT, law_name TEXT); ",SELECT * FROM maritime_laws WHERE region = 'Mediterranean Sea' AND year >= 2010;,SELECT law_name FROM maritime_laws WHERE region = 'Mediterranean Sea' AND year >= 2010;,0 What is the average number of assists per game for the Clippers?,"CREATE TABLE teams (team_id INT, team_name VARCHAR(50)); CREATE TABLE games (game_id INT, home_team_id INT, away_team_id INT, home_team_score INT, away_team_score INT, home_team_assists INT, away_team_assists INT); ",SELECT AVG(home_team_assists + away_team_assists) as avg_assists FROM games WHERE home_team_id = (SELECT team_id FROM teams WHERE team_name = 'Clippers') OR away_team_id = (SELECT team_id FROM teams WHERE team_name = 'Clippers');,SELECT AVG(home_team_assists / away_team_assists) FROM games JOIN teams ON games.away_team_id = teams.team_id WHERE teams.team_name = 'Clippers';,0 What is the average energy efficiency rating of residential buildings in Berlin?,"CREATE TABLE building_ratings (id INT, sector TEXT, location TEXT, rating FLOAT); ",SELECT AVG(rating) FROM building_ratings WHERE sector = 'residential' AND location = 'Berlin';,SELECT AVG(rating) FROM building_ratings WHERE sector = 'Residential' AND location = 'Berlin';,0 What is the average delivery time for orders from cultivation facility X?,"CREATE TABLE Orders (OrderID INT, CultivationFacility VARCHAR(255), DeliveryTime INT); ",SELECT AVG(DeliveryTime) AS AverageDeliveryTime FROM Orders WHERE CultivationFacility = 'Facility X';,SELECT AVG(DeliveryTime) FROM Orders WHERE CultivationFacility = 'X';,0 "What were the total sales of a specific drug, 'DrugX', in the year 2020 across different regions?","CREATE TABLE sales (drug_name VARCHAR(50), sale_year INT, region VARCHAR(50), revenue FLOAT); ","SELECT SUM(revenue) as total_sales, region FROM sales WHERE drug_name = 'DrugX' AND sale_year = 2020 GROUP BY region;","SELECT region, SUM(revenue) FROM sales WHERE drug_name = 'DrugX' AND sale_year = 2020 GROUP BY region;",0 "Add a new mining site in Australia with the name ""New Horizon"" and coordinates (123.45, -67.89).","CREATE TABLE mining_sites (id INT PRIMARY KEY, name VARCHAR(50), latitude DECIMAL(9,6), longitude DECIMAL(9,6));","INSERT INTO mining_sites (name, latitude, longitude) VALUES ('New Horizon', 123.45, -67.89);","INSERT INTO mining_sites (name, latitude, longitude) VALUES ('New Horizon', 'Australia', 123.45, -67.89);",0 What is the minimum severity level of threats detected in the 'IT' department in 2021?,"CREATE TABLE threats (id INT, department VARCHAR(20), severity INT, detection_date DATE); ",SELECT MIN(severity) FROM threats WHERE department = 'IT' AND YEAR(detection_date) = 2021;,SELECT MIN(severity) FROM threats WHERE department = 'IT' AND detection_date BETWEEN '2021-01-01' AND '2021-12-31';,0 "Play-by-play of sean grande, and a Flagship Station of wrko involved what color commentator?","CREATE TABLE table_name_99 (color_commentator_s_ VARCHAR, play_by_play VARCHAR, flagship_station VARCHAR);","SELECT color_commentator_s_ FROM table_name_99 WHERE play_by_play = ""sean grande"" AND flagship_station = ""wrko"";","SELECT color_commentator_s_ FROM table_name_99 WHERE play_by_play = ""sean grande"" AND flagship_station = ""wrko"";",1 What was the maximum cargo weight for a single vessel in the past week?,"CREATE TABLE cargos(id INT, vessel_id INT, cargo_weight FLOAT); CREATE TABLE vessel_locations(id INT, vessel_id INT, location VARCHAR(50), timestamp TIMESTAMP);","SELECT MAX(cargo_weight) FROM cargos JOIN vessel_locations ON cargos.vessel_id = vessel_locations.vessel_id WHERE timestamp > DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) GROUP BY vessel_id","SELECT MAX(cargo_weight) FROM cargos JOIN vessel_locations ON cargos.vessel_id = vessel_locations.vessel_id WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 WEEK);",0 Add a new player 'Sara Connor' to the Players table,"CREATE TABLE Players (PlayerID int, Name varchar(50), Age int, Gender varchar(10)); ","INSERT INTO Players (PlayerID, Name, Age, Gender) VALUES (4, 'Sara Connor', 28, 'Female');","INSERT INTO Players (PlayerID, Name, Age, Gender) VALUES (3, 'Sara Connor', 'Asian', 'Female');",0 When has a Week of 8?,"CREATE TABLE table_name_73 (date VARCHAR, week VARCHAR);",SELECT date FROM table_name_73 WHERE week = 8;,SELECT date FROM table_name_73 WHERE week = 8;,1 What Tries against that have a Points against of 95 and Tries for larger than 20?,"CREATE TABLE table_name_91 (tries_against INTEGER, points_against VARCHAR, tries_for VARCHAR);",SELECT SUM(tries_against) FROM table_name_91 WHERE points_against = 95 AND tries_for > 20;,SELECT SUM(tries_against) FROM table_name_91 WHERE points_against = 95 AND tries_for > 20;,1 Name the result for uncaf nations cup 2009 and 6 goal,"CREATE TABLE table_name_3 (result VARCHAR, competition VARCHAR, goal VARCHAR);","SELECT result FROM table_name_3 WHERE competition = ""uncaf nations cup 2009"" AND goal = 6;","SELECT result FROM table_name_3 WHERE competition = ""uncaf nations cup 2009"" AND goal = ""6"";",0 What's Chick Harbert's To par?,"CREATE TABLE table_name_21 (to_par VARCHAR, player VARCHAR);","SELECT to_par FROM table_name_21 WHERE player = ""chick harbert"";","SELECT to_par FROM table_name_21 WHERE player = ""chicken harbert"";",0 What is the maximum safety incident rate for each plant location?,"CREATE TABLE plant_locations (id INT, name TEXT, region TEXT, safety_incident_rate INT); ","SELECT region, MAX(safety_incident_rate) FROM plant_locations GROUP BY region;","SELECT name, MAX(safety_incident_rate) FROM plant_locations GROUP BY name;",0 What is the Aggregate of Bayer Leverkusen opponents?,"CREATE TABLE table_name_56 (aggregate VARCHAR, opponents VARCHAR);","SELECT aggregate FROM table_name_56 WHERE opponents = ""bayer leverkusen"";","SELECT aggregate FROM table_name_56 WHERE opponents = ""bayer leverkusen"";",1 What is the average number of military innovation projects completed per month in 2022?,"CREATE TABLE MilitaryInnovationByMonth (Month VARCHAR(10), Projects INT); ",SELECT AVG(Projects) FROM MilitaryInnovationByMonth WHERE YEAR(Month) = 2022;,SELECT AVG(Projects) FROM MilitaryInnovationByMonth WHERE Year = 2022;,0 Which biodiversity monitoring programs have collected data at more than 2 arctic research stations?,"CREATE TABLE biodiversity_monitoring_programs (id INT, name TEXT, region TEXT); CREATE TABLE biodiversity_data (program_id INT, station_id INT, year INT, species_count INT); ","SELECT program_id, name, COUNT(DISTINCT station_id) as stations_visited FROM biodiversity_data GROUP BY program_id, name HAVING stations_visited > 2;",SELECT bm.name FROM biodiversity_monitoring_programs bm JOIN biodiversity_data bd ON bm.id = bd.program_id WHERE bm.region = 'Arctic' GROUP BY bm.name HAVING COUNT(DISTINCT bd.station_id) > 2;,0 What is the total amount of coal produced by each mine in 2020?,"CREATE TABLE production_2020 (id INT, mine VARCHAR(50), year INT, resource VARCHAR(50), quantity INT); ","SELECT mine, SUM(CASE WHEN resource = 'Coal' THEN quantity ELSE 0 END) AS coal_production FROM production_2020 WHERE year = 2020 GROUP BY mine;","SELECT mine, SUM(quantity) FROM production_2020 WHERE resource = 'Coal' AND year = 2020 GROUP BY mine;",0 What is the total water usage by each industrial sector in California in 2020?',"CREATE TABLE industrial_water_usage (state VARCHAR(20), year INT, sector VARCHAR(30), usage FLOAT); ","SELECT sector, SUM(usage) FROM industrial_water_usage WHERE state = 'California' AND year = 2020 GROUP BY sector;","SELECT sector, SUM(usage) FROM industrial_water_usage WHERE state = 'California' AND year = 2020 GROUP BY sector;",1 Who are the authors for the malasaurus of the vyazniki assemblage?,"CREATE TABLE table_name_16 (authors VARCHAR, unit VARCHAR, name VARCHAR);","SELECT authors FROM table_name_16 WHERE unit = ""vyazniki assemblage"" AND name = ""malasaurus"";","SELECT authors FROM table_name_16 WHERE unit = ""vyazniki assemblage"" AND name = ""malasaurus"";",1 Identify the top 3 volunteers with the most volunteer hours in Q2 2022?,"CREATE TABLE volunteers_q2_2022 (id INT, name VARCHAR(50), volunteer_hours INT, volunteer_date DATE); ","SELECT name, SUM(volunteer_hours) as total_hours FROM volunteers_q2_2022 WHERE volunteer_date >= '2022-04-01' GROUP BY name ORDER BY total_hours DESC LIMIT 3;","SELECT name, volunteer_hours FROM volunteers_q2_2022 ORDER BY volunteer_hours DESC LIMIT 3;",0 What is the percentage of patients who identify as LGBTQ+ with a mental health disorder?,"CREATE TABLE patients_demographics (patient_id INT, gender VARCHAR(50), mental_health_disorder BOOLEAN); ","SELECT gender, mental_health_disorder, COUNT(*) as num_patients, COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (PARTITION BY gender) as percentage FROM patients_demographics GROUP BY gender, mental_health_disorder HAVING mental_health_disorder = true AND (gender = 'Transgender Male' OR gender = 'Queer');",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM patients_demographics WHERE mental_health_disorder = TRUE)) FROM patients_demographics WHERE gender = 'LGBTQ+';,0 Calculate the total number of animals in each continent in the 'habitat_preservation' table,"CREATE TABLE habitat_preservation (id INT, animal_species VARCHAR(50), population INT, continent VARCHAR(50)); ","SELECT continent, SUM(population) FROM habitat_preservation GROUP BY continent;","SELECT continent, SUM(population) FROM habitat_preservation GROUP BY continent;",1 What is the total revenue for the top 3 genres?,"CREATE TABLE MusicGenre (GenreID INT, GenreName VARCHAR(50), Revenue DECIMAL(10,2)); ","SELECT GenreName, SUM(Revenue) AS TotalRevenue FROM (SELECT GenreName, Revenue, ROW_NUMBER() OVER (ORDER BY Revenue DESC) AS Rank FROM MusicGenre) AS Subquery WHERE Rank <= 3 GROUP BY GenreName;","SELECT GenreName, SUM(Revenue) as TotalRevenue FROM MusicGenre GROUP BY GenreName ORDER BY TotalRevenue DESC LIMIT 3;",0 What is the average project timeline for green building projects in Colorado?,"CREATE TABLE project_timelines (id INT, project_id INT, start_date DATE, end_date DATE); CREATE TABLE building_projects (id INT, name TEXT, state TEXT, is_green BOOLEAN); ","SELECT AVG(DATEDIFF(end_date, start_date)) FROM project_timelines JOIN building_projects ON project_timelines.project_id = building_projects.id WHERE building_projects.state = 'Colorado' AND building_projects.is_green = true;","SELECT AVG(project_timelines.start_date, project_timelines.end_date) FROM project_timelines INNER JOIN building_projects ON project_timelines.project_id = building_projects.id WHERE building_projects.state = 'Colorado' AND building_projects.is_green = true;",0 Who was the pregame host before 1992 when there was a play by play of Bob Irving?,"CREATE TABLE table_name_51 (pregame_host VARCHAR, year VARCHAR, play_by_play VARCHAR);","SELECT pregame_host FROM table_name_51 WHERE year < 1992 AND play_by_play = ""bob irving"";","SELECT pregame_host FROM table_name_51 WHERE year 1992 AND play_by_play = ""bob irving"";",0 Who is the top scorer among players from Canada in the 2019 season?,"CREATE TABLE players (player_id INT, name TEXT, nationality TEXT, points INT, season INT); ","SELECT name, MAX(points) FROM players WHERE nationality = 'Canada' AND season = 2019;","SELECT name, SUM(points) as total_points FROM players WHERE nationality = 'Canada' AND season = 2019 GROUP BY name ORDER BY total_points DESC LIMIT 1;",0 What brand is model G6xxx?,"CREATE TABLE table_24018112_1 (brand_name VARCHAR, model__list_ VARCHAR);","SELECT brand_name FROM table_24018112_1 WHERE model__list_ = ""G6xxx"";","SELECT brand_name FROM table_24018112_1 WHERE model__list_ = ""G6xxx"";",1 What is the total number of volunteers and total volunteer hours per program type?,"CREATE TABLE VolunteerProgram (VolunteerProgramID INT, ProgramType TEXT, VolunteerHours DECIMAL); ","SELECT ProgramType, COUNT(*) as Volunteers, SUM(VolunteerHours) as TotalHours FROM VolunteerProgram GROUP BY ProgramType;","SELECT ProgramType, SUM(VolunteerHours) as TotalVolunteers, SUM(VolunteerHours) as TotalVolunteerHours FROM VolunteerProgram GROUP BY ProgramType;",0 What day in November has a record of 15-6-1?,"CREATE TABLE table_name_91 (november INTEGER, record VARCHAR);","SELECT AVG(november) FROM table_name_91 WHERE record = ""15-6-1"";","SELECT AVG(november) FROM table_name_91 WHERE record = ""15-6-1"";",1 What is the average monthly budget for each department in 2023?,"CREATE TABLE Budget (BudgetID int, DepartmentID int, Amount decimal, StartDate date, EndDate date); ","SELECT DepartmentID, AVG(Amount/12) as AvgMonthlyBudget FROM Budget WHERE YEAR(StartDate) = 2023 GROUP BY DepartmentID;","SELECT DepartmentID, AVG(Amount) as AvgMonthlyBudget FROM Budget WHERE YEAR(StartDate) = 2023 GROUP BY DepartmentID;",0 What is the total revenue for the 'leisure' category in Q3 of 2022?,"CREATE TABLE hotel_revenue_quarterly (hotel_id INT, category TEXT, revenue FLOAT, quarter INT, year INT); ",SELECT SUM(revenue) FROM hotel_revenue_quarterly WHERE category = 'leisure' AND quarter = 3 AND year = 2022;,SELECT SUM(revenue) FROM hotel_revenue_quarterly WHERE category = 'leisure' AND quarter = 3 AND year = 2022;,1 What is the total duration of strength training workouts for users aged 25-35?,"CREATE TABLE workouts (id INT, user_id INT, workout_type VARCHAR(20), duration INT); CREATE TABLE users (id INT, birthdate DATE); ",SELECT SUM(duration) as total_duration FROM workouts JOIN users ON workouts.user_id = users.id WHERE users.birthdate BETWEEN '1986-01-01' AND '1996-12-31' AND workout_type = 'Strength Training';,SELECT SUM(w.duration) FROM workouts w JOIN users u ON w.user_id = u.id WHERE w.workout_type = 'Strength Training' AND u.birthdate BETWEEN '2022-01-01' AND '2022-12-31';,0 What is the ERP W with a call sign at w261cq?,"CREATE TABLE table_name_19 (erp_w VARCHAR, call_sign VARCHAR);","SELECT erp_w FROM table_name_19 WHERE call_sign = ""w261cq"";","SELECT erp_w FROM table_name_19 WHERE call_sign = ""w261cq"";",1 What is the binary meaning for symbol p?,"CREATE TABLE table_name_91 (binary_meaning VARCHAR, symbol VARCHAR);","SELECT binary_meaning FROM table_name_91 WHERE symbol = ""p"";","SELECT binary_meaning FROM table_name_91 WHERE symbol = ""p"";",1 When is the appointment date for outgoing manager Petrik Sander?,"CREATE TABLE table_name_60 (date_of_appointment VARCHAR, outgoing_manager VARCHAR);","SELECT date_of_appointment FROM table_name_60 WHERE outgoing_manager = ""petrik sander"";","SELECT date_of_appointment FROM table_name_60 WHERE outgoing_manager = ""petrik sander"";",1 How many movies were released by year in the Media database?,"CREATE TABLE ReleaseYears (MovieTitle VARCHAR(50), ReleaseYear INT); ","SELECT ReleaseYear, COUNT(*) as MoviesByYear FROM ReleaseYears GROUP BY ReleaseYear;","SELECT ReleaseYear, COUNT(*) FROM ReleaseYears GROUP BY ReleaseYear;",0 What is the drew for the 1999-2000 season when they were in third place?,"CREATE TABLE table_name_52 (drew VARCHAR, round VARCHAR, season VARCHAR);","SELECT drew FROM table_name_52 WHERE round = ""third place"" AND season = ""1999-2000"";","SELECT draw FROM table_name_52 WHERE round = ""third"" AND season = ""1999-2000"";",0 "Identify the top 3 policy types with the highest total claim amount for female policyholders in India, ordered by the average claim amount in descending order.","CREATE TABLE Policyholders (PolicyholderID INT, Gender VARCHAR(50), Country VARCHAR(50)); CREATE TABLE Claims (PolicyID INT, PolicyType VARCHAR(20), ClaimAmount DECIMAL(10, 2)); ","SELECT PolicyType, SUM(ClaimAmount) AS TotalClaimAmount, AVG(ClaimAmount) AS AvgClaimAmount FROM Claims JOIN Policyholders ON Claims.PolicyID = Policyholders.PolicyholderID WHERE Gender = 'Female' AND Country = 'India' GROUP BY PolicyType ORDER BY TotalClaimAmount DESC, AvgClaimAmount DESC LIMIT 3;","SELECT PolicyType, AVG(ClaimAmount) as AvgClaimAmount FROM Claims JOIN Policyholders ON Claims.PolicyID = Policyholders.PolicyholderID WHERE Policyholders.Gender = 'Female' AND Policyholders.Country = 'India' GROUP BY PolicyType ORDER BY AvgClaimAmount DESC LIMIT 3;",0 Monthly sales revenue of organic cosmetics by region?,"CREATE TABLE sales_data (sale_id INT, product_id INT, sale_date DATE, organic BOOLEAN, region VARCHAR(50)); ","SELECT DATEPART(month, sale_date) as month, region, SUM(CASE WHEN organic THEN 1 ELSE 0 END) as organic_sales FROM sales_data GROUP BY DATEPART(month, sale_date), region;","SELECT region, DATE_FORMAT(sale_date, '%Y-%m') AS month, SUM(organic) AS organic_revenue FROM sales_data GROUP BY region, month;",0 If you're a major general in the US air force then what ranking will you receive in the commonwealth's air force?,"CREATE TABLE table_1015521_2 (commonwealth_equivalent VARCHAR, us_air_force_equivalent VARCHAR);","SELECT commonwealth_equivalent FROM table_1015521_2 WHERE us_air_force_equivalent = ""Major General"";","SELECT commonwealth_equivalent FROM table_1015521_2 WHERE us_air_force_equivalent = ""Major General"";",1 What is the average funding received by biotech startups in each state?,"CREATE SCHEMA if not exists avg_funding;CREATE TABLE if not exists avg_funding.startups (id INT, name VARCHAR(100), state VARCHAR(50), funding DECIMAL(10,2));","SELECT state, AVG(funding) FROM avg_funding.startups GROUP BY state;","SELECT state, AVG(funding) FROM avg_funding.startups GROUP BY state;",1 Which farmers in Australia have irrigation events lasting more than 80 minutes?,"CREATE TABLE Irrigation (id INT, farm_id INT, date DATE, duration INT); ",SELECT f.name FROM Farmers f JOIN Irrigation i ON f.id = i.farm_id WHERE f.country = 'Australia' AND i.duration > 80;,SELECT farm_id FROM Irrigation WHERE country = 'Australia' AND duration > 80;,0 What is the average temperature increase in the Arctic region between 2010 and 2020 compared to the global average temperature increase during the same period?,"CREATE TABLE arctic_temperatures (year INT, avg_temperature FLOAT); CREATE TABLE global_temperatures (year INT, avg_temperature FLOAT); ",SELECT AVG(at.avg_temperature - gt.avg_temperature) * 100 AS arctic_global_temp_diff FROM arctic_temperatures at JOIN global_temperatures gt ON at.year = gt.year WHERE at.year BETWEEN 2010 AND 2020;,SELECT AVG(arctic_temperatures.avg_temperature) FROM arctic_temperatures INNER JOIN global_temperatures ON arctic_temperatures.year = global_temperatures.year WHERE arctic_temperatures.year BETWEEN 2010 AND 2020;,0 What's the total sum of points scored by the Brisbane Broncos?,"CREATE TABLE table_name_80 (points INTEGER, premiers VARCHAR);","SELECT SUM(points) FROM table_name_80 WHERE premiers = ""brisbane broncos"";","SELECT SUM(points) FROM table_name_80 WHERE premiers = ""brisbane broncos"";",1 What is the number of races associated with Team ASM and 0 poles?,"CREATE TABLE table_name_19 (races VARCHAR, poles VARCHAR, team VARCHAR);","SELECT races FROM table_name_19 WHERE poles = ""0"" AND team = ""asm"";","SELECT COUNT(races) FROM table_name_19 WHERE poles = 0 AND team = ""asm"";",0 "What is the maximum 'quantity' for each chemical, if any, that is part of a 'reaction' and has a safety rating above 80 in the 'chemicals' table?","CREATE TABLE reaction (id INT, chemical_id INT, quantity INT); CREATE TABLE chemicals (id INT, chemical_name VARCHAR(255), safety_rating INT); ","SELECT r.chemical_id, MAX(r.quantity) as max_quantity FROM reaction r JOIN chemicals c ON r.chemical_id = c.id WHERE c.safety_rating > 80 GROUP BY r.chemical_id;","SELECT c.chemical_name, MAX(r.quantity) FROM reaction r JOIN chemicals c ON r.chemical_id = c.id WHERE r.safety_rating > 80 GROUP BY c.chemical_name;",0 "Insert a new record into the 'humanitarian_assistance' table with the following data: 'Operation Pacific Haven', 'Asia', 'completed'","CREATE TABLE humanitarian_assistance (id INT PRIMARY KEY, name VARCHAR(255), continent VARCHAR(255), status VARCHAR(255));","INSERT INTO humanitarian_assistance (name, continent, status) VALUES ('Operation Pacific Haven', 'Asia', 'completed');","INSERT INTO humanitarian_assistance (name, continent, status) VALUES ('Operation Pacific Haven', 'Asia', 'completed');",1 How many drought incidents occurred in each region in 2019?,"CREATE TABLE drought_data (region TEXT, year INT, incidents INT); ","SELECT region, SUM(incidents) as total_incidents FROM drought_data WHERE year = 2019 GROUP BY region;","SELECT region, SUM(incidents) FROM drought_data WHERE year = 2019 GROUP BY region;",0 Delete all articles published before 2022-01-01,"CREATE TABLE articles (title VARCHAR(255), publication_date DATE); ",DELETE FROM articles WHERE publication_date < '2022-01-01';,DELETE FROM articles WHERE publication_date '2022-01-01';,0 What are the species and populations for species found in a specific forest?,"CREATE TABLE Forests ( ForestID INT PRIMARY KEY, Name VARCHAR(50), Country VARCHAR(50), Hectares FLOAT ); CREATE TABLE Species ( SpeciesID INT PRIMARY KEY, Name VARCHAR(50), ForestID INT, FOREIGN KEY (ForestID) REFERENCES Forests(ForestID)); CREATE TABLE Wildlife ( WildlifeID INT PRIMARY KEY, Species VARCHAR(50), Population INT, ForestID INT, FOREIGN KEY (ForestID) REFERENCES Forests(ForestID));","SELECT Species.Name, Wildlife.Population FROM Species INNER JOIN Wildlife ON Species.SpeciesID = Wildlife.SpeciesID WHERE Species.Name = 'Oak';","SELECT Species.Name, Wildlife.Population FROM Forests INNER JOIN Species ON Forests.ForestID = Species.ForestID INNER JOIN Wildlife ON Forests.ForestID = Wildlife.ForestID WHERE Forests.Country = 'USA';",0 What is the number of circular economy initiatives by city in Nigeria in 2020?,"CREATE TABLE circular_economy (city VARCHAR(20), year INT, initiatives INT); ","SELECT city, SUM(initiatives) as total_initiatives FROM circular_economy WHERE year = 2020 GROUP BY city;","SELECT city, SUM(initiatives) FROM circular_economy WHERE year = 2020 GROUP BY city;",0 What is the total number of round values that had opponents named Paul Sutherland?,"CREATE TABLE table_name_93 (round VARCHAR, opponent VARCHAR);","SELECT COUNT(round) FROM table_name_93 WHERE opponent = ""paul sutherland"";","SELECT COUNT(round) FROM table_name_93 WHERE opponent = ""paul sutherland"";",1 "List the top 5 recipients of donations in H1 2021, along with the total amount donated to each?","CREATE TABLE recipients (recipient_id INT, recipient_name TEXT, donation_amount DECIMAL); ","SELECT recipient_name, SUM(donation_amount) as total_donation FROM donations WHERE donation_date BETWEEN '2021-01-01' AND '2021-06-30' GROUP BY recipient_name ORDER BY total_donation DESC LIMIT 5;","SELECT recipient_name, SUM(donation_amount) as total_donation FROM recipients WHERE YEAR(donation_date) = 2021 AND YEAR(donation_date) = 2021 GROUP BY recipient_name ORDER BY total_donation DESC LIMIT 5;",0 Who is from south africa and has a score of 76-75-73-71=295?,"CREATE TABLE table_name_25 (player VARCHAR, country VARCHAR, score VARCHAR);","SELECT player FROM table_name_25 WHERE country = ""south africa"" AND score = 76 - 75 - 73 - 71 = 295;","SELECT player FROM table_name_25 WHERE country = ""south africa"" AND score = 76-75-73-71 = 295;",0 Name the density for 古田縣,"CREATE TABLE table_2013618_1 (density VARCHAR, traditional VARCHAR);","SELECT density FROM table_2013618_1 WHERE traditional = ""古田縣"";","SELECT density FROM table_2013618_1 WHERE traditional = """";",0 Find the top 10 product categories with the highest sales in the last quarter,"CREATE TABLE sales (sale_id INT, product_id INT, product_category VARCHAR(255), sales FLOAT, sale_date DATE); ","SELECT product_category, SUM(sales) FROM sales WHERE sale_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH) GROUP BY product_category ORDER BY SUM(sales) DESC LIMIT 10;","SELECT product_category, SUM(sales) as total_sales FROM sales WHERE sale_date >= DATEADD(quarter, -1, GETDATE()) GROUP BY product_category ORDER BY total_sales DESC LIMIT 10;",0 List the top 5 customers by spending on sustainable ingredients in the last 30 days?,"CREATE TABLE customers (customer_id INT, customer_name VARCHAR(255)); CREATE TABLE menu_items (menu_item_id INT, menu_category VARCHAR(255), item_name VARCHAR(255), is_sustainable BOOLEAN); CREATE TABLE orders (order_id INT, customer_id INT, menu_item_id INT, order_date DATE, order_price INT);","SELECT c.customer_name, SUM(o.order_price) as total_spend FROM customers c JOIN orders o ON c.customer_id = o.customer_id JOIN menu_items mi ON o.menu_item_id = mi.menu_item_id WHERE mi.is_sustainable = TRUE AND o.order_date BETWEEN DATEADD(day, -30, GETDATE()) AND GETDATE() GROUP BY c.customer_name ORDER BY total_spend DESC LIMIT 5;","SELECT c.customer_name, SUM(o.order_price) as total_spending FROM customers c INNER JOIN orders o ON c.customer_id = o.customer_id INNER JOIN menu_items m ON o.menu_item_id = m.menu_item_id WHERE m.is_sustainable = true AND o.order_date >= DATEADD(day, -30, GETDATE()) GROUP BY c.customer_name ORDER BY o.order_price DESC LIMIT 5;",0 How many startups in the renewable energy sector have a diverse founding team (at least one founder identifies as female and one founder identifies as a person of color)?,"CREATE TABLE startups (id INT, name TEXT, founder_gender TEXT, founder_ethnicity TEXT, industry TEXT);","SELECT COUNT(DISTINCT id) FROM startups WHERE industry = 'Renewable Energy' AND (founder_gender = 'Female' OR founder_ethnicity IN ('African American', 'Asian', 'Hispanic', 'Latinx')) GROUP BY industry HAVING COUNT(DISTINCT CASE WHEN founder_gender = 'Female' THEN id END) > 0 AND COUNT(DISTINCT CASE WHEN founder_ethnicity IN ('African American', 'Asian', 'Hispanic', 'Latinx') THEN id END) > 0;",SELECT COUNT(*) FROM startups WHERE founder_gender = 'Female' AND founder_ethnicity = 'African American' AND industry = 'Renewable Energy';,0 Identify space missions launched in 2025 with the shortest duration.,"CREATE TABLE space_missions(id INT, launch_year INT, duration INT, mission_name VARCHAR(50)); ",SELECT mission_name FROM space_missions WHERE duration = (SELECT MIN(duration) FROM space_missions WHERE launch_year = 2025);,SELECT mission_name FROM space_missions WHERE launch_year = 2025 AND duration = (SELECT MIN(duration) FROM space_missions WHERE launch_year = 2025);,0 what is the least total in gila,"CREATE TABLE table_19681738_1 (total INTEGER, county VARCHAR);","SELECT MIN(total) FROM table_19681738_1 WHERE county = ""Gila"";","SELECT MIN(total) FROM table_19681738_1 WHERE county = ""Gila"";",1 What was the average donation amount for first-time donors in Q4 2021?,"CREATE TABLE Donors (DonorID int, DonorName varchar(50), Country varchar(50), FirstDonationDate date); CREATE TABLE Donations (DonationID int, DonorID int, ProgramID int, DonationAmount decimal(10,2), DonationDate date); ",SELECT AVG(DonationAmount) FROM Donations D JOIN Donors DON ON D.DonorID = DON.DonorID WHERE D.DonationDate BETWEEN '2021-10-01' AND '2021-12-31' AND NOT EXISTS (SELECT 1 FROM Donations D2 WHERE D2.DonorID = D.DonorID AND D2.DonationDate < D.DonationDate),SELECT AVG(DonationAmount) FROM Donations INNER JOIN Donors ON Donations.DonorID = Donors.DonorID WHERE Donors.Country = 'USA' AND Donors.FirstDonationDate BETWEEN '2021-04-01' AND '2021-06-30';,0 What is the wards/branches of the fort smith Arkansas stake?,"CREATE TABLE table_name_89 (wards__branches_in_arkansas VARCHAR, stake VARCHAR);","SELECT wards__branches_in_arkansas FROM table_name_89 WHERE stake = ""fort smith arkansas"";","SELECT wards__branches_in_arkansas FROM table_name_89 WHERE stake = ""fort smith"";",0 Name the total number of stories that had a 16 rank,"CREATE TABLE table_name_29 (stories VARCHAR, rank VARCHAR);","SELECT COUNT(stories) FROM table_name_29 WHERE rank = ""16"";","SELECT COUNT(stories) FROM table_name_29 WHERE rank = ""16"";",1 Which school has an enrollment of A and had lost river as their previous conference?,"CREATE TABLE table_name_53 (school VARCHAR, previous_conference VARCHAR, enrollment VARCHAR);","SELECT school FROM table_name_53 WHERE previous_conference = ""lost river"" AND enrollment = ""a"";","SELECT school FROM table_name_53 WHERE previous_conference = ""lost river"" AND enrollment = ""a"";",1 What is the retention rate of employees who have completed diversity and inclusion training?,"CREATE TABLE EmployeeTraining (EmployeeID INT, TrainingType VARCHAR(50), TrainingCompletionDate DATE, EmploymentEndDate DATE); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM EmployeeTraining WHERE TrainingType = 'Diversity and Inclusion' AND EmploymentEndDate IS NULL)) FROM EmployeeTraining WHERE TrainingType = 'Diversity and Inclusion' AND EmploymentEndDate IS NOT NULL;,SELECT COUNT(*) * 100.0 / (SELECT COUNT(*) FROM EmployeeTraining WHERE TrainingType = 'Diversity and Inclusion') AS RetentionRate FROM EmployeeTraining WHERE TrainingType = 'Diversity and Inclusion';,0 Show the top 5 most reviewed products from Latin America.,"CREATE TABLE products (product_id INT, name VARCHAR(255), region VARCHAR(50)); CREATE TABLE product_reviews (review_id INT, product_id INT, rating INT); ","SELECT products.name, COUNT(*) AS review_count FROM products JOIN product_reviews ON products.product_id = product_reviews.product_id WHERE region = 'Latin America' GROUP BY products.name ORDER BY review_count DESC LIMIT 5;","SELECT products.name, COUNT(product_reviews.review_id) as num_reviews FROM products INNER JOIN product_reviews ON products.product_id = product_reviews.product_id WHERE products.region = 'Latin America' GROUP BY products.name ORDER BY num_reviews DESC LIMIT 5;",0 List all unique workout types and their total duration for members residing in Texas.,"CREATE TABLE workouts (workout_id INT, member_id INT, workout_type VARCHAR(50), workout_duration INT, workout_date DATE); CREATE TABLE members (member_id INT, region VARCHAR(50)); ","SELECT workout_type, SUM(workout_duration) as total_duration FROM workouts JOIN members ON workouts.member_id = members.member_id WHERE members.region = 'Texas' GROUP BY workout_type;","SELECT DISTINCT workout_type, SUM(workout_duration) FROM workouts JOIN members ON workouts.member_id = members.member_id WHERE members.region = 'Texas' GROUP BY workout_type;",0 Who was the constructor of the officine alfieri maserati that was driven by Sergio Mantovani?,"CREATE TABLE table_name_77 (constructor VARCHAR, entrant VARCHAR, driver VARCHAR);","SELECT constructor FROM table_name_77 WHERE entrant = ""officine alfieri maserati"" AND driver = ""sergio mantovani"";","SELECT constructor FROM table_name_77 WHERE entrant = ""officine alfieri maserati"" AND driver = ""sergio mantovani"";",1 What was #7 BMW's speed?,"CREATE TABLE table_name_27 (speed VARCHAR, team VARCHAR, rank VARCHAR);","SELECT speed FROM table_name_27 WHERE team = ""bmw"" AND rank = 7;","SELECT speed FROM table_name_27 WHERE team = ""bmw"" AND rank = ""#7"";",0 What is the maximum price of items in the 'Organic Food' category?,"CREATE TABLE items (item_id INT, category VARCHAR(255), price DECIMAL(10,2)); ","SELECT category, MAX(price) as max_price FROM items WHERE category = 'Organic Food' GROUP BY category;",SELECT MAX(price) FROM items WHERE category = 'Organic Food';,0 "Leopold VI, Duke of Austria is the father-in-law of which person?","CREATE TABLE table_name_26 (spouse VARCHAR, father VARCHAR);","SELECT spouse FROM table_name_26 WHERE father = ""leopold vi, duke of austria"";","SELECT spouse FROM table_name_26 WHERE father = ""leopold vii, duke of austria"";",0 How many rounds have a Pick of 13?,"CREATE TABLE table_name_21 (round INTEGER, pick VARCHAR);",SELECT SUM(round) FROM table_name_21 WHERE pick = 13;,SELECT SUM(round) FROM table_name_21 WHERE pick = 13;,1 What is the average water consumption per household in the city of Los Angeles?,"CREATE TABLE HouseholdWaterConsumption (ID INT, City VARCHAR(20), Consumption FLOAT); ",SELECT AVG(Consumption) FROM HouseholdWaterConsumption WHERE City = 'Los Angeles',SELECT AVG(Consumption) FROM HouseholdWaterConsumption WHERE City = 'Los Angeles';,0 How many Heats have a Name of miguel molina?,"CREATE TABLE table_name_39 (heat VARCHAR, name VARCHAR);","SELECT COUNT(heat) FROM table_name_39 WHERE name = ""miguel molina"";","SELECT COUNT(heat) FROM table_name_39 WHERE name = ""miguel molina"";",1 What imperative has måcha as 3.sg?,"CREATE TABLE table_name_94 (imperative VARCHAR, måcha VARCHAR);","SELECT imperative FROM table_name_94 WHERE måcha = ""3.sg"";","SELECT imperative FROM table_name_94 WHERE mcha = ""3.sg"";",0 What is the total revenue generated from organic items?,"CREATE TABLE Sales (sale_id INT PRIMARY KEY, sale_date DATE, item_sold VARCHAR(255), quantity INT, sale_price DECIMAL(5,2), is_organic BOOLEAN); CREATE TABLE Menu (menu_id INT PRIMARY KEY, item_name VARCHAR(255), category VARCHAR(255), price DECIMAL(5,2), is_organic BOOLEAN);",SELECT SUM(s.quantity * s.sale_price) FROM Sales s JOIN Menu m ON s.item_sold = m.item_name WHERE m.is_organic = TRUE;,SELECT SUM(Sales.quantity * Sales.sale_price) FROM Sales INNER JOIN Menu ON Sales.sale_id = Menu.menu_id WHERE Menu.is_organic = true;,0 What position did kyle mckenzie play?,"CREATE TABLE table_name_41 (position VARCHAR, name VARCHAR);","SELECT position FROM table_name_41 WHERE name = ""kyle mckenzie"";","SELECT position FROM table_name_41 WHERE name = ""kyle mckenzie"";",1 What is the average number of streams per day for each album in the Pop genre?,"CREATE TABLE albums (id INT, title VARCHAR(100), release_date DATE); CREATE TABLE streams (id INT, album_id INT, stream_date DATE, streams INT); CREATE VIEW pop_album_streams AS SELECT album_id FROM streams INNER JOIN albums ON streams.album_id = albums.id WHERE genre = 'Pop'; CREATE VIEW album_daily_streams AS SELECT album_id, DATE(stream_date) as stream_date, SUM(streams) as daily_streams FROM streams GROUP BY album_id, stream_date;","SELECT album_id, AVG(daily_streams) as avg_daily_streams FROM album_daily_streams INNER JOIN pop_album_streams ON album_daily_streams.album_id = pop_album_streams.album_id GROUP BY album_id;","SELECT album_id, AVG(streams) as avg_streams_per_day FROM album_daily_streams JOIN pop_album_streams ON album_daily_streams.album_id = pop_album_streams.album_id JOIN albums ON pop_album_streams.album_id = albums.id WHERE genre = 'Pop' GROUP BY album_id;",0 How many seasons have points totals of N/A?,"CREATE TABLE table_26222468_1 (season VARCHAR, points VARCHAR);","SELECT COUNT(season) FROM table_26222468_1 WHERE points = ""N/A"";","SELECT COUNT(season) FROM table_26222468_1 WHERE points = ""N/A"";",1 Calculate the average transaction amount for users in the ShariahCompliantTransactions table.,"CREATE TABLE ShariahCompliantTransactions (transactionID INT, userID VARCHAR(20), transactionAmount DECIMAL(10,2), transactionDate DATE); ",SELECT AVG(transactionAmount) FROM ShariahCompliantTransactions;,SELECT AVG(transactionAmount) FROM ShariahCompliantTransactions;,1 What is the total number of emergency calls in each year?,"CREATE TABLE emergency_calls (id INT, call_date DATE, response_time FLOAT); ","SELECT YEAR(call_date) AS year, COUNT(*) FROM emergency_calls GROUP BY year;","SELECT year, COUNT(*) FROM emergency_calls GROUP BY year;",0 "From what series was Tokio Jokio, directed by Norm McCabe?","CREATE TABLE table_name_35 (series VARCHAR, director VARCHAR, title VARCHAR);","SELECT series FROM table_name_35 WHERE director = ""norm mccabe"" AND title = ""tokio jokio"";","SELECT series FROM table_name_35 WHERE director = ""north mccabe"" AND title = ""tokio jokio"";",0 List all menu items with a price greater than $10.00,"CREATE TABLE menu_items (menu_item_id INT, name VARCHAR(255), description TEXT, price DECIMAL(5,2), category VARCHAR(255), sustainability_rating INT);",SELECT * FROM menu_items WHERE price > 10.00;,SELECT name FROM menu_items WHERE price > 100.00;,0 "How many disaster response volunteers were there in total as of January 1, 2021?","CREATE TABLE volunteers (id INT, region VARCHAR(50), volunteer_type VARCHAR(50), registration_date DATE); ",SELECT COUNT(*) as total_volunteers FROM volunteers WHERE volunteer_type = 'Disaster Response' AND registration_date <= '2021-01-01';,SELECT COUNT(*) FROM volunteers WHERE volunteer_type = 'Disaster Response' AND registration_date BETWEEN '2021-01-01' AND '2021-01-31';,0 What is the percentage of crimes solved for each type?,"CREATE TABLE crimes (cid INT, crime_type TEXT, solved BOOLEAN); ","SELECT crime_type, 100.0 * AVG(CASE WHEN solved THEN 1.0 ELSE 0.0 END) AS percentage_solved FROM crimes GROUP BY crime_type;","SELECT crime_type, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM crimes)) as solved_percentage FROM crimes GROUP BY crime_type;",0 Which clients have experienced multiple legal issues in the last year?,"CREATE TABLE legal_issues (id INT PRIMARY KEY, client_name VARCHAR(255), issue VARCHAR(255), date DATE); ","SELECT v1.client_name, v1.issue, v1.date, COUNT(v2.id) as issue_count FROM legal_issues v1 JOIN legal_issues v2 ON v1.client_name = v2.client_name AND v2.date >= DATEADD(year, -1, v1.date) AND v2.date < v1.date GROUP BY v1.client_name, v1.issue, v1.date HAVING COUNT(v2.id) > 1;","SELECT client_name FROM legal_issues WHERE issue = 'Multiple' AND date >= DATEADD(year, -1, GETDATE());",0 How many customers have more than one account in Georgia?,"CREATE TABLE customers (customer_id INT, customer_name VARCHAR(50), state VARCHAR(20), account_number INT); ",SELECT COUNT(*) FROM (SELECT customer_id FROM customers GROUP BY customer_id HAVING COUNT(*) > 1) AS subquery;,SELECT COUNT(*) FROM customers WHERE state = 'Georgia' AND account_number > 1;,0 What is the venue where the melbourne tigers play their home games?,"CREATE TABLE table_name_26 (venue VARCHAR, home_team VARCHAR);","SELECT venue FROM table_name_26 WHERE home_team = ""melbourne tigers"";","SELECT venue FROM table_name_26 WHERE home_team = ""melbourne tigers"";",1 Identify the top 2 cities with the highest average visitor spending.,"CREATE TABLE CitySpending (id INT, city VARCHAR(20), spending INT); ","SELECT city, AVG(spending) FROM CitySpending GROUP BY city ORDER BY AVG(spending) DESC LIMIT 2;","SELECT city, AVG(spending) as avg_spending FROM CitySpending GROUP BY city ORDER BY avg_spending DESC LIMIT 2;",0 "What is the difference in revenue between the first and last sale for each vendor, partitioned by vendor location, ordered by sale date?","CREATE TABLE Sales (SaleID INT, VendorID INT, Revenue INT, SaleDate DATE); CREATE TABLE Vendor (VendorID INT, VendorName VARCHAR(50), Location VARCHAR(50)); ","SELECT VendorID, Location, FIRST_VALUE(Revenue) OVER (PARTITION BY VendorID, Location ORDER BY SaleDate) - LAST_VALUE(Revenue) OVER (PARTITION BY VendorID, Location ORDER BY SaleDate ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS RevenueDifference FROM Sales;","SELECT v.Location, SUM(s.Revenue) - SUM(s.Revenue) as RevenueDifference FROM Sales s JOIN Vendor v ON s.VendorID = v.VendorID GROUP BY v.Location ORDER BY SaleDate DESC;",0 What is the total waste generation for Tokyo in the year 2020?,"CREATE TABLE waste_generation (city VARCHAR(50), generation_quantity INT, generation_date DATE, year INT); ",SELECT SUM(generation_quantity) FROM waste_generation WHERE city = 'Tokyo' AND year = 2020;,SELECT SUM(generation_quantity) FROM waste_generation WHERE city = 'Tokyo' AND year = 2020;,1 what is the average losses when the wins is 9 and ties more than 0?,"CREATE TABLE table_name_10 (losses INTEGER, wins VARCHAR, ties VARCHAR);",SELECT AVG(losses) FROM table_name_10 WHERE wins = 9 AND ties > 0;,SELECT AVG(losses) FROM table_name_10 WHERE wins = 9 AND ties > 0;,1 How many wheelchair-accessible taxis are available in New York City?,"CREATE TABLE vehicles (vehicle_id INT, type VARCHAR(20), accessibility VARCHAR(20), city VARCHAR(20));",SELECT COUNT(*) FROM vehicles WHERE type = 'taxi' AND accessibility = 'wheelchair-accessible' AND city = 'New York';,SELECT COUNT(*) FROM vehicles WHERE accessibility = 'Wheelchair-Accessible' AND city = 'New York City';,0 What is the average quantity sold and ranking of garments by category?,"CREATE TABLE garment_sales (id INT, garment_id INT, category VARCHAR(20), quantity INT, price DECIMAL(5,2), sale_date DATE);CREATE VIEW top_selling_garments_by_category AS SELECT category, garment_id, SUM(quantity) as total_sold FROM garment_sales GROUP BY category, garment_id;","SELECT category, garment_id, total_sold, AVG(quantity) as avg_quantity, RANK() OVER (PARTITION BY category ORDER BY total_sold DESC) as sales_rank FROM top_selling_garments_by_category, garment_sales WHERE top_selling_garments_by_category.category = garment_sales.category AND top_selling_garments_by_category.garment_id = garment_sales.garment_id GROUP BY category, garment_id, total_sold, price ORDER BY category, sales_rank;","SELECT category, AVG(quantity) as avg_quantity_sold, RANK() OVER (ORDER BY total_sold DESC) as rank FROM top_selling_garments_by_category GROUP BY category;",0 What was the margin of victory when runner-up was K. J. Choi?,"CREATE TABLE table_247955_2 (margin_of_victory VARCHAR, runner_s__up VARCHAR);","SELECT margin_of_victory FROM table_247955_2 WHERE runner_s__up = ""K. J. Choi"";","SELECT margin_of_victory FROM table_247955_2 WHERE runner_s__up = ""K. J. Choi"";",1 What is the maximum price of locally sourced products sold by suppliers in Australia?,"CREATE TABLE Suppliers (SupplierID INT, SupplierName TEXT, Country TEXT);CREATE TABLE Products (ProductID INT, ProductName TEXT, Price DECIMAL, Local BOOLEAN, SupplierID INT); ",SELECT MAX(Price) FROM Products JOIN Suppliers ON Products.SupplierID = Suppliers.SupplierID WHERE Local = true AND Country = 'Australia';,SELECT MAX(Price) FROM Products p JOIN Suppliers s ON p.SupplierID = s.SupplierID WHERE s.Country = 'Australia' AND p.Local = true;,0 When is the most recent year with more than 27 points and more than 5 wins?,"CREATE TABLE table_name_69 (year INTEGER, points VARCHAR, wins VARCHAR);",SELECT MAX(year) FROM table_name_69 WHERE points > 27 AND wins > 5;,SELECT MAX(year) FROM table_name_69 WHERE points > 27 AND wins > 5;,1 What is the highest number listed?,CREATE TABLE table_12113888_1 (number INTEGER);,SELECT MAX(number) FROM table_12113888_1;,SELECT MAX(number) FROM table_12113888_1;,1 What is the total number of female and male members in unions that advocate for labor rights?,"CREATE TABLE unions (id INT, name VARCHAR(50), location VARCHAR(50), type VARCHAR(50)); ","SELECT SUM(CASE WHEN gender = 'Female' THEN 1 ELSE 0 END) AS total_female, SUM(CASE WHEN gender = 'Male' THEN 1 ELSE 0 END) AS total_male FROM members JOIN unions ON members.union_id = unions.id WHERE unions.type = 'Labor Rights';","SELECT COUNT(*) as total_female_members, COUNT(*) as total_male_members FROM unions WHERE type = 'Labor Rights' GROUP BY type;",0 What is the car model with the highest mpg ?,"CREATE TABLE cars_data (id VARCHAR, mpg VARCHAR); CREATE TABLE car_names (model VARCHAR, makeid VARCHAR);",SELECT t1.model FROM car_names AS t1 JOIN cars_data AS t2 ON t1.makeid = t2.id ORDER BY t2.mpg DESC LIMIT 1;,SELECT T1.model FROM cars_data AS T1 JOIN car_names AS T2 ON T1.id = T2.makeid WHERE T2.mpg = (SELECT MAX(mpg) FROM cars_data);,0 When did the rank 9 building got completed?,"CREATE TABLE table_name_64 (completed VARCHAR, rank VARCHAR);","SELECT completed FROM table_name_64 WHERE rank = ""9"";",SELECT completed FROM table_name_64 WHERE rank = 9;,0 "Which climate adaptation projects in South America have the lowest CO2 emission reduction, and when were they initiated?","CREATE TABLE climate_adaptation (project VARCHAR(50), region VARCHAR(50), co2_reduction FLOAT, start_year INT); ","SELECT project, region, co2_reduction, start_year FROM climate_adaptation WHERE region = 'South America' ORDER BY co2_reduction ASC;","SELECT project, start_year FROM climate_adaptation WHERE region = 'South America' AND co2_reduction = (SELECT MIN(co2_reduction) FROM climate_adaptation WHERE region = 'South America');",0 What is the ph level of soils in the Northeast?,"CREATE TABLE Soil_Types (id INT PRIMARY KEY, type VARCHAR(50), ph VARCHAR(50), region VARCHAR(50)); ",SELECT ph FROM Soil_Types WHERE region = 'Northeast';,SELECT ph FROM Soil_Types WHERE region = 'Northeast';,1 "Show the total claims amount and number of claims for policies in the state of Texas, grouped by policy type.","CREATE TABLE policies (policy_number INT, policy_type VARCHAR(50), state VARCHAR(2)); CREATE TABLE claims (claim_number INT, policy_number INT, claims_amount INT); ","SELECT policy_type, SUM(claims_amount) as total_claims_amount, COUNT(*) as number_of_claims FROM policies JOIN claims ON policies.policy_number = claims.policy_number WHERE policies.state = 'TX' GROUP BY policy_type;","SELECT policies.policy_type, SUM(claims.claims_amount) as total_claims, COUNT(claims.claim_number) as total_claims FROM policies INNER JOIN claims ON policies.policy_number = claims.policy_number WHERE policies.state = 'Texas' GROUP BY policies.policy_type;",0 What is the total capacity for schools located in the capital city?,"CREATE TABLE community_development.schools (id INT, name VARCHAR(50), capacity INT, location VARCHAR(50));",SELECT SUM(capacity) FROM community_development.schools WHERE location = 'capital city';,SELECT SUM(capacity) FROM community_development.schools WHERE location = 'Capital City';,0 What is the average water waste per household in Illinois?,CREATE TABLE wastewater_il (waste_per_household FLOAT); ,SELECT AVG(waste_per_household) FROM wastewater_il;,SELECT AVG(waste_per_household) FROM wastewater_il;,1 Update the 'funding_amount' column for 'startup_id' 4001 in the 'startups' table to 1000000,"CREATE TABLE startups (startup_id INT PRIMARY KEY, name VARCHAR(50), location VARCHAR(50), funding_amount FLOAT, date DATE);",WITH cte1 AS (UPDATE startups SET funding_amount = 1000000 WHERE startup_id = 4001) SELECT * FROM cte1;,UPDATE startups SET funding_amount = 1000000 WHERE startup_id = 4001;,0 What was the built data for Knocklayd rebuild?,"CREATE TABLE table_12113888_1 (built VARCHAR, name_as_rebuilt VARCHAR);","SELECT built FROM table_12113888_1 WHERE name_as_rebuilt = ""Knocklayd"";","SELECT built FROM table_12113888_1 WHERE name_as_rebuilt = ""Knocklayd"";",1 How many candidates from underrepresented communities were hired in the last year?,"CREATE TABLE Candidates (CandidateID INT, Community VARCHAR(30), HireDate DATE); ","SELECT COUNT(*) FROM Candidates WHERE Community = 'Underrepresented' AND HireDate BETWEEN DATE_SUB(CURDATE(), INTERVAL 1 YEAR) AND CURDATE();","SELECT COUNT(*) FROM Candidates WHERE Community = 'Underrepresented' AND HireDate >= DATEADD(year, -1, GETDATE());",0 What is the total number of species in the Indian ocean?,"CREATE TABLE species (species_id INT, name TEXT, location TEXT); ",SELECT COUNT(*) FROM species WHERE location = 'Indian',SELECT COUNT(*) FROM species WHERE location = 'Indian Ocean';,0 "What are the total billable hours for attorneys in the 'billing' table, grouped by their respective office locations?","CREATE TABLE attorney_office (attorney_id INT, office_location VARCHAR(50)); CREATE TABLE billing (attorney_id INT, hours DECIMAL(5,2));","SELECT office_location, SUM(hours) AS total_hours FROM billing JOIN attorney_office ON billing.attorney_id = attorney_office.attorney_id GROUP BY office_location;","SELECT office_location, SUM(hours) FROM billing JOIN attorney_office ON billing.attorney_id = attorney_office.attorney_id GROUP BY office_location;",0 List all suppliers from 'Colorado' in the 'Suppliers' table,"CREATE TABLE Suppliers (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255)); ",SELECT name FROM Suppliers WHERE location = 'Colorado';,SELECT * FROM Suppliers WHERE location = 'Colorado';,0 "How many partners were there when the score was 7–6 (7–4) , 6–3?","CREATE TABLE table_2186447_1 (partner VARCHAR, score VARCHAR);","SELECT COUNT(partner) FROM table_2186447_1 WHERE score = ""7–6 (7–4) , 6–3"";","SELECT COUNT(partner) FROM table_2186447_1 WHERE score = ""7–6 (7–4), 6–3"";",0 What is the difference in CO2 emissions between the most and least polluting mines in South Africa?,"CREATE TABLE mines (id INT, name TEXT, location TEXT, type TEXT, co2_emissions INT); ",SELECT MAX(co2_emissions) - MIN(co2_emissions) FROM mines WHERE location = 'South Africa';,SELECT COUNT(*) FROM mines WHERE location = 'South Africa' AND type = 'Mine' AND co2_emissions = (SELECT COUNT(*) FROM mines WHERE location = 'South Africa' AND type = 'Mine') AND co2_emissions = (SELECT COUNT(*) FROM mines WHERE location = 'South Africa' AND type = 'Mine');,0 "List all sustainable building practices in Washington state, with their respective descriptions","CREATE TABLE sustainable_practices_3 (practice_id INT, state VARCHAR(20), building_type VARCHAR(20), description TEXT); ",SELECT * FROM sustainable_practices_3 WHERE state = 'WA';,"SELECT practice_id, state, building_type, description FROM sustainable_practices_3 WHERE state = 'Washington';",0 What is the average quantity of fish sold per transaction in the United States?,"CREATE TABLE FarmLocation (LocationID INT, FarmName VARCHAR(50), Country VARCHAR(50)); CREATE TABLE Transactions (TransactionID INT, FarmID INT, QuantitySold INT); ",SELECT AVG(QuantitySold) FROM Transactions WHERE FarmID = (SELECT LocationID FROM FarmLocation WHERE Country = 'United States');,SELECT AVG(QuantitySold) FROM Transactions JOIN FarmLocation ON Transactions.FarmID = FarmLocation.LocationID WHERE FarmLocation.Country = 'United States';,0 What is the average construction cost for bridges and tunnels?,"CREATE TABLE InfrastructureProjects (Id INT, Name VARCHAR(255), Type VARCHAR(255), ConstructionCost FLOAT); ","SELECT AVG(ConstructionCost) as AverageCost FROM InfrastructureProjects WHERE Type IN ('Bridge', 'Tunnel');","SELECT AVG(ConstructionCost) FROM InfrastructureProjects WHERE Type IN ('Bridge', 'Tunnel');",0 What is the total budget for rural infrastructure projects in Australia in the last 3 years?,"CREATE TABLE RuralInfrastructure (ProjectID INT, ProjectName VARCHAR(50), Location VARCHAR(50), Budget FLOAT, StartDate DATE); ","SELECT SUM(Budget) FROM RuralInfrastructure WHERE Location = 'Australia' AND StartDate >= DATEADD(YEAR, -3, CURRENT_DATE);","SELECT SUM(Budget) FROM RuralInfrastructure WHERE Location = 'Australia' AND StartDate >= DATEADD(year, -3, GETDATE());",0 Which mixed doubles happened later than 2011?,"CREATE TABLE table_name_2 (mixed_doubles VARCHAR, year INTEGER);",SELECT mixed_doubles FROM table_name_2 WHERE year > 2011;,SELECT mixed_doubles FROM table_name_2 WHERE year > 2011;,1 What are the names of the nations with the 3 lowest populations?,"CREATE TABLE country (Name VARCHAR, Population VARCHAR);",SELECT Name FROM country ORDER BY Population LIMIT 3;,SELECT Name FROM country ORDER BY Population LIMIT 3;,1 Insert new records for a tennis match in the 'tennis_matches' table between Novak Djokovic and Rafael Nadal?,"CREATE TABLE tennis_matches (match_id INT, player1 VARCHAR(50), player2 VARCHAR(50), player1_score INT, player2_score INT, match_date DATE);","INSERT INTO tennis_matches (match_id, player1, player2, player1_score, player2_score, match_date) VALUES (1, 'Novak Djokovic', 'Rafael Nadal', 6, 4, '2023-07-15');","INSERT INTO tennis_matches (player1, player2, player1_score, player2_score, match_date) VALUES ('Novak Djokovic', 'Rafael Nadal', '2022-01-01');",0 What was the lowest long with 26 yards?,"CREATE TABLE table_name_51 (long INTEGER, yards VARCHAR);",SELECT MIN(long) FROM table_name_51 WHERE yards = 26;,SELECT MIN(long) FROM table_name_51 WHERE yards = 26;,1 What was the Nominated Work earlier than 2003?,"CREATE TABLE table_name_62 (nominated_work VARCHAR, year INTEGER);",SELECT nominated_work FROM table_name_62 WHERE year < 2003;,SELECT nominated_work FROM table_name_62 WHERE year 2003;,0 "What is the time/retired for the rider with the manufacturuer yamaha, grod of 1 and 21 total laps?","CREATE TABLE table_name_74 (time_retired VARCHAR, grid VARCHAR, laps VARCHAR, manufacturer VARCHAR);","SELECT time_retired FROM table_name_74 WHERE laps = ""21"" AND manufacturer = ""yamaha"" AND grid = ""1"";","SELECT time_retired FROM table_name_74 WHERE laps = 21 AND manufacturer = ""yamaha"" AND grid = ""1"";",0 "What is the USCA that's Total is smaller than 14, with 1 Joint Music Award, MRHMA of 2, and RTHK of 3?","CREATE TABLE table_name_67 (usca VARCHAR, rthk VARCHAR, mrhma VARCHAR, total VARCHAR, joint_music_award VARCHAR);","SELECT usca FROM table_name_67 WHERE total < 14 AND joint_music_award = ""1"" AND mrhma = ""2"" AND rthk = ""3"";",SELECT usca FROM table_name_67 WHERE total 14 AND joint_music_award = 1 AND mrhma = 2 AND rthk = 3;,0 What is the maximum ticket price for an event in the 'dance' category?,"CREATE TABLE events (id INT, name TEXT, category TEXT, price DECIMAL(5,2)); ",SELECT MAX(price) FROM events WHERE category = 'dance';,SELECT MAX(price) FROM events WHERE category = 'dance';,1 WHat is the highest difference?,CREATE TABLE table_26677836_1 (difference INTEGER);,SELECT MAX(difference) FROM table_26677836_1;,SELECT MAX(difference) FROM table_26677836_1;,1 "Add a new order with order_id 1, customer_id 1, order_date '2022-01-01', and total $50.00","CREATE TABLE orders (order_id INT, customer_id INT, order_date DATE, total DECIMAL(5,2));","INSERT INTO orders (order_id, customer_id, order_date, total) VALUES (1, 1, '2022-01-01', 50.00);","INSERT INTO orders (order_id, customer_id, order_date, total) VALUES (1, '2022-01-01', 500.00);",0 "What is Name, when Length Meters is greater than 66.4, and when Km From Kingston is 138.8?","CREATE TABLE table_name_54 (name VARCHAR, length_meters VARCHAR, km_from_kingston VARCHAR);",SELECT name FROM table_name_54 WHERE length_meters > 66.4 AND km_from_kingston = 138.8;,"SELECT name FROM table_name_54 WHERE length_meters > 66.4 AND km_from_kingston = ""138.8"";",0 When was the Hopperstad Stavkyrkje built?,"CREATE TABLE table_name_83 (year_built VARCHAR, church_name VARCHAR);","SELECT year_built FROM table_name_83 WHERE church_name = ""hopperstad stavkyrkje"";","SELECT year_built FROM table_name_83 WHERE church_name = ""hopperstad stavkyrkje"";",1 Count the number of socially responsible accounts in the Western region,"CREATE TABLE socially_responsible_accounts (id INT, account_type VARCHAR(255), region VARCHAR(255));",SELECT COUNT(*) FROM socially_responsible_accounts WHERE region = 'Western';,SELECT COUNT(*) FROM socially_responsible_accounts WHERE region = 'Western';,1 Which cities have a recycling rate lower than the average recycling rate for all cities in the 'North' region?,"CREATE TABLE cities (city_name VARCHAR(50), region VARCHAR(50)); CREATE TABLE recycling_rates (city_name VARCHAR(50), region VARCHAR(50), recycling_rate DECIMAL(5,2)); ",SELECT city_name FROM recycling_rates WHERE region = 'North' AND recycling_rate < (SELECT AVG(recycling_rate) FROM recycling_rates WHERE region = 'North');,SELECT city_name FROM cities WHERE region = 'North' AND recycling_rate (SELECT AVG(recycling_rate) FROM recycling_rates WHERE region = 'North');,0 Identify the monthly trend of CO2 emissions in the past year.,"CREATE TABLE environmental_impact (id INT, date DATE, co2_emissions FLOAT);","SELECT EXTRACT(MONTH FROM date) as month, AVG(co2_emissions) as avg_co2_emissions FROM environmental_impact WHERE date >= DATEADD(year, -1, CURRENT_DATE) GROUP BY EXTRACT(MONTH FROM date) ORDER BY EXTRACT(MONTH FROM date);","SELECT date, COUNT(*) as monthly_co2_emissions FROM environmental_impact WHERE date >= DATEADD(year, -1, GETDATE()) GROUP BY date;",0 "indoor year is 1978, what is the record?","CREATE TABLE table_name_70 (record VARCHAR, indoor_year VARCHAR);","SELECT record FROM table_name_70 WHERE indoor_year = ""1978"";",SELECT record FROM table_name_70 WHERE indoor_year = 1978;,0 what is the power when the capacity is 898cc?,"CREATE TABLE table_name_43 (power VARCHAR, capacity VARCHAR);","SELECT power FROM table_name_43 WHERE capacity = ""898cc"";","SELECT power FROM table_name_43 WHERE capacity = ""898cc"";",1 "What is every value for % 20-39 if % 0-19 is 21,11%?","CREATE TABLE table_23606500_4 (_percentage_20_39 VARCHAR, _percentage_0_19 VARCHAR);","SELECT _percentage_20_39 FROM table_23606500_4 WHERE _percentage_0_19 = ""21,11%"";","SELECT _percentage_20_39 FROM table_23606500_4 WHERE _percentage_0_19 = ""21,11%"";",1 What is the average well-being score for athletes in each team?,"CREATE TABLE teams (team_id INT, team_name VARCHAR(50));CREATE TABLE athletes (athlete_id INT, athlete_name VARCHAR(50), team_id INT, well_being_score INT); ","SELECT t.team_name, AVG(a.well_being_score) FROM teams t JOIN athletes a ON t.team_id = a.team_id GROUP BY t.team_id;","SELECT t.team_name, AVG(a.well_being_score) as avg_well_being_score FROM teams t JOIN athletes a ON t.team_id = a.team_id GROUP BY t.team_name;",0 What is the 4wi when the economy is 7.82?,CREATE TABLE table_27268238_5 (economy VARCHAR);,"SELECT 4 AS wi FROM table_27268238_5 WHERE economy = ""7.82"";","SELECT 4 AS wi FROM table_27268238_5 WHERE economy = ""7.22"";",0 What is the average viewership for TV shows by network?,"CREATE TABLE TV_Shows_Viewership (id INT, title VARCHAR(100), network VARCHAR(50), avg_viewers DECIMAL(10,2)); ","SELECT network, AVG(avg_viewers) FROM TV_Shows_Viewership GROUP BY network;","SELECT network, AVG(avg_viewers) FROM TV_Shows_Viewership GROUP BY network;",1 What's the call sign for Jack FM?,"CREATE TABLE table_name_60 (call_sign VARCHAR, branding VARCHAR);","SELECT call_sign FROM table_name_60 WHERE branding = ""jack fm"";","SELECT call_sign FROM table_name_60 WHERE branding = ""jack fm"";",1 Find the top 2 cuisine types with the highest average calorie count,"CREATE TABLE cuisine (id INT, type VARCHAR(255), avg_calories DECIMAL(5,2)); CREATE TABLE dishes (id INT, cuisine_id INT, name VARCHAR(255), calories DECIMAL(5,2)); ","SELECT c.type, AVG(d.calories) AS avg_calories FROM cuisine c JOIN dishes d ON c.id = d.cuisine_id GROUP BY c.id ORDER BY avg_calories DESC LIMIT 2;","SELECT c.type, AVG(d.calories) as avg_calories FROM cuisine c JOIN dishes d ON c.id = d.cuisine_id GROUP BY c.type ORDER BY avg_calories DESC LIMIT 2;",0 What is the weight when the race was the VRC Melbourne Cup?,"CREATE TABLE table_name_76 (weight VARCHAR, race VARCHAR);","SELECT COUNT(weight) FROM table_name_76 WHERE race = ""vrc melbourne cup"";","SELECT weight FROM table_name_76 WHERE race = ""vrc melbourne cup"";",0 What is the average price of artworks created by artists from India who were born between 1880 and 1900?,"CREATE TABLE Artists (artist_id INT, artist_name VARCHAR(50), birth_date DATE, country VARCHAR(50)); CREATE TABLE Artworks (artwork_id INT, title VARCHAR(50), year_made INT, artist_id INT, price FLOAT); ",SELECT AVG(Artworks.price) FROM Artworks INNER JOIN Artists ON Artworks.artist_id = Artists.artist_id WHERE Artists.country = 'India' AND Artists.birth_date BETWEEN '1880-01-01' AND '1900-12-31';,SELECT AVG(price) FROM Artworks JOIN Artists ON Artworks.artist_id = Artists.artist_id WHERE Artists.country = 'India' AND YEAR(Artworks.year_made) BETWEEN 1880 AND 1900;,0 How many patients do each physician take care of? List their names and number of patients they take care of.,"CREATE TABLE patient (PCP VARCHAR); CREATE TABLE physician (name VARCHAR, employeeid VARCHAR);","SELECT T1.name, COUNT(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid;","SELECT T1.name, COUNT(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.name;",0 What is the average housing affordability index in Sydney?,"CREATE TABLE housing_affordability (index FLOAT, city VARCHAR(20));",SELECT AVG(index) FROM housing_affordability WHERE city = 'Sydney';,SELECT AVG(index) FROM housing_affordability WHERE city = 'Sydney';,1 Which composition has an issue price of $99.00?,"CREATE TABLE table_name_79 (composition VARCHAR, issue_price VARCHAR);","SELECT composition FROM table_name_79 WHERE issue_price = ""$99.00"";","SELECT composition FROM table_name_79 WHERE issue_price = ""$99.00"";",1 Which players have played more than 10 hours of 'RPG' games since 2017?,"CREATE TABLE players (player_id INT, name VARCHAR(50)); CREATE TABLE game_sessions (session_id INT, player_id INT, game VARCHAR(50), duration INT); ","SELECT p.name, COUNT(*) as rpg_sessions FROM players p JOIN game_sessions s ON p.player_id = s.player_id WHERE s.game = 'RPG' AND s.duration > 0 AND s.duration < 61 GROUP BY p.player_id HAVING COUNT(*) > 10;",SELECT players.name FROM players INNER JOIN game_sessions ON players.player_id = game_sessions.player_id WHERE game_sessions.duration > 10 AND game_sessions.game = 'RPG' AND YEAR(game_sessions.session_date) >= 2017;,0 "What competition has a venue in Hampden Park, Glasgow?","CREATE TABLE table_name_55 (competition VARCHAR, venue VARCHAR);","SELECT competition FROM table_name_55 WHERE venue = ""hampden park, glasgow"";","SELECT competition FROM table_name_55 WHERE venue = ""hampden park, glasgow"";",1 What is the total quantity of 'organic cotton' products in the inventory?,"CREATE TABLE product (product_id INT, name VARCHAR(255), quantity INT, material VARCHAR(255)); ",SELECT SUM(quantity) FROM product WHERE material = 'organic cotton';,SELECT SUM(quantity) FROM product WHERE material = 'organic cotton';,1 "List all unique platforms from the 'Game Design' table, excluding 'PC'.","CREATE TABLE Game_Design (GameID INT, GameName VARCHAR(100), Genre VARCHAR(50), Platform VARCHAR(50)); ",SELECT DISTINCT Platform FROM Game_Design WHERE Platform <> 'PC';,SELECT DISTINCT Platform FROM Game_Design WHERE Platform!= 'PC';,0 "What is the team located at philips arena 18,227?","CREATE TABLE table_11961582_6 (team VARCHAR, location_attendance VARCHAR);","SELECT team FROM table_11961582_6 WHERE location_attendance = ""Philips Arena 18,227"";","SELECT team FROM table_11961582_6 WHERE location_attendance = ""Philips Arena 18,227"";",1 Tell me the total number of points for lost less than 4,"CREATE TABLE table_name_72 (points VARCHAR, lost INTEGER);",SELECT COUNT(points) FROM table_name_72 WHERE lost < 4;,SELECT COUNT(points) FROM table_name_72 WHERE lost 4;,0 "List the names of all soccer players who have scored a hat-trick (3 goals) in a single match, along with the team they played for and the date of the match.","CREATE TABLE soccer_games (id INT, date DATE, home_team VARCHAR(50), away_team VARCHAR(50), goals_home INT, goals_away INT); CREATE TABLE soccer_players_goals (id INT, game_id INT, player_id INT, goals INT); CREATE TABLE soccer_players (id INT, name VARCHAR(100), team VARCHAR(50));","SELECT p.name, g.home_team, g.date FROM soccer_games g JOIN soccer_players_goals pg ON g.id = pg.game_id JOIN soccer_players p ON pg.player_id = p.id WHERE pg.goals >= 3 GROUP BY p.name, g.date, g.home_team ORDER BY g.date; SELECT p.name, g.away_team, g.date FROM soccer_games g JOIN soccer_players_goals pg ON g.id = pg.game_id JOIN soccer_players p ON pg.player_id = p.id WHERE pg.goals >= 3 GROUP BY p.name, g.date, g.away_team ORDER BY g.date;","SELECT sp.name, sp.team, sp.date FROM soccer_players sp JOIN soccer_games sg ON sp.id = sg.game_id JOIN soccer_players_goals sp ON sp.player_id = sp.player_id WHERE sp.goals = 3 AND sp.goals = 3;",0 What are the top 5 ports visited by vessels in the 'Tanker' category in terms of the number of visits?,"CREATE TABLE ports (id INT, name TEXT, country TEXT);CREATE TABLE visits (id INT, vessel_id INT, port_id INT, visit_date DATE); ","SELECT ports.name, COUNT(*) AS visits FROM ports JOIN visits ON ports.id = visits.port_id JOIN vessels ON visits.vessel_id = vessels.id WHERE vessels.type = 'Tanker' GROUP BY ports.name ORDER BY visits DESC LIMIT 5;","SELECT ports.name, COUNT(visits.id) as visits_count FROM ports INNER JOIN visits ON ports.id = visits.port_id WHERE vessels.name = 'Tanker' GROUP BY ports.name ORDER BY visits_count DESC LIMIT 5;",0 What is the away team's score when geelong is the away team?,CREATE TABLE table_name_73 (away_team VARCHAR);,"SELECT away_team AS score FROM table_name_73 WHERE away_team = ""geelong"";","SELECT away_team AS score FROM table_name_73 WHERE away_team = ""geelong"";",1 "What is the maximum week that 69,372 people attended the game?","CREATE TABLE table_name_13 (week INTEGER, attendance VARCHAR);","SELECT MAX(week) FROM table_name_13 WHERE attendance = ""69,372"";","SELECT MAX(week) FROM table_name_13 WHERE attendance = ""69,372"";",1 What is the total cost of vehicle maintenance for each type of public transportation?,"CREATE TABLE Vehicle (VehicleID INT, VehicleType VARCHAR(255)); CREATE TABLE Maintenance (MaintenanceID INT, VehicleID INT, MaintenanceCost DECIMAL(5,2)); ","SELECT Vehicle.VehicleType, SUM(MaintenanceCost) FROM Vehicle JOIN Maintenance ON Vehicle.VehicleID = Maintenance.VehicleID GROUP BY Vehicle.VehicleType;","SELECT v.VehicleType, SUM(m.MaintenanceCost) as TotalCost FROM Vehicle v JOIN Maintenance m ON v.VehicleID = m.VehicleID GROUP BY v.VehicleType;",0 How many satellite images are there in total for all fields in the 'imagery' table?,"CREATE TABLE imagery (id INT, field_name VARCHAR(20), filename VARCHAR(30)); ",SELECT COUNT(*) FROM imagery;,SELECT COUNT(*) FROM imagery;,1 What is the highest Lane number of a person with a time of 55.94 with a Rank that's bigger than 8?,"CREATE TABLE table_name_68 (lane INTEGER, time VARCHAR, rank VARCHAR);",SELECT MAX(lane) FROM table_name_68 WHERE time > 55.94 AND rank > 8;,"SELECT MAX(lane) FROM table_name_68 WHERE time = ""55.94"" AND rank > 8;",0 How many top 10s when he had under 1 top 5s?,"CREATE TABLE table_name_61 (top_10 INTEGER, top_5 INTEGER);",SELECT SUM(top_10) FROM table_name_61 WHERE top_5 < 1;,SELECT SUM(top_10) FROM table_name_61 WHERE top_5 1;,0 Maximum number of visitors for Surrealist exhibitions in Madrid?,"CREATE TABLE Exhibitions (id INT, exhibition_name VARCHAR(50), location VARCHAR(30), visitors INT, art_period VARCHAR(20), start_date DATE); ",SELECT MAX(visitors) FROM Exhibitions WHERE art_period = 'Surrealist' AND location = 'Madrid';,SELECT MAX(visitors) FROM Exhibitions WHERE art_period = 'Surrealist' AND location = 'Madrid';,1 Show all ingredients and their certifications from a specific region,"CREATE TABLE regions (id INT PRIMARY KEY, name VARCHAR(255)); CREATE TABLE ingredients (id INT PRIMARY KEY, name VARCHAR(255), origin VARCHAR(255)); CREATE TABLE sustainability (id INT PRIMARY KEY, ingredient_id INT, certification VARCHAR(255));","SELECT ingredients.name, sustainability.certification FROM ingredients INNER JOIN sustainability ON ingredients.id = sustainability.ingredient_id INNER JOIN regions ON ingredients.origin = regions.name WHERE regions.name = 'Africa';","SELECT i.name, s.certification FROM ingredients i INNER JOIN sustainability s ON i.id = s.ingredient_id WHERE i.origine = 'North America';",0 What is the minimum funding amount for a series A investment round?,"CREATE TABLE investments(id INT, startup_id INT, round_number INT, investment_amount INT); ",SELECT MIN(investment_amount) FROM investments WHERE round_number = 1;,SELECT MIN(investment_amount) FROM investments WHERE round_number = 1;,1 "What is the total R&D expenditure for each drug in the rd_expenditures table, grouped by drug name?","CREATE TABLE rd_expenditures (expenditure_id INT, drug_id INT, expenditure_type TEXT, expenditure_amount DECIMAL(10, 2), year INT); ","SELECT drug_id, SUM(expenditure_amount) AS total_rd_expenditure FROM rd_expenditures GROUP BY drug_id;","SELECT drug_id, SUM(expenditure_amount) as total_expenditure FROM rd_expenditures GROUP BY drug_id;",0 "Which Silver has a Rank of 6, and a Bronze smaller than 3?","CREATE TABLE table_name_3 (silver INTEGER, rank VARCHAR, bronze VARCHAR);",SELECT MIN(silver) FROM table_name_3 WHERE rank = 6 AND bronze < 3;,SELECT SUM(silver) FROM table_name_3 WHERE rank = 6 AND bronze 3;,0 "Find the total number of safety tests passed by US-based automakers in the ""safety_testing"" table.","CREATE TABLE safety_testing (id INT, automaker VARCHAR(50), country VARCHAR(50), tests_passed INT);",SELECT SUM(tests_passed) FROM safety_testing WHERE country = 'USA';,SELECT SUM(tests_passed) FROM safety_testing WHERE country = 'USA';,1 What is the smallest population recorded back in 2002?,CREATE TABLE table_13764346_1 (Id VARCHAR);,SELECT MIN(2002 AS _population) FROM table_13764346_1;,"SELECT MIN(population) FROM table_13764346_1 WHERE 2002 = ""Minimum Population"";",0 What was the previous school of the ft7in (m) tall player?,"CREATE TABLE table_24925945_3 (previous_school VARCHAR, height VARCHAR);","SELECT previous_school FROM table_24925945_3 WHERE height = ""ft7in (m)"";","SELECT previous_school FROM table_24925945_3 WHERE height = ""Ft7in (M)"";",0 "Identify the total number of players who have played games on both PC and console platforms, and list their demographic information.","CREATE TABLE Players (PlayerID INT, Age INT, Gender VARCHAR(10), Platform VARCHAR(10));CREATE TABLE MultiplayerGames (GameID INT, PlayerID INT);","SELECT p.PlayerID, p.Age, p.Gender FROM Players p INNER JOIN MultiplayerGames mg ON p.PlayerID = mg.PlayerID WHERE p.Platform IN ('PC', 'Console') GROUP BY p.PlayerID HAVING COUNT(DISTINCT p.Platform) = 2;","SELECT p.Platform, COUNT(p.PlayerID) as TotalPlayers FROM Players p INNER JOIN MultiplayerGames mg ON p.PlayerID = mg.PlayerID WHERE p.Platform IN ('PC', 'Console') GROUP BY p.Platform;",0 What are the records of games where high rebounds is amar'e stoudemire (11),"CREATE TABLE table_17340355_6 (record VARCHAR, high_rebounds VARCHAR);","SELECT COUNT(record) FROM table_17340355_6 WHERE high_rebounds = ""Amar'e Stoudemire (11)"";","SELECT record FROM table_17340355_6 WHERE high_rebounds = ""Amar'e Stoudemire (11)"";",0 What was the name that had a starting price of 11/1 and a jockey named Garrett Cotter?,"CREATE TABLE table_20668268_1 (name VARCHAR, starting_price VARCHAR, jockey VARCHAR);","SELECT name FROM table_20668268_1 WHERE starting_price = ""11/1"" AND jockey = ""Garrett Cotter"";","SELECT name FROM table_20668268_1 WHERE starting_price = ""11/1"" AND jockey = ""Garrett Cotter"";",1 "What is the average age of offenders who have participated in restorative justice programs, by gender?","CREATE TABLE offenders (offender_id INT, age INT, gender VARCHAR(10)); CREATE TABLE restorative_justice (offender_id INT, program_id INT); CREATE TABLE programs (program_id INT, program_name VARCHAR(20)); ","SELECT AVG(offenders.age) as avg_age, offenders.gender FROM offenders INNER JOIN restorative_justice ON offenders.offender_id = restorative_justice.offender_id INNER JOIN programs ON restorative_justice.program_id = programs.program_id WHERE programs.program_name = 'Restorative Circles' GROUP BY offenders.gender;","SELECT o.gender, AVG(o.age) as avg_age FROM offenders o JOIN restorative_justice rj ON o.offender_id = rj.offender_id JOIN programs p ON rj.program_id = p.program_id GROUP BY o.gender;",0 What is the total budget for support programs in Africa that were implemented after 2018?,"CREATE TABLE support_programs_2 (id INT, name TEXT, region TEXT, budget FLOAT, start_year INT); ",SELECT SUM(budget) FROM support_programs_2 WHERE region = 'Africa' AND start_year > 2018;,SELECT SUM(budget) FROM support_programs_2 WHERE region = 'Africa' AND start_year > 2018;,1 What is the total energy consumption in Antarctica for the last 3 years?,"CREATE TABLE energy_antarctica (year INT, energy_consumption INT); ",SELECT SUM(energy_consumption) FROM energy_antarctica WHERE year BETWEEN 2017 AND 2019;,SELECT SUM(energy_consumption) FROM energy_antarctica WHERE year BETWEEN (YEAR(CURRENT_DATE) - 3) AND YEAR(CURRENT_DATE);,0 List the branding for krca-tv.,"CREATE TABLE table_2523809_1 (branding VARCHAR, callsign VARCHAR);","SELECT branding FROM table_2523809_1 WHERE callsign = ""KRCA-TV"";","SELECT branding FROM table_2523809_1 WHERE callsign = ""Krca-TV"";",0 How many numbers were recorded for Chester when the religion was Hindu?,"CREATE TABLE table_16974228_1 (chester VARCHAR, religion VARCHAR);","SELECT COUNT(chester) FROM table_16974228_1 WHERE religion = ""Hindu"";","SELECT COUNT(chester) FROM table_16974228_1 WHERE religion = ""Hindu"";",1 What is the evening gown score of the contestant from the District of Columbia with preliminaries smaller than 8.647?,"CREATE TABLE table_name_79 (evening_gown VARCHAR, preliminaries VARCHAR, state VARCHAR);","SELECT COUNT(evening_gown) FROM table_name_79 WHERE preliminaries < 8.647 AND state = ""district of columbia"";","SELECT evening_gown FROM table_name_79 WHERE preliminaries 8.647 AND state = ""district of columbia"";",0 Which television service has a qualsiasi package/option?,"CREATE TABLE table_name_27 (television_service VARCHAR, package_option VARCHAR);","SELECT television_service FROM table_name_27 WHERE package_option = ""qualsiasi"";","SELECT television_service FROM table_name_27 WHERE package_option = ""qualsiasi"";",1 How many dates are shown for the home team of orlando pirates and result of 1–3?,"CREATE TABLE table_27274566_2 (date VARCHAR, home_team VARCHAR, result VARCHAR);","SELECT COUNT(date) FROM table_27274566_2 WHERE home_team = ""Orlando Pirates"" AND result = ""1–3"";","SELECT COUNT(date) FROM table_27274566_2 WHERE home_team = ""Orlando Pirates"" AND result = ""1–3"";",1 How many space missions were successful per country?,"CREATE TABLE space_missions (mission_id INT, mission_name VARCHAR(50), country VARCHAR(50), success INT);","SELECT country, SUM(success) FROM space_missions GROUP BY country;","SELECT country, COUNT(*) as successful_missions FROM space_missions GROUP BY country;",0 How many scores had an episode of 03x06?,"CREATE TABLE table_29141354_3 (scores VARCHAR, episode VARCHAR);","SELECT COUNT(scores) FROM table_29141354_3 WHERE episode = ""03x06"";","SELECT scores FROM table_29141354_3 WHERE episode = ""03x06"";",0 How many animals are there in each program?,"CREATE TABLE Programs (id INT, name VARCHAR(30)); CREATE TABLE Animals_In_Programs (program_id INT, animal_id INT, species VARCHAR(20)); ","SELECT program_id, COUNT(animal_id) AS animal_count FROM Animals_In_Programs GROUP BY program_id;","SELECT p.name, COUNT(a.animal_id) FROM Programs p JOIN Animals_In_Programs a ON p.id = a.program_id GROUP BY p.name;",0 what is the highest ngc number when the declination (j2000) is °25′26″?,"CREATE TABLE table_name_51 (ngc_number INTEGER, declination___j2000__ VARCHAR);","SELECT MAX(ngc_number) FROM table_name_51 WHERE declination___j2000__ = ""°25′26″"";","SELECT MAX(ngc_number) FROM table_name_51 WHERE declination___j2000__ = ""°25′26′′"";",0 "What is the total number of posts with hashtags related to mental health, for users from the USA, grouped by age and gender?","CREATE TABLE posts (post_id INT, user_id INT, post_content TEXT, posted_at TIMESTAMP); CREATE TABLE users (user_id INT, age INT, gender VARCHAR(10), country VARCHAR(10)); ","SELECT u.age, u.gender, COUNT(*) AS total_posts FROM users u INNER JOIN posts p ON u.user_id = p.user_id WHERE u.country = 'USA' AND (p.post_content LIKE '%#mentalhealth%' OR p.post_content LIKE '%mental health%') GROUP BY u.age, u.gender;","SELECT u.age, u.gender, COUNT(p.post_id) as total_posts FROM posts p JOIN users u ON p.user_id = u.user_id WHERE p.post_content LIKE '%mental health%' AND u.country = 'USA' GROUP BY u.age, u.gender;",0 What is the total installed capacity (in MW) of wind power projects in each country?,"CREATE TABLE wind_projects (project_id INT, project_name TEXT, country TEXT, capacity_mw FLOAT); ","SELECT country, SUM(capacity_mw) FROM wind_projects GROUP BY country;","SELECT country, SUM(capacity_mw) FROM wind_projects GROUP BY country;",1 Which of the participating clubs had 73 tries for?,"CREATE TABLE table_name_73 (club VARCHAR, tries_for VARCHAR);","SELECT club FROM table_name_73 WHERE tries_for = ""73"";","SELECT club FROM table_name_73 WHERE tries_for = ""73"";",1 How many spacecraft were manufactured by Aerospace Corp in 2025?,"CREATE TABLE Spacecraft (Id INT, Name VARCHAR(50), ManufacturerId INT, ManufactureDate DATE); CREATE TABLE Manufacturer (Id INT, Name VARCHAR(50));",SELECT COUNT(*) FROM Spacecraft sc JOIN Manufacturer m ON sc.ManufacturerId = m.Id WHERE m.Name = 'Aerospace Corp' AND YEAR(sc.ManufactureDate) = 2025;,SELECT COUNT(*) FROM Spacecraft JOIN Manufacturer ON Spacecraft.ManufacturerId = Manufacturer.Id WHERE Manufacturer.Name = 'Aerospace Corp' AND YEAR(ManufactureDate) = 2025;,0 List the top 3 most visited cities by tourists?,"CREATE TABLE tourists (tourist_id INT, name TEXT, city TEXT, duration INT);","SELECT city, COUNT(*) as num_tourists FROM tourists GROUP BY city ORDER BY num_tourists DESC LIMIT 3;","SELECT city, COUNT(*) as num_visitors FROM tourists GROUP BY city ORDER BY num_visitors DESC LIMIT 3;",0 What is the average delivery time for packages shipped to Africa?,"CREATE TABLE delivery_data (delivery_id INT, shipment_id INT, delivery_time INT); ",SELECT AVG(delivery_time) FROM delivery_data JOIN shipment_data ON delivery_data.shipment_id = shipment_data.shipment_id WHERE shipment_data.destination_country = 'Africa';,SELECT AVG(delivery_time) FROM delivery_data WHERE shipment_id IN (SELECT shipment_id FROM shipment_data WHERE country = 'Africa');,0 When was the game with richmond as Away team?,"CREATE TABLE table_name_86 (date VARCHAR, away_team VARCHAR);","SELECT date FROM table_name_86 WHERE away_team = ""richmond"";","SELECT date FROM table_name_86 WHERE away_team = ""richmond"";",1 "Which Goals Against has a Drawn larger than 9, a Lost larger than 15, a Position of 24, and a Played smaller than 46?","CREATE TABLE table_name_50 (goals_against INTEGER, played VARCHAR, position VARCHAR, drawn VARCHAR, lost VARCHAR);",SELECT AVG(goals_against) FROM table_name_50 WHERE drawn > 9 AND lost > 15 AND position = 24 AND played < 46;,SELECT AVG(goals_against) FROM table_name_50 WHERE drawn > 9 AND lost > 15 AND position = 24 AND played 46;,0 "What is the total property size in Philadelphia for properties built before 2000, excluding co-owned properties?","CREATE TABLE properties (property_id INT, size FLOAT, city VARCHAR(20), build_year INT, co_ownership BOOLEAN); ",SELECT SUM(size) FROM properties WHERE city = 'Philadelphia' AND build_year < 2000 AND co_ownership = false;,SELECT SUM(size) FROM properties WHERE city = 'Philadelphia' AND build_year 2000 AND co_ownership = false;,0 Find the total number of research papers published in astrophysics and planetary science,"CREATE TABLE ResearchPapers(ID INT, Title VARCHAR(100), PublicationYear INT, ResearchArea VARCHAR(50));","SELECT COUNT(*) FROM ResearchPapers WHERE ResearchArea IN ('astrophysics', 'planetary science');","SELECT COUNT(*) FROM ResearchPapers WHERE ResearchArea IN ('Astrophysics', 'Planet Science');",0 What are the most common travel restrictions for each country in the last year?,"CREATE TABLE TravelRestrictions (Country VARCHAR(255), Restriction VARCHAR(255), RestrictionDate DATE);","SELECT Country, Restriction, COUNT(Restriction) OVER (PARTITION BY Country, Restriction) AS NumRestrictions, ROW_NUMBER() OVER (PARTITION BY Country ORDER BY COUNT(Restriction) DESC) AS Rank FROM TravelRestrictions WHERE RestrictionDate >= ADD_MONTHS(CURRENT_DATE, -12) GROUP BY Country, Restriction HAVING Rank <= 1;","SELECT Country, Restriction, COUNT(*) FROM TravelRestrictions WHERE RestrictionDate >= DATEADD(year, -1, GETDATE()) GROUP BY Country, Restriction ORDER BY COUNT(*) DESC;",0 Show the product names and their origins that are not from countries with high ethical labor violations.,"CREATE TABLE ClothingInventory (product_id INT, product_name TEXT, origin TEXT); CREATE TABLE SupplyChainViolations (country TEXT, num_violations INT); ","SELECT product_name, origin FROM ClothingInventory C1 WHERE origin NOT IN (SELECT country FROM SupplyChainViolations WHERE num_violations > 10);","SELECT ClothingInventory.product_name, ClothingInventory.origine FROM ClothingInventory INNER JOIN SupplyChainViolations ON ClothingInventory.product_id = SupplyChainViolations.country WHERE SupplyChainViolations.num_violations > 0;",0 What is the minimum population of a hospital in 'California'?,"CREATE TABLE health_facilities (facility_id INT, name VARCHAR(50), type VARCHAR(50), population INT, city VARCHAR(50), state VARCHAR(50));",SELECT MIN(population) FROM health_facilities WHERE type = 'hospital' AND state = 'California';,SELECT MIN(population) FROM health_facilities WHERE type = 'hospital' AND state = 'California';,1 Which Time/Retired had a grid number bigger than 1 and whose driver was Damon Hill?,"CREATE TABLE table_name_78 (time_retired VARCHAR, grid VARCHAR, driver VARCHAR);","SELECT time_retired FROM table_name_78 WHERE grid > 1 AND driver = ""damon hill"";","SELECT time_retired FROM table_name_78 WHERE grid > 1 AND driver = ""damon hill"";",1 How many males have a percentage of 80.62?,"CREATE TABLE table_name_82 (males VARCHAR, percentage___percentage_ VARCHAR);","SELECT males FROM table_name_82 WHERE percentage___percentage_ = ""80.62"";","SELECT males FROM table_name_82 WHERE percentage___percentage_ = ""80.62"";",1 Which cruelty-free brand has the highest-rated mascara in the UK?,"CREATE TABLE cosmetics.mascara_reviews (review_id INT, product_name VARCHAR(50), brand VARCHAR(50), cruelty_free BOOLEAN, rating INT); ","SELECT brand, AVG(rating) as avg_rating FROM cosmetics.mascara_reviews WHERE product_name LIKE '%mascara%' AND cruelty_free = true GROUP BY brand ORDER BY avg_rating DESC LIMIT 1;","SELECT brand, MAX(rating) FROM cosmetics.mascara_reviews WHERE cruelty_free = true GROUP BY brand;",0 "What is the total number of accommodations provided by type, across all countries?","CREATE TABLE Accommodations (ID INT PRIMARY KEY, Country VARCHAR(50), AccommodationType VARCHAR(50), Quantity INT); ","SELECT AccommodationType, SUM(Quantity) as Total FROM Accommodations GROUP BY AccommodationType;","SELECT Country, AccommodationType, SUM(Quantity) FROM Accommodations GROUP BY Country, AccommodationType;",0 "What is the Event, when Year is 2002, and when Competition is European Indoor Championships?","CREATE TABLE table_name_6 (event VARCHAR, year VARCHAR, competition VARCHAR);","SELECT event FROM table_name_6 WHERE year = 2002 AND competition = ""european indoor championships"";","SELECT event FROM table_name_6 WHERE year = ""2002"" AND competition = ""european indoor championships"";",0 How many NBA years did the player from the United States who was previously on the los angeles lakers have?,"CREATE TABLE table_name_58 (nba_years_ VARCHAR, a_ VARCHAR, nationality VARCHAR, previous_team VARCHAR);","SELECT nba_years_[a_] FROM table_name_58 WHERE nationality = ""united states"" AND previous_team = ""los angeles lakers"";","SELECT nba_years_ FROM table_name_58 WHERE nationality = ""united states"" AND previous_team = ""los angeles lakers"";",0 What is the average depth of ocean floor mapping project sites in the 'MarineLife' schema?,"CREATE SCHEMA MarineLife; CREATE TABLE OceanFloorMapping (site_id INT, depth FLOAT); ",SELECT AVG(depth) FROM MarineLife.OceanFloorMapping;,SELECT AVG(depth) FROM MarineLife.OceanFloorMapping;,1 Find the first names of students studying in room 108.,"CREATE TABLE list (firstname VARCHAR, classroom VARCHAR);",SELECT firstname FROM list WHERE classroom = 108;,SELECT firstname FROM list WHERE classroom = 108;,1 Which biotech startups have received funding in the last 6 months?,"CREATE TABLE company (id INT, name VARCHAR(50), industry VARCHAR(50), location VARCHAR(50), startup BOOLEAN); CREATE TABLE funding (company_id INT, round VARCHAR(50), amount FLOAT, funding_date DATE); ","SELECT c.name FROM company c JOIN funding f ON c.id = f.company_id WHERE c.startup = TRUE AND f.funding_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH)","SELECT company.name FROM company INNER JOIN funding ON company.id = funding.company_id WHERE company.industry = 'Biotech' AND funding_date >= DATEADD(month, -6, GETDATE());",0 What is the average number of genres per artist?,"CREATE TABLE artists (id INT, name TEXT); CREATE TABLE artist_genres (artist_id INT, genre TEXT); ","SELECT AVG(genre_count) FROM (SELECT artist_id, COUNT(DISTINCT genre) AS genre_count FROM artist_genres GROUP BY artist_id) AS artist_genre_counts;",SELECT AVG(artist_genres.genre) FROM artists INNER JOIN artist_genres ON artists.id = artist_genres.artist_id;,0 Determine the number of volunteers who have signed up for each program and rank them in descending order.,"CREATE TABLE programs (program_id INT, program TEXT, num_volunteers INT); ","SELECT program, COUNT(volunteer_id) as num_volunteers, RANK() OVER (ORDER BY COUNT(volunteer_id) DESC) as program_rank FROM volunteers GROUP BY program;","SELECT program, SUM(num_volunteers) as total_volunteers FROM programs GROUP BY program ORDER BY total_volunteers DESC;",0 Which school did the player that played 2004-05 attend?,"CREATE TABLE table_10015132_21 (school_club_team VARCHAR, years_in_toronto VARCHAR);","SELECT school_club_team FROM table_10015132_21 WHERE years_in_toronto = ""2004-05"";","SELECT school_club_team FROM table_10015132_21 WHERE years_in_toronto = ""2004-05"";",1 Which 5’UTR splice has a Variant ID at sftpa1 variant 2?,CREATE TABLE table_name_46 (variant_id VARCHAR);,"SELECT 5 AS ’utr_splice FROM table_name_46 WHERE variant_id = ""sftpa1 variant 2"";","SELECT 5 AS splice FROM table_name_46 WHERE variant_id = ""sftpa1 variant 2"";",0 What is the total cargo weight transported by vessels with a flag state of 'Panama'?,"CREATE TABLE Cargo_Transactions (ID INT, Vessel_Name VARCHAR(50), Flag_State VARCHAR(50), Cargo_Weight INT); ",SELECT SUM(Cargo_Weight) FROM Cargo_Transactions WHERE Flag_State = 'Panama';,SELECT SUM(Cargo_Weight) FROM Cargo_Transactions WHERE Flag_State = 'Panama';,1 What's the lowest rank of a player who played in 2012?,"CREATE TABLE table_name_50 (rank INTEGER, event VARCHAR);","SELECT MIN(rank) FROM table_name_50 WHERE event = ""2012"";","SELECT MIN(rank) FROM table_name_50 WHERE event = ""2012"";",1 Insert new menu item records for 'Vegan Burger' with a price of $8.50,"CREATE TABLE menu_items (menu_id INT PRIMARY KEY, item_name VARCHAR(255), price DECIMAL(5,2));","INSERT INTO menu_items (menu_id, item_name, price) VALUES (NULL, 'Vegan Burger', 8.50);","INSERT INTO menu_items (menu_id, item_name, price) VALUES ('Vegan Burger', 8.50);",0 What is the total number of volunteer hours in 'volunteers' table?,"CREATE TABLE volunteers (id INT, name TEXT, volunteer_hours INT);",SELECT SUM(volunteer_hours) FROM volunteers;,SELECT SUM(volunteer_hours) FROM volunteers;,1 How many people wrote the episode that had 7.26 million u.s. viewers?,"CREATE TABLE table_28037619_2 (written_by VARCHAR, us_viewers__million_ VARCHAR);","SELECT COUNT(written_by) FROM table_28037619_2 WHERE us_viewers__million_ = ""7.26"";","SELECT written_by FROM table_28037619_2 WHERE us_viewers__million_ = ""7.26"";",0 How many threat intelligence reports were generated per month in 2021?,"CREATE TABLE Reports (Month VARCHAR(7), Count INT); ","SELECT STR_TO_DATE(Month, '%b-%Y') AS Month, COUNT(*) FROM Reports GROUP BY Month;","SELECT Month, SUM(Count) FROM Reports WHERE Year = 2021 GROUP BY Month;",0 Find the number of marine species unique to each ocean.,"CREATE TABLE oceans (ocean_id INT, name VARCHAR(50)); CREATE TABLE species (species_id INT, name VARCHAR(50), ocean_id INT); ","SELECT ocean_id, COUNT(DISTINCT species_id) FROM species GROUP BY ocean_id;","SELECT o.name, COUNT(s.species_id) FROM oceans o JOIN species s ON o.ocean_id = s.ocean_id GROUP BY o.name;",0 "Which League from has a Position of lw, a Pick # larger than 34, and a Player of bradley ross?","CREATE TABLE table_name_95 (league_from VARCHAR, player VARCHAR, position VARCHAR, pick__number VARCHAR);","SELECT league_from FROM table_name_95 WHERE position = ""lw"" AND pick__number > 34 AND player = ""bradley ross"";","SELECT league_from FROM table_name_95 WHERE position = ""lw"" AND pick__number > 34 AND player = ""bradley ross"";",1 How many podcasts were published in Brazil in the last year?,"CREATE TABLE podcasts (id INT, title VARCHAR(255), publish_date DATE, location VARCHAR(50)); ","SELECT COUNT(*) FROM podcasts WHERE location = 'Brazil' AND publish_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 1 YEAR) AND CURDATE();","SELECT COUNT(*) FROM podcasts WHERE location = 'Brazil' AND publish_date >= DATEADD(year, -1, GETDATE());",0 "What is the total quantity of ingredients used in dishes that contain a specific ingredient, such as chicken?","CREATE TABLE Dishes (DishID INT, DishName VARCHAR(50), Category VARCHAR(50), IngredientID INT, IngredientQTY INT, Price DECIMAL(5,2)); CREATE TABLE Ingredients (IngredientID INT, IngredientName VARCHAR(50), IsChicken INT); ",SELECT SUM(IngredientQTY) as TotalIngredientQTY FROM Dishes JOIN Ingredients ON Dishes.IngredientID = Ingredients.IngredientID WHERE IsChicken = 1;,SELECT SUM(Dishes.IngredientQTY) FROM Dishes INNER JOIN Ingredients ON Dishes.IngredientID = Ingredients.IngredientID WHERE Ingredients.IsChicken = 1;,0 "List all volunteers who have worked in program A or B, along with their total hours.","CREATE TABLE Volunteers (VolunteerID INT, Name TEXT); CREATE TABLE VolunteerPrograms (VolunteerID INT, Program TEXT, Hours DECIMAL); ","SELECT v.Name, SUM(vp.Hours) as TotalHours FROM Volunteers v INNER JOIN VolunteerPrograms vp ON v.VolunteerID = vp.VolunteerID WHERE vp.Program IN ('Program A', 'Program B') GROUP BY v.Name;","SELECT Volunteers.Name, SUM(VolunteerPrograms.Hours) FROM Volunteers INNER JOIN VolunteerPrograms ON Volunteers.VolunteerID = VolunteerPrograms.VolunteerID WHERE VolunteerPrograms.Program IN ('Program A', 'Program B') GROUP BY Volunteers.Name;",0 "Which Level has a League Contested of northern premier league premier division, and a Season of 2011–12?","CREATE TABLE table_name_45 (level INTEGER, leaguecontested VARCHAR, season VARCHAR);","SELECT AVG(level) FROM table_name_45 WHERE leaguecontested = ""northern premier league premier division"" AND season = ""2011–12"";","SELECT AVG(level) FROM table_name_45 WHERE leaguecontested = ""northern premier league premier division"" AND season = ""2011–12"";",1 "Insert new records into the 'adaptation_projects' table with the following details: (1, 'India', 'Agriculture', 'Community-based', 50000)","CREATE TABLE adaptation_projects (id INT, country VARCHAR(255), sector VARCHAR(255), funding_source VARCHAR(255), amount FLOAT);","INSERT INTO adaptation_projects (id, country, sector, funding_source, amount) VALUES (1, 'India', 'Agriculture', 'Community-based', 50000);","INSERT INTO adaptation_projects (country, sector, funding_source, amount) VALUES (1, 'India', 'Agriculture', 'Community-based', 50000);",0 What is the total number of heritage sites for each country in Asia?,"CREATE TABLE heritagesites (name VARCHAR(255), country VARCHAR(255), region VARCHAR(255)); ","SELECT country, COUNT(DISTINCT name) as num_sites FROM heritagesites WHERE region = 'Asia' GROUP BY country;","SELECT country, COUNT(*) FROM heritagesites WHERE region = 'Asia' GROUP BY country;",0 What is the average number of vehicles in Tokyo?,"CREATE TABLE vehicle_count (id INT, city VARCHAR(50), count INT); ",SELECT AVG(count) FROM vehicle_count WHERE city = 'Tokyo';,SELECT AVG(count) FROM vehicle_count WHERE city = 'Tokyo';,1 What was the last appearance of actor/actress is pam ferris?,"CREATE TABLE table_25831483_1 (last_appearance VARCHAR, actor_actress VARCHAR);","SELECT last_appearance FROM table_25831483_1 WHERE actor_actress = ""Pam Ferris"";","SELECT last_appearance FROM table_25831483_1 WHERE actor_actress = ""Pam Ferris"";",1 "What building is in Shenzhen, have less than 115 floors, and was completed before 2017?","CREATE TABLE table_name_79 (name VARCHAR, floors VARCHAR, city VARCHAR, completion VARCHAR);","SELECT name FROM table_name_79 WHERE city = ""shenzhen"" AND completion < 2017 AND floors < 115;","SELECT name FROM table_name_79 WHERE city = ""shenzhen"" AND completion 2017 AND floors 115;",0 Which country sources the most natural ingredients for cosmetic products?,"CREATE TABLE ingredient_sourcing (ingredient_name VARCHAR(100), source_country VARCHAR(100), is_natural BOOLEAN); ","SELECT source_country, SUM(CASE WHEN is_natural THEN 1 ELSE 0 END) AS total_natural_ingredients FROM ingredient_sourcing GROUP BY source_country ORDER BY total_natural_ingredients DESC LIMIT 1;","SELECT source_country, COUNT(*) FROM ingredient_sourcing WHERE is_natural = true GROUP BY source_country ORDER BY COUNT(*) DESC LIMIT 1;",0 "Which Award has a Group of césar awards, and a Result of nominated, and a Year larger than 2001, and a Film of 8 women (8 femmes)?","CREATE TABLE table_name_39 (award VARCHAR, film VARCHAR, year VARCHAR, group VARCHAR, result VARCHAR);","SELECT award FROM table_name_39 WHERE group = ""césar awards"" AND result = ""nominated"" AND year > 2001 AND film = ""8 women (8 femmes)"";","SELECT award FROM table_name_39 WHERE group = ""césar awards"" AND result = ""nominated"" AND year > 2001 AND film = ""8 women (8 femmes)"";",1 Show the percentage of hybrid cars sold in each region in the 'auto_sales' table.,"CREATE TABLE auto_sales (id INT, region VARCHAR(20), vehicle_type VARCHAR(10)); ","SELECT region, COUNT(*) FILTER (WHERE vehicle_type = 'Hybrid') * 100.0 / COUNT(*) AS pct_hybrid_sold FROM auto_sales GROUP BY region;","SELECT region, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM auto_sales WHERE vehicle_type = 'Hybrid') FROM auto_sales GROUP BY region;",0 How many carbon offset initiatives were started in the 'East' region after 2018-01-01?,"CREATE TABLE carbon_offset_initiatives (initiative_id INT, initiative_name VARCHAR(100), location VARCHAR(50), start_date DATE); ",SELECT COUNT(*) FROM carbon_offset_initiatives WHERE location = 'East' AND start_date > '2018-01-01';,SELECT COUNT(*) FROM carbon_offset_initiatives WHERE location = 'East' AND start_date > '2018-01-01';,1 What is the change in monthly energy production for each hydroelectric power plant in the renewables table?,"CREATE TABLE renewables (id INT, name VARCHAR(50), type VARCHAR(50), production FLOAT, created_at TIMESTAMP);","SELECT name, LAG(production, 1) OVER(PARTITION BY name ORDER BY created_at) as prev_month_production, production, production - LAG(production, 1) OVER(PARTITION BY name ORDER BY created_at) as monthly_change FROM renewables WHERE type = 'hydro' ORDER BY name, created_at;","SELECT name, type, production, MIN(production) OVER (PARTITION BY type ORDER BY created_at) as monthly_production_change FROM renewables WHERE type = 'Hydroelectric';",0 What is the total amount of government funding for urban agriculture projects in Tokyo?,"CREATE TABLE funding (city VARCHAR(255), type VARCHAR(255), amount FLOAT); ",SELECT SUM(amount) FROM funding WHERE city = 'Tokyo' AND type = 'urban agriculture';,SELECT SUM(amount) FROM funding WHERE city = 'Tokyo' AND type = 'urban agriculture';,1 What is the average energy production (in MWh) for wind turbines in Australia that were commissioned in 2018?,"CREATE TABLE if not exists wind_turbines (turbine_id integer, turbine_name varchar(255), turbine_location varchar(255), commissioning_date date, energy_production_mwh integer); ","SELECT turbine_location, AVG(energy_production_mwh) as avg_production FROM wind_turbines WHERE turbine_location LIKE 'Australia%' AND commissioning_date BETWEEN '2018-01-01' AND '2018-12-31' GROUP BY turbine_location;",SELECT AVG(energy_production_mwh) FROM wind_turbines WHERE turbine_location = 'Australia' AND commissioning_date >= '2018-01-01';,0 What is the average CO2 emissions reduction for each climate adaptation project in South America?,"CREATE TABLE climate_adaptation (project_name VARCHAR(255), region VARCHAR(255), co2_reduction_tonnes INT); ","SELECT region, AVG(co2_reduction_tonnes) as avg_co2_reduction FROM climate_adaptation WHERE region = 'South America' GROUP BY region;","SELECT project_name, AVG(co2_reduction_tonnes) FROM climate_adaptation WHERE region = 'South America' GROUP BY project_name;",0 What couple had a total score of 6?,"CREATE TABLE table_19744915_15 (couple VARCHAR, total VARCHAR);",SELECT couple FROM table_19744915_15 WHERE total = 6;,SELECT couple FROM table_19744915_15 WHERE total = 6;,1 Which match had the largest crowd size where the away team was North Melbourne?,"CREATE TABLE table_name_43 (crowd INTEGER, away_team VARCHAR);","SELECT MAX(crowd) FROM table_name_43 WHERE away_team = ""north melbourne"";","SELECT MAX(crowd) FROM table_name_43 WHERE away_team = ""north melbourne"";",1 What is the total number of Entered when the eliminated number is 3?,"CREATE TABLE table_name_53 (entered VARCHAR, eliminated VARCHAR);","SELECT COUNT(entered) FROM table_name_53 WHERE eliminated = ""3"";",SELECT COUNT(entered) FROM table_name_53 WHERE eliminated = 3;,0 What is the count of open pedagogy courses offered in 'Rural School District'?,"CREATE TABLE open_pedagogy (course_id INT, district VARCHAR(50), course_type VARCHAR(50)); ",SELECT COUNT(*) FROM open_pedagogy WHERE district = 'Rural School District' AND course_type = 'Open';,SELECT COUNT(*) FROM open_pedagogy WHERE district = 'Rural School District' AND course_type = 'Open';,1 What is the sum of bronzes for countries with 1 gold and under 1 silver?,"CREATE TABLE table_name_19 (bronze INTEGER, gold VARCHAR, silver VARCHAR);",SELECT SUM(bronze) FROM table_name_19 WHERE gold = 1 AND silver < 1;,SELECT SUM(bronze) FROM table_name_19 WHERE gold = 1 AND silver 1;,0 "Who was the loser on December 12, 1971?","CREATE TABLE table_name_5 (loser VARCHAR, date VARCHAR, year VARCHAR);","SELECT loser FROM table_name_5 WHERE date = ""december 12"" AND year = 1971;","SELECT loser FROM table_name_5 WHERE date = ""december 12, 1971"";",0 Get the number of multimodal mobility users in Mumbai and Istanbul who used both public transportation and shared scooters.,"CREATE TABLE mumbai_mobility (user_id INT, mode VARCHAR(20)); CREATE TABLE istanbul_mobility (user_id INT, mode VARCHAR(20)); ",SELECT COUNT(*) FROM (SELECT user_id FROM mumbai_mobility WHERE mode = 'Shared Scooter' INTERSECT SELECT user_id FROM mumbai_mobility WHERE mode = 'Train') AS intersection UNION ALL SELECT COUNT(*) FROM (SELECT user_id FROM istanbul_mobility WHERE mode = 'Shared Scooter' INTERSECT SELECT user_id FROM istanbul_mobility WHERE mode = 'Train');,"SELECT COUNT(*) FROM mumbai_mobility JOIN istanbul_mobility ON mumbai_mobility.user_id = istanbul_mobility.user_id WHERE mumbai_mobility.mode IN ('Public Transportation', 'Shared Scooter');",0 How many mineral extraction permits were granted for the region 'Andes' between 2010 and 2015?,"CREATE TABLE mineral_permits (id INT, region TEXT, permit_year INT, permit_granted TEXT); ",SELECT COUNT(*) FROM mineral_permits WHERE region = 'Andes' AND permit_year BETWEEN 2010 AND 2015 AND permit_granted = 'Granted';,SELECT COUNT(*) FROM mineral_permits WHERE region = 'Andes' AND permit_year BETWEEN 2010 AND 2015;,0 "What is Drawn, when Points Against is ""686""?","CREATE TABLE table_name_34 (drawn VARCHAR, points_against VARCHAR);","SELECT drawn FROM table_name_34 WHERE points_against = ""686"";","SELECT drawn FROM table_name_34 WHERE points_against = ""686"";",1 What is the average price of cruelty-free makeup products?,"CREATE TABLE Products (id INT, name VARCHAR(50), category VARCHAR(50), price DECIMAL(5,2), cruelty_free BOOLEAN); ",SELECT AVG(p.price) as avg_price FROM Products p WHERE p.category = 'Makeup' AND p.cruelty_free = true;,SELECT AVG(price) FROM Products WHERE cruelty_free = true;,0 What is the highest Points with a Lost total of 8?,"CREATE TABLE table_name_39 (points INTEGER, lost VARCHAR);",SELECT MAX(points) FROM table_name_39 WHERE lost = 8;,SELECT MAX(points) FROM table_name_39 WHERE lost = 8;,1 Who was the visitor in the game that had Ottawa as the home team?,"CREATE TABLE table_name_29 (visitor VARCHAR, home VARCHAR);","SELECT visitor FROM table_name_29 WHERE home = ""ottawa"";","SELECT visitor FROM table_name_29 WHERE home = ""ottawa"";",1 What is the total revenue for all hip-hop songs in the US?,"CREATE TABLE Songs (song_id INT, title TEXT, genre TEXT, release_date DATE, price DECIMAL(5,2)); CREATE TABLE Purchases (purchase_id INT, user_id INT, song_id INT, purchase_date DATE);",SELECT SUM(Songs.price) FROM Songs INNER JOIN Purchases ON Songs.song_id = Purchases.song_id WHERE Songs.genre = 'hip-hop' AND Purchases.purchase_date >= '2000-01-01' AND Purchases.purchase_date <= '2022-12-31' AND Songs.release_date <= Purchases.purchase_date;,SELECT SUM(price) FROM Songs JOIN Purchases ON Songs.song_id = Purchases.song_id WHERE genre = 'Hip-Hop' AND country = 'USA';,0 What is the highest and lowest listing price for sustainable urban properties in New York?,"CREATE TABLE sustainable_urban (id INT, city VARCHAR(20), listing_price DECIMAL(10,2)); ","SELECT MIN(listing_price) AS ""Lowest Price"", MAX(listing_price) AS ""Highest Price"" FROM sustainable_urban WHERE city = 'New York';","SELECT listing_price, MAX(listing_price) as max_price, MIN(listing_price) as min_price FROM sustainable_urban WHERE city = 'New York' GROUP BY listing_price;",0 What are the characters from the movie Suppressed Duck?,"CREATE TABLE table_name_80 (characters VARCHAR, title VARCHAR);","SELECT characters FROM table_name_80 WHERE title = ""suppressed duck"";","SELECT characters FROM table_name_80 WHERE title = ""suppressed duck"";",1 What is the total amount of fertilizer used for each crop type in the past 6 months?,"CREATE TABLE Fertilizer (date DATE, fertilizer_amount INT, crop_type VARCHAR(20));","SELECT crop_type, SUM(fertilizer_amount) OVER(PARTITION BY crop_type) as total_fertilizer FROM Fertilizer WHERE date >= DATEADD(month, -6, CURRENT_DATE);","SELECT crop_type, SUM(fertilizer_amount) FROM Fertilizer WHERE date >= DATEADD(month, -6, GETDATE()) GROUP BY crop_type;",0 What is the total number of network devices installed in each region and the total number of mobile subscribers in those regions?,"CREATE TABLE network_devices (id INT, region VARCHAR(20), install_date DATE); CREATE TABLE mobile_subscribers (id INT, region VARCHAR(20), data_usage INT, usage_date DATE);","SELECT n.region, COUNT(n.id) AS num_devices, COUNT(m.id) AS num_subscribers FROM network_devices n INNER JOIN mobile_subscribers m ON n.region = m.region GROUP BY n.region;","SELECT n.region, COUNT(n.id) as total_devices, COUNT(ms.id) as total_mobile_subscribers FROM network_devices n JOIN mobile_subscribers ms ON n.id = ms.region GROUP BY n.region;",0 "Who is the player who has a total less than 4, no scottish cups, and a league cup greater than 0?","CREATE TABLE table_name_31 (player VARCHAR, league_cup VARCHAR, total VARCHAR, scottish_cup VARCHAR);",SELECT player FROM table_name_31 WHERE total < 4 AND scottish_cup = 0 AND league_cup > 0;,"SELECT player FROM table_name_31 WHERE total 4 AND scottish_cup = ""no"" AND league_cup > 0;",0 "What is Industrial Use (m 3 /p/yr)(in %), when Total Freshwater Withdrawal (km 3/yr) is less than 82.75, and when Agricultural Use (m 3 /p/yr)(in %) is 1363(92%)?","CREATE TABLE table_name_32 (industrial_use__m_3__p_yr__in__percentage_ VARCHAR, total_freshwater_withdrawal__km_3__yr_ VARCHAR, agricultural_use__m_3__p_yr__in__percentage_ VARCHAR);","SELECT industrial_use__m_3__p_yr__in__percentage_ FROM table_name_32 WHERE total_freshwater_withdrawal__km_3__yr_ < 82.75 AND agricultural_use__m_3__p_yr__in__percentage_ = ""1363(92%)"";","SELECT industrial_use__m_3__p_yr__in__percentage_ FROM table_name_32 WHERE total_freshwater_withdrawal__km_3__yr_ 82.75 AND agricultural_use__m_3__p_yr__in__percentage_ = ""1363(92%)"";",0 How many people in total attended the game on 1 november 1997?,"CREATE TABLE table_name_37 (attendance VARCHAR, date VARCHAR);","SELECT COUNT(attendance) FROM table_name_37 WHERE date = ""1 november 1997"";","SELECT COUNT(attendance) FROM table_name_37 WHERE date = ""1 november 1997"";",1 "What is the lowest week for December 26, 1999","CREATE TABLE table_name_31 (week INTEGER, date VARCHAR);","SELECT MIN(week) FROM table_name_31 WHERE date = ""december 26, 1999"";","SELECT MIN(week) FROM table_name_31 WHERE date = ""december 26, 1999"";",1 Name the birth date for estonia for spiker and height of 189,"CREATE TABLE table_25058562_2 (birth_date VARCHAR, height VARCHAR, nationality VARCHAR, position VARCHAR);","SELECT birth_date FROM table_25058562_2 WHERE nationality = ""Estonia"" AND position = ""Spiker"" AND height = 189;","SELECT birth_date FROM table_25058562_2 WHERE nationality = ""Estonia"" AND position = ""Spiker"" AND height = 189;",1 What is the average age of male patients in urban areas?,"CREATE TABLE patients (id INT, name VARCHAR(50), age INT, gender VARCHAR(10), region VARCHAR(20)); ",SELECT AVG(age) FROM patients WHERE gender = 'Male' AND region = 'Urban East';,SELECT AVG(age) FROM patients WHERE gender = 'Male' AND region = 'Urban';,0 What is the title for the episode written by Robert Carlock & Dana Klein Borkow?,"CREATE TABLE table_14889988_1 (title VARCHAR, written_by VARCHAR);","SELECT title FROM table_14889988_1 WHERE written_by = ""Robert Carlock & Dana Klein Borkow"";","SELECT title FROM table_14889988_1 WHERE written_by = ""Robert Carlock & Dana Klein Borkow"";",1 Who are the top 5 customers with the highest transaction amounts in the past week?,"CREATE TABLE customers (customer_id INT, name VARCHAR(50), region VARCHAR(50)); CREATE TABLE transactions (transaction_id INT, customer_id INT, amount DECIMAL(10,2), transaction_date DATE);","SELECT c.name, SUM(t.amount) as total_amount FROM customers c INNER JOIN transactions t ON c.customer_id = t.customer_id WHERE t.transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) GROUP BY c.name ORDER BY total_amount DESC LIMIT 5;","SELECT c.name, SUM(t.amount) as total_amount FROM customers c JOIN transactions t ON c.customer_id = t.customer_id WHERE t.transaction_date >= DATEADD(week, -1, GETDATE()) GROUP BY c.name ORDER BY total_amount DESC LIMIT 5;",0 Tell me the average 1st prize for tennessee,CREATE TABLE table_name_55 (location VARCHAR);,"SELECT AVG(1 AS st_prize__) AS $__ FROM table_name_55 WHERE location = ""tennessee"";","SELECT AVG(1 AS st_prize) FROM table_name_55 WHERE location = ""tennessee"";",0 Show the most recent incident date for each category in the SecurityIncidents table.,"CREATE TABLE SecurityIncidents (id INT, incident_category VARCHAR(255), incident_date DATE); ","SELECT incident_category, incident_date, ROW_NUMBER() OVER (PARTITION BY incident_category ORDER BY incident_date DESC) AS rank FROM SecurityIncidents WHERE rank = 1;","SELECT incident_category, MAX(incident_date) FROM SecurityIncidents GROUP BY incident_category;",0 "For the team that had 4:05.096, what was their day 2?","CREATE TABLE table_name_23 (day_2 VARCHAR, day_1 VARCHAR);","SELECT day_2 FROM table_name_23 WHERE day_1 = ""4:05.096"";","SELECT day_2 FROM table_name_23 WHERE day_1 = ""4:05.096"";",1 What is the minimum water consumption per day for the uranium mines?,"CREATE TABLE WaterConsumption (MineID INT, MineType VARCHAR(15), ConsumptionDate DATE, WaterAmount INT);",SELECT MIN(WaterAmount) FROM WaterConsumption WHERE MineType = 'Uranium';,SELECT MIN(WaterAmount) FROM WaterConsumption WHERE MineType = 'Uranium';,1 What is the Time on july 18 that has a Loss of lilly (3-3)?,"CREATE TABLE table_name_34 (time VARCHAR, date VARCHAR, loss VARCHAR);","SELECT time FROM table_name_34 WHERE date = ""july 18"" AND loss = ""lilly (3-3)"";","SELECT time FROM table_name_34 WHERE date = ""july 18"" AND loss = ""lilly (3-3)"";",1 Delete all grants with an amount greater than $100000,"CREATE TABLE grants (id INT, title VARCHAR(50), amount DECIMAL(10,2)); ",DELETE FROM grants WHERE amount > 100000;,DELETE FROM grants WHERE amount > 100000;,1 What is the highest number played with more than 2 lost for Palmeiras and less than 1 draw?,"CREATE TABLE table_name_69 (played INTEGER, drawn VARCHAR, lost VARCHAR, team VARCHAR);","SELECT MAX(played) FROM table_name_69 WHERE lost > 2 AND team = ""palmeiras"" AND drawn < 1;","SELECT MAX(played) FROM table_name_69 WHERE lost > 2 AND team = ""palmeiras"" AND drawn 1;",0 Calculate the average watch time of animated series for users from Europe.,"CREATE TABLE user_sessions (user_id INT, video_id INT, watch_time INT, video_type VARCHAR(50)); CREATE VIEW animated_series AS SELECT DISTINCT video_id FROM videos WHERE video_type = 'animated series'; CREATE VIEW users_from_europe AS SELECT DISTINCT user_id FROM users WHERE country IN ('Germany', 'France', 'Italy', 'Spain', 'United Kingdom');",SELECT AVG(watch_time) FROM user_sessions JOIN animated_series ON user_sessions.video_id = animated_series.video_id JOIN users_from_europe ON user_sessions.user_id = users_from_europe.user_id WHERE video_type = 'animated series';,"SELECT AVG(watch_time) FROM user_sessions JOIN animated_series ON user_sessions.video_id = animated_series.video_id JOIN users_from_europe ON user_sessions.user_id = users_from_europe.user_id WHERE users_from_europe.country IN ('Germany', 'France', 'Italy', 'Spain', 'United Kingdom');",0 What is the total usage of organic and non-organic shea butter in cosmetics?,"CREATE TABLE ingredient_usage (ingredient_id INT, ingredient_name VARCHAR(50), source_type VARCHAR(50), usage_frequency INT); ","SELECT SUM(CASE WHEN source_type = 'Conventional Farm' THEN usage_frequency ELSE 0 END) as total_non_organic, SUM(CASE WHEN source_type = 'Organic Farm' THEN usage_frequency ELSE 0 END) as total_organic FROM ingredient_usage WHERE ingredient_name = 'Shea Butter';","SELECT SUM(usage_frequency) FROM ingredient_usage WHERE source_type IN ('organic', 'non-organic') GROUP BY source_type;",0 What is the total biomass of all marine life in the Atlantic Ocean?,"CREATE TABLE marine_life_biomass (id INT, location TEXT, biomass FLOAT); ",SELECT SUM(biomass) FROM marine_life_biomass WHERE location = 'Atlantic Ocean';,SELECT SUM(biomass) FROM marine_life_biomass WHERE location = 'Atlantic Ocean';,1 What is the percentage of sustainable investments in the Americas?,"CREATE TABLE sustainable_investments (id INT, region VARCHAR(255), sustainable BOOLEAN); ","SELECT region, COUNT(*) * 100.0 / SUM(COUNT(*)) OVER () FROM sustainable_investments WHERE region = 'Americas' GROUP BY region;",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM sustainable_investments WHERE region = 'Americas')) AS percentage FROM sustainable_investments WHERE region = 'Americas' AND sustainable = true;,0 "Count the number of policies issued in 'California' in the first half of 2020, having claim amounts less than or equal to $500.","CREATE TABLE policyholders (id INT, name TEXT, state TEXT); CREATE TABLE policies (id INT, policyholder_id INT, issue_date DATE, claim_amount FLOAT); ",SELECT COUNT(*) FROM policies INNER JOIN policyholders ON policies.policyholder_id = policyholders.id WHERE claim_amount <= 500 AND issue_date >= '2020-01-01' AND issue_date < '2020-07-01' AND policyholders.state = 'CA';,SELECT COUNT(*) FROM policies p JOIN policyholders p ON p.id = p.policyholder_id WHERE p.state = 'California' AND p.issue_date BETWEEN '2020-01-01' AND '2020-12-31' AND p.claim_amount 500;,0 "Delete all records of Rock music streams in Australia before January 1, 2021.","CREATE TABLE streams (song_id INT, stream_date DATE, genre VARCHAR(20), country VARCHAR(20), revenue DECIMAL(10,2)); ",DELETE FROM streams WHERE genre = 'Rock' AND country = 'Australia' AND stream_date < '2021-01-01';,DELETE FROM streams WHERE genre = 'Rock' AND country = 'Australia' AND stream_date '2021-01-01';,0 "What is the total number of donations and investments for each individual in the 'individuals' table, ordered by the total number of contributions in descending order?","CREATE TABLE individuals (individual_id INT, individual_name TEXT, num_donations INT, num_investments INT);","SELECT individual_name, COUNT(num_donations) + COUNT(num_investments) as total_contributions FROM individuals GROUP BY individual_name ORDER BY total_contributions DESC;","SELECT individual_name, SUM(num_donations) as total_donations, SUM(num_investments) as total_investments FROM individuals GROUP BY individual_name ORDER BY total_donations DESC;",0 Name the total number for nfl team for ellis gardner,"CREATE TABLE table_2508633_6 (nfl_team VARCHAR, player VARCHAR);","SELECT COUNT(nfl_team) FROM table_2508633_6 WHERE player = ""Ellis Gardner"";","SELECT COUNT(nfl_team) FROM table_2508633_6 WHERE player = ""Elis Gardner"";",0 Obtain maintenance activities on specific equipment types,"CREATE TABLE equipment_maintenance (equipment_id INT, equipment_type VARCHAR(50), maintenance_date DATE, vendor_name VARCHAR(100), maintenance_type VARCHAR(50)); ","SELECT * FROM equipment_maintenance WHERE equipment_type IN ('Fighter Jet', 'Tank');","SELECT equipment_type, COUNT(*) as maintenance_count FROM equipment_maintenance GROUP BY equipment_type;",0 What player is from canterbury (ushs)?,"CREATE TABLE table_name_67 (player VARCHAR, college_junior_club_team VARCHAR);","SELECT player FROM table_name_67 WHERE college_junior_club_team = ""canterbury (ushs)"";","SELECT player FROM table_name_67 WHERE college_junior_club_team = ""canterbury (ushs)"";",1 Which country had the highest sales revenue for organic skincare products in Q1 2022?,"CREATE TABLE sales_data (sale_id INT, product_id INT, country VARCHAR(50), sale_date DATE, units_sold INT, sale_price FLOAT, is_organic BOOLEAN); ","SELECT country, SUM(units_sold * sale_price) AS revenue FROM sales_data WHERE is_organic = true AND sale_date >= '2022-01-01' AND sale_date < '2022-04-01' GROUP BY country ORDER BY revenue DESC LIMIT 1;","SELECT country, MAX(sale_price) FROM sales_data WHERE is_organic = true AND sale_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY country;",0 "What are the player name, number of matches, and information source for players who do not suffer from injury of 'Knee problem'?","CREATE TABLE injury_accident (player VARCHAR, number_of_matches VARCHAR, SOURCE VARCHAR, injury VARCHAR);","SELECT player, number_of_matches, SOURCE FROM injury_accident WHERE injury <> 'Knee problem';","SELECT player, number_of_matches, SOURCE FROM injury_accident WHERE injury = 'Knee problem';",0 "Which nation has the number of silver medals greater than 1, and bronze medals as 1?","CREATE TABLE table_name_7 (nation VARCHAR, silver VARCHAR, bronze VARCHAR);",SELECT nation FROM table_name_7 WHERE silver > 1 AND bronze = 1;,SELECT nation FROM table_name_7 WHERE silver > 1 AND bronze = 1;,1 Delete all records from the 'Roads' table where the surface type is 'Gravel' and the road was built before 2000.,"CREATE TABLE Roads (ID INT, Name VARCHAR(50), SurfaceType VARCHAR(20), Length FLOAT, YearBuilt INT); ",DELETE FROM Roads WHERE SurfaceType = 'Gravel' AND YearBuilt < 2000;,DELETE FROM Roads WHERE SurfaceType = 'Gravel' AND YearBuilt 2000;,0 What is the average cybersecurity budget for African countries in the last 5 years?,"CREATE TABLE cybersecurity_budgets (id INT, country VARCHAR(255), budget DECIMAL(10,2), year INT); ","SELECT AVG(budget) AS avg_budget FROM cybersecurity_budgets WHERE year BETWEEN 2016 AND 2021 AND country IN ('Nigeria', 'Egypt', 'South Africa', 'Kenya', 'Morocco');","SELECT AVG(budget) FROM cybersecurity_budgets WHERE country IN ('Nigeria', 'Egypt', 'South Africa') AND year BETWEEN 2019 AND 2021;",0 What is the average number of tracks in albums released by artists from Spain?,"CREATE TABLE artists (id INT PRIMARY KEY, name TEXT, country TEXT); CREATE TABLE albums (id INT PRIMARY KEY, title TEXT, artist_id INT, num_tracks INT); ",SELECT AVG(num_tracks) FROM albums WHERE artist_id IN (SELECT id FROM artists WHERE country = 'Spain');,SELECT AVG(a.num_tracks) FROM albums a JOIN artists a ON a.artist_id = a.id WHERE a.country = 'Spain';,0 Name the country for gerrard,"CREATE TABLE table_22667773_8 (country VARCHAR, name VARCHAR);","SELECT country FROM table_22667773_8 WHERE name = ""Gerrard"";","SELECT country FROM table_22667773_8 WHERE name = ""Gerrard"";",1 What was the maximum depth reached in the Atlantic Ocean during deep-sea expeditions in 2018?,"CREATE TABLE depths (id INT, ocean VARCHAR(50), year INT, depth INT); ",SELECT MAX(depth) FROM depths WHERE ocean = 'Atlantic Ocean' AND year = 2018;,SELECT MAX(depth) FROM depths WHERE ocean = 'Atlantic Ocean' AND year = 2018;,1 How many new donors were there in 'Latin America' in 2020?,"CREATE TABLE donors (id INT, name VARCHAR(50), is_new_donor BOOLEAN, region VARCHAR(50), donation_date DATE); ",SELECT COUNT(*) FROM donors WHERE region = 'Latin America' AND is_new_donor = true AND YEAR(donation_date) = 2020;,SELECT COUNT(*) FROM donors WHERE region = 'Latin America' AND YEAR(donation_date) = 2020;,0 What is the average age of individuals in the justice_schemas.court_cases table who have been incarcerated for more than one year?,"CREATE TABLE justice_schemas.court_cases (id INT PRIMARY KEY, defendant_name TEXT, age INT, days_incarcerated INT);",SELECT AVG(age) FROM justice_schemas.court_cases WHERE days_incarcerated > 365;,SELECT AVG(age) FROM justice_schemas.court_cases WHERE days_incarcerated > 1 YEAR;,0 What is the number of strategies in each sector?,"CREATE TABLE strategies (id INT, sector VARCHAR(20), investment FLOAT); ","SELECT sector, COUNT(*) FROM strategies GROUP BY sector;","SELECT sector, COUNT(*) FROM strategies GROUP BY sector;",1 "What is the score of the game on November 10, 2006?","CREATE TABLE table_name_17 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_17 WHERE date = ""november 10, 2006"";","SELECT score FROM table_name_17 WHERE date = ""november 10, 2006"";",1 Update the 'start_date' of a restorative justice program in the 'programs' table,"CREATE TABLE programs (id INT, name VARCHAR(50), location VARCHAR(50), type VARCHAR(50), start_date DATE, end_date DATE);",UPDATE programs SET start_date = '2023-02-01' WHERE id = 103;,"UPDATE programs SET start_date = DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) WHERE type = 'Restorative Justice';",0 Identify the most popular category of dishes ordered,"CREATE TABLE orders (order_id INT, dish_id INT, order_date DATE); CREATE TABLE category_mapping (category_id INT, category_name VARCHAR(255)); ","SELECT category_name, COUNT(*) as order_count FROM orders o JOIN category_mapping cm ON o.dish_id = cm.category_id GROUP BY category_name ORDER BY order_count DESC LIMIT 1;","SELECT category_name, COUNT(*) as total_orders FROM orders JOIN category_mapping ON orders.dish_id = category_mapping.category_id GROUP BY category_name ORDER BY total_orders DESC LIMIT 1;",0 "What is the difference in revenue between consecutive sales for each vendor, partitioned by vendor location, ordered by sale date?","CREATE TABLE Sales (SaleID INT, VendorID INT, Revenue INT, SaleDate DATE); ","SELECT SaleID, VendorID, LAG(Revenue) OVER (PARTITION BY VendorID, Location ORDER BY SaleDate) AS PreviousRevenue, Revenue, Revenue - LAG(Revenue) OVER (PARTITION BY VendorID, Location ORDER BY SaleDate) AS RevenueDifference FROM Sales;","SELECT VendorID, SUM(Revenue) - SUM(Revenue) OVER (PARTITION BY VendorID ORDER BY SaleDate) as RevenueDifference FROM Sales;",0 "What is the highest rank with less than 2 bronze, more than 1 gold, and less than 1 silver?","CREATE TABLE table_name_35 (rank INTEGER, silver VARCHAR, bronze VARCHAR, gold VARCHAR);",SELECT MAX(rank) FROM table_name_35 WHERE bronze < 2 AND gold > 1 AND silver < 1;,SELECT MAX(rank) FROM table_name_35 WHERE bronze 2 AND gold > 1 AND silver 1;,0 What is the rear sight in the Cole model no. 735?,"CREATE TABLE table_12834315_1 (rear_sight VARCHAR, colt_model_no VARCHAR);","SELECT rear_sight FROM table_12834315_1 WHERE colt_model_no = ""735"";",SELECT rear_sight FROM table_12834315_1 WHERE colt_model_no = 735;,0 Determine the percentage of local economic impact in New York and Los Angeles.,"CREATE TABLE local_impact (id INT, city VARCHAR(50), value INT); ","SELECT city, ROUND(100.0 * value / SUM(value) OVER (PARTITION BY NULL), 2) AS percentage FROM local_impact WHERE city IN ('New York', 'Los Angeles');","SELECT city, (value * 100.0 / (SELECT value FROM local_impact WHERE city IN ('New York', 'Los Angeles'))) as percentage FROM local_impact WHERE city IN ('New York', 'Los Angeles') GROUP BY city;",0 What is the number of employees working in 'renewable energy' departments across all factories in the 'East' region?,"CREATE TABLE factories (factory_id INT, department VARCHAR(20), region VARCHAR(10)); ",SELECT COUNT(*) FROM factories WHERE department = 'renewable energy' AND region = 'East';,SELECT COUNT(*) FROM factories WHERE department ='renewable energy' AND region = 'East';,0 What were the fewest amount of guns possessed by a frigate that served in 1815?,"CREATE TABLE table_name_32 (guns INTEGER, class VARCHAR, year VARCHAR);","SELECT MIN(guns) FROM table_name_32 WHERE class = ""frigate"" AND year = ""1815"";","SELECT MIN(guns) FROM table_name_32 WHERE class = ""frigate"" AND year = 1815;",0 Who was the runner-up in 1989?,"CREATE TABLE table_name_32 (runner_up VARCHAR, year VARCHAR);",SELECT runner_up FROM table_name_32 WHERE year = 1989;,SELECT runner_up FROM table_name_32 WHERE year = 1989;,1 List all biotech startups that received funding from VCs in the US after 2018?,"CREATE TABLE startups (id INT, name TEXT, industry TEXT, funding_source TEXT, funding_date DATE); ",SELECT name FROM startups WHERE industry = 'Biotech' AND funding_source = 'VC' AND funding_date > '2018-12-31';,SELECT name FROM startups WHERE industry = 'Biotech' AND funding_source = 'VC' AND funding_date > '2018-01-01';,0 Name the total number of draw for played more than 18,"CREATE TABLE table_name_47 (draw VARCHAR, played INTEGER);",SELECT COUNT(draw) FROM table_name_47 WHERE played > 18;,SELECT COUNT(draw) FROM table_name_47 WHERE played > 18;,1 What is the total number of police officers in San Francisco?,"CREATE TABLE sf_police_officers (id INT, officer_name VARCHAR(20), station VARCHAR(20)); ",SELECT COUNT(*) FROM sf_police_officers;,SELECT COUNT(*) FROM sf_police_officers WHERE station = 'San Francisco';,0 What is the total number of cases heard by alternative dispute resolution mechanisms in New York city for the year 2020?,"CREATE TABLE cases (case_id INT, case_type VARCHAR(20), location VARCHAR(20), year INT); ",SELECT COUNT(*) FROM cases WHERE case_type = 'alternative dispute resolution' AND location = 'New York' AND year = 2020;,SELECT COUNT(*) FROM cases WHERE case_type = 'Alternative dispute resolution' AND location = 'New York City' AND year = 2020;,0 Who is the director of Little Beau Porky?,"CREATE TABLE table_name_31 (director VARCHAR, title VARCHAR);","SELECT director FROM table_name_31 WHERE title = ""little beau porky"";","SELECT director FROM table_name_31 WHERE title = ""little beau porky"";",1 How many air dates are there for production code 206?,"CREATE TABLE table_11630008_4 (original_air_date VARCHAR, production_code VARCHAR);",SELECT COUNT(original_air_date) FROM table_11630008_4 WHERE production_code = 206;,SELECT COUNT(original_air_date) FROM table_11630008_4 WHERE production_code = 206;,1 Show the artists with the highest revenue in 'New York' and 'Los Angeles'.,"CREATE TABLE Concerts (ConcertID INT, Artist VARCHAR(50), City VARCHAR(50), Revenue DECIMAL(10,2)); ","SELECT Artist, MAX(Revenue) FROM Concerts WHERE City IN ('New York', 'Los Angeles') GROUP BY Artist;","SELECT Artist, SUM(Revenue) as TotalRevenue FROM Concerts WHERE City IN ('New York', 'Los Angeles') GROUP BY Artist ORDER BY TotalRevenue DESC LIMIT 1;",0 What is the total number of virtual tours engaged in by users in Asia?,"CREATE TABLE users (user_id INT, country TEXT); CREATE TABLE virtual_tours (tour_id INT, title TEXT, users_engaged INT); ",SELECT SUM(users_engaged) FROM users INNER JOIN virtual_tours ON users.country = virtual_tours.title WHERE users.country = 'Asia';,SELECT SUM(users_engaged) FROM virtual_tours INNER JOIN users ON virtual_tours.user_id = users.user_id WHERE users.country = 'Asia';,0 What is the total number of security incidents by type in the last quarter?,"CREATE TABLE SecurityIncidents(id INT, incident_type VARCHAR(50), incidents INT, incident_date DATE);","SELECT incident_type, SUM(incidents) as total_incidents FROM SecurityIncidents WHERE incident_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 3 MONTH) GROUP BY incident_type;","SELECT incident_type, SUM(incidents) as total_incidents FROM SecurityIncidents WHERE incident_date >= DATEADD(quarter, -1, GETDATE()) GROUP BY incident_type;",0 What is the total quantity of items shipped from each country to Europe?,"CREATE TABLE Shipment (id INT, source_country VARCHAR(255), destination_continent VARCHAR(255), quantity INT); ","SELECT source_country, SUM(quantity) FROM Shipment WHERE destination_continent = 'Europe' GROUP BY source_country","SELECT source_country, SUM(quantity) FROM Shipment WHERE destination_continent = 'Europe' GROUP BY source_country;",0 "What was the television that was dated December 28, 2009?","CREATE TABLE table_23718905_6 (television VARCHAR, date VARCHAR);","SELECT television FROM table_23718905_6 WHERE date = ""December 28, 2009"";","SELECT television FROM table_23718905_6 WHERE date = ""December 28, 2009"";",1 What was the minimum number of followers for users who posted content related to 'fitness' in the last week?,"CREATE SCHEMA usersdata; CREATE TABLE user_followers(user_id INT, followers INT, content_interests VARCHAR(255), post_date DATE); ",SELECT MIN(followers) FROM usersdata.user_followers WHERE post_date >= (SELECT CURDATE() - INTERVAL 7 DAY) AND content_interests LIKE '%fitness%';,"SELECT MIN(followers) FROM usersdata.user_followers WHERE content_interests = 'fitness' AND post_date >= DATEADD(week, -1, GETDATE());",0 Which sustainable hotels in South Africa have the lowest carbon footprint?,"CREATE TABLE hotel_carbon_footprint(hotel_id INT, hotel_name TEXT, country TEXT, is_sustainable BOOLEAN, carbon_footprint INT); ","SELECT hotel_name, carbon_footprint FROM hotel_carbon_footprint WHERE country = 'South Africa' AND is_sustainable = true ORDER BY carbon_footprint ASC;",SELECT hotel_name FROM hotel_carbon_footprint WHERE country = 'South Africa' AND is_sustainable = true ORDER BY carbon_footprint DESC LIMIT 1;,0 Which game was played on march 2?,"CREATE TABLE table_name_4 (game INTEGER, date VARCHAR);","SELECT AVG(game) FROM table_name_4 WHERE date = ""march 2"";","SELECT SUM(game) FROM table_name_4 WHERE date = ""march 2"";",0 Identify the daily sales and revenue for 'vegan' menu items in 'California' restaurants,"CREATE TABLE state (id INT, name VARCHAR(255)); CREATE TABLE restaurant (id INT, name VARCHAR(255), state_id INT, type VARCHAR(255)); CREATE TABLE menu (id INT, item VARCHAR(255), price DECIMAL(5,2), daily_sales INT, restaurant_id INT);","SELECT r.name, m.item, m.daily_sales, m.price * m.daily_sales as revenue FROM menu m JOIN restaurant r ON m.restaurant_id = r.id JOIN state s ON r.state_id = s.id WHERE s.name = 'California' AND r.type = 'vegan';","SELECT m.daily_sales, m.price FROM menu m JOIN restaurant r ON m.restaurant_id = r.id JOIN state s ON r.state_id = s.id WHERE r.type ='vegan' AND s.name = 'California';",0 "How many workplace safety incidents have been reported in the 'construction' sector, categorized by the type of incident and union membership?","CREATE TABLE construction_incidents (id INT, union_id INT, sector TEXT, incident_type TEXT, incident_date DATE);","SELECT incident_type, union_member as union, COUNT(*) as incidents_count FROM (SELECT incident_type, NULL as union_id, 'No' as union_member FROM construction_incidents WHERE union_id IS NULL UNION ALL SELECT incident_type, union_id, 'Yes' as union_member FROM construction_incidents WHERE union_id IS NOT NULL) t GROUP BY incident_type, union_member;","SELECT incident_type, union_id, COUNT(*) FROM construction_incidents WHERE sector = 'construction' GROUP BY incident_type, union_id;",0 Sum of cuyo selection as the opposing team?,"CREATE TABLE table_name_86 (against INTEGER, opposing_team VARCHAR);","SELECT SUM(against) FROM table_name_86 WHERE opposing_team = ""cuyo selection"";","SELECT SUM(against) FROM table_name_86 WHERE opposing_team = ""cuyo selection"";",1 Find the average safety rating of ingredients by supplier over time.,"CREATE TABLE IngredientSource (ingredient_id INT, supplier_id INT, safety_rating INT, source_date DATE); ","SELECT supplier_id, AVG(safety_rating) as avg_safety_rating, YEAR(source_date) as year FROM IngredientSource WHERE source_date >= '2022-01-01' AND source_date <= '2022-12-31' GROUP BY supplier_id, YEAR(source_date);","SELECT supplier_id, AVG(safety_rating) as avg_safety_rating FROM IngredientSource GROUP BY supplier_id;",0 Show the names of countries and the average speed of roller coasters from each country.,"CREATE TABLE roller_coaster (Speed INTEGER, Country_ID VARCHAR); CREATE TABLE country (Name VARCHAR, Country_ID VARCHAR);","SELECT T1.Name, AVG(T2.Speed) FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name;","SELECT T1.Name, AVG(T2.Speed) FROM roller_coaster AS T1 JOIN country AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name;",0 When was Göteborg the opponent with a score of 3-1?,"CREATE TABLE table_name_9 (date VARCHAR, opponents VARCHAR, score VARCHAR);","SELECT date FROM table_name_9 WHERE opponents = ""göteborg"" AND score = ""3-1"";","SELECT date FROM table_name_9 WHERE opponents = ""gateborg"" AND score = ""3-1"";",0 "What is the figure for Santo Domingo, Dominican for the world record in the clean & jerk?","CREATE TABLE table_name_79 (santo_domingo_ VARCHAR, _dominican VARCHAR, world_record VARCHAR);","SELECT santo_domingo_, _dominican FROM table_name_79 WHERE world_record = ""clean & jerk"";","SELECT santo_domingo_, _dominican FROM table_name_79 WHERE world_record = ""clean & jerk"";",1 What is the total amount of Shariah-compliant loans issued by employees in New York?,"CREATE TABLE employees (id INT, name TEXT, city TEXT, salary INT); CREATE TABLE loans (id INT, employee_id INT, amount INT, is_shariah_compliant BOOLEAN); INSERT INTO loans (id, employee_id, amount, is_shariah_compliant) VALUES (1, 1, 15000, TRUE), (2, 1, 25000, FALSE)",SELECT SUM(loans.amount) FROM loans JOIN employees ON loans.employee_id = employees.id WHERE employees.city = 'New York' AND loans.is_shariah_compliant = TRUE;,SELECT SUM(loans.amount) FROM loans JOIN employees ON loans.employee_id = employees.id WHERE employees.city = 'New York' AND loans.is_shariah_compliant = true;,0 List the top 5 decentralized applications with the highest number of daily active users?,"CREATE TABLE decentralized_apps (app_name TEXT, daily_active_users INT); ","SELECT app_name, daily_active_users FROM decentralized_apps ORDER BY daily_active_users DESC LIMIT 5;","SELECT app_name, daily_active_users FROM decentralized_apps ORDER BY daily_active_users DESC LIMIT 5;",1 What are the total grant amounts awarded to female and non-binary faculty in the College of Engineering?,"CREATE TABLE faculty (id INT, name VARCHAR(50), department VARCHAR(50), gender VARCHAR(10)); CREATE TABLE grants (id INT, faculty_id INT, amount INT); ","SELECT SUM(amount) FROM grants INNER JOIN faculty ON grants.faculty_id = faculty.id WHERE gender IN ('Female', 'Non-binary');",SELECT SUM(grants.amount) FROM grants INNER JOIN faculty ON grants.faculty_id = faculty.id WHERE faculty.gender = 'Female' AND faculty.gender = 'Non-binary' AND faculty.department = 'Engineering';,0 Find the number of male and female patients diagnosed with Measles in Chicago.,"CREATE TABLE PatientsDemographics (PatientID INT, Age INT, Gender VARCHAR(10), City VARCHAR(20), Disease VARCHAR(20)); ","SELECT Gender, COUNT(*) as PatientCount FROM PatientsDemographics WHERE City = 'Chicago' AND Disease = 'Measles' GROUP BY Gender;","SELECT COUNT(*) FROM PatientsDemographics WHERE City = 'Chicago' AND Disease = 'Measles' AND Gender IN ('Male', 'Female');",0 What was the total water consumption in the 'AgriculturalWater' table in January 2022?,"CREATE TABLE AgriculturalWater (ID INT, FarmID INT, WaterAmount FLOAT, ReadingDate DATE); ",SELECT SUM(WaterAmount) FROM AgriculturalWater WHERE ReadingDate BETWEEN '2022-01-01' AND '2022-01-31';,SELECT SUM(WaterAmount) FROM AgriculturalWater WHERE ReadingDate BETWEEN '2022-01-01' AND '2022-01-31';,1 Who did the Jets play in their post-week 15 game?,"CREATE TABLE table_name_2 (opponent VARCHAR, week INTEGER);",SELECT opponent FROM table_name_2 WHERE week > 15;,SELECT opponent FROM table_name_2 WHERE week > 15;,1 Add Mental Health Parity scores for each Health Worker,"CREATE TABLE CulturalCompetency (ID INT PRIMARY KEY, HealthWorkerName VARCHAR(100), CulturalCompetencyScore INT); CREATE TABLE MentalHealthParity (ID INT PRIMARY KEY, HealthWorkerName VARCHAR(100), MentalHealthParityScore INT);","ALTER TABLE MentalHealthParity ADD HealthWorkerName VARCHAR(100); INSERT INTO MentalHealthParity (ID, HealthWorkerName, MentalHealthParityScore) VALUES (1, 'John Doe', 75), (2, 'Jane Smith', 80), (3, 'Alice Johnson', 85);","INSERT INTO MentalHealthParity (ID, HealthWorkerName, MentalHealthParityScore) VALUES (1, 'Mental Health Parity', 'CulturalCompetency');",0 How many schools were built in each country?,"CREATE TABLE SchoolConstruction (Country VARCHAR(20), NumSchools INT); ","SELECT Country, SUM(NumSchools) as TotalSchools FROM SchoolConstruction GROUP BY Country;","SELECT Country, SUM(NumSchools) FROM SchoolConstruction GROUP BY Country;",0 Delete the TalentAcquisition table,"CREATE TABLE TalentAcquisition (ApplicantID INT PRIMARY KEY, JobTitle VARCHAR(30), Department VARCHAR(20), ApplicationDate DATE);",DROP TABLE TalentAcquisition;,DELETE FROM TalentAcquisition;,0 Maximum number of smart city projects in each country?,"CREATE TABLE smart_city_projects (id INT, name TEXT, country TEXT); CREATE TABLE countries (id INT, name TEXT);","SELECT countries.name, MAX(smart_city_projects.id) FROM countries LEFT JOIN smart_city_projects ON countries.id = smart_city_projects.country GROUP BY countries.name;","SELECT c.name, COUNT(s.id) as num_projects FROM smart_city_projects s JOIN countries c ON s.country = c.name GROUP BY c.name;",0 What is the average severity of cybersecurity incidents related to 'Ransomware' that occurred on '2022-05-01'?,"CREATE TABLE CyberSecurity (id INT, incident VARCHAR(255), date DATE, severity INT); ",SELECT AVG(severity) as avg_severity FROM CyberSecurity WHERE incident = 'Ransomware' AND date = '2022-05-01';,SELECT AVG(severity) FROM CyberSecurity WHERE incident = 'Ransomware' AND date = '2022-05-01';,0 What is the attendance of the match with rosso kumamoto as the away team?,"CREATE TABLE table_name_82 (attendance VARCHAR, away_team VARCHAR);","SELECT attendance FROM table_name_82 WHERE away_team = ""rosso kumamoto"";","SELECT attendance FROM table_name_82 WHERE away_team = ""rosso kumamoto"";",1 Which states have the highest and lowest vaccination rates for measles?,"CREATE TABLE vaccinations (id INT, state VARCHAR(2), vaccine VARCHAR(50), rate DECIMAL(5,2)); ","SELECT state, rate FROM vaccinations WHERE vaccine = 'Measles' ORDER BY rate DESC, state ASC LIMIT 1; SELECT state, rate FROM vaccinations WHERE vaccine = 'Measles' ORDER BY rate ASC, state ASC LIMIT 1;","SELECT state, MAX(rate) as max_rate, MIN(rate) as min_rate FROM vaccinations WHERE vaccine = 'Measles' GROUP BY state;",0 Name the others for cons of 21% and lead of 24%,"CREATE TABLE table_name_60 (others VARCHAR, cons VARCHAR, lead VARCHAR);","SELECT others FROM table_name_60 WHERE cons = ""21%"" AND lead = ""24%"";","SELECT others FROM table_name_60 WHERE cons = ""21%"" AND lead = ""24%"";",1 What was the result in the election in the Kentucky 8 district? ,"CREATE TABLE table_2668367_7 (result VARCHAR, district VARCHAR);","SELECT result FROM table_2668367_7 WHERE district = ""Kentucky 8"";","SELECT result FROM table_2668367_7 WHERE district = ""Kentucky 8"";",1 Which date has a round more than 9?,"CREATE TABLE table_name_85 (date VARCHAR, round INTEGER);",SELECT date FROM table_name_85 WHERE round > 9;,SELECT date FROM table_name_85 WHERE round > 9;,1 Which mean rank had a silver number smaller than 0?,"CREATE TABLE table_name_60 (rank INTEGER, silver INTEGER);",SELECT AVG(rank) FROM table_name_60 WHERE silver < 0;,SELECT AVG(rank) FROM table_name_60 WHERE silver 0;,0 How many cybersecurity incidents were reported in the North America region in 2020 and 2021?,"CREATE TABLE CybersecurityIncidents (region VARCHAR(255), year INT, incidents INT); ",SELECT SUM(incidents) FROM CybersecurityIncidents WHERE region = 'North America' AND (year = 2020 OR year = 2021);,"SELECT SUM(incidents) FROM CybersecurityIncidents WHERE region = 'North America' AND year IN (2020, 2021);",0 "How many Picks have a Position of defensive end, and an Overall smaller than 33?","CREATE TABLE table_name_22 (pick__number VARCHAR, position VARCHAR, overall VARCHAR);","SELECT COUNT(pick__number) FROM table_name_22 WHERE position = ""defensive end"" AND overall < 33;","SELECT COUNT(pick__number) FROM table_name_22 WHERE position = ""defensive end"" AND overall 33;",0 What are the top 5 countries with the most military technology patents in the last 5 years?,"CREATE TABLE military_patents (id INT, patent_date DATE, country VARCHAR(255)); ","SELECT country, COUNT(*) AS num_patents FROM military_patents WHERE patent_date >= DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR) GROUP BY country ORDER BY num_patents DESC LIMIT 5;","SELECT country, COUNT(*) as patent_count FROM military_patents WHERE patent_date >= DATEADD(year, -5, GETDATE()) GROUP BY country ORDER BY patent_count DESC LIMIT 5;",0 What is the name and launch date of the satellites launched by SpaceX?,"CREATE TABLE satellites (id INT, name TEXT, launch_date DATE, manufacturer TEXT); ","SELECT name, launch_date FROM satellites WHERE manufacturer = 'SpaceX';","SELECT name, launch_date FROM satellites WHERE manufacturer = 'SpaceX';",1 What is the total number of security incidents by each system category?,"CREATE TABLE security_incidents_2 (id INT, severity VARCHAR(20), category VARCHAR(20)); ","SELECT category, COUNT(*) as total_incidents FROM security_incidents_2 GROUP BY category;","SELECT category, COUNT(*) FROM security_incidents_2 GROUP BY category;",0 What is the average budget for sustainable energy projects in Africa?,"CREATE TABLE projects (id INT, region VARCHAR(50), name VARCHAR(50), budget INT); ",SELECT AVG(budget) FROM projects WHERE region = 'Africa' AND name LIKE '%sustainable energy%';,SELECT AVG(budget) FROM projects WHERE region = 'Africa';,0 What is the earliest boarding time and the corresponding passenger_id for each route?,"CREATE TABLE passenger (passenger_id INT, route_id INT, boarding_time TIMESTAMP, alighting_time TIMESTAMP); ","SELECT route_id, MIN(passenger_id) AS earliest_passenger_id, MIN(boarding_time) AS earliest_boarding_time FROM passenger GROUP BY route_id;","SELECT route_id, MIN(boarding_time) as earliest_boarding_time, alighting_time FROM passenger GROUP BY route_id;",0 Show the names of climbers and the heights of mountains they climb.,"CREATE TABLE mountain (Height VARCHAR, Mountain_ID VARCHAR); CREATE TABLE climber (Name VARCHAR, Mountain_ID VARCHAR);","SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID;","SELECT T1.Name, T1.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID;",0 What is the percentage of cosmetic products that are certified cruelty-free in the Asian market?,"CREATE TABLE products (product_id INT, product_name VARCHAR(255), region VARCHAR(50), certified_cruelty_free BOOLEAN); ",SELECT 100.0 * SUM(certified_cruelty_free) / COUNT(*) AS percentage_cruelty_free FROM products WHERE region = 'Asia';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM products WHERE region = 'Asia')) AS percentage FROM products WHERE certified_cruelty_free = true AND region = 'Asia';,0 "How many volunteers are needed for each program in the upcoming quarter, broken down by their age group?","CREATE TABLE volunteers (id INT, program_id INT, total_volunteers INT, quarter INT, year INT, age INT); ","SELECT program_id, AVG(age), SUM(total_volunteers) FROM volunteers WHERE quarter = (SELECT quarter FROM quarters WHERE quarter_name = 'upcoming_quarter') GROUP BY program_id, FLOOR(age/10)*10;","SELECT program_id, age_group, COUNT(*) as total_volunteers FROM volunteers WHERE quarter = 'quarter' AND year = 2021 GROUP BY program_id, age_group;",0 What happened on 2009-03-14?,"CREATE TABLE table_name_25 (circumstances VARCHAR, date VARCHAR);","SELECT circumstances FROM table_name_25 WHERE date = ""2009-03-14"";","SELECT circumstances FROM table_name_25 WHERE date = ""2009-03-14"";",1 What was the Attendance in Week 2?,"CREATE TABLE table_name_25 (attendance VARCHAR, week VARCHAR);",SELECT attendance FROM table_name_25 WHERE week = 2;,SELECT attendance FROM table_name_25 WHERE week = 2;,1 "What record has pittsburgh as the visitor, and November 23 as the date?","CREATE TABLE table_name_45 (record VARCHAR, visitor VARCHAR, date VARCHAR);","SELECT record FROM table_name_45 WHERE visitor = ""pittsburgh"" AND date = ""november 23"";","SELECT record FROM table_name_45 WHERE visitor = ""pittsburgh"" AND date = ""november 23"";",1 Where is the location of a team with a 3-2 record?,"CREATE TABLE table_name_96 (location VARCHAR, record VARCHAR);","SELECT location FROM table_name_96 WHERE record = ""3-2"";","SELECT location FROM table_name_96 WHERE record = ""3-2"";",1 How many properties in each neighborhood have a sustainable urbanism score greater than 80?,"CREATE TABLE Property (id INT, neighborhood VARCHAR(20), sustainable_score INT); ","SELECT Property.neighborhood, COUNT(Property.id) FROM Property WHERE Property.sustainable_score > 80 GROUP BY Property.neighborhood;","SELECT neighborhood, COUNT(*) FROM Property WHERE sustainable_score > 80 GROUP BY neighborhood;",0 How many safety protocol violations were recorded in each department in the safety_violations table?,"CREATE TABLE safety_violations (department VARCHAR(255), violations INTEGER);","SELECT department, COUNT(violations) FROM safety_violations GROUP BY department;","SELECT department, SUM(violations) FROM safety_violations GROUP BY department;",0 "Who was the opponent before week 12, on November 11, 1990?","CREATE TABLE table_name_63 (opponent VARCHAR, week VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_63 WHERE week < 12 AND date = ""november 11, 1990"";","SELECT opponent FROM table_name_63 WHERE week 12 AND date = ""november 11, 1990"";",0 What is the average age of all schools and their current enrollment levels in the education division?,"CREATE TABLE schools (id INT, name VARCHAR(50), division VARCHAR(50), age INT, enrollment FLOAT); ","SELECT AVG(age), enrollment FROM schools WHERE division = 'Education' GROUP BY enrollment;","SELECT AVG(age), AVG(enrollment) FROM schools WHERE division = 'Education';",0 "Attendance of 23,150 had what opponent?","CREATE TABLE table_name_49 (opponent VARCHAR, attendance VARCHAR);","SELECT opponent FROM table_name_49 WHERE attendance = ""23,150"";","SELECT opponent FROM table_name_49 WHERE attendance = ""23,150"";",1 What is the home team score when played at mcg?,"CREATE TABLE table_name_24 (home_team VARCHAR, venue VARCHAR);","SELECT home_team AS score FROM table_name_24 WHERE venue = ""mcg"";","SELECT home_team AS score FROM table_name_24 WHERE venue = ""mcg"";",1 How many members have a 'Premium' membership type for each 'Gender' category?,"CREATE TABLE Members (MemberID INT, Gender VARCHAR(10), MembershipType VARCHAR(20)); ","SELECT Gender, COUNT(*) FROM Members WHERE MembershipType = 'Premium' GROUP BY Gender;","SELECT Gender, COUNT(*) FROM Members WHERE MembershipType = 'Premium' GROUP BY Gender;",1 What day was there a set 1 of 25-18?,"CREATE TABLE table_name_23 (date VARCHAR, set_1 VARCHAR);","SELECT date FROM table_name_23 WHERE set_1 = ""25-18"";","SELECT date FROM table_name_23 WHERE set_1 = ""25-18"";",1 What is the median donation amount for donors from Africa?,"CREATE TABLE Countries (CountryID INT PRIMARY KEY, CountryName TEXT, Continent TEXT); ","SELECT AVG(AmountDonated) FROM (SELECT AmountDonated FROM Donors INNER JOIN Donors_Countries ON Donors.DonorID = Donors_Countries.DonorID WHERE Donors_Countries.CountryName = 'Nigeria' ORDER BY AmountDonated) AS DonorAmounts WHERE (ROW_NUMBER() OVER (ORDER BY AmountDonated) IN ((COUNT(*) + 1) / 2, (COUNT(*) + 2) / 2));",SELECT AVG(DonationAmount) FROM Donations JOIN Countries ON Donations.CountryID = Countries.CountryID WHERE Countries.Continent = 'Africa';,0 What are the top 3 most visited destinations per country?,"CREATE TABLE if not exists destinations (destination_id int, destination_name varchar(50), region_id int); CREATE TABLE if not exists visitor_stats (visitor_id int, destination_id int, visit_date date); ","SELECT d.region_id, d.destination_name, COUNT(vs.destination_id) as num_visits, RANK() OVER (PARTITION BY d.region_id ORDER BY COUNT(vs.destination_id) DESC) as visit_rank FROM destinations d LEFT JOIN visitor_stats vs ON d.destination_id = vs.destination_id GROUP BY d.region_id, d.destination_name ORDER BY d.region_id, visit_rank;","SELECT d.destination_name, COUNT(vs.visitor_id) as num_visitors FROM destinations d JOIN visitor_stats vs ON d.destination_id = vs.destination_id GROUP BY d.destination_name ORDER BY num_visitors DESC LIMIT 3;",0 "What is the number of network failures for each tower, grouped by month, and joined with the network investments table to show the total investment for each tower?","CREATE TABLE network_failures (id INT PRIMARY KEY, tower_id INT, failure_type VARCHAR(255), failure_date DATE); CREATE TABLE network_investments (id INT PRIMARY KEY, tower_id INT, investment_amount FLOAT, investment_date DATE);","SELECT MONTH(f.failure_date) as month, i.tower_id, COUNT(f.id) as num_failures, SUM(i.investment_amount) as total_investment FROM network_failures f INNER JOIN network_investments i ON f.tower_id = i.tower_id GROUP BY month, i.tower_id;","SELECT tower_id, DATE_FORMAT(failure_date, '%Y-%m') as month, COUNT(*) as num_failures, SUM(investment_amount) as total_investment FROM network_failures INNER JOIN network_investments ON network_failures.trunk_id = network_investments.trunk_id GROUP BY tower_id, DATE_FORMAT(failure_date, '%Y-%m')) as month, SUM(investment_amount) as total_investment FROM network_investments GROUP BY tower_id, month;",0 What is the total revenue from concert ticket sales for artists from Africa?,"CREATE TABLE TicketSales (id INT, artist VARCHAR(255), city VARCHAR(255), price DECIMAL(5,2)); ",SELECT SUM(price) FROM TicketSales WHERE artist IN (SELECT artist FROM Artists WHERE country = 'Africa');,SELECT SUM(price) FROM TicketSales WHERE artist LIKE '%Africa%';,0 How many viewers did the 'Black Panther' movie have in the US?,"CREATE TABLE movies (id INT, title VARCHAR(255), viewers INT, country VARCHAR(255)); ",SELECT viewers FROM movies WHERE title = 'Black Panther' AND country = 'United States';,SELECT viewers FROM movies WHERE title = 'Black Panther' AND country = 'USA';,0 Which Colliery has a Death toll of 7?,"CREATE TABLE table_name_76 (colliery VARCHAR, death_toll VARCHAR);",SELECT colliery FROM table_name_76 WHERE death_toll = 7;,SELECT colliery FROM table_name_76 WHERE death_toll = 7;,1 Percentage of cultural competency training completed by community health workers by race?,"CREATE TABLE CulturalCompetencyTraining (ID INT, CommunityHealthWorkerID INT, Race VARCHAR(50), TrainingPercentage DECIMAL(5,2)); ","SELECT Race, AVG(TrainingPercentage) as AvgTrainingPercentage FROM CulturalCompetencyTraining GROUP BY Race;","SELECT Race, TrainingPercentage FROM CulturalCompetencyTraining GROUP BY Race;",0 List all astronauts who have been in space more than once and their missions.,"CREATE TABLE astronauts (id INT, name VARCHAR(50), nationality VARCHAR(50)); CREATE TABLE space_missions (id INT, mission_name VARCHAR(50), launch_date DATE, return_date DATE, astronaut_id INT);","SELECT astronauts.name, space_missions.mission_name FROM astronauts INNER JOIN space_missions ON astronauts.id = space_missions.astronaut_id GROUP BY astronauts.name HAVING COUNT(*) > 1;","SELECT astronauts.name, space_missions.mission_name FROM astronauts INNER JOIN space_missions ON astronauts.id = space_missions.astronaut_id GROUP BY astronauts.name HAVING COUNT(DISTINCT space_missions.launch_date) > 1;",0 "Who was the opponent on September 13, 1992?","CREATE TABLE table_name_10 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_10 WHERE date = ""september 13, 1992"";","SELECT opponent FROM table_name_10 WHERE date = ""september 13, 1992"";",1 what is the place when the score is 68-70-68=206?,"CREATE TABLE table_name_3 (place VARCHAR, score VARCHAR);",SELECT place FROM table_name_3 WHERE score = 68 - 70 - 68 = 206;,SELECT place FROM table_name_3 WHERE score = 68 - 70 - 68 = 206;,1 Who are the bottom 2 brands in terms of sustainable material usage?,"CREATE TABLE Brands (brand_id INT, brand_name VARCHAR(50)); CREATE TABLE Brand_Materials (brand_id INT, material_id INT, quantity INT); CREATE TABLE Materials (material_id INT, material_name VARCHAR(50), is_sustainable BOOLEAN); ","SELECT brand_name, SUM(quantity) as total_quantity FROM Brands b INNER JOIN Brand_Materials bm ON b.brand_id = bm.brand_id INNER JOIN Materials m ON bm.material_id = m.material_id WHERE m.is_sustainable = false GROUP BY brand_name ORDER BY total_quantity ASC LIMIT 2;","SELECT b.brand_name, SUM(bm.quantity) as total_quantity FROM Brands b JOIN Brand_Materials bm ON b.brand_id = bm.brand_id JOIN Materials m ON bm.material_id = m.material_id WHERE m.is_sustainable = TRUE GROUP BY b.brand_name ORDER BY total_quantity DESC LIMIT 2;",0 Delete all records of workplaces in New York with safety violations.,"CREATE TABLE workplaces (id INT, name TEXT, state TEXT, safety_violation BOOLEAN); ",DELETE FROM workplaces WHERE state = 'New York' AND safety_violation = true;,DELETE FROM workplaces WHERE state = 'New York' AND safety_violation = TRUE;,0 Show the 3-month moving average of production for each site.,"CREATE TABLE Site_Production (Site_ID INT, Production_Date DATE, Production_Quantity INT); ","SELECT Site_ID, AVG(Production_Quantity) OVER (PARTITION BY Site_ID ORDER BY Production_Date ROWS BETWEEN 2 PRECEDING AND CURRENT ROW) as Three_Month_Moving_Avg FROM Site_Production;","SELECT Site_ID, AVG(Production_Quantity) as Moving_Average FROM Site_Production GROUP BY Site_ID;",0 What is the average biomass of fish in the Atlantic ocean per sustainable seafood category?,"CREATE TABLE fish_data (id INT, species TEXT, ocean TEXT, biomass FLOAT, sustainable_category TEXT); ","SELECT sustainable_category, AVG(biomass) FROM fish_data WHERE ocean = 'Atlantic' AND sustainable_category IS NOT NULL GROUP BY sustainable_category;","SELECT sustainable_category, AVG(biomass) FROM fish_data WHERE ocean = 'Atlantic' GROUP BY sustainable_category;",0 Delete satellites with missing International Designators from the satellites table,"CREATE TABLE satellites (id INT, name VARCHAR(255), international_designator VARCHAR(20));",DELETE FROM satellites WHERE international_designator IS NULL;,DELETE FROM satellites WHERE international_designator IS NULL;,1 What is the max speed of the unit with an 8+4 quantity built before 1971?,"CREATE TABLE table_name_22 (max_speed__km_h_ INTEGER, quantity_built VARCHAR, year_built VARCHAR);","SELECT SUM(max_speed__km_h_) FROM table_name_22 WHERE quantity_built = ""8+4"" AND year_built < 1971;","SELECT MAX(max_speed__km_h_) FROM table_name_22 WHERE quantity_built = ""8+4"" AND year_built 1971;",0 "Outcome of 13, and a Year of 2007 happened in what venue?","CREATE TABLE table_name_51 (venue VARCHAR, outcome VARCHAR, year VARCHAR);","SELECT venue FROM table_name_51 WHERE outcome = ""13"" AND year = ""2007"";","SELECT venue FROM table_name_51 WHERE outcome = ""13"" AND year = ""2007"";",1 What is the percentage of renewable energy in the total energy production in Brazil in 2020?,"CREATE TABLE brazil_energy_production (year INT, renewable_energy_percentage DECIMAL(4,2)); ",SELECT renewable_energy_percentage FROM brazil_energy_production WHERE year = 2020;,SELECT renewable_energy_percentage FROM brazil_energy_production WHERE year = 2020;,1 What are all types where registration is HB-OPU?,"CREATE TABLE table_22180353_1 (type VARCHAR, registration VARCHAR);","SELECT type FROM table_22180353_1 WHERE registration = ""HB-OPU"";","SELECT type FROM table_22180353_1 WHERE registration = ""HB-OPU"";",1 What is the sum of the round with the defenceman?,"CREATE TABLE table_name_41 (round INTEGER, position VARCHAR);","SELECT SUM(round) FROM table_name_41 WHERE position = ""defenceman"";","SELECT SUM(round) FROM table_name_41 WHERE position = ""defendant"";",0 Where was the tourney when UCLA won the regular season?,"CREATE TABLE table_21269441_4 (tournament_venue__city_ VARCHAR, regular_season_winner VARCHAR);","SELECT tournament_venue__city_ FROM table_21269441_4 WHERE regular_season_winner = ""UCLA"";","SELECT tournament_venue__city_ FROM table_21269441_4 WHERE regular_season_winner = ""UCLA"";",1 "What is the total cargo capacity of vessels from Indonesia, registered in 2021?","CREATE TABLE Vessels (ID VARCHAR(10), Name VARCHAR(20), Type VARCHAR(20), Cargo_Capacity FLOAT, Registered_Country VARCHAR(20), Registration_Year INT); ",SELECT SUM(Cargo_Capacity) FROM Vessels WHERE Registered_Country = 'Indonesia' AND Registration_Year = 2021;,SELECT SUM(Cargo_Capacity) FROM Vessels WHERE Registered_Country = 'Indonesia' AND Registration_Year = 2021;,1 In what week was the away team Auckland?,"CREATE TABLE table_name_92 (week VARCHAR, away_team VARCHAR);","SELECT week FROM table_name_92 WHERE away_team = ""auckland"";","SELECT week FROM table_name_92 WHERE away_team = ""auckland"";",1 What stage did team Carrera Jeans-Tassoni have when Mario Cipollini won and Claudio Chiappucci had the points?,"CREATE TABLE table_name_78 (stage VARCHAR, points_classification VARCHAR, trofeo_fast_team VARCHAR, winner VARCHAR);","SELECT stage FROM table_name_78 WHERE trofeo_fast_team = ""carrera jeans-tassoni"" AND winner = ""mario cipollini"" AND points_classification = ""claudio chiappucci"";","SELECT stage FROM table_name_78 WHERE trofeo_fast_team = ""carrera jeans-tassoni"" AND winner = ""mario cipolini"" AND points_classification = ""claudio chiappucci"";",0 What was the average number of streams per user for a Latin artist's songs in 2020?,"CREATE TABLE Latin_Streaming (user INT, artist VARCHAR(50), year INT, streams INT); ","SELECT artist, AVG(streams) FROM Latin_Streaming WHERE year = 2020 AND artist IN ('Shakira', 'Bad Bunny') GROUP BY artist;",SELECT AVG(streams) FROM Latin_Streaming WHERE artist LIKE '%Latin%' AND year = 2020;,0 "Calculate the average CO2 emissions per smart transportation type in smart cities, using a SQL query with a window function.","CREATE TABLE smart_cities (city_id INT, city_name VARCHAR(50), country VARCHAR(50), population INT, smart_tech_adoption_date DATE);CREATE TABLE green_transportation (transportation_id INT, city_id INT, type VARCHAR(50), capacity INT, co2_emissions FLOAT, adoption_date DATE);CREATE VIEW smart_cities_transportation AS SELECT smart_cities.city_name, green_transportation.type, AVG(green_transportation.co2_emissions) OVER (PARTITION BY green_transportation.type) AS avg_emissions FROM smart_cities JOIN green_transportation ON smart_cities.city_id = green_transportation.city_id;","SELECT city_name, type, avg_emissions FROM smart_cities_transportation;","SELECT sc.city_name, sc.city_name, sc.city_name, sc.city_name, sc.city_name, sc.city_name, sc.city_name, AVG(sc.co2_emissions) as avg_emissions FROM smart_cities_transportation sc JOIN green_transportation gt ON sc.city_id = gt.city_id GROUP BY sc.city_name, sc.city_name, sc.city_name, sc.city_name;",0 "Which Season has a Rank smaller than 4, and a Club of barcelona, and less than 115 goals?","CREATE TABLE table_name_61 (season VARCHAR, goals VARCHAR, rank VARCHAR, club VARCHAR);","SELECT season FROM table_name_61 WHERE rank < 4 AND club = ""barcelona"" AND goals < 115;","SELECT season FROM table_name_61 WHERE rank 4 AND club = ""barcelona"" AND goals 115;",0 List every album ordered by album title in ascending order.,CREATE TABLE albums (title VARCHAR);,SELECT title FROM albums ORDER BY title;,SELECT title FROM albums ORDER BY title ASC;,0 "Identify habitats with more than 30 animals and the number of species in each, excluding those habitats that are not protected","CREATE TABLE habitats (id INT, name VARCHAR(255), is_protected BOOLEAN);CREATE TABLE animals (id INT, species_id INT, habitat_id INT);CREATE TABLE species (id INT, name VARCHAR(255)); ","SELECT h.name AS habitat_name, COUNT(DISTINCT a.species_id) AS species_count FROM animals a INNER JOIN habitats h ON a.habitat_id = h.id WHERE h.is_protected = TRUE GROUP BY h.name HAVING COUNT(a.id) > 30;","SELECT h.name, COUNT(DISTINCT a.species_id) FROM habitats h INNER JOIN animals a ON h.id = a.habitat_id INNER JOIN species s ON a.species_id = s.id WHERE h.is_protected = true GROUP BY h.name HAVING COUNT(DISTINCT a.species_id) > 30;",0 "Insert a new record for a tennis match with match_id 6, match_name 'French Open Final', and goals 3.","CREATE TABLE matches (match_id INT, match_name VARCHAR(50), goals INT);","INSERT INTO matches (match_id, match_name, goals) VALUES (6, 'French Open Final', 3);","INSERT INTO matches (match_id, match_name, goals) VALUES (6, 'French Open Final', 3);",1 Show the environmental impact score for site X.,"CREATE SCHEMA if not exists mining;CREATE TABLE mining.impact (id INT, site STRING, ias_score INT);",SELECT ias_score FROM mining.impact WHERE site = 'site X';,SELECT ias_score FROM mining.impact WHERE site = 'Site X';,0 How many heritage sites are located in each region?,"CREATE TABLE Regions (RegionID INT, RegionName VARCHAR(50)); CREATE TABLE HeritageSites (SiteID INT, SiteName VARCHAR(50), RegionID INT); ","SELECT R.RegionName, COUNT(HS.SiteID) AS TotalSites FROM Regions R JOIN HeritageSites HS ON R.RegionID = HS.RegionID GROUP BY R.RegionName;","SELECT r.RegionName, COUNT(hs.SiteID) as SiteCount FROM Regions r JOIN HeritageSites hs ON r.RegionID = hs.RegionID GROUP BY r.RegionName;",0 What is the minimum capacity of any tank located in the Southern region?,"CREATE TABLE Tanks (name VARCHAR(20), capacity INT, location VARCHAR(20)); ",SELECT MIN(capacity) FROM Tanks WHERE location = 'Southern';,SELECT MIN(capacity) FROM Tanks WHERE location = 'Southern';,1 What is Lisladeen poor law union?,"CREATE TABLE table_30120566_1 (poor_law_union VARCHAR, townland VARCHAR);","SELECT poor_law_union FROM table_30120566_1 WHERE townland = ""Lisladeen"";","SELECT poor_law_union FROM table_30120566_1 WHERE townland = ""Lisladeen"";",1 When did the Broncos play the Miami Dolphins?,"CREATE TABLE table_17294353_1 (date VARCHAR, opponent VARCHAR);","SELECT date FROM table_17294353_1 WHERE opponent = ""Miami Dolphins"";","SELECT date FROM table_17294353_1 WHERE opponent = ""Miami Dolphins"";",1 Display the names and locations of all bridges in Texas,"CREATE TABLE Bridges (id INT, name VARCHAR(50), location VARCHAR(50)); ","SELECT name, location FROM Bridges WHERE state = 'Texas';","SELECT name, location FROM Bridges WHERE location = 'Texas';",0 What is the 2009 value for the 2003 grand slam tournaments?,CREATE TABLE table_name_96 (Id VARCHAR);,"SELECT 2009 FROM table_name_96 WHERE 2003 = ""grand slam tournaments"";","SELECT 2009 FROM table_name_96 WHERE 2003 = ""grand slam tournaments"";",1 "What is the average renewable energy capacity (in MW) for projects that were completed in the first half of 2019, grouped by project type?","CREATE TABLE renewable_energy_projects_capacity (id INT, project_type VARCHAR(255), project_date DATE, capacity INT);","SELECT project_type, AVG(capacity / 1000000) FROM renewable_energy_projects_capacity WHERE project_date BETWEEN '2019-01-01' AND '2019-06-30' GROUP BY project_type;","SELECT project_type, AVG(capacity) FROM renewable_energy_projects_capacity WHERE project_date BETWEEN '2019-01-01' AND '2019-12-31' GROUP BY project_type;",0 Which home has a Date of november 7?,"CREATE TABLE table_name_16 (home VARCHAR, date VARCHAR);","SELECT home FROM table_name_16 WHERE date = ""november 7"";","SELECT home FROM table_name_16 WHERE date = ""november 7"";",1 Show all climate adaptation projects from 'Asia' in the 'adaptation_projects' table,"CREATE TABLE adaptation_projects (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), description TEXT, start_date DATE, end_date DATE, budget FLOAT); ",SELECT * FROM adaptation_projects WHERE location LIKE 'Asia%';,SELECT * FROM adaptation_projects WHERE location = 'Asia';,0 What season was Freiburger FC the RL Süd (2nd) team?,"CREATE TABLE table_20217456_7 (season VARCHAR, rl_süd__2nd_ VARCHAR);","SELECT season FROM table_20217456_7 WHERE rl_süd__2nd_ = ""Freiburger FC"";","SELECT season FROM table_20217456_7 WHERE rl_süd__2nd_ = ""Freiburger FC"";",1 "Which Goal Difference has Drawn larger than 10, and a Team of lancaster city?","CREATE TABLE table_name_21 (goal_difference VARCHAR, drawn VARCHAR, team VARCHAR);","SELECT goal_difference FROM table_name_21 WHERE drawn > 10 AND team = ""lancaster city"";","SELECT goal_difference FROM table_name_21 WHERE drawn > 10 AND team = ""lancaster city"";",1 what's the district with incumbent being richard j. welch,"CREATE TABLE table_1342359_5 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_1342359_5 WHERE incumbent = ""Richard J. Welch"";","SELECT district FROM table_1342359_5 WHERE incumbent = ""Richard J. Welch"";",1 "During footscray's home match, who was the away team?","CREATE TABLE table_name_33 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team AS score FROM table_name_33 WHERE home_team = ""footscray"";","SELECT away_team FROM table_name_33 WHERE home_team = ""footscray"";",0 List the names of healthcare providers offering Pediatric services in Australia.,"CREATE TABLE AusProviderData (ProviderID INT, ProviderName VARCHAR(50), Specialty VARCHAR(30), Country VARCHAR(20)); ",SELECT ProviderName FROM AusProviderData WHERE Specialty = 'Pediatric' AND Country = 'Australia';,SELECT ProviderName FROM AusProviderData WHERE Specialty = 'Pediatric' AND Country = 'Australia';,1 What was the Obama% when McCain% was 61.2%?,"CREATE TABLE table_20750731_1 (obama_percentage VARCHAR, mccain_percentage VARCHAR);","SELECT obama_percentage FROM table_20750731_1 WHERE mccain_percentage = ""61.2%"";","SELECT obama_percentage FROM table_20750731_1 WHERE mccain_percentage = ""61.2%"";",1 Delete records of subscribers with speed below 50Mbps in California.,"CREATE TABLE broadband_subscribers (subscriber_id INT, speed FLOAT, state VARCHAR(255)); ",DELETE FROM broadband_subscribers WHERE speed < 50 AND state = 'California';,DELETE FROM broadband_subscribers WHERE speed 50 AND state = 'California';,0 "What is the title of the episode written by denis leary, peter tolan and evan reilly?","CREATE TABLE table_10610087_3 (title VARCHAR, written_by VARCHAR);","SELECT title FROM table_10610087_3 WHERE written_by = ""Denis Leary, Peter Tolan and Evan Reilly"";","SELECT title FROM table_10610087_3 WHERE written_by = ""Denis Leary, Peter Tolan and Evan Reilly"";",1 What was the result of week 13?,"CREATE TABLE table_name_38 (result VARCHAR, week VARCHAR);",SELECT result FROM table_name_38 WHERE week = 13;,SELECT result FROM table_name_38 WHERE week = 13;,1 Which Date has a Record of 58–10?,"CREATE TABLE table_name_78 (date VARCHAR, record VARCHAR);","SELECT date FROM table_name_78 WHERE record = ""58–10"";","SELECT date FROM table_name_78 WHERE record = ""58–10"";",1 What is the minimum fairness score for creative AI applications in the 'creative_ai' table?,"CREATE TABLE creative_ai (app_id INT, app_name TEXT, fairness_score FLOAT);",SELECT MIN(fairness_score) FROM creative_ai;,SELECT MIN(fairness_score) FROM creative_ai;,1 Update the menu_items table to set the price of the item with item_id 123 to $15.99,"CREATE TABLE menu_items (menu_id INT, item_id INT, name VARCHAR(50), category VARCHAR(50), description TEXT, price DECIMAL(5,2));",UPDATE menu_items SET price = 15.99 WHERE item_id = 123;,UPDATE menu_items SET price = 15.99 WHERE item_id = 123;,1 "What is the total number of research projects in the 'arctic_research' table, with a budget greater than $100,000?","CREATE TABLE arctic_research (project_name VARCHAR(100), budget DECIMAL(10,2));",SELECT COUNT(*) FROM arctic_research WHERE budget > 100000;,SELECT COUNT(*) FROM arctic_research WHERE budget > 100000;,1 Find the maximum and minimum temperature for each crop type in the past month.,"CREATE TABLE crop_temperature (crop_type VARCHAR(255), field_id INT, temperature DECIMAL(5,2), record_date DATE); ","SELECT c.crop_type, MAX(temperature) AS max_temperature, MIN(temperature) AS min_temperature FROM crop_temperature c JOIN (SELECT CURDATE() - INTERVAL 30 DAY AS start_date) d ON c.record_date >= d.start_date GROUP BY c.crop_type;","SELECT crop_type, MAX(temperature) as max_temperature, MIN(temperature) as min_temperature FROM crop_temperature WHERE record_date >= DATEADD(month, -1, GETDATE()) GROUP BY crop_type;",0 How many champions were there when the first driver was hiroki yoshimoto ( 2005 )?,"CREATE TABLE table_13416000_3 (champions VARCHAR, first_driver_s_ VARCHAR);","SELECT champions FROM table_13416000_3 WHERE first_driver_s_ = ""Hiroki Yoshimoto ( 2005 )"";","SELECT COUNT(champions) FROM table_13416000_3 WHERE first_driver_s_ = ""Hiroki Yoshimoto ( 2005 )"";",0 Which sports teams had a win rate greater than 60% and an average fan age above 35?,"CREATE TABLE SportsTeamPerformance (id INT, team_name VARCHAR(255), win_rate DECIMAL(5,2), avg_fan_age INT); CREATE TABLE FanDemographics (id INT, name VARCHAR(255), gender VARCHAR(50), team_name VARCHAR(255), fan_age INT); ",SELECT team_name FROM SportsTeamPerformance WHERE win_rate > 0.6 AND (SELECT AVG(fan_age) FROM FanDemographics WHERE team_name = SportsTeamPerformance.team_name) > 35;,"SELECT SportsTeamPerformance.team_name, SportsTeamPerformance.win_rate, SportsTeamPerformance.avg_fan_age FROM SportsTeamPerformance INNER JOIN FanDemographics ON SportsTeamPerformance.team_name = FanDemographics.team_name WHERE SportsTeamPerformance.win_rate > 60 AND FanDemographics.fan_age > 35;",0 What is the total budget for each heritage site and its source by continent?,"CREATE TABLE HeritageBudget (id INT, site_name VARCHAR(255), continent VARCHAR(255), budget_source VARCHAR(255), amount FLOAT); ","SELECT continent, site_name, budget_source, SUM(amount) FROM HeritageBudget GROUP BY continent, site_name, budget_source;","SELECT continent, site_name, budget_source, SUM(amount) as total_budget FROM HeritageBudget GROUP BY continent, site_name, budget_source;",0 "Which Railway has a Location of shildon, and an ObjectNumber of 1978-7006?","CREATE TABLE table_name_52 (railway VARCHAR, location VARCHAR, objectnumber VARCHAR);","SELECT railway FROM table_name_52 WHERE location = ""shildon"" AND objectnumber = ""1978-7006"";","SELECT railway FROM table_name_52 WHERE location = ""shildon"" AND objectnumber = ""1978-7006"";",1 What is the total number of female and male founders for each country?,"CREATE TABLE company_founding (id INT, name VARCHAR(50), country VARCHAR(50), founding_year INT, gender VARCHAR(10)); ","SELECT country, gender, COUNT(*) as total FROM company_founding GROUP BY ROLLUP(country, gender);","SELECT country, gender, COUNT(*) FROM company_founding GROUP BY country, gender;",0 How many defense diplomacy events involved cybersecurity cooperation in the European region?,"CREATE TABLE DefenseDiplomacy (Country VARCHAR(255), Region VARCHAR(255), EventType VARCHAR(255), InvolvesCybersecurity BOOLEAN); ",SELECT COUNT(*) FROM DefenseDiplomacy WHERE Region = 'Europe' AND InvolvesCybersecurity = TRUE;,SELECT COUNT(*) FROM DefenseDiplomacy WHERE Region = 'Europe' AND InvolvesCybersecurity = TRUE;,1 How many electric vehicles were sold in Canada in 2021?,"CREATE TABLE Sales (year INT, country VARCHAR(50), vehicle_type VARCHAR(50), quantity INT); ",SELECT SUM(quantity) FROM Sales WHERE year = 2021 AND country = 'Canada' AND vehicle_type = 'Electric';,SELECT SUM(quantity) FROM Sales WHERE country = 'Canada' AND vehicle_type = 'Electric' AND year = 2021;,0 What is the total number of farmers and farming organizations in the 'rural_development' schema?,"CREATE TABLE farmers(id INT, name VARCHAR(50), age INT); CREATE TABLE farming_orgs(id INT, name VARCHAR(50), members INT); ",SELECT COUNT(*) FROM farmers UNION ALL SELECT COUNT(*) FROM farming_orgs;,SELECT COUNT(*) FROM farmers INNER JOIN farming_orgs ON farmers.id = farming_orgs.id;,0 What is the Japanese orthography for National Fisheries University?,"CREATE TABLE table_11390711_4 (japanese_orthography VARCHAR, english_name VARCHAR);","SELECT japanese_orthography FROM table_11390711_4 WHERE english_name = ""National Fisheries University"";","SELECT japanese_orthography FROM table_11390711_4 WHERE english_name = ""National Fisheries University"";",1 Which missions did astronaut 'J. Johnson' participate in?,"CREATE TABLE Astronauts (id INT, name VARCHAR(255)); CREATE TABLE SpaceMissions (id INT, name VARCHAR(255), astronaut_id INT); ",SELECT SpaceMissions.name FROM SpaceMissions JOIN Astronauts ON SpaceMissions.astronaut_id = Astronauts.id WHERE Astronauts.name = 'J. Johnson';,SELECT SpaceMissions.name FROM SpaceMissions INNER JOIN Astronauts ON SpaceMissions.astronaut_id = Astronauts.id WHERE Astronauts.name = 'J. Johnson';,0 What team started in grid 11?,"CREATE TABLE table_name_2 (team VARCHAR, grid VARCHAR);","SELECT team FROM table_name_2 WHERE grid = ""11"";",SELECT team FROM table_name_2 WHERE grid = 11;,0 "What is the maximum salary of workers who are not union members, grouped by their industry?","CREATE TABLE workers (id INT, name TEXT, industry TEXT, union_member BOOLEAN, salary REAL); ","SELECT industry, MAX(salary) FROM workers WHERE NOT union_member GROUP BY industry;","SELECT industry, MAX(salary) FROM workers WHERE union_member = false GROUP BY industry;",0 What was the name of the episode that was directed by Mary Harron?,"CREATE TABLE table_2182654_6 (title VARCHAR, directed_by VARCHAR);","SELECT title FROM table_2182654_6 WHERE directed_by = ""Mary Harron"";","SELECT title FROM table_2182654_6 WHERE directed_by = ""Mary Harron"";",1 "How many animals are currently in the endangered_species table, and what is their total population?","CREATE TABLE endangered_species (id INT, animal_name VARCHAR(255), population INT);","SELECT COUNT(id), SUM(population) FROM endangered_species;","SELECT animal_name, SUM(population) FROM endangered_species GROUP BY animal_name;",0 "With less than 7 Silver medals, how many Gold medals did Canada receive?","CREATE TABLE table_name_30 (gold INTEGER, nation VARCHAR, silver VARCHAR);","SELECT MAX(gold) FROM table_name_30 WHERE nation = ""canada"" AND silver < 7;","SELECT SUM(gold) FROM table_name_30 WHERE nation = ""canada"" AND silver 7;",0 What is the chassis of Officine Alfieri Maserati with a Maserati Straight-6 engine and fewer than 6 points?,"CREATE TABLE table_name_55 (chassis VARCHAR, points VARCHAR, engine VARCHAR, entrant VARCHAR);","SELECT chassis FROM table_name_55 WHERE engine = ""maserati straight-6"" AND entrant = ""officine alfieri maserati"" AND points < 6;","SELECT chassis FROM table_name_55 WHERE engine = ""maserati straight-6"" AND entrant = ""officine alfieri maserati"" AND points 6;",0 What is the host city during the 2012 season?,"CREATE TABLE table_name_47 (host_city VARCHAR, season VARCHAR);",SELECT host_city FROM table_name_47 WHERE season = 2012;,SELECT host_city FROM table_name_47 WHERE season = 2012;,1 Identify Tier 1 investors who have never invested in companies with diverse founding teams.,"CREATE TABLE Investors (id INT, tier TEXT, name TEXT); CREATE TABLE Investments (investor_id INT, company_id INT); CREATE TABLE Companies (id INT, name TEXT, diversity_score FLOAT); ",SELECT Investors.name FROM Investors JOIN Investments ON Investors.id = Investments.investor_id LEFT JOIN Companies ON Investments.company_id = Companies.id WHERE Investors.tier = 'Tier 1' AND Companies.diversity_score IS NULL;,"SELECT Investors.tier, Investors.name FROM Investors INNER JOIN Investments ON Investors.id = Investments.investor_id INNER JOIN Companies ON Investments.company_id = Companies.id WHERE Investors.tier = 1 AND Companies.diversity_score IS NULL;",0 Who was the opponent when the Seattle Seahawks had a record of 8-7?,"CREATE TABLE table_name_87 (opponent VARCHAR, record VARCHAR);","SELECT opponent FROM table_name_87 WHERE record = ""8-7"";","SELECT opponent FROM table_name_87 WHERE record = ""8-7"";",1 Who is listed as the Visitor that has a Home of Boston Bruins and a Date of November 15?,"CREATE TABLE table_name_97 (visitor VARCHAR, home VARCHAR, date VARCHAR);","SELECT visitor FROM table_name_97 WHERE home = ""boston bruins"" AND date = ""november 15"";","SELECT visitor FROM table_name_97 WHERE home = ""boston bruins"" AND date = ""november 15"";",1 Insert a new record for Afrobeats with 2021 revenue and 2021 marketing budget,"CREATE TABLE music_genres (genre VARCHAR(255), revenue FLOAT, marketing_budget FLOAT, release_year INT); CREATE TABLE time_periods (period VARCHAR(255), year INT); ","INSERT INTO music_genres (genre, revenue, marketing_budget, release_year) VALUES ('Afrobeats', 100000, 40000, 2021);","INSERT INTO music_genres (genre, revenue, marketing_budget, release_year) VALUES ('Afrobeats', 2021, 'Marketing'); INSERT INTO time_periods (period, year) VALUES ('Afrobeats', 2021, 'Marketing');",0 "How many points are there with more losses than 16, more goals than 44, and a smaller position than 13?","CREATE TABLE table_name_99 (points VARCHAR, position VARCHAR, loses VARCHAR, goals_scored VARCHAR);",SELECT COUNT(points) FROM table_name_99 WHERE loses > 16 AND goals_scored > 44 AND position < 13;,SELECT points FROM table_name_99 WHERE loses > 16 AND goals_scored > 44 AND position 13;,0 "Which defense projects have been completed, with their corresponding geopolitical risk assessments?","CREATE TABLE defense_projects (project_id INTEGER, start_date DATE, end_date DATE); CREATE TABLE risk_assessments (project_id INTEGER, assessment_date DATE, risk_level TEXT);","SELECT defense_projects.project_id, defense_projects.start_date, defense_projects.end_date, risk_assessments.assessment_date, risk_assessments.risk_level FROM defense_projects INNER JOIN risk_assessments ON defense_projects.project_id = risk_assessments.project_id WHERE defense_projects.end_date IS NOT NULL;","SELECT defense_projects.project_id, defense_projects.start_date, defense_projects.end_date, risk_assessments.risk_level FROM defense_projects INNER JOIN risk_assessments ON defense_projects.project_id = risk_assessments.project_id GROUP BY defense_projects.project_id, defense_projects.start_date, defense_projects.end_date;",0 What is the total number of marine protected areas worldwide?,"CREATE TABLE marine_protected_areas (id INT, name TEXT); ",SELECT COUNT(*) FROM marine_protected_areas;,SELECT COUNT(*) FROM marine_protected_areas;,1 Who was the subject for the year of 2007?,"CREATE TABLE table_name_35 (subject VARCHAR, year VARCHAR);","SELECT subject FROM table_name_35 WHERE year = ""2007"";",SELECT subject FROM table_name_35 WHERE year = 2007;,0 which Total has a Score points of 11?,"CREATE TABLE table_name_13 (total VARCHAR, score_points VARCHAR);","SELECT total FROM table_name_13 WHERE score_points = ""11"";","SELECT total FROM table_name_13 WHERE score_points = ""11"";",1 Find the number of properties in the historic_buildings table that are 'landmarks'.,"CREATE TABLE historic_buildings (property_id INT, is_landmark BOOLEAN); INSERT INTO historic_buildings VALUES (1, true), (2, false), (3, false)",SELECT COUNT(*) FROM historic_buildings WHERE is_landmark = true;,SELECT COUNT(*) FROM historic_buildings WHERE is_landmark = true;,1 "List all companies in the ""Sustainability_2022"" table with a higher rating than the average rating","CREATE TABLE Sustainability_2022 (id INT, company VARCHAR(50), rating DECIMAL(2,1), year INT); ",SELECT company FROM Sustainability_2022 WHERE rating > (SELECT AVG(rating) FROM Sustainability_2022);,SELECT company FROM Sustainability_2022 WHERE rating > (SELECT AVG(rating) FROM Sustainability_2022);,1 What is the budget for rural infrastructure projects in 2022?,"CREATE TABLE rural_infrastructure (id INT, project TEXT, budget INT, year INT); ",SELECT SUM(budget) FROM rural_infrastructure WHERE year = 2022;,SELECT budget FROM rural_infrastructure WHERE year = 2022;,0 How many places featured the DXCL Callsign?,"CREATE TABLE table_12547903_3 (location VARCHAR, callsign VARCHAR);","SELECT COUNT(location) FROM table_12547903_3 WHERE callsign = ""DXCL"";","SELECT COUNT(location) FROM table_12547903_3 WHERE callsign = ""DXCL"";",1 What is the maximum temperature recorded in Greenland in July 2019?,"CREATE TABLE WeatherData (location VARCHAR(50), date DATE, temperature DECIMAL(5,2)); ",SELECT MAX(temperature) FROM WeatherData WHERE location = 'Greenland' AND date BETWEEN '2019-07-01' AND '2019-07-31';,SELECT MAX(temperature) FROM WeatherData WHERE location = 'Greenland' AND date BETWEEN '2019-07-01' AND '2019-07-31';,1 What is the distribution of vulnerabilities by severity level for the last month?,"CREATE TABLE vulnerabilities (vulnerability_id INT, vulnerability_severity VARCHAR(255), vulnerability_date DATE); ","SELECT vulnerability_severity, COUNT(*) as vulnerability_count FROM vulnerabilities WHERE vulnerability_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY vulnerability_severity;","SELECT vulnerability_severity, COUNT(*) as vulnerability_count FROM vulnerabilities WHERE vulnerability_date >= DATEADD(month, -1, GETDATE()) GROUP BY vulnerability_severity;",0 What issue was the spoofed title Ho-Hum land?,"CREATE TABLE table_name_75 (issue INTEGER, spoofed_title VARCHAR);","SELECT SUM(issue) FROM table_name_75 WHERE spoofed_title = ""ho-hum land"";","SELECT SUM(issue) FROM table_name_75 WHERE spoofed_title = ""hou-hum land"";",0 Who plays at Victoria Park?,"CREATE TABLE table_name_14 (away_team VARCHAR, venue VARCHAR);","SELECT away_team FROM table_name_14 WHERE venue = ""victoria park"";","SELECT away_team FROM table_name_14 WHERE venue = ""victoria park"";",1 List all auto shows in Europe and the number of electric vehicles exhibited in each one.,"CREATE TABLE AutoShows (Id INT, Name VARCHAR(100), Location VARCHAR(100), StartDate DATE, EndDate DATE); CREATE TABLE Exhibits (Id INT, AutoShowId INT, VehicleId INT, VehicleType VARCHAR(50)); CREATE TABLE Vehicles (Id INT, Name VARCHAR(100), Type VARCHAR(50)); ","SELECT AutoShows.Name, COUNT(Exhibits.VehicleId) FROM AutoShows INNER JOIN Exhibits ON AutoShows.Id = Exhibits.AutoShowId INNER JOIN Vehicles ON Exhibits.VehicleId = Vehicles.Id WHERE Vehicles.Type = 'Electric' AND AutoShows.Location LIKE 'Europe%' GROUP BY AutoShows.Name;","SELECT AutoShows.Name, COUNT(Exhibits.VehicleId) FROM AutoShows INNER JOIN Exhibits ON AutoShows.Id = Exhibits.AutoShowId INNER JOIN Vehicles ON Exhibits.VehicleId = Vehicles.Id WHERE Vehicles.Type = 'Electric' AND AutoShows.Location = 'Europe' GROUP BY AutoShows.Name;",0 Who was the winner when Katsuyuki Hiranaka had the fastest lap?,"CREATE TABLE table_name_89 (winner VARCHAR, fastest_lap VARCHAR);","SELECT winner FROM table_name_89 WHERE fastest_lap = ""katsuyuki hiranaka"";","SELECT winner FROM table_name_89 WHERE fastest_lap = ""katsuyuki hiranaka"";",1 What are the defense project timelines for the Middle East?,"CREATE TABLE defense_project_timelines (id INT, region VARCHAR(255), start_date DATE, end_date DATE); ","SELECT start_date, end_date FROM defense_project_timelines WHERE region = 'Middle East';","SELECT region, start_date, end_date FROM defense_project_timelines WHERE region = 'Middle East';",0 Insert a new album by an artist into the database,"CREATE TABLE Country (id INT, country VARCHAR(255)); CREATE TABLE Artist (id INT, country_id INT, name VARCHAR(255)); CREATE TABLE Album (id INT, artist_id INT, title VARCHAR(255), year INT);","INSERT INTO Artist (id, country_id, name) VALUES (1, 1, 'Taylor Swift'); INSERT INTO Album (id, artist_id, title, year) VALUES (1, 1, 'Lover', 2019);","INSERT INTO Album (id, artist_id, title, year) VALUES (1, 'Bob Dylan', '1999-01-01'); INSERT INTO Artist (id, country_id, name) VALUES (1, 'Bob Dylan', '1999-01-01'); INSERT INTO Album (id, artist_id, title, year) VALUES (1, 'Bob Dylan', '1999-01-01');",0 Find the top 3 countries with the highest CO2 emissions in the 'greenhouse_gas_emissions' table.,"CREATE TABLE greenhouse_gas_emissions (country VARCHAR(255), co2_emissions DECIMAL(10,2), year INT); ","SELECT country, co2_emissions FROM (SELECT country, co2_emissions, ROW_NUMBER() OVER (ORDER BY co2_emissions DESC) as rank FROM greenhouse_gas_emissions WHERE year = 2019) AS subquery WHERE rank <= 3;","SELECT country, co2_emissions FROM greenhouse_gas_emissions ORDER BY co2_emissions DESC LIMIT 3;",0 How many won the LMP1 on round 4 if No. 42 Strakka Racing was the LMP2 Winning Team?,"CREATE TABLE table_24865763_2 (lmp1_winning_team VARCHAR, rnd VARCHAR, lmp2_winning_team VARCHAR);","SELECT COUNT(lmp1_winning_team) FROM table_24865763_2 WHERE rnd = 4 AND lmp2_winning_team = ""No. 42 Strakka Racing"";","SELECT COUNT(lmp1_winning_team) FROM table_24865763_2 WHERE rnd = 4 AND lmp2_winning_team = ""No. 42 Strakka Racing"";",1 Update the threat level of all records in the Middle East region to 'High'?,"CREATE TABLE threat_intelligence (id INT, threat_type VARCHAR(50), threat_level VARCHAR(50), region VARCHAR(50)); ",UPDATE threat_intelligence SET threat_level = 'High' WHERE region = 'Middle East';,UPDATE threat_intelligence SET threat_level = 'High' WHERE region = 'Middle East';,1 Insert a new record for a route transfer from the 73 bus to the Red Line.,"CREATE TABLE Transfers (route VARCHAR(20), transfer VARCHAR(20)); ","INSERT INTO Transfers (route, transfer) VALUES ('73', 'Red Line');","INSERT INTO Transfers (route, transfer) VALUES ('73', 'Red Line');",1 Who had the pole position(s) when rob guiver won and kyle ryde had the fastest lap?,"CREATE TABLE table_29162856_1 (pole_position VARCHAR, winning_rider VARCHAR, fastest_lap VARCHAR);","SELECT pole_position FROM table_29162856_1 WHERE winning_rider = ""Rob Guiver"" AND fastest_lap = ""Kyle Ryde"";","SELECT pole_position FROM table_29162856_1 WHERE winning_rider = ""Rob Guiver"" AND fastest_lap = ""Kyle Ryde"";",1 Show the top 5 artists with the highest number of streams in the last month.,"CREATE TABLE songs (id INT, title TEXT, release_date DATE, genre TEXT, artist_id INT, streams INT); CREATE TABLE artists (id INT, artist_name TEXT);","SELECT artist_id, artist_name, SUM(streams) AS total_streams FROM songs JOIN artists ON songs.artist_id = artists.id WHERE release_date >= DATEADD(MONTH, -1, CURRENT_DATE) GROUP BY artist_id, artist_name ORDER BY total_streams DESC FETCH NEXT 5 ROWS ONLY;","SELECT a.artist_name, SUM(s.streams) as total_streams FROM artists a JOIN songs s ON a.id = s.artist_id WHERE s.release_date >= DATEADD(month, -1, GETDATE()) GROUP BY a.artist_name ORDER BY total_streams DESC LIMIT 5;",0 Show the total revenue for each brand that sells skincare products.,"CREATE TABLE brand_skincare_sales (brand VARCHAR(20), revenue DECIMAL(10,2)); ","SELECT brand, SUM(revenue) FROM brand_skincare_sales GROUP BY brand;","SELECT brand, SUM(revenue) FROM brand_skincare_sales GROUP BY brand;",1 What is the average score of players from the United States and Canada?,"CREATE TABLE Players (PlayerID int, PlayerName varchar(50), Country varchar(50), Score int); ","SELECT AVG(Score) FROM Players WHERE Country IN ('USA', 'Canada');","SELECT AVG(Score) FROM Players WHERE Country IN ('USA', 'Canada');",1 What is the length of the highway with the route name sh 2?,"CREATE TABLE table_name_57 (length VARCHAR, route_name VARCHAR);","SELECT length FROM table_name_57 WHERE route_name = ""sh 2"";","SELECT length FROM table_name_57 WHERE route_name = ""sh 2"";",1 how many time is the final record is 9–16–5?,"CREATE TABLE table_245711_2 (season VARCHAR, final_record VARCHAR);","SELECT COUNT(season) FROM table_245711_2 WHERE final_record = ""9–16–5"";","SELECT COUNT(season) FROM table_245711_2 WHERE final_record = ""9–16–5"";",1 What is the total number of scientific discoveries made by private space companies?,"CREATE TABLE discoveries (id INT, name VARCHAR(255), company VARCHAR(255), year INT); ","SELECT COUNT(*) FROM discoveries WHERE company IN ('SpaceX', 'Blue Origin');",SELECT COUNT(*) FROM discoveries WHERE company = 'Private Space Company';,0 "What is the minimum, maximum, and average property price per square foot in the city of Boston?","CREATE TABLE properties (id INT, city VARCHAR(255), price FLOAT, square_foot FLOAT); ","SELECT city, MIN(price/square_foot) AS min_price_per_sqft, MAX(price/square_foot) AS max_price_per_sqft, AVG(price/square_foot) AS avg_price_per_sqft FROM properties WHERE city = 'Boston' GROUP BY city;","SELECT city, MIN(price) as min_price, MAX(price) as max_price, AVG(price) as avg_price FROM properties WHERE city = 'Boston' GROUP BY city;",0 What is the average weight of packages shipped to Texas from warehouse 1?,"CREATE TABLE warehouse (id INT, location VARCHAR(255)); CREATE TABLE packages (id INT, warehouse_id INT, weight FLOAT, destination VARCHAR(255)); ",SELECT AVG(weight) FROM packages WHERE warehouse_id = 1 AND destination = 'Texas';,SELECT AVG(weight) FROM packages WHERE warehouse_id = 1 AND destination = 'Texas';,1 What is the total sales for each country?,"CREATE TABLE Customers (id INT, customer_name VARCHAR(255), country VARCHAR(255)); CREATE TABLE Orders (id INT, customer_id INT, order_value DECIMAL(5,2)); ","SELECT Customers.country, SUM(Orders.order_value) AS total_sales FROM Customers INNER JOIN Orders ON Customers.id = Orders.customer_id GROUP BY Customers.country;","SELECT c.country, SUM(o.order_value) as total_sales FROM Customers c JOIN Orders o ON c.id = o.customer_id GROUP BY c.country;",0 How many containers were transported from China to the US east coast last month?,"CREATE TABLE cargos(id INT, vessel_id INT, source_country VARCHAR(50), destination_country VARCHAR(50), num_containers INT);",SELECT SUM(num_containers) FROM cargos WHERE source_country = 'China' AND destination_country = 'US' AND MONTH(cargo_date) = MONTH(CURRENT_DATE - INTERVAL 1 MONTH),SELECT SUM(num_containers) FROM cargos WHERE source_country = 'China' AND destination_country = 'US East Coast' AND MONTH(date) = 1;,0 "For each year, find the total number of trees in each region and rank them in descending order of total trees.","CREATE TABLE trees (tree_id INT, region_id INT, year INT, num_trees INT); ","SELECT region_id, year, SUM(num_trees) AS total_trees, RANK() OVER (PARTITION BY year ORDER BY SUM(num_trees) DESC) AS tree_rank FROM trees GROUP BY region_id, year ORDER BY year, tree_rank ASC;","SELECT region_id, year, SUM(num_trees) as total_trees FROM trees GROUP BY region_id, year ORDER BY total_trees DESC;",0 How many employees have completed diversity and inclusion training in the Marketing department?,"CREATE TABLE Employees (EmployeeID int, Name varchar(50), Department varchar(50)); CREATE TABLE Training (TrainingID int, EmployeeID int, TrainingName varchar(50), CompletedDate date); CREATE TABLE TrainingCategories (TrainingID int, Category varchar(50)); ",SELECT COUNT(*) FROM Employees e JOIN Training t ON e.EmployeeID = t.EmployeeID JOIN TrainingCategories tc ON t.TrainingID = tc.TrainingID WHERE e.Department = 'Marketing' AND tc.Category = 'Diversity and Inclusion';,SELECT COUNT(*) FROM Employees e JOIN Training t ON e.EmployeeID = t.EmployeeID JOIN TrainingCategories tc ON t.TrainingID = tc.TrainingID WHERE e.Department = 'Marketing' AND tc.Category = 'Diversity and Inclusion';,1 What was the year when West Manila has a tariff increase of 6.5?,"CREATE TABLE table_17302440_1 (year VARCHAR, west_manila VARCHAR);","SELECT year FROM table_17302440_1 WHERE west_manila = ""6.5"";","SELECT year FROM table_17302440_1 WHERE west_manila = ""6.5"";",1 Which country has Hydra Head Records on February 2005?,"CREATE TABLE table_name_96 (country VARCHAR, label VARCHAR, date VARCHAR);","SELECT country FROM table_name_96 WHERE label = ""hydra head records"" AND date = ""february 2005"";","SELECT country FROM table_name_96 WHERE label = ""hydra head records"" AND date = ""february 2005"";",1 What is the maximum retail price of eco-friendly activewear sold in Australia?,"CREATE TABLE garments (id INT, category VARCHAR(255), subcategory VARCHAR(255), sustainability VARCHAR(50), price DECIMAL(10, 2), country VARCHAR(50)); ",SELECT MAX(price) FROM garments WHERE category = 'Activewear' AND sustainability = 'Eco-Friendly' AND country = 'Australia';,SELECT MAX(price) FROM garments WHERE sustainability = 'Eco-friendly' AND country = 'Australia';,0 What is the average number of workers per sustainable project in 'Austin'?,"CREATE TABLE project (id INT, name VARCHAR(50), location VARCHAR(50), start_date DATE); CREATE TABLE labor (id INT, project_id INT, worker VARCHAR(50), hours FLOAT); CREATE TABLE sustainable (project_id INT, solar_panels BOOLEAN, wind_turbines BOOLEAN, green_roof BOOLEAN); ",SELECT AVG(l.worker_count) FROM (SELECT COUNT(DISTINCT l.worker) AS worker_count FROM labor l JOIN project p ON l.project_id = p.id JOIN sustainable s ON p.id = s.project_id WHERE p.location = 'Austin' AND s.solar_panels = TRUE GROUP BY l.project_id) l;,SELECT AVG(labor.hours) FROM labor INNER JOIN sustainable ON labor.project_id = sustainable.project_id WHERE project.location = 'Austin';,0 Find the total number of food safety violations for each country in the 'Violations' and 'Countries' tables.,"CREATE TABLE Violations (violation_id INT, country_id INT, violation_count INT); CREATE TABLE Countries (country_id INT, country_name TEXT);","SELECT Countries.country_name, SUM(Violations.violation_count) FROM Violations INNER JOIN Countries ON Violations.country_id = Countries.country_id GROUP BY Countries.country_name;","SELECT c.country_name, SUM(v.violation_count) as total_violations FROM Violations v JOIN Countries c ON v.country_id = c.country_id GROUP BY c.country_name;",0 How many public schools were there in the city of Chicago in the year 2019?,"CREATE TABLE schools (type VARCHAR(10), city VARCHAR(20), year INT); ",SELECT COUNT(*) FROM schools WHERE type = 'public' AND city = 'Chicago' AND year = 2019;,SELECT COUNT(*) FROM schools WHERE city = 'Chicago' AND year = 2019;,0 What is the total amount donated in Q1 2022?,"CREATE TABLE Donations (DonationID INT, DonorID INT, Amount FLOAT, DonationDate DATE); ","SELECT SUM(Amount) FROM Donations WHERE DATE_FORMAT(DonationDate, '%Y-%m') BETWEEN '2022-01' AND '2022-03';",SELECT SUM(Amount) FROM Donations WHERE DonationDate BETWEEN '2022-01-01' AND '2022-03-31';,0 What is the percentage of female employees who work in the IT department?,"CREATE TABLE employees (id INT, gender VARCHAR(10), department VARCHAR(20)); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM employees WHERE department = 'IT')) as percentage FROM employees WHERE gender = 'Female' AND department = 'IT';,SELECT (COUNT(*) FILTER (WHERE gender = 'Female')) * 100.0 / COUNT(*) FROM employees WHERE department = 'IT';,0 "How many workers are employed in the textile industry in each country, and what is their average salary?","CREATE TABLE textile_industry (id INT PRIMARY KEY, country VARCHAR(50), workers INT, avg_salary FLOAT); ","SELECT country, workers, AVG(avg_salary) FROM textile_industry GROUP BY country;","SELECT country, SUM(workers) as total_workers, AVG(avg_salary) as avg_salary FROM textile_industry GROUP BY country;",0 How many genetic research projects were completed in Africa in 2018?,"CREATE TABLE genetic_research (id INT, project_name VARCHAR(50), completion_year INT, region VARCHAR(50)); ",SELECT COUNT(*) FROM genetic_research WHERE completion_year = 2018 AND region = 'Africa';,SELECT COUNT(*) FROM genetic_research WHERE completion_year = 2018 AND region = 'Africa';,1 In what Round is the Position Goaltender?,"CREATE TABLE table_name_24 (round VARCHAR, position VARCHAR);","SELECT round FROM table_name_24 WHERE position = ""goaltender"";","SELECT round FROM table_name_24 WHERE position = ""goaltender"";",1 "When the To par is E, what is the Score?","CREATE TABLE table_name_62 (score VARCHAR, to_par VARCHAR);","SELECT score FROM table_name_62 WHERE to_par = ""e"";","SELECT score FROM table_name_62 WHERE to_par = ""e"";",1 How many attended on may 6?,"CREATE TABLE table_name_85 (attendance VARCHAR, date VARCHAR);","SELECT COUNT(attendance) FROM table_name_85 WHERE date = ""may 6"";","SELECT attendance FROM table_name_85 WHERE date = ""may 6"";",0 What is the minimum sales revenue for a specific drug in a certain year?,"CREATE TABLE drugs (id INT, name VARCHAR(255)); CREATE TABLE sales (id INT, drug_id INT, year INT, revenue INT);",SELECT MIN(sales.revenue) FROM sales JOIN drugs ON sales.drug_id = drugs.id WHERE drugs.name = 'DrugA' AND sales.year = 2020;,SELECT MIN(sales.revenue) FROM sales INNER JOIN drugs ON sales.drug_id = drugs.id WHERE drugs.name = 'DrugA' AND sales.year = 2021;,0 What was her final score on the ribbon apparatus?,"CREATE TABLE table_name_86 (score_final VARCHAR, apparatus VARCHAR);","SELECT score_final FROM table_name_86 WHERE apparatus = ""ribbon"";","SELECT score_final FROM table_name_86 WHERE apparatus = ""ribbon"";",1 Who did Yugoslavia play against that led to a result of 2:3?,"CREATE TABLE table_name_90 (opponent VARCHAR, results¹ VARCHAR);","SELECT opponent FROM table_name_90 WHERE results¹ = ""2:3"";","SELECT opponent FROM table_name_90 WHERE results1 = ""2:3"";",0 Show top 3 expensive biosensors in descending order.,"CREATE TABLE biosensors (id INT, manufacturer VARCHAR(50), model VARCHAR(50), price FLOAT, quantity INT, date DATE);","SELECT manufacturer, model, price FROM biosensors ORDER BY price DESC LIMIT 3;","SELECT manufacturer, model, price, quantity FROM biosensors ORDER BY price DESC LIMIT 3;",0 Update the gender of creators in the 'creators' table.,"CREATE TABLE creators (id INT PRIMARY KEY, name TEXT, gender TEXT); ",UPDATE creators SET gender = 'Non-binary' WHERE name = 'Carla';,UPDATE creators SET gender = 'Female' WHERE id = 1;,0 Show the total quantity of products in warehouses in Spain and France.,"CREATE TABLE Warehouse (id INT, name VARCHAR(255), city VARCHAR(255), country VARCHAR(255), total_quantity INT); ","SELECT country, SUM(total_quantity) FROM Warehouse WHERE country IN ('Spain', 'France') GROUP BY country;","SELECT SUM(total_quantity) FROM Warehouse WHERE country IN ('Spain', 'France');",0 What is the total fare collected for each type of vehicle?,"CREATE TABLE trips (vehicle_id INT, fare DECIMAL(5,2), date DATE); ","SELECT fleet.type, SUM(trips.fare) FROM trips JOIN fleet ON trips.vehicle_id = fleet.vehicle_id GROUP BY fleet.type;","SELECT vehicle_id, SUM(fare) as total_fare FROM trips GROUP BY vehicle_id;",0 Which indigenous communities are in the Arctic and how many members do they have?,"CREATE TABLE Indigenous_Communities (id INT PRIMARY KEY, community_name VARCHAR(50), population INT, region VARCHAR(50)); ","SELECT community_name, population FROM Indigenous_Communities WHERE region = 'Arctic';","SELECT community_name, population FROM Indigenous_Communities WHERE region = 'Arctic';",1 Determine the maximum temperature for soybeans in the last week,"CREATE TABLE temperature_data (crop_type VARCHAR(50), measurement_date DATE, temperature DECIMAL(5,2));",SELECT MAX(temperature) FROM temperature_data WHERE crop_type = 'soybeans' AND measurement_date >= NOW() - INTERVAL '7 days';,"SELECT MAX(temperature) FROM temperature_data WHERE crop_type = 'Soybean' AND measurement_date >= DATEADD(week, -1, GETDATE());",0 What is the average time between train cleanings for each line?,"CREATE TABLE trains (id INT, line VARCHAR(10), clean_date DATE); ","SELECT line, AVG(DATEDIFF('day', LAG(clean_date) OVER (PARTITION BY line ORDER BY clean_date), clean_date)) FROM trains GROUP BY line;","SELECT line, AVG(DATEDIFF(clean_date, '%Y-%m')) as avg_time_between_cleanings FROM trains GROUP BY line;",0 "Calculate the average billing amount for each attorney, grouped by their respective practice areas.","CREATE TABLE Payments (PaymentID INT, AttorneyID INT, Amount DECIMAL(10,2)); ","SELECT p.PracticeArea, AVG(b.Amount) AS AverageBilling FROM Attorneys p JOIN Payments b ON p.AttorneyID = b.AttorneyID GROUP BY p.PracticeArea;","SELECT AttorneyID, AVG(Amount) as AvgBillingAmount FROM Payments GROUP BY AttorneyID;",0 What district is bill thomas from?,"CREATE TABLE table_1341453_7 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_1341453_7 WHERE incumbent = ""Bill Thomas"";","SELECT district FROM table_1341453_7 WHERE incumbent = ""Bill Thomas"";",1 What state is Tanya Plibersek from?,"CREATE TABLE table_name_15 (state VARCHAR, member VARCHAR);","SELECT state FROM table_name_15 WHERE member = ""tanya plibersek"";","SELECT state FROM table_name_15 WHERE member = ""tanya plibersek"";",1 How many researchers specialize in Explainable AI and Creative AI respectively?,"CREATE TABLE researcher (id INT, name VARCHAR, expertise VARCHAR, affiliation VARCHAR); ","SELECT SUM(expertise = 'Explainable AI') as explainable_ai_count, SUM(expertise = 'Creative AI') as creative_ai_count FROM researcher;",SELECT COUNT(*) FROM researcher WHERE expertise = 'Explainable AI' AND affiliation = 'Creative AI';,0 List top 10 eSports teams with most wins in 2022,"CREATE TABLE teams (team_id INT, name VARCHAR(100)); CREATE TABLE matches (match_id INT, team_id INT, year INT, wins INT);","SELECT t.name, SUM(m.wins) AS total_wins FROM teams t JOIN matches m ON t.team_id = m.team_id WHERE m.year = 2022 GROUP BY t.name ORDER BY total_wins DESC LIMIT 10;","SELECT t.name, SUM(m.wins) as total_wins FROM teams t JOIN matches m ON t.team_id = m.team_id WHERE m.year = 2022 GROUP BY t.name ORDER BY total_wins DESC LIMIT 10;",0 "What week of the season did the date December 2, 1962 fall on?","CREATE TABLE table_14984078_1 (week VARCHAR, date VARCHAR);","SELECT week FROM table_14984078_1 WHERE date = ""December 2, 1962"";","SELECT week FROM table_14984078_1 WHERE date = ""December 2, 1962"";",1 "List the top 10 cities with the highest percentage of households with access to high-speed internet, based on the most recent data available.","CREATE TABLE households (household_id INT, city VARCHAR(255), high_speed_internet BOOLEAN);","SELECT city, (COUNT(*) FILTER (WHERE high_speed_internet = true) * 100.0 / COUNT(*)) AS high_speed_percentage FROM households GROUP BY city ORDER BY high_speed_percentage DESC LIMIT 10;","SELECT city, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM households WHERE high_speed_internet = true GROUP BY city ORDER BY COUNT(*) DESC) as percentage FROM households WHERE high_speed_internet = true GROUP BY city ORDER BY percentage DESC LIMIT 10;",0 "Find the energy storage systems and their capacities by region, ordered by capacity and region.","CREATE TABLE energy_storage (id INT, name TEXT, capacity FLOAT, region TEXT); ","SELECT region, name, capacity FROM energy_storage ORDER BY region, capacity DESC;","SELECT name, capacity, region FROM energy_storage ORDER BY capacity, region;",0 Determine the top five menu items with the highest revenue for the entire company and their total revenue.,"CREATE TABLE MenuItems (MenuItemID int, RestaurantID int, MenuItemName varchar(50), SaleAmount numeric(10, 2)); ","SELECT M.MenuItemName, SUM(M.SaleAmount) AS TotalRevenue FROM MenuItems M GROUP BY M.MenuItemName ORDER BY TotalRevenue DESC LIMIT 5;","SELECT MenuItemName, SUM(SaleAmount) as TotalRevenue FROM MenuItems GROUP BY MenuItemName ORDER BY TotalRevenue DESC LIMIT 5;",0 What song placed higher than#4?,"CREATE TABLE table_name_41 (song VARCHAR, place INTEGER);",SELECT song FROM table_name_41 WHERE place > 4;,SELECT song FROM table_name_41 WHERE place > 4;,1 What is the change in water consumption for each household in the city of Houston from 2020 to 2021?,"CREATE TABLE houston_water_consumption (id INT, year INT, household_id INT, water_consumption FLOAT); ","SELECT h2021.household_id, h2021.water_consumption - h2020.water_consumption AS consumption_change FROM houston_water_consumption h2021 JOIN houston_water_consumption h2020 ON h2021.household_id = h2020.household_id AND h2020.year = 2020 AND h2021.year = 2021","SELECT household_id, year, water_consumption, ROW_NUMBER() OVER (PARTITION BY household_id ORDER BY year) as rn FROM houston_water_consumption WHERE year = 2020;",0 What is the recycling rate per region and year for Southeast Asia?,"CREATE TABLE recycling_rates (id INT, region VARCHAR(50), year INT, recycling_rate DECIMAL(5,2)); ","SELECT region, year, AVG(recycling_rate) FROM recycling_rates WHERE region = 'Southeast Asia' GROUP BY region, year;","SELECT region, year, recycling_rate FROM recycling_rates WHERE region = 'Southeast Asia' GROUP BY region, year;",0 "How many articles were published on the ""culture"" section of the website in Q2 and Q3 of 2018?","CREATE TABLE website_articles (id INT, title TEXT, section TEXT, publish_date DATE);",SELECT COUNT(*) FROM website_articles WHERE section = 'culture' AND publish_date BETWEEN '2018-04-01' AND '2018-09-30';,SELECT COUNT(*) FROM website_articles WHERE section = 'culture' AND publish_date BETWEEN '2018-01-01' AND '2018-12-31';,0 "Which Bronze has a Nation of canada, and a Rank smaller than 6?","CREATE TABLE table_name_5 (bronze INTEGER, nation VARCHAR, rank VARCHAR);","SELECT AVG(bronze) FROM table_name_5 WHERE nation = ""canada"" AND rank < 6;","SELECT AVG(bronze) FROM table_name_5 WHERE nation = ""canada"" AND rank 6;",0 "What is the average monthly budget for military innovation in NATO countries since 2015, with the budgets of each country ordered by the highest average?","CREATE TABLE MilitaryBudgets (country VARCHAR(255), year INT, month INT, budget DECIMAL(10, 2)); ","SELECT country, AVG(budget) as avg_monthly_budget, ROW_NUMBER() OVER (ORDER BY AVG(budget) DESC) as budget_rank FROM MilitaryBudgets WHERE country LIKE 'NATO%' AND year >= 2015 GROUP BY country ORDER BY budget_rank;","SELECT country, AVG(budget) as avg_monthly_budget FROM MilitaryBudgets WHERE year >= 2015 GROUP BY country ORDER BY avg_monthly_budget DESC;",0 What is the maximum area of land used for urban agriculture?,"CREATE TABLE MaxLand (Location VARCHAR(20), System VARCHAR(20), Area FLOAT); ",SELECT MAX(Area) FROM MaxLand WHERE System = 'Urban Agriculture';,SELECT MAX(Area) FROM MaxLand WHERE System = 'Urban Agriculture';,1 Name the country which has prix uip venezia,"CREATE TABLE table_name_9 (country VARCHAR, nominating_festival VARCHAR);","SELECT country FROM table_name_9 WHERE nominating_festival = ""prix uip venezia"";","SELECT country FROM table_name_9 WHERE nominating_festival = ""prix uip venezia"";",1 What is the number of tries for that has 30 tries against?,"CREATE TABLE table_name_74 (tries_for VARCHAR, tries_against VARCHAR);","SELECT tries_for FROM table_name_74 WHERE tries_against = ""30"";","SELECT tries_for FROM table_name_74 WHERE tries_against = ""30"";",1 "What is the set 1 when the time is 13:00, and total is 97–74?","CREATE TABLE table_name_42 (set_1 VARCHAR, time VARCHAR, total VARCHAR);","SELECT set_1 FROM table_name_42 WHERE time = ""13:00"" AND total = ""97–74"";","SELECT set_1 FROM table_name_42 WHERE time = ""13:00"" AND total = ""97–74"";",1 What is the total runtime of all movies produced by a specific studio?,"CREATE TABLE movies (movie_id INT, movie_title VARCHAR(100), release_year INT, studio VARCHAR(50), runtime INT); ","SELECT studio, SUM(runtime) as total_runtime FROM movies WHERE studio = 'DreamWorks Pictures' GROUP BY studio;","SELECT studio, SUM(runtime) FROM movies GROUP BY studio;",0 "How many totals have a Gold larger than 0, and a Bronze smaller than 0?","CREATE TABLE table_name_62 (total VARCHAR, gold VARCHAR, bronze VARCHAR);",SELECT COUNT(total) FROM table_name_62 WHERE gold > 0 AND bronze < 0;,SELECT COUNT(total) FROM table_name_62 WHERE gold > 0 AND bronze 0;,0 What event has a 0:49 time?,"CREATE TABLE table_name_13 (event VARCHAR, time VARCHAR);","SELECT event FROM table_name_13 WHERE time = ""0:49"";","SELECT event FROM table_name_13 WHERE time = ""0:49"";",1 What is the maximum engagement for virtual tours in the 'Asia' region?,"CREATE TABLE virtual_tours_engagement (tour_id INT, name TEXT, region TEXT, engagement INT); ",SELECT MAX(engagement) FROM virtual_tours_engagement WHERE region = 'Asia';,SELECT MAX(engagement) FROM virtual_tours_engagement WHERE region = 'Asia';,1 List all users who have posted more than 5 times in the social_media database.,"CREATE TABLE users (user_id INT PRIMARY KEY, username VARCHAR(255), location VARCHAR(255)); CREATE TABLE posts (post_id INT PRIMARY KEY, user_id INT, content TEXT); ","SELECT users.username FROM users INNER JOIN posts ON users.user_id = posts.user_id GROUP BY users.user_id, users.username HAVING COUNT(posts.post_id) > 5;",SELECT users.username FROM users INNER JOIN posts ON users.user_id = posts.user_id GROUP BY users.username HAVING COUNT(posts.post_id) > 5;,0 What was the score for the game in which Samir Nasri played?,"CREATE TABLE table_24765815_2 (score VARCHAR, player VARCHAR);","SELECT score FROM table_24765815_2 WHERE player = ""Samir Nasri"";","SELECT score FROM table_24765815_2 WHERE player = ""Samir Nasri"";",1 What was the average number of starts Michael Henig had in a year when he had more than 1201 yards?,"CREATE TABLE table_name_54 (starts INTEGER, yards INTEGER);",SELECT AVG(starts) FROM table_name_54 WHERE yards > 1201;,SELECT AVG(starts) FROM table_name_54 WHERE yards > 1201;,1 What is the total quantity of vegan skincare products sold in France and Germany?,"CREATE TABLE skincare_sales (product_id INT, product_name VARCHAR(255), sale_quantity INT, is_vegan BOOLEAN, country VARCHAR(255)); CREATE TABLE products (product_id INT, product_name VARCHAR(255), category VARCHAR(255)); ",SELECT SUM(skincare_sales.sale_quantity) FROM skincare_sales INNER JOIN products ON skincare_sales.product_id = products.product_id WHERE skincare_sales.is_vegan = true AND (skincare_sales.country = 'France' OR skincare_sales.country = 'Germany') AND products.category = 'Skincare';,"SELECT SUM(skincare_sales.sale_quantity) FROM skincare_sales INNER JOIN products ON skincare_sales.product_id = products.product_id WHERE skincare_sales.is_vegan = true AND skincare_sales.country IN ('France', 'Germany');",0 How many different second members were there when John rudhale was first member?,"CREATE TABLE table_15451122_2 (second_member VARCHAR, first_member VARCHAR);","SELECT COUNT(second_member) FROM table_15451122_2 WHERE first_member = ""John Rudhale"";","SELECT COUNT(second_member) FROM table_15451122_2 WHERE first_member = ""John Rudhale"";",1 List the account types and number of clients who have a financial wellbeing score above 70 and a savings account balance above 10000.,"CREATE TABLE clients (client_id INT, financial_wellbeing_score INT, account_type VARCHAR(20), savings DECIMAL(10, 2)); ","SELECT account_type, COUNT(*) FROM clients WHERE financial_wellbeing_score > 70 AND savings > 10000 GROUP BY account_type;","SELECT account_type, COUNT(*) FROM clients WHERE financial_wellbeing_score > 70 AND savings > 10000 GROUP BY account_type;",1 "What is the total number of Year with Wins of 1, and Losses smaller than 1?","CREATE TABLE table_name_93 (year INTEGER, wins VARCHAR, losses VARCHAR);",SELECT SUM(year) FROM table_name_93 WHERE wins = 1 AND losses < 1;,SELECT SUM(year) FROM table_name_93 WHERE wins = 1 AND losses 1;,0 What is the method when the opponent is Andre Roberts?,"CREATE TABLE table_name_34 (method VARCHAR, opponent VARCHAR);","SELECT method FROM table_name_34 WHERE opponent = ""andre roberts"";","SELECT method FROM table_name_34 WHERE opponent = ""andre roberts"";",1 What is the average cost of all climate finance projects in 'Asia'?,"CREATE TABLE climate_finance (project_id INT, project_name VARCHAR(255), location VARCHAR(255), start_date DATE, end_date DATE, total_cost DECIMAL(10,2));",SELECT AVG(total_cost) FROM climate_finance WHERE location = 'Asia';,SELECT AVG(total_cost) FROM climate_finance WHERE location = 'Asia';,1 What is the Attendance of the game in Week 12?,"CREATE TABLE table_name_99 (attendance INTEGER, week VARCHAR);",SELECT MAX(attendance) FROM table_name_99 WHERE week = 12;,SELECT SUM(attendance) FROM table_name_99 WHERE week = 12;,0 What is the Ratt of the year with a 78 long?,"CREATE TABLE table_name_97 (ratt VARCHAR, long VARCHAR);","SELECT ratt FROM table_name_97 WHERE long = ""78"";","SELECT ratt FROM table_name_97 WHERE long = ""78"";",1 What is the make of car 31?,"CREATE TABLE table_name_47 (make VARCHAR, car__number VARCHAR);",SELECT make FROM table_name_47 WHERE car__number = 31;,SELECT make FROM table_name_47 WHERE car__number = 31;,1 what are all the date withdrawn for twin screw ro-ro motorship,"CREATE TABLE table_11662133_3 (date_withdrawn VARCHAR, type_of_ship VARCHAR);","SELECT date_withdrawn FROM table_11662133_3 WHERE type_of_ship = ""Twin Screw Ro-Ro Motorship"";","SELECT date_withdrawn FROM table_11662133_3 WHERE type_of_ship = ""Twin Screw Ro-Ro Motorship"";",1 "Find the emails of the user named ""Mary"".","CREATE TABLE user_profiles (email VARCHAR, name VARCHAR);",SELECT email FROM user_profiles WHERE name = 'Mary';,"SELECT email FROM user_profiles WHERE name = ""Mary"";",0 "Who are the top 5 volunteers who have donated the most time, in the last 12 months, and what is the total time donated by each?","CREATE TABLE Volunteer_Hours (id INT, volunteer_id INT, hours DECIMAL(10, 2), hour_date DATE); ","SELECT volunteer_id, SUM(hours) as total_hours FROM Volunteer_Hours WHERE hour_date >= DATE_SUB(CURRENT_DATE, INTERVAL 12 MONTH) GROUP BY volunteer_id ORDER BY total_hours DESC LIMIT 5;","SELECT volunteer_id, SUM(hours) as total_time_donated FROM Volunteer_Hours WHERE hour_date >= DATEADD(month, -12, GETDATE()) GROUP BY volunteer_id ORDER BY total_time_donated DESC LIMIT 5;",0 How many spacecrafts were manufactured by SpaceTech Inc.?,"CREATE TABLE Manufacturers (Manufacturer_ID INT, Manufacturer_Name VARCHAR(50), Location VARCHAR(50), Established_Date DATE); ",SELECT COUNT(*) FROM Spacecrafts WHERE Manufacturer = 'SpaceTech Inc.';,SELECT COUNT(*) FROM Manufacturers WHERE Manufacturer_Name = 'SpaceTech Inc.';,0 Who are the top 3 users with the highest total calories burned in the last week?,"CREATE TABLE user_calories (user_id INT, calories INT, calories_date DATE); ","SELECT user_id, SUM(calories) as total_calories FROM user_calories WHERE calories_date >= DATEADD(week, -1, CURRENT_DATE) GROUP BY user_id ORDER BY total_calories DESC LIMIT 3;","SELECT user_id, SUM(calories) as total_calories FROM user_calories WHERE calories_date >= DATEADD(week, -1, GETDATE()) GROUP BY user_id ORDER BY total_calories DESC LIMIT 3;",0 "What is the total funding per biotech startup and their corresponding rank, ordered by total funding?","CREATE SCHEMA if not exists funding_data;CREATE TABLE if not exists funding_data.startups (id INT PRIMARY KEY, name VARCHAR(255), country VARCHAR(255), year INT, funding DECIMAL(10, 2)); ","SELECT name, funding, ROW_NUMBER() OVER (ORDER BY funding DESC) AS rank FROM funding_data.startups;","SELECT name, SUM(funding) as total_funding, RANK() OVER (ORDER BY SUM(funding) DESC) as rank FROM funding_data.startups GROUP BY name ORDER BY total_funding DESC;",0 In what venue did FK Crvena Stijena play at home?,"CREATE TABLE table_name_24 (venue VARCHAR, home VARCHAR);","SELECT venue FROM table_name_24 WHERE home = ""fk crvena stijena"";","SELECT venue FROM table_name_24 WHERE home = ""fk crvena stijena"";",1 List the top 3 countries with the most volunteer hours in Q2 2022.,"CREATE TABLE Volunteers (VolunteerID int, Name varchar(50), Country varchar(50), Hours decimal(5,2)); ","SELECT Country, SUM(Hours) as TotalHours FROM Volunteers WHERE QUARTER(VolunteerDate) = 2 GROUP BY Country ORDER BY TotalHours DESC LIMIT 3;","SELECT Country, SUM(Hours) as TotalHours FROM Volunteers WHERE QUARTER(VolunteerDate) = 2 GROUP BY Country ORDER BY TotalHours DESC LIMIT 3;",1 What is the title of the track after 11?,"CREATE TABLE table_name_93 (title VARCHAR, track INTEGER);",SELECT title FROM table_name_93 WHERE track > 11;,SELECT title FROM table_name_93 WHERE track > 11;,1 what is -kah (atau tidak when basikal is basikal and language dialect is malay language (informal)?,"CREATE TABLE table_name_98 (_kah__atau_tidak_ VARCHAR, language_dialect VARCHAR);","SELECT _kah__atau_tidak_ FROM table_name_98 WHERE ""basikal"" = ""basikal"" AND language_dialect = ""malay language (informal)"";","SELECT _kah__atau_tidak_ FROM table_name_98 WHERE language_dialect = ""malay language (informal)"";",0 "What was the total budget allocated for public transportation in 2019 and 2020, and which year had a lower allocation?","CREATE TABLE BudgetAllocations (Year INT, Service TEXT, Amount INT); ","SELECT Year, SUM(Amount) FROM BudgetAllocations WHERE Service = 'PublicTransportation' GROUP BY Year HAVING Year IN (2019, 2020) ORDER BY SUM(Amount) LIMIT 1;","SELECT Year, SUM(Amount) FROM BudgetAllocations WHERE Service = 'Public Transportation' GROUP BY Year ORDER BY SUM(Amount) DESC LIMIT 1;",0 "What is the total number of Wins, when Top-25 is less than 4, and when Top-10 is less than 1?","CREATE TABLE table_name_81 (wins VARCHAR, top_25 VARCHAR, top_10 VARCHAR);",SELECT COUNT(wins) FROM table_name_81 WHERE top_25 < 4 AND top_10 < 1;,SELECT COUNT(wins) FROM table_name_81 WHERE top_25 4 AND top_10 1;,0 What is the average donation amount per volunteer for the 'Helping Hands' program?,"CREATE TABLE Donations (id INT, donor_name VARCHAR(50), donation_amount DECIMAL(10,2), donation_date DATE, donor_program VARCHAR(50));","SELECT AVG(Donations.donation_amount) FROM Donations INNER JOIN (SELECT id, total_volunteers FROM Programs WHERE program_name = 'Helping Hands') AS ProgramVolunteers ON 1=1 WHERE Donations.donor_program = ProgramVolunteers.id;",SELECT AVG(donation_amount) FROM Donations WHERE donor_program = 'Helping Hands';,0 What is the Chinese name for the English name Andy Lau?,"CREATE TABLE table_name_58 (chinese_name VARCHAR, english_name VARCHAR);","SELECT chinese_name FROM table_name_58 WHERE english_name = ""andy lau"";","SELECT chinese_name FROM table_name_58 WHERE english_name = ""andy lau"";",1 "Insert a new record with permit ID 456, contractor 'Green Construction', and timeline '2022-01-01 - 2022-04-30' in the building_projects table","CREATE TABLE building_projects (permit_id INT, contractor VARCHAR(100), timeline DATE);","INSERT INTO building_projects (permit_id, contractor, timeline) VALUES (456, 'Green Construction', '2022-01-01'::DATE, '2022-04-30'::DATE);","INSERT INTO building_projects (permit_id, contractor, timeline) VALUES (456, 'Green Construction', '2022-01-01 - 2022-04-30');",0 What is the minimum price of size 8 jeans in the current season?,"CREATE TABLE Products (product_id INT, product_name VARCHAR(50), size INT, category VARCHAR(50), price DECIMAL(5,2), season VARCHAR(50)); ",SELECT MIN(price) FROM Products WHERE size = 8 AND category = 'Bottoms' AND season = 'Spring';,SELECT MIN(price) FROM Products WHERE category = 'Jeans' AND size = 8 AND season = '2020-01-01';,0 What was the average gift size in H2 2021 for nonprofits in the Education sector?,"CREATE TABLE donations (id INT, donation_date DATE, sector TEXT, amount DECIMAL(10,2)); ",SELECT AVG(amount) FROM donations WHERE sector = 'Education' AND donation_date BETWEEN '2021-07-01' AND '2021-12-31';,SELECT AVG(amount) FROM donations WHERE donation_date BETWEEN '2021-01-01' AND '2021-06-30' AND sector = 'Education';,0 Who was the away team in a tie no larger than 16 with forest green rovers at home?,"CREATE TABLE table_name_95 (away_team VARCHAR, tie_no VARCHAR, home_team VARCHAR);","SELECT away_team FROM table_name_95 WHERE tie_no > 16 AND home_team = ""forest green rovers"";","SELECT away_team FROM table_name_95 WHERE tie_no > 16 AND home_team = ""forest green rovers"";",1 Name the date with winner outcome and opponent of noppawan lertcheewakarn jessica moore,"CREATE TABLE table_name_82 (date VARCHAR, outcome VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_82 WHERE outcome = ""winner"" AND opponent = ""noppawan lertcheewakarn jessica moore"";","SELECT date FROM table_name_82 WHERE outcome = ""winner"" AND opponent = ""noppawan lertcheewakarn jessica moore"";",1 Which team was home on October 13?,"CREATE TABLE table_name_26 (home VARCHAR, date VARCHAR);","SELECT home FROM table_name_26 WHERE date = ""october 13"";","SELECT home FROM table_name_26 WHERE date = ""october 13"";",1 "What was the chassis when the entrant was Lavazza March, and the points were 0.5?","CREATE TABLE table_name_75 (chassis VARCHAR, entrant VARCHAR, points VARCHAR);","SELECT chassis FROM table_name_75 WHERE entrant = ""lavazza march"" AND points = 0.5;","SELECT chassis FROM table_name_75 WHERE entrant = ""lavazza march"" AND points = ""0.5"";",0 What is the total tons of minerals extracted and the average number of employees for each company in each state?,"CREATE TABLE mine_productivity (company VARCHAR(255), state VARCHAR(255), year INT, total_tons FLOAT, employees INT); ","SELECT company, state, SUM(total_tons) as total_tons, AVG(employees) as avg_employees FROM mine_productivity GROUP BY company, state;","SELECT company, state, SUM(total_tons) as total_tons, AVG(employees) as avg_employees FROM mine_productivity GROUP BY company, state;",1 List the names and positions of players on the 'soccer_team' table who are older than 30.,"CREATE TABLE soccer_team (player_id INT, name VARCHAR(50), age INT, position VARCHAR(20));","SELECT name, position FROM soccer_team WHERE age > 30;","SELECT name, position FROM soccer_team WHERE age > 30;",1 what is the capacity when the home city is zagreb and the manager is zlatko kranjčar?,"CREATE TABLE table_name_88 (capacity INTEGER, home_city VARCHAR, manager VARCHAR);","SELECT AVG(capacity) FROM table_name_88 WHERE home_city = ""zagreb"" AND manager = ""zlatko kranjčar"";","SELECT AVG(capacity) FROM table_name_88 WHERE home_city = ""zagreb"" AND manager = ""zlatko kranjar"";",0 Name the 012 club which has of norbert hosnyánszky category:articles with hcards?,CREATE TABLE table_name_23 (name VARCHAR);,"SELECT 2012 AS _club FROM table_name_23 WHERE name = ""norbert hosnyánszky category:articles with hcards"";","SELECT 012 AS club FROM table_name_23 WHERE name = ""norbert hosnyánszky category:articles with hcards"";",0 How many highways were built in the Eastern region before 2010?,"CREATE TABLE InfrastructureProjects (id INT, name VARCHAR(100), region VARCHAR(50), project_type VARCHAR(50), completion_date DATE); ",SELECT COUNT(*) FROM InfrastructureProjects WHERE region = 'Eastern' AND project_type = 'highway' AND completion_date < '2010-01-01';,SELECT COUNT(*) FROM InfrastructureProjects WHERE region = 'Eastern' AND project_type = 'Highway' AND completion_date '2010-01-01';,0 Find the client_id of the client who has the highest transaction amount in each region.,"CREATE TABLE clients (client_id INT, name TEXT, region TEXT, transaction_amount DECIMAL); ","SELECT client_id, region FROM (SELECT client_id, region, transaction_amount, ROW_NUMBER() OVER (PARTITION BY region ORDER BY transaction_amount DESC) AS rank FROM clients) AS ranked_clients WHERE rank = 1;","SELECT client_id, region, transaction_amount FROM clients ORDER BY transaction_amount DESC LIMIT 1;",0 What is the total number of emergency response units in California?,"CREATE TABLE EmergencyResponseUnits (id INT, state VARCHAR(20), unit_type VARCHAR(20), quantity INT);",SELECT SUM(quantity) FROM EmergencyResponseUnits WHERE state = 'California';,SELECT SUM(quantity) FROM EmergencyResponseUnits WHERE state = 'California';,1 What is the concert_location with the highest average attendee_age?,"CREATE TABLE concert_attendance (id INT, attendee_age INT, concert_location VARCHAR(50)); ","SELECT concert_location, AVG(attendee_age) AS avg_age FROM concert_attendance GROUP BY concert_location ORDER BY avg_age DESC LIMIT 1;","SELECT concert_location, AVG(attendee_age) as avg_attendee_age FROM concert_attendance GROUP BY concert_location ORDER BY avg_attendee_age DESC LIMIT 1;",0 Who was the girl of the week 3 weeks after brianne bailey in the same month?,"CREATE TABLE table_name_65 (week_5 VARCHAR, week_2 VARCHAR);","SELECT week_5 FROM table_name_65 WHERE week_2 = ""brianne bailey"";","SELECT week_5 FROM table_name_65 WHERE week_2 = ""brianne bailey"";",1 What was the average price of electric vehicle charging in Paris per kWh in Q2 2022?,"CREATE TABLE EV_Charging_Prices (city VARCHAR(20), quarter INT, year INT, avg_price DECIMAL(5,2)); ",SELECT AVG(avg_price) FROM EV_Charging_Prices WHERE city = 'Paris' AND quarter = 2 AND year = 2022;,SELECT AVG(avg_price) FROM EV_Charging_Prices WHERE city = 'Paris' AND quarter = 2 AND year = 2022;,1 "For Ynysybwl RFC, what was the losing bonus for 416 points?","CREATE TABLE table_name_48 (losing_bonus VARCHAR, points_for VARCHAR, club VARCHAR);","SELECT losing_bonus FROM table_name_48 WHERE points_for = ""416"" AND club = ""ynysybwl rfc"";","SELECT losing_bonus FROM table_name_48 WHERE points_for = ""416"" AND club = ""ynysybwl rfc"";",1 What is the number of sustainable fish farms in the Indian ocean?,"CREATE TABLE fish_farms (id INT, name TEXT, country TEXT, ocean TEXT, sustainable BOOLEAN); ",SELECT COUNT(*) FROM fish_farms WHERE ocean = 'Indian' AND sustainable = true;,SELECT COUNT(*) FROM fish_farms WHERE ocean = 'Indian' AND sustainable = TRUE;,0 "What is the lowest Population per km² (2009) that has a Solomon Islands province, with an Area (km²) smaller than 28,400?","CREATE TABLE table_name_21 (population_per_km²__2009_ INTEGER, province VARCHAR, area__km²_ VARCHAR);","SELECT MIN(population_per_km²__2009_) FROM table_name_21 WHERE province = ""solomon islands"" AND area__km²_ < 28 OFFSET 400;","SELECT MIN(population_per_km2__2009_) FROM table_name_21 WHERE province = ""somon islands"" AND area__km2_ 28 OFFSET 400;",0 Get total funding for electric vehicle adoption statistics research in Asia,"CREATE TABLE ev_research (id INT, region VARCHAR(50), funding FLOAT); ",SELECT SUM(funding) FROM ev_research WHERE region = 'Asia';,SELECT SUM(funding) FROM ev_research WHERE region = 'Asia';,1 What is the minimum budget allocated for technology for social good projects in Oceania countries?,"CREATE TABLE SocialGoodBudget (Country VARCHAR(50), Budget DECIMAL(10,2)); CREATE TABLE Countries (Country VARCHAR(50), Continent VARCHAR(50)); ",SELECT MIN(SocialGoodBudget.Budget) AS MinBudget FROM SocialGoodBudget INNER JOIN Countries ON SocialGoodBudget.Country = Countries.Country WHERE Countries.Continent = 'Oceania';,SELECT MIN(Budget) FROM SocialGoodBudget INNER JOIN Countries ON SocialGoodBudget.Country = Countries.Country WHERE Countries.Continent = 'Oceania';,0 What is the total quantity of each strain sold at dispensaries with equity grants greater than 60000?,"CREATE TABLE equity (id INT, dispensary_id INT, equity_grant INT, grant_date DATE); ","SELECT s.name as strain_name, SUM(sales.quantity) as total_quantity FROM sales JOIN dispensaries d ON sales.dispensary_id = d.id JOIN strains s ON sales.strain_id = s.id JOIN equity e ON d.id = e.dispensary_id WHERE e.equity_grant > 60000 GROUP BY s.name;","SELECT strain, SUM(quantity) FROM equity WHERE equity_grant > 60000 GROUP BY strain;",0 "Find the total number of flu vaccinations administered to children under 5 years old, grouped by state, for the year 2020.","CREATE TABLE vaccinations (vaccine_type VARCHAR(50), age INTEGER, state VARCHAR(50), year INTEGER, quantity INTEGER); ","SELECT state, SUM(quantity) as total_vaccinations FROM vaccinations WHERE vaccine_type = 'Flu' AND age < 5 AND year = 2020 GROUP BY state;","SELECT state, SUM(quantity) FROM vaccinations WHERE age 5 GROUP BY state;",0 What is the maximum number of silvers for a country with fewer than 12 golds and a total less than 8?,"CREATE TABLE table_name_72 (silver INTEGER, gold VARCHAR, total VARCHAR);",SELECT MAX(silver) FROM table_name_72 WHERE gold < 12 AND total < 8;,SELECT MAX(silver) FROM table_name_72 WHERE gold 12 AND total 8;,0 What's the sum of gold where silver is more than 2 and the total is 12?,"CREATE TABLE table_name_17 (gold INTEGER, silver VARCHAR, total VARCHAR);",SELECT SUM(gold) FROM table_name_17 WHERE silver > 2 AND total = 12;,SELECT SUM(gold) FROM table_name_17 WHERE silver > 2 AND total = 12;,1 List the number of unique achievements earned by players on '2022-01-02' in 'player_achievements' table,"CREATE TABLE player_achievements (player_id INT, achievement_name VARCHAR(255), date_earned DATE);",SELECT COUNT(DISTINCT achievement_name) FROM player_achievements WHERE date_earned = '2022-01-02';,SELECT COUNT(DISTINCT achievement_name) FROM player_achievements WHERE date_earned = '2022-01-02';,1 Update the temperature values in the weather_forecast table by adding 5 for all records where the forecast_date is in the next 3 days,"CREATE TABLE weather_forecast (forecast_date DATE, temperature INT, humidity INT);",UPDATE weather_forecast SET temperature = temperature + 5 WHERE forecast_date BETWEEN CURRENT_DATE + 1 AND CURRENT_DATE + 3;,"UPDATE weather_forecast SET temperature = temperature * 5 WHERE forecast_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 3 DAY) AND CURRENT_DATE;",0 Name province of 1936 viana do castelo,"CREATE TABLE table_221375_1 (province_of_1936 VARCHAR, district VARCHAR);","SELECT province_of_1936 FROM table_221375_1 WHERE district = ""Viana do Castelo"";","SELECT province_of_1936 FROM table_221375_1 WHERE district = ""Viana do Castello"";",0 "Which score has an Opponent of @ athletics, and a Record of 76-57?","CREATE TABLE table_name_19 (score VARCHAR, opponent VARCHAR, record VARCHAR);","SELECT score FROM table_name_19 WHERE opponent = ""@ athletics"" AND record = ""76-57"";","SELECT score FROM table_name_19 WHERE opponent = ""@ athletics"" AND record = ""76-57"";",1 Update the price of product 'A' to $50 in 'product' table,"CREATE TABLE product (product_id VARCHAR(10), name VARCHAR(50), price DECIMAL(5,2), supplier_id VARCHAR(10), primary key (product_id));",UPDATE product SET price = 50 WHERE product_id = 'A';,UPDATE product SET price = 50 WHERE name = 'A';,0 "What's the average Top-25, that has an Events that's smaller than 12, and has a Top-5 that is larger than 0?","CREATE TABLE table_name_60 (top_25 INTEGER, events VARCHAR, top_5 VARCHAR);",SELECT AVG(top_25) FROM table_name_60 WHERE events < 12 AND top_5 > 0;,SELECT AVG(top_25) FROM table_name_60 WHERE events 12 AND top_5 > 0;,0 Which supplier provided the most Holmium in 2017?,"CREATE TABLE supplier_holmium (year INT, supplier VARCHAR(20), holmium_supply INT); ","SELECT supplier, MAX(holmium_supply) FROM supplier_holmium WHERE year = 2017 GROUP BY supplier;","SELECT supplier, SUM(holmium_supply) as total_holmium_supply FROM supplier_holmium WHERE year = 2017 GROUP BY supplier ORDER BY total_holmium_supply DESC;",0 Determine the number of unique ethnicities in the entire workforce.,"CREATE TABLE Employees (Employee_ID INT, Mine_ID INT, Age INT, Gender VARCHAR(10), Department VARCHAR(20), Ethnicity VARCHAR(20), Hire_Date DATE); ",SELECT COUNT(DISTINCT Ethnicity) FROM Employees;,SELECT COUNT(DISTINCT Ethnicity) FROM Employees;,1 List the top 3 threat actors with the highest number of intrusion attempts in the last week?,"CREATE TABLE threat_actors (actor_id INT, actor_name VARCHAR(255), intrusion_attempts INT, last_seen TIMESTAMP); ","SELECT actor_name, intrusion_attempts FROM (SELECT actor_name, intrusion_attempts, ROW_NUMBER() OVER (ORDER BY intrusion_attempts DESC) as rank FROM threat_actors WHERE last_seen >= DATEADD(week, -1, CURRENT_TIMESTAMP)) subquery WHERE rank <= 3;","SELECT actor_name, intrusion_attempts FROM threat_actors WHERE last_seen >= DATEADD(week, -1, GETDATE()) GROUP BY actor_name ORDER BY intrusion_attempts DESC LIMIT 3;",0 Phil Klemmer wrote all titles and production code is 3t6455. ,"CREATE TABLE table_27115960_1 (title VARCHAR, written_by VARCHAR, production_code VARCHAR);","SELECT title FROM table_27115960_1 WHERE written_by = ""Phil Klemmer"" AND production_code = ""3T6455"";","SELECT title FROM table_27115960_1 WHERE written_by = ""Phil Klemmer"" AND production_code = ""3T6455"";",1 What's the total amount donated by small donors (those who have donated less than $1000) in the year 2020?,"CREATE TABLE donors (donor_id INT PRIMARY KEY, donation_amount DECIMAL(10, 2), donation_date DATE); ",SELECT SUM(donation_amount) FROM donors WHERE donation_amount < 1000 AND YEAR(donation_date) = 2020;,SELECT SUM(donation_amount) FROM donors WHERE donation_date BETWEEN '2020-01-01' AND '2020-12-31' AND donation_amount 1000;,0 How many water treatment plants in the state of California have been operational for more than 30 years?,"CREATE TABLE plants (plant_id INT, state VARCHAR(20), operational_date DATE); ","SELECT COUNT(*) FROM plants WHERE state = 'California' AND operational_date < DATE_SUB(CURDATE(), INTERVAL 30 YEAR);","SELECT COUNT(*) FROM plants WHERE state = 'California' AND operational_date >= DATE_SUB(CURRENT_DATE, INTERVAL 30 YEAR);",0 What is the total of laps run by the driver with a grid under 17 and a time of +5.088?,"CREATE TABLE table_name_3 (laps INTEGER, time VARCHAR, grid VARCHAR);","SELECT SUM(laps) FROM table_name_3 WHERE time = ""+5.088"" AND grid < 17;","SELECT SUM(laps) FROM table_name_3 WHERE time = ""+5.088"" AND grid 17;",0 What was the flyers' record when the visitors were florida?,"CREATE TABLE table_name_63 (record VARCHAR, visitor VARCHAR);","SELECT record FROM table_name_63 WHERE visitor = ""florida"";","SELECT record FROM table_name_63 WHERE visitor = ""florida"";",1 Tell me the Grantee for san ysidro,"CREATE TABLE table_name_34 (grantee VARCHAR, concession VARCHAR);","SELECT grantee FROM table_name_34 WHERE concession = ""san ysidro"";","SELECT grantee FROM table_name_34 WHERE concession = ""san ysidro"";",1 Update accessibility column to 90 in technology_accessibility table where region is 'Asia',"CREATE TABLE technology_accessibility (region VARCHAR(255), accessibility FLOAT, updated_on DATE);",UPDATE technology_accessibility SET accessibility = 90 WHERE region = 'Asia';,UPDATE technology_accessibility SET accessibility = 90 WHERE region = 'Asia';,1 "What is the total sales revenue for each drug in Q3 2020, grouped by drug category?","CREATE TABLE sales_3(drug_name TEXT, quarter INT, year INT, revenue FLOAT, drug_category TEXT); ","SELECT drug_category, SUM(revenue) FROM sales_3 WHERE quarter = 3 AND year = 2020 GROUP BY drug_category;","SELECT drug_category, SUM(revenue) FROM sales_3 WHERE quarter = 3 AND year = 2020 GROUP BY drug_category;",1 What is the average income of citizens in each Canadian province in 2020?,"CREATE TABLE incomes (id INT, province VARCHAR(50), income FLOAT, year INT); ","SELECT province, AVG(income) FROM incomes WHERE year = 2020 GROUP BY province;","SELECT province, AVG(income) FROM incomes WHERE year = 2020 GROUP BY province;",1 What was the total revenue for each art movement's works sold in 2021?,"CREATE TABLE ArtMovementSales (ArtMovement VARCHAR(255), ArtWork VARCHAR(255), Year INT, Revenue DECIMAL(10,2)); ","SELECT ArtMovement, SUM(Revenue) as TotalRevenue FROM ArtMovementSales WHERE Year = 2021 GROUP BY ArtMovement;","SELECT ArtMovement, SUM(Revenue) as TotalRevenue FROM ArtMovementSales WHERE Year = 2021 GROUP BY ArtMovement;",1 How many judges were there when the result is safe with a vote percentage of 10.7%?,"CREATE TABLE table_26375386_20 (judges INTEGER, result VARCHAR, vote_percentage VARCHAR);","SELECT MIN(judges) FROM table_26375386_20 WHERE result = ""Safe"" AND vote_percentage = ""10.7%"";","SELECT SUM(judges) FROM table_26375386_20 WHERE result = ""Safe"" AND vote_percentage = ""10.7%"";",0 What home team played at Glenferrie Oval?,"CREATE TABLE table_name_76 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_76 WHERE venue = ""glenferrie oval"";","SELECT home_team FROM table_name_76 WHERE venue = ""glenferrie oval"";",1 What is the total number of unique volunteers who have contributed more than '50' hours to each organization?,"CREATE TABLE Organizations (org_id INT, org_name TEXT); CREATE TABLE Volunteers (vol_id INT, volunteer_name TEXT, hours_contributed INT, org_id INT);","SELECT O.org_name, COUNT(DISTINCT V.vol_id) as total_volunteers FROM Organizations O INNER JOIN Volunteers V ON O.org_id = V.org_id WHERE V.hours_contributed > 50 GROUP BY O.org_name;","SELECT o.org_name, COUNT(DISTINCT v.vol_id) FROM Volunteers v JOIN Organizations o ON v.org_id = o.org_id GROUP BY o.org_name HAVING COUNT(DISTINCT v.hours_contributed) > 50;",0 What is the total warehouse space (square footage) for each warehouse location?,"CREATE TABLE warehouse (id VARCHAR(5), name VARCHAR(10), location VARCHAR(15), space_sqft INT); ","SELECT w.location, SUM(w.space_sqft) FROM warehouse w GROUP BY w.location;","SELECT location, SUM(space_sqft) FROM warehouse GROUP BY location;",0 "What date did the red wings play against the visitors, buffalo?","CREATE TABLE table_name_62 (date VARCHAR, visitor VARCHAR);","SELECT date FROM table_name_62 WHERE visitor = ""buffalo"";","SELECT date FROM table_name_62 WHERE visitor = ""buffalo"";",1 "How many users have posted content related to ""climate change"" in the past week, and what is their average age?","CREATE TABLE users (user_id INT, age INT, gender VARCHAR(50));CREATE TABLE posts (post_id INT, user_id INT, content TEXT, post_date DATE); ","SELECT AVG(age) as avg_age, COUNT(DISTINCT user_id) as num_users FROM users JOIN posts ON users.user_id = posts.user_id WHERE content LIKE '%climate change%' AND post_date >= DATEADD(day, -7, CURRENT_DATE);","SELECT COUNT(DISTINCT users.user_id) as num_users, AVG(users.age) as avg_age FROM users INNER JOIN posts ON users.user_id = posts.user_id WHERE posts.content LIKE '%climate change%' AND posts.post_date >= DATEADD(week, -1, GETDATE());",0 How many picks involved the player Joe Germanese?,"CREATE TABLE table_name_59 (pick__number INTEGER, player VARCHAR);","SELECT SUM(pick__number) FROM table_name_59 WHERE player = ""joe germanese"";","SELECT SUM(pick__number) FROM table_name_59 WHERE player = ""joe germanese"";",1 Show the number of male and female teachers in each school,"SELECT School, Gender, COUNT(*) as Count FROM Teachers GROUP BY School, Gender;","SELECT School, Gender, COUNT(*) as Count FROM Teachers GROUP BY School, Gender;","SELECT School, Gender, COUNT(*) as Count FROM Teachers GROUP BY School, Gender;",1 What is every English title for the result of nominee?,"CREATE TABLE table_22128871_1 (english_title VARCHAR, result VARCHAR);","SELECT english_title FROM table_22128871_1 WHERE result = ""Nominee"";","SELECT english_title FROM table_22128871_1 WHERE result = ""Nominee"";",1 What is the total number of vehicles in Paris?,"CREATE TABLE vehicles (id INT, city VARCHAR(50), type VARCHAR(50)); ",SELECT COUNT(*) FROM vehicles WHERE city = 'Paris';,SELECT COUNT(*) FROM vehicles WHERE city = 'Paris';,1 What is the least number of miss united continents? ,CREATE TABLE table_17522854_6 (miss_united_continent INTEGER);,SELECT MIN(miss_united_continent) FROM table_17522854_6;,SELECT MIN(miss_united_continent) FROM table_17522854_6;,1 What was the release date for metronome? ,"CREATE TABLE table_18138132_2 (release_date VARCHAR, title VARCHAR);","SELECT release_date FROM table_18138132_2 WHERE title = ""Metronome"";","SELECT release_date FROM table_18138132_2 WHERE title = ""Metronome"";",1 "What is the 2nd round with a score of 3 - 3, and a team 2 fc lorient (d2)?","CREATE TABLE table_name_60 (score VARCHAR, team_2 VARCHAR);","SELECT 2 AS nd_round FROM table_name_60 WHERE score = ""3 - 3"" AND team_2 = ""fc lorient (d2)"";","SELECT 2 AS nd_round FROM table_name_60 WHERE score = ""3 - 3"" AND team_2 = ""fc lorient (d2)"";",1 How many animals of each species are there in the 'Wetlands' habitat?,"CREATE TABLE animal_population (id INT, type VARCHAR(50), species VARCHAR(50), animals INT); ","SELECT species, SUM(animals) FROM animal_population WHERE type = 'Wetlands' GROUP BY species;","SELECT species, SUM(animals) FROM animal_population WHERE type = 'Wetlands' GROUP BY species;",1 Create a view for displaying equipment due for maintenance within a month,"CREATE TABLE military_equipment_maintenance (id INT PRIMARY KEY, equipment_type VARCHAR(255), last_maintenance_date DATE, next_maintenance_date DATE, maintenance_frequency_months INT);",CREATE VIEW equipment_maintenance_due AS SELECT * FROM military_equipment_maintenance WHERE next_maintenance_date BETWEEN CURRENT_DATE AND CURRENT_DATE + INTERVAL '1 month';,"CREATE VIEW maintenance_frequency_months AS SELECT equipment_type, last_maintenance_date, next_maintenance_date, maintenance_frequency_months FROM military_equipment_maintenance WHERE maintenance_frequency_months >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);",0 What is the average heart rate of users aged 25-34 during their workouts?,"CREATE TABLE Users (id INT, age INT, gender VARCHAR(10)); CREATE TABLE Workouts (id INT, userId INT, heartRate INT, duration INT); ",SELECT AVG(heartRate) FROM Workouts JOIN Users ON Workouts.userId = Users.id WHERE Users.age BETWEEN 25 AND 34;,SELECT AVG(HeartRate) FROM Workouts JOIN Users ON Workouts.userId = Users.id WHERE Users.age BETWEEN 25 AND 34;,0 How many pallets were returned to each warehouse in the reverse logistics process in January 2022?,"CREATE TABLE Warehouses (WarehouseID int, WarehouseName varchar(50)); CREATE TABLE ReverseLogistics (ReturnID int, WarehouseID int, Pallets int, ReturnDate date); ","SELECT Warehouses.WarehouseName, SUM(ReverseLogistics.Pallets) as TotalPallets FROM Warehouses INNER JOIN ReverseLogistics ON Warehouses.WarehouseID = ReverseLogistics.WarehouseID WHERE ReturnDate >= '2022-01-01' AND ReturnDate < '2022-02-01' GROUP BY Warehouses.WarehouseName;","SELECT Warehouses.WarehouseName, SUM(ReverseLogistics.Pallets) as TotalPallets FROM Warehouses INNER JOIN ReverseLogistics ON Warehouses.WarehouseID = ReverseLogistics.WarehouseID WHERE ReverseLogistics.ReturnDate BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY Warehouses.WarehouseName;",0 What are the names and descriptions of all vulnerabilities with a high severity rating?,"CREATE TABLE vulnerabilities (id INT, name VARCHAR(255), description TEXT, severity INT); ","SELECT name, description FROM vulnerabilities WHERE severity >= 7;","SELECT name, description FROM vulnerabilities WHERE severity = (SELECT MAX(severity) FROM vulnerabilities);",0 What was the team record when the team played @ Utah?,"CREATE TABLE table_21197135_1 (record VARCHAR, opponent VARCHAR);","SELECT record FROM table_21197135_1 WHERE opponent = ""@ Utah"";","SELECT record FROM table_21197135_1 WHERE opponent = ""@ Utah"";",1 How many returns were there to the Miami warehouse in Q2 2022?,"CREATE TABLE Returns (id INT, warehouse_id INT, return_date DATE); CREATE TABLE Warehouses (id INT, name TEXT, city TEXT, state TEXT); ",SELECT COUNT(*) FROM Returns JOIN Warehouses ON Returns.warehouse_id = Warehouses.id WHERE Warehouses.name = 'Miami Warehouse' AND EXTRACT(QUARTER FROM return_date) = 2 AND EXTRACT(YEAR FROM return_date) = 2022;,SELECT COUNT(*) FROM Returns JOIN Warehouses ON Returns.warehouse_id = Warehouses.id WHERE Warehouses.city = 'Miami' AND Warehouses.state = 'Miami' AND Returns.return_date BETWEEN '2022-04-01' AND '2022-06-30';,0 How many defense diplomacy events were held in 2021 in the Asia-Pacific region?,"CREATE TABLE DefenseDiplomacy (EventName VARCHAR(50), Year INT, Region VARCHAR(20)); ",SELECT COUNT(*) FROM DefenseDiplomacy WHERE Year = 2021 AND Region = 'Asia-Pacific';,SELECT COUNT(*) FROM DefenseDiplomacy WHERE Year = 2021 AND Region = 'Asia-Pacific';,1 What is the name of the rural clinic with the lowest patient volume in the Appalachian region?,"CREATE TABLE rural_clinics (id INT, region VARCHAR(255), name VARCHAR(255), patient_volume INT); ",SELECT name FROM rural_clinics WHERE region = 'Appalachian' ORDER BY patient_volume ASC LIMIT 1;,SELECT name FROM rural_clinics WHERE region = 'Appalachian' ORDER BY patient_volume LIMIT 1;,0 How many gluten-free items are available in the bakery category?,"CREATE TABLE inventory (id INT, category TEXT, item TEXT, gluten_free BOOLEAN); ",SELECT COUNT(*) FROM inventory WHERE category = 'bakery' AND gluten_free = true;,SELECT COUNT(*) FROM inventory WHERE category = 'bakery' AND gluten_free = true;,1 "How many unique users have interacted with posts containing the hashtag #vegan, in the last 3 days, from accounts located in Australia?","CREATE TABLE accounts (id INT, name VARCHAR(255), location VARCHAR(255)); CREATE TABLE posts (id INT, account_id INT, content TEXT, timestamp TIMESTAMP); CREATE TABLE interactions (id INT, post_id INT, user_id INT); ",SELECT COUNT(DISTINCT interactions.user_id) FROM interactions JOIN posts ON interactions.post_id = posts.id JOIN accounts ON posts.account_id = accounts.id WHERE posts.timestamp >= NOW() - INTERVAL '3 days' AND posts.content LIKE '%#vegan%' AND accounts.location = 'Australia';,"SELECT COUNT(DISTINCT user_id) FROM interactions JOIN accounts ON interactions.account_id = accounts.id JOIN posts ON interactions.post_id = posts.id WHERE posts.content LIKE '%#vegan%' AND posts.timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY);",0 Show the transportation methods in the 'city_transport' database that have a frequency higher than 'Bus' and 'Subway'.,"CREATE TABLE transport (id INT, method VARCHAR(50), frequency INT); ",SELECT method FROM transport WHERE frequency > (SELECT frequency FROM transport WHERE method = 'Bus') AND frequency > (SELECT frequency FROM transport WHERE method = 'Subway');,"SELECT method FROM transport WHERE frequency > (SELECT frequency FROM transport WHERE method IN ('Bus', 'Subway');",0 What are the Baronies when the area (in acres) is 276?,"CREATE TABLE table_30121082_1 (barony VARCHAR, area__acres__ VARCHAR);",SELECT barony FROM table_30121082_1 WHERE area__acres__ = 276;,SELECT barony FROM table_30121082_1 WHERE area__acres__ = 276;,1 "List defense projects and their respective start and end dates, along with the contract negotiation status, that are in the Middle East region and have a geopolitical risk score above 5, ordered by the geopolitical risk score in descending order.","CREATE TABLE ProjectTimelines (project_id INT, project_name VARCHAR(50), start_date DATE, end_date DATE, negotiation_status VARCHAR(50), geopolitical_risk_score INT, project_region VARCHAR(50)); ","SELECT project_name, start_date, end_date, negotiation_status, geopolitical_risk_score FROM ProjectTimelines WHERE project_region = 'Middle East' AND geopolitical_risk_score > 5 ORDER BY geopolitical_risk_score DESC;","SELECT project_name, start_date, end_date, negotiation_status, geopolitical_risk_score FROM ProjectTimelines WHERE project_region = 'Middle East' AND geopolitical_risk_score > 5 ORDER BY geopolitical_risk_score DESC;",1 Did the nominated work of white valentine win an award?,"CREATE TABLE table_name_61 (result VARCHAR, nominated_work VARCHAR);","SELECT result FROM table_name_61 WHERE nominated_work = ""white valentine"";","SELECT result FROM table_name_61 WHERE nominated_work = ""white valentine"";",1 What is the ICAO for Air Busan?,"CREATE TABLE table_name_63 (icao VARCHAR, callsign VARCHAR);","SELECT icao FROM table_name_63 WHERE callsign = ""air busan"";","SELECT icao FROM table_name_63 WHERE callsign = ""air busan"";",1 What is the total weight of parcels shipped from South Korea to Mexico in April?,"CREATE TABLE sk_mx_parcels (id INT, weight FLOAT, shipped_date DATE); ",SELECT SUM(weight) FROM sk_mx_parcels WHERE MONTH(shipped_date) = 4;,SELECT SUM(weight) FROM sk_mx_parcels WHERE shipped_date BETWEEN '2022-04-01' AND '2022-06-30';,0 What is the overall of the running back player?,"CREATE TABLE table_name_91 (overall VARCHAR, position VARCHAR);","SELECT overall FROM table_name_91 WHERE position = ""running back"";","SELECT overall FROM table_name_91 WHERE position = ""running back"";",1 What was the total number of places in which the draw was less than 4 and the amount lost was less than 6?,"CREATE TABLE table_name_73 (place VARCHAR, draw VARCHAR, lost VARCHAR);",SELECT COUNT(place) FROM table_name_73 WHERE draw < 4 AND lost < 6;,SELECT COUNT(place) FROM table_name_73 WHERE draw 4 AND lost 6;,0 "Create a table named ""marine_mammals""","CREATE TABLE marine_mammals (id INT PRIMARY KEY, name VARCHAR(255), species VARCHAR(255), population INT, conservation_status VARCHAR(255));","CREATE TABLE marine_mammals (id INT PRIMARY KEY, name VARCHAR(255), species VARCHAR(255), population INT, conservation_status VARCHAR(255));","CREATE TABLE marine_mammals (id INT PRIMARY KEY, name VARCHAR(255), species VARCHAR(255), population INT, conservation_status VARCHAR(255));",1 Show the pair of male and female names in all weddings after year 2014,"CREATE TABLE wedding (male_id VARCHAR, female_id VARCHAR, year INTEGER); CREATE TABLE people (name VARCHAR, people_id VARCHAR);","SELECT T2.name, T3.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id JOIN people AS T3 ON T1.female_id = T3.people_id WHERE T1.year > 2014;",SELECT T1.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id WHERE T2.year > 2014;,0 find the difference between the total carbon sequestration of oak and maple trees,"CREATE SCHEMA forestry; CREATE TABLE trees (id INT, species VARCHAR(50), carbon FLOAT); ","SELECT SUM(CASE WHEN species = 'oak' THEN carbon ELSE -1 * carbon END) AS oak_carbon, SUM(CASE WHEN species = 'maple' THEN carbon ELSE 0 END) AS maple_carbon, oak_carbon - maple_carbon AS diff FROM forestry.trees;",SELECT SUM(carbon) - SUM(carbon) FROM trees WHERE species = 'Oak' INTERSECT SELECT SUM(carbon) FROM forestry.trees WHERE species = 'Eagle';,0 "What is the average age of employees in the 'employees' table, for each unique job_title?","CREATE TABLE employees (id INT, first_name VARCHAR(50), last_name VARCHAR(50), job_title VARCHAR(50), department VARCHAR(50), age INT, PRIMARY KEY (id)); ","SELECT job_title, AVG(age) FROM employees GROUP BY job_title;","SELECT job_title, AVG(age) as avg_age FROM employees GROUP BY job_title;",0 Who built giancarlo fisichella's car?,"CREATE TABLE table_name_96 (constructor VARCHAR, driver VARCHAR);","SELECT constructor FROM table_name_96 WHERE driver = ""giancarlo fisichella"";","SELECT constructor FROM table_name_96 WHERE driver = ""giancarlo fisichella"";",1 "Which Puchat Ligi has a UEFA Cup smaller than 2, and a Player of takesure chinyama?","CREATE TABLE table_name_64 (puchat_ligi INTEGER, uefa_cup VARCHAR, player VARCHAR);","SELECT MIN(puchat_ligi) FROM table_name_64 WHERE uefa_cup < 2 AND player = ""takesure chinyama"";","SELECT SUM(puchat_ligi) FROM table_name_64 WHERE uefa_cup 2 AND player = ""takesure chinyama"";",0 What is the championship of Jem Karacan that has a total of 2 and a league cup more than 0?,"CREATE TABLE table_name_10 (championship VARCHAR, name VARCHAR, total VARCHAR, league_cup VARCHAR);","SELECT championship FROM table_name_10 WHERE total = 2 AND league_cup > 0 AND name = ""jem karacan"";","SELECT championship FROM table_name_10 WHERE total = 2 AND league_cup > 0 AND name = ""jem karacan"";",1 How many vessels have a safety record in the 'excellent' category?,"CREATE TABLE SafetyRecords (ID INT PRIMARY KEY, VesselID INT, Category TEXT); ",SELECT COUNT(*) FROM SafetyRecords WHERE Category = 'excellent';,SELECT COUNT(*) FROM SafetyRecords WHERE Category = 'excellent';,1 "Which episode had a share 16-19 of 23,22%?","CREATE TABLE table_29773532_21 (episode INTEGER, share_16_39 VARCHAR);","SELECT MAX(episode) FROM table_29773532_21 WHERE share_16_39 = ""23,22%"";","SELECT MAX(episode) FROM table_29773532_21 WHERE share_16_39 = ""23,22%"";",1 "What is the total amount donated by each donor in H1 2021, grouped by country?","CREATE TABLE Donors (DonorID INT, DonationDate DATE, Country TEXT); ","SELECT Country, SUM(TotalDonation) as 'Total Donated in H1 2021' FROM (SELECT DonorID, SUM(TotalDonation) as TotalDonation, Country FROM Donors WHERE DonationDate BETWEEN '2021-01-01' AND '2021-06-30' GROUP BY DonorID, Country) as Subquery GROUP BY Country;","SELECT Country, SUM(DonationAmount) FROM Donors WHERE DonationDate BETWEEN '2021-01-01' AND '2021-06-30' GROUP BY Country;",0 "What is the total number of humanitarian assistance incidents in the 'Assistance' table, for the 'Asia' region, that occurred in the year 2020?","CREATE TABLE Assistance (id INT, region VARCHAR(255), type VARCHAR(255), year INT);",SELECT COUNT(*) FROM Assistance WHERE region = 'Asia' AND year = 2020;,SELECT COUNT(*) FROM Assistance WHERE region = 'Asia' AND type = 'humanitarian assistance' AND year = 2020;,0 "What was the total revenue for music concerts, by city and month?","CREATE TABLE MusicConcerts (title VARCHAR(255), city VARCHAR(255), revenue FLOAT, concert_date DATE); ","SELECT city, DATE_PART('month', concert_date) as month, SUM(revenue) FROM MusicConcerts GROUP BY city, month;","SELECT city, EXTRACT(MONTH FROM concert_date) as month, SUM(revenue) as total_revenue FROM MusicConcerts GROUP BY city, month;",0 What is the distribution of mental health resource access by gender?,"CREATE TABLE gender (gender_code CHAR(1), gender_name VARCHAR(10)); CREATE TABLE students (student_id INT, gender_code CHAR(1), mental_health_resource_access DATE); ","SELECT g.gender_name, COUNT(DISTINCT students.student_id) AS student_count FROM gender g JOIN students ON g.gender_code = students.gender_code WHERE students.mental_health_resource_access >= DATEADD(month, -1, GETDATE()) GROUP BY g.gender_name;","SELECT g.gender_name, COUNT(s.student_id) as num_students FROM students s JOIN gender g ON s.gender_code = g.gender_code GROUP BY g.gender_name;",0 Which vendors have the highest percentage of sustainable materials?,"CREATE TABLE vendors (vendor_id INT, name TEXT, sustainable_materials_percentage DECIMAL(3,2)); ","SELECT name, sustainable_materials_percentage FROM vendors ORDER BY sustainable_materials_percentage DESC LIMIT 1;","SELECT name, sustainable_materials_percentage FROM vendors ORDER BY sustainable_materials_percentage DESC LIMIT 1;",1 What is the average expression level of gene 'ABC' in different samples?,"CREATE TABLE samples (sample_id INT, gene_name VARCHAR(10), expression_level FLOAT); ",SELECT AVG(expression_level) FROM samples WHERE gene_name = 'ABC',SELECT AVG(expression_level) FROM samples WHERE gene_name = 'ABC';,0 What is the total number of public records requests submitted to the city of Houston in 2019 and 2020?,"CREATE TABLE public_records_requests (id INT, city VARCHAR, year INT, submitted BOOLEAN); ",SELECT COUNT(*) FROM public_records_requests WHERE city = 'Houston' AND (year = 2019 OR year = 2020) AND submitted = TRUE;,"SELECT SUM(submitted) FROM public_records_requests WHERE city = 'Houston' AND year IN (2019, 2020);",0 Which Score has a Date of may 20?,"CREATE TABLE table_name_76 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_76 WHERE date = ""may 20"";","SELECT score FROM table_name_76 WHERE date = ""may 20"";",1 What is the total number of autonomous driving research papers published by Asian authors in 2020?,"CREATE TABLE ResearchPapers(Id INT, Title VARCHAR(50), Author VARCHAR(50), Year INT, Domain VARCHAR(50)); ",SELECT COUNT(*) FROM ResearchPapers WHERE Year = 2020 AND Domain = 'Asia';,SELECT COUNT(*) FROM ResearchPapers WHERE Domain = 'Autonomous Driving' AND Year = 2020;,0 "What is the sum of Silver, when Total is less than 1?","CREATE TABLE table_name_84 (silver INTEGER, total INTEGER);",SELECT SUM(silver) FROM table_name_84 WHERE total < 1;,SELECT SUM(silver) FROM table_name_84 WHERE total 1;,0 How many employees of different ethnicities work in the mining industry?,"CREATE TABLE employee_ethnicity (employee_id INT, ethnicity VARCHAR(50)); ","SELECT ethnicity, COUNT(*) FROM employee_ethnicity INNER JOIN mining_employees ON employee_ethnicity.employee_id = mining_employees.employee_id GROUP BY ethnicity;","SELECT ethnicity, COUNT(*) FROM employee_ethnicity GROUP BY ethnicity;",0 what are the air dates for episodes with the production code 08-02-214,"CREATE TABLE table_16390576_3 (original_air_date VARCHAR, production_code VARCHAR);","SELECT original_air_date FROM table_16390576_3 WHERE production_code = ""08-02-214"";","SELECT original_air_date FROM table_16390576_3 WHERE production_code = ""08-02-214"";",1 "What is the total donation amount for each program in the 'ProgramDonations' table, and the average donation amount for each program?","CREATE TABLE ProgramDonations (DonationID INT, ProgramName VARCHAR(50), DonationAmount DECIMAL(10, 2), DonationDate DATE);","SELECT ProgramName, SUM(DonationAmount) AS TotalDonations, AVG(DonationAmount) AS AvgDonation FROM ProgramDonations GROUP BY ProgramName;","SELECT ProgramName, SUM(DonationAmount) as TotalDonation, AVG(DonationAmount) as AvgDonation FROM ProgramDonations GROUP BY ProgramName;",0 Name the men doubles for els baert,"CREATE TABLE table_14903355_2 (men_doubles VARCHAR, womens_singles VARCHAR);","SELECT men_doubles FROM table_14903355_2 WHERE womens_singles = ""Els Baert"";","SELECT men_doubles FROM table_14903355_2 WHERE womens_singles = ""Els Baert"";",1 Calculate the total sales revenue and quantity sold for each product category in a specific year,"CREATE TABLE sales_data_4 (sale_id INT, product_id INT, sale_date DATE, price DECIMAL(5,2), quantity INT); ","SELECT category, YEAR(sale_date) AS year, SUM(price * quantity) AS total_sales_revenue, SUM(quantity) AS total_quantity_sold FROM sales_data_4 JOIN products ON sales_data_4.product_id = products.product_id GROUP BY category, year;","SELECT product_id, SUM(price * quantity) as total_revenue, SUM(quantity) as total_quantity FROM sales_data_4 WHERE sale_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE GROUP BY product_id;",0 What was the total revenue for defense projects with a duration over 24 months as of Q4 2022?,"CREATE TABLE defense_projects (id INT, project_name VARCHAR(50), start_date DATE, end_date DATE, revenue FLOAT); ","SELECT SUM(revenue) FROM defense_projects WHERE DATEDIFF(end_date, start_date) > 24 AND quarter = 'Q4' AND year = 2022;",SELECT SUM(revenue) FROM defense_projects WHERE start_date BETWEEN '2022-07-01' AND '2022-09-30' AND end_date BETWEEN '2022-09-30' AND '2022-09-30' AND duration > 24;,0 What is the total number of autonomous driving research papers published by authors from different countries?,"CREATE TABLE Research_Papers (Id INT, Author VARCHAR(255), Country VARCHAR(255), Title VARCHAR(255), Publication_Year INT, Autonomous_Driving_Research BOOLEAN); ","SELECT Country, COUNT(*) AS Total_Papers FROM Research_Papers WHERE Autonomous_Driving_Research = TRUE GROUP BY Country;","SELECT Country, COUNT(*) FROM Research_Papers WHERE Autonomous_Driving_Research = TRUE GROUP BY Country;",0 Which fields have experienced water shortage issues and have a higher average temperature than field C?,"CREATE TABLE Fields (FieldID varchar(5), FieldName varchar(10), AvgTemperature float, WaterShortageIssue bool); ",SELECT FieldName FROM Fields WHERE WaterShortageIssue = true AND AvgTemperature > (SELECT AvgTemperature FROM Fields WHERE FieldName = 'Field C');,SELECT FieldName FROM Fields WHERE WaterShortageIssue = true AND AvgTemperature > (SELECT AVG(AvgTemperature) FROM Fields WHERE FieldID = 'Field C');,0 List all mental health parity violations in California in the past year.,"CREATE TABLE MentalHealthParity (ID INT, Violation VARCHAR(255), State VARCHAR(255), Date DATE); ","SELECT * FROM MentalHealthParity WHERE State = 'California' AND Date >= DATEADD(year, -1, GETDATE());","SELECT Violation FROM MentalHealthParity WHERE State = 'California' AND Date >= DATEADD(year, -1, GETDATE());",0 What is the average recycling rate per month in 'CityE'?,"CREATE TABLE CityE (RecyclingQuantity INT, GenerationDate DATE); ","SELECT AVG(RecyclingQuantity) FROM (SELECT RecyclingQuantity, ROW_NUMBER() OVER (PARTITION BY EXTRACT(MONTH FROM GenerationDate) ORDER BY GenerationDate) as rn FROM CityE) tmp WHERE rn = 1;","SELECT AVG(RecyclingQuantity) FROM CityE WHERE GenerationDate BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) AND CURRENT_DATE;",0 "What number has an acquisition via the Rookie Draft, and is part of a School/club team at Cal State Fullerton?","CREATE TABLE table_name_54 (number VARCHAR, acquisition_via VARCHAR, school_club_team VARCHAR);","SELECT number FROM table_name_54 WHERE acquisition_via = ""rookie draft"" AND school_club_team = ""cal state fullerton"";","SELECT number FROM table_name_54 WHERE acquisition_via = ""rookie draft"" AND school_club_team = ""cal state fullerton"";",1 "What is the rank of a country with more than 2 gold, less than 5 silver, and less than 31 total medals?","CREATE TABLE table_name_67 (rank INTEGER, silver VARCHAR, gold VARCHAR, total VARCHAR);",SELECT SUM(rank) FROM table_name_67 WHERE gold > 2 AND total < 31 AND silver < 5;,SELECT AVG(rank) FROM table_name_67 WHERE gold > 2 AND total 31 AND silver 5;,0 What is the average population of marine species in the Indian Ocean?,"CREATE TABLE marine_species_indian (name VARCHAR(255), region VARCHAR(255), population INT); ",SELECT AVG(population) FROM marine_species_indian WHERE region = 'Indian';,SELECT AVG(population) FROM marine_species_indian WHERE region = 'Indian Ocean';,0 What is the sum of water bills for residential and commercial sectors in California for 2021?,"CREATE TABLE california_water_bills (id INT, sector VARCHAR(50), year INT, amount FLOAT); ","SELECT SUM(amount) FROM california_water_bills WHERE sector IN ('Residential', 'Commercial') AND year = 2021;","SELECT SUM(amount) FROM california_water_bills WHERE sector IN ('Residential', 'Commercial') AND year = 2021;",1 Name who directed season 1,"CREATE TABLE table_20704243_5 (directed_by VARCHAR, season__number VARCHAR);",SELECT directed_by FROM table_20704243_5 WHERE season__number = 1;,SELECT directed_by FROM table_20704243_5 WHERE season__number = 1;,1 What is the total number of articles by each author?,"CREATE TABLE authors (id INT, name TEXT); CREATE TABLE articles (id INT, author_id INT, title TEXT); ","SELECT a.name, COUNT(*) as article_count FROM authors a JOIN articles ar ON a.id = ar.author_id GROUP BY a.name;","SELECT a.name, COUNT(a.id) as total_articles FROM authors a JOIN articles a ON a.id = a.author_id GROUP BY a.name;",0 What was the home team score for the game played at MCG?,"CREATE TABLE table_name_61 (home_team VARCHAR, venue VARCHAR);","SELECT home_team AS score FROM table_name_61 WHERE venue = ""mcg"";","SELECT home_team AS score FROM table_name_61 WHERE venue = ""mcg"";",1 List all the organizations in 'org_info' table located in 'New York'?,"CREATE TABLE org_info (org_name VARCHAR(50), location VARCHAR(50)); ",SELECT org_name FROM org_info WHERE location = 'New York';,SELECT org_name FROM org_info WHERE location = 'New York';,1 What is the average revenue for restaurants serving Chinese food?,"CREATE TABLE Restaurants (id INT, name TEXT, type TEXT, revenue FLOAT); ",SELECT AVG(revenue) FROM Restaurants WHERE type = 'Chinese';,SELECT AVG(revenue) FROM Restaurants WHERE type = 'Chinese';,1 What are the geopolitical risk assessments for the Middle East in the last 6 months?,"CREATE TABLE RiskAssessments (AssessmentID INT, AssessmentName VARCHAR(50), AssessmentDate DATE, Region VARCHAR(50), RiskLevel VARCHAR(50)); ","SELECT AssessmentName, Region, RiskLevel FROM RiskAssessments WHERE Region = 'Middle East' AND AssessmentDate >= DATEADD(month, -6, GETDATE());","SELECT AssessmentName FROM RiskAssessments WHERE Region = 'Middle East' AND AssessmentDate >= DATEADD(month, -6, GETDATE());",0 What is the total biomass of deciduous trees per wildlife habitat?,"CREATE TABLE tree_types (id INT, name VARCHAR(255)); CREATE TABLE trees (id INT, biomass INT, tree_type_id INT); CREATE TABLE wildlife_habitats (id INT, name VARCHAR(255)); CREATE TABLE tree_habitat_associations (tree_id INT, habitat_id INT); ","SELECT h.name habitat, SUM(t.biomass) total_biomass FROM trees t JOIN tree_habitat_associations tha ON t.id = tha.tree_id JOIN wildlife_habitats h ON tha.habitat_id = h.id JOIN tree_types tt ON t.tree_type_id = tt.id WHERE tt.name = 'Deciduous' GROUP BY h.name;","SELECT t.name, SUM(t.biomass) FROM trees t JOIN wildlife_habitats w ON t.id = w.id JOIN tree_habitat_associations tHA ON t.id = tha.tree_id JOIN tree_types t ON t.id = t.id JOIN wildlife_habitats w ON t.habitat_id = w.id GROUP BY t.name;",0 What is the total billing amount for cases with a verdict of 'Not Guilty' in the year 2021?,"CREATE TABLE cases (case_id INT, verdict TEXT, billing_amount INT, case_year INT);",SELECT SUM(billing_amount) FROM cases WHERE verdict = 'Not Guilty' AND case_year = 2021;,SELECT SUM(billing_amount) FROM cases WHERE verdict = 'Not Guilty' AND case_year = 2021;,1 "Show the first year and last year of parties with theme ""Spring"" or ""Teqnology"".","CREATE TABLE party (First_year VARCHAR, Last_year VARCHAR, Party_Theme VARCHAR);","SELECT First_year, Last_year FROM party WHERE Party_Theme = ""Spring"" OR Party_Theme = ""Teqnology"";","SELECT First_year, Last_year FROM party WHERE Party_Theme = ""Spring"" OR Party_Theme = ""Teqnology"";",1 Show the total budget for habitat preservation in 'habitat_preservation' table for the African region,"CREATE TABLE habitat_preservation (id INT, region VARCHAR(50), budget DECIMAL(10,2));",SELECT SUM(budget) FROM habitat_preservation WHERE region = 'African';,SELECT SUM(budget) FROM habitat_preservation WHERE region = 'Africa';,0 What's the average Week with the Result l 23–3?,"CREATE TABLE table_name_49 (week INTEGER, result VARCHAR);","SELECT AVG(week) FROM table_name_49 WHERE result = ""l 23–3"";","SELECT AVG(week) FROM table_name_49 WHERE result = ""l 23–3"";",1 Who wrote episode #1 in season 7?,"CREATE TABLE table_10470082_8 (writer VARCHAR, _number VARCHAR);",SELECT COUNT(writer) FROM table_10470082_8 WHERE _number = 1;,"SELECT writer FROM table_10470082_8 WHERE _number = ""#1"";",0 What is the occupation of the candidate that resides in Windsor Junction?,"CREATE TABLE table_name_38 (occupation VARCHAR, residence VARCHAR);","SELECT occupation FROM table_name_38 WHERE residence = ""windsor junction"";","SELECT occupation FROM table_name_38 WHERE residence = ""windor junction"";",0 Which mountain range contains Sierra Blanca Peak?,"CREATE TABLE table_name_68 (mountain_range VARCHAR, mountain_peak VARCHAR);","SELECT mountain_range FROM table_name_68 WHERE mountain_peak = ""sierra blanca peak"";","SELECT mountain_range FROM table_name_68 WHERE mountain_peak = ""sierra blanca"";",0 What is the ratio of electric scooters to autonomous buses in Singapore?,"CREATE TABLE singapore_escooters(id INT, count INT); CREATE TABLE singapore_abuses(id INT, count INT); ",SELECT COUNT(*) * 1.0 / (SELECT COUNT(*) FROM singapore_abuses) FROM singapore_escooters;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM singapore_escooters)) AS ratio FROM singapore_escooters JOIN singapore_abuses ON singapore_escooters.id = singapore_abuses.id;,0 what day was the score 39-14,"CREATE TABLE table_name_58 (date VARCHAR, record VARCHAR);","SELECT date FROM table_name_58 WHERE record = ""39-14"";","SELECT date FROM table_name_58 WHERE record = ""39-14"";",1 What position has a 2-6 agg.?,"CREATE TABLE table_name_8 (position VARCHAR, agg VARCHAR);","SELECT position FROM table_name_8 WHERE agg = ""2-6"";","SELECT position FROM table_name_8 WHERE agg = ""2-6"";",1 For team #40 chip ganassi racing which top 5 is the highest where top 10 is 5?,"CREATE TABLE table_1708014_1 (top_5 INTEGER, top_10 VARCHAR, team_s_ VARCHAR);","SELECT MAX(top_5) FROM table_1708014_1 WHERE top_10 = 5 AND team_s_ = ""#40 Chip Ganassi Racing"";","SELECT MAX(top_5) FROM table_1708014_1 WHERE top_10 = 5 AND team_s_ = ""#40 Chip Ganassi Racing"";",1 What are the top 3 most sold menu items in the Southeast region?,"CREATE TABLE menu_items (item_id INT, item_name VARCHAR(50), region VARCHAR(20), sales INT); ","SELECT item_name, SUM(sales) as total_sales FROM menu_items WHERE region = 'Southeast' GROUP BY item_name ORDER BY total_sales DESC LIMIT 3;","SELECT item_name, SUM(sales) as total_sales FROM menu_items WHERE region = 'Southeast' GROUP BY item_name ORDER BY total_sales DESC LIMIT 3;",1 What is the percentage of women in managerial positions in the Mining department?,"CREATE TABLE Employees(id INT, name VARCHAR(50), department VARCHAR(50), position VARCHAR(50), salary FLOAT, full_time BOOLEAN, gender VARCHAR(50));","SELECT ROUND(COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Employees WHERE department = 'Mining' AND full_time = TRUE AND gender = 'Female'), 2) AS Percentage FROM Employees WHERE department = 'Mining' AND full_time = TRUE AND position LIKE '%Manager%';",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Employees WHERE department = 'Mining')) AS percentage FROM Employees WHERE department = 'Mining' AND position = 'Manager' AND gender = 'Female';,0 What is the average moisture level for each crop type in the past month?,"CREATE TABLE crop_moisture (id INT, crop_id INT, type VARCHAR(255), moisture FLOAT, timestamp DATETIME);","SELECT type, AVG(moisture) as avg_moisture FROM crop_moisture WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY type;","SELECT type, AVG(moisture) as avg_moisture FROM crop_moisture WHERE timestamp >= DATEADD(month, -1, GETDATE()) GROUP BY type;",0 Delete records of athletes who haven't participated in any events,"CREATE TABLE athletes (athlete_id INT, name VARCHAR(50), sport VARCHAR(50)); CREATE TABLE events (event_id INT, event_name VARCHAR(50), year INT); CREATE TABLE athlete_events (athlete_id INT, event_id INT); ",DELETE FROM athletes WHERE athlete_id NOT IN (SELECT athlete_id FROM athlete_events WHERE athlete_id IS NOT NULL);,DELETE FROM athletes WHERE athlete_id NOT IN (SELECT athlete_id FROM athlete_events);,0 Show all records from the bike sharing table,"CREATE TABLE bike_share (id INT PRIMARY KEY, station_name VARCHAR(255), station_latitude DECIMAL(9,6), station_longitude DECIMAL(9,6), dock_count INT, city VARCHAR(255)); ",SELECT * FROM bike_share;,SELECT * FROM bike_share;,1 Which food supplier had the most safety violations in 2021?,"CREATE TABLE SupplierSafetyRecords (SupplierName VARCHAR(50), Year INT, SafetyViolations INT); ","SELECT SupplierName, MAX(SafetyViolations) FROM SupplierSafetyRecords WHERE Year = 2021 GROUP BY SupplierName;","SELECT SupplierName, SafetyViolations FROM SupplierSafetyRecords WHERE Year = 2021 ORDER BY SafetyViolations DESC LIMIT 1;",0 "What is the count of IoT sensors in ""DE-BW"" and ""CH-AG""?","CREATE TABLE Sensor (id INT, sensor_id INT, location VARCHAR(255)); ","SELECT COUNT(DISTINCT sensor_id) FROM Sensor WHERE location IN ('DE-BW', 'CH-AG');","SELECT COUNT(*) FROM Sensor WHERE location IN ('DE-BW', 'CH-AG');",0 Who has the highest number of assists in the 2022 NBA season for each team?,"CREATE TABLE nba_assists (player_id INT, player_name TEXT, team_id INT, assists INT); ","SELECT team_id, MAX(assists) OVER (PARTITION BY team_id ORDER BY team_id) AS highest_assists FROM nba_assists;","SELECT team_id, MAX(assists) FROM nba_assists GROUP BY team_id;",0 What is the total budget allocated for disability support programs for each disability type?,"CREATE TABLE DisabilitySupportPrograms (ID INT, Disability VARCHAR(50), Program VARCHAR(50), Budget INT); ","SELECT Disability, SUM(Budget) as TotalBudget FROM DisabilitySupportPrograms GROUP BY Disability;","SELECT Disability, SUM(Budget) FROM DisabilitySupportPrograms GROUP BY Disability;",0 Show all ages and corresponding number of students.,CREATE TABLE Student (age VARCHAR);,"SELECT age, COUNT(*) FROM Student GROUP BY age;","SELECT age, COUNT(*) FROM Student GROUP BY age;",1 What is the average temperature change in Iceland from 2010 to 2020?,"CREATE TABLE TemperatureChange (year INT, avg_change FLOAT); ",SELECT AVG(avg_change) FROM TemperatureChange WHERE year BETWEEN 2010 AND 2020 AND location = 'Iceland';,SELECT AVG(avg_change) FROM TemperatureChange WHERE year BETWEEN 2010 AND 2020 AND country = 'Iceland';,0 Which Angle from center/° has a Taper/ft smaller than 0.6000000000000001?,"CREATE TABLE table_name_97 (angle_from_center_ VARCHAR, taper VARCHAR, ft VARCHAR);",SELECT COUNT(angle_from_center_) AS ° FROM table_name_97 WHERE taper / ft < 0.6000000000000001;,SELECT angle_from_center_ FROM table_name_97 WHERE taper 0.6000000000000001;,0 What was the session at the circuit of lowes motor speedway?,"CREATE TABLE table_name_70 (session VARCHAR, circuit VARCHAR);","SELECT session FROM table_name_70 WHERE circuit = ""lowes motor speedway"";","SELECT session FROM table_name_70 WHERE circuit = ""lowes motor speedway"";",1 What prize did good old boy win in 2002 at the camra london and south east regional competition?,"CREATE TABLE table_name_31 (prize VARCHAR, beer_name VARCHAR, year VARCHAR, competition VARCHAR);","SELECT prize FROM table_name_31 WHERE year > 2002 AND competition = ""camra london and south east regional competition"" AND beer_name = ""good old boy"";","SELECT prize FROM table_name_31 WHERE year = 2002 AND competition = ""camra london and south east regional competition"" AND beer_name = ""good old boy"";",0 Find the number of female professors in the 'Humanities' department.,"CREATE TABLE departments (dept_name VARCHAR(255), num_professors INT, num_female_professors INT); ",SELECT SUM(num_female_professors) FROM departments WHERE dept_name = 'Humanities';,SELECT num_female_professors FROM departments WHERE department_name = 'Humanities';,0 What is the total billing amount for cases handled by attorney 'Johnson'?,"CREATE TABLE attorneys (attorney_id INT, name VARCHAR(50)); CREATE TABLE cases (case_id INT, attorney_id INT, billing_amount DECIMAL(10,2)); ",SELECT SUM(cases.billing_amount) FROM cases INNER JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.name = 'Johnson';,SELECT SUM(billing_amount) FROM cases JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.name = 'Johnson';,0 Update the investment amount for an existing network investment in the 'network_investments' table,"CREATE TABLE network_investments (investment_id INT, investment_name VARCHAR(255), investment_type VARCHAR(255), investment_amount DECIMAL(10,2), date DATE);",UPDATE network_investments SET investment_amount = 6000000.00 WHERE investment_id = 4001;,UPDATE network_investments SET investment_amount = investment_amount WHERE investment_type = 'Network';,0 How many venues had a race called the Australia Stakes?,"CREATE TABLE table_14981555_3 (venue VARCHAR, race VARCHAR);","SELECT COUNT(venue) FROM table_14981555_3 WHERE race = ""Australia Stakes"";","SELECT COUNT(venue) FROM table_14981555_3 WHERE race = ""Australia Stakes"";",1 Which league has a pick number larger than 204 from Canada and LW as the position?,"CREATE TABLE table_name_61 (league_from VARCHAR, position VARCHAR, pick__number VARCHAR, nationality VARCHAR);","SELECT league_from FROM table_name_61 WHERE pick__number > 204 AND nationality = ""canada"" AND position = ""lw"";","SELECT league_from FROM table_name_61 WHERE pick__number > 204 AND nationality = ""canada"" AND position = ""lw"";",1 How tall is Zipp Duncan?,"CREATE TABLE table_name_30 (height VARCHAR, name VARCHAR);","SELECT height FROM table_name_30 WHERE name = ""zipp duncan"";","SELECT height FROM table_name_30 WHERE name = ""zipp duncan"";",1 Delete the satellite with ID 4 from the Satellites table.,"CREATE TABLE Satellites (id INT, name VARCHAR(50), launch_date DATE, status VARCHAR(50)); ",DELETE FROM Satellites WHERE id = 4;,DELETE FROM Satellites WHERE id = 4;,1 What results in 2012 also has 2013 results of 2r and the tournament was Wimbledon?,CREATE TABLE table_name_65 (tournament VARCHAR);,"SELECT 2012 FROM table_name_65 WHERE 2013 = ""2r"" AND tournament = ""wimbledon"";","SELECT 2012 FROM table_name_65 WHERE 2013 = ""2r"" AND tournament = ""wimbledon"";",1 Name the lpsos 3/14/09 for opinionway of 4/17/09 of 5% and lfof 11/12/08 of 7%,"CREATE TABLE table_name_33 (ipsos_3_14_09 VARCHAR, ifop_11_12_08 VARCHAR, opinionway_4_17_09 VARCHAR);","SELECT ipsos_3_14_09 FROM table_name_33 WHERE ifop_11_12_08 = ""7%"" AND opinionway_4_17_09 = ""5%"";","SELECT ipsos_3_14_09 FROM table_name_33 WHERE ifop_11_12_08 = ""7%"" AND opinionway_4_17_09 = ""5%"";",1 Insert new records for a new region 'West' with rainfall readings.,"CREATE TABLE rainfall_data (id INT, region VARCHAR(255), rainfall INT, measurement_date DATE);","INSERT INTO rainfall_data (id, region, rainfall, measurement_date) VALUES (5, 'West', 35, '2021-07-01'); INSERT INTO rainfall_data (id, region, rainfall, measurement_date) VALUES (6, 'West', 32, '2021-07-02');","INSERT INTO rainfall_data (region, rainfall, measurement_date) VALUES ('West', '2022-01-01');",0 Please show the themes of competitions with host cities having populations larger than 1000.,"CREATE TABLE city (City_ID VARCHAR, Population INTEGER); CREATE TABLE farm_competition (Theme VARCHAR, Host_city_ID VARCHAR);",SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000;,SELECT T1.Theme FROM farm_competition AS T1 JOIN city AS T2 ON T1.Host_city_ID = T2.City_ID WHERE T2.Population > 1000;,0 What's the score on April 9?,"CREATE TABLE table_name_12 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_12 WHERE date = ""april 9"";","SELECT score FROM table_name_12 WHERE date = ""april 9"";",1 What is the percentage of urban agriculture initiatives in Australia?,"CREATE TABLE urban_initiatives (country VARCHAR(255), initiative_type VARCHAR(255), percentage DECIMAL(5,2)); CREATE VIEW australian_urban_initiatives AS SELECT * FROM urban_initiatives WHERE country = 'Australia';",SELECT percentage FROM australian_urban_initiatives WHERE initiative_type = 'Urban Agriculture';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM australian_urban_initiatives)) FROM australian_urban_initiatives);,0 List all cities with public transportation systems and their respective fleet sizes,"CREATE TABLE cities (id INT, city_name VARCHAR(30), population INT); CREATE TABLE public_transportation (id INT, city_id INT, system_type VARCHAR(20), fleet_size INT); ","SELECT cities.city_name, public_transportation.fleet_size FROM cities INNER JOIN public_transportation ON cities.id = public_transportation.city_id;","SELECT cities.city_name, public_transportation.flight_size FROM cities INNER JOIN public_transportation ON cities.id = public_transportation.city_id;",0 What is the number of wells drilled by each driller and the total production volume for each driller?,"CREATE TABLE wells (id INT, driller VARCHAR(255), well VARCHAR(255), production_type VARCHAR(255), production_volume INT); ","SELECT driller, COUNT(*), SUM(production_volume) FROM wells GROUP BY driller;","SELECT driller, COUNT(*) as num_wells, SUM(production_volume) as total_volume FROM wells GROUP BY driller;",0 What is the maximum claim amount paid to policyholders in 'Alabama' and 'Alaska'?,"CREATE TABLE claims (policyholder_id INT, claim_amount DECIMAL(10,2), policyholder_state VARCHAR(20)); ","SELECT MAX(claim_amount) FROM claims WHERE policyholder_state IN ('Alabama', 'Alaska');","SELECT MAX(claim_amount) FROM claims WHERE policyholder_state IN ('Alabama', 'Alaska');",1 Delete space debris records older than 15 years from the space_debris table.,"CREATE TABLE space_debris (debris_id INT, debris_name VARCHAR(255), date_of_launch DATE, location VARCHAR(255));","DELETE FROM space_debris WHERE date_of_launch < DATE_SUB(CURRENT_DATE, INTERVAL 15 YEAR);","DELETE FROM space_debris WHERE date_of_launch DATE_SUB(CURRENT_DATE, INTERVAL 15 YEAR);",0 How many visitors engaged in sustainable tourism activities in Canada in 2020?,"CREATE TABLE visitors (id INT, year INT, country TEXT, engaged_in_sustainable_tourism BOOLEAN); ",SELECT SUM(engaged_in_sustainable_tourism) FROM visitors WHERE year = 2020 AND country = 'Canada';,SELECT COUNT(*) FROM visitors WHERE year = 2020 AND engaged_in_sustainable_tourism = TRUE AND country = 'Canada';,0 What is the total installed capacity (in MW) of wind farms in the 'west' region?,"CREATE TABLE wind_farms (id INT, name TEXT, region TEXT, capacity_mw FLOAT); ",SELECT SUM(capacity_mw) FROM wind_farms WHERE region = 'west';,SELECT SUM(capacity_mw) FROM wind_farms WHERE region = 'west';,1 Which year has has a Engine of maserati straight-6?,"CREATE TABLE table_name_31 (year VARCHAR, engine VARCHAR);","SELECT COUNT(year) FROM table_name_31 WHERE engine = ""maserati straight-6"";","SELECT year FROM table_name_31 WHERE engine = ""maserati straight-6"";",0 How many biosensor technology projects were completed in Q2 2021?,"CREATE SCHEMA if not exists biotech;CREATE TABLE if not exists biotech.projects (id INT, name VARCHAR(100), status VARCHAR(20), completion_date DATE); ",SELECT COUNT(*) FROM biotech.projects WHERE status = 'Completed' AND completion_date BETWEEN '2021-04-01' AND '2021-06-30';,SELECT COUNT(*) FROM biotech.projects WHERE status = 'Completed' AND completion_date BETWEEN '2021-04-01' AND '2021-06-30';,1 What is the total cargo weight for each vessel that docked in Hong Kong in the last 6 months?,"CREATE TABLE Port (port_id INT PRIMARY KEY, port_name VARCHAR(255)); CREATE TABLE Vessel (vessel_id INT PRIMARY KEY, vessel_name VARCHAR(255)); CREATE TABLE Cargo (cargo_id INT, vessel_id INT, cargo_weight INT, PRIMARY KEY (cargo_id, vessel_id)); CREATE TABLE Vessel_Movement (vessel_id INT, movement_date DATE, port_id INT, PRIMARY KEY (vessel_id, movement_date));","SELECT V.vessel_name, SUM(C.cargo_weight) FROM Vessel V JOIN Cargo C ON V.vessel_id = C.vessel_id JOIN Vessel_Movement VM ON V.vessel_id = VM.vessel_id WHERE VM.movement_date >= DATEADD(month, -6, GETDATE()) AND VM.port_id = (SELECT port_id FROM Port WHERE port_name = 'Hong Kong') GROUP BY V.vessel_name;","SELECT v.vessel_name, SUM(c.cargo_weight) as total_cargo_weight FROM Vessel v JOIN Cargo c ON v.vessel_id = c.vessel_id JOIN Vessel_Movement vm ON v.vessel_id = vm.vessel_id WHERE vm.movement_date >= DATEADD(month, -6, GETDATE()) GROUP BY v.vessel_name;",0 What were the location and attendance for the game against New Jersey?,"CREATE TABLE table_name_33 (location_attendance VARCHAR, team VARCHAR);","SELECT location_attendance FROM table_name_33 WHERE team = ""new jersey"";","SELECT location_attendance FROM table_name_33 WHERE team = ""new jersey"";",1 What is the date of vacancy when the manner of departure is sacked and the team is nejapa?,"CREATE TABLE table_name_45 (date_of_vacancy VARCHAR, manner_of_departure VARCHAR, team VARCHAR);","SELECT date_of_vacancy FROM table_name_45 WHERE manner_of_departure = ""sacked"" AND team = ""nejapa"";","SELECT date_of_vacancy FROM table_name_45 WHERE manner_of_departure = ""sacked"" AND team = ""nejapa"";",1 How many AI ethics violations were recorded in North America before 2017?,"CREATE TABLE EthicsViolations (ViolationId INT, Name TEXT, Type TEXT, Year INT, Country TEXT); ",SELECT COUNT(*) FROM EthicsViolations WHERE Type = 'AI Ethics' AND Year < 2017;,SELECT COUNT(*) FROM EthicsViolations WHERE Type = 'AI' AND Year 2017 AND Country = 'North America';,0 "What is the winning score before 1959, with runner-up Jackie Pung?","CREATE TABLE table_name_87 (winning_score VARCHAR, year VARCHAR, runner_s__up VARCHAR);","SELECT winning_score FROM table_name_87 WHERE year < 1959 AND runner_s__up = ""jackie pung"";","SELECT winning_score FROM table_name_87 WHERE year 1959 AND runner_s__up = ""jackie pung"";",0 Show the top 3 'Apex Legends' players with the highest kill-death ratio in the current season.,"CREATE TABLE matches (id INT, game VARCHAR(10), player VARCHAR(50), kills INT, deaths INT, season VARCHAR(10), match_date DATE); ","SELECT player, AVG(kills / NULLIF(deaths, 0)) AS kill_death_ratio FROM matches WHERE game = 'Apex Legends' AND season = (SELECT season FROM matches WHERE match_date = (SELECT MAX(match_date) FROM matches WHERE game = 'Apex Legends')) GROUP BY player ORDER BY kill_death_ratio DESC, player DESC LIMIT 3;","SELECT player, kills, deaths FROM matches WHERE game = 'Apex Legends' ORDER BY kills DESC LIMIT 3;",0 Which driver has a grid value of 22?,"CREATE TABLE table_name_38 (driver VARCHAR, grid VARCHAR);","SELECT driver FROM table_name_38 WHERE grid = ""22"";",SELECT driver FROM table_name_38 WHERE grid = 22;,0 What is the position of the winner with 792 points?,"CREATE TABLE table_name_39 (position VARCHAR, points VARCHAR);","SELECT position FROM table_name_39 WHERE points = ""792"";",SELECT position FROM table_name_39 WHERE points = 792;,0 What was the attendance for the game with an away team of Hispano?,"CREATE TABLE table_name_99 (attendance VARCHAR, away VARCHAR);","SELECT attendance FROM table_name_99 WHERE away = ""hispano"";","SELECT attendance FROM table_name_99 WHERE away = ""hispano"";",1 What is the maximum property tax for sustainable urbanism properties in Austin?,"CREATE TABLE tax (id INT, amount FLOAT, property_type VARCHAR(20), city VARCHAR(20)); ",SELECT MAX(amount) FROM tax WHERE property_type = 'sustainable urbanism' AND city = 'Austin';,SELECT MAX(amount) FROM tax WHERE property_type = 'Sustainable Urbanism' AND city = 'Austin';,0 "What is the average monthly salary of workers in the 'manufacturing' sector, excluding those earning below the minimum wage?","CREATE TABLE if not exists workers (id INT PRIMARY KEY, sector VARCHAR(255), monthly_salary DECIMAL(10, 2)); ",SELECT AVG(monthly_salary) FROM workers WHERE monthly_salary > (SELECT MIN(monthly_salary) FROM workers WHERE sector = 'manufacturing') AND sector = 'manufacturing';,SELECT AVG(monthly_salary) FROM workers WHERE sector ='manufacturing' AND monthly_salary (SELECT MIN(monthly_salary) FROM workers WHERE sector ='manufacturing');,0 Determine the average spending in the 'gift_shop' category for the month of July 2022.,"CREATE TABLE transactions (id INT, category VARCHAR(50), amount DECIMAL(10, 2), transaction_date DATE); ",SELECT AVG(amount) as avg_spending FROM transactions WHERE category = 'gift_shop' AND transaction_date BETWEEN '2022-07-01' AND '2022-07-31';,SELECT AVG(amount) FROM transactions WHERE category = 'gift_shop' AND transaction_date BETWEEN '2022-07-01' AND '2022-07-31';,0 What is the average width of tunnels in New Jersey?,"CREATE TABLE tunnels (tunnel_name TEXT, tunnel_width INT, tunnel_state TEXT); ",SELECT AVG(tunnel_width) FROM tunnels WHERE tunnel_state = 'New Jersey';,SELECT AVG(tunnel_width) FROM tunnels WHERE tunnel_state = 'New Jersey';,1 Find the number of companies in each sector in Asia with ESG scores above 75.,"CREATE TABLE sectors (id INT, company_id INT, sector TEXT); ","SELECT sectors.sector, COUNT(DISTINCT companies.id) FROM companies INNER JOIN sectors ON companies.id = sectors.company_id WHERE companies.country LIKE 'Asia%' AND companies.ESG_score > 75 GROUP BY sectors.sector;","SELECT sector, COUNT(DISTINCT company_id) FROM sectors WHERE sector LIKE '%Asia%' GROUP BY sector HAVING COUNT(DISTINCT company_id) > 75;",0 What is the maximum price of a menu item in the 'Drinks' category from the 'Organic' ingredient type?,"CREATE TABLE menu (menu_id INT, menu_name VARCHAR(50), category VARCHAR(50), ingredient VARCHAR(50), price DECIMAL(5,2), month_sold INT); ",SELECT MAX(price) FROM menu WHERE category = 'Drinks' AND ingredient = 'Organic';,SELECT MAX(price) FROM menu WHERE category = 'Drinks' AND ingredient = 'Organic';,1 What was the location for a year later than 2012?,"CREATE TABLE table_name_82 (location VARCHAR, year INTEGER);",SELECT location FROM table_name_82 WHERE year > 2012;,SELECT location FROM table_name_82 WHERE year > 2012;,1 "Find the player with the highest number of home runs in each season, for every player.","CREATE TABLE players (player_id INT, player_name VARCHAR(100), position VARCHAR(50), team VARCHAR(50), games_played INT, at_bats INT, hits INT, home_runs INT, rbi INT); ","SELECT player_name, season, MAX(home_runs) as max_homeruns FROM (SELECT player_name, DATE_PART('year', game_date) as season, home_runs FROM games JOIN players ON games.player_id = players.player_id) subquery GROUP BY player_name, season;","SELECT player_name, SUM(home_runs) as total_home_runs FROM players GROUP BY player_name ORDER BY total_home_runs DESC;",0 What is the average admission price for historical sites in Edinburgh?,"CREATE TABLE historical_sites (site_id INT, name TEXT, city TEXT, admission_price FLOAT); ",SELECT AVG(admission_price) FROM historical_sites WHERE city = 'Edinburgh';,SELECT AVG(admission_price) FROM historical_sites WHERE city = 'Edinburgh';,1 Record of 16–29 is how many attendance?,"CREATE TABLE table_name_32 (attendance VARCHAR, record VARCHAR);","SELECT attendance FROM table_name_32 WHERE record = ""16–29"";","SELECT COUNT(attendance) FROM table_name_32 WHERE record = ""16–29"";",0 "Dakota Mission of t, and a Deloria & Boas of tʽ, and a Ullrich of tȟ had what white hat?","CREATE TABLE table_name_98 (white_hat VARCHAR, ullrich VARCHAR, dakota_mission VARCHAR, deloria_ VARCHAR, _boas VARCHAR);","SELECT white_hat FROM table_name_98 WHERE dakota_mission = ""t"" AND deloria_ & _boas = ""tʽ"" AND ullrich = ""tȟ"";","SELECT white_hat FROM table_name_98 WHERE deloria_ & _boas = ""t"" AND ullrich = ""t"";",0 Delete all records from the habitat table where the status is not 'Protected',"CREATE TABLE habitat (id INT, area FLOAT, status VARCHAR(20));",DELETE FROM habitat WHERE status != 'Protected';,DELETE FROM habitat WHERE status!= 'Protected';,0 List the number of publications for each graduate student in the Mathematics department who has published in the Journal of Algebra.,"CREATE TABLE students (id INT, name VARCHAR(50), department VARCHAR(50)); CREATE TABLE publications (id INT, student_id INT, journal VARCHAR(50)); ","SELECT students.name, COUNT(publications.id) FROM students JOIN publications ON students.id = publications.student_id WHERE students.department = 'Mathematics' AND publications.journal = 'Journal of Algebra' GROUP BY students.name;","SELECT s.name, COUNT(p.id) FROM students s JOIN publications p ON s.id = p.student_id WHERE s.department = 'Mathematics' AND p.journal = 'Journal of Algebra' GROUP BY s.name;",0 What is the total amount donated by individual donors from the United States?,"CREATE TABLE Donors (DonorID INT, DonorName TEXT, Country TEXT); CREATE TABLE Donations (DonationID INT, DonorID INT, Amount DECIMAL); ",SELECT SUM(Donations.Amount) FROM Donors INNER JOIN Donations ON Donors.DonorID = Donations.DonorID WHERE Donors.Country = 'USA' AND DonorID <> 0;,SELECT SUM(Amount) FROM Donations JOIN Donors ON Donations.DonorID = Donors.DonorID WHERE Donors.Country = 'United States';,0 How many labor statistics records were added per month in 2019?,"CREATE TABLE labor_statistics (id INT, added_date DATE, category VARCHAR(255), title VARCHAR(255), hourly_wage DECIMAL(5,2));","SELECT DATE_FORMAT(added_date, '%Y-%m') as month, COUNT(*) as records_added FROM labor_statistics WHERE YEAR(added_date) = 2019 GROUP BY month;","SELECT EXTRACT(MONTH FROM added_date) AS month, COUNT(*) FROM labor_statistics WHERE EXTRACT(YEAR FROM added_date) = 2019 GROUP BY month;",0 What team had 1:34.578 in Qual 2?,"CREATE TABLE table_name_55 (team VARCHAR, qual_2 VARCHAR);","SELECT team FROM table_name_55 WHERE qual_2 = ""1:34.578"";","SELECT team FROM table_name_55 WHERE qual_2 = ""1:34.578"";",1 "What is the smallest roll with a Decile larger than 6, and a Name of broomfield school?","CREATE TABLE table_name_40 (roll INTEGER, decile VARCHAR, name VARCHAR);","SELECT MIN(roll) FROM table_name_40 WHERE decile > 6 AND name = ""broomfield school"";","SELECT MIN(roll) FROM table_name_40 WHERE decile > 6 AND name = ""broomfield school"";",1 What years have joyce couwenberg as the character?,"CREATE TABLE table_name_62 (years VARCHAR, character VARCHAR);","SELECT years FROM table_name_62 WHERE character = ""joyce couwenberg"";","SELECT years FROM table_name_62 WHERE character = ""joyce couwenberg"";",1 What are the notes for Ford when the total is 5?,"CREATE TABLE table_name_23 (notes VARCHAR, builder VARCHAR, total VARCHAR);","SELECT notes FROM table_name_23 WHERE builder = ""ford"" AND total = ""5"";","SELECT notes FROM table_name_23 WHERE builder = ""ford"" AND total = 5;",0 Name the sec wins for .357 percentage and 4-3 home record,"CREATE TABLE table_22825679_1 (sec_wins VARCHAR, percentage VARCHAR, home_record VARCHAR);","SELECT sec_wins FROM table_22825679_1 WHERE percentage = "".357"" AND home_record = ""4-3"";","SELECT sec_wins FROM table_22825679_1 WHERE percentage = "".357"" AND home_record = ""4-3"";",1 Identify the number of virtual tours engaged for hotels in the 'Asia' region.,"CREATE TABLE virtualtours (id INT, hotel_id INT, views INT); ",SELECT COUNT(*) FROM virtualtours WHERE hotel_id IN (SELECT id FROM hotels WHERE region = 'Asia');,SELECT SUM(views) FROM virtualtours WHERE hotel_id IN (SELECT id FROM hotels WHERE region = 'Asia');,0 Which basketball team has the oldest average age?,"CREATE TABLE players (player_id INT, name VARCHAR(50), age INT, position VARCHAR(20), team VARCHAR(50)); ","SELECT team, AVG(age) as avg_age FROM players WHERE position = 'Basketball Player' GROUP BY team ORDER BY avg_age DESC LIMIT 1;","SELECT team, AVG(age) as avg_age FROM players GROUP BY team ORDER BY avg_age DESC LIMIT 1;",0 What is the tries for when the points against is 214?,"CREATE TABLE table_name_25 (tries_for VARCHAR, points_against VARCHAR);","SELECT tries_for FROM table_name_25 WHERE points_against = ""214"";","SELECT tries_for FROM table_name_25 WHERE points_against = ""214"";",1 "What is the sum of rank when silver is 1, and gold is less than 7, and bronze is 2?","CREATE TABLE table_name_28 (rank INTEGER, bronze VARCHAR, silver VARCHAR, gold VARCHAR);",SELECT SUM(rank) FROM table_name_28 WHERE silver = 1 AND gold < 7 AND bronze = 2;,SELECT SUM(rank) FROM table_name_28 WHERE silver = 1 AND gold 7 AND bronze = 2;,0 What is the July temperature where plant hardiness zone is 2B and January figure is −12/−23°c (10-9°f)?,"CREATE TABLE table_name_32 (july VARCHAR, plant_hardiness_zone VARCHAR, january VARCHAR);","SELECT july FROM table_name_32 WHERE plant_hardiness_zone = ""2b"" AND january = ""−12/−23°c (10-9°f)"";","SELECT july FROM table_name_32 WHERE plant_hardiness_zone = ""2b"" AND january = ""12/23°c (10-9°f)"";",0 What is the total cost of all road construction projects in Florida?,"CREATE TABLE road_construction (project_name TEXT, project_cost INT, project_state TEXT); ",SELECT SUM(project_cost) FROM road_construction WHERE project_state = 'Florida';,SELECT SUM(project_cost) FROM road_construction WHERE project_state = 'Florida';,1 Which TV shows have the highest average rating per season in the horror genre?,"CREATE TABLE tv_shows (id INT, title VARCHAR(255), season INT, genre VARCHAR(255), rating DECIMAL(3,2)); ","SELECT title, AVG(rating) AS avg_rating FROM tv_shows WHERE genre = 'Horror' GROUP BY title ORDER BY avg_rating DESC;","SELECT title, AVG(rating) as avg_rating FROM tv_shows WHERE genre = 'Horror' GROUP BY title ORDER BY avg_rating DESC LIMIT 1;",0 "Identify the number of dispensaries that have been licensed in Washington State since 2015, but haven't reported any sales by the end of 2021.","CREATE TABLE dispensaries (id INT, name TEXT, state TEXT, license_date DATE, first_sale_date DATE); ",SELECT COUNT(*) FROM (SELECT * FROM dispensaries WHERE state = 'Washington' AND license_date <= '2015-12-31' AND first_sale_date > '2021-12-31' EXCEPT SELECT * FROM (SELECT DISTINCT * FROM dispensaries)) tmp;,SELECT COUNT(DISTINCT name) FROM dispensaries WHERE state = 'Washington' AND license_date >= '2015-01-01' AND first_sale_date '2021-12-31';,0 Show the account id and the number of transactions for each account,CREATE TABLE Financial_transactions (account_id VARCHAR);,"SELECT account_id, COUNT(*) FROM Financial_transactions GROUP BY account_id;","SELECT account_id, COUNT(*) FROM Financial_transactions GROUP BY account_id;",1 Who was the incumbent in the Arkansas 2 district election? ,"CREATE TABLE table_1341897_6 (incumbent VARCHAR, district VARCHAR);","SELECT incumbent FROM table_1341897_6 WHERE district = ""Arkansas 2"";","SELECT incumbent FROM table_1341897_6 WHERE district = ""Arkansas 2"";",1 What were the laps of driver Jean-Christophe Boullion?,"CREATE TABLE table_name_41 (laps VARCHAR, driver VARCHAR);","SELECT laps FROM table_name_41 WHERE driver = ""jean-christophe boullion"";","SELECT laps FROM table_name_41 WHERE driver = ""jean-christophe boullion"";",1 "What is the average water usage score for each mining site, grouped by country?","CREATE TABLE mining_sites (id INT, name VARCHAR(255), country VARCHAR(255), water_usage INT); ","SELECT country, AVG(water_usage) AS avg_water_usage FROM mining_sites GROUP BY country;","SELECT country, AVG(water_usage) as avg_water_usage FROM mining_sites GROUP BY country;",0 What is the number of students who have accessed mental health resources in each country?,"CREATE TABLE student_mental_health_resources (student_id INT, country VARCHAR(20), resource_id VARCHAR(5)); ","SELECT country, COUNT(*) FROM student_mental_health_resources GROUP BY country;","SELECT country, COUNT(*) FROM student_mental_health_resources GROUP BY country;",1 What is the total funding of startups associated with the genetic research department?,"CREATE TABLE Startup (Startup_Name VARCHAR(50) PRIMARY KEY, Industry VARCHAR(50), Funding DECIMAL(10, 2)); ",SELECT SUM(S.Funding) FROM Startup S WHERE S.Industry = 'Genetic Research';,SELECT SUM(Funding) FROM Startup WHERE Industry = 'Genetic Research';,0 What is the total defense diplomacy expenditure by region for the year 2021?,"CREATE TABLE regions (id INT, name TEXT); CREATE TABLE defense_diplomacy (id INT, region_id INT, year INT, amount INT); ","SELECT regions.name, SUM(defense_diplomacy.amount) FROM defense_diplomacy JOIN regions ON defense_diplomacy.region_id = regions.id WHERE defense_diplomacy.year = 2021 GROUP BY regions.name;","SELECT r.name, SUM(d.amount) as total_expenditure FROM regions r JOIN defense_diplomacy d ON r.id = d.region_id WHERE d.year = 2021 GROUP BY r.name;",0 What is the average financial capability score for clients in the financial capability database?,"CREATE TABLE financial_capability (client_id INT, name TEXT, score INT); ",SELECT AVG(score) FROM financial_capability;,SELECT AVG(score) FROM financial_capability;,1 List states having no data in MentalHealthParity,"CREATE TABLE MentalHealthParity (ID INT PRIMARY KEY, State VARCHAR(2), ParityStatus VARCHAR(10));",SELECT State FROM MentalHealthParity GROUP BY State HAVING COUNT(*) = 0;,SELECT State FROM MentalHealthParity WHERE ParityStatus IS NULL;,0 What was Jim Colbert's score?,"CREATE TABLE table_name_72 (score VARCHAR, player VARCHAR);","SELECT score FROM table_name_72 WHERE player = ""jim colbert"";","SELECT score FROM table_name_72 WHERE player = ""jim colbert"";",1 What is the average age of readers who prefer investigative journalism articles in the Midwest region?,"CREATE TABLE readers (id INT, age INT, region VARCHAR(20));CREATE TABLE preferences (id INT, genre VARCHAR(20)); ",SELECT AVG(readers.age) FROM readers INNER JOIN preferences ON readers.id = preferences.id WHERE readers.region = 'Midwest' AND preferences.genre = 'Investigative';,SELECT AVG(readers.age) FROM readers INNER JOIN preferences ON readers.id = preferences.id WHERE preferences.genre = 'investigative' AND readers.region = 'Midwest';,0 Find the total budget for marine pollution initiatives in the 'Operations' schema's 'Pollution_Initiatives' table,"CREATE TABLE Operations.Pollution_Initiatives ( id INT, initiative_name VARCHAR(255), budget INT );",SELECT SUM(budget) FROM Operations.Pollution_Initiatives;,SELECT SUM(budget) FROM Operations.Pollution_Initiatives WHERE initiative_name = 'Marine Pollution';,0 What is the number of unique customers who purchased size 18 garments in Brazil?,"CREATE TABLE Customers (id INT, customerID INT, country VARCHAR(50)); CREATE TABLE Sales (id INT, customerID INT, garmentID INT, quantity INT, saleDate DATE); CREATE TABLE Garments (id INT, garmentID INT, size INT, country VARCHAR(50)); ",SELECT COUNT(DISTINCT Customers.customerID) FROM Customers INNER JOIN Sales ON Customers.customerID = Sales.customerID INNER JOIN Garments ON Sales.garmentID = Garments.garmentID WHERE Garments.size = 18 AND Customers.country = 'Brazil';,SELECT COUNT(DISTINCT Customers.customerID) FROM Customers INNER JOIN Sales ON Customers.customerID = Sales.customerID INNER JOIN Garments ON Sales.garmentID = Garments.garmentID WHERE Garments.size = 18 AND Customers.country = 'Brazil';,1 Which countries have hotels with annual revenues over 5 million?,"CREATE TABLE hotel_revenues (hotel_id INT, name TEXT, country TEXT, annual_revenue INT); ",SELECT DISTINCT country FROM hotel_revenues WHERE annual_revenue > 5000000;,SELECT country FROM hotel_revenues WHERE annual_revenue > 5000000;,0 Who is the play-by-play when nbc is the network and darren pang is the ice level reporters?,"CREATE TABLE table_22485543_1 (play_by_play VARCHAR, network VARCHAR, ice_level_reporters VARCHAR);","SELECT play_by_play FROM table_22485543_1 WHERE network = ""NBC"" AND ice_level_reporters = ""Darren Pang"";","SELECT play_by_play FROM table_22485543_1 WHERE network = ""NBC"" AND ice_level_reporters = ""Darren Pang"";",1 What did Alex Tagliani get for Qual 1?,"CREATE TABLE table_name_93 (qual_1 VARCHAR, name VARCHAR);","SELECT qual_1 FROM table_name_93 WHERE name = ""alex tagliani"";","SELECT qual_1 FROM table_name_93 WHERE name = ""alex tagliani"";",1 "What is the total amount spent on waste management services in Texas, only considering cities with a population greater than 500,000?","CREATE TABLE waste_management (service_id INT, service_name TEXT, city TEXT, state TEXT, cost INT); ","SELECT SUM(cost) FROM waste_management WHERE state = 'Texas' AND city IN ('Houston', 'Dallas', 'San Antonio');",SELECT SUM(cost) FROM waste_management WHERE state = 'Texas' AND city > 500000;,0 Record of 3–3 has what result?,"CREATE TABLE table_name_83 (result VARCHAR, record VARCHAR);","SELECT result FROM table_name_83 WHERE record = ""3–3"";","SELECT result FROM table_name_83 WHERE record = ""3–3"";",1 What is the max torque of the 1.2 mpi engine?,"CREATE TABLE table_name_11 (max_torque_at_rpm VARCHAR, engine_name VARCHAR);","SELECT max_torque_at_rpm FROM table_name_11 WHERE engine_name = ""1.2 mpi"";","SELECT max_torque_at_rpm FROM table_name_11 WHERE engine_name = ""1.2 mpi"";",1 How many claims were filed in Texas in the last 3 months?,"CREATE TABLE Claims (ClaimID INT, ClaimDate DATE, State VARCHAR(10)); CREATE TABLE Calendar (Date DATE); ","SELECT COUNT(c.ClaimID) as ClaimCount FROM Claims c INNER JOIN Calendar cal ON c.ClaimDate >= cal.Date AND cal.Date >= DATE_SUB(curdate(), INTERVAL 3 MONTH) WHERE c.State = 'Texas';","SELECT COUNT(*) FROM Claims INNER JOIN Calendar ON Claims.ClaimID = Calendar.ClaimID WHERE Claims.State = 'Texas' AND Calendar.Date >= DATEADD(month, -3, GETDATE());",0 What was the total revenue for each dispensary in California in Q1 2021?,"CREATE TABLE Dispensaries (id INT, name TEXT, state TEXT); CREATE TABLE Sales (dispensary_id INT, date DATE, revenue INT); ","SELECT d.name, SUM(s.revenue) as q1_revenue FROM Dispensaries d INNER JOIN Sales s ON d.id = s.dispensary_id WHERE s.date BETWEEN '2021-01-01' AND '2021-03-31' GROUP BY d.name;","SELECT d.name, SUM(s.revenue) as total_revenue FROM Dispensaries d JOIN Sales s ON d.id = s.dispensary_id WHERE d.state = 'California' AND s.date BETWEEN '2021-01-01' AND '2021-06-30' GROUP BY d.name;",0 Get the average score of each player,"game_stats(player_id, game_id, score, date_played)","SELECT player_id, AVG(score) as avg_score FROM game_stats GROUP BY player_id;","SELECT player_id, AVG(score) as avg_score FROM game_stats GROUP BY player_id;",1 Which community has the highest obesity rate in the US?,"CREATE TABLE Community (Name TEXT, State TEXT, ObesityRate FLOAT); ","SELECT Name, ObesityRate FROM Community WHERE State = 'US' ORDER BY ObesityRate DESC LIMIT 1;","SELECT Name, ObesityRate FROM Community WHERE State = 'USA' ORDER BY ObesityRate DESC LIMIT 1;",0 What are the top 10 artists with the highest number of artworks?,"CREATE TABLE Artists (id INT, name TEXT); CREATE TABLE Artworks (id INT, artist_id INT, name TEXT);","SELECT a.name, COUNT(*) as artworks_count FROM Artists a JOIN Artworks aw ON a.id = aw.artist_id GROUP BY a.name ORDER BY artworks_count DESC LIMIT 10;","SELECT Artists.name, COUNT(Artworks.id) as artwork_count FROM Artists INNER JOIN Artworks ON Artists.id = Artworks.artist_id GROUP BY Artists.name ORDER BY artwork_count DESC LIMIT 10;",0 Show total donations received by each payment method in the last 6 months.,"CREATE TABLE donations (id INT, donor_name VARCHAR(50), payment_method VARCHAR(50), donation_date DATE, donation_amount FLOAT); ","SELECT payment_method, SUM(donation_amount) FROM donations WHERE donation_date BETWEEN '2023-01-01' AND '2023-06-30' GROUP BY payment_method;","SELECT payment_method, SUM(donation_amount) as total_donations FROM donations WHERE donation_date >= DATEADD(month, -6, GETDATE()) GROUP BY payment_method;",0 What is the most recent year founded that has a nickname of bruins?,"CREATE TABLE table_name_7 (founded INTEGER, nickname VARCHAR);","SELECT MAX(founded) FROM table_name_7 WHERE nickname = ""bruins"";","SELECT MAX(founded) FROM table_name_7 WHERE nickname = ""bruins"";",1 "What are the average salaries for employees in the 'Engineering' department, compared to those in the 'Marketing' department?","CREATE TABLE Employees (Employee_ID INT, Department VARCHAR(50), Salary DECIMAL(5,2)); ",SELECT AVG(Salary) FROM Employees WHERE Department = 'Engineering' UNION ALL SELECT AVG(Salary) FROM Employees WHERE Department = 'Marketing',SELECT AVG(Salary) FROM Employees WHERE Department = 'Engineering' AND Department = 'Marketing';,0 What is the total number of vulnerabilities found in the last week for each software?,"CREATE TABLE SoftwareVulnerabilities (id INT, software VARCHAR(255), vulnerability_date DATE); ","SELECT SoftwareVulnerabilities.software AS Software, COUNT(*) AS Total_Vulnerabilities FROM SoftwareVulnerabilities WHERE SoftwareVulnerabilities.vulnerability_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) GROUP BY SoftwareVulnerabilities.software;","SELECT software, COUNT(*) FROM SoftwareVulnerabilities WHERE vulnerability_date >= DATEADD(week, -1, GETDATE()) GROUP BY software;",0 What is the highest number of gold medals Naugatuck HS won?,"CREATE TABLE table_1305623_20 (gold_medals INTEGER, ensemble VARCHAR);","SELECT MAX(gold_medals) FROM table_1305623_20 WHERE ensemble = ""Naugatuck HS"";","SELECT MAX(gold_medals) FROM table_1305623_20 WHERE ensemble = ""Naugatuck HS"";",1 What is the average quantity of each type of support provided in Asia?,"CREATE TABLE SupportAsia (Id INT, SupportType VARCHAR(50), Quantity INT); ","SELECT SupportType, AVG(Quantity) FROM SupportAsia GROUP BY SupportType;","SELECT SupportType, AVG(Quantity) FROM SupportAsia GROUP BY SupportType;",1 What is the average attendance for all events held at Palmerston Park venue?,"CREATE TABLE table_name_24 (attendance INTEGER, venue VARCHAR);","SELECT AVG(attendance) FROM table_name_24 WHERE venue = ""palmerston park"";","SELECT AVG(attendance) FROM table_name_24 WHERE venue = ""palmston park"";",0 Calculate the average daily oil production for each platform in the second quarter of 2021,"CREATE TABLE platform (id INT, name VARCHAR(50), location VARCHAR(50)); CREATE TABLE oil_production (platform_id INT, date DATE, oil_production FLOAT);","SELECT p.name, AVG(op.oil_production/DATEDIFF('2021-06-30', op.date)) FROM oil_production op JOIN platform p ON op.platform_id = p.id WHERE op.date BETWEEN '2021-04-01' AND '2021-06-30' GROUP BY op.platform_id;","SELECT p.name, AVG(op.oil_production) as avg_daily_oil_production FROM platform p JOIN oil_production op ON p.id = op.platform_id WHERE op.date BETWEEN '2021-01-01' AND '2021-03-31' GROUP BY p.name;",0 "What is the region 2 (UK) date associated with a region 4 (Aus) date of July 31, 2008?","CREATE TABLE table_240936_2 (region_2__uk_ VARCHAR, region_4__australia_ VARCHAR);","SELECT region_2__uk_ FROM table_240936_2 WHERE region_4__australia_ = ""July 31, 2008"";","SELECT region_2__uk_ FROM table_240936_2 WHERE region_4__australia_ = ""July 31, 2008"";",1 Which military equipment was sold in the first quarter of 2021?,"CREATE TABLE equipment_sales (id INT, equipment_name VARCHAR(255), sale_date DATE); ",SELECT equipment_name FROM equipment_sales WHERE QUARTER(sale_date) = 1 AND YEAR(sale_date) = 2021;,SELECT equipment_name FROM equipment_sales WHERE sale_date BETWEEN '2021-01-01' AND '2021-03-31';,0 "What is the total playtime for players who have played the game ""Cybernetic Mayhem"" and have more than 50 hours of playtime?","CREATE TABLE Players (PlayerID INT, Playtime INT, GameName VARCHAR(20)); ",SELECT SUM(Playtime) FROM Players WHERE GameName = 'Cybernetic Mayhem' AND Playtime > 50;,SELECT SUM(Playtime) FROM Players WHERE GameName = 'Cybernetic Mayhem' AND Playtime > 50;,1 "What is the average goals for Jimmy Greaves, and matches more than 516?","CREATE TABLE table_name_91 (goals INTEGER, name VARCHAR, matches VARCHAR);","SELECT AVG(goals) FROM table_name_91 WHERE name = ""jimmy greaves"" AND matches > 516;","SELECT AVG(goals) FROM table_name_91 WHERE name = ""jamie greaves"" AND matches > 516;",0 What is the number of products certified by Fair Trade?,"CREATE TABLE Certifications (ProductID INT, FairTrade BOOLEAN); ",SELECT COUNT(*) FROM Certifications WHERE FairTrade = TRUE;,SELECT COUNT(*) FROM Certifications WHERE FairTrade = TRUE;,1 How many heritage sites (tangible and intangible) are there in the Amazon region?,"CREATE TABLE tangible_heritage (id INT, name VARCHAR(255), region VARCHAR(255)); CREATE TABLE intangible_heritage (id INT, name VARCHAR(255), region VARCHAR(255)); ","SELECT COUNT(*) FROM (SELECT 'tangible' as type, t.name FROM tangible_heritage t WHERE t.region = 'Amazon' UNION ALL SELECT 'intangible' as type, i.name FROM intangible_heritage i WHERE i.region = 'Amazon') AS h;",SELECT COUNT(*) FROM tangible_heritage WHERE region = 'Amazon';,0 What is the success rate of economic diversification efforts in Peru and Colombia?,"CREATE TABLE success_rates (id INT, effort TEXT, country TEXT, success BOOLEAN); ","SELECT COUNT(*) FILTER (WHERE success = TRUE) * 100.0 / COUNT(*) FROM success_rates WHERE country IN ('Peru', 'Colombia');","SELECT success FROM success_rates WHERE country IN ('Peru', 'Colombia') AND success = TRUE;",0 What is the average age of employees in each mining operation?,"CREATE TABLE mining_operations (operation_id INT, operation_name VARCHAR(50), employee_id INT, first_name VARCHAR(50), last_name VARCHAR(50), position VARCHAR(50), age INT); ","SELECT operation_name, AVG(age) AS avg_age FROM mining_operations GROUP BY operation_name;","SELECT operation_name, AVG(age) as avg_age FROM mining_operations GROUP BY operation_name;",0 Delete all records with 'Soda' in the 'Beverages' section.,"CREATE TABLE Menu (item VARCHAR(20), type VARCHAR(20), price DECIMAL(5,2), quantity INT); ",DELETE FROM Menu WHERE item = 'Soda' AND type = 'Beverages';,DELETE FROM Menu WHERE item = 'Soda' AND type = 'Beverages';,1 Who did the Raiders play in week 12?,"CREATE TABLE table_name_25 (opponent VARCHAR, week VARCHAR);",SELECT opponent FROM table_name_25 WHERE week = 12;,SELECT opponent FROM table_name_25 WHERE week = 12;,1 What is the name of episode number 29 in the series?,"CREATE TABLE table_29273182_1 (title VARCHAR, no_in_series VARCHAR);",SELECT title FROM table_29273182_1 WHERE no_in_series = 29;,SELECT title FROM table_29273182_1 WHERE no_in_series = 29;,1 What is the pseudoknot prediction of the software named tfold?,"CREATE TABLE table_name_65 (_ VARCHAR, knots_knots VARCHAR, name VARCHAR);","SELECT knots_knots AS :_pseudoknot_prediction, _ FROM table_name_65 WHERE name = ""tfold"";","SELECT _ FROM table_name_65 WHERE knots_knots = ""pseudoknot"" AND name = ""tfold"";",0 "List all policies and their associated claim amounts for policyholders in the state of California, sorted by claim amount in descending order.","CREATE TABLE Policyholders (PolicyID INT, PolicyholderName TEXT, State TEXT); CREATE TABLE Claims (ClaimID INT, PolicyID INT, ClaimAmount INT); ","SELECT Policyholders.PolicyID, Claims.ClaimAmount FROM Policyholders INNER JOIN Claims ON Policyholders.PolicyID = Claims.PolicyID WHERE Policyholders.State = 'California' ORDER BY Claims.ClaimAmount DESC;","SELECT Policyholders.PolicyholderName, Claims.ClaimAmount FROM Policyholders INNER JOIN Claims ON Policyholders.PolicyID = Claims.PolicyID WHERE Policyholders.State = 'California' ORDER BY Claims.ClaimAmount DESC;",0 Who remixed the version with a length of 3:58?,"CREATE TABLE table_name_74 (remixed_by VARCHAR, length VARCHAR);","SELECT remixed_by FROM table_name_74 WHERE length = ""3:58"";","SELECT remixed_by FROM table_name_74 WHERE length = ""3:58"";",1 Which First elected has a District of illinois 3?,"CREATE TABLE table_name_52 (first_elected INTEGER, district VARCHAR);","SELECT MAX(first_elected) FROM table_name_52 WHERE district = ""illinois 3"";","SELECT SUM(first_elected) FROM table_name_52 WHERE district = ""illinois 3"";",0 "List all heritage sites with more than 3 traditional dance performances, their respective performance counts, and the average attendance.","CREATE TABLE HeritageSites (SiteID INT, Name VARCHAR(50), Location VARCHAR(50), PerformanceID INT); CREATE TABLE Performances (PerformanceID INT, SiteID INT, Type VARCHAR(50), Attendance INT); ","SELECT hs.Name AS HeritageSite, COUNT(p.PerformanceID) AS PerformanceCount, AVG(p.Attendance) AS AvgAttendance FROM HeritageSites hs JOIN Performances p ON hs.PerformanceID = p.PerformanceID WHERE p.Type = 'Traditional' GROUP BY hs.Name HAVING COUNT(p.PerformanceID) > 3 ORDER BY AvgAttendance DESC;","SELECT HeritageSites.Name, HeritageSites.Location, HeritageSites.PerformanceID, HeritageSites.PerformanceID, HeritageSites.PerformanceID, HeritageSites.PerformanceID, Performances.Attendance FROM HeritageSites INNER JOIN Performances ON HeritageSites.PerformanceID = Performances.PerformanceID WHERE Performances.Type = 'Traditional Dance' GROUP BY HeritageSites.Name HAVING COUNT(DISTINCT HeritageSites.PerformanceID) > 3;",0 How many unique donors are there in each organization's donor list?,"CREATE TABLE donor_organization (donor_id INTEGER, org_id INTEGER); CREATE TABLE organizations (org_id INTEGER, org_name TEXT); ","SELECT org_name, COUNT(DISTINCT donor_id) as unique_donors FROM donor_organization JOIN organizations ON donor_organization.org_id = organizations.org_id GROUP BY org_name;","SELECT o.org_name, COUNT(DISTINCT d.donor_id) FROM donor_organization d JOIN organizations o ON d.org_id = o.org_id GROUP BY o.org_name;",0 what is the maximum number in the season wher the us viewers is 2.59?,"CREATE TABLE table_20726262_4 (no_in_season INTEGER, usviewers__million_ VARCHAR);","SELECT MAX(no_in_season) FROM table_20726262_4 WHERE usviewers__million_ = ""2.59"";","SELECT MAX(no_in_season) FROM table_20726262_4 WHERE usviewers__million_ = ""2.59"";",1 What games have the event of Men's Slalom?,"CREATE TABLE table_name_91 (games VARCHAR, event VARCHAR);","SELECT games FROM table_name_91 WHERE event = ""men's slalom"";","SELECT games FROM table_name_91 WHERE event = ""men's slalom"";",1 Which tennis player won the most matches in the 'wins' table?,"CREATE TABLE wins (win_id INT, player_id INT, match_id INT, team_id INT, wins INT); ","SELECT player_id, MAX(wins) FROM wins;","SELECT player_id, MAX(wins) FROM wins GROUP BY player_id;",0 "How much international freight has a change of +0,2% with more than 0 international mail?","CREATE TABLE table_name_75 (international_freight VARCHAR, change VARCHAR, international_mail VARCHAR);","SELECT COUNT(international_freight) FROM table_name_75 WHERE change = ""+0,2%"" AND international_mail > 0;","SELECT international_freight FROM table_name_75 WHERE change = ""+0,2%"" AND international_mail > 0;",0 Which party is Ettore Romoli from?,"CREATE TABLE table_name_99 (party VARCHAR, mayor VARCHAR);","SELECT party FROM table_name_99 WHERE mayor = ""ettore romoli"";","SELECT party FROM table_name_99 WHERE mayor = ""ettore romoli"";",1 Name the location attendance for philadelphia,"CREATE TABLE table_15780049_8 (location_attendance VARCHAR, team VARCHAR);","SELECT location_attendance FROM table_15780049_8 WHERE team = ""Philadelphia"";","SELECT location_attendance FROM table_15780049_8 WHERE team = ""Philadelphia"";",1 "What is the total number of draws when there is 1 Win, and less than 1728 against matches?","CREATE TABLE table_name_41 (draws VARCHAR, wins VARCHAR, against VARCHAR);",SELECT COUNT(draws) FROM table_name_41 WHERE wins = 1 AND against < 1728;,SELECT COUNT(draws) FROM table_name_41 WHERE wins = 1 AND against 1728;,0 Name the outcome for alizé cornet janette husárová being opponent in final,"CREATE TABLE table_name_97 (outcome VARCHAR, opponent_in_final VARCHAR);","SELECT outcome FROM table_name_97 WHERE opponent_in_final = ""alizé cornet janette husárová"";","SELECT outcome FROM table_name_97 WHERE opponent_in_final = ""alizé cornet janette husárová"";",1 Which Nationality has a Position of left wing?,"CREATE TABLE table_name_99 (nationality VARCHAR, position VARCHAR);","SELECT nationality FROM table_name_99 WHERE position = ""left wing"";","SELECT nationality FROM table_name_99 WHERE position = ""left wing"";",1 What is the lowest number of draws with more than 2 byes?,"CREATE TABLE table_name_81 (draws INTEGER, byes INTEGER);",SELECT MIN(draws) FROM table_name_81 WHERE byes > 2;,SELECT MIN(draws) FROM table_name_81 WHERE byes > 2;,1 "Which Outcome has a Score in the final of 4–6, 5–7?","CREATE TABLE table_name_96 (outcome VARCHAR, score_in_the_final VARCHAR);","SELECT outcome FROM table_name_96 WHERE score_in_the_final = ""4–6, 5–7"";","SELECT outcome FROM table_name_96 WHERE score_in_the_final = ""4–6, 5–7"";",1 What is the minimum temperature for all IoT sensors in the 'fields_new' table?,"CREATE TABLE fields_new (id INT, sensor_id INT, temperature DECIMAL(5,2)); ",SELECT MIN(temperature) FROM fields_new;,SELECT MIN(temperature) FROM fields_new;,1 How many members joined in Q2 2022?,"CREATE TABLE Members (MemberID INT, JoinDate DATE); ",SELECT COUNT(*) FROM Members WHERE JoinDate BETWEEN '2022-04-01' AND '2022-06-30';,SELECT COUNT(*) FROM Members WHERE JoinDate BETWEEN '2022-04-01' AND '2022-06-30';,1 "List the number of rural hospitals and clinics in each state, ordered by the number of rural hospitals and clinics.","CREATE TABLE hospitals (hospital_id INT, name TEXT, type TEXT, rural BOOLEAN); CREATE TABLE states (state_code TEXT, state_name TEXT); ","SELECT states.state_name, SUM(CASE WHEN hospitals.type = 'Hospital' THEN 1 ELSE 0 END) as num_hospitals, SUM(CASE WHEN hospitals.type = 'Clinic' THEN 1 ELSE 0 END) as num_clinics, SUM(CASE WHEN hospitals.type IN ('Hospital', 'Clinic') THEN 1 ELSE 0 END) as total_rural_healthcare_services FROM hospitals INNER JOIN states ON TRUE WHERE hospitals.rural = TRUE GROUP BY states.state_name ORDER BY num_hospitals + num_clinics DESC;","SELECT states.state_name, COUNT(hospitals.hospital_id) as hospital_count, COUNT(clinics.type) as clinic_count FROM hospitals INNER JOIN states ON hospitals.state_code = states.state_code GROUP BY states.state_name ORDER BY hospital_count DESC;",0 What is the minimum budget for a project in the 'environmental_projects' table?,"CREATE TABLE environmental_projects (project VARCHAR(50), budget INT); ",SELECT MIN(budget) FROM environmental_projects;,SELECT MIN(budget) FROM environmental_projects;,1 What is the correlation between the population density and the number of available hospital beds per capita in rural areas?,"CREATE TABLE regions (region_id INT, name VARCHAR(20), population INT, population_density FLOAT); CREATE TABLE hospitals (hospital_id INT, region_id INT, beds INT); CREATE TABLE clinics (clinic_id INT, region_id INT, beds INT); CREATE TABLE resources (resource_id INT, hospital_id INT, clinic_id INT, beds INT); ","SELECT correlation(r.population_density, (h.beds + c.beds) / r.population) FROM regions r JOIN hospitals h ON r.region_id = h.region_id JOIN clinics c ON r.region_id = c.region_id;","SELECT r.name, CORR(h.beds / r.population_density) as correlation FROM regions r INNER JOIN hospitals h ON r.region_id = h.region_id INNER JOIN clinics c ON h.region_id = c.region_id INNER JOIN resources r ON h.hospital_id = r.hospital_id INNER JOIN regions r ON r.region_id = r.region_id INNER JOIN clinics c ON r.clinic_id = c.clinic_id INNER JOIN resources r ON r.clinic_id = r.clinic_id INNER JOIN regions r ON r.region_id = r.region_id INNER JOIN regions r ON r.region_id = r.region_id = r.region_id;",0 List the top 3 rural infrastructure projects in Asia by investment amount?,"CREATE TABLE project (id INT, name TEXT, location TEXT, investment_amount INT); ","SELECT name, investment_amount FROM (SELECT name, investment_amount, ROW_NUMBER() OVER (ORDER BY investment_amount DESC) as rank FROM project WHERE location LIKE 'Asia%') sub WHERE rank <= 3;","SELECT name, investment_amount FROM project WHERE location = 'Asia' ORDER BY investment_amount DESC LIMIT 3;",0 What is the total number of volunteers in 'volunteers' table from the city of Los Angeles?,"CREATE TABLE volunteers (id INT, name TEXT, city TEXT, volunteer_hours INT);",SELECT SUM(volunteer_hours) FROM volunteers WHERE city = 'Los Angeles';,SELECT COUNT(*) FROM volunteers WHERE city = 'Los Angeles';,0 Identify all cybersecurity incidents that resulted in loss of sensitive data in the last 6 months.," CREATE TABLE Incidents (IncidentID INT, IncidentDate DATE, IncidentType VARCHAR(50), AffectedData VARCHAR(50)); "," SELECT * FROM Incidents WHERE IncidentDate >= DATEADD(month, -6, GETDATE()) AND AffectedData = 'Sensitive Data';","SELECT IncidentID, IncidentType, AffectedData FROM Incidents WHERE IncidentDate >= DATEADD(month, -6, GETDATE());",0 Insert new geopolitical risk assessments for 'Europe',"CREATE TABLE risk_assessments (assess_id INT, assess_description TEXT, region VARCHAR(50));","INSERT INTO risk_assessments (assess_id, assess_description, region) VALUES (1, 'Rising political tensions', 'Europe'), (2, 'Economic instability', 'Europe');","INSERT INTO risk_assessments (assess_id, assess_description, region) VALUES (1, 'Europe');",0 Get the daily active user count for India in November 2021.,"CREATE TABLE if not exists activity (user_id INT, country VARCHAR(50), activity_date DATE, year INT, month INT, day INT); ",SELECT COUNT(DISTINCT user_id) FROM activity WHERE country = 'India' AND month = 11 AND year = 2021;,SELECT COUNT(*) FROM activity WHERE country = 'India' AND activity_date BETWEEN '2021-11-01' AND '2021-01-31';,0 "What is the gold for the nation with a record of bronze 1, Syria nation with a grand total less than 1?","CREATE TABLE table_name_25 (gold INTEGER, total VARCHAR, bronze VARCHAR, nation VARCHAR);","SELECT AVG(gold) FROM table_name_25 WHERE bronze = 1 AND nation = ""syria"" AND total < 1;","SELECT SUM(gold) FROM table_name_25 WHERE bronze = 1 AND nation = ""syria"" AND total 1;",0 What is the maximum biomass of fish in the Indian Ocean Fish Farm for each month?,"CREATE TABLE indian_ocean_fish_farm (date DATE, biomass FLOAT);","SELECT EXTRACT(MONTH FROM date) AS month, MAX(biomass) AS max_biomass FROM indian_ocean_fish_farm GROUP BY month;","SELECT EXTRACT(MONTH FROM date) AS month, MAX(biomass) FROM indian_ocean_fish_farm GROUP BY month;",0 Which countries have more than two members?,CREATE TABLE member (Country VARCHAR);,SELECT Country FROM member GROUP BY Country HAVING COUNT(*) > 2;,SELECT Country FROM member GROUP BY Country HAVING COUNT(*) > 2;,1 What is the 1st leg score when US Mbila Nzambi is team 1?,CREATE TABLE table_name_3 (team_1 VARCHAR);,"SELECT 1 AS st_leg FROM table_name_3 WHERE team_1 = ""us mbila nzambi"";","SELECT 1 AS st_leg FROM table_name_3 WHERE team_1 = ""us mbila nzambi"";",1 What is the median number of court appearances for cases in the justice system?,"CREATE TABLE Cases (ID INT, CaseNumber INT, DateOpened DATE, DateClosed DATE, Appearances INT); ","SELECT AVG(Appearances) as MedianAppearances FROM (SELECT Appearances, ROW_NUMBER() OVER (ORDER BY Appearances) as rn, COUNT(*) OVER () as cnt FROM Cases) x WHERE rn IN ((cnt + 1) / 2, (cnt + 2) / 2);","SELECT AVG(Appearances) FROM Cases WHERE DateOpened >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND DateClosed = DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 "Insert data into 'Students' table with values '1001', 'John Doe'","CREATE TABLE Students (StudentId INT, Name VARCHAR(50));","INSERT INTO Students (StudentId, Name) VALUES (1001, 'John Doe');","INSERT INTO Students (StudentId, Name) VALUES (1001, 'John Doe');",1 What was the name of the Event with a time of 2:19?,"CREATE TABLE table_name_8 (event VARCHAR, time VARCHAR);","SELECT event FROM table_name_8 WHERE time = ""2:19"";","SELECT event FROM table_name_8 WHERE time = ""2:19"";",1 Update the 'Region' for the record with 'StationID' 789 in the 'PoliceStations' table to 'North',"CREATE TABLE PoliceStations (StationID INT PRIMARY KEY, StationName VARCHAR(50), Region VARCHAR(50));",UPDATE PoliceStations SET Region = 'North' WHERE StationID = 789;,UPDATE PoliceStations SET Region = 'North' WHERE StationID = 789;,1 Which average lost that has a match less than 14?,"CREATE TABLE table_name_9 (lost INTEGER, match INTEGER);",SELECT AVG(lost) FROM table_name_9 WHERE match < 14;,SELECT AVG(lost) FROM table_name_9 WHERE match 14;,0 What is the average number of goals scored per game by players from South America against teams from North America?,"CREATE TABLE player_games (player_id INT, opponent_team_continent VARCHAR(50), goals INT);",SELECT AVG(goals) FROM player_games WHERE opponent_team_continent = 'North America' AND player_id IN (SELECT player_id FROM players WHERE country LIKE 'South America%');,SELECT AVG(goals) FROM player_games WHERE opponent_team_continent = 'North America' AND player_id IN (SELECT player_id FROM player_games WHERE opponent_team_continent = 'South America');,0 What is the average rainfall in millimeters for each region in the 'rainfall_data_2021' table for the month of June?,"CREATE TABLE rainfall_data_2021 (id INT, region VARCHAR(20), rainfall DECIMAL(5,2), capture_date DATE); ","SELECT region, AVG(rainfall) FROM rainfall_data_2021 WHERE MONTH(capture_date) = 6 GROUP BY region;","SELECT region, AVG(rainfall) as avg_rainfall FROM rainfall_data_2021 WHERE capture_date BETWEEN '2021-01-01' AND '2021-06-30' GROUP BY region;",0 What were the goal conceded that had a lost greater than 8 and more than 17 points?,"CREATE TABLE table_name_19 (goals_conceded INTEGER, lost VARCHAR, points VARCHAR);",SELECT MAX(goals_conceded) FROM table_name_19 WHERE lost > 8 AND points > 17;,SELECT SUM(goals_conceded) FROM table_name_19 WHERE lost > 8 AND points > 17;,0 "List all marine species with their conservation status, ordered alphabetically by species name.","CREATE TABLE marine_species_conservation (species TEXT, conservation_status TEXT);","SELECT species, conservation_status FROM marine_species_conservation ORDER BY species;","SELECT species, conservation_status FROM marine_species_conservation ORDER BY species;",1 What are the statuses of the platelet counts for the conditions where the prothrombin time and partial thromboblastin time is unaffected? ,"CREATE TABLE table_20592988_1 (platelet_count VARCHAR, prothrombin_time VARCHAR, partial_thromboplastin_time VARCHAR);","SELECT platelet_count FROM table_20592988_1 WHERE prothrombin_time = ""Unaffected"" AND partial_thromboplastin_time = ""Unaffected"";","SELECT platelet_count FROM table_20592988_1 WHERE prothrombin_time = ""Unaffected"" AND partial_thromboplastin_time = ""Unaffected"";",1 On what Date was the Opponent the Tennessee Titans?,"CREATE TABLE table_name_47 (date VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_47 WHERE opponent = ""tennessee titans"";","SELECT date FROM table_name_47 WHERE opponent = ""tennessee titans"";",1 Name the rookie for ryan powell,"CREATE TABLE table_23265433_2 (rookie VARCHAR, offensive VARCHAR);","SELECT rookie FROM table_23265433_2 WHERE offensive = ""Ryan Powell"";","SELECT rookie FROM table_23265433_2 WHERE offensive = ""Ryan Powell"";",1 What are the total greenhouse gas emissions from rare earth element production in each country?,"CREATE TABLE emissions (country VARCHAR(50), emissions INT); ","SELECT country, SUM(emissions) FROM emissions GROUP BY country;","SELECT country, SUM(emissions) FROM emissions GROUP BY country;",1 Identify the top 5 agricultural innovations with the highest adoption rates in Africa.,"CREATE TABLE Innovations (id INT PRIMARY KEY, name VARCHAR(50), region VARCHAR(20), adoption_rate FLOAT);","SELECT name, adoption_rate FROM (SELECT name, adoption_rate, ROW_NUMBER() OVER (PARTITION BY region ORDER BY adoption_rate DESC) rn FROM Innovations WHERE region = 'Africa') tmp WHERE rn <= 5;","SELECT name, adoption_rate FROM Innovations WHERE region = 'Africa' ORDER BY adoption_rate DESC LIMIT 5;",0 Show the working years of managers in descending order of their level.,"CREATE TABLE manager (Working_year_starts VARCHAR, LEVEL VARCHAR);",SELECT Working_year_starts FROM manager ORDER BY LEVEL DESC;,SELECT Working_year_starts FROM manager ORDER BY LEVEL;,0 Find all the unique location values in the legal_tech table that have more than 5 records.,"CREATE TABLE legal_tech (record_id INT, location VARCHAR(20), tech_used VARCHAR(20), date DATE); ",SELECT location FROM legal_tech GROUP BY location HAVING COUNT(*) > 5;,SELECT DISTINCT location FROM legal_tech GROUP BY location HAVING COUNT(DISTINCT record_id) > 5;,0 What is the distribution of threat levels for all IP addresses?,"CREATE TABLE ip_threat_levels_2 (ip_address VARCHAR(20), threat_level VARCHAR(20)); ","SELECT threat_level, COUNT(*) as total_ips FROM ip_threat_levels_2 GROUP BY threat_level;","SELECT ip_address, threat_level FROM ip_threat_levels_2 GROUP BY ip_address, threat_level;",0 "What is the total transaction amount per customer, ordered by the total transaction amount?","CREATE TABLE Customers (CustomerID int, Name varchar(50), Age int); CREATE TABLE Transactions (TransactionID int, CustomerID int, Amount decimal(10,2)); ","SELECT Contexts.CustomerID, SUM(Transactions.Amount) as TotalAmount FROM Contexts JOIN Transactions ON Contexts.CustomerID = Transactions.CustomerID GROUP BY Contexts.CustomerID ORDER BY TotalAmount DESC;","SELECT Customers.Name, SUM(Transactions.Amount) as TotalTransactionAmount FROM Customers INNER JOIN Transactions ON Customers.CustomerID = Transactions.CustomerID GROUP BY Customers.Name ORDER BY TotalTransactionAmount DESC;",0 "List the organizations that have received donations from donors located in 'New York', but have not received donations from donors located in 'Texas' or 'Florida'.","CREATE TABLE donors (id INT, name TEXT, state TEXT); CREATE TABLE donations (id INT, donor_id INT, org_id INT, donation_amount DECIMAL(10,2)); ","SELECT organizations.name FROM organizations WHERE organizations.id IN (SELECT donations.org_id FROM donations JOIN donors ON donations.donor_id = donors.id WHERE donors.state = 'New York') AND organizations.id NOT IN (SELECT donations.org_id FROM donations JOIN donors ON donations.donor_id = donors.id WHERE donors.state IN ('Texas', 'Florida'));","SELECT org_id FROM donations JOIN donors ON donations.donor_id = donors.id WHERE donors.state IN ('New York', 'Texas', 'Florida') AND donors.id IS NULL;",0 "Which game number had a location/attendance of US Airways Center 7,311 respectively?","CREATE TABLE table_17118657_7 (game INTEGER, location_attendance VARCHAR);","SELECT MAX(game) FROM table_17118657_7 WHERE location_attendance = ""US Airways Center 7,311"";","SELECT MAX(game) FROM table_17118657_7 WHERE location_attendance = ""US Airways Center 7,311"";",1 "Which Pick # is the highest one that has an Overall of 184, and a Round larger than 6?","CREATE TABLE table_name_25 (pick__number INTEGER, overall VARCHAR, round VARCHAR);",SELECT MAX(pick__number) FROM table_name_25 WHERE overall = 184 AND round > 6;,SELECT MAX(pick__number) FROM table_name_25 WHERE overall = 184 AND round > 6;,1 What is the percentage of cultural competency training completed by community health workers?,"CREATE TABLE training (worker_id INT, training_type VARCHAR(50), completion_percentage INT); ","SELECT worker_id, training_type, completion_percentage, completion_percentage * 100.0 / SUM(completion_percentage) OVER (PARTITION BY training_type) as percentage FROM training WHERE training_type = 'Cultural Competency';",SELECT completion_percentage FROM training WHERE training_type = 'Cultural Competency';,0 What is the total cargo weight loaded in the Brazilian region?,"CREATE TABLE CargoTracking (CargoID INT, LoadDate DATE, LoadLocation VARCHAR(50), CargoWeight INT); ",SELECT SUM(CargoWeight) FROM CargoTracking WHERE LoadLocation LIKE 'Brazil%';,SELECT SUM(CargoWeight) FROM CargoTracking WHERE LoadLocation = 'Brazil';,0 What is the percentage of female doctors in rural Pakistan?,"CREATE TABLE healthcare_providers (id INT, name VARCHAR(50), gender VARCHAR(10), role VARCHAR(20), location VARCHAR(50)); ","SELECT ROUND(100.0 * COUNT(*) / (SELECT COUNT(*) FROM healthcare_providers WHERE location = 'Rural Pakistan' AND role = 'Doctor'), 2) FROM healthcare_providers WHERE location = 'Rural Pakistan' AND gender = 'Female' AND role = 'Doctor';",SELECT (COUNT(*) FILTER (WHERE gender = 'Female')) * 100.0 / COUNT(*) FROM healthcare_providers WHERE location = 'Rural Pakistan';,0 What is the Perfect fifth with a Minor that is seventh of d?,"CREATE TABLE table_name_48 (perfect_fifth VARCHAR, minor_seventh VARCHAR);","SELECT perfect_fifth FROM table_name_48 WHERE minor_seventh = ""d"";","SELECT perfect_fifth FROM table_name_48 WHERE minor_seventh = ""d"";",1 What is the market share of OTAs offering virtual tours in the APAC region?,"CREATE TABLE otas (ota_id INT, ota_name TEXT, country TEXT); CREATE TABLE virtual_tours (tour_id INT, ota_id INT, views INT); ",SELECT 100.0 * COUNT(DISTINCT otas.ota_id) / (SELECT COUNT(DISTINCT ota_id) FROM otas) AS market_share FROM virtual_tours INNER JOIN otas ON virtual_tours.ota_id = otas.ota_id WHERE otas.country LIKE 'APAC%';,"SELECT ota_name, SUM(views) as total_views FROM otas JOIN virtual_tours ON otas.ota_id = virtual_tours.ota_id WHERE otas.country = 'APAC' GROUP BY ota_name;",0 How many marine protected areas are there in the Pacific Ocean?,"CREATE TABLE mpas (id INT, name VARCHAR(255), ocean VARCHAR(255)); ",SELECT COUNT(*) FROM mpas WHERE ocean = 'Pacific';,SELECT COUNT(*) FROM mpas WHERE ocean = 'Pacific';,1 Select the names and games of players who have the highest score in their game.,"CREATE TABLE Players (PlayerID INT, Name VARCHAR(50), Game VARCHAR(50), Score INT); ","SELECT Name, Game FROM Players P1 WHERE Score = (SELECT MAX(Score) FROM Players P2 WHERE P1.Game = P2.Game);","SELECT Name, Game FROM Players WHERE Score = (SELECT MAX(Score) FROM Players);",0 What is the position of the Colorado Rapids team?,"CREATE TABLE table_name_38 (position VARCHAR, mls_team VARCHAR);","SELECT position FROM table_name_38 WHERE mls_team = ""colorado rapids"";","SELECT position FROM table_name_38 WHERE mls_team = ""colorado rapids"";",1 What Record has a Year that's larger than 2012?,"CREATE TABLE table_name_11 (record VARCHAR, year INTEGER);",SELECT record FROM table_name_11 WHERE year > 2012;,SELECT record FROM table_name_11 WHERE year > 2012;,1 What is the total energy storage capacity and current level for battery and pumped hydro storage systems in Brazil and Argentina for the first week of February 2021?,"CREATE TABLE energy_storage (storage_id INT, storage_type VARCHAR(20), country VARCHAR(20), capacity FLOAT, current_level FLOAT, storage_date DATETIME); ","SELECT storage_type, country, SUM(capacity) as total_capacity, AVG(current_level) as avg_current_level FROM energy_storage WHERE country IN ('Brazil', 'Argentina') AND storage_type IN ('Battery', 'Pumped Hydro') AND storage_date >= '2021-02-01' AND storage_date < '2021-02-08' GROUP BY storage_type, country;","SELECT SUM(capacity) as total_capacity, current_level FROM energy_storage WHERE country IN ('Brazil', 'Argentina') AND storage_type IN ('batteries', 'pumped hydro') AND storage_date BETWEEN '2021-02-01' AND '2021-02-28';",0 What is the total number of cases handled by attorney 'Bob Johnson'?,"CREATE TABLE cases (case_id INT, attorney_name TEXT); ",SELECT COUNT(*) FROM cases WHERE attorney_name = 'Bob Johnson';,SELECT COUNT(*) FROM cases WHERE attorney_name = 'Bob Johnson';,1 Insert a new transaction with amount 800 for client 'Zara' living in 'New York' on '2022-04-01'.,"CREATE TABLE clients (id INT, name TEXT, city TEXT); CREATE TABLE transactions (client_id INT, amount DECIMAL(10,2), transaction_time TIMESTAMP); ","INSERT INTO transactions (client_id, amount, transaction_time) VALUES (1, 800, '2022-04-01 12:00:00');","INSERT INTO transactions (client_id, amount, transaction_time) VALUES ('Zara', 'New York', 800, '2022-04-01');",0 What was the episode number for the episode viewed by 5.68 million viewers?,"CREATE TABLE table_27987623_1 (season_episode VARCHAR, us_viewers__in_million_ VARCHAR);","SELECT season_episode FROM table_27987623_1 WHERE us_viewers__in_million_ = ""5.68"";","SELECT season_episode FROM table_27987623_1 WHERE us_viewers__in_million_ = ""5.68"";",1 "Delete a record from the ""attendees"" table where the attendee is from Japan","CREATE TABLE attendees (id INT PRIMARY KEY, name VARCHAR(100), event_date DATE, country VARCHAR(50));",DELETE FROM attendees WHERE country = 'Japan';,DELETE FROM attendees WHERE country = 'Japan';,1 "List all astronauts who have flown missions on SpaceX spacecraft, their mission names, and the spacecraft names.","CREATE TABLE Astronauts (id INT, name VARCHAR(50), age INT, gender VARCHAR(10), nationality VARCHAR(50), missions VARCHAR(500)); CREATE TABLE AstronautMissions (astronaut_id INT, mission_id INT); CREATE TABLE SpaceMissions (id INT, name VARCHAR(50), spacecraft_manufacturer VARCHAR(50)); ","SELECT a.name, sm.name AS mission_name, s.name AS spacecraft_name FROM Astronauts a JOIN AstronautMissions am ON a.id = am.astronaut_id JOIN SpaceMissions sm ON am.mission_id = sm.id JOIN Spacecraft s ON sm.spacecraft_manufacturer = s.manufacturer WHERE s.manufacturer = 'SpaceX';","SELECT Astronauts.name, AstronautMissions.mission_name, SpaceMissions.name FROM Astronauts INNER JOIN AstronautMissions ON Astronauts.id = AstronautMissions.astronaut_id INNER JOIN SpaceMissions ON AstronautMissions.mission_id = SpaceMissions.id WHERE SpaceMissions.spacecraft_manufacturer = 'SpaceX';",0 "How many virtual tours were engaged with in the DACH region (Germany, Austria, Switzerland) in Q1 2022?","CREATE TABLE virtual_tours (tour_id INT, region TEXT, engagement INT, date DATE); ","SELECT SUM(engagement) FROM virtual_tours WHERE region IN ('Germany', 'Austria', 'Switzerland') AND date BETWEEN '2022-01-01' AND '2022-03-31';","SELECT COUNT(*) FROM virtual_tours WHERE region = 'Germany, Austria, Switzerland' AND date BETWEEN '2022-01-01' AND '2022-03-31';",0 "How many average total matches have a swansea win less than 3, fa cup as the competition, with a draw less than 0?","CREATE TABLE table_name_23 (total_matches INTEGER, draw VARCHAR, swansea_win VARCHAR, competition VARCHAR);","SELECT AVG(total_matches) FROM table_name_23 WHERE swansea_win < 3 AND competition = ""fa cup"" AND draw < 0;","SELECT AVG(total_matches) FROM table_name_23 WHERE swansea_win 3 AND competition = ""fa cup"" AND draw 0;",0 What is the total amount of carbon offset and adoption year for each offset type in each city?,"CREATE TABLE carbon_offsets (id INT, city VARCHAR(50), offset_type VARCHAR(50), amount FLOAT); CREATE TABLE smart_cities (id INT, city VARCHAR(50), adoption_year INT); ","SELECT co.city, co.offset_type, sc.adoption_year, SUM(co.amount) as total_amount FROM carbon_offsets co JOIN smart_cities sc ON co.city = sc.city GROUP BY co.city, co.offset_type, sc.adoption_year;","SELECT c.city, c.offset_type, SUM(c.amount) as total_amount, SUM(s.adoption_year) as total_adoption_year FROM carbon_offsets c JOIN smart_cities s ON c.city = s.city GROUP BY c.city, c.offset_type;",0 What is the total number of obesity-related hospitalizations in Indigenous populations in Canada in 2020?,"CREATE TABLE obesity_hospitalizations (id INT, ethnicity TEXT, location TEXT, year INT, num_hospitalizations INT); ",SELECT SUM(obesity_hospitalizations.num_hospitalizations) FROM obesity_hospitalizations WHERE obesity_hospitalizations.ethnicity = 'Indigenous' AND obesity_hospitalizations.location = 'Canada' AND obesity_hospitalizations.year = 2020;,SELECT SUM(num_hospitalizations) FROM obesity_hospitalizations WHERE ethnicity = 'Indigenous' AND location = 'Canada' AND year = 2020;,0 Name all the team clasification where the combination classification is mederic clain,"CREATE TABLE table_15088557_1 (team_classification VARCHAR, combination_classification VARCHAR);","SELECT team_classification FROM table_15088557_1 WHERE combination_classification = ""Mederic Clain"";","SELECT team_classification FROM table_15088557_1 WHERE combination_classification = ""Mederic Clain"";",1 Update the price of menu item 'Salad' to 17.99 dollars,"CREATE TABLE menu_items (item_id INT, item_name TEXT, price DECIMAL(5,2)); ",UPDATE menu_items SET price = 17.99 WHERE item_name = 'Salad';,UPDATE menu_items SET price = 17.99 WHERE item_name = 'Salad';,1 Which Doctor is featured in City of Death?,"CREATE TABLE table_name_69 (doctor VARCHAR, title VARCHAR);","SELECT doctor FROM table_name_69 WHERE title = ""city of death"";","SELECT doctor FROM table_name_69 WHERE title = ""city of death"";",1 What is the total revenue generated from concert ticket sales in the city of 'Los Angeles'?,"CREATE TABLE concerts (id INT, artist VARCHAR(255), city VARCHAR(255), revenue FLOAT); ",SELECT SUM(revenue) FROM concerts WHERE city = 'Los Angeles';,SELECT SUM(revenue) FROM concerts WHERE city = 'Los Angeles';,1 When 64 is the entries what is the winning boat?,"CREATE TABLE table_24673710_1 (winning_boat VARCHAR, entries VARCHAR);",SELECT winning_boat FROM table_24673710_1 WHERE entries = 64;,SELECT winning_boat FROM table_24673710_1 WHERE entries = 64;,1 What was the total revenue for the 'comedy' genre movies released in 2020?,"CREATE TABLE movies (id INT, title VARCHAR(100), genre VARCHAR(50), release_year INT, revenue INT); ",SELECT SUM(revenue) FROM movies WHERE genre = 'Comedy' AND release_year = 2020;,SELECT SUM(revenue) FROM movies WHERE genre = 'comedy' AND release_year = 2020;,0 "What year did the winnings equal $281,945?","CREATE TABLE table_2182562_1 (year VARCHAR, winnings VARCHAR);","SELECT year FROM table_2182562_1 WHERE winnings = ""$281,945"";","SELECT year FROM table_2182562_1 WHERE winnings = ""$281,945"";",1 Which research expeditions have not taken place in any country with a recorded shark attack?,"CREATE TABLE shark_attacks (id INT PRIMARY KEY, location VARCHAR(255), year INT, type VARCHAR(255)); CREATE TABLE expeditions (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), year INT, type VARCHAR(255)); ","SELECT e.name, e.location, e.year, e.type FROM expeditions e LEFT JOIN shark_attacks sa ON e.location = sa.location WHERE sa.location IS NULL AND e.type = 'Research';",SELECT expeditions.name FROM expeditions INNER JOIN shark_attacks ON expeditions.location = shark_attacks.location WHERE shark_attacks.type = 'Research' AND expeditions.location IS NULL;,0 List military equipment types in the 'equipment_maintenance' table,"CREATE TABLE equipment_maintenance (maintenance_id INT, equipment_type VARCHAR(50), maintenance_activity VARCHAR(100), maintenance_date DATE);",SELECT DISTINCT equipment_type FROM equipment_maintenance;,SELECT equipment_type FROM equipment_maintenance;,0 Tell me the highest cuts made with wins more than 1,"CREATE TABLE table_name_5 (cuts_made INTEGER, wins INTEGER);",SELECT MAX(cuts_made) FROM table_name_5 WHERE wins > 1;,SELECT MAX(cuts_made) FROM table_name_5 WHERE wins > 1;,1 Which countries received the most humanitarian assistance from the US in the last 3 years?,"CREATE TABLE humanitarian_assistance (donor VARCHAR(255), recipient VARCHAR(255), assistance_amount DECIMAL(10,2), assistance_date DATE);","SELECT recipient, SUM(assistance_amount) as total_assistance FROM humanitarian_assistance WHERE donor = 'US' AND assistance_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 3 YEAR) AND CURDATE() GROUP BY recipient ORDER BY total_assistance DESC LIMIT 5;","SELECT recipient, SUM(assistance_amount) as total_assistance FROM humanitarian_assistance WHERE donor = 'US' AND assistance_date >= DATEADD(year, -3, GETDATE()) GROUP BY recipient ORDER BY total_assistance DESC;",0 "Determine the number of green buildings certified per year, using a SQL query with a window function.","CREATE TABLE green_buildings (id INT, name VARCHAR(50), city VARCHAR(50), country VARCHAR(50), certification_date DATE, certified_sustainable BOOLEAN);CREATE VIEW green_buildings_certified_per_year AS SELECT EXTRACT(YEAR FROM certification_date) AS certification_year, COUNT(*) OVER (PARTITION BY EXTRACT(YEAR FROM certification_date)) AS buildings_certified_per_year FROM green_buildings WHERE certified_sustainable = TRUE;","SELECT certification_year, buildings_certified_per_year FROM green_buildings_certified_per_year;","SELECT certification_year, COUNT(*) FROM green_buildings_certified_per_year GROUP BY certification_year;",0 What is the total quantity of fish farmed in each country?,"CREATE TABLE CountryFishFarms (Country varchar(50), FarmID int, FarmName varchar(50), Quantity int); ","SELECT Country, SUM(Quantity) as TotalQuantity FROM CountryFishFarms GROUP BY Country;","SELECT Country, SUM(Quantity) FROM CountryFishFarms GROUP BY Country;",0 What bullet does the gun with a shoulder measurement of 12.5 (.491)?,"CREATE TABLE table_name_51 (bullet VARCHAR, shoulder VARCHAR);","SELECT bullet FROM table_name_51 WHERE shoulder = ""12.5 (.491)"";","SELECT bullet FROM table_name_51 WHERE shoulder = ""12.5 (.491)"";",1 What is the smallest number of extra points?,CREATE TABLE table_25517718_3 (extra_points INTEGER);,SELECT MIN(extra_points) FROM table_25517718_3;,SELECT MIN(extra_points) FROM table_25517718_3;,1 Update the safety records of all vessels that have been involved in accidents in the South China Sea.,"CREATE TABLE vessels (id INT, name TEXT, type TEXT, safety_record TEXT); CREATE TABLE incidents (id INT, vessel_id INT, location TEXT, incident_date DATE); ",UPDATE vessels SET safety_record = 'Poor' WHERE id IN (SELECT vessel_id FROM incidents WHERE location = 'South China Sea');,UPDATE vessels SET safety_record = 1 WHERE vessel_id IN (SELECT id FROM incidents WHERE location = 'South China Sea');,0 What finals have grant brebner as the name?,"CREATE TABLE table_name_40 (finals VARCHAR, name VARCHAR);","SELECT finals FROM table_name_40 WHERE name = ""grant brebner"";","SELECT finals FROM table_name_40 WHERE name = ""grant brebner"";",1 "Which marine protected areas ('mpa') have a size greater than 50,000 square kilometers in the Arctic region ('region')?","CREATE TABLE region (id INT, name VARCHAR(50)); CREATE TABLE mpa (id INT, name VARCHAR(50), region_id INT, area_sqkm FLOAT); ",SELECT mpa.name FROM mpa INNER JOIN region ON mpa.region_id = region.id WHERE region.name = 'Arctic' AND mpa.area_sqkm > 50000;,SELECT mpa.name FROM mpa INNER JOIN region ON mpa.region_id = region.id WHERE region.name = 'Arctic' AND mpa.area_sqkm > 50000;,1 What is the total amount donated by small donors (those who have donated less than $100) in Q1 2021?,"CREATE TABLE donors (donor_id INT, donation_amount DECIMAL(10,2), donation_date DATE); ",SELECT SUM(donation_amount) FROM donors WHERE donation_amount < 100 AND donation_date BETWEEN '2021-01-01' AND '2021-03-31';,SELECT SUM(donation_amount) FROM donors WHERE donation_date BETWEEN '2021-01-01' AND '2021-03-31' AND donation_amount 100;,0 "What is the result of the match on January 26, 2006?","CREATE TABLE table_name_44 (result VARCHAR, date VARCHAR);","SELECT result FROM table_name_44 WHERE date = ""january 26, 2006"";","SELECT result FROM table_name_44 WHERE date = ""january 26, 2006"";",1 Which properties in the 'property_co_ownership' table are co-owned by a person with id 5?,"CREATE TABLE property_co_ownership (id INT, property_id INT, co_owner_id INT, agreement_start_date DATE, agreement_end_date DATE);",SELECT property_id FROM property_co_ownership WHERE co_owner_id = 5;,"SELECT property_id, co_owner_id, agreement_start_date, agreement_end_date FROM property_co_ownership WHERE co_owner_id = 5;",0 What was the total sales amount for each product category by country in 2022?,CREATE TABLE sales_2022 AS SELECT * FROM sales WHERE sale_date BETWEEN '2022-01-01' AND '2022-12-31'; ALTER TABLE sales_2022 ADD COLUMN country_region VARCHAR(50); UPDATE sales_2022 SET country_region = CASE WHEN sale_country = 'Brazil' THEN 'South America' WHEN sale_country = 'India' THEN 'Asia' WHEN sale_country = 'USA' THEN 'North America' WHEN sale_country = 'Italy' THEN 'Europe' ELSE country_region END;,"SELECT country_region, product_category, SUM(sale_amount) FROM sales_2022 GROUP BY country_region, product_category;","SELECT c.country_region, SUM(s.sales_amount) as total_sales FROM sales_2022 s JOIN country_region c ON s.country_region = c.country_region WHERE s.sale_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY c.country_region;",0 What is the sum of all points in 1975 with 0 wins?,"CREATE TABLE table_name_33 (points INTEGER, year VARCHAR, wins VARCHAR);",SELECT SUM(points) FROM table_name_33 WHERE year = 1975 AND wins < 0;,SELECT SUM(points) FROM table_name_33 WHERE year = 1975 AND wins = 0;,0 Find the autonomous driving research data from 2020.,"CREATE TABLE AutonomousResearch (Year INT, Data VARCHAR(255)); ",SELECT Data FROM AutonomousResearch WHERE Year = 2020;,SELECT Data FROM AutonomousResearch WHERE Year = 2020;,1 What is the maximum crime severity score in each borough?,"CREATE TABLE crimes (id INT, borough VARCHAR(255), severity_score FLOAT); ","SELECT borough, MAX(severity_score) FROM crimes GROUP BY borough;","SELECT borough, MAX(severity_score) FROM crimes GROUP BY borough;",1 Insert a new record into the sustainability_initiatives table for a local farm partnership,"CREATE TABLE sustainability_initiatives (sustainability_initiative_id INT, name VARCHAR(50), description TEXT, start_date DATE, end_date DATE);","INSERT INTO sustainability_initiatives (name, description, start_date, end_date) VALUES ('Local Farm Partnership', 'Partnership with local farms to source ingredients', '2021-01-01', '2023-12-31');","INSERT INTO sustainability_initiatives (sustainability_initiative_id, name, description, start_date, end_date) VALUES (1, 'Local Farm Partnership', start_date, end_date);",0 How many Gold medals did Great Britain with a Total of more than 2 medals receive?,"CREATE TABLE table_name_83 (gold INTEGER, nation VARCHAR, total VARCHAR);","SELECT MIN(gold) FROM table_name_83 WHERE nation = ""great britain"" AND total > 2;","SELECT SUM(gold) FROM table_name_83 WHERE nation = ""great britain"" AND total > 2;",0 Who is the oldest athlete in the 'athletes' table?,"CREATE TABLE athletes (athlete_id INT, name VARCHAR(50), age INT, sport VARCHAR(50)); ",SELECT name AS oldest_athlete FROM athletes ORDER BY age DESC LIMIT 1;,"SELECT name, age FROM athletes ORDER BY age DESC LIMIT 1;",0 What is the average risk score for policyholders aged 50-60 who have made at least one claim in the last 12 months?,"CREATE TABLE policyholders (id INT, dob DATE, risk_score INT); CREATE TABLE claims (id INT, policyholder_id INT, claim_date DATE); ",SELECT AVG(policyholders.risk_score) FROM policyholders JOIN claims ON policyholders.id = claims.policyholder_id WHERE policyholders.dob BETWEEN '1961-01-01' AND '1972-01-01' AND claims.claim_date BETWEEN '2021-11-01' AND '2022-10-31';,"SELECT AVG(policyholders.risk_score) FROM policyholders INNER JOIN claims ON policyholders.id = claims.policyholder_id WHERE policyholders.age BETWEEN 50 AND 60 AND claims.claim_date >= DATEADD(month, -12, GETDATE());",0 What is the total number of streams and albums sold by artists who have won a Grammy award?,"CREATE TABLE Artists (ArtistID INT, ArtistName VARCHAR(100), GrammyWinner BOOLEAN); CREATE TABLE MusicStreams (StreamID INT, SongID INT, ArtistID INT); CREATE TABLE Albums (AlbumID INT, AlbumName VARCHAR(100), ArtistID INT); ",SELECT COUNT(DISTINCT ms.StreamID) + COUNT(DISTINCT a.AlbumID) AS TotalReleases FROM Artists a JOIN MusicStreams ms ON a.ArtistID = ms.ArtistID JOIN Albums al ON a.ArtistID = al.ArtistID WHERE GrammyWinner = TRUE;,"SELECT SUM(MusicStreams.StreamID) AS TotalStreams, SUM(Albums.AlbumName) AS TotalAlbums FROM MusicStreams INNER JOIN Artists ON MusicStreams.ArtistID = Artists.ArtistID INNER JOIN Albums ON MusicStreams.AlbumID = Albums.AlbumID WHERE Artists.GrammyWinner = TRUE;",0 How many total attendees were there for online events in Africa?,"CREATE TABLE attendees (id INT, event_id INT, no_attendees INT, online BOOLEAN); CREATE TABLE events (id INT, name VARCHAR(255), type VARCHAR(255), date DATE, country VARCHAR(255), online BOOLEAN);",SELECT SUM(a.no_attendees) FROM attendees a INNER JOIN events e ON a.event_id = e.id WHERE e.country LIKE '%Africa%' AND e.online = TRUE;,SELECT SUM(no_attendees) FROM attendees JOIN events ON attendees.event_id = events.id WHERE events.country = 'Africa' AND attendees.online = true;,0 What season was herschelle gibbs andrew symonds venugopal rao batsmen?,"CREATE TABLE table_22962745_35 (season VARCHAR, batsmen VARCHAR);","SELECT season FROM table_22962745_35 WHERE batsmen = ""Herschelle Gibbs Andrew Symonds Venugopal Rao"";","SELECT season FROM table_22962745_35 WHERE batsmen = ""Herschelle Gibbs andrew Symonds Venugopal Rao"";",0 What are the names of people in ascending alphabetical order?,CREATE TABLE People (Name VARCHAR);,SELECT Name FROM People ORDER BY Name;,SELECT Name FROM People ORDER BY Name;,1 Which film was translated from portuguese?,"CREATE TABLE table_name_44 (original_name VARCHAR, language VARCHAR);","SELECT original_name FROM table_name_44 WHERE language = ""portuguese"";","SELECT original_name FROM table_name_44 WHERE language = ""portuguese"";",1 What is the average donation amount for each organization in the 'Donations' and 'Organizations' tables?,"CREATE TABLE Donations (donation_id INT, org_id INT, donation_amount DECIMAL(10,2));","SELECT O.name, AVG(D.donation_amount) FROM Donations D INNER JOIN Organizations O ON D.org_id = O.org_id GROUP BY O.name;","SELECT org_id, AVG(donation_amount) as avg_donation FROM Donations GROUP BY org_id;",0 display the number of species that are at risk of extinction,"CREATE TABLE species (species_id INT PRIMARY KEY, species_name TEXT, conservation_status TEXT); ","SELECT COUNT(*) FROM species WHERE conservation_status IN ('Endangered', 'Vulnerable', 'Critically Endangered');",SELECT COUNT(*) FROM species WHERE conservation_status = 'at risk of extinction';,0 Which state has a Percent (2009) of 6.2%?,"CREATE TABLE table_name_95 (state VARCHAR, percent__2009_ VARCHAR);","SELECT state FROM table_name_95 WHERE percent__2009_ = ""6.2%"";","SELECT state FROM table_name_95 WHERE percent__2009_ = ""6.2%"";",1 What is the maximum production volume for zinc mines in South Africa?,"CREATE TABLE mines (id INT, name TEXT, location TEXT, production_volume INT); ",SELECT MAX(production_volume) FROM mines WHERE location = 'South Africa' AND mineral = 'zinc';,SELECT MAX(production_volume) FROM mines WHERE location = 'South Africa' AND name LIKE '%Zinc%';,0 What is the maximum cultural competency score achieved by healthcare providers in each region?,"CREATE TABLE healthcare_providers (id INT, name VARCHAR(100), region VARCHAR(50), cultural_competency_score INT); ","SELECT region, MAX(cultural_competency_score) FROM healthcare_providers GROUP BY region;","SELECT region, MAX(cultural_competency_score) FROM healthcare_providers GROUP BY region;",1 What were the rounds on the Engine † of the Ferrari 048?,"CREATE TABLE table_name_33 (rounds VARCHAR, engine_† VARCHAR);","SELECT rounds FROM table_name_33 WHERE engine_† = ""ferrari 048"";","SELECT rounds FROM table_name_33 WHERE engine_ = ""ferrari 048"";",0 Alter the 'policyholders' table to add a column 'email' of type VARCHAR(255)',"CREATE TABLE if not exists policyholders (policyholder_id INT PRIMARY KEY, name VARCHAR(255), age INT, gender VARCHAR(10), policy_type VARCHAR(50), premium DECIMAL(10,2));",ALTER TABLE policyholders ADD COLUMN email VARCHAR(255);,ALTER TABLE policyholders ADD COLUMN email VARCHAR(255);,1 What was the location of the accident that led to 50/50 fatalities?,"CREATE TABLE table_name_84 (location VARCHAR, fatalities VARCHAR);","SELECT location FROM table_name_84 WHERE fatalities = ""50/50"";","SELECT location FROM table_name_84 WHERE fatalities = ""50/50"";",1 get the number of fans who are female and under 30,"CREATE TABLE fans (id INT PRIMARY KEY, name VARCHAR(100), age INT, gender VARCHAR(10), favorite_team VARCHAR(50));",SELECT COUNT(*) FROM fans WHERE gender = 'Female' AND age < 30;,SELECT COUNT(*) FROM fans WHERE gender = 'Female' AND age 30;,0 What is the sum of square footage of properties with sustainable urbanism certifications in Los Angeles?,"CREATE TABLE properties (id INT, city VARCHAR, size INT, sustainable_urbanism BOOLEAN);",SELECT SUM(size) FROM properties WHERE city = 'Los Angeles' AND sustainable_urbanism = TRUE;,SELECT SUM(size) FROM properties WHERE city = 'Los Angeles' AND sustainable_urbanism = true;,0 What is the maximum number of satellites deployed in a single space mission?,"CREATE TABLE SpaceMissions (Mission VARCHAR(50), LaunchSite VARCHAR(50), Satellites INT); ",SELECT MAX(Satellites) FROM SpaceMissions;,SELECT MAX(Satellites) FROM SpaceMissions;,1 "How many Draws have Wins larger than 7, and a Wimmera FL of nhill, and Losses larger than 8?","CREATE TABLE table_name_83 (draws INTEGER, losses VARCHAR, wins VARCHAR, wimmera_fl VARCHAR);","SELECT SUM(draws) FROM table_name_83 WHERE wins > 7 AND wimmera_fl = ""nhill"" AND losses > 8;","SELECT SUM(draws) FROM table_name_83 WHERE wins > 7 AND wimmera_fl = ""nhill"" AND losses > 8;",1 What is the total quantity of raw materials 'A' and 'B' that were processed after 2021-01-01?,"CREATE TABLE raw_materials (id INT, material TEXT, quantity INT, processing_date DATE); ","SELECT SUM(quantity) AS total_quantity FROM raw_materials WHERE material IN ('A', 'B') AND processing_date > '2021-01-01';","SELECT SUM(quantity) FROM raw_materials WHERE material IN ('A', 'B') AND processing_date > '2021-01-01';",0 Find the top 5 products with the highest revenue in Asia.,"CREATE TABLE products (id INT, name TEXT, price DECIMAL(5, 2)); CREATE TABLE sales (id INT, product TEXT, quantity INT, region TEXT); ","SELECT products.name, SUM(sales.quantity * products.price) as revenue FROM sales INNER JOIN products ON sales.product = products.name WHERE sales.region = 'Asia' GROUP BY sales.product ORDER BY revenue DESC LIMIT 5;","SELECT products.name, SUM(sales.quantity) as total_revenue FROM products INNER JOIN sales ON products.id = sales.product WHERE sales.region = 'Asia' GROUP BY products.name ORDER BY total_revenue DESC LIMIT 5;",0 What is the year of the season if the intermediate (South) winners is Southmead Athletic?,"CREATE TABLE table_23014923_1 (season VARCHAR, intermediate__south__winners VARCHAR);","SELECT season FROM table_23014923_1 WHERE intermediate__south__winners = ""Southmead Athletic"";","SELECT season FROM table_23014923_1 WHERE intermediate__south__winners = ""Southmead Athletic"";",1 Show the name and location for all tracks.,"CREATE TABLE track (name VARCHAR, LOCATION VARCHAR);","SELECT name, LOCATION FROM track;","SELECT name, LOCATION FROM track;",1 What is the average mass of exoplanets discovered by the Astrophysics Research Institute?,"CREATE TABLE AstrophysicsResearchData (research_institute VARCHAR(20), exoplanet_name VARCHAR(30), mass FLOAT); ",SELECT AVG(mass) FROM AstrophysicsResearchData WHERE research_institute = 'Astrophysics Research Institute';,SELECT AVG(mass) FROM AstrophysicsResearchData WHERE research_institute = 'Astrophysics Research Institute';,1 "What is the number of community health centers in each state, categorized by urban and rural areas?","CREATE TABLE states (state_id INT, state_name VARCHAR(255), region VARCHAR(255)); CREATE TABLE community_health_centers (center_id INT, center_name VARCHAR(255), state_id INT, location VARCHAR(255)); ","SELECT s.region, CHC.location, COUNT(CHC.center_id) as center_count FROM community_health_centers CHC JOIN states s ON CHC.state_id = s.state_id GROUP BY s.region, CHC.location;","SELECT s.state_name, c.location, COUNT(c.center_id) as num_centers FROM states s JOIN community_health_centers c ON s.state_id = c.state_id GROUP BY s.state_name, c.location, c.location;",0 What is the maximum ocean acidification level ever recorded in the Pacific Ocean?,"CREATE TABLE ocean_acidification (id INT, location TEXT, value FLOAT); ",SELECT MAX(value) FROM ocean_acidification WHERE location = 'Pacific Ocean';,SELECT MAX(value) FROM ocean_acidification WHERE location = 'Pacific Ocean';,1 What are the details of projects that started before 2019-06-01?,"CREATE TABLE ProjectTimeline (Id INT, ProjectId INT, Activity VARCHAR(50), StartDate DATE, EndDate DATE); ",SELECT * FROM ProjectTimeline WHERE StartDate < '2019-06-01';,"SELECT ProjectId, Activity FROM ProjectTimeline WHERE StartDate '2019-06-01';",0 "What is the Interregnum ended for the person with a Duration of 3 months, 6 days?","CREATE TABLE table_name_78 (interregnum_ended VARCHAR, duration VARCHAR);","SELECT interregnum_ended FROM table_name_78 WHERE duration = ""3 months, 6 days"";","SELECT interregnum_ended FROM table_name_78 WHERE duration = ""3 months, 6 days"";",1 What is the total number of packages and their weight in the 'Southeast Asia' region that have been returned for a refund?,"CREATE TABLE Warehouse (id INT, name TEXT, region TEXT); CREATE TABLE Shipment (id INT, warehouse_id INT, package_count INT, cargo_weight INT, return_status TEXT); ","SELECT Warehouse.region, SUM(Shipment.package_count) as total_packages, SUM(Shipment.cargo_weight) as total_cargo_weight FROM Warehouse INNER JOIN Shipment ON Warehouse.id = Shipment.warehouse_id WHERE Warehouse.region = 'Southeast Asia' AND Shipment.return_status = 'Refunded' GROUP BY Warehouse.region;","SELECT SUM(package_count), SUM(cargo_weight) FROM Shipment JOIN Warehouse ON Shipment.warehouse_id = Warehouse.id WHERE Warehouse.region = 'Southeast Asia' AND Shipment.return_status = 'Refund';",0 How many bicycles are there in the bike-sharing program in Paris?,"CREATE TABLE bike_sharing (id INT, city VARCHAR(20), num_bikes INT); ",SELECT num_bikes FROM bike_sharing WHERE city = 'Paris';,SELECT SUM(num_bikes) FROM bike_sharing WHERE city = 'Paris';,0 What is the earliest launch date for each type of spacecraft in the spacecraft_launches table?,"CREATE TABLE spacecraft_launches (id INT, spacecraft VARCHAR(30), launch_date DATE); CREATE VIEW earliest_launch_dates AS SELECT spacecraft, MIN(launch_date) as earliest_launch FROM spacecraft_launches GROUP BY spacecraft;",SELECT * FROM earliest_launch_dates;,"SELECT spacecraft, MIN(earliest_launch) FROM earliest_launch_dates GROUP BY spacecraft;",0 Who was recruited from Calgary?,"CREATE TABLE table_name_34 (player VARCHAR, college VARCHAR);","SELECT player FROM table_name_34 WHERE college = ""calgary"";","SELECT player FROM table_name_34 WHERE college = ""calgary"";",1 "What is th eswimming status for the school that has yes on indoor track, soccer and tennis?","CREATE TABLE table_name_80 (swimming VARCHAR, tennis VARCHAR, indoor_track VARCHAR, soccer VARCHAR);","SELECT swimming FROM table_name_80 WHERE indoor_track = ""yes"" AND soccer = ""yes"" AND tennis = ""yes"";","SELECT swimming FROM table_name_80 WHERE indoor_track = ""yes"" AND soccer = ""yes"" AND tennis = ""yes"";",1 What is the total number of high and medium severity vulnerabilities for each product in the last month?,"CREATE TABLE product_vulnerabilities (product_id INT, vulnerability_id INT, severity VARCHAR(10)); ","SELECT product_id, SUM(CASE WHEN severity = 'high' THEN 1 ELSE 0 END) as num_high_severity, SUM(CASE WHEN severity = 'medium' THEN 1 ELSE 0 END) as num_medium_severity FROM product_vulnerabilities WHERE detection_date >= DATEADD(month, -1, CURRENT_DATE) GROUP BY product_id;","SELECT product_id, severity, COUNT(*) as total_vulnerabilities FROM product_vulnerabilities WHERE severity IN ('high','medium') GROUP BY product_id, severity;",0 How many tourists from each country visited sustainable destinations?,"CREATE TABLE Sustainable_Destinations (id INT, destination_name VARCHAR(50), sustainable BOOLEAN); CREATE TABLE Tourists_Destinations (tourist_id INT, destination_id INT, visit_date DATE); ","SELECT Tourists.nationality, COUNT(DISTINCT Tourists_Destinations.tourist_id) AS num_tourists FROM Tourists_Destinations INNER JOIN Tourists ON Tourists_Destinations.tourist_id = Tourists.id INNER JOIN Sustainable_Destinations ON Tourists_Destinations.destination_id = Sustainable_Destinations.id WHERE Sustainable_Destinations.sustainable = true GROUP BY Tourists.nationality;","SELECT sd.destination_name, COUNT(td.tourist_id) FROM Sustainable_Destinations sd JOIN Tourists_Destinations td ON sd.destination_id = td.destination_id WHERE sd.sustainable = TRUE GROUP BY sd.destination_name;",0 What is every value for словјански if polish is książka?,"CREATE TABLE table_25008327_8 (словјански VARCHAR, polish VARCHAR);","SELECT словјански FROM table_25008327_8 WHERE polish = ""książka"";","SELECT словански FROM table_25008327_8 WHERE polish = ""Ksika"";",0 What is the total value of transactions for the digital asset 'Ripple'?,"CREATE TABLE ripple_transactions (asset_name VARCHAR(20), transactions_value FLOAT); ","SELECT asset_name, SUM(transactions_value) FROM ripple_transactions WHERE asset_name = 'Ripple' GROUP BY asset_name;",SELECT SUM(transactions_value) FROM ripple_transactions WHERE asset_name = 'Ripple';,0 How many testing licenses were issued per month in Canada in 2020?,"CREATE TABLE Licenses (id INT, issue_date DATE, license_type TEXT); ","SELECT DATE_FORMAT(issue_date, '%Y-%m') as month, COUNT(*) as num_licenses FROM Licenses WHERE license_type = 'Testing' AND issue_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY month;","SELECT EXTRACT(MONTH FROM issue_date) AS month, COUNT(*) FROM Licenses WHERE license_type = 'Testing' AND EXTRACT(YEAR FROM issue_date) = 2020 GROUP BY month;",0 How many dollars is the revenue when the net profit is 55.4 million dollars?,"CREATE TABLE table_18077713_1 (revenue__us_$million_ VARCHAR, net_profit__us_$m_ VARCHAR);","SELECT revenue__us_$million_ FROM table_18077713_1 WHERE net_profit__us_$m_ = ""55.4"";","SELECT revenue__us_$million_ FROM table_18077713_1 WHERE net_profit__us_$m_ = ""55.4"";",1 On what date was the opponent in the final Gwinyai Tongoona?,"CREATE TABLE table_name_62 (date VARCHAR, opponent_in_the_final VARCHAR);","SELECT date FROM table_name_62 WHERE opponent_in_the_final = ""gwinyai tongoona"";","SELECT date FROM table_name_62 WHERE opponent_in_the_final = ""gwinyai tongoona"";",1 What is the lowest area km2 of the member state of the Czech Republic and has a population in millions lesss than 10.3?,"CREATE TABLE table_name_61 (area_km_2 INTEGER, member_state VARCHAR, population_in_millions VARCHAR);","SELECT MIN(area_km_2) FROM table_name_61 WHERE member_state = ""czech republic"" AND population_in_millions < 10.3;","SELECT MIN(area_km_2) FROM table_name_61 WHERE member_state = ""czech republic"" AND population_in_millions 10.3;",0 "When Jim Richards won at the Winton Motor Raceway circuit, what was the city and state listed?","CREATE TABLE table_name_70 (city___state VARCHAR, winner VARCHAR, circuit VARCHAR);","SELECT city___state FROM table_name_70 WHERE winner = ""jim richards"" AND circuit = ""winton motor raceway"";","SELECT city___state FROM table_name_70 WHERE winner = ""jim richards"" AND circuit = ""winton motor raceway"";",1 "What are the names, locations, and lengths of all tunnels in Germany that have a length greater than 10000 meters?","CREATE TABLE Tunnels (TunnelID INT, Name TEXT, Length FLOAT, Location TEXT, Country TEXT); ","SELECT Tunnels.Name, Tunnels.Location, Tunnels.Length FROM Tunnels WHERE Tunnels.Length > 10000.0 AND Tunnels.Country = 'Germany'","SELECT Name, Location, Length FROM Tunnels WHERE Country = 'Germany' AND Length > 10000;",0 What is the moving average of transaction amounts for each customer over the past year?,"CREATE TABLE transactions (transaction_date DATE, customer_id INT, amount DECIMAL(10,2)); ","SELECT customer_id, AVG(amount) OVER (PARTITION BY customer_id ORDER BY transaction_date ROWS BETWEEN 364 PRECEDING AND CURRENT ROW) AS moving_avg FROM transactions;","SELECT customer_id, AVG(amount) as moving_avg FROM transactions WHERE transaction_date >= DATEADD(year, -1, GETDATE()) GROUP BY customer_id;",0 What is the minimum revenue earned by restaurants in the 'Asian' cuisine category located in 'New York'?,"CREATE TABLE restaurants (restaurant_id INT, name VARCHAR(50), cuisine VARCHAR(50), city VARCHAR(50), revenue INT); ","SELECT cuisine, MIN(revenue) FROM restaurants WHERE cuisine = 'Asian' AND city = 'New York';",SELECT MIN(revenue) FROM restaurants WHERE cuisine = 'Asian' AND city = 'New York';,0 What are the names of the marine species that are found in the same regions as endangered species?,"CREATE TABLE marine_species (id INT PRIMARY KEY, name VARCHAR(255), species VARCHAR(255), region VARCHAR(255)); CREATE TABLE endangered_species (id INT PRIMARY KEY, name VARCHAR(255), species VARCHAR(255), region VARCHAR(255)); ","SELECT m.name, e.name FROM marine_species m INNER JOIN endangered_species e ON m.region = e.region WHERE e.name = 'Blue Whale';",SELECT marine_species.name FROM marine_species INNER JOIN endangered_species ON marine_species.region = endangered_species.region;,0 What is the average monthly balance for socially responsible credit cards?,"CREATE TABLE credit_cards (id INT, card_type VARCHAR(255), monthly_balance DECIMAL(10,2)); ",SELECT AVG(monthly_balance) FROM credit_cards WHERE card_type = 'Socially Responsible';,SELECT AVG(monthly_balance) FROM credit_cards WHERE card_type ='socially responsible';,0 "Identify the number of open positions in each department, and the total number of employees in each department.","CREATE TABLE Departments (Department VARCHAR(50), OpenPositions INT); CREATE TABLE Employees (EmployeeID INT, Department VARCHAR(50)); ","SELECT Departments.Department, Departments.OpenPositions, COUNT(Employees.EmployeeID) AS NumberOfEmployees FROM Departments LEFT JOIN Employees ON Departments.Department = Employees.Department GROUP BY Departments.Department, Departments.OpenPositions;","SELECT Departments.Department, COUNT(DISTINCT Employees.EmployeeID) AS OpenPositions, COUNT(DISTINCT Employees.EmployeeID) AS TotalEmployees FROM Departments INNER JOIN Employees ON Departments.Department = Employees.Department GROUP BY Departments.Department;",0 How many building permits were issued per day in CA in 2021?,"CREATE TABLE PermitsByDay (PermitID int, Date date, State varchar(25)); ","SELECT DATEPART(YEAR, Date) AS Year, DATEPART(MONTH, Date) AS Month, DATEPART(DAY, Date) AS Day, COUNT(*) AS PermitsIssued FROM PermitsByDay WHERE State = 'CA' AND YEAR(Date) = 2021 GROUP BY DATEPART(YEAR, Date), DATEPART(MONTH, Date), DATEPART(DAY, Date);","SELECT Date, COUNT(*) FROM PermitsByDay WHERE State = 'CA' AND Date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY Date;",0 How many students are enrolled in lifelong learning programs in each district?,"CREATE TABLE lifelong_learning_programs (student_id INT, district_id INT, program_name VARCHAR(255)); ","SELECT district_id, COUNT(DISTINCT student_id) FROM lifelong_learning_programs GROUP BY district_id;","SELECT district_id, COUNT(*) FROM lifelong_learning_programs GROUP BY district_id;",0 what are all the result for New York 7 district,"CREATE TABLE table_1341395_33 (result VARCHAR, district VARCHAR);","SELECT result FROM table_1341395_33 WHERE district = ""New York 7"";","SELECT result FROM table_1341395_33 WHERE district = ""New York 7"";",1 What is the average cost of sustainable construction materials in the 'materials' table?,"CREATE TABLE materials (material_name VARCHAR(30), is_sustainable BOOLEAN, cost FLOAT); ",SELECT AVG(cost) FROM materials WHERE is_sustainable = TRUE;,SELECT AVG(cost) FROM materials WHERE is_sustainable = true;,0 "Create a table 'waste_generation' with columns id, region, year, and metric","CREATE TABLE waste_generation ( id INT PRIMARY KEY, region VARCHAR(50), year INT, metric DECIMAL(5,2));","CREATE TABLE waste_generation ( id INT PRIMARY KEY, region VARCHAR(50), year INT, metric DECIMAL(5,2));","CREATE TABLE waste_generation ( id INT PRIMARY KEY, region VARCHAR(50), year INT, metric DECIMAL(5,2));",1 What is the number of male doctors in the 'healthcare_staff' table?,"CREATE TABLE healthcare_staff (name VARCHAR(255), gender VARCHAR(255), position VARCHAR(255), hospital_id INT); ",SELECT COUNT(*) FROM healthcare_staff WHERE gender = 'Male' AND position = 'Doctor';,SELECT COUNT(*) FROM healthcare_staff WHERE gender = 'Male';,0 What is the launch date of 栗?,"CREATE TABLE table_name_70 (launched VARCHAR, kanji VARCHAR);","SELECT launched FROM table_name_70 WHERE kanji = ""栗"";","SELECT launched FROM table_name_70 WHERE kanji = """";",0 Add a new customer support ticket to the support_tickets table,"CREATE TABLE support_tickets (ticket_id INT, subscriber_id INT, ticket_subject VARCHAR(100), ticket_description TEXT, ticket_status VARCHAR(20), ticket_open_date DATE);","INSERT INTO support_tickets (ticket_id, subscriber_id, ticket_subject, ticket_description, ticket_status, ticket_open_date) VALUES (23456, 12345, 'Internet Connection Issue', 'My internet connection is down', 'Open', '2022-01-02');","ALTER TABLE support_tickets ADD subscriber_id, ticket_subject, ticket_description, ticket_status VARCHAR(20), ticket_open_date DATE;",0 What is the number of animals in the 'community_education' table that belong to endangered species?,"CREATE TABLE community_education (id INT, animal_name VARCHAR(50)); CREATE TABLE endangered_species (id INT, animal_name VARCHAR(50), endangered_status VARCHAR(50));",SELECT COUNT(*) FROM community_education ce INNER JOIN endangered_species es ON ce.animal_name = es.animal_name WHERE endangered_status = 'Endangered';,SELECT COUNT(*) FROM community_education JOIN endangered_species ON community_education.animal_name = endangered_species.animal_name WHERE endangered_species.endangered_status = 'Endangered';,0 Find the name and industry of the company with the lowest funding in the Bioprocess Engineering department.,"CREATE TABLE company (id INT PRIMARY KEY, name VARCHAR(255), industry VARCHAR(255), funding FLOAT); ","SELECT name, industry FROM company WHERE industry = 'Bioprocess Engineering' AND funding = (SELECT MIN(funding) FROM company WHERE industry = 'Bioprocess Engineering');","SELECT name, industry FROM company WHERE funding = (SELECT MIN(funding) FROM company WHERE industry = 'Bioprocess Engineering');",0 What is the average car number of all the drivers with 109 points?,"CREATE TABLE table_name_12 (car__number INTEGER, points VARCHAR);","SELECT AVG(car__number) FROM table_name_12 WHERE points = ""109"";",SELECT AVG(car__number) FROM table_name_12 WHERE points = 109;,0 What was the name of the quarterback drafted?,"CREATE TABLE table_10360656_1 (player_name VARCHAR, position VARCHAR);","SELECT player_name FROM table_10360656_1 WHERE position = ""Quarterback"";","SELECT player_name FROM table_10360656_1 WHERE position = ""QB"";",0 "Who is the player from Houston, TX?","CREATE TABLE table_name_49 (player VARCHAR, hometown VARCHAR);","SELECT player FROM table_name_49 WHERE hometown = ""houston, tx"";","SELECT player FROM table_name_49 WHERE hometown = ""houston, tx"";",1 What is the total number of trips made by electric buses in Bangkok over the past year?,"CREATE TABLE public.yearly_trips_by_vehicle (id SERIAL PRIMARY KEY, vehicle_type TEXT, city TEXT, year_start DATE, year_trips INTEGER); ","SELECT SUM(year_trips) FROM public.yearly_trips_by_vehicle WHERE vehicle_type = 'electric_bus' AND city = 'Bangkok' AND year_start BETWEEN DATE_TRUNC('year', CURRENT_DATE - INTERVAL '1 year') AND CURRENT_DATE;","SELECT SUM(year_trips) FROM public.yearly_trips_by_vehicle WHERE vehicle_type = 'Electric Bus' AND city = 'Bangkok' AND year_start >= DATEADD(year, -1, GETDATE());",0 How many countries have launched objects into space?,"CREATE TABLE space_objects (object_name TEXT, launch_country TEXT); ","SELECT launch_country, COUNT(DISTINCT launch_country) as country_count FROM space_objects GROUP BY launch_country HAVING COUNT(DISTINCT launch_country) > 1;",SELECT COUNT(*) FROM space_objects;,0 What is the total fare collected from train lines passing through the 'Central Station'?,"CREATE TABLE train_trips (trip_id INT, line_id INT, fare FLOAT); CREATE TABLE train_lines (line_id INT, line_name TEXT, passes_through TEXT); ",SELECT SUM(tt.fare) FROM train_trips tt JOIN train_lines tl ON tt.line_id = tl.line_id WHERE tl.passes_through = 'Central Station';,SELECT SUM(fare) FROM train_trips JOIN train_lines ON train_trips.line_id = train_lines.line_id WHERE passes_through = 'Central Station';,0 "Which region had a year March 10, 1998?","CREATE TABLE table_name_17 (region VARCHAR, year VARCHAR);","SELECT region FROM table_name_17 WHERE year = ""march 10, 1998"";","SELECT region FROM table_name_17 WHERE year = ""march 10, 1998"";",1 What is the average silver with a Rank smaller than 2 and more than 1 gold?,"CREATE TABLE table_name_61 (silver INTEGER, rank VARCHAR, gold VARCHAR);",SELECT AVG(silver) FROM table_name_61 WHERE rank < 2 AND gold > 1;,SELECT AVG(silver) FROM table_name_61 WHERE rank 2 AND gold > 1;,0 "What is the rating/share for 18-49 for Week 6, Part 1?","CREATE TABLE table_25391981_20 (rating VARCHAR, episode VARCHAR);","SELECT rating / SHARE(18 AS –49) FROM table_25391981_20 WHERE episode = ""Week 6, Part 1"";","SELECT rating FROM table_25391981_20 WHERE episode = ""Week 6, Part 1"";",0 How many point totals are there that rank higher than 9 and have a PPG avg higher than 13.4?,"CREATE TABLE table_name_48 (total_points VARCHAR, rank VARCHAR, ppg_avg VARCHAR);",SELECT COUNT(total_points) FROM table_name_48 WHERE rank > 9 AND ppg_avg > 13.4;,SELECT COUNT(total_points) FROM table_name_48 WHERE rank > 9 AND ppg_avg > 13.4;,1 "Who were the opponents that played on a hard surface on July 13, 2008?","CREATE TABLE table_name_85 (opponents VARCHAR, surface VARCHAR, date VARCHAR);","SELECT opponents FROM table_name_85 WHERE surface = ""hard"" AND date = ""july 13, 2008"";","SELECT opponents FROM table_name_85 WHERE surface = ""hard"" AND date = ""july 13, 2008"";",1 Who is the Skip when Alasdair Guthrie is the third?,"CREATE TABLE table_name_83 (skip VARCHAR, third VARCHAR);","SELECT skip FROM table_name_83 WHERE third = ""alasdair guthrie"";","SELECT skip FROM table_name_83 WHERE third = ""alasdair guthrie"";",1 "How many aircraft have been manufactured in the United States between 2010 and 2020, excluding aircraft with a production year of 2015?","CREATE TABLE aircraft_manufacturing (aircraft_id INT, manufacturer VARCHAR(50), production_year INT); ",SELECT COUNT(*) FROM aircraft_manufacturing WHERE manufacturer = 'United States' AND production_year BETWEEN 2010 AND 2020 AND production_year != 2015;,SELECT COUNT(*) FROM aircraft_manufacturing WHERE manufacturer = 'USA' AND production_year BETWEEN 2010 AND 2020;,0 What is the total biomass of plankton in the Atlantic Ocean?,"CREATE TABLE plankton (species TEXT, ocean TEXT, biomass INT); ",SELECT SUM(biomass) FROM plankton WHERE ocean = 'Atlantic';,SELECT SUM(biomass) FROM plankton WHERE ocean = 'Atlantic Ocean';,0 Which country has the least number of fair trade certified factories?,"CREATE TABLE factories (factory_id INT, country VARCHAR(255), certification VARCHAR(255)); ","SELECT country, COUNT(*) as factory_count FROM factories WHERE certification = 'fair trade' GROUP BY country ORDER BY factory_count ASC LIMIT 1;","SELECT country, COUNT(*) FROM factories WHERE certification = 'Fair Trade' GROUP BY country ORDER BY COUNT(*) LIMIT 1;",0 What is the total runtime for all anime produced in Japan?,"CREATE TABLE anime (id INT, title VARCHAR(255), release_year INT, views INT, country VARCHAR(50), runtime INT); ",SELECT SUM(runtime) FROM anime WHERE country = 'Japan';,SELECT SUM(runtime) FROM anime WHERE country = 'Japan';,1 Name the winning driver with circuit of monza,"CREATE TABLE table_name_59 (winning_driver VARCHAR, circuit VARCHAR);","SELECT winning_driver FROM table_name_59 WHERE circuit = ""monza"";","SELECT winning_driver FROM table_name_59 WHERE circuit = ""monza"";",1 How many astronauts were born in the state of Texas?,"CREATE TABLE astronauts (id INT, name VARCHAR(255), birth_date DATE, state VARCHAR(255)); ",SELECT COUNT(*) FROM astronauts WHERE state = 'Texas';,SELECT COUNT(*) FROM astronauts WHERE state = 'Texas';,1 List all artworks and their corresponding acquisition dates from museums located in the Pacific region.,"CREATE TABLE museums (id INT, name VARCHAR(255), city VARCHAR(255), region VARCHAR(255)); CREATE TABLE artworks (id INT, museum_id INT, title VARCHAR(255), acquisition_date DATE);","SELECT a.title, a.acquisition_date FROM artworks a JOIN museums m ON a.museum_id = m.id WHERE m.region = 'Pacific';","SELECT artworks.title, artworks.acquisition_date FROM artworks INNER JOIN museums ON artworks.museum_id = museums.id WHERE museums.region = 'Pacific';",0 what is the lowest geo id?,CREATE TABLE table_18600760_15 (geo_id INTEGER);,SELECT MIN(geo_id) FROM table_18600760_15;,SELECT MIN(geo_id) FROM table_18600760_15;,1 Which year were both the Premier Division Ewyas Harold and Division Three Stoke Prior champions?,"CREATE TABLE table_name_24 (season VARCHAR, premier_division VARCHAR, division_three VARCHAR);","SELECT season FROM table_name_24 WHERE premier_division = ""ewyas harold"" AND division_three = ""stoke prior"";","SELECT season FROM table_name_24 WHERE premier_division = ""ewyas harold"" AND division_three = ""stoke prior"";",1 Find the city with the most number of stores.,"CREATE TABLE district (headquartered_city VARCHAR, district_id VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR); CREATE TABLE store (store_id VARCHAR);",SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT(*) DESC LIMIT 1;,SELECT T1.headquartered_city FROM store AS T1 JOIN store_district AS T2 ON T1.store_id = T2.store_id GROUP BY T1.district_id ORDER BY COUNT(*) DESC LIMIT 1;,0 What are the top 3 countries with the most bioprocess engineering patents?,"CREATE SCHEMA if not exists engineering;CREATE TABLE engineering.patents (id INT, patent_name VARCHAR(50), country VARCHAR(50));","SELECT country, COUNT(*) as patent_count FROM engineering.patents GROUP BY country ORDER BY patent_count DESC LIMIT 3;","SELECT country, COUNT(*) as patent_count FROM engineering.patents GROUP BY country ORDER BY patent_count DESC LIMIT 3;",1 Identify the unique co-owners across all properties.,"CREATE TABLE property_coowners (property_id INT, coowner VARCHAR(255)); ",SELECT DISTINCT coowner FROM property_coowners;,SELECT DISTINCT coowner FROM property_coowners;,1 What is the most common treatment approach for depression?,"CREATE TABLE treatments (id INT, patient_id INT, approach TEXT); CREATE TABLE conditions (id INT, name TEXT); ","SELECT approach, COUNT(*) as count FROM treatments JOIN conditions ON treatments.approach = conditions.name WHERE conditions.id = 1 GROUP BY approach ORDER BY count DESC LIMIT 1;","SELECT treatments.approche, COUNT(treatments.id) as count FROM treatments INNER JOIN conditions ON treatments.patient_id = conditions.id WHERE conditions.name = 'Depression' GROUP BY treatments.approche ORDER BY count DESC LIMIT 1;",0 Which companies have manufactured more than 3 satellites with the type 'Earth Observation'?,"CREATE TABLE Manufacturer (name VARCHAR(50), country VARCHAR(50), domain VARCHAR(20)); ","SELECT m.name, m.country, COUNT(s.id) as satellite_count FROM Manufacturer m INNER JOIN Satellite s ON m.name = s.manufacturer WHERE s.type = 'Earth Observation' GROUP BY m.name, m.country HAVING COUNT(s.id) > 3;",SELECT name FROM Manufacturer WHERE domain = 'Earth Observation' GROUP BY name HAVING COUNT(*) > 3;,0 What was the total number of shipments from Vietnam to South Africa in the first half of May 2021?,"CREATE TABLE shipments (id INT, origin VARCHAR(255), destination VARCHAR(255), shipped_at TIMESTAMP); ",SELECT COUNT(*) FROM shipments WHERE origin = 'Vietnam' AND destination = 'South Africa' AND shipped_at >= '2021-05-01' AND shipped_at < '2021-05-16';,SELECT COUNT(*) FROM shipments WHERE origin = 'Vietnam' AND destination = 'South Africa' AND shipped_at BETWEEN '2021-05-01' AND '2021-05-30';,0 Name the total number for material collected for 978-1401221935,"CREATE TABLE table_19534677_1 (material_collected VARCHAR, isbn VARCHAR);","SELECT COUNT(material_collected) FROM table_19534677_1 WHERE isbn = ""978-1401221935"";","SELECT COUNT(material_collected) FROM table_19534677_1 WHERE isbn = ""978-1401221935"";",1 what is the venue when the event is 4x400 m relay and the competition is asian championships?,"CREATE TABLE table_name_7 (venue VARCHAR, event VARCHAR, competition VARCHAR);","SELECT venue FROM table_name_7 WHERE event = ""4x400 m relay"" AND competition = ""asian championships"";","SELECT venue FROM table_name_7 WHERE event = ""4x400 m relay"" AND competition = ""asian championships"";",1 What is the average CO2 offset of carbon offset initiatives in Germany?,"CREATE TABLE carbon_offsets (id INT, initiative_name VARCHAR(100), co2_offset FLOAT, country VARCHAR(50)); ",SELECT AVG(co2_offset) FROM carbon_offsets WHERE country = 'Germany';,SELECT AVG(co2_offset) FROM carbon_offsets WHERE country = 'Germany';,1 What is the Quantity of type 2-4-2t?,"CREATE TABLE table_name_59 (quantity VARCHAR, type VARCHAR);","SELECT COUNT(quantity) FROM table_name_59 WHERE type = ""2-4-2t"";","SELECT quantity FROM table_name_59 WHERE type = ""2-4-2t"";",0 "What is the lowest rank of the United States, with fewer than 4 bronze medals?","CREATE TABLE table_name_55 (rank INTEGER, nation VARCHAR, bronze VARCHAR);","SELECT MIN(rank) FROM table_name_55 WHERE nation = ""united states"" AND bronze < 4;","SELECT MIN(rank) FROM table_name_55 WHERE nation = ""united states"" AND bronze 4;",0 What are the top 5 cities with the highest average income in the United States?,"CREATE TABLE us_cities (city VARCHAR(50), state VARCHAR(2), avg_income DECIMAL(10,2)); ","SELECT city, avg_income FROM us_cities ORDER BY avg_income DESC LIMIT 5;","SELECT city, AVG(avg_income) as avg_income FROM us_cities GROUP BY city ORDER BY avg_income DESC LIMIT 5;",0 Show food justice events in California and the number of attendees.,"CREATE TABLE food_justice (event_name VARCHAR(255), location VARCHAR(255), attendees INT);","SELECT location, event_name, SUM(attendees) as total_attendees FROM food_justice WHERE location = 'California' GROUP BY event_name;","SELECT event_name, location, attendees FROM food_justice WHERE location = 'California';",0 What is the number of properties with sustainability ratings of 3 or higher in the city of Miami?,"CREATE TABLE properties (id INT, city VARCHAR(255), sustainability_rating INT); ",SELECT COUNT(*) FROM properties WHERE city = 'Miami' AND sustainability_rating >= 3;,SELECT COUNT(*) FROM properties WHERE city = 'Miami' AND sustainability_rating >= 3;,1 What is the total quantity of clothing products manufactured in the USA in 2021?,"CREATE TABLE clothing_products (id INT, product_name VARCHAR(50), quantity_manufactured INT, country_of_manufacture VARCHAR(50), manufacture_date DATE); ",SELECT SUM(quantity_manufactured) FROM clothing_products WHERE country_of_manufacture = 'USA' AND YEAR(manufacture_date) = 2021;,SELECT SUM(quantity_manufactured) FROM clothing_products WHERE country_of_manufacture = 'USA' AND YEAR(manufacture_date) = 2021;,1 What is the total number of eco-certified destinations in South America?,"CREATE TABLE destinations (destination_id INT, name VARCHAR(50), country_id INT, is_eco_certified BOOLEAN); ",SELECT COUNT(*) FROM destinations d WHERE d.is_eco_certified = true AND d.country_id IN (SELECT country_id FROM countries WHERE continent = 'South America');,SELECT COUNT(*) FROM destinations WHERE is_eco_certified = true AND country_id IN (SELECT country_id FROM countries WHERE region = 'South America');,0 Find the details for all chip models.,CREATE TABLE chip_model (Id VARCHAR);,SELECT * FROM chip_model;,SELECT * FROM chip_model;,1 What are the title and issues of the books?,"CREATE TABLE book (Title VARCHAR, Issues VARCHAR);","SELECT Title, Issues FROM book;","SELECT Title, Issues FROM book;",1 Where does the Kuskokwim Mountains rank on the chart?,"CREATE TABLE table_name_5 (rank INTEGER, mountain_range VARCHAR);","SELECT MAX(rank) FROM table_name_5 WHERE mountain_range = ""kuskokwim mountains"";","SELECT SUM(rank) FROM table_name_5 WHERE mountain_range = ""kuskokwim mountains"";",0 List all members who joined in the first quarter of 2020 and their total workouts in that period.,"CREATE TABLE membership_data (member_id INT, join_date DATE); CREATE TABLE workout_data (workout_id INT, member_id INT, workout_date DATE);","SELECT m.member_id, m.join_date, COUNT(w.workout_id) as total_workouts FROM membership_data m JOIN workout_data w ON m.member_id = w.member_id WHERE QUARTER(m.join_date) = 1 AND YEAR(m.join_date) = 2020 GROUP BY m.member_id;","SELECT m.member_id, SUM(w.workout_id) as total_workouts FROM membership_data m JOIN workout_data w ON m.member_id = w.member_id WHERE m.join_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY m.member_id;",0 What is the average recycling rate by country in Europe in 2019?,"CREATE TABLE recycling_rates (country VARCHAR(20), year INT, recycling_rate FLOAT); ","SELECT AVG(recycling_rate) as avg_recycling_rate FROM recycling_rates WHERE year = 2019 AND country IN ('Germany', 'France', 'Spain', 'Italy', 'Poland');","SELECT country, AVG(recycling_rate) FROM recycling_rates WHERE year = 2019 GROUP BY country;",0 What is the total duration of 'Swimming' workouts?,"CREATE TABLE Workout (WorkoutID INT, MemberID INT, WorkoutType VARCHAR(30), Duration INT); ",SELECT SUM(Duration) FROM Workout WHERE WorkoutType = 'Swimming';,SELECT SUM(Duration) FROM Workout WHERE WorkoutType = 'Swimming';,1 What is the average rating of eco-friendly skincare products?,"CREATE TABLE cosmetics (product_id INT, product_name VARCHAR(100), rating DECIMAL(2,1), is_eco_friendly BOOLEAN, product_type VARCHAR(50));",SELECT AVG(rating) FROM cosmetics WHERE is_eco_friendly = TRUE AND product_type = 'skincare';,SELECT AVG(rating) FROM cosmetics WHERE is_eco_friendly = true AND product_type ='skincare';,0 What is the Date with an Opponent that is indiana state college?,"CREATE TABLE table_name_71 (date VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_71 WHERE opponent = ""indiana state college"";","SELECT date FROM table_name_71 WHERE opponent = ""indiana state college"";",1 "How many losses for the team with less than 4 wins, more than 0 byes and 2510 against?","CREATE TABLE table_name_39 (losses INTEGER, byes VARCHAR, wins VARCHAR, against VARCHAR);",SELECT AVG(losses) FROM table_name_39 WHERE wins < 4 AND against = 2510 AND byes > 0;,SELECT SUM(losses) FROM table_name_39 WHERE wins 4 AND against = 2510 AND byes > 0;,0 Which Country has a Year(s) won of 1977?,"CREATE TABLE table_name_60 (country VARCHAR, year_s__won VARCHAR);","SELECT country FROM table_name_60 WHERE year_s__won = ""1977"";","SELECT country FROM table_name_60 WHERE year_s__won = ""1977"";",1 What position has siim ennemuist as the player?,"CREATE TABLE table_name_52 (position VARCHAR, player VARCHAR);","SELECT position FROM table_name_52 WHERE player = ""siim ennemuist"";","SELECT position FROM table_name_52 WHERE player = ""siim ennemuist"";",1 "Determine the number of registered users for each country in our database, returning only countries with more than 10,000 users.","CREATE TABLE users_ext (id INT, name VARCHAR(255), country VARCHAR(255)); ","SELECT country, COUNT(*) as num_users FROM users_ext GROUP BY country HAVING num_users > 10000;","SELECT country, COUNT(*) FROM users_ext GROUP BY country HAVING COUNT(*) > 10000;",0 What is the total number of esports events held in total in 2020?,"CREATE TABLE esports_events (id INT, year INT, location VARCHAR(20)); ",SELECT COUNT(*) FROM esports_events WHERE year = 2020;,SELECT COUNT(*) FROM esports_events WHERE year = 2020;,1 Percentage of viewers of reality TV shows in the UK,"CREATE TABLE TV_Viewership (viewer_id INT, age INT, tv_show VARCHAR(255), country VARCHAR(50), view_date DATE);",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM TV_Viewership WHERE country = 'UK')) as percentage FROM TV_Viewership WHERE tv_show LIKE '%reality%' AND country = 'UK';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM TV_Viewership WHERE country = 'UK')) AS percentage FROM TV_Viewership WHERE country = 'UK';,0 List all hotels with their total revenue from virtual tour engagement in 'Africa'.,"CREATE TABLE virtual_tour_revenue (hotel_id INT, region TEXT, revenue FLOAT); CREATE TABLE hotels (id INT, name TEXT); ","SELECT h.name, SUM(vtr.revenue) AS total_revenue FROM hotels h JOIN virtual_tour_revenue vtr ON h.id = vtr.hotel_id WHERE vtr.region = 'Africa' GROUP BY h.name;","SELECT hotels.name, SUM(virtual_tour_revenue.revenue) FROM hotels INNER JOIN virtual_tour_revenue ON hotels.id = virtual_tour_revenue.hotel_id WHERE virtual_tour_revenue.region = 'Africa' GROUP BY hotels.name;",0 Who wrote episode 23 in the season?,"CREATE TABLE table_27823359_1 (written_by VARCHAR, season__number VARCHAR);","SELECT written_by FROM table_27823359_1 WHERE season__number = ""23"";",SELECT written_by FROM table_27823359_1 WHERE season__number = 23;,0 "What is the running total of 'online_time' for each user, for the 'online_learning' database, ordered by user_id and date?","CREATE TABLE online_learning (id INT, user_id INT, online_date DATE, online_time INT); ","SELECT user_id, online_date, online_time, SUM(online_time) OVER (PARTITION BY user_id ORDER BY online_date) as running_total FROM online_learning;","SELECT user_id, online_date, SUM(online_time) as total_online_time FROM online_learning GROUP BY user_id, online_date ORDER BY user_id, online_date;",0 What is the average number of cases heard by a judge in a year?,"CREATE TABLE judicial_workload (judge_id INT, year INT, cases_heard INT);",SELECT AVG(cases_heard) FROM judicial_workload;,SELECT AVG(cases_heard) FROM judicial_workload;,1 "What is the rank of the country with more than 2 medals, and 2 gold medals?","CREATE TABLE table_name_83 (rank VARCHAR, total VARCHAR, gold VARCHAR);",SELECT rank FROM table_name_83 WHERE total > 2 AND gold = 2;,SELECT rank FROM table_name_83 WHERE total > 2 AND gold = 2;,1 What is the total number of Against that were played in the H Venue on 26 february 1949?,"CREATE TABLE table_name_59 (against VARCHAR, venue VARCHAR, date VARCHAR);","SELECT COUNT(against) FROM table_name_59 WHERE venue = ""h"" AND date = ""26 february 1949"";","SELECT COUNT(against) FROM table_name_59 WHERE venue = ""h"" AND date = ""26 february 1949"";",1 "What is Ivaiporã, pr's biggest population?","CREATE TABLE table_name_13 (population INTEGER, town_city VARCHAR);","SELECT MAX(population) FROM table_name_13 WHERE town_city = ""ivaiporã, pr"";","SELECT MAX(population) FROM table_name_13 WHERE town_city = ""ivaipor, pr"";",0 What is the earliest year that the discus throw event occur?,"CREATE TABLE table_name_2 (year INTEGER, event VARCHAR);","SELECT MIN(year) FROM table_name_2 WHERE event = ""discus throw"";","SELECT MIN(year) FROM table_name_2 WHERE event = ""discus throw"";",1 "How many traditional Chinese for the translation of ""Crossing the River""?","CREATE TABLE table_1805919_1 (traditional_chinese VARCHAR, english_translation VARCHAR);","SELECT COUNT(traditional_chinese) FROM table_1805919_1 WHERE english_translation = ""Crossing the River"";","SELECT COUNT(traditional_chinese) FROM table_1805919_1 WHERE english_translation = ""Crossing the River"";",1 Name the pinyin for 487 area,"CREATE TABLE table_1638437_2 (pinyin VARCHAR, area VARCHAR);","SELECT pinyin FROM table_1638437_2 WHERE area = ""487"";",SELECT pinyin FROM table_1638437_2 WHERE area = 487;,0 What is the 1991 for 2R 1999?,CREATE TABLE table_name_92 (Id VARCHAR);,"SELECT 1991 FROM table_name_92 WHERE 1999 = ""2r"";","SELECT 1991 FROM table_name_92 WHERE 1999 = ""2r"";",1 Identify the decentralized application with the most code updates in the 'Storage' industry sector during Q2 2022.,"CREATE TABLE code_updates (dapp_name VARCHAR(20), industry_sector VARCHAR(10), quarter INT, update_count INT); ","SELECT dapp_name, update_count FROM code_updates WHERE industry_sector = 'Storage' AND quarter = 2 ORDER BY update_count DESC LIMIT 1;","SELECT dapp_name, MAX(update_count) FROM code_updates WHERE industry_sector = 'Storage' AND quarter = 2 GROUP BY dapp_name;",0 What is the maximum age of players who play VR games in Canada?,"CREATE TABLE Players (PlayerID INT, Age INT, Gender VARCHAR(10), Country VARCHAR(20)); CREATE TABLE VR_Games (GameID INT, GameName VARCHAR(20), Players INT); ",SELECT MAX(Players.Age) FROM Players WHERE Players.Country = 'Canada' AND Players.PlayerID IN (SELECT Players_VR.PlayerID FROM Players AS Players_VR INNER JOIN VR_Games AS VR_Games_VR ON Players_VR.PlayerID = VR_Games_VR.Players);,SELECT MAX(Players.Age) FROM Players INNER JOIN VR_Games ON Players.PlayerID = VR_Games.GameID WHERE Players.Country = 'Canada';,0 What's the minimal enrollment of any of the schools?,CREATE TABLE table_1969577_3 (enrollment INTEGER);,SELECT MIN(enrollment) FROM table_1969577_3;,SELECT MIN(enrollment) FROM table_1969577_3;,1 List the names of volunteers who have contributed more than 5 hours.,"CREATE TABLE Volunteers (id INT, name TEXT, hours FLOAT); ",SELECT name FROM Volunteers WHERE hours > 5;,SELECT name FROM Volunteers WHERE hours > 5;,1 List all astronauts who have never been on a space mission,"CREATE TABLE Astronauts(ID INT, Name VARCHAR(50), FirstMissionDate DATE);",SELECT Name FROM Astronauts WHERE FirstMissionDate IS NULL;,SELECT Name FROM Astronauts WHERE FirstMissionDate IS NULL;,1 List all artists who have released more than 5 songs in the 'Country' genre.,"CREATE TABLE Artists (ArtistId INT, ArtistName VARCHAR(255), Genre VARCHAR(255), SongCount INT); ","SELECT ArtistName, Genre, SongCount FROM Artists WHERE Genre = 'Country' AND SongCount > 5;",SELECT ArtistName FROM Artists WHERE Genre = 'Country' AND SongCount > 5;,0 "What is the total number of cases heard by each judge in the criminal court, in the last month?","CREATE TABLE cases (id INT, date DATE, judge_id INT, court_type VARCHAR(50));","SELECT judge_id, COUNT(*) as total_cases_heard FROM cases WHERE court_type = 'Criminal' AND date >= DATEADD(MONTH, -1, GETDATE()) GROUP BY judge_id;","SELECT judge_id, COUNT(*) FROM cases WHERE date >= DATEADD(month, -1, GETDATE()) GROUP BY judge_id;",0 What is the average experience for farmers in the 'Andes' region who have more than 2 records?,"CREATE TABLE Farmers (id INT, name VARCHAR(50), region VARCHAR(50), experience INT); ","SELECT region, AVG(experience) FROM Farmers WHERE region = 'Andes' GROUP BY region HAVING COUNT(*) > 2;",SELECT AVG(experience) FROM Farmers WHERE region = 'Andes' GROUP BY region HAVING COUNT(*) > 2;,0 What was the round of 16 result for felipe saucedo?,"CREATE TABLE table_29521180_35 (round_of_16 VARCHAR, athlete VARCHAR);","SELECT round_of_16 FROM table_29521180_35 WHERE athlete = ""Felipe Saucedo"";","SELECT round_of_16 FROM table_29521180_35 WHERE athlete = ""Felipe Saucedo"";",1 What is the result of the match against Ryan Schultz?,"CREATE TABLE table_name_12 (res VARCHAR, opponent VARCHAR);","SELECT res FROM table_name_12 WHERE opponent = ""ryan schultz"";","SELECT res FROM table_name_12 WHERE opponent = ""ryan schultz"";",1 Calculate the average claims amount per policyholder,"CREATE TABLE claims (id INT, policyholder_id INT, date DATE, amount FLOAT); ","SELECT policyholder_id, AVG(amount) as avg_claims FROM claims GROUP BY policyholder_id;","SELECT policyholder_id, AVG(amount) as avg_claims_amount FROM claims GROUP BY policyholder_id;",0 "List all the suppliers providing ""free-range eggs"", along with their certification date and expiration date.","CREATE TABLE suppliers(id INT PRIMARY KEY, name VARCHAR(50), certified_date DATE, certification_expiration_date DATE); CREATE TABLE products(id INT PRIMARY KEY, name VARCHAR(50), type VARCHAR(50)); ","SELECT s.name, s.certified_date, s.certification_expiration_date FROM suppliers s JOIN products p ON s.id = p.id WHERE p.name = 'free-range eggs';","SELECT suppliers.name, suppliers.certified_date, suppliers.certification_expiration_date FROM suppliers INNER JOIN products ON suppliers.id = products.id WHERE products.type = 'free-range eggs';",0 Find the minimum financial wellbeing score in the Middle East.,"CREATE TABLE financial_wellbeing (id INT, person_id INT, country VARCHAR(255), score FLOAT); ",SELECT MIN(score) FROM financial_wellbeing WHERE country = 'Middle East';,SELECT MIN(score) FROM financial_wellbeing WHERE country = 'Middle East';,1 What team set a 3:15:43 winning time?,"CREATE TABLE table_2241841_1 (team VARCHAR, race_time VARCHAR);","SELECT team FROM table_2241841_1 WHERE race_time = ""3:15:43"";","SELECT team FROM table_2241841_1 WHERE race_time = ""3:15:43"";",1 What is the maximum number of games played by any player from South America?,"CREATE TABLE Players (PlayerID INT, PlayerName VARCHAR(50), Age INT, Country VARCHAR(50), GamesPlayed INT); ","SELECT MAX(GamesPlayed) FROM Players WHERE Country IN ('Brazil', 'Argentina', 'Colombia');",SELECT MAX(GamesPlayed) FROM Players WHERE Country = 'South America';,0 Name the laps for rank of 14 and start of 16,"CREATE TABLE table_name_67 (laps VARCHAR, rank VARCHAR, start VARCHAR);","SELECT laps FROM table_name_67 WHERE rank = ""14"" AND start = ""16"";","SELECT laps FROM table_name_67 WHERE rank = ""14"" AND start = ""16"";",1 What is the total energy storage capacity for each type of energy storage in Africa?,"CREATE TABLE africa_energy_storage (type VARCHAR(20), capacity INT); ","SELECT type, SUM(capacity) FROM africa_energy_storage GROUP BY type;","SELECT type, SUM(capacity) FROM africa_energy_storage GROUP BY type;",1 What is the most expensive product in the 'sustainable' collection?,"CREATE TABLE collections (collection_name VARCHAR(20), product_type VARCHAR(20), price DECIMAL(5,2)); ","SELECT product_type, MAX(price) FROM collections WHERE collection_name = 'sustainable';","SELECT collection_name, MAX(price) FROM collections WHERE product_type ='sustainable' GROUP BY collection_name;",0 Who is the team captain when the club is k.f.c. germinal beerschot?,"CREATE TABLE table_27374004_2 (team_captain VARCHAR, club VARCHAR);","SELECT team_captain FROM table_27374004_2 WHERE club = ""K.F.C. Germinal Beerschot"";","SELECT team_captain FROM table_27374004_2 WHERE club = ""KFC Germinal Beerschot"";",0 How many laps by Jorge Lorenzo on the Aprilia with a grid bigger than 1?,"CREATE TABLE table_name_34 (laps INTEGER, grid VARCHAR, manufacturer VARCHAR, rider VARCHAR);","SELECT SUM(laps) FROM table_name_34 WHERE manufacturer = ""aprilia"" AND rider = ""jorge lorenzo"" AND grid > 1;","SELECT SUM(laps) FROM table_name_34 WHERE manufacturer = ""jeroel lorenzo"" AND rider = ""jorge lorenzo"" AND grid > 1;",0 "If the quarterfinals was nabil talal ( jor ) l pts 3-3, who was the athlete?","CREATE TABLE table_26335424_86 (athlete VARCHAR, quarterfinals VARCHAR);","SELECT athlete FROM table_26335424_86 WHERE quarterfinals = ""Nabil Talal ( JOR ) L PTS 3-3"";","SELECT athlete FROM table_26335424_86 WHERE quarterfinals = ""Nabil Talal ( Jordan ) L PTS 3-3"";",0 Show the official names of the cities that have hosted more than one competition.,"CREATE TABLE farm_competition (Host_city_ID VARCHAR); CREATE TABLE city (Official_Name VARCHAR, City_ID VARCHAR);",SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1;,SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T1.City_ID HAVING COUNT(*) > 1;,0 What is the maximum wave height recorded in the North Sea?,"CREATE TABLE wave_heights (id INT, sea TEXT, max_wave_height FLOAT); ",SELECT MAX(max_wave_height) FROM wave_heights WHERE sea = 'North Sea';,SELECT MAX(max_wave_height) FROM wave_heights WHERE sea = 'North Sea';,1 What is the average budget for economic diversification efforts in South Africa for the years 2018 and 2019?,"CREATE TABLE economic_diversification_efforts (id INT, project_name VARCHAR(50), country VARCHAR(50), budget FLOAT, year INT); ","SELECT AVG(budget) FROM economic_diversification_efforts WHERE country = 'South Africa' AND year IN (2018, 2019);","SELECT AVG(budget) FROM economic_diversification_efforts WHERE country = 'South Africa' AND year IN (2018, 2019);",1 "What is Average Height, when Weight is less than 93, when Spike is less than 336, and when Block is 305?","CREATE TABLE table_name_82 (height INTEGER, block VARCHAR, weight VARCHAR, spike VARCHAR);",SELECT AVG(height) FROM table_name_82 WHERE weight < 93 AND spike < 336 AND block = 305;,SELECT AVG(height) FROM table_name_82 WHERE weight 93 AND spike 336 AND block = 305;,0 What was the title of the episode directed by David Mamet?,"CREATE TABLE table_26200084_1 (title VARCHAR, directed_by VARCHAR);","SELECT title FROM table_26200084_1 WHERE directed_by = ""David Mamet"";","SELECT title FROM table_26200084_1 WHERE directed_by = ""David Mamet"";",1 "How many cities are there in 'Russia', 'Japan', and 'Canada', and what is the total population of these cities?","CREATE TABLE City (Id INT PRIMARY KEY, Name VARCHAR(50), Population INT, Country VARCHAR(50)); ","SELECT Country, COUNT(*) as NumberOfCities, SUM(Population) as TotalPopulation FROM City WHERE Country IN ('Russia', 'Japan', 'Canada') GROUP BY Country;","SELECT COUNT(*), SUM(Population) FROM City WHERE Country IN ('Russia', 'Japan', 'Canada');",0 What team did the Montreal Canadiens visit when the record was 0-3?,"CREATE TABLE table_name_3 (home VARCHAR, visitor VARCHAR, record VARCHAR);","SELECT home FROM table_name_3 WHERE visitor = ""montreal canadiens"" AND record = ""0-3"";","SELECT home FROM table_name_3 WHERE visitor = ""montreal canadiens"" AND record = ""0-3"";",1 What is the intergiro classification of stage 21?,"CREATE TABLE table_12261926_2 (intergiro_classification VARCHAR, stage VARCHAR);",SELECT intergiro_classification FROM table_12261926_2 WHERE stage = 21;,SELECT intergiro_classification FROM table_12261926_2 WHERE stage = 21;,1 What was the score for game number 30?,"CREATE TABLE table_name_71 (score VARCHAR, game VARCHAR);",SELECT score FROM table_name_71 WHERE game = 30;,SELECT score FROM table_name_71 WHERE game = 30;,1 Name the year started where car number is 55,"CREATE TABLE table_1688640_4 (year_started INTEGER, car__number VARCHAR);","SELECT MAX(year_started) FROM table_1688640_4 WHERE car__number = ""55"";",SELECT MAX(year_started) FROM table_1688640_4 WHERE car__number = 55;,0 What is the average price of fair trade coffee in Germany compared to the global average?,"CREATE TABLE Coffee (country VARCHAR(50), price INT, fair_trade BOOLEAN); ",SELECT AVG(price) AS average_price FROM Coffee WHERE fair_trade = 1 AND country = 'Germany';,SELECT AVG(price) FROM Coffee WHERE country = 'Germany' AND fair_trade = true;,0 What was the score of Game 48?,"CREATE TABLE table_name_33 (score VARCHAR, game VARCHAR);",SELECT score FROM table_name_33 WHERE game = 48;,SELECT score FROM table_name_33 WHERE game = 48;,1 Show the stadium name and capacity with most number of concerts in year 2014 or after.,"CREATE TABLE stadium (name VARCHAR, capacity VARCHAR, stadium_id VARCHAR); CREATE TABLE concert (stadium_id VARCHAR, year VARCHAR);","SELECT T2.name, T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T2.stadium_id ORDER BY COUNT(*) DESC LIMIT 1;","SELECT T1.name, T1.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T2.year >= 2014 GROUP BY T1.stadium_id ORDER BY COUNT(*) DESC LIMIT 1;",0 Name the number of vocalists for which one ~ is it?,"CREATE TABLE table_2144389_8 (vocalist VARCHAR, japanese_translation VARCHAR);","SELECT COUNT(vocalist) FROM table_2144389_8 WHERE japanese_translation = ""Which One ~ Is It?"";","SELECT COUNT(vocalist) FROM table_2144389_8 WHERE japanese_translation = """";",0 Find the average financial wellbeing score for Shariah-compliant loans in Florida?,"CREATE TABLE loans (id INT, employee_id INT, amount INT, is_shariah_compliant BOOLEAN, financial_wellbeing_score INT); ",SELECT AVG(loans.financial_wellbeing_score) FROM loans WHERE loans.is_shariah_compliant = TRUE AND loans.id IN (SELECT loan_id FROM customers WHERE customers.city = 'Florida');,SELECT AVG(financial_wellbeing_score) FROM loans WHERE is_shariah_compliant = true AND state = 'Florida';,0 What is the number for the player that has a k position?,"CREATE TABLE table_name_77 (number VARCHAR, position VARCHAR);","SELECT number FROM table_name_77 WHERE position = ""k"";","SELECT number FROM table_name_77 WHERE position = ""k"";",1 What is the average carbon sequestration rate for each region in Africa?,"CREATE TABLE RegionCarbonSequestration (region_id INT, sequestration_rate DECIMAL(5,2), continent VARCHAR(255)); ","SELECT Rcs.region_id, AVG(Rcs.sequestration_rate) as avg_sequestration_rate FROM RegionCarbonSequestration Rcs WHERE Rcs.continent = 'Africa' GROUP BY Rcs.region_id;","SELECT region_id, AVG(sequestration_rate) as avg_sequestration_rate FROM RegionCarbonSequestration WHERE continent = 'Africa' GROUP BY region_id;",0 List the top 3 teams with the highest average explainability score for their models.,"CREATE TABLE ModelExplainabilityScores (ModelID INT, TeamID INT, ExplainabilityScore INT); CREATE TABLE TeamNames (TeamID INT, TeamName VARCHAR(50));","SELECT TeamNames.TeamName, AVG(ModelExplainabilityScores.ExplainabilityScore) AS AverageExplainabilityScore FROM ModelExplainabilityScores INNER JOIN TeamNames ON ModelExplainabilityScores.TeamID = TeamNames.TeamID GROUP BY TeamNames.TeamName ORDER BY AverageExplainabilityScore DESC LIMIT 3;","SELECT TeamName, AVG(ExplainabilityScore) as AvgExplainabilityScore FROM ModelExplainabilityScores JOIN TeamNames ON ModelExplainabilityScores.TeamID = TeamNames.TeamID GROUP BY TeamName ORDER BY AvgExplainabilityScore DESC LIMIT 3;",0 What is the total budget for technology for social good initiatives in 'Asia' and 'Europe'?,"CREATE TABLE tech_for_social_good_budget (initiative_id INT, initiative_name VARCHAR(255), region VARCHAR(255), budget DECIMAL(10,2)); ","SELECT SUM(budget) as total_budget, region FROM tech_for_social_good_budget WHERE region IN ('Asia', 'Europe') GROUP BY region;","SELECT SUM(budget) FROM tech_for_social_good_budget WHERE region IN ('Asia', 'Europe');",0 What is the total number of glacier melt incidents in each region?,"CREATE TABLE glacier_melt_data (id INT, date DATE, region VARCHAR(255));","SELECT region, COUNT(*) FROM glacier_melt_data GROUP BY region;","SELECT region, COUNT(*) FROM glacier_melt_data GROUP BY region;",1 Delete the music track 'Eternal Love' by 'Sarah Brightman'.,"CREATE TABLE music_track (track_id INT, title VARCHAR(100), artist VARCHAR(100)); ",DELETE FROM music_track WHERE title = 'Eternal Love' AND artist = 'Sarah Brightman';,DELETE FROM music_track WHERE title = 'Eternal Love' AND artist = 'Sarah Brightman';,1 What's the title of the song by Winger?,"CREATE TABLE table_name_83 (song_title VARCHAR, artist VARCHAR);","SELECT song_title FROM table_name_83 WHERE artist = ""winger"";","SELECT song_title FROM table_name_83 WHERE artist = ""winger"";",1 What was the average duration of defense project timelines for L3 Technologies in the Middle East in 2020?,"CREATE TABLE defense_project_timelines (company VARCHAR(255), region VARCHAR(255), year INT, duration INT); ",SELECT AVG(duration) FROM defense_project_timelines WHERE company = 'L3 Technologies' AND region = 'Middle East' AND year = 2020;,SELECT AVG(duration) FROM defense_project_timelines WHERE company = 'L3 Technologies' AND region = 'Middle East' AND year = 2020;,1 What is the average speed of electric scooters per day for the last 7 days in the 'micro_mobility' table in Berlin?,"CREATE TABLE micro_mobility_berlin (id INT, vehicle_type VARCHAR(20), speed FLOAT, date DATE, city VARCHAR(20)); ","SELECT DATE(date) as trip_date, AVG(speed) as avg_speed FROM micro_mobility_berlin WHERE vehicle_type = 'ElectricScooter' AND city = 'Berlin' AND date BETWEEN DATE_SUB(CURDATE(), INTERVAL 7 DAY) AND CURDATE() GROUP BY trip_date ORDER BY trip_date;","SELECT AVG(speed) FROM micro_mobility_berlin WHERE vehicle_type = 'Electric Scooter' AND date >= DATEADD(day, -7, GETDATE());",0 What is the maximum number of units in a single property in the 'affordable_housing' table that is located in a city that starts with the letter 'S'?,"CREATE TABLE affordable_housing (id INT, property_id INT, number_of_units INT, city VARCHAR(50)); ",SELECT MAX(number_of_units) FROM affordable_housing WHERE city LIKE 'S%';,SELECT MAX(number_of_units) FROM affordable_housing WHERE city LIKE 'S%';,1 How many economic diversification efforts in 'economic_diversification' table are located in each state?,"CREATE TABLE economic_diversification (id INT, initiative_name VARCHAR(50), state VARCHAR(50)); ","SELECT state, COUNT(*) FROM economic_diversification GROUP BY state;","SELECT state, COUNT(*) FROM economic_diversification GROUP BY state;",1 Please show the police forces and the number of counties with each police force.,CREATE TABLE county_public_safety (Police_force VARCHAR);,"SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force;","SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force;",1 "When the crowd was bigger than 26,063, who was the Away team?","CREATE TABLE table_name_74 (away_team VARCHAR, crowd INTEGER);",SELECT away_team FROM table_name_74 WHERE crowd > 26 OFFSET 063;,SELECT away_team FROM table_name_74 WHERE crowd > 26 OFFSET 063;,1 Insert a new menu item 'Steak' with a price of 25.50 dollars,"CREATE TABLE menu_items (item_id INT, item_name TEXT, price DECIMAL(5,2));","INSERT INTO menu_items (item_name, price) VALUES ('Steak', 25.50);","INSERT INTO menu_items (item_name, price) VALUES ('Steak', 25.50);",1 "What is the description, code and the corresponding count of each service type?","CREATE TABLE Services (Service_Type_Code VARCHAR); CREATE TABLE Ref_Service_Types (Service_Type_Description VARCHAR, Service_Type_Code VARCHAR);","SELECT T1.Service_Type_Description, T2.Service_Type_Code, COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code;","SELECT T1.Service_Type_Description, T1.Service_Type_Code, COUNT(*) FROM Services AS T1 JOIN Ref_Service_Types AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code;",0 What is the maximum number of days spent in space by an astronaut?,"CREATE TABLE astronauts(name TEXT, missions INTEGER, days_in_space REAL); ",SELECT MAX(days_in_space) FROM astronauts;,SELECT MAX(days_in_space) FROM astronauts;,1 "How many crime incidents were reported per month in Seattle in 2021?""","CREATE TABLE crime_incidents (id INT, incident_type VARCHAR(255), city VARCHAR(255), incident_date DATE); ","SELECT DATE_FORMAT(incident_date, '%Y-%m') AS Month, COUNT(*) as total FROM crime_incidents WHERE city = 'Seattle' AND incident_date >= '2021-01-01' AND incident_date < '2022-01-01' GROUP BY Month;","SELECT EXTRACT(MONTH FROM incident_date) AS month, COUNT(*) FROM crime_incidents WHERE city = 'Seattle' AND EXTRACT(YEAR FROM incident_date) = 2021 GROUP BY month;",0 What is the population total for saint-wenceslas with a region number of under 17?,"CREATE TABLE table_name_44 (population INTEGER, name VARCHAR, region VARCHAR);","SELECT SUM(population) FROM table_name_44 WHERE name = ""saint-wenceslas"" AND region < 17;","SELECT SUM(population) FROM table_name_44 WHERE name = ""saint-wenceslas"" AND region 17;",0 Which vessels have a compliance score below 70 and have traveled to the Arctic Ocean?,"CREATE TABLE vessels (id INT, name TEXT, type TEXT, compliance_score INT);CREATE TABLE routes (id INT, vessel_id INT, destination TEXT, date DATE); ",SELECT v.name FROM vessels v JOIN routes r ON v.id = r.vessel_id WHERE v.compliance_score < 70 AND r.destination = 'Arctic';,SELECT v.name FROM vessels v INNER JOIN routes r ON v.id = r.vessel_id WHERE v.compliant_score 70 AND r.destination = 'Arctic Ocean';,0 What is the average budget for rural infrastructure projects in each country?,"CREATE TABLE rural_infrastructure (id INT, country VARCHAR(50), project_type VARCHAR(50), budget INT); ","SELECT country, AVG(budget) as avg_budget FROM rural_infrastructure GROUP BY country;","SELECT country, AVG(budget) FROM rural_infrastructure GROUP BY country;",0 What round was the debut of Scott Tunbridge?,"CREATE TABLE table_name_58 (debut VARCHAR, name VARCHAR);","SELECT debut FROM table_name_58 WHERE name = ""scott tunbridge"";","SELECT debut FROM table_name_58 WHERE name = ""scott tunbridge"";",1 What is the latest fare collection date for 'Yellow Line'?,"CREATE TABLE route (route_id INT, route_name VARCHAR(50)); CREATE TABLE fare (fare_id INT, route_id INT, fare_amount DECIMAL(5,2), collection_date DATE); ",SELECT MAX(collection_date) FROM fare WHERE route_id = 4;,SELECT MAX(collection_date) FROM fare f JOIN route r ON f.route_id = r.route_id WHERE r.route_name = 'Yellow Line';,0 What is the total number of medical supplies distributed by 'Doctors Without Borders' in 'Middle East' in the year 2020?,"CREATE TABLE medical_supplies (id INT, distributor VARCHAR(255), location VARCHAR(255), quantity INT, distribution_date DATE); ",SELECT SUM(quantity) FROM medical_supplies WHERE distributor = 'Doctors Without Borders' AND location = 'Middle East' AND YEAR(distribution_date) = 2020;,SELECT SUM(quantity) FROM medical_supplies WHERE distributor = 'Doctors Without Borders' AND location = 'Middle East' AND YEAR(distribution_date) = 2020;,1 "Add a new record to the ""RuralInfrastructure"" table for a new 'Wind Turbine' with a construction year of 2020","CREATE TABLE RuralInfrastructure (id INT PRIMARY KEY, type VARCHAR(255), construction_year INT);","INSERT INTO RuralInfrastructure (type, construction_year) VALUES ('Wind Turbine', 2020);","INSERT INTO RuralInfrastructure (id, type, construction_year) VALUES (1, 'Wind Turbine', 2020);",0 What date did the show air when Sean Lock was the headliner?,"CREATE TABLE table_23122988_1 (airdate VARCHAR, headliner VARCHAR);","SELECT airdate FROM table_23122988_1 WHERE headliner = ""Sean Lock"";","SELECT airdate FROM table_23122988_1 WHERE headliner = ""Sean Lock"";",1 How many public libraries are in the city of Seattle?,"CREATE TABLE cities (id INT, name VARCHAR(50)); CREATE TABLE libraries (id INT, name VARCHAR(50), city_id INT); ",SELECT COUNT(*) FROM libraries WHERE city_id = (SELECT id FROM cities WHERE name = 'Seattle');,SELECT COUNT(*) FROM libraries WHERE city_id = (SELECT id FROM cities WHERE name = 'Seattle');,1 How many rangers are there in 'Asian Elephant' conservation efforts with more than 5 years of experience?,"CREATE TABLE rangers (id INT, conservation_effort_id INT, years_of_experience INT, ranger_name VARCHAR(50)); ",SELECT COUNT(*) as num_rangers FROM rangers r JOIN conservation_efforts ce ON r.conservation_effort_id = ce.id WHERE ce.effort_name = 'Asian Elephant' AND r.years_of_experience > 5;,SELECT COUNT(*) FROM rangers WHERE conservation_effort_id = (SELECT id FROM conservation_efforts WHERE years_of_experience > 5);,0 How many visitors attended the Art of the Renaissance exhibition on each day in January 2022?,"CREATE TABLE exhibitions (exhibition_id INT, name VARCHAR(255)); CREATE TABLE visitors (visitor_id INT, exhibition_id INT, visit_date DATE); ","SELECT visit_date, COUNT(visitor_id) as num_visitors FROM visitors WHERE exhibition_id = 1 AND visit_date >= '2022-01-01' AND visit_date <= '2022-01-31' GROUP BY visit_date;","SELECT DATE_FORMAT(visit_date, '%Y-%m') AS day, COUNT(DISTINCT visitor_id) AS visitor_count FROM visitors JOIN exhibitions ON visitors.exhibition_id = exhibitions.exhibition_id WHERE exhibitions.name = 'Art of the Renaissance' AND visit_date BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY day;",0 What years was the player Lonny Baxter in Toronto?,"CREATE TABLE table_10015132_2 (years_in_toronto VARCHAR, player VARCHAR);","SELECT years_in_toronto FROM table_10015132_2 WHERE player = ""Lonny Baxter"";","SELECT years_in_toronto FROM table_10015132_2 WHERE player = ""Lonny Baxter"";",1 How many to pars were won in 1993?,"CREATE TABLE table_name_86 (to_par VARCHAR, year_s__won VARCHAR);","SELECT COUNT(to_par) FROM table_name_86 WHERE year_s__won = ""1993"";",SELECT COUNT(to_par) FROM table_name_86 WHERE year_s__won = 1993;,0 Sum the amount of CO2 and SO2 emissions for each coal mine.,"CREATE TABLE Environmental_Impact (Mine_ID INT, Pollutant VARCHAR(10), Amount FLOAT, Date DATE); ","SELECT e.Mine_ID, SUM(e.Amount) FROM Environmental_Impact e INNER JOIN Mining_Operations m ON e.Mine_ID = m.Mine_ID WHERE m.Material = 'Coal' AND e.Pollutant IN ('CO2', 'SO2') GROUP BY e.Mine_ID;","SELECT Mine_ID, Pollutant, Amount FROM Environmental_Impact WHERE Pollutant IN ('CO2', 'SO2') GROUP BY Mine_ID;",0 What is the total revenue for mobile and broadband plans combined in each region?,"CREATE TABLE mobile_plans (id INT, name VARCHAR(255), type VARCHAR(255), price DECIMAL(10,2)); CREATE TABLE broadband_plans (id INT, name VARCHAR(255), type VARCHAR(255), price DECIMAL(10,2)); CREATE TABLE subscribers (id INT, name VARCHAR(255), plan_id INT, region VARCHAR(255)); CREATE TABLE regions (id INT, name VARCHAR(255));","SELECT regions.name AS region, SUM(mobile_plans.price + broadband_plans.price) FROM subscribers JOIN mobile_plans ON subscribers.plan_id = mobile_plans.id JOIN broadband_plans ON subscribers.plan_id = broadband_plans.id JOIN regions ON subscribers.region = regions.id GROUP BY regions.name;","SELECT r.name, SUM(m.price * b.price) as total_revenue FROM mobile_plans m JOIN subscribers s ON m.id = s.plan_id JOIN regions r ON b.type = r.name GROUP BY r.name;",0 What is the average cost of projects in the 'energy' table?,"CREATE TABLE energy (id INT, project_name VARCHAR(50), location VARCHAR(50), cost FLOAT); ",SELECT AVG(cost) FROM energy;,SELECT AVG(cost) FROM energy;,1 "What are the names of customers who use payment method ""Cash""?","CREATE TABLE customers (customer_name VARCHAR, payment_method VARCHAR);","SELECT customer_name FROM customers WHERE payment_method = ""Cash"";","SELECT customer_name FROM customers WHERE payment_method = ""Cash"";",1 Which cosmetic categories have the highest and lowest average safety scores?,"CREATE TABLE Products (id INT, name VARCHAR(50), category VARCHAR(50), safety_score INT); ","SELECT c.category, AVG(p.safety_score) as avg_safety_score FROM Products p JOIN Cosmetics c ON p.name = c.name GROUP BY c.category ORDER BY avg_safety_score DESC, c.category LIMIT 1; SELECT c.category, AVG(p.safety_score) as avg_safety_score FROM Products p JOIN Cosmetics c ON p.name = c.name GROUP BY c.category ORDER BY avg_safety_score ASC, c.category LIMIT 1;","SELECT category, AVG(safety_score) as avg_safety_score FROM Products GROUP BY category ORDER BY avg_safety_score DESC LIMIT 1;",0 What is the percentage of fair trade products by each supplier in the last quarter?,"CREATE TABLE Supplier (id INT, name VARCHAR(255), fair_trade_products INT, total_products INT);","SELECT name, ROUND(fair_trade_products * 100.0 / total_products, 2) as percentage_fair_trade_products FROM Supplier WHERE sale_date >= (CURRENT_DATE - INTERVAL '3 months') ORDER BY percentage_fair_trade_products DESC;","SELECT name, fair_trade_products * 100.0 / total_products FROM Supplier WHERE fair_trade_products >= (SELECT fair_trade_products FROM Supplier WHERE fair_trade_products >= (SELECT fair_trade_products FROM Supplier WHERE fair_trade_products >= (SELECT fair_trade_products FROM Supplier WHERE fair_trade_products >= (SELECT fair_trade_products FROM Supplier WHERE fair_trade_products >= (SELECT fair_trade_products FROM Supplier WHERE fair_trade_products >= (SELECT fair_trade_products) FROM Supplier WHERE fair_trade_products >= (SELECT fair_trade_products) FROM Supplier WHERE fair_trade_products)))) GROUP BY supplier;",0 Determine the average carbon price in Q1 2022 for countries in the European Union,"CREATE TABLE carbon_prices (date DATE, country VARCHAR(255), price FLOAT, region VARCHAR(255)); ","SELECT region, AVG(price) FROM carbon_prices WHERE EXTRACT(MONTH FROM date) BETWEEN 1 AND 3 AND region = 'European Union' GROUP BY region;",SELECT AVG(price) FROM carbon_prices WHERE date BETWEEN '2022-01-01' AND '2022-03-31' AND region = 'European Union';,0 List all open data sets related to transparency in 'city' schema that are not present in 'county'.,"CREATE SCHEMA city; CREATE SCHEMA county; CREATE TABLE city.transparency_data (id INT, name VARCHAR(255), is_open BOOLEAN); CREATE TABLE county.transparency_data (id INT, name VARCHAR(255), is_open BOOLEAN); ",SELECT * FROM ( (SELECT * FROM city.transparency_data WHERE is_open = true) EXCEPT (SELECT * FROM county.transparency_data WHERE is_open = true) ) AS excepted_data;,SELECT * FROM city.transparency_data JOIN county.transparency_data ON city.transparency_data.id = county.transparency_data.id WHERE city.transparency_data.is_open = false AND county.transparency_data.is_open = false;,0 Find the number of heritage sites in Europe that have been restored,"CREATE TABLE HeritageSites (id INT, location VARCHAR(20), status VARCHAR(20));",SELECT COUNT(*) FROM HeritageSites WHERE location LIKE 'Europe%' AND status = 'restored';,SELECT COUNT(*) FROM HeritageSites WHERE location = 'Europe' AND status = 'Restored';,0 How many startups were founded in the healthcare sector in 2020?,"CREATE TABLE startup (id INT, name TEXT, founding_year INT, industry TEXT); ",SELECT COUNT(*) FROM startup WHERE founding_year = 2020 AND industry = 'Healthcare';,SELECT COUNT(*) FROM startup WHERE founding_year = 2020 AND industry = 'Healthcare';,1 "Which artist had the highest revenue generated from sales at the ""Contemporary Art Gallery"" in 2021?","CREATE TABLE ArtistSales2 (GalleryName TEXT, ArtistName TEXT, NumPieces INTEGER, PricePerPiece FLOAT); ","SELECT ArtistName, SUM(NumPieces * PricePerPiece) AS Revenue FROM ArtistSales2 WHERE GalleryName = 'Contemporary Art Gallery' AND YEAR(SaleDate) = 2021 GROUP BY ArtistName ORDER BY Revenue DESC LIMIT 1;","SELECT ArtistName, MAX(NumPieces) FROM ArtistSales2 WHERE GalleryName = 'Contemporary Art Gallery' AND YEAR(NumPieces) = 2021 GROUP BY ArtistName;",0 "What is the average property size in Seattle, Washington for properties built between 2000 and 2010 with inclusive housing policies?","CREATE TABLE properties (property_id INT, size FLOAT, city VARCHAR(20), build_year INT, inclusive BOOLEAN); ",SELECT AVG(size) FROM properties WHERE city = 'Seattle' AND build_year BETWEEN 2000 AND 2010 AND inclusive = true;,SELECT AVG(size) FROM properties WHERE city = 'Seattle' AND build_year BETWEEN 2000 AND 2010 AND inclusive = true;,1 What are the names of biotech startups that received funding from both VC1 and VC2?,"CREATE SCHEMA if not exists biotech; CREATE TABLE if not exists biotech.startups (name VARCHAR(255), location VARCHAR(255)); CREATE TABLE if not exists biotech.funding (startup_name VARCHAR(255), vc_name VARCHAR(255)); ",SELECT s.name FROM biotech.startups s JOIN biotech.funding f1 ON s.name = f1.startup_name JOIN biotech.funding f2 ON s.name = f2.startup_name WHERE f1.vc_name = 'VC1' AND f2.vc_name = 'VC2';,"SELECT s.name FROM biotech.startups s INNER JOIN biotech.funding f ON s.name = f.startup_name WHERE f.vc_name IN ('VC1', 'VC2') GROUP BY s.name HAVING COUNT(DISTINCT f.vc_name) = 2;",0 What are the top 2 most popular eco-friendly hotels in Tokyo?,"CREATE TABLE eco_hotels (hotel_id INT, city TEXT, sustainability_rating INT, popularity INT); ","SELECT name, sustainability_rating FROM eco_hotels WHERE city = 'Tokyo' ORDER BY popularity DESC, sustainability_rating DESC LIMIT 2;","SELECT hotel_id, city, sustainability_rating, popularity FROM eco_hotels WHERE city = 'Tokyo' ORDER BY popularity DESC LIMIT 2;",0 "What's the total volume of timber produced in 2020, grouped by species?","CREATE TABLE timber_production (year INT, species VARCHAR(255), volume FLOAT); ","SELECT species, SUM(volume) FROM timber_production WHERE year = 2020 GROUP BY species;","SELECT species, SUM(volume) FROM timber_production WHERE year = 2020 GROUP BY species;",1 What is the day 3 when day 4 is fr.?,"CREATE TABLE table_name_45 (day_3 VARCHAR, day_4 VARCHAR);","SELECT day_3 FROM table_name_45 WHERE day_4 = ""fr."";","SELECT day_3 FROM table_name_45 WHERE day_4 = ""fr."";",1 List the names and total investments in rural infrastructure projects for First Nations communities in Canada.,"CREATE TABLE rural_infrastructure_projects (id INT, community_type VARCHAR(20), country VARCHAR(20), investment DECIMAL(10, 2)); ","SELECT country, SUM(investment) FROM rural_infrastructure_projects WHERE community_type = 'First Nations' GROUP BY country;","SELECT community_type, SUM(investment) FROM rural_infrastructure_projects WHERE country = 'Canada' GROUP BY community_type;",0 What is the total number of hours of sunlight received by each crop type in the past week?,"CREATE TABLE crop_sunlight (crop_type TEXT, date DATE, hours INTEGER);","SELECT crop_type, SUM(hours) as total_hours FROM crop_sunlight WHERE date >= DATEADD(day, -7, GETDATE()) GROUP BY crop_type;","SELECT crop_type, SUM(hours) FROM crop_sunlight WHERE date >= DATEADD(week, -1, GETDATE()) GROUP BY crop_type;",0 What is the best fit (all data) when the parameter shows fluctuation amplitude at 8h −1 mpc?,"CREATE TABLE table_name_18 (best_fit__all_data_ VARCHAR, parameter VARCHAR);","SELECT best_fit__all_data_ FROM table_name_18 WHERE parameter = ""fluctuation amplitude at 8h −1 mpc"";","SELECT best_fit__all_data_ FROM table_name_18 WHERE parameter = ""fluctuation amplitude at 8h 1 mpc"";",0 Identify the food safety violations for each restaurant in the 'Tasty Town' city.,"CREATE TABLE restaurants (id INT, name VARCHAR(50), city VARCHAR(50)); CREATE TABLE violations (restaurant_id INT, date DATE, violation_description VARCHAR(50)); ","SELECT r.name, COUNT(v.violation_description) as total_violations FROM restaurants r INNER JOIN violations v ON r.id = v.restaurant_id WHERE r.city = 'Tasty Town' GROUP BY r.name;","SELECT r.name, v.violation_description FROM restaurants r JOIN violations v ON r.id = v.restaurant_id WHERE r.city = 'Tasty Town' GROUP BY r.name;",0 "List all customers who have made transactions exclusively with debit cards in the past month, along with their earliest transaction date and total transaction count?","CREATE TABLE customers (customer_id INT, name VARCHAR(255), email VARCHAR(50)); CREATE TABLE transactions (transaction_id INT, customer_id INT, payment_method VARCHAR(50), transaction_date DATE, amount DECIMAL(10,2));","SELECT c.customer_id, c.name, MIN(t.transaction_date) as earliest_transaction_date, COUNT(t.transaction_id) as total_transaction_count FROM customers c INNER JOIN transactions t ON c.customer_id = t.customer_id WHERE t.payment_method = 'debit card' AND t.transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY c.customer_id HAVING COUNT(DISTINCT t.payment_method) = 1;","SELECT c.customer_id, c.name, c.email, MIN(t.transaction_date) as earliest_transaction_date, COUNT(t.transaction_id) as total_transactions FROM customers c JOIN transactions t ON c.customer_id = t.customer_id WHERE t.payment_method = 'Debit Card' AND t.transaction_date >= DATEADD(month, -1, GETDATE());",0 List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta',"CREATE TABLE ship (lost_in_battle VARCHAR, name VARCHAR); CREATE TABLE battle (name VARCHAR, date VARCHAR, id VARCHAR);","SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta';","SELECT T1.name, T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.lost_in_battle = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T2.name FROM ship AS T1 JOIN battle AS T2 ON T1.id = T2.id WHERE T2.name = 'HMS Atalanta';",0 "Calculate the total revenue generated by cultural heritage tours in the month of October 2022, for tour operators who have conducted more than 50 tours in total.","CREATE TABLE TourOperators (id INT, name TEXT, city TEXT, country TEXT);CREATE TABLE Tours (id INT, operator_id INT, date DATE, revenue DECIMAL(10, 2));CREATE VIEW CulturalTours AS SELECT * FROM Tours WHERE Tours.id IN (SELECT CulturalHeritage.tour_id FROM (SELECT Tours.id, (CASE WHEN description LIKE '%cultural%' THEN TRUE ELSE FALSE END) AS CulturalHeritage FROM Tours) AS CulturalHeritage);CREATE VIEW TourOperatorTours AS SELECT TourOperators.*, COUNT(Tours.id) AS total_tours FROM TourOperators JOIN Tours ON TourOperators.id = Tours.operator_id GROUP BY TourOperators.id;",SELECT SUM(CulturalTours.revenue) FROM CulturalTours JOIN TourOperatorTours ON CulturalTours.id = TourOperatorTours.tour_id WHERE TourOperatorTours.total_tours > 50 AND MONTH(CulturalTours.date) = 10;,SELECT SUM(CulturalTours.revenue) FROM CulturalTours INNER JOIN TourOperatorTours ON CulturalTours.tour_id = TourOperatorTours.id INNER JOIN TourOperators ON TourOperatorTours.operator_id = TourOperators.id WHERE Tours.date BETWEEN '2022-03-01' AND '2022-03-31';,0 Which Winning Driver has an Event of 200 miles of norisring?,"CREATE TABLE table_name_82 (winning_driver VARCHAR, event VARCHAR);","SELECT winning_driver FROM table_name_82 WHERE event = ""200 miles of norisring"";","SELECT winning_driver FROM table_name_82 WHERE event = ""200 miles of norisring"";",1 Display the names and fairness scores of models that have a higher fairness score than the average fairness score.,"CREATE TABLE model_fairness (model_id INT, fairness_score DECIMAL(3,2)); ","SELECT model_id, fairness_score FROM model_fairness WHERE fairness_score > (SELECT AVG(fairness_score) FROM model_fairness);","SELECT model_id, fairness_score FROM model_fairness WHERE fairness_score > (SELECT AVG(fairness_score) FROM model_fairness);",1 Who are the top 5 refugee support project coordinators in terms of the number of refugees supported?,"CREATE TABLE refugee_support_project_coordinators (id INT, name VARCHAR(100), num_refugees INT); ","SELECT name FROM (SELECT name, ROW_NUMBER() OVER (ORDER BY num_refugees DESC) as row FROM refugee_support_project_coordinators) subquery WHERE subquery.row <= 5;","SELECT name, SUM(num_refugees) as total_refugees FROM refugee_support_project_coordinators GROUP BY name ORDER BY total_refugees DESC LIMIT 5;",0 Show the number of unique addresses that interacted with decentralized applications (DApps) on the Solana blockchain in the last month.,"CREATE TABLE solana_interactions (interaction_id INT, dapp_address VARCHAR(42), user_address VARCHAR(42), timestamp BIGINT);",SELECT COUNT(DISTINCT user_address) FROM solana_interactions WHERE timestamp BETWEEN UNIX_TIMESTAMP() - 2678400 AND UNIX_TIMESTAMP() AND dapp_address LIKE 'sol%';,"SELECT COUNT(DISTINCT user_address) FROM solana_interactions WHERE timestamp >= DATEADD(month, -1, GETDATE());",0 How many vegetarian menu items have been added to the menu in the last month?,"CREATE TABLE Menu (menu_id INT PRIMARY KEY, menu_item VARCHAR(50), menu_item_category VARCHAR(50), menu_add_date DATE); CREATE TABLE Menu_Categories (menu_category VARCHAR(50) PRIMARY KEY); ","SELECT COUNT(menu_id) FROM Menu WHERE menu_item_category = 'vegetarian' AND menu_add_date >= DATEADD(month, -1, GETDATE());","SELECT COUNT(*) FROM Menu INNER JOIN Menu_Categories ON Menu.menu_item = Menu_Categories.menu_category WHERE menu_category = 'Vegetarian' AND menu_add_date >= DATEADD(month, -1, GETDATE());",0 What are the top 5 countries with the highest number of security incidents in the last 30 days?,"CREATE TABLE security_incidents (id INT, timestamp TIMESTAMP, country VARCHAR(255), incident_type VARCHAR(255)); ","SELECT country, COUNT(*) as num_incidents FROM security_incidents WHERE timestamp >= NOW() - INTERVAL 30 DAY GROUP BY country ORDER BY num_incidents DESC LIMIT 5;","SELECT country, COUNT(*) as incident_count FROM security_incidents WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 30 DAY) GROUP BY country ORDER BY incident_count DESC LIMIT 5;",0 What is the goal difference for the team from Chorley?,"CREATE TABLE table_name_99 (goal_difference VARCHAR, team VARCHAR);","SELECT goal_difference FROM table_name_99 WHERE team = ""chorley"";","SELECT goal_difference FROM table_name_99 WHERE team = ""chorley"";",1 "WHAT IS THE TIME/ RETIRED WITH A HONDA MANUFACTURER, GRID 8?","CREATE TABLE table_name_44 (time_retired VARCHAR, manufacturer VARCHAR, grid VARCHAR);","SELECT time_retired FROM table_name_44 WHERE manufacturer = ""honda"" AND grid = ""8"";","SELECT time_retired FROM table_name_44 WHERE manufacturer = ""honda"" AND grid = 8;",0 "Which place has points larger than 1, a bmw machine, and a time of 1:18.47.6?","CREATE TABLE table_name_44 (place INTEGER, time VARCHAR, points VARCHAR, machine VARCHAR);","SELECT MIN(place) FROM table_name_44 WHERE points > 1 AND machine = ""bmw"" AND time = ""1:18.47.6"";","SELECT SUM(place) FROM table_name_44 WHERE points > 1 AND machine = ""bmw"" AND time = ""1:18.47.6"";",0 What is the age distribution of fans who attend sports events?,"CREATE TABLE Fans (fan_id INT, age INT, event_id INT); ","SELECT age, COUNT(*) FROM Fans WHERE event_id IN (SELECT event_id FROM Events WHERE category = 'Sports') GROUP BY age;","SELECT age, COUNT(*) as num_fans FROM Fans GROUP BY age;",0 What is the minimum temperature per month in the Arctic Research Lab?,"CREATE TABLE ArcticResearchLab (id INT, year INT, month INT, temperature FLOAT); ","SELECT month, MIN(temperature) FROM ArcticResearchLab GROUP BY year, month;","SELECT year, month, MIN(temperature) FROM ArcticResearchLab GROUP BY year, month;",0 Name the category for prix uip berlin,"CREATE TABLE table_name_66 (category VARCHAR, nominating_festival VARCHAR);","SELECT category FROM table_name_66 WHERE nominating_festival = ""prix uip berlin"";","SELECT category FROM table_name_66 WHERE nominating_festival = ""prix uip berlin"";",1 "What is the total cost of materials for projects that started after January 1, 2021?","CREATE TABLE Projects (id INT, start_date DATE, material_cost FLOAT); ",SELECT SUM(material_cost) FROM Projects WHERE start_date > '2021-01-01';,SELECT SUM(material_cost) FROM Projects WHERE start_date > '2021-01-01';,1 Who was the Partner in the United Airlines Tournament (1)?,"CREATE TABLE table_name_62 (partner VARCHAR, tournament_name VARCHAR);","SELECT partner FROM table_name_62 WHERE tournament_name = ""united airlines tournament (1)"";","SELECT partner FROM table_name_62 WHERE tournament_name = ""united airlines tournament (1)"";",1 Who was the producer for the film 'Strange Little Girls'?,"CREATE TABLE table_name_20 (producer_s_ VARCHAR, film VARCHAR);","SELECT producer_s_ FROM table_name_20 WHERE film = ""strange little girls"";","SELECT producer_s_ FROM table_name_20 WHERE film = ""straight little girls"";",0 How many transportation projects were completed in '2019'?,"CREATE TABLE if not exists transportation_projects (id INT, name VARCHAR(100), year INT, completed BOOLEAN); ",SELECT COUNT(*) FROM transportation_projects WHERE year = 2019 AND completed = TRUE;,SELECT COUNT(*) FROM transportation_projects WHERE year = 2019 AND completed = TRUE;,1 Tell me the date for format of cd/dvd,"CREATE TABLE table_name_88 (date VARCHAR, format VARCHAR);","SELECT date FROM table_name_88 WHERE format = ""cd/dvd"";","SELECT date FROM table_name_88 WHERE format = ""cd/dvd"";",1 "For the sector of Gatunda how many entires are show for the August 15, 2012 population?","CREATE TABLE table_12496904_1 (_2012 VARCHAR, population_august_15 VARCHAR, sector VARCHAR);","SELECT COUNT(population_august_15), _2012 FROM table_12496904_1 WHERE sector = ""Gatunda"";","SELECT COUNT(_2012) FROM table_12496904_1 WHERE population_august_15 = ""Gatunda"" AND sector = ""Gatunda"";",0 Which gene has the subject number 21?,"CREATE TABLE table_name_28 (gene VARCHAR, subject_number VARCHAR);","SELECT gene FROM table_name_28 WHERE subject_number = ""21"";",SELECT gene FROM table_name_28 WHERE subject_number = 21;,0 Present the total number of marine species in the 'marine_species' table with a conservation status of 'threatened'.,"CREATE TABLE marine_species (species_id INT, name VARCHAR(255), type VARCHAR(255), conservation_status VARCHAR(255));",SELECT COUNT(*) FROM marine_species WHERE conservation_status = 'threatened';,SELECT COUNT(*) FROM marine_species WHERE conservation_status = 'threatened';,1 How many races had #99 gainsco/bob stallings racing in round 10?,"CREATE TABLE table_19751479_4 (fastest_lap VARCHAR, rnd VARCHAR, pole_position VARCHAR);","SELECT COUNT(fastest_lap) FROM table_19751479_4 WHERE rnd = 10 AND pole_position = ""#99 GAINSCO/Bob Stallings Racing"";","SELECT COUNT(fastest_lap) FROM table_19751479_4 WHERE rnd = 10 AND pole_position = ""#99 Gainsco/Bob Stallings"";",0 Find the minimum salary in the 'research_union' table for each department.,"CREATE TABLE research_union (department VARCHAR(50), salary FLOAT); ","SELECT department, MIN(salary) AS min_salary FROM research_union GROUP BY department;","SELECT department, MIN(salary) FROM research_union GROUP BY department;",0 Create a table 'climate_mitigation_projects',"CREATE TABLE climate_mitigation_projects (id INT PRIMARY KEY, name VARCHAR(50), location VARCHAR(50), start_date DATE, end_date DATE, budget FLOAT);","CREATE TABLE climate_mitigation_projects (id INT PRIMARY KEY, name VARCHAR(50), location VARCHAR(50), start_date DATE, end_date DATE, budget FLOAT);","CREATE TABLE climate_mitigation_projects (id INT PRIMARY KEY, name VARCHAR(50), location VARCHAR(50), start_date DATE, end_date DATE, budget FLOAT);",1 List the textile sourcing countries with the lowest water consumption for linen.,"CREATE TABLE water_consumption (id INT PRIMARY KEY, fabric_type VARCHAR(255), country VARCHAR(255), water_consumption FLOAT); ","SELECT country, water_consumption FROM water_consumption WHERE fabric_type = 'Linen' ORDER BY water_consumption ASC LIMIT 1;","SELECT country, water_consumption FROM water_consumption WHERE fabric_type = 'Linen' ORDER BY water_consumption DESC LIMIT 1;",0 How many streams did the song 'Bohemian Rhapsody' get?,"CREATE TABLE StreamingData (StreamID INT, SongID INT, StreamDate DATE, Genre VARCHAR(50), SongName VARCHAR(100), StreamCount INT); ",SELECT SUM(StreamCount) FROM StreamingData WHERE SongName = 'Bohemian Rhapsody';,SELECT SUM(StreamCount) FROM StreamingData WHERE SongName = 'Bohemian Rhapsody';,1 What is the number of flu deaths in the past 12 months in each state?,"CREATE TABLE flu_deaths (death_id INT, date TEXT, state TEXT, cause TEXT); ","SELECT state, COUNT(*) FROM flu_deaths WHERE date >= (CURRENT_DATE - INTERVAL '12 months') GROUP BY state;","SELECT state, COUNT(*) FROM flu_deaths WHERE date >= DATE_SUB(CURRENT_DATE, INTERVAL 12 MONTH) GROUP BY state;",0 Delete funding records for startups not in the 'technology' sector.,"CREATE TABLE funding_records (id INT, company_id INT, funding_amount INT, funding_date DATE); ",DELETE FROM funding_records WHERE company_id NOT IN (SELECT id FROM companies WHERE industry = 'Technology');,DELETE FROM funding_records WHERE company_id NOT IN (SELECT id FROM companies WHERE sector = 'technology');,0 Count of patients who received teletherapy in each country?,"CREATE TABLE patients (id INT, country VARCHAR(255)); CREATE TABLE therapy (patient_id INT, therapy_type VARCHAR(255)); ","SELECT country, COUNT(*) as teletherapy_count FROM patients JOIN therapy ON patients.id = therapy.patient_id WHERE therapy.therapy_type = 'Teletherapy' GROUP BY country;","SELECT p.country, COUNT(DISTINCT t.patient_id) FROM patients p INNER JOIN therapy t ON p.id = t.patient_id WHERE t.therapy_type = 'teletherapy' GROUP BY p.country;",0 What is the maximum and minimum duration of peacekeeping operations?,"CREATE TABLE Peacekeeping_Operations (Operation_ID INT, Country_Name VARCHAR(50), Start_Date DATE, End_Date DATE); ","SELECT MIN(DATEDIFF(End_Date, Start_Date)) as Min_Duration, MAX(DATEDIFF(End_Date, Start_Date)) as Max_Duration FROM Peacekeeping_Operations;","SELECT MAX(Start_Date), MIN(End_Date) FROM Peacekeeping_Operations;",0 "What is the average Draws, when Losses is less than 2?","CREATE TABLE table_name_97 (draws INTEGER, losses INTEGER);",SELECT AVG(draws) FROM table_name_97 WHERE losses < 2;,SELECT AVG(draws) FROM table_name_97 WHERE losses 2;,0 What is the number of users who made a purchase in game P in Q1 2022?,"CREATE TABLE game_P_purchases (purchase_id INT, purchase_date DATE, user_id INT);",SELECT COUNT(DISTINCT user_id) FROM game_P_purchases WHERE QUARTER(purchase_date) = 1 AND YEAR(purchase_date) = 2022;,SELECT COUNT(DISTINCT user_id) FROM game_P_purchases WHERE purchase_date BETWEEN '2022-01-01' AND '2022-03-31';,0 "Add a new record to the ""diplomacy_meetings"" table with the following details: meeting_id 20220101, country_name 'Afghanistan', meeting_date '2022-01-01', and meeting_outcome 'Successful'","CREATE TABLE diplomacy_meetings (meeting_id INT, country_name VARCHAR(50), meeting_date DATE, meeting_outcome VARCHAR(20));","INSERT INTO diplomacy_meetings (meeting_id, country_name, meeting_date, meeting_outcome) VALUES (20220101, 'Afghanistan', '2022-01-01', 'Successful');","INSERT INTO diplomacy_meetings (meeting_id, country_name, meeting_date, meeting_outcome) VALUES (20220101, 'Afghanistan', '2022-01-01', 'Successful');",1 What is the average age of artists who have created artworks in the 'painting' category?,"CREATE TABLE artists (id INT, name TEXT, birthdate DATE); ",SELECT AVG(YEAR(CURRENT_DATE) - YEAR(birthdate)) as avg_age FROM artists JOIN artworks ON artists.id = artworks.artist WHERE category = 'painting';,SELECT AVG(age) FROM artists WHERE category = 'painting';,0 What is the total number of language speakers per language?,"CREATE TABLE Languages (LanguageID INT, LanguageName VARCHAR(50), LanguageFamily VARCHAR(50)); CREATE TABLE Speakers (SpeakerID INT, LanguageID INT, SpeakerCount INT); ","SELECT Languages.LanguageName, SUM(Speakers.SpeakerCount) AS TotalSpeakers FROM Languages INNER JOIN Speakers ON Languages.LanguageID = Speakers.LanguageID GROUP BY Languages.LanguageName;","SELECT Languages.LanguageName, SUM(Speakers.SpeakerCount) as TotalSpeakers FROM Languages INNER JOIN Speakers ON Languages.LanguageID = Speakers.LanguageID GROUP BY Languages.LanguageName;",0 What is the region of the Alfa Records release with catalog ALCA-282?,"CREATE TABLE table_name_54 (region VARCHAR, label VARCHAR, catalog VARCHAR);","SELECT region FROM table_name_54 WHERE label = ""alfa records"" AND catalog = ""alca-282"";","SELECT region FROM table_name_54 WHERE label = ""alfa records"" AND catalog = ""alca-282"";",1 "What is the commissioned with a 636.3 project, and ordered status?","CREATE TABLE table_name_24 (commissioned VARCHAR, project VARCHAR, status VARCHAR);","SELECT commissioned FROM table_name_24 WHERE project = ""636.3"" AND status = ""ordered"";","SELECT commissioned FROM table_name_24 WHERE project = ""636.3"" AND status = ""ordered"";",1 What is the total number of mental health parity violations per year in each state?,"CREATE TABLE mental_health_parity (year INT, state VARCHAR(2), violations INT);","SELECT state, year, SUM(violations) FROM mental_health_parity GROUP BY state, year;","SELECT state, year, SUM(violations) as total_violations FROM mental_health_parity GROUP BY state, year;",0 What's the Suited Match with a 2.99% House Edge?,"CREATE TABLE table_name_44 (suited_match VARCHAR, house_edge VARCHAR);","SELECT suited_match FROM table_name_44 WHERE house_edge = ""2.99%"";","SELECT suited_match FROM table_name_44 WHERE house_edge = ""2.99%"";",1 What are the call types and dates for all calls in 'downtown_police' that occurred after '2022-01-02 12:00:00'?,"CREATE TABLE downtown_police (id INT, call_type VARCHAR(20), call_date TIMESTAMP); ","SELECT call_type, call_date FROM downtown_police WHERE call_date > '2022-01-02 12:00:00';","SELECT call_type, call_date FROM downtown_police WHERE call_date > '2022-01-02 12:00:00';",1 Which US air date had 4.4 million viewers?,"CREATE TABLE table_17901155_4 (original_us_air_date VARCHAR, viewers__millions_ VARCHAR);","SELECT original_us_air_date FROM table_17901155_4 WHERE viewers__millions_ = ""4.4"";","SELECT original_us_air_date FROM table_17901155_4 WHERE viewers__millions_ = ""4.4"";",1 Who was the winner if the final venue is Kowloon Cricket Club?,"CREATE TABLE table_22577693_1 (winner VARCHAR, final_venue VARCHAR);","SELECT winner FROM table_22577693_1 WHERE final_venue = ""Kowloon Cricket Club"";","SELECT winner FROM table_22577693_1 WHERE final_venue = ""Kowloon Cricket Club"";",1 How many patients received the Pfizer vaccine in each state?,"CREATE TABLE vaccine_records (patient_id INT, vaccine_name VARCHAR(20), age INT, state VARCHAR(20)); ","SELECT state, COUNT(*) FROM vaccine_records WHERE vaccine_name = 'Pfizer' GROUP BY state;","SELECT state, COUNT(*) FROM vaccine_records WHERE vaccine_name = 'Pfizer' GROUP BY state;",1 "What is the earliest year that the tournament was played in Cape Town, South Africa?","CREATE TABLE table_name_71 (year INTEGER, location VARCHAR);","SELECT MIN(year) FROM table_name_71 WHERE location = ""cape town, south africa"";","SELECT MIN(year) FROM table_name_71 WHERE location = ""cape town, south africa"";",1 What is the average attendance for matches where the home team was vida?,"CREATE TABLE table_name_2 (attendance INTEGER, home VARCHAR);","SELECT AVG(attendance) FROM table_name_2 WHERE home = ""vida"";","SELECT AVG(attendance) FROM table_name_2 WHERE home = ""vida"";",1 What are the total sales and average sales per transaction for beauty products that are free from microplastics in Spain?,"CREATE TABLE beauty_products_spain (microplastic_free BOOLEAN, sale_date DATE, sales_quantity INT, unit_price DECIMAL(5,2)); ","SELECT SUM(sales_quantity * unit_price) AS total_sales, AVG(sales_quantity) AS avg_sales_per_transaction FROM beauty_products_spain WHERE microplastic_free = TRUE AND sale_date BETWEEN '2022-01-01' AND '2022-12-31';","SELECT SUM(sales_quantity * unit_price) as total_sales, AVG(sales_per_transaction) as avg_sales FROM beauty_products_spain WHERE microplastic_free = true AND sale_date BETWEEN '2022-01-01' AND '2022-12-31';",0 How many tries took place on 06/07/1996?,"CREATE TABLE table_name_16 (tries VARCHAR, date VARCHAR);","SELECT tries FROM table_name_16 WHERE date = ""06/07/1996"";","SELECT tries FROM table_name_16 WHERE date = ""06/07/1996"";",1 Which players from the 'players' table have played games released in 2020?,"CREATE TABLE players (player_id INT, player_name TEXT, game_id INT, release_year INT); ",SELECT player_name FROM players WHERE release_year = 2020;,SELECT player_name FROM players WHERE release_year = 2020;,1 "Which departments have a budget greater than $600,000?","CREATE TABLE departments (dept_id INT, name VARCHAR(255), budget DECIMAL(10, 2)); ","SELECT name, budget FROM departments WHERE budget > 600000;",SELECT name FROM departments WHERE budget > 600000;,0 Identify the number of pollution violations in the Caribbean region in the 'Compliance' schema.,"CREATE SCHEMA Compliance;CREATE TABLE PollutionViolations (id INT, country TEXT, region TEXT, year INT, violations INT); ","SELECT region, SUM(violations) AS total_violations FROM Compliance.PollutionViolations WHERE region = 'Caribbean' GROUP BY region;",SELECT SUM(violations) FROM Compliance.PollutionViolations WHERE region = 'Caribbean';,0 How many fans attended each sport event by type?,"CREATE TABLE events (event_type VARCHAR(50), fan_count INT); ","SELECT event_type, SUM(fan_count) FROM events GROUP BY event_type;","SELECT event_type, SUM(fan_count) FROM events GROUP BY event_type;",1 What is the average fine imposed on convicted traffic offenders by race and gender in New York City?,"CREATE TABLE traffic_offenses (offender_id INT, race VARCHAR(20), gender VARCHAR(10), fine DECIMAL(10, 2)); ","SELECT race, gender, AVG(fine) AS avg_fine FROM traffic_offenses GROUP BY ROLLUP(race, gender);","SELECT race, gender, AVG(fine) as avg_fine FROM traffic_offenses WHERE city = 'New York City' GROUP BY race, gender;",0 Find the top 3 countries with the highest average donation amount in Q3 2021.,"CREATE TABLE donations (id INT, donor_id INT, country TEXT, donation_amount DECIMAL(10,2), donation_date DATE); ","SELECT country, AVG(donation_amount) FROM donations WHERE donation_date >= '2021-07-01' AND donation_date <= '2021-09-30' GROUP BY country ORDER BY AVG(donation_amount) DESC LIMIT 3;","SELECT country, AVG(donation_amount) as avg_donation FROM donations WHERE donation_date BETWEEN '2021-04-01' AND '2021-06-30' GROUP BY country ORDER BY avg_donation DESC LIMIT 3;",0 "For opponent is sandra kristjánsdóttir, outcome is winner and edition is 2009 europe/africa group iiib mention all the opponent team.","CREATE TABLE table_27877656_7 (opponent_team VARCHAR, opponent VARCHAR, edition VARCHAR, outcome VARCHAR);","SELECT opponent_team FROM table_27877656_7 WHERE edition = ""2009 Europe/Africa Group IIIB"" AND outcome = ""Winner"" AND opponent = ""Sandra Kristjánsdóttir"";","SELECT opponent_team FROM table_27877656_7 WHERE edition = ""2009 europe/africa group iiib"" AND outcome = ""Winner"" AND opponent_team = ""Sandra Kristjánsdóttir"";",0 What is the average price of 'Beef' in 'EcoFarm' and 'HealthyHarvest'?,"CREATE TABLE EcoFarm (product_id INT, product_name VARCHAR(50), price FLOAT); CREATE TABLE HealthyHarvest (product_id INT, product_name VARCHAR(50), price FLOAT); ",SELECT AVG(price) FROM (SELECT price FROM EcoFarm WHERE product_name = 'Beef' UNION ALL SELECT price FROM HealthyHarvest WHERE product_name = 'Beef') AS subquery;,SELECT AVG(EcoFarm.price) FROM EcoFarm INNER JOIN HealthyHarvest ON EcoFarm.product_id = HealthyHarvest.product_id WHERE EcoFarm.product_name = 'Beef';,0 How many male fans are there in the 'Pacific Division'?,"CREATE TABLE fan_demographics (fan_id INT, fan_name VARCHAR(50), gender VARCHAR(50), division VARCHAR(50)); ",SELECT COUNT(*) FROM fan_demographics WHERE gender = 'Male' AND division = 'Pacific Division';,SELECT COUNT(*) FROM fan_demographics WHERE gender = 'Male' AND division = 'Pacific Division';,1 "which Category has a Result of nominated, and a Lost to of jennifer westfeldt ( kissing jessica stein )?","CREATE TABLE table_name_40 (category VARCHAR, result VARCHAR, lost_to VARCHAR);","SELECT category FROM table_name_40 WHERE result = ""nominated"" AND lost_to = ""jennifer westfeldt ( kissing jessica stein )"";","SELECT category FROM table_name_40 WHERE result = ""nominated"" AND lost_to = ""jennifer westfeldt ( kissing jessica stein )"";",1 What was the score for alcobaça when the opponent was in the final of xinyun han?,"CREATE TABLE table_name_27 (score VARCHAR, tournament VARCHAR, opponent_in_the_final VARCHAR);","SELECT score FROM table_name_27 WHERE tournament = ""alcobaça"" AND opponent_in_the_final = ""xinyun han"";","SELECT score FROM table_name_27 WHERE tournament = ""xinyun han"" AND opponent_in_the_final = ""alcobaça"";",0 What is the total number of attendees for music events?,"CREATE TABLE events (event_id INT, event_type VARCHAR(50)); CREATE TABLE attendees (attendee_id INT, event_id INT); ",SELECT COUNT(DISTINCT attendees.attendee_id) FROM attendees JOIN events ON attendees.event_id = events.event_id WHERE events.event_type = 'Music';,SELECT COUNT(*) FROM attendees JOIN events ON attendees.event_id = events.event_id WHERE events.event_type = 'Music';,0 Which competition led to a total weight of 428kg?,"CREATE TABLE table_name_77 (competition VARCHAR, total VARCHAR);","SELECT competition FROM table_name_77 WHERE total = ""428kg"";","SELECT competition FROM table_name_77 WHERE total = ""428kg"";",1 What was the aggregate total for the match against Koper?,"CREATE TABLE table_name_49 (agg VARCHAR, opponent VARCHAR);","SELECT agg FROM table_name_49 WHERE opponent = ""koper"";","SELECT agg FROM table_name_49 WHERE opponent = ""koper"";",1 What is the name of the song that was released in the most recent year?,"CREATE TABLE song (song_name VARCHAR, releasedate VARCHAR);","SELECT song_name, releasedate FROM song ORDER BY releasedate DESC LIMIT 1;",SELECT song_name FROM song WHERE releasedate = (SELECT MAX(releasedate) FROM song);,0 Which team has the highest number of home wins in the last 10 games?,"CREATE TABLE games (team TEXT, result TEXT); ","SELECT team, COUNT(*) FILTER (WHERE result = 'win') OVER (PARTITION BY team ORDER BY team ROWS BETWEEN UNBOUNDED PRECEDING AND 9 PRECEDING) as home_wins FROM games WHERE result = 'win' ORDER BY home_wins DESC LIMIT 1;","SELECT team, COUNT(*) FROM games WHERE result = 'Home' GROUP BY team ORDER BY COUNT(*) DESC LIMIT 10;",0 What is the total number of employees who have completed a training program in each department?,"CREATE TABLE DepartmentTrainings(Department VARCHAR(255), TrainingProgram VARCHAR(255), EmployeeCount INT);","SELECT Department, SUM(EmployeeCount) FROM DepartmentTrainings GROUP BY Department;","SELECT Department, SUM(EmployeeCount) FROM DepartmentTrainings GROUP BY Department;",1 "What is Venue, when Against is less than 30, and when Opposing Team is New South Wales?","CREATE TABLE table_name_14 (venue VARCHAR, against VARCHAR, opposing_team VARCHAR);","SELECT venue FROM table_name_14 WHERE against < 30 AND opposing_team = ""new south wales"";","SELECT venue FROM table_name_14 WHERE against 30 AND opposing_team = ""new south wales"";",0 What are the names and types of organizations in 'Canada'?,"CREATE TABLE organizations (id INT PRIMARY KEY, name VARCHAR(50), type VARCHAR(50), location VARCHAR(50)); ","SELECT organizations.name, organizations.type FROM organizations WHERE organizations.location = 'Canada';","SELECT name, type FROM organizations WHERE location = 'Canada';",0 What pick was a player that previously played for the Minnesota Lynx?,"CREATE TABLE table_name_60 (pick INTEGER, former_wnba_team VARCHAR);","SELECT SUM(pick) FROM table_name_60 WHERE former_wnba_team = ""minnesota lynx"";","SELECT SUM(pick) FROM table_name_60 WHERE former_wnba_team = ""minnesota lynx"";",1 What is the smallest number of seats in a retired vehicle that was started in service in 1981?,"CREATE TABLE table_name_93 (number_of_seats INTEGER, current_status VARCHAR, year_placed_in_service VARCHAR);","SELECT MIN(number_of_seats) FROM table_name_93 WHERE current_status = ""retired"" AND year_placed_in_service = ""1981"";","SELECT MIN(number_of_seats) FROM table_name_93 WHERE current_status = ""retired"" AND year_placed_in_service = ""1981"";",1 What is the total number of ticket sales for the 'TeamA' vs 'TeamB' match?,"CREATE TABLE ticket_sales (match VARCHAR(255), tickets_sold INT); ",SELECT tickets_sold FROM ticket_sales WHERE match = 'TeamA vs TeamB';,SELECT SUM(tickets_sold) FROM ticket_sales WHERE match = 'TeamA' INTERSECT SELECT SUM(tickets_sold) FROM ticket_sales WHERE match = 'TeamB';,0 "What is the Tournament with a Date that is apr 16, 1967?","CREATE TABLE table_name_56 (tournament VARCHAR, date VARCHAR);","SELECT tournament FROM table_name_56 WHERE date = ""apr 16, 1967"";","SELECT tournament FROM table_name_56 WHERE date = ""apr 16, 1967"";",1 What's the latest year with a start of 3 and a finish of 40 for the morgan-mcclure team?,"CREATE TABLE table_name_1 (year INTEGER, finish VARCHAR, start VARCHAR, team VARCHAR);","SELECT MAX(year) FROM table_name_1 WHERE start = ""3"" AND team = ""morgan-mcclure"" AND finish = ""40"";","SELECT MAX(year) FROM table_name_1 WHERE start = 3 AND team = ""morgan-mcclure"" AND finish = 40;",0 "What are all the order #s from the week ""top 6""?","CREATE TABLE table_29756040_1 (order__number VARCHAR, week__number VARCHAR);","SELECT order__number FROM table_29756040_1 WHERE week__number = ""Top 6"";","SELECT order__number FROM table_29756040_1 WHERE week__number = ""Top 6"";",1 Show the number of defendants who have not participated in restorative justice programs,"CREATE TABLE defendants (defendant_id INT, program_year INT, participated_restorative_program BOOLEAN); ",SELECT COUNT(*) FROM defendants WHERE participated_restorative_program = false;,SELECT COUNT(*) FROM defendants WHERE participated_restorative_program = FALSE;,0 "Show the recycling rate per month for the city of New York in 2019, with the highest rate at the top.","CREATE TABLE recycling_rates (id INT, city VARCHAR(50), rate FLOAT, month INT, year INT); ","SELECT city, AVG(rate) as avg_rate FROM recycling_rates WHERE city = 'New York' AND year = 2019 GROUP BY city, month ORDER BY avg_rate DESC;","SELECT city, month, rate FROM recycling_rates WHERE city = 'New York' AND year = 2019 AND rate = (SELECT MAX(rate) FROM recycling_rates WHERE city = 'New York') GROUP BY city, month;",0 What is the total funding amount for companies with female founders?,"CREATE TABLE companies (id INT, name TEXT, founder TEXT, funding INT); ",SELECT SUM(funding) FROM companies WHERE founder = 'Jane';,SELECT SUM(funding) FROM companies WHERE founder LIKE '%Female%';,0 Who had the highest rebounds of the game with A. Johnson (14) as the highest assists?,"CREATE TABLE table_name_55 (high_rebounds VARCHAR, high_assists VARCHAR);","SELECT high_rebounds FROM table_name_55 WHERE high_assists = ""a. johnson (14)"";","SELECT high_rebounds FROM table_name_55 WHERE high_assists = ""a. johnson (14)"";",1 Count the number of clinics in each rural region.,"CREATE TABLE clinics (id INT, name VARCHAR(50), region VARCHAR(20)); CREATE TABLE doctors (id INT, name VARCHAR(50), clinic_id INT, specialty VARCHAR(30)); ","SELECT clinics.region, COUNT(clinics.id) FROM clinics GROUP BY clinics.region;","SELECT c.region, COUNT(d.id) FROM clinics c JOIN doctors d ON c.id = d.clinic_id GROUP BY c.region;",0 Who had the high points when high assists is tim duncan (5)?,"CREATE TABLE table_27715173_8 (high_points VARCHAR, high_assists VARCHAR);","SELECT high_points FROM table_27715173_8 WHERE high_assists = ""Tim Duncan (5)"";","SELECT high_points FROM table_27715173_8 WHERE high_assists = ""Tim Duncan (5)"";",1 What is the score of the New Jersey home game?,"CREATE TABLE table_name_42 (score VARCHAR, home VARCHAR);","SELECT score FROM table_name_42 WHERE home = ""new jersey"";","SELECT score FROM table_name_42 WHERE home = ""new jersey"";",1 What is the average number of points scored by Stephen Curry in the NBA regular season?,"CREATE TABLE nba_points (player_name VARCHAR(50), team VARCHAR(50), season YEAR, points INT); ",SELECT AVG(points) FROM nba_points WHERE player_name = 'Stephen Curry';,SELECT AVG(points) FROM nba_points WHERE player_name = 'Stephen Curry' AND season = 'Regular';,0 Which age group made the most donations in 2021?,"CREATE TABLE Donors (DonorID INT, DonorName TEXT, Age INT, DonationCount INT, DonationYear INT); ","SELECT Age, SUM(DonationCount) FROM Donors WHERE DonationYear = 2021 GROUP BY Age ORDER BY SUM(DonationCount) DESC;","SELECT Age, SUM(DonationCount) as TotalDonations FROM Donors WHERE DonationYear = 2021 GROUP BY Age ORDER BY TotalDonations DESC;",0 What is the mascot for the school in 32 Hendricks County?,"CREATE TABLE table_name_11 (mascot VARCHAR, county VARCHAR);","SELECT mascot FROM table_name_11 WHERE county = ""32 hendricks"";","SELECT mascot FROM table_name_11 WHERE county = ""32 hendricks"";",1 Which Production in 2009 had a Result of Nominated at the Helpmann awards Award Ceremony?,"CREATE TABLE table_name_67 (production VARCHAR, award_ceremony VARCHAR, result VARCHAR, year VARCHAR);","SELECT production FROM table_name_67 WHERE result = ""nominated"" AND year = 2009 AND award_ceremony = ""helpmann awards"";","SELECT production FROM table_name_67 WHERE result = ""nominated"" AND year = 2009 AND award_ceremony = ""helpmann awards"";",1 "What is Party, when Incumbent is ""Rodney Alexander""?","CREATE TABLE table_name_52 (party VARCHAR, incumbent VARCHAR);","SELECT party FROM table_name_52 WHERE incumbent = ""rodney alexander"";","SELECT party FROM table_name_52 WHERE incumbent = ""rodney alexander"";",1 Who had highest points in game 5?,"CREATE TABLE table_22883210_5 (high_points VARCHAR, game VARCHAR);",SELECT high_points FROM table_22883210_5 WHERE game = 5;,SELECT high_points FROM table_22883210_5 WHERE game = 5;,1 What are the names and descriptions of all certified green building materials sourced from Africa?,"CREATE TABLE green_building_materials (id INT, material VARCHAR(255), description VARCHAR(255), sourced_from VARCHAR(255), certified BOOLEAN); ","SELECT material, description FROM green_building_materials WHERE certified = true AND sourced_from = 'Africa';","SELECT material, description FROM green_building_materials WHERE sourced_from = 'Africa' AND certified = TRUE;",0 What are the names of the deepest ocean trenches?,"CREATE TABLE ocean_trenches (name VARCHAR(50), location VARCHAR(50), avg_depth FLOAT);",SELECT name FROM ocean_trenches ORDER BY avg_depth DESC LIMIT 1;,SELECT name FROM ocean_trenches ORDER BY avg_depth DESC LIMIT 1;,1 What is the highest rank of Great Britain who has less than 16 bronze?,"CREATE TABLE table_name_11 (rank INTEGER, nation VARCHAR, bronze VARCHAR);","SELECT MAX(rank) FROM table_name_11 WHERE nation = ""great britain"" AND bronze < 16;","SELECT MAX(rank) FROM table_name_11 WHERE nation = ""great britain"" AND bronze 16;",0 What is the total number on roll for Shelly Park school?,"CREATE TABLE table_name_7 (roll VARCHAR, name VARCHAR);","SELECT COUNT(roll) FROM table_name_7 WHERE name = ""shelly park school"";","SELECT COUNT(roll) FROM table_name_7 WHERE name = ""shelly park school"";",1 What is the total number of media ethics violations in 'South America' and 'Asia'?,"CREATE TABLE violations (id INT, location TEXT, type TEXT); ","SELECT SUM(violations.id) FROM violations WHERE violations.location IN ('South America', 'Asia') AND violations.type = 'ethics';","SELECT COUNT(*) FROM violations WHERE location IN ('South America', 'Asia');",0 What is the total quantity of dishes with the 'vegan' tag?,"CREATE TABLE dishes (id INT, name TEXT, tags TEXT); CREATE TABLE orders (id INT, dish_id INT, quantity INT); ",SELECT SUM(quantity) FROM orders JOIN dishes ON dishes.id = orders.dish_id WHERE tags LIKE '%vegan%';,SELECT SUM(quantity) FROM orders JOIN dishes ON orders.dish_id = dishes.id WHERE dishes.tags LIKE '%vegan%';,0 Name the 2001 with 2007 of sf,CREATE TABLE table_name_2 (Id VARCHAR);,"SELECT 2001 FROM table_name_2 WHERE 2007 = ""sf"";","SELECT 2001 FROM table_name_2 WHERE 2007 = ""sf"";",1 "How many of the episodes in the top 50 rankings were originally aired on June 28, 2010?","CREATE TABLE table_22170495_7 (top_50_ranking VARCHAR, original_airing VARCHAR);","SELECT COUNT(top_50_ranking) FROM table_22170495_7 WHERE original_airing = ""June 28, 2010"";","SELECT COUNT(top_50_ranking) FROM table_22170495_7 WHERE original_airing = ""June 28, 2010"";",1 Display vehicle safety testing results for vehicles released in 2018.,"CREATE TABLE SafetyTesting (Id INT, Name VARCHAR(50), Year INT, SafetyRating INT); ",SELECT * FROM SafetyTesting WHERE Year = 2018;,SELECT * FROM SafetyTesting WHERE Year = 2018;,1 How many soil moisture sensors have a temperature above 25 degrees in 'Field003'?,"CREATE TABLE soil_moisture_sensors (id INT, field_id VARCHAR(10), sensor_id VARCHAR(10), temperature FLOAT); ",SELECT COUNT(*) FROM soil_moisture_sensors WHERE field_id = 'Field003' AND temperature > 25;,SELECT COUNT(*) FROM soil_moisture_sensors WHERE field_id = 'Field003' AND temperature > 25;,1 "Which Opponent has Attendances of 60,594?","CREATE TABLE table_name_34 (opponent VARCHAR, attendance VARCHAR);","SELECT opponent FROM table_name_34 WHERE attendance = ""60,594"";","SELECT opponent FROM table_name_34 WHERE attendance = ""60,594"";",1 What is the maximum rating given to any movie from the United States?,"CREATE TABLE movies (id INT, title VARCHAR(255), rating DECIMAL(3,2), production_country VARCHAR(64)); ",SELECT MAX(rating) FROM movies WHERE production_country = 'USA';,SELECT MAX(rating) FROM movies WHERE production_country = 'United States';,0 "Show each school name, its budgeted amount, and invested amount in year 2002 or after.","CREATE TABLE budget (budgeted VARCHAR, invested VARCHAR, school_id VARCHAR, year VARCHAR); CREATE TABLE school (school_name VARCHAR, school_id VARCHAR);","SELECT T2.school_name, T1.budgeted, T1.invested FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T1.year >= 2002;","SELECT T1.school_name, T1.budgeted, T1.invested FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.year >= 2002;",0 Which School/Club Team has a Player of deandre liggins?,"CREATE TABLE table_name_34 (school_club_team VARCHAR, player VARCHAR);","SELECT school_club_team FROM table_name_34 WHERE player = ""deandre liggins"";","SELECT school_club_team FROM table_name_34 WHERE player = ""deandre liggins"";",1 List all vehicle maintenance records for the 'Red Line' subway fleet,"CREATE TABLE vehicle_maintenance (vehicle_type VARCHAR(50), last_maintenance DATE); ",SELECT * FROM vehicle_maintenance WHERE vehicle_type = 'Red Line';,SELECT * FROM vehicle_maintenance WHERE vehicle_type = 'Red Line';,1 What are the temperature and precipitation data for the Arctic Circle in 2022?,"CREATE TABLE Climate_Data ( id INT PRIMARY KEY, location VARCHAR(50), temperature FLOAT, precipitation FLOAT, date DATE ); ","SELECT location, temperature, precipitation FROM Climate_Data WHERE location = 'Arctic Circle' AND date BETWEEN '2022-01-01' AND '2022-12-31'","SELECT location, temperature, precipitation FROM Climate_Data WHERE location = 'Arctic Circle' AND date BETWEEN '2022-01-01' AND '2022-12-31';",0 Who has the highest number of home runs in MLB history?,"CREATE TABLE mlb_history (player VARCHAR(100), team VARCHAR(100), home_runs INT); ","SELECT player, MAX(home_runs) FROM mlb_history;","SELECT player, MAX(home_runs) FROM mlb_history GROUP BY player;",0 What is the maximum annual treatment volume for wastewater treatment plants in Africa?,"CREATE TABLE WastewaterTreatmentPlants (Id INT, Name VARCHAR(100), Location VARCHAR(100), Capacity INT, AnnualTreatmentVolume INT); ","SELECT Location, MAX(AnnualTreatmentVolume) FROM WastewaterTreatmentPlants WHERE Location LIKE 'Africa%' GROUP BY Location;",SELECT MAX(AnnualTreatmentVolume) FROM WastewaterTreatmentPlants WHERE Location = 'Africa';,0 What is the average manufacturing cost for garments made in each country?,"CREATE TABLE garments (garment_id INT, garment_name VARCHAR(50), country VARCHAR(30), manufacturing_cost DECIMAL(10,2));","SELECT country, AVG(manufacturing_cost) FROM garments GROUP BY country;","SELECT country, AVG(manufacturing_cost) as avg_cost FROM garments GROUP BY country;",0 What is the total investment in agricultural innovation for each region in the 'investment_data' table?,"CREATE TABLE investment_data (investment_id INT, region VARCHAR(20), investment_amount DECIMAL(10,2)); ","SELECT region, SUM(investment_amount) as total_investment FROM investment_data GROUP BY region;","SELECT region, SUM(investment_amount) as total_investment FROM investment_data GROUP BY region;",1 Which freight forwarders have not handled any shipments?,"CREATE TABLE freight_forwarders (id INT, name VARCHAR(255));CREATE TABLE shipments (id INT, forwarder_id INT);",SELECT f.name FROM freight_forwarders f LEFT JOIN shipments s ON f.id = s.forwarder_id WHERE s.forwarder_id IS NULL;,SELECT f.name FROM freight_forwarders f INNER JOIN shipments s ON f.id = s.forwarder_id WHERE s.id IS NULL;,0 "What is the FA Cup Apps when total goals is smaller than 4, League Cup Goals is 0, and League Apps is 8 (10)?","CREATE TABLE table_name_73 (fa_cup_apps VARCHAR, league_apps VARCHAR, total_goals VARCHAR, league_cup_goals VARCHAR);","SELECT fa_cup_apps FROM table_name_73 WHERE total_goals < 4 AND league_cup_goals = 0 AND league_apps = ""8 (10)"";","SELECT fa_cup_apps FROM table_name_73 WHERE total_goals 4 AND league_cup_goals = 0 AND league_apps = ""8 (10)"";",0 What is the average production of Europium per country in 2018?,"CREATE TABLE production (country VARCHAR(255), element VARCHAR(255), quantity INT, year INT); ","SELECT country, AVG(quantity) as avg_production FROM production WHERE element = 'Europium' AND year = 2018 GROUP BY country;",SELECT AVG(quantity) FROM production WHERE element = 'Europium' AND year = 2018;,0 "What is the total number of players who prefer VR technology, grouped by age?","CREATE TABLE PlayerPreferences (PlayerID INT, AgeGroup VARCHAR(10), VRPreference INT); ","SELECT AgeGroup, SUM(VRPreference) FROM PlayerPreferences GROUP BY AgeGroup;","SELECT AgeGroup, COUNT(*) FROM PlayerPreferences WHERE VRPreference = 1 GROUP BY AgeGroup;",0 Delete all records of conventional meals served in restaurants located in Canada with a calorie count greater than 700.,"CREATE TABLE Restaurants (id INT, name TEXT, country TEXT); CREATE TABLE Meals (id INT, name TEXT, type TEXT, calories INT, RestaurantId INT, FOREIGN KEY (RestaurantId) REFERENCES Restaurants(id)); ",DELETE FROM Meals WHERE Meals.type = 'Conventional' AND Meals.calories > 700 AND RestaurantId IN (SELECT id FROM Restaurants WHERE Restaurants.country = 'Canada');,DELETE FROM Meals WHERE Meals.type = 'Conventional' AND Meals.calories > 700 AND Restaurants.country = 'Canada';,0 Name the date for pescara,"CREATE TABLE table_name_76 (date VARCHAR, circuit VARCHAR);","SELECT date FROM table_name_76 WHERE circuit = ""pescara"";","SELECT date FROM table_name_76 WHERE circuit = ""pescara"";",1 "List the top 3 categories with the highest number of articles published in H1 2022, and the corresponding total amounts.","CREATE TABLE news_articles_2 (article_id INT, pub_date DATE, category VARCHAR(255)); ","SELECT category, SUM(amount) AS total FROM (SELECT category, COUNT(*) AS amount, ROW_NUMBER() OVER (PARTITION BY category ORDER BY COUNT(*) DESC) AS rn FROM news_articles_2 WHERE pub_date BETWEEN '2022-01-01' AND '2022-06-30' GROUP BY category) t WHERE rn <= 3 GROUP BY category;","SELECT category, COUNT(*) as total_articles FROM news_articles_2 WHERE pub_date BETWEEN '2022-01-01' AND '2022-06-30' GROUP BY category ORDER BY total_articles DESC LIMIT 3;",0 What was the score for the tournament in Michigan where the purse was smaller than 1813335.221493934?,"CREATE TABLE table_11603006_1 (score VARCHAR, location VARCHAR, purse__$__ VARCHAR);","SELECT score FROM table_11603006_1 WHERE location = ""Michigan"" AND purse__$__ < 1813335.221493934;","SELECT score FROM table_11603006_1 WHERE location = ""Michigan"" AND purse__$__ 1813335.221493934;",0 How many unique organizations provided support in healthcare and sanitation?,"CREATE TABLE support_org (id INT, organization_name VARCHAR(50), sector VARCHAR(20)); ","SELECT DISTINCT organization_name FROM support_org WHERE sector IN ('healthcare', 'sanitation');","SELECT COUNT(DISTINCT organization_name) FROM support_org WHERE sector IN ('Healthcare', 'Sanitation');",0 how many mean elevation with lowest point being gulf of mexico and state being texas,"CREATE TABLE table_1416612_1 (mean_elevation VARCHAR, lowest_point VARCHAR, state VARCHAR);","SELECT COUNT(mean_elevation) FROM table_1416612_1 WHERE lowest_point = ""Gulf of Mexico"" AND state = ""Texas"";","SELECT COUNT(mean_elevation) FROM table_1416612_1 WHERE lowest_point = ""Gulf of Mexico"" AND state = ""Texas"";",1 What is the Percentage Lost for the contestant with a starting weight above 102 kg who lost 46.9 kg?,"CREATE TABLE table_name_93 (percentage_lost VARCHAR, starting_weight__kg_ VARCHAR, weight_lost__kg_ VARCHAR);",SELECT percentage_lost FROM table_name_93 WHERE starting_weight__kg_ > 102 AND weight_lost__kg_ = 46.9;,SELECT percentage_lost FROM table_name_93 WHERE starting_weight__kg_ > 102 AND weight_lost__kg_ = 46.9;,1 What is the percentage of concert revenue generated by hip-hop artists in 2021?,"CREATE TABLE concert_events (event_id INT, artist_id INT, event_date DATE, event_location VARCHAR(255), genre VARCHAR(50), revenue DECIMAL(10,2)); CREATE TABLE artist_demographics (artist_id INT, artist_name VARCHAR(255), genre VARCHAR(50)); ",SELECT (SUM(ce.revenue) FILTER (WHERE ad.genre = 'Hip-Hop')) / SUM(ce.revenue) FROM concert_events ce JOIN artist_demographics ad ON ce.artist_id = ad.artist_id WHERE ce.event_date BETWEEN '2021-01-01' AND '2021-12-31';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM concert_events WHERE genre = 'Hip-Hop')) AS percentage FROM concert_events WHERE genre = 'Hip-Hop' AND YEAR(event_date) = 2021;,0 Add a new community education program record into the education table,"CREATE TABLE education (id INT PRIMARY KEY, name VARCHAR(255), description TEXT, attendees INT);","INSERT INTO education (id, name, description, attendees) VALUES (1, 'Snow Leopard Education', 'Education about Snow Leopard conservation', 250);","INSERT INTO education (id, name, description, attendees) VALUES (1, 'Community Education', 'Community Education', 'Community Education');",0 What was the team's record when they played at Rheinenergiestadion?,"CREATE TABLE table_24989925_2 (team_record VARCHAR, game_site VARCHAR);","SELECT team_record FROM table_24989925_2 WHERE game_site = ""RheinEnergieStadion"";","SELECT team_record FROM table_24989925_2 WHERE game_site = ""Rheinenergiestadion"";",0 "List the water conservation initiatives implemented in regions affected by severe droughts between 2016 and 2020, ordered by year.","CREATE TABLE conservation_initiatives(region VARCHAR(20), year INT, initiative VARCHAR(50)); ","SELECT * FROM conservation_initiatives WHERE year BETWEEN 2016 AND 2020 AND region IN ('California', 'Nevada', 'Arizona') ORDER BY year;","SELECT region, year, initiative FROM conservation_initiatives WHERE year BETWEEN 2016 AND 2020 GROUP BY region, year ORDER BY year;",0 what is the minimum total,CREATE TABLE table_1108394_43 (total INTEGER);,SELECT MIN(total) FROM table_1108394_43;,SELECT MIN(total) FROM table_1108394_43;,1 Where was Al Gore elected,"CREATE TABLE table_1341640_43 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_1341640_43 WHERE incumbent = ""Al Gore"";","SELECT district FROM table_1341640_43 WHERE incumbent = ""Al Gore"";",1 What is the total quantity of items sold in the EU that are made of sustainable materials?,"CREATE TABLE sales (id INT, item_id INT, country TEXT, quantity INT); CREATE TABLE products (id INT, name TEXT, material TEXT, vegan BOOLEAN); ","SELECT SUM(quantity) FROM sales JOIN products ON sales.item_id = products.id WHERE (products.material IN ('Organic Cotton', 'Linen', 'Recycled Polyester') OR products.vegan = 1) AND country LIKE 'EU%';",SELECT SUM(sales.quantity) FROM sales INNER JOIN products ON sales.id = products.id WHERE sales.country = 'EU' AND products.material = 'Vegan';,0 How many total points were earned with ferrari 125 Chassis after 1952?,"CREATE TABLE table_name_77 (points INTEGER, chassis VARCHAR, year VARCHAR);","SELECT SUM(points) FROM table_name_77 WHERE chassis = ""ferrari 125"" AND year > 1952;","SELECT SUM(points) FROM table_name_77 WHERE chassis = ""ferrari 125"" AND year > 1952;",1 How many districts had William F. Norrell as the incumbent?,"CREATE TABLE table_1342233_5 (district VARCHAR, incumbent VARCHAR);","SELECT COUNT(district) FROM table_1342233_5 WHERE incumbent = ""William F. Norrell"";","SELECT COUNT(district) FROM table_1342233_5 WHERE incumbent = ""William F. Norrell"";",1 What is the maximum number of security incidents resolved by a single analyst in the last month?,"CREATE TABLE SecurityIncidents(id INT, analyst_id VARCHAR(50), incidents INT, resolution_date DATE);","SELECT MAX(incidents) as max_incidents FROM SecurityIncidents WHERE resolution_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 MONTH) GROUP BY analyst_id ORDER BY max_incidents DESC LIMIT 1;","SELECT MAX(incidents) FROM SecurityIncidents WHERE resolution_date >= DATEADD(month, -1, GETDATE());",0 What college received Pick 5?,"CREATE TABLE table_name_93 (college VARCHAR, pick VARCHAR);",SELECT college FROM table_name_93 WHERE pick = 5;,SELECT college FROM table_name_93 WHERE pick = 5;,1 How many players from South Korea have earned more than 1000 coins in total?,"CREATE TABLE Players (PlayerID INT, PlayerName TEXT, Country TEXT, CoinsEarned INT); ",SELECT COUNT(*) FROM Players WHERE Country = 'South Korea' AND CoinsEarned > 1000;,SELECT COUNT(*) FROM Players WHERE Country = 'South Korea' AND CoinsEarned > 1000;,1 What date has 9 as the week?,"CREATE TABLE table_name_21 (date VARCHAR, week VARCHAR);",SELECT date FROM table_name_21 WHERE week = 9;,SELECT date FROM table_name_21 WHERE week = 9;,1 "How many countries in the ""climate_mitigation"" table have renewable energy projects that started after 2015?","CREATE TABLE climate_mitigation (country VARCHAR(50), project_name VARCHAR(50), start_year INT); ",SELECT COUNT(DISTINCT country) FROM climate_mitigation WHERE start_year > 2015;,SELECT COUNT(*) FROM climate_mitigation WHERE start_year > 2015;,0 List all marine protected areas in the Caribbean Sea and their average depths.,"CREATE TABLE marine_protected_areas (id INT, area_name VARCHAR(50), ocean VARCHAR(50), avg_depth DECIMAL(5,2)); ","SELECT area_name, avg_depth FROM marine_protected_areas WHERE ocean = 'Caribbean Sea';","SELECT area_name, AVG(avg_depth) FROM marine_protected_areas WHERE ocean = 'Caribbean Sea';",0 Name the january when april is courtney rachel culkin,"CREATE TABLE table_name_53 (january VARCHAR, april VARCHAR);","SELECT january FROM table_name_53 WHERE april = ""courtney rachel culkin"";","SELECT january FROM table_name_53 WHERE april = ""courtney rachel culkin"";",1 What is the maximum amount of research grants awarded to graduate students from India?,"CREATE TABLE graduate_students (student_id INT, name VARCHAR(50), country VARCHAR(50)); CREATE TABLE research_grants (grant_id INT, student_id INT, amount INT); ",SELECT MAX(rg.amount) FROM research_grants rg JOIN graduate_students gs ON rg.student_id = gs.student_id WHERE gs.country = 'India';,SELECT MAX(rg.amount) FROM research_grants rg JOIN graduate_students gs ON rg.student_id = gs.student_id WHERE gs.country = 'India';,1 Update artifact records with conservation status 'Fair' for 'Site B',"CREATE TABLE ArtifactConservationStatus (StatusID INT, StatusName TEXT);",UPDATE Artifacts SET ConservationStatusID = (SELECT StatusID FROM ArtifactConservationStatus WHERE StatusName = 'Fair') WHERE SiteID = 456;,UPDATE ArtifactConservationStatus SET StatusName = 'Fair' WHERE SiteName = 'Site B';,0 What was the original air date for season 11?,"CREATE TABLE table_20704243_6 (original_air_date VARCHAR, season__number VARCHAR);",SELECT original_air_date FROM table_20704243_6 WHERE season__number = 11;,SELECT original_air_date FROM table_20704243_6 WHERE season__number = 11;,1 "Insert a new record into the ""SmartBuildings"" table for a new ""Wind"" type building in ""Tokyo"" with a capacity of 800","CREATE TABLE SmartBuildings (id INT, city VARCHAR(20), type VARCHAR(20), capacity INT);","INSERT INTO SmartBuildings (city, type, capacity) VALUES ('Tokyo', 'Wind', 800);","INSERT INTO SmartBuildings (city, type, capacity) VALUES ('Tokyo', 'Wind', 800);",1 What is the most common mode of transportation for international tourists?,"CREATE TABLE transportation (id INT, mode VARCHAR(50), tourists INT); ","SELECT mode, RANK() OVER (ORDER BY tourists DESC) as rank FROM transportation;","SELECT mode, tourists FROM transportation ORDER BY tourists DESC LIMIT 1;",0 Insert a new healthcare access metric for a rural community,"CREATE TABLE healthcare_access (id INT, community_type VARCHAR(20), access_score INT);","INSERT INTO healthcare_access (id, community_type, access_score) VALUES (6, 'Rural', 78);","INSERT INTO healthcare_access (id, community_type, access_score) VALUES (1, 'Rural', 'Access');",0 List the number of unique mental health conditions treated in Texas clinics using DBT?,"CREATE TABLE clinics (clinic_id INT, clinic_name TEXT, state TEXT); CREATE TABLE treatments (treatment_id INT, patient_id INT, clinic_id INT, therapy TEXT); CREATE TABLE conditions (condition_id INT, patient_id INT, condition TEXT); ",SELECT COUNT(DISTINCT conditions.condition) FROM clinics INNER JOIN treatments ON clinics.clinic_id = treatments.clinic_id INNER JOIN conditions ON treatments.patient_id = conditions.patient_id WHERE clinics.state = 'Texas' AND therapy = 'DBT';,SELECT COUNT(DISTINCT conditions.condition_id) FROM conditions INNER JOIN clinics ON conditions.clinic_id = clinics.clinic_id INNER JOIN treatments ON conditions.patient_id = treatments.patient_id INNER JOIN clinics ON treatments.clinic_id = clinics.clinic_id WHERE clinics.state = 'Texas' AND treatments.therapy = 'DBT';,0 "What is the average transaction fee on the Stellar blockchain, and what is the minimum fee for transactions with a value greater than 1000?","CREATE TABLE stellar_transactions (transaction_id INT, fee DECIMAL(10, 2), value DECIMAL(20, 2)); ","SELECT AVG(fee), MIN(fee) FROM stellar_transactions WHERE value > 1000;","SELECT AVG(fee) as avg_fee, MIN(fee) as min_fee FROM stellar_transactions WHERE value > 1000;",0 When was Tomokazu Soma born who plays for the wild knights?,"CREATE TABLE table_name_71 (date_of_birth__age_ VARCHAR, club_province VARCHAR, player VARCHAR);","SELECT date_of_birth__age_ FROM table_name_71 WHERE club_province = ""wild knights"" AND player = ""tomokazu soma"";","SELECT date_of_birth__age_ FROM table_name_71 WHERE club_province = ""wild knights"" AND player = ""tomokazu soma"";",1 In what Round does Duke have a Pick larger than 9?,"CREATE TABLE table_name_49 (round VARCHAR, pick VARCHAR, school VARCHAR);","SELECT COUNT(round) FROM table_name_49 WHERE pick > 9 AND school = ""duke"";","SELECT round FROM table_name_49 WHERE pick > 9 AND school = ""duke"";",0 Show the 5 most recent transactions for customers with financial wellbeing scores above 80.,"CREATE TABLE transactions (transaction_id INT, customer_id INT, transaction_date DATE, transaction_amount DECIMAL(10,2));",SELECT * FROM transactions WHERE customer_id IN (SELECT customer_id FROM customers WHERE financial_wellbeing_score > 80) ORDER BY transaction_date DESC FETCH FIRST 5 ROWS ONLY;,"SELECT customer_id, transaction_date, transaction_amount FROM transactions WHERE customer_id IN (SELECT customer_id FROM customers WHERE financial_wellbeing > 80) GROUP BY customer_id, transaction_date ORDER BY transaction_date DESC LIMIT 5;",0 Find the names and donation amounts of the top 3 donors from each country in the Donations table.,"CREATE TABLE Donations (id INT, name TEXT, country TEXT, amount DECIMAL(10,2)); ","SELECT name, amount, country FROM (SELECT name, amount, country, ROW_NUMBER() OVER (PARTITION BY country ORDER BY amount DESC) AS rn FROM Donations) AS TopDonorsPerCountry WHERE rn <= 3;","SELECT name, amount FROM Donations ORDER BY amount DESC LIMIT 3;",0 What is the average response time for each disaster type?,"CREATE TABLE If Not Exists disaster_response (disaster_id INT, disaster_type TEXT, location TEXT, response_time DATETIME); ","SELECT disaster_type, AVG(DATEDIFF('2022-12-31', response_time)) as avg_response_time FROM disaster_response GROUP BY disaster_type;","SELECT disaster_type, AVG(response_time) as avg_response_time FROM disaster_response GROUP BY disaster_type;",0 What is the total revenue for restaurants located in 'New York'?,"CREATE TABLE restaurants (name TEXT, revenue FLOAT, location TEXT); ",SELECT SUM(revenue) FROM restaurants WHERE location = 'New York';,SELECT SUM(revenue) FROM restaurants WHERE location = 'New York';,1 Tell me the tournament for kathy horvath opponent,"CREATE TABLE table_name_95 (tournament VARCHAR, opponent VARCHAR);","SELECT tournament FROM table_name_95 WHERE opponent = ""kathy horvath"";","SELECT tournament FROM table_name_95 WHERE opponent = ""kathy horvath"";",1 "What is the Report for 08 jul, and a Score of 3–1?","CREATE TABLE table_name_79 (report VARCHAR, date VARCHAR, score VARCHAR);","SELECT report FROM table_name_79 WHERE date = ""08 jul"" AND score = ""3–1"";","SELECT report FROM table_name_79 WHERE date = ""08 jul"" AND score = ""3–1"";",1 Who are the recipients in 1994?,"CREATE TABLE table_name_73 (recipients_and_nominees VARCHAR, year VARCHAR);",SELECT recipients_and_nominees FROM table_name_73 WHERE year = 1994;,SELECT recipients_and_nominees FROM table_name_73 WHERE year = 1994;,1 list the local authorities and services provided by all stations.,"CREATE TABLE station (local_authority VARCHAR, services VARCHAR);","SELECT local_authority, services FROM station;","SELECT local_authority, services FROM station;",1 What is the earliest open date for each attorney's cases?,"CREATE TABLE CaseAttorney (CaseID int, AttorneyID int, OpenDate date); ","SELECT AttorneyID, MIN(OpenDate) OVER (PARTITION BY AttorneyID) AS EarliestOpenDate FROM CaseAttorney;","SELECT AttorneyID, MIN(OpenDate) FROM CaseAttorney GROUP BY AttorneyID;",0 What is the maximum number of points scored by a player in a single game in the BasketballMatches and BasketballPlayerPoints tables?,"CREATE TABLE BasketballMatches (MatchID INT, HomeTeam VARCHAR(50), AwayTeam VARCHAR(50)); CREATE TABLE BasketballPlayerPoints (PlayerID INT, MatchID INT, Points INT);",SELECT MAX(Points) FROM BasketballPlayerPoints INNER JOIN BasketballMatches ON BasketballPlayerPoints.MatchID = BasketballMatches.MatchID;,SELECT MAX(Points) FROM BasketballPlayerPoints;,0 Name the years in orlando that the player from concord hs was in,"CREATE TABLE table_15621965_10 (years_in_orlando VARCHAR, school_club_team VARCHAR);","SELECT years_in_orlando FROM table_15621965_10 WHERE school_club_team = ""Concord HS"";","SELECT years_in_orlando FROM table_15621965_10 WHERE school_club_team = ""Concord Hs"";",0 "Identify the top 3 cities with the highest budget allocated for environmental services, for the fiscal year 2023, and their respective budgets.","CREATE TABLE city_environmental_budget (city VARCHAR(255), fiscal_year INT, budget DECIMAL(10,2)); ","SELECT city, budget FROM (SELECT city, budget, ROW_NUMBER() OVER (ORDER BY budget DESC) as rank FROM city_environmental_budget WHERE fiscal_year = 2023 AND service = 'Environmental') as ranked_cities WHERE rank <= 3","SELECT city, budget FROM city_environmental_budget WHERE fiscal_year = 2023 ORDER BY budget DESC LIMIT 3;",0 What's the diameter when longitude is 105.0e before 2003?,"CREATE TABLE table_name_42 (diameter__km_ INTEGER, longitude VARCHAR, year_named VARCHAR);","SELECT SUM(diameter__km_) FROM table_name_42 WHERE longitude = ""105.0e"" AND year_named < 2003;","SELECT SUM(diameter__km_) FROM table_name_42 WHERE longitude = ""105.0e"" AND year_named 2003;",0 Calculate the percentage of trips with a fare greater than $50 in taxi_trips.,"CREATE TABLE taxi_trips (ride_id INT, ride_start_time TIMESTAMP, ride_end_time TIMESTAMP, ride_distance FLOAT, fare FLOAT);",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM taxi_trips WHERE fare > 50.0)) AS percentage FROM taxi_trips WHERE fare > 50.0;,SELECT 100.0 * COUNT(*) / (SELECT COUNT(*) FROM taxi_trips WHERE fare > 50) AS percentage FROM taxi_trips WHERE fare > 50;,0 How many games were against Furman?,"CREATE TABLE table_20745444_1 (game INTEGER, opponent VARCHAR);","SELECT MAX(game) FROM table_20745444_1 WHERE opponent = ""Furman"";","SELECT SUM(game) FROM table_20745444_1 WHERE opponent = ""Furman"";",0 Update the retail price of the strain 'Gelato' in the dispensary with ID 5 in California on 2022-02-15 to 35.00.,"CREATE TABLE strains (id INT, name TEXT, type TEXT); CREATE TABLE dispensaries (id INT, name TEXT, state TEXT); CREATE TABLE sales (id INT, strain_id INT, retail_price DECIMAL, sale_date DATE, dispensary_id INT); ",UPDATE sales SET retail_price = 35.00 WHERE strain_id = 1 AND sale_date = '2022-02-15' AND dispensary_id = 5;,UPDATE sales SET retail_price = 35.00 WHERE strain_id = 5 AND state = 'California' AND sale_date BETWEEN '2022-01-01' AND '2022-02-31';,0 Which zone had mădălina gojnea monica niculescu as the opponent?,"CREATE TABLE table_name_30 (zone VARCHAR, opponents VARCHAR);","SELECT zone FROM table_name_30 WHERE opponents = ""mădălina gojnea monica niculescu"";","SELECT zone FROM table_name_30 WHERE opponents = ""medălina gojnea monica niculescu"";",0 "Determine the total budget for climate communication campaigns targeting the general public in 2021 and 2022, and display the summed budget per year.","CREATE TABLE climate_communication_campaigns (year INT, campaign VARCHAR(20), target VARCHAR(20), budget FLOAT); ","SELECT year, SUM(budget) AS total_budget FROM climate_communication_campaigns WHERE target = 'General Public' AND year IN (2021, 2022) GROUP BY year;","SELECT year, SUM(budget) FROM climate_communication_campaigns WHERE target = 'General Public' GROUP BY year;",0 "List the carbon offset programs and their start dates in ascending order, along with their corresponding policy IDs in the ""PolicyData"" table.","CREATE TABLE PolicyData (PolicyID INT, ProgramName VARCHAR(50), StartDate DATE);","SELECT PolicyID, ProgramName, StartDate FROM PolicyData ORDER BY StartDate;","SELECT ProgramName, StartDate FROM PolicyData ORDER BY StartDate ASC;",0 What is the average age of patients who received therapy in each region?,"CREATE TABLE patients (id INT, age INT, gender VARCHAR(10), region VARCHAR(50), therapy_date DATE); CREATE VIEW region_therapy_patients AS SELECT region, AVG(age) as avg_age FROM patients WHERE therapy_date IS NOT NULL GROUP BY region;",SELECT * FROM region_therapy_patients;,"SELECT region, AVG(age) FROM region_therapy_patients GROUP BY region;",0 What year was The Last Samurai nominated?,"CREATE TABLE table_name_42 (year VARCHAR, status VARCHAR, film VARCHAR);","SELECT year FROM table_name_42 WHERE status = ""nominated"" AND film = ""the last samurai"";","SELECT year FROM table_name_42 WHERE status = ""nominated"" AND film = ""the last samurai"";",1 What is the name and manufacturer of the earliest deployed satellite?,"CREATE TABLE satellites (id INT, name VARCHAR(255), manufacturer VARCHAR(255), launch_date DATE); ","SELECT name, manufacturer FROM satellites ORDER BY launch_date ASC LIMIT 1;","SELECT name, manufacturer FROM satellites ORDER BY launch_date DESC LIMIT 1;",0 Which builder has a railway of Rhodesia Railways?,"CREATE TABLE table_name_18 (builder VARCHAR, railway VARCHAR);","SELECT builder FROM table_name_18 WHERE railway = ""rhodesia railways"";","SELECT builder FROM table_name_18 WHERE railway = ""rhodesia railways"";",1 Delete all citizen complaints related to the 'Parks and Recreation' department from the 'complaints' table.,"CREATE TABLE complaints (id INT PRIMARY KEY, department_id INT, title VARCHAR(255));",DELETE FROM complaints WHERE department_id IN (SELECT id FROM departments WHERE name = 'Parks and Recreation');,DELETE FROM complaints WHERE department_id = (SELECT id FROM departments WHERE name = 'Parks and Recreation');,0 What is the total number of defense projects and their average duration for each status?,"CREATE TABLE defense_projects(id INT, project_name VARCHAR(50), start_date DATE, end_date DATE, status VARCHAR(20));","SELECT status, AVG(DATEDIFF(end_date, start_date)) AS avg_duration, COUNT(*) AS total_projects FROM defense_projects GROUP BY status;","SELECT status, COUNT(*) as total_projects, AVG(DATEDIFF(end_date, start_date)) as avg_duration FROM defense_projects GROUP BY status;",0 What did the home team score when playing Fitzroy as the away team?,"CREATE TABLE table_name_8 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team AS score FROM table_name_8 WHERE away_team = ""fitzroy"";","SELECT home_team AS score FROM table_name_8 WHERE away_team = ""fitzroy"";",1 Who had the most rebounds and how many did they have on January 19? ,"CREATE TABLE table_27744844_7 (high_rebounds VARCHAR, date VARCHAR);","SELECT high_rebounds FROM table_27744844_7 WHERE date = ""January 19"";","SELECT high_rebounds FROM table_27744844_7 WHERE date = ""January 19"";",1 Update the contact details of all volunteers from Ukraine?,"CREATE TABLE volunteers (id INT PRIMARY KEY, volunteer_name TEXT, volunteer_contact TEXT, country TEXT); ","UPDATE volunteers SET volunteer_contact = REPLACE(volunteer_contact, '+380', '+38') WHERE country = 'Ukraine';",UPDATE volunteers SET volunteer_contact = 'Contact' WHERE country = 'Ukraine';,0 What are the total quantities of chemicals stored in silos and tanks at the Boston manufacturing site?,"CREATE TABLE silos (site VARCHAR(20), chemical VARCHAR(20), quantity INT); CREATE TABLE tanks (site VARCHAR(20), chemical VARCHAR(20), quantity INT); ",(SELECT SUM(quantity) FROM silos WHERE site = 'Boston') UNION (SELECT SUM(quantity) FROM tanks WHERE site = 'Boston');,SELECT SUM(silos.quantity) FROM silos INNER JOIN tanks ON silos.site = tanks.site WHERE silos.site = 'Boston';,0 "What is the total number of unique digital assets on the Polygon network, and what is the average market capitalization (in USD) of these assets?","CREATE TABLE polygon_assets (asset_id INT, asset_name VARCHAR(255), total_supply INT, current_price FLOAT);","SELECT COUNT(DISTINCT asset_name) as unique_assets, AVG(total_supply * current_price) as avg_market_cap FROM polygon_assets;","SELECT COUNT(DISTINCT asset_name) as unique_assets, AVG(market_capitalization) as avg_market_capitalization FROM polygon_assets GROUP BY unique_assets;",0 Name the incumbent for lost re-election democratic-republican hold,"CREATE TABLE table_2668352_14 (incumbent VARCHAR, result VARCHAR);","SELECT incumbent FROM table_2668352_14 WHERE result = ""Lost re-election Democratic-Republican hold"";","SELECT incumbent FROM table_2668352_14 WHERE result = ""Lost re-election democratic-republican hold"";",0 What is the sum of the heights in meters for the commerzbank tower built after 1984?,"CREATE TABLE table_name_70 (height__m_ INTEGER, year_built VARCHAR, name VARCHAR);","SELECT SUM(height__m_) FROM table_name_70 WHERE year_built > 1984 AND name = ""commerzbank tower"";","SELECT SUM(height__m_) FROM table_name_70 WHERE year_built > 1984 AND name = ""comerzbank tower"";",0 "Which Position has a Round larger than 7, and a Name of wayne asberry?","CREATE TABLE table_name_92 (position VARCHAR, round VARCHAR, name VARCHAR);","SELECT position FROM table_name_92 WHERE round > 7 AND name = ""wayne asberry"";","SELECT position FROM table_name_92 WHERE round > 7 AND name = ""wayne asberry"";",1 What's the maximum ESG score for companies in the 'technology' or 'finance' sectors?,"CREATE TABLE companies_esg (id INT, sector VARCHAR(20), ESG_score FLOAT); ","SELECT MAX(ESG_score) FROM companies_esg WHERE sector IN ('technology', 'finance');","SELECT MAX(ESG_score) FROM companies_esg WHERE sector IN ('technology', 'finance');",1 who is the winner when the home team is sioux falls storm and the year is earlier than 2012?,"CREATE TABLE table_name_48 (winner VARCHAR, home_team VARCHAR, year VARCHAR);","SELECT winner FROM table_name_48 WHERE home_team = ""sioux falls storm"" AND year < 2012;","SELECT winner FROM table_name_48 WHERE home_team = ""sioux falls storm"" AND year 2012;",0 "What is the average severity score for vulnerabilities in the VulnAssess table, broken down by system?","CREATE TABLE VulnAssess (systemName VARCHAR(50), severityScore INT); ","SELECT systemName, AVG(severityScore) FROM VulnAssess GROUP BY systemName;","SELECT systemName, AVG(severityScore) FROM VulnAssess GROUP BY systemName;",1 What is the maximum number of attendees at events held in each city?,"CREATE TABLE events (event_id INT, event_location VARCHAR(50), num_attendees INT); ","SELECT event_location, MAX(num_attendees) FROM events GROUP BY event_location;","SELECT event_location, MAX(num_attendees) FROM events GROUP BY event_location;",1 Which countries had the highest and lowest drug approval rates in H1 2021?,"CREATE TABLE drug_approval_rates(country VARCHAR(255), approval_count INT, total_drugs INT, year INT, semester INT); ","SELECT country, approval_count/total_drugs as approval_rate FROM drug_approval_rates WHERE year = 2021 AND semester = 1 ORDER BY approval_rate DESC, country ASC;","SELECT country, MAX(approval_count) as max_approval_rate, MIN(approval_count) as min_approval_rate FROM drug_approval_rates WHERE year = 2021 AND semester = 1 GROUP BY country;",0 Update the worker_welfare_records table with the latest working conditions audit data for 2022.,"CREATE TABLE worker_welfare_records (brand VARCHAR(50), score DECIMAL(3,2), audit_year INT); ","UPDATE worker_welfare_records SET score = 7.6, audit_year = 2022 WHERE brand = 'BrandD'; UPDATE worker_welfare_records SET score = 8.3, audit_year = 2022 WHERE brand = 'BrandE'; UPDATE worker_welfare_records SET score = 8.1, audit_year = 2022 WHERE brand = 'BrandF';",UPDATE worker_welfare_records SET score = 1 WHERE audit_year = 2022;,0 Find the number of times the soil temperature dropped below 15°C in fieldG in February 2021.,"CREATE TABLE fieldG (soil_temperature FLOAT, reading_date DATE); ",SELECT COUNT(*) FROM (SELECT soil_temperature FROM fieldG WHERE EXTRACT(MONTH FROM reading_date) = 2 AND soil_temperature < 15) subquery;,SELECT COUNT(*) FROM fieldG WHERE soil_temperature 15 AND reading_date BETWEEN '2021-02-01' AND '2021-02-28';,0 What is the total number of trees in the forest_inventory table that have a diameter class that is present in the dangerous_diameter_classes table?,"CREATE TABLE forest_inventory (tree_id INT, diameter_class VARCHAR(50)); CREATE TABLE dangerous_diameter_classes (diameter_class VARCHAR(50));",SELECT COUNT(*) FROM forest_inventory WHERE diameter_class IN (SELECT diameter_class FROM dangerous_diameter_classes);,SELECT COUNT(*) FROM forest_inventory INNER JOIN dangerous_diameter_classes ON forest_inventory.diameter_class = dangerous_diameter_classes.diameter_class;,0 Determine the average daily production quantity for each well in the Western region,"CREATE TABLE daily_production (well_id INT, date DATE, type VARCHAR(10), quantity INT, region VARCHAR(50)); ","SELECT well_id, AVG(quantity) as avg_daily_production FROM daily_production WHERE region = 'Western' GROUP BY well_id;","SELECT well_id, AVG(quantity) as avg_quantity FROM daily_production WHERE region = 'Western' GROUP BY well_id;",0 How many wins did Cobden have when draws were more than 0?,"CREATE TABLE table_name_90 (wins VARCHAR, club VARCHAR, draws VARCHAR);","SELECT COUNT(wins) FROM table_name_90 WHERE club = ""cobden"" AND draws > 0;","SELECT wins FROM table_name_90 WHERE club = ""cobden"" AND draws > 0;",0 What is the average carbon footprint of garments made from recycled polyester?,"CREATE TABLE CarbonFootprint (id INT, garment_id INT, material VARCHAR(255), carbon_footprint INT); ",SELECT AVG(carbon_footprint) FROM CarbonFootprint WHERE material = 'Recycled Polyester';,SELECT AVG(carbon_footprint) FROM CarbonFootprint WHERE material = 'Recycled Polyester';,1 "Which director has the highest average budget for their movies, and how many movies have they directed?","CREATE TABLE movie (id INT, title VARCHAR(100), director VARCHAR(50), production_budget INT); ","SELECT director, AVG(production_budget) AS avg_budget, COUNT(*) AS num_movies FROM movie GROUP BY director ORDER BY avg_budget DESC LIMIT 1;","SELECT director, AVG(production_budget) as avg_budget FROM movie GROUP BY director ORDER BY avg_budget DESC LIMIT 1;",0 What is the total quantity of fruits sold in the Midwest region?,"CREATE TABLE Suppliers (SupplierID INT, SupplierName VARCHAR(50), Location VARCHAR(50)); CREATE TABLE Products (ProductID INT, ProductName VARCHAR(50), SupplierID INT, Category VARCHAR(50)); CREATE TABLE Sales (SaleID INT, ProductID INT, Quantity INT); ",SELECT SUM(Quantity) FROM Sales JOIN Products ON Sales.ProductID = Products.ProductID JOIN Suppliers ON Products.SupplierID = Suppliers.SupplierID WHERE Category = 'Fruits' AND Suppliers.Location = 'Midwest';,SELECT SUM(Sales.Quantity) FROM Sales INNER JOIN Products ON Sales.ProductID = Products.ProductID INNER JOIN Suppliers ON Products.SupplierID = Suppliers.SupplierID WHERE Products.Category = 'Fruits' AND Suppliers.Location = 'Midwest';,0 "How many original bills amendments cosponsored lower than 64,with the bill support withdrawn lower than 0?","CREATE TABLE table_name_50 (original_amendments_cosponsored INTEGER, all_bills_sponsored VARCHAR, bill_support_withdrawn VARCHAR);",SELECT MIN(original_amendments_cosponsored) FROM table_name_50 WHERE all_bills_sponsored < 64 AND bill_support_withdrawn < 0;,SELECT SUM(original_amendments_cosponsored) FROM table_name_50 WHERE all_bills_sponsored 64 AND bill_support_withdrawn 0;,0 Who lost to moyer (9–4)?,"CREATE TABLE table_name_26 (opponent VARCHAR, loss VARCHAR);","SELECT opponent FROM table_name_26 WHERE loss = ""moyer (9–4)"";","SELECT opponent FROM table_name_26 WHERE loss = ""moyer (9–4)"";",1 Power of 220kw (299hp) @ 4000 has what torque?,"CREATE TABLE table_name_38 (torque VARCHAR, power VARCHAR);","SELECT torque FROM table_name_38 WHERE power = ""220kw (299hp) @ 4000"";","SELECT torque FROM table_name_38 WHERE power = ""220kw (299hp) @ 4000"";",1 What are the products made by women-owned suppliers?,"CREATE TABLE suppliers (id INT PRIMARY KEY, name TEXT, gender TEXT, sustainable_practices BOOLEAN); CREATE TABLE products (id INT PRIMARY KEY, name TEXT, supplier_id INT, FOREIGN KEY (supplier_id) REFERENCES suppliers(id));","SELECT products.name, suppliers.name AS supplier_name FROM products INNER JOIN suppliers ON products.supplier_id = suppliers.id WHERE suppliers.gender = 'female';",SELECT p.name FROM products p JOIN suppliers s ON p.supplier_id = s.id WHERE s.gender = 'Female' AND p.sustainable_practices = TRUE;,0 What is the date of the poll with Silbert at 18%?,"CREATE TABLE table_name_53 (date VARCHAR, silbert VARCHAR);","SELECT date FROM table_name_53 WHERE silbert = ""18%"";","SELECT date FROM table_name_53 WHERE silbert = ""18%"";",1 What is the number of rural infrastructure projects in Cambodia and their average cost?,"CREATE TABLE projects (id INT, name TEXT, country TEXT, cost FLOAT); ","SELECT COUNT(*), AVG(cost) FROM projects WHERE country = 'Cambodia';","SELECT COUNT(*), AVG(cost) FROM projects WHERE country = 'Cambodia';",1 What is the total revenue generated from concert ticket sales by artist?,"CREATE TABLE concert_sales (artist_name VARCHAR(30), genre VARCHAR(20), revenue DECIMAL(10, 2)); ","SELECT artist_name, SUM(revenue) as total_revenue FROM concert_sales GROUP BY artist_name;","SELECT artist_name, SUM(revenue) FROM concert_sales GROUP BY artist_name;",0 What percentage of workers in the 'service' sector are represented by unions with collective bargaining agreements?,"CREATE TABLE unions (id INT, has_cba BOOLEAN); CREATE TABLE workers (id INT, union_id INT, sector VARCHAR(20)); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM workers)) as percentage FROM workers JOIN unions ON workers.union_id = unions.id WHERE sector = 'service' AND has_cba = true;,SELECT (COUNT(*) FILTER (WHERE sector ='service')) * 100.0 / COUNT(*) FROM workers WHERE sector ='service';,0 What is the maximum and minimum investment amount in the housing sector?,CREATE TABLE housing_investments (investment_amount INT); ,"SELECT MIN(investment_amount) as min_investment, MAX(investment_amount) as max_investment FROM housing_investments;","SELECT MAX(investment_amount), MIN(investment_amount) FROM housing_investments;",0 What is the release date of the mm series which has the title confederate honey?,"CREATE TABLE table_name_92 (release_date VARCHAR, series VARCHAR, title VARCHAR);","SELECT release_date FROM table_name_92 WHERE series = ""mm"" AND title = ""confederate honey"";","SELECT release_date FROM table_name_92 WHERE series = ""mm"" AND title = ""confederate honey"";",1 How many years did he finish in 59th?,"CREATE TABLE table_1637041_2 (avg_start VARCHAR, position VARCHAR);","SELECT COUNT(avg_start) FROM table_1637041_2 WHERE position = ""59th"";","SELECT COUNT(avg_start) FROM table_1637041_2 WHERE position = ""59th"";",1 Insert a new rover 'Tianwen-1' launched by China in 2020 into the 'mars_rovers' table,"CREATE TABLE mars_rovers (id INT PRIMARY KEY, name VARCHAR(50), launch_year INT, type VARCHAR(50)); ","INSERT INTO mars_rovers (id, name, launch_year, type) VALUES (6, 'Tianwen-1', 2020, 'rover');","INSERT INTO mars_rovers (id, name, launch_year, type) VALUES (1, 'Tianwen-1', 2020, 'China');",0 What is the ratio of completed to total projects for community development initiatives in Africa in the last 5 years?,"CREATE TABLE CommunityProjects (ProjectID INT, ProjectName VARCHAR(50), Location VARCHAR(50), StartDate DATE, CompletionDate DATE); ","SELECT AVG(CASE WHEN StartDate >= DATEADD(YEAR, -5, CURRENT_DATE) THEN 1.0 * COUNT(CASE WHEN CompletionDate IS NOT NULL THEN 1 END) / COUNT(*) ELSE NULL END) FROM CommunityProjects WHERE Location IN ('Nigeria', 'Kenya');","SELECT COUNT(*) * 100.0 / (SELECT COUNT(*) FROM CommunityProjects WHERE Location = 'Africa' AND StartDate >= DATEADD(year, -5, GETDATE())) FROM CommunityProjects WHERE Location = 'Africa' AND StartDate >= DATEADD(year, -5, GETDATE());",0 Identify the number of unique esports events and their types in the last 6 months.,"CREATE TABLE EsportsEvents (EventID INT, EventName TEXT, EventType TEXT, EventDate DATE); ","SELECT COUNT(DISTINCT EventID), EventType FROM EsportsEvents WHERE EventDate >= DATEADD(month, -6, GETDATE()) GROUP BY EventType;","SELECT COUNT(DISTINCT EventID) AS UniqueEvents, EventType FROM EsportsEvents WHERE EventDate >= DATEADD(month, -6, GETDATE());",0 "What is the number of products and their average price in each category, ranked by average price?","CREATE TABLE products (product_id int, product_category varchar(50), price decimal(5,2));","SELECT product_category, COUNT(*) as num_products, AVG(price) as avg_price, RANK() OVER (ORDER BY AVG(price) DESC) as rank FROM products GROUP BY product_category;","SELECT product_category, COUNT(*) as num_products, AVG(price) as avg_price, RANK() OVER (ORDER BY AVG(price) DESC) as rank FROM products GROUP BY product_category;",1 Which category won the Sundance Film Festival award in 1998?,"CREATE TABLE table_name_95 (category VARCHAR, award VARCHAR, result VARCHAR, year VARCHAR);","SELECT category FROM table_name_95 WHERE result = ""won"" AND year = 1998 AND award = ""sundance film festival"";","SELECT category FROM table_name_95 WHERE result = ""won"" AND year = 1998 AND award = ""sundance film festival"";",1 How many tv series had an adult rating of 1.2?,"CREATE TABLE table_19188562_2 (tv_season VARCHAR, rating__adults_18_49_ VARCHAR);","SELECT COUNT(tv_season) FROM table_19188562_2 WHERE rating__adults_18_49_ = ""1.2"";","SELECT COUNT(tv_season) FROM table_19188562_2 WHERE rating__adults_18_49_ = ""1.2"";",1 "what is the score when the outcome is runner-up, the opponent in the final is herbert lawford and the year is after 1882?","CREATE TABLE table_name_39 (score VARCHAR, opponent_in_the_final VARCHAR, year VARCHAR, outcome VARCHAR);","SELECT score FROM table_name_39 WHERE year > 1882 AND outcome = ""runner-up"" AND opponent_in_the_final = ""herbert lawford"";","SELECT score FROM table_name_39 WHERE year > 1882 AND outcome = ""runner-up"" AND opponent_in_the_final = ""herbert lawford"";",1 What are the details of military operations that involved ground forces and took place in the Middle East?,"CREATE TABLE MilitaryOperations (OperationID INT, OperationType VARCHAR(20), OperationLocation VARCHAR(30), OperationYear INT); ",SELECT * FROM MilitaryOperations WHERE OperationType = 'Ground Forces' AND OperationLocation LIKE 'Middle East%';,"SELECT OperationType, OperationLocation, OperationYear FROM MilitaryOperations WHERE OperationType = 'Ground Force' AND OperationLocation = 'Middle East';",0 What's the total investment in the Education sector?,"CREATE TABLE investments (id INT, sector VARCHAR(20), amount FLOAT); ",SELECT SUM(amount) FROM investments WHERE sector = 'Education';,SELECT SUM(amount) FROM investments WHERE sector = 'Education';,1 "What Position was achieved in the World Championships Competition in Tokyo, Japan?","CREATE TABLE table_name_24 (position VARCHAR, competition VARCHAR, venue VARCHAR);","SELECT position FROM table_name_24 WHERE competition = ""world championships"" AND venue = ""tokyo, japan"";","SELECT position FROM table_name_24 WHERE competition = ""world championships"" AND venue = ""tokyo, japan"";",1 "Insert a new record into the 'Customers' table with customer ID 'C1003', name 'Melissa', city 'Detroit', state 'MI', and zip code '48221'","CREATE TABLE Customers (CustomerID VARCHAR(5), Name VARCHAR(20), City VARCHAR(20), State VARCHAR(10), ZipCode VARCHAR(10));","INSERT INTO Customers (CustomerID, Name, City, State, ZipCode) VALUES ('C1003', 'Melissa', 'Detroit', 'MI', '48221');","INSERT INTO Customers (CustomerID, Name, City, State, ZipCode) VALUES ('C1003', 'Melissa', 'Detroit', 'MI', '48221');",1 "What is the number of educational programs provided by each organization, for refugees in South Asia, in the last 2 years, and the total number of beneficiaries?","CREATE TABLE educational_programs (program_id INT, organization_id INT, location VARCHAR(255), start_date DATE, end_date DATE, beneficiaries INT); ","SELECT organization_id, COUNT(*) as number_of_programs, SUM(beneficiaries) as total_beneficiaries FROM educational_programs WHERE location IN ('Country A', 'Country B') AND start_date >= DATE_SUB(CURRENT_DATE, INTERVAL 2 YEAR) GROUP BY organization_id;","SELECT organization_id, COUNT(*) as num_programs, SUM(beneficiaries) as total_beneficiaries FROM educational_programs WHERE location = 'South Asia' AND start_date >= DATEADD(year, -2, GETDATE()) GROUP BY organization_id;",0 What is the number of animals in the rehabilitation center per species?,"CREATE TABLE animal_species (species_id INT, species_name VARCHAR(255)); CREATE TABLE rehabilitation_center (animal_id INT, species_id INT, admission_date DATE); ","SELECT s.species_name, COUNT(r.animal_id) FROM rehabilitation_center r JOIN animal_species s ON r.species_id = s.species_id GROUP BY s.species_name;","SELECT a.species_name, COUNT(rc.animal_id) FROM animal_species a JOIN rehabilitation_center rc ON a.species_id = rc.species_id GROUP BY a.species_name;",0 What is the processor speed (mhz) for part number a80486dx4-75?,"CREATE TABLE table_15261_1 (processor_speed__mhz_ VARCHAR, part_number VARCHAR);","SELECT COUNT(processor_speed__mhz_) FROM table_15261_1 WHERE part_number = ""A80486DX4-75"";","SELECT processor_speed__mhz_ FROM table_15261_1 WHERE part_number = ""A80486DX4-75"";",0 What is the date of the game at the Pro Player Stadium that had a score of 4-1?,"CREATE TABLE table_name_43 (date VARCHAR, venue VARCHAR, score VARCHAR);","SELECT date FROM table_name_43 WHERE venue = ""pro player stadium"" AND score = ""4-1"";","SELECT date FROM table_name_43 WHERE venue = ""pro player stadium"" AND score = ""4-1"";",1 What is the total biomass of all mammal species in the Arctic tundra?,"CREATE TABLE Biomass (species VARCHAR(50), habitat VARCHAR(50), biomass FLOAT); ",SELECT SUM(biomass) FROM Biomass WHERE habitat = 'Tundra';,SELECT SUM(biomass) FROM Biomass WHERE habitat = 'Arctic Tundra';,0 What is the average co-ownership in areas with green building certifications?,"CREATE TABLE properties (id INT, location VARCHAR(20), coowners INT, green_building_certified BOOLEAN); ",SELECT AVG(coowners) FROM properties WHERE green_building_certified = true;,SELECT AVG(coowners) FROM properties WHERE green_building_certified = true;,1 What was the Record of the game with a Score of 118–105?,"CREATE TABLE table_name_10 (record VARCHAR, score VARCHAR);","SELECT record FROM table_name_10 WHERE score = ""118–105"";","SELECT record FROM table_name_10 WHERE score = ""118–105"";",1 "What is the average safety score for each AI algorithm, grouped by algorithm type?","CREATE TABLE ai_algorithms (algorithm_id INT, algorithm_name VARCHAR(50), algorithm_type VARCHAR(50), safety_score FLOAT); ","SELECT algorithm_type, AVG(safety_score) AS avg_safety_score FROM ai_algorithms GROUP BY algorithm_type;","SELECT algorithm_type, AVG(safety_score) as avg_safety_score FROM ai_algorithms GROUP BY algorithm_type;",0 "What is Source Version, when License is LGPL or MPL?","CREATE TABLE table_name_42 (source_version VARCHAR, license VARCHAR);","SELECT source_version FROM table_name_42 WHERE license = ""lgpl or mpl"";","SELECT source_version FROM table_name_42 WHERE license = ""lgpl or mpl"";",1 What is the total number of crimes committed in each district in the last month?,"CREATE TABLE districts (district_id INT, district_name TEXT);CREATE TABLE crimes (crime_id INT, district_id INT, crime_date DATE);","SELECT d.district_name, COUNT(c.crime_id) FROM districts d INNER JOIN crimes c ON d.district_id = c.district_id WHERE c.crime_date >= DATEADD(month, -1, GETDATE()) GROUP BY d.district_name;","SELECT d.district_name, COUNT(c.crime_id) as total_crimes FROM districts d JOIN crimes c ON d.district_id = c.district_id WHERE c.crime_date >= DATEADD(month, -1, GETDATE()) GROUP BY d.district_name;",0 What are the types and countries of competitions?,"CREATE TABLE competition (Competition_type VARCHAR, Country VARCHAR);","SELECT Competition_type, Country FROM competition;","SELECT Competition_type, Country FROM competition;",1 What is the BBM when the strike rate is 42.2?,"CREATE TABLE table_19662262_6 (bbm VARCHAR, strike_rate VARCHAR);","SELECT bbm FROM table_19662262_6 WHERE strike_rate = ""42.2"";","SELECT bbm FROM table_19662262_6 WHERE strike_rate = ""42.2"";",1 who is the away team when the home team is sydney spirit?,"CREATE TABLE table_name_28 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team FROM table_name_28 WHERE home_team = ""sydney spirit"";","SELECT away_team FROM table_name_28 WHERE home_team = ""sydney spirit"";",1 How many years was there a peter jackson classic?,"CREATE TABLE table_name_64 (year VARCHAR, championship VARCHAR);","SELECT COUNT(year) FROM table_name_64 WHERE championship = ""peter jackson classic"";","SELECT COUNT(year) FROM table_name_64 WHERE championship = ""peter jackson classic"";",1 what opponent has an average less than 62 and a January average less than 6,"CREATE TABLE table_name_34 (opponent VARCHAR, points VARCHAR, january VARCHAR);",SELECT opponent FROM table_name_34 WHERE points < 62 AND january < 6;,SELECT opponent FROM table_name_34 WHERE points 62 AND january 6;,0 Find the average health equity metric score by state.,"CREATE TABLE health_equity_metrics (state VARCHAR(2), score INT); ","SELECT state, AVG(score) FROM health_equity_metrics GROUP BY state;","SELECT state, AVG(score) FROM health_equity_metrics GROUP BY state;",1 Name the opponent for 7-1-0,"CREATE TABLE table_21007907_1 (opponent VARCHAR, record VARCHAR);","SELECT opponent FROM table_21007907_1 WHERE record = ""7-1-0"";","SELECT opponent FROM table_21007907_1 WHERE record = ""7-1-0"";",1 What was the record after the game against Washington?,"CREATE TABLE table_28768469_9 (record VARCHAR, team VARCHAR);","SELECT record FROM table_28768469_9 WHERE team = ""Washington"";","SELECT record FROM table_28768469_9 WHERE team = ""Washington"";",1 What was the name of the tournament that the final was played against Yi Jingqian?,"CREATE TABLE table_name_89 (tournament VARCHAR, opponent_in_the_final VARCHAR);","SELECT tournament FROM table_name_89 WHERE opponent_in_the_final = ""yi jingqian"";","SELECT tournament FROM table_name_89 WHERE opponent_in_the_final = ""yi jingqian"";",1 What is the change in the number of active users for the game 'Game2' between the two most recent days?,"CREATE TABLE game_activity (game VARCHAR(50), activity_date DATE, active_users INT); ","SELECT LAG(active_users, 1) OVER (PARTITION BY game ORDER BY activity_date DESC) - active_users as user_change FROM game_activity WHERE game = 'Game2' ORDER BY activity_date DESC LIMIT 1;","SELECT activity_date, active_users, ROW_NUMBER() OVER (ORDER BY active_users DESC) as rn FROM game_activity WHERE game = 'Game2';",0 "What is the total budget allocated for disability employment programs for each state in the year 2021, ordered by the state with the highest budget?","CREATE TABLE Disability_Employment_Programs (State VARCHAR(50), Budget NUMERIC(10,2), Year INTEGER); ","SELECT State, SUM(Budget) as Total_Budget FROM Disability_Employment_Programs WHERE Year = 2021 GROUP BY State ORDER BY Total_Budget DESC;","SELECT State, SUM(Budget) as Total_Budget FROM Disability_Employment_Programs WHERE Year = 2021 GROUP BY State ORDER BY Total_Budget DESC;",1 "What is the number of rural hospitals and clinics in each territory, and the number of hospitals with a helipad in each?","CREATE TABLE hospitals (id INT, name TEXT, location TEXT, num_beds INT, territory TEXT, has_helipad BOOLEAN); CREATE TABLE clinics (id INT, name TEXT, location TEXT, num_beds INT, territory TEXT); ","SELECT t.territory, COUNT(h.id) AS num_hospitals, COUNT(c.id) AS num_clinics, COUNT(h2.id) AS num_hospitals_with_helipad FROM hospitals h INNER JOIN clinics c ON h.territory = c.territory INNER JOIN hospitals h2 ON h.territory = h2.territory AND h2.has_helipad = true GROUP BY t.territory;","SELECT h.territory, COUNT(h.id) as hospital_count, COUNT(c.id) as clinic_count, COUNT(c.id) as clinic_count FROM hospitals h JOIN clinics c ON h.id = c.id WHERE h.territory = 'Rural' AND h.has_helipad = TRUE GROUP BY h.territory;",0 What is the total number of unique users who have streamed songs from a specific genre?,"CREATE TABLE StreamingData (StreamID INT, UserID INT, SongID INT, StreamDate DATE); CREATE TABLE Songs (SongID INT, SongName VARCHAR(100), Genre VARCHAR(50)); CREATE TABLE Users (UserID INT, UserName VARCHAR(50)); ",SELECT COUNT(DISTINCT Users.UserID) FROM StreamingData JOIN Songs ON StreamingData.SongID = Songs.SongID JOIN Users ON StreamingData.UserID = Users.UserID WHERE Songs.Genre = 'Pop';,SELECT COUNT(DISTINCT Users.UserID) FROM Users INNER JOIN StreamingData ON Users.UserID = StreamingData.UserID INNER JOIN Songs ON StreamingData.SongID = Songs.SongID INNER JOIN Users ON Users.UserID = Users.UserID WHERE Songs.Genre = 'Pop';,0 Tell me the highest home runs for cleveland indians years before 1931,"CREATE TABLE table_name_92 (home_runs INTEGER, team VARCHAR, year VARCHAR);","SELECT MAX(home_runs) FROM table_name_92 WHERE team = ""cleveland indians"" AND year < 1931;","SELECT MAX(home_runs) FROM table_name_92 WHERE team = ""cleveland indians"" AND year 1931;",0 How many years were the events won by KCLMS less than 7?,"CREATE TABLE table_name_8 (year VARCHAR, events_won_by_kclMS INTEGER);",SELECT COUNT(year) FROM table_name_8 WHERE events_won_by_kclMS < 7;,SELECT COUNT(year) FROM table_name_8 WHERE events_won_by_kclMS 7;,0 "How many creative AI applications were developed in the Asia region between 2018 and 2020, excluding applications developed in China?","CREATE TABLE Creative_AI_Apps_History (app_id INT, app_name VARCHAR(50), region VARCHAR(50), app_development_date DATE); ",SELECT COUNT(*) FROM Creative_AI_Apps_History WHERE region = 'Asia' AND app_development_date BETWEEN '2018-01-01' AND '2020-12-31' AND region != 'China';,SELECT COUNT(*) FROM Creative_AI_Apps_History WHERE region = 'Asia' AND app_development_date BETWEEN '2018-01-01' AND '2020-12-31' AND region!= 'China';,0 Which IP addresses have been detected as threats in the last week and have also had security incidents in the last month?,"CREATE TABLE threats (ip_address VARCHAR(255), timestamp TIMESTAMP); CREATE TABLE security_incidents (id INT, ip_address VARCHAR(255), timestamp TIMESTAMP);",SELECT t.ip_address FROM threats t JOIN security_incidents i ON t.ip_address = i.ip_address WHERE t.timestamp >= NOW() - INTERVAL 1 WEEK AND i.timestamp >= NOW() - INTERVAL 1 MONTH;,"SELECT ip_address FROM threats JOIN security_incidents ON threats.ip_address = security_incidents.ip_address WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 WEEK) AND timestamp DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH);",0 Which species is male?,"CREATE TABLE table_name_70 (species VARCHAR, gender VARCHAR);","SELECT species FROM table_name_70 WHERE gender = ""male"";","SELECT species FROM table_name_70 WHERE gender = ""male"";",1 What is the total revenue and number of games released for each year in the 'Sports' genre?,"CREATE TABLE game_releases (release_id INT, game_id INT, genre VARCHAR(50), year INT, revenue DECIMAL(10, 2)); ","SELECT genre, year, SUM(revenue) as total_revenue, COUNT(DISTINCT game_id) as num_games FROM game_releases WHERE genre = 'Sports' GROUP BY genre, year;","SELECT year, SUM(revenue) as total_revenue, COUNT(*) as games_released FROM game_releases WHERE genre = 'Sports' GROUP BY year;",0 What team was runner-up at Bergisch Gladbach in 1983?,"CREATE TABLE table_name_2 (runners_up VARCHAR, venue VARCHAR, year VARCHAR);","SELECT runners_up FROM table_name_2 WHERE venue = ""bergisch gladbach"" AND year = ""1983"";","SELECT runners_up FROM table_name_2 WHERE venue = ""bergisch gladbach"" AND year = 1983;",0 What is the total number of Freedom of Information Act (FOIA) requests received in 2021?,"CREATE TABLE foia_requests (request_id INT, requester_name VARCHAR(100), request_date DATE, request_type VARCHAR(50), status VARCHAR(50));",SELECT COUNT(*) FROM foia_requests WHERE request_date BETWEEN '2021-01-01' AND '2021-12-31';,SELECT COUNT(*) FROM foia_requests WHERE request_date BETWEEN '2021-01-01' AND '2021-12-31' AND status = 'Foia';,0 What is the total capacity of factories in Spain and France?,"CREATE TABLE factories (factory_id INT, location VARCHAR(50), capacity INT); ",SELECT SUM(capacity) FROM factories WHERE location LIKE '%Spain%' OR location LIKE '%France%';,"SELECT SUM(capacity) FROM factories WHERE location IN ('Spain', 'France');",0 Who were the candidates in the district where Charlie Norwood is the incumbent?,"CREATE TABLE table_1341472_12 (candidates VARCHAR, incumbent VARCHAR);","SELECT candidates FROM table_1341472_12 WHERE incumbent = ""Charlie Norwood"";","SELECT candidates FROM table_1341472_12 WHERE incumbent = ""Charlie Norwood"";",1 How many calories is 1 watt hour?,"CREATE TABLE table_name_64 (calorie VARCHAR, watt_hour VARCHAR);","SELECT calorie FROM table_name_64 WHERE watt_hour = ""1"";","SELECT calories FROM table_name_64 WHERE watt_hour = ""1"";",0 Insert a new movie 'Movie C' with genre 'Action' and budget 7000000 into the database.,"CREATE TABLE movies (id INT, title VARCHAR(255), genre VARCHAR(255), budget DECIMAL(10, 2));","INSERT INTO movies (title, genre, budget) VALUES ('Movie C', 'Action', 7000000.00);","INSERT INTO movies (title, genre, budget) VALUES ('Movie C', 'Action', 7000000);",0 Add a new traditional art piece with type 'Weaving' and price 450 to the TraditionalArts table.,"CREATE TABLE TraditionalArts (id INT PRIMARY KEY, type VARCHAR(255), price DECIMAL(10,2)); ","INSERT INTO TraditionalArts (id, type, price) VALUES (4, 'Weaving', 450);","INSERT INTO TraditionalArts (id, type, price) VALUES (1, 'Weaving', 450);",0 Who were the candidates when Henry Garland Dupré was incumbent?,"CREATE TABLE table_1342451_16 (candidates VARCHAR, incumbent VARCHAR);","SELECT candidates FROM table_1342451_16 WHERE incumbent = ""Henry Garland Dupré"";","SELECT candidates FROM table_1342451_16 WHERE incumbent = ""Henry Garland Dupré"";",1 What is the total round of the rb player from Purdue with a pick less than 3?,"CREATE TABLE table_name_76 (round VARCHAR, pick VARCHAR, position VARCHAR, college VARCHAR);","SELECT COUNT(round) FROM table_name_76 WHERE position = ""rb"" AND college = ""purdue"" AND pick < 3;","SELECT COUNT(round) FROM table_name_76 WHERE position = ""rb"" AND college = ""purdue"" AND pick 3;",0 Tell me the constructor for grid of 8,"CREATE TABLE table_name_57 (constructor VARCHAR, grid VARCHAR);",SELECT constructor FROM table_name_57 WHERE grid = 8;,SELECT constructor FROM table_name_57 WHERE grid = 8;,1 What is the name of the ot position player with a round greater than 4?,"CREATE TABLE table_name_69 (name VARCHAR, round VARCHAR, position VARCHAR);","SELECT name FROM table_name_69 WHERE round > 4 AND position = ""ot"";","SELECT name FROM table_name_69 WHERE round > 4 AND position = ""ot"";",1 "Show the names and number of beds of hospitals in ""Texas"" with more than 300 beds","CREATE TABLE hospitals_tx(id INT, name TEXT, beds INT); ","SELECT name, beds FROM hospitals_tx WHERE beds > 300 AND state = 'Texas';","SELECT name, beds FROM hospitals_tx WHERE beds > 300;",0 Update the revenue of the virtual tourism event in Canada to 50000.,"CREATE TABLE events (id INT, name TEXT, country TEXT, revenue INT); ",UPDATE events SET revenue = 50000 WHERE name = 'Virtual Tourism Toronto' AND country = 'Canada';,UPDATE events SET revenue = 50000 WHERE name = 'Virtual Tourism' AND country = 'Canada';,0 what is the year when the score is 59-32?,"CREATE TABLE table_name_37 (year INTEGER, score VARCHAR);","SELECT SUM(year) FROM table_name_37 WHERE score = ""59-32"";","SELECT SUM(year) FROM table_name_37 WHERE score = ""59-32"";",1 What is the average time taken for each type of construction permit to be approved in each region?,"CREATE TABLE permit_approval_times (approval_time_id INT, permit_id INT, region_name VARCHAR(50), approval_duration INT); ","SELECT par.region_name, par.permit_id, AVG(par.approval_duration) as avg_approval_duration FROM permit_approval_times par GROUP BY par.region_name, par.permit_id;","SELECT region_name, AVG(approval_duration) as avg_approval_duration FROM permit_approval_times GROUP BY region_name;",0 What season had more than 12 contestants in which greydis gil won?,"CREATE TABLE table_name_98 (season VARCHAR, number_of_contestants VARCHAR, winner VARCHAR);","SELECT season FROM table_name_98 WHERE number_of_contestants > 12 AND winner = ""greydis gil"";","SELECT season FROM table_name_98 WHERE number_of_contestants > 12 AND winner = ""greydis gil"";",1 "What is the maximum number of points scored in a single game by any player in the last year, and who scored it?","CREATE TABLE games (id INT, game_date DATE, team VARCHAR(20)); CREATE TABLE points (id INT, game_id INT, player VARCHAR(20), points INT);","SELECT player, MAX(points) FROM points JOIN games ON points.game_id = games.id WHERE games.game_date >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR) GROUP BY player;","SELECT player, MAX(points) as max_points FROM points JOIN games ON points.game_id = games.id WHERE games.game_date >= DATEADD(year, -1, GETDATE()) GROUP BY player;",0 "What is the total number of emergencies reported before January 15, 2021 in 'emergency_response' table?","CREATE TABLE emergency_response (id INT, type VARCHAR(255), location VARCHAR(255), reported_date DATE); ",SELECT COUNT(*) FROM emergency_response WHERE reported_date < '2021-01-15';,SELECT COUNT(*) FROM emergency_response WHERE reported_date '2021-01-15';,0 In which title was Ann Rutherford the leading lady for Joseph Kane?,"CREATE TABLE table_name_73 (title VARCHAR, leading_lady VARCHAR, director VARCHAR);","SELECT title FROM table_name_73 WHERE leading_lady = ""ann rutherford"" AND director = ""joseph kane"";","SELECT title FROM table_name_73 WHERE leading_lady = ""ann rutherford"" AND director = ""joseph kane"";",1 What is 1995 Grand Slam Tournament if 1990 is LQ?,CREATE TABLE table_name_96 (Id VARCHAR);,"SELECT 1995 FROM table_name_96 WHERE 1990 = ""lq"";","SELECT 1995 FROM table_name_96 WHERE 1990 = ""lq"";",1 "What is the highest Version, when Release Date is ""2011-04-01""?","CREATE TABLE table_name_38 (version INTEGER, release_date VARCHAR);","SELECT MAX(version) FROM table_name_38 WHERE release_date = ""2011-04-01"";","SELECT MAX(version) FROM table_name_38 WHERE release_date = ""2011-04-01"";",1 How many countries are involved in marine life research in all regions?,"CREATE TABLE marine_life_research (id INT, country TEXT, region TEXT);",SELECT COUNT(DISTINCT country) FROM marine_life_research;,SELECT COUNT(*) FROM marine_life_research;,0 "What is the total number of acres at Sai Tso Wan, opening before 1978?","CREATE TABLE table_name_29 (acres VARCHAR, landfill VARCHAR, opened VARCHAR);","SELECT COUNT(acres) FROM table_name_29 WHERE landfill = ""sai tso wan"" AND opened < 1978;","SELECT COUNT(acres) FROM table_name_29 WHERE landfill = ""sai tso wan"" AND opened 1978;",0 List all astronauts who have flown on the Space Shuttle Discovery.,"CREATE TABLE astronauts(id INT, name VARCHAR(255), gender VARCHAR(10)); CREATE TABLE missions(id INT, name VARCHAR(255)); CREATE TABLE shuttle_flights(astronaut_id INT, mission_id INT); ",SELECT a.name FROM astronauts a INNER JOIN shuttle_flights sf ON a.id = sf.astronaut_id INNER JOIN missions m ON sf.mission_id = m.id WHERE m.name = 'STS-42';,SELECT astronauts.name FROM astronauts INNER JOIN shuttle_flights ON astronauts.id = shuttle_flights.astronaut_id INNER JOIN missions ON shuttle_flights.mission_id = missions.id;,0 "What is the average price per pound of organic produce sold in farmers markets, grouped by state?","CREATE TABLE FarmersMarketData (MarketID int, State varchar(50), Product varchar(50), PricePerPound decimal(5,2));","SELECT State, AVG(PricePerPound) FROM FarmersMarketData WHERE Product LIKE '%organic produce%' GROUP BY State;","SELECT State, AVG(PricePerPound) as AvgPricePerPound FROM FarmersMarketData WHERE Product = 'Organic' GROUP BY State;",0 Which Attendance has a Tie # of 32?,"CREATE TABLE table_name_13 (attendance VARCHAR, tie_no VARCHAR);","SELECT attendance FROM table_name_13 WHERE tie_no = ""32"";","SELECT attendance FROM table_name_13 WHERE tie_no = ""32"";",1 What is the Name of Index F3?,"CREATE TABLE table_name_1 (name VARCHAR, index VARCHAR);","SELECT name FROM table_name_1 WHERE index = ""f3"";","SELECT name FROM table_name_1 WHERE index = ""f3"";",1 What are the colors for the enrollment of 2020?,"CREATE TABLE table_27653955_1 (colors VARCHAR, enrollment VARCHAR);",SELECT colors FROM table_27653955_1 WHERE enrollment = 2020;,SELECT colors FROM table_27653955_1 WHERE enrollment = 2020;,1 Which location had a race that took place on 22 July 2011 and has a rank greater than 8?,"CREATE TABLE table_name_45 (location VARCHAR, rank VARCHAR, date VARCHAR);","SELECT location FROM table_name_45 WHERE rank > 8 AND date = ""22 july 2011"";","SELECT location FROM table_name_45 WHERE rank > 8 AND date = ""22 july 2011"";",1 What is the final result of the team that has Simara as No.5?,"CREATE TABLE table_name_11 (final VARCHAR, no5 VARCHAR);","SELECT final FROM table_name_11 WHERE no5 = ""simara"";","SELECT final FROM table_name_11 WHERE no5 = ""simara"";",1 "If there are more than 0 Silver medals, less than 5 gold medals, and no bronze medals, what was the total number of medals?","CREATE TABLE table_name_43 (total VARCHAR, bronze VARCHAR, silver VARCHAR, gold VARCHAR);",SELECT COUNT(total) FROM table_name_43 WHERE silver > 0 AND gold < 5 AND bronze < 0;,"SELECT COUNT(total) FROM table_name_43 WHERE silver > 0 AND gold 5 AND bronze = ""no"";",0 "What is the home team score when the crowd was larger than 30,100?","CREATE TABLE table_name_11 (home_team VARCHAR, crowd INTEGER);",SELECT home_team AS score FROM table_name_11 WHERE crowd > 30 OFFSET 100;,SELECT home_team AS score FROM table_name_11 WHERE crowd > 30 OFFSET 100;,1 Which organizations in the Northeast region have the highest total donation amounts?,"CREATE TABLE donations (id INT, org_id INT, donation DECIMAL(10,2)); CREATE TABLE organizations (id INT, name TEXT, region TEXT); ","SELECT o.name, SUM(d.donation) AS total_donations FROM donations d JOIN organizations o ON d.org_id = o.id WHERE o.region = 'Northeast' GROUP BY o.name ORDER BY total_donations DESC;","SELECT o.name, SUM(d.donation) as total_donations FROM donations d JOIN organizations o ON d.org_id = o.id WHERE o.region = 'Northeast' GROUP BY o.name ORDER BY total_donations DESC LIMIT 1;",0 What is the title when 2.50 is u.s. viewers (in millions)? ,"CREATE TABLE table_23499946_1 (title VARCHAR, us_viewers__in_millions_ VARCHAR);","SELECT title FROM table_23499946_1 WHERE us_viewers__in_millions_ = ""2.50"";","SELECT title FROM table_23499946_1 WHERE us_viewers__in_millions_ = ""2.50"";",1 What are the earliest artifacts in each excavation site?,"CREATE TABLE excavation_sites (site_id INT, site_name VARCHAR(255)); CREATE TABLE artifacts (artifact_id INT, site_id INT, artifact_type VARCHAR(255), date_found DATE); ","SELECT site_name, MIN(date_found) as earliest_date FROM excavation_sites s JOIN artifacts a ON s.site_id = a.site_id GROUP BY site_name;","SELECT excavation_sites.site_name, MIN(artifacts.date_found) as earliest_artifact FROM excavation_sites INNER JOIN artifacts ON excavation_sites.site_id = artifacts.site_id GROUP BY excavation_sites.site_name;",0 How many provinces are named Wellington?,"CREATE TABLE table_275023_1 (formed_date VARCHAR, province VARCHAR);","SELECT COUNT(formed_date) FROM table_275023_1 WHERE province = ""Wellington"";","SELECT COUNT(formed_date) FROM table_275023_1 WHERE province = ""Wellington"";",1 What is the highest S number with a capital of Shekhsar?,"CREATE TABLE table_name_5 (sno INTEGER, capital VARCHAR);","SELECT MAX(sno) FROM table_name_5 WHERE capital = ""shekhsar"";","SELECT MAX(sno) FROM table_name_5 WHERE capital = ""shekhsar"";",1 Which Score has an Opponent in the final of mehdi tahiri?,"CREATE TABLE table_name_96 (score VARCHAR, opponent_in_the_final VARCHAR);","SELECT score FROM table_name_96 WHERE opponent_in_the_final = ""mehdi tahiri"";","SELECT score FROM table_name_96 WHERE opponent_in_the_final = ""mehdi tahiri"";",1 Who was first elected as the result of a retired republican gain in the district of ohio 21?,"CREATE TABLE table_name_45 (first_elected VARCHAR, result VARCHAR, district VARCHAR);","SELECT first_elected FROM table_name_45 WHERE result = ""retired republican gain"" AND district = ""ohio 21"";","SELECT first_elected FROM table_name_45 WHERE result = ""retired republican gain"" AND district = ""ohio 21"";",1 List all records of donors who have donated more than $5000 in the 'emerging_market' region.,"CREATE TABLE donors (id INT, name TEXT, region TEXT, donation_amount FLOAT); ",SELECT * FROM donors WHERE region = 'Emerging_Market' AND donation_amount > 5000;,SELECT * FROM donors WHERE region = 'emerging_market' AND donation_amount > 500;,0 What is listed under Senior List for Date of Birth (Age When Delisted) of 5 June 1984 (aged 23)?,"CREATE TABLE table_name_84 (senior_list VARCHAR, date_of_birth__age_when_delisted_ VARCHAR);","SELECT senior_list FROM table_name_84 WHERE date_of_birth__age_when_delisted_ = ""5 june 1984 (aged 23)"";","SELECT senior_list FROM table_name_84 WHERE date_of_birth__age_when_delisted_ = ""5 june 1984 (aged 23)"";",1 Delete all records of 'multimodal_mobility' with a usage_count less than 50.,"CREATE TABLE public.multimodal_mobility(id serial PRIMARY KEY, mode varchar(255), usage_count int);",DELETE FROM public.multimodal_mobility WHERE usage_count < 50;,DELETE FROM public.multimodal_mobility WHERE usage_count 50;,0 What is the maximum donation amount received in each month of 2021?,"CREATE TABLE Donations (DonationID INT, DonorID INT, Amount DECIMAL(10,2), DonationDate DATE); ","SELECT MONTH(DonationDate), MAX(Amount) FROM Donations WHERE YEAR(DonationDate) = 2021 GROUP BY MONTH(DonationDate);","SELECT DATE_FORMAT(DonationDate, '%Y-%m') AS Month, MAX(Amount) AS MaxDonation FROM Donations WHERE YEAR(DonationDate) = 2021 GROUP BY Month;",0 What is the minimum marketing budget for sustainable tourism initiatives in Asia?,"CREATE TABLE SustainableTourism (initiative VARCHAR(50), location VARCHAR(50), budget INT); ",SELECT MIN(budget) FROM SustainableTourism WHERE location = 'Asia';,SELECT MIN(budget) FROM SustainableTourism WHERE location = 'Asia';,1 Which team won at the symmons plains raceway?,"CREATE TABLE table_name_42 (team VARCHAR, circuit VARCHAR);","SELECT team FROM table_name_42 WHERE circuit = ""symmons plains raceway"";","SELECT team FROM table_name_42 WHERE circuit = ""symmons plains raceway"";",1 What is the total amount of funding received by art programs for the 'Youth' demographic?,"CREATE SCHEMA if not exists arts_culture; CREATE TABLE if not exists arts_culture.programs(program_id INT, program_name VARCHAR(50), demographic VARCHAR(10)); CREATE TABLE if not exists arts_culture.funding(funding_id INT, program_id INT, amount INT);",SELECT SUM(funding.amount) FROM arts_culture.funding JOIN arts_culture.programs ON funding.program_id = programs.program_id WHERE programs.demographic = 'Youth';,SELECT SUM(amount) FROM arts_culture.funding JOIN arts_culture.programs ON arts_culture.programs.program_id = programs.program_id WHERE programs.demographic = 'Youth';,0 "Which specific dates encompass the time period when ""The Show Girl Must Go On"" showed a gross sales figure total of $2,877,906?","CREATE TABLE table_22123920_4 (dates__mdy_ VARCHAR, gross_sales VARCHAR);","SELECT dates__mdy_ FROM table_22123920_4 WHERE gross_sales = ""$2,877,906"";","SELECT dates__mdy_ FROM table_22123920_4 WHERE gross_sales = ""$2,877,906"";",1 Tell me the Laps for time/retired of +1:08.491,"CREATE TABLE table_name_39 (laps VARCHAR, time_retired VARCHAR);","SELECT laps FROM table_name_39 WHERE time_retired = ""+1:08.491"";","SELECT laps FROM table_name_39 WHERE time_retired = ""+1:08.491"";",1 Delete the record with id 5 from the 'community_events' table,"CREATE TABLE community_events (id INT PRIMARY KEY, name VARCHAR(25), date DATE, attendees INT);",DELETE FROM community_events WHERE id = 5;,DELETE FROM community_events WHERE id = 5;,1 "What is the free of Apolline Dreyfuss & Lila Meesseman-Bakir, when the total was larger than 90.333?","CREATE TABLE table_name_87 (free INTEGER, athlete VARCHAR, total VARCHAR);","SELECT MIN(free) FROM table_name_87 WHERE athlete = ""apolline dreyfuss & lila meesseman-bakir"" AND total > 90.333;","SELECT SUM(free) FROM table_name_87 WHERE athlete = ""apolline dreyfuss & lila meesseman-bakir"" AND total > 90.333;",0 "Looking only at matches occurring after Game 51, who was the opponent for the game that ended with a score of 99-129?","CREATE TABLE table_name_61 (opponent VARCHAR, game VARCHAR, score VARCHAR);","SELECT opponent FROM table_name_61 WHERE game > 51 AND score = ""99-129"";","SELECT opponent FROM table_name_61 WHERE game > 51 AND score = ""99-129"";",1 How many animals are in the 'conservation_program' table?,"CREATE TABLE conservation_program (id INT PRIMARY KEY, animal_name VARCHAR, num_animals INT);",SELECT SUM(num_animals) FROM conservation_program;,SELECT SUM(num_animals) FROM conservation_program;,1 Who won the $109 no limit hold'em w/rebuys [turbo]?,"CREATE TABLE table_22050544_3 (winner VARCHAR, event VARCHAR);","SELECT winner FROM table_22050544_3 WHERE event = ""$109 No Limit Hold'em w/rebuys [Turbo]"";","SELECT winner FROM table_22050544_3 WHERE event = ""$109 no limit hold'em w/rebuys [turbo]"";",0 Who was the center from Washington State?,"CREATE TABLE table_name_90 (player VARCHAR, position VARCHAR, school_club_team VARCHAR);","SELECT player FROM table_name_90 WHERE position = ""center"" AND school_club_team = ""washington state"";","SELECT player FROM table_name_90 WHERE position = ""center"" AND school_club_team = ""washington state"";",1 "What is the average playtime of all players who achieved a rank of Platinum or higher in the game ""Galactic Conquest""?","CREATE TABLE Players (PlayerID INT, GameName VARCHAR(20), Playtime FLOAT, Rank VARCHAR(10)); ","SELECT AVG(Playtime) FROM Players WHERE GameName = 'Galactic Conquest' AND Rank IN ('Platinum', 'Diamond', 'Master');",SELECT AVG(Playtime) FROM Players WHERE Rank >= 'Platinum' AND GameName = 'Galactic Conquest';,0 Calculate the difference between the average carbon sequestration rate of 'Forest A' and 'Forest C'.,"CREATE TABLE ForestCarbonSeq(forest_name TEXT, seq_rate REAL); ",SELECT AVG(CASE WHEN forest_name = 'Forest A' THEN seq_rate END) - AVG(CASE WHEN forest_name = 'Forest C' THEN seq_rate END) FROM ForestCarbonSeq;,SELECT AVG(seq_rate) - AVG(seq_rate) FROM ForestCarbonSeq WHERE forest_name = 'Forest A';,0 Which countries have the highest number of spacecraft manufactured?,"CREATE TABLE Spacecraft (SpacecraftID INT, Name VARCHAR(50), ManufacturerCountry VARCHAR(50));","SELECT ManufacturerCountry, COUNT(*) FROM Spacecraft GROUP BY ManufacturerCountry ORDER BY COUNT(*) DESC LIMIT 1;","SELECT ManufacturerCountry, COUNT(*) FROM Spacecraft GROUP BY ManufacturerCountry ORDER BY COUNT(*) DESC LIMIT 1;",1 Result of 88-85 ot (1-0) involves what game?,"CREATE TABLE table_name_16 (game VARCHAR, result VARCHAR);","SELECT game FROM table_name_16 WHERE result = ""88-85 ot (1-0)"";","SELECT game FROM table_name_16 WHERE result = ""88-85 ot (1-0)"";",1 Minimum investment required for climate resilience projects,"CREATE TABLE climate_resilience_projects (id INT, project_name VARCHAR(255), sector VARCHAR(255), country VARCHAR(255), year INT, investment FLOAT);",SELECT MIN(investment) FROM climate_resilience_projects WHERE sector = 'Infrastructure';,SELECT MIN(investment) FROM climate_resilience_projects;,0 What was the away team score when Richmond was the home team?,"CREATE TABLE table_name_80 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team AS score FROM table_name_80 WHERE home_team = ""richmond"";","SELECT away_team AS score FROM table_name_80 WHERE home_team = ""richmond"";",1 "Which Grid that has a Rider of mike di meglio, and Laps larger than 23?","CREATE TABLE table_name_23 (grid INTEGER, rider VARCHAR, laps VARCHAR);","SELECT AVG(grid) FROM table_name_23 WHERE rider = ""mike di meglio"" AND laps > 23;","SELECT SUM(grid) FROM table_name_23 WHERE rider = ""mike di meglio"" AND laps > 23;",0 How many laps for denny hulme with under 4 on the grid?,"CREATE TABLE table_name_13 (laps INTEGER, driver VARCHAR, grid VARCHAR);","SELECT SUM(laps) FROM table_name_13 WHERE driver = ""denny hulme"" AND grid < 4;","SELECT SUM(laps) FROM table_name_13 WHERE driver = ""danny hulme"" AND grid 4;",0 "What's the total number of Win % with an Appearances of 4, and Losses that's larger than 3?","CREATE TABLE table_name_78 (win__percentage VARCHAR, appearances VARCHAR, losses VARCHAR);",SELECT COUNT(win__percentage) FROM table_name_78 WHERE appearances = 4 AND losses > 3;,SELECT COUNT(win__percentage) FROM table_name_78 WHERE appearances = 4 AND losses > 3;,1 How many professional development workshops did teachers attend in the first half of 2022?,"CREATE TABLE pd_workshops (teacher_id INT, workshop_date DATE); ","SELECT teacher_id, COUNT(*) OVER (PARTITION BY teacher_id) AS workshops_attended FROM pd_workshops WHERE workshop_date BETWEEN '2022-01-01' AND '2022-06-30';",SELECT COUNT(*) FROM pd_workshops WHERE workshop_date BETWEEN '2022-01-01' AND '2022-06-30';,0 What is the average attendance for cultural events in 'Paris' and 'Berlin'?,"CREATE TABLE cultural_events (id INT, city VARCHAR(20), attendance INT); ","SELECT city, AVG(attendance) FROM cultural_events GROUP BY city HAVING city IN ('Paris', 'Berlin');","SELECT AVG(attendance) FROM cultural_events WHERE city IN ('Paris', 'Berlin');",0 What is the combined population of animals that are present in both the 'animal_population' table and the 'habitat_preservation' view?,"CREATE VIEW habitat_preservation AS SELECT 'lion' AS animal_name, 250 AS acres_preserved; CREATE TABLE animal_population (id INT, animal_name VARCHAR(50), population INT); ","SELECT animal_name, SUM(population) FROM animal_population WHERE animal_name IN (SELECT animal_name FROM habitat_preservation) GROUP BY animal_name;",SELECT SUM(population) FROM animal_population;,0 What was the score of game 35?,"CREATE TABLE table_17102076_7 (score VARCHAR, game VARCHAR);",SELECT score FROM table_17102076_7 WHERE game = 35;,SELECT score FROM table_17102076_7 WHERE game = 35;,1 "What is the sum of Ends with a Name of abidal, and has a Since larger than 2007?","CREATE TABLE table_name_58 (ends INTEGER, name VARCHAR, since VARCHAR);","SELECT SUM(ends) FROM table_name_58 WHERE name = ""abidal"" AND since > 2007;","SELECT SUM(ends) FROM table_name_58 WHERE name = ""abidal"" AND since > 2007;",1 what is the lowest place when the language is croatian?,"CREATE TABLE table_name_95 (place INTEGER, language VARCHAR);","SELECT MIN(place) FROM table_name_95 WHERE language = ""croatian"";","SELECT MIN(place) FROM table_name_95 WHERE language = ""croatian"";",1 Tell me the sum of rank for placings of 58,"CREATE TABLE table_name_39 (rank INTEGER, placings VARCHAR);",SELECT SUM(rank) FROM table_name_39 WHERE placings = 58;,SELECT SUM(rank) FROM table_name_39 WHERE placings = 58;,1 What is the duration for mike walling as the actor?,"CREATE TABLE table_name_47 (duration VARCHAR, actor VARCHAR);","SELECT duration FROM table_name_47 WHERE actor = ""mike walling"";","SELECT duration FROM table_name_47 WHERE actor = ""mike walling"";",1 What is the largest number in L?,CREATE TABLE table_29565601_2 (l INTEGER);,SELECT MAX(l) FROM table_29565601_2;,SELECT MAX(l) FROM table_29565601_2;,1 What is the total number of crime incidents in 'north' and 'south' neighborhoods?,"CREATE TABLE crime_stats (id INT, neighborhood VARCHAR(20), type VARCHAR(20)); ","SELECT SUM(num_crimes) FROM (SELECT COUNT(*) as num_crimes FROM crime_stats WHERE neighborhood IN ('north', 'south') GROUP BY neighborhood) as total_crimes;","SELECT COUNT(*) FROM crime_stats WHERE neighborhood IN ('north','south');",0 "Which Nanquan has a Nandao larger than 9.49, and a Rank of 4?","CREATE TABLE table_name_76 (nanquan VARCHAR, nandao VARCHAR, rank VARCHAR);",SELECT nanquan FROM table_name_76 WHERE nandao > 9.49 AND rank = 4;,SELECT nanquan FROM table_name_76 WHERE nandao > 9.49 AND rank = 4;,1 "Which FA Cup Goals have League Cup Apps larger than 0, and a Name of trevor cherry?","CREATE TABLE table_name_55 (fa_cup_goals INTEGER, league_cup_apps VARCHAR, name VARCHAR);","SELECT MAX(fa_cup_goals) FROM table_name_55 WHERE league_cup_apps > 0 AND name = ""trevor cherry"";","SELECT SUM(fa_cup_goals) FROM table_name_55 WHERE league_cup_apps > 0 AND name = ""trevor cherry"";",0 Create a table to store information about teachers' professional development,"CREATE TABLE TeachersProfessionalDevelopment (TeacherID INT PRIMARY KEY, DevelopmentType VARCHAR(50), StartDate DATE, EndDate DATE);","CREATE TABLE TeachersProfessionalDevelopment (TeacherID INT PRIMARY KEY, DevelopmentType VARCHAR(50), StartDate DATE, EndDate DATE);","CREATE TABLE TeachersProfessionalDevelopment (TeacherID INT PRIMARY KEY, DevelopmentType VARCHAR(50), StartDate DATE, EndDate DATE);",1 What is the number of unique customers who purchased size 16 garments in Australia?,"CREATE TABLE Customers (id INT, customerID INT, country VARCHAR(50)); CREATE TABLE Sales (id INT, customerID INT, garmentID INT, quantity INT, saleDate DATE); CREATE TABLE Garments (id INT, garmentID INT, size INT, country VARCHAR(50)); ",SELECT COUNT(DISTINCT Customers.customerID) FROM Customers INNER JOIN Sales ON Customers.customerID = Sales.customerID INNER JOIN Garments ON Sales.garmentID = Garments.garmentID WHERE Garments.size = 16 AND Customers.country = 'Australia';,SELECT COUNT(DISTINCT Customers.customerID) FROM Customers INNER JOIN Sales ON Customers.customerID = Sales.customerID INNER JOIN Garments ON Sales.garmentID = Garments.garmentID WHERE Garments.size = 16 AND Customers.country = 'Australia';,1 What is the distribution of sales by ethical material type?,"CREATE TABLE Sales (SaleID INT, Material VARCHAR(50), Sales DECIMAL(5,2)); ","SELECT Material, SUM(Sales) AS TotalSales FROM Sales GROUP BY Material ORDER BY TotalSales DESC;","SELECT Material, SUM(Sales) as TotalSales FROM Sales GROUP BY Material;",0 What is the total biomass of all marine species in the Mediterranean Sea?,"CREATE TABLE marine_biomass (species VARCHAR(255), biomass FLOAT, location VARCHAR(255)); ",SELECT SUM(biomass) FROM marine_biomass WHERE location = 'Mediterranean Sea';,SELECT SUM(biomass) FROM marine_biomass WHERE location = 'Mediterranean Sea';,1 Alter the workforce_training table to add a column for employee ID in the national identification format,"CREATE TABLE workforce_training (id INT PRIMARY KEY, employee_name VARCHAR(255), training_topic VARCHAR(255), training_hours INT, training_completion_date DATE);",ALTER TABLE workforce_training ADD COLUMN national_id VARCHAR(50);,"ALTER TABLE workforce_training ADD employee_id PRIMARY KEY, employee_name VARCHAR(255), training_topic VARCHAR(255), training_hours INT, training_completion_date DATE;",0 "How many employees from each country are there in the database, and what percentage of the total employee count does each country represent?","CREATE TABLE Employees (EmployeeID int, Country varchar(50), Department varchar(50)); CREATE TABLE Departments (Department varchar(50), Manager varchar(50)); ","SELECT e.Country, COUNT(e.EmployeeID) as EmployeeCount, COUNT(e.EmployeeID) * 100.0 / (SELECT COUNT(*) FROM Employees) as PercentageOfTotal FROM Employees e GROUP BY e.Country;","SELECT e.Country, COUNT(e.EmployeeID) * 100.0 / (SELECT COUNT(e.EmployeeID) FROM Employees e JOIN Departments d ON e.Department = d.Department GROUP BY e.Country) as Percentage FROM Employees e JOIN Departments d ON e.Department = d.Department GROUP BY e.Country;",0 What is the average funding received by startups founded in each month?,"CREATE TABLE startups(id INT, name TEXT, founding_month INT, funding FLOAT); ","SELECT founding_month, AVG(funding) FROM startups GROUP BY founding_month;","SELECT founding_month, AVG(funding) FROM startups GROUP BY founding_month;",1 What are the product codes and names for products that do not use raw materials with a quantity less than 400?,"CREATE TABLE Raw_Materials (raw_material_code TEXT, raw_material_name TEXT, quantity INTEGER); CREATE TABLE Products (product_code TEXT, raw_material_code TEXT); ","SELECT p.product_code, p.product_name FROM Products p WHERE p.raw_material_code NOT IN (SELECT rm.raw_material_code FROM Raw_Materials rm WHERE rm.quantity < 400);","SELECT Products.product_code, Products.raw_material_name FROM Products INNER JOIN Raw_Materials ON Products.raw_material_code = Raw_Materials.raw_material_code WHERE Raw_Materials.quantity 400;",0 What is the average duration of space missions per agency?,"CREATE TABLE SpaceAgency (ID INT, Name VARCHAR(50), Country VARCHAR(50)); CREATE TABLE SpaceMission (AgencyID INT, Name VARCHAR(50), LaunchDate DATE, Duration INT);","SELECT sa.Name, AVG(sm.Duration) AS AvgDuration FROM SpaceAgency sa JOIN SpaceMission sm ON sa.ID = sm.AgencyID GROUP BY sa.Name;","SELECT SpaceAgency.Name, AVG(SpaceMission.Duration) as AvgDuration FROM SpaceAgency INNER JOIN SpaceMission ON SpaceAgency.ID = SpaceMission.AgencyID GROUP BY SpaceAgency.Name;",0 What is the nationality of the person who played small forward?,"CREATE TABLE table_name_82 (nationality VARCHAR, position VARCHAR);","SELECT nationality FROM table_name_82 WHERE position = ""small forward"";","SELECT nationality FROM table_name_82 WHERE position = ""small forward"";",1 "What is the number of new subscribers per day, by country, for the last 60 days?","CREATE TABLE subscribers (subscriber_id INT, country VARCHAR(255), subscribe_date DATE); CREATE VIEW daily_subscribers AS SELECT country, DATE_TRUNC('day', subscribe_date) as date, COUNT(DISTINCT subscriber_id) as new_subscribers FROM subscribers WHERE subscribe_date >= DATEADD(day, -60, CURRENT_DATE) GROUP BY country, date;",SELECT * FROM daily_subscribers;,"SELECT country, DATE_TRUNC('day', subscribe_date) as date, COUNT(DISTINCT subscriber_id) as new_subscribers FROM daily_subscribers WHERE subscribe_date >= DATEADD(day, -60, CURRENT_DATE) GROUP BY country, date;",0 What constructor has less than 3 laps and grid 15?,"CREATE TABLE table_name_22 (constructor VARCHAR, laps VARCHAR, grid VARCHAR);",SELECT constructor FROM table_name_22 WHERE laps < 3 AND grid = 15;,SELECT constructor FROM table_name_22 WHERE laps 3 AND grid = 15;,0 Who is the rookie goalkeeper Rob Scherr who played before week 6?,"CREATE TABLE table_name_5 (rookie VARCHAR, goalkeeper VARCHAR, week VARCHAR);","SELECT rookie FROM table_name_5 WHERE goalkeeper = ""rob scherr"" AND week < 6;","SELECT rookie FROM table_name_5 WHERE goalkeeper = ""rob scherr"" AND week 6;",0 Which excavation sites have at least 5 instances of stone tools?,"CREATE TABLE ArtifactTypes (ArtifactTypeID INT, ArtifactType TEXT); CREATE TABLE Artifacts (ArtifactID INT, ArtifactName TEXT, SiteID INT, ArtifactTypeID INT); ","SELECT Sites.SiteName, COUNT(Artifacts.ArtifactID) AS Quantity FROM Artifacts INNER JOIN Sites ON Artifacts.SiteID = Sites.SiteID INNER JOIN ArtifactTypes ON Artifacts.ArtifactTypeID = ArtifactTypes.ArtifactTypeID WHERE ArtifactTypes.ArtifactType = 'Stone Tool' GROUP BY Sites.SiteName HAVING Quantity >= 5;",SELECT SiteID FROM Artifacts JOIN ArtifactTypes ON Artifacts.ArtifactTypeID = ArtifactTypes.ArtifactTypeID GROUP BY SiteID HAVING COUNT(DISTINCT ArtifactTypeID) >= 5;,0 "which Partial thromboplastin time has a Condition of liver failure , early?","CREATE TABLE table_name_61 (partial_thromboplastin_time VARCHAR, condition VARCHAR);","SELECT partial_thromboplastin_time FROM table_name_61 WHERE condition = ""liver failure , early"";","SELECT partial_thromboplastin_time FROM table_name_61 WHERE condition = ""liver failure, early"";",0 Who was the driver in 1986?,"CREATE TABLE table_2266976_1 (driver VARCHAR, year VARCHAR);","SELECT driver FROM table_2266976_1 WHERE year = ""1986"";",SELECT driver FROM table_2266976_1 WHERE year = 1986;,0 Create a view for the international visitor statistics by month,"CREATE TABLE visitor_statistics (id INT PRIMARY KEY, country VARCHAR(50), year INT, month INT, visitors INT);","CREATE VIEW visitor_statistics_by_month AS SELECT country, year, month, SUM(visitors) AS total_visitors FROM visitor_statistics GROUP BY country, year, month;","CREATE VIEW international_visitors_per_month AS SELECT country, month, visitors FROM visitor_statistics GROUP BY country, month;",0 What was the home team score at North Melbourne's away game?,"CREATE TABLE table_name_11 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team AS score FROM table_name_11 WHERE away_team = ""north melbourne"";","SELECT home_team AS score FROM table_name_11 WHERE away_team = ""north melbourne"";",1 Show all customer ids and the number of accounts for each customer.,CREATE TABLE Accounts (customer_id VARCHAR);,"SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id;","SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id;",1 What was the date of the game when the record of the series was 0–1?,"CREATE TABLE table_name_10 (date VARCHAR, series VARCHAR);","SELECT date FROM table_name_10 WHERE series = ""0–1"";","SELECT date FROM table_name_10 WHERE series = ""0–1"";",1 Which species has a Voges-Proskauer reading of negative and an indole reading of negative?,"CREATE TABLE table_name_43 (species VARCHAR, voges_proskauer VARCHAR, indole VARCHAR);","SELECT species FROM table_name_43 WHERE voges_proskauer = ""negative"" AND indole = ""negative"";","SELECT species FROM table_name_43 WHERE voges_proskauer = ""negative"" AND indole = ""negative"";",1 What is the total number of pesticide-treated cotton farms in Australia in the past year?,"CREATE TABLE pesticide_applications (application_date DATE, farm_id INT, crop TEXT); ","SELECT COUNT(DISTINCT farm_id) FROM pesticide_applications WHERE crop = 'Cotton' AND application_date > DATE_SUB(CURDATE(), INTERVAL 1 YEAR);","SELECT COUNT(*) FROM pesticide_applications WHERE crop = 'cotton' AND application_date >= DATEADD(year, -1, GETDATE());",0 The highest draws with smaller than 9 played?,"CREATE TABLE table_name_32 (draws INTEGER, played INTEGER);",SELECT MAX(draws) FROM table_name_32 WHERE played < 9;,SELECT MAX(draws) FROM table_name_32 WHERE played 9;,0 What is the total number of female and male editors in the 'editors' table?,"CREATE TABLE editors (id INT, name VARCHAR(50), gender VARCHAR(10), age INT, experience INT); ","SELECT SUM(CASE WHEN gender = 'Female' THEN 1 ELSE 0 END) AS female_editors, SUM(CASE WHEN gender = 'Male' THEN 1 ELSE 0 END) AS male_editors FROM editors;","SELECT gender, COUNT(*) FROM editors GROUP BY gender;",0 Which Score has a Home team of aston villa?,"CREATE TABLE table_name_20 (score VARCHAR, home_team VARCHAR);","SELECT score FROM table_name_20 WHERE home_team = ""aston villa"";","SELECT score FROM table_name_20 WHERE home_team = ""aston villa"";",1 What is the average donation amount for each organization in Q3 2022?,"CREATE TABLE donations (donor_id INT, organization_id INT, amount DECIMAL(10,2), donation_date DATE); ","SELECT organization_id, AVG(amount) as avg_donation FROM donations WHERE donation_date BETWEEN '2022-07-01' AND '2022-09-30' GROUP BY organization_id;","SELECT organization_id, AVG(amount) as avg_donation FROM donations WHERE donation_date BETWEEN '2022-04-01' AND '2022-06-30' GROUP BY organization_id;",0 What is the three-year rolling average of agricultural innovation investments in India?,"CREATE TABLE agricultural_investments (country TEXT, year INT, innovation_investment NUMERIC); ","SELECT year, AVG(innovation_investment) OVER (ORDER BY year ROWS BETWEEN 2 PRECEDING AND CURRENT ROW) AS rolling_average FROM agricultural_investments WHERE country = 'India';",SELECT AVG(innovation_investment) FROM agricultural_investments WHERE country = 'India' AND year = 3;,0 "Insert a new record into the biotech startups table with the name 'StartupD', a founder gender of 'Non-binary', and a funding amount of 9000000.","CREATE SCHEMA if not exists biotech; CREATE TABLE if not exists biotech.startups (id INT, name VARCHAR(100), founder_gender VARCHAR(10), funding FLOAT); ","INSERT INTO biotech.startups (name, founder_gender, funding) VALUES ('StartupD', 'Non-binary', 9000000.0);","INSERT INTO biotech.startups (name, founder_gender, funding) VALUES ('StartupD', 'Non-binary', 9000000);",0 What is the Home team on April 2?,"CREATE TABLE table_name_43 (home VARCHAR, date VARCHAR);","SELECT home FROM table_name_43 WHERE date = ""april 2"";","SELECT home FROM table_name_43 WHERE date = ""april 2"";",1 What was the order # of the theme Male Singers?,"CREATE TABLE table_27616663_1 (order__number VARCHAR, theme VARCHAR);","SELECT order__number FROM table_27616663_1 WHERE theme = ""Male Singers"";","SELECT order__number FROM table_27616663_1 WHERE theme = ""Male Singers"";",1 "Add new record to recycling_rates table with location 'California', recycling_type 'Plastic', rate 0.20, date '2021-01-01'","CREATE TABLE recycling_rates (id INT PRIMARY KEY, location VARCHAR(255), recycling_type VARCHAR(255), rate DECIMAL(5,4), date DATE);","INSERT INTO recycling_rates (location, recycling_type, rate, date) VALUES ('California', 'Plastic', 0.20, '2021-01-01');","INSERT INTO recycling_rates (location, recycling_type, rate, date) VALUES ('California', 'Plastic', 0.20, '2021-01-01');",1 What is the total number of workouts for each member?,"CREATE TABLE workout_data (member_id INT, workout_date DATE); ","SELECT member_id, COUNT(*) AS total_workouts FROM workout_data GROUP BY member_id;","SELECT member_id, COUNT(*) FROM workout_data GROUP BY member_id;",0 "With less than 1 Championship, what es the Established date of the Niagara Rugby Union League?","CREATE TABLE table_name_40 (established INTEGER, championships VARCHAR, league VARCHAR);","SELECT SUM(established) FROM table_name_40 WHERE championships < 1 AND league = ""niagara rugby union"";","SELECT SUM(established) FROM table_name_40 WHERE championships 1 AND league = ""niagara rugby union"";",0 What is the average age of the aircraft in the Aircraft_Table?,"CREATE TABLE Aircraft_Table (id INT, model VARCHAR(100), year_manufactured INT);",SELECT AVG(YEAR_MANUFACTURED) FROM Aircraft_Table;,SELECT AVG(year_manufactured) FROM Aircraft_Table;,0 What was the result in a year before 2013 that the nomination category was Presenter Talent Show?,"CREATE TABLE table_name_52 (result VARCHAR, year VARCHAR, category VARCHAR);","SELECT result FROM table_name_52 WHERE year < 2013 AND category = ""presenter talent show"";","SELECT result FROM table_name_52 WHERE year 2013 AND category = ""presenter talent show"";",0 What are the total number of losses for the team who has conceded 22?,"CREATE TABLE table_16034882_4 (loses VARCHAR, goals_conceded VARCHAR);",SELECT COUNT(loses) FROM table_16034882_4 WHERE goals_conceded = 22;,SELECT COUNT(loses) FROM table_16034882_4 WHERE goals_conceded = 22;,1 List all social good projects in 'projects' table with budget greater than $5000.,"CREATE TABLE projects (project_name VARCHAR(50), budget INTEGER, technology_for_social_good BOOLEAN);",SELECT project_name FROM projects WHERE budget > 5000 AND technology_for_social_good = TRUE;,SELECT project_name FROM projects WHERE budget > 5000.00 AND technology_for_social_good = true;,0 Who published Weird War Tales?,"CREATE TABLE table_name_13 (publisher VARCHAR, title VARCHAR);","SELECT publisher FROM table_name_13 WHERE title = ""weird war tales"";","SELECT publisher FROM table_name_13 WHERE title = ""weird war tales"";",1 What jersey number did Al Harrington wear,"CREATE TABLE table_15621965_8 (no INTEGER, player VARCHAR);","SELECT MAX(no) FROM table_15621965_8 WHERE player = ""Al Harrington"";","SELECT MAX(no) FROM table_15621965_8 WHERE player = ""Al Harrington"";",1 Was it a home game on the date of April 6?,"CREATE TABLE table_name_6 (home VARCHAR, date VARCHAR);","SELECT home FROM table_name_6 WHERE date = ""april 6"";","SELECT home FROM table_name_6 WHERE date = ""april 6"";",1 "List all opponents in the September 23, 1984 game?","CREATE TABLE table_14863869_1 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_14863869_1 WHERE date = ""September 23, 1984"";","SELECT opponent FROM table_14863869_1 WHERE date = ""September 23, 1984"";",1 What is the total amount donated by donors from the USA?,"CREATE TABLE donations (id INT, donor_id INT, amount DECIMAL); ",SELECT SUM(amount) FROM donations INNER JOIN donors ON donations.donor_id = donors.id WHERE donors.country = 'USA';,SELECT SUM(amount) FROM donations WHERE donor_id IN (SELECT donor_id FROM donors WHERE country = 'USA');,0 Which AI models were trained on data from which countries?,"CREATE TABLE ai_models (model_name TEXT, data_country TEXT); ","SELECT model_name, data_country FROM ai_models;",SELECT model_name FROM ai_models WHERE data_country = 'USA';,0 "What is the total number of React, when Name is Sean Wroe, and when Lane is greater than 2?","CREATE TABLE table_name_78 (react VARCHAR, name VARCHAR, lane VARCHAR);","SELECT COUNT(react) FROM table_name_78 WHERE name = ""sean wroe"" AND lane > 2;","SELECT COUNT(react) FROM table_name_78 WHERE name = ""sean wroe"" AND lane > 2;",1 What is the CPU speed(s) of the New Plus type hardware?,"CREATE TABLE table_name_74 (cpu_speed VARCHAR, type VARCHAR);","SELECT cpu_speed FROM table_name_74 WHERE type = ""new plus"";","SELECT cpu_speed FROM table_name_74 WHERE type = ""new plus"";",1 How many tracks have the title let love be your energy?,"CREATE TABLE table_28715942_2 (track_no VARCHAR, track VARCHAR);","SELECT COUNT(track_no) FROM table_28715942_2 WHERE track = ""Let Love Be Your Energy"";","SELECT COUNT(track_no) FROM table_28715942_2 WHERE track = ""Let love be your energy"";",0 "Which High points have High rebounds of lamar odom (15), and a Date of april 27?","CREATE TABLE table_name_80 (high_points VARCHAR, high_rebounds VARCHAR, date VARCHAR);","SELECT high_points FROM table_name_80 WHERE high_rebounds = ""lamar odom (15)"" AND date = ""april 27"";","SELECT high_points FROM table_name_80 WHERE high_rebounds = ""lamar odom (15)"" AND date = ""april 27"";",1 How many marine species are found in the Arctic region?,"CREATE TABLE marine_species (name VARCHAR(255), region VARCHAR(255), population INT); ",SELECT SUM(population) FROM marine_species WHERE region = 'Arctic';,SELECT SUM(population) FROM marine_species WHERE region = 'Arctic';,1 What is the average account balance for clients in the Asia-Pacific region?,"CREATE TABLE clients (client_id INT, name VARCHAR(50), region VARCHAR(50), account_balance DECIMAL(10,2)); ","SELECT region, AVG(account_balance) FROM clients WHERE region = 'Asia-Pacific' GROUP BY region;",SELECT AVG(account_balance) FROM clients WHERE region = 'Asia-Pacific';,0 "What area has a % Other of –, and a % Muslim of 95%?","CREATE TABLE table_name_83 (area VARCHAR, _percentage_other VARCHAR, _percentage_muslim VARCHAR);","SELECT area FROM table_name_83 WHERE _percentage_other = ""–"" AND _percentage_muslim = ""95%"";","SELECT area FROM table_name_83 WHERE _percentage_other = ""–"" AND _percentage_muslim = ""95%"";",1 What date was the game played at vfl park?,"CREATE TABLE table_name_33 (date VARCHAR, venue VARCHAR);","SELECT date FROM table_name_33 WHERE venue = ""vfl park"";","SELECT date FROM table_name_33 WHERE venue = ""vfl park"";",1 What is the Cache for a Number 64 with a Memory of 24 gb qpi 5.86 gt/s?,"CREATE TABLE table_name_13 (cache VARCHAR, memory VARCHAR, number VARCHAR);","SELECT cache FROM table_name_13 WHERE memory = ""24 gb qpi 5.86 gt/s"" AND number = 64;","SELECT cache FROM table_name_13 WHERE memory = ""24 gb qpi 5.86 gt/s"" AND number = 64;",1 Which art pieces were donated by local philanthropists?,"CREATE TABLE art_pieces (id INT, title TEXT, medium TEXT, donor_id INT, donor_type TEXT);CREATE TABLE donors (id INT, name TEXT, city TEXT, country TEXT);","SELECT ap.title, d.name, d.city FROM art_pieces ap JOIN donors d ON ap.donor_id = d.id WHERE d.city = 'San Francisco';",SELECT art_pieces.title FROM art_pieces INNER JOIN donors ON art_pieces.donor_id = donors.id WHERE donors.country = 'USA';,0 "What is the total quantity of sustainable materials used in production, by material type?","CREATE TABLE production (id INT, material VARCHAR(255), quantity INT, price DECIMAL(10, 2)); ","SELECT material, SUM(quantity) FROM production GROUP BY material;","SELECT material, SUM(quantity) as total_quantity FROM production GROUP BY material;",0 What is the largest 6-car-sets for fiscal year 1968?,CREATE TABLE table_19255192_1 (fiscal_year VARCHAR);,SELECT MAX(6 AS _car_sets) FROM table_19255192_1 WHERE fiscal_year = 1968;,SELECT MAX(6 AS _car_sets) FROM table_19255192_1 WHERE fiscal_year = 1968;,1 How many cases were handled by attorney 'Carlos García'?,"CREATE TABLE cases (case_id INT, attorney_id INT, category VARCHAR(50), billing_amount INT); ",SELECT SUM(billing_amount) FROM cases WHERE attorney_id = (SELECT attorney_id FROM attorneys WHERE name = 'Carlos García');,SELECT COUNT(*) FROM cases WHERE attorney_id = (SELECT attorney_id FROM attorneys WHERE name = 'Carlos Garca');,0 Create a view to display the total grant amounts for each research area,"CREATE TABLE research_areas (area_id INT PRIMARY KEY, area_name VARCHAR(50), total_grant_amount DECIMAL(10,2));","CREATE VIEW vw_area_grant_totals AS SELECT area_name, SUM(total_grant_amount) AS total_grant_amount FROM research_areas GROUP BY area_name;","CREATE VIEW total_grant_amount AS SELECT area_name, SUM(total_grant_amount) AS total_grant_amount FROM research_areas GROUP BY area_name;",0 "What is the average donation amount per category, ordered by the highest amount?","CREATE TABLE Donations (DonationID INT, DonationCategory TEXT, DonationAmount DECIMAL(10,2)); ","SELECT AVG(DonationAmount) AS AvgDonation, DonationCategory FROM Donations GROUP BY DonationCategory ORDER BY AvgDonation DESC;","SELECT DonationCategory, AVG(DonationAmount) as AvgDonationAmount FROM Donations GROUP BY DonationCategory ORDER BY AvgDonationAmount DESC;",0 How many electric buses are operating in Beijing?,"CREATE TABLE electric_buses (bus_id INT, registration_date TIMESTAMP, bus_type VARCHAR(50), city VARCHAR(50));",SELECT COUNT(*) as num_buses FROM electric_buses WHERE city = 'Beijing';,SELECT COUNT(*) FROM electric_buses WHERE city = 'Beijing' AND bus_type = 'Electric';,0 Provide the names and total product quantities for stores located in 'New York' or 'California'.,"CREATE TABLE stores (id INT, name VARCHAR(50), city VARCHAR(50), state VARCHAR(50), product_quantity INT); ","SELECT name, SUM(product_quantity) FROM stores WHERE state IN ('NY', 'CA') GROUP BY name;","SELECT name, SUM(product_quantity) FROM stores WHERE city IN ('New York', 'California');",0 Update song 'Everlasting' in album with ID 5 to have a duration of 240 seconds,"CREATE TABLE Albums (AlbumID INT PRIMARY KEY AUTO_INCREMENT, Title VARCHAR(100));CREATE TABLE Songs (SongID INT PRIMARY KEY AUTO_INCREMENT, Title VARCHAR(100), Duration INT, AlbumID INT, FOREIGN KEY (AlbumID) REFERENCES Albums(AlbumID));",UPDATE Songs SET Duration = 240 WHERE Title = 'Everlasting' AND AlbumID = 5;,UPDATE Songs SET Duration = 240 WHERE AlbumID = 5 AND Title = 'Everlasting';,0 What is the total sales for each drug by manufacturer in Europe?,"CREATE TABLE drug_manufacturers2 (manufacturer_id INT, drug_name TEXT, manufacturer TEXT, sales FLOAT, region TEXT); ","SELECT manufacturer, SUM(sales) as total_sales FROM drug_manufacturers2 WHERE region = 'Europe' GROUP BY manufacturer;","SELECT manufacturer, SUM(sales) FROM drug_manufacturers2 WHERE region = 'Europe' GROUP BY manufacturer;",0 What is the score of the match with anders järryd as the runner-up?,"CREATE TABLE table_name_93 (score VARCHAR, runner_up VARCHAR);","SELECT score FROM table_name_93 WHERE runner_up = ""anders järryd"";","SELECT score FROM table_name_93 WHERE runner_up = ""anders järryd"";",1 What is the average age of players who play games with the 'open world' genre?,"CREATE TABLE PlayerGenre (PlayerID INT, Age INT, Genre VARCHAR(20)); ",SELECT AVG(Age) FROM PlayerGenre WHERE Genre = 'Open World';,SELECT AVG(Age) FROM PlayerGenre WHERE Genre = 'open world';,0 What is the total number of military personnel involved in cybersecurity operations in Asia?,"CREATE TABLE MilitaryCyberOps (Id INT, Region VARCHAR(50), Personnel INT, Year INT); ",SELECT SUM(Personnel) FROM MilitaryCyberOps WHERE Region = 'Asia';,SELECT SUM(Personnel) FROM MilitaryCyberOps WHERE Region = 'Asia';,1 What year had the qual of totals,"CREATE TABLE table_name_88 (year VARCHAR, qual VARCHAR);","SELECT year FROM table_name_88 WHERE qual = ""totals"";","SELECT year FROM table_name_88 WHERE qual = ""totals"";",1 Identify the circular economy initiatives in 'Germany',"CREATE TABLE circular_economy (id INT, initiative VARCHAR(50), country VARCHAR(20)); ",SELECT initiative FROM circular_economy WHERE country = 'Germany';,SELECT initiative FROM circular_economy WHERE country = 'Germany';,1 "What venue did the team, evansville bluecats play on?","CREATE TABLE table_name_17 (venue VARCHAR, team VARCHAR);","SELECT venue FROM table_name_17 WHERE team = ""evansville bluecats"";","SELECT venue FROM table_name_17 WHERE team = ""evansville bluecats"";",1 what's the game with date being march 7,"CREATE TABLE table_13557843_7 (game VARCHAR, date VARCHAR);","SELECT game FROM table_13557843_7 WHERE date = ""March 7"";","SELECT game FROM table_13557843_7 WHERE date = ""March 7"";",1 What is the total number of animals in the habitat_preservation table that have been relocated to a specific preserve?,"CREATE TABLE habitat_preservation (id INT, animal_name VARCHAR(255), preserve_name VARCHAR(255));",SELECT COUNT(animal_name) FROM habitat_preservation WHERE preserve_name = 'Yellowstone National Park';,SELECT COUNT(*) FROM habitat_preservation WHERE preserve_name = 'Habitat';,0 What is the total funding received by startups founded by the LGBTQ+ community in the energy sector?,"CREATE TABLE startups(id INT, name TEXT, industry TEXT, founder_community TEXT, funding FLOAT); ",SELECT SUM(funding) FROM startups WHERE industry = 'Energy' AND founder_community = 'LGBTQ+';,SELECT SUM(funding) FROM startups WHERE industry = 'Energy' AND founder_community = 'LGBTQ+';,1 How many marine species live at a depth greater than 1000 meters?,"CREATE TABLE species (id INT, name VARCHAR(255), habitat VARCHAR(255), depth FLOAT); ",SELECT COUNT(*) FROM species WHERE depth > 1000;,SELECT COUNT(*) FROM species WHERE depth > 1000;,1 "Calculate the difference in safety ratings between hybrid and electric vehicles in the 'safety_test' table, for each region.","CREATE TABLE safety_test (vehicle_type VARCHAR(10), safety_rating INT, sale_region VARCHAR(10));","SELECT sale_region, AVG(safety_rating) FILTER (WHERE vehicle_type = 'Electric') - AVG(safety_rating) FILTER (WHERE vehicle_type = 'Hybrid') AS safety_diff FROM safety_test GROUP BY sale_region;","SELECT sale_region, safety_rating, DISTINCT vehicle_type FROM safety_test WHERE vehicle_type = 'Hybrid' INTERSECT SELECT sale_region, safety_rating, safety_rating FROM safety_test WHERE vehicle_type = 'Electric' GROUP BY sale_region;",0 what is the lowest latitude for the land sqmi less than 32.696 and a water sqmi less than 0,"CREATE TABLE table_name_97 (latitude INTEGER, land___sqmi__ VARCHAR, water__sqmi_ VARCHAR);",SELECT MIN(latitude) FROM table_name_97 WHERE land___sqmi__ < 32.696 AND water__sqmi_ < 0;,SELECT MIN(latitude) FROM table_name_97 WHERE land___sqmi__ 32.696 AND water__sqmi_ 0;,0 Get the total number of green building certifications awarded by agencies in the green_building_agency table.,"CREATE SCHEMA IF NOT EXISTS green_buildings; CREATE TABLE IF NOT EXISTS green_buildings.green_building_agency ( agency_id INT NOT NULL, name VARCHAR(255) NOT NULL, certification VARCHAR(255) NOT NULL, PRIMARY KEY (agency_id));",SELECT COUNT(*) FROM green_buildings.green_building_agency;,SELECT COUNT(*) FROM green_buildings.green_building_agency;,1 what's the status in the style of ballet/ gymnastics?,"CREATE TABLE table_name_73 (status VARCHAR, style VARCHAR);","SELECT status FROM table_name_73 WHERE style = ""ballet/ gymnastics"";","SELECT status FROM table_name_73 WHERE style = ""ballet/ gymnastics"";",1 What was the date when the Twins had a record of 44-37?,"CREATE TABLE table_name_93 (date VARCHAR, record VARCHAR);","SELECT date FROM table_name_93 WHERE record = ""44-37"";","SELECT date FROM table_name_93 WHERE record = ""44-37"";",1 How many pints does the Cambrian Welfare RFC have?,"CREATE TABLE table_name_50 (points_for VARCHAR, club VARCHAR);","SELECT points_for FROM table_name_50 WHERE club = ""cambrian welfare rfc"";","SELECT points_for FROM table_name_50 WHERE club = ""cambrian welfare rfc"";",1 "What is the total transaction amount per country, excluding the Gaming category?","CREATE TABLE Countries (id INT PRIMARY KEY, country VARCHAR(50), region VARCHAR(50)); ","SELECT c.country, SUM(t.amount) FROM Transactions t INNER JOIN Users u ON t.user_id = u.id INNER JOIN Countries c ON u.country = c.country INNER JOIN Smart_Contracts sc ON t.smart_contract_id = sc.id WHERE sc.category != 'Gaming' GROUP BY c.country;","SELECT country, SUM(transaction_amount) FROM Transactions JOIN Countries ON Transactions.country = Countries.country WHERE Transactions.category!= 'Gaming' GROUP BY country;",0 What was the run 1 for the team with a run 3 of 1:21.4 and a run 4 of 1:23.0?,"CREATE TABLE table_name_9 (run_1 VARCHAR, run_3 VARCHAR, run_4 VARCHAR);","SELECT run_1 FROM table_name_9 WHERE run_3 = ""1:21.4"" AND run_4 = ""1:23.0"";","SELECT run_1 FROM table_name_9 WHERE run_3 = ""1:21.4"" AND run_4 = ""1:23.0"";",1 What was the total crowd size for the him team footscray?,"CREATE TABLE table_name_95 (crowd VARCHAR, home_team VARCHAR);","SELECT COUNT(crowd) FROM table_name_95 WHERE home_team = ""footscray"";","SELECT COUNT(crowd) FROM table_name_95 WHERE home_team = ""footscray"";",1 "What is the average heart rate for members with a gold membership, categorized by ethnicity?","CREATE TABLE member_demographics (member_id INT, age INT, gender VARCHAR(10), ethnicity VARCHAR(30)); CREATE TABLE wearable_data (member_id INT, heart_rate INT, timestamp TIMESTAMP, membership_type VARCHAR(20)); ","SELECT ethnicity, AVG(heart_rate) as avg_heart_rate FROM wearable_data w JOIN member_demographics m ON w.member_id = m.member_id WHERE membership_type = 'Gold' GROUP BY ethnicity;","SELECT md.ethnicity, AVG(wd.heart_rate) as avg_heart_rate FROM member_demographics md JOIN wearable_data wd ON md.member_id = wd.member_id WHERE wd.membership_type = 'gold' GROUP BY md.ethnicity;",0 Show unique genetic research techniques and corresponding costs,"CREATE TABLE techniques (id INT, name VARCHAR(50), description VARCHAR(50), cost DECIMAL(10, 2)); CREATE TABLE research (id INT, technique_id INT, project VARCHAR(50)); ","SELECT t.name, t.cost FROM techniques t JOIN research r ON t.id = r.technique_id GROUP BY t.name, t.cost;","SELECT DISTINCT techniques.name, techniques.cost FROM techniques INNER JOIN research ON techniques.id = research.technique_id;",0 What is the total number of unions in the 'Africa' region with 'Craft' as their union type?,"CREATE TABLE Labor_Unions (id INT, union_type VARCHAR(20), region VARCHAR(20)); ",SELECT COUNT(*) FROM Labor_Unions WHERE union_type = 'Craft' AND region = 'Africa';,SELECT COUNT(*) FROM Labor_Unions WHERE union_type = 'Craft' AND region = 'Africa';,1 What is the total assets under management (AUM) for index funds?,"CREATE TABLE investment_strategies (strategy_id INT, name VARCHAR(50), risk_level VARCHAR(50), AUM DECIMAL(10,2)); ",SELECT SUM(AUM) FROM investment_strategies WHERE name = 'Index';,SELECT SUM(AUM) FROM investment_strategies WHERE risk_level = 'Individual';,0 Who are the artists with the most art pieces in the TraditionalArt table?,"CREATE TABLE TraditionalArt (ArtistID int, ArtPieceID int, ArtName varchar(50)); ","SELECT ArtistID, COUNT(*) AS ArtCount FROM TraditionalArt GROUP BY ArtistID ORDER BY ArtCount DESC;","SELECT ArtistID, COUNT(*) as ArtPieceCount FROM TraditionalArt GROUP BY ArtistID ORDER BY ArtPieceCount DESC LIMIT 1;",0 What is the average carbon price per metric ton for the European Union in 2021?,"CREATE TABLE carbon_prices (region VARCHAR(20), price DECIMAL(5,2), year INT); ",SELECT AVG(price) FROM carbon_prices WHERE region = 'European Union' AND year = 2021;,SELECT AVG(price) FROM carbon_prices WHERE region = 'European Union' AND year = 2021;,1 "How many users have interacted with a political post in the last year, in Germany?","CREATE TABLE users (user_id INT, user_name TEXT, user_country TEXT);CREATE TABLE posts (post_id INT, post_text TEXT, post_topic TEXT);CREATE TABLE interactions (interaction_id INT, user_id INT, post_id INT);","SELECT COUNT(DISTINCT i.user_id) as interacting_users FROM interactions i JOIN posts p ON i.post_id = p.post_id JOIN users u ON i.user_id = u.user_id WHERE p.post_topic = 'Politics' AND u.user_country = 'Germany' AND i.interaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT COUNT(DISTINCT users.user_id) FROM users INNER JOIN interactions ON users.user_id = interactions.user_id INNER JOIN posts ON interactions.post_id = posts.post_id WHERE posts.post_topic = 'Politics' AND interactions.post_id IN (SELECT post_id FROM posts WHERE user_country = 'Germany') AND interactions.interaction_date >= DATEADD(year, -1, GETDATE());",0 What is the final weight for contestant Chris?,"CREATE TABLE table_24370270_10 (final_weight__kg_ VARCHAR, contestant VARCHAR);","SELECT final_weight__kg_ FROM table_24370270_10 WHERE contestant = ""Chris"";","SELECT final_weight__kg_ FROM table_24370270_10 WHERE contestant = ""Chris"";",1 "What is the average age of community health workers who identify as Latinx or Hispanic, and work in California?","CREATE TABLE community_health_workers (id INT, name VARCHAR(50), ethnicity VARCHAR(50), state VARCHAR(50), age INT); ","SELECT AVG(age) FROM community_health_workers WHERE ethnicity IN ('Latinx', 'Hispanic') AND state = 'California';","SELECT AVG(age) FROM community_health_workers WHERE ethnicity IN ('Latinx', 'Hispanic') AND state = 'California';",1 "What is the Score with a Home of colorado, and a Date with may 11?","CREATE TABLE table_name_72 (score VARCHAR, home VARCHAR, date VARCHAR);","SELECT score FROM table_name_72 WHERE home = ""colorado"" AND date = ""may 11"";","SELECT score FROM table_name_72 WHERE home = ""colorado"" AND date = ""may 11"";",1 What's the average of the amount of laps for the driver patrick tambay?,"CREATE TABLE table_name_64 (laps INTEGER, driver VARCHAR);","SELECT AVG(laps) FROM table_name_64 WHERE driver = ""patrick tambay"";","SELECT AVG(laps) FROM table_name_64 WHERE driver = ""patrick tambay"";",1 "WHAT IS THE TEAM WITH ATTENDANCE AT TARGET CENTER 11,921?","CREATE TABLE table_name_8 (team VARCHAR, location_attendance VARCHAR);","SELECT team FROM table_name_8 WHERE location_attendance = ""target center 11,921"";","SELECT team FROM table_name_8 WHERE location_attendance = ""target center 11,921"";",1 "Band of am, and a Callsign of 6wh has what purpose?","CREATE TABLE table_name_71 (purpose VARCHAR, band VARCHAR, callsign VARCHAR);","SELECT purpose FROM table_name_71 WHERE band = ""am"" AND callsign = ""6wh"";","SELECT purpose FROM table_name_71 WHERE band = ""am"" AND callsign = ""6wh"";",1 Find the top 3 factories with the highest recycling rate in the past month.,"CREATE TABLE factories (id INT, name VARCHAR(255), recycling_rate DECIMAL(10, 2));CREATE TABLE recycling_reports (id INT, factory_id INT, report_date DATE);","SELECT factories.name, factories.recycling_rate FROM factories INNER JOIN recycling_reports ON factories.id = recycling_reports.factory_id WHERE recycling_reports.report_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY factories.id ORDER BY factories.recycling_rate DESC LIMIT 3;","SELECT factories.name, factories.recycling_rate FROM factories INNER JOIN recycling_reports ON factories.id = recycling_reports.factory_id WHERE recycling_reports.report_date >= DATEADD(month, -1, GETDATE()) GROUP BY factories.name ORDER BY recycling_rate DESC LIMIT 3;",0 What is the percentage of orders that include circular economy products in the ethical fashion industry?,"CREATE TABLE order_details (order_id INT, circular_economy BOOLEAN); ",SELECT (COUNT(*))/(SELECT COUNT(*) FROM order_details) * 100.00 AS percentage FROM order_details WHERE circular_economy = true;,SELECT (COUNT(*) FILTER (WHERE circular_economy = TRUE)) * 100.0 / COUNT(*) FROM order_details WHERE circular_economy = TRUE;,0 "What is the Vineyeard surface (2010) with a Village of Gevrey-Chambertin, and Grand Cru of Latricières-Chambertin?","CREATE TABLE table_name_94 (vineyard_surface__2010_ VARCHAR, village VARCHAR, grand_cru VARCHAR);","SELECT vineyard_surface__2010_ FROM table_name_94 WHERE village = ""gevrey-chambertin"" AND grand_cru = ""latricières-chambertin"";","SELECT vineyard_surface__2010_ FROM table_name_94 WHERE village = ""gevrey-chambertin"" AND grand_cru = ""latricières-chambertin"";",1 IN WHAT STAGE DID ALEXANDER VINOKOUROV WON THE GENERAL CLASSIFICATION?,"CREATE TABLE table_11667521_17 (stage__winner_ VARCHAR, general_classification VARCHAR);","SELECT stage__winner_ FROM table_11667521_17 WHERE general_classification = ""Alexander Vinokourov"";","SELECT stage__winner_ FROM table_11667521_17 WHERE general_classification = ""Alexander Vinokourov"";",1 Insert a new record into the MarineLife table for a species named 'Blue Whale' with an id of 1.,"CREATE TABLE marine_life (id INT, species_name VARCHAR(255)); ","INSERT INTO marine_life (id, species_name) VALUES (1, 'Blue Whale');","INSERT INTO marine_life (id, species_name) VALUES (1, 'Blue Whale');",1 List the top 3 students with the highest grades in 'Math',"CREATE TABLE students (id INT, name VARCHAR(20), grade INT); CREATE TABLE courses (id INT, name VARCHAR(20), grade INT); ","SELECT students.name, courses.name, students.grade FROM students JOIN courses ON students.grade = courses.grade WHERE courses.name = 'Math' ORDER BY students.grade DESC LIMIT 3;","SELECT students.name, students.grade FROM students INNER JOIN courses ON students.id = courses.id WHERE courses.name = 'Math' GROUP BY students.name ORDER BY grades DESC LIMIT 3;",0 Which AI safety conferences had less than 50 papers in 2019 or 2020?,"CREATE TABLE AI_Safety_Conferences (id INT, conference TEXT, year INT, papers INT); ",SELECT conference FROM AI_Safety_Conferences WHERE (year = 2019 AND papers < 50) OR (year = 2020 AND papers < 50);,"SELECT conference FROM AI_Safety_Conferences WHERE year IN (2019, 2020) AND papers 50;",0 "Who's the opposition at westpac stadium when the attendance is 31,853?","CREATE TABLE table_name_56 (opposition VARCHAR, stadium VARCHAR, attendance VARCHAR);","SELECT opposition FROM table_name_56 WHERE stadium = ""westpac stadium"" AND attendance = ""31,853"";","SELECT opposition FROM table_name_56 WHERE stadium = ""westpac stadium"" AND attendance = ""31,853"";",1 How many 2006 subscribers are named Vodafone?,"CREATE TABLE table_29395291_2 (subscribers__2006___thousands_ VARCHAR, provider VARCHAR);","SELECT COUNT(subscribers__2006___thousands_) FROM table_29395291_2 WHERE provider = ""Vodafone"";","SELECT subscribers__2006___thousands_ FROM table_29395291_2 WHERE provider = ""Vodafone"";",0 Where has Jimmy Demaret as a player?,"CREATE TABLE table_name_94 (place VARCHAR, player VARCHAR);","SELECT place FROM table_name_94 WHERE player = ""jimmy demaret"";","SELECT place FROM table_name_94 WHERE player = ""jimmy demaret"";",1 What is the average rating of eco-friendly hotels in Portugal and Spain?,"CREATE TABLE eco_hotels (hotel_id INT, name TEXT, country TEXT, rating FLOAT); ","SELECT AVG(rating) FROM eco_hotels WHERE country IN ('Portugal', 'Spain');","SELECT AVG(rating) FROM eco_hotels WHERE country IN ('Portugal', 'Spain');",1 How many exhibitions were hosted by the 'Modern Art Museum' in 2015 and 2016 combined?,"CREATE TABLE Exhibitions (exhibition_id INT, museum_name VARCHAR(255), exhibition_year INT);","SELECT COUNT(*) FROM Exhibitions WHERE museum_name = 'Modern Art Museum' AND exhibition_year IN (2015, 2016);","SELECT COUNT(*) FROM Exhibitions WHERE museum_name = 'Modern Art Museum' AND exhibition_year IN (2015, 2016);",1 The episode where the director is Gene Reynolds has who as the writer?,"CREATE TABLE table_26866233_1 (writer VARCHAR, director VARCHAR);","SELECT writer FROM table_26866233_1 WHERE director = ""Gene Reynolds"";","SELECT writer FROM table_26866233_1 WHERE director = ""Gene Reynolds"";",1 What is the total transaction value for decentralized exchanges in the US?,"CREATE TABLE decentralized_exchanges (exchange_name TEXT, country TEXT, daily_transaction_value INTEGER); ",SELECT SUM(daily_transaction_value) FROM decentralized_exchanges WHERE country = 'US';,SELECT SUM(daily_transaction_value) FROM decentralized_exchanges WHERE country = 'USA';,0 How many episodes are 122 in the series?,"CREATE TABLE table_29152820_1 (no_in_season VARCHAR, no_in_series VARCHAR);",SELECT COUNT(no_in_season) FROM table_29152820_1 WHERE no_in_series = 122;,SELECT COUNT(no_in_season) FROM table_29152820_1 WHERE no_in_series = 122;,1 Delete all research grants before 2005,"CREATE TABLE grants (id serial, researcher_id integer, title text, amount real, year integer);",DELETE FROM grants WHERE year < 2005;,DELETE FROM grants WHERE year 2005;,0 What is the venue of the team race that was before 2010?,"CREATE TABLE table_name_13 (venue VARCHAR, notes VARCHAR, year VARCHAR);","SELECT venue FROM table_name_13 WHERE notes = ""team"" AND year < 2010;","SELECT venue FROM table_name_13 WHERE notes = ""team race"" AND year 2010;",0 Which person whose friends have the oldest average age?,"CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR); CREATE TABLE Person (age INTEGER, name VARCHAR);","SELECT T2.name, AVG(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend GROUP BY T2.name ORDER BY AVG(T1.age) DESC LIMIT 1;",SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend ORDER BY AVG(T2.age) DESC LIMIT 1;,0 In which venue does Melbourne play as the home team?,"CREATE TABLE table_name_62 (venue VARCHAR, home_team VARCHAR);","SELECT venue FROM table_name_62 WHERE home_team = ""melbourne"";","SELECT venue FROM table_name_62 WHERE home_team = ""melbourne"";",1 Delete all papers published in a given journal.,"CREATE TABLE publications (publication_id INT, title VARCHAR(50), journal VARCHAR(50)); ",DELETE FROM publications WHERE journal = 'Journal of Computer Science';,DELETE FROM publications WHERE journal = 'Journal';,0 What is the average number of patients served by community health workers in rural areas?,"CREATE TABLE community_health_workers (id INT, name VARCHAR, location VARCHAR, patients_served INT); ","SELECT location, AVG(patients_served) as avg_patients FROM community_health_workers WHERE location = 'Rural' GROUP BY location;",SELECT AVG(patients_served) FROM community_health_workers WHERE location = 'Rural';,0 What is the average age of patients diagnosed with PTSD in the Eastern region?,"CREATE TABLE ptsd_age (patient_id INT, region TEXT, age INT); ",SELECT AVG(age) FROM ptsd_age WHERE region = 'Eastern';,SELECT AVG(age) FROM ptsd_age WHERE region = 'Eastern';,1 What is the number of unique donors by month for the year 2023?,"CREATE TABLE donors (id INT, name VARCHAR(50), cause VARCHAR(50), donation_date DATE); ","SELECT EXTRACT(MONTH FROM donation_date) as month, COUNT(DISTINCT name) as unique_donors FROM donors WHERE donation_date BETWEEN '2023-01-01' AND '2023-12-31' GROUP BY month;","SELECT DATE_FORMAT(donation_date, '%Y-%m') as month, COUNT(DISTINCT id) as unique_donors FROM donors WHERE YEAR(donation_date) = 2023 GROUP BY month;",0 How many community health workers identify as Hispanic or Latino in California?,"CREATE TABLE CommunityHealthWorkers (Id INT, State VARCHAR(255), Ethnicity VARCHAR(255)); ",SELECT COUNT(*) FROM CommunityHealthWorkers WHERE State = 'California' AND Ethnicity = 'Hispanic or Latino';,"SELECT COUNT(*) FROM CommunityHealthWorkers WHERE State = 'California' AND Ethnicity IN ('Hispanic', 'Latino');",0 waht is the last year with a mclaren mp4/10b chassis,"CREATE TABLE table_name_31 (year INTEGER, chassis VARCHAR);","SELECT MAX(year) FROM table_name_31 WHERE chassis = ""mclaren mp4/10b"";","SELECT MAX(year) FROM table_name_31 WHERE chassis = ""mclaren mp4/10b"";",1 "Which Surface has an Opponent in the final of don mcneill, and a Year of 1940?","CREATE TABLE table_name_52 (surface VARCHAR, opponent_in_the_final VARCHAR, year VARCHAR);","SELECT surface FROM table_name_52 WHERE opponent_in_the_final = ""don mcneill"" AND year = 1940;","SELECT surface FROM table_name_52 WHERE opponent_in_the_final = ""don mcneill"" AND year = ""1940"";",0 What is the football Bronze with more than 1 Silver?,"CREATE TABLE table_name_9 (bronze INTEGER, sport VARCHAR, silver VARCHAR);","SELECT AVG(bronze) FROM table_name_9 WHERE sport = ""football"" AND silver > 1;","SELECT AVG(bronze) FROM table_name_9 WHERE sport = ""football"" AND silver > 1;",1 What is the total revenue from mobile and broadband services for each region?,"CREATE TABLE regions (region_id INT, region_name VARCHAR(50)); CREATE TABLE mobile_services (service_id INT, service_name VARCHAR(50), region_id INT, revenue INT); CREATE TABLE broadband_services (service_id INT, service_name VARCHAR(50), region_id INT, revenue INT);","SELECT r.region_name, m.revenue AS mobile_revenue, b.revenue AS broadband_revenue, m.revenue + b.revenue AS total_revenue FROM regions r LEFT JOIN mobile_services m ON r.region_id = m.region_id LEFT JOIN broadband_services b ON r.region_id = b.region_id;","SELECT r.region_name, SUM(ms.revenue) as total_revenue FROM regions r JOIN mobile_services ms ON r.region_id = ms.region_id JOIN broadband_services bs ON r.region_id = bs.region_id GROUP BY r.region_name;",0 Update the marine_life table to set the population of the 'Salmon' species to 16000 for the atlantic_ocean region.,"CREATE TABLE marine_life (id INT, species VARCHAR(255), population INT, region VARCHAR(255)); ",UPDATE marine_life SET population = 16000 WHERE species = 'Salmon' AND region = 'atlantic_ocean';,UPDATE marine_life SET population = 16000 WHERE species = 'Salmon' AND region = 'atlantic_ocean';,1 Which space agencies have launched the most satellites?,"CREATE TABLE satellites_by_agency (satellite_id INT, name VARCHAR(100), agency VARCHAR(100), launch_date DATE);","SELECT agency, COUNT(*) as satellite_count FROM satellites_by_agency GROUP BY agency ORDER BY satellite_count DESC;","SELECT agency, COUNT(*) as launch_count FROM satellites_by_agency GROUP BY agency ORDER BY launch_count DESC LIMIT 1;",0 How many severe vulnerabilities exist in the 'software' table?,"CREATE TABLE software (id INT, name VARCHAR(255), severity VARCHAR(255)); ",SELECT COUNT(*) FROM software WHERE severity = 'severe';,SELECT COUNT(*) FROM software WHERE severity = 'Severe';,0 What is the maximum number of wins in eSports tournaments by a player from North America?,"CREATE TABLE PlayerTournaments (PlayerID INT, TournamentID INT, Wins INT); CREATE TABLE PlayerInfo (PlayerID INT, Country VARCHAR(50)); ",SELECT MAX(Wins) as MaxWins FROM PlayerTournaments INNER JOIN PlayerInfo ON PlayerTournaments.PlayerID = PlayerInfo.PlayerID WHERE Country LIKE 'North%';,SELECT MAX(Wins) FROM PlayerTournaments JOIN PlayerInfo ON PlayerTournaments.PlayerID = PlayerInfo.PlayerID WHERE PlayerInfo.Country = 'North America';,0 List all military equipment maintenance activities performed on aircrafts in the Asia-Pacific region since 2018.,"CREATE TABLE equipment_maintenance (maintenance_id INT, maintenance_date DATE, equipment_type VARCHAR(255), region VARCHAR(255)); ",SELECT * FROM equipment_maintenance WHERE equipment_type = 'aircraft' AND region = 'Asia-Pacific' AND maintenance_date >= '2018-01-01';,SELECT * FROM equipment_maintenance WHERE equipment_type = 'Aerospace' AND region = 'Asia-Pacific' AND maintenance_date >= '2018-01-01';,0 What is the average time taken to fill a job vacancy for the IT department?,"CREATE TABLE JobVacancies (VacancyID INT, Position VARCHAR(50), Department VARCHAR(50), OpenDate DATE, CloseDate DATE);","SELECT AVG(DATEDIFF(CloseDate, OpenDate)) as AvgTimeToFill FROM JobVacancies WHERE Department = 'IT';","SELECT AVG(DATEDIFF(CloseDate, OpenDate)) FROM JobVacancies WHERE Department = 'IT';",0 "What is Score In The Final, when Date is ""22 October 1990""?","CREATE TABLE table_name_94 (score_in_the_final VARCHAR, date VARCHAR);","SELECT score_in_the_final FROM table_name_94 WHERE date = ""22 october 1990"";","SELECT score_in_the_final FROM table_name_94 WHERE date = ""22 october 1990"";",1 Show the ports and their corresponding regional offices for the port_office table.,"CREATE TABLE port_office ( id INT PRIMARY KEY, port VARCHAR(255), region VARCHAR(255) );","SELECT port, region FROM port_office;","SELECT port, region FROM port_office;",1 What is Petersville's census ranking?,"CREATE TABLE table_171356_2 (census_ranking VARCHAR, official_name VARCHAR);","SELECT census_ranking FROM table_171356_2 WHERE official_name = ""Petersville"";","SELECT census_ranking FROM table_171356_2 WHERE official_name = ""Petersville"";",1 What type has rest day as a course and was on 21 may?,"CREATE TABLE table_name_83 (type VARCHAR, course VARCHAR, date VARCHAR);","SELECT type FROM table_name_83 WHERE course = ""rest day"" AND date = ""21 may"";","SELECT type FROM table_name_83 WHERE course = ""rest day"" AND date = ""21 may"";",1 List all properties in Portland with inclusive housing policies.,"CREATE TABLE properties (property_id INT, city VARCHAR(50), has_inclusive_policy BOOLEAN); ","SELECT property_id, city FROM properties WHERE city = 'Portland' AND has_inclusive_policy = TRUE;",SELECT * FROM properties WHERE city = 'Portland' AND has_inclusive_policy = true;,0 "What are the notes for bydgoszcz, Poland?","CREATE TABLE table_name_37 (notes VARCHAR, venue VARCHAR);","SELECT notes FROM table_name_37 WHERE venue = ""bydgoszcz, poland"";","SELECT notes FROM table_name_37 WHERE venue = ""bydgoszcz, poland"";",1 What is the total investment amount for each investor in 2020?,"CREATE TABLE investors (investor_id INT, investor_name VARCHAR(255), investment_amount INT, investment_year INT); ","SELECT investor_name, SUM(investment_amount) as total_investment FROM investors WHERE investment_year = 2020 GROUP BY investor_name;","SELECT investor_name, SUM(investment_amount) as total_investment FROM investors WHERE investment_year = 2020 GROUP BY investor_name;",1 Can you tell me the Opponent that has the Round of 3?,"CREATE TABLE table_name_30 (opponent VARCHAR, round VARCHAR);",SELECT opponent FROM table_name_30 WHERE round = 3;,SELECT opponent FROM table_name_30 WHERE round = 3;,1 What is the number of Goals For for Games Played more than 8?,"CREATE TABLE table_name_44 (goals_for INTEGER, games_played INTEGER);",SELECT SUM(goals_for) FROM table_name_44 WHERE games_played > 8;,SELECT SUM(goals_for) FROM table_name_44 WHERE games_played > 8;,1 What is the Record for week 14?,"CREATE TABLE table_name_88 (record VARCHAR, week VARCHAR);",SELECT record FROM table_name_88 WHERE week = 14;,SELECT record FROM table_name_88 WHERE week = 14;,1 Name the number of party with the incubent james william trimble,"CREATE TABLE table_1341930_5 (party VARCHAR, incumbent VARCHAR);","SELECT COUNT(party) FROM table_1341930_5 WHERE incumbent = ""James William Trimble"";","SELECT COUNT(party) FROM table_1341930_5 WHERE incumbent = ""James William Trimble"";",1 What was the market access strategy for 'DrugA' in 'CountryX'?,"CREATE TABLE market_access (drug varchar(20), country varchar(20), strategy varchar(50)); ",SELECT strategy FROM market_access WHERE drug = 'DrugA' AND country = 'CountryX';,SELECT strategy FROM market_access WHERE drug = 'DrugA' AND country = 'CountryX';,1 Delete records of vehicles from the 'AutoShows' database that are not in the 'HybridVehicles' table.,"CREATE TABLE AutoShows (Id INT, Vehicle VARCHAR(50), Year INT, Displayed VARCHAR(5)); CREATE TABLE HybridVehicles (Id INT, Make VARCHAR(50), Model VARCHAR(50), Year INT, Horsepower INT);",DELETE FROM AutoShows WHERE Vehicle NOT IN (SELECT Model FROM HybridVehicles);,DELETE FROM AutoShows WHERE Vehicle NOT IN (SELECT Vehicle FROM HybridVehicles);,0 Find the number of unique customers who benefited from socially responsible lending in Florida?,"CREATE TABLE customers (id INT, loan_id INT, name TEXT, city TEXT); ",SELECT COUNT(DISTINCT customers.id) FROM customers JOIN transactions ON customers.loan_id = transactions.id WHERE transactions.is_shariah_compliant = FALSE AND transactions.id IN (SELECT loan_id FROM transactions WHERE transaction_type = 'Disbursement');,SELECT COUNT(DISTINCT id) FROM customers WHERE city = 'Florida' AND loan_id IN (SELECT loan_id FROM loans WHERE city = 'Florida');,0 List all residential broadband customers in New York who have a monthly data usage over 60 GB.,"CREATE TABLE residential_customers (customer_id INT, state VARCHAR(255), monthly_data_usage DECIMAL(5,2)); ",SELECT customer_id FROM residential_customers WHERE state = 'New York' AND monthly_data_usage > 60;,SELECT * FROM residential_customers WHERE state = 'New York' AND monthly_data_usage > 60;,0 "What Authority has a decile greater than 5, with a roll of 170?","CREATE TABLE table_name_62 (authority VARCHAR, decile VARCHAR, roll VARCHAR);",SELECT authority FROM table_name_62 WHERE decile > 5 AND roll = 170;,SELECT authority FROM table_name_62 WHERE decile > 5 AND roll = 170;,1 Name the team of vitali yeremeyev,"CREATE TABLE table_name_97 (nhl_team VARCHAR, player VARCHAR);","SELECT nhl_team FROM table_name_97 WHERE player = ""vitali yeremeyev"";","SELECT nhl_team FROM table_name_97 WHERE player = ""vitali yeremeyev"";",1 Which threat actors have targeted organizations in the United States?,"CREATE TABLE threat_actors (id INT, name VARCHAR, country VARCHAR); CREATE TABLE attacks (id INT, threat_actor_id INT, target_country VARCHAR); ",SELECT threat_actors.name FROM threat_actors INNER JOIN attacks ON threat_actors.id = attacks.threat_actor_id WHERE attacks.target_country = 'United States';,SELECT t.name FROM threat_actors t JOIN attacks a ON t.id = a.threat_actor_id WHERE t.country = 'United States';,0 What is the total number of community education programs in each country?,"CREATE TABLE education_programs (id INT, name VARCHAR(50), country VARCHAR(50), programs INT); ","SELECT country, SUM(programs) FROM education_programs GROUP BY country;","SELECT country, SUM(programs) FROM education_programs GROUP BY country;",1 The EVA that started on 8 July 12:38 went for how long?,"CREATE TABLE table_name_83 (duration VARCHAR, start_date_time VARCHAR);","SELECT duration FROM table_name_83 WHERE start_date_time = ""8 july 12:38"";","SELECT duration FROM table_name_83 WHERE start_date_time = ""8 july 12:38"";",1 What is the maximum environmental impact score for mining projects in Europe?,"CREATE TABLE environmental_impact (project_id INT, region TEXT, score INT); ",SELECT MAX(score) FROM environmental_impact WHERE region = 'Europe';,SELECT MAX(score) FROM environmental_impact WHERE region = 'Europe';,1 "What is the percentage of children living in poverty for each county, considering only those counties with a population greater than 500,000, from the poverty_data and county_demographics tables?","CREATE TABLE poverty_data (county TEXT, children_in_poverty INT); CREATE TABLE county_demographics (county TEXT, population INT); ","SELECT county, (100.0 * children_in_poverty::FLOAT / population) AS pct_children_in_poverty FROM poverty_data JOIN county_demographics ON poverty_data.county = county_demographics.county WHERE population > 500000;","SELECT poverty_data.county, poverty_demographics.county, poverty_data.children_in_poverty * 100.0 / poverty_data.county FROM poverty_data INNER JOIN county_demographics ON poverty_data.county = county_demographics.county WHERE poverty_data.children_in_poverty > 500000 GROUP BY poverty_data.county;",0 "If the manufacturer is Proton Kr and the grid was over 10, what was the time retired?","CREATE TABLE table_name_79 (time_retired VARCHAR, grid VARCHAR, manufacturer VARCHAR);","SELECT time_retired FROM table_name_79 WHERE grid > 10 AND manufacturer = ""proton kr"";","SELECT time_retired FROM table_name_79 WHERE grid > 10 AND manufacturer = ""proton kr"";",1 Delete defense contract records with a value higher than $100 million for a specific contractor?,"CREATE TABLE DefenseContracts (ContractID INT, Contractor VARCHAR(50), Value DECIMAL(10,2)); ",DELETE FROM DefenseContracts WHERE Contractor = 'Northrop Grumman' AND Value > 100000000;,DELETE FROM DefenseContracts WHERE Value > 1000000000 AND Contractor = 'Attorney General';,0 What is the total funding amount for biosensor technology development in Germany?,"CREATE SCHEMA if not exists biosensors;CREATE TABLE if not exists biosensors.tech_development (id INT, name TEXT, location TEXT, type TEXT, funding DECIMAL(10,2)); ",SELECT SUM(funding) FROM biosensors.tech_development WHERE location = 'DE' AND type = 'Biosensor';,SELECT SUM(funding) FROM biosensors.tech_development WHERE location = 'Germany' AND type = 'Biosensor';,0 What is the average age of artists when they created their masterpieces?,"CREATE TABLE Artworks (ArtworkID INT, Name VARCHAR(100), Artist VARCHAR(100), Year INT);",SELECT (AVG(YEAR(CURRENT_DATE) - Artworks.Year) / COUNT(DISTINCT Artworks.Artist)) AS AverageAge,SELECT AVG(Year) FROM Artworks;,0 Name the rating for 3.79 viewers,"CREATE TABLE table_22822468_2 (rating VARCHAR, viewers__millions_ VARCHAR);","SELECT rating / SHARE(18 AS –49) FROM table_22822468_2 WHERE viewers__millions_ = ""3.79"";","SELECT rating FROM table_22822468_2 WHERE viewers__millions_ = ""3.79"";",0 What year did a short course have a time of 7:51.80?,"CREATE TABLE table_name_24 (year_set VARCHAR, long_course_short_course VARCHAR, time VARCHAR);","SELECT COUNT(year_set) FROM table_name_24 WHERE long_course_short_course = ""short course"" AND time = ""7:51.80"";","SELECT year_set FROM table_name_24 WHERE long_course_short_course = ""short course"" AND time = ""7:51.80"";",0 What are the names and launch dates of all space missions launched by ISA?,"CREATE TABLE space_missions (mission_id INT, name VARCHAR(100), launch_date DATE, launching_agency VARCHAR(50)); ","SELECT name, launch_date FROM space_missions WHERE launching_agency = 'ISA';","SELECT name, launch_date FROM space_missions WHERE launching_agency = 'ISA';",1 List all festivals that have an attendance greater than 50000,"CREATE TABLE festivals (festival_id INT PRIMARY KEY, festival_name VARCHAR(100), location VARCHAR(100), attendance INT); ",SELECT festival_name FROM festivals WHERE attendance > 50000;,SELECT festival_name FROM festivals WHERE attendance > 50000;,1 "List the VR game design elements, including their unique IDs, names, genres, and the number of levels, for games that support multiplayer mode and have at least 10 levels.","CREATE TABLE GameDesign (GameID INT, Name VARCHAR(50), Genre VARCHAR(20), Multiplayer BOOLEAN, NumLevels INT); ","SELECT GameID, Name, Genre, NumLevels FROM GameDesign WHERE Multiplayer = TRUE AND NumLevels >= 10;","SELECT DISTINCT GameID, Name, Genre, NumLevels FROM GameDesign WHERE Multiplayer = TRUE AND NumLevels >= 10;",0 What is the average number of silver medals of the nation with 3 bronzes and more than 4 total medals?,"CREATE TABLE table_name_79 (silver INTEGER, bronze VARCHAR, total VARCHAR);",SELECT AVG(silver) FROM table_name_79 WHERE bronze = 3 AND total > 4;,SELECT AVG(silver) FROM table_name_79 WHERE bronze = 3 AND total > 4;,1 "Which Outcome has a Launch Date of march 18, 1964; 14:50 gmt?","CREATE TABLE table_name_32 (outcomes VARCHAR, launch_date VARCHAR);","SELECT outcomes FROM table_name_32 WHERE launch_date = ""march 18, 1964; 14:50 gmt"";","SELECT outcomes FROM table_name_32 WHERE launch_date = ""march 18, 1964; 14:50 gmt"";",1 How many total goals were scored in games where goals conceded was 35?,"CREATE TABLE table_16034882_2 (goals_scored VARCHAR, goals_conceded VARCHAR);",SELECT COUNT(goals_scored) FROM table_16034882_2 WHERE goals_conceded = 35;,SELECT COUNT(goals_scored) FROM table_16034882_2 WHERE goals_conceded = 35;,1 What was the To par for the player who finished t56?,"CREATE TABLE table_name_84 (to_par VARCHAR, finish VARCHAR);","SELECT to_par FROM table_name_84 WHERE finish = ""t56"";","SELECT to_par FROM table_name_84 WHERE finish = ""t56"";",1 "What is the value for positional opponents with no material or non-material, and 3 suits?","CREATE TABLE table_name_92 (opponents VARCHAR, suits VARCHAR, positional_or_automatic VARCHAR, material_or_non_material VARCHAR);","SELECT opponents FROM table_name_92 WHERE positional_or_automatic = ""positional"" AND material_or_non_material = ""no"" AND suits = ""3"";","SELECT opponents FROM table_name_92 WHERE positional_or_automatic = ""no"" AND material_or_non_material = ""no"" AND suits = ""3"";",0 Get the number of REO types produced in each mine in 2022 from the reo_production table,"CREATE TABLE reo_production (id INT PRIMARY KEY, reo_type VARCHAR(50), mine_name VARCHAR(50), production_year INT);","SELECT mine_name, COUNT(DISTINCT reo_type) FROM reo_production WHERE production_year = 2022 GROUP BY mine_name;","SELECT mine_name, COUNT(*) FROM reo_production WHERE production_year = 2022 GROUP BY mine_name;",0 What are the maximum and minimum exploration costs for each country in South America?,"CREATE TABLE exploration (exp_id INT, exp_country TEXT, cost INT); ","SELECT exp_country, MAX(cost) AS max_cost, MIN(cost) AS min_cost FROM exploration GROUP BY exp_country;","SELECT exp_country, MAX(cost) as max_cost, MIN(cost) as min_cost FROM exploration GROUP BY exp_country;",0 "I want the tuner for hybrid video recorder and Digital of dvb-t (zl10353), and a Model of hvr-900","CREATE TABLE table_name_32 (tuner VARCHAR, model VARCHAR, type VARCHAR, digital VARCHAR);","SELECT tuner FROM table_name_32 WHERE type = ""hybrid video recorder"" AND digital = ""dvb-t (zl10353)"" AND model = ""hvr-900"";","SELECT tuner FROM table_name_32 WHERE type = ""hybrid video recorder"" AND digital = ""dvb-t (zl10353)"" AND model = ""hvr-900"";",1 "Insert a new record for oil production of 1,000,000 in 'Venezuela' for the year 2020.","CREATE TABLE production (production_id INT, location VARCHAR(255), year INT, oil_production FLOAT); ","INSERT INTO production (location, year, oil_production) VALUES ('Venezuela', 2020, 1000000);","INSERT INTO production (production_id, location, year, oil_production) VALUES (1, 'Venezuela', 2020, 1,000,000);",0 What was the game site week 15?,"CREATE TABLE table_name_79 (game_site VARCHAR, week VARCHAR);",SELECT game_site FROM table_name_79 WHERE week = 15;,SELECT game_site FROM table_name_79 WHERE week = 15;,1 What is the total sales of dishes in each category?,"CREATE TABLE Orders (OrderID INT, DishID INT, Quantity INT, OrderDate DATE); CREATE TABLE Dishes (DishID INT, DishName VARCHAR(50), Category VARCHAR(50), Price DECIMAL(5,2)); ","SELECT Category, SUM(Quantity * Price) as TotalSales FROM Orders JOIN Dishes ON Orders.DishID = Dishes.DishID GROUP BY Category;","SELECT Category, SUM(Quantity) as TotalSales FROM Orders JOIN Dishes ON Orders.DishID = Dishes.DishID GROUP BY Category;",0 "What is the average against of Murrayfield, Edinburgh?","CREATE TABLE table_name_13 (against INTEGER, venue VARCHAR);","SELECT AVG(against) FROM table_name_13 WHERE venue = ""murrayfield, edinburgh"";","SELECT AVG(against) FROM table_name_13 WHERE venue = ""murrayfield, edinburgh"";",1 What is the chassis for Augusto Scalbi on Team RP Motorsport?,"CREATE TABLE table_name_34 (chassis VARCHAR, team VARCHAR, driver VARCHAR);","SELECT chassis FROM table_name_34 WHERE team = ""rp motorsport"" AND driver = ""augusto scalbi"";","SELECT chassis FROM table_name_34 WHERE team = ""rp motorsport"" AND driver = ""augusto scalebi"";",0 What is the total number of laps during the race that had a time of +9.682?,"CREATE TABLE table_name_6 (laps VARCHAR, time_retired VARCHAR);","SELECT COUNT(laps) FROM table_name_6 WHERE time_retired = ""+9.682"";","SELECT COUNT(laps) FROM table_name_6 WHERE time_retired = ""+9.682"";",1 What date was the Week 3 game played?,"CREATE TABLE table_name_18 (date VARCHAR, week VARCHAR);",SELECT date FROM table_name_18 WHERE week = 3;,SELECT date FROM table_name_18 WHERE week = 3;,1 What is the total number of students and teachers in each district?,"CREATE TABLE districts (district_id INT, num_students INT, num_teachers INT); ","SELECT district_id, SUM(num_students) as total_students, SUM(num_teachers) as total_teachers FROM districts GROUP BY district_id;","SELECT district_id, SUM(num_students) as total_students, SUM(num_teachers) as total_teachers FROM districts GROUP BY district_id;",1 How much did the away team score at victoria park?,"CREATE TABLE table_name_57 (away_team VARCHAR, venue VARCHAR);","SELECT away_team AS score FROM table_name_57 WHERE venue = ""victoria park"";","SELECT away_team AS score FROM table_name_57 WHERE venue = ""victoria park"";",1 What is the total funding received by biotech startups based in the United States?,"CREATE SCHEMA if not exists biotech; CREATE TABLE if not exists biotech.startups (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), funding FLOAT); ",SELECT SUM(funding) FROM biotech.startups WHERE location = 'USA';,SELECT SUM(funding) FROM biotech.startups WHERE location = 'United States';,0 Delete all records from the 'landfill_capacity' table where the 'country' is 'Mexico',"CREATE TABLE landfill_capacity (id INT, city VARCHAR(255), state VARCHAR(255), country VARCHAR(255), capacity INT);",DELETE FROM landfill_capacity WHERE country = 'Mexico';,DELETE FROM landfill_capacity WHERE country = 'Mexico';,1 What is the total production quantity of samarium in India for the year 2017?,"CREATE TABLE SamariumProduction (country VARCHAR(20), year INT, quantity INT); ",SELECT SUM(quantity) FROM SamariumProduction WHERE country = 'India' AND year = 2017;,SELECT SUM(quantity) FROM SamariumProduction WHERE country = 'India' AND year = 2017;,1 what's the team with stadium being borough briggs,"CREATE TABLE table_14003108_1 (team VARCHAR, stadium VARCHAR);","SELECT team FROM table_14003108_1 WHERE stadium = ""Borough Briggs"";","SELECT team FROM table_14003108_1 WHERE stadium = ""Boston Briggs"";",0 "Which recycling rates are higher, for municipal solid waste or for industrial waste, in the European Union?","CREATE TABLE RecyclingRates (WasteType VARCHAR(50), Region VARCHAR(50), RecyclingRate DECIMAL(5,2)); ","SELECT WasteType, RecyclingRate FROM RecyclingRates WHERE Region = 'European Union' AND WasteType IN ('Municipal Solid Waste', 'Industrial Waste') ORDER BY RecyclingRate DESC LIMIT 1;",SELECT RecyclingRate FROM RecyclingRates WHERE WasteType = 'Municipal Solid Waste' OR WasteType = 'Industrial Waste' AND Region = 'European Union';,0 "What is the maximum number of followers for any user, and what is their location?","CREATE TABLE users (id INT, name VARCHAR(50), location VARCHAR(50), followers INT); ","SELECT location, MAX(followers) as max_followers FROM users;","SELECT location, MAX(followers) as max_followers FROM users GROUP BY location;",0 "How many customers are there in each age group (young adults, middle-aged, seniors)?","CREATE TABLE customers (id INT, name VARCHAR(255), age INT, account_balance DECIMAL(10, 2)); ","SELECT CASE WHEN age BETWEEN 18 AND 35 THEN 'Young adults' WHEN age BETWEEN 36 AND 60 THEN 'Middle-aged' ELSE 'Seniors' END AS age_group, COUNT(*) FROM customers GROUP BY age_group;","SELECT age, COUNT(*) FROM customers GROUP BY age;",0 What is the maximum age of dams in Oregon?,"CREATE TABLE Dams (id INT, name TEXT, location TEXT, state TEXT, built DATE); ","SELECT MAX(DATEDIFF(CURDATE(), built) / 365.25) FROM Dams WHERE state = 'Oregon';",SELECT MAX(build_date) FROM Dams WHERE state = 'Oregon';,0 What is the total number of manufacturers producing garments in the European Union?,"CREATE TABLE countries (country_id INT, country_name VARCHAR(255), region VARCHAR(50));CREATE TABLE manufacturers (manufacturer_id INT, manufacturer_name VARCHAR(255), country_id INT);",SELECT COUNT(DISTINCT m.manufacturer_id) AS total_manufacturers FROM manufacturers m JOIN countries c ON m.country_id = c.country_id WHERE c.region = 'European Union';,SELECT COUNT(*) FROM manufacturers m JOIN countries c ON m.country_id = c.country_id WHERE c.region = 'European Union';,0 How many medical check-ups have been conducted for astronauts in the last 6 months?,"CREATE TABLE astronauts (astronaut_id INT, name VARCHAR(100), last_medical_checkup DATE); ","SELECT COUNT(*) FROM astronauts WHERE last_medical_checkup >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);","SELECT COUNT(*) FROM astronauts WHERE last_medical_checkup >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",1 What set 2 has a total of 97–74?,"CREATE TABLE table_name_85 (set_2 VARCHAR, total VARCHAR);","SELECT set_2 FROM table_name_85 WHERE total = ""97–74"";","SELECT set_2 FROM table_name_85 WHERE total = ""97–74"";",1 What is the total number of inclusive housing units in Portland and San Francisco?,"CREATE TABLE housing (id INT, units INT, city VARCHAR(20), inclusive BOOLEAN); ","SELECT SUM(units) FROM housing WHERE inclusive = TRUE AND city IN ('Portland', 'San Francisco');","SELECT SUM(units) FROM housing WHERE city IN ('Portland', 'San Francisco') AND inclusive = true;",0 What is the total revenue of ethical fashion brands with gender-neutral collections?,"CREATE TABLE EthicalBrands (name VARCHAR(100), gender_neutral BOOLEAN, revenue DECIMAL(15,2));",SELECT SUM(revenue) FROM EthicalBrands WHERE gender_neutral = TRUE;,SELECT SUM(revenue) FROM EthicalBrands WHERE gender_neutral = true;,0 "What is the total number of gold medals of the ranked 2nd nation, which has less than 2 silvers?","CREATE TABLE table_name_16 (gold VARCHAR, rank VARCHAR, silver VARCHAR);","SELECT COUNT(gold) FROM table_name_16 WHERE rank = ""2"" AND silver < 2;","SELECT COUNT(gold) FROM table_name_16 WHERE rank = ""2nd nation"" AND silver 2;",0 Find the number of Obesity cases recorded in California in 2020.,"CREATE TABLE HealthStats (Year INT, Disease VARCHAR(20), State VARCHAR(20), Cases INT); ",SELECT SUM(Cases) FROM HealthStats WHERE Disease = 'Obesity' AND State = 'California' AND Year = 2020;,SELECT SUM(Cases) FROM HealthStats WHERE Year = 2020 AND Disease = 'Obesity' AND State = 'California';,0 What is the total area covered by marine protected areas in the Indian Ocean that are deeper than 3000 meters?,"CREATE TABLE marine_protected_areas (id INT, name VARCHAR(255), area_size FLOAT, avg_depth FLOAT, region VARCHAR(255)); ",SELECT SUM(area_size) FROM marine_protected_areas WHERE region = 'Indian' AND avg_depth > 3000;,SELECT SUM(area_size) FROM marine_protected_areas WHERE region = 'Indian Ocean' AND avg_depth > 3000;,0 How many weeks total are there?,CREATE TABLE table_24989925_2 (week INTEGER);,SELECT MAX(week) FROM table_24989925_2;,SELECT SUM(week) FROM table_24989925_2;,0 What is the percentage of sustainable material used out of the total material used by each brand?,"CREATE TABLE Brands (BrandID INT, BrandName VARCHAR(50)); CREATE TABLE Materials (MaterialID INT, MaterialName VARCHAR(50), BrandID INT, QuantityUsed INT, TotalQuantity INT); ","SELECT BrandName, (SUM(QuantityUsed) * 100.0 / SUM(TotalQuantity)) AS Percentage FROM Materials GROUP BY BrandName;","SELECT b.BrandName, (COUNT(m.MaterialID) * 100.0 / (SELECT COUNT(m.MaterialID) FROM Materials m JOIN Brands b ON m.BrandID = b.BrandID GROUP BY b.BrandName)) * 100.0 / (SELECT COUNT(m.MaterialID) FROM Materials m JOIN Brands b ON m.BrandID = b.BrandID GROUP BY b.BrandName)) FROM Brands b JOIN Materials m ON m.BrandID = m.BrandID GROUP BY b.BrandName;",0 Insert a new record into the 'articles' table with the title 'Artificial Intelligence in Journalism',"CREATE TABLE articles (id INT, title VARCHAR(100), published_date DATE);",INSERT INTO articles (title) VALUES ('Artificial Intelligence in Journalism');,"INSERT INTO articles (title, published_date) VALUES ('Artificial Intelligence in Journalism');",0 What is Oriol Servia's average Grid on races with more than 43 laps?,"CREATE TABLE table_name_10 (grid INTEGER, laps VARCHAR, driver VARCHAR);","SELECT AVG(grid) FROM table_name_10 WHERE laps > 43 AND driver = ""oriol servia"";","SELECT AVG(grid) FROM table_name_10 WHERE laps > 43 AND driver = ""oriol servia"";",1 What is the lowest Rank with a Nation that is east germany?,"CREATE TABLE table_name_43 (rank INTEGER, nation VARCHAR);","SELECT MIN(rank) FROM table_name_43 WHERE nation = ""east germany"";","SELECT MIN(rank) FROM table_name_43 WHERE nation = ""east germany"";",1 What is the market share of 'DrugD' in the 'Neurology' therapeutic area in 2021?,"CREATE TABLE market_share (drug VARCHAR(50), therapeutic_area VARCHAR(50), year INT, market_share FLOAT); ",SELECT market_share FROM market_share WHERE drug = 'DrugD' AND therapeutic_area = 'Neurology' AND year = 2021;,SELECT market_share FROM market_share WHERE drug = 'DrugD' AND therapeutic_area = 'Neurology' AND year = 2021;,1 List all projects with a negotiation date in 2022 and their associated contract amounts.,"CREATE TABLE Projects (id INT, project_name VARCHAR(255), start_date DATE, end_date DATE, region VARCHAR(255)); CREATE TABLE Contracts (id INT, equipment_type VARCHAR(255), contract_amount DECIMAL(10,2), negotiation_date DATE, project_id INT); ","SELECT Contracts.equipment_type, Contracts.contract_amount FROM Contracts WHERE Contracts.negotiation_date BETWEEN '2022-01-01' AND '2022-12-31';","SELECT Projects.project_name, Contracts.contract_amount FROM Projects INNER JOIN Contracts ON Projects.id = Contracts.project_id WHERE Contracts.negotiation_date BETWEEN '2022-01-01' AND '2022-12-31';",0 "List the top 5 products with the highest sales amount, showing the salesperson, product, and sales amount.","CREATE TABLE sales_person_data (salesperson VARCHAR(20), product VARCHAR(20), sales_amount DECIMAL(10,2)); ","SELECT salesperson, product, sales_amount FROM sales_person_data ORDER BY sales_amount DESC LIMIT 5;","SELECT salesperson, product, sales_amount FROM sales_person_data ORDER BY sales_amount DESC LIMIT 5;",1 "What week ended in a result of w 30-3, and had an attendance less than 62,795?","CREATE TABLE table_name_53 (week INTEGER, result VARCHAR, attendance VARCHAR);","SELECT MIN(week) FROM table_name_53 WHERE result = ""w 30-3"" AND attendance < 62 OFFSET 795;","SELECT AVG(week) FROM table_name_53 WHERE result = ""w 30-3"" AND attendance 62 OFFSET 795;",0 "Show the carbon offset projects in Africa, sorted by the amount of carbon offset in descending order.","CREATE TABLE Africa_Carbon_Offset (project VARCHAR(255), carbon_offset INT); ","SELECT project, carbon_offset FROM Africa_Carbon_Offset ORDER BY carbon_offset DESC;","SELECT project, carbon_offset FROM Africa_Carbon_Offset ORDER BY carbon_offset DESC;",1 Who are the top 5 suppliers with the highest number of fair trade certifications?,"CREATE TABLE Suppliers (id INT, name TEXT, fair_trade_certifications INT); ","SELECT name, fair_trade_certifications FROM Suppliers ORDER BY fair_trade_certifications DESC LIMIT 5;","SELECT name, fair_trade_certifications FROM Suppliers ORDER BY fair_trade_certifications DESC LIMIT 5;",1 List all disability support programs without a website,"CREATE TABLE disability_programs (id INT PRIMARY KEY, name VARCHAR(255), description TEXT, website VARCHAR(255));","SELECT name, description FROM disability_programs WHERE website IS NULL;",SELECT * FROM disability_programs WHERE website IS NULL;,0 Which dish has the highest profit margin?,"CREATE TABLE dishes (id INT, name TEXT, type TEXT, price DECIMAL, cost DECIMAL); CREATE TABLE orders (id INT, dish_id INT, quantity INT); ","SELECT dishes.name, (dishes.price - dishes.cost) * orders.quantity AS profit FROM dishes JOIN orders ON dishes.id = orders.dish_id WHERE (dishes.price - dishes.cost) * orders.quantity = (SELECT MAX((dishes.price - dishes.cost) * orders.quantity) FROM dishes JOIN orders ON dishes.id = orders.dish_id);","SELECT d.name, MAX(o.quantity) as max_profit_margin FROM dishes d JOIN orders o ON d.id = o.dish_id GROUP BY d.name;",0 Which vessels have a type of 'Tanker'?,"CREATE TABLE Vessels (ID VARCHAR(20), Name VARCHAR(20), Type VARCHAR(20), AverageSpeed FLOAT); ",SELECT Name FROM Vessels WHERE Type = 'Tanker';,SELECT Name FROM Vessels WHERE Type = 'Tanker';,1 Who wrote Episode 2-15 (56)?,"CREATE TABLE table_name_51 (writer_s_ VARCHAR, episode VARCHAR);","SELECT writer_s_ FROM table_name_51 WHERE episode = ""2-15 (56)"";","SELECT writer_s_ FROM table_name_51 WHERE episode = ""2-15 (56)"";",1 Who was the winner against finalist Lina Krasnoroutskaya?,"CREATE TABLE table_name_92 (winner VARCHAR, finalist VARCHAR);","SELECT winner FROM table_name_92 WHERE finalist = ""lina krasnoroutskaya"";","SELECT winner FROM table_name_92 WHERE finalist = ""lina krasnoroutskaya"";",1 Update the environmental violations with violation IDs '12345' and '67890' with new fines.,"CREATE TABLE EnvironmentalViolations (ViolationID INT, ViolationDate DATE, Description VARCHAR(255), FineAmount DECIMAL(10,2), MineID INT);","WITH updated_violations AS (UPDATE EnvironmentalViolations SET FineAmount = 8000 WHERE ViolationID IN (12345, 67890) RETURNING *) SELECT * FROM updated_violations;","UPDATE EnvironmentalViolations SET FineAmount = FineAmount * 12345 WHERE ViolationID IN (12345, 67890);",0 "What is the Name of the Player from Albuquerque, New Mexico?","CREATE TABLE table_name_69 (name VARCHAR, hometown VARCHAR);","SELECT name FROM table_name_69 WHERE hometown = ""albuquerque, new mexico"";","SELECT name FROM table_name_69 WHERE hometown = ""albuquerque, new mexico"";",1 What is the average age of all satellites launched by SpaceX?,"CREATE TABLE satellites (id INT, name VARCHAR(255), country VARCHAR(255), launch_date DATE, age INT); ",SELECT AVG(age) FROM satellites WHERE country = 'USA';,SELECT AVG(age) FROM satellites WHERE company = 'SpaceX';,0 What is the total budget for each department in Q1 of 2021?,"CREATE TABLE Departments (DepartmentID INT, DepartmentName VARCHAR(255)); CREATE TABLE Budget (BudgetID INT, DepartmentID INT, Amount DECIMAL(10,2), BudgetDate DATE);","SELECT Departments.DepartmentID, Departments.DepartmentName, SUM(Budget.Amount) as TotalBudget FROM Budget INNER JOIN Departments ON Budget.DepartmentID = Departments.DepartmentID WHERE QUARTER(Budget.BudgetDate) = 1 AND YEAR(Budget.BudgetDate) = 2021 GROUP BY Departments.DepartmentID, Departments.DepartmentName;","SELECT d.DepartmentName, SUM(b.Amount) as TotalBudget FROM Departments d JOIN Budget b ON d.DepartmentID = b.DepartmentID WHERE b.BudgetDate BETWEEN '2021-01-01' AND '2021-06-30' GROUP BY d.DepartmentName;",0 What is the total revenue generated from 'Premium' memberships in the 'Midwest' region for the year 2022?,"CREATE SCHEMA fitness; CREATE TABLE memberships (id INT, member_name VARCHAR(50), region VARCHAR(50), membership_type VARCHAR(50), price DECIMAL(5,2), start_date DATE, end_date DATE); ",SELECT SUM(price) FROM fitness.memberships WHERE region = 'Midwest' AND membership_type = 'Premium' AND YEAR(start_date) = 2022 AND YEAR(end_date) = 2022;,SELECT SUM(price) FROM fitness.memberships WHERE membership_type = 'Premium' AND region = 'Midwest' AND YEAR(start_date) = 2022;,0 What is every composition name when the music library is Heart of Asia and media type is album with the Trance genre?,"CREATE TABLE table_23829490_1 (composition_name VARCHAR, genre VARCHAR, music_library VARCHAR, media_type VARCHAR);","SELECT composition_name FROM table_23829490_1 WHERE music_library = ""Heart of Asia"" AND media_type = ""Album"" AND genre = ""Trance"";","SELECT composition_name FROM table_23829490_1 WHERE music_library = ""Heart of Asia"" AND media_type = ""Album"" AND genre = ""Trance"";",1 Delete records in the water_usage table where usage is over 50,"CREATE TABLE water_usage (location VARCHAR(255), usage INT);",DELETE FROM water_usage WHERE usage > 50;,DELETE FROM water_usage WHERE usage > 50;,1 What is the total rainfall in Southeast Asia for the past year from satellite imagery analysis?,"CREATE TABLE if not exists satellite_data (id INT, location VARCHAR(255), rainfall INT, image_date DATETIME); ","SELECT SUM(rainfall) FROM satellite_data WHERE location LIKE 'Southeast%' AND image_date BETWEEN DATE_SUB(NOW(), INTERVAL 1 YEAR) AND NOW();","SELECT SUM(rainfall) FROM satellite_data WHERE location = 'Southeast Asia' AND image_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 What club has 36 points?,"CREATE TABLE table_13758945_1 (club VARCHAR, points VARCHAR);","SELECT club FROM table_13758945_1 WHERE points = ""36"";",SELECT club FROM table_13758945_1 WHERE points = 36;,0 Find the average hours played per day by players who have played VR games for more than 5 hours,"CREATE TABLE GameSessions (PlayerID INT, GamePreference VARCHAR(20), HoursPlayed DECIMAL(5,2)); CREATE TABLE DailyPlaytime (PlayerID INT, HoursPlayed DECIMAL(5,2)); ",SELECT AVG(DailyPlaytime.HoursPlayed) FROM DailyPlaytime INNER JOIN GameSessions ON DailyPlaytime.PlayerID = GameSessions.PlayerID WHERE GameSessions.GamePreference = 'VR' AND GameSessions.HoursPlayed > 5.0;,SELECT AVG(DailyPlaytime.HoursPlayed) FROM DailyPlaytime INNER JOIN GameSessions ON DailyPlaytime.PlayerID = GameSessions.PlayerID WHERE GameSessions.GamePreference = 'VR' AND GameSessions.HoursPlayed > 5;,0 What left office does the First Minister of henry mcleish belong to?,"CREATE TABLE table_name_49 (left_office VARCHAR, first_minister VARCHAR);","SELECT left_office FROM table_name_49 WHERE first_minister = ""henry mcleish"";","SELECT left_office FROM table_name_49 WHERE first_minister = ""henry mcleish"";",1 What subdivision names (RU) have a code of by-hr?,"CREATE TABLE table_290017_1 (subdivision_name___ru____bgn_pcgn_ VARCHAR, code VARCHAR);","SELECT subdivision_name___ru____bgn_pcgn_ FROM table_290017_1 WHERE code = ""BY-HR"";","SELECT subdivision_name___ru___bgn_pcgn_ FROM table_290017_1 WHERE code = ""by-hr"";",0 when 68 is the episode number what is the series number?,"CREATE TABLE table_28967275_3 (series__number VARCHAR, episode__number VARCHAR);",SELECT series__number FROM table_28967275_3 WHERE episode__number = 68;,SELECT series__number FROM table_28967275_3 WHERE episode__number = 68;,1 "Tell me the result for week less than 4 and september 7, 1986","CREATE TABLE table_name_46 (result VARCHAR, week VARCHAR, date VARCHAR);","SELECT result FROM table_name_46 WHERE week < 4 AND date = ""september 7, 1986"";","SELECT result FROM table_name_46 WHERE week 4 AND date = ""september 7, 1986"";",0 What are the conservation statuses of marine species in the Pacific Ocean?,"CREATE TABLE PacificSpecies (species_name TEXT, conservation_status TEXT); CREATE TABLE MarineSpecies (species_name TEXT, habitat TEXT); ","SELECT MarineSpecies.species_name, PacificSpecies.conservation_status FROM MarineSpecies INNER JOIN PacificSpecies ON MarineSpecies.species_name = PacificSpecies.species_name;",SELECT PacificSpecies.conservation_status FROM PacificSpecies INNER JOIN MarineSpecies ON PacificSpecies.species_name = MarineSpecies.species_name WHERE PacificSpecies.habitat = 'Pacific Ocean';,0 What is the total number of bridges in the 'Bridges' table built before 2000?,"CREATE TABLE Bridges (ID INT, Name VARCHAR(50), Location VARCHAR(50), DateAdded DATE); ",SELECT COUNT(*) FROM Bridges WHERE DateAdded < '2000-01-01';,SELECT COUNT(*) FROM Bridges WHERE DateAdded '2000-01-01';,0 How many users in the 'East Coast' region have a membership type of 'Basic'?,"CREATE SCHEMA fitness; CREATE TABLE memberships (id INT, member_name VARCHAR(50), region VARCHAR(50), membership_type VARCHAR(50), price DECIMAL(5,2), start_date DATE, end_date DATE); ",SELECT COUNT(*) FROM fitness.memberships WHERE region = 'East Coast' AND membership_type = 'Basic';,SELECT COUNT(*) FROM fitness.memberships WHERE region = 'East Coast' AND membership_type = 'Basic';,1 What is the average carbon price and total carbon emitted in Spain for 2020?,"CREATE TABLE country (id INT PRIMARY KEY, name VARCHAR(50));CREATE TABLE carbon_price (id INT PRIMARY KEY, name VARCHAR(50), country_id INT, FOREIGN KEY (country_id) REFERENCES country(id), price DECIMAL(10,2));CREATE TABLE carbon_emission (id INT PRIMARY KEY, date DATE, source_id INT, FOREIGN KEY (source_id) REFERENCES renewable_source(id), carbon_emitted DECIMAL(10,2));CREATE TABLE power_usage (id INT PRIMARY KEY, date DATE, usage_amount INT, country_id INT, FOREIGN KEY (country_id) REFERENCES country(id));","SELECT c.name AS country_name, cp.name AS carbon_price_name, AVG(cp.price) AS average_carbon_price, SUM(ce.carbon_emitted) AS total_carbon_emitted FROM carbon_emission ce JOIN carbon_price cp ON ce.country_id = cp.country_id JOIN power_usage pu ON ce.date = pu.date AND ce.country_id = pu.country_id JOIN country c ON pu.country_id = c.id WHERE c.name = 'Spain' AND pu.date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY c.name, cp.name;","SELECT AVG(carbon_price.price) as avg_price, SUM(carbon_emission.carbon_emitted) as total_carbon_emitted FROM carbon_price INNER JOIN power_usage ON carbon_price.country_id = power_usage.country_id INNER JOIN country ON carbon_price.country_id = country.id WHERE country.name = 'Spain' AND YEAR(carbon_emission.date) = 2020;",0 Which dispensaries in Washington have the highest total sales for concentrates this year?,"CREATE TABLE dispensaries (id INT, name TEXT, state TEXT);CREATE TABLE orders (id INT, dispensary_id INT, item_type TEXT, price DECIMAL, order_date DATE);","SELECT d.name, SUM(o.price) as total_sales FROM dispensaries d INNER JOIN orders o ON d.id = o.dispensary_id WHERE d.state = 'Washington' AND o.item_type = 'concentrates' AND YEAR(o.order_date) = YEAR(CURRENT_DATE) GROUP BY d.name ORDER BY total_sales DESC;","SELECT d.name, SUM(o.price) as total_sales FROM dispensaries d JOIN orders o ON d.id = o.dispensary_id WHERE d.state = 'Washington' AND o.item_type = 'concentrate' GROUP BY d.name ORDER BY total_sales DESC LIMIT 1;",0 How many incumbents resulted in a lost renomination republican gain?,"CREATE TABLE table_1341690_18 (incumbent VARCHAR, result VARCHAR);","SELECT COUNT(incumbent) FROM table_1341690_18 WHERE result = ""Lost renomination Republican gain"";","SELECT COUNT(incumbent) FROM table_1341690_18 WHERE result = ""Lost renomination republican gain"";",0 "Change the address of vendor ""XYZ Inc"" to ""456 Elm St"" in the ""vendors"" table","CREATE TABLE vendors (id INT PRIMARY KEY, name VARCHAR(50), address VARCHAR(100));",UPDATE vendors SET address = '456 Elm St' WHERE name = 'XYZ Inc';,UPDATE vendors SET address = '456 Elm St' WHERE name = 'XYZ Inc';,1 What is the total number of aircraft manufactured by each manufacturer?,"CREATE TABLE aircraft (id INT, model VARCHAR(255), manufacturer VARCHAR(255)); ","SELECT manufacturer, COUNT(*) FROM aircraft GROUP BY manufacturer;","SELECT manufacturer, COUNT(*) FROM aircraft GROUP BY manufacturer;",1 List all 'Stone' artifacts from site 'Teotihuacan' with their age.,"CREATE TABLE artifact_teotihuacan (artifact_id INTEGER, site_name TEXT, artifact_type TEXT, age INTEGER); ",SELECT * FROM artifact_teotihuacan WHERE site_name = 'Teotihuacan' AND artifact_type = 'Stone';,"SELECT artifact_type, age FROM artifact_teotihuacan WHERE site_name = 'Teotihuacan' AND artifact_type = 'Stone';",0 What was the release date of Three Little Bops?,"CREATE TABLE table_name_42 (release_date VARCHAR, title VARCHAR);","SELECT release_date FROM table_name_42 WHERE title = ""three little bops"";","SELECT release_date FROM table_name_42 WHERE title = ""three little bops"";",1 "How many landfills reached capacity in 2018, categorized by region?","CREATE TABLE LandfillCapacity (year INT, region VARCHAR(50), landfill VARCHAR(50), capacity FLOAT, filled_volume FLOAT); ","SELECT region, COUNT(*) FROM LandfillCapacity WHERE year = 2018 AND filled_volume >= capacity GROUP BY region;","SELECT region, SUM(capacity) as total_capacity FROM LandfillCapacity WHERE year = 2018 GROUP BY region;",0 Count the number of male patients in the rural_hospitals table.,"CREATE TABLE rural_hospitals (patient_id INT, age INT, gender VARCHAR(10), admission_date DATE);",SELECT COUNT(*) FROM rural_hospitals WHERE gender = 'Male';,SELECT COUNT(*) FROM rural_hospitals WHERE gender = 'Male';,1 Delete records of clients who have not participated in any financial literacy programs in the past year from the 'financial_capability' table.,"CREATE TABLE financial_capability (client_id INT, financial_literacy_score INT, last_program_date DATE); ","DELETE FROM financial_capability WHERE last_program_date < DATE_SUB(CURDATE(), INTERVAL 1 YEAR);","DELETE FROM financial_capability WHERE last_program_date DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 "Delete a program from the ""programs"" table","CREATE TABLE programs (id INT, name VARCHAR(50), type VARCHAR(20), location VARCHAR(50));",DELETE FROM programs WHERE id = 3003;,DELETE FROM programs WHERE id = 1;,0 Identify the top 3 donors by amount in descending order from the donors table.,"CREATE TABLE donors (id INT, name VARCHAR(50), organization VARCHAR(50), amount INT); ","SELECT name, organization, amount FROM donors ORDER BY amount DESC LIMIT 3;","SELECT name, amount FROM donors ORDER BY amount DESC LIMIT 3;",0 What is the Time of the match with a Record of 3-3?,"CREATE TABLE table_name_30 (time VARCHAR, record VARCHAR);","SELECT time FROM table_name_30 WHERE record = ""3-3"";","SELECT time FROM table_name_30 WHERE record = ""3-3"";",1 What batting partners were the most successful in 2004?,"CREATE TABLE table_1670921_2 (batting_partners VARCHAR, season VARCHAR);","SELECT batting_partners FROM table_1670921_2 WHERE season = ""2004"";","SELECT batting_partners FROM table_1670921_2 WHERE season = ""2004"";",1 Determine the difference between the average wholesale price and average retail price per gram for each strain of cannabis flower in Oregon.,"CREATE TABLE Wholesale_Prices (Wholesale_Price_ID INT, Strain TEXT, Wholesale_Price DECIMAL); CREATE TABLE Sales (Sale_ID INT, Strain TEXT, Retail_Price DECIMAL); ","SELECT Wholesale_Prices.Strain, AVG(Wholesale_Price) as Avg_Wholesale_Price, AVG(Retail_Price) as Avg_Retail_Price, AVG(Retail_Price) - AVG(Wholesale_Price) as Price_Difference FROM Wholesale_Prices JOIN Sales ON Wholesale_Prices.Strain = Sales.Strain WHERE Sales.Strain IN (SELECT Strain FROM Sales WHERE State = 'OR') GROUP BY Wholesale_Prices.Strain;","SELECT Strain, AVG(Wholesale_Price) - AVG(Retail_Price) FROM Wholesale_Prices JOIN Sales ON Wholesale_Prices.Wholesale_Price_ID = Sales.Sale_ID WHERE Strain = 'Cannabis Flower' AND State = 'Oregon' GROUP BY Strain;",0 What is the shortest length of a track in Norway that has a maximum grade of 15% and a vertical drop less than 122.22 m?,"CREATE TABLE table_name_72 (length__m_ INTEGER, country VARCHAR, maximum_grade___percentage_ VARCHAR, vertical_drop__m_ VARCHAR);","SELECT MIN(length__m_) FROM table_name_72 WHERE maximum_grade___percentage_ = ""15"" AND vertical_drop__m_ < 122.22 AND country = ""norway"";","SELECT MIN(length__m_) FROM table_name_72 WHERE maximum_grade___percentage_ = ""15%"" AND vertical_drop__m_ 122.22 AND country = ""norway"";",0 Name the dar for mtv rocks,"CREATE TABLE table_15887683_10 (dar VARCHAR, television_service VARCHAR);","SELECT dar FROM table_15887683_10 WHERE television_service = ""MTV Rocks"";","SELECT dar FROM table_15887683_10 WHERE television_service = ""MTV Rocks"";",1 What are the names and launch dates of all space missions launched by NASA?,"CREATE TABLE space_missions (mission_id INT, name VARCHAR(100), launch_date DATE, launching_agency VARCHAR(50)); ","SELECT name, launch_date FROM space_missions WHERE launching_agency = 'NASA';","SELECT name, launch_date FROM space_missions WHERE launching_agency = 'NASA';",1 How many general practitioners are available in each rural clinic in Oregon state?,"CREATE TABLE doctors (doctor_id INT, clinic_id INT, specialty VARCHAR(50)); CREATE TABLE rural_clinics (clinic_id INT, state VARCHAR(2)); ","SELECT r.clinic_id, COUNT(d.doctor_id) AS general_practitioners_count FROM doctors d JOIN rural_clinics r ON d.clinic_id = r.clinic_id WHERE r.state = 'Oregon' AND specialty = 'General Practitioner' GROUP BY r.clinic_id;","SELECT r.clinic_id, COUNT(d.doctor_id) FROM doctors d JOIN rural_clinics r ON d.clinic_id = r.clinic_id WHERE d.specialty = 'General Practitioner' AND r.state = 'Oregon' GROUP BY r.clinic_id;",0 Find the transaction dates and the total transaction amount for transactions made by customers residing in India.,"CREATE TABLE transactions_4 (id INT, customer_id INT, amount DECIMAL(10,2), tx_date DATE, country VARCHAR(255)); ","SELECT tx_date, SUM(amount) as total_transaction_amount FROM transactions_4 WHERE country = 'India' GROUP BY tx_date;","SELECT tx_date, SUM(amount) FROM transactions_4 WHERE country = 'India' GROUP BY tx_date;",0 What label is in download format in the United States?,"CREATE TABLE table_name_42 (label VARCHAR, region VARCHAR, format VARCHAR);","SELECT label FROM table_name_42 WHERE region = ""united states"" AND format = ""download"";","SELECT label FROM table_name_42 WHERE region = ""united states"" AND format = ""download"";",1 How many episodes had 9.90 million viewers?,"CREATE TABLE table_12146637_1 (episode_title VARCHAR, us_viewers__millions_ VARCHAR);","SELECT COUNT(episode_title) FROM table_12146637_1 WHERE us_viewers__millions_ = ""9.90"";","SELECT COUNT(episode_title) FROM table_12146637_1 WHERE us_viewers__millions_ = ""9.90"";",1 Generate a view for top 10 eSports teams,"CREATE VIEW top_10_teams AS SELECT team_id, SUM(wins) as total_wins, AVG(average_score) as average_score FROM esports_games GROUP BY team_id;","CREATE VIEW top_10_teams_view AS SELECT * FROM top_10_teams WHERE row_number() OVER (ORDER BY total_wins DESC, average_score DESC) <= 10;","CREATE VIEW top_10_teams AS SELECT team_id, SUM(wins) as total_wins, AVG(average_score) as average_score FROM esports_games GROUP BY team_id;",0 List all autonomous taxi rides in New York and Chicago with a cost over $25.,"CREATE TABLE autonomous_taxis (city VARCHAR(20), ride_cost FLOAT); ",SELECT city FROM autonomous_taxis WHERE ride_cost > 25.0 GROUP BY city HAVING COUNT(*) > 1;,"SELECT * FROM autonomous_taxis WHERE city IN ('New York', 'Chicago') AND ride_cost > 25;",0 "What is the Type, when Callsign is ""Xetam""?","CREATE TABLE table_name_50 (type VARCHAR, callsign VARCHAR);","SELECT type FROM table_name_50 WHERE callsign = ""xetam"";","SELECT type FROM table_name_50 WHERE callsign = ""xetam"";",1 What company is numbered larger than 5 and priced at $389M?,"CREATE TABLE table_name_84 (company VARCHAR, number VARCHAR, price VARCHAR);","SELECT company FROM table_name_84 WHERE number > 5 AND price = ""$389m"";","SELECT company FROM table_name_84 WHERE number > 5 AND price = ""$389m"";",1 What are the names and issuance dates of all regulatory fines greater than '50000'?,"CREATE TABLE regulatory_fines (id INT, amount INT, issuance_date DATE, description TEXT); ","SELECT regulatory_fines.name, regulatory_fines.issuance_date FROM regulatory_fines WHERE regulatory_fines.amount > 50000;","SELECT name, issuance_date FROM regulatory_fines WHERE amount > 50000;",0 Which service does the network of atn urdu offer?,"CREATE TABLE table_name_74 (service VARCHAR, network VARCHAR);","SELECT service FROM table_name_74 WHERE network = ""atn urdu"";","SELECT service FROM table_name_74 WHERE network = ""atn urdu"";",1 what is the y = 2008 when the expression is easter day (julian calendar)?,"CREATE TABLE table_214479_8 (y_ VARCHAR, _2008 VARCHAR, expression VARCHAR);","SELECT y_ = _2008 FROM table_214479_8 WHERE expression = ""Easter Day (Julian calendar)"";","SELECT y_ = 2008 FROM table_214479_8 WHERE _2008 = ""Easter Day (Julian Calendar)"" AND expression = ""Easter Day"";",0 What was the free score of the skater with a total of 156.67?,"CREATE TABLE table_name_80 (free VARCHAR, total VARCHAR);",SELECT free FROM table_name_80 WHERE total = 156.67;,"SELECT free FROM table_name_80 WHERE total = ""156.67"";",0 What is the difference in the average professional development hours between teachers who have access to mental health resources and those who do not?,"CREATE TABLE Teachers (teacher_id INT, name VARCHAR(255), professional_development_hours INT, mental_health_resources BOOLEAN);",SELECT AVG(Teachers.professional_development_hours) - AVG(Teachers_no_resources.professional_development_hours) AS difference FROM Teachers LEFT JOIN Teachers AS Teachers_no_resources ON Teachers.teacher_id = Teachers_no_resources.teacher_id AND Teachers_no_resources.mental_health_resources = FALSE WHERE Teachers.mental_health_resources = TRUE;,SELECT AVG(professional_development_hours) - AVG(professional_development_hours) FROM Teachers WHERE mental_health_resources = TRUE;,0 "Delete all articles published before 2000 from the ""articles"" table","CREATE TABLE articles (article_id INT, title VARCHAR(255), publication_date DATE, author_id INT);",DELETE FROM articles WHERE publication_date < '2000-01-01';,DELETE FROM articles WHERE publication_date '2000-01-01';,0 How many dates did Daniel Ruiz win the Spanish Grand Prix?,"CREATE TABLE table_28925058_1 (date VARCHAR, grand_prix VARCHAR, race_winner VARCHAR);","SELECT COUNT(date) FROM table_28925058_1 WHERE grand_prix = ""Spanish grand_prix"" AND race_winner = ""Daniel Ruiz"";","SELECT COUNT(date) FROM table_28925058_1 WHERE grand_prix = ""Spanish Grand Prix"" AND race_winner = ""Daniel Ruiz"";",0 What is the number of patients who identified as male and received therapy in Texas?,"CREATE TABLE patients (patient_id INT, age INT, gender TEXT, treatment TEXT, state TEXT); ",SELECT COUNT(*) FROM patients WHERE gender = 'Male' AND treatment = 'Therapy' AND state = 'Texas';,SELECT COUNT(*) FROM patients WHERE gender = 'Male' AND treatment = 'therapy' AND state = 'Texas';,0 What company was Constructor when there were 16 laps and grid was 9?,"CREATE TABLE table_name_47 (constructor VARCHAR, laps VARCHAR, grid VARCHAR);",SELECT constructor FROM table_name_47 WHERE laps = 16 AND grid = 9;,SELECT constructor FROM table_name_47 WHERE laps = 16 AND grid = 9;,1 What is the name of person that scored 10 goals?,"CREATE TABLE table_11585313_1 (name VARCHAR, number_of_goals VARCHAR);",SELECT name FROM table_11585313_1 WHERE number_of_goals = 10;,SELECT name FROM table_11585313_1 WHERE number_of_goals = 10;,1 What is the minimum mental health score per school that has more than 50 students?,"CREATE TABLE students (student_id INT, school_id INT, mental_health_score INT);","SELECT school_id, MIN(mental_health_score) as min_score FROM students GROUP BY school_id HAVING COUNT(student_id) > 50;","SELECT school_id, MIN(mental_health_score) FROM students GROUP BY school_id HAVING COUNT(DISTINCT student_id) > 50;",0 What is the companion for the author Dave Stone?,"CREATE TABLE table_name_7 (companion_s_ VARCHAR, author VARCHAR);","SELECT companion_s_ FROM table_name_7 WHERE author = ""dave stone"";","SELECT companion_s_ FROM table_name_7 WHERE author = ""dave stone"";",1 Which theme has a Episode of top 6?,"CREATE TABLE table_name_79 (theme VARCHAR, episode VARCHAR);","SELECT theme FROM table_name_79 WHERE episode = ""top 6"";","SELECT theme FROM table_name_79 WHERE episode = ""top 6"";",1 Which Status has a Date of 19/05/1981?,"CREATE TABLE table_name_34 (status VARCHAR, date VARCHAR);","SELECT status FROM table_name_34 WHERE date = ""19/05/1981"";","SELECT status FROM table_name_34 WHERE date = ""19/05/1981"";",1 "Which stores have generated a total revenue of more than $40,000 between January 1, 2022 and January 7, 2022?","CREATE TABLE garment_sales (id INT PRIMARY KEY, garment_id INT, store_id INT, sale_date DATE, quantity INT, price DECIMAL(5,2)); ","SELECT store_id, SUM(quantity * price) AS total_revenue FROM garment_sales WHERE sale_date BETWEEN '2022-01-01' AND '2022-01-07' GROUP BY store_id HAVING total_revenue > 40000;","SELECT store_id, SUM(quantity * price) as total_revenue FROM garment_sales WHERE sale_date BETWEEN '2022-01-01' AND '2022-01-37' GROUP BY store_id HAVING total_revenue > 40000;",0 what is the name for seasons 1981 and an order more than 807?,"CREATE TABLE table_name_49 (name VARCHAR, seasons VARCHAR, order VARCHAR);","SELECT name FROM table_name_49 WHERE seasons = ""1981"" AND order > 807;",SELECT name FROM table_name_49 WHERE seasons = 1981 AND order > 807;,0 List all vessels that have not complied with maritime law in the Mediterranean sea since 2020-01-01?,"CREATE TABLE vessels (id INT, name TEXT, type TEXT, status TEXT, last_inspection_date DATE); ",SELECT name FROM vessels WHERE status = 'Non-compliant' AND last_inspection_date < '2020-01-01' AND location = 'Mediterranean sea';,SELECT name FROM vessels WHERE status!= 'Compliance' AND last_inspection_date '2020-01-01';,0 How can I update the budget for the 'Adaptive Equipment' program in 'New York' for 2023?,"CREATE TABLE budget (budget_id INT, program_name VARCHAR(50), state VARCHAR(50), year INT, amount INT); ",UPDATE budget SET amount = 45000 WHERE program_name = 'Adaptive Equipment' AND state = 'New York' AND year = 2023;,UPDATE budget SET amount = 2023 WHERE program_name = 'Adaptive Equipment' AND state = 'New York';,0 "Calculate the average ticket price and total ticket revenue for basketball games, excluding games with a price over $150.","CREATE TABLE games (id INT, sport VARCHAR(20), price DECIMAL(5,2)); ","SELECT AVG(price) as avg_price, SUM(price) as total_revenue FROM games WHERE sport = 'Basketball' AND price <= 150;","SELECT sport, AVG(price) as avg_price, SUM(revenue) as total_revenue FROM games WHERE sport = 'Basketball' AND price > 150 GROUP BY sport;",0 What was the smallest crowd size for the match played at Junction Oval?,"CREATE TABLE table_name_84 (crowd INTEGER, venue VARCHAR);","SELECT MIN(crowd) FROM table_name_84 WHERE venue = ""junction oval"";","SELECT MIN(crowd) FROM table_name_84 WHERE venue = ""junction oval"";",1 What is the status of the match held on 12/7/1997?,"CREATE TABLE table_name_31 (status VARCHAR, date VARCHAR);","SELECT status FROM table_name_31 WHERE date = ""12/7/1997"";","SELECT status FROM table_name_31 WHERE date = ""12/7/1997"";",1 Get the total number of VR headsets sold in Japan and the United States,"CREATE TABLE VRAdoption (Region VARCHAR(20), HeadsetsSold INT); ","SELECT SUM(HeadsetsSold) FROM VRAdoption WHERE Region IN ('Japan', 'United States')","SELECT SUM(HeadsetsSold) FROM VRAdoption WHERE Region IN ('Japan', 'United States');",0 Display the policy types with the lowest claim frequency in Texas.,"CREATE TABLE policy_types (id INT, policy_type TEXT); CREATE TABLE policies (id INT, policyholder_id INT, policy_type_id INT, issue_date DATE); CREATE TABLE claims (id INT, policy_id INT, claim_amount INT); ","SELECT policy_types.policy_type, COUNT(DISTINCT policies.id) AS num_policies, COUNT(DISTINCT claims.id) AS num_claims, COUNT(DISTINCT claims.id) / COUNT(DISTINCT policies.id) * 100 AS claim_frequency FROM policies JOIN policy_types ON policies.policy_type_id = policy_types.id LEFT JOIN claims ON policies.id = claims.policy_id WHERE policies.state = 'TX' GROUP BY policy_types.policy_type ORDER BY claim_frequency ASC LIMIT 3;","SELECT policy_types.policy_type, MIN(claims.claim_amount) as lowest_claim_frequency FROM policy_types INNER JOIN policies ON policy_types.id = policies.policy_type_id INNER JOIN claims ON policies.policy_id = claims.policy_id WHERE policy_types.state = 'Texas' GROUP BY policy_types.policy_type ORDER BY lowest_claim_frequency DESC LIMIT 1;",0 Who is the rider with a 399cc Kawasaki?,"CREATE TABLE table_name_94 (rider VARCHAR, team VARCHAR);","SELECT rider FROM table_name_94 WHERE team = ""399cc kawasaki"";","SELECT rider FROM table_name_94 WHERE team = ""399cc kawasaki"";",1 Which team was the opponent on october 21?,"CREATE TABLE table_27734577_2 (team VARCHAR, date VARCHAR);","SELECT team FROM table_27734577_2 WHERE date = ""October 21"";","SELECT team FROM table_27734577_2 WHERE date = ""October 21"";",1 With what Name does the Roll of 637 belong?,"CREATE TABLE table_name_57 (name VARCHAR, roll VARCHAR);","SELECT name FROM table_name_57 WHERE roll = ""637"";",SELECT name FROM table_name_57 WHERE roll = 637;,0 What is the strongs # for the hebrew word יִרְמְיָה?,"CREATE TABLE table_1242447_2 (strongs__number VARCHAR, hebrew_word VARCHAR);","SELECT strongs__number FROM table_1242447_2 WHERE hebrew_word = ""יִרְמְיָה"";","SELECT strongs__number FROM table_1242447_2 WHERE hebrew_word = """";",0 How many IoT devices are active in region 'East'?,"CREATE TABLE IoTDevices (device_id INT, device_type VARCHAR(20), region VARCHAR(10)); ",SELECT COUNT(*) FROM IoTDevices WHERE region = 'East';,SELECT COUNT(*) FROM IoTDevices WHERE region = 'East';,1 How many goal differences have Played larger than 44?,"CREATE TABLE table_name_99 (goal_difference INTEGER, played INTEGER);",SELECT SUM(goal_difference) FROM table_name_99 WHERE played > 44;,SELECT SUM(goal_difference) FROM table_name_99 WHERE played > 44;,1 "What to par has The United States as the country, t8 as the place, and tommy valentine as the player?","CREATE TABLE table_name_77 (to_par VARCHAR, player VARCHAR, country VARCHAR, place VARCHAR);","SELECT to_par FROM table_name_77 WHERE country = ""united states"" AND place = ""t8"" AND player = ""tommy valentine"";","SELECT to_par FROM table_name_77 WHERE country = ""united states"" AND place = ""t8"" AND player = ""tommy valentine"";",1 List the top 3 deepest oceanic trenches in the world.,"CREATE TABLE Oceanic_Trenches (trench_name TEXT, location TEXT, max_depth NUMERIC); ","SELECT trench_name, location, max_depth FROM (SELECT trench_name, location, max_depth, ROW_NUMBER() OVER (ORDER BY max_depth DESC) as rn FROM Oceanic_Trenches) x WHERE rn <= 3;","SELECT trench_name, max_depth FROM Oceanic_Trenches ORDER BY max_depth DESC LIMIT 3;",0 "Find the number of clinical trials conducted for each drug, ranked from the most clinical trials to the least, in the dermatology therapeutic area?","CREATE TABLE clinical_trials (clinical_trial_id INT, drug_name VARCHAR(255), therapeutic_area VARCHAR(255), trial_status VARCHAR(255)); ","SELECT drug_name, COUNT(*) as num_of_trials FROM clinical_trials WHERE therapeutic_area = 'Dermatology' GROUP BY drug_name ORDER BY num_of_trials DESC;","SELECT drug_name, COUNT(*) as num_trials FROM clinical_trials WHERE therapeutic_area = 'Dermology' GROUP BY drug_name ORDER BY num_trials DESC;",0 How many smart contracts were created per month in the 'smart_contracts' table?,"CREATE TABLE smart_contracts (contract_id INT, creation_date DATE); ","SELECT MONTH(creation_date) AS Month, COUNT(contract_id) AS NumberOfContracts FROM smart_contracts GROUP BY Month;","SELECT DATE_FORMAT(creation_date, '%Y-%m') AS month, COUNT(*) FROM smart_contracts GROUP BY month;",0 What is the lowest value for SP+FS for Miljan Begovic with a greater than 189 place?,"CREATE TABLE table_name_64 (fs VARCHAR, sp INTEGER, name VARCHAR, placings VARCHAR);","SELECT MIN(sp) + fs FROM table_name_64 WHERE name = ""miljan begovic"" AND placings > 189;","SELECT MIN(fs) FROM table_name_64 WHERE name = ""milijan begovic"" AND placings > 189;",0 What is the total budget for inclusion efforts in the last 6 months for the Asian community in New York?,"CREATE TABLE inclusion_budget (id INT PRIMARY KEY, category VARCHAR(255), community VARCHAR(255), state VARCHAR(255), budget DECIMAL(10,2), date DATE);","SELECT SUM(budget) FROM inclusion_budget WHERE category = 'inclusion efforts' AND community = 'Asian' AND state = 'New York' AND date >= DATE_SUB(CURDATE(), INTERVAL 6 MONTH);","SELECT SUM(budget) FROM inclusion_budget WHERE community = 'Asian' AND state = 'New York' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",0 Who has the highest total and a to par of +14?,"CREATE TABLE table_name_58 (total INTEGER, to_par VARCHAR);","SELECT MAX(total) FROM table_name_58 WHERE to_par = ""+14"";","SELECT MAX(total) FROM table_name_58 WHERE to_par = ""+14"";",1 What is the total workout duration per member from Japan in 2022?,"CREATE TABLE members (id INT, country VARCHAR(50)); CREATE TABLE workouts (id INT, member_id INT, date DATE, duration INT); ","SELECT members.id, SUM(duration) AS total_duration FROM members JOIN workouts ON members.id = workouts.member_id WHERE members.country = 'Japan' AND YEAR(workouts.date) = 2022 GROUP BY members.id;","SELECT m.country, SUM(w.duration) as total_duration FROM members m JOIN workouts w ON m.id = w.member_id WHERE m.country = 'Japan' AND YEAR(w.date) = 2022 GROUP BY m.country;",0 What are the names of the ports where 'Vessel Q' has transported cargo?,"CREATE TABLE port (port_id INT, port_name VARCHAR(50)); CREATE TABLE vessel (vessel_id INT, vessel_name VARCHAR(50)); CREATE TABLE transport (transport_id INT, cargo_id INT, vessel_id INT, port_id INT); ",SELECT port_name FROM port WHERE port_id IN (SELECT port_id FROM transport WHERE vessel_id = (SELECT vessel_id FROM vessel WHERE vessel_name = 'Vessel Q'));,SELECT p.port_name FROM port p JOIN vessel v ON p.port_id = v.vessel_id JOIN transport t ON v.vessel_id = t.vessel_id WHERE v.vessel_name = 'Vessel Q';,0 Show the most common location of performances.,CREATE TABLE performance (LOCATION VARCHAR);,SELECT LOCATION FROM performance GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1;,SELECT LOCATION FROM performance GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1;,1 "If the location is Brooklyn, Michigan and the pole position is Bobby Unser, what is the RND total number?","CREATE TABLE table_22670216_1 (rnd VARCHAR, location VARCHAR, pole_position VARCHAR);","SELECT COUNT(rnd) FROM table_22670216_1 WHERE location = ""Brooklyn, Michigan"" AND pole_position = ""Bobby Unser"";","SELECT COUNT(rnd) FROM table_22670216_1 WHERE location = ""Brooklyn, Michigan"" AND pole_position = ""Bobby Unser"";",1 Populate 'trends_by_region' table with records from Europe and Asia,"CREATE TABLE trends_by_region (id INT PRIMARY KEY, region VARCHAR(255), trend_name VARCHAR(255), popularity_score INT);","INSERT INTO trends_by_region (id, region, trend_name, popularity_score) VALUES (1, 'Europe', 'Minimalistic Style', 8), (2, 'Asia', 'K-Pop Fashion', 9);","INSERT INTO trends_by_region (region, trend_name, popularity_score) VALUES ('Europe', 'Asia');",0 What was the regular season name where they did not qualify for the playoffs in 2009?,"CREATE TABLE table_21602734_1 (reg_season VARCHAR, playoffs VARCHAR, year VARCHAR);","SELECT reg_season FROM table_21602734_1 WHERE playoffs = ""Did not qualify"" AND year = 2009;","SELECT reg_season FROM table_21602734_1 WHERE playoffs = ""Finals"" AND year = 2009;",0 What is the total quantity of organic chicken sold by each restaurant?,"CREATE TABLE Restaurants (RestaurantID int, RestaurantName varchar(50)); CREATE TABLE Menu (MenuID int, MenuItem varchar(50), Organic boolean, QuantitySold int, RestaurantID int); ","SELECT R.RestaurantName, SUM(M.QuantitySold) as TotalOrganicChickenSold FROM Restaurants R INNER JOIN Menu M ON R.RestaurantID = M.RestaurantID WHERE M.Organic = true GROUP BY R.RestaurantName;","SELECT R.RestaurantName, SUM(M.QuantitySold) FROM Restaurants R INNER JOIN Menu M ON R.RestaurantID = M.RestaurantID WHERE M.Organic = true GROUP BY R.RestaurantName;",0 "Which Opponents in the final has a Partnering of tomás carbonell on march 28, 1995?","CREATE TABLE table_name_18 (opponents_in_the_final VARCHAR, partnering VARCHAR, date VARCHAR);","SELECT opponents_in_the_final FROM table_name_18 WHERE partnering = ""tomás carbonell"" AND date = ""march 28, 1995"";","SELECT opponents_in_the_final FROM table_name_18 WHERE partnering = ""tomás carbonell"" AND date = ""march 28, 1995"";",1 What is the total number of construction workers in New York state?,"CREATE TABLE construction_workers (id INT, name VARCHAR(50), age INT, state VARCHAR(50)); ",SELECT COUNT(*) FROM construction_workers WHERE state = 'New York',SELECT COUNT(*) FROM construction_workers WHERE state = 'New York';,0 What airport has an ICAP of BGBW?,"CREATE TABLE table_name_68 (airport VARCHAR, icao VARCHAR);","SELECT airport FROM table_name_68 WHERE icao = ""bgbw"";","SELECT airport FROM table_name_68 WHERE icao = ""bbgw"";",0 "Which rider had more than 23 laps, a manufacturer of Aprilia, and a grid of 14","CREATE TABLE table_name_95 (rider VARCHAR, grid VARCHAR, laps VARCHAR, manufacturer VARCHAR);","SELECT rider FROM table_name_95 WHERE laps > 23 AND manufacturer = ""aprilia"" AND grid = 14;","SELECT rider FROM table_name_95 WHERE laps > 23 AND manufacturer = ""aprilia"" AND grid = 14;",1 What is Steve Lowery's Place?,"CREATE TABLE table_name_78 (place VARCHAR, player VARCHAR);","SELECT place FROM table_name_78 WHERE player = ""steve lowery"";","SELECT place FROM table_name_78 WHERE player = ""steve lowery"";",1 What was the score for the game against the Golden State Warriors?,"CREATE TABLE table_name_54 (score VARCHAR, opponent VARCHAR);","SELECT score FROM table_name_54 WHERE opponent = ""golden state warriors"";","SELECT score FROM table_name_54 WHERE opponent = ""golden state warriors"";",1 "On what Route is the mountain with a Rank less than 33 and an Elevation of 11,312 feet 3448 m?","CREATE TABLE table_name_60 (route INTEGER, rank VARCHAR, elevation VARCHAR);","SELECT MAX(route) FROM table_name_60 WHERE rank < 33 AND elevation = ""11,312 feet 3448 m"";","SELECT SUM(route) FROM table_name_60 WHERE rank 33 AND elevation = ""11,312 feet 3448 m"";",0 Update the sustainable_sources table to set the is_certified field to true for the source with a source_id of 25,"CREATE TABLE sustainable_sources (source_id INT, name VARCHAR(50), description TEXT, is_certified BOOLEAN);",UPDATE sustainable_sources SET is_certified = true WHERE source_id = 25;,UPDATE sustainable_sources SET is_certified = true WHERE source_id = 25;,1 "What is the name of the driver with a rotax max engine, in the rotax heavy class, with arrow as chassis and on the TWR Raceline Seating team?","CREATE TABLE table_name_32 (driver VARCHAR, team VARCHAR, chassis VARCHAR, engine VARCHAR, class VARCHAR);","SELECT driver FROM table_name_32 WHERE engine = ""rotax max"" AND class = ""rotax heavy"" AND chassis = ""arrow"" AND team = ""twr raceline seating"";","SELECT driver FROM table_name_32 WHERE engine = ""rotax max"" AND class = ""rotax heavy"" AND chassis = ""arrow"" AND team = ""twr raceline seating"";",1 Who is the main contestant when the co-contestant (yaar vs. pyaar) is Shalini Chandran?,"CREATE TABLE table_name_33 (main_contestant VARCHAR, co_contestant__yaar_vs_pyaar_ VARCHAR);","SELECT main_contestant FROM table_name_33 WHERE co_contestant__yaar_vs_pyaar_ = ""shalini chandran"";","SELECT main_contestant FROM table_name_33 WHERE co_contestant__yaar_vs_pyaar_ = ""shalini chandran"";",1 How many release prices are there for the Pentium iii 550?,"CREATE TABLE table_16400024_1 (release_price___usd__ VARCHAR, model_number VARCHAR);","SELECT COUNT(release_price___usd__) FROM table_16400024_1 WHERE model_number = ""Pentium III 550"";","SELECT COUNT(release_price___usd__) FROM table_16400024_1 WHERE model_number = ""Pentium iii 550"";",0 What is the maximum funding amount for a biotech startup?,"CREATE TABLE startups (id INT, name VARCHAR(50), location VARCHAR(50), funding FLOAT); ",SELECT MAX(funding) FROM startups;,SELECT MAX(funding) FROM startups;,1 List all restorative justice programs introduced in New Zealand in 2020.,"CREATE TABLE programs (program_id INT, program_type VARCHAR(20), introduction_date DATE); ","SELECT program_id, program_type FROM programs WHERE program_type = 'Restorative Justice' AND introduction_date BETWEEN '2020-01-01' AND '2020-12-31';",SELECT * FROM programs WHERE program_type = 'Restorative Justice' AND YEAR(introduction_date) = 2020;,0 What is the maximum and minimum age of employees working at each mining operation in Canada?,"CREATE TABLE mining_operations (id INT, location VARCHAR(50)); CREATE TABLE employees (id INT, age INT, position VARCHAR(50), operation_id INT); ","SELECT mo.location, MAX(e.age) AS max_age, MIN(e.age) AS min_age FROM employees e INNER JOIN mining_operations mo ON e.operation_id = mo.id GROUP BY mo.location;","SELECT mining_operations.location, MAX(employees.age) AS max_age, MIN(employees.age) AS min_age FROM mining_operations INNER JOIN employees ON mining_operations.id = employees.operation_id WHERE mining_operations.location = 'Canada' GROUP BY mining_operations.location;",0 What is the height for shanghai x-1 financial building?,"CREATE TABLE table_name_97 (height_m___feet VARCHAR, name VARCHAR);","SELECT height_m___feet FROM table_name_97 WHERE name = ""shanghai x-1 financial building"";","SELECT height_m___feet FROM table_name_97 WHERE name = ""shanghai x-1 financial building"";",1 What is the team with grid 9?,"CREATE TABLE table_name_10 (team VARCHAR, grid VARCHAR);",SELECT team FROM table_name_10 WHERE grid = 9;,SELECT team FROM table_name_10 WHERE grid = 9;,1 What is the original date of the repeat air date of 26/01/1969?,"CREATE TABLE table_13403120_1 (originalairdate VARCHAR, repeatairdate_s_ VARCHAR);","SELECT originalairdate FROM table_13403120_1 WHERE repeatairdate_s_ = ""26/01/1969"";","SELECT originalairdate FROM table_13403120_1 WHERE repeatairdate_s_ = ""26/01/1969"";",1 "Who was the Opponent on October 31, 1993?","CREATE TABLE table_name_71 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_71 WHERE date = ""october 31, 1993"";","SELECT opponent FROM table_name_71 WHERE date = ""october 31, 1993"";",1 Which regions have the most agroforestry practices in the 'agroforestry' table?,"CREATE TABLE agroforestry (id INT, region VARCHAR(255), practices INT); ","SELECT region, practices FROM agroforestry ORDER BY practices DESC;","SELECT region, SUM(practices) as total_practices FROM agroforestry GROUP BY region ORDER BY total_practices DESC;",0 "How many peacekeeping operations were conducted in the Middle East in each year since 2015, excluding those led by the United Nations?","CREATE TABLE PeacekeepingOperations (year INT, location VARCHAR(255), led_by VARCHAR(255)); ","SELECT year, COUNT(*) FROM PeacekeepingOperations WHERE location = 'Middle East' AND led_by != 'United Nations' GROUP BY year;","SELECT year, COUNT(*) FROM PeacekeepingOperations WHERE location = 'Middle East' AND led_by!= 'United Nations' GROUP BY year;",0 What is the minimum health equity score for mental health facilities in rural areas?,"CREATE TABLE mental_health_facilities (facility_id INT, location VARCHAR(255), health_equity_score INT); ",SELECT MIN(health_equity_score) as min_score FROM mental_health_facilities WHERE location = 'Rural';,SELECT MIN(health_equity_score) FROM mental_health_facilities WHERE location = 'Rural';,0 What is the total revenue generated by players from Europe in 2018?,"CREATE TABLE Transactions (TransactionID INT, PlayerID INT, Amount DECIMAL(10, 2), TransactionYear INT); CREATE TABLE PlayerLocation (PlayerID INT, Location VARCHAR(20)); ","SELECT SUM(Transactions.Amount) FROM Transactions JOIN PlayerLocation ON Transactions.PlayerID = PlayerLocation.PlayerID WHERE PlayerLocation.Location IN ('Germany', 'France', 'UK', 'Italy', 'Spain') AND Transactions.TransactionYear = 2018;",SELECT SUM(Transactions.Amount) FROM Transactions INNER JOIN PlayerLocation ON Transactions.PlayerID = PlayerLocation.PlayerID WHERE Transactions.TransactionYear = 2018 AND PlayerLocation.Location = 'Europe';,0 "Which Rank has Goals larger than 10, and a Scorer of choi sang-kuk?","CREATE TABLE table_name_35 (rank VARCHAR, goals VARCHAR, scorer VARCHAR);","SELECT rank FROM table_name_35 WHERE goals > 10 AND scorer = ""choi sang-kuk"";","SELECT rank FROM table_name_35 WHERE goals > 10 AND scorer = ""choi sang-kuk"";",1 "With original artist of Tina Turner, what is the week number?","CREATE TABLE table_21501565_1 (week__number VARCHAR, original_artist VARCHAR);","SELECT week__number FROM table_21501565_1 WHERE original_artist = ""Tina Turner"";","SELECT week__number FROM table_21501565_1 WHERE original_artist = ""Tina Turner"";",1 How many different chromosomal locations are there in the family il-1f8?,"CREATE TABLE table_29871617_1 (chromosomal_location VARCHAR, family_name VARCHAR);","SELECT COUNT(chromosomal_location) FROM table_29871617_1 WHERE family_name = ""IL-1F8"";","SELECT COUNT(chromosomal_location) FROM table_29871617_1 WHERE family_name = ""IL-1F8"";",1 Name the total number of titles for 3x5655,"CREATE TABLE table_24222929_2 (title VARCHAR, production_code VARCHAR);","SELECT COUNT(title) FROM table_24222929_2 WHERE production_code = ""3X5655"";","SELECT COUNT(title) FROM table_24222929_2 WHERE production_code = ""3X5655"";",1 How many accidents occurred in the South American mines in the last quarter?,"CREATE TABLE Mines (MineID INT, Location VARCHAR(30), LastInspection DATE); ","SELECT COUNT(*) FROM Mines WHERE Location LIKE 'South%' AND LastInspection >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH);","SELECT COUNT(*) FROM Mines WHERE Location = 'South America' AND LastInspection >= DATEADD(quarter, -1, GETDATE());",0 "Update the 'contract_amount' field in the 'defense_contracts' table, increasing it by 10% for contracts awarded in Q2 2021","CREATE TABLE defense_contracts (contract_id INT, contract_amount FLOAT, award_date DATE);",UPDATE defense_contracts SET contract_amount = contract_amount * 1.1 WHERE award_date BETWEEN '2021-04-01' AND '2021-06-30';,UPDATE defense_contracts SET contract_amount = contract_amount * 1.10 WHERE award_date BETWEEN '2021-04-01' AND '2021-06-30';,0 Which countries have more than 50 investigative journalists?,"CREATE TABLE reporters (id INT, name VARCHAR(50), gender VARCHAR(10), age INT, position VARCHAR(20), country VARCHAR(50)); ","SELECT country, COUNT(*) FROM reporters WHERE position = 'Investigative Journalist' GROUP BY country HAVING COUNT(*) > 50;",SELECT country FROM reporters WHERE position = 'investigative' GROUP BY country HAVING COUNT(*) > 50;,0 How many appearances by Meek Mill?,"CREATE TABLE table_29160596_1 (appearances INTEGER, top_mc VARCHAR);","SELECT MAX(appearances) FROM table_29160596_1 WHERE top_mc = ""Meek Mill"";","SELECT SUM(appearances) FROM table_29160596_1 WHERE top_mc = ""Meek Mill"";",0 "What is the total sales amount of eco-friendly cosmetics sold in France in 2021, grouped by quarter?","CREATE TABLE sales (id INT, brand VARCHAR(255), country VARCHAR(255), sales_amount DECIMAL(10, 2), is_eco_friendly BOOLEAN, sale_date DATE);","SELECT DATE_TRUNC('quarter', sale_date) as quarter, SUM(sales_amount) FROM sales WHERE country = 'France' AND is_eco_friendly = true AND sale_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY quarter;","SELECT DATE_FORMAT(sale_date, '%Y-%m') as quarter, SUM(sales_amount) as total_sales FROM sales WHERE country = 'France' AND is_eco_friendly = true AND sale_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY quarter;",0 How many blocks did tye'sha fluker have?,"CREATE TABLE table_24856332_4 (blocks INTEGER, player VARCHAR);","SELECT MIN(blocks) FROM table_24856332_4 WHERE player = ""Tye'sha Fluker"";","SELECT MAX(blocks) FROM table_24856332_4 WHERE player = ""Tye'sha Fluker"";",0 What is the date they played against fitzroy?,"CREATE TABLE table_name_10 (date VARCHAR, away_team VARCHAR);","SELECT date FROM table_name_10 WHERE away_team = ""fitzroy"";","SELECT date FROM table_name_10 WHERE away_team = ""fitzroy"";",1 at what location is the last flew on 11 june 2000,"CREATE TABLE table_1997759_1 (location VARCHAR, last_flew VARCHAR);","SELECT location FROM table_1997759_1 WHERE last_flew = ""11 June 2000"";","SELECT location FROM table_1997759_1 WHERE last_flew = ""11 June 2000"";",1 List the names of ports where ro-ro ships have docked.,"CREATE TABLE Ports (PortID INT, PortName VARCHAR(100), City VARCHAR(100), Country VARCHAR(100)); CREATE TABLE Vessels (VesselID INT, VesselName VARCHAR(100), VesselType VARCHAR(100), PortID INT); ",SELECT Ports.PortName FROM Ports INNER JOIN Vessels ON Ports.PortID = Vessels.PortID WHERE Vessels.VesselType = 'Ro-Ro Ship';,SELECT Ports.PortName FROM Ports INNER JOIN Vessels ON Ports.PortID = Vessels.PortID WHERE Vessels.VesselType = 'Ro-Ro';,0 Calculate the percentage of stone tools out of all artifacts in the excavation site 'SiteAA'.,"CREATE TABLE SiteAA (site_id INT, site_name VARCHAR(20), artifact_type VARCHAR(20), quantity INT); ",SELECT (SUM(CASE WHEN artifact_type = 'Stone Tools' THEN quantity ELSE 0 END) / SUM(quantity)) * 100 as percentage FROM SiteAA;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM SiteAA WHERE site_name = 'SiteAA')) AS percentage FROM SiteAA WHERE site_name = 'SiteAA' AND artifact_type ='stone tools';,0 How many students have enrolled in the open pedagogy program in the past 6 months?,"CREATE TABLE enrollments (id INT, enrollment_date DATE, student_id INT, program VARCHAR(50)); ","SELECT COUNT(DISTINCT student_id) as num_enrolled FROM enrollments WHERE program = 'Open Pedagogy' AND enrollment_date >= DATEADD(month, -6, GETDATE());","SELECT COUNT(*) FROM enrollments WHERE program = 'Open Pedagogy' AND enrollment_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",0 "How many female players have designed a game in the RPG genre and have more than 10,000 players?","CREATE TABLE game_designers (designer_id INT, gender VARCHAR(10), genre VARCHAR(10), players INT);",SELECT COUNT(*) FROM game_designers WHERE gender = 'female' AND genre = 'RPG' AND players > 10000;,SELECT COUNT(*) FROM game_designers WHERE gender = 'Female' AND genre = 'RPG' AND players > 10000;,0 Which countries have at least one green building and one renewable energy project?,"CREATE TABLE green_buildings (id INT, building_name VARCHAR(100), country VARCHAR(50)); CREATE TABLE renewable_projects (id INT, project_name VARCHAR(100), country VARCHAR(50)); ",SELECT gb.country FROM green_buildings gb JOIN renewable_projects rp ON gb.country = rp.country GROUP BY gb.country HAVING COUNT(DISTINCT gb.country) > 1;,"SELECT gb.country, rp.project_name FROM green_buildings gb INNER JOIN renewable_projects rp ON gb.country = rp.country GROUP BY gb.country HAVING COUNT(*) > 1;",0 Delete records of cosmetic products discontinued in the past month.,"CREATE TABLE Products (ProductID INT, ProductName VARCHAR(50), DiscontinuedDate DATE); ","DELETE FROM Products WHERE DiscontinuedDate >= DATEADD(month, -1, GETDATE());","DELETE FROM Products WHERE DiscontinuedDate >= DATEADD(month, -1, GETDATE());",1 How many years correspond to longitude of 36.8e and diameter greater than 697?,"CREATE TABLE table_name_72 (year_named VARCHAR, longitude VARCHAR, diameter__km_ VARCHAR);","SELECT COUNT(year_named) FROM table_name_72 WHERE longitude = ""36.8e"" AND diameter__km_ > 697;","SELECT COUNT(year_named) FROM table_name_72 WHERE longitude = ""36.8e"" AND diameter__km_ > 697;",1 What is the total investment in the 'Commodity' fund type for customers in the 'Asia Pacific' region?,"CREATE TABLE investments (id INT, customer_id INT, fund_type VARCHAR(50), investment_amount DECIMAL(10,2)); ",SELECT SUM(investment_amount) FROM investments WHERE fund_type = 'Commodity' AND customer_id IN (SELECT id FROM customers WHERE region = 'Asia Pacific');,SELECT SUM(investment_amount) FROM investments WHERE fund_type = 'Commodity' AND customer_id IN (SELECT id FROM customers WHERE region = 'Asia Pacific');,1 Update the safety rating of the 2016 Tesla Model S to 4.,"CREATE TABLE Vehicles (Id INT, Name TEXT, Type TEXT, SafetyRating INT, ReleaseDate DATE); ",UPDATE Vehicles SET SafetyRating = 4 WHERE Name = 'Model S' AND ReleaseDate = '2016-06-22';,UPDATE Vehicles SET SafetyRating = 4 WHERE Name = '2016 Tesla Model S';,0 Identify the public transportation systems with the highest and lowest ridership in 2023?,"CREATE TABLE Public_Transportation (Id INT, System VARCHAR(50), Ridership INT, Year INT); ","SELECT System, Ridership FROM (SELECT System, Ridership, ROW_NUMBER() OVER (ORDER BY Ridership DESC) AS Rank, COUNT(*) OVER () AS Total FROM Public_Transportation WHERE Year = 2023) AS Subquery WHERE Rank = 1 OR Rank = Total;","SELECT System, Ridership FROM Public_Transportation WHERE Year = 2023 ORDER BY Ridership DESC LIMIT 1;",0 How many names correspond to the value 101 for appearances?,"CREATE TABLE table_24565004_14 (name VARCHAR, appearances¹ VARCHAR);",SELECT COUNT(name) FROM table_24565004_14 WHERE appearances¹ = 101;,SELECT COUNT(name) FROM table_24565004_14 WHERE appearances1 = 101;,0 What is the maximum rating of songs in the 'hip-hop' genre?,"CREATE TABLE songs_2 (id INT, title TEXT, rating FLOAT, genre TEXT); ",SELECT MAX(rating) FROM songs_2 WHERE genre = 'hip-hop';,SELECT MAX(rating) FROM songs_2 WHERE genre = 'hip-hop';,1 Which Overall is the lowest one that has a Position of offensive tackle?,"CREATE TABLE table_name_33 (overall INTEGER, position VARCHAR);","SELECT MIN(overall) FROM table_name_33 WHERE position = ""offensive tackle"";","SELECT MIN(overall) FROM table_name_33 WHERE position = ""offensive tackle"";",1 What was the away team that played Fitzroy?,"CREATE TABLE table_name_96 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team FROM table_name_96 WHERE home_team = ""fitzroy"";","SELECT away_team FROM table_name_96 WHERE home_team = ""fitzroy"";",1 What amount is the junior high school where the gender is male and the specification is minimum diameter of sakigawa?,"CREATE TABLE table_13555999_1 (junior_high_school__12_15_yrs_ VARCHAR, gender VARCHAR, specification VARCHAR);","SELECT junior_high_school__12_15_yrs_ FROM table_13555999_1 WHERE gender = ""Male"" AND specification = ""Minimum diameter of sakigawa"";","SELECT junior_high_school__12_15_yrs_ FROM table_13555999_1 WHERE gender = ""Male"" AND specification = ""Minimum Diameter of Sakigawa"";",0 Which habitat has the lowest population of rhinos?,"CREATE TABLE habitats (name VARCHAR(255), animal_type VARCHAR(255), population INT); ","SELECT name FROM (SELECT name, population FROM habitats WHERE animal_type = 'rhino' ORDER BY population ASC LIMIT 1) AS subquery;","SELECT name, population FROM habitats WHERE animal_type = 'Rhino' ORDER BY population DESC LIMIT 1;",0 "What is the total number of military bases in the country, grouped by their base type?","CREATE TABLE military_bases (id INT, name VARCHAR(255), base_type VARCHAR(255), country VARCHAR(255));","SELECT base_type, COUNT(*) as total_bases FROM military_bases GROUP BY base_type;","SELECT base_type, COUNT(*) FROM military_bases GROUP BY base_type;",0 "What is the total climate finance provided to each sector in Africa, ranked from highest to lowest?","CREATE TABLE ClimateFinanceAfrica (Sector VARCHAR(50), Year INT, Amount INT); ","SELECT Sector, SUM(Amount) AS TotalFinance FROM ClimateFinanceAfrica GROUP BY Sector ORDER BY TotalFinance DESC;","SELECT Sector, SUM(Amount) as TotalFinance FROM ClimateFinanceAfrica GROUP BY Sector ORDER BY TotalFinance DESC;",0 What are the averages for games with 212 wickets taken?,"CREATE TABLE table_2482547_5 (average VARCHAR, wickets_taken VARCHAR);",SELECT average FROM table_2482547_5 WHERE wickets_taken = 212;,SELECT average FROM table_2482547_5 WHERE wickets_taken = 212;,1 Which Player is the shooting guard?,"CREATE TABLE table_name_69 (player VARCHAR, position VARCHAR);","SELECT player FROM table_name_69 WHERE position = ""shooting guard"";","SELECT player FROM table_name_69 WHERE position = ""shooting guard"";",1 How many defense projects were initiated by Raytheon in the Middle East between 2018 and 2020?,"CREATE TABLE defense_projects (company VARCHAR(255), region VARCHAR(255), year INT, num_projects INT); ",SELECT SUM(num_projects) FROM defense_projects WHERE company = 'Raytheon' AND region = 'Middle East' AND year BETWEEN 2018 AND 2020;,SELECT SUM(num_projects) FROM defense_projects WHERE company = 'Raytheon' AND region = 'Middle East' AND year BETWEEN 2018 AND 2020;,1 What is the average professional development budget per teacher in each department?,"CREATE TABLE teacher_pd (teacher_id INT, department VARCHAR(10), budget DECIMAL(5,2)); ","SELECT department, AVG(budget) as avg_budget FROM teacher_pd GROUP BY department;","SELECT department, AVG(budget) as avg_budget FROM teacher_pd GROUP BY department;",1 Which home team had the score 1-3?,"CREATE TABLE table_name_6 (home_team VARCHAR, score VARCHAR);","SELECT home_team FROM table_name_6 WHERE score = ""1-3"";","SELECT home_team FROM table_name_6 WHERE score = ""1-3"";",1 What is the total number of visitors from the United States and Canada for each exhibition?,"CREATE TABLE Exhibitions (ExhibitionID INT, ExhibitionName VARCHAR(255)); CREATE TABLE Visitors (VisitorID INT, Country VARCHAR(255), ExhibitionID INT); ","SELECT E.ExhibitionName, COUNT(V.VisitorID) as TotalVisitors FROM Exhibitions E INNER JOIN Visitors V ON E.ExhibitionID = V.ExhibitionID WHERE V.Country IN ('USA', 'Canada') GROUP BY E.ExhibitionName;","SELECT e.ExhibitionName, COUNT(v.VisitorID) as TotalVisitors FROM Exhibitions e JOIN Visitors v ON e.ExhibitionID = v.ExhibitionID WHERE e.Country IN ('USA', 'Canada') GROUP BY e.ExhibitionName;",0 what is the arrival time where the station code is awy?,"CREATE TABLE table_14688744_2 (arrival VARCHAR, station_code VARCHAR);","SELECT arrival FROM table_14688744_2 WHERE station_code = ""AWY"";","SELECT arrival FROM table_14688744_2 WHERE station_code = ""Awy"";",0 List the top 3 countries with the highest number of effective altruism donors?,"CREATE TABLE DonorCountry (DonorID INT, Name TEXT, Country TEXT); ","SELECT Country, COUNT(*) as TotalDonors FROM DonorCountry GROUP BY Country ORDER BY TotalDonors DESC LIMIT 3;","SELECT Country, COUNT(*) as NumberOfDonors FROM DonorCountry GROUP BY Country ORDER BY NumberOfDonors DESC LIMIT 3;",0 How many Silver medals for the Nation of Turkey with a Total of less than 2?,"CREATE TABLE table_name_9 (silver INTEGER, nation VARCHAR, total VARCHAR);","SELECT SUM(silver) FROM table_name_9 WHERE nation = ""turkey"" AND total < 2;","SELECT SUM(silver) FROM table_name_9 WHERE nation = ""turkey"" AND total 2;",0 How many vessels from Nigeria have been to the Mediterranean sea in the past month?,"CREATE TABLE vessels(id INT, name VARCHAR(50), country VARCHAR(50)); CREATE TABLE vessel_locations(id INT, vessel_id INT, location VARCHAR(50), timestamp TIMESTAMP);","SELECT COUNT(DISTINCT vessels.id) FROM vessels JOIN vessel_locations ON vessels.id = vessel_locations.vessel_id WHERE vessels.country = 'Nigeria' AND location LIKE '%Mediterranean%' AND timestamp > DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH)","SELECT COUNT(*) FROM vessels JOIN vessel_locations ON vessels.id = vessel_locations.vessel_id WHERE vessels.country = 'Nigeria' AND vessel_locations.location = 'Mediterranean Sea' AND vessel_locations.timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH);",0 What is the minimum capacity of any wind farm in the 'renewables' schema?,"CREATE SCHEMA renewables; CREATE TABLE wind_farms (name TEXT, capacity INTEGER); ",SELECT MIN(capacity) FROM renewables.wind_farms;,SELECT MIN(capacity) FROM renewables.wind_farms;,1 What is the Country that has a Player of Scott Hoch?,"CREATE TABLE table_name_31 (country VARCHAR, player VARCHAR);","SELECT country FROM table_name_31 WHERE player = ""scott hoch"";","SELECT country FROM table_name_31 WHERE player = ""scott hoch"";",1 Name the Comp which has a Name of smith?,"CREATE TABLE table_name_71 (comp VARCHAR, name VARCHAR);","SELECT comp FROM table_name_71 WHERE name = ""smith"";","SELECT comp FROM table_name_71 WHERE name = ""smith"";",1 What is the average quantity of 'organic cotton' products sold daily in each store?,"CREATE TABLE stores (store_id INT, store_name VARCHAR(50)); CREATE TABLE inventory (product_id INT, product_name VARCHAR(50), store_id INT, daily_sales INT); ","SELECT store_id, AVG(daily_sales) as avg_daily_sales FROM inventory WHERE product_name LIKE '%organic cotton%' GROUP BY store_id;","SELECT s.store_name, AVG(i.daily_sales) as avg_daily_sales FROM inventory i JOIN stores s ON i.store_id = s.store_id WHERE i.product_name = 'organic cotton' GROUP BY s.store_name;",0 Update social_good table record where org is 'Black Girls Code' and year is 2012,"CREATE TABLE social_good (org VARCHAR(255), year INT, method VARCHAR(255), social_impact FLOAT); ","UPDATE social_good SET method = 'Computer Science Education', social_impact = 0.88 WHERE org = 'Black Girls Code' AND year = 2012;",UPDATE social_good SET method ='social_impact' WHERE org = 'Black Girls Code' AND year = 2012;,0 "What is the average number of goals against with more than 12 wins, 12 losses, and a position greater than 3?","CREATE TABLE table_name_98 (goals_against INTEGER, position VARCHAR, wins VARCHAR, losses VARCHAR);",SELECT AVG(goals_against) FROM table_name_98 WHERE wins > 12 AND losses = 12 AND position > 3;,SELECT AVG(goals_against) FROM table_name_98 WHERE wins > 12 AND losses = 12 AND position > 3;,1 "What is the total number of rank with losses less than 992, North Carolina State College and a season greater than 101?","CREATE TABLE table_name_87 (rank VARCHAR, seasons VARCHAR, losses VARCHAR, college VARCHAR);","SELECT COUNT(rank) FROM table_name_87 WHERE losses < 992 AND college = ""north carolina state"" AND seasons > 101;","SELECT COUNT(rank) FROM table_name_87 WHERE losses 992 AND college = ""north carolina state college"" AND seasons > 101;",0 What is the maximum water temperature recorded in the past month for each farm?,"CREATE TABLE farm_temperature_data (id INT, farm_name VARCHAR(50), record_date DATE, water_temperature FLOAT); ","SELECT farm_name, MAX(water_temperature) as max_temp FROM farm_temperature_data WHERE record_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY farm_name;","SELECT farm_name, MAX(water_temperature) FROM farm_temperature_data WHERE record_date >= DATEADD(month, -1, GETDATE()) GROUP BY farm_name;",0 When Vincennes is the county seat what is the area sq mi (km 2 ) (rank) ?,"CREATE TABLE table_14253123_1 (area_sq_mi__km_2____rank_ VARCHAR, county_seat VARCHAR);","SELECT area_sq_mi__km_2____rank_ FROM table_14253123_1 WHERE county_seat = ""Vincennes"";","SELECT area_sq_mi__km_2____rank_ FROM table_14253123_1 WHERE county_seat = ""Vincennes"";",1 What is the percentage of flights operated by 'UniversalAirlines' that had safety issues?,"CREATE TABLE flights (id INT, airline VARCHAR(255), safety_issue BOOLEAN); ",SELECT 100.0 * COUNT(*) FILTER (WHERE safety_issue = true) / COUNT(*) as percentage FROM flights WHERE airline = 'UniversalAirlines';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM flights WHERE airline = 'UniversalAirlines')) FROM flights WHERE airline = 'UniversalAirlines' AND safety_issue = true;,0 What was the largest crowd at Arden Street Oval?,"CREATE TABLE table_name_85 (crowd INTEGER, venue VARCHAR);","SELECT MAX(crowd) FROM table_name_85 WHERE venue = ""arden street oval"";","SELECT MAX(crowd) FROM table_name_85 WHERE venue = ""arden street oval"";",1 "What is the average transaction amount for each digital asset in the 'crypto_transactions' table, partitioned by week?","CREATE TABLE crypto_transactions (transaction_id INT, digital_asset VARCHAR(20), transaction_amount DECIMAL(10,2), transaction_time DATETIME);","SELECT digital_asset, AVG(transaction_amount) as avg_transaction_amount, DATE_TRUNC('week', transaction_time) as week FROM crypto_transactions GROUP BY digital_asset, week ORDER BY week;","SELECT digital_asset, EXTRACT(WEEK FROM transaction_time) as week, AVG(transaction_amount) as avg_transaction_amount FROM crypto_transactions GROUP BY digital_asset, week;",0 "Which model has a sensor sized 48x36 mm, pixels of 6726 x 5040, and a 33 mp resolution?","CREATE TABLE table_name_87 (model VARCHAR, resolution VARCHAR, sensor_size VARCHAR, active_pixels VARCHAR);","SELECT model FROM table_name_87 WHERE sensor_size = ""48x36 mm"" AND active_pixels = ""6726 x 5040"" AND resolution = ""33 mp"";","SELECT model FROM table_name_87 WHERE sensor_size = ""48x36 mm"" AND active_pixels = ""6726 x 5040"" AND resolution = ""33 mp"";",1 What is the percentage change in sales of each product category in the Asia-Pacific region from 2021 to 2022?,"CREATE TABLE sales_data_5 (sale_id INT, product_category VARCHAR(255), region VARCHAR(255), sale_quantity INT, sale_year INT);","SELECT a.product_category, ((a.sale_quantity - b.sale_quantity) * 100.0 / b.sale_quantity) AS sales_percentage_change FROM sales_data_5 a JOIN sales_data_5 b ON a.product_category = b.product_category AND a.region = b.region AND a.sale_year = b.sale_year + 1 WHERE a.region LIKE 'Asia-Pacific%' AND b.sale_year = 2021 GROUP BY a.product_category, a.sale_quantity, b.sale_quantity;","SELECT product_category, (SUM(sale_quantity) OVER (PARTITION BY region ORDER BY sale_year)) * 100.0 / SUM(sale_quantity) as percentage_change FROM sales_data_5 WHERE region = 'Asia-Pacific' AND sale_year BETWEEN 2021 AND 2022;",0 Find the difference in average wages between unionized and non-unionized workers in the manufacturing sector.,"CREATE TABLE worker_wages(id INT, is_unionized BOOLEAN, wage FLOAT, sector VARCHAR(50));",SELECT AVG(wage) - (SELECT AVG(wage) FROM worker_wages WHERE is_unionized = false) AS wage_difference FROM worker_wages WHERE is_unionized = true AND sector = 'Manufacturing';,SELECT AVG(wage) - AVG(wage) FROM worker_wages WHERE is_unionized = true AND sector = 'Manufacturing';,0 "What is Winning Score, when Runner(s)-up is Ted Purdy?","CREATE TABLE table_name_37 (winning_score VARCHAR, runner_s__up VARCHAR);","SELECT winning_score FROM table_name_37 WHERE runner_s__up = ""ted purdy"";","SELECT winning_score FROM table_name_37 WHERE runner_s__up = ""ted purdy"";",1 What is the most common type of threat intelligence in the services sector?,"CREATE TABLE threat_intelligence (id INT, sector VARCHAR(20), type VARCHAR(50)); ","SELECT type, COUNT(*) as count FROM threat_intelligence WHERE sector = 'Services' GROUP BY type ORDER BY count DESC LIMIT 1;","SELECT type, COUNT(*) as count FROM threat_intelligence WHERE sector ='services' GROUP BY type ORDER BY count DESC LIMIT 1;",0 Delete records of menu items without a price,"CREATE TABLE menu_items (item_id INT, item_name VARCHAR(255), price DECIMAL(5,2));",DELETE FROM menu_items WHERE price IS NULL;,DELETE FROM menu_items WHERE price IS NULL;,1 What was the date when there were 26 golden tickets?,"CREATE TABLE table_name_57 (date VARCHAR, golden_tickets VARCHAR);",SELECT date FROM table_name_57 WHERE golden_tickets = 26;,SELECT date FROM table_name_57 WHERE golden_tickets = 26;,1 What was the date of the week 9 game?,"CREATE TABLE table_name_76 (date VARCHAR, week VARCHAR);",SELECT date FROM table_name_76 WHERE week = 9;,SELECT date FROM table_name_76 WHERE week = 9;,1 What is the brand of DXRE?,"CREATE TABLE table_name_35 (branding VARCHAR, callsign VARCHAR);","SELECT branding FROM table_name_35 WHERE callsign = ""dxre"";","SELECT branding FROM table_name_35 WHERE callsign = ""dxre"";",1 What is the total revenue generated from all virtual tours conducted in Spain in the year 2022?,"CREATE TABLE spanish_virtual_tours (id INT, year INT, revenue FLOAT); ",SELECT SUM(revenue) FROM spanish_virtual_tours WHERE year = 2022;,SELECT SUM(revenue) FROM spanish_virtual_tours WHERE year = 2022;,1 What is the average donation amount to environmental organizations?,"CREATE TABLE Donations (DonationID int, Amount decimal, OrganizationType text); ",SELECT AVG(Amount) FROM Donations WHERE OrganizationType = 'Environment';,SELECT AVG(Amount) FROM Donations WHERE OrganizationType = 'Environmental';,0 What is the total budget allocated for transportation policies in 'Toronto'?,"CREATE TABLE City (id INT, name VARCHAR(50)); CREATE TABLE Policy (id INT, name VARCHAR(50), city_id INT, category VARCHAR(50), budget DECIMAL(10,2), start_date DATE, end_date DATE); ",SELECT SUM(budget) FROM Policy WHERE city_id = 3 AND category = 'Transportation';,SELECT SUM(Policy.budget) FROM Policy INNER JOIN City ON Policy.city_id = City.id WHERE City.name = 'Toronto' AND Policy.category = 'Transportation';,0 "What is Games, when Points is less than 340, and when Rank is greater than 3?","CREATE TABLE table_name_89 (games VARCHAR, points VARCHAR, rank VARCHAR);",SELECT games FROM table_name_89 WHERE points < 340 AND rank > 3;,SELECT games FROM table_name_89 WHERE points 340 AND rank > 3;,0 What are the names of the traditional dances in the Polynesian culture domain and their origins?,"CREATE TABLE TraditionalDances (DanceID int, DanceName varchar(255), DanceOrigin varchar(255), CultureDomain varchar(255)); ","SELECT DanceName, DanceOrigin FROM TraditionalDances WHERE CultureDomain = 'Polynesian';","SELECT DanceName, DanceOrigin FROM TraditionalDances WHERE CultureDomain = 'Polynesia';",0 Which donors have donated to organizations in both the 'Health' and 'Education' categories?,"CREATE TABLE donors (id INT, name VARCHAR(50)); CREATE TABLE donations (id INT, donor_id INT, organization_id INT, amount DECIMAL(10, 2)); CREATE TABLE organizations (id INT, name VARCHAR(50), category VARCHAR(20)); ",SELECT donors.name FROM donors JOIN donations d1 ON donors.id = d1.donor_id JOIN organizations o1 ON d1.organization_id = o1.id JOIN donations d2 ON donors.id = d2.donor_id JOIN organizations o2 ON d2.organization_id = o2.id WHERE o1.category = 'Health' AND o2.category = 'Education' GROUP BY donors.name HAVING COUNT(DISTINCT o1.category) > 1;,"SELECT donors.name FROM donors INNER JOIN donations ON donors.id = donations.donor_id INNER JOIN organizations ON donations.organization_id = organizations.id WHERE organizations.category IN ('Health', 'Education');",0 What position did the player whose highlights were 5 career INTs play?,"CREATE TABLE table_22982552_9 (position VARCHAR, highlight_s_ VARCHAR);","SELECT position FROM table_22982552_9 WHERE highlight_s_ = ""5 career INTs"";","SELECT position FROM table_22982552_9 WHERE highlight_s_ = ""5 career INTs"";",1 "Which Opponent that has a Week larger than 3 on october 6, 1991?","CREATE TABLE table_name_78 (opponent VARCHAR, week VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_78 WHERE week > 3 AND date = ""october 6, 1991"";","SELECT opponent FROM table_name_78 WHERE week > 3 AND date = ""october 6, 1991"";",1 What is the total quantity of orders for each product category?,"CREATE TABLE Products (id INT, category VARCHAR(20), price DECIMAL(5,2)); CREATE TABLE Orders (id INT, product_id INT, quantity INT, order_date DATE); ","SELECT p.category, SUM(o.quantity) FROM Products p JOIN Orders o ON p.id = o.product_id GROUP BY p.category;","SELECT Products.category, SUM(Orders.quantity) FROM Products INNER JOIN Orders ON Products.id = Orders.product_id GROUP BY Products.category;",0 What is the average transaction amount for clients living in California?,"CREATE TABLE clients (client_id INT, name TEXT, state TEXT, transaction_amount DECIMAL); ",SELECT AVG(transaction_amount) FROM clients WHERE state = 'California';,SELECT AVG(transaction_amount) FROM clients WHERE state = 'California';,1 What time did Sara Nordenstam get?,"CREATE TABLE table_name_40 (time VARCHAR, name VARCHAR);","SELECT time FROM table_name_40 WHERE name = ""sara nordenstam"";","SELECT time FROM table_name_40 WHERE name = ""sara nordenstam"";",1 Who are the top 5 users who have the most comments?,"CREATE TABLE users (user_id INT, name TEXT, comment_count INT);",SELECT name FROM users ORDER BY comment_count DESC LIMIT 5;,"SELECT name, comment_count FROM users ORDER BY comment_count DESC LIMIT 5;",0 What are the top 3 cruelty-free certified cosmetic products by sales in the USA?,"CREATE TABLE products (product_id INT, product_name TEXT, sales FLOAT, country TEXT); CREATE TABLE certification (product_id INT, certified TEXT); ","SELECT p.product_name, p.sales FROM products p JOIN certification c ON p.product_id = c.product_id WHERE c.certified = 'cruelty-free' AND p.country = 'USA' ORDER BY p.sales DESC LIMIT 3;","SELECT products.product_name, SUM(products.sales) as total_sales FROM products INNER JOIN certification ON products.product_id = certification.product_id WHERE products.country = 'USA' AND certification.certified = 'cruelty-free' GROUP BY products.product_name ORDER BY total_sales DESC LIMIT 3;",0 What was the aggregate score for Montauban?,"CREATE TABLE table_27986200_3 (aggregate_score VARCHAR, proceed_to_quarter_final VARCHAR);","SELECT aggregate_score FROM table_27986200_3 WHERE proceed_to_quarter_final = ""Montauban"";","SELECT aggregate_score FROM table_27986200_3 WHERE proceed_to_quarter_final = ""Montauban"";",1 What is the maximum depth recorded for the Mariana Trench?,"CREATE TABLE marine_trenches (name VARCHAR(255), location VARCHAR(255), max_depth DECIMAL(5,2)); ",SELECT MAX(max_depth) FROM marine_trenches WHERE name = 'Mariana Trench';,SELECT MAX(max_depth) FROM marine_trenches WHERE name = 'Mariana Trench';,1 What State has an Opened (closing date if defunct) that shows 1960?,"CREATE TABLE table_name_28 (state VARCHAR, opened__closing_date_if_defunct_ VARCHAR);","SELECT state FROM table_name_28 WHERE opened__closing_date_if_defunct_ = ""1960"";","SELECT state FROM table_name_28 WHERE opened__closing_date_if_defunct_ = ""1960"";",1 What is the total number of policies and their combined premium for policyholders living in 'Ontario' who have a car make of 'BMW' or 'Audi'?,"CREATE TABLE Policyholders (PolicyholderID INT, Premium DECIMAL(10, 2), PolicyholderState VARCHAR(10), CarMake VARCHAR(20)); ","SELECT SUM(Premium), COUNT(*) FROM Policyholders WHERE PolicyholderState = 'Ontario' AND (CarMake = 'BMW' OR CarMake = 'Audi');","SELECT COUNT(*), SUM(Premium) FROM Policyholders WHERE PolicyholderState = 'Ontario' AND CarMake IN ('BMW', 'Audi');",0 What is the total number of doctors in each country of the 'rural' schema?,"CREATE SCHEMA rural; CREATE TABLE rural.doctors (id INT, country TEXT);","SELECT country, COUNT(*) FROM rural.doctors GROUP BY country;","SELECT country, COUNT(*) FROM rural.doctors GROUP BY country;",1 What are the names of all intelligence agencies operating in 'Africa'?,"CREATE TABLE intelligence_agencies (id INT, agency_name TEXT, region TEXT); ",SELECT agency_name FROM intelligence_agencies WHERE region = 'Africa';,SELECT agency_name FROM intelligence_agencies WHERE region = 'Africa';,1 What is the number of male and female patients for each condition?,"CREATE TABLE PatientConditions (PatientID int, ConditionID int, Gender varchar(10)); ","SELECT Conditions.Condition, Gender, COUNT(*) FROM PatientConditions JOIN Conditions ON PatientConditions.ConditionID = Conditions.ConditionID GROUP BY Conditions.Condition, Gender;","SELECT ConditionID, COUNT(*) FROM PatientConditions WHERE Gender = 'Male' INTERSECT SELECT ConditionID, COUNT(*) FROM PatientConditions WHERE Gender = 'Female' GROUP BY ConditionID;",0 Who's the athlete with a wind of 1.7 and from the United States?,"CREATE TABLE table_name_50 (athlete VARCHAR, nationality VARCHAR, wind VARCHAR);","SELECT athlete FROM table_name_50 WHERE nationality = ""united states"" AND wind = ""1.7"";","SELECT athlete FROM table_name_50 WHERE nationality = ""united states"" AND wind = ""1.7"";",1 What is the average temperature per month in each country in the 'temperature_readings' table?,"CREATE TABLE temperature_readings (reading_date DATE, temperature FLOAT, country TEXT);","SELECT DATE_TRUNC('month', reading_date) AS month, country, AVG(temperature) FROM temperature_readings GROUP BY month, country;","SELECT country, EXTRACT(MONTH FROM reading_date) AS month, AVG(temperature) AS avg_temperature FROM temperature_readings GROUP BY country, month;",0 How many teams were there with a high score of 143?,"CREATE TABLE table_16570286_2 (team VARCHAR, highest_score VARCHAR);","SELECT COUNT(team) FROM table_16570286_2 WHERE highest_score = ""143"";",SELECT COUNT(team) FROM table_16570286_2 WHERE highest_score = 143;,0 Add a new column representative to the community table and update values,"CREATE TABLE community(id INT, name VARCHAR(255), population INT, language VARCHAR(255), representative BOOLEAN);",ALTER TABLE community ADD COLUMN representative BOOLEAN;,UPDATE community SET representative = TRUE WHERE id = 1;,0 What is the average horsepower of sports cars released in 2020?,"CREATE TABLE Cars (id INT, name VARCHAR(50), type VARCHAR(50), horsepower INT, release_year INT); ",SELECT AVG(horsepower) FROM Cars WHERE type = 'Sports' AND release_year = 2020;,SELECT AVG(horsepower) FROM Cars WHERE type = 'Sports' AND release_year = 2020;,1 "What is the average listing price for eco-friendly properties in Portland, OR?","CREATE TABLE listings (id INT, city VARCHAR(50), property_type VARCHAR(50), listing_price FLOAT, eco_friendly BOOLEAN); ",SELECT AVG(listing_price) FROM listings WHERE city = 'Portland' AND eco_friendly = true;,SELECT AVG(listing_price) FROM listings WHERE city = 'Portland' AND eco_friendly = true;,1 Insert a new research grant for researcher 3 in 2022,"CREATE TABLE researchers (id serial, name text); CREATE TABLE grants (id serial, researcher_id integer, title text, amount real, year integer);","INSERT INTO grants (researcher_id, title, amount, year) VALUES (3, 'Glacier Melt in Greenland', 50000, 2022);","INSERT INTO grants (id serial, researcher_id, title, amount, year) VALUES (3, 'Researcher 3', 2022);",0 What is the transaction volume for each decentralized application in the past week?,"CREATE TABLE weekly_transaction_volume (app_name VARCHAR(255), transaction_volume INT, week DATE); ","SELECT app_name, transaction_volume, DATEDIFF(day, week, CURRENT_DATE) as days_ago FROM weekly_transaction_volume WHERE DATEDIFF(day, week, CURRENT_DATE) <= 7;","SELECT app_name, transaction_volume FROM weekly_transaction_volume WHERE week >= DATEADD(week, -1, GETDATE()) GROUP BY app_name;",0 Name the least lane for kasey giteau and rank less than 18,"CREATE TABLE table_name_31 (lane INTEGER, name VARCHAR, rank VARCHAR);","SELECT MIN(lane) FROM table_name_31 WHERE name = ""kasey giteau"" AND rank < 18;","SELECT MIN(lane) FROM table_name_31 WHERE name = ""kasey giteau"" AND rank 18;",0 what is the properties of potassium when lithium is h a l o g e n s and sodium is bromine?,"CREATE TABLE table_name_76 (potassium VARCHAR, lithium VARCHAR, sodium VARCHAR);","SELECT potassium FROM table_name_76 WHERE lithium = ""h a l o g e n s"" AND sodium = ""bromine"";","SELECT potassium FROM table_name_76 WHERE lithium = ""h a l o g e n s"" AND sodium = ""bromine"";",1 What was their record when they played the stampeders?,"CREATE TABLE table_21839208_4 (record VARCHAR, opponent VARCHAR);","SELECT record FROM table_21839208_4 WHERE opponent = ""Stampeders"";","SELECT record FROM table_21839208_4 WHERE opponent = ""Stampers"";",0 What is the Date of the Game with a Result of w 22–16 in TV Time of CBS 1:00ET?,"CREATE TABLE table_name_90 (date VARCHAR, tv_time VARCHAR, result VARCHAR);","SELECT date FROM table_name_90 WHERE tv_time = ""cbs 1:00et"" AND result = ""w 22–16"";","SELECT date FROM table_name_90 WHERE tv_time = ""cbs 1:00et"" AND result = ""w 22–16"";",1 Can you tell me the highest Game that has the Opponent of atlanta hawks?,"CREATE TABLE table_name_56 (game INTEGER, opponent VARCHAR);","SELECT MAX(game) FROM table_name_56 WHERE opponent = ""atlanta hawks"";","SELECT MAX(game) FROM table_name_56 WHERE opponent = ""atlanta hawks"";",1 Name the least number of believers,CREATE TABLE table_24613895_1 (number_of_believers INTEGER);,SELECT MIN(number_of_believers) FROM table_24613895_1;,SELECT MIN(number_of_believers) FROM table_24613895_1;,1 What is the total revenue for each type of fitness class?,"CREATE TABLE classes(class_id INT, class_type VARCHAR(20), price DECIMAL(5,2)); ","SELECT class_type, SUM(price) as total_revenue FROM classes GROUP BY class_type;","SELECT class_type, SUM(price) FROM classes GROUP BY class_type;",0 What are the total sales and average potency for each strain produced by cultivators in Oregon in 2021?,"CREATE TABLE cultivators (id INT, name TEXT, state TEXT); CREATE TABLE strains (cultivator_id INT, name TEXT, year INT, potency INT, sales INT); ","SELECT s.name as strain_name, c.state as cultivator_state, SUM(s.sales) as total_sales, AVG(s.potency) as average_potency FROM strains s INNER JOIN cultivators c ON s.cultivator_id = c.id WHERE c.state = 'Oregon' AND s.year = 2021 GROUP BY s.name, c.state;","SELECT s.name, SUM(s.sales) as total_sales, AVG(s.potency) as avg_potency FROM strains s JOIN cultivators c ON s.cultivator_id = c.id WHERE c.state = 'Oregon' AND s.year = 2021 GROUP BY s.name;",0 How many safety incidents were reported in the chemical plant last year?,"CREATE TABLE safety_incidents (incident_id INT, incident_date DATE); ",SELECT COUNT(*) FROM safety_incidents WHERE incident_date BETWEEN '2021-01-01' AND '2021-12-31';,"SELECT COUNT(*) FROM safety_incidents WHERE incident_date >= DATEADD(year, -1, GETDATE());",0 Who is the visiting team when Minnesota is the home team?,"CREATE TABLE table_name_67 (visitor VARCHAR, home VARCHAR);","SELECT visitor FROM table_name_67 WHERE home = ""minnesota"";","SELECT visitor FROM table_name_67 WHERE home = ""minnesota"";",1 What venue held the event in 2008 that has 2:13:10 in the notes?,"CREATE TABLE table_name_12 (venue VARCHAR, year VARCHAR, notes VARCHAR);","SELECT venue FROM table_name_12 WHERE year = 2008 AND notes = ""2:13:10"";","SELECT venue FROM table_name_12 WHERE year = 2008 AND notes = ""2:13:10"";",1 What country is Darren Clarke from?,"CREATE TABLE table_name_18 (country VARCHAR, player VARCHAR);","SELECT country FROM table_name_18 WHERE player = ""darren clarke"";","SELECT country FROM table_name_18 WHERE player = ""darren clarke"";",1 How many students with ADHD received sign language interpreting support?,"CREATE TABLE Support_Services (Student_ID INT, Student_Name TEXT, Service_Type TEXT, Disability_Type TEXT); ",SELECT COUNT(*) FROM Support_Services WHERE Service_Type = 'Sign Language Interpreting' AND Disability_Type = 'ADHD';,SELECT COUNT(*) FROM Support_Services WHERE Disability_Type = 'ADHD';,0 What is the average plastic waste generation per capita in the European Union?,"CREATE TABLE PlasticWaste (country VARCHAR(50), population INT, plastic_waste_kg FLOAT); ","SELECT AVG(plastic_waste_kg/population) FROM PlasticWaste WHERE country IN ('Germany', 'France', 'Italy', 'Spain', 'United Kingdom');","SELECT AVG(plastic_waste_kg/population) FROM PlasticWaste WHERE country IN ('Germany', 'France', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', '",0 What is the average consumer awareness score for each continent in the 'consumer_awareness' table?,"CREATE TABLE consumer_awareness (id INT, country VARCHAR(20), continent VARCHAR(20), score FLOAT); ","SELECT continent, AVG(score) FROM consumer_awareness GROUP BY continent;","SELECT continent, AVG(score) FROM consumer_awareness GROUP BY continent;",1 "Which Venue has an Opposing Team of manchester united, and a Round of 5th round replay?","CREATE TABLE table_name_79 (venue VARCHAR, opposing_team VARCHAR, round VARCHAR);","SELECT venue FROM table_name_79 WHERE opposing_team = ""manchester united"" AND round = ""5th round replay"";","SELECT venue FROM table_name_79 WHERE opposing_team = ""manchester united"" AND round = ""5th round replay"";",1 Show the name and service for all trains in order by time.,"CREATE TABLE train (name VARCHAR, service VARCHAR, TIME VARCHAR);","SELECT name, service FROM train ORDER BY TIME;","SELECT name, service FROM train ORDER BY TIME;",1 What was the outcome of cases in which clients were billed over $1000?,"CREATE TABLE clients (id INT, name TEXT, state TEXT); CREATE TABLE billing (id INT, client_id INT, amount INT); CREATE TABLE cases (id INT, client_id INT, result TEXT); ",SELECT cases.result FROM cases INNER JOIN billing ON cases.client_id = billing.client_id WHERE billing.amount > 1000;,SELECT cases.result FROM cases INNER JOIN clients ON cases.client_id = clients.id INNER JOIN billing ON cases.client_id = billing.client_id WHERE billing.amount > 1000;,0 List the top 3 regions with the highest number of health interventions by Save the Children in 2018.,"CREATE TABLE health_interventions (region VARCHAR(255), agency VARCHAR(255), num_interventions INT, year INT);","SELECT region, SUM(num_interventions) as total_interventions FROM health_interventions WHERE agency = 'Save the Children' GROUP BY region ORDER BY total_interventions DESC LIMIT 3;","SELECT region, SUM(num_interventions) as total_interventions FROM health_interventions WHERE agency = 'Save the Children' AND year = 2018 GROUP BY region ORDER BY total_interventions DESC LIMIT 3;",0 How many recycling centers are there in the state of New York as of 2021?,"CREATE TABLE recycling_centers (name VARCHAR(30), state VARCHAR(20), year INT, num_centers INT); ",SELECT SUM(num_centers) AS total_centers FROM recycling_centers WHERE state = 'New York' AND year = 2021;,SELECT SUM(num_centers) FROM recycling_centers WHERE state = 'New York' AND year = 2021;,0 what kind of Week 5 that has a Week 1 of mandy ashford?,"CREATE TABLE table_name_68 (week_5 VARCHAR, week_1 VARCHAR);","SELECT week_5 FROM table_name_68 WHERE week_1 = ""mandy ashford"";","SELECT week_5 FROM table_name_68 WHERE week_1 = ""mandy ashford"";",1 What is the annual change in water usage for agricultural users in Colorado?,"CREATE TABLE annual_water_usage (year INT, user_type VARCHAR(10), water_usage INT);","SELECT EXTRACT(YEAR FROM date_trunc('year', date)) as year, AVG(water_usage) - LAG(AVG(water_usage)) OVER (ORDER BY year) as annual_change FROM annual_water_usage JOIN (SELECT date_trunc('year', date) as date, user_type FROM water_consumption_by_day) tmp ON annual_water_usage.year = EXTRACT(YEAR FROM tmp.date) WHERE user_type = 'agricultural' AND state = 'Colorado' GROUP BY year;","SELECT year, user_type, water_usage, ROW_NUMBER() OVER (PARTITION BY user_type ORDER BY water_usage DESC) as rn FROM annual_water_usage WHERE user_type = 'Agricultural' AND state = 'Colorado';",0 What is the total sum of the goals at competitions with more than 10 draws?,"CREATE TABLE table_name_84 (goals_for INTEGER, drawn INTEGER);",SELECT SUM(goals_for) FROM table_name_84 WHERE drawn > 10;,SELECT SUM(goals_for) FROM table_name_84 WHERE drawn > 10;,1 "What regular season had an average attendance of 1,242?","CREATE TABLE table_name_89 (reg_season VARCHAR, avg_attendance_† VARCHAR);","SELECT reg_season FROM table_name_89 WHERE avg_attendance_† = ""1,242"";","SELECT reg_season FROM table_name_89 WHERE avg_attendance_ = ""1,242"";",0 Show the names and research interests of all professors who have not received any research grants.,"CREATE TABLE professors (id INT, name VARCHAR(50), department VARCHAR(50), research_interest VARCHAR(50), grant INT); ","SELECT name, research_interest FROM professors WHERE grant = 0;","SELECT name, research_interest FROM professors WHERE grant IS NULL;",0 Which farms have farmed more than one species of fish?,"CREATE TABLE Farm (FarmID INT, FarmName TEXT); CREATE TABLE Fish (FishID INT, FarmID INT, SpeciesID INT, BirthDate DATE); ",SELECT FarmName FROM Farm INNER JOIN Fish ON Farm.FarmID = Fish.FarmID GROUP BY FarmName HAVING COUNT(DISTINCT SpeciesID) > 1;,SELECT FarmName FROM Farm JOIN Fish ON Farm.FarmID = Fish.FarmID GROUP BY FarmName HAVING COUNT(DISTINCT SpeciesID) > 1;,0 What were the total donations in Q3 2020 by state?,"CREATE TABLE donations (id INT, donation_date DATE, state TEXT, amount DECIMAL(10,2)); ","SELECT state, SUM(amount) FROM donations WHERE donation_date BETWEEN '2020-07-01' AND '2020-09-30' GROUP BY state;","SELECT state, SUM(amount) as total_donations FROM donations WHERE donation_date BETWEEN '2020-04-01' AND '2020-03-31' GROUP BY state;",0 Which mean number of losses had a played number that was bigger than 34?,"CREATE TABLE table_name_58 (losses INTEGER, played INTEGER);",SELECT AVG(losses) FROM table_name_58 WHERE played > 34;,SELECT AVG(losses) FROM table_name_58 WHERE played > 34;,1 Show ids for all students who live in CHI.,"CREATE TABLE Student (StuID VARCHAR, city_code VARCHAR);","SELECT StuID FROM Student WHERE city_code = ""CHI"";","SELECT StuID FROM Student WHERE city_code = ""CHI"";",1 How many patients with hypertension in rural Montana are over the age of 70?,"CREATE TABLE patients (id INT, name VARCHAR(50), age INT, gender VARCHAR(10), diagnosis VARCHAR(50), location VARCHAR(50)); ",SELECT COUNT(*) FROM patients WHERE diagnosis = 'Hypertension' AND location = 'Montana' AND age > 70;,SELECT COUNT(*) FROM patients WHERE diagnosis = 'hypertension' AND location = 'Montana' AND age > 70;,0 What position did Roseau High School (USHS-MN) play?,"CREATE TABLE table_2897457_7 (position VARCHAR, college_junior_club_team VARCHAR);","SELECT position FROM table_2897457_7 WHERE college_junior_club_team = ""Roseau High School (USHS-MN)"";","SELECT position FROM table_2897457_7 WHERE college_junior_club_team = ""Roseau High School (USHS-MN)"";",1 What is the average points value for a rank less than 12 for David Santee?,"CREATE TABLE table_name_42 (points INTEGER, rank VARCHAR, name VARCHAR);","SELECT AVG(points) FROM table_name_42 WHERE rank < 12 AND name = ""david santee"";","SELECT AVG(points) FROM table_name_42 WHERE rank 12 AND name = ""david santee"";",0 What is the total word count for articles in the 'international' category?,"CREATE TABLE news (title VARCHAR(255), author VARCHAR(255), word_count INT, category VARCHAR(255)); ",SELECT SUM(word_count) FROM news WHERE category = 'International';,SELECT SUM(word_count) FROM news WHERE category = 'international';,0 "tries against is 88, played is 22, what is the lost?","CREATE TABLE table_name_57 (lost VARCHAR, played VARCHAR, tries_against VARCHAR);","SELECT lost FROM table_name_57 WHERE played = ""22"" AND tries_against = ""88"";","SELECT lost FROM table_name_57 WHERE played = ""22"" AND tries_against = ""88"";",1 What is the highest New Zealand value with a Hong Kong value less than 0?,"CREATE TABLE table_name_47 (new_zealand INTEGER, hong_kong INTEGER);",SELECT MAX(new_zealand) FROM table_name_47 WHERE hong_kong < 0;,SELECT MAX(new_zealand) FROM table_name_47 WHERE hong_kong 0;,0 "What is the waste generation trend in South America between 2018 and 2020, grouped by year?","CREATE TABLE WasteGenerationTrend (country VARCHAR(50), year INT, waste_quantity INT); ","SELECT year, AVG(waste_quantity) FROM WasteGenerationTrend WHERE year BETWEEN 2018 AND 2020 AND country IN ('South America/Brazil', 'South America/Argentina') GROUP BY year;","SELECT year, SUM(waste_quantity) as total_waste FROM WasteGenerationTrend WHERE country IN ('Argentina', 'Colombia') AND year BETWEEN 2018 AND 2020 GROUP BY year;",0 What is the average rating of algorithms 'V' and 'W'?,"CREATE TABLE IF NOT EXISTS ai_feedback (algorithm_name TEXT, user_feedback TEXT, rating INTEGER); ","SELECT AVG(rating) as avg_rating FROM ai_feedback WHERE algorithm_name IN ('Algorithm V', 'Algorithm W');","SELECT AVG(rating) FROM ai_feedback WHERE algorithm_name IN ('V', 'W');",0 Where was the result a win against Mike Large?,"CREATE TABLE table_name_44 (location VARCHAR, res VARCHAR, opponent VARCHAR);","SELECT location FROM table_name_44 WHERE res = ""win"" AND opponent = ""mike large"";","SELECT location FROM table_name_44 WHERE res = ""win"" AND opponent = ""mike large"";",1 What is the total revenue generated from the mobile subscribers with unlimited data plans in the Southeastern region for the month of July 2022?,"CREATE TABLE subscribers(id INT, plan_type VARCHAR(10), region VARCHAR(10)); CREATE TABLE plans(plan_type VARCHAR(10), price DECIMAL(5,2)); CREATE TABLE transactions(subscriber_id INT, transaction_date DATE, plan_id INT); ",SELECT SUM(plans.price) FROM subscribers INNER JOIN transactions ON subscribers.id = transactions.subscriber_id INNER JOIN plans ON subscribers.plan_type = plans.plan_type WHERE subscribers.region = 'Southeastern' AND subscribers.plan_type = 'unlimited' AND MONTH(transactions.transaction_date) = 7 AND YEAR(transactions.transaction_date) = 2022;,SELECT SUM(price) FROM transactions JOIN subscribers ON transactions.subscriber_id = subscribers.id JOIN plans ON subscribers.plan_type = plans.plan_type WHERE subscribers.region = 'Southeastern' AND transactions.transaction_date BETWEEN '2022-07-01' AND '2022-07-31' AND subscribers.plan_type = 'Mobile' AND plans.plan_type = 'Unlimited Data';,0 What is the average prize for the Buttercross Limited Stakes?,"CREATE TABLE table_name_33 (prize__ INTEGER, race VARCHAR);","SELECT AVG(prize__) AS £k_ FROM table_name_33 WHERE race = ""buttercross limited stakes"";","SELECT AVG(prize__) FROM table_name_33 WHERE race = ""buttercross limited stakes"";",0 "Which Designation has a Manufacturer of siemens, and a Quantity of 52?","CREATE TABLE table_name_56 (designation VARCHAR, manufacturer VARCHAR, quantity VARCHAR);","SELECT designation FROM table_name_56 WHERE manufacturer = ""siemens"" AND quantity = 52;","SELECT designation FROM table_name_56 WHERE manufacturer = ""siemens"" AND quantity = 52;",1 Delete artists who have not sold any artwork in the last 2 years,"CREATE TABLE art_sales (id INT, artist_id INT, sale_date DATE); CREATE TABLE artists (id INT, name VARCHAR(255)); ","WITH inactive_artists AS (DELETE FROM artists WHERE id NOT IN (SELECT artist_id FROM art_sales WHERE sale_date >= DATE_SUB(CURRENT_DATE, INTERVAL 2 YEAR))) SELECT * FROM artists;","DELETE FROM artists WHERE id NOT IN (SELECT artist_id FROM art_sales WHERE sale_date >= DATEADD(year, -2, GETDATE());",0 What is the manufacturer serial number of the 1963 withdrawn year?,"CREATE TABLE table_name_86 (manufacturer_serial_numbers VARCHAR, year_s__withdrawn VARCHAR);","SELECT manufacturer_serial_numbers FROM table_name_86 WHERE year_s__withdrawn = ""1963"";",SELECT manufacturer_serial_numbers FROM table_name_86 WHERE year_s__withdrawn = 1963;,0 "If the player is Corey Pavin when he had a To par of over 7, what was the sum of his totals?","CREATE TABLE table_name_77 (total INTEGER, to_par VARCHAR, player VARCHAR);","SELECT SUM(total) FROM table_name_77 WHERE to_par > 7 AND player = ""corey pavin"";","SELECT SUM(total) FROM table_name_77 WHERE to_par > 7 AND player = ""craig pavin"";",0 What is the score of the game where real espana was the home team?,"CREATE TABLE table_name_90 (score VARCHAR, home VARCHAR);","SELECT score FROM table_name_90 WHERE home = ""real espana"";","SELECT score FROM table_name_90 WHERE home = ""real espana"";",1 "Create a table named ""vehicles"" with columns ""vehicle_id"", ""type"", ""model"", and ""year"".","CREATE TABLE vehicles (vehicle_id INT, type VARCHAR(255), model VARCHAR(255), year INT);","CREATE TABLE vehicles (vehicle_id INT, type VARCHAR(255), model VARCHAR(255), year INT);","CREATE TABLE vehicles (vehicle_id INT, type VARCHAR(255), model VARCHAR(255), year INT);",1 What is the minimum manhunt beauty contest?,CREATE TABLE table_30018460_1 (manhunt_international INTEGER);,SELECT MIN(manhunt_international) FROM table_30018460_1;,SELECT MIN(manhunt_international) FROM table_30018460_1;,1 How many reported crimes occurred in each district in the last month?,"CREATE TABLE Districts (DistrictID INT, Name VARCHAR(50)); CREATE TABLE Crimes (CrimeID INT, DistrictID INT, Date DATE);","SELECT D.Name, COUNT(C.CrimeID) as NumCrimes FROM Districts D INNER JOIN Crimes C ON D.DistrictID = C.DistrictID WHERE C.Date >= DATEADD(MONTH, -1, GETDATE()) GROUP BY D.Name;","SELECT Districts.Name, COUNT(Crimes.CrimeID) FROM Districts INNER JOIN Crimes ON Districts.DistrictID = Crimes.DistrictID WHERE Crimes.Date >= DATEADD(month, -1, GETDATE()) GROUP BY Districts.Name;",0 What was the Attendance in Week 10?,"CREATE TABLE table_name_59 (attendance VARCHAR, week VARCHAR);",SELECT attendance FROM table_name_59 WHERE week = 10;,SELECT attendance FROM table_name_59 WHERE week = 10;,1 What is the count of aircraft manufactured by Boeing?,"CREATE TABLE aircraft (maker TEXT, model TEXT); ",SELECT COUNT(*) FROM aircraft WHERE maker = 'Boeing';,SELECT COUNT(*) FROM aircraft WHERE maker = 'Boeing';,1 List all the investments made by the investor 'Green Capital' in the education sector.,"CREATE TABLE investments (id INT, investor_name VARCHAR(255), company_id INT, sector VARCHAR(255), risk_level INT); ",SELECT * FROM investments WHERE investor_name = 'Green Capital' AND sector = 'Education';,SELECT * FROM investments WHERE investor_name = 'Green Capital' AND sector = 'Education';,1 "Find the chemical with the highest safety violation score in the past month, per manufacturing site?","CREATE TABLE SafetyViolations (Site VARCHAR(50), Chemical VARCHAR(50), ViolationScore INT, ViolationDate DATETIME);","SELECT Site, MAX(ViolationScore) OVER (PARTITION BY Site ORDER BY ViolationDate ROWS BETWEEN 29 PRECEDING AND CURRENT ROW) AS MaxViolationScore, Chemical FROM SafetyViolations","SELECT Site, Chemical, ViolationScore FROM SafetyViolations WHERE ViolationDate >= DATEADD(month, -1, GETDATE()) GROUP BY Site, Chemical ORDER BY ViolationScore DESC LIMIT 1;",0 Which date had a sport of Academics?,"CREATE TABLE table_name_70 (date VARCHAR, sport VARCHAR);","SELECT date FROM table_name_70 WHERE sport = ""academics"";","SELECT date FROM table_name_70 WHERE sport = ""academics"";",1 What is the average number of points when the ranking is 7th and the draw is less than 4?,"CREATE TABLE table_name_63 (points INTEGER, rank VARCHAR, draw VARCHAR);","SELECT AVG(points) FROM table_name_63 WHERE rank = ""7th"" AND draw < 4;","SELECT AVG(points) FROM table_name_63 WHERE rank = ""7th"" AND draw 4;",0 What is the number of glaciers in Iceland?,"CREATE TABLE Glaciers (glacier_name VARCHAR(50), country VARCHAR(50)); ","SELECT country, COUNT(*) FROM Glaciers GROUP BY country;",SELECT COUNT(*) FROM Glaciers WHERE country = 'Iceland';,0 "Who is the opponent of the December 18, 1994 game?","CREATE TABLE table_name_90 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_90 WHERE date = ""december 18, 1994"";","SELECT opponent FROM table_name_90 WHERE date = ""december 18, 1994"";",1 What's the minimum budget for agricultural innovation projects in the 'innovation_projects' table?,"CREATE TABLE innovation_projects (id INT PRIMARY KEY, project_name VARCHAR(100), budget INT, category VARCHAR(50), start_date DATE, end_date DATE, status VARCHAR(20));",SELECT MIN(budget) FROM innovation_projects WHERE category = 'agricultural innovation';,SELECT MIN(budget) FROM innovation_projects WHERE category = 'Agriculture';,0 Update the email of the donor with ID 3 to 'new_email@example.com',"CREATE TABLE Donors (ID INT PRIMARY KEY, Name TEXT, Email TEXT);",UPDATE Donors SET Email = 'new_email@example.com' WHERE ID = 3;,UPDATE Donors SET Email = 'new_email@example.com' WHERE ID = 3;,1 What is the Country with the T3 Place Player with a Score of 71-76-71=218?,"CREATE TABLE table_name_99 (country VARCHAR, place VARCHAR, score VARCHAR);","SELECT country FROM table_name_99 WHERE place = ""t3"" AND score = 71 - 76 - 71 = 218;","SELECT country FROM table_name_99 WHERE place = ""t3"" AND score = 71 - 76 - 71 = 218;",1 What is the year the institution Tougaloo College joined?,"CREATE TABLE table_10577579_2 (joined VARCHAR, institution VARCHAR);","SELECT joined FROM table_10577579_2 WHERE institution = ""Tougaloo College"";","SELECT joined FROM table_10577579_2 WHERE institution = ""Tougaloo College"";",1 "Name the number of record for united center 18,838","CREATE TABLE table_22669044_8 (record VARCHAR, location_attendance VARCHAR);","SELECT COUNT(record) FROM table_22669044_8 WHERE location_attendance = ""United Center 18,838"";","SELECT COUNT(record) FROM table_22669044_8 WHERE location_attendance = ""United Center 18,838"";",1 What is the repeat date of the episode that aired 22/12/1968?,"CREATE TABLE table_13403120_1 (repeatairdate_s_ VARCHAR, originalairdate VARCHAR);","SELECT repeatairdate_s_ FROM table_13403120_1 WHERE originalairdate = ""22/12/1968"";","SELECT repeatairdate_s_ FROM table_13403120_1 WHERE originalairdate = ""22/12/1968"";",1 What is the total revenue generated from virtual tours in the United States and Canada?,"CREATE TABLE VirtualTourRevenue(id INT, country TEXT, revenue FLOAT); ","SELECT SUM(revenue) FROM VirtualTourRevenue WHERE country IN ('United States', 'Canada');","SELECT SUM(revenue) FROM VirtualTourRevenue WHERE country IN ('United States', 'Canada');",1 What is the total revenue generated from gluten-free menu items in the Mountain region?,"CREATE TABLE menu (menu_id INT, menu_name TEXT, menu_type TEXT, price DECIMAL, daily_sales INT, is_gluten_free BOOLEAN, region TEXT); CREATE VIEW gluten_free_menu AS SELECT * FROM menu WHERE is_gluten_free = TRUE;",SELECT SUM(price * daily_sales) AS total_revenue FROM gluten_free_menu WHERE region = 'Mountain';,SELECT SUM(price * daily_sales) FROM gluten_free_menu WHERE region = 'Mountain' AND is_gluten_free = true;,0 what was the score on 6 june 2010?,"CREATE TABLE table_name_82 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_82 WHERE date = ""6 june 2010"";","SELECT score FROM table_name_82 WHERE date = ""6 june 2010"";",1 When the losing bonus was 2 what was drawn score?,"CREATE TABLE table_name_97 (drawn VARCHAR, losing_bonus VARCHAR);","SELECT drawn FROM table_name_97 WHERE losing_bonus = ""2"";",SELECT drawn FROM table_name_97 WHERE losing_bonus = 2;,0 Which year has a 2003 of lq?,CREATE TABLE table_name_82 (Id VARCHAR);,"SELECT 2009 FROM table_name_82 WHERE 2003 = ""lq"";","SELECT 2003 FROM table_name_82 WHERE ""lq"" = ""lq"";",0 Update the irrigation data for sensor with ID S101 to 60%,"CREATE TABLE irrigation_sensors (sensor_id VARCHAR(10), irrigation_percentage INT);",UPDATE irrigation_sensors SET irrigation_percentage = 60 WHERE sensor_id = 'S101';,UPDATE irrigation_sensors SET irrigation_percentage = 60 WHERE sensor_id = 'S101';,1 "for country of spain and iata of ibz, what's the city?","CREATE TABLE table_name_29 (city VARCHAR, country VARCHAR, iata VARCHAR);","SELECT city FROM table_name_29 WHERE country = ""spain"" AND iata = ""ibz"";","SELECT city FROM table_name_29 WHERE country = ""spain"" AND iata = ""ibz"";",1 List all marine species in the 'Southern Ocean'.,"CREATE TABLE marine_species (species_name TEXT, region TEXT); ",SELECT species_name FROM marine_species WHERE region = 'Southern Ocean';,SELECT species_name FROM marine_species WHERE region = 'Southern Ocean';,1 What is the total amount of climate finance provided to African countries for renewable energy projects in 2020?,"CREATE TABLE climate_finance (country VARCHAR(50), year INT, project_type VARCHAR(50), amount FLOAT); ","SELECT SUM(amount) FROM climate_finance WHERE country IN ('Nigeria', 'Kenya', 'Egypt') AND year = 2020 AND project_type = 'Renewable Energy';","SELECT SUM(amount) FROM climate_finance WHERE year = 2020 AND project_type = 'Renewable Energy' AND country IN ('Nigeria', 'Egypt', 'South Africa');",0 What is the name and city of the top 3 public participation open data initiatives in the year 2020?,"CREATE TABLE public_participation (initiative_name VARCHAR(255), city VARCHAR(50), init_year INT, public_participants INT); ","SELECT initiative_name, city FROM (SELECT initiative_name, city, public_participants, ROW_NUMBER() OVER (ORDER BY public_participants DESC) as rank FROM public_participation WHERE init_year = 2020) t WHERE rank <= 3;","SELECT initiative_name, city FROM public_participation WHERE init_year = 2020 ORDER BY public_participants DESC LIMIT 3;",0 What's the number of donors for each cause?,"CREATE TABLE Donors (DonorID int, DonorName text); CREATE TABLE Donations (DonationID int, DonorID int, Cause text); CREATE TABLE Causes (CauseID int, Cause text); ","SELECT C.Cause, COUNT(D.DonorID) FROM Donors D INNER JOIN Donations DD ON D.DonorID = DD.DonorID INNER JOIN Causes C ON DD.Cause = C.Cause GROUP BY C.Cause;","SELECT c.Cause, COUNT(d.DonorID) FROM Donors d JOIN Donations d ON d.DonorID = d.DonorID JOIN Causes c ON d.Cause = c.Cause GROUP BY c.Cause;",0 "What is the full amount of averages when the sellouts are less than 14, the season is 2011-12, and attendance is less than 162,474?","CREATE TABLE table_name_73 (average VARCHAR, attendance VARCHAR, sellouts VARCHAR, season VARCHAR);","SELECT COUNT(average) FROM table_name_73 WHERE sellouts < 14 AND season = ""2011-12"" AND attendance < 162 OFFSET 474;","SELECT COUNT(average) FROM table_name_73 WHERE sellouts 14 AND season = ""2011-12"" AND attendance 162 OFFSET 474;",0 What is the total number of customer complaints for each broadband plan in Latin America?,"CREATE TABLE broadband_plans (id INT, name VARCHAR(255), type VARCHAR(255), price DECIMAL(10,2), region VARCHAR(255)); CREATE TABLE complaints (id INT, plan_id INT, complaint_type VARCHAR(255), complaint_count INT); CREATE TABLE regions (id INT, name VARCHAR(255));","SELECT broadband_plans.name AS broadband_plan, SUM(complaints.complaint_count) FROM complaints JOIN broadband_plans ON complaints.plan_id = broadband_plans.id JOIN regions ON broadband_plans.region = regions.name WHERE regions.name = 'Latin America' GROUP BY broadband_plans.name;","SELECT bp.name, SUM(c.complaint_count) as total_complaints FROM broadband_plans bp JOIN complaints c ON bp.id = c.plan_id JOIN regions r ON bp.name = r.name WHERE r.name = 'Latin America' GROUP BY bp.name;",0 "What is the name of the state with the highest prevalence of diabetes in the ""rural_disease_prevalence"" table?","CREATE TABLE rural_disease_prevalence (id INT, state TEXT, diabetes_prevalence DECIMAL(5,2), heart_disease_prevalence DECIMAL(5,2)); ",SELECT state FROM rural_disease_prevalence WHERE diabetes_prevalence = (SELECT MAX(diabetes_prevalence) FROM rural_disease_prevalence);,SELECT state FROM rural_disease_prevalence WHERE diabetes_prevalence = (SELECT MAX(diabetes_prevalence) FROM rural_disease_prevalence);,1 What is the total investment in renewable energy per country?,"CREATE TABLE renewable_energy_investment (investment_id INT, country_id INT, investment FLOAT); ","SELECT country_id, SUM(investment) as total_investment FROM renewable_energy_investment GROUP BY country_id;","SELECT country_id, SUM(investment) FROM renewable_energy_investment GROUP BY country_id;",0 List the mental health conditions with the least number of associated public awareness campaigns in Africa.,"CREATE TABLE campaigns (id INT, condition TEXT, reach INT, region TEXT); ","SELECT condition, MIN(reach) as least_reach FROM campaigns WHERE region = 'Africa' GROUP BY condition;","SELECT condition, COUNT(*) FROM campaigns WHERE region = 'Africa' GROUP BY condition ORDER BY COUNT(*) DESC LIMIT 1;",0 Find the total number of smart contracts and decentralized applications deployed by the top 5 active miners in the ABC blockchain.,"CREATE TABLE ABC_transaction (transaction_hash VARCHAR(255), block_number INT, transaction_index INT, from_address VARCHAR(255), to_address VARCHAR(255), value DECIMAL(18,2), gas_price DECIMAL(18,2), gas_limit INT, timestamp TIMESTAMP, miner VARCHAR(255)); CREATE TABLE ABC_contract (contract_address VARCHAR(255), contract_name VARCHAR(255), creator_address VARCHAR(255), creation_timestamp TIMESTAMP);","SELECT COUNT(DISTINCT t.to_address) AS total_deployed, m.miner AS active_miner FROM ABC_transaction t JOIN (SELECT miner, ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC, miner) AS rn FROM ABC_transaction GROUP BY miner) m ON t.miner = m.miner WHERE rn <= 5 JOIN ABC_contract c ON t.to_address = c.contract_address GROUP BY m.miner;",SELECT COUNT(*) FROM ABC_transaction WHERE miner IN (SELECT miner FROM (SELECT miner FROM (SELECT miner FROM (SELECT miner FROM (SELECT miner FROM (SELECT miner FROM (SELECT miner FROM (SELECT miner FROM (SELECT miner FROM (SELECT miner FROM (SELECT miner FROM (SELECT miner FROM (SELECT miner FROM (SELECT miner FROM (SELECT miner FROM (SELECT miner) FROM (SELECT miner FROM (SELECT miner) FROM (SELECT miner FROM (SELECT miner FROM (SELECT miner FROM)))))))))))))))))))))))))))))))))))))))))))))))))))))))))),0 what is the color quality when the relay is ✓?,"CREATE TABLE table_name_9 (color_quality VARCHAR, relay VARCHAR);","SELECT color_quality FROM table_name_9 WHERE relay = ""✓"";","SELECT color_quality FROM table_name_9 WHERE relay = """";",0 The year that has a BB + HBP of 51 is listed as?,"CREATE TABLE table_name_99 (year VARCHAR, bb_ VARCHAR, hbp VARCHAR);",SELECT year FROM table_name_99 WHERE bb_ + hbp = 51;,"SELECT year FROM table_name_99 WHERE bb_ + hbp = ""51"";",0 What is the lowest points scored by the Wildcats when the record was 5-1?,"CREATE TABLE table_20850527_1 (wildcats_points INTEGER, record VARCHAR);","SELECT MIN(wildcats_points) FROM table_20850527_1 WHERE record = ""5-1"";","SELECT MIN(wildcats_points) FROM table_20850527_1 WHERE record = ""5-1"";",1 "What is the surface of the match on July 5, 2009?","CREATE TABLE table_name_95 (surface VARCHAR, date VARCHAR);","SELECT surface FROM table_name_95 WHERE date = ""july 5, 2009"";","SELECT surface FROM table_name_95 WHERE date = ""july 5, 2009"";",1 Get the names and certification levels of all the green buildings in the city of Seattle.,"CREATE TABLE green_buildings (id INT, name VARCHAR(255), location VARCHAR(255), certification_level VARCHAR(50));","SELECT name, certification_level FROM green_buildings WHERE location = 'Seattle';","SELECT name, certification_level FROM green_buildings WHERE location = 'Seattle';",1 What was the percentage of votes for coakley when kennedy won 1.6%,"CREATE TABLE table_24115349_4 (coakley__percentage VARCHAR, kennedy__percentage VARCHAR);","SELECT coakley__percentage FROM table_24115349_4 WHERE kennedy__percentage = ""1.6%"";","SELECT coakley__percentage FROM table_24115349_4 WHERE kennedy__percentage = ""1.6%"";",1 "What date has an outcome of runner-up, and a Score of 6–4, 6–2, and a Opponents of gisela dulko flavia pennetta?","CREATE TABLE table_name_42 (date VARCHAR, opponents VARCHAR, outcome VARCHAR, score VARCHAR);","SELECT date FROM table_name_42 WHERE outcome = ""runner-up"" AND score = ""6–4, 6–2"" AND opponents = ""gisela dulko flavia pennetta"";","SELECT date FROM table_name_42 WHERE outcome = ""runner-up"" AND score = ""6–4, 6–2"" AND opponents = ""gisela dulko flavia pennetta"";",1 What year was Mother's Live remix created?,"CREATE TABLE table_name_46 (year INTEGER, version VARCHAR);","SELECT SUM(year) FROM table_name_46 WHERE version = ""mother's live remix"";","SELECT SUM(year) FROM table_name_46 WHERE version = ""mother's live remix"";",1 Daily ridership greater that 414 is associated with which length?,"CREATE TABLE table_name_60 (length VARCHAR, daily_ridership INTEGER);",SELECT length FROM table_name_60 WHERE daily_ridership > 414;,SELECT length FROM table_name_60 WHERE daily_ridership > 414;,1 Add a new initiative 'Ethical AI for small businesses' to the 'ai_ethics' table,"CREATE TABLE ai_ethics (id INT PRIMARY KEY, region VARCHAR(50), initiative VARCHAR(100)); ","INSERT INTO ai_ethics (id, region, initiative) VALUES (3, 'North America', 'Ethical AI for small businesses');","INSERT INTO ai_ethics (id, region, initiative) VALUES (1, 'Small Business', 'Ethical AI for Small Businesses');",0 What is the percentage of smart contracts written in Rust compared to the total number of smart contracts?,"CREATE TABLE smart_contract_language (language VARCHAR(255), smart_contract_count INT); ","SELECT language, 100.0 * smart_contract_count / SUM(smart_contract_count) OVER () as percentage FROM smart_contract_language WHERE language = 'Rust';",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM smart_contract_language WHERE language = 'Rust')) * 100.0 / (SELECT COUNT(*) FROM smart_contract_language WHERE language = 'Rust') AS percentage FROM smart_contract_language WHERE language = 'Rust';,0 How many clubs are involved when there are 4 winners from the previous rounds and more than 4 clubs remaining?,"CREATE TABLE table_name_59 (clubs_involved INTEGER, winners_from_previous_round VARCHAR, clubs_remaining VARCHAR);","SELECT MIN(clubs_involved) FROM table_name_59 WHERE winners_from_previous_round = ""4"" AND clubs_remaining > 4;",SELECT SUM(clubs_involved) FROM table_name_59 WHERE winners_from_previous_round = 4 AND clubs_remaining > 4;,0 How many fish were harvested in Q1 for each species in the Atlantic region?,"CREATE TABLE fish_harvest (id INT, species VARCHAR(50), region VARCHAR(50), qty INT, quarter INT); ","SELECT species, SUM(qty) FROM fish_harvest WHERE quarter IN (1, 2, 3) AND region = 'Atlantic' GROUP BY species;","SELECT species, SUM(qty) as total_qty FROM fish_harvest WHERE region = 'Atlantic' AND quarter = 1 GROUP BY species;",0 What was the highest pick for Penn State?,"CREATE TABLE table_name_57 (pick__number INTEGER, college VARCHAR);","SELECT MAX(pick__number) FROM table_name_57 WHERE college = ""penn state"";","SELECT MAX(pick__number) FROM table_name_57 WHERE college = ""penn state"";",1 "What's the average Year with an Issue Price (Proof) of $49.95, and Artist of W.H.J. Blakemore?","CREATE TABLE table_name_19 (year INTEGER, issue_price__proof_ VARCHAR, artist VARCHAR);","SELECT AVG(year) FROM table_name_19 WHERE issue_price__proof_ = ""$49.95"" AND artist = ""w.h.j. blakemore"";","SELECT AVG(year) FROM table_name_19 WHERE issue_price__proof_ = ""$49.95"" AND artist = ""w.h.j. blakemore"";",1 "What is the total installed capacity of wind energy projects in each country, sorted by the total capacity in descending order?","CREATE TABLE wind_projects (id INT, country VARCHAR(50), capacity FLOAT);","SELECT country, SUM(capacity) as total_capacity FROM wind_projects GROUP BY country ORDER BY total_capacity DESC;","SELECT country, SUM(capacity) as total_capacity FROM wind_projects GROUP BY country ORDER BY total_capacity DESC;",1 Show the total number of unique threat types for each department in the 'threats' and 'departments' tables,"CREATE TABLE threats (threat_id INT PRIMARY KEY, department_id INT, threat_type VARCHAR(255)); CREATE TABLE departments (department_id INT PRIMARY KEY, department_name VARCHAR(255)); ","SELECT d.department_name, COUNT(DISTINCT t.threat_type) as unique_threats FROM threats t INNER JOIN departments d ON t.department_id = d.department_id GROUP BY d.department_name;","SELECT d.department_name, COUNT(DISTINCT t.threat_type) as unique_threat_types FROM departments d JOIN threats t ON d.department_id = t.department_id GROUP BY d.department_name;",0 What date did the New York Giants play as a visiting team?,"CREATE TABLE table_name_34 (date VARCHAR, visiting_team VARCHAR);","SELECT date FROM table_name_34 WHERE visiting_team = ""new york giants"";","SELECT date FROM table_name_34 WHERE visiting_team = ""new york giants"";",1 Show names of technicians and series of machines they are assigned to repair.,"CREATE TABLE machine (Machine_series VARCHAR, machine_id VARCHAR); CREATE TABLE repair_assignment (machine_id VARCHAR, technician_ID VARCHAR); CREATE TABLE technician (Name VARCHAR, technician_ID VARCHAR);","SELECT T3.Name, T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID;","SELECT T1.Name, T1.Machine_series FROM machine AS T1 JOIN repair_assignment AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T2.technician_ID = T3.technician_ID;",0 "Find the number of players who have played both ""Racing"" and ""Sports"" genres","CREATE TABLE players (id INT, genre VARCHAR(10)); ",SELECT COUNT(*) FROM (SELECT id FROM players WHERE genre = 'Racing' INTERSECT SELECT id FROM players WHERE genre = 'Sports') AS both_genres;,"SELECT COUNT(*) FROM players WHERE genre IN ('Racing', 'Sports');",0 Which album had the note tape [tape echo]?,"CREATE TABLE table_name_95 (album VARCHAR, note VARCHAR);","SELECT album FROM table_name_95 WHERE note = ""tape [tape echo]"";","SELECT album FROM table_name_95 WHERE note = ""tape [tape echo]"";",1 Find the total number of songs in the hip-hop and r&b genres.,"CREATE TABLE song_releases (song_id INT, genre VARCHAR(20));","SELECT COUNT(*) FROM song_releases WHERE genre IN ('hip-hop', 'r&b');","SELECT COUNT(*) FROM song_releases WHERE genre IN ('hip-hop', 'r&b');",1 What is the minimum salary for engineers in 'african_mines'?,"CREATE SCHEMA if not exists africa_schema_2;CREATE TABLE africa_schema_2.african_mines (id INT, name VARCHAR, role VARCHAR, salary DECIMAL);",SELECT MIN(salary) FROM africa_schema_2.african_mines WHERE role = 'Engineer';,SELECT MIN(salary) FROM africa_schema_2.african_mines WHERE role = 'Engineer';,1 What is the average acreage of community gardens in Toronto and Vancouver?,"CREATE TABLE community_gardens (id INT, city VARCHAR(20), acreage DECIMAL(5,2)); ","SELECT AVG(acreage) FROM community_gardens WHERE city IN ('TOR', 'VAN');","SELECT AVG(acreage) FROM community_gardens WHERE city IN ('Toronto', 'Vancouver');",0 What's the D 42 √ when D 43 √ is r 5?,"CREATE TABLE table_name_13 (d_42_√ VARCHAR, d_43_√ VARCHAR);","SELECT d_42_√ FROM table_name_13 WHERE d_43_√ = ""r 5"";","SELECT d_42_ FROM table_name_13 WHERE d_43_ = ""r 5"";",0 Delete all records related to Europium production from the production_data table?,"CREATE TABLE production_data (year INT, company_name TEXT, element TEXT, quantity INT); ",DELETE FROM production_data WHERE element = 'Europium';,DELETE FROM production_data WHERE element = 'Europium';,1 find the percentage of forest area in each state in the year 2020,"CREATE TABLE forests (id INT, state VARCHAR(255), area_ha INT, year INT);","SELECT state, ROUND(100.0 * area_ha / (SELECT SUM(area_ha) FROM forests WHERE year = 2020 AND state = forests.state), 2) as percentage FROM forests WHERE year = 2020 GROUP BY state;","SELECT state, area_ha * 100.0 / area_ha FROM forests WHERE year = 2020 GROUP BY state;",0 What Competition had a Score of 3–3?,"CREATE TABLE table_name_27 (competition VARCHAR, score VARCHAR);","SELECT competition FROM table_name_27 WHERE score = ""3–3"";","SELECT competition FROM table_name_27 WHERE score = ""3–3"";",1 What is the average depth of the ocean floor in the Pacific region?,"CREATE TABLE OceanFloorMapping (id INT, region VARCHAR(20), depth FLOAT); ",SELECT AVG(depth) FROM OceanFloorMapping WHERE region = 'Pacific';,SELECT AVG(depth) FROM OceanFloorMapping WHERE region = 'Pacific';,1 Which country in the 'Asia-Pacific' region has the most virtual tour engagements?,"CREATE TABLE virtual_tours (id INT, hotel_id INT, country TEXT, engagements INT); CREATE TABLE hotels (id INT, name TEXT, region TEXT); ","SELECT country, MAX(engagements) FROM virtual_tours v JOIN hotels h ON v.hotel_id = h.id WHERE h.region = 'Asia-Pacific' GROUP BY country;","SELECT country, SUM(engagements) FROM virtual_tours JOIN hotels ON virtual_tours.hotel_id = hotels.id WHERE hotels.region = 'Asia-Pacific' GROUP BY country ORDER BY SUM(engagements) DESC LIMIT 1;",0 What party did the incumbent Thomas P. Moore belong to?,"CREATE TABLE table_2668254_8 (party VARCHAR, incumbent VARCHAR);","SELECT party FROM table_2668254_8 WHERE incumbent = ""Thomas P. Moore"";","SELECT party FROM table_2668254_8 WHERE incumbent = ""Thomas P. Moore"";",1 What is the total number of players who have played each game on each platform?,"CREATE TABLE GamePlatforms (PlayerID INT, GameID INT, Platform VARCHAR(50)); ","SELECT GameID, Platform, COUNT(DISTINCT PlayerID) as PlayerCount FROM GamePlatforms GROUP BY GameID, Platform;","SELECT Platform, COUNT(*) FROM GamePlatforms GROUP BY Platform;",0 "Count the number of news articles in each category published on the media platform, for articles published in 2022.","CREATE TABLE news_articles (article_id INT, title VARCHAR(50), category VARCHAR(50), publish_date DATE); ","SELECT category, COUNT(*) as article_count FROM news_articles WHERE YEAR(publish_date) = 2022 GROUP BY category;","SELECT category, COUNT(*) FROM news_articles WHERE YEAR(publish_date) = 2022 GROUP BY category;",0 Which factories have workers in both 'engineering' and 'quality control' departments?,"CREATE TABLE factories (factory_id INT, factory_name VARCHAR(20)); CREATE TABLE departments (department_id INT, department VARCHAR(20)); CREATE TABLE workers (worker_id INT, factory_id INT, department_id INT); ","SELECT f.factory_name FROM workers w INNER JOIN factories f ON w.factory_id = f.factory_id INNER JOIN departments d ON w.department_id = d.department_id WHERE d.department IN ('engineering', 'quality control') GROUP BY f.factory_name HAVING COUNT(DISTINCT d.department_id) = 2;","SELECT f.factory_name FROM factories f INNER JOIN workers w ON f.factory_id = w.factory_id INNER JOIN departments d ON w.department_id = d.department_id WHERE d.department IN ('engineering', 'quality control');",0 Show the financial wellbeing score of clients in the European region,"CREATE TABLE european_wellbeing (id INT PRIMARY KEY, client_name VARCHAR(100), region VARCHAR(50), score INT); ",SELECT score FROM european_wellbeing WHERE region = 'Europe';,SELECT score FROM european_wellbeing WHERE region = 'Europe';,1 Who are the top 3 mediators by total cases mediated and the total number of successful mediations?,"CREATE TABLE Mediators (MediatorId INT, MediatorName TEXT, TotalCases INT, SuccessfulMediations INT); ","SELECT MediatorName, SUM(TotalCases) AS TotalCases, SUM(SuccessfulMediations) AS SuccessfulMediations FROM Mediators GROUP BY MediatorName ORDER BY TotalCases DESC, SuccessfulMediations DESC LIMIT 3;","SELECT MediatorName, SUM(TotalCases) as TotalCases, SUM(SuccessfulMediations) as TotalSuccessfulMediations FROM Mediators GROUP BY MediatorName ORDER BY TotalSuccessfulMediations DESC LIMIT 3;",0 What is the position for the years 1998-99,"CREATE TABLE table_11545282_11 (position VARCHAR, years_for_jazz VARCHAR);","SELECT position FROM table_11545282_11 WHERE years_for_jazz = ""1998-99"";","SELECT position FROM table_11545282_11 WHERE years_for_jazz = ""1998-99"";",1 What is the population in 2011 for the name Beaubassin East?,"CREATE TABLE table_26321719_1 (population__2011_ VARCHAR, name VARCHAR);","SELECT population__2011_ FROM table_26321719_1 WHERE name = ""Beaubassin East"";","SELECT population__2011_ FROM table_26321719_1 WHERE name = ""Beaubassin East"";",1 "What is the order ID and delivery time for the 10th percentile delivery time for each courier in the 'courier_performances' view, ordered by the 10th percentile delivery time?","CREATE VIEW courier_performances AS SELECT courier_id, order_id, delivery_time, PERCENTILE_CONT(0.1) WITHIN GROUP (ORDER BY delivery_time) OVER (PARTITION BY courier_id) as pct_10 FROM orders;","SELECT courier_id, order_id, delivery_time FROM courier_performances WHERE pct_10 = delivery_time ORDER BY delivery_time;","SELECT courier_id, order_id, delivery_time FROM courier_performances WHERE delivery_time = '10th percentile' GROUP BY courier_id, order_id;",0 How many buildings of each type are there?,"CREATE TABLE Buildings (BuildingID INT, BuildingType VARCHAR(50)); ","SELECT BuildingType, COUNT(*) AS BuildingCount FROM Buildings GROUP BY BuildingType;","SELECT BuildingType, COUNT(*) FROM Buildings GROUP BY BuildingType;",0 Show the total number of co-owned properties in Chicago and Seattle.,"CREATE TABLE chicago_prop(id INT, owner1 VARCHAR(20), owner2 VARCHAR(20)); CREATE TABLE seattle_prop(id INT, owner1 VARCHAR(20), owner2 VARCHAR(20)); ",SELECT COUNT(*) FROM chicago_prop WHERE owner1 <> owner2 UNION ALL SELECT COUNT(*) FROM seattle_prop WHERE owner1 <> owner2;,SELECT COUNT(*) FROM chicago_prop INNER JOIN seattle_prop ON chicago_prop.owner1 = seattle_prop.owner1 AND seattle_prop.owner2 = seattle_prop.owner2;,0 What's the venue of the 1995 Southeast Asian Games?,"CREATE TABLE table_name_97 (venue VARCHAR, competition VARCHAR);","SELECT venue FROM table_name_97 WHERE competition = ""1995 southeast asian games"";","SELECT venue FROM table_name_97 WHERE competition = ""1995 southeast asia games"";",0 Name the number of horizontal when framerate hz is 25,"CREATE TABLE table_15928363_1 (horizontal VARCHAR, framerate___hz__ VARCHAR);","SELECT COUNT(horizontal) FROM table_15928363_1 WHERE framerate___hz__ = ""25"";",SELECT COUNT(horizontal) FROM table_15928363_1 WHERE framerate___hz__ = 25;,0 Which sustainable urbanism initiatives were implemented in NYC and when?,"CREATE TABLE sustainable_urbanism (id INT, city VARCHAR(20), initiative VARCHAR(50), start_date DATE); ","SELECT city, initiative, start_date FROM sustainable_urbanism WHERE city = 'NYC';","SELECT initiative, start_date FROM sustainable_urbanism WHERE city = 'NYC';",0 What round is highest and has a defensive tackle position and overall lower than 282?,"CREATE TABLE table_name_12 (round INTEGER, position VARCHAR, overall VARCHAR);","SELECT MAX(round) FROM table_name_12 WHERE position = ""defensive tackle"" AND overall < 282;","SELECT MAX(round) FROM table_name_12 WHERE position = ""defensive tackle"" AND overall 282;",0 Delete a specific excavation site and its related artifacts,"CREATE TABLE ExcavationSites (SiteID int, Name varchar(50), Country varchar(50), StartDate date); CREATE TABLE Artifacts (ArtifactID int, SiteID int, Name varchar(50), Description text, DateFound date); ","DELETE a, es FROM Artifacts a INNER JOIN ExcavationSites es ON a.SiteID = es.SiteID WHERE es.SiteID = 2;",DELETE FROM ExcavationSites WHERE SiteID IN (SELECT SiteID FROM Artifacts);,0 What is the maximum funding amount received by companies founded by Latinx entrepreneurs?,"CREATE TABLE company (id INT, name TEXT, founder_race TEXT, funding_amount INT); ",SELECT MAX(funding_amount) FROM company WHERE founder_race = 'Latinx';,SELECT MAX(funding_amount) FROM company WHERE founder_race = 'Latinx';,1 What is the average biosensor development cost for projects led by female researchers?,"CREATE TABLE BiosensorDevelopment (project_id INT, start_date DATE, development_cost FLOAT, lead_researcher_gender VARCHAR(6)); ",SELECT AVG(development_cost) FROM BiosensorDevelopment WHERE lead_researcher_gender = 'Female';,SELECT AVG(development_cost) FROM BiosensorDevelopment WHERE lead_researcher_gender = 'Female';,1 What is the average monthly data usage for mobile customers in each state?,"CREATE TABLE mobile_subscribers(subscriber_id INT, data_usage FLOAT, state VARCHAR(20)); ","SELECT state, AVG(data_usage) FROM mobile_subscribers GROUP BY state;","SELECT state, AVG(data_usage) FROM mobile_subscribers GROUP BY state;",1 "with api level 3, what is the code name?","CREATE TABLE table_name_12 (code_name VARCHAR, api_level VARCHAR);",SELECT code_name FROM table_name_12 WHERE api_level = 3;,SELECT code_name FROM table_name_12 WHERE api_level = 3;,1 Calculate the total budget for the 'education' program from the 'budget_report' table.,"CREATE TABLE budget_report (program VARCHAR(50), budget DECIMAL(10,2));",SELECT SUM(budget) FROM budget_report WHERE program = 'education';,SELECT SUM(budget) FROM budget_report WHERE program = 'education';,1 What is the weight (in kg) of the heaviest spacecraft ever built?,"CREATE TABLE spacecraft(id INT, name VARCHAR(255), weight_kg FLOAT); ",SELECT MAX(weight_kg) FROM spacecraft;,SELECT weight_kg FROM spacecraft ORDER BY weight_kg DESC LIMIT 1;,0 What is the total number of artists in all traditional arts?,"CREATE TABLE TraditionalArt (name VARCHAR(255), artists_count INT); ",SELECT SUM(artists_count) FROM TraditionalArt;,SELECT SUM(artists_count) FROM TraditionalArt;,1 What was Thierry Henry's average goal when his rank was higher than 7?,"CREATE TABLE table_name_17 (goals INTEGER, player VARCHAR, rank VARCHAR);","SELECT AVG(goals) FROM table_name_17 WHERE player = ""thierry henry"" AND rank > 7;","SELECT AVG(goals) FROM table_name_17 WHERE player = ""richard henry"" AND rank > 7;",0 How many racing points did England get?,"CREATE TABLE table_23293785_3 (race_total_pts_ INTEGER, country VARCHAR);","SELECT MAX(race_total_pts_) FROM table_23293785_3 WHERE country = ""England"";","SELECT MAX(race_total_pts_) FROM table_23293785_3 WHERE country = ""England"";",1 "Find id of candidates whose assessment code is ""Pass""?","CREATE TABLE candidate_assessments (candidate_id VARCHAR, asessment_outcome_code VARCHAR);","SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = ""Pass"";","SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = ""Pass"";",1 what is the date (from) where date (to) is 1919?,"CREATE TABLE table_12562214_1 (date__from_ VARCHAR, date__to_ VARCHAR);","SELECT date__from_ FROM table_12562214_1 WHERE date__to_ = ""1919"";",SELECT date__from_ FROM table_12562214_1 WHERE date__to_ = 1919;,0 "Find the dispensaries with a total sales amount greater than $100,000 for hybrid strains in Washington state.","CREATE TABLE DispensarySales(id INT, dispensary VARCHAR(255), state VARCHAR(255), strain_type VARCHAR(255), sales_amount DECIMAL(10,2));",SELECT dispensary FROM DispensarySales WHERE state = 'Washington' AND strain_type = 'Hybrid' GROUP BY dispensary HAVING SUM(sales_amount) > 100000;,SELECT dispensary FROM DispensarySales WHERE state = 'Washington' AND strain_type = 'Hybrid' AND sales_amount > 100000;,0 What are the IP addresses and threat levels of all threats that have occurred in the last 24 hours?,"CREATE TABLE threats (id INT, ip VARCHAR(255), threat_level INT, date DATE); ","SELECT ip, threat_level FROM threats WHERE date >= DATE(NOW()) - INTERVAL 1 DAY;","SELECT ip, threat_level FROM threats WHERE date >= DATEADD(day, -24, GETDATE());",0 Delete space debris with a diameter greater than 10 meters and a weight above 500 kg.,"CREATE TABLE space_debris (id INT, diameter FLOAT, weight INT, material VARCHAR(255), location VARCHAR(255));",DELETE FROM space_debris WHERE diameter > 10 AND weight > 500;,DELETE FROM space_debris WHERE diameter > 10 AND weight > 500;,1 What is the frequency of KFNW?,"CREATE TABLE table_name_36 (frequency VARCHAR, call_sign VARCHAR);","SELECT frequency FROM table_name_36 WHERE call_sign = ""kfnw"";","SELECT frequency FROM table_name_36 WHERE call_sign = ""kfnw"";",1 What is the installation date for the Delta Chapter?,"CREATE TABLE table_21821014_1 (installation_date VARCHAR, chapter VARCHAR);","SELECT installation_date FROM table_21821014_1 WHERE chapter = ""Delta"";","SELECT installation_date FROM table_21821014_1 WHERE chapter = ""Delta"";",1 What is the total value of defense contracts awarded by the government agency 'DoD'?,"CREATE TABLE Contracts (id INT, contract_number VARCHAR(50), contract_date DATE, contract_value FLOAT, agency VARCHAR(50));",SELECT SUM(contract_value) FROM Contracts WHERE agency = 'DoD' AND contract_type = 'Defense';,SELECT SUM(contract_value) FROM Contracts WHERE agency = 'DoD';,0 "What is the average energy efficiency rating of residential buildings in Texas, calculated as the ratio of energy consumption to building size, grouped by city and building age?","CREATE TABLE residential_buildings (id INT, city VARCHAR(100), state VARCHAR(50), energy_consumption FLOAT, building_size FLOAT, building_age INT); ","SELECT city, building_age, AVG(energy_consumption/building_size) AS avg_efficiency_rating FROM residential_buildings WHERE state = 'Texas' GROUP BY city, building_age;","SELECT city, building_age, AVG(energy_consumption / building_size) as avg_energy_efficiency_rating FROM residential_buildings WHERE state = 'Texas' GROUP BY city, building_age;",0 What is the average cost of military equipment maintenance in the US?,"CREATE TABLE military_equipment (id INT, country VARCHAR(50), cost FLOAT); ",SELECT AVG(cost) FROM military_equipment WHERE country = 'USA';,SELECT AVG(cost) FROM military_equipment WHERE country = 'USA';,1 What was the total expenditure on exploration in the Permian Basin during 2018?,"CREATE TABLE permian_basin_expenditure (year INT, region VARCHAR(20), expenditure INT); ",SELECT expenditure FROM permian_basin_expenditure WHERE year = 2018 AND region = 'Permian Basin';,SELECT SUM(expenditure) FROM permian_basin_expenditure WHERE year = 2018 AND region = 'Permian Basin';,0 What is the total revenue generated from virtual tourism activities in the Americas?,"CREATE TABLE tourism_revenue (region VARCHAR(50), activity VARCHAR(50), revenue FLOAT); ",SELECT SUM(revenue) AS total_revenue FROM tourism_revenue WHERE region = 'Americas' AND activity = 'Virtual Tourism';,SELECT SUM(revenue) FROM tourism_revenue WHERE region = 'Americas' AND activity = 'Virtual Tourism';,0 What is the average time taken to resolve citizen complaints in each ward?,"CREATE TABLE CitizenComplaints (Ward INT, ComplaintID INT, ComplaintDate DATE, ResolutionDate DATE); ","SELECT Ward, AVG(DATEDIFF(ResolutionDate, ComplaintDate)) FROM CitizenComplaints WHERE ResolutionDate IS NOT NULL GROUP BY Ward;","SELECT Ward, AVG(DATEDIFF(ResolutionDate, ComplaintDate)) FROM CitizenComplaints GROUP BY Ward;",0 What was the result of the election in the Florida 18 district? ,"CREATE TABLE table_1341598_10 (result VARCHAR, district VARCHAR);","SELECT result FROM table_1341598_10 WHERE district = ""Florida 18"";","SELECT result FROM table_1341598_10 WHERE district = ""Florida 18"";",1 What is the distribution of customer usage patterns by day of the week?,"CREATE TABLE customer_usage (usage_date DATE, data_usage FLOAT); ","SELECT DATE_FORMAT(usage_date, '%W') AS day_of_week, AVG(data_usage) AS avg_data_usage FROM customer_usage GROUP BY day_of_week;","SELECT DATE_FORMAT(usage_date, '%Y-%m') AS day_of_week, COUNT(*) AS usage_count FROM customer_usage GROUP BY day_of_week;",0 What is the average age of stone artifacts from each country?,"CREATE TABLE Countries (CountryID INT, CountryName TEXT); CREATE TABLE Sites (SiteID INT, SiteName TEXT, CountryID INT); CREATE TABLE Artifacts (ArtifactID INT, ArtifactName TEXT, SiteID INT, Age INT, ArtifactType TEXT); ","SELECT Countries.CountryName, AVG(Artifacts.Age) AS AverageAge FROM Artifacts INNER JOIN Sites ON Artifacts.SiteID = Sites.SiteID INNER JOIN Countries ON Sites.CountryID = Countries.CountryID WHERE Artifacts.ArtifactType = 'Stone' GROUP BY Countries.CountryName;","SELECT Countries.CountryName, AVG(Artifacts.Age) FROM Countries INNER JOIN Sites ON Countries.CountryID = Sites.CountryID INNER JOIN Artifacts ON Sites.SiteID = Artifacts.SiteID WHERE Artifacts.ArtifactType = 'Stone' GROUP BY Countries.CountryName;",0 What is the Launched which is on 3 may 2001?,"CREATE TABLE table_name_31 (launched VARCHAR, date_of_commission VARCHAR);","SELECT launched FROM table_name_31 WHERE date_of_commission = ""3 may 2001"";","SELECT launched FROM table_name_31 WHERE date_of_commission = ""3 may 2001"";",1 Find the average age and number of male students (with sex M) from each city.,"CREATE TABLE student (city_code VARCHAR, age INTEGER, sex VARCHAR);","SELECT COUNT(*), AVG(age), city_code FROM student WHERE sex = 'M' GROUP BY city_code;","SELECT city_code, AVG(age) as avg_age, COUNT(*) as num_male_students FROM student WHERE sex = 'M' GROUP BY city_code;",0 Who won the season of 1998?,"CREATE TABLE table_name_52 (winner_season VARCHAR, year VARCHAR);",SELECT winner_season FROM table_name_52 WHERE year = 1998;,SELECT winner_season FROM table_name_52 WHERE year = 1998;,1 what is the minimum voted no where percent no is 56.6,"CREATE TABLE table_120778_2 (voted_no INTEGER, percent_no VARCHAR);","SELECT MIN(voted_no) FROM table_120778_2 WHERE percent_no = ""56.6"";","SELECT MIN(voted_no) FROM table_120778_2 WHERE percent_no = ""56.6"";",1 What is the 2008 for the 2009 ch our charming lady?,CREATE TABLE table_name_89 (Id VARCHAR);,"SELECT 2008 FROM table_name_89 WHERE 2009 = ""ch our charming lady"";","SELECT 2008 FROM table_name_89 WHERE 2009 = ""ch our charming lady"";",1 What is the location of the Carousel toll plaza?,"CREATE TABLE table_1211545_2 (location VARCHAR, name VARCHAR);","SELECT location FROM table_1211545_2 WHERE name = ""Carousel Toll Plaza"";","SELECT location FROM table_1211545_2 WHERE name = ""Carousel Toll Plaza"";",1 "What is the average runtime (in minutes) of shows by genre, excluding genres with less than 5 shows?","CREATE TABLE shows (id INT, title VARCHAR(100), genre VARCHAR(50), country VARCHAR(50), release_year INT, runtime INT);","SELECT genre, AVG(runtime) FROM shows GROUP BY genre HAVING COUNT(genre) > 4;","SELECT genre, AVG(runtime) as avg_runtime FROM shows GROUP BY genre HAVING COUNT(*) >= 5 GROUP BY genre;",0 What is the average release date of R&B albums?,"CREATE TABLE genres (id INT, genre VARCHAR(255)); CREATE TABLE albums (id INT, genre_id INT, release_date DATE);",SELECT AVG(release_date) FROM albums JOIN genres ON albums.genre_id = genres.id WHERE genres.genre = 'R&B';,SELECT AVG(release_date) FROM albums JOIN genres ON albums.genre_id = genres.id WHERE genres.genre = 'R&B';,1 Compute the number of products with a price larger than or equal to $180.,CREATE TABLE products (price VARCHAR);,SELECT COUNT(*) FROM products WHERE price >= 180;,SELECT COUNT(*) FROM products WHERE price > 180;,0 What day was a friendly game held that had a score of 2:3?,"CREATE TABLE table_name_87 (date VARCHAR, type_of_game VARCHAR, results¹ VARCHAR);","SELECT date FROM table_name_87 WHERE type_of_game = ""friendly"" AND results¹ = ""2:3"";","SELECT date FROM table_name_87 WHERE type_of_game = ""friendly"" AND results1 = ""2:3"";",0 Who are the top 3 countries with the most satellites in orbit?,"CREATE TABLE satellites_by_country (country VARCHAR(255), num_satellites INT); ","SELECT country, num_satellites FROM satellites_by_country ORDER BY num_satellites DESC LIMIT 3;","SELECT country, num_satellites FROM satellites_by_country ORDER BY num_satellites DESC LIMIT 3;",1 List all companies that have had an acquisition as an exit strategy and their corresponding exit date.,"CREATE TABLE company (id INT, name TEXT); CREATE TABLE exit_strategy (id INT, company_id INT, exit_date DATE, exit_type TEXT);","SELECT company.name, exit_strategy.exit_date FROM company JOIN exit_strategy ON company.id = exit_strategy.company_id WHERE exit_strategy.exit_type = 'Acquisition';","SELECT company.name, exit_strategy.exit_date FROM company INNER JOIN exit_strategy ON company.id = exit_strategy.company_id WHERE exit_strategy.exit_type = 'acquisition';",0 What is the NBA draft result of Dwayne Washington?,"CREATE TABLE table_name_56 (nba_draft VARCHAR, player VARCHAR);","SELECT nba_draft FROM table_name_56 WHERE player = ""dwayne washington"";","SELECT nba_draft FROM table_name_56 WHERE player = ""dwayne washington"";",1 "List all cases with a 'family' case_type, along with the attorney who handled the case, sorted by the billing amount in descending order.","CREATE TABLE attorneys (id INT, name VARCHAR(20)); CREATE TABLE cases (id INT, attorney_id INT, case_type VARCHAR(10), billing_amount INT);","SELECT cases.id, attorney_id, case_type, billing_amount, attorneys.name FROM cases INNER JOIN attorneys ON cases.attorney_id = attorneys.id WHERE case_type = 'family' ORDER BY billing_amount DESC;","SELECT cases.case_type, attorneys.name FROM cases INNER JOIN attorneys ON cases.attorney_id = attorneys.id WHERE cases.case_type = 'family' ORDER BY cases.billing_amount DESC;",0 How many disability support programs were added per month in the past year?,"CREATE TABLE ProgramDates (ProgramID int, ProgramDate date); CREATE TABLE DisabilitySupportPrograms (ProgramID int, ProgramName varchar(50), AdditionDate date); ","SELECT DATEPART(MONTH, AdditionDate) as Month, COUNT(*) as ProgramsAdded FROM DisabilitySupportPrograms GROUP BY DATEPART(MONTH, AdditionDate);","SELECT EXTRACT(MONTH FROM AdditionDate) AS Month, COUNT(*) FROM DisabilitySupportPrograms WHERE AdditionDate >= DATEADD(year, -1, GETDATE()) GROUP BY Month;",0 What is the average quantity of sustainable fabric sourced from India in the past year?,"CREATE TABLE sourcing (id INT, fabric_type TEXT, quantity INT, country TEXT, sourcing_date DATE); ","SELECT AVG(quantity) FROM sourcing WHERE fabric_type = 'sustainable fabric' AND country = 'India' AND sourcing_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT AVG(quantity) FROM sourcing WHERE fabric_type = 'Sustainable' AND country = 'India' AND sourcing_date >= DATEADD(year, -1, GETDATE());",0 What is the total fare collected from passengers on the 'Green Line'?,"CREATE TABLE routes (route_name VARCHAR(50), total_fare DECIMAL(10,2)); ",SELECT SUM(total_fare) FROM routes WHERE route_name = 'Green Line';,SELECT SUM(total_fare) FROM routes WHERE route_name = 'Green Line';,1 Loss of postponed (rain) rescheduled for may 10 had what record?,"CREATE TABLE table_name_60 (record VARCHAR, loss VARCHAR);","SELECT record FROM table_name_60 WHERE loss = ""postponed (rain) rescheduled for may 10"";","SELECT record FROM table_name_60 WHERE loss = ""postponed (rain) rescheduled for may 10"";",1 what's the listing date for the verdigris creek bridge in royal of antelope county?,"CREATE TABLE table_name_83 (listed VARCHAR, name VARCHAR, county VARCHAR, location VARCHAR);","SELECT listed FROM table_name_83 WHERE county = ""antelope"" AND location = ""royal"" AND name = ""verdigris creek bridge"";","SELECT listed FROM table_name_83 WHERE county = ""antelope"" AND location = ""royal"" AND name = ""verdigris creek bridge"";",1 What is the total number of streams for songs released before 2010 in the 'music_streaming' table?,"CREATE TABLE music_streaming (stream_id INT, user_id INT, song_id INT, streams INT, date DATE, song_release_year INT);",SELECT SUM(streams) FROM music_streaming WHERE song_release_year < 2010;,SELECT SUM(streams) FROM music_streaming WHERE song_release_year 2010;,0 "What is the number of posts and the average number of likes for posts containing the hashtag #zerowaste in the 'influencer_posts' table, filtered by users with more than 10,000 followers?","CREATE TABLE influencer_posts(user_id INT, post_date DATE, post_text TEXT, likes INT, followers INT);","SELECT COUNT(*) AS post_count, AVG(likes) AS avg_likes FROM influencer_posts WHERE post_text LIKE '%#zerowaste%' AND followers > 10000;","SELECT AVG(likes), COUNT(*) FROM influencer_posts WHERE hashtag = '#zerowaste' GROUP BY user_id HAVING followers > 10000;",0 List all investment rounds for startups founded by 'John Smith',"CREATE TABLE company (id INT, name TEXT, founding_year INT, founder_name TEXT); CREATE TABLE investment_rounds (id INT, company_id INT, investment_amount INT, investment_year INT);",SELECT ir.* FROM investment_rounds ir INNER JOIN company c ON ir.company_id = c.id WHERE c.founder_name = 'John Smith';,SELECT investment_rounds.investment_amount FROM investment_rounds INNER JOIN company ON investment_rounds.company_id = company.id WHERE company.founder_name = 'John Smith';,0 "What is the average Games, when Player is Robert Hock, and when Goals is less than 24?","CREATE TABLE table_name_19 (games INTEGER, player VARCHAR, goals VARCHAR);","SELECT AVG(games) FROM table_name_19 WHERE player = ""robert hock"" AND goals < 24;","SELECT AVG(games) FROM table_name_19 WHERE player = ""robert hock"" AND goals 24;",0 "What is the total number of heritage sites in each country, ordered by the total count in descending order?","CREATE TABLE heritage_sites (site_id INT, site_name TEXT, country TEXT, year_listed INT); ","SELECT country, COUNT(*) as total_sites FROM heritage_sites GROUP BY country ORDER BY total_sites DESC;","SELECT country, COUNT(*) as total_sites FROM heritage_sites GROUP BY country ORDER BY total_sites DESC;",1 How many safety tests were conducted on sports cars in the 'SafetyTest' database in 2021?,"CREATE TABLE SafetyTest (Id INT, VehicleType VARCHAR(50), TestYear INT, TestResult VARCHAR(50)); CREATE VIEW SportsCars AS SELECT * FROM Vehicles WHERE VehicleType = 'Sports Car';",SELECT COUNT(*) FROM SafetyTest JOIN SportsCars ON SafetyTest.VehicleType = SportsCars.VehicleType WHERE TestYear = 2021;,SELECT COUNT(*) FROM SafetyTest WHERE VehicleType = 'Sports Car' AND TestYear = 2021;,0 What is the average THC content of products sold by each dispensary in Alaska?,"CREATE TABLE Dispensaries (id INT, name TEXT, state TEXT);CREATE TABLE Products (id INT, dispensary_id INT, thc_content DECIMAL);","SELECT D.name, AVG(P.thc_content) FROM Dispensaries D JOIN Products P ON D.id = P.dispensary_id WHERE D.state = 'Alaska' GROUP BY D.id;","SELECT d.name, AVG(p.thc_content) FROM Dispensaries d JOIN Products p ON d.id = p.dispensary_id WHERE d.state = 'Alaska' GROUP BY d.name;",0 List the top 3 sustainable menu items based on their sales and sustainability scores for a particular restaurant in Q2 2021.,"CREATE TABLE menu (menu_id INT, restaurant_id INT, food_category TEXT, price DECIMAL(5,2), sustainability_score INT); CREATE TABLE restaurant (restaurant_id INT, name TEXT); ","SELECT m.food_category, m.price, m.sustainability_score, SUM(m.price) AS total_sales FROM menu m JOIN restaurant r ON m.restaurant_id = r.restaurant_id WHERE r.name = 'Restaurant B' AND m.price > 0 AND EXTRACT(MONTH FROM m.order_date) BETWEEN 4 AND 6 AND EXTRACT(YEAR FROM m.order_date) = 2021 GROUP BY m.menu_id, m.food_category, m.price, m.sustainability_score ORDER BY total_sales DESC, m.sustainability_score DESC LIMIT 3;","SELECT menu.menu_id, menu.food_category, menu.price, menu.sustainability_score FROM menu INNER JOIN restaurant ON menu.restaurant_id = restaurant.restaurant_id WHERE menu.food_category = 'Menu' AND menu.sustainability_score = (SELECT MAX(sustainability_score) FROM menu WHERE menu.food_category = 'Menu') AND menu.sustainability_score = 3 GROUP BY menu.restaurant_id ORDER BY SUM(sustainability_score) DESC LIMIT 3;",0 How many successful cybersecurity incidents were reported in Europe in the last year?,"CREATE TABLE cybersecurity_incidents (region VARCHAR(255), year INT, success BOOLEAN); ",SELECT COUNT(*) FROM cybersecurity_incidents WHERE region = 'Europe' AND year = 2021 AND success = TRUE;,SELECT COUNT(*) FROM cybersecurity_incidents WHERE region = 'Europe' AND year = 2021 AND success = TRUE;,1 Find all cities with only eco-friendly houses.,"CREATE TABLE houses (id INT, city VARCHAR(50), price INT, eco_friendly BOOLEAN); ",SELECT city FROM houses GROUP BY city HAVING MIN(eco_friendly) = 1;,SELECT city FROM houses WHERE eco_friendly = true;,0 List the number of graduate students in each department and their average research grant funding,"CREATE TABLE Department (id INT, name VARCHAR(255)); CREATE TABLE Student (id INT, department_id INT, research_grant_funding INT); ","SELECT d.name as department, AVG(s.research_grant_funding) as avg_funding, COUNT(s.id) as student_count FROM Department d JOIN Student s ON d.id = s.department_id GROUP BY d.name;","SELECT d.name, COUNT(s.id) as num_students, AVG(s.research_grant_funding) as avg_research_grant_funding FROM Department d JOIN Student s ON d.id = s.department_id GROUP BY d.name;",0 Which extra resulted in 2nd before 2005?,"CREATE TABLE table_name_30 (extra VARCHAR, result VARCHAR, year VARCHAR);","SELECT extra FROM table_name_30 WHERE result = ""2nd"" AND year < 2005;","SELECT extra FROM table_name_30 WHERE result = ""2nd"" AND year 2005;",0 What is the total amount of loans issued for financial capability programs in Germany?,"CREATE TABLE financial_capability (id INT, loan_type VARCHAR(255), amount DECIMAL(10,2), country VARCHAR(255));",SELECT SUM(amount) FROM financial_capability WHERE loan_type = 'financial capability' AND country = 'Germany';,SELECT SUM(amount) FROM financial_capability WHERE loan_type = 'Financial Capability' AND country = 'Germany';,0 "How many FLT appearances for the player with less than 5 total goals, and 3 FA Cup appearances, 4 league goals, and plays MF?","CREATE TABLE table_name_62 (flt_apps VARCHAR, league_goals VARCHAR, position VARCHAR, total_goals VARCHAR, fa_cup_apps VARCHAR);","SELECT flt_apps FROM table_name_62 WHERE total_goals < 5 AND fa_cup_apps = ""3"" AND position = ""mf"" AND league_goals = 4;","SELECT COUNT(flt_apps) FROM table_name_62 WHERE total_goals 5 AND fa_cup_apps = 3 AND position = ""mf"" AND league_goals = 4;",0 What is the total revenue of movies produced by Studio K in 2020 and 2021?,"CREATE TABLE movie_studios (studio_id INT, studio_name TEXT, country TEXT); CREATE TABLE movies (movie_id INT, title TEXT, release_date DATE, studio_id INT, revenue INT); ",SELECT SUM(movies.revenue) FROM movies JOIN movie_studios ON movies.studio_id = movie_studios.studio_id WHERE movie_studios.studio_name = 'Studio K' AND YEAR(movies.release_date) BETWEEN 2020 AND 2021;,SELECT SUM(movies.revenue) FROM movies INNER JOIN movie_studios ON movies.studio_id = movie_studios.studio_id WHERE movie_studios.studio_name = 'Studio K' AND movies.release_date BETWEEN '2020-01-01' AND '2021-12-31';,0 Update the cargo weight of voyage V002 to 15000 tons,"vessel_voyage(voyage_id, cargo_weight)",UPDATE vessel_voyage SET cargo_weight = 15000 WHERE voyage_id = 'V002';,UPDATE vessel_voyage SET cargo_weight = 15000 WHERE voyage_id = 002;,0 Show the average annual precipitation and the number of measurements taken for each year in the Arctic region.,"CREATE TABLE precipitation_data (measurement_id INT, measurement_date DATE, precipitation FLOAT, location VARCHAR(50));","SELECT YEAR(measurement_date) AS year, AVG(precipitation) AS avg_annual_precipitation, COUNT(*) AS total_measurements FROM precipitation_data WHERE location LIKE '%Arctic%' GROUP BY year;","SELECT AVG(precipitation) as avg_annual_precipitation, COUNT(*) as num_measurements FROM precipitation_data WHERE location = 'Arctic' GROUP BY year;",0 "In what year were Reid's earnings €4,050 1?","CREATE TABLE table_29506171_2 (year INTEGER, earnings___€__ VARCHAR);","SELECT MIN(year) FROM table_29506171_2 WHERE earnings___€__ = ""4,050 1"";","SELECT MAX(year) FROM table_29506171_2 WHERE earnings___€__ = ""4,050 1"";",0 What is the average delivery time for satellites launched in 2021?,"CREATE TABLE satellites (satellite_id INT, launch_id INT, launch_date DATE, delivery_time INT); ",SELECT AVG(delivery_time) FROM satellites WHERE YEAR(launch_date) = 2021;,SELECT AVG(delivery_time) FROM satellites WHERE launch_date BETWEEN '2021-01-01' AND '2021-12-31';,0 Create a table named 'vaccination_stats',"CREATE TABLE vaccination_stats (id INT PRIMARY KEY, state VARCHAR(50), total_vaccinations INT);","CREATE TABLE vaccination_stats (id INT PRIMARY KEY, state VARCHAR(50), total_vaccinations INT);","CREATE TABLE vaccination_stats (id INT PRIMARY KEY, state VARCHAR(50), total_vaccinations INT);",1 List all military technologies with their last update date.,"CREATE TABLE military_tech (id INT, name VARCHAR(50), description VARCHAR(100), last_update DATE); ","SELECT name, last_update FROM military_tech;","SELECT name, description, last_update FROM military_tech;",0 How many solar power plants are located in the 'Asia-Pacific' region?,"CREATE TABLE solar_plants (plant_id INT, region VARCHAR(50)); ",SELECT COUNT(*) FROM solar_plants WHERE region = 'Asia-Pacific';,SELECT COUNT(*) FROM solar_plants WHERE region = 'Asia-Pacific';,1 What is the maximum conservation status score of all marine species?,"CREATE TABLE conservation_status_scores (id INT, species_id INT, score FLOAT, PRIMARY KEY (id, species_id), FOREIGN KEY (species_id) REFERENCES marine_species(id)); ",SELECT MAX(score) FROM conservation_status_scores;,SELECT MAX(score) FROM conservation_status_scores;,1 Find the top 3 states with the highest number of rural hospitals.,"CREATE TABLE hospitals (id INT, state CHAR(2), num_beds INT, rural_hospital BOOLEAN); ","SELECT state, ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) as rank FROM hospitals WHERE rural_hospital = true GROUP BY state LIMIT 3;","SELECT state, SUM(num_beds) as total_hospitals FROM hospitals WHERE rural_hospital = true GROUP BY state ORDER BY total_hospitals DESC LIMIT 3;",0 What is the minimum clearance height for bridges in Spain?,"CREATE TABLE Bridge (id INT, name VARCHAR(50), clearance_height FLOAT, country VARCHAR(50)); ",SELECT MIN(clearance_height) FROM Bridge WHERE country = 'Spain' AND type = 'Bridge';,SELECT MIN(clearance_height) FROM Bridge WHERE country = 'Spain';,0 What are the top 3 threat actors by the number of attacks in the last 6 months?,"CREATE TABLE threat_actors (threat_actor_id INT, threat_actor_name VARCHAR(255), attack_count INT); ","SELECT threat_actor_name, attack_count FROM threat_actors ORDER BY attack_count DESC LIMIT 3;","SELECT threat_actor_name, attack_count FROM threat_actors WHERE attack_count >= (SELECT MAX(attack_count) FROM threat_actors WHERE attack_date >= DATEADD(month, -6, GETDATE())) GROUP BY threat_actor_name ORDER BY attack_count DESC LIMIT 3;",0 "What is the number of patients with diabetes per 100,000 people for each county, ordered from highest to lowest?","CREATE SCHEMA RuralHealth; USE RuralHealth; CREATE TABLE Counties (CountyID INT, CountyName VARCHAR(50), CountyPopulation INT, StateAbbreviation VARCHAR(10)); CREATE TABLE DiabetesPatients (PatientID INT, CountyID INT, Diagnosed BOOLEAN); ","SELECT CountyID, (SUM(CASE WHEN Diagnosed THEN 1 ELSE 0 END) * 100000.0 / CountyPopulation) as DiabetesRatePer100k FROM DiabetesPatients INNER JOIN Counties ON DiabetesPatients.CountyID = Counties.CountyID INNER JOIN StatesPopulation ON Counties.StateAbbreviation = StatesPopulation.StateAbbreviation GROUP BY CountyID ORDER BY DiabetesRatePer100k DESC;","SELECT c.CountyName, COUNT(dp.PatientID) as DiabetesPatientsPer100000 FROM Counties c INNER JOIN DiabetesPatients dp ON c.CountyID = dp.CountyID GROUP BY c.CountyName ORDER BY DiabetesPatientsPer100000 DESC;",0 What is the average number of posts per day for users in the social_media schema?,"CREATE TABLE users (id INT, name VARCHAR(50), posts_count INT, registration_date DATE); CREATE TABLE posts (id INT, user_id INT, post_text VARCHAR(255), post_date DATE);","SELECT AVG(DATEDIFF(post_date, registration_date) / posts_count) FROM users JOIN posts ON users.id = posts.user_id;",SELECT AVG(posts_count) as avg_posts_per_day FROM users JOIN posts ON users.id = posts.user_id GROUP BY users.id;,0 What is the title of the episode directed by Rodney Clouden? ,"CREATE TABLE table_23242958_1 (title VARCHAR, directed_by VARCHAR);","SELECT title FROM table_23242958_1 WHERE directed_by = ""Rodney Clouden"";","SELECT title FROM table_23242958_1 WHERE directed_by = ""Rodney Clouden"";",1 Who was the Independent Socialist candidate for the office of comptroller?,"CREATE TABLE table_name_35 (independent_socialist_ticket VARCHAR, office VARCHAR);","SELECT independent_socialist_ticket FROM table_name_35 WHERE office = ""comptroller"";","SELECT independent_socialist_ticket FROM table_name_35 WHERE office = ""comptroller"";",1 What is the total revenue for each mobile plan and the total number of customers for each mobile plan?,"CREATE TABLE mobile_plans (id INT, name VARCHAR(255), price DECIMAL(10,2), data_limit INT); CREATE TABLE revenue (plan_id INT, timestamp DATETIME, amount DECIMAL(10,2)); CREATE TABLE customers (id INT, name VARCHAR(255), address VARCHAR(255), plan_id INT);","SELECT m.name, SUM(r.amount) as total_revenue, COUNT(c.id) as num_customers FROM mobile_plans m INNER JOIN revenue r ON m.id = r.plan_id INNER JOIN customers c ON m.id = c.plan_id GROUP BY m.id;","SELECT m.name, SUM(r.amount) as total_revenue, COUNT(c.id) as total_customers FROM mobile_plans m JOIN revenue r ON m.id = r.plan_id JOIN customers c ON r.plan_id = c.plan_id GROUP BY m.name;",0 What is the total duration of Exoplanets research for each researcher since 2017?,"CREATE TABLE Astrophysics_Research (id INT, research_name VARCHAR(255), researcher_id INT, field_of_study VARCHAR(255), start_date DATE, end_date DATE); ","SELECT researcher_id, SUM(DATEDIFF(end_date, start_date)) as total_days_researched FROM Astrophysics_Research WHERE field_of_study = 'Exoplanets' GROUP BY researcher_id;","SELECT researcher_id, SUM(DATEDIFF(end_date, start_date)) as total_duration FROM Astrophysics_Research WHERE field_of_study = 'Exoplanets' AND start_date >= '2017-01-01' GROUP BY researcher_id;",0 "Which Events is the highest one that has a Top-10 larger than 7, and Wins smaller than 2?","CREATE TABLE table_name_39 (events INTEGER, top_10 VARCHAR, wins VARCHAR);",SELECT MAX(events) FROM table_name_39 WHERE top_10 > 7 AND wins < 2;,SELECT MAX(events) FROM table_name_39 WHERE top_10 > 7 AND wins 2;,0 How many satellites were deployed by each organization in 2020?,"CREATE TABLE Satellites (ID INT, Organization VARCHAR(50), Year INT, Number_Of_Satellites INT); ","SELECT Organization, Number_Of_Satellites FROM Satellites WHERE Year = 2020 GROUP BY Organization;","SELECT Organization, SUM(Number_Of_Satellites) FROM Satellites WHERE Year = 2020 GROUP BY Organization;",0 What is the total number of emergency incidents by type in Oakland?,"CREATE TABLE emergency_incidents (id INT, incident_type VARCHAR(20), city VARCHAR(20)); ","SELECT incident_type, COUNT(*) as total FROM emergency_incidents WHERE city = 'Oakland' GROUP BY incident_type;","SELECT incident_type, COUNT(*) FROM emergency_incidents WHERE city = 'Oakland' GROUP BY incident_type;",0 Who is in week 4 if week 5 is [month ended] and week 2 is April Ireland?,"CREATE TABLE table_name_8 (week_4 VARCHAR, week_5 VARCHAR, week_2 VARCHAR);","SELECT week_4 FROM table_name_8 WHERE week_5 = ""[month ended]"" AND week_2 = ""april ireland"";","SELECT week_4 FROM table_name_8 WHERE week_5 = ""[month ended]"" AND week_2 = ""april ireland"";",1 Tell me the lowest wins for class of 50cc and team of tomos for year less than 1969,"CREATE TABLE table_name_9 (wins INTEGER, year VARCHAR, class VARCHAR, team VARCHAR);","SELECT MIN(wins) FROM table_name_9 WHERE class = ""50cc"" AND team = ""tomos"" AND year < 1969;","SELECT MIN(wins) FROM table_name_9 WHERE class = ""50cc"" AND team = ""tomos"" AND year 1969;",0 What is the total number of accommodations provided for students with visual impairments in each school?,"CREATE TABLE Accommodations (SchoolName VARCHAR(255), Student VARCHAR(255), Accommodation VARCHAR(255)); ","SELECT SchoolName, COUNT(*) as TotalAccommodations FROM Accommodations WHERE Accommodation LIKE '%Visual Impairment%' GROUP BY SchoolName;","SELECT SchoolName, COUNT(*) FROM Accommodations WHERE Student LIKE '%Visual Impairment%' GROUP BY SchoolName;",0 "what is the outcome on april 24, 1988?","CREATE TABLE table_name_20 (outcome VARCHAR, date VARCHAR);","SELECT outcome FROM table_name_20 WHERE date = ""april 24, 1988"";","SELECT outcome FROM table_name_20 WHERE date = ""april 24, 1988"";",1 Which Runs has a Opponent of south australia?,"CREATE TABLE table_name_53 (runs VARCHAR, opponent VARCHAR);","SELECT runs FROM table_name_53 WHERE opponent = ""south australia"";","SELECT runs FROM table_name_53 WHERE opponent = ""south australia"";",1 How many volunteers were there in each project category in the 'projects' table?,"CREATE TABLE projects (project_id INT, project_category VARCHAR(255), project_name VARCHAR(255), num_volunteers INT); ","SELECT project_category, SUM(num_volunteers) AS total_volunteers FROM projects GROUP BY project_category;","SELECT project_category, SUM(num_volunteers) FROM projects GROUP BY project_category;",0 What were the Tyres after 1984?,"CREATE TABLE table_name_22 (tyres VARCHAR, year INTEGER);",SELECT tyres FROM table_name_22 WHERE year > 1984;,SELECT tyres FROM table_name_22 WHERE year > 1984;,1 What is the total attendance for cultural events that took place in New York City in Q3 2021?,"CREATE TABLE cities (id INT, name VARCHAR(255));CREATE TABLE cultural_events (id INT, title VARCHAR(255), city_id INT, start_date DATE, end_date DATE, attendees INT);",SELECT SUM(attendees) as total_attendance FROM cultural_events WHERE city_id = (SELECT id FROM cities WHERE name = 'New York City') AND start_date BETWEEN '2021-07-01' AND '2021-09-30';,SELECT SUM(attendees) FROM cultural_events WHERE city_id = (SELECT id FROM cities WHERE name = 'New York City') AND start_date BETWEEN '2021-04-01' AND '2021-06-30';,0 How many news articles are there in each news category?,"CREATE TABLE News (news_id INT, title TEXT, category TEXT); CREATE TABLE Categories (category_id INT, category_name TEXT); ","SELECT c.category_name, COUNT(n.news_id) as num_articles FROM News n INNER JOIN Categories c ON n.category = c.category_name GROUP BY c.category_name;","SELECT News.category, COUNT(*) FROM News INNER JOIN Categories ON News.category_id = Categories.category_id GROUP BY News.category;",0 How many fans attended each team's games by gender?,"CREATE TABLE Fans (FanID INT, Gender VARCHAR(255), TeamID INT); CREATE TABLE GameAttendance (GameID INT, FanID INT); ","SELECT t.TeamName, g.Gender, COUNT(*) as Total_Attendance FROM Fans f JOIN GameAttendance ga ON f.FanID = ga.FanID JOIN Teams t ON f.TeamID = t.TeamID GROUP BY t.TeamName, g.Gender;","SELECT TeamID, Gender, COUNT(*) FROM Fans JOIN GameAttendance ON Fans.FanID = GameAttendance.FanID GROUP BY TeamID, Gender;",0 What is the total budget for all resilience projects in 2022?,"CREATE TABLE ResilienceProjects (ProjectID int, Budget decimal(10,2), Year int); ",SELECT SUM(Budget) FROM ResilienceProjects WHERE Year = 2022;,SELECT SUM(Budget) FROM ResilienceProjects WHERE Year = 2022;,1 What is the station type of DWMC-TV?,"CREATE TABLE table_2610582_3 (station_type VARCHAR, callsign VARCHAR);","SELECT station_type FROM table_2610582_3 WHERE callsign = ""DWMC-TV"";","SELECT station_type FROM table_2610582_3 WHERE callsign = ""DWMC-TV"";",1 How many companies were founded by individuals who identify as non-binary in 2017?,"CREATE TABLE founders (id INT, name VARCHAR(50), gender VARCHAR(10), ethnicity VARCHAR(20), company_id INT, founding_year INT, non_binary BOOLEAN);",SELECT COUNT(DISTINCT founders.company_id) FROM founders WHERE founders.non_binary = true AND founders.founding_year = 2017;,SELECT COUNT(*) FROM founders WHERE founding_year = 2017 AND non_binary = true;,0 Who directed the eula goodnight movie after 1949?,"CREATE TABLE table_name_97 (director VARCHAR, year VARCHAR, role VARCHAR);","SELECT director FROM table_name_97 WHERE year > 1949 AND role = ""eula goodnight"";","SELECT director FROM table_name_97 WHERE year > 1949 AND role = ""eula goodnight"";",1 Who are the genetic researchers working on gene editing techniques in the UK?,"CREATE SCHEMA if not exists genetics; CREATE TABLE if not exists genetics.researchers (id INT, name VARCHAR(100), country VARCHAR(50), expertise VARCHAR(50)); ",SELECT name FROM genetics.researchers WHERE country = 'UK' AND expertise = 'CRISPR';,SELECT name FROM genetics.researchers WHERE country = 'UK' AND expertise = 'Gene Editing';,0 Which frequency is DYMY?,"CREATE TABLE table_23910822_1 (frequency VARCHAR, callsign VARCHAR);","SELECT frequency FROM table_23910822_1 WHERE callsign = ""DYMY"";","SELECT frequency FROM table_23910822_1 WHERE callsign = ""DYMY"";",1 What's the location attendance of the milwaukee team?,"CREATE TABLE table_27721131_2 (location_attendance VARCHAR, team VARCHAR);","SELECT location_attendance FROM table_27721131_2 WHERE team = ""Milwaukee"";","SELECT location_attendance FROM table_27721131_2 WHERE team = ""Milwaukee"";",1 List the top 3 attack vectors in the Southeast Asian region in the last year.,"CREATE TABLE attack_vectors (id INT, vector VARCHAR(255), region VARCHAR(255), detection_date DATE); ","SELECT vector, COUNT(*) AS detection_count FROM attack_vectors WHERE region = 'Southeast Asia' AND detection_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) GROUP BY vector ORDER BY detection_count DESC LIMIT 3;","SELECT vector, COUNT(*) as detection_count FROM attack_vectors WHERE region = 'Southeast Asia' AND detection_date >= DATEADD(year, -1, GETDATE()) GROUP BY vector ORDER BY detection_count DESC LIMIT 3;",0 "What is the average response time for emergency calls in the city of Los Angeles, broken down by community policing sector?","CREATE TABLE emergency_calls (id INT, call_time TIMESTAMP, sector VARCHAR(20), city VARCHAR(20)); CREATE TABLE community_sectors (id INT, sector VARCHAR(20), location VARCHAR(20)); ","SELECT c.sector, AVG(TIMESTAMPDIFF(MINUTE, call_time, '2022-01-01 11:00:00')) as avg_response_time FROM emergency_calls c JOIN community_sectors s ON c.sector = s.sector WHERE c.city = 'Los Angeles' GROUP BY c.sector;","SELECT ec.sector, AVG(ec.call_time) as avg_response_time FROM emergency_calls ec JOIN community_sectors cs ON ec.sector = cs.sector WHERE ec.city = 'Los Angeles' GROUP BY ec.sector;",0 Which venue does Mardan sponsor?,"CREATE TABLE table_17356873_1 (venue VARCHAR, shirt_sponsor VARCHAR);","SELECT venue FROM table_17356873_1 WHERE shirt_sponsor = ""Mardan"";","SELECT venue FROM table_17356873_1 WHERE shirt_sponsor = ""Mardan"";",1 how many callsigns are for the branding telemundo 47,"CREATE TABLE table_1979203_1 (callsign VARCHAR, branding VARCHAR);","SELECT COUNT(callsign) FROM table_1979203_1 WHERE branding = ""Telemundo 47"";","SELECT COUNT(callsign) FROM table_1979203_1 WHERE branding = ""Telemundo 47"";",1 What is the total fare collected for each subway line in January 2022?,"CREATE TABLE subway_lines (line_id INT, line_name VARCHAR(255)); CREATE TABLE fare_collection (collection_id INT, line_id INT, fare DECIMAL(5,2), collection_date DATE);","SELECT sl.line_name, SUM(fc.fare) as total_fare FROM subway_lines sl INNER JOIN fare_collection fc ON sl.line_id = fc.line_id WHERE fc.collection_date BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY sl.line_name;","SELECT s.line_name, SUM(fc.fare) as total_fare FROM subway_lines s JOIN fare_collection fc ON s.line_id = fc.line_id WHERE fc.collection_date BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY s.line_name;",0 Which Year has a Runner(s)-up of tammie green?,"CREATE TABLE table_name_71 (year INTEGER, runner_s__up VARCHAR);","SELECT MIN(year) FROM table_name_71 WHERE runner_s__up = ""tammie green"";","SELECT SUM(year) FROM table_name_71 WHERE runner_s__up = ""tammie green"";",0 What is the country where there are 8 children per donor and no data for donor payments?,"CREATE TABLE table_16175217_1 (country VARCHAR, children_per_donor VARCHAR, donor_payment VARCHAR);","SELECT country FROM table_16175217_1 WHERE children_per_donor = ""8 children"" AND donor_payment = ""no data"";","SELECT country FROM table_16175217_1 WHERE children_per_donor = ""8"" AND donor_payment = ""no data"";",0 Delete mining permits for Samarium that were issued before 2015.,"CREATE TABLE mining_permits (id INT PRIMARY KEY, permit_number VARCHAR(255), company_name VARCHAR(255), mine_location VARCHAR(255), element_type VARCHAR(255), issue_date DATE);",DELETE FROM mining_permits WHERE element_type = 'Samarium' AND issue_date < '2015-01-01';,DELETE FROM mining_permits WHERE element_type = 'Samarium' AND issue_date '2015-01-01';,0 Which Placement in Miss Universe is armi barbara quiray crespo?,"CREATE TABLE table_name_3 (placement_in_miss_universe VARCHAR, delegate VARCHAR);","SELECT placement_in_miss_universe FROM table_name_3 WHERE delegate = ""armi barbara quiray crespo"";","SELECT placement_in_miss_universe FROM table_name_3 WHERE delegate = ""armi barbara quiray crespo"";",1 What is the total number of login failures by user for the last month?,"CREATE TABLE login_failures (id INT, user TEXT, timestamp TIMESTAMP); ","SELECT user, COUNT(*) AS login_failures_count FROM login_failures WHERE timestamp >= NOW() - INTERVAL '1 month' GROUP BY user;","SELECT user, COUNT(*) FROM login_failures WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY user;",0 How many security incidents were mitigated by each team in the last month?,"CREATE TABLE security_incidents (incident_id INT, incident_date DATE, mitigation_team VARCHAR(255)); ","SELECT mitigation_team, COUNT(*) AS incident_count FROM security_incidents WHERE incident_date >= DATE_SUB(NOW(), INTERVAL 1 MONTH) GROUP BY mitigation_team;","SELECT mitigation_team, COUNT(*) FROM security_incidents WHERE incident_date >= DATEADD(month, -1, GETDATE()) GROUP BY mitigation_team;",0 List all heritage preservation projects in Africa and their corresponding budgets.,"CREATE TABLE Projects (ProjectID INT, Name TEXT, Budget INT);CREATE TABLE Locations (ProjectID INT, Country TEXT);","SELECT Projects.Name, Projects.Budget FROM Projects INNER JOIN Locations ON Projects.ProjectID = Locations.ProjectID WHERE Locations.Country = 'Africa';","SELECT Projects.Name, Projects.Budget FROM Projects INNER JOIN Locations ON Projects.ProjectID = Locations.ProjectID WHERE Locations.Country = 'Africa';",1 Which athletes have the highest number of social media followers in the Eastern Conference?,"CREATE TABLE athletes (id INT, name VARCHAR(50), team VARCHAR(50), conference VARCHAR(50), followers INT); ","SELECT name, followers FROM athletes WHERE conference = 'Eastern' ORDER BY followers DESC LIMIT 1;","SELECT name, followers FROM athletes WHERE conference = 'Eastern' ORDER BY followers DESC LIMIT 1;",1 "What day was the attendance 74,285?","CREATE TABLE table_name_98 (date VARCHAR, attendance VARCHAR);","SELECT date FROM table_name_98 WHERE attendance = ""74,285"";","SELECT date FROM table_name_98 WHERE attendance = ""74,285"";",1 Delete all marine species in the 'marine_species' table that have a conservation_status of 'Least Concern'.,"CREATE TABLE marine_species (id INT, name VARCHAR(255), conservation_status VARCHAR(255)); ",DELETE FROM marine_species WHERE conservation_status = 'Least Concern';,DELETE FROM marine_species WHERE conservation_status = 'Least Concern';,1 Where is the location of the coimbatore medical college?,"CREATE TABLE table_name_42 (location VARCHAR, college_name VARCHAR);","SELECT location FROM table_name_42 WHERE college_name = ""coimbatore medical college"";","SELECT location FROM table_name_42 WHERE college_name = ""coimbatore medical college"";",1 When was moray firth built?,"CREATE TABLE table_name_32 (whenbuilt VARCHAR, name VARCHAR);","SELECT whenbuilt FROM table_name_32 WHERE name = ""moray firth"";","SELECT whenbuilt FROM table_name_32 WHERE name = ""moray firth"";",1 What is the Result of the 2010 (83rd) Ceremony?,"CREATE TABLE table_name_11 (result VARCHAR, year__ceremony_ VARCHAR);","SELECT result FROM table_name_11 WHERE year__ceremony_ = ""2010 (83rd)"";","SELECT result FROM table_name_11 WHERE year__ceremony_ = ""2010 (83rd)"";",1 What is the total number of marine mammals and reptiles observed in the Southern Ocean?,"CREATE TABLE southern_marine_life (species VARCHAR(255), count INT); ","SELECT SUM(count) FROM southern_marine_life WHERE species IN ('Seal', 'Whale', 'Turtle');","SELECT SUM(count) FROM southern_marine_life WHERE species IN ('Mammal', 'Reptile');",0 What percentage of browsers were using Chrome during the period in which 72.03% were using Internet Explorer?,"CREATE TABLE table_name_88 (chrome VARCHAR, internet_explorer VARCHAR);","SELECT chrome FROM table_name_88 WHERE internet_explorer = ""72.03%"";","SELECT chrome FROM table_name_88 WHERE internet_explorer = ""72.03%"";",1 What date did Josh Taumalolo play at Nuku'alofa?,"CREATE TABLE table_name_49 (date VARCHAR, venue VARCHAR, player VARCHAR);","SELECT date FROM table_name_49 WHERE venue = ""nuku'alofa"" AND player = ""josh taumalolo"";","SELECT date FROM table_name_49 WHERE venue = ""nuku'alofa"" AND player = ""jash taumalolo"";",0 List the names and delivery times of all shipments that were sent by air from Egypt to Argentina.,"CREATE TABLE Shipments(id INT, mode VARCHAR(50), source VARCHAR(50), destination VARCHAR(50), delivery_time DATE); ","SELECT Shipments.mode, Shipments.source, Shipments.destination, Shipments.delivery_time FROM Shipments WHERE Shipments.mode = 'air' AND Shipments.source = 'Egypt' AND Shipments.destination = 'Argentina';","SELECT s.name, s.delivery_time FROM Shipments s WHERE s.mode = 'Air' AND s.source = 'Egypt' AND s.destination = 'Argentina';",0 List all titles with a 57 series number.,"CREATE TABLE table_27397948_2 (title VARCHAR, no_in_series VARCHAR);",SELECT title FROM table_27397948_2 WHERE no_in_series = 57;,SELECT title FROM table_27397948_2 WHERE no_in_series = 57;,1 What is the average number of followers for users who have more than 1000 followers?,"CREATE TABLE users (id INT, country VARCHAR(255), followers INT); ",SELECT AVG(followers) FROM users WHERE followers > 1000;,SELECT AVG(followers) FROM users WHERE followers > 1000;,1 Count the number of recycled polyester garments sold in Mexico,"CREATE TABLE sales (id INT, garment_id INT, country VARCHAR(255)); CREATE TABLE garments (id INT, garment_type VARCHAR(255), material VARCHAR(255), recycled BOOLEAN);",SELECT COUNT(*) FROM sales JOIN garments ON sales.garment_id = garments.id WHERE garments.material = 'Polyester' AND garments.recycled = TRUE AND sales.country = 'Mexico';,SELECT COUNT(*) FROM sales JOIN garments ON sales.garment_id = garments.id WHERE garments.material = 'Polyester' AND garments.recycled = TRUE AND sales.country = 'Mexico';,1 "List all chemicals, their safety ratings, and the number of safety inspections they underwent, sorted by safety rating","CREATE TABLE Chemicals (chemical_id INT, chemical_name VARCHAR(50), safety_rating DECIMAL(3,2)); CREATE TABLE Safety_Inspections (inspection_id INT, chemical_id INT, inspection_date DATE);","SELECT c.chemical_name, c.safety_rating, COUNT(si.inspection_id) as num_inspections FROM Chemicals c JOIN Safety_Inspections si ON c.chemical_id = si.chemical_id GROUP BY c.chemical_name, c.safety_rating ORDER BY c.safety_rating DESC;","SELECT Chemicals.chemical_name, Chemicals.safety_rating, COUNT(Safety_Inspections.inspection_id) as inspection_count FROM Chemicals INNER JOIN Safety_Inspections ON Chemicals.chemical_id = Safety_Inspections.chemical_id GROUP BY Chemicals.chemical_name, Chemicals.safety_rating ORDER BY inspection_count DESC;",0 What are the names and locations of all factories with an average waste production of over 100 tons per month?,"CREATE TABLE factories (factory_id INT, name TEXT, location TEXT); CREATE TABLE waste_data (factory_id INT, waste_tons INT, month TEXT); ","SELECT f.name, f.location FROM factories f INNER JOIN waste_data w ON f.factory_id = w.factory_ID GROUP BY f.factory_id HAVING AVG(waste_tons) > 100;","SELECT factories.name, factories.location FROM factories INNER JOIN waste_data ON factories.factory_id = waste_data.factory_id WHERE waste_data.waste_tons > 100 AND waste_data.month = YEAR(waste_data.month);",0 "What is the total installed capacity of solar energy projects, grouped by project location?","CREATE TABLE RenewableEnergyProjects (id INT, project_type VARCHAR(50), project_location VARCHAR(50), installed_capacity FLOAT); ","SELECT project_location, SUM(installed_capacity) FROM RenewableEnergyProjects WHERE project_type = 'Solar' GROUP BY project_location;","SELECT project_location, SUM(installed_capacity) FROM RenewableEnergyProjects GROUP BY project_location;",0 what is the district where the incumbent is james a. haley?,"CREATE TABLE table_1341672_10 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_1341672_10 WHERE incumbent = ""James A. Haley"";","SELECT district FROM table_1341672_10 WHERE incumbent = ""James A. Haley"";",1 How many episodes had 11.86 million US viewers?,"CREATE TABLE table_28215780_4 (no_in_series VARCHAR, us_viewers__millions_ VARCHAR);","SELECT COUNT(no_in_series) FROM table_28215780_4 WHERE us_viewers__millions_ = ""11.86"";","SELECT no_in_series FROM table_28215780_4 WHERE us_viewers__millions_ = ""11.86"";",0 Which Perth has Auckland yes and Gold Coast yes?,"CREATE TABLE table_name_50 (perth VARCHAR, auckland VARCHAR, gold_coast VARCHAR);","SELECT perth FROM table_name_50 WHERE auckland = ""yes"" AND gold_coast = ""yes"";","SELECT perth FROM table_name_50 WHERE auckland = ""yes"" AND gold_coast = ""yes"";",1 What is the maximum cargo weight for each port?,"CREATE TABLE port_cargo_weight (port_id INT, port_name VARCHAR(50), cargo_weight INT); ","SELECT port_name, MAX(cargo_weight) FROM port_cargo_weight GROUP BY port_name;","SELECT port_name, MAX(cargo_weight) FROM port_cargo_weight GROUP BY port_name;",1 What is the maximum number of views of videos produced in Africa?,"CREATE TABLE videos (id INT, title TEXT, release_year INT, views INT, country TEXT); ","SELECT MAX(views) FROM videos WHERE country IN ('Nigeria', 'Egypt', 'South Africa', 'Kenya', 'Algeria');",SELECT MAX(views) FROM videos WHERE country = 'Africa';,0 Delete records from the 'workforce_diversity' table for the 'Asian' gender group,"CREATE TABLE workforce_diversity (id INT, gender_group VARCHAR(30), num_employees INT);",DELETE FROM workforce_diversity WHERE gender_group = 'Asian';,DELETE FROM workforce_diversity WHERE gender_group = 'Asian';,1 "What was the score when a save of ||25,354||63–43 occurred?","CREATE TABLE table_name_49 (score VARCHAR, save VARCHAR);","SELECT score FROM table_name_49 WHERE save = ""||25,354||63–43"";","SELECT score FROM table_name_49 WHERE save = ""||25,354||63–43"";",1 "What is the lowest Goals For, when Draws is less than 4, and when Points is less than 27?","CREATE TABLE table_name_32 (goals_for INTEGER, draws VARCHAR, points VARCHAR);",SELECT MIN(goals_for) FROM table_name_32 WHERE draws < 4 AND points < 27;,SELECT MIN(goals_for) FROM table_name_32 WHERE draws 4 AND points 27;,0 What was the Record on September 21?,"CREATE TABLE table_name_78 (record VARCHAR, date VARCHAR);","SELECT record FROM table_name_78 WHERE date = ""september 21"";","SELECT record FROM table_name_78 WHERE date = ""september 21"";",1 List the names and topics of articles that have a word count greater than the average word count.,"CREATE TABLE articles (id INT, title VARCHAR(50), topic VARCHAR(50), word_count INT); ","SELECT title, topic FROM articles WHERE word_count > (SELECT AVG(word_count) FROM articles);","SELECT title, topic FROM articles WHERE word_count > (SELECT AVG(word_count) FROM articles);",1 "What is the percentage of emergency calls in the ""east"" region that were responded to within 5 minutes in the last month?","CREATE TABLE EmergencyCalls (id INT, region VARCHAR(20), response_time INT, date DATE);","SELECT region, 100.0 * AVG(CASE WHEN response_time <= 5 THEN 1 ELSE 0 END) as percentage FROM EmergencyCalls WHERE region = 'east' AND date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) GROUP BY region;","SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM EmergencyCalls WHERE region = 'east')) AS percentage FROM EmergencyCalls WHERE region = 'east' AND date >= DATEADD(month, -1, GETDATE());",0 "What is the highest number of losses for Presidente Hayes, when the draws were more than 4?","CREATE TABLE table_name_61 (losses INTEGER, team VARCHAR, draws VARCHAR);","SELECT MAX(losses) FROM table_name_61 WHERE team = ""presidente hayes"" AND draws > 4;","SELECT MAX(losses) FROM table_name_61 WHERE team = ""presidente hayes"" AND draws > 4;",1 how many times is the name of film narmeen?,"CREATE TABLE table_25926120_7 (cash_prize VARCHAR, name_of_film VARCHAR);","SELECT COUNT(cash_prize) FROM table_25926120_7 WHERE name_of_film = ""Narmeen"";","SELECT COUNT(cash_prize) FROM table_25926120_7 WHERE name_of_film = ""Narmeen"";",1 "What is the total number of cases heard in the justice_data schema's court_hearings table where the defendant is of Indigenous origin, and the average sentence length for those cases?","CREATE TABLE justice_data.court_hearings (id INT, case_number INT, hearing_date DATE, defendant_race VARCHAR(50)); CREATE TABLE justice_data.sentencing (id INT, case_number INT, offender_id INT, sentence_length INT, conviction VARCHAR(50));","SELECT CH.defendant_race, COUNT(*), AVG(S.sentence_length) FROM justice_data.court_hearings CH JOIN justice_data.sentencing S ON CH.case_number = S.case_number WHERE CH.defendant_race LIKE '%Indigenous%' GROUP BY CH.defendant_race;","SELECT COUNT(*), AVG(sentencing.sentence_length) FROM justice_data.court_hearings INNER JOIN justice_data.sentencing ON justice_data.court_hearings.case_number = justice_data.sentencing.case_number WHERE defendant_race = 'Indigenous';",0 What is the lowest number of members lost when the net change is −1?,"CREATE TABLE table_27671835_3 (members_lost INTEGER, net_change VARCHAR);","SELECT MIN(members_lost) FROM table_27671835_3 WHERE net_change = ""−1"";","SELECT MIN(members_lost) FROM table_27671835_3 WHERE net_change = ""1"";",0 List all countries with fair labor practices,"CREATE TABLE labor_practices (id INT PRIMARY KEY, country VARCHAR(50), practices VARCHAR(255)); ",SELECT country FROM labor_practices WHERE practices NOT LIKE '%low wages%' AND practices NOT LIKE '%long working hours%';,SELECT country FROM labor_practices WHERE practices LIKE '%fair%';,0 Calculate the total number of pallets and weight for each product category in Asia.,"CREATE TABLE Product_Inventory (id INT, inventory_date DATETIME, inventory_country VARCHAR(50), product_category VARCHAR(50), pallets INT, weight DECIMAL(10, 2)); ","SELECT product_category, SUM(pallets) AS total_pallets, SUM(weight) AS total_weight FROM Product_Inventory WHERE inventory_country IN ('China', 'Japan', 'South Korea') GROUP BY product_category;","SELECT product_category, SUM(pallets) as total_pallets, SUM(weight) as total_weight FROM Product_Inventory WHERE inventory_country = 'Asia' GROUP BY product_category;",0 What is the total number of cases in the justice system that involved a victim?,"CREATE TABLE cases (id INT, victim_involved VARCHAR(5)); ",SELECT COUNT(*) FROM cases WHERE victim_involved = 'Yes';,SELECT COUNT(*) FROM cases WHERE victim_involved = 'Victim';,0 "What is the total installed renewable energy capacity in India, and how does it break down by technology?","CREATE TABLE renewable_capacity (id INT, country VARCHAR(255), technology VARCHAR(255), capacity FLOAT);","SELECT technology, SUM(capacity) FROM renewable_capacity WHERE country = 'India' GROUP BY technology;","SELECT technology, SUM(capacity) as total_capacity FROM renewable_capacity WHERE country = 'India' GROUP BY technology;",0 What is the average R&D expenditure per year for each drug?,"CREATE TABLE drugs (id INT PRIMARY KEY, name VARCHAR(255), manufacturer VARCHAR(255), category VARCHAR(255)); CREATE TABLE r_and_d (id INT PRIMARY KEY, drug_id INT, amount FLOAT, year INT, FOREIGN KEY (drug_id) REFERENCES drugs(id)); ","SELECT drugs.name, AVG(r_and_d.amount/r_and_d.year) FROM drugs INNER JOIN r_and_d ON drugs.id = r_and_d.drug_id GROUP BY drugs.name;","SELECT d.name, AVG(r.amount) as avg_r_and_d_expenditure FROM drugs d JOIN r_and_d r ON d.id = r.drug_id GROUP BY d.name;",0 Find the names of goods that receive a rating of 10.,"CREATE TABLE item (title VARCHAR, i_id VARCHAR); CREATE TABLE review (i_id VARCHAR, rating VARCHAR);",SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating = 10;,SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating = 10;,1 List all unique ports and the average cargo quantity in Q4 2022.,"CREATE TABLE vessel_cargo (vessel_id INT, load_date DATE, port VARCHAR(255), cargo_quantity INT);","SELECT port, AVG(cargo_quantity) FROM vessel_cargo WHERE QUARTER(load_date) = 4 AND YEAR(load_date) = 2022 GROUP BY port;","SELECT DISTINCT port, AVG(cargo_quantity) FROM vessel_cargo WHERE load_date BETWEEN '2022-04-01' AND '2022-06-30' GROUP BY port;",0 What is the average age of the artists in the artists table?,"CREATE TABLE artists (id INT, name VARCHAR(50), age INT); ",SELECT AVG(age) FROM artists;,SELECT AVG(age) FROM artists;,1 How many marine research projects were conducted in the Pacific?,"CREATE TABLE Research (id INT, project VARCHAR(255), location VARCHAR(255), start_date DATE, end_date DATE); ","SELECT location, COUNT(*) FROM Research WHERE location = 'Pacific' GROUP BY location;",SELECT COUNT(*) FROM Research WHERE location = 'Pacific';,0 What is the highest Shooting Total with a Bronze less than 0?,"CREATE TABLE table_name_40 (total INTEGER, sport VARCHAR, bronze VARCHAR);","SELECT MAX(total) FROM table_name_40 WHERE sport = ""shooting"" AND bronze < 0;","SELECT MAX(total) FROM table_name_40 WHERE sport = ""shooting"" AND bronze 0;",0 Tell me the timeslot for calls of whyn,"CREATE TABLE table_name_74 (timeslot VARCHAR, calls VARCHAR);","SELECT timeslot FROM table_name_74 WHERE calls = ""whyn"";","SELECT timeslot FROM table_name_74 WHERE calls = ""whyn"";",1 What is the total size of green buildings in the 'green_buildings' table?,"CREATE TABLE green_buildings (id INT, size FLOAT, certification VARCHAR(255), PRIMARY KEY (id)); ",SELECT SUM(size) FROM green_buildings WHERE certification IS NOT NULL;,SELECT SUM(size) FROM green_buildings;,0 Find the number of unique fans who attended games in the last 30 days,"CREATE TABLE fan_attendance (fan_id INT, game_date DATE);",SELECT COUNT(DISTINCT fan_id) FROM fan_attendance WHERE game_date >= CURDATE() - INTERVAL 30 DAY;,"SELECT COUNT(DISTINCT fan_id) FROM fan_attendance WHERE game_date >= DATEADD(day, -30, GETDATE());",0 Identify the number of safety inspections that failed in each location.,"CREATE TABLE safety_inspections_new (id INT PRIMARY KEY, location VARCHAR(50), inspection_date DATE, passed BOOLEAN);","SELECT location, COUNT(*) as failed_inspections FROM safety_inspections_new WHERE passed = FALSE GROUP BY location;","SELECT location, COUNT(*) FROM safety_inspections_new WHERE passed = true GROUP BY location;",0 What is the average age of fans who have attended at least five NBA games in the last year?,"CREATE TABLE nba_fans (fan_id INT, name VARCHAR(50), age INT, games_attended INT); ",SELECT AVG(age) FROM nba_fans WHERE games_attended >= 5;,SELECT AVG(age) FROM nba_fans WHERE games_attended >= 5;,1 What is the maximum number of microtransactions made by players from South America in CS:GO?,"CREATE TABLE MicroTransactions (TransactionID INT, PlayerID INT, Amount FLOAT, Game VARCHAR(50)); CREATE TABLE Players (PlayerID INT, Game VARCHAR(50), Continent VARCHAR(50)); ","SELECT Continent, MAX(Amount) as MaxMicroTransactions FROM MicroTransactions JOIN Players ON MicroTransactions.PlayerID = Players.PlayerID WHERE Game = 'CS:GO' AND Continent = 'South America';",SELECT MAX(MicroTransactions.Amount) FROM MicroTransactions INNER JOIN Players ON MicroTransactions.PlayerID = Players.PlayerID WHERE Players.Continent = 'South America';,0 Who are the attorneys who have not handled any 'Criminal' cases?,"CREATE TABLE Attorneys (AttorneyID INT, Name VARCHAR(50)); CREATE TABLE Cases (CaseID INT, AttorneyID INT, Category VARCHAR(50)); ",SELECT Name FROM Attorneys WHERE AttorneyID NOT IN (SELECT AttorneyID FROM Cases WHERE Category = 'Criminal');,SELECT Attorneys.Name FROM Attorneys INNER JOIN Cases ON Attorneys.AttorneyID = Cases.AttorneyID WHERE Cases.Category = 'Criminal';,0 What was the attendance of the Mariners game when they had a record of 56–20?,"CREATE TABLE table_name_85 (attendance VARCHAR, record VARCHAR);","SELECT attendance FROM table_name_85 WHERE record = ""56–20"";","SELECT attendance FROM table_name_85 WHERE record = ""56–20"";",1 What is the average word count for news articles published in 2021?,"CREATE TABLE news_articles_extended (title VARCHAR(100), publication DATE, word_count INT); ",SELECT AVG(word_count) FROM news_articles_extended WHERE EXTRACT(YEAR FROM publication) = 2021;,SELECT AVG(word_count) FROM news_articles_extended WHERE publication BETWEEN '2021-01-01' AND '2021-12-31';,0 What are the names and locations of hydrothermal vents in the Southern Ocean?,"CREATE TABLE Southern_Ocean_Vents (vent_name TEXT, location TEXT); ","SELECT vent_name, location FROM Southern_Ocean_Vents;","SELECT vent_name, location FROM Southern_Ocean_Vents;",1 "List the names of countries that have both eco-friendly hotels and cultural heritage sites, but no virtual tours.","CREATE TABLE eco_hotels (hotel_id INT, country VARCHAR(20), name VARCHAR(50)); CREATE TABLE cultural_sites (site_id INT, country VARCHAR(20), type VARCHAR(20)); CREATE TABLE virtual_tours (tour_id INT, country VARCHAR(20), type VARCHAR(20)); ",(SELECT country FROM eco_hotels WHERE name IS NOT NULL) INTERSECT (SELECT country FROM cultural_sites WHERE type = 'heritage') EXCEPT (SELECT country FROM virtual_tours WHERE type = 'virtual');,"SELECT e.country, e.name FROM eco_hotels e INNER JOIN cultural_sites c ON e.country = c.country INNER JOIN virtual_tours vt ON e.country = vt.country WHERE e.hotel_id IS NULL;",0 "What is the Rider, when Grid is less than 16, when Manufacturer is Aprilia, and when Time is +28.288?","CREATE TABLE table_name_23 (rider VARCHAR, time VARCHAR, grid VARCHAR, manufacturer VARCHAR);","SELECT rider FROM table_name_23 WHERE grid < 16 AND manufacturer = ""aprilia"" AND time = ""+28.288"";","SELECT rider FROM table_name_23 WHERE grid 16 AND manufacturer = ""aprilia"" AND time = ""+28.288"";",0 What is the landfill capacity in Mumbai in 2025?,"CREATE TABLE landfill_capacity (city varchar(255), year int, capacity int); ",SELECT capacity FROM landfill_capacity WHERE city = 'Mumbai' AND year = 2025;,SELECT capacity FROM landfill_capacity WHERE city = 'Mumbai' AND year = 2025;,1 What is the average sale price for sculptures from the 20th century?,"CREATE TABLE Artworks (ArtworkID INT, Type TEXT, SalePrice INT, CreationYear INT); ",SELECT AVG(SalePrice) FROM Artworks WHERE Type = 'Sculpture' AND CreationYear BETWEEN 1901 AND 2000;,SELECT AVG(SalePrice) FROM Artworks WHERE Type = 'Sculpture' AND CreationYear >= 1900;,0 "List all the international calls made by a subscriber with the subscriber_id of 5 and the call duration, along with the international call charges.","CREATE TABLE subscribers (subscriber_id INT, name VARCHAR(50)); CREATE TABLE international_calls (call_id INT, subscriber_id INT, call_duration INT, call_charge DECIMAL(10,2)); ","SELECT i.subscriber_id, i.call_duration, i.call_charge FROM subscribers s JOIN international_calls i ON s.subscriber_id = i.subscriber_id WHERE s.subscriber_id = 5;","SELECT international_calls.call_duration, international_calls.call_charge FROM international_calls INNER JOIN subscribers ON international_calls.subscriber_id = subscribers.subscriber_id WHERE subscribers.subscriber_id = 5;",0 How many international tourists visited Japan in 2020 and spent more than $1000 per day on average?,"CREATE TABLE IF NOT EXISTS tourists (id INT PRIMARY KEY, name TEXT, country TEXT, daily_spending FLOAT, visit_date DATE); ",SELECT COUNT(*) FROM tourists WHERE country = 'Japan' AND EXTRACT(YEAR FROM visit_date) = 2020 AND daily_spending > 1000;,SELECT COUNT(*) FROM tourists WHERE country = 'Japan' AND visit_date BETWEEN '2020-01-01' AND '2020-12-31' AND daily_spending > 1000;,0 What is the average budget allocated for ethical AI research by organizations in the US?,"CREATE TABLE organizations (id INT, name VARCHAR(50), country VARCHAR(50), budget DECIMAL(10,2)); ",SELECT AVG(budget) FROM organizations WHERE country = 'USA' AND prompt LIKE '%ethical AI%';,SELECT AVG(budget) FROM organizations WHERE country = 'USA' AND name LIKE '%ethical AI%';,0 Show the number of unique games played by female players.,"CREATE TABLE Players (PlayerID INT, Name VARCHAR(50), Gender VARCHAR(10)); CREATE TABLE Game_Played (PlayerID INT, Game VARCHAR(50)); ",SELECT COUNT(DISTINCT Game) FROM Game_Played gp INNER JOIN Players p ON gp.PlayerID = p.PlayerID WHERE p.Gender = 'Female';,SELECT COUNT(DISTINCT Game) FROM Game_Played JOIN Players ON Game_Played.PlayerID = Players.PlayerID WHERE Players.Gender = 'Female';,0 What is the total number of IoT devices with firmware version 3.x.x in the 'Asia' region and the average temperature in that region in December?,"CREATE TABLE IoTDevices (region VARCHAR(255), device_id INT, firmware_version VARCHAR(255)); CREATE TABLE WeatherData (region VARCHAR(255), date DATE, temperature INT); ","SELECT (SELECT COUNT(*) FROM IoTDevices WHERE region = 'Asia' AND firmware_version LIKE '3.%') AS Total_Devices, AVG(temperature) AS Avg_Temperature FROM WeatherData WHERE region = 'Asia' AND date BETWEEN '2022-12-01' AND '2022-12-31';","SELECT COUNT(DISTINCT device_id) as total_devices, AVG(temperature) as avg_temperature FROM IoTDevices INNER JOIN WeatherData ON IoTDevices.region = WeatherData.region WHERE IoTDevices.flash_version = '3.x.x' AND WeatherData.date BETWEEN '2022-03-01' AND '2022-03-31' GROUP BY IoTDevices.region;",0 What is the total Crowd number for the Away team of Hawthorn?,"CREATE TABLE table_name_15 (crowd VARCHAR, away_team VARCHAR);","SELECT COUNT(crowd) FROM table_name_15 WHERE away_team = ""hawthorn"";","SELECT COUNT(crowd) FROM table_name_15 WHERE away_team = ""hawthorn"";",1 "Which player is the NHL right, who was born in Downers Grove, Illinois?","CREATE TABLE table_name_7 (nhl_rights VARCHAR, _if_any VARCHAR, birthplace VARCHAR);","SELECT nhl_rights, _if_any FROM table_name_7 WHERE birthplace = ""downers grove, illinois"";","SELECT nhl_rights FROM table_name_7 WHERE _if_any = ""nhl"" AND birthplace = ""downers grove, illinois"";",0 "What is the date of the game with an attendance of 19,183?","CREATE TABLE table_name_7 (date VARCHAR, attendance VARCHAR);","SELECT date FROM table_name_7 WHERE attendance = ""19,183"";","SELECT date FROM table_name_7 WHERE attendance = ""19,183"";",1 Find the top 3 fastest marathon times in Germany.,"CREATE TABLE marathons (location TEXT, country TEXT, running_time FLOAT);","SELECT location, running_time FROM marathons WHERE country = 'Germany' ORDER BY running_time ASC LIMIT 3;","SELECT location, running_time FROM marathons WHERE country = 'Germany' ORDER BY running_time DESC LIMIT 3;",0 What is the total budget of nonprofits focused on the human rights sector in Canada by year?,"CREATE TABLE budget_years (budget_year_id INT, year INT, budget DECIMAL(10,2)); ","SELECT b.year, SUM(budget) as total_budget FROM budgets b JOIN nonprofits n ON b.budget_id = n.nonprofit_id WHERE n.sector = 'human rights' GROUP BY b.year;","SELECT year, SUM(budget) FROM budget_years WHERE sector = 'human rights' GROUP BY year;",0 "Weight larger than 180, and a Player of charles b. carter is what previous experience?","CREATE TABLE table_name_41 (previous_experience VARCHAR, weight VARCHAR, player VARCHAR);","SELECT previous_experience FROM table_name_41 WHERE weight > 180 AND player = ""charles b. carter"";","SELECT previous_experience FROM table_name_41 WHERE weight > 180 AND player = ""charles b. carter"";",1 How many won the Men's Open if the players are from Sweden?,"CREATE TABLE table_182298_5 (mens_open VARCHAR, country VARCHAR);","SELECT COUNT(mens_open) FROM table_182298_5 WHERE country = ""Sweden"";","SELECT COUNT(mens_open) FROM table_182298_5 WHERE country = ""Sweden"";",1 What is the total investment for genetic research companies in New York?,"CREATE TABLE companies (id INT, name VARCHAR(50), type VARCHAR(50), location VARCHAR(50), investment FLOAT); ",SELECT SUM(investment) FROM companies WHERE type = 'Genetic Research' AND location = 'New York';,SELECT SUM(investment) FROM companies WHERE type = 'Genetic Research' AND location = 'New York';,1 What is the percentage of rural hospitals that have implemented telemedicine services?,"CREATE TABLE hospitals (id INT, location VARCHAR(20), telemedicine BOOLEAN); ",SELECT (COUNT(*) FILTER (WHERE telemedicine = TRUE)) * 100.0 / COUNT(*) FROM hospitals WHERE location = 'rural';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM hospitals WHERE location = 'Rural')) AS percentage FROM hospitals WHERE location = 'Rural' AND telemedicine = TRUE;,0 Which game was on 14 January 1973?,"CREATE TABLE table_name_31 (game VARCHAR, date VARCHAR);","SELECT game FROM table_name_31 WHERE date = ""14 january 1973"";","SELECT game FROM table_name_31 WHERE date = ""14 january 1973"";",1 Who is the youngest athlete to win a gold medal in gymnastics?,"CREATE TABLE gymnastics_athletes (athlete_name VARCHAR(100), age INT, total_gold INT, total_silver INT, total_bronze INT); ","SELECT athlete_name, age, total_gold FROM gymnastics_athletes WHERE total_gold > 0 ORDER BY age ASC LIMIT 1;",SELECT athlete_name FROM gymnastics_athletes WHERE age = (SELECT MIN(age) FROM gymnastics_athletes) AND total_gold = (SELECT total_gold FROM gymnastics_athletes);,0 Name the most peak performance for october 2006 - january 2010,"CREATE TABLE table_27765443_2 (maximum_peak_performance___teraflops__ VARCHAR, period_of_operation VARCHAR);","SELECT maximum_peak_performance___teraflops__ FROM table_27765443_2 WHERE period_of_operation = ""October 2006 - January 2010"";","SELECT maximum_peak_performance___teraflops__ FROM table_27765443_2 WHERE period_of_operation = ""October 2006 - January 2010"";",1 What is the total funding for biosensor technology development in H1 2022?,"CREATE SCHEMA if not exists biosensors;CREATE TABLE if not exists biosensors.funding (id INT, period VARCHAR(50), year INT, amount FLOAT); ",SELECT SUM(amount) FROM biosensors.funding WHERE period = 'H1' AND year = 2022;,SELECT SUM(amount) FROM biosensors.funding WHERE period = 'H1 2022' AND year = 2022;,0 What is the percentage of community development projects completed in 'Latin America' in 2019?,"CREATE TABLE community_projects (project_id INT, project_name TEXT, location TEXT, completion_year INT); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM community_projects WHERE location = 'Latin America')) FROM community_projects WHERE completion_year = 2019 AND location = 'Latin America';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM community_projects WHERE location = 'Latin America' AND completion_year = 2019)) FROM community_projects WHERE location = 'Latin America' AND completion_year = 2019;,0 Get the total number of VR headsets sold in Canada and the United Kingdom,"CREATE TABLE VRAdoption (Region VARCHAR(20), HeadsetsSold INT); ","SELECT SUM(HeadsetsSold) FROM VRAdoption WHERE Region IN ('Canada', 'United Kingdom')","SELECT SUM(HeadsetsSold) FROM VRAdoption WHERE Region IN ('Canada', 'United Kingdom');",0 What digital channel corresponds to virtual channel 5.2?,"CREATE TABLE table_2857352_3 (digital_channel VARCHAR, virtual_channel VARCHAR);","SELECT digital_channel FROM table_2857352_3 WHERE virtual_channel = ""5.2"";","SELECT digital_channel FROM table_2857352_3 WHERE virtual_channel = ""5.2"";",1 Who has a constituency of 84?,"CREATE TABLE table_name_62 (name VARCHAR, constituency_number VARCHAR);","SELECT name FROM table_name_62 WHERE constituency_number = ""84"";","SELECT name FROM table_name_62 WHERE constituency_number = ""84"";",1 "What is the average safety rating of electric vehicles, compared to non-electric vehicles, per manufacturer?","CREATE TABLE VehicleSafetyRatings (id INT, make VARCHAR(20), model VARCHAR(20), is_electric BOOLEAN, safety_rating FLOAT); ","SELECT make, AVG(safety_rating) FILTER (WHERE is_electric = true) AS avg_electric_safety_rating, AVG(safety_rating) FILTER (WHERE is_electric = false) AS avg_non_electric_safety_rating FROM VehicleSafetyRatings GROUP BY make;","SELECT manufacturer, AVG(safety_rating) as avg_safety_rating FROM VehicleSafetyRatings WHERE is_electric = true GROUP BY manufacturer;",0 What was the amount of winners share (in $) in the game with a margin victory of 2 strokes?,"CREATE TABLE table_1940012_2 (winners_share___$__ VARCHAR, margin_of_victory VARCHAR);","SELECT winners_share___$__ FROM table_1940012_2 WHERE margin_of_victory = ""2 strokes"";","SELECT winners_share___$__ FROM table_1940012_2 WHERE margin_of_victory = ""2 strokes"";",1 Which Home team has a Venue of victoria park?,"CREATE TABLE table_name_27 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_27 WHERE venue = ""victoria park"";","SELECT home_team FROM table_name_27 WHERE venue = ""victoria park"";",1 "Show the AI safety incidents that occurred in the same region and on the same date, partitioned by incident type.","CREATE TABLE SafetyIncidents (incident_id INT, incident_date DATE, region VARCHAR(255), incident_type VARCHAR(255)); ","SELECT incident_type, incident_date, region, COUNT(*) as num_incidents FROM SafetyIncidents GROUP BY incident_type, incident_date, region HAVING num_incidents > 1 ORDER BY incident_type, incident_date, region;","SELECT region, incident_type, COUNT(*) as incident_count FROM SafetyIncidents WHERE incident_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE GROUP BY region, incident_type;",0 Which cybersecurity strategies have been implemented in the 'North' region since 2016?,"CREATE TABLE if not exists cybersecurity_strategies (region VARCHAR(50), strategy_name VARCHAR(50), year INT);",SELECT strategy_name FROM cybersecurity_strategies WHERE region = 'North' AND year >= 2016;,SELECT strategy_name FROM cybersecurity_strategies WHERE region = 'North' AND year >= 2016;,1 Calculate program budget by quartile,"CREATE TABLE Programs (Id INT, ProgramName VARCHAR(50), Budget DECIMAL(10,2), StartDate DATE, EndDate DATE); ","SELECT ProgramName, Budget, NTILE(4) OVER(ORDER BY Budget DESC) AS BudgetQuartile FROM Programs;","SELECT quartile, Budget FROM Programs GROUP BY quartile;",0 What is the total number of articles and news items published in the articles and news tables on the topic 'media literacy'?,"CREATE TABLE articles (title VARCHAR(255), author VARCHAR(255), date DATE, topic VARCHAR(255)); CREATE TABLE news (id INT, title VARCHAR(255), description TEXT, topic VARCHAR(255), date DATE);",SELECT COUNT(*) FROM articles WHERE topic = 'media literacy' UNION ALL SELECT COUNT(*) FROM news WHERE topic = 'media literacy';,SELECT COUNT(*) FROM articles WHERE topic ='media literacy';,0 What is the total investment amount for each customer in the North region?,"CREATE TABLE investments (investment_id INT, customer_id INT, region VARCHAR(20), investment_amount DECIMAL(10,2)); ","SELECT customer_id, SUM(investment_amount) FROM investments WHERE region = 'North' GROUP BY customer_id;","SELECT customer_id, SUM(investment_amount) FROM investments WHERE region = 'North' GROUP BY customer_id;",1 What is the bts retail price (regulated) for tariff code g10?,"CREATE TABLE table_10408617_5 (bts_retail_price__regulated_ VARCHAR, tariff_code VARCHAR);","SELECT bts_retail_price__regulated_ FROM table_10408617_5 WHERE tariff_code = ""g10"";","SELECT bts_retail_price__regulated_ FROM table_10408617_5 WHERE tariff_code = ""G10"";",0 What was the team Vanderberg belonged to when there was 42 completions?,"CREATE TABLE table_name_19 (team VARCHAR, completions VARCHAR);","SELECT team FROM table_name_19 WHERE completions = ""42"";","SELECT team FROM table_name_19 WHERE completions = ""42"";",1 "When Geelong is the Away team, what did the Home team score?","CREATE TABLE table_name_2 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team AS score FROM table_name_2 WHERE away_team = ""geelong"";","SELECT home_team AS score FROM table_name_2 WHERE away_team = ""geelong"";",1 Which organizations have launched spacecraft to Mars?,"CREATE TABLE spacecraft_mars (id INT, spacecraft_name VARCHAR(255), launch_date DATE, organization VARCHAR(255)); ",SELECT DISTINCT organization FROM spacecraft_mars WHERE spacecraft_name IS NOT NULL;,SELECT organization FROM spacecraft_mars;,0 "How many products are there under the category ""Seeds""?",CREATE TABLE products (product_category_code VARCHAR);,"SELECT COUNT(*) FROM products WHERE product_category_code = ""Seeds"";","SELECT COUNT(*) FROM products WHERE product_category_code = ""Seeds"";",1 "What is the average number of matches won by players from the United States, for games that started in the last 30 days?","CREATE TABLE games (game_id INT, player_id INT, game_date DATE);CREATE TABLE players (player_id INT, player_country VARCHAR(255));",SELECT AVG(wins) FROM (SELECT COUNT(games.game_id) AS wins FROM games JOIN players ON games.player_id = players.player_id WHERE players.player_country = 'United States' AND games.game_date >= (CURRENT_DATE - INTERVAL '30' DAY) GROUP BY games.player_id) AS subquery;,"SELECT AVG(COUNT(*)) FROM games JOIN players ON games.player_id = players.player_id WHERE players.player_country = 'United States' AND games.game_date >= DATEADD(day, -30, GETDATE());",0 What is the ends with a free transfer fee and was moved from middlesbrough?,"CREATE TABLE table_name_5 (ends VARCHAR, transfer_fee VARCHAR, moving_from VARCHAR);","SELECT ends FROM table_name_5 WHERE transfer_fee = ""free"" AND moving_from = ""middlesbrough"";","SELECT ends FROM table_name_5 WHERE transfer_fee = ""free"" AND moving_from = ""middlesbrough"";",1 List the number of investments in startups founded by Indigenous people in the renewable energy sector since 2017.,"CREATE TABLE investment (id INT, company_id INT, investment_date DATE, investment_amount INT); ",SELECT COUNT(*) FROM investment INNER JOIN company ON investment.company_id = company.id WHERE company.industry = 'Renewable Energy' AND company.founder_gender = 'Indigenous' AND investment_date >= '2017-01-01';,SELECT COUNT(*) FROM investment WHERE company_id IN (SELECT id FROM company WHERE name = 'Indigenous People') AND investment_date >= '2017-01-01' AND investment_date '2017-12-31';,0 "Which Opponent has a January larger than 8, and a Game smaller than 48, and a Score of 5–3?","CREATE TABLE table_name_77 (opponent VARCHAR, score VARCHAR, january VARCHAR, game VARCHAR);","SELECT opponent FROM table_name_77 WHERE january > 8 AND game < 48 AND score = ""5–3"";","SELECT opponent FROM table_name_77 WHERE january > 8 AND game 48 AND score = ""5–3"";",0 What is the average number of security incidents reported per day in the education sector in the past year?,"CREATE TABLE security_incidents (id INT, sector VARCHAR(255), date DATE);","SELECT AVG(number_of_incidents_per_day) FROM (SELECT DATE(date) as date, COUNT(*) as number_of_incidents_per_day FROM security_incidents WHERE sector = 'education' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) GROUP BY date) as subquery;","SELECT AVG(COUNT(*)) FROM security_incidents WHERE sector = 'Education' AND date >= DATEADD(year, -1, GETDATE());",0 What is the average rating of VR games released in 2021?,"CREATE TABLE Games (GameID INT, GameName VARCHAR(100), Genre VARCHAR(50), ReleaseYear INT, Rating DECIMAL(3, 1)); ",SELECT AVG(Rating) FROM Games WHERE Genre = 'VR' AND ReleaseYear = 2021;,SELECT AVG(Rating) FROM Games WHERE Genre = 'VR' AND ReleaseYear = 2021;,1 Can you tell me the total number of React that has the Lane of 5?,"CREATE TABLE table_name_13 (react VARCHAR, lane VARCHAR);",SELECT COUNT(react) FROM table_name_13 WHERE lane = 5;,SELECT COUNT(react) FROM table_name_13 WHERE lane = 5;,1 "Find the name, headquarter and founder of the manufacturer that has the highest revenue.","CREATE TABLE manufacturers (name VARCHAR, headquarter VARCHAR, founder VARCHAR, revenue VARCHAR);","SELECT name, headquarter, founder FROM manufacturers ORDER BY revenue DESC LIMIT 1;","SELECT name, headquarter, founder FROM manufacturers ORDER BY revenue DESC LIMIT 1;",1 "What is the lowest code number for the remainder of the municipality that has an area bigger than 15.34 squared kilometers, a population greater than 762 and a language of xhosa spoken?","CREATE TABLE table_name_3 (code INTEGER, place VARCHAR, area__km_2__ VARCHAR, population VARCHAR, most_spoken_language VARCHAR);","SELECT MIN(code) FROM table_name_3 WHERE population > 762 AND most_spoken_language = ""xhosa"" AND area__km_2__ > 15.34 AND place = ""remainder of the municipality"";","SELECT MIN(code) FROM table_name_3 WHERE population > 762 AND most_spoken_language = ""xhosa"" AND area__km_2__ > 15.34;",0 What is the minimum installed capacity (in MW) of geothermal projects in the renewable_projects table?,"CREATE TABLE renewable_projects (project_id INT, project_name TEXT, project_type TEXT, installed_capacity FLOAT);",SELECT MIN(installed_capacity) FROM renewable_projects WHERE project_type = 'Geothermal';,SELECT MIN(installed_capacity) FROM renewable_projects WHERE project_type = 'Geothermal';,1 Which customers have a checking account with a balance over 5000 in the Chicago branch?,"CREATE TABLE accounts (customer_id INT, account_type VARCHAR(20), branch VARCHAR(20), balance DECIMAL(10,2)); ",SELECT customer_id FROM accounts WHERE account_type = 'Checking' AND branch = 'Chicago' AND balance > 5000;,SELECT customer_id FROM accounts WHERE account_type = 'Checking' AND branch = 'Chicago' AND balance > 5000;,1 "Insert a new record into the 'products' table with product_id 101, name 'Pre-rolls', and price 15","CREATE TABLE products (product_id INT, name VARCHAR(255), price DECIMAL(5,2));","INSERT INTO products (product_id, name, price) VALUES (101, 'Pre-rolls', 15);","INSERT INTO products (product_id, name, price) VALUES (101, 'Pre-rolls', 15);",1 What is the Competition with a Date with 6 december 2011?,"CREATE TABLE table_name_72 (competition VARCHAR, date VARCHAR);","SELECT competition FROM table_name_72 WHERE date = ""6 december 2011"";","SELECT competition FROM table_name_72 WHERE date = ""6 december 2011"";",1 What is the average CO2 emission of diesel vehicles in 'suburban' areas?,"CREATE TABLE public.emissions_by_fuel_type(id serial PRIMARY KEY, vehicle_type varchar(255), location varchar(255), fuel_type varchar(255), co2_emission numeric);",SELECT AVG(co2_emission) FROM public.emissions_by_fuel_type WHERE vehicle_type = 'Diesel' AND location = 'Suburban';,SELECT AVG(co2_emission) FROM public.emissions_by_fuel_type WHERE fuel_type = 'Diesel' AND location ='suburban';,0 Update the weight of shipment with ID 101 to 13000 lbs in the 'Los Angeles' warehouse.,"CREATE TABLE Warehouse (id INT, name VARCHAR(20), city VARCHAR(20)); CREATE TABLE Shipment (id INT, weight INT, warehouse_id INT); ",UPDATE Shipment SET weight = 13000 WHERE id = 101 AND warehouse_id = (SELECT id FROM Warehouse WHERE city = 'Los Angeles');,UPDATE Shipment SET weight = 13000 WHERE warehouse_id = 101 AND city = 'Los Angeles';,0 "What is the distribution of healthcare providers by gender, excluding surgeons and anesthesiologists?","CREATE TABLE Healthcare_Providers (ID INT, Name TEXT, Gender TEXT, Specialty TEXT); ","SELECT Gender, COUNT(*) FROM Healthcare_Providers WHERE Specialty NOT IN ('Surgeon', 'Anesthesiologist') GROUP BY Gender;","SELECT Gender, COUNT(*) FROM Healthcare_Providers WHERE Specialty NOT IN ('Surgeon', 'Anesthesiologist') GROUP BY Gender;",1 Update the capacity of the senior centers by 15% for 2023?,"CREATE TABLE SeniorCenters (Center text, Capacity int, Year int); ",UPDATE SeniorCenters SET Capacity = Capacity * 1.15 WHERE Year = 2023;,UPDATE SeniorCenters SET Capacity = Capacity * 1.15 WHERE Year = 2023;,1 "Find the number of volunteers who joined in each month of the year 2020, ordered by the months?","CREATE TABLE Volunteers (VolunteerID INT, VolunteerName VARCHAR(50), JoinDate DATE); ","SELECT EXTRACT(MONTH FROM JoinDate) as Month, COUNT(*) as Volunteers FROM Volunteers WHERE JoinDate BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY Month ORDER BY Month;","SELECT DATE_FORMAT(JoinDate, '%Y-%m') AS Month, COUNT(*) AS Count FROM Volunteers WHERE YEAR(JoinDate) = 2020 GROUP BY Month ORDER BY Month;",0 What are all the makers and models?,"CREATE TABLE MODEL_LIST (Maker VARCHAR, Model VARCHAR);","SELECT Maker, Model FROM MODEL_LIST;","SELECT Maker, Model FROM MODEL_LIST;",1 How many active oil rigs are there in the USA?,"CREATE TABLE oil_rigs (country text, status text, drilling_depth real); ",SELECT COUNT(*) FROM oil_rigs WHERE country = 'USA' AND status = 'active';,SELECT COUNT(*) FROM oil_rigs WHERE country = 'USA' AND status = 'Active';,0 What is the maximum number of courses completed by a teacher in each subject area?,"CREATE TABLE subjects (subject_id INT, subject_name TEXT); CREATE TABLE teachers (teacher_id INT, subject_id INT); CREATE TABLE courses (course_id INT, subject_id INT, teacher_id INT); ","SELECT s.subject_name, MAX(COUNT(c.course_id)) as max_courses_completed FROM subjects s JOIN teachers t ON s.subject_id = t.subject_id LEFT JOIN courses c ON t.teacher_id = c.teacher_id GROUP BY s.subject_id;","SELECT p.subject_name, MAX(c.course_id) as max_courses FROM subjects p JOIN teachers t ON p.subject_id = t.subject_id JOIN courses c ON t.teacher_id = c.teacher_id GROUP BY p.subject_name;",0 Which position does Loren Woods play?,"CREATE TABLE table_10015132_21 (position VARCHAR, player VARCHAR);","SELECT position FROM table_10015132_21 WHERE player = ""Loren Woods"";","SELECT position FROM table_10015132_21 WHERE player = ""Loren Woods"";",1 How many 'first_time_volunteers' are recorded in the 'volunteer_history' table?,CREATE TABLE volunteer_history (volunteer_type VARCHAR(20)); ,SELECT COUNT(*) FROM volunteer_history WHERE volunteer_type = 'first_time_volunteers';,SELECT COUNT(*) FROM volunteer_history WHERE volunteer_type = 'first_time_volunteer';,0 What is the country for # 8,"CREATE TABLE table_13282157_1 (country VARCHAR, _number VARCHAR);",SELECT country FROM table_13282157_1 WHERE _number = 8;,SELECT country FROM table_13282157_1 WHERE _number = 8;,1 "what's the total number of candidates for first elected in 1948 , 1964","CREATE TABLE table_1341472_15 (candidates VARCHAR, first_elected VARCHAR);","SELECT COUNT(candidates) FROM table_1341472_15 WHERE first_elected = ""1948 , 1964"";","SELECT COUNT(candidates) FROM table_1341472_15 WHERE first_elected = ""1948, 1964"";",0 Update records in the 'Donors' table where the donor's name is 'Clara Lee' and change the last donation date to '2022-03-01',"CREATE TABLE Donors (id INT PRIMARY KEY, donor_name VARCHAR(255), last_donation DATE, donation_amount FLOAT);",UPDATE Donors SET last_donation = '2022-03-01' WHERE donor_name = 'Clara Lee';,UPDATE Donors SET last_donation = '2022-03-01' WHERE donor_name = 'Clara Lee';,1 Name the player for new orleans saints,"CREATE TABLE table_2508633_2 (player VARCHAR, nfl_team VARCHAR);","SELECT player FROM table_2508633_2 WHERE nfl_team = ""New Orleans Saints"";","SELECT player FROM table_2508633_2 WHERE nfl_team = ""New Orleans Saints"";",1 Which average rank has a total of 16?,"CREATE TABLE table_name_78 (rank INTEGER, total VARCHAR);",SELECT AVG(rank) FROM table_name_78 WHERE total = 16;,SELECT AVG(rank) FROM table_name_78 WHERE total = 16;,1 "What is the maximum donation amount per country, for countries that have received donations?","CREATE TABLE donations (id INT, country TEXT, amount DECIMAL(10,2)); ","SELECT country, MAX(amount) FROM donations GROUP BY country;","SELECT country, MAX(amount) FROM donations GROUP BY country;",1 List the number of whale sightings in the Indian Ocean by year.,"CREATE TABLE Whale_Sightings (sighting_date date, sighting_location text, sighting_species text);","SELECT EXTRACT(YEAR FROM sighting_date) AS year, COUNT(*) FROM Whale_Sightings WHERE sighting_location LIKE '%Indian Ocean%' GROUP BY year;","SELECT year, COUNT(*) FROM Whale_Sightings WHERE sighting_species = 'Indian Ocean' GROUP BY year;",0 "Which Sanskrit has a Chinese of —, and an English of cultivation of settling?","CREATE TABLE table_name_74 (sanskrit VARCHAR, chinese VARCHAR, english VARCHAR);","SELECT sanskrit FROM table_name_74 WHERE chinese = ""—"" AND english = ""cultivation of settling"";","SELECT sanskrit FROM table_name_74 WHERE chinese = ""—"" AND english = ""cultivated of settling"";",0 What is the Match with Points that are 24?,"CREATE TABLE table_name_11 (match VARCHAR, points VARCHAR);",SELECT match FROM table_name_11 WHERE points = 24;,SELECT match FROM table_name_11 WHERE points = 24;,1 What is the win/loss of coach Peter German?,"CREATE TABLE table_name_23 (win_loss VARCHAR, coach VARCHAR);","SELECT win_loss FROM table_name_23 WHERE coach = ""peter german"";","SELECT win_loss FROM table_name_23 WHERE coach = ""peter german"";",1 "How many games have an Order of 1006, and Goals larger than 192?","CREATE TABLE table_name_94 (games INTEGER, order VARCHAR, goals VARCHAR);",SELECT SUM(games) FROM table_name_94 WHERE order = 1006 AND goals > 192;,SELECT SUM(games) FROM table_name_94 WHERE order = 1006 AND goals > 192;,1 List the name of all products along with the number of complaints that they have received.,"CREATE TABLE products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE complaints (product_id VARCHAR);","SELECT t1.product_name, COUNT(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name;","SELECT T1.product_name, COUNT(*) FROM complaints AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id;",0 What is the combined water consumption by all sectors in 2021 and 2022?,"CREATE TABLE all_sector_consumption (year INT, sector TEXT, consumption FLOAT); ","SELECT consumption FROM all_sector_consumption WHERE year IN (2021, 2022)","SELECT SUM(consumption) FROM all_sector_consumption WHERE year IN (2021, 2022);",0 What is the highest roll number of the school in Te puna with a decile larger than 2?,"CREATE TABLE table_name_85 (roll INTEGER, decile VARCHAR, area VARCHAR);","SELECT MAX(roll) FROM table_name_85 WHERE decile > 2 AND area = ""te puna"";","SELECT MAX(roll) FROM table_name_85 WHERE decile > 2 AND area = ""te puna"";",1 Which Winners club has an Event of hang tight?,"CREATE TABLE table_name_68 (winners_club VARCHAR, event VARCHAR);","SELECT winners_club FROM table_name_68 WHERE event = ""hang tight"";","SELECT winners_club FROM table_name_68 WHERE event = ""hang tight"";",1 "when type of work is novel and published in english is 1977, what was published in russian?","CREATE TABLE table_207795_1 (published_in_russian VARCHAR, type_of_work VARCHAR, published_in_english VARCHAR);","SELECT published_in_russian FROM table_207795_1 WHERE type_of_work = ""novel"" AND published_in_english = ""1977"";","SELECT published_in_russian FROM table_207795_1 WHERE type_of_work = ""Novel"" AND published_in_english = ""1977"";",0 List the drought-impacted counties in Colorado and their average water usage.,"CREATE TABLE co_drought_impact (county TEXT, state TEXT, avg_usage FLOAT); ","SELECT county, avg_usage FROM co_drought_impact","SELECT county, AVG(avg_usage) FROM co_drought_impact WHERE state = 'Colorado' GROUP BY county;",0 What is the Status of primitive confuciusornithid .?,"CREATE TABLE table_name_21 (status VARCHAR, notes VARCHAR);","SELECT status FROM table_name_21 WHERE notes = ""primitive confuciusornithid ."";","SELECT status FROM table_name_21 WHERE notes = ""primitive confuciusornithid."";",0 "What is the average number of artists associated with each traditional art, ordered by the average number in ascending order?","CREATE TABLE traditional_arts (art_id INT, art_name TEXT, art_type TEXT, artist TEXT, years_practiced INT); ","SELECT art_type, AVG(artist) as avg_artists FROM traditional_arts GROUP BY art_type ORDER BY avg_artists;","SELECT art_type, AVG(artist) as avg_artists FROM traditional_arts GROUP BY art_type ORDER BY avg_artists ASC;",0 Tell me the score on 22 august 2012,"CREATE TABLE table_name_37 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_37 WHERE date = ""22 august 2012"";","SELECT score FROM table_name_37 WHERE date = ""22 august 2012"";",1 What were the number of deputies for the 1964 election year?,"CREATE TABLE table_name_44 (number_of_deputies VARCHAR, election_date VARCHAR);",SELECT number_of_deputies FROM table_name_44 WHERE election_date = 1964;,"SELECT number_of_deputies FROM table_name_44 WHERE election_date = ""1964"";",0 What is the type of POR?,"CREATE TABLE table_name_10 (type VARCHAR, nat VARCHAR);","SELECT type FROM table_name_10 WHERE nat = ""por"";","SELECT type FROM table_name_10 WHERE nat = ""por"";",1 What county is in isolation of 29?,"CREATE TABLE table_12280396_1 (county VARCHAR, isolation__km_ VARCHAR);",SELECT county FROM table_12280396_1 WHERE isolation__km_ = 29;,SELECT county FROM table_12280396_1 WHERE isolation__km_ = 29;,1 Which countries have marine protected areas deeper than 1000 meters?,"CREATE TABLE country_protected_areas (country TEXT, protected_area TEXT, max_depth_m FLOAT); ",SELECT country FROM country_protected_areas WHERE max_depth_m > 1000;,SELECT country FROM country_protected_areas WHERE protected_area > 1000;,0 What was the home score for the Home team Melbourne?,CREATE TABLE table_name_63 (home_team VARCHAR);,"SELECT home_team AS score FROM table_name_63 WHERE home_team = ""melbourne"";","SELECT home_team AS score FROM table_name_63 WHERE home_team = ""melbourne"";",1 What is the total funding for biosensor technology development in Germany?,"CREATE SCHEMA if not exists biosensor;CREATE TABLE if not exists biosensor.tech (id INT PRIMARY KEY, name VARCHAR(100), location VARCHAR(50), type VARCHAR(50));CREATE TABLE if not exists biosensor.funding (id INT PRIMARY KEY, tech_id INT, amount FLOAT, funding_date DATE);",SELECT SUM(funding.amount) FROM biosensor.funding INNER JOIN biosensor.tech ON funding.tech_id = tech.id WHERE tech.location = 'Germany' AND tech.type = 'Biosensor';,SELECT SUM(funding.amount) FROM biosensor.funding INNER JOIN biosensor.tech ON biosensor.tech.id = biosensor.tech.id WHERE biosensor.location = 'Germany' AND biosensor.tech.type = 'Biosensor';,0 Identify the top 5 cities with the highest percentage of electric vehicle adoption in the 'ev_adoption_stats' table.,"CREATE TABLE ev_adoption_stats (id INT, city VARCHAR, state VARCHAR, num_evs INT, population INT);","SELECT city, state, (num_evs * 100.0 / population)::DECIMAL(5,2) AS ev_adoption_percentage, RANK() OVER (ORDER BY (num_evs * 100.0 / population) DESC) AS rank FROM ev_adoption_stats WHERE rank <= 5;","SELECT city, num_evs, population FROM ev_adoption_stats ORDER BY num_evs DESC LIMIT 5;",0 Who was the away team when Melbourne was the home team?,"CREATE TABLE table_name_35 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team FROM table_name_35 WHERE home_team = ""melbourne"";","SELECT away_team FROM table_name_35 WHERE home_team = ""melbourne"";",1 What is the number of public awareness campaigns related to eating disorders in the last 3 years?,"CREATE TABLE campaigns (campaign_id INT, name TEXT, condition TEXT, start_date DATE, end_date DATE); ","SELECT COUNT(*) FROM campaigns WHERE condition = 'Eating Disorders' AND start_date >= DATEADD(year, -3, GETDATE());","SELECT COUNT(*) FROM campaigns WHERE condition = 'Eating Disorder' AND start_date >= DATEADD(year, -3, GETDATE());",0 "What is the total amount donated by each donor, sorted by the total donation amount in descending order?","CREATE TABLE donors (donor_id INT, donor_name TEXT, total_donation DECIMAL(10,2));","SELECT donor_name, total_donation FROM donors ORDER BY total_donation DESC;","SELECT donor_name, SUM(total_donation) as total_donation FROM donors GROUP BY donor_name ORDER BY total_donation DESC;",0 Name the lowest Crowd of hisense arena on 8 february?,"CREATE TABLE table_name_29 (crowd INTEGER, venue VARCHAR, date VARCHAR);","SELECT MIN(crowd) FROM table_name_29 WHERE venue = ""hisense arena"" AND date = ""8 february"";","SELECT MIN(crowd) FROM table_name_29 WHERE venue = ""hisense arena"" AND date = ""8 february"";",1 Which Category was from before 2009 with a Role/Episode of Libby Goldstein and Junie Lowry-Johnson?,"CREATE TABLE table_name_60 (category VARCHAR, year VARCHAR, role_episode VARCHAR);","SELECT category FROM table_name_60 WHERE year < 2009 AND role_episode = ""libby goldstein and junie lowry-johnson"";","SELECT category FROM table_name_60 WHERE year 2009 AND role_episode = ""libby goldstein and june lowry-johnson"";",0 what is the 1st prize for may 21,CREATE TABLE table_name_19 (date VARCHAR);,"SELECT SUM(1 AS st_prize___) AS $__ FROM table_name_19 WHERE date = ""may 21"";","SELECT 1 AS st_prize FROM table_name_19 WHERE date = ""may 21"";",0 What is the total capacity (in MW) of geothermal power plants in the 'RenewableEnergyProjects' table?,"CREATE TABLE RenewableEnergyProjects ( id INT, projectName VARCHAR(50), capacity INT, technology VARCHAR(50) ); ",SELECT SUM(capacity) FROM RenewableEnergyProjects WHERE technology = 'Geothermal';,SELECT SUM(capacity) FROM RenewableEnergyProjects WHERE technology = 'Geothermal';,1 What country is new orleans in?,"CREATE TABLE table_28005160_2 (country VARCHAR, city VARCHAR);","SELECT country FROM table_28005160_2 WHERE city = ""New Orleans"";","SELECT country FROM table_28005160_2 WHERE city = ""New Orleans"";",1 "What is 2006-07 Season, when Team is ""KF Fushë Kosova""?",CREATE TABLE table_name_64 (team VARCHAR);,"SELECT 2006 AS _07_season FROM table_name_64 WHERE team = ""kf fushë kosova"";","SELECT 2006 AS _07_season FROM table_name_64 WHERE team = ""kf fush kosova"";",0 Delete all posts from users who have a privacy setting of 'low',"CREATE TABLE posts (id INT, user_id INT, post_text TEXT); CREATE TABLE users (id INT, privacy_setting VARCHAR(20)); ",DELETE t1 FROM posts t1 JOIN users t2 ON t1.user_id = t2.id WHERE t2.privacy_setting = 'low';,DELETE FROM posts WHERE user_id IN (SELECT user_id FROM users WHERE privacy_setting = 'low');,0 Which AI algorithms have a higher fairness score than the average fairness score for all AI algorithms?,"CREATE TABLE AI_Algorithms (algorithm_name TEXT, fairness_score INT); ",SELECT algorithm_name FROM AI_Algorithms WHERE fairness_score > (SELECT AVG(fairness_score) FROM AI_Algorithms);,SELECT algorithm_name FROM AI_Algorithms WHERE fairness_score > (SELECT AVG(fairness_score) FROM AI_Algorithms);,1 List the names and ages of healthcare workers in Canada who are above 40.,"CREATE TABLE healthcare_workers (id INT, name VARCHAR(50), age INT, gender VARCHAR(10), location VARCHAR(50)); ","SELECT name, age FROM healthcare_workers WHERE location = 'Canada' AND age > 40;","SELECT name, age FROM healthcare_workers WHERE location = 'Canada' AND age > 40;",1 How many marine species are affected by pollution in the Caribbean Sea?,"CREATE TABLE Caribbean_Marine_Species (species_name TEXT, population INT, is_affected_by_pollution BOOLEAN); ",SELECT COUNT(*) FROM Caribbean_Marine_Species WHERE is_affected_by_pollution = true;,SELECT COUNT(*) FROM Caribbean_Marine_Species WHERE is_affected_by_pollution = true;,1 What identifier has 100000 watts as the power?,"CREATE TABLE table_name_98 (identifier VARCHAR, power VARCHAR);","SELECT identifier FROM table_name_98 WHERE power = ""100000 watts"";","SELECT identifier FROM table_name_98 WHERE power = ""100000 watts"";",1 How much money does the player with a score of 74-71-76-76=297 have?,"CREATE TABLE table_name_5 (money___$__ VARCHAR, score VARCHAR);",SELECT money___$__ FROM table_name_5 WHERE score = 74 - 71 - 76 - 76 = 297;,SELECT money___$__ FROM table_name_5 WHERE score = 74 - 71 - 76 - 76 = 297;,1 What is the rank of the swimmer with a time of 2:11.83?,"CREATE TABLE table_name_35 (rank VARCHAR, time VARCHAR);","SELECT rank FROM table_name_35 WHERE time = ""2:11.83"";","SELECT rank FROM table_name_35 WHERE time = ""2:21.83"";",0 Delete all smart city projects in the 'Asia' region from the infrastructure_projects table.,"CREATE TABLE infrastructure_projects (id INT, project_name VARCHAR(100), type VARCHAR(50), region VARCHAR(50)); ",DELETE FROM infrastructure_projects WHERE type = 'smart_city' AND region = 'Asia';,DELETE FROM infrastructure_projects WHERE type = 'Smart City' AND region = 'Asia';,0 What was the score for the home team that played at Brunswick Street Oval?,"CREATE TABLE table_name_52 (home_team VARCHAR, venue VARCHAR);","SELECT home_team AS score FROM table_name_52 WHERE venue = ""brunswick street oval"";","SELECT home_team AS score FROM table_name_52 WHERE venue = ""brunswick street oval"";",1 What is the total number of space missions by each space agency?,"CREATE TABLE SpaceMissions (mission_id INT, name VARCHAR(50), agency VARCHAR(50), launch_date DATE); ","SELECT agency, COUNT(mission_id) as total_missions FROM SpaceMissions GROUP BY agency;","SELECT agency, COUNT(*) FROM SpaceMissions GROUP BY agency;",0 What are the wind projects and their capacities?,"CREATE TABLE projects (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), type VARCHAR(255), capacity FLOAT, start_date DATE, end_date DATE); ",SELECT * FROM projects WHERE type = 'Wind';,"SELECT name, capacity FROM projects WHERE type = 'Wind';",0 What is the maximum donation amount received from a donor in each country?,"CREATE TABLE Donors (DonorID int, DonorName varchar(50), Country varchar(50)); CREATE TABLE Donations (DonationID int, DonorID int, DonationAmount decimal(10,2)); ","SELECT Country, MAX(DonationAmount) FROM Donations JOIN Donors ON Donations.DonorID = Donors.DonorID GROUP BY Country;","SELECT d.Country, MAX(d.DonationAmount) as MaxDonationAmount FROM Donors d JOIN Donations d ON d.DonorID = d.DonorID GROUP BY d.Country;",0 "What is the average lifelong learning score for each student, grouped by subject?","CREATE TABLE student_lifelong_learning (student_id INT, subject VARCHAR(255), lifelong_learning_score INT);","SELECT s.student_id, s.subject, AVG(s.lifelong_learning_score) as avg_score FROM student_lifelong_learning s GROUP BY s.student_id, s.subject;","SELECT subject, AVG(lifelong_learning_score) as avg_score FROM student_lifelong_learning GROUP BY subject;",0 Which Overall is the average one that has a Name of vance walker?,"CREATE TABLE table_name_95 (overall INTEGER, name VARCHAR);","SELECT AVG(overall) FROM table_name_95 WHERE name = ""vance walker"";","SELECT AVG(overall) FROM table_name_95 WHERE name = ""vance walker"";",1 List all eco-friendly accommodations in Japan with more than 2 virtual tours and order them by the number of virtual tours.,"CREATE TABLE japan_accommodations(accommodation_id INT, accommodation_name TEXT, country TEXT, num_virtual_tours INT); ","SELECT accommodation_id, accommodation_name, num_virtual_tours FROM japan_accommodations WHERE num_virtual_tours > 2 ORDER BY num_virtual_tours DESC;","SELECT accommodation_name, num_virtual_tours FROM japan_accommodations WHERE country = 'Japan' GROUP BY accommodation_name ORDER BY num_virtual_tours DESC;",0 What is the maximum points for higher when the points for foundation is less than 0?,"CREATE TABLE table_name_66 (points_for_higher INTEGER, points_for_foundation INTEGER);",SELECT MAX(points_for_higher) FROM table_name_66 WHERE points_for_foundation < 0;,SELECT MAX(points_for_higher) FROM table_name_66 WHERE points_for_foundation 0;,0 Which method has a record of 11-10?,"CREATE TABLE table_name_70 (method VARCHAR, record VARCHAR);","SELECT method FROM table_name_70 WHERE record = ""11-10"";","SELECT method FROM table_name_70 WHERE record = ""11-10"";",1 How many points and bonuses did Kurt Busch get?,"CREATE TABLE table_27940569_1 (pts_bns VARCHAR, driver VARCHAR);","SELECT pts_bns FROM table_27940569_1 WHERE driver = ""Kurt Busch"";","SELECT pts_bns FROM table_27940569_1 WHERE driver = ""Kurt Busch"";",1 What is the average salary of NHL players?,"CREATE TABLE nhl_players (player_id INT, name VARCHAR(50), team VARCHAR(50), position VARCHAR(20), salary FLOAT); ",SELECT AVG(salary) FROM nhl_players;,SELECT AVG(salary) FROM nhl_players;,1 Which assist/pass is in Ferreiras?,"CREATE TABLE table_name_80 (assist_pass VARCHAR, location VARCHAR);","SELECT assist_pass FROM table_name_80 WHERE location = ""ferreiras"";","SELECT assist_pass FROM table_name_80 WHERE location = ""ferreiras"";",1 Name the total number of winnings for 1995,"CREATE TABLE table_1671401_2 (winnings VARCHAR, year VARCHAR);",SELECT COUNT(winnings) FROM table_1671401_2 WHERE year = 1995;,SELECT COUNT(winnings) FROM table_1671401_2 WHERE year = 1995;,1 Get the total weight of fair trade coffee beans,"CREATE TABLE products (id INT, name VARCHAR(50), is_fair_trade BOOLEAN, weight INT, category VARCHAR(50)); ",SELECT SUM(weight) FROM products WHERE is_fair_trade = TRUE AND name = 'Coffee Beans';,SELECT SUM(weight) FROM products WHERE is_fair_trade = true AND category = 'Cafe';,0 "Display the first and last name, and salary for those employees whose first name is ending with the letter m.","CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, salary VARCHAR);","SELECT first_name, last_name, salary FROM employees WHERE first_name LIKE '%m';","SELECT first_name, last_name, salary FROM employees WHERE first_name = ""m"" AND last_name = ""m"";",0 "What is the average ESG score for investments in the healthcare sector, broken down by quarter?","CREATE TABLE investments (investment_id INT, sector VARCHAR(50), esg_score INT, investment_date DATE); ","SELECT EXTRACT(QUARTER FROM investment_date) as quarter, AVG(esg_score) as avg_esg_score FROM investments WHERE sector = 'Healthcare' GROUP BY quarter ORDER BY quarter ASC;","SELECT sector, DATE_FORMAT(investment_date, '%Y-%m') as quarter, AVG(esg_score) as avg_esg_score FROM investments WHERE sector = 'Healthcare' GROUP BY sector, quarter;",0 How many countries are the Tata Sabaya Lava domes located in?,"CREATE TABLE table_1081235_1 (country VARCHAR, name_of_lava_dome VARCHAR);","SELECT COUNT(country) FROM table_1081235_1 WHERE name_of_lava_dome = ""Tata Sabaya lava domes"";","SELECT COUNT(country) FROM table_1081235_1 WHERE name_of_lava_dome = ""Tata Sabaya Lava Dome"";",0 "What is the total energy efficiency improvement (in percentage) in Germany for 2018, grouped by sector?","CREATE TABLE germany_energy_efficiency (id INT PRIMARY KEY, year INT, sector VARCHAR(30), improvement_percent FLOAT); ","SELECT year, sector, SUM(improvement_percent) as total_improvement_percent FROM germany_energy_efficiency WHERE year = 2018 GROUP BY year, sector;","SELECT sector, SUM(improvement_percent) FROM germany_energy_efficiency WHERE year = 2018 GROUP BY sector;",0 Which vessels had delays in their arrivals to the port of Rotterdam?,"CREATE TABLE vessels (id INT, name VARCHAR(255)); CREATE TABLE vessel_movements (id INT, vessel_id INT, departure_port_id INT, arrival_port_id INT, speed DECIMAL(5,2), date DATE, expected_date DATE); ","SELECT vessel_id, date, expected_date FROM vessel_movements WHERE arrival_port_id = (SELECT id FROM ports WHERE name = 'Rotterdam') AND date > expected_date;",SELECT v.name FROM vessels v JOIN vessel_movements vm ON v.id = vm.vessel_id WHERE vm.arrival_port_id = (SELECT id FROM departure_ports WHERE name = 'Rotterdam');,0 What is the total number of mental health parity violations in each state having at most 400 reported cases?,"CREATE TABLE MentalHealthParityViolations (Id INT, State VARCHAR(2), ViolationCount INT); ","SELECT State, SUM(ViolationCount) as TotalViolations FROM MentalHealthParityViolations GROUP BY State HAVING SUM(ViolationCount) <= 400;","SELECT State, SUM(ViolationCount) FROM MentalHealthParityViolations GROUP BY State HAVING COUNT(*) >= 400;",0 Show names of companies and that of employees in descending order of number of years working for that employee.,"CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE company (Name VARCHAR, Company_ID VARCHAR); CREATE TABLE employment (People_ID VARCHAR, Company_ID VARCHAR, Year_working VARCHAR);","SELECT T3.Name, T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working;","SELECT T2.Name, T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T2.Company_ID = T3.Company_ID ORDER BY T3.Year_working DESC;",0 What is the highest track with a length of 1:54 written by Gene Autry and Oakley Haldeman?,"CREATE TABLE table_name_15 (track INTEGER, time VARCHAR, writer_s_ VARCHAR);","SELECT MAX(track) FROM table_name_15 WHERE time = ""1:54"" AND writer_s_ = ""gene autry and oakley haldeman"";","SELECT MAX(track) FROM table_name_15 WHERE time = ""1:54"" AND writer_s_ = ""gene autry and oakley haldeman"";",1 Which Year has a Competition of commonwealth youth games?,"CREATE TABLE table_name_94 (year INTEGER, competition VARCHAR);","SELECT AVG(year) FROM table_name_94 WHERE competition = ""commonwealth youth games"";","SELECT SUM(year) FROM table_name_94 WHERE competition = ""commonwealth youth games"";",0 Which team picked from South Carolina college?,"CREATE TABLE table_14649522_1 (nfl_team VARCHAR, college VARCHAR);","SELECT nfl_team FROM table_14649522_1 WHERE college = ""South Carolina"";","SELECT nfl_team FROM table_14649522_1 WHERE college = ""South Carolina"";",1 What are all the distinct premise types?,CREATE TABLE premises (premises_type VARCHAR);,SELECT DISTINCT premises_type FROM premises;,SELECT DISTINCT premises_type FROM premises;,1 Tell me the surface of 2 december 1974,"CREATE TABLE table_name_58 (surface VARCHAR, date VARCHAR);","SELECT surface FROM table_name_58 WHERE date = ""2 december 1974"";","SELECT surface FROM table_name_58 WHERE date = ""2 december 1974"";",1 What is the total number of articles published in 'americas' region?,"CREATE TABLE articles_by_region (id INT, article_id INT, region VARCHAR(30), articles INT); ",SELECT SUM(articles) FROM articles_by_region WHERE region = 'americas';,SELECT SUM(articles) FROM articles_by_region WHERE region = 'americas';,1 How many legal technology patents were granted to women-led teams in the past decade?,"CREATE TABLE patents (patent_id INT, year INT, team_leader VARCHAR(10), technology VARCHAR(20)); ","SELECT COUNT(*) FROM patents WHERE technology = 'Legal Tech' AND YEAR(year) >= 2011 AND team_leader IN ('Aisha', 'Brian', 'Candace', 'Dana', 'Eva');",SELECT COUNT(*) FROM patents WHERE year BETWEEN 2017 AND 2021 AND team_leader = 'Female';,0 What is the forest with the highest carbon sequestration per hectare and its corresponding carbon sequestration value?,"CREATE TABLE Forests (id INT, name VARCHAR(255), hectares FLOAT, country VARCHAR(255), carbon_sequestration_tonnes INT); ","SELECT Forests.name, (MAX(carbon_sequestration_tonnes/hectares)) as highest_carbon_sequestration_per_hectare, MAX(Forests.carbon_sequestration_tonnes) as corresponding_carbon_sequestration_value FROM Forests GROUP BY Forests.name HAVING highest_carbon_sequestration_per_hectare = (SELECT MAX(carbon_sequestration_tonnes/hectares) FROM Forests);","SELECT name, carbon_sequestration_tonnes FROM Forests ORDER BY carbon_sequestration_tonnes DESC LIMIT 1;",0 "Who's the Writer with an Original Airdate of september 4, 2005 (hbo)?","CREATE TABLE table_name_91 (writer VARCHAR, original_airdate VARCHAR);","SELECT writer FROM table_name_91 WHERE original_airdate = ""september 4, 2005 (hbo)"";","SELECT writer FROM table_name_91 WHERE original_airdate = ""september 4, 2005 (hbo)"";",1 Which date has an Opponent of bye?,"CREATE TABLE table_name_78 (date VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_78 WHERE opponent = ""bye"";","SELECT date FROM table_name_78 WHERE opponent = ""bye"";",1 What is the minimum and maximum workplace safety rating in Europe?,"CREATE TABLE safety_ratings (country VARCHAR(50), rating INT); ","SELECT MIN(rating), MAX(rating) FROM safety_ratings WHERE country IN ('Germany', 'France', 'United Kingdom', 'Italy');","SELECT country, MIN(rating) as min_rating, MAX(rating) as max_rating FROM safety_ratings WHERE country IN ('Germany', 'France', 'Italy') GROUP BY country;",0 What is the total price of artworks in the 'Impressionist' period and in the 'Post-Impressionist' period in the 'Los Angeles' museum?,"CREATE TABLE Artworks (ArtworkID INT, Title VARCHAR(255), Period VARCHAR(255), MuseumID INT, Price INT); CREATE TABLE Museums (MuseumID INT, Name VARCHAR(255), Location VARCHAR(255)); ",SELECT SUM(Artworks.Price) FROM Artworks INNER JOIN Museums ON Artworks.MuseumID = Museums.MuseumID WHERE (Artworks.Period = 'Impressionist' OR Artworks.Period = 'Post-Impressionist') AND Museums.Location = 'Los Angeles';,"SELECT SUM(Artworks.Price) FROM Artworks INNER JOIN Museums ON Artworks.MuseumID = Museums.MuseumID WHERE Artworks.Period IN ('Impressionist', 'Post-Impressionist') AND Museums.Location = 'Los Angeles';",0 What is the total quantity of fish harvested per month for each species at Farm E?,"CREATE TABLE aquafarms (id INT, name TEXT); CREATE TABLE harvest_data (aquafarm_id INT, species TEXT, harvested_quantity INT, timestamp TIMESTAMP);","SELECT species, EXTRACT(MONTH FROM timestamp) AS month, SUM(harvested_quantity) AS total_harvested FROM harvest_data JOIN aquafarms ON harvest_data.aquafarm_id = aquafarms.id WHERE aquafarm_id = 5 GROUP BY species, month;","SELECT a.name, MONTH(h.timestamp) as month, SUM(h.harvested_quantity) as total_harvested_quantity FROM aquafarms a JOIN harvest_data h ON a.id = h.aquafarm_id WHERE a.name = 'Farm E' GROUP BY a.name, month;",0 What is the local/network with an Ad frequency of 15 minutes?,"CREATE TABLE table_name_1 (local_networked VARCHAR, ad_freq VARCHAR);","SELECT local_networked FROM table_name_1 WHERE ad_freq = ""15 minutes"";","SELECT local_networked FROM table_name_1 WHERE ad_freq = ""15 minutes"";",1 What is the average account balance for customers in 'New York'?,"CREATE TABLE customers (id INT, name VARCHAR(50), city VARCHAR(50), balance DECIMAL(10,2)); ",SELECT AVG(balance) FROM customers WHERE city = 'New York';,SELECT AVG(balance) FROM customers WHERE city = 'New York';,1 Calculate the total amount of climate mitigation investments for each province in China in 2019 and 2020.,"CREATE TABLE climate_mitigation (province VARCHAR(50), investment INT, year INT, country VARCHAR(50)); ","SELECT province, SUM(investment) as total_investment FROM climate_mitigation WHERE year IN (2019, 2020) AND country = 'China' GROUP BY province;","SELECT province, SUM(investment) FROM climate_mitigation WHERE country = 'China' AND year IN (2019, 2020) GROUP BY province;",0 List all climate adaptation projects in Latin America and their respective budgets.,"CREATE TABLE climate_adaptation_projects (id INT, project_name VARCHAR(100), region VARCHAR(100), budget FLOAT); ","SELECT project_name, budget FROM climate_adaptation_projects WHERE region = 'Latin America';","SELECT project_name, budget FROM climate_adaptation_projects WHERE region = 'Latin America';",1 What are the names of drugs with sales greater than the average sales of all drugs approved in 'Year2'?,"CREATE TABLE drug_sales (drug_name TEXT, sales INTEGER, approval_year TEXT); ",SELECT drug_name FROM drug_sales WHERE sales > (SELECT AVG(sales) FROM drug_sales WHERE approval_year = 'Year2');,SELECT drug_name FROM drug_sales WHERE sales > (SELECT AVG(sales) FROM drug_sales WHERE approval_year = 2);,0 List all 'Bone' artifacts from site 'Angkor Wat' with their age.,"CREATE TABLE artifact_angkor_wat (artifact_id INTEGER, site_name TEXT, artifact_type TEXT, age INTEGER); ",SELECT * FROM artifact_angkor_wat WHERE site_name = 'Angkor Wat' AND artifact_type = 'Bone';,"SELECT artifact_type, age FROM artifact_angkor_wat WHERE site_name = 'Angkor Wat' AND artifact_type = 'Bone';",0 Find total donations for each disaster type.,"CREATE TABLE Donations (DonationID INT, DisasterType VARCHAR(25), Amount DECIMAL(10,2)); ","SELECT DisasterType, SUM(Amount) as TotalDonations FROM Donations GROUP BY DisasterType;","SELECT DisasterType, SUM(Amount) FROM Donations GROUP BY DisasterType;",0 "What was the original airdate of the episode ""The Cold Turkey"", which was viewed by 3.73 million viewers?","CREATE TABLE table_17467578_1 (original_airdate VARCHAR, us_viewers__million_ VARCHAR);","SELECT original_airdate FROM table_17467578_1 WHERE us_viewers__million_ = ""3.73"";","SELECT original_airdate FROM table_17467578_1 WHERE us_viewers__million_ = ""3.73"";",1 Determine the number of stores in each state,"CREATE TABLE stores (store_id INT, city VARCHAR(255), state VARCHAR(255)); ","SELECT state, COUNT(DISTINCT store_id) FROM stores GROUP BY state;","SELECT state, COUNT(*) FROM stores GROUP BY state;",0 "What was the total number of job openings in the public sector for each month in 2023, and how many of them were full-time positions?","CREATE TABLE JobOpenings (Month INT, Position VARCHAR(10), Count INT); ","SELECT Month, SUM(CASE WHEN Position = 'FullTime' THEN Count ELSE 0 END) AS FullTime, SUM(CASE WHEN Position = 'PartTime' THEN Count ELSE 0 END) AS PartTime FROM JobOpenings WHERE Year = 2023 GROUP BY Month;","SELECT Month, SUM(Count) as TotalJobOpenings, SUM(Count) as TotalJobOpenings FROM JobOpenings WHERE Position = 'Full-Time' AND YEAR(JobOpenings.Month) = 2023 GROUP BY Month;",0 What is the total of all Shot PCT occurrences when the value of Blank Ends is 8?,"CREATE TABLE table_1505809_2 (shot_pct VARCHAR, blank_ends VARCHAR);",SELECT COUNT(shot_pct) FROM table_1505809_2 WHERE blank_ends = 8;,SELECT COUNT(shot_pct) FROM table_1505809_2 WHERE blank_ends = 8;,1 Who are the top 3 artists practicing traditional arts in the Middle Eastern culture domain with more than 20 years of experience?,"CREATE TABLE Artists (ArtistID int, ArtistName varchar(255), ArtForm varchar(255), CultureDomain varchar(255), YearsOfExperience int); ","SELECT ArtistName, ArtForm FROM Artists WHERE CultureDomain = 'Middle Eastern' AND YearsOfExperience > 20 ORDER BY YearsOfExperience DESC LIMIT 3;","SELECT ArtistName, YearsOfExperience FROM Artists WHERE CultureDomain = 'Middle Eastern' ORDER BY YearsOfExperience DESC LIMIT 3;",0 Which pick was from Lamar High School?,"CREATE TABLE table_name_15 (pick VARCHAR, school VARCHAR);","SELECT pick FROM table_name_15 WHERE school = ""lamar high school"";","SELECT pick FROM table_name_15 WHERE school = ""lamar high school"";",1 How many engine b5204 t3?,"CREATE TABLE table_1147705_1 (engine_displacement VARCHAR, engine_type VARCHAR);","SELECT COUNT(engine_displacement) FROM table_1147705_1 WHERE engine_type = ""B5204 T3"";","SELECT COUNT(engine_displacement) FROM table_1147705_1 WHERE engine_type = ""B5204 T3"";",1 What is the Score of game 35?,"CREATE TABLE table_name_43 (score VARCHAR, game VARCHAR);",SELECT score FROM table_name_43 WHERE game = 35;,SELECT score FROM table_name_43 WHERE game = 35;,1 Display the top 3 AI algorithms with the highest average usage count in Europe.,"CREATE TABLE ai_algorithms (algorithm_id INT, algorithm_name VARCHAR(255), region VARCHAR(255), usage_count INT); ","SELECT algorithm_name, AVG(usage_count) as avg_usage_count FROM ai_algorithms WHERE region = 'Europe' GROUP BY algorithm_name ORDER BY avg_usage_count DESC LIMIT 3;","SELECT algorithm_name, AVG(usage_count) as avg_usage_count FROM ai_algorithms WHERE region = 'Europe' GROUP BY algorithm_name ORDER BY avg_usage_count DESC LIMIT 3;",1 How many safety incidents were recorded for vessels in the North Atlantic?,"CREATE TABLE vessels (id INT, name VARCHAR(50), type VARCHAR(50), flag VARCHAR(50)); CREATE TABLE safety_incidents (id INT, vessel_id INT, incident_type VARCHAR(50), incident_date DATE); ",SELECT COUNT(*) FROM safety_incidents WHERE vessel_id IN (SELECT id FROM vessels WHERE flag = 'USA') AND incident_date BETWEEN '2020-01-01' AND '2021-12-31';,SELECT COUNT(*) FROM safety_incidents JOIN vessels ON safety_incidents.vessel_id = vessels.id WHERE vessels.type = 'North Atlantic';,0 What is the total playtime of action games for players from the USA?,"CREATE TABLE players (player_id int, age int, gender varchar(10), country varchar(20)); CREATE TABLE game_sessions (session_id int, player_id int, game_name varchar(20), game_type varchar(10), duration int); CREATE TABLE game_catalog (game_name varchar(20), game_type varchar(10)); ",SELECT SUM(game_sessions.duration) FROM players INNER JOIN game_sessions ON players.player_id = game_sessions.player_id INNER JOIN game_catalog ON game_sessions.game_name = game_catalog.game_name WHERE players.country = 'USA' AND game_catalog.game_type = 'Action';,SELECT SUM(game_sessions.duration) FROM game_sessions INNER JOIN players ON game_sessions.player_id = players.player_id INNER JOIN game_catalog ON game_sessions.game_name = game_catalog.game_name WHERE players.country = 'USA' AND game_catalog.game_type = 'Action';,0 Name the surface for nathalie tauziat,"CREATE TABLE table_24638867_6 (surface VARCHAR, partner VARCHAR);","SELECT surface FROM table_24638867_6 WHERE partner = ""Nathalie Tauziat"";","SELECT surface FROM table_24638867_6 WHERE partner = ""Nathalie Tauziat"";",1 Find the minimum data usage for customers in the 'Urban' region.,"CREATE TABLE subscribers (subscriber_id INT, data_usage FLOAT, region VARCHAR(20)); ",SELECT MIN(data_usage) FROM subscribers WHERE region = 'Urban';,SELECT MIN(data_usage) FROM subscribers WHERE region = 'Urban';,1 What was the role when the original broadway was Adam Riegler?,"CREATE TABLE table_name_8 (role VARCHAR, original_broadway_cast VARCHAR);","SELECT role FROM table_name_8 WHERE original_broadway_cast = ""adam riegler"";","SELECT role FROM table_name_8 WHERE original_broadway_cast = ""adam riegler"";",1 How many silver medals for the nation with fewer than 1 golds and total less than 1?,"CREATE TABLE table_name_57 (silver VARCHAR, gold VARCHAR, total VARCHAR);",SELECT COUNT(silver) FROM table_name_57 WHERE gold < 1 AND total < 1;,SELECT COUNT(silver) FROM table_name_57 WHERE gold 1 AND total 1;,0 "What is the number of feedback entries for each category, and what is the percentage of feedback entries for each category in cities with a population over 10 million?","CREATE TABLE CategoryFeedback (Id INT, CityId INT, Category VARCHAR(50), Feedback VARCHAR(255)); ","SELECT Category, COUNT(*) AS FeedbackCount, (COUNT(*) * 100.0 / SUM(COUNT(*)) OVER ()) AS CategoryPercentage FROM (SELECT Category FROM CategoryFeedback JOIN City ON CategoryFeedback.CityId = City.Id WHERE Population > 1000000 GROUP BY Category, CityId) AS Subquery GROUP BY Category;","SELECT Category, COUNT(*), (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM CategoryFeedback WHERE CityId = CategoryFeedback.CityId)) as Percentage FROM CategoryFeedback WHERE CityId >= 10000000 GROUP BY Category;",0 What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there.,CREATE TABLE perpetrator (Country VARCHAR);,"SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country;","SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country;",1 What is the total revenue for each team?,"CREATE TABLE games (game_id INT, team_id INT, revenue DECIMAL(10,2)); ","SELECT t.team_name, SUM(g.revenue) as total_revenue FROM teams t JOIN games g ON t.team_id = g.team_id GROUP BY t.team_name;","SELECT team_id, SUM(revenue) as total_revenue FROM games GROUP BY team_id;",0 What is the success rate of 'agricultural innovation projects' in 'Asia'?,"CREATE TABLE projects (id INT, name TEXT, region TEXT, success BOOLEAN); ",SELECT AVG(projects.success) FROM projects WHERE projects.region = 'Asia' AND projects.name LIKE 'agricultural innovation%';,SELECT success FROM projects WHERE region = 'Asia';,0 Delete all fairness metrics for the 'Explainable AI' category from 2021.,"CREATE TABLE fairness_metrics (id INT, name VARCHAR(255), year INT, category VARCHAR(255)); ",DELETE FROM fairness_metrics WHERE category = 'Explainable AI' AND year = 2021,DELETE FROM fairness_metrics WHERE category = 'Explainable AI' AND year = 2021;,0 "What is the Date, when the Opponent is Gisela Dulko?","CREATE TABLE table_name_74 (date VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_74 WHERE opponent = ""gisela dulko"";","SELECT date FROM table_name_74 WHERE opponent = ""gisela dulko"";",1 What stage of the race was held on the course Reggio Calabria to Catanzaro?,"CREATE TABLE table_name_89 (stage VARCHAR, course VARCHAR);","SELECT stage FROM table_name_89 WHERE course = ""reggio calabria to catanzaro"";","SELECT stage FROM table_name_89 WHERE course = ""reggio calabria to catanzaro"";",1 Name the record with home of bucks on 24 november 2007,"CREATE TABLE table_name_76 (record VARCHAR, home VARCHAR, date VARCHAR);","SELECT record FROM table_name_76 WHERE home = ""bucks"" AND date = ""24 november 2007"";","SELECT record FROM table_name_76 WHERE home = ""bucks"" AND date = ""24 november 2007"";",1 What is the Airport for New York City?,"CREATE TABLE table_name_30 (airport VARCHAR, city VARCHAR);","SELECT airport FROM table_name_30 WHERE city = ""new york"";","SELECT airport FROM table_name_30 WHERE city = ""new york city"";",0 Show the employee ids and the number of documents destroyed by each employee.,CREATE TABLE Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR);,"SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID;","SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID;",1 What is the total supply of ERC20 tokens for each address on the Ethereum network?,"CREATE TABLE address (address VARCHAR(42)); CREATE TABLE erc20_token (address VARCHAR(42), token_name VARCHAR(50), total_supply BIGINT);","SELECT a.address, SUM(et.total_supply) as total_erc20_supply FROM address a JOIN erc20_token et ON a.address = et.address GROUP BY a.address;","SELECT address, SUM(total_supply) FROM erc20_token GROUP BY address;",0 Find the average salary of employees in the 'HumanResources' department who have a salary higher than the overall average salary.,"CREATE TABLE Employees (EmployeeID INT, Department VARCHAR(255), Salary FLOAT);",SELECT AVG(Salary) FROM Employees WHERE Department = 'HumanResources' AND Salary > (SELECT AVG(Salary) FROM Employees);,SELECT AVG(Salary) FROM Employees WHERE Department = 'HumanResources' AND Salary > (SELECT AVG(Salary) FROM Employees WHERE Department = 'HumanResources');,0 What is the format of 105.5 fm?,"CREATE TABLE table_2709_4 (format VARCHAR, frequency VARCHAR);","SELECT format FROM table_2709_4 WHERE frequency = ""105.5 FM"";","SELECT format FROM table_2709_4 WHERE frequency = ""105.5 FM"";",1 Who got the pole position if the supporting is USAC National Midget Series?,"CREATE TABLE table_25459168_2 (pole_position VARCHAR, supporting VARCHAR);","SELECT pole_position FROM table_25459168_2 WHERE supporting = ""USAC National Midget Series"";","SELECT pole_position FROM table_25459168_2 WHERE supporting = ""USAC National Midget Series"";",1 What is the total number of followers for users in the 'politician' category who have posted more than 20 times?,"CREATE TABLE users (user_id INT, username VARCHAR(255), category VARCHAR(255), follower_count INT, post_count INT); ",SELECT SUM(follower_count) FROM users WHERE category = 'politician' AND post_count > 20;,SELECT SUM(follower_count) FROM users WHERE category = 'politician' AND post_count > 20;,1 What is the Date of Week 9?,"CREATE TABLE table_name_6 (date VARCHAR, week VARCHAR);",SELECT date FROM table_name_6 WHERE week = 9;,SELECT date FROM table_name_6 WHERE week = 9;,1 "What is the average billing amount per case, grouped by case type?","CREATE TABLE cases (case_id INT, case_type TEXT, attorney_id INT, total_billing_amount DECIMAL);","SELECT case_type, AVG(total_billing_amount) AS avg_billing_per_case FROM cases GROUP BY case_type","SELECT case_type, AVG(total_billing_amount) FROM cases GROUP BY case_type;",0 Which 2009's 2010 featured the wta premier 5 tournaments?,CREATE TABLE table_name_72 (Id VARCHAR);,"SELECT 2009 FROM table_name_72 WHERE 2010 = ""wta premier 5 tournaments"";","SELECT 2009 FROM table_name_72 WHERE 2010 = ""wta premier 5 tournaments"";",1 What is the difference between the maximum and minimum transaction amounts for Mexico?,"CREATE TABLE transactions (user_id INT, transaction_amount DECIMAL(10, 2), transaction_date DATE, country VARCHAR(255)); ","SELECT country, MAX(transaction_amount) - MIN(transaction_amount) as transaction_amount_difference FROM transactions WHERE country = 'Mexico' GROUP BY country;",SELECT MAX(transaction_amount) - MIN(transaction_amount) FROM transactions WHERE country = 'Mexico';,0 What is the minimum age of visitors who engaged in community events in London last year?,"CREATE TABLE Community_Events (id INT, city VARCHAR(20), year INT, visitor_age INT);",SELECT MIN(visitor_age) FROM Community_Events WHERE city = 'London' AND year = 2021;,SELECT MIN(visitor_age) FROM Community_Events WHERE city = 'London' AND year = 2021;,1 What are the articles and videos longer than 10 minutes in the 'media_library'?,"CREATE TABLE media_library (id INT, type VARCHAR(10), title VARCHAR(50), length FLOAT, source VARCHAR(50)); ",SELECT * FROM media_library WHERE (type = 'article' OR type = 'video') AND length > 10;,"SELECT type, length FROM media_library WHERE length > 10;",0 Delete all evidence-based policy making initiatives in the Middle East and North Africa region from the ebp_initiatives table.,"CREATE TABLE ebp_initiatives (id INT, name VARCHAR(255), region VARCHAR(255)); ","DELETE FROM ebp_initiatives WHERE region IN ('Middle East', 'North Africa');","DELETE FROM ebp_initiatives WHERE region IN ('Middle East', 'North Africa');",1 Is Jasper being producted?,"CREATE TABLE table_name_66 (in_production VARCHAR, codename VARCHAR);","SELECT in_production FROM table_name_66 WHERE codename = ""jasper"";","SELECT in_production FROM table_name_66 WHERE codename = ""jasper"";",1 What is the distribution of digital divide index scores by country?,"CREATE TABLE country_scores (country TEXT, index_score INT); ","SELECT country, index_score, COUNT(*) FROM country_scores GROUP BY index_score ORDER BY index_score;","SELECT country, index_score, COUNT(*) as index_count FROM country_scores GROUP BY country, index_score;",0 Delete all records in the 'oil_rig' table where the 'operator' is 'Acme Corp',"CREATE TABLE oil_rig (id INT PRIMARY KEY, name TEXT, operator TEXT, location TEXT, status TEXT);",DELETE FROM oil_rig WHERE operator = 'Acme Corp';,DELETE FROM oil_rig WHERE operator = 'Acme Corp';,1 Find the total number of security incidents per severity level,"CREATE TABLE security_incidents (id INT, severity VARCHAR(10), description TEXT); ","SELECT severity, COUNT(*) as total FROM security_incidents GROUP BY severity;","SELECT severity, COUNT(*) FROM security_incidents GROUP BY severity;",0 What's the most amount of point finishes for v8supercar?,"CREATE TABLE table_2822193_1 (point_finishes__non_podium_ INTEGER, series VARCHAR);","SELECT MAX(point_finishes__non_podium_) FROM table_2822193_1 WHERE series = ""V8Supercar"";","SELECT MAX(point_finishes__non_podium_) FROM table_2822193_1 WHERE series = ""V8Supercar"";",1 List the top 5 strains with the highest total sales in California dispensaries in Q3 2022.,"CREATE TABLE Dispensaries (Dispensary_ID INT, Dispensary_Name TEXT, State TEXT); CREATE TABLE Sales (Sale_ID INT, Dispensary_ID INT, Strain TEXT, Total_Sales DECIMAL); ","SELECT Strain, SUM(Total_Sales) as Total FROM Sales JOIN Dispensaries ON Sales.Dispensary_ID = Dispensaries.Dispensary_ID WHERE State = 'CA' AND QUARTER(Sale_Date) = 3 GROUP BY Strain ORDER BY Total DESC LIMIT 5;","SELECT Strain, SUM(Total_Sales) as Total_Sales FROM Sales JOIN Dispensaries ON Sales.Dispensary_ID = Dispensaries.Dispensary_ID WHERE Dispensaries.State = 'California' AND Sales.Quarter = 3 GROUP BY Strain ORDER BY Total_Sales DESC LIMIT 5;",0 Which spacecraft have been launched by the European Space Agency?,"CREATE TABLE Spacecraft (id INT, name VARCHAR(255), manufacturer VARCHAR(255), type VARCHAR(255), launch_date DATE); ",SELECT name FROM Spacecraft WHERE manufacturer = 'ESA';,SELECT name FROM Spacecraft WHERE manufacturer = 'European Space Agency';,0 Which sustainable tourism activities in France are rated 5?,"CREATE TABLE activities (activity_id INT, activity_name VARCHAR(50), country VARCHAR(50), rating INT); ",SELECT activity_name FROM activities WHERE country = 'France' AND rating = 5;,SELECT activity_name FROM activities WHERE country = 'France' AND rating = 5;,1 What is the maximum number of workplace safety violations recorded in a single workplace in the year 2019?,"CREATE TABLE violations (id INT, workplace_id INT, violation_date DATE, num_violations INT); ",SELECT MAX(num_violations) FROM violations WHERE EXTRACT(YEAR FROM violation_date) = 2019;,SELECT MAX(num_violations) FROM violations WHERE violation_date BETWEEN '2019-01-01' AND '2019-12-31';,0 "How many customers are living in city ""Lake Geovannyton""?","CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (address_id VARCHAR, city VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR);","SELECT COUNT(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.city = ""Lake Geovannyton"";","SELECT COUNT(*) FROM customers INNER JOIN customer_addresses ON customers.customer_id = customer_addresses.customer_id INNER JOIN addresses ON customer_addresses.address_id = addresses.address_id WHERE addresses.city = ""Lake Geovannyton"";",0 What is the prime mover of the locomotive with a fa-2 model?,"CREATE TABLE table_name_16 (prime_mover VARCHAR, model VARCHAR);","SELECT prime_mover FROM table_name_16 WHERE model = ""fa-2"";","SELECT prime_mover FROM table_name_16 WHERE model = ""fa-2"";",1 what's the minimum total with crop (kilotonnes) being s lupin,"CREATE TABLE table_1057262_2 (total INTEGER, crop__kilotonnes_ VARCHAR);","SELECT MIN(total) FROM table_1057262_2 WHERE crop__kilotonnes_ = ""s Lupin"";","SELECT MIN(total) FROM table_1057262_2 WHERE crop__kilotonnes_ = ""S Lupin"";",0 "If the POS is 3, what is the 08 points?",CREATE TABLE table_22011138_7 (pos VARCHAR);,SELECT 08 AS _pts FROM table_22011138_7 WHERE pos = 3;,"SELECT 08 FROM table_22011138_7 WHERE pos = ""3"";",0 How many volunteers signed up for each program in Q1 of 2021?,"CREATE TABLE volunteers (id INT, volunteer_name TEXT, program TEXT, signup_date DATE); ","SELECT program, COUNT(volunteer_name) as num_volunteers FROM volunteers WHERE signup_date >= '2021-01-01' AND signup_date < '2021-04-01' GROUP BY program;","SELECT program, COUNT(*) FROM volunteers WHERE signup_date BETWEEN '2021-01-01' AND '2021-06-30' GROUP BY program;",0 What is the maximum missile contract value?,"CREATE TABLE contracts (id INT, category VARCHAR(255), value DECIMAL(10,2));",SELECT MAX(value) as max_value FROM contracts WHERE category = 'Missiles';,SELECT MAX(value) FROM contracts WHERE category = 'Mission';,0 What was the score when Arsenal was the away team?,"CREATE TABLE table_name_49 (score VARCHAR, away_team VARCHAR);","SELECT score FROM table_name_49 WHERE away_team = ""arsenal"";","SELECT score FROM table_name_49 WHERE away_team = ""arsenal"";",1 what is the part number(s) when the turbo is 9/11 and the frequency is 1.5 ghz?,"CREATE TABLE table_name_52 (part_number_s_ VARCHAR, turbo VARCHAR, frequency VARCHAR);","SELECT part_number_s_ FROM table_name_52 WHERE turbo = ""9/11"" AND frequency = ""1.5 ghz"";","SELECT part_number_s_ FROM table_name_52 WHERE turbo = ""9/11"" AND frequency = ""1.5 ghz"";",1 Find the top 3 most expensive cruelty-free cosmetic products that contain at least one organic ingredient.,"CREATE TABLE ingredients (ingredient_id INT, ingredient_name TEXT, organic TEXT, product_id INT, price FLOAT); CREATE TABLE cosmetics (product_id INT, product_name TEXT, cruelty_free BOOLEAN, price FLOAT); ","SELECT cosmetics.product_id, cosmetics.product_name, cosmetics.cruelty_free, ingredients.ingredient_name, ingredients.price FROM cosmetics JOIN ingredients ON cosmetics.product_id = ingredients.product_id WHERE cosmetics.cruelty_free = true AND ingredients.organic = 'Organic' ORDER BY price DESC LIMIT 3;","SELECT c.product_name, SUM(i.price) as total_price FROM cosmetics c JOIN ingredients i ON c.product_id = i.product_id WHERE c.cruelty_free = true AND i.organic = true GROUP BY c.product_name ORDER BY total_price DESC LIMIT 3;",0 What is the maximum water temperature recorded in the Indian Ocean for the last 3 years?,"CREATE TABLE indian_temp (year INT, temperature FLOAT); ",SELECT MAX(temperature) FROM indian_temp WHERE year BETWEEN (SELECT EXTRACT(YEAR FROM NOW()) - 3) AND EXTRACT(YEAR FROM NOW());,SELECT MAX(temperature) FROM indian_temp WHERE year BETWEEN 2019 AND 2021;,0 List the names of restaurants in the 'cafeterias' schema that have a sustainable sourcing certification and serve vegan dishes.,"CREATE TABLE cafeterias.menu_items (menu_item_id INT, name TEXT, category TEXT, sustainable_certification BOOLEAN); ",SELECT name FROM cafeterias.menu_items WHERE category LIKE '%Vegan%' AND sustainable_certification = true;,SELECT name FROM cafeterias.menu_items WHERE sustainable_certification = TRUE AND category = 'Vegan';,0 What is the minimum 'shared_cost' in the 'co_ownership_diversity' table?,"CREATE TABLE co_ownership_diversity (id INT, owner VARCHAR(20), shared_cost INT); ",SELECT MIN(shared_cost) FROM co_ownership_diversity;,SELECT MIN(shared_cost) FROM co_ownership_diversity;,1 How many villages have a density persons/ha of 5.5?,"CREATE TABLE table_21302_1 (no_of_villages VARCHAR, density_persons___ha VARCHAR);","SELECT COUNT(no_of_villages) FROM table_21302_1 WHERE density_persons___ha = ""5.5"";","SELECT COUNT(no_of_villages) FROM table_21302_1 WHERE density_persons___ha = ""5.5"";",1 What is the total number of electric vehicles (in thousands) sold in Germany since 2018?,"CREATE TABLE ElectricVehicles (id INT, country VARCHAR(50), year INT, sales INT); ",SELECT COUNT(*)/1000 FROM ElectricVehicles WHERE country = 'Germany' AND year >= 2018;,SELECT SUM(sales) FROM ElectricVehicles WHERE country = 'Germany' AND year >= 2018;,0 What is the maximum number of experiments conducted by a single spacecraft in the astrobiology_experiments table?,"CREATE TABLE astrobiology_experiments (experiment_id INT, name VARCHAR(100), spacecraft VARCHAR(100), launch_date DATE, experiments_conducted INT);",SELECT MAX(experiments_conducted) FROM astrobiology_experiments;,SELECT MAX(experiments_conducted) FROM astrobiology_experiments;,1 How many steals for the player who had 121 rebounds?,"CREATE TABLE table_22824302_3 (steals INTEGER, rebounds VARCHAR);",SELECT MIN(steals) FROM table_22824302_3 WHERE rebounds = 121;,SELECT SUM(steals) FROM table_22824302_3 WHERE rebounds = 121;,0 How many wind farms are there in the country 'Spain' with a capacity less than 100 MW?,"CREATE TABLE wind_farms (id INT, name TEXT, country TEXT, capacity_mw FLOAT); ",SELECT COUNT(*) FROM wind_farms WHERE country = 'Spain' AND capacity_mw < 100.0;,SELECT COUNT(*) FROM wind_farms WHERE country = 'Spain' AND capacity_mw 100;,0 List the top 5 most common types of sustainable urbanism projects in the entire database.,"CREATE TABLE sustainable_projects (project_id INT, project_type VARCHAR(255), PRIMARY KEY (project_id));","SELECT project_type, COUNT(*) as project_count FROM sustainable_projects GROUP BY project_type ORDER BY project_count DESC LIMIT 5;","SELECT project_type, COUNT(*) as count FROM sustainable_projects GROUP BY project_type ORDER BY count DESC LIMIT 5;",0 What is the total number of vegetarian and gluten-free dinner menu items?,"CREATE TABLE menus (menu_id INT, menu_name VARCHAR(255), category VARCHAR(255), is_vegetarian BOOLEAN, is_gluten_free BOOLEAN); ",SELECT SUM(CASE WHEN is_vegetarian = TRUE AND is_gluten_free = TRUE AND category = 'Dinner' THEN 1 ELSE 0 END) FROM menus;,SELECT COUNT(*) FROM menus WHERE is_vegetarian = true AND is_gluten_free = true AND category = 'dinner';,0 Delete genetic research data for a specific project that is no longer active,"CREATE TABLE genetic_research (id INT PRIMARY KEY, name VARCHAR(255), description TEXT, active BOOLEAN); ",DELETE FROM genetic_research WHERE id = 1;,DELETE FROM genetic_research WHERE active = false;,0 Can one access the Jersey territory using a Croatian identity card?,"CREATE TABLE table_25965003_3 (access_using_a_croatian_identity_card VARCHAR, countries_and_territories VARCHAR);","SELECT access_using_a_croatian_identity_card FROM table_25965003_3 WHERE countries_and_territories = ""Jersey"";","SELECT access_using_a_croatian_identity_card FROM table_25965003_3 WHERE countries_and_territories = ""Jersey"";",1 Name the f/laps for gp2 series,"CREATE TABLE table_24587026_1 (f_laps VARCHAR, series VARCHAR);","SELECT f_laps FROM table_24587026_1 WHERE series = ""GP2 series"";","SELECT f_laps FROM table_24587026_1 WHERE series = ""GP2"";",0 Delete all records in the 'agricultural_innovation' table where the budget is less than 75000.,"CREATE TABLE agricultural_innovation (id INT, project_name VARCHAR(255), budget INT);",DELETE FROM agricultural_innovation WHERE budget < 75000;,DELETE FROM agricultural_innovation WHERE budget 75000;,0 What was the season outcome of Lake Forest?,"CREATE TABLE table_name_43 (season_outcome VARCHAR, school VARCHAR);","SELECT season_outcome FROM table_name_43 WHERE school = ""lake forest"";","SELECT season_outcome FROM table_name_43 WHERE school = ""lake forest"";",1 What is the average temperature trend in the past week for all IoT sensors in the 'Field1'?,"CREATE TABLE SensorData (ID INT, SensorID INT, Timestamp DATETIME, Temperature FLOAT); CREATE VIEW LastWeekSensorData AS SELECT * FROM SensorData WHERE Timestamp BETWEEN DATEADD(day, -7, GETDATE()) AND GETDATE(); CREATE VIEW Field1Sensors AS SELECT * FROM SensorData WHERE FieldID = 1; CREATE VIEW Field1LastWeekSensorData AS SELECT * FROM LastWeekSensorData WHERE SensorData.SensorID = Field1Sensors.SensorID;",SELECT AVG(Temperature) OVER (PARTITION BY SensorID ORDER BY Timestamp ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) AS AvgTemperatureTrend FROM Field1LastWeekSensorData;,"SELECT AVG(Temperature) FROM Field1LastWeekSensorData WHERE Timestamp >= DATEADD(day, -7, GETDATE()) AND Field1Sensors.FieldID = 1;",0 List the top 5 states with the highest carbon pricing in Q3 2021.,"CREATE TABLE carbon_pricing (id INT, state VARCHAR(2), quarter INT, price FLOAT); ","SELECT state, AVG(price) as avg_price FROM carbon_pricing WHERE quarter = 3 GROUP BY state ORDER BY avg_price DESC LIMIT 5;","SELECT state, MAX(price) FROM carbon_pricing WHERE quarter = 3 GROUP BY state ORDER BY MAX(price) DESC LIMIT 5;",0 Where did north melbourne play while away?,"CREATE TABLE table_name_23 (venue VARCHAR, away_team VARCHAR);","SELECT venue FROM table_name_23 WHERE away_team = ""north melbourne"";","SELECT venue FROM table_name_23 WHERE away_team = ""north melbourne"";",1 What was the successor for vacant alabama 3rd?,"CREATE TABLE table_2417340_4 (successor VARCHAR, vacator VARCHAR, district VARCHAR);","SELECT successor FROM table_2417340_4 WHERE vacator = ""Vacant"" AND district = ""Alabama 3rd"";","SELECT successor FROM table_2417340_4 WHERE vacator = ""Vacant Alabama 3rd"";",0 List all destinations in Africa without any travel advisories.,"CREATE TABLE advisories (advisory_id INT, country TEXT, reason TEXT); CREATE TABLE countries (country_id INT, name TEXT, region TEXT);",SELECT c.name FROM countries c LEFT JOIN advisories a ON c.name = a.country WHERE a.country IS NULL AND c.region = 'Africa';,SELECT DISTINCT c.name FROM countries c INNER JOIN advisories a ON c.country_id = a.advisory_id WHERE a.country IS NULL AND c.region = 'Africa';,0 What is the average financial wellbeing score for customers who have a Shariah-compliant mortgage?,"CREATE TABLE shariah_customers (customer_id INT, shariah BOOLEAN, financial_wellbeing_score INT); CREATE TABLE shariah_mortgages (mortgage_id INT, customer_id INT);",SELECT AVG(sc.financial_wellbeing_score) FROM shariah_customers sc JOIN shariah_mortgages sm ON sc.customer_id = sm.customer_id WHERE sc.shariah = TRUE;,SELECT AVG(shariah_customers.financial_wellbeing_score) FROM shariah_customers INNER JOIN shariah_mortgages ON shariah_customers.customer_id = shariah_mortgages.customer_id WHERE shariah_customers.shariah = true;,0 What is the minimum project timeline for sustainable building practices in Texas?,"CREATE TABLE ProjectTimeline (TimelineID INT, Practice TEXT, State TEXT, Duration INT); ",SELECT MIN(Duration) FROM ProjectTimeline WHERE Practice = 'Green Roofs' AND State = 'Texas';,SELECT MIN(Duration) FROM ProjectTimeline WHERE Practice = 'Sustainable Building' AND State = 'Texas';,0 What is the agg when team 1 is Milan?,"CREATE TABLE table_name_70 (agg VARCHAR, team_1 VARCHAR);","SELECT agg FROM table_name_70 WHERE team_1 = ""milan"";","SELECT agg FROM table_name_70 WHERE team_1 = ""milano"";",0 What are the client demographics for cases with a positive outcome?,"CREATE TABLE cases (case_id INT, client_id INT, outcome VARCHAR(10)); CREATE TABLE clients (client_id INT, age INT, gender VARCHAR(6), income DECIMAL(10,2)); ","SELECT c.age, c.gender, c.income FROM clients c JOIN cases cs ON c.client_id = cs.client_id WHERE cs.outcome = 'Positive';","SELECT clients.age, clients.gender, clients.income FROM clients INNER JOIN cases ON clients.client_id = cases.client_id WHERE cases.outcome = 'positive';",0 What is the total amount of financial aid given to each city of 'cities' table and which cities received it?,"CREATE TABLE financial_aid (financial_aid_id INT, city_id INT, aid_amount DECIMAL(10,2)); CREATE TABLE cities (city_id INT, city_name VARCHAR(50)); ","SELECT city_name, SUM(aid_amount) as total_financial_aid FROM cities INNER JOIN financial_aid ON cities.city_id = financial_aid.city_id GROUP BY city_name;","SELECT c.city_name, SUM(f.aid_amount) as total_aid FROM financial_aid f JOIN cities c ON f.city_id = c.city_id GROUP BY c.city_name;",0 How many cybersecurity incidents were reported in Europe and North America in the years 2019 and 2020?,"CREATE TABLE cybersecurity_incidents (id INT, incident_type VARCHAR(255), year INT, affected_systems VARCHAR(255), region VARCHAR(255)); ","SELECT region, COUNT(*) as total_incidents FROM cybersecurity_incidents WHERE year IN (2019, 2020) AND region IN ('Europe', 'North America') GROUP BY region;","SELECT COUNT(*) FROM cybersecurity_incidents WHERE region IN ('Europe', 'North America') AND year IN (2019, 2020);",0 Which opponent had a bye for the TV Time?,"CREATE TABLE table_name_96 (opponent VARCHAR, tv_time VARCHAR);","SELECT opponent FROM table_name_96 WHERE tv_time = ""bye"";","SELECT opponent FROM table_name_96 WHERE tv_time = ""bye"";",1 What's the area of the voivodenship with 51 communes?,"CREATE TABLE table_11656578_2 (area_km²__1998_ VARCHAR, no_of_communes VARCHAR);",SELECT area_km²__1998_ FROM table_11656578_2 WHERE no_of_communes = 51;,SELECT area_km2__1998_ FROM table_11656578_2 WHERE no_of_communes = 51;,0 What is the total number of electric vehicles (in thousands) in China as of 2021?,"CREATE TABLE electric_vehicles (id INT, country TEXT, year INT, number_thousands FLOAT); ",SELECT SUM(number_thousands) FROM electric_vehicles WHERE country = 'China' AND year = 2021;,SELECT SUM(number_thousands) FROM electric_vehicles WHERE country = 'China' AND year = 2021;,1 What is the total quantity of products sold to supplier Y in the year 2022?,"CREATE TABLE purchases (supplier_id VARCHAR(255), purchase_date DATE, quantity INT); ",SELECT SUM(quantity) FROM purchases WHERE supplier_id = 'Y' AND YEAR(purchase_date) = 2022;,SELECT SUM(quantity) FROM purchases WHERE supplier_id = 'Y' AND YEAR(purchase_date) = 2022;,1 "List the top 3 banks with the highest average loan amount for socially responsible lending, along with their average loan amounts?","CREATE TABLE SOCIALLY_RESPONSIBLE_LOANS (BANK_NAME VARCHAR(50), AMOUNT NUMBER(12,2)); ","SELECT BANK_NAME, AVG(AMOUNT) AVERAGE_LOAN FROM (SELECT BANK_NAME, AMOUNT, ROW_NUMBER() OVER (PARTITION BY BANK_NAME ORDER BY AMOUNT DESC) RN FROM SOCIALLY_RESPONSIBLE_LOANS) WHERE RN <= 3 GROUP BY BANK_NAME;","SELECT BANK_NAME, AVG(AMOUNT) AS Avg_Loan_Amount FROM SOCIALLY_RESPONSIBLE_LOANS GROUP BY BANK_NAME ORDER BY Avg_Loan_Amount DESC LIMIT 3;",0 Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order.,"CREATE TABLE savings (balance VARCHAR, custid VARCHAR); CREATE TABLE accounts (name VARCHAR, custid VARCHAR);","SELECT T1.name, T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3;","SELECT T1.name, T1.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3;",0 What is the average production cost of silk scarves?,"CREATE TABLE production_costs (item VARCHAR(255), material VARCHAR(255), cost DECIMAL(10, 2)); ",SELECT AVG(cost) FROM production_costs WHERE item = 'silk scarf';,SELECT AVG(cost) FROM production_costs WHERE item = 'Silk Scarves';,0 How long is the diameter that has a longitude of 8.0e?,"CREATE TABLE table_name_65 (diameter__km_ VARCHAR, longitude VARCHAR);","SELECT diameter__km_ FROM table_name_65 WHERE longitude = ""8.0e"";","SELECT diameter__km_ FROM table_name_65 WHERE longitude = ""8.0e"";",1 What is the average number of vehicles registered per month in the 'vehicle_registrations' table since 2018?,"CREATE TABLE vehicle_registrations (registration_date DATE, is_ev BOOLEAN, PRIMARY KEY (registration_date, is_ev)); ","SELECT AVG(registrations_per_month) FROM (SELECT EXTRACT(MONTH FROM registration_date) AS month, COUNT(*) AS registrations_per_month FROM vehicle_registrations WHERE registration_date >= '2018-01-01' GROUP BY month) subquery;",SELECT AVG(COUNT(*)) FROM vehicle_registrations WHERE registration_date >= '2018-01-01' AND registration_date '2018-12-31';,0 What are the first names of all the students?,CREATE TABLE student (fname VARCHAR);,SELECT DISTINCT fname FROM student;,SELECT fname FROM student;,0 What is the number of public schools in Washington D.C. and the number of students enrolled in those schools?,"CREATE TABLE districts (id INT, name VARCHAR(255)); CREATE TABLE schools (id INT, district_id INT, name VARCHAR(255), public BOOLEAN, enrollment INT); ","SELECT SUM(schools.enrollment) AS total_enrollment, COUNT(schools.id) AS total_schools FROM schools INNER JOIN districts ON schools.district_id = districts.id WHERE districts.name = 'Washington D.C.' AND schools.public = true;","SELECT d.name, COUNT(s.id) as num_public_schools, SUM(s.enrollment) as total_enrolled FROM districts d JOIN schools s ON d.id = s.district_id WHERE d.name = 'Washington D.C.' AND s.public = TRUE GROUP BY d.name;",0 How many male members have a recorded weight measurement in the month of June?,"CREATE TABLE Members (Id INT, Gender VARCHAR(10)); CREATE TABLE Measurements (Id INT, MemberId INT, Weight DECIMAL(5,2), Date DATE); ","SELECT COUNT(DISTINCT MemberId) FROM Measurements INNER JOIN Members ON Measurements.MemberId = Members.Id WHERE DATE_FORMAT(Date, '%Y-%m') = '2022-06' AND Gender = 'Male';",SELECT COUNT(*) FROM Members JOIN Measurements ON Members.Id = Measurements.MemberId WHERE Members.Gender = 'Male' AND Measurements.Date BETWEEN '2022-06-01' AND '2022-06-30';,0 What was the total number of streams for a specific genre in the music streaming data?,"CREATE TABLE Streaming (song VARCHAR(50), genre VARCHAR(20), streams INT); ",SELECT SUM(streams) FROM Streaming WHERE genre = 'Pop';,"SELECT genre, SUM(streams) FROM Streaming GROUP BY genre;",0 "Which Year is the lowest one that has a Time of 24:55:58, and a Place larger than 3?","CREATE TABLE table_name_69 (year INTEGER, time VARCHAR, place VARCHAR);","SELECT MIN(year) FROM table_name_69 WHERE time = ""24:55:58"" AND place > 3;","SELECT MIN(year) FROM table_name_69 WHERE time = ""24:55:58"" AND place > 3;",1 "What is the location of the game with attendance of 63,336?","CREATE TABLE table_name_93 (game_site VARCHAR, attendance VARCHAR);","SELECT game_site FROM table_name_93 WHERE attendance = ""63,336"";","SELECT game_site FROM table_name_93 WHERE attendance = ""63,336"";",1 Who plays for sam houston state?,"CREATE TABLE table_name_79 (player VARCHAR, college VARCHAR);","SELECT player FROM table_name_79 WHERE college = ""sam houston state"";","SELECT player FROM table_name_79 WHERE college = ""sam houston state"";",1 Which products are sold to customers from Argentina and have a sustainability_rating greater than 80?,"CREATE TABLE sales_arg (id INT, customer_id INT, product VARCHAR(20), price DECIMAL(5,2)); CREATE TABLE suppliers_ar (id INT, product VARCHAR(20), country VARCHAR(20), sustainability_rating INT); ",SELECT sales_arg.product FROM sales_arg JOIN suppliers_ar ON sales_arg.product = suppliers_ar.product WHERE suppliers_ar.country = 'Argentina' AND suppliers_ar.sustainability_rating > 80;,SELECT s.product FROM sales_arg s JOIN suppliers_ar s ON s.customer_id = s.id WHERE s.country = 'Argentina' AND s.sustainability_rating > 80;,0 What are the total sales for each item on a given day?,"CREATE TABLE Sales (sale_id INT PRIMARY KEY, sale_date DATE, item_sold VARCHAR(255), quantity INT, sale_price DECIMAL(5,2));","SELECT item_sold, SUM(quantity * sale_price) FROM Sales WHERE sale_date = '2022-01-01' GROUP BY item_sold;","SELECT sale_date, item_sold, SUM(quantity * sale_price) as total_sales FROM Sales GROUP BY sale_date;",0 "Which Team classification has a Combination classification of egoi martínez, and a Winner of tom boonen?","CREATE TABLE table_name_28 (team_classification VARCHAR, combination_classification VARCHAR, winner VARCHAR);","SELECT team_classification FROM table_name_28 WHERE combination_classification = ""egoi martínez"" AND winner = ""tom boonen"";","SELECT team_classification FROM table_name_28 WHERE combination_classification = ""egoi martnez"" AND winner = ""tom boonen"";",0 What is the result on Saturday when it's रविवार ravivār on Sunday and मंगळवार mangaḷavār on Tuesday?,"CREATE TABLE table_name_41 (saturday_shani__saturn_ VARCHAR, sunday_surya__the_sun_ VARCHAR, tuesday_mangala__mars_ VARCHAR);","SELECT saturday_shani__saturn_ FROM table_name_41 WHERE sunday_surya__the_sun_ = ""रविवार ravivār"" AND tuesday_mangala__mars_ = ""मंगळवार mangaḷavār"";","SELECT saturday_shani__saturn_ FROM table_name_41 WHERE sunday_surya__the_sun_ = "" ravivr"" AND tuesday_mangala__mars_ = "" mangaavr"";",0 What Pick # does the St. Louis Blues have?,"CREATE TABLE table_name_13 (pick__number VARCHAR, nhl_team VARCHAR);","SELECT pick__number FROM table_name_13 WHERE nhl_team = ""st. louis blues"";","SELECT pick__number FROM table_name_13 WHERE nhl_team = ""st. louis blues"";",1 "What are the average temperatures and precipitation levels for each location in the Arctic Council countries' territories, excluding Svalbard?","CREATE TABLE arctic_council_climate (id INT, location VARCHAR(50), temperature FLOAT, precipitation FLOAT, country VARCHAR(50)); ","SELECT country, location, AVG(temperature), AVG(precipitation) FROM arctic_council_climate WHERE country NOT IN ('Svalbard') GROUP BY country, location;","SELECT location, AVG(temperature) as avg_temperature, AVG(precipitation) as avg_precipitation FROM arctic_council_climate WHERE country!= 'Svalbard' GROUP BY location;",0 How many 'organic' labeled farms are registered in the 'farms' table?,"CREATE TABLE farms (id INT, name VARCHAR(50), location VARCHAR(50), label VARCHAR(50));",SELECT COUNT(*) FROM farms WHERE label = 'organic';,SELECT COUNT(*) FROM farms WHERE label = 'organic';,1 "What is the total number of users who have viewed content in each language, segmented by gender?","CREATE TABLE user_content_lang_views (view_id INT, user_id INT, content_id INT, view_date DATE, user_gender VARCHAR(10), content_language VARCHAR(20)); CREATE TABLE content (content_id INT, content_type VARCHAR(20));","SELECT content_language, user_gender, COUNT(DISTINCT users.user_id) as user_count FROM user_content_lang_views JOIN users ON user_content_lang_views.user_id = users.user_id GROUP BY content_language, user_gender;","SELECT content_language, user_gender, COUNT(DISTINCT user_id) as total_users FROM user_content_lang_views GROUP BY content_language, user_gender;",0 What's the L3 cache that has a low power part number?,"CREATE TABLE table_name_84 (l3_cache VARCHAR, part_number_s_ VARCHAR);","SELECT l3_cache FROM table_name_84 WHERE part_number_s_ = ""low power"";","SELECT l3_cache FROM table_name_84 WHERE part_number_s_ = ""low power"";",1 What venue did he play in before 2008 and finished 14th (q)?,"CREATE TABLE table_name_71 (venue VARCHAR, year VARCHAR, position VARCHAR);","SELECT venue FROM table_name_71 WHERE year < 2008 AND position = ""14th (q)"";","SELECT venue FROM table_name_71 WHERE year 2008 AND position = ""14th (q)"";",0 What is the total quantity of hair care products sold in India in the past quarter?,"CREATE TABLE HairCareSales (product VARCHAR(255), country VARCHAR(255), date DATE, quantity INT);","SELECT SUM(quantity) FROM HairCareSales WHERE product LIKE 'Hair%' AND country = 'India' AND date >= DATEADD(quarter, -1, GETDATE());","SELECT SUM(quantity) FROM HairCareSales WHERE country = 'India' AND date >= DATEADD(quarter, -1, GETDATE());",0 What original vehicle has uwhvt homepage architecture?,"CREATE TABLE table_name_76 (original_vehicle VARCHAR, architecture VARCHAR);","SELECT original_vehicle FROM table_name_76 WHERE architecture = ""uwhvt homepage"";","SELECT original_vehicle FROM table_name_76 WHERE architecture = ""uwhvt homepage"";",1 find the average mass of spacecraft grouped by country,"CREATE TABLE Spacecraft_Manufacturing(name VARCHAR(50), mass FLOAT, country VARCHAR(50));","SELECT country, AVG(mass) AS avg_mass FROM Spacecraft_Manufacturing GROUP BY country;","SELECT country, AVG(mass) FROM Spacecraft_Manufacturing GROUP BY country;",0 What is the minimum depth at which the Blue Shark is found?,"CREATE TABLE shark_depths (shark VARCHAR(255), min_depth FLOAT); ",SELECT min_depth FROM shark_depths WHERE shark = 'Blue Shark';,SELECT min_depth FROM shark_depths WHERE shark = 'Blue Shark';,1 Who had the fastest lap in the races won by Max Papis?,"CREATE TABLE table_11056278_3 (fastest_lap VARCHAR, winning_driver VARCHAR);","SELECT fastest_lap FROM table_11056278_3 WHERE winning_driver = ""Max Papis"";","SELECT fastest_lap FROM table_11056278_3 WHERE winning_driver = ""Max Papis"";",1 "Find the average energy efficiency rating for residential buildings in each region, including the number of buildings rated.","CREATE TABLE Region (RegionID INT, RegionName VARCHAR(100)); CREATE TABLE Building (BuildingID INT, BuildingName VARCHAR(100), RegionID INT, EnergyEfficiencyRating FLOAT); ","SELECT RegionName, AVG(EnergyEfficiencyRating) AS AvgRating, COUNT(BuildingID) AS NumBuildings FROM Region JOIN Building ON Region.RegionID = Building.RegionID GROUP BY RegionName;","SELECT RegionName, AVG(EnergyEfficiencyRating) as AvgEnergyEfficiencyRating, COUNT(*) as BuildingCount FROM Building JOIN Region ON Building.RegionID = Region.RegionID GROUP BY RegionName;",0 What Round is the Event cage rage 17?,"CREATE TABLE table_name_36 (round VARCHAR, event VARCHAR);","SELECT round FROM table_name_36 WHERE event = ""cage rage 17"";","SELECT round FROM table_name_36 WHERE event = ""cage rage 17"";",1 "What host has an original air date of june 11, 2007?","CREATE TABLE table_name_11 (host VARCHAR, original_airdate VARCHAR);","SELECT host FROM table_name_11 WHERE original_airdate = ""june 11, 2007"";","SELECT host FROM table_name_11 WHERE original_airdate = ""june 11, 2007"";",1 What is the earliest season that has a position over 12?,"CREATE TABLE table_name_80 (season INTEGER, position INTEGER);",SELECT MIN(season) FROM table_name_80 WHERE position > 12;,SELECT MIN(season) FROM table_name_80 WHERE position > 12;,1 List all organizations in the 'animal welfare' category along with the number of donations they received.,"CREATE TABLE organizations (id INT, name VARCHAR(255), category VARCHAR(255)); CREATE TABLE donations (id INT, organization_id INT, amount DECIMAL(10, 2)); ","SELECT organizations.name, COUNT(donations.id) AS num_donations FROM organizations INNER JOIN donations ON organizations.id = donations.organization_id WHERE organizations.category = 'animal welfare' GROUP BY organizations.id;","SELECT o.name, COUNT(d.id) FROM organizations o INNER JOIN donations d ON o.id = d.organization_id WHERE o.category = 'animal welfare' GROUP BY o.name;",0 Where was the game in which Will Bynum (5) did the high assists played?,"CREATE TABLE table_27755603_2 (location_attendance VARCHAR, high_assists VARCHAR);","SELECT location_attendance FROM table_27755603_2 WHERE high_assists = ""Will Bynum (5)"";","SELECT location_attendance FROM table_27755603_2 WHERE high_assists = ""Will Bynum (5)"";",1 What is the total revenue for OTA bookings worldwide?,"CREATE TABLE ota_bookings (booking_id INT, hotel_name TEXT, region TEXT, revenue FLOAT); ",SELECT SUM(revenue) FROM ota_bookings;,SELECT SUM(revenue) FROM ota_bookings;,1 How many districts does william b. oliver represent?,"CREATE TABLE table_1342359_2 (district VARCHAR, incumbent VARCHAR);","SELECT COUNT(district) FROM table_1342359_2 WHERE incumbent = ""William B. Oliver"";","SELECT COUNT(district) FROM table_1342359_2 WHERE incumbent = ""William B. Oliver"";",1 Calculate the average monthly water consumption per capita in the city of Austin,"CREATE TABLE city (id INT, name VARCHAR(255)); CREATE TABLE water_meter_readings (id INT, city_id INT, consumption FLOAT, reading_date DATE); ","SELECT AVG(consumption / population) FROM (SELECT water_meter_readings.consumption, city.population, EXTRACT(MONTH FROM water_meter_readings.reading_date) as month FROM water_meter_readings JOIN city ON water_meter_readings.city_id = city.id WHERE city.name = 'Austin') as subquery GROUP BY month;",SELECT AVG(consumption) FROM water_meter_readings WHERE city_id = (SELECT id FROM city WHERE name = 'Austin');,0 "Find the number of employees who identify as LGBTQ+ from the ""diversity"" table","CREATE TABLE diversity (id INT, employee_id INT, sexual_orientation TEXT);","SELECT sexual_orientation, COUNT(*) as count FROM diversity WHERE sexual_orientation IN ('Gay', 'Lesbian', 'Bisexual', 'Transgender', 'Queer') GROUP BY sexual_orientation;",SELECT COUNT(*) FROM diversity WHERE sexual_orientation = 'LGBTQ+';,0 How many units of each garment type were sold in 2021?,"CREATE TABLE sales (sale_id INT, product_id INT, sale_date DATE, units INT); CREATE TABLE products (product_id INT, product_name VARCHAR(50), product_type VARCHAR(50));","SELECT p.product_type, SUM(s.units) as total_units FROM sales s JOIN products p ON s.product_id = p.product_id WHERE s.sale_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY p.product_type;","SELECT p.product_type, SUM(s.units) as total_units FROM sales s JOIN products p ON s.product_id = p.product_id WHERE s.sale_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY p.product_type;",1 What was the attendance at the Red Sox game that had a loss of Wakefield (7–10)?,"CREATE TABLE table_name_22 (attendance VARCHAR, loss VARCHAR);","SELECT attendance FROM table_name_22 WHERE loss = ""wakefield (7–10)"";","SELECT attendance FROM table_name_22 WHERE loss = ""wakefield (7–10)"";",1 What is the total quantity of sustainable fabric used by each brand?,"CREATE TABLE Brands (brand_id INT, brand_name TEXT); CREATE TABLE Fabrics (fabric_id INT, fabric_name TEXT, is_sustainable BOOLEAN); CREATE TABLE Brand_Fabrics (brand_id INT, fabric_id INT, quantity INT);","SELECT b.brand_name, SUM(bf.quantity) as total_quantity FROM Brands b JOIN Brand_Fabrics bf ON b.brand_id = bf.brand_id JOIN Fabrics f ON bf.fabric_id = f.fabric_id WHERE f.is_sustainable = TRUE GROUP BY b.brand_name;","SELECT b.brand_name, SUM(bf.quantity) FROM Brands b JOIN Brand_Fabrics bf ON b.brand_id = bf.brand_id JOIN Fabrics f ON bf.fabric_id = f.fabric_id WHERE f.is_sustainable = true GROUP BY b.brand_name;",0 List the top 2 most common first names for male and female donors?,"CREATE TABLE Donors (DonorID INT, FirstName VARCHAR(50), LastName VARCHAR(50), Gender VARCHAR(10), Country VARCHAR(100), DateOfBirth DATE); ","SELECT Gender, FirstName, COUNT(*) as Count FROM Donors GROUP BY Gender, FirstName HAVING COUNT(*) > 1 ORDER BY Gender, Count DESC LIMIT 2;","SELECT FirstName, LastName, Gender, Country, DateOfBirth FROM Donors WHERE Gender IN ('Male', 'Female') GROUP BY FirstName ORDER BY COUNT(*) DESC LIMIT 2;",0 Where was the place that the downhill was 71.6 and the average was less than 90.06?,"CREATE TABLE table_name_87 (place INTEGER, average VARCHAR, downhill VARCHAR);",SELECT SUM(place) FROM table_name_87 WHERE average < 90.06 AND downhill = 71.6;,"SELECT SUM(place) FROM table_name_87 WHERE average 90.06 AND downhill = ""71.6"";",0 What was the total budget spent on programs in the Healthcare category in H2 2020?,"CREATE TABLE Programs (ProgramID INT, Category TEXT, Budget DECIMAL(10,2), StartYear INT, EndYear INT); ",SELECT SUM(Budget) as 'Total Budget Spent' FROM Programs WHERE Category = 'Healthcare' AND StartYear = 2020 AND EndYear = 2020;,SELECT SUM(Budget) FROM Programs WHERE Category = 'Healthcare' AND StartYear = 2020 AND EndYear = 2020;,0 "In the year 2006, the womens singles had no competition and the mens doubles were roland hilti kilian pfister, what were the womens doubles","CREATE TABLE table_15001681_1 (womens_doubles VARCHAR, year VARCHAR, womens_singles VARCHAR, mens_doubles VARCHAR);","SELECT womens_doubles FROM table_15001681_1 WHERE womens_singles = ""no competition"" AND mens_doubles = ""Roland Hilti Kilian Pfister"" AND year = 2006;","SELECT womens_doubles FROM table_15001681_1 WHERE womens_singles = ""no competition"" AND mens_doubles = ""Roland Hilti Kilian Pfister"" AND year = 2006;",1 What is the percentage of mobile and broadband subscribers that are using a 4G network technology?,"CREATE TABLE mobile_subscribers(id INT, name VARCHAR(50), technology VARCHAR(50)); CREATE TABLE broadband_subscribers(id INT, name VARCHAR(50), technology VARCHAR(50));","SELECT 'mobile' as type, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM mobile_subscribers WHERE technology = '4G') as pct_4g_mobile FROM mobile_subscribers WHERE technology = '4G' UNION ALL SELECT 'broadband' as type, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM broadband_subscribers WHERE technology = '4G') as pct_4g_broadband FROM broadband_subscribers WHERE technology = '4G';",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM mobile_subscribers WHERE technology = '4G')) AS percentage FROM mobile_subscribers WHERE technology = '4G';,0 What is every category wise when the multi lane is 677?,"CREATE TABLE table_28723146_2 (category_wise VARCHAR, multi_lane VARCHAR);",SELECT category_wise FROM table_28723146_2 WHERE multi_lane = 677;,SELECT category_wise FROM table_28723146_2 WHERE multi_lane = 677;,1 Who was the original Japanese cast if Sean Barrett acted on the English (Manga UK) version?,"CREATE TABLE table_2160215_1 (original_japanese VARCHAR, english___manga_uk__ VARCHAR);","SELECT original_japanese FROM table_2160215_1 WHERE english___manga_uk__ = ""Sean Barrett"";","SELECT original_japanese FROM table_2160215_1 WHERE english___manga_uk__ = ""Sean Barrett"";",1 Which English has Plautdietsch of aupel?,"CREATE TABLE table_name_64 (english VARCHAR, plautdietsch VARCHAR);","SELECT english FROM table_name_64 WHERE plautdietsch = ""aupel"";","SELECT english FROM table_name_64 WHERE plautdietsch = ""aupel"";",1 Which underrepresented groups are lacking in faculty diversity in the College of Engineering?,"CREATE TABLE Faculty (FacultyID INT, Department VARCHAR(50), Gender VARCHAR(10), Race VARCHAR(50)); ","SELECT Department, COUNT(*) AS Total, SUM(CASE WHEN Gender = 'Female' AND Race NOT IN ('Hispanic', 'African American', 'Native American') THEN 1 ELSE 0 END) AS Underrepresented FROM Faculty WHERE Department = 'Engineering' GROUP BY Department;","SELECT Department, Gender, Race FROM Faculty WHERE Department = 'College of Engineering' AND Race IN ('African American', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hispanic', 'Hi",0 "What is the verb meaning of the word with part 3 ""sufun""?","CREATE TABLE table_1745843_8 (verb_meaning VARCHAR, part_3 VARCHAR);","SELECT verb_meaning FROM table_1745843_8 WHERE part_3 = ""sufun"";","SELECT verb_meaning FROM table_1745843_8 WHERE part_3 = ""Sufun"";",0 Who was the director where the role was Fred Ayres?,"CREATE TABLE table_name_13 (director VARCHAR, role VARCHAR);","SELECT director FROM table_name_13 WHERE role = ""fred ayres"";","SELECT director FROM table_name_13 WHERE role = ""fred ayres"";",1 What is the affiliation of the University of Maryland?,"CREATE TABLE table_name_54 (affiliation VARCHAR, school VARCHAR);","SELECT affiliation FROM table_name_54 WHERE school = ""university of maryland"";","SELECT affiliation FROM table_name_54 WHERE school = ""university of maryland"";",1 What record does the event of dream 9 with a round of 2 hold?,"CREATE TABLE table_name_19 (record VARCHAR, round VARCHAR, event VARCHAR);","SELECT record FROM table_name_19 WHERE round = 2 AND event = ""dream 9"";","SELECT record FROM table_name_19 WHERE round = 2 AND event = ""dream 9"";",1 What is the number of draws when played is less than 38?,"CREATE TABLE table_name_53 (draws VARCHAR, played INTEGER);",SELECT COUNT(draws) FROM table_name_53 WHERE played < 38;,SELECT COUNT(draws) FROM table_name_53 WHERE played 38;,0 Display the PlayerName and VRAdopted date for players who adopted VR technology in 2021,"CREATE TABLE Players (PlayerID INT, PlayerName VARCHAR(50), Country VARCHAR(50)); CREATE TABLE VRAdoption (PlayerID INT, VRAdopted DATE); ","SELECT p.PlayerName, va.VRAdopted FROM Players p INNER JOIN VRAdoption va ON p.PlayerID = va.PlayerID WHERE YEAR(va.VRAdopted) = 2021;","SELECT Players.PlayerName, VRAdoption.VRAdopted FROM Players INNER JOIN VRAdoption ON Players.PlayerID = VRAdoption.PlayerID WHERE VRAdoption.VRAdopted BETWEEN '2021-01-01' AND '2021-12-31';",0 "What is the total number of attendees at events in the 'theater' category, grouped by the attendee's country of origin?","CREATE TABLE attendance (id INT, event_name TEXT, attendee_country TEXT, attendee_count INT); ","SELECT attendee_country, SUM(attendee_count) FROM attendance WHERE event_name IN (SELECT event_name FROM events WHERE event_category = 'theater') GROUP BY attendee_country;","SELECT attendee_country, SUM(attendee_count) FROM attendance WHERE event_name LIKE '%theater%' GROUP BY attendee_country;",0 "What is the total number of attendees for events held in each city, in the past year, broken down by event type?","CREATE TABLE events (event_id INT, event_location VARCHAR(50), event_date DATE, event_type VARCHAR(20), attendees INT); ","SELECT SUBSTRING_INDEX(event_location, '-', 1) as city, event_type, SUM(attendees) as total_attendees FROM events WHERE event_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) GROUP BY city, event_type;","SELECT event_location, event_type, SUM(attendees) as total_attendees FROM events WHERE event_date >= DATEADD(year, -1, GETDATE()) GROUP BY event_location, event_type;",0 List the names and dates of all lifelong learning events taking place in 2023.,"CREATE TABLE lifelong_learning_events (id INT, name VARCHAR(255), date DATE); ","SELECT name, date FROM lifelong_learning_events WHERE date >= '2023-01-01';","SELECT name, date FROM lifelong_learning_events WHERE date BETWEEN '2023-01-01' AND '2023-12-31';",0 Find the total value of artworks created in the Impressionist period.,"CREATE TABLE ArtWorks (ArtworkID int, Title varchar(100), Value int, Period varchar(100));",SELECT SUM(Value) FROM ArtWorks WHERE Period = 'Impressionist',SELECT SUM(Value) FROM ArtWorks WHERE Period = 'Impressionist';,0 What batting partners batted for pakistan?,"CREATE TABLE table_1670921_2 (batting_partners VARCHAR, batting_team VARCHAR);","SELECT batting_partners FROM table_1670921_2 WHERE batting_team = ""Pakistan"";","SELECT batting_partners FROM table_1670921_2 WHERE batting_team = ""Pakistan"";",1 "What is the average weight of packages shipped from each warehouse, excluding shipments over 100 kg?","CREATE TABLE warehouse (id INT, location VARCHAR(255)); CREATE TABLE packages (id INT, warehouse_id INT, weight FLOAT); ","SELECT warehouse_id, AVG(weight) as avg_weight FROM packages WHERE weight < 100 GROUP BY warehouse_id;","SELECT w.location, AVG(p.weight) as avg_weight FROM packages p JOIN warehouse w ON p.warehouse_id = w.id WHERE p.weight 100 GROUP BY w.location;",0 Which country had the highest number of cultural events in 2019?,"CREATE TABLE cultural_events (event_id INT, country VARCHAR(50), year INT, events_count INT); ","SELECT country, MAX(events_count) FROM cultural_events WHERE year = 2019 GROUP BY country HAVING MAX(events_count) = (SELECT MAX(events_count) FROM cultural_events WHERE year = 2019);","SELECT country, MAX(events_count) FROM cultural_events WHERE year = 2019 GROUP BY country;",0 Update the 'discovery_date' column in the 'fields' table for field 'F-01' to '2010-01-01',"CREATE TABLE fields (field_id INT, field_name VARCHAR(255), operator VARCHAR(255), discovery_date DATE);",UPDATE fields SET discovery_date = '2010-01-01' WHERE field_name = 'F-01';,UPDATE fields SET discovery_date = '2010-01-01' WHERE field_name = 'F-01';,1 On which day did the person who is known for the only way is essex star enter?,"CREATE TABLE table_name_42 (entered VARCHAR, known_for VARCHAR);","SELECT entered FROM table_name_42 WHERE known_for = ""the only way is essex star"";","SELECT entered FROM table_name_42 WHERE known_for = ""the only way is essex star"";",1 what's the fuel delivery where power is hp (kw) @6500 rpm,"CREATE TABLE table_11167610_1 (fuel_delivery VARCHAR, power VARCHAR);","SELECT fuel_delivery FROM table_11167610_1 WHERE power = ""hp (kW) @6500 rpm"";","SELECT fuel_delivery FROM table_11167610_1 WHERE power = ""HP (KW) @6500 RPM"";",0 Which opponent plays on September 19?,"CREATE TABLE table_name_11 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_11 WHERE date = ""september 19"";","SELECT opponent FROM table_name_11 WHERE date = ""september 19"";",1 What is the average time taken by swimmers in the 100m freestyle?,"CREATE TABLE swimming_times (id INT, swimmer VARCHAR(50), age INT, gender VARCHAR(10), event VARCHAR(20), time FLOAT);",SELECT AVG(time) FROM swimming_times WHERE event = '100m Freestyle';,SELECT AVG(time) FROM swimming_times WHERE event = '100m freestyle';,0 Which indigenous community in Greenland has the largest population?,"CREATE TABLE indigenous_communities (community VARCHAR(255), country VARCHAR(255), population INT);","SELECT community, MAX(population) FROM indigenous_communities WHERE country = 'Greenland' GROUP BY community;","SELECT community, population FROM indigenous_communities WHERE country = 'Greenland' ORDER BY population DESC LIMIT 1;",0 Find the longest running military innovation project in the Middle East,"CREATE TABLE military_innovation_projects (project_id INT, region VARCHAR(255), project_name VARCHAR(255), start_date DATE, end_date DATE); ","SELECT project_name, DATEDIFF(end_date, start_date) AS duration FROM military_innovation_projects WHERE region = 'Middle East' ORDER BY duration DESC LIMIT 1;","SELECT project_name, start_date, end_date FROM military_innovation_projects WHERE region = 'Middle East' ORDER BY start_date DESC LIMIT 1;",0 "Jim Obradovich, picked after round 2, but before pick 183, plays what position?","CREATE TABLE table_name_88 (position VARCHAR, player VARCHAR, round VARCHAR, pick VARCHAR);","SELECT position FROM table_name_88 WHERE round > 2 AND pick < 183 AND player = ""jim obradovich"";","SELECT position FROM table_name_88 WHERE round > 2 AND pick 183 AND player = ""jim obradovich"";",0 "If the height is 181cm, what was the position?","CREATE TABLE table_22344463_2 (position VARCHAR, height VARCHAR);","SELECT position FROM table_22344463_2 WHERE height = ""181cm"";","SELECT position FROM table_22344463_2 WHERE height = ""181cm"";",1 List all cases and the number of associated bills.,"CREATE TABLE cases (case_id INT, case_type VARCHAR(255)); CREATE TABLE billing (bill_id INT, case_id INT, amount DECIMAL(10, 2)); ","SELECT c.case_id, c.case_type, COUNT(b.bill_id) as num_bills FROM cases c LEFT OUTER JOIN billing b ON c.case_id = b.case_id GROUP BY c.case_id, c.case_type;","SELECT c.case_type, COUNT(b.bill_id) FROM cases c JOIN billing b ON c.case_id = b.case_id GROUP BY c.case_type;",0 List all satellites with missing country information,"CREATE TABLE satellites (id INT, name VARCHAR(255), international_designator VARCHAR(20), country VARCHAR(50));",SELECT * FROM satellites WHERE country IS NULL;,SELECT * FROM satellites WHERE country IS NULL;,1 "What is the average mental health score for community health workers in California, ordered by their score?","CREATE TABLE community_health_workers (id INT, name TEXT, location TEXT, mental_health_score INT); ","SELECT location, AVG(mental_health_score) AS avg_mental_health_score FROM community_health_workers WHERE location IN ('California') GROUP BY location ORDER BY avg_mental_health_score DESC;",SELECT AVG(mental_health_score) FROM community_health_workers WHERE location = 'California' ORDER BY mental_health_score;,0 Name the height for asko esna,"CREATE TABLE table_25058562_2 (height VARCHAR, player VARCHAR);","SELECT height FROM table_25058562_2 WHERE player = ""Asko Esna"";","SELECT height FROM table_25058562_2 WHERE player = ""Asko Esna"";",1 "What is the number of external threat intelligence sources, by category and country?","CREATE TABLE threat_intelligence (id INT, date DATE, source VARCHAR(20), category VARCHAR(20), country VARCHAR(20)); ","SELECT category, country, COUNT(*) as external_count FROM threat_intelligence WHERE source = 'external' GROUP BY category, country;","SELECT category, country, COUNT(source) FROM threat_intelligence GROUP BY category, country;",0 What Date has Opponents of sun shengnan han xinyun?,"CREATE TABLE table_name_2 (date VARCHAR, opponents VARCHAR);","SELECT date FROM table_name_2 WHERE opponents = ""sun shengnan han xinyun"";","SELECT date FROM table_name_2 WHERE opponents = ""sun shengnan han xinyun"";",1 "Which romaji title, has Japanese title of 菊次郎とさき 3?","CREATE TABLE table_name_94 (romaji_title VARCHAR, japanese_title VARCHAR);","SELECT romaji_title FROM table_name_94 WHERE japanese_title = ""菊次郎とさき 3"";","SELECT romaji_title FROM table_name_94 WHERE japanese_title = "" 3"";",0 What is the 30-day moving average of transaction fees on the Solana network?,"CREATE TABLE solana_transactions (transaction_id INT, transaction_fee DECIMAL(10,2), transaction_time TIMESTAMP);","SELECT AVG(transaction_fee) as moving_average FROM (SELECT transaction_fee, AVG(transaction_fee) OVER (ORDER BY transaction_time ROWS BETWEEN 29 PRECEDING AND CURRENT ROW) as moving_avg FROM solana_transactions WHERE transaction_time >= NOW() - INTERVAL '30 day') subquery;","SELECT AVG(transaction_fee) FROM solana_transactions WHERE transaction_time BETWEEN DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 30 DAY) AND CURRENT_TIMESTAMP;",0 Who are the top 5 donors in terms of total donation amounts to environmental projects in South America?,"CREATE TABLE donors (id INT, name TEXT, region TEXT); CREATE TABLE donations (id INT, donor_id INT, project_id INT, amount DECIMAL); CREATE TABLE projects (id INT, project_name TEXT, region TEXT); ","SELECT d.donor_id, d.name, SUM(d.amount) as total_donations FROM donors d INNER JOIN donations don ON d.id = don.donor_id INNER JOIN projects p ON don.project_id = p.id WHERE p.region = 'South America' AND p.project_name LIKE '%environment%' GROUP BY d.donor_id ORDER BY total_donations DESC LIMIT 5;","SELECT donors.name, SUM(donations.amount) as total_donations FROM donors INNER JOIN donations ON donors.id = donations.donor_id INNER JOIN projects ON donations.project_id = projects.id WHERE projects.region = 'South America' GROUP BY donors.name ORDER BY total_donations DESC LIMIT 5;",0 Which artifacts were found in 'SiteA'?,"CREATE TABLE SiteA (artifact_id INT, artifact_name VARCHAR(50), description TEXT); ",SELECT artifact_name FROM SiteA;,SELECT artifact_name FROM SiteA;,1 What is the nationality of a player from linköpings hc (se)?,"CREATE TABLE table_name_52 (nationality VARCHAR, club_team VARCHAR);","SELECT nationality FROM table_name_52 WHERE club_team = ""linköpings hc (se)"";","SELECT nationality FROM table_name_52 WHERE club_team = ""linköpings hc (se)"";",1 What is the crystal structure for the formula yba 2 cu 3 o 7?,"CREATE TABLE table_101336_1 (crystal_structure VARCHAR, formula VARCHAR);","SELECT crystal_structure FROM table_101336_1 WHERE formula = ""YBa 2 Cu 3 O 7"";","SELECT crystal_structure FROM table_101336_1 WHERE formula = ""Yba 2 Cu 3 O 7"";",0 how many spokesperson where in 2004,"CREATE TABLE table_1992924_3 (spokesperson VARCHAR, year_s_ VARCHAR);",SELECT COUNT(spokesperson) FROM table_1992924_3 WHERE year_s_ = 2004;,SELECT COUNT(spokesperson) FROM table_1992924_3 WHERE year_s_ = 2004;,1 How many volunteers signed up for each program in Q2 2022?,"CREATE TABLE programs (program_id INT, program_name TEXT); CREATE TABLE volunteers (volunteer_id INT, volunteer_name TEXT, program_id INT, volunteer_date DATE); ","SELECT p.program_name, COUNT(v.volunteer_id) as num_volunteers FROM volunteers v JOIN programs p ON v.program_id = p.program_id WHERE v.volunteer_date BETWEEN '2022-04-01' AND '2022-06-30' GROUP BY p.program_name;","SELECT p.program_name, COUNT(v.volunteer_id) as num_volunteers FROM programs p JOIN volunteers v ON p.program_id = v.program_id WHERE v.volunteer_date BETWEEN '2022-04-01' AND '2022-06-30' GROUP BY p.program_name;",0 What's the Serie A when the coppa italia was 5?,"CREATE TABLE table_name_79 (serie_a INTEGER, coppa_italia VARCHAR);",SELECT AVG(serie_a) FROM table_name_79 WHERE coppa_italia = 5;,SELECT SUM(serie_a) FROM table_name_79 WHERE coppa_italia = 5;,0 "Find all the songs whose name contains the word ""the"".",CREATE TABLE songs (title VARCHAR);,SELECT title FROM songs WHERE title LIKE '% the %';,SELECT title FROM songs WHERE title LIKE '%the%';,0 Who are the reporters for the year of 1984?,"CREATE TABLE table_22514845_4 (reporters VARCHAR, year VARCHAR);",SELECT reporters FROM table_22514845_4 WHERE year = 1984;,SELECT reporters FROM table_22514845_4 WHERE year = 1984;,1 How many points did Goole Town accumulate?,"CREATE TABLE table_17358515_1 (points_2 VARCHAR, team VARCHAR);","SELECT COUNT(points_2) FROM table_17358515_1 WHERE team = ""Goole Town"";","SELECT points_2 FROM table_17358515_1 WHERE team = ""Goole Town"";",0 What is the average attendance for literary events in the Mid-Atlantic region?,"CREATE TABLE literary_events (id INT, event_name VARCHAR(255), attendee_count INT); CREATE TABLE regions (id INT, region_name VARCHAR(255));",SELECT AVG(literary_events.attendee_count) as avg_attendance FROM literary_events INNER JOIN regions ON 1 = 1 WHERE regions.region_name = 'Mid-Atlantic';,SELECT AVG(attendee_count) FROM literary_events JOIN regions ON literary_events.region_name = regions.region_name WHERE regions.region_name = 'Mid-Atlantic';,0 What is the total CO2 emissions reduction from renewable energy projects in California since 2010?,"CREATE TABLE projects (id INT, state VARCHAR(255), name VARCHAR(255), co2_emissions_reduction INT, start_year INT); ",SELECT SUM(co2_emissions_reduction) FROM projects WHERE state = 'California' AND start_year <= 2010;,SELECT SUM(co2_emissions_reduction) FROM projects WHERE state = 'California' AND start_year >= 2010;,0 List of green investments by a specific Canadian fund,"CREATE TABLE fund_green_investments(fund_id INT, investment_id INT);",SELECT investment_id FROM fund_green_investments WHERE fund_id = 2;,"SELECT fund_id, investment_id FROM fund_green_investments WHERE fund_id = 1;",0 What is the total quantity of unsold inventory for each category?,"CREATE TABLE inventory (inventory_id INT, inventory_category TEXT, inventory_quantity INT);","SELECT inventory_category, SUM(inventory_quantity) AS total_unsold_inventory FROM inventory WHERE inventory_quantity > 0 GROUP BY inventory_category","SELECT inventory_category, SUM(inventory_quantity) FROM inventory GROUP BY inventory_category;",0 What is the maximum ticket price for the upcoming traditional dance festival?,"CREATE TABLE DanceFestival (ticketID INT, festivalDate DATE, ticketPrice DECIMAL(10,2)); ",SELECT MAX(ticketPrice) FROM DanceFestival WHERE festivalDate >= '2022-06-01';,SELECT MAX(ticketPrice) FROM DanceFestival WHERE festivalDate BETWEEN '2022-01-01' AND '2022-12-31';,0 What is the total number of vulnerabilities in the 'vulnerabilities' table?,"CREATE TABLE vulnerabilities (id INT, name VARCHAR(255), severity VARCHAR(50), description TEXT, affected_products TEXT, date_discovered DATE);",SELECT COUNT(*) FROM vulnerabilities;,SELECT COUNT(*) FROM vulnerabilities;,1 Show the number of unique achievements earned by each player,"CREATE TABLE PlayerAchievements (AchievementID INT, PlayerID INT, AchievementName VARCHAR(100), AchievementDate DATE); ","SELECT PlayerID, COUNT(DISTINCT AchievementName) FROM PlayerAchievements GROUP BY PlayerID;","SELECT PlayerID, COUNT(DISTINCT AchievementName) AS UniqueAchievements FROM PlayerAchievements GROUP BY PlayerID;",0 What is the name of the school that is in Valparaiso?,"CREATE TABLE table_name_37 (school VARCHAR, location VARCHAR);","SELECT school FROM table_name_37 WHERE location = ""valparaiso"";","SELECT school FROM table_name_37 WHERE location = ""valparaiso"";",1 Calculate the average CO2 emissions for each garment category in 2020.,"CREATE TABLE garment_manufacturing (garment_category VARCHAR(255), manufacturing_date DATE, co2_emissions INT);","SELECT garment_category, AVG(co2_emissions) FROM garment_manufacturing WHERE manufacturing_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY garment_category;","SELECT garment_category, AVG(co2_emissions) as avg_co2_emissions FROM garment_manufacturing WHERE manufacturing_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY garment_category;",0 What is the minimum caloric content of plant-based protein sources available in the Asian market?,"CREATE TABLE ProteinSources (source_id INT, protein_source VARCHAR(255), caloric_content INT, market VARCHAR(255)); ","SELECT MIN(caloric_content) FROM ProteinSources WHERE protein_source IN ('Tofu', 'Tempeh', 'Seitan') AND market = 'Asian';",SELECT MIN(caloric_content) FROM ProteinSources WHERE market = 'Asia';,0 Create a view named 'top_athlete_sports' that displays the top 2 sports with the highest average age of athletes in the 'athlete_wellbeing' table,"CREATE TABLE athlete_wellbeing (athlete_id INT, name VARCHAR(50), age INT, sport VARCHAR(50)); ","CREATE VIEW top_athlete_sports AS SELECT sport, AVG(age) as avg_age FROM athlete_wellbeing GROUP BY sport ORDER BY avg_age DESC LIMIT 2;","CREATE VIEW top_athlete_sports AS SELECT sport, AVG(age) AS avg_age FROM athlete_wellbeing GROUP BY sport ORDER BY avg_age DESC LIMIT 2;",0 List all Shariah-compliant financial products offered by institutions in the Middle East and their respective end dates.,"CREATE TABLE Institutions (InstitutionID INT, InstitutionName VARCHAR(100), Region VARCHAR(50)); CREATE TABLE Products (ProductID INT, InstitutionID INT, ProductName VARCHAR(100), EndDate DATE); ","SELECT Institutions.InstitutionName, Products.ProductName, Products.EndDate FROM Institutions INNER JOIN Products ON Institutions.InstitutionID = Products.InstitutionID WHERE Institutions.Region = 'Middle East';","SELECT Products.ProductName, Products.EndDate FROM Products INNER JOIN Institutions ON Products.InstitutionID = Institutions.InstitutionID WHERE Institutions.Region = 'Middle East' AND Products.EndDate IS NOT NULL;",0 When did Collingwood play?,"CREATE TABLE table_name_36 (date VARCHAR, home_team VARCHAR);","SELECT date FROM table_name_36 WHERE home_team = ""collingwood"";","SELECT date FROM table_name_36 WHERE home_team = ""collingwood"";",1 How many unique IP addresses attempted to log in during the last quarter?,"CREATE TABLE LoginIPs (id INT, login_date DATE, login_ip VARCHAR(255));","SELECT COUNT(DISTINCT login_ip) as unique_ips FROM LoginIPs WHERE login_date >= DATEADD(quarter, -1, GETDATE());","SELECT COUNT(DISTINCT login_ip) FROM LoginIPs WHERE login_date >= DATEADD(quarter, -1, GETDATE());",0 What year was E. Meyer the driver?,"CREATE TABLE table_name_9 (year VARCHAR, driver VARCHAR);","SELECT year FROM table_name_9 WHERE driver = ""e. meyer"";","SELECT year FROM table_name_9 WHERE driver = ""e. meyer"";",1 What is the total number of citizens registered to vote in each district in 'Voters' table?,"CREATE TABLE Voters (VoterID INT, District VARCHAR(20), Registered BOOLEAN); ","SELECT District, COUNT(*) AS TotalRegistered FROM Voters WHERE Registered = TRUE GROUP BY District","SELECT District, COUNT(*) FROM Voters WHERE Registered = TRUE GROUP BY District;",0 who are the awardees when the name of award is best agricultural film?,"CREATE TABLE table_25926120_7 (awardee_s_ VARCHAR, name_of_award VARCHAR);","SELECT awardee_s_ FROM table_25926120_7 WHERE name_of_award = ""Best Agricultural Film"";","SELECT awardee_s_ FROM table_25926120_7 WHERE name_of_award = ""Best Agricultural Film"";",1 How many total attendees were there for dance events in Mexico in 2021?,"CREATE TABLE attendance (id INT, event VARCHAR(50), country VARCHAR(50), year INT, attendees INT); ",SELECT SUM(attendees) FROM attendance WHERE event = 'Dance Event' AND country = 'Mexico' AND year = 2021;,SELECT SUM(attendees) FROM attendance WHERE event = 'Dance' AND country = 'Mexico' AND year = 2021;,0 Update the country of astronaut John Herrington to United States.,"CREATE TABLE Astronauts (id INT, name VARCHAR(255), country VARCHAR(255), age INT); ",UPDATE Astronauts SET country = 'United States' WHERE id = 4;,UPDATE Astronauts SET country = 'United States' WHERE name = 'John Herrington';,0 What are the top 3 broadband subscribers in each country with the most broadband subscribers?,"CREATE TABLE broadband_subscribers (subscriber_id INT, country VARCHAR(50), data_usage INT); CREATE TABLE country_codes (country VARCHAR(50), code CHAR(2)); ","SELECT bc1.country, bc1.subscriber_id, bc1.data_usage FROM broadband_subscribers bc1 JOIN ( SELECT country, MAX(data_usage) AS max_data_usage FROM broadband_subscribers GROUP BY country LIMIT 3 ) bc2 ON bc1.country = bc2.country AND bc1.data_usage = bc2.max_data_usage ORDER BY bc1.country;","SELECT bs.country, COUNT(bs.subscriber_id) as num_subscribers FROM broadband_subscribers bs JOIN country_codes cc ON bs.country = cc.country GROUP BY bs.country ORDER BY num_subscribers DESC LIMIT 3;",0 The singular word of hand uses what plural word?,"CREATE TABLE table_name_20 (plural_word VARCHAR, singular_word VARCHAR);","SELECT plural_word FROM table_name_20 WHERE singular_word = ""hand"";","SELECT plural_word FROM table_name_20 WHERE singular_word = ""hand"";",1 List the cultural competency training topics for Community Health Workers and their respective completion dates.,"CREATE TABLE Community_Health_Workers (Worker_ID INT, Name VARCHAR(255), Training_Topic VARCHAR(255), Completion_Date DATE); ","SELECT Training_Topic, Completion_Date FROM Community_Health_Workers WHERE Training_Topic LIKE '%Cultural Competency%';","SELECT Training_Topic, Completion_Date FROM Community_Health_Workers;",0 Which player is from England?,"CREATE TABLE table_name_16 (player VARCHAR, country VARCHAR);","SELECT player FROM table_name_16 WHERE country = ""england"";","SELECT player FROM table_name_16 WHERE country = ""england"";",1 "What is the average number of goals scored per game by each soccer player in the last season, broken down by team?","CREATE TABLE games (id INT, game_date DATE, team VARCHAR(20)); CREATE TABLE goals (id INT, game_id INT, player VARCHAR(20), goals INT);","SELECT team, player, AVG(goals) FROM goals JOIN games ON goals.game_id = games.id WHERE games.game_date >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR) GROUP BY team, player;","SELECT g.team, AVG(g.goals) as avg_goals_per_game FROM games g JOIN goals g ON g.game_id = g.game_id WHERE g.game_date >= DATEADD(year, -1, GETDATE()) GROUP BY g.team;",0 Show the spacecraft involved in research projects that have not yet started and their respective principal investigators.,"CREATE TABLE Spacecraft (id INT PRIMARY KEY, name VARCHAR(100), manufacturer VARCHAR(100), launch_date DATE); CREATE TABLE Research_Projects (id INT PRIMARY KEY, name VARCHAR(100), field VARCHAR(100), start_date DATE, end_date DATE, principal_investigator_id INT, FOREIGN KEY (principal_investigator_id) REFERENCES Astronauts(id)); CREATE TABLE Astronauts (id INT PRIMARY KEY, name VARCHAR(100), age INT, country VARCHAR(100)); ","SELECT s.name AS spacecraft_name, r.name AS research_project, a.name AS principal_investigator FROM Spacecraft s INNER JOIN Research_Projects r ON s.id = r.id INNER JOIN Astronauts a ON r.principal_investigator_id = a.id WHERE r.start_date > CURDATE();","SELECT Spacecraft.name, Principal Investigators.name FROM Spacecraft INNER JOIN Research_Projects ON Spacecraft.id = Research_Projects.id INNER JOIN Astronauts ON Research_Projects.principal_investigator_id = Astronauts.id WHERE Research_Projects.start_date IS NULL;",0 Insert a new record into the 'operators' table for an operator named 'Operator E' based in the United Kingdom.,"CREATE TABLE operators (operator_id INT, operator_name TEXT, country TEXT);","INSERT INTO operators (operator_name, country) VALUES ('Operator E', 'United Kingdom');","INSERT INTO operators (operator_id, operator_name, country) VALUES (1, 'Operator E', 'United Kingdom');",0 What position is the player who went to Regina? ,"CREATE TABLE table_20170644_3 (position VARCHAR, college VARCHAR);","SELECT position FROM table_20170644_3 WHERE college = ""Regina"";","SELECT position FROM table_20170644_3 WHERE college = ""Regina"";",1 "List all the suppliers providing eggs, their country, and the number of eggs supplied per month","CREATE TABLE suppliers (supplier_id INT, supplier_name TEXT, country TEXT); CREATE TABLE supplies (supply_id INT, supply_date DATE, quantity INT, supplier_id INT, produce_name TEXT); ","SELECT suppliers.supplier_name, suppliers.country, MONTH(supplies.supply_date), AVG(supplies.quantity) FROM suppliers JOIN supplies ON suppliers.supplier_id = supplies.supplier_id WHERE produce_name = 'Eggs' GROUP BY suppliers.supplier_name, suppliers.country, MONTH(supplies.supply_date);","SELECT s.supplier_name, s.country, DATE_FORMAT(s.supply_date, '%Y-%m') AS month, COUNT(s.supplier_id) AS eggs_supplied FROM suppliers s JOIN supplies s ON s.supplier_id = s.supplier_id GROUP BY s.supplier_name, s.country, DATE_FORMAT(s.supply_date, '%Y-%m') AS eggs_supplied FROM suppliers s JOIN supplies s ON s.supplier_id = s.supplier_id GROUP BY s.supplier_name;",0 What was the result of the event against Nate Mohr?,"CREATE TABLE table_name_57 (res VARCHAR, opponent VARCHAR);","SELECT res FROM table_name_57 WHERE opponent = ""nate mohr"";","SELECT res FROM table_name_57 WHERE opponent = ""nate mohr"";",1 Find menu items that are not sustainable.,"CREATE TABLE Menu (menu_id INT, name VARCHAR(255), description TEXT, sustainable BOOLEAN); ",SELECT name FROM Menu WHERE sustainable = FALSE;,SELECT name FROM Menu WHERE sustainable = false;,0 Decrease the price of all vegan menu items by 5%,"CREATE TABLE menu_items (item_id INT, item_name VARCHAR(50), is_vegan BOOLEAN, price DECIMAL(5,2)); ",UPDATE menu_items SET price = price * 0.95 WHERE is_vegan = true;,UPDATE menu_items SET price = price * 1.05 WHERE is_vegan = true;,0 "Which is the highest total at rank 6, bronze 2, and gold larger than 0?","CREATE TABLE table_name_74 (total INTEGER, gold VARCHAR, rank VARCHAR, bronze VARCHAR);",SELECT MAX(total) FROM table_name_74 WHERE rank = 6 AND bronze = 2 AND gold > 0;,SELECT MAX(total) FROM table_name_74 WHERE rank = 6 AND bronze = 2 AND gold > 0;,1 What is the Nickname in the Competition of 1982-1994?,"CREATE TABLE table_name_76 (nickname VARCHAR, years_in_competition VARCHAR);","SELECT nickname FROM table_name_76 WHERE years_in_competition = ""1982-1994"";","SELECT nickname FROM table_name_76 WHERE years_in_competition = ""1982-1994"";",1 Find the average number of staff working for the museums that were open before 2009.,"CREATE TABLE museum (num_of_staff INTEGER, open_year INTEGER);",SELECT AVG(num_of_staff) FROM museum WHERE open_year < 2009;,SELECT AVG(num_of_staff) FROM museum WHERE open_year 2009;,0 Who is the coach of the 2012 Gold Coast Titans season?,"CREATE TABLE table_name_4 (coach VARCHAR, details VARCHAR);","SELECT coach FROM table_name_4 WHERE details = ""2012 gold coast titans season"";","SELECT coach FROM table_name_4 WHERE details = ""2012 gold coast titans season"";",1 Find the number of products that each consumer bought from unethical suppliers?,"CREATE TABLE consumers (consumer_id INT, consumer_name TEXT); CREATE TABLE purchases (purchase_id INT, consumer_id INT, supplier_id INT, product_id INT, quantity INT); CREATE TABLE suppliers (supplier_id INT, supplier_name TEXT, labor_practice TEXT);","SELECT consumers.consumer_name, COUNT(DISTINCT purchases.product_id) FROM consumers JOIN purchases ON consumers.consumer_id = purchases.consumer_id JOIN suppliers ON purchases.supplier_id = suppliers.supplier_id WHERE suppliers.labor_practice = 'Unethical' GROUP BY consumers.consumer_id;","SELECT c.consumer_name, COUNT(p.purchase_id) FROM consumers c JOIN purchases p ON c.consumer_id = p.consumer_id JOIN suppliers s ON p.supplier_id = s.supplier_id WHERE s.labor_practice = 'unethical' GROUP BY c.consumer_name;",0 Which Artist has a Record label of vertigo?,"CREATE TABLE table_name_86 (artist VARCHAR, record_label VARCHAR);","SELECT artist FROM table_name_86 WHERE record_label = ""vertigo"";","SELECT artist FROM table_name_86 WHERE record_label = ""vertigo"";",1 "What is the Retail name with a Digital/analog signal with analog, and a Chipset based on with radeon 9600?","CREATE TABLE table_name_15 (retail_name VARCHAR, digital_analog_signal VARCHAR, chipset_based_on VARCHAR);","SELECT retail_name FROM table_name_15 WHERE digital_analog_signal = ""analog"" AND chipset_based_on = ""radeon 9600"";","SELECT retail_name FROM table_name_15 WHERE digital_analog_signal = ""analog"" AND chipset_based_on = ""radeon 9600"";",1 "Who is the republican Jon Huntsman that was administered June 19, 2008?","CREATE TABLE table_name_76 (republican VARCHAR, dates_administered VARCHAR);","SELECT republican AS :_jon_huntsman FROM table_name_76 WHERE dates_administered = ""june 19, 2008"";","SELECT republican FROM table_name_76 WHERE dates_administered = ""june 19, 2008"";",0 How many POS when the average is 1.8529?,"CREATE TABLE table_25887826_17 (pos INTEGER, avg VARCHAR);","SELECT MAX(pos) FROM table_25887826_17 WHERE avg = ""1.8529"";","SELECT SUM(pos) FROM table_25887826_17 WHERE avg = ""1.8525"";",0 What was the average number of tourists visiting India in 2018 and 2019?,"CREATE TABLE tourists (id INT, country VARCHAR(50), visitors INT, year INT); ","SELECT AVG(visitors) FROM tourists WHERE country = 'India' AND year IN (2018, 2019);","SELECT AVG(visitors) FROM tourists WHERE country = 'India' AND year IN (2018, 2019);",1 Name the high assists for may 21,"CREATE TABLE table_17622423_12 (high_assists VARCHAR, date VARCHAR);","SELECT high_assists FROM table_17622423_12 WHERE date = ""May 21"";","SELECT high_assists FROM table_17622423_12 WHERE date = ""May 21"";",1 Delete the menu_items table,"CREATE TABLE menu_items (menu_item_id INT, name VARCHAR(50), category VARCHAR(50), price DECIMAL(5,2)); ",DROP TABLE menu_items;,DELETE FROM menu_items;,0 "What is High Rebounds, when Score is 61-59?","CREATE TABLE table_name_6 (high_rebounds VARCHAR, score VARCHAR);","SELECT high_rebounds FROM table_name_6 WHERE score = ""61-59"";","SELECT high_rebounds FROM table_name_6 WHERE score = ""61-59"";",1 What is the average weight of shipments from Canada?,"CREATE TABLE Shipments (id INT, weight FLOAT, origin VARCHAR(20)); ",SELECT AVG(weight) FROM Shipments WHERE origin = 'Canada',SELECT AVG(weight) FROM Shipments WHERE origin = 'Canada';,0 Which college/junior/club team did the player play on that played for the Buffalo Sabres in NHL?,"CREATE TABLE table_1473672_3 (college_junior_club_team VARCHAR, nhl_team VARCHAR);","SELECT college_junior_club_team FROM table_1473672_3 WHERE nhl_team = ""Buffalo Sabres"";","SELECT college_junior_club_team FROM table_1473672_3 WHERE nhl_team = ""Buffalo Sabres"";",1 In which location was the method decision (split)?,"CREATE TABLE table_name_26 (location VARCHAR, method VARCHAR);","SELECT location FROM table_name_26 WHERE method = ""decision (split)"";","SELECT location FROM table_name_26 WHERE method = ""decision (split)"";",1 Which REEs were produced in Australia in 2020?,"CREATE TABLE production (country VARCHAR(255), REE VARCHAR(255), amount INT, year INT); ",SELECT DISTINCT REE FROM production WHERE country = 'Australia' AND year = 2020;,SELECT REE FROM production WHERE country = 'Australia' AND year = 2020;,0 On what day was the tournament in Alabama?,"CREATE TABLE table_15346009_1 (date VARCHAR, location VARCHAR);","SELECT date FROM table_15346009_1 WHERE location = ""Alabama"";","SELECT date FROM table_15346009_1 WHERE location = ""Alabama"";",1 "what is the launched date when the builder is john brown, clydebank?","CREATE TABLE table_name_57 (launched VARCHAR, builder VARCHAR);","SELECT launched FROM table_name_57 WHERE builder = ""john brown, clydebank"";","SELECT launched FROM table_name_57 WHERE builder = ""john brown, clydebank"";",1 Find the unique number of destinations with travel advisories issued in 2022 and 2023.,"CREATE TABLE TravelAdvisories (id INT, destination VARCHAR(50), issue_year INT, PRIMARY KEY(id)); ","SELECT COUNT(DISTINCT destination) FROM TravelAdvisories WHERE issue_year IN (2022, 2023);","SELECT COUNT(DISTINCT destination) FROM TravelAdvisories WHERE issue_year IN (2022, 2023);",1 "How much Conceded has Wins smaller than 3, and Points larger than 11?","CREATE TABLE table_name_77 (conceded VARCHAR, wins VARCHAR, points VARCHAR);",SELECT COUNT(conceded) FROM table_name_77 WHERE wins < 3 AND points > 11;,SELECT COUNT(conceded) FROM table_name_77 WHERE wins 3 AND points > 11;,0 List the names of the top 5 impact investors in the European Union by total investment.,"CREATE TABLE impact_investors (id INT, name TEXT, region TEXT, investment FLOAT); ",SELECT name FROM impact_investors WHERE region = 'European Union' ORDER BY investment DESC LIMIT 5;,"SELECT name, SUM(investment) as total_investment FROM impact_investors WHERE region = 'European Union' GROUP BY name ORDER BY total_investment DESC LIMIT 5;",0 Find posts that are liked by users from the 'music' page but not interacted with by users from the 'tech' page.,"CREATE TABLE users (id INT, name VARCHAR(255)); CREATE TABLE posts (id INT, user_id INT, page_name VARCHAR(255), content TEXT); CREATE TABLE likes (id INT, user_id INT, post_id INT); CREATE TABLE hashtags (id INT, post_id INT, tag VARCHAR(255));","SELECT posts.id, posts.content FROM posts JOIN likes ON posts.id = likes.post_id JOIN (SELECT user_id FROM users WHERE page_name = 'music') AS music_users ON likes.user_id = music_users.user_id LEFT JOIN (SELECT user_id FROM users WHERE page_name = 'tech') AS tech_users ON likes.user_id = tech_users.user_id WHERE tech_users.user_id IS NULL;",SELECT p.content FROM posts p JOIN likes l ON p.user_id = l.user_id JOIN hashtags h ON l.post_id = h.post_id WHERE l.page_name ='music' AND h.tag IS NULL;,0 Insert a new rural infrastructure project in Bangladesh that started on 2022-01-15 with a budget of 60000.00 USD.,"CREATE TABLE infrastructure_projects (id INT, project_id INT, country VARCHAR(50), project VARCHAR(50), budget DECIMAL(10,2), start_date DATE, end_date DATE); ","INSERT INTO infrastructure_projects (project_id, country, project, budget, start_date, end_date) VALUES (8002, 'Bangladesh', 'Solar Powered Irrigation', 70000.00, '2022-07-01', '2024-06-30');","INSERT INTO infrastructure_projects (project_id, country, project, budget, start_date, end_date) VALUES ('Bangladesh', '2022-01-15', 60000.00);",0 "What is the total number of First Elected that has counties represented of Anne Arundel, District of 30, and a Ways and Means Committee?","CREATE TABLE table_name_22 (first_elected VARCHAR, committee VARCHAR, counties_represented VARCHAR, district VARCHAR);","SELECT COUNT(first_elected) FROM table_name_22 WHERE counties_represented = ""anne arundel"" AND district = ""30"" AND committee = ""ways and means"";","SELECT COUNT(first_elected) FROM table_name_22 WHERE counties_represented = ""anne arundel"" AND district = 30 AND committee = ""ways and means"";",0 Find the maximum financial wellbeing score in Oceania for individuals aged 30-40.,"CREATE TABLE financial_wellbeing (id INT, person_id INT, age INT, country VARCHAR(255), score FLOAT); ",SELECT MAX(score) FROM financial_wellbeing WHERE country LIKE 'Oceania' AND age BETWEEN 30 AND 40;,SELECT MAX(score) FROM financial_wellbeing WHERE country = 'Oceania' AND age BETWEEN 30 AND 40;,0 What is the production code for season episode 8?,"CREATE TABLE table_13505192_3 (production_code INTEGER, season_number VARCHAR);",SELECT MIN(production_code) FROM table_13505192_3 WHERE season_number = 8;,SELECT MAX(production_code) FROM table_13505192_3 WHERE season_number = 8;,0 Show the names and regions of all protected species with an ID greater than 100.,"CREATE TABLE ProtectedSpecies(species_id INT, species_name TEXT, region TEXT); ","SELECT species_name, region FROM ProtectedSpecies WHERE species_id > 100;","SELECT species_name, region FROM ProtectedSpecies WHERE species_id > 100;",1 What is the average number of points for an Offenhauser L4 engine with a Trevis chassis?,"CREATE TABLE table_name_93 (points INTEGER, engine VARCHAR, chassis VARCHAR);","SELECT AVG(points) FROM table_name_93 WHERE engine = ""offenhauser l4"" AND chassis = ""trevis"";","SELECT AVG(points) FROM table_name_93 WHERE engine = ""offenhauser l4"" AND chassis = ""trevis"";",1 "Display fan demographics, including age, gender, and location","CREATE TABLE fan_demographics (fan_id INT, age INT, gender VARCHAR(10), location VARCHAR(50)); ","SELECT age, gender, location FROM fan_demographics;","SELECT fan_id, age, gender, location FROM fan_demographics;",0 List the rural infrastructure projects in Zambia that started in 2016.,"CREATE TABLE RuralInfrastructure (id INT, country VARCHAR(50), project VARCHAR(50), start_date DATE); ",SELECT project FROM RuralInfrastructure WHERE country = 'Zambia' AND start_date >= '2016-01-01' AND start_date < '2017-01-01';,SELECT project FROM RuralInfrastructure WHERE country = 'Zambia' AND start_date >= '2016-01-01';,0 "What is the maximum production value (in USD) of organic farms in the 'agroecology' schema, broken down by state?","CREATE SCHEMA agroecology;CREATE TABLE organic_farms (id INT, state VARCHAR(50), production_value INT);","SELECT state, MAX(production_value) FROM agroecology.organic_farms GROUP BY state;","SELECT state, MAX(production_value) FROM agroecology.organic_farms GROUP BY state;",1 When was the Albi circuit race driven? ,"CREATE TABLE table_1140119_5 (date VARCHAR, circuit VARCHAR);","SELECT date FROM table_1140119_5 WHERE circuit = ""Albi"";","SELECT date FROM table_1140119_5 WHERE circuit = ""Albi"";",1 "How many counties have people before profit as the party, and a borough greater than 0?","CREATE TABLE table_name_16 (county INTEGER, party VARCHAR, borough VARCHAR);","SELECT SUM(county) FROM table_name_16 WHERE party = ""people before profit"" AND borough > 0;","SELECT SUM(county) FROM table_name_16 WHERE party = ""people before profit"" AND borough > 0;",1 Name the surface for australian open for winner,"CREATE TABLE table_2009095_2 (surface VARCHAR, championship VARCHAR, outcome VARCHAR);","SELECT surface FROM table_2009095_2 WHERE championship = ""Australian Open"" AND outcome = ""Winner"";","SELECT surface FROM table_2009095_2 WHERE championship = ""Australian Open"" AND outcome = ""Winner"";",1 Get the top 5 hotels with the highest user ratings in the city of Tokyo,"CREATE TABLE hotel_ratings (rating_id INT, hotel_id INT, city TEXT, user_rating FLOAT);","SELECT hotel_id, AVG(user_rating) as avg_rating FROM hotel_ratings WHERE city = 'Tokyo' GROUP BY hotel_id ORDER BY avg_rating DESC LIMIT 5;","SELECT hotel_id, user_rating FROM hotel_ratings WHERE city = 'Tokyo' ORDER BY user_rating DESC LIMIT 5;",0 "What is the talent of the contestant from Lexington, SC?","CREATE TABLE table_name_82 (talent VARCHAR, hometown VARCHAR);","SELECT talent FROM table_name_82 WHERE hometown = ""lexington, sc"";","SELECT talent FROM table_name_82 WHERE hometown = ""lexington, sc"";",1 List all tech companies in 'tech_companies' table located in 'California'.,"CREATE TABLE tech_companies (company VARCHAR(50), department VARCHAR(50), employee_name VARCHAR(50), salary INTEGER, company_location VARCHAR(50));",SELECT company FROM tech_companies WHERE company_location = 'California';,SELECT company FROM tech_companies WHERE company_location = 'California';,1 What is the sum of points in 2010 when the driver had more than 14 races and an F.L. of less than 0?,"CREATE TABLE table_name_8 (points INTEGER, fl VARCHAR, year VARCHAR, races VARCHAR);",SELECT SUM(points) FROM table_name_8 WHERE year = 2010 AND races > 14 AND fl < 0;,SELECT SUM(points) FROM table_name_8 WHERE year = 2010 AND races > 14 AND fl 0;,0 What is the maximum water salinity (in ppt) in fish farms located in Europe?,"CREATE TABLE fish_farms (id INT, name VARCHAR(255), region VARCHAR(255), water_salinity FLOAT); ",SELECT MAX(water_salinity) FROM fish_farms WHERE region = 'Europe';,SELECT MAX(water_salinity) FROM fish_farms WHERE region = 'Europe';,1 "What is the total carbon emissions and corresponding carbon price from the carbon_emissions and carbon_prices tables, where the region is 'CA' and the year is 2021?","CREATE TABLE carbon_prices (id INT, region VARCHAR(255), price FLOAT, start_date DATE, end_date DATE); CREATE TABLE carbon_emissions (id INT, facility_id INT, region VARCHAR(255), year INT, tonnes_co2 FLOAT); ","SELECT c.region, e.tonnes_co2, c.price FROM carbon_prices c INNER JOIN carbon_emissions e ON c.region = e.region WHERE c.region = 'CA' AND e.year = 2021;","SELECT SUM(carbon_emissions.tonnes_co2) as total_emissions, SUM(carbon_prices.price) as total_price FROM carbon_prices INNER JOIN carbon_emissions ON carbon_prices.region = carbon_emissions.region WHERE carbon_prices.region = 'CA' AND carbon_emissions.year = 2021 GROUP BY carbon_prices.region;",0 What is the adoption rate of electric vehicles per country in the electric_vehicle_adoption table?,"CREATE TABLE electric_vehicle_adoption (country VARCHAR(50), adoption_rate FLOAT);","SELECT country, adoption_rate FROM electric_vehicle_adoption;","SELECT country, adoption_rate FROM electric_vehicle_adoption;",1 "What was the Venue on November 14, 2007?","CREATE TABLE table_name_17 (venue VARCHAR, date VARCHAR);","SELECT venue FROM table_name_17 WHERE date = ""november 14, 2007"";","SELECT venue FROM table_name_17 WHERE date = ""november 14, 2007"";",1 What is the maximum depth recorded for any marine species?,"CREATE TABLE marine_species (name VARCHAR(255), max_depth FLOAT);",SELECT max_depth FROM marine_species ORDER BY max_depth DESC LIMIT 1;,SELECT MAX(max_depth) FROM marine_species;,0 What is the total of lane(s) for swimmers from Sweden with a 50m split of faster than 26.25?,"CREATE TABLE table_name_24 (lane INTEGER, nationality VARCHAR, split__50m_ VARCHAR);","SELECT SUM(lane) FROM table_name_24 WHERE nationality = ""sweden"" AND split__50m_ < 26.25;","SELECT SUM(lane) FROM table_name_24 WHERE nationality = ""sweden"" AND split__50m_ > 26.25;",0 What is the attendance with a 45 tie no.?,"CREATE TABLE table_name_73 (attendance VARCHAR, tie_no VARCHAR);","SELECT attendance FROM table_name_73 WHERE tie_no = ""45"";","SELECT attendance FROM table_name_73 WHERE tie_no = ""45"";",1 Update the number of trucks for the 'DEF' warehouse to 5,"CREATE TABLE warehouse (id INT PRIMARY KEY, name VARCHAR(255), num_trucks INT); ",UPDATE warehouse SET num_trucks = 5 WHERE name = 'DEF';,UPDATE warehouse SET num_trucks = 5 WHERE name = 'DEF';,1 "What is the average confidence score for explainable AI models in the US, grouped by state?","CREATE TABLE ExplainableAI (model_name TEXT, confidence FLOAT, country TEXT); ","SELECT country, AVG(confidence) FROM ExplainableAI WHERE country = 'USA' GROUP BY country;","SELECT country, AVG(confidence) FROM ExplainableAI WHERE country = 'USA' GROUP BY country;",1 What was the total revenue for the strain Blue Dream in the state of Washington in the year 2019?,"CREATE TABLE sales (id INT, strain VARCHAR(50), state VARCHAR(50), year INT, revenue INT); ",SELECT SUM(revenue) FROM sales WHERE strain = 'Blue Dream' AND state = 'Washington' AND year = 2019;,SELECT SUM(revenue) FROM sales WHERE strain = 'Blue Dream' AND state = 'Washington' AND year = 2019;,1 Find the total number of safety tests conducted per quarter,"CREATE TABLE safety_tests (id INT, test_date DATE); ","SELECT EXTRACT(QUARTER FROM test_date) as quarter, COUNT(*) as tests_per_quarter FROM safety_tests GROUP BY quarter;","SELECT DATE_FORMAT(test_date, '%Y-%m') as quarter, COUNT(*) as total_tests FROM safety_tests GROUP BY quarter;",0 What was the total sales revenue for each drug in 2020?,"CREATE TABLE drug_sales (drug_name TEXT, quantity INTEGER, sale_price NUMERIC(10, 2), year INTEGER); ","SELECT drug_name, SUM(quantity * sale_price) as total_sales_revenue FROM drug_sales WHERE year = 2020 GROUP BY drug_name;","SELECT drug_name, SUM(quantity * sale_price) FROM drug_sales WHERE year = 2020 GROUP BY drug_name;",0 "What is the average budget allocated for healthcare programs in the ""GovernmentBudget"" table, for each department, where the budget was over $200,000?","CREATE TABLE GovernmentBudget (id INT, department VARCHAR(50), program VARCHAR(50), budget DECIMAL(10,2)); ","SELECT department, AVG(budget) as avg_budget FROM GovernmentBudget WHERE budget > 200000 AND program LIKE '%Healthcare%' GROUP BY department;","SELECT department, AVG(budget) as avg_budget FROM GovernmentBudget WHERE program = 'Healthcare' AND budget > 200000 GROUP BY department;",0 "Identify the count of unique research grants and their respective amounts, received by each graduate student in descending order of total amount received.","CREATE TABLE grad_students (id INT, name VARCHAR(50));CREATE TABLE research_grants (id INT, grant_id INT, amount INT, student_id INT);","SELECT rg.student_id, COUNT(DISTINCT rg.grant_id) AS num_grants, SUM(rg.amount) AS total_amount FROM research_grants rg GROUP BY rg.student_id ORDER BY total_amount DESC;","SELECT gs.name, COUNT(rg.id) as unique_grants, SUM(rg.amount) as total_amount FROM grad_students gs JOIN research_grants rg ON gs.id = rg.grant_id GROUP BY gs.id ORDER BY total_amount DESC;",0 What was the lowest attendance at Windy Hill?,"CREATE TABLE table_name_77 (crowd INTEGER, venue VARCHAR);","SELECT MIN(crowd) FROM table_name_77 WHERE venue = ""windy hill"";","SELECT MIN(crowd) FROM table_name_77 WHERE venue = ""windy hill"";",1 What is the average water usage in Texas over the last 5 years?,"CREATE TABLE water_usage (state VARCHAR(20), year INT, volume_m3 INT); ",SELECT AVG(volume_m3) FROM water_usage WHERE state = 'Texas' AND year BETWEEN 2017 AND 2021;,SELECT AVG(volume_m3) FROM water_usage WHERE state = 'Texas' AND year BETWEEN 2019 AND 2021;,0 "Find the average water consumption for each mine, excluding mines with missing data.","CREATE TABLE mine (name VARCHAR(255), location VARCHAR(255)); CREATE TABLE water_consumption (mine_name VARCHAR(255), quantity INT);","SELECT mine_name, AVG(quantity) AS avg_water_consumption FROM water_consumption GROUP BY mine_name HAVING COUNT(*) = 2;","SELECT mine.name, AVG(water_consumption.quantity) as avg_water_consumption FROM mine INNER JOIN water_consumption ON mine.name = water_consumption.mine_name WHERE water_consumption.quantity IS NULL GROUP BY mine.name;",0 Name the frequency with on-air ID of 1way fm,"CREATE TABLE table_name_18 (frequency VARCHAR, on_air_id VARCHAR);","SELECT frequency FROM table_name_18 WHERE on_air_id = ""1way fm"";","SELECT frequency FROM table_name_18 WHERE on_air_id = ""1way fm"";",1 What was the highest lap count for Walker Racing with a grid larger than 15?,"CREATE TABLE table_name_34 (laps INTEGER, team VARCHAR, grid VARCHAR);","SELECT MAX(laps) FROM table_name_34 WHERE team = ""walker racing"" AND grid > 15;","SELECT MAX(laps) FROM table_name_34 WHERE team = ""walker racing"" AND grid > 15;",1 Which astronauts are part of a space mission with a manufacturer from Japan or Russia and have conducted astrobiology experiments?,"CREATE TABLE Astronauts (Name TEXT, Age INT, Gender TEXT, Nationality TEXT); CREATE TABLE Spacecraft (Name TEXT, Manufacturer TEXT, LaunchDate DATE); CREATE TABLE Mission_Astronauts (Astronaut TEXT, Spacecraft TEXT); CREATE TABLE Research_Data (Astronaut TEXT, Experiment TEXT, Result TEXT); ","SELECT Astronaut FROM Mission_Astronauts WHERE Manufacturer IN ('JAXA', 'Roscosmos') INTERSECT SELECT Astronaut FROM Research_Data WHERE Experiment = 'Astrobiology';","SELECT Astronauts.Name FROM Astronauts INNER JOIN Mission_Astronauts ON Astronauts.Name = Mission_Astronauts.Astronaut INNER JOIN Research_Data ON Astronauts.Name = Research_Data.Astronaut WHERE Astronauts.Nationality IN ('Japan', 'Russia') AND Spacecraft.Manufacturer IN ('Japan', 'Russia');",0 Which region has the highest total revenue?,"CREATE TABLE sales (game_id INT, region VARCHAR(50), revenue FLOAT); CREATE TABLE games (id INT, name VARCHAR(100), genre VARCHAR(50), revenue FLOAT);","SELECT region, SUM(sales.revenue) as total_revenue FROM sales JOIN games ON sales.game_id = games.id GROUP BY region ORDER BY total_revenue DESC LIMIT 1;","SELECT s.region, SUM(s.revenue) as total_revenue FROM sales s JOIN games g ON s.game_id = g.id GROUP BY s.region ORDER BY total_revenue DESC LIMIT 1;",0 Delete all records in the satellite_deployment table where satellite_type is 'LEO' and country is 'USA',"CREATE TABLE satellite_deployment (id INT, satellite_name VARCHAR(255), satellite_type VARCHAR(255), country VARCHAR(255), launch_date DATE);",DELETE FROM satellite_deployment WHERE satellite_type = 'LEO' AND country = 'USA';,DELETE FROM satellite_deployment WHERE satellite_type = 'LEO' AND country = 'USA';,1 Name the name for norway nationality,"CREATE TABLE table_25826954_7 (name VARCHAR, nationality VARCHAR);","SELECT name FROM table_25826954_7 WHERE nationality = ""Norway"";","SELECT name FROM table_25826954_7 WHERE nationality = ""Norway"";",1 What is the average cost of space missions for each country?,"CREATE TABLE space_missions (id INT, mission_name VARCHAR(255), country VARCHAR(255), cost FLOAT); ","SELECT country, AVG(cost) as avg_cost FROM space_missions GROUP BY country;","SELECT country, AVG(cost) FROM space_missions GROUP BY country;",0 Which of the top-10s has a starts value of 14?,"CREATE TABLE table_name_53 (top_10s INTEGER, starts VARCHAR);",SELECT MAX(top_10s) FROM table_name_53 WHERE starts = 14;,SELECT SUM(top_10s) FROM table_name_53 WHERE starts = 14;,0 Name the language for sopachuy 10,"CREATE TABLE table_2509350_3 (language VARCHAR, sopachuy_municipality VARCHAR);",SELECT language FROM table_2509350_3 WHERE sopachuy_municipality = 10;,SELECT language FROM table_2509350_3 WHERE sopachuy_municipality = 10;,1 What was date when the time was 2:26 and the location was Riverfront Stadium?,"CREATE TABLE table_name_62 (date VARCHAR, time VARCHAR, location VARCHAR);","SELECT date FROM table_name_62 WHERE time = ""2:26"" AND location = ""riverfront stadium"";","SELECT date FROM table_name_62 WHERE time = ""2:26"" AND location = ""riverfront stadium"";",1 What is the average age of patients with diabetes in the Northern rural areas of Canada?,"CREATE TABLE patients (id INT, age INT, has_diabetes BOOLEAN); CREATE TABLE locations (id INT, region VARCHAR, is_rural BOOLEAN); ",SELECT AVG(patients.age) FROM patients INNER JOIN locations ON patients.id = locations.id WHERE patients.has_diabetes = true AND locations.region = 'Northern';,SELECT AVG(patients.age) FROM patients INNER JOIN locations ON patients.id = locations.id WHERE patients.has_diabetes = true AND locations.is_rural = true AND locations.region = 'Northern';,0 What's the status on 16/12/1995?,"CREATE TABLE table_name_35 (status VARCHAR, date VARCHAR);","SELECT status FROM table_name_35 WHERE date = ""16/12/1995"";","SELECT status FROM table_name_35 WHERE date = ""16/12/1995"";",1 How many Pole Positions were there on 30 March?,"CREATE TABLE table_25213146_2 (pole_position VARCHAR, date VARCHAR);","SELECT COUNT(pole_position) FROM table_25213146_2 WHERE date = ""30 March"";","SELECT COUNT(pole_position) FROM table_25213146_2 WHERE date = ""30 March"";",1 Identify the suppliers who supply to customers in the same city.,"CREATE TABLE Customers (CustomerID INT, CustomerName VARCHAR(50), WarehouseID INT, City VARCHAR(50), State VARCHAR(50)); CREATE TABLE Suppliers (SupplierID INT, SupplierName VARCHAR(50), WarehouseID INT, City VARCHAR(50), State VARCHAR(50)); CREATE TABLE CustomerSupplier (CustomerID INT, SupplierID INT); ","SELECT C.CustomerName, S.SupplierName FROM Customers C JOIN Suppliers S ON C.City = S.City WHERE EXISTS (SELECT * FROM CustomerSupplier CS WHERE CS.CustomerID = C.CustomerID AND CS.SupplierID = S.SupplierID);",SELECT Suppliers.SupplierName FROM Suppliers INNER JOIN CustomerSupplier ON Suppliers.SupplierID = CustomerSupplier.SupplierID INNER JOIN Customers ON CustomerSupplier.CustomerID = Customers.CustomerID INNER JOIN Suppliers ON Suppliers.SupplierID = Suppliers.SupplierID INNER JOIN CustomerSupplier ON Suppliers.SupplierID = CustomerSupplier.SupplierID WHERE Customers.City = 'City';,0 List all astronauts who have been on a spacewalk.,"CREATE TABLE spacewalks (spacewalk_id INT, astronaut_id INT, duration INT); CREATE TABLE astronauts (astronaut_id INT, name VARCHAR(50), age INT, nationality VARCHAR(50));",SELECT a.name FROM astronauts a JOIN spacewalks s ON a.astronaut_id = s.astronaut_id;,SELECT astronauts.name FROM astronauts INNER JOIN spacewalks ON astronauts.astronaut_id = spacewalks.astronaut_id;,0 What is the average donation amount received from donors in the Asia region?,"CREATE TABLE Donors (id INT, name TEXT, region TEXT, donation_amount DECIMAL); ",SELECT AVG(donation_amount) FROM Donors WHERE region = 'Asia';,SELECT AVG(donation_amount) FROM Donors WHERE region = 'Asia';,1 Calculate the revenue for each menu item,"CREATE TABLE MenuItems (menu_item_id INT, menu_item_name VARCHAR(255), price DECIMAL(10,2)); CREATE TABLE RestaurantSales (sale_id INT, restaurant_id INT, menu_item_id INT, quantity INT); ","SELECT m.menu_item_name, SUM(rs.quantity * m.price) as revenue FROM MenuItems m INNER JOIN RestaurantSales rs ON m.menu_item_id = rs.menu_item_id GROUP BY m.menu_item_name;","SELECT m.menu_item_name, SUM(rs.quantity) as total_revenue FROM MenuItems m INNER JOIN RestaurantSales rs ON m.menu_item_id = rs.menu_item_id GROUP BY m.menu_item_name;",0 "What are the names and start years of all public works projects in the city of New York, USA since 2000?","CREATE TABLE PublicWorks (ProjectID INT, Name TEXT, Location TEXT, StartYear INT, Country TEXT); ","SELECT PublicWorks.Name, PublicWorks.StartYear FROM PublicWorks WHERE PublicWorks.Location = 'New York, USA' AND PublicWorks.StartYear >= 2000","SELECT Name, StartYear FROM PublicWorks WHERE Location = 'New York' AND Country = 'USA' AND StartYear >= 2000;",0 "Which events have more than 10,000 fans attending in the 'concerts' table?","CREATE TABLE concerts (event_id INT, event_name VARCHAR(50), location VARCHAR(50), date DATE, ticket_price DECIMAL(5,2), num_tickets INT);",SELECT event_name FROM concerts WHERE num_tickets > 10000 GROUP BY event_name;,SELECT event_name FROM concerts WHERE num_tickets > 10000;,0 Delete 'Tofu Scramble' from the breakfast menu.,"CREATE TABLE menu (id INT, category VARCHAR(255), item VARCHAR(255)); ",DELETE FROM menu WHERE category = 'breakfast' AND item = 'Tofu Scramble';,DELETE FROM menu WHERE category = 'Breakfast' AND item = 'Tofu Scramble';,0 "When the under-11 was Aly Abou El Einen, who was the under-13?","CREATE TABLE table_26368963_1 (under_13 VARCHAR, under_11 VARCHAR);","SELECT under_13 FROM table_26368963_1 WHERE under_11 = ""Aly Abou El Einen"";","SELECT under_13 FROM table_26368963_1 WHERE under_11 = ""Aly Abou El Einen"";",1 How many students with cognitive impairments have not received any accommodations in the humanities department?,"CREATE TABLE students (id INT, cognitive_impairment BOOLEAN, department VARCHAR(255)); CREATE TABLE accommodations (id INT, student_id INT, year INT); ",SELECT COUNT(*) FROM students s WHERE s.cognitive_impairment = true AND s.department = 'humanities' AND s.id NOT IN (SELECT student_id FROM accommodations);,SELECT COUNT(DISTINCT students.id) FROM students INNER JOIN accommodations ON students.id = accommodations.student_id WHERE students.cognitive_impairment = FALSE AND accommodations.year IS NULL;,0 List all the articles published by 'Al Jazeera' that are related to the Middle East.,"CREATE TABLE al_jazeera (article_id INT, title TEXT, content TEXT, publisher TEXT); ",SELECT * FROM al_jazeera WHERE content LIKE '%Middle East%';,SELECT title FROM al_jazeera WHERE publisher = 'Al Jazeera' AND content LIKE '%Middle East%';,0 "What is the average score of players who joined after 2020-01-01, grouped by game genre?","CREATE TABLE games (game_id INT, game_name VARCHAR(50), genre VARCHAR(50), release_date DATE, score INT); ","SELECT genre, AVG(score) as avg_score FROM games WHERE release_date > '2020-01-01' GROUP BY genre;","SELECT genre, AVG(score) as avg_score FROM games WHERE release_date > '2020-01-01' GROUP BY genre;",1 Who is riding the Ducati 999 RS in Round 7?,"CREATE TABLE table_name_31 (rider VARCHAR, rounds VARCHAR, motorcycle VARCHAR);","SELECT rider FROM table_name_31 WHERE rounds = ""7"" AND motorcycle = ""ducati 999 rs"";","SELECT rider FROM table_name_31 WHERE rounds = 7 AND motorcycle = ""ducati 999 rs"";",0 Create a table 'community_programs',"CREATE TABLE community_programs (id INT PRIMARY KEY, name VARCHAR(100), type VARCHAR(50), location VARCHAR(100), capacity INT);","CREATE TABLE community_programs (id INT PRIMARY KEY, name VARCHAR(100), type VARCHAR(50), location VARCHAR(100), capacity INT);","CREATE TABLE community_programs (id INT PRIMARY KEY, name VARCHAR(100), type VARCHAR(50), location VARCHAR(100), capacity INT);",1 The EPT German open was won by which listed winner?,"CREATE TABLE table_name_8 (winner VARCHAR, event VARCHAR);","SELECT winner FROM table_name_8 WHERE event = ""ept german open"";","SELECT winner FROM table_name_8 WHERE event = ""ept german open"";",1 "What is the total value of socially responsible investments made by each investor, in descending order?","CREATE TABLE investors (investor_id INT, investor_name TEXT, country TEXT); CREATE TABLE socially_responsible_investments (investment_id INT, investor_id INT, investment_value DECIMAL); ","SELECT investor_name, SUM(investment_value) AS total_investments FROM socially_responsible_investments JOIN investors ON socially_responsible_investments.investor_id = investors.investor_id GROUP BY investor_name ORDER BY total_investments DESC;","SELECT i.investor_name, SUM(s.investment_value) as total_value FROM investors i JOIN socially_responsible_investments s ON i.investor_id = s.investor_id GROUP BY i.investor_name ORDER BY total_value DESC;",0 What is the average budget for ethical AI initiatives in 'North America' and 'South America'?,"CREATE TABLE ethical_ai_budget (initiative_id INT, initiative_name VARCHAR(255), region VARCHAR(255), budget DECIMAL(10,2)); ","SELECT AVG(budget) as avg_budget, region FROM ethical_ai_budget WHERE region IN ('North America', 'South America') GROUP BY region;","SELECT AVG(budget) FROM ethical_ai_budget WHERE region IN ('North America', 'South America');",0 Find the total number of employees in companies with a strong focus on workforce development in South America.,"CREATE TABLE companies (id INT, name TEXT, country TEXT, workforce_development BOOLEAN, num_employees INT); ","SELECT SUM(num_employees) FROM companies WHERE country IN ('Brazil', 'Argentina', 'Colombia') AND workforce_development = TRUE;",SELECT SUM(num_employees) FROM companies WHERE country = 'South America' AND workforce_development = TRUE;,0 Name the number of dismissals for adam gilchrist,"CREATE TABLE table_23316034_23 (dismissals VARCHAR, player VARCHAR);","SELECT COUNT(dismissals) FROM table_23316034_23 WHERE player = ""Adam Gilchrist"";","SELECT COUNT(dismissals) FROM table_23316034_23 WHERE player = ""Adam Gilchrist"";",1 List the military equipment types that had the highest maintenance costs per incident in 2020,"CREATE TABLE equipment_maintenance (equipment_type VARCHAR(255), maintenance_cost DECIMAL(10,2), maintenance_incident_date DATE);","SELECT equipment_type, AVG(maintenance_cost) AS avg_cost_per_incident FROM equipment_maintenance WHERE EXTRACT(YEAR FROM maintenance_incident_date) = 2020 GROUP BY equipment_type ORDER BY avg_cost_per_incident DESC","SELECT equipment_type, MAX(maintenance_cost) as max_cost FROM equipment_maintenance WHERE YEAR(maintenance_incident_date) = 2020 GROUP BY equipment_type;",0 What is the average age of readers who prefer news on politics in 'publicnews' database?,"CREATE TABLE readers (reader_id INT, age INT, preference TEXT); ",SELECT AVG(age) FROM readers WHERE preference = 'politics',SELECT AVG(age) FROM readers WHERE preference = 'politics';,0 what's the result with incumbent being bill g. lowrey,"CREATE TABLE table_1342379_23 (result VARCHAR, incumbent VARCHAR);","SELECT result FROM table_1342379_23 WHERE incumbent = ""Bill G. Lowrey"";","SELECT result FROM table_1342379_23 WHERE incumbent = ""Bill G. Lowrey"";",1 "Who was at the pole position in the ITT Automotive Grand Prix of Detroit, won by Paul Tracy?","CREATE TABLE table_19908651_3 (pole_position VARCHAR, winning_driver VARCHAR, race_name VARCHAR);","SELECT pole_position FROM table_19908651_3 WHERE winning_driver = ""Paul Tracy"" AND race_name = ""ITT Automotive Grand Prix of Detroit"";","SELECT pole_position FROM table_19908651_3 WHERE winning_driver = ""Paul Tracy"" AND race_name = ""ITT Automotive Grand Prix of Detroit"";",1 How many DVD volumes was identified by Skippy Johnson?,"CREATE TABLE table_name_36 (dvd_volume VARCHAR, identity_ies_ VARCHAR);","SELECT dvd_volume FROM table_name_36 WHERE identity_ies_ = ""skippy johnson"";","SELECT COUNT(dvd_volume) FROM table_name_36 WHERE identity_ies_ = ""skippy johnson"";",0 Calculate the revenue of eco-friendly hotels in France in Q2.,"CREATE TABLE hotel_revenue (hotel_name TEXT, is_eco_friendly BOOLEAN, quarter TEXT, revenue INT); ",SELECT SUM(revenue) FROM hotel_revenue WHERE is_eco_friendly = TRUE AND quarter = 'Q2' AND hotel_name LIKE '%France%';,SELECT revenue FROM hotel_revenue WHERE is_eco_friendly = true AND quarter = 2 AND country = 'France';,0 "How many Red Breasted Nuthatch coins created before 2007 were minted, on average?","CREATE TABLE table_name_42 (mintage INTEGER, animal VARCHAR, year VARCHAR);","SELECT AVG(mintage) FROM table_name_42 WHERE animal = ""red breasted nuthatch"" AND year < 2007;","SELECT AVG(mintage) FROM table_name_42 WHERE animal = ""red breasted nuthatch"" AND year 2007;",0 How many green-certified properties are there in each borough?,"CREATE TABLE Boroughs (BoroughID INT, BoroughName VARCHAR(255)); CREATE TABLE Properties (PropertyID INT, BoroughID INT, GreenCertified BOOLEAN);","SELECT B.BoroughName, COUNT(P.PropertyID) as GreenPropCount FROM Boroughs B JOIN Properties P ON B.BoroughID = P.BoroughID WHERE P.GreenCertified = TRUE GROUP BY B.BoroughName;","SELECT b.BoroughName, COUNT(p.PropertyID) FROM Boroughs b INNER JOIN Properties p ON b.BoroughID = p.BoroughID WHERE p.GreenCertified = TRUE GROUP BY b.BoroughName;",0 What are the hydro projects and their capacities?,"CREATE TABLE projects (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), type VARCHAR(255), capacity FLOAT, start_date DATE, end_date DATE); ",SELECT * FROM projects WHERE type = 'Hydro';,"SELECT name, capacity FROM projects WHERE type = 'hydro';",0 How many wins does Greg Norman have?,"CREATE TABLE table_name_15 (wins INTEGER, player VARCHAR);","SELECT SUM(wins) FROM table_name_15 WHERE player = ""greg norman"";","SELECT SUM(wins) FROM table_name_15 WHERE player = ""greg norman"";",1 What is the hometown of the player from Indonesia?,"CREATE TABLE table_name_31 (hometown VARCHAR, country VARCHAR);","SELECT hometown FROM table_name_31 WHERE country = ""indonesia"";","SELECT hometown FROM table_name_31 WHERE country = ""indonesia"";",1 What is the average age of patients in the 'rural_clinic_1' table?,"CREATE TABLE rural_clinic_1 (patient_id INT, age INT, gender VARCHAR(10)); ",SELECT AVG(age) FROM rural_clinic_1;,SELECT AVG(age) FROM rural_clinic_1;,1 What is the average carbon footprint of factories in the top 5 most polluting regions?,"CREATE TABLE Factories (id INT, region VARCHAR, carbon_footprint INT); CREATE VIEW TopPollutingRegions AS SELECT DISTINCT TOP 5 region FROM Factories ORDER BY carbon_footprint DESC;",SELECT AVG(carbon_footprint) FROM Factories WHERE region IN (SELECT region FROM TopPollutingRegions);,SELECT AVG(carbon_footprint) FROM TopPollutingRegions;,0 Delete records in the 'wind_turbines' table where the 'manufacturer' is 'NorthernWinds' and the 'location' is not 'Ontario',"CREATE TABLE wind_turbines (id INT PRIMARY KEY, manufacturer VARCHAR(255), location VARCHAR(255), capacity FLOAT);",DELETE FROM wind_turbines WHERE manufacturer = 'NorthernWinds' AND location != 'Ontario';,DELETE FROM wind_turbines WHERE manufacturer = 'NorthernWinds' AND location = 'Ontario';,0 How many mental health clinics are there in California?,"CREATE TABLE MentalHealthClinic (ClinicID INT, ClinicName VARCHAR(100), Address VARCHAR(100), State VARCHAR(20)); ",SELECT COUNT(*) FROM MentalHealthClinic WHERE State = 'California';,SELECT COUNT(*) FROM MentalHealthClinic WHERE State = 'California';,1 How many local vendors have partnered with our platform in Spain?,"CREATE TABLE vendors (id INT, name TEXT, country TEXT); ",SELECT COUNT(*) FROM vendors WHERE country = 'Spain';,SELECT COUNT(*) FROM vendors WHERE country = 'Spain';,1 What is the greatest round of overall 83?,"CREATE TABLE table_10361625_1 (round INTEGER, overall VARCHAR);",SELECT MAX(round) FROM table_10361625_1 WHERE overall = 83;,SELECT MAX(round) FROM table_10361625_1 WHERE overall = 83;,1 What is the total number of media outlets in North America with a media literacy score below 6?,"CREATE TABLE media_outlets_na (id INT, name TEXT, country TEXT, media_literacy_score INT); ",SELECT COUNT(*) FROM media_outlets_na WHERE country = 'North America' AND media_literacy_score < 6;,SELECT COUNT(*) FROM media_outlets_na WHERE country = 'North America' AND media_literacy_score 6;,0 Delete records with missing 'language_name' values from the 'language_preservation' table,"CREATE TABLE language_preservation (id INT, location VARCHAR(50), language_name VARCHAR(50), status VARCHAR(20)); ",DELETE FROM language_preservation WHERE language_name IS NULL;,DELETE FROM language_preservation WHERE language_name IS NULL;,1 List all the machines that have not been maintained in the last 60 days and their usage hours.,"CREATE TABLE machine_maintenance_new (id INT PRIMARY KEY, machine_name VARCHAR(50), last_maintenance_date DATE); CREATE TABLE machine_usage_new (id INT PRIMARY KEY, machine_name VARCHAR(50), usage_hours INT);","SELECT m.machine_name, u.usage_hours FROM machine_maintenance_new m RIGHT JOIN machine_usage_new u ON m.machine_name = u.machine_name WHERE m.last_maintenance_date < CURDATE() - INTERVAL 60 DAY;","SELECT machine_name, usage_hours FROM machine_maintenance_new INNER JOIN machine_usage_new ON machine_maintenance_new.machine_name = machine_usage_new.machine_name WHERE machine_maintenance_new.last_maintenance_date DATE_SUB(CURRENT_DATE, INTERVAL 60 DAY);",0 What is the bore of the boat howitzers with a 12-pdr heavy designation?,"CREATE TABLE table_name_8 (bore VARCHAR, designation VARCHAR);","SELECT bore FROM table_name_8 WHERE designation = ""12-pdr heavy"";","SELECT bore FROM table_name_8 WHERE designation = ""12 pdr heavy"";",0 Count the number of cosmetics that have a sourcing country of 'Brazil'.,"CREATE TABLE cosmetics (product_id INT, product_name VARCHAR(100), product_type VARCHAR(50), is_cruelty_free BOOLEAN, consumer_preference_score INT); CREATE TABLE ingredient_sourcing (ingredient_id INT, ingredient_name VARCHAR(100), sourcing_country VARCHAR(50), is_organic BOOLEAN); ",SELECT COUNT(*) FROM cosmetics INNER JOIN ingredient_sourcing ON cosmetics.product_id = ingredient_sourcing.ingredient_id WHERE sourcing_country = 'Brazil';,SELECT COUNT(*) FROM cosmetics JOIN ingredient_sourcing ON cosmetics.product_id = ingredient_sourcing.ingredient_id WHERE sourcing_country = 'Brazil';,0 Which artist has the lowest average concert ticket price?,"CREATE TABLE artists (artist_name TEXT, tickets_sold INT, ticket_price FLOAT); ","SELECT artist_name, AVG(ticket_price) as avg_ticket_price FROM artists GROUP BY artist_name ORDER BY avg_ticket_price ASC LIMIT 1;","SELECT artist_name, AVG(ticket_price) as avg_price FROM artists GROUP BY artist_name ORDER BY avg_price DESC LIMIT 1;",0 "What is the Home with a Visitor of chicago, and a Series with 3 – 2?","CREATE TABLE table_name_82 (home VARCHAR, visitor VARCHAR, series VARCHAR);","SELECT home FROM table_name_82 WHERE visitor = ""chicago"" AND series = ""3 – 2"";","SELECT home FROM table_name_82 WHERE visitor = ""chicago"" AND series = ""3 – 2"";",1 "Hom many albums does the artist ""Metallica"" have?","CREATE TABLE ARTIST (ArtistId VARCHAR, Name VARCHAR); CREATE TABLE ALBUM (ArtistId VARCHAR);","SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = ""Metallica"";","SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = ""Metallica"";",1 When is the term end of Shlomo-Yisrael Ben-Meir of the National Religious Party?,"CREATE TABLE table_name_37 (term_end VARCHAR, party VARCHAR, minister VARCHAR);","SELECT term_end FROM table_name_37 WHERE party = ""national religious party"" AND minister = ""shlomo-yisrael ben-meir"";","SELECT term_end FROM table_name_37 WHERE party = ""national religious"" AND minister = ""shlomo-yisrael ben-meir"";",0 List all regulatory frameworks in the blockchain domain that have been implemented so far this decade.,"CREATE TABLE RegulatoryFrameworks (framework_id INT, framework_name TEXT, implementation_year INT); ",SELECT framework_name FROM RegulatoryFrameworks WHERE RegulatoryFrameworks.implementation_year >= 2010 AND RegulatoryFrameworks.implementation_year < 2030;,SELECT framework_name FROM RegulatoryFrameworks WHERE implementation_year >= 2020;,0 What is hte nuumber of employees that has a revenue of 104.000?,"CREATE TABLE table_name_60 (employees__world_ VARCHAR, revenue__mil€_ VARCHAR);","SELECT employees__world_ FROM table_name_60 WHERE revenue__mil€_ = ""104.000"";","SELECT employees__world_ FROM table_name_60 WHERE revenue__mil€_ = ""104.000"";",1 Who are the top 3 supporters based on total donation?,"CREATE TABLE supporters (id INT, name TEXT, country TEXT, donation FLOAT); ","SELECT name, SUM(donation) OVER (ORDER BY SUM(donation) DESC) AS total_donation FROM supporters;","SELECT name, SUM(donation) as total_donation FROM supporters GROUP BY name ORDER BY total_donation DESC LIMIT 3;",0 Which launch date involved the Driade?,"CREATE TABLE table_13537940_1 (launched VARCHAR, name VARCHAR);","SELECT launched FROM table_13537940_1 WHERE name = ""Driade"";","SELECT launched FROM table_13537940_1 WHERE name = ""Driade"";",1 Find the average grade of all students who have some friends.,"CREATE TABLE Highschooler (id VARCHAR); CREATE TABLE Friend (student_id VARCHAR); CREATE TABLE Highschooler (grade INTEGER, id VARCHAR);",SELECT AVG(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id);,SELECT AVG(grade) FROM Highschooler AS T1 JOIN Friend AS T2 ON T1.id = T2.student_id;,0 "Bandwidth (MB/s) smaller than 4800, and a Bus width (bits) smaller than 16 has what highest Clock rate (MHz)?","CREATE TABLE table_name_75 (clock_rate__mhz_ INTEGER, bandwidth__mb_s_ VARCHAR, bus_width__bits_ VARCHAR);",SELECT MAX(clock_rate__mhz_) FROM table_name_75 WHERE bandwidth__mb_s_ < 4800 AND bus_width__bits_ < 16;,SELECT MAX(clock_rate__mhz_) FROM table_name_75 WHERE bandwidth__mb_s_ 4800 AND bus_width__bits_ 16;,0 what are all the result for New York 6 district,"CREATE TABLE table_1341395_33 (result VARCHAR, district VARCHAR);","SELECT result FROM table_1341395_33 WHERE district = ""New York 6"";","SELECT result FROM table_1341395_33 WHERE district = ""New York 6"";",1 "What commercial operation that has a gross capacity of 1,126 mw, and a unit of tianwan-4?","CREATE TABLE table_name_95 (commercial_operation VARCHAR, gross_capacity VARCHAR, unit VARCHAR);","SELECT commercial_operation FROM table_name_95 WHERE gross_capacity = ""1,126 mw"" AND unit = ""tianwan-4"";","SELECT commercial_operation FROM table_name_95 WHERE gross_capacity = ""1,126 mw"" AND unit = ""tianwan-4"";",1 What is the number of party in the arkansas 1 district,"CREATE TABLE table_1341930_5 (party VARCHAR, district VARCHAR);","SELECT COUNT(party) FROM table_1341930_5 WHERE district = ""Arkansas 1"";","SELECT COUNT(party) FROM table_1341930_5 WHERE district = ""arkansas 1"";",0 What is the record where high assists is pierce (6)?,"CREATE TABLE table_11959669_6 (record VARCHAR, high_assists VARCHAR);","SELECT record FROM table_11959669_6 WHERE high_assists = ""Pierce (6)"";","SELECT record FROM table_11959669_6 WHERE high_assists = ""Pierce (6)"";",1 what is the total 07-08 gp/jgp 2nd with the name mao asada,CREATE TABLE table_23938357_5 (name VARCHAR);,"SELECT 07 AS _08_gp_jgp_2nd FROM table_23938357_5 WHERE name = ""Mao Asada"";","SELECT COUNT(07 AS _08_gp_jgp_2nd) FROM table_23938357_5 WHERE name = ""Mao Asada"";",0 What was the format in September 1990 for Catalog 887 847-1?,"CREATE TABLE table_name_84 (format VARCHAR, catalog VARCHAR, date VARCHAR);","SELECT format FROM table_name_84 WHERE catalog = ""887 847-1"" AND date = ""september 1990"";","SELECT format FROM table_name_84 WHERE catalog = ""87 847-1"" AND date = ""september 1990"";",0 Update the title to 'Physician' for the record with the name 'Jane Doe' in the 'rural_healthcare_workers' table,"CREATE TABLE rural_healthcare_workers (id INT, name VARCHAR(50), title VARCHAR(50), location VARCHAR(50));",UPDATE rural_healthcare_workers SET title = 'Physician' WHERE name = 'Jane Doe';,UPDATE rural_healthcare_workers SET title = 'Physician' WHERE name = 'Jane Doe';,1 How many streams did artist 'The Weeknd' get in the United Kingdom?,"CREATE TABLE Streams (id INT, artist VARCHAR(100), country VARCHAR(100), streams INT); ",SELECT SUM(streams) FROM Streams WHERE artist = 'The Weeknd' AND country = 'United Kingdom',SELECT SUM(streams) FROM Streams WHERE artist = 'The Weeknd' AND country = 'United Kingdom';,0 What is the origin of aircraft in service in 1943 and retired in 1954?,"CREATE TABLE table_13605170_2 (national_origin VARCHAR, retired VARCHAR, in_service VARCHAR);","SELECT national_origin FROM table_13605170_2 WHERE retired = ""1954"" AND in_service = ""1943"";",SELECT national_origin FROM table_13605170_2 WHERE retired = 1954 AND in_service = 1943;,0 what is the circuit where the fastest lap is sam lowes and the winning rider is luca scassa?,"CREATE TABLE table_29686983_1 (circuit VARCHAR, fastest_lap VARCHAR, winning_rider VARCHAR);","SELECT circuit FROM table_29686983_1 WHERE fastest_lap = ""Sam Lowes"" AND winning_rider = ""Luca Scassa"";","SELECT circuit FROM table_29686983_1 WHERE fastest_lap = ""Sam Lowes"" AND winning_rider = ""Luca Scassa"";",1 What is the maximum energy efficiency rating for commercial buildings in the City of San Francisco?,"CREATE TABLE Commercial_Buildings (id INT, building_type VARCHAR(20), location VARCHAR(20), energy_efficiency_rating FLOAT); ",SELECT MAX(energy_efficiency_rating) FROM Commercial_Buildings WHERE location = 'City of San Francisco';,SELECT MAX(energy_efficiency_rating) FROM Commercial_Buildings WHERE location = 'San Francisco';,0 What is the chassis of rahel frey's volkswagen engine?,"CREATE TABLE table_name_74 (chassis VARCHAR, engine VARCHAR, driver VARCHAR);","SELECT chassis FROM table_name_74 WHERE engine = ""volkswagen"" AND driver = ""rahel frey"";","SELECT chassis FROM table_name_74 WHERE engine = ""volkswagen"" AND driver = ""rahel frey"";",1 Who are the top 3 donor countries by total donation amount?,"CREATE TABLE donations (country TEXT, donation FLOAT); ","SELECT country, SUM(donation) OVER (ORDER BY SUM(donation) DESC) AS total_donation FROM donations;","SELECT country, SUM(donation) as total_donation FROM donations GROUP BY country ORDER BY total_donation DESC LIMIT 3;",0 Compare the number of high and medium severity vulnerabilities found in the last quarter for web and desktop applications.,"CREATE TABLE vulnerabilities (id INT, app_type VARCHAR(10), severity VARCHAR(10), timestamp TIMESTAMP);","SELECT app_type, severity, COUNT(*) as total FROM vulnerabilities WHERE severity IN ('high', 'medium') AND timestamp >= NOW() - INTERVAL 3 MONTH GROUP BY app_type, severity;","SELECT severity, COUNT(*) FROM vulnerabilities WHERE app_type IN ('Web', 'Desktop') AND timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 MONTH) GROUP BY severity;",0 What were the average donation amounts by continent for the year 2021?,"CREATE TABLE donations (id INT, donor_name TEXT, cause_area TEXT, amount INT, donation_date DATE, donor_continent TEXT); ","SELECT donor_continent, AVG(amount) as avg_donation FROM donations WHERE donation_date >= '2021-01-01' AND donation_date < '2022-01-01' GROUP BY donor_continent;","SELECT donor_continent, AVG(amount) as avg_donation FROM donations WHERE YEAR(donation_date) = 2021 GROUP BY donor_continent;",0 What was the original air date for the episode with 13.92 million us viewers?,"CREATE TABLE table_26565936_2 (original_air_date VARCHAR, us_viewers__millions_ VARCHAR);","SELECT original_air_date FROM table_26565936_2 WHERE us_viewers__millions_ = ""13.92"";","SELECT original_air_date FROM table_26565936_2 WHERE us_viewers__millions_ = ""13.92"";",1 Delete all records with a cost less than 100000 from the 'rural_infrastructure' table.,"CREATE SCHEMA if not exists rural_development; use rural_development; CREATE TABLE IF NOT EXISTS rural_infrastructure (id INT, name VARCHAR(255), cost FLOAT, PRIMARY KEY (id)); ",DELETE FROM rural_infrastructure WHERE cost < 100000.00;,DELETE FROM rural_infrastructure WHERE cost 100000;,0 Which does the lhp player with the first name lachlan bat?,"CREATE TABLE table_name_9 (bats VARCHAR, position VARCHAR, first VARCHAR);","SELECT bats FROM table_name_9 WHERE position = ""lhp"" AND first = ""lachlan"";","SELECT bats FROM table_name_9 WHERE position = ""lhp"" AND first = ""lachlan"";",1 "With the Destination of Jupiter and the Closest approach of 4 February 2004, what is the Time elapsed?","CREATE TABLE table_name_11 (time_elapsed VARCHAR, destination VARCHAR, closest_approach VARCHAR);","SELECT time_elapsed FROM table_name_11 WHERE destination = ""jupiter"" AND closest_approach = ""4 february 2004"";","SELECT time_elapsed FROM table_name_11 WHERE destination = ""jupiter"" AND closest_approach = ""4 february 2004"";",1 What country has a +3 to par?,"CREATE TABLE table_name_57 (country VARCHAR, to_par VARCHAR);","SELECT country FROM table_name_57 WHERE to_par = ""+3"";","SELECT country FROM table_name_57 WHERE to_par = ""+3"";",1 "What is the percentage of agricultural innovation projects in 'rural_development' schema, categorized by funding source?","CREATE TABLE innovation_projects(id INT, funding_source VARCHAR(50), value INT); ","SELECT funding_source, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM innovation_projects)) as percentage FROM innovation_projects GROUP BY funding_source;","SELECT funding_source, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM innovation_projects GROUP BY funding_source) as percentage FROM innovation_projects GROUP BY funding_source;",0 What is the trend in temperature for each crop type over the past 5 years?,"CREATE TABLE Temp_Trend (date DATE, temperature INT, crop_type VARCHAR(20));","SELECT crop_type, temperature, ROW_NUMBER() OVER(PARTITION BY crop_type ORDER BY date DESC) as rank, AVG(temperature) OVER(PARTITION BY crop_type ORDER BY date ROWS BETWEEN 3 PRECEDING AND CURRENT ROW) as avg_temp FROM Temp_Trend WHERE date >= DATEADD(year, -5, CURRENT_DATE);","SELECT crop_type, AVG(temperature) as avg_temperature FROM Temp_Trend WHERE date >= DATEADD(year, -5, GETDATE()) GROUP BY crop_type;",0 How many marine species are registered in the Caribbean sea in the species table?,"CREATE TABLE species (id INT, name TEXT, location TEXT); ",SELECT COUNT(*) FROM species WHERE location = 'Caribbean Sea';,SELECT COUNT(*) FROM species WHERE location = 'Caribbean Sea';,1 What is the difference in data usage between the youngest and oldest mobile users in the United States?,"CREATE TABLE mobile_users (user_id INT, age INT, data_usage FLOAT, country VARCHAR(20)); ",SELECT MAX(data_usage) - MIN(data_usage) AS data_usage_difference FROM mobile_users WHERE country = 'USA' AND age IN (SELECT MIN(age) FROM mobile_users WHERE country = 'USA') OR age IN (SELECT MAX(age) FROM mobile_users WHERE country = 'USA');,SELECT MIN(data_usage) - MAX(data_usage) FROM mobile_users WHERE country = 'United States';,0 Name the number of titles written by adam i. lapidus,"CREATE TABLE table_12030612_9 (title VARCHAR, written_by VARCHAR);","SELECT COUNT(title) FROM table_12030612_9 WHERE written_by = ""Adam I. Lapidus"";","SELECT COUNT(title) FROM table_12030612_9 WHERE written_by = ""Adam I. Lapidus"";",1 What is the lowest Avg/G with a Long less than 0?,"CREATE TABLE table_name_99 (avg_g INTEGER, long INTEGER);",SELECT MIN(avg_g) FROM table_name_99 WHERE long < 0;,SELECT MIN(avg_g) FROM table_name_99 WHERE long 0;,0 "Insert a new record into the ""artists"" table for a painter from Nigeria","CREATE TABLE artists (id INT PRIMARY KEY, name VARCHAR(100), birth_date DATE, country VARCHAR(50));","INSERT INTO artists (id, name, birth_date, country) VALUES (1, 'Tola Wewe', '1959-06-06', 'Nigeria');","INSERT INTO artists (id, name, birth_date, country) VALUES (1, 'Nigeria', '2022-01-01');",0 What home team plays at Windy Hill?,"CREATE TABLE table_name_77 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_77 WHERE venue = ""windy hill"";","SELECT home_team FROM table_name_77 WHERE venue = ""windy hill"";",1 Delete the record of space mission led by an astronaut from Argentina.,"CREATE TABLE Astronauts(id INT, name VARCHAR(50), nationality VARCHAR(50)); CREATE TABLE SpaceMissions(id INT, mission VARCHAR(50), leader_id INT, duration FLOAT); ",DELETE FROM SpaceMissions WHERE leader_id IN (SELECT id FROM Astronauts WHERE nationality = 'Argentina');,DELETE FROM SpaceMissions WHERE leader_id = (SELECT id FROM Astronauts WHERE nationality = 'Argentina');,0 How many songs were released by each artist in the 90s?,"CREATE TABLE songs (song_id INT, title TEXT, release_year INT, artist_id INT); CREATE TABLE artists (artist_id INT, name TEXT);","SELECT a.name, COUNT(s.song_id) FROM songs s JOIN artists a ON s.artist_id = a.artist_id WHERE s.release_year BETWEEN 1990 AND 1999 GROUP BY a.name;","SELECT a.name, COUNT(s.song_id) FROM songs s JOIN artists a ON s.artist_id = a.artist_id WHERE s.release_year = 90 GROUP BY a.name;",0 What is the youngest male patient in 'RuralClinicD'?,"CREATE TABLE RuralClinicD (patient_id INT, age INT, gender VARCHAR(10)); ",SELECT MIN(age) FROM RuralClinicD WHERE gender = 'Male';,SELECT MIN(age) FROM RuralClinicD WHERE gender = 'Male';,1 What is the maximum number of wins in a tournament for a player from Africa?,"CREATE TABLE players (player_id INT, player_name TEXT, country TEXT); CREATE TABLE tournaments (tournament_id INT, tournament_name TEXT, country TEXT); CREATE TABLE wins (player_id INT, tournament_id INT, wins INT); ",SELECT MAX(wins.wins) FROM wins JOIN players ON wins.player_id = players.player_id WHERE players.country = 'Egypt' OR players.country = 'South Africa';,SELECT MAX(wins.wins) FROM wins INNER JOIN players ON wins.player_id = players.player_id INNER JOIN tournaments ON wins.tournament_id = tournaments.tournament_id WHERE players.country = 'Africa';,0 "In the game in which the Jacksonville Jaguars were hosts, what was the name of the visiting team?","CREATE TABLE table_name_92 (visiting_team VARCHAR, host_team VARCHAR);","SELECT visiting_team FROM table_name_92 WHERE host_team = ""jacksonville jaguars"";","SELECT visiting_team FROM table_name_92 WHERE host_team = ""jaguars"";",0 What is the minimum number of calories burned in a single workout by users from Australia?,"CREATE TABLE workouts (id INT, user_id INT, workout_date DATE, calories INT, country VARCHAR(50)); ",SELECT MIN(calories) FROM workouts WHERE country = 'Australia';,SELECT MIN(calories) FROM workouts WHERE country = 'Australia';,1 What ist he matches where the player is ms dhoni?,"CREATE TABLE table_24039597_26 (matches VARCHAR, player VARCHAR);","SELECT matches FROM table_24039597_26 WHERE player = ""MS Dhoni"";","SELECT matches FROM table_24039597_26 WHERE player = ""Ms Dhoni"";",0 "Which date has opponents, Claire De Gubernatis Alexandra Dulgheru, in the final?","CREATE TABLE table_name_20 (date VARCHAR, opponents_in_the_final VARCHAR);","SELECT date FROM table_name_20 WHERE opponents_in_the_final = ""claire de gubernatis alexandra dulgheru"";","SELECT date FROM table_name_20 WHERE opponents_in_the_final = ""claire de gubernatis anthony dulgheru"";",0 How many environmental impact assessments have been conducted in the 'Middle East' region?,"CREATE TABLE regions (id INT, name TEXT); CREATE TABLE assessments (id INT, region_id INT, type TEXT); ",SELECT COUNT(assessments.id) FROM assessments JOIN regions ON assessments.region_id = regions.id WHERE regions.name = 'Middle East';,SELECT COUNT(*) FROM assessments WHERE region_id = (SELECT id FROM regions WHERE name = 'Middle East');,0 "Show the ""name"" and ""region"" of all researchers in the ""researchers"" table who have more than 5 years of experience in ""Asia"".","CREATE TABLE researchers (researcher_id INT PRIMARY KEY, name VARCHAR(255), region VARCHAR(255), experience INT);","SELECT name, region FROM researchers WHERE region = 'Asia' AND experience > 5;","SELECT name, region FROM researchers WHERE region = 'Asia' AND experience > 5;",1 What is the average safety rating for vehicles manufactured by company 'Tesla'?,"CREATE TABLE VehicleManufacturers (Manufacturer VARCHAR(255), SafetyRating FLOAT); ",SELECT AVG(SafetyRating) FROM VehicleManufacturers WHERE Manufacturer = 'Tesla';,SELECT AVG(SafetyRating) FROM VehicleManufacturers WHERE Manufacturer = 'Tesla';,1 What is the monthly waste production per mining operation?,"CREATE TABLE mining_operations (operation_id INT, operation_name TEXT, country TEXT); CREATE TABLE waste_production (operation_id INT, production_date DATE, amount_waste FLOAT); ","SELECT EXTRACT(MONTH FROM production_date) AS month, operation_id, SUM(amount_waste) AS total_waste FROM waste_production JOIN mining_operations ON waste_production.operation_id = mining_operations.operation_id GROUP BY month, operation_id;","SELECT m.operation_name, DATE_FORMAT(wp.production_date, '%Y-%m') AS month, SUM(wp.amount_waste) AS total_waste FROM mining_operations m JOIN waste_production wp ON m.operation_id = wp.operation_id GROUP BY m.operation_name, month;",0 "What is the average sustainability score for each fabric, grouped by material type?","CREATE TABLE Fabrics (id INT, fabric_type VARCHAR(20), fabric VARCHAR(20), source_country VARCHAR(50), sustainability_score INT); ","SELECT fabric_type, AVG(sustainability_score) FROM Fabrics GROUP BY fabric_type;","SELECT fabric_type, AVG(sustainability_score) as avg_sustainability_score FROM Fabrics GROUP BY fabric_type;",0 When was the episode that had a share (%) of 41.5?,"CREATE TABLE table_27319183_5 (date VARCHAR, share___percentage_ VARCHAR);","SELECT date FROM table_27319183_5 WHERE share___percentage_ = ""41.5"";","SELECT date FROM table_27319183_5 WHERE share___percentage_ = ""41.5"";",1 Update the 'chemical_name' column to 'Sodium Chloride' for records where 'id' is 1 in 'chemical_inventory' table,"CREATE TABLE chemical_inventory (id INT, chemical_name VARCHAR(50), safety_stock INT);",UPDATE chemical_inventory SET chemical_name = 'Sodium Chloride' WHERE id = 1;,UPDATE chemical_inventory SET chemical_name = 'Sodium Chloride' WHERE id = 1;,1 What points did the ilmor v10 engine get after 1992?,"CREATE TABLE table_name_11 (points INTEGER, engine VARCHAR, year VARCHAR);","SELECT SUM(points) FROM table_name_11 WHERE engine = ""ilmor v10"" AND year > 1992;","SELECT SUM(points) FROM table_name_11 WHERE engine = ""ilmor v10"" AND year > 1992;",1 "Who are the top 3 players with the highest scores in the ""Action"" genre?","CREATE TABLE Players (PlayerID int, PlayerName varchar(50), Game varchar(50), Score int);","SELECT PlayerName, ROW_NUMBER() OVER(PARTITION BY Game ORDER BY Score DESC) as Rank FROM Players WHERE Game = 'Action' ORDER BY Rank ASC;","SELECT PlayerName, Score FROM Players WHERE Game = 'Action' ORDER BY Score DESC LIMIT 3;",0 How many food safety inspections occurred in 'LA' in 2022?,"CREATE TABLE inspections (location VARCHAR(255), year INT, inspections_count INT); ",SELECT inspections_count FROM inspections WHERE location = 'LA' AND year = 2022;,SELECT SUM(inspections_count) FROM inspections WHERE location = 'LA' AND year = 2022;,0 What players played the position of left tackle?,"CREATE TABLE table_14342592_5 (player VARCHAR, position VARCHAR);","SELECT player FROM table_14342592_5 WHERE position = ""Left tackle"";","SELECT player FROM table_14342592_5 WHERE position = ""Left tackle"";",1 "Show the number of green buildings in each city, ordered by the number of green buildings in descending order","CREATE TABLE green_buildings (address VARCHAR(255), size INT, certification VARCHAR(50), city VARCHAR(100)); ","SELECT city, COUNT(*) AS num_buildings FROM green_buildings GROUP BY city ORDER BY num_buildings DESC;","SELECT city, COUNT(*) as num_green_buildings FROM green_buildings GROUP BY city ORDER BY num_green_buildings DESC;",0 What team were the bills playing where their first down was 23?,"CREATE TABLE table_16677887_2 (opponent VARCHAR, bills_first_downs VARCHAR);",SELECT opponent FROM table_16677887_2 WHERE bills_first_downs = 23;,"SELECT opponent FROM table_16677887_2 WHERE bills_first_downs = ""23"";",0 What Assembled has Elected of 1562/63?,"CREATE TABLE table_name_30 (assembled VARCHAR, elected VARCHAR);","SELECT assembled FROM table_name_30 WHERE elected = ""1562/63"";","SELECT assembled FROM table_name_30 WHERE elected = ""1562/63"";",1 What is the total of roles that George Olmi plays in Savoy & Casino Theatre 1888?,"CREATE TABLE table_148386_2 (savoy_theatre_1888 VARCHAR, casino_theatre_1888 VARCHAR);","SELECT COUNT(savoy_theatre_1888) FROM table_148386_2 WHERE casino_theatre_1888 = ""George Olmi"";","SELECT COUNT(savoy_theatre_1888) FROM table_148386_2 WHERE casino_theatre_1888 = ""George Olmi"";",1 What was the average rank for south africa when they had more than 8 silver medals?,"CREATE TABLE table_name_64 (rank INTEGER, nation VARCHAR, silver VARCHAR);","SELECT AVG(rank) FROM table_name_64 WHERE nation = ""south africa"" AND silver > 8;","SELECT AVG(rank) FROM table_name_64 WHERE nation = ""south africa"" AND silver > 8;",1 Name the number of rank for april 2013 for 2012 ran kbeing 225,"CREATE TABLE table_24307126_3 (april_2013_cum_rank VARCHAR, rank_2012 VARCHAR);",SELECT COUNT(april_2013_cum_rank) FROM table_24307126_3 WHERE rank_2012 = 225;,"SELECT COUNT(april_2013_cum_rank) FROM table_24307126_3 WHERE rank_2012 = ""Ran kbeing 225"";",0 "Identify the number of food allergens for each dish in the 'menu_items' table, with a dish rating of 'excellent' or 'good' in the 'dish_ratings' table?","CREATE TABLE menu_items (menu_id INT, dish_name VARCHAR(255), allergen_count INT);CREATE TABLE dish_ratings (dish_name VARCHAR(255), dish_rating VARCHAR(20));","SELECT menu_items.dish_name, SUM(menu_items.allergen_count) as total_allergens FROM menu_items INNER JOIN dish_ratings ON menu_items.dish_name = dish_ratings.dish_name WHERE dish_ratings.dish_rating IN ('excellent', 'good') GROUP BY menu_items.dish_name;","SELECT m.dish_name, SUM(m.allergen_count) as total_allergens FROM menu_items m INNER JOIN dish_ratings dr ON m.dish_name = dr.dish_name WHERE dr.dish_rating IN ('excellent', 'good') GROUP BY m.dish_name;",0 What is the total revenue for products with 'organic' label in the 'sales' table?,"CREATE TABLE sales (sale_id INT, product_id INT, sale_price DECIMAL(5,2), label VARCHAR(255));",SELECT SUM(sale_price) FROM sales WHERE label = 'organic';,SELECT SUM(sale_price) FROM sales WHERE label = 'organic';,1 What is the title of the episode that featured Abbud Siddiqui?,"CREATE TABLE table_29545336_2 (title VARCHAR, featured_character_s_ VARCHAR);","SELECT title FROM table_29545336_2 WHERE featured_character_s_ = ""Abbud Siddiqui"";","SELECT title FROM table_29545336_2 WHERE featured_character_s_ = ""Abbud Siddiqui"";",1 What is every class with a position of guard and Tal Brody as the player?,"CREATE TABLE table_22824297_1 (class VARCHAR, position VARCHAR, player VARCHAR);","SELECT class FROM table_22824297_1 WHERE position = ""Guard"" AND player = ""Tal Brody"";","SELECT class FROM table_22824297_1 WHERE position = ""Guard"" AND player = ""Tal Brody"";",1 How many bronze medals did Chinese Taipei win with less than 0 gold?,"CREATE TABLE table_name_29 (bronze VARCHAR, nation VARCHAR, gold VARCHAR);","SELECT COUNT(bronze) FROM table_name_29 WHERE nation = ""chinese taipei"" AND gold < 0;","SELECT COUNT(bronze) FROM table_name_29 WHERE nation = ""chinese taipei"" AND gold 0;",0 List all space missions launched by NASA before 2010-01-01?,"CREATE TABLE Space_Missions (id INT, mission_name VARCHAR(50), launch_date DATE, launching_agency VARCHAR(50)); ",SELECT mission_name FROM Space_Missions WHERE launch_date < '2010-01-01' AND launching_agency = 'NASA';,SELECT mission_name FROM Space_Missions WHERE launching_agency = 'NASA' AND launch_date '2010-01-01';,0 "Delete space debris records in the ""space_debris_mitigation"" table that are not within the latitude range -90 to 90.","CREATE TABLE space_debris_mitigation (id INT, debris_name VARCHAR(50), latitude FLOAT, longitude FLOAT); ",DELETE FROM space_debris_mitigation WHERE latitude NOT BETWEEN -90 AND 90;,DELETE FROM space_debris_mitigation WHERE latitude = 90;,0 What year was Incumbent Ed Towns elected with a district smaller than 10?,"CREATE TABLE table_name_19 (elected INTEGER, incumbent VARCHAR, district VARCHAR);","SELECT AVG(elected) FROM table_name_19 WHERE incumbent = ""ed towns"" AND district < 10;","SELECT AVG(elected) FROM table_name_19 WHERE incumbent = ""ed towns"" AND district 10;",0 What is the average crowd size for games with hawthorn as the home side?,"CREATE TABLE table_name_8 (crowd INTEGER, home_team VARCHAR);","SELECT AVG(crowd) FROM table_name_8 WHERE home_team = ""hawthorn"";","SELECT AVG(crowd) FROM table_name_8 WHERE home_team = ""hawthorn"";",1 Who is the opponent of the 3:00 time?,"CREATE TABLE table_name_73 (opponent VARCHAR, time VARCHAR);","SELECT opponent FROM table_name_73 WHERE time = ""3:00"";","SELECT opponent FROM table_name_73 WHERE time = ""3:00"";",1 What is the sign of Burmese taninganwe တနင်္ဂနွေ?,"CREATE TABLE table_name_87 (sign VARCHAR, burmese VARCHAR);","SELECT sign FROM table_name_87 WHERE burmese = ""taninganwe တနင်္ဂနွေ"";","SELECT sign FROM table_name_87 WHERE burmese = ""taninganwe "";",0 Name the date for oliver stone,"CREATE TABLE table_1566852_5 (date VARCHAR, interview_subject VARCHAR);","SELECT date FROM table_1566852_5 WHERE interview_subject = ""Oliver Stone"";","SELECT date FROM table_1566852_5 WHERE interview_subject = ""Oliver Stone"";",1 What is the total weight of freight forwarded from Canada to Australia?,"CREATE TABLE Freight (id INT, item VARCHAR(50), weight FLOAT, country VARCHAR(50)); ",SELECT SUM(weight) FROM Freight f1 INNER JOIN Freight f2 ON f1.item = f2.item WHERE f1.country = 'Canada' AND f2.country = 'Australia';,SELECT SUM(weight) FROM Freight WHERE country = 'Canada' AND country = 'Australia';,0 Which organizations have received donations from donors with the last name 'Smith'?,"CREATE TABLE donors (donor_id INT, first_name TEXT, last_name TEXT, donation_amount FLOAT); CREATE TABLE donations (donation_id INT, donor_id INT, organization_id INT, donation_amount FLOAT); CREATE TABLE organizations (organization_id INT, organization_name TEXT); ",SELECT organizations.organization_name FROM organizations INNER JOIN donations ON organizations.organization_id = donations.organization_id INNER JOIN donors ON donations.donor_id = donors.donor_id WHERE donors.last_name = 'Smith';,SELECT organizations.organization_name FROM organizations INNER JOIN donations ON organizations.organization_id = donations.organization_id INNER JOIN donors ON donations.donor_id = donors.donor_id INNER JOIN organizations ON donations.organization_id = organizations.organization_id WHERE donors.last_name = 'Smith';,0 What is the average amount donated by all donors in the last month?,"CREATE TABLE Donor (DonorID int, DonorName varchar(50), Country varchar(50)); CREATE TABLE Donation (DonationID int, DonorID int, DonationAmount int, DonationDate date);","SELECT AVG(DonationAmount) as AvgDonation FROM Donation JOIN Donor ON Donation.DonorID = Donor.DonorID WHERE DonationDate >= DATEADD(month, -1, GETDATE());","SELECT AVG(DonationAmount) FROM Donation JOIN Donor ON Donation.DonorID = Donor.DonorID WHERE DonationDate >= DATEADD(month, -1, GETDATE());",0 What is the nationality of Shayne Wright?,"CREATE TABLE table_1013129_11 (nationality VARCHAR, player VARCHAR);","SELECT nationality FROM table_1013129_11 WHERE player = ""Shayne Wright"";","SELECT nationality FROM table_1013129_11 WHERE player = ""Shayne Wright"";",1 On what date was the score 1-2 at Athens Olympic Stadium?,"CREATE TABLE table_name_37 (date VARCHAR, score VARCHAR, venue VARCHAR);","SELECT date FROM table_name_37 WHERE score = ""1-2"" AND venue = ""athens olympic stadium"";","SELECT date FROM table_name_37 WHERE score = ""1-2"" AND venue = ""athens olympic stadium"";",1 What is the average billable hours per case for attorneys in the 'nyc' region?,"CREATE TABLE time_tracking (attorney TEXT, cases TEXT, billable_hours DECIMAL(5,2)); ",SELECT AVG(billable_hours) as avg_billable_hours FROM time_tracking JOIN attorneys ON time_tracking.attorney = attorneys.name WHERE attorneys.region = 'nyc';,SELECT AVG(billable_hours) FROM time_tracking WHERE attorney LIKE '%nyc%';,0 What is the status of Author Del Corro?,"CREATE TABLE table_name_84 (status VARCHAR, authors VARCHAR);","SELECT status FROM table_name_84 WHERE authors = ""del corro"";","SELECT status FROM table_name_84 WHERE authors = ""del corro"";",1 Update the waste generation for plastic in the city of Chicago to 2000 grams in the second quarter of 2021.,"CREATE TABLE waste_generation (city VARCHAR(255), quarter INT, material_type VARCHAR(255), generation_grams INT); ",UPDATE waste_generation SET generation_grams = 2000 WHERE city = 'Chicago' AND quarter = 2 AND material_type = 'Plastic';,UPDATE waste_generation SET generation_grams = 2000 WHERE city = 'Chicago' AND material_type = 'plastic' AND quarter = 2;,0 How many unique donors have there been in each cause area?,"CREATE TABLE unique_donors (donor_id INT, cause_area VARCHAR(20), donation_date DATE); ","SELECT cause_area, COUNT(DISTINCT donor_id) AS unique_donors FROM unique_donors GROUP BY cause_area;","SELECT cause_area, COUNT(DISTINCT donor_id) FROM unique_donors GROUP BY cause_area;",0 What was the attendance in the game against the Detroit Lions?,"CREATE TABLE table_name_15 (attendance VARCHAR, opponent VARCHAR);","SELECT attendance FROM table_name_15 WHERE opponent = ""detroit lions"";","SELECT attendance FROM table_name_15 WHERE opponent = ""detroit lions"";",1 How many games have been designed by each game design studio?,"CREATE TABLE GameDesign (GameID INT, Studio VARCHAR(50)); ","SELECT Studio, COUNT(*) as GameCount FROM GameDesign GROUP BY Studio;","SELECT Studio, COUNT(*) FROM GameDesign GROUP BY Studio;",0 What was the location and attendance when lebron james (10) had the high assists?,"CREATE TABLE table_27713030_16 (location_attendance VARCHAR, high_assists VARCHAR);","SELECT location_attendance FROM table_27713030_16 WHERE high_assists = ""LeBron James (10)"";","SELECT location_attendance FROM table_27713030_16 WHERE high_assists = ""Lebron James (10)"";",0 Date of april 9 had what score?,"CREATE TABLE table_name_11 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_11 WHERE date = ""april 9"";","SELECT score FROM table_name_11 WHERE date = ""april 9"";",1 "What was the average attendance on October 30, 1938?","CREATE TABLE table_name_33 (attendance INTEGER, date VARCHAR);","SELECT AVG(attendance) FROM table_name_33 WHERE date = ""october 30, 1938"";","SELECT AVG(attendance) FROM table_name_33 WHERE date = ""october 30, 1938"";",1 I want the driver that has Laps of 10,"CREATE TABLE table_name_59 (driver VARCHAR, laps VARCHAR);",SELECT driver FROM table_name_59 WHERE laps = 10;,SELECT driver FROM table_name_59 WHERE laps = 10;,1 Update the fairness score for 'modelY' to 85 in the 'explainable_ai' table.,"CREATE TABLE explainable_ai (model_name TEXT, fairness_score INTEGER); ",UPDATE explainable_ai SET fairness_score = 85 WHERE model_name = 'modelY';,UPDATE explainable_ai SET fairness_score = 85 WHERE model_name ='modelY';,0 Tell me the average heat rank with a lane of 2 and time less than 27.66,"CREATE TABLE table_name_48 (heat_rank INTEGER, lane VARCHAR, time VARCHAR);",SELECT AVG(heat_rank) FROM table_name_48 WHERE lane = 2 AND time < 27.66;,SELECT AVG(heat_rank) FROM table_name_48 WHERE lane = 2 AND time 27.66;,0 What is the Home team at corio oval?,"CREATE TABLE table_name_57 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_57 WHERE venue = ""corio oval"";","SELECT home_team FROM table_name_57 WHERE venue = ""corio oval"";",1 "What is the number of articles about immigration published in ""El País"" in the first quarter of 2021?","CREATE TABLE articles (id INT, title TEXT, publication TEXT, year INT, month INT, day INT, topic TEXT); ",SELECT COUNT(*) FROM articles WHERE publication = 'El País' AND topic = 'Immigration' AND year = 2021 AND month BETWEEN 1 AND 3;,SELECT COUNT(*) FROM articles WHERE publication = 'El Pas' AND year = 2021 AND month = 1 AND topic = 'Immigration';,0 Delete fish stock records from the 'Pacific Ocean' location that are older than 2019-01-01?,"CREATE TABLE FishStock (StockID INT, Location VARCHAR(50), StockDate DATE, Quantity INT); ",DELETE FROM FishStock WHERE Location = 'Pacific Ocean' AND StockDate < '2019-01-01';,DELETE FROM FishStock WHERE Location = 'Pacific Ocean' AND StockDate '2019-01-01';,0 Which carbon offset programs have an end date within the next 2 years in the carbon_offset schema?,"CREATE TABLE carbon_offset_programs (id INT, name VARCHAR(50), budget FLOAT, start_date DATE, end_date DATE); ","SELECT name FROM carbon_offset.carbon_offset_programs WHERE end_date BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 2 YEAR);","SELECT name FROM carbon_offset_programs WHERE end_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 2 YEAR) AND CURRENT_DATE;",0 What ream played later than 1958 in the kellogg's tour?,"CREATE TABLE table_name_54 (team_country VARCHAR, year VARCHAR, race_name VARCHAR);","SELECT team_country FROM table_name_54 WHERE year > 1958 AND race_name = ""kellogg's tour"";","SELECT team_country FROM table_name_54 WHERE year > 1958 AND race_name = ""kellogg's tour"";",1 How many female founders received funding in the last 3 years?,"CREATE TABLE Founders(id INT, name TEXT, gender TEXT, funding_year INT); ",SELECT COUNT(*) FROM Founders WHERE gender = 'Female' AND funding_year >= YEAR(CURRENT_DATE) - 3;,SELECT COUNT(*) FROM Founders WHERE gender = 'Female' AND funding_year >= YEAR(CURRENT_DATE) - 3;,1 Identify the number of drought-affected regions in the 'drought_impact' table with a water usage of more than 1000 cubic meters,"CREATE TABLE drought_impact (region_id INT, drought_status VARCHAR(50), water_usage FLOAT);",SELECT COUNT(*) as num_drought_affected_regions FROM drought_impact WHERE drought_status = 'affected' AND water_usage > 1000;,SELECT COUNT(*) FROM drought_impact WHERE drought_status = 'Drought' AND water_usage > 1000;,0 Identify chemical suppliers from India with safety incidents in the past 6 months.,"CREATE TABLE suppliers (id INT, supplier_name TEXT, country TEXT, last_inspection_date DATE); ","SELECT supplier_name FROM suppliers WHERE country = 'India' AND last_inspection_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) AND CURRENT_DATE AND supplier_name IN (SELECT supplier_name FROM safety_incidents);","SELECT supplier_name FROM suppliers WHERE country = 'India' AND last_inspection_date >= DATEADD(month, -6, GETDATE());",0 What was the budget for peacekeeping operations in 2020?,"CREATE TABLE budget (id INT, category VARCHAR(255), year INT, amount FLOAT); ",SELECT amount FROM budget WHERE category = 'Peacekeeping Operations' AND year = 2020;,SELECT amount FROM budget WHERE category = 'Peacekeeping Operations' AND year = 2020;,1 What are all the vicinity (km²) where profits magnificence (2007) is 2nd,"CREATE TABLE table_255812_1 (area__km²_ VARCHAR, income_class__2007_ VARCHAR);","SELECT area__km²_ FROM table_255812_1 WHERE income_class__2007_ = ""2nd"";","SELECT area__km2_ FROM table_255812_1 WHERE income_class__2007_ = ""2nd"";",0 How many community policing events were held in New York?,"CREATE TABLE ny_community_policing (id INT, event_type TEXT, event_date DATE); ",SELECT COUNT(*) FROM ny_community_policing WHERE event_type = 'Meeting' OR event_type = 'Workshop' OR event_type = 'Patrol';,SELECT COUNT(*) FROM ny_community_policing;,0 Update the 'habitat_preservation' table to set the area_protected of the 'Galapagos Islands' to 97500,"CREATE TABLE habitat_preservation (id INT, habitat_name VARCHAR(50), threat_level VARCHAR(10), area_protected INT);",UPDATE habitat_preservation SET area_protected = 97500 WHERE habitat_name = 'Galapagos Islands';,UPDATE habitat_preservation SET area_protected = 97500 WHERE habitat_name = 'Galapagos Islands';,1 "What is Score, when Outcome is Loser, and when Edition is 2011?","CREATE TABLE table_name_32 (score VARCHAR, outcome VARCHAR, edition VARCHAR);","SELECT score FROM table_name_32 WHERE outcome = ""loser"" AND edition = 2011;","SELECT score FROM table_name_32 WHERE outcome = ""loser"" AND edition = ""2011"";",0 Who loss the game when the record was 3-10?,"CREATE TABLE table_name_59 (loss VARCHAR, record VARCHAR);","SELECT loss FROM table_name_59 WHERE record = ""3-10"";","SELECT loss FROM table_name_59 WHERE record = ""3-10"";",1 What dated the episode written by is adam e. fierro & glen mazzara air?,"CREATE TABLE table_30030477_1 (original_air_date VARCHAR, written_by VARCHAR);","SELECT original_air_date FROM table_30030477_1 WHERE written_by = ""Adam E. Fierro & Glen Mazzara"";","SELECT original_air_date FROM table_30030477_1 WHERE written_by = ""Adam E. Fierro & Glen Mazzara"";",1 List all the routes that have a stop in the Downtown area,"CREATE TABLE route (route_id INT, name TEXT); CREATE TABLE stop (stop_id INT, name TEXT, route_id INT, location TEXT); ",SELECT DISTINCT r.name FROM route r JOIN stop s ON r.route_id = s.route_id WHERE s.location = 'Downtown';,SELECT r.name FROM route r JOIN stop s ON r.route_id = s.route_id WHERE s.location = 'Downtown';,0 "Which Date has a TV Time of cbs 1:00pm, and a Game Site of rca dome, and an Opponent of cincinnati bengals?","CREATE TABLE table_name_7 (date VARCHAR, opponent VARCHAR, tv_time VARCHAR, game_site VARCHAR);","SELECT date FROM table_name_7 WHERE tv_time = ""cbs 1:00pm"" AND game_site = ""rca dome"" AND opponent = ""cincinnati bengals"";","SELECT date FROM table_name_7 WHERE tv_time = ""cbs 1:00pm"" AND game_site = ""rca dome"" AND opponent = ""cincinnati bengals"";",1 How many first elected years are provided for Thomas P. Moore?,"CREATE TABLE table_2668243_8 (first_elected VARCHAR, incumbent VARCHAR);","SELECT COUNT(first_elected) FROM table_2668243_8 WHERE incumbent = ""Thomas P. Moore"";","SELECT COUNT(first_elected) FROM table_2668243_8 WHERE incumbent = ""Thomas P. Moore"";",1 What are the names of organizations that have received grants for education initiatives in the US?,"CREATE TABLE organizations (id INT, name TEXT, country TEXT); CREATE TABLE grants (id INT, organization_id INT, initiative_type TEXT, amount FLOAT); ",SELECT organizations.name FROM organizations JOIN grants ON organizations.id = grants.organization_id WHERE grants.initiative_type = 'Education' AND organizations.country = 'USA';,SELECT o.name FROM organizations o JOIN grants g ON o.id = g.organization_id WHERE o.country = 'USA' AND g.initiative_type = 'Education';,0 How many volunteers from underrepresented communities have participated in our programs in the last year?,"CREATE TABLE Volunteers (id INT, volunteer_name TEXT, community TEXT, participation_date DATE); ","SELECT community, COUNT(*) as num_volunteers FROM Volunteers WHERE participation_date >= DATEADD(year, -1, GETDATE()) AND community IN ('African American', 'Hispanic', 'Indigenous', 'LGBTQ+', 'Persons with Disabilities') GROUP BY community;","SELECT COUNT(*) FROM Volunteers WHERE community LIKE '%Underrepresented%' AND participation_date >= DATEADD(year, -1, GETDATE());",0 What are the mm dimensions for the Fujitsu fi-6130 a4 Series Scanner?,"CREATE TABLE table_16409745_1 (dimensions__mm_ VARCHAR, product VARCHAR);","SELECT dimensions__mm_ FROM table_16409745_1 WHERE product = ""Fujitsu fi-6130 A4 Series Scanner"";","SELECT dimensions__mm_ FROM table_16409745_1 WHERE product = ""Fujitsu fi-6130 a4 Series Scanner"";",0 How many Basketball games took place in the first half of 2022?,"CREATE TABLE games (id INT, game_date DATE, sport VARCHAR(50)); ",SELECT COUNT(*) FROM games WHERE sport = 'Basketball' AND game_date < '2022-07-01' AND game_date >= '2022-01-01';,SELECT COUNT(*) FROM games WHERE sport = 'Basketball' AND game_date BETWEEN '2022-01-01' AND '2022-06-30';,0 What was the Bronco's record when they played the Detroit Lions at Mile High Stadium?,"CREATE TABLE table_name_98 (record VARCHAR, game_site VARCHAR, opponent VARCHAR);","SELECT record FROM table_name_98 WHERE game_site = ""mile high stadium"" AND opponent = ""detroit lions"";","SELECT record FROM table_name_98 WHERE game_site = ""mile high stadium"" AND opponent = ""detroit lions"";",1 What is the total number of animals in 'Hope Wildlife Sanctuary' and 'Paws and Claws Rescue'?,"CREATE TABLE Hope_Wildlife_Sanctuary (Animal_ID INT, Animal_Name VARCHAR(50), Species VARCHAR(50), Age INT); CREATE TABLE Paws_and_Claws_Rescue (Animal_ID INT, Animal_Name VARCHAR(50), Species VARCHAR(50), Age INT); ",SELECT SUM(Number_of_Animals) FROM (SELECT COUNT(*) AS Number_of_Animals FROM Hope_Wildlife_Sanctuary UNION ALL SELECT COUNT(*) AS Number_of_Animals FROM Paws_and_Claws_Rescue) AS Total_Animals,SELECT COUNT(*) FROM Hope_Wildlife_Sanctuary INNER JOIN Paws_and_Claws_Rescue ON Hope_Wildlife_Sanctuary.Animal_ID = Paws_and_Claws_Rescue.Animal_ID;,0 Find the average price of skirts,"CREATE TABLE garments (id INT, category VARCHAR(50), subcategory VARCHAR(50), price DECIMAL(5,2)); ",SELECT AVG(price) FROM garments WHERE subcategory = 'Skirts';,SELECT AVG(price) FROM garments WHERE category = 'Skirts';,0 How many marine species are listed in the 'endangered' category?,"CREATE TABLE marine_species (id INTEGER, species_name VARCHAR(255), conservation_status VARCHAR(255));",SELECT COUNT(*) FROM marine_species WHERE conservation_status = 'endangered';,SELECT COUNT(*) FROM marine_species WHERE conservation_status = 'endangered';,1 Create a view that shows the percentage of electric vehicle sales out of total vehicle sales per year,"CREATE TABLE transportation.yearly_vehicle_sales (year INT, total_vehicle_sales INT, electric_vehicle_sales INT);","CREATE VIEW transportation.yearly_electric_vehicle_sales_percentage AS SELECT year, (electric_vehicle_sales * 100.0 / total_vehicle_sales)::numeric(5,2) AS percentage FROM transportation.yearly_vehicle_sales;","CREATE VIEW electric_vehicle_sales_percentage_of_total_vehicle_sales AS SELECT year, electric_vehicle_sales * 100.0 / total_vehicle_sales FROM transportation.yearly_vehicle_sales GROUP BY year;",0 What is the percentage of diverse individuals in the workforce for companies with headquarters in 'Brazil' and 'India'?,"CREATE TABLE diversity (id INT, company_id INT, gender VARCHAR(50), race VARCHAR(50), role VARCHAR(50)); CREATE TABLE company (id INT, name VARCHAR(50), founding_year INT, industry VARCHAR(50), country VARCHAR(50)); ","SELECT d.company_id, ROUND(COUNT(*) * 100.0 / (SELECT COUNT(*) FROM diversity WHERE company_id = d.company_id), 2) as percentage FROM diversity d WHERE (SELECT country FROM company WHERE id = d.company_id) IN ('Brazil', 'India') GROUP BY d.company_id;","SELECT (COUNT(DISTINCT d.company_id) * 100.0 / (SELECT COUNT(DISTINCT d.id) FROM diversity d JOIN company c ON d.company_id = c.id WHERE c.country IN ('Brazil', 'India'))) as percentage FROM diversity d JOIN company c ON d.company_id = c.id WHERE c.country IN ('Brazil', 'India') AND c.country IN ('Brazil', 'India');",0 What is the earliest implementation date for military intelligence operations?,"CREATE TABLE IntelligenceOperations (Id INT, Name VARCHAR(50), ImplementationDate DATE); ",SELECT MIN(ImplementationDate) FROM IntelligenceOperations;,SELECT MIN(ImplementationDate) FROM IntelligenceOperations;,1 Who is the community health worker with the least mental health parity consultations in Florida?,"CREATE TABLE community_health_workers (id INT, name TEXT, zip TEXT, consultations INT); CREATE VIEW fl_workers AS SELECT * FROM community_health_workers WHERE zip BETWEEN '32001' AND '34999';",SELECT name FROM fl_workers WHERE consultations = (SELECT MIN(consultations) FROM fl_workers);,SELECT name FROM community_health_workers WHERE consultations = (SELECT MIN(consultations) FROM fl_workers);,0 What was the result from the 2000 asian cup qualification?,"CREATE TABLE table_name_58 (result VARCHAR, competition VARCHAR);","SELECT result FROM table_name_58 WHERE competition = ""2000 asian cup qualification"";","SELECT result FROM table_name_58 WHERE competition = ""2000 asian cup qualification"";",1 Who built the car that has a Time/Retired of 1:36:38.887?,"CREATE TABLE table_name_66 (constructor VARCHAR, time_retired VARCHAR);","SELECT constructor FROM table_name_66 WHERE time_retired = ""1:36:38.887"";","SELECT constructor FROM table_name_66 WHERE time_retired = ""1:36:38.887"";",1 "If the rings number is 60.000, what is the number for the vault?","CREATE TABLE table_18662026_1 (vault VARCHAR, rings VARCHAR);","SELECT COUNT(vault) FROM table_18662026_1 WHERE rings = ""60.000"";","SELECT vault FROM table_18662026_1 WHERE rings = ""60.000"";",0 How many volunteers are needed to reach a total of 500 volunteer hours in each region?,"CREATE TABLE VolunteerHours (VolunteerHourID INT, VolunteerID INT, Hours INT, HourDate DATE); CREATE TABLE Volunteers (VolunteerID INT, VolunteerName VARCHAR(50), Region VARCHAR(50));","SELECT Volunteers.Region, SUM(VolunteerHours.Hours) / 500 AS NeededVolunteers FROM Volunteers INNER JOIN VolunteerHours ON Volunteers.VolunteerID = VolunteerHours.VolunteerID GROUP BY Volunteers.Region;","SELECT v.Region, COUNT(v.VolunteerID) FROM VolunteerHours v JOIN Volunteers v ON v.VolunteerID = v.VolunteerID WHERE v.Hours = 500 GROUP BY v.Region;",0 What is the number of marine species in each conservation status category?,"CREATE TABLE species (id INT, name VARCHAR(255), conservation_status VARCHAR(255)); CREATE VIEW species_status AS SELECT conservation_status, COUNT(*) AS count FROM species GROUP BY conservation_status;",SELECT * FROM species_status;,"SELECT conservation_status, COUNT(*) FROM species_status GROUP BY conservation_status;",0 What type of cartridge is used by a Weatherby?,"CREATE TABLE table_16010376_1 (cartridge VARCHAR, source VARCHAR);","SELECT cartridge FROM table_16010376_1 WHERE source = ""Weatherby"";","SELECT cartridge FROM table_16010376_1 WHERE source = ""Weatherby"";",1 "What is the number of guests for the Viking Ingvar, built earlier than 1990?","CREATE TABLE table_name_46 (guests INTEGER, ship_name VARCHAR, year_built VARCHAR);","SELECT AVG(guests) FROM table_name_46 WHERE ship_name = ""viking ingvar"" AND year_built < 1990;","SELECT SUM(guests) FROM table_name_46 WHERE ship_name = ""viking ingvar"" AND year_built 1990;",0 What was the to par when South Africa was in T4 place?,"CREATE TABLE table_name_16 (to_par VARCHAR, place VARCHAR, country VARCHAR);","SELECT to_par FROM table_name_16 WHERE place = ""t4"" AND country = ""south africa"";","SELECT to_par FROM table_name_16 WHERE place = ""t4"" AND country = ""south africa"";",1 What are the titles of the pieces that are number 2 in season?,"CREATE TABLE table_25604014_6 (title VARCHAR, no_in_season VARCHAR);",SELECT title FROM table_25604014_6 WHERE no_in_season = 2;,SELECT title FROM table_25604014_6 WHERE no_in_season = 2;,1 "List all unique project codes and their corresponding completion statuses for rural infrastructure projects and economic diversification efforts in the 'rural_development' schema, excluding any duplicate project codes.","CREATE SCHEMA rural_development; Use rural_development; CREATE TABLE infra_diversification (project_code VARCHAR(20), completion_status VARCHAR(20)); ","SELECT DISTINCT project_code, completion_status FROM rural_development.infra_diversification;","SELECT DISTINCT project_code, completion_status FROM rural_development.infra_diversification;",1 "Find the total waste produced by each manufacturing process, ordered by the highest waste amount.","CREATE TABLE process (process_id INT, process_name VARCHAR(50)); CREATE TABLE waste (waste_id INT, process_id INT, waste_amount DECIMAL(5,2)); ","SELECT process_name, SUM(waste_amount) AS total_waste FROM waste JOIN process ON waste.process_id = process.process_id GROUP BY process_name ORDER BY total_waste DESC;","SELECT p.process_name, SUM(w.waste_amount) as total_waste FROM process p JOIN waste w ON p.process_id = w.process_id GROUP BY p.process_name ORDER BY total_waste DESC;",0 "Insert a new record into the gyms table with gym_id 5, name 'Sydney Sports Club', city 'Sydney'","CREATE TABLE gyms (gym_id INT, name TEXT, city TEXT);","INSERT INTO gyms (gym_id, name, city) VALUES (5, 'Sydney Sports Club', 'Sydney');","INSERT INTO gyms (gym_id, name, city) VALUES (5, 'Sydney Sports Club', 'Sydney');",1 How many seals are there in the 'seals' table?,"CREATE TABLE seals (id INT, name VARCHAR(255), location VARCHAR(255));",SELECT COUNT(*) FROM seals;,SELECT COUNT(*) FROM seals;,1 What is the Score when the opponent in the final is alicia pillay on a hard surface?,"CREATE TABLE table_name_73 (score VARCHAR, surface VARCHAR, opponent_in_the_final VARCHAR);","SELECT score FROM table_name_73 WHERE surface = ""hard"" AND opponent_in_the_final = ""alicia pillay"";","SELECT score FROM table_name_73 WHERE surface = ""hard"" AND opponent_in_the_final = ""alicia pillay"";",1 Count the number of wins for each team in the 'team_performances' table.,"CREATE TABLE team_performances (team VARCHAR(20), sport VARCHAR(20), games_played INT, wins INT, losses INT, revenue DECIMAL(10,2));","SELECT team, SUM(wins) FROM team_performances GROUP BY team;","SELECT team, SUM(wins) as total_wins FROM team_performances GROUP BY team;",0 What is the total amount of seafood (in tonnes) imported by Singapore from Australia in 2021?,"CREATE TABLE seafood_imports (id INT, importer_country TEXT, exporter_country TEXT, year INT, quantity INT, unit TEXT); ",SELECT SUM(quantity) FROM seafood_imports WHERE importer_country = 'Singapore' AND exporter_country = 'Australia' AND year = 2021 AND unit = 'tonnes';,SELECT SUM(quantity) FROM seafood_imports WHERE importer_country = 'Singapore' AND exporter_country = 'Australia' AND year = 2021;,0 What is the earliest discovery date for an exoplanet?,"CREATE TABLE exoplanets (id INT, name VARCHAR(255), discovery_date DATE, discovery_method VARCHAR(255));",SELECT MIN(exoplanets.discovery_date) FROM exoplanets;,SELECT MIN(discovery_date) FROM exoplanets;,0 Name the high assists for december 14,"CREATE TABLE table_15869204_5 (high_assists VARCHAR, date VARCHAR);","SELECT high_assists FROM table_15869204_5 WHERE date = ""December 14"";","SELECT high_assists FROM table_15869204_5 WHERE date = ""December 14"";",1 "What are the total waste generation figures for urban and rural areas combined, for the year 2020?","CREATE TABLE urban_waste (waste_type TEXT, amount INTEGER, year INTEGER);CREATE TABLE rural_waste (waste_type TEXT, amount INTEGER, year INTEGER);",SELECT SUM(amount) FROM urban_waste WHERE year = 2020 UNION ALL SELECT SUM(amount) FROM rural_waste WHERE year = 2020;,SELECT SUM(urban_waste.amount) FROM urban_waste INNER JOIN rural_waste ON urban_waste.waste_type = rural_waste.waste_type WHERE urban_waste.year = 2020;,0 What is the highest number of infectious disease cases reported in a single city in 2019?,"CREATE TABLE YearlyCases (Year INT, City VARCHAR(20), Disease VARCHAR(20), NumberOfCases INT); ","SELECT City, MAX(NumberOfCases) FROM YearlyCases WHERE Year = 2019 GROUP BY City;","SELECT City, MAX(NumberOfCases) FROM YearlyCases WHERE Year = 2019 GROUP BY City;",1 What are the top 5 countries with the highest cybersecurity budgets in the last 2 years?," CREATE TABLE CountrySecurityBudget (Country VARCHAR(50), Year INT, Budget NUMERIC); "," SELECT Country, SUM(Budget) as Total_Budget FROM CountrySecurityBudget WHERE Year >= 2020 GROUP BY Country ORDER BY Total_Budget DESC LIMIT 5;","SELECT Country, Budget FROM (SELECT Country, Budget, ROW_NUMBER() OVER (ORDER BY Budget DESC) as rn FROM CountrySecurityBudget WHERE Year >= YEAR(CURRENT_DATE) - 2) t WHERE rn = 5;",0 What is the average amount donated by organizations in Asia in Q3 2022?,"CREATE TABLE Donors (DonorID int, DonorType varchar(50), Country varchar(50), AmountDonated numeric(18,2), DonationDate date); ",SELECT AVG(AmountDonated) FROM Donors WHERE DonorType = 'Organization' AND Country LIKE 'Asia%' AND QUARTER(DonationDate) = 3 AND YEAR(DonationDate) = 2022;,SELECT AVG(AmountDonated) FROM Donors WHERE Country = 'Asia' AND DonationDate BETWEEN '2022-04-01' AND '2022-06-30';,0 "Update the ""CommunityProjects"" table to reflect that the project status for the 'IrrigationInfrastructure' project changed to 'completed'","CREATE TABLE CommunityProjects (id INT PRIMARY KEY, project_name VARCHAR(255), location VARCHAR(255), status VARCHAR(255));",UPDATE CommunityProjects SET status = 'completed' WHERE project_name = 'IrrigationInfrastructure';,UPDATE CommunityProjects SET status = 'completed' WHERE project_name = 'IrrigationInfrastructure';,1 Which location did the Tigers have?,"CREATE TABLE table_name_90 (location VARCHAR, nickname VARCHAR);","SELECT location FROM table_name_90 WHERE nickname = ""tigers"";","SELECT location FROM table_name_90 WHERE nickname = ""tigers"";",1 How many electric buses were sold in South Korea in H1 of 2021?,"CREATE TABLE ElectricBuses (Id INT, Country VARCHAR(255), Year INT, Quarter INT, Buses INT); ",SELECT SUM(Buses) FROM ElectricBuses WHERE Country = 'South Korea' AND Year = 2021 AND Quarter BETWEEN 1 AND 2;,SELECT SUM(Buses) FROM ElectricBuses WHERE Country = 'South Korea' AND Year = 2021 AND Quarter = 1;,0 who had the first performance on 3 july 2011?,"CREATE TABLE table_name_26 (name VARCHAR, first_performance VARCHAR);","SELECT name FROM table_name_26 WHERE first_performance = ""3 july 2011"";","SELECT name FROM table_name_26 WHERE first_performance = ""3 july 2011"";",1 Which rural hospitals have less than 60 healthcare workers?,"CREATE TABLE rural_hospitals (id INT, name TEXT, location TEXT, num_workers INT, avg_age FLOAT); ","SELECT name, location, num_workers FROM rural_hospitals WHERE num_workers < 60;",SELECT name FROM rural_hospitals WHERE num_workers 60;,0 What is the maximum number of vulnerabilities for a single software product?,"CREATE TABLE vulnerabilities (id INT, product VARCHAR(255), severity INT); ","SELECT MAX(vulnerability_count) as max_vulnerabilities FROM (SELECT product, COUNT(*) as vulnerability_count FROM vulnerabilities GROUP BY product) as subquery;",SELECT MAX(CASE WHEN product = 'Software' THEN 1 ELSE 0 END) FROM vulnerabilities;,0 Determine the total investment in economic diversification projects in the 'econ_diversification' table.,"CREATE TABLE econ_diversification (id INT, project_name VARCHAR(255), investment_amount FLOAT); ",SELECT SUM(investment_amount) FROM econ_diversification;,SELECT SUM(investment_amount) FROM econ_diversification;,1 What is the average price of neodymium produced in Australia?,"CREATE TABLE neodymium_prices (country VARCHAR(20), price DECIMAL(5,2), year INT); ",SELECT AVG(price) FROM neodymium_prices WHERE country = 'Australia';,SELECT AVG(price) FROM neodymium_prices WHERE country = 'Australia';,1 What is the monthly revenue for a specific mobile customer?,"CREATE TABLE mobile_customers (customer_id INT, monthly_revenue FLOAT); CREATE TABLE customer_data (customer_id INT, customer_name VARCHAR(50)); ",SELECT monthly_revenue FROM mobile_customers WHERE customer_id = 1;,SELECT mobile_customers.monthly_revenue FROM mobile_customers INNER JOIN customer_data ON mobile_customers.customer_id = customer_data.customer_id;,0 "Show the number of endangered languages in each continent, ordered by the number of endangered languages in descending order.","CREATE TABLE languages (language_id INT, language_name TEXT, continent TEXT, endangered BOOLEAN); ","SELECT continent, COUNT(*) as num_endangered_langs FROM languages WHERE endangered = true GROUP BY continent ORDER BY num_endangered_langs DESC;","SELECT continent, COUNT(*) as endangered_languages FROM languages WHERE endangered = true GROUP BY continent ORDER BY endangered_languages DESC;",0 "What is the total salary cost for each department, sorted alphabetically by department name?","CREATE TABLE employee (id INT, name VARCHAR(50), department VARCHAR(50), salary INT); ","SELECT department, SUM(salary) as total_salary FROM employee GROUP BY department ORDER BY department;","SELECT department, SUM(salary) as total_salary FROM employee GROUP BY department ORDER BY total_salary DESC;",0 List the titles and authors of all investigative journalism articles and opinion pieces published by news sources in the central region.,"CREATE SCHEMA news;CREATE TABLE NewsSource (title varchar(255), author varchar(255), region varchar(10));","SELECT title, author FROM news.NewsSource WHERE (type = 'investigative' OR type = 'opinion') AND region = 'central'","SELECT title, author FROM news.newssource WHERE region = 'Central';",0 What is the total word count of articles that contain the word 'climate'?,"CREATE TABLE Articles (id INT, title VARCHAR(255), content TEXT); ","SELECT SUM(LENGTH(content) - LENGTH(REPLACE(content, 'climate', '')) + LENGTH(title)) as total_word_count FROM Articles WHERE content LIKE '%climate%' OR title LIKE '%climate%';",SELECT COUNT(*) FROM Articles WHERE content LIKE '%climate%';,0 What is Brendan Gaughan's Car #?,"CREATE TABLE table_name_72 (car__number VARCHAR, driver VARCHAR);","SELECT car__number FROM table_name_72 WHERE driver = ""brendan gaughan"";","SELECT car__number FROM table_name_72 WHERE driver = ""brendan gaghan"";",0 What horse does todd pletcher ride with odds of 14.20-1?,"CREATE TABLE table_name_84 (horse_name VARCHAR, jockey VARCHAR, post_time_odds VARCHAR);","SELECT horse_name FROM table_name_84 WHERE jockey = ""todd pletcher"" AND post_time_odds = ""14.20-1"";","SELECT horse_name FROM table_name_84 WHERE jockey = ""todd pletcher"" AND post_time_odds = ""14.20-1"";",1 What was the maximum retail sales revenue for any garment type in India?,"CREATE TABLE RetailSales (id INT, garment_type VARCHAR(20), country VARCHAR(20), revenue DECIMAL(10, 2)); ",SELECT MAX(revenue) as max_revenue FROM RetailSales WHERE country = 'India';,SELECT MAX(revenue) FROM RetailSales WHERE country = 'India';,0 How many species have been observed in each Arctic habitat type?,"CREATE TABLE habitats (habitat_id INT, habitat_name VARCHAR(50)); CREATE TABLE species (species_id INT, species_name VARCHAR(50)); CREATE TABLE species_observations (observation_id INT, species_id INT, habitat_id INT); ","SELECT h.habitat_name, COUNT(DISTINCT so.species_id) as species_count FROM habitats h JOIN species_observations so ON h.habitat_id = so.habitat_id GROUP BY h.habitat_name;","SELECT h.habitat_name, COUNT(s.species_id) FROM habitats h JOIN species s ON h.habitat_id = s.habitat_id JOIN species_observations s ON s.species_id = s.species_id GROUP BY h.habitat_name;",0 What is the number of disposals when marks is 134?,"CREATE TABLE table_name_84 (disposals VARCHAR, marks VARCHAR);","SELECT disposals FROM table_name_84 WHERE marks = ""134"";",SELECT COUNT(disposals) FROM table_name_84 WHERE marks = 134;,0 What school is in Ligonier?,"CREATE TABLE table_name_11 (school VARCHAR, location VARCHAR);","SELECT school FROM table_name_11 WHERE location = ""ligonier"";","SELECT school FROM table_name_11 WHERE location = ""ligonier"";",1 What was the minimum production yield (in pounds) for the strain 'Blue Dream' in the state of California in 2021?,"CREATE TABLE production (id INT, strain VARCHAR(50), state VARCHAR(50), year INT, yield FLOAT); ",SELECT MIN(yield) FROM production WHERE strain = 'Blue Dream' AND state = 'California' AND year = 2021;,SELECT MIN(yield) FROM production WHERE strain = 'Blue Dream' AND state = 'California' AND year = 2021;,1 "How many Goals have a Pct % larger than 0.557, a points value smaller than 90, and a games value larger than 68?","CREATE TABLE table_name_6 (goals_for VARCHAR, games VARCHAR, pct__percentage VARCHAR, points VARCHAR);",SELECT COUNT(goals_for) FROM table_name_6 WHERE pct__percentage > 0.557 AND points < 90 AND games > 68;,SELECT COUNT(goals_for) FROM table_name_6 WHERE pct__percentage > 0.557 AND points 90 AND games > 68;,0 Retrieve the total number of wells drilled in the past year by each operator,"CREATE TABLE operators (operator_id INT, operator_name TEXT); CREATE TABLE wells (well_id INT, operator_id INT, year INT, location TEXT); ","SELECT o.operator_name, COUNT(w.well_id) AS num_wells_drilled FROM wells w JOIN operators o ON w.operator_id = o.operator_id WHERE w.year = (SELECT MAX(year) FROM wells) GROUP BY o.operator_id;","SELECT o.operator_name, COUNT(w.well_id) as total_wells FROM operators o JOIN wells w ON o.operator_id = w.operator_id WHERE w.year = 2021 GROUP BY o.operator_name;",0 "Identify the number of mitigation projects per year between 2017 and 2022, and display the total budget for each year.","CREATE TABLE climate_mitigation_projects (year INT, project VARCHAR(20), budget FLOAT); ","SELECT year, COUNT(DISTINCT project) AS num_projects, SUM(budget) AS total_budget FROM climate_mitigation_projects WHERE year BETWEEN 2017 AND 2022 GROUP BY year;","SELECT year, COUNT(*) as num_projects, SUM(budget) as total_budget FROM climate_mitigation_projects WHERE year BETWEEN 2017 AND 2022 GROUP BY year;",0 What was the opposing team for the game on August 29?,"CREATE TABLE table_name_28 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_28 WHERE date = ""august 29"";","SELECT opponent FROM table_name_28 WHERE date = ""august 29"";",1 How many digital exhibitions were launched by museums in Sydney between 2018 and 2021?,"CREATE TABLE DigitalExhibitionsSydney (id INT, exhibition_name VARCHAR(30), city VARCHAR(20), launch_date DATE); ",SELECT COUNT(*) FROM DigitalExhibitionsSydney WHERE city = 'Sydney' AND launch_date BETWEEN '2018-01-01' AND '2021-12-31';,SELECT COUNT(*) FROM DigitalExhibitionsSydney WHERE city = 'Sydney' AND launch_date BETWEEN '2018-01-01' AND '2021-12-31';,1 "In football league one, what coach was hired as a replacement on 8 October 2007","CREATE TABLE table_28181347_6 (replaced_by VARCHAR, date_of_vacancy VARCHAR);","SELECT replaced_by FROM table_28181347_6 WHERE date_of_vacancy = ""8 October 2007"";","SELECT replaced_by FROM table_28181347_6 WHERE date_of_vacancy = ""8 October 2007"";",1 In what Season was the Series Formula Renault 3.5 series with less than 7 Races?,"CREATE TABLE table_name_74 (season INTEGER, series VARCHAR, races VARCHAR);","SELECT SUM(season) FROM table_name_74 WHERE series = ""formula renault 3.5 series"" AND races < 7;","SELECT SUM(season) FROM table_name_74 WHERE series = ""formula renault 3.5"" AND races 7;",0 List the names and quantities of the top 3 most ordered dishes in 'Tasty Bites'.,"CREATE TABLE Restaurants (name text); CREATE TABLE Orders (restaurant text, dish text, quantity integer); ","SELECT dish, quantity FROM Orders WHERE restaurant = 'Tasty Bites' ORDER BY quantity DESC LIMIT 3;","SELECT Restaurants.name, Orders.quantity FROM Restaurants INNER JOIN Orders ON Restaurants.name = Orders.restaurant GROUP BY Restaurants.name ORDER BY Orders.quantity DESC LIMIT 3;",0 Did he win or lose rof 32: respect?,"CREATE TABLE table_name_47 (res VARCHAR, event VARCHAR);","SELECT res FROM table_name_47 WHERE event = ""rof 32: respect"";","SELECT res FROM table_name_47 WHERE event = ""rof 32: respect"";",1 Identify the mental health facilities that have the highest and lowest capacity for each type.,"CREATE TABLE mental_health_facilities (facility_id INT, name VARCHAR(255), location VARCHAR(255), type VARCHAR(255), capacity INT); ","SELECT facility_id, name, type, capacity, MIN(capacity) OVER(PARTITION BY type) as lowest_capacity, MAX(capacity) OVER(PARTITION BY type) as highest_capacity FROM mental_health_facilities;","SELECT type, MAX(capacity) as max_capacity, MIN(capacity) as min_capacity FROM mental_health_facilities GROUP BY type;",0 what is the minimum stage where mountains classification is aitor osa and aitor gonzález won?,"CREATE TABLE table_15088557_1 (stage INTEGER, mountains_classification VARCHAR, winner VARCHAR);","SELECT MIN(stage) FROM table_15088557_1 WHERE mountains_classification = ""Aitor Osa"" AND winner = ""Aitor González"";","SELECT MIN(stage) FROM table_15088557_1 WHERE mountains_classification = ""Aitor Osa"" AND winner = ""Aitor Gonzalez"";",0 "How many vulnerabilities were discovered in the last month, grouped by their severity levels?","CREATE TABLE vulnerabilities (id INT, severity VARCHAR(50), discovered_at TIMESTAMP);","SELECT severity, COUNT(*) as num_vulnerabilities FROM vulnerabilities WHERE discovered_at >= NOW() - INTERVAL '1 month' GROUP BY severity;","SELECT severity, COUNT(*) FROM vulnerabilities WHERE discovered_at >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) GROUP BY severity;",0 What percentage of faculty members in the Physics department are female?,"CREATE TABLE faculty (id INT, faculty_name VARCHAR(255), department VARCHAR(255), gender VARCHAR(255)); ",SELECT (COUNT(*) FILTER (WHERE gender = 'Female')) * 100.0 / COUNT(*) as percentage FROM faculty WHERE department = 'Physics';,SELECT (COUNT(*) FILTER (WHERE gender = 'Female')) * 100.0 / COUNT(*) FROM faculty WHERE department = 'Physics';,0 What was the crowd population for Footscray as an away team?,"CREATE TABLE table_name_64 (crowd INTEGER, away_team VARCHAR);","SELECT MAX(crowd) FROM table_name_64 WHERE away_team = ""footscray"";","SELECT SUM(crowd) FROM table_name_64 WHERE away_team = ""footscray"";",0 What is the total number of hotels in the 'luxury' segment with virtual tours in APAC?,"CREATE TABLE hotels_vt (id INT, segment TEXT, region TEXT, virtual_tour BOOLEAN); ","SELECT region, SUM(CASE WHEN virtual_tour THEN 1 ELSE 0 END) FROM hotels_vt WHERE segment = 'luxury' AND region = 'APAC' GROUP BY region;",SELECT COUNT(*) FROM hotels_vt WHERE segment = 'luxury' AND region = 'APAC' AND virtual_tour = true;,0 Name the vacator for failure to elect,"CREATE TABLE table_225205_3 (vacator VARCHAR, reason_for_change VARCHAR);","SELECT vacator FROM table_225205_3 WHERE reason_for_change = ""Failure to elect"";","SELECT vacator FROM table_225205_3 WHERE reason_for_change = ""Failure to elect"";",1 Name the original airdate for guy verney,"CREATE TABLE table_20345624_2 (original_airdate VARCHAR, director VARCHAR);","SELECT original_airdate FROM table_20345624_2 WHERE director = ""Guy Verney"";","SELECT original_airdate FROM table_20345624_2 WHERE director = ""Guy Vernon"";",0 "What is the maximum sustainable timber harvest volume, in cubic meters, for any timber production facility in the boreal forest biome?","CREATE TABLE sustainable_harvest (id INT, facility_name VARCHAR(255), biome VARCHAR(255), max_vol_cubic_meters INT);",SELECT MAX(max_vol_cubic_meters) FROM sustainable_harvest WHERE biome = 'boreal forest';,SELECT MAX(max_vol_cubic_meters) FROM sustainable_harvest WHERE biome = 'Boreal Forest';,0 "Get the number of users who posted content in each month of 2022, for users in the 'music' network.","CREATE TABLE posts (id INT, user_id INT, timestamp DATETIME, content TEXT, hashtags TEXT); ","SELECT MONTH(timestamp) AS month, COUNT(DISTINCT user_id) AS user_count FROM posts WHERE network = 'music' AND YEAR(timestamp) = 2022 GROUP BY month;","SELECT EXTRACT(MONTH FROM timestamp) AS month, COUNT(DISTINCT user_id) AS num_users FROM posts WHERE hashtags LIKE '%music%' GROUP BY month;",0 Insert records for 3 students in the student_mental_health table,"CREATE TABLE student_mental_health (id INT PRIMARY KEY, student_id INT, mental_health_score INT, assessment_date DATE);","INSERT INTO student_mental_health (id, student_id, mental_health_score, assessment_date) VALUES (1, 101, 60, '2021-01-15'), (2, 102, 70, '2021-02-12'), (3, 103, 80, '2021-03-18');","INSERT INTO student_mental_health (id, student_id, mental_health_score, assessment_date) VALUES (3, 'Male', '2022-01-01');",0 List all military technologies used in cyberwarfare and their descriptions,"CREATE TABLE military_technologies (id INT, technology_name VARCHAR(50), technology_type VARCHAR(50), description TEXT); ","SELECT technology_name, description FROM military_technologies WHERE technology_type = 'Cyberwarfare';","SELECT technology_name, description FROM military_technologies WHERE technology_type = 'Cyberwarfare';",1 "What is the policy number, coverage start date, and the number of claims for each policy in the 'Texas' region?","CREATE TABLE policies (policy_number INT, coverage_start_date DATE, region VARCHAR(20)); CREATE TABLE claims (claim_number INT, policy_number INT, processing_date DATE, amount INT); ","SELECT policies.policy_number, policies.coverage_start_date, COUNT(claims.claim_number) FROM policies LEFT JOIN claims ON policies.policy_number = claims.policy_number WHERE policies.region = 'Texas' GROUP BY policies.policy_number;","SELECT policies.policy_number, policies.coverage_start_date, COUNT(claims.claim_number) FROM policies INNER JOIN claims ON policies.policy_number = claims.policy_number WHERE policies.region = 'Texas' GROUP BY policies.policy_number, policies.coverage_start_date;",0 "What is the result at Dreisamstadion, Freiburg?","CREATE TABLE table_name_96 (result VARCHAR, venue VARCHAR);","SELECT result FROM table_name_96 WHERE venue = ""dreisamstadion, freiburg"";","SELECT result FROM table_name_96 WHERE venue = ""dreisamstadion, fribourg"";",0 What is the total quantity of products sold to supplier X in the year 2021?,"CREATE TABLE purchases (supplier_id VARCHAR(255), purchase_date DATE, quantity INT); ",SELECT SUM(quantity) FROM purchases WHERE supplier_id = 'X' AND YEAR(purchase_date) = 2021;,SELECT SUM(quantity) FROM purchases WHERE supplier_id = 'Supplier X' AND YEAR(purchase_date) = 2021;,0 How many circular economy initiatives were implemented in the residential sector in 2019?,"CREATE TABLE CircularEconomy (year INT, sector VARCHAR(20), initiatives INT); ",SELECT initiatives FROM CircularEconomy WHERE year = 2019 AND sector = 'residential';,SELECT initiatives FROM CircularEconomy WHERE year = 2019 AND sector = 'Residential';,0 Identify animal populations with decreasing trends over the last 3 years,"CREATE TABLE animal_population (year INT, animal_name VARCHAR(255), population INT); ","SELECT animal_name, population, LAG(population) OVER (PARTITION BY animal_name ORDER BY year) as previous_population FROM animal_population WHERE year > 2019 AND population < previous_population;","SELECT animal_name, population FROM animal_population WHERE year BETWEEN (YEAR(CURRENT_DATE) - 3) AND YEAR(CURRENT_DATE);",0 "Which Goal Difference has 13 Wins, and a Position of 3, and Played smaller than 30?","CREATE TABLE table_name_10 (goal_difference INTEGER, played VARCHAR, wins VARCHAR, position VARCHAR);",SELECT AVG(goal_difference) FROM table_name_10 WHERE wins = 13 AND position = 3 AND played < 30;,SELECT AVG(goal_difference) FROM table_name_10 WHERE wins = 13 AND position = 3 AND played 30;,0 "Insert a new professional development course with a unique course_id, course_name, and number of students who have completed the course, and update the corresponding teacher's record accordingly.","CREATE TABLE courses (course_id INT, course_name TEXT, num_completions INT); CREATE TABLE professional_development (pd_id INT, teacher_id INT, course_id INT);","INSERT INTO courses (course_id, course_name, num_completions) VALUES (12345, 'Python for Educators', 50); UPDATE professional_development pd SET pd.course_id = 12345 WHERE EXISTS (SELECT * FROM teachers t JOIN courses c ON t.teacher_id = pd.teacher_id WHERE c.course_id = 12345 AND pd.course_id != 12345);","INSERT INTO professional_development (pd_id, course_name, num_completions) VALUES ('Professional Development', 'Professional Development', num_completions) VALUES ('Professional Development', 'Professional Development', num_completions), ('Professional Development', 'Professional Development', num_completions), ('Professional Development', num_completions, num_completions) VALUES ('Professional Development', 'Professional Development', num_completions) VALUES ('Professional Development', 'Professional Development', 'Professional Development', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd', pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_id, pd_i",0 "What are the top 3 construction labor statistics by total employees, partitioned by state and ordered by the total number of employees in descending order?","CREATE TABLE LaborStatistics (State VARCHAR(2), Job VARCHAR(50), Employees INT); ","SELECT State, Job, Employees FROM (SELECT State, Job, Employees, ROW_NUMBER() OVER(PARTITION BY State ORDER BY Employees DESC) as rn FROM LaborStatistics) t WHERE rn <= 3;","SELECT State, SUM(Employees) as TotalEmployees FROM LaborStatistics GROUP BY State ORDER BY TotalEmployees DESC;",0 How many vulnerabilities were found in the 'network' asset type in the last quarter?,"CREATE TABLE vulnerabilities (id INT, asset_type VARCHAR(255), discovered_time TIMESTAMP);","SELECT COUNT(*) as vulnerability_count FROM vulnerabilities WHERE asset_type = 'network' AND discovered_time >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 MONTH);","SELECT COUNT(*) FROM vulnerabilities WHERE asset_type = 'network' AND discovered_time >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 MONTH);",0 Who are the top 5 community health workers with the highest client satisfaction score?,"CREATE TABLE client_satisfaction (worker_id INT, client_satisfaction_score INT);","SELECT worker_id, client_satisfaction_score FROM (SELECT worker_id, client_satisfaction_score, ROW_NUMBER() OVER (ORDER BY client_satisfaction_score DESC) as rn FROM client_satisfaction) x WHERE rn <= 5;","SELECT worker_id, client_satisfaction_score FROM client_satisfaction ORDER BY client_satisfaction_score DESC LIMIT 5;",0 Which garment types were most frequently restocked in the past year in the North region?,"CREATE TABLE garment (garment_id INT, garment_type VARCHAR(255), restocked_date DATE); ","SELECT garment_type, COUNT(*) as restock_count FROM garment WHERE restocked_date >= DATEADD(year, -1, CURRENT_DATE) AND region = 'North' GROUP BY garment_type ORDER BY restock_count DESC;","SELECT garment_type, COUNT(*) as num_restocked FROM garment WHERE restocked_date >= DATEADD(year, -1, GETDATE()) GROUP BY garment_type ORDER BY num_restocked DESC LIMIT 1;",0 "How many shipments were made from each warehouse location, and what is the average delivery time for each location?","CREATE TABLE warehouse_shipments (id INT, warehouse_location VARCHAR(20), num_shipments INT); CREATE TABLE shipment_deliveries (id INT, shipment_id INT, warehouse_location VARCHAR(20), delivery_time INT); ","SELECT warehouse_location, AVG(delivery_time), COUNT(*) FROM shipment_deliveries JOIN warehouse_shipments ON shipment_deliveries.warehouse_location = warehouse_shipments.warehouse_location GROUP BY warehouse_location;","SELECT warehouse_location, COUNT(*) as num_shipments, AVG(delivery_time) as avg_delivery_time FROM shipment_deliveries JOIN warehouse_shipments ON shipment_deliveries.shipment_id = warehouse_shipments.id GROUP BY warehouse_location;",0 What is the number of military personnel in each branch for each country?,"CREATE TABLE military_personnel (id INT, country VARCHAR(50), branch VARCHAR(50), num_personnel INT);","SELECT country, branch, SUM(num_personnel) as total_personnel FROM military_personnel GROUP BY country, branch;","SELECT country, branch, SUM(num_personnel) as total_personnel FROM military_personnel GROUP BY country, branch;",1 "What is the total number of games released by each studio, and the percentage of games that are VR?","CREATE TABLE games (game_id INT, game_name TEXT, genre TEXT, studio TEXT, is_vr BOOLEAN); ","SELECT games.studio, COUNT(games.game_id) AS total_games, (COUNT(games.game_id) FILTER (WHERE games.is_vr = true) * 100.0 / COUNT(games.game_id)) AS percentage_vr FROM games GROUP BY games.studio;","SELECT studio, COUNT(*) as total_games, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM games WHERE is_vr = true GROUP BY studio)) as VR_percentage FROM games GROUP BY studio;",0 "List all lipsticks that are not cruelty-free, ordered by sales volume in descending order.","CREATE TABLE products (product_id INT, name VARCHAR(255), category VARCHAR(255), cruelty_free BOOLEAN, sales_volume INT);",SELECT * FROM products WHERE category = 'lipstick' AND cruelty_free = FALSE ORDER BY sales_volume DESC;,SELECT name FROM products WHERE category = 'Lipstick' AND cruelty_free = false ORDER BY sales_volume DESC;,0 "Which Time has a Lane smaller than 4, and a Rank larger than 6?","CREATE TABLE table_name_94 (time INTEGER, lane VARCHAR, rank VARCHAR);",SELECT AVG(time) FROM table_name_94 WHERE lane < 4 AND rank > 6;,SELECT SUM(time) FROM table_name_94 WHERE lane 4 AND rank > 6;,0 Calculate the average weight of local fruits in the inventory.,"CREATE TABLE Inventory (fruit text, weight integer, is_local boolean); ",SELECT AVG(weight) FROM Inventory WHERE is_local = true;,SELECT AVG(weight) FROM Inventory WHERE is_local = true;,1 Find the total number of marine research vessels in the Mediterranean Sea that were launched after 2010.,"CREATE TABLE mediterranean_research_vessels (id INT, name TEXT, launch_year INT, region TEXT); ",SELECT COUNT(*) FROM mediterranean_research_vessels WHERE region = 'Mediterranean' AND launch_year > 2010;,SELECT COUNT(*) FROM mediterranean_research_vessels WHERE launch_year > 2010 AND region = 'Mediterranean Sea';,0 Name the ground for essendon,"CREATE TABLE table_16388047_1 (ground VARCHAR, home_team VARCHAR);","SELECT ground FROM table_16388047_1 WHERE home_team = ""Essendon"";","SELECT ground FROM table_16388047_1 WHERE home_team = ""Essendon"";",1 How many hours were spent by volunteers on each program in 2021?,"CREATE TABLE volunteer_hours (volunteer_id INT, program_id INT, hours_spent INT, hours_date DATE); CREATE TABLE programs (program_id INT, program_name TEXT); ","SELECT program_id, program_name, SUM(hours_spent) as total_hours FROM volunteer_hours JOIN programs ON volunteer_hours.program_id = programs.program_id WHERE YEAR(hours_date) = 2021 GROUP BY program_id;","SELECT programs.program_name, SUM(volunteer_hours.hours_spent) as total_hours FROM volunteer_hours INNER JOIN programs ON volunteer_hours.program_id = programs.program_id WHERE YEAR(volunteer_hours.hours_date) = 2021 GROUP BY programs.program_name;",0 Calculate the total incident count for each product in a specific year.,"CREATE TABLE ProductSafety (id INT, product_id INT, year INT, incident_count INT); ","SELECT product_id, SUM(incident_count) as total_incident_count FROM ProductSafety WHERE year = 2020 GROUP BY product_id;","SELECT product_id, SUM(incidents_count) as total_incidents FROM ProductSafety WHERE year = 2021 GROUP BY product_id;",0 "What is the average salary of workers in the 'technology' sector, grouped by union membership?","CREATE TABLE workers (id INT, name TEXT, sector TEXT, salary FLOAT, union_member BOOLEAN);","SELECT sector, AVG(salary) as avg_salary FROM workers WHERE sector = 'technology' GROUP BY union_member;","SELECT union_member, AVG(salary) FROM workers WHERE sector = 'technology' GROUP BY union_member;",0 What is the total revenue of products shipped to 'California'?,"CREATE TABLE products (product_id INT, name TEXT, revenue FLOAT, shipped_to TEXT); CREATE TABLE orders (order_id INT, product_id INT, shipped BOOLEAN); ",SELECT SUM(products.revenue) FROM products INNER JOIN orders ON products.product_id = orders.product_id WHERE products.shipped_to = 'California' AND orders.shipped = true;,SELECT SUM(products.revenue) FROM products INNER JOIN orders ON products.product_id = orders.product_id WHERE products.shipped_to = 'California';,0 "What position has a spread greater than -319, and United States as the country, a win loss of 11-13, and gabriel, marty as the name?","CREATE TABLE table_name_96 (position VARCHAR, name VARCHAR, win_loss VARCHAR, spread VARCHAR, country VARCHAR);","SELECT position FROM table_name_96 WHERE spread > -319 AND country = ""united states"" AND win_loss = ""11-13"" AND name = ""gabriel, marty"";","SELECT position FROM table_name_96 WHERE spread > -319 AND country = ""united states"" AND win_loss = ""11-13"" AND name = ""gabriel, marty"";",1 "What is the average citizen satisfaction rating for public services in Texas, and what is the median response time for these services?","CREATE TABLE citizen_satisfaction (state VARCHAR(20), service VARCHAR(20), rating FLOAT); CREATE TABLE response_times (state VARCHAR(20), service VARCHAR(20), response_time INT); ","SELECT AVG(rating) as average_rating, MEDIAN(response_time) as median_response_time FROM citizen_satisfaction INNER JOIN response_times ON citizen_satisfaction.state = response_times.state AND citizen_satisfaction.service = response_times.service WHERE citizen_satisfaction.state = 'Texas';","SELECT AVG(cs.rating) as avg_rating, AVG(rs.response_time) as avg_response_time FROM citizen_satisfaction cs INNER JOIN response_times rt ON cs.state = rt.state WHERE cs.state = 'Texas';",0 Name the most number for 74 runs margins,"CREATE TABLE table_1594772_2 (s_no INTEGER, margin VARCHAR);","SELECT MAX(s_no) FROM table_1594772_2 WHERE margin = ""74 runs"";",SELECT MAX(s_no) FROM table_1594772_2 WHERE margin = 74;,0 How tall is Daniel Orton?,"CREATE TABLE table_name_93 (height VARCHAR, player VARCHAR);","SELECT height FROM table_name_93 WHERE player = ""daniel orton"";","SELECT height FROM table_name_93 WHERE player = ""daniel orton"";",1 Add a new virtual tourism attraction to 'attractions' table,"CREATE TABLE attractions (id INT PRIMARY KEY, name VARCHAR(255), type VARCHAR(255), country VARCHAR(255));","INSERT INTO attractions (id, name, type, country) VALUES (1, 'Amazon Rainforest Virtual Tour', 'Virtual', 'Brazil');","INSERT INTO attractions (id, name, type, country) VALUES (1, 'Virtual Tourism', 'USA');",0 Which Sleeves have a Year of 2006-2008?,"CREATE TABLE table_name_67 (sleeves VARCHAR, year VARCHAR);","SELECT sleeves FROM table_name_67 WHERE year = ""2006-2008"";","SELECT sleeves FROM table_name_67 WHERE year = ""2006-2008"";",1 How many disaster response events were there in the Pacific region in the last 3 years?,"CREATE TABLE disaster_events (id INT, region VARCHAR(50), event_type VARCHAR(50), date DATE); ","SELECT region, COUNT(*) as event_count FROM disaster_events WHERE region = 'Pacific' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR) GROUP BY region;","SELECT COUNT(*) FROM disaster_events WHERE region = 'Pacific' AND event_type = 'Disaster Response' AND date >= DATEADD(year, -3, GETDATE());",0 What is the average word count of articles published by 'The Guardian' and 'The New York Times'?,"CREATE TABLE article_wordcount (id INT, newspaper VARCHAR(255), article VARCHAR(255), word_count INT); ","SELECT AVG(word_count) FROM article_wordcount WHERE newspaper IN ('The Guardian', 'The New York Times');","SELECT AVG(word_count) FROM article_wordcount WHERE newspaper IN ('The Guardian', 'The New York Times');",1 What is the maximum overall number?,CREATE TABLE table_2985714_2 (_number INTEGER);,SELECT MAX(_number) FROM table_2985714_2;,SELECT MAX(_number) FROM table_2985714_2;,1 Insert new strain 'Purple Haze' into the Strains table with a StrainID of 105.,"CREATE TABLE Strains (StrainID INT, StrainName VARCHAR(50));","INSERT INTO Strains (StrainID, StrainName) VALUES (105, 'Purple Haze');","INSERT INTO Strains (StrainID, StrainName) VALUES (105, 'Purple Haze');",1 "What is the total claim amount per policy type, quarter, and region?","CREATE TABLE Claims (ClaimID INT, PolicyID INT, ClaimAmount DECIMAL(10, 2), ClaimDate DATE, Region VARCHAR(255)); ","SELECT PolicyType, Region, EXTRACT(QUARTER FROM ClaimDate) AS Quarter, SUM(ClaimAmount) AS TotalClaimAmount FROM Claims GROUP BY PolicyType, Region, Quarter;","SELECT PolicyType, Quarter, Region, SUM(ClaimAmount) as TotalClaimAmount FROM Claims GROUP BY PolicyType, Quarter, Region;",0 What is the maximum age of patients who received psychotherapy in Canada?,"CREATE TABLE patients (id INT, age INT, country VARCHAR(20)); CREATE TABLE therapies (id INT, patient_id INT, therapy VARCHAR(20)); ",SELECT MAX(patients.age) FROM patients INNER JOIN therapies ON patients.id = therapies.patient_id WHERE therapies.therapy = 'Psychotherapy' AND patients.country = 'Canada';,SELECT MAX(patients.age) FROM patients INNER JOIN therapies ON patients.id = therapies.patient_id WHERE patients.country = 'Canada';,0 What company collaborated in SBI-087 for rheumatoid arthritis?,"CREATE TABLE table_name_7 (collaboration VARCHAR, name VARCHAR, indication VARCHAR);","SELECT collaboration FROM table_name_7 WHERE name = ""sbi-087"" AND indication = ""rheumatoid arthritis"";","SELECT collaboration FROM table_name_7 WHERE name = ""sbi-087"" AND indication = ""rheumatoid arthritis"";",1 What are the names and completion statuses of all economic diversification projects in the 'rural_development' schema?,"CREATE SCHEMA rural_development; Use rural_development; CREATE TABLE eco_diversification (project_id INT, project_name VARCHAR(50), completion_status VARCHAR(20)); ","SELECT project_name, completion_status FROM rural_development.eco_diversification;","SELECT project_name, completion_status FROM rural_development.eco_diversification;",1 When yakup şener is the athlete what is the round of 32?,"CREATE TABLE table_27294107_11 (round_of_32 VARCHAR, athlete VARCHAR);","SELECT round_of_32 FROM table_27294107_11 WHERE athlete = ""Yakup Şener"";","SELECT round_of_32 FROM table_27294107_11 WHERE athlete = ""Yakup Szener"";",0 Name the Score that has a Place of t5 of tom watson?,"CREATE TABLE table_name_45 (score VARCHAR, place VARCHAR, player VARCHAR);","SELECT score FROM table_name_45 WHERE place = ""t5"" AND player = ""tom watson"";","SELECT score FROM table_name_45 WHERE place = ""t5"" AND player = ""tom watson"";",1 List all mobile subscribers in the Americas who have exceeded their data usage limit in the last month.,"CREATE TABLE mobile_subscribers (id INT, region VARCHAR(20), data_usage INT, usage_date DATE); CREATE TABLE data_limits (id INT, subscriber_id INT, limit INT);","SELECT m.id, m.region, m.data_usage, m.usage_date FROM mobile_subscribers m INNER JOIN data_limits d ON m.id = d.subscriber_id WHERE m.region = 'Americas' AND m.usage_date > DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) AND m.data_usage > d.limit;","SELECT mobile_subscribers.region, mobile_subscribers.data_usage, mobile_subscribers.usage_date FROM mobile_subscribers INNER JOIN data_limits ON mobile_subscribers.id = data_limits.subscriber_id WHERE mobile_subscribers.region = 'Americas' AND data_limits.limit > (SELECT limit FROM data_limits WHERE usage_date >= DATEADD(month, -1, GETDATE());",0 How many parties are there?,CREATE TABLE party (Id VARCHAR);,SELECT COUNT(*) FROM party;,SELECT COUNT(*) FROM party;,1 What is the number of patients who tested positive for HIV and are over 50 years old in Chicago?,"CREATE TABLE patients (id INT, age INT, hiv TEXT, city TEXT, date DATE); ",SELECT COUNT(*) FROM patients WHERE hiv = 'Positive' AND age > 50 AND city = 'Chicago';,SELECT COUNT(*) FROM patients WHERE hiv = 'positive' AND age > 50 AND city = 'Chicago';,0 Which Home has a Score of 0:2?,"CREATE TABLE table_name_63 (home VARCHAR, score VARCHAR);","SELECT home FROM table_name_63 WHERE score = ""0:2"";","SELECT home FROM table_name_63 WHERE score = ""0:2"";",1 "What is the maximum number of assists for each player in the players table, grouped by their position, and only for players who have more than 20 assists in total?","CREATE TABLE players_stats (player_id INT PRIMARY KEY, player_name VARCHAR(255), position VARCHAR(50), assists INT, FOREIGN KEY (player_id) REFERENCES players(player_id));","SELECT position, MAX(assists) as max_assists FROM players_stats GROUP BY position HAVING SUM(assists) > 20;","SELECT position, MAX(assists) FROM players_stats GROUP BY position;",0 Which countries have experienced a decrease in travel advisories from 2018 to 2019?,"CREATE TABLE Advisories (country_id INT, year INT, level INT); ",SELECT country_id FROM Advisories WHERE level = (SELECT MIN(level) FROM Advisories a2 WHERE a2.country_id = Advisories.country_id) GROUP BY country_id HAVING MIN(year) = 2018 AND MAX(year) = 2019;,"SELECT country_id, year, level FROM Advisories WHERE year BETWEEN 2018 AND 2019 AND level (SELECT level FROM Advisories WHERE year BETWEEN 2018 AND 2019);",0 List all unique fields from the 'reservoir' and 'pipeline' tables.,"CREATE TABLE reservoir (well_id INT, porosity FLOAT); CREATE TABLE pipeline (well_id INT, pipeline_length INT);","SELECT field FROM (SELECT 'reservoir' as table_name, column_name as field FROM information_schema.columns WHERE table_name = 'reservoir' UNION ALL SELECT 'pipeline' as table_name, column_name as field FROM information_schema.columns WHERE table_name = 'pipeline') as subquery;",SELECT DISTINCT reservoir.well_id FROM reservoir INNER JOIN pipeline ON reservoir.well_id = pipeline.well_id;,0 How many geothermal power plants were installed in the United States from 2015 to 2020?,"CREATE TABLE geothermal_plants (id INT, name TEXT, country TEXT, year INT); ",SELECT COUNT(*) FROM geothermal_plants WHERE country = 'United States' AND year BETWEEN 2015 AND 2020;,SELECT COUNT(*) FROM geothermal_plants WHERE country = 'United States' AND year BETWEEN 2015 AND 2020;,1 How many cargo handling incidents were reported in the Indian Ocean in 2020?,"CREATE TABLE cargo_handling (id INT, incident_date DATE, region VARCHAR(50), description VARCHAR(1000));",SELECT COUNT(*) FROM cargo_handling WHERE region = 'Indian Ocean' AND YEAR(incident_date) = 2020;,SELECT COUNT(*) FROM cargo_handling WHERE region = 'Indian Ocean' AND incident_date BETWEEN '2020-01-01' AND '2020-12-31';,0 Find the names of all the product characteristics.,CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR);,SELECT DISTINCT characteristic_name FROM CHARACTERISTICS;,SELECT characteristic_name FROM CHARACTERISTICS;,0 What nation had 135 Bronze medals?,"CREATE TABLE table_name_89 (bronze VARCHAR, total VARCHAR);",SELECT COUNT(bronze) FROM table_name_89 WHERE total = 135;,SELECT bronze FROM table_name_89 WHERE total = 135;,0 Which country produced the most Europium in 2019?,"CREATE TABLE yearly_production (country VARCHAR(255), element VARCHAR(255), year INT, production INT); ","SELECT country, MAX(production) as max_production FROM yearly_production WHERE element = 'Europium' AND year = 2019 GROUP BY country;","SELECT country, SUM(production) as total_production FROM yearly_production WHERE element = 'Europium' AND year = 2019 GROUP BY country ORDER BY total_production DESC;",0 "What is the average construction cost per square meter for buildings in California, categorized by project type and construction material?","CREATE TABLE Buildings (id INT, state VARCHAR(2), project_type VARCHAR(10), construction_material VARCHAR(10), construction_cost FLOAT); ","SELECT project_type, construction_material, AVG(construction_cost) FROM Buildings WHERE state = 'CA' GROUP BY project_type, construction_material;","SELECT project_type, construction_material, AVG(construction_cost) FROM Buildings WHERE state = 'California' GROUP BY project_type, construction_material;",0 What is the number of meaning where full name is chidinma anulika?,"CREATE TABLE table_11908801_1 (meaning VARCHAR, full_name VARCHAR);","SELECT COUNT(meaning) FROM table_11908801_1 WHERE full_name = ""Chidinma Anulika"";","SELECT COUNT(meaning) FROM table_11908801_1 WHERE full_name = ""Chidinma Annika"";",0 How many safety inspections were performed in 2020 and 2021?,"CREATE TABLE IF NOT EXISTS vessel_safety (id INT PRIMARY KEY, vessel_name VARCHAR(255), safety_inspection_date DATE); ","SELECT COUNT(*) FROM vessel_safety WHERE YEAR(safety_inspection_date) IN (2020, 2021);",SELECT COUNT(*) FROM vessel_safety WHERE safety_inspection_date BETWEEN '2020-01-01' AND '2021-12-31';,0 Which exhibition had the highest number of visitors aged 60 or above?,"CREATE TABLE Exhibitions (exhibition_id INT, name VARCHAR(50), start_date DATE, end_date DATE); CREATE TABLE Visitors (visitor_id INT, exhibition_id INT, age INT, gender VARCHAR(50));","SELECT e.name, COUNT(v.visitor_id) as visitor_count FROM Exhibitions e JOIN Visitors v ON e.exhibition_id = v.exhibition_id WHERE v.age >= 60 GROUP BY e.name ORDER BY visitor_count DESC LIMIT 1;","SELECT Exhibitions.name, COUNT(Visitors.visitor_id) as visitor_count FROM Exhibitions INNER JOIN Visitors ON Exhibitions.exhibition_id = Visitors.exhibition_id WHERE Visitors.age >= 60 GROUP BY Exhibitions.name ORDER BY visitor_count DESC LIMIT 1;",0 Which country has a to par of +2 for Bernhard Langer?,"CREATE TABLE table_name_3 (country VARCHAR, to_par VARCHAR, player VARCHAR);","SELECT country FROM table_name_3 WHERE to_par = ""+2"" AND player = ""bernhard langer"";","SELECT country FROM table_name_3 WHERE to_par = ""+2"" AND player = ""bernhard langer"";",1 What is the q1+q2 time in which q1 is 1:18.574?,"CREATE TABLE table_1924975_1 (q1 VARCHAR, q2_time VARCHAR, q1_time VARCHAR);","SELECT q1 + q2_time FROM table_1924975_1 WHERE q1_time = ""1:18.574"";","SELECT q1 + q2_time FROM table_1924975_1 WHERE q1_time = ""1:18.574"";",1 "What is Surface, when Score in Final is 3-6, 6-3, 6-2?","CREATE TABLE table_name_23 (surface VARCHAR, score_in_final VARCHAR);","SELECT surface FROM table_name_23 WHERE score_in_final = ""3-6, 6-3, 6-2"";","SELECT surface FROM table_name_23 WHERE score_in_final = ""3-6, 6-3, 6-2"";",1 Find the difference in transaction amounts between the maximum and minimum transactions for each customer in the past year?,"CREATE TABLE transactions (transaction_date DATE, customer_id INT, amount DECIMAL(10,2)); ","SELECT customer_id, MAX(amount) - MIN(amount) AS amount_difference FROM transactions WHERE transaction_date >= CURRENT_DATE - INTERVAL '1 year' GROUP BY customer_id;","SELECT customer_id, MAX(amount) - MIN(amount) as difference FROM transactions WHERE transaction_date >= DATEADD(year, -1, GETDATE()) GROUP BY customer_id;",0 What is the total number of emergency calls in each region?,"CREATE TABLE Regions (RegionID INT, Name VARCHAR(50)); CREATE TABLE EmergencyCalls (CallID INT, RegionID INT);","SELECT R.Name, COUNT(EC.CallID) as NumCalls FROM Regions R INNER JOIN EmergencyCalls EC ON R.RegionID = EC.RegionID GROUP BY R.Name;","SELECT Regions.Name, COUNT(EmergencyCalls.CallID) as TotalCalls FROM Regions INNER JOIN EmergencyCalls ON Regions.RegionID = EmergencyCalls.RegionID GROUP BY Regions.Name;",0 "Find the total revenue generated by restaurants in the ""vegan"" category.","CREATE TABLE restaurants (id INT, name VARCHAR(255), category VARCHAR(255));CREATE TABLE sales (restaurant_id INT, revenue INT);",SELECT SUM(sales.revenue) FROM sales JOIN restaurants ON sales.restaurant_id = restaurants.id WHERE restaurants.category = 'vegan';,SELECT SUM(sales.revenue) FROM sales INNER JOIN restaurants ON sales.restaurant_id = restaurants.id WHERE restaurants.category ='vegan';,0 What position does the player with a first round score of 35.7 play?,"CREATE TABLE table_name_21 (pos VARCHAR, first_round VARCHAR);","SELECT pos FROM table_name_21 WHERE first_round = ""35.7"";","SELECT pos FROM table_name_21 WHERE first_round = ""35.7"";",1 List all properties in the CityOfSustainability schema with a rainwater harvesting system and their corresponding price.,"CREATE TABLE CityOfSustainability.RainwaterHarvestingBuildings (id INT, price FLOAT); ",SELECT * FROM CityOfSustainability.RainwaterHarvestingBuildings;,SELECT * FROM CityOfSustainability.RainwaterHarvestingBuildings;,1 Find the employee id for all employees who earn more than the average salary.,"CREATE TABLE employees (employee_id VARCHAR, salary INTEGER);",SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees);,SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees);,1 How many startups in the sustainability sector have a non-binary founder and have not received any funding?,"CREATE TABLE startup (id INT, name TEXT, industry TEXT, founder_gender TEXT); CREATE TABLE investment_rounds (id INT, startup_id INT, funding_round TEXT, funding_amount INT); ",SELECT COUNT(*) FROM startup LEFT JOIN investment_rounds ON startup.id = investment_rounds.startup_id WHERE startup.industry = 'Sustainability' AND startup.founder_gender = 'Non-binary' AND investment_rounds.funding_amount IS NULL;,SELECT COUNT(*) FROM startup JOIN investment_rounds ON startup.id = investment_rounds.startup_id WHERE startup.industry = 'Sustainability' AND startup.founder_gender = 'Non-binary' AND investment_rounds.funding_amount IS NULL;,0 What district did James O'Connor belong to?,"CREATE TABLE table_1342451_16 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_1342451_16 WHERE incumbent = ""James O'Connor"";","SELECT district FROM table_1342451_16 WHERE incumbent = ""James O'Connor"";",1 List the AI safety incidents in the 'AI for finance' application area that occurred in the second half of 2021.,"CREATE TABLE ai_safety_incidents (incident_id INT, incident_year INT, incident_month INT, ai_application_area VARCHAR(50));",SELECT * FROM ai_safety_incidents WHERE ai_application_area = 'AI for finance' AND incident_year = 2021 AND incident_month > 6;,"SELECT incident_id, incident_year, incident_month FROM ai_safety_incidents WHERE ai_application_area = 'AI for finance' AND incident_year BETWEEN 2021 AND 2021;",0 "What is To par, when Total is less than 297, and when Finish is ""1""?","CREATE TABLE table_name_37 (to_par VARCHAR, total VARCHAR, finish VARCHAR);","SELECT to_par FROM table_name_37 WHERE total < 297 AND finish = ""1"";","SELECT to_par FROM table_name_37 WHERE total 297 AND finish = ""1"";",0 what's the result with district illinois 15,"CREATE TABLE table_1341472_15 (result VARCHAR, district VARCHAR);","SELECT result FROM table_1341472_15 WHERE district = ""Illinois 15"";","SELECT result FROM table_1341472_15 WHERE district = ""Illinois 15"";",1 Add a new column 'total_prize_money' to the 'esports_matches' table,"CREATE TABLE esports_matches (match_id INT, team_id INT, match_result VARCHAR(10));","ALTER TABLE esports_matches ADD COLUMN total_prize_money DECIMAL(10,2);",ALTER TABLE esports_matches ADD total_prize_money;,0 What is the maximum and minimum rating of hotels in 'Africa' with a gym?,"CREATE TABLE hotel_ratings (hotel_id INT, country TEXT, rating FLOAT, has_gym BOOLEAN); ","SELECT MAX(rating) as max_rating, MIN(rating) as min_rating FROM hotel_ratings WHERE country LIKE 'Africa%' AND has_gym = true;","SELECT MAX(rating), MIN(rating) FROM hotel_ratings WHERE country = 'Africa' AND has_gym = true;",0 What is the difference in the number of sustainable fashion stores between Mexico City and Lima?,"CREATE TABLE STORES(city VARCHAR(20), type VARCHAR(20)); ",SELECT (SELECT COUNT(*) FROM STORES WHERE city = 'Mexico City' AND type = 'Sustainable Fashion') - (SELECT COUNT(*) FROM STORES WHERE city = 'Lima' AND type = 'Sustainable Fashion');,SELECT COUNT(*) FROM STORES WHERE city = 'Mexico City' AND type ='sustainable';,0 "What is the total number of wells drilled, in the Utica Shale, by all operators, for the year 2018, that had a production rate of at least 1000 barrels per day?","CREATE TABLE DrillingProduction (WellID INT, Location VARCHAR(20), DrillingOperator VARCHAR(20), ProductionYear INT, ProductionRate INT); ","SELECT DrillingOperator, COUNT(*) FROM DrillingProduction WHERE Location = 'Utica Shale' AND ProductionYear = 2018 AND ProductionRate >= 1000 GROUP BY DrillingOperator;","SELECT DrillingOperator, COUNT(*) FROM DrillingProduction WHERE Location = 'Utica Shale' AND ProductionYear = 2018 AND ProductionRate >= 1000 GROUP BY DrillingOperator;",1 What was the attendance at Moorabbin Oval?,"CREATE TABLE table_name_41 (crowd INTEGER, venue VARCHAR);","SELECT AVG(crowd) FROM table_name_41 WHERE venue = ""moorabbin oval"";","SELECT SUM(crowd) FROM table_name_41 WHERE venue = ""morabbin oval"";",0 What is the total number of marine protected areas in each country?,"CREATE TABLE country_protected_areas_count (country TEXT, num_protected_areas INT); ","SELECT country, SUM(num_protected_areas) FROM country_protected_areas_count GROUP BY country;","SELECT country, SUM(num_protected_areas) FROM country_protected_areas_count GROUP BY country;",1 How many games are shown against Houston?,"CREATE TABLE table_27721131_6 (game VARCHAR, team VARCHAR);","SELECT COUNT(game) FROM table_27721131_6 WHERE team = ""Houston"";","SELECT COUNT(game) FROM table_27721131_6 WHERE team = ""Houston"";",1 What percentage of factories use renewable energy sources?,"CREATE TABLE energy (factory_id INT, renewable BOOLEAN); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM energy)) as percentage FROM energy WHERE renewable = TRUE;,SELECT (COUNT(*) FILTER (WHERE renewable = TRUE)) * 100.0 / COUNT(*) FROM energy;,0 What name is listed under representative for the 112th congress?,"CREATE TABLE table_2841865_2 (representative VARCHAR, congress VARCHAR);","SELECT representative FROM table_2841865_2 WHERE congress = ""112th"";","SELECT representative FROM table_2841865_2 WHERE congress = ""112th"";",1 "Calculate the number of players who joined esports events in each country, per month, and rank them.","CREATE TABLE EventDates (EventID INT, EventDate DATE); ","SELECT E.EventCountry, EXTRACT(MONTH FROM E.EventDate) AS Month, COUNT(P.PlayerID) AS PlayersJoined, RANK() OVER (PARTITION BY EXTRACT(MONTH FROM E.EventDate) ORDER BY COUNT(P.PlayerID) DESC) AS Rank FROM Players P JOIN EventParticipation EP ON P.PlayerID = EP.PlayerID JOIN EventDates E ON EP.EventID = E.EventID GROUP BY E.EventCountry, EXTRACT(MONTH FROM E.EventDate)","SELECT EXTRACT(MONTH FROM EventDate) AS Month, COUNT(*) AS PlayerCount FROM EventDates GROUP BY Month ORDER BY Month;",0 What is the highest rated eco-friendly hotel in Tokyo?,"CREATE TABLE eco_hotels (hotel_id INT, hotel_name VARCHAR(100), city VARCHAR(100), rating FLOAT); ","SELECT hotel_name, MAX(rating) FROM eco_hotels WHERE city = 'Tokyo';","SELECT hotel_name, MAX(rating) FROM eco_hotels WHERE city = 'Tokyo' GROUP BY hotel_name;",0 What is the average age of players who play games in the 'rpg' genre in Europe?,"CREATE TABLE players (id INT, age INT, game_genre VARCHAR(20), location VARCHAR(20)); ",SELECT AVG(age) FROM players WHERE game_genre = 'rpg' AND location LIKE 'Europe%';,SELECT AVG(age) FROM players WHERE game_genre = 'rpg' AND location = 'Europe';,0 what is the laps when the driver is tony rolt and the grid is less than 10?,"CREATE TABLE table_name_99 (laps INTEGER, driver VARCHAR, grid VARCHAR);","SELECT SUM(laps) FROM table_name_99 WHERE driver = ""tony rolt"" AND grid < 10;","SELECT SUM(laps) FROM table_name_99 WHERE driver = ""tony rolt"" AND grid 10;",0 What is the total square footage of green-certified buildings in Chicago?,"CREATE TABLE green_buildings (city VARCHAR(20), sqft INT, certification VARCHAR(20)); ","SELECT SUM(sqft) FROM green_buildings WHERE city = 'Chicago' AND certification IN ('LEED', 'GreenGlobes');",SELECT SUM(sqft) FROM green_buildings WHERE city = 'Chicago' AND certification = 'Green';,0 What is the average healthcare spending per person in Japan?,"CREATE TABLE countries (id INT PRIMARY KEY, name VARCHAR(255), continent VARCHAR(255)); CREATE TABLE healthcare_spending (id INT PRIMARY KEY, country_id INT, year INT, spending DECIMAL(5,2)); ",SELECT AVG(spending) FROM healthcare_spending WHERE country_id = (SELECT id FROM countries WHERE name = 'Japan') GROUP BY year;,SELECT AVG(spending) FROM healthcare_spending JOIN countries ON healthcare_spending.country_id = countries.id WHERE countries.continent = 'Japan';,0 Name the fate in 1832 for pembrokeshire,"CREATE TABLE table_24329520_4 (fate_in_1832 VARCHAR, county VARCHAR);","SELECT fate_in_1832 FROM table_24329520_4 WHERE county = ""Pembrokeshire"";","SELECT fate_in_1832 FROM table_24329520_4 WHERE county = ""Pembrokeshire"";",1 What is the date recorded of Hate?,"CREATE TABLE table_name_34 (recorded VARCHAR, translation VARCHAR);","SELECT recorded FROM table_name_34 WHERE translation = ""hate"";","SELECT recorded FROM table_name_34 WHERE translation = ""hate"";",1 Which lifelong learning programs have the highest and lowest enrollment?,"CREATE TABLE lifelong_learning_enrollment (program_id INT, enrollment INT); CREATE VIEW top_enrollment AS SELECT program_id, enrollment FROM lifelong_learning_enrollment WHERE enrollment IN (SELECT MAX(enrollment) FROM lifelong_learning_enrollment) UNION SELECT program_id, enrollment FROM lifelong_learning_enrollment WHERE enrollment IN (SELECT MIN(enrollment) FROM lifelong_learning_enrollment);",SELECT program_id FROM top_enrollment;,"SELECT program_id, MAX(enrollment) AS max_enrollment, MIN(enrollment) AS min_enrollment FROM top_enrollment GROUP BY program_id ORDER BY max_enrollment DESC;",0 How many artworks were created by each artist in the 'Renaissance' period?,"CREATE TABLE artists (id INT, name TEXT); CREATE TABLE artworks (id INT, artist_id INT, title TEXT, creation_date DATE); CREATE TABLE periods (id INT, name TEXT); CREATE TABLE artwork_periods (id INT, artwork_id INT, period_id INT); ","SELECT artists.name, COUNT(artworks.id) FROM artists INNER JOIN artworks ON artists.id = artworks.artist_id INNER JOIN artwork_periods ON artworks.id = artwork_periods.artwork_id INNER JOIN periods ON artwork_periods.period_id = periods.id WHERE periods.name = 'Renaissance' GROUP BY artists.name;","SELECT a.name, COUNT(ap.id) FROM artists a JOIN artwork_periods ap ON a.id = ap.artist_id JOIN periods p ON ap.period_id = p.id JOIN artwork_periods ap ON ap.period_id = ap.id WHERE p.name = 'Renaissance' GROUP BY a.name;",0 Update the preservation status of the habitat with id 2 to 'Critical',"CREATE TABLE habitats (id INT PRIMARY KEY, location VARCHAR(50), area FLOAT, preservation_status VARCHAR(50));",UPDATE habitats SET preservation_status = 'Critical' WHERE id = 2;,UPDATE habitats SET preservation_status = 'Critical' WHERE id = 2;,1 "Determine the average annual climate finance provided by organizations based in Europe, excluding the UK","CREATE TABLE europe_org (id INT PRIMARY KEY, organization VARCHAR(255), country VARCHAR(50)); ","SELECT AVG(annual_finance) FROM (SELECT YEAR(date) AS year, SUM(amount) AS annual_finance FROM finance JOIN europe_org ON finance.organization_id = europe_org.id WHERE country NOT IN ('UK') GROUP BY YEAR(date)) AS annual_finance_table;",SELECT AVG(annual_finance) FROM europe_org WHERE country!= 'UK';,0 What is the average quantity of ingredients in dishes with meat?,"CREATE TABLE Dishes (dish_id INT, dish_name VARCHAR(50), has_meat BOOLEAN, quantity INT); ",SELECT AVG(quantity) FROM Dishes WHERE has_meat = true;,SELECT AVG(quantity) FROM Dishes WHERE has_meat = true;,1 How many graduate students are enrolled in each program by gender?,"CREATE TABLE graduate_students (id INT, program_id INT, gender VARCHAR(10)); CREATE TABLE graduate_programs (id INT, name VARCHAR(255)); ","SELECT gp.name, g.gender, COUNT(g.id) FROM graduate_students g JOIN graduate_programs gp ON g.program_id = gp.id GROUP BY gp.name, g.gender;","SELECT gs.gender, COUNT(gs.id) FROM graduate_students gs JOIN graduate_programs gp ON gs.program_id = gp.id GROUP BY gs.gender;",0 What is the maximum number of accessible technology initiatives in a region?,"CREATE TABLE accessible_technology_initiatives (id INT, initiative_name VARCHAR(50), region VARCHAR(50)); ","SELECT region, COUNT(*) as initiative_count FROM accessible_technology_initiatives GROUP BY region ORDER BY initiative_count DESC LIMIT 1;","SELECT region, MAX(COUNT(*)) FROM accessible_technology_initiatives GROUP BY region;",0 Who is the Director that has a Film title of nick carter in prague?,"CREATE TABLE table_name_66 (director VARCHAR, film_title_used_in_nomination VARCHAR);","SELECT director FROM table_name_66 WHERE film_title_used_in_nomination = ""nick carter in prague"";","SELECT director FROM table_name_66 WHERE film_title_used_in_nomination = ""nick carter in prague"";",1 How far into the postseason did the Rams go when their record was 29-7?,"CREATE TABLE table_14609295_4 (postseason VARCHAR, overall VARCHAR);","SELECT postseason FROM table_14609295_4 WHERE overall = ""29-7"";","SELECT postseason FROM table_14609295_4 WHERE overall = ""29-7"";",1 Find the number of new visitors from each continent who visited the museum in the last week.,"CREATE TABLE Visitor_Information (Visitor_ID INT, First_Visit_Date DATE, Country VARCHAR(255), Continent VARCHAR(255)); ","SELECT Continent, COUNT(DISTINCT Visitor_ID) AS Number_Of_New_Visitors FROM Visitor_Information INNER JOIN (SELECT Visitor_ID FROM Visitor_Log WHERE Visit_Date >= DATE_SUB(CURDATE(), INTERVAL 1 WEEK) GROUP BY Visitor_ID) AS New_Visitors ON Visitor_Information.Visitor_ID = New_Visitors.Visitor_ID GROUP BY Continent;","SELECT Continent, COUNT(*) FROM Visitor_Information WHERE First_Visit_Date >= DATEADD(week, -1, GETDATE()) GROUP BY Continent;",0 how many parts does detroit red wings person urban nordin play,"CREATE TABLE table_2850912_8 (position VARCHAR, nhl_team VARCHAR, player VARCHAR);","SELECT COUNT(position) FROM table_2850912_8 WHERE nhl_team = ""Detroit Red Wings"" AND player = ""Urban Nordin"";","SELECT COUNT(position) FROM table_2850912_8 WHERE nhl_team = ""Detroit Red Wings"" AND player = ""Urban Nordin"";",1 List all military innovation projects and their start dates in Europe.,"CREATE TABLE MilitaryInnovationProjects (id INT, project VARCHAR(50), country VARCHAR(50), start_date DATE); ","SELECT project, country, start_date FROM MilitaryInnovationProjects WHERE country LIKE '%Europe%';","SELECT project, start_date FROM MilitaryInnovationProjects WHERE country IN ('Germany', 'France', 'Italy', 'France', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy',",0 "What is the sum of poverty (2009) HPI-1 % when the GDP (PPP) (2012) US$ per capita of 11,284?","CREATE TABLE table_name_69 (poverty__2009__hpi_1__percentage VARCHAR, gdp__ppp___2012__us$_per_capita VARCHAR);","SELECT COUNT(poverty__2009__hpi_1__percentage) FROM table_name_69 WHERE gdp__ppp___2012__us$_per_capita = ""11,284"";","SELECT poverty__2009__hpi_1__percentage FROM table_name_69 WHERE gdp__ppp___2012__us$_per_capita = ""11,284"";",0 "What is the maximum and minimum number of attendees at cultural events in each state, grouped by state?","CREATE TABLE cultural_events (id INT, name VARCHAR(255), state VARCHAR(255), attendance INT);","SELECT state, MAX(attendance) AS max_attendance, MIN(attendance) AS min_attendance FROM cultural_events GROUP BY state;","SELECT state, MAX(attendance) as max_attendance, MIN(attendance) as min_attendance FROM cultural_events GROUP BY state;",0 How many poles were there in 1996?,"CREATE TABLE table_2182573_2 (poles INTEGER, year VARCHAR);",SELECT MIN(poles) FROM table_2182573_2 WHERE year = 1996;,SELECT MAX(poles) FROM table_2182573_2 WHERE year = 1996;,0 How many new artists were signed each month in 2022 by record labels in the USA?,"CREATE TABLE RecordLabels (LabelName TEXT, Country TEXT, Month TEXT(2), Year INTEGER, NewArtists INTEGER); ","SELECT Month, COUNT(NewArtists) as NumOfNewArtists FROM RecordLabels WHERE Country = 'USA' AND Year = 2022 GROUP BY Month;","SELECT Month, SUM(NewArtists) FROM RecordLabels WHERE Country = 'USA' AND Year = 2022 GROUP BY Month;",0 Show the maximum and minimum transaction amounts for each customer in the last month.,"CREATE TABLE customers (customer_id INT, name VARCHAR(50)); CREATE TABLE transactions (transaction_id INT, customer_id INT, transaction_amount DECIMAL(10,2)); ","SELECT customer_id, MAX(transaction_amount) as max_transaction_amount, MIN(transaction_amount) as min_transaction_amount FROM transactions WHERE transaction_date BETWEEN DATEADD(month, -1, GETDATE()) AND GETDATE() GROUP BY customer_id;","SELECT customers.name, MAX(transactions.transaction_amount) AS max_transaction_amount, MIN(transactions.transaction_amount) AS min_transaction_amount FROM customers INNER JOIN transactions ON customers.customer_id = transactions.customer_id WHERE transactions.transaction_date >= DATEADD(month, -1, GETDATE()) GROUP BY customers.name;",0 What is the total number of containers with hazardous materials that were transported by vessels owned by the ACME Shipping Company in Q3 2020?,"CREATE TABLE Hazardous_Containers (container_id INTEGER, hazardous_material BOOLEAN, vessel_name TEXT, handling_date DATE); ",SELECT COUNT(*) FROM Hazardous_Containers WHERE hazardous_material = true AND vessel_name LIKE 'ACME%' AND handling_date >= '2020-07-01' AND handling_date <= '2020-09-30';,SELECT COUNT(*) FROM Hazardous_Containers WHERE hazardous_material = TRUE AND vessel_name = 'ACME Shipping Company' AND handling_date BETWEEN '2020-04-01' AND '2020-03-31';,0 Delete the event with id 2,"CREATE TABLE events (id INT PRIMARY KEY, name VARCHAR(255), date DATE, location VARCHAR(255)); ",DELETE FROM events WHERE id = 2;,DELETE FROM events WHERE id = 2;,1 "What is Opponent In The Final, when Date is before 1991, and when Outcome is ""Runner-Up""?","CREATE TABLE table_name_30 (opponent_in_the_final VARCHAR, date VARCHAR, outcome VARCHAR);","SELECT opponent_in_the_final FROM table_name_30 WHERE date < 1991 AND outcome = ""runner-up"";","SELECT opponent_in_the_final FROM table_name_30 WHERE date 1991 AND outcome = ""runner-up"";",0 What are the names of all bridges in the 'infrastructure' schema that are taller than 100 meters?,"CREATE TABLE bridges (name VARCHAR(255), height INT); ",SELECT name FROM bridges WHERE height > 100;,SELECT name FROM bridges WHERE height > 100;,1 Tell met he score for team of waaia,"CREATE TABLE table_name_67 (score VARCHAR, team VARCHAR);","SELECT score FROM table_name_67 WHERE team = ""waaia"";","SELECT score FROM table_name_67 WHERE team = ""waaia"";",1 What is the total number of criminal cases heard in all courts in New York in 2020?,"CREATE TABLE criminal_cases (case_id INT, court_type VARCHAR(20), year INT);",SELECT COUNT(*) FROM criminal_cases WHERE year = 2020;,SELECT COUNT(*) FROM criminal_cases WHERE court_type = 'criminal' AND year = 2020;,0 Show the number of fields discovered by 'Shell',"CREATE TABLE fields (field_id INT, field_name VARCHAR(255), operator VARCHAR(255), discovery_date DATE);",SELECT COUNT(*) FROM fields WHERE operator = 'Shell';,SELECT COUNT(*) FROM fields WHERE operator = 'Shell';,1 What is the maximum number of AI patents filed by companies based in the USA?,"CREATE TABLE ai_patents (patent_id INT, company_name VARCHAR(30), country VARCHAR(20)); ",SELECT MAX(patent_id) FROM ai_patents WHERE country = 'USA';,SELECT MAX(count) FROM ai_patents WHERE country = 'USA';,0 Update the claims table and insert a new claim record for policy number 3 with a claim amount of 5000 and claim date of '2021-03-15',"CREATE TABLE claims (claim_number INT, policy_number INT, claim_amount INT, claim_date DATE);","INSERT INTO claims (claim_number, policy_number, claim_amount, claim_date) VALUES (1, 3, 5000, '2021-03-15'); UPDATE claims SET claim_amount = 6000 WHERE policy_number = 3 AND claim_date = '2020-01-01';",UPDATE claims SET claim_amount = 5000 WHERE policy_number = 3 AND claim_date = '2021-03-15';,0 "how many exposures where there when the total exposure time is 105,000s?","CREATE TABLE table_2583036_1 (exposures VARCHAR, total_exposure_time VARCHAR);","SELECT exposures FROM table_2583036_1 WHERE total_exposure_time = ""105,000s"";","SELECT COUNT(exposures) FROM table_2583036_1 WHERE total_exposure_time = ""105,000s"";",0 "What is the total number of users from Brazil who have updated their profile information in the last month, and what is the average number of posts they have made?","CREATE TABLE users (id INT, country VARCHAR(255), last_update DATE, posts_count INT);","SELECT COUNT(*), AVG(users.posts_count) FROM users WHERE country = 'Brazil' AND last_update >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH);","SELECT country, SUM(posts_count) as total_posts, AVG(posts_count) as avg_posts FROM users WHERE country = 'Brazil' AND last_update >= DATEADD(month, -1, GETDATE()) GROUP BY country;",0 What position(s) drafted by the montreal alouettes?,"CREATE TABLE table_20170644_5 (position VARCHAR, cfl_team VARCHAR);","SELECT position FROM table_20170644_5 WHERE cfl_team = ""Montreal Alouettes"";","SELECT position FROM table_20170644_5 WHERE cfl_team = ""Montreal Alouettes"";",1 Who was the cover model when the issue's pictorials was pmoy - sara jean underwood?,"CREATE TABLE table_1566852_8 (cover_model VARCHAR, pictorials VARCHAR);","SELECT cover_model FROM table_1566852_8 WHERE pictorials = ""PMOY - Sara Jean Underwood"";","SELECT cover_model FROM table_1566852_8 WHERE pictorials = ""PMoy - Sara Jean Underwood"";",0 What's the mintage when the theme was year of the rabbit?,"CREATE TABLE table_name_18 (mintage VARCHAR, theme VARCHAR);","SELECT mintage FROM table_name_18 WHERE theme = ""year of the rabbit"";","SELECT mintage FROM table_name_18 WHERE theme = ""year of the rabbit"";",1 What is the number of animals of each species in the animal population as of 2019?,"CREATE TABLE AnimalPopulation(Year INT, Species VARCHAR(20), Animals INT); ","SELECT Species, Animals FROM AnimalPopulation WHERE Year = 2019;","SELECT Species, SUM(Animals) as TotalAnimals FROM AnimalPopulation WHERE Year = 2019 GROUP BY Species;",0 When did the construction of the unit Chinon B1 with net power of 905 MW start?,"CREATE TABLE table_12983929_1 (construction_start VARCHAR, net_power VARCHAR, unit VARCHAR);","SELECT construction_start FROM table_12983929_1 WHERE net_power = ""905 MW"" AND unit = ""Chinon B1"";","SELECT construction_start FROM table_12983929_1 WHERE net_power = 905 AND unit = ""Chinon B1"";",0 Determine the total gas production for each country in the Middle East,"CREATE TABLE countries (country_id INT, country_name TEXT, region TEXT); CREATE TABLE gas_production (country_id INT, year INT, gas_production FLOAT); ","SELECT c.country_name, SUM(gp.gas_production) AS total_gas_production FROM gas_production gp JOIN countries c ON gp.country_id = c.country_id WHERE c.region = 'Middle East' GROUP BY gp.country_id;","SELECT c.country_name, SUM(gp.gas_production) as total_gas_production FROM countries c JOIN gas_production gp ON c.country_id = gp.country_id WHERE c.region = 'Middle East' GROUP BY c.country_name;",0 Jason Romano played for what team?,"CREATE TABLE table_name_9 (team VARCHAR, player VARCHAR);","SELECT team FROM table_name_9 WHERE player = ""jason romano"";","SELECT team FROM table_name_9 WHERE player = ""jason romano"";",1 What is the percentage of games won by each team?,"CREATE TABLE teams (team_id INT, team_name VARCHAR(255)); CREATE TABLE games (game_id INT, home_team_id INT, away_team_id INT, home_team_score INT, away_team_score INT); ","SELECT t.team_name, 100.0 * AVG(CASE WHEN g.home_team_id = t.team_id AND g.home_team_score > g.away_team_score THEN 1.0 ELSE 0.0 END + CASE WHEN g.away_team_id = t.team_id AND g.away_team_score > g.home_team_score THEN 1.0 ELSE 0.0 END) / COUNT(*) as pct_games_won FROM teams t INNER JOIN games g ON t.team_id IN (g.home_team_id, g.away_team_id) GROUP BY t.team_name;","SELECT t.team_name, (COUNT(g.home_team_id) * 100.0 / (SELECT COUNT(g.home_team_id) FROM games g JOIN teams t ON g.away_team_id = t.team_id)) as win_percentage FROM teams t JOIN games g ON g.home_team_id = g.home_team_id GROUP BY t.team_name;",0 "List the number of climate finance policies in Africa by year and categorize them as adaptation, mitigation, or other.","CREATE TABLE climate_finance_policies (country VARCHAR(50), policy_year INT, policy_category VARCHAR(50)); ","SELECT policy_year, policy_category, COUNT(*) FROM climate_finance_policies GROUP BY policy_year, policy_category;","SELECT policy_year, policy_category, COUNT(*) FROM climate_finance_policies WHERE country IN ('Nigeria', 'Egypt', 'South Africa') GROUP BY policy_year, policy_category;",0 "Which entry has the highest laps of those with constructor Minardi - Fondmetal, driver Marc Gené, and a grid larger than 20?","CREATE TABLE table_name_10 (laps INTEGER, grid VARCHAR, constructor VARCHAR, driver VARCHAR);","SELECT MAX(laps) FROM table_name_10 WHERE constructor = ""minardi - fondmetal"" AND driver = ""marc gené"" AND grid > 20;","SELECT MAX(laps) FROM table_name_10 WHERE constructor = ""minardi - fondmetal"" AND driver = ""marc gené"" AND grid > 20;",1 what is the single of the queen,"CREATE TABLE table_name_67 (single VARCHAR, artist VARCHAR);","SELECT single FROM table_name_67 WHERE artist = ""queen"";","SELECT single FROM table_name_67 WHERE artist = ""queen"";",1 What's the mascot of Eastern Pekin having less than 627 enrolled and an AA for their IHSAA Class?,"CREATE TABLE table_name_34 (mascot VARCHAR, school VARCHAR, enrollment VARCHAR, ihsaa_class VARCHAR);","SELECT mascot FROM table_name_34 WHERE enrollment < 627 AND ihsaa_class = ""aa"" AND school = ""eastern pekin"";","SELECT mascot FROM table_name_34 WHERE enrollment 627 AND ihsaa_class = ""aa"" AND school = ""eastern pekin"";",0 Who was the manager that was positioned 11th in table and resigned in departure?,"CREATE TABLE table_name_30 (replaced_by VARCHAR, position_in_table VARCHAR, manner_of_departure VARCHAR);","SELECT replaced_by FROM table_name_30 WHERE position_in_table = ""11th"" AND manner_of_departure = ""resigned"";","SELECT replaced_by FROM table_name_30 WHERE position_in_table = ""11th"" AND manner_of_departure = ""resigned"";",1 What was the surface type at Takao Suzuki?,"CREATE TABLE table_name_83 (surface VARCHAR, opponent_in_the_final VARCHAR);","SELECT surface FROM table_name_83 WHERE opponent_in_the_final = ""takao suzuki"";","SELECT surface FROM table_name_83 WHERE opponent_in_the_final = ""takao suzuki"";",1 "What is the total number of community policing interactions for each user, ordered by the total?","CREATE TABLE community_policing (id INT, user_id INT, interaction_type VARCHAR(255), interaction_count INT); ","SELECT user_id, SUM(interaction_count) as total_interactions FROM community_policing GROUP BY user_id ORDER BY total_interactions DESC;","SELECT user_id, SUM(interaction_count) as total_interactions FROM community_policing GROUP BY user_id ORDER BY total_interactions DESC;",1 What is the total revenue generated by vegan menu items in restaurants with a high food safety score (above 85)?,"CREATE TABLE Restaurants (RestaurantID int, RestaurantName varchar(255), City varchar(255), FoodSafetyScore int); CREATE TABLE Menu (MenuID int, RestaurantID int, MenuItem varchar(255), IsVegan bit, Price decimal(5,2)); CREATE TABLE Sales (SaleID int, MenuID int, Quantity int, SaleDate date);",SELECT SUM(M.Price * S.Quantity) as TotalRevenue FROM Menu M INNER JOIN Sales S ON M.MenuID = S.MenuID INNER JOIN Restaurants R ON S.RestaurantID = R.RestaurantID WHERE M.IsVegan = 1 AND R.FoodSafetyScore > 85;,SELECT SUM(Sales.Quantity) FROM Sales INNER JOIN Menu ON Sales.MenuID = Menu.MenuID INNER JOIN Restaurants ON Menu.RestaurantID = Restaurants.RestaurantID WHERE Menu.IsVegan = 1 AND Restaurants.FoodSafetyScore > 85;,0 How many startups have been founded by people from each country in the last 5 years?,"CREATE TABLE companies (id INT, name TEXT, founding_date DATE, founder_country TEXT);","SELECT founder_country, COUNT(*) as num_startups FROM companies WHERE founding_date >= DATE_SUB(CURDATE(), INTERVAL 5 YEAR) GROUP BY founder_country;","SELECT founder_country, COUNT(*) FROM companies WHERE founding_date >= DATEADD(year, -5, GETDATE()) GROUP BY founder_country;",0 Insert a new record into the 'operations' table for a peacekeeping mission in 'Congo',"CREATE TABLE operations (id INT PRIMARY KEY, name VARCHAR(50), region VARCHAR(50), type VARCHAR(20));","INSERT INTO operations (id, name, region, type) VALUES (1, 'MONUSCO', 'Congo', 'peacekeeping');","INSERT INTO operations (id, name, region, type) VALUES (1, 'Peacekeeping Mission', 'Congo', 'Peacekeeping');",0 List all the unique minerals being extracted in the 'Asia' region.,"CREATE TABLE Minerals_Asia (mineral TEXT, region TEXT); ",SELECT DISTINCT mineral FROM Minerals_Asia;,SELECT DISTINCT mineral FROM Minerals_Asia WHERE region = 'Asia';,0 What is the total budget allocated for each department in 2024?,"CREATE TABLE Budget (BudgetID int, DepartmentID int, Amount decimal, StartDate date, EndDate date); ","SELECT DepartmentID, SUM(Amount) as TotalBudget FROM Budget WHERE YEAR(StartDate) = 2024 AND YEAR(EndDate) = 2024 GROUP BY DepartmentID;","SELECT DepartmentID, SUM(Amount) as TotalBudget FROM Budget WHERE YEAR(StartDate) = 2024 GROUP BY DepartmentID;",0 How many renewable energy projects were completed in each region in the past 3 years?,"CREATE TABLE renewable_projects (id INT, region VARCHAR(50), completion_year INT);","SELECT region, COUNT(*) FROM renewable_projects WHERE completion_year >= YEAR(CURRENT_DATE) - 3 GROUP BY region;","SELECT region, COUNT(*) FROM renewable_projects WHERE completion_year >= YEAR(CURRENT_DATE) - 3 GROUP BY region;",1 How many cases were lost by attorneys in the 'family' department?,"CREATE TABLE cases (id INT, attorney TEXT, won BOOLEAN); ","SELECT COUNT(*) FROM cases WHERE attorney IN ('Davis', 'Evans') AND won = FALSE;",SELECT COUNT(*) FROM cases WHERE won = TRUE AND attorney LIKE '%family%';,0 "Insert a new employee record into the ""employees"" table","CREATE TABLE employees (id INT, first_name VARCHAR(50), last_name VARCHAR(50), department VARCHAR(50), hire_date DATE);","INSERT INTO employees (id, first_name, last_name, department, hire_date) VALUES (101, 'Jamal', 'Johnson', 'IT', '2022-06-01');","INSERT INTO employees (id, first_name, last_name, department, hire_date) VALUES (1, 'Joseph', 'Retired', '2022-01-01');",0 "What is the budget increase for each agency between 2019 and 2020, ranked from highest to lowest?","CREATE TABLE AgencyYearBudget (AgencyId INT, Year INT, Budget INT, PRIMARY KEY (AgencyId, Year)); ","SELECT AgencyId, (Budget - LAG(Budget, 1) OVER (PARTITION BY AgencyId ORDER BY Year)) as BudgetIncrease FROM AgencyYearBudget WHERE Year IN (2019, 2020) ORDER BY BudgetIncrease DESC;","SELECT AgencyId, Year, Budget, ROW_NUMBER() OVER (ORDER BY Budget DESC) as Rank FROM AgencyYearBudget WHERE Year BETWEEN 2019 AND 2020;",0 What is the percentage of employees in each department who identify as a racial or ethnic minority?,"CREATE TABLE EmployeeDemographics (EmployeeID INT, Department VARCHAR(20), RaceEthnicity VARCHAR(50)); ","SELECT Department, PERCENT_RANK() OVER (PARTITION BY Department ORDER BY COUNT(*)) AS Percent_Minority FROM EmployeeDemographics WHERE RaceEthnicity <> 'White' GROUP BY Department;","SELECT Department, (COUNT(*) FILTER (WHERE RaceEthnicity = 'African American')) * 100.0 / COUNT(*) FROM EmployeeDemographics GROUP BY Department;",0 "What is the total number of articles about politics and sports, and which reporters wrote them?","CREATE TABLE articles (id INT, title VARCHAR(50), category VARCHAR(20), author_id INT); CREATE TABLE authors (id INT, name VARCHAR(50)); ","SELECT COUNT(articles.id), authors.name FROM articles INNER JOIN authors ON articles.author_id = authors.id WHERE articles.category IN ('politics', 'sports') GROUP BY authors.name;","SELECT COUNT(*) as total_articles, authors.name FROM articles INNER JOIN authors ON articles.author_id = authors.id WHERE articles.category IN ('Politics', 'Sports');",0 "What is the main span in feet from a year of 2009 or more recent with a rank less than 94 and 1,310 main span metres?","CREATE TABLE table_name_69 (main_span_feet VARCHAR, main_span_metres VARCHAR, year_opened VARCHAR, rank VARCHAR);","SELECT main_span_feet FROM table_name_69 WHERE year_opened > 2009 AND rank < 94 AND main_span_metres = ""1,310"";","SELECT main_span_feet FROM table_name_69 WHERE year_opened > 2009 AND rank 94 AND main_span_metres = ""1,310"";",0 What is the total revenue generated from in-game purchases by players aged 18-24 from the 'Purchase_History' table?,"CREATE TABLE Purchase_History (Purchase_ID INT, Player_ID INT, Purchase_Amount DECIMAL, Player_Age INT);",SELECT SUM(Purchase_Amount) FROM Purchase_History WHERE Player_Age BETWEEN 18 AND 24;,SELECT SUM(Purchase_Amount) FROM Purchase_History WHERE Player_Age BETWEEN 18 AND 24;,1 What was the surface for finalist Justine Henin?,"CREATE TABLE table_name_56 (surface VARCHAR, finalist VARCHAR);","SELECT surface FROM table_name_56 WHERE finalist = ""justine henin"";","SELECT surface FROM table_name_56 WHERE finalist = ""justine henin"";",1 What is the average daily ridership of public bicycles in Australia?,"CREATE TABLE PB_Usage (id INT, system_type VARCHAR(20), country VARCHAR(50), daily_ridership INT); ",SELECT AVG(daily_ridership) as avg_daily_ridership FROM PB_Usage WHERE country = 'Australia';,SELECT AVG(daily_ridership) FROM PB_Usage WHERE system_type = 'Public Bicycle' AND country = 'Australia';,0 What is the maximum number of security incidents per sector in the last month?,"CREATE TABLE security_incidents (id INT, sector VARCHAR(255), date DATE); ","SELECT sector, MAX(count_incidents) FROM (SELECT sector, COUNT(*) AS count_incidents FROM security_incidents WHERE date >= DATE(NOW()) - INTERVAL 30 DAY GROUP BY sector) AS subquery;","SELECT sector, MAX(COUNT(*)) as max_incidents FROM security_incidents WHERE date >= DATEADD(month, -1, GETDATE()) GROUP BY sector;",0 Which art movements had the most artworks created in Asia during the 20th century?,"CREATE TABLE Artworks (ArtworkID INT, ArtworkName TEXT, Movement TEXT, Year INT); ","SELECT Movement, COUNT(*) as NumArtworks FROM Artworks WHERE Year BETWEEN 1900 AND 1999 AND Region = 'Asia' GROUP BY Movement ORDER BY NumArtworks DESC;","SELECT Movement, COUNT(*) FROM Artworks WHERE Year = 2021 GROUP BY Movement ORDER BY COUNT(*) DESC LIMIT 1;",0 What is the total number of 3rd place entries that have exactly 8 total placings?,"CREATE TABLE table_20823568_2 (third_place_s_ VARCHAR, total_placing_s_ VARCHAR);",SELECT COUNT(third_place_s_) FROM table_20823568_2 WHERE total_placing_s_ = 8;,SELECT COUNT(third_place_s_) FROM table_20823568_2 WHERE total_placing_s_ = 8;,1 What date was the match against adrián menéndez-maceiras?,"CREATE TABLE table_name_9 (date VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_9 WHERE opponent = ""adrián menéndez-maceiras"";","SELECT date FROM table_name_9 WHERE opponent = ""adrián menéndez-maceiras"";",1 "What is the fewest bronze medals when the total medals is less than 10, and the gold medals less than 0?","CREATE TABLE table_name_16 (bronze INTEGER, total VARCHAR, gold VARCHAR);",SELECT MIN(bronze) FROM table_name_16 WHERE total < 10 AND gold < 0;,SELECT MIN(bronze) FROM table_name_16 WHERE total 10 AND gold 0;,0 What is the maximum number of simultaneous login attempts recorded for a user account in the last month?,"CREATE TABLE login_attempts (id INT, user_id INT, timestamp TIMESTAMP); ","SELECT MAX(time_diff) FROM (SELECT TIMESTAMPDIFF(MINUTE, MIN(timestamp), MAX(timestamp)) AS time_diff FROM login_attempts WHERE user_id = 123 GROUP BY DATE(timestamp) HAVING COUNT(*) > 5) AS subquery;","SELECT MAX(COUNT(*)) FROM login_attempts WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH);",0 What is the lowest rank that has paul biedermann as the name?,"CREATE TABLE table_name_31 (rank INTEGER, name VARCHAR);","SELECT MIN(rank) FROM table_name_31 WHERE name = ""paul biedermann"";","SELECT MIN(rank) FROM table_name_31 WHERE name = ""paul biedermann"";",1 "Show the number of unique community organizations involved in restorative justice programs, broken down by program type","CREATE TABLE community_orgs (org_id INT, program_id INT, org_name VARCHAR(50), program_type VARCHAR(50)); ","SELECT program_type, COUNT(DISTINCT org_name) FROM community_orgs GROUP BY program_type;","SELECT program_type, COUNT(DISTINCT org_name) FROM community_orgs GROUP BY program_type;",1 "find the highest support percentage, lowest consider rate and oppose rate of all candidates.","CREATE TABLE candidate (support_rate INTEGER, consider_rate INTEGER, oppose_rate INTEGER);","SELECT MAX(support_rate), MIN(consider_rate), MIN(oppose_rate) FROM candidate;","SELECT MAX(support_rate) AS support_percentage, MIN(consider_rate) AS lowest_consider_rate, MIN(oppose_rate) AS oppose_rate FROM candidate GROUP BY consider_rate;",0 Show me the name and start date of all climate finance projects in 'Asia' that ended after 2010.,"CREATE TABLE climate_finance (project_id INT, project_name VARCHAR(255), location VARCHAR(255), start_date DATE, end_date DATE);","SELECT project_name, start_date FROM climate_finance WHERE location = 'Asia' AND end_date >= '2010-12-31';","SELECT project_name, start_date FROM climate_finance WHERE location = 'Asia' AND end_date > '2010-01-01';",0 "Display the total cargo weight per vessel, ranked in descending order.","CREATE TABLE VESSEL_TOTAL_CARGO (ID INT, VESSEL_ID INT, TOTAL_WEIGHT INT); ","SELECT V.NAME, SUM(VT.TOTAL_WEIGHT) AS TOTAL_WEIGHT, ROW_NUMBER() OVER(ORDER BY SUM(VT.TOTAL_WEIGHT) DESC) AS RANK FROM VESSEL_TOTAL_CARGO VT JOIN VESSELS V ON VT.VESSEL_ID = V.ID GROUP BY V.ID, V.NAME","SELECT VESSEL_ID, SUM(TOTAL_WEIGHT) AS Total_Weight FROM VESSEL_TOTAL_CARGO GROUP BY VESSEL_ID ORDER BY Total_Weight DESC;",0 Sport of gaelic football and hurling is what league?,"CREATE TABLE table_name_8 (league VARCHAR, sport VARCHAR);","SELECT league FROM table_name_8 WHERE sport = ""gaelic football and hurling"";","SELECT league FROM table_name_8 WHERE sport = ""gaelic football and hurling"";",1 What is the total production cost of garments made from sustainable materials?,"CREATE TABLE ProductionCosts (productID INT, materialType VARCHAR(20), cost DECIMAL(5,2)); ","SELECT SUM(cost) FROM ProductionCosts WHERE materialType IN ('Organic Cotton', 'Hemp', 'Bamboo', 'Recycled Polyester');",SELECT SUM(cost) FROM ProductionCosts WHERE materialType = 'Sustainable';,0 What is the maximum amount of waste generated per unit of product in the waste_generation_per_product table?,"CREATE TABLE waste_generation_per_product (product VARCHAR(255), waste_amount FLOAT);","SELECT product, MAX(waste_amount) FROM waste_generation_per_product GROUP BY product;",SELECT MAX(waste_amount) FROM waste_generation_per_product;,0 How many mobile subscribers have changed their plan in the state of California in the last month?,"CREATE TABLE mobile_changes (id INT, subscriber_id INT, state VARCHAR(20), change_date DATE);","SELECT state, COUNT(*) FROM mobile_changes WHERE state = 'California' AND change_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);","SELECT COUNT(*) FROM mobile_changes WHERE state = 'California' AND change_date >= DATEADD(month, -1, GETDATE());",0 Update 'games' score to 80 where player_id is 6,"CREATE TABLE games (id INT, player_id INT, score INT);",UPDATE games SET score = 80 WHERE player_id = 6;,UPDATE games SET score = 80 WHERE player_id = 6;,1 What position does Barry Rose play?,"CREATE TABLE table_name_55 (position VARCHAR, player VARCHAR);","SELECT position FROM table_name_55 WHERE player = ""barry rose"";","SELECT position FROM table_name_55 WHERE player = ""barry rose"";",1 What is the total production volume in South America?,"CREATE TABLE production (id INT, location VARCHAR(20), volume INT); ",SELECT SUM(volume) FROM production WHERE location = 'South America';,SELECT SUM(volume) FROM production WHERE location = 'South America';,1 Name the reporters for 2003,"CREATE TABLE table_22514845_2 (reporters VARCHAR, year VARCHAR);",SELECT reporters FROM table_22514845_2 WHERE year = 2003;,SELECT reporters FROM table_22514845_2 WHERE year = 2003;,1 "Insert data into 'military_equipment' for equipment_id 1, 'M1 Abrams', 'Tank', 'General Dynamics', 2000","CREATE TABLE military_equipment (equipment_id INT, name VARCHAR(255), type VARCHAR(255), manufacturer VARCHAR(255), quantity INT);","INSERT INTO military_equipment (equipment_id, name, type, manufacturer, quantity) VALUES (1, 'M1 Abrams', 'Tank', 'General Dynamics', 2000);","INSERT INTO military_equipment (equipment_id, name, type, manufacturer, quantity) VALUES (1, 'M1 Abrams', 'Tank', 'General Dynamics', 2000);",1 What is the total revenue generated from mobile and broadband services in the first quarter of 2021?,"CREATE TABLE mobile_revenue(quarter INT, revenue FLOAT); CREATE TABLE broadband_revenue(quarter INT, revenue FLOAT); ",SELECT SUM(revenue) FROM (SELECT revenue FROM mobile_revenue WHERE quarter = 1 UNION SELECT revenue FROM broadband_revenue WHERE quarter = 1);,"SELECT SUM(mobile_revenue.revenue) as total_revenue, SUM(broadband_revenue.revenue) as total_revenue FROM mobile_revenue INNER JOIN broadband_revenue ON mobile_revenue.quarter = broadband_revenue.quarter WHERE mobile_revenue.quarter = 1 AND broadband_revenue.quarter = 2021 GROUP BY mobile_revenue.quarter;",0 "What is the number of employees in the ""mining_operations"" table, who are working in the ""safety"" department and have an age greater than 30?","CREATE TABLE mining_operations (id INT, name VARCHAR(50), department VARCHAR(50), age INT);",SELECT COUNT(*) FROM mining_operations WHERE department = 'safety' AND age > 30;,SELECT COUNT(*) FROM mining_operations WHERE department ='safety' AND age > 30;,0 What is every value for Under-17 if Under-15 is Maria Elena Ubina?,"CREATE TABLE table_26368963_2 (under_17 VARCHAR, under_15 VARCHAR);","SELECT under_17 FROM table_26368963_2 WHERE under_15 = ""Maria Elena Ubina"";","SELECT under_17 FROM table_26368963_2 WHERE under_15 = ""Maria Elena Ubina"";",1 Which agricultural innovation projects received funding in South America in 2021?,"CREATE TABLE Innovation_Projects (id INT, name VARCHAR(50), location VARCHAR(50), funding DECIMAL(10,2), start_date DATE); ","SELECT name, location, funding FROM Innovation_Projects WHERE location LIKE 'Rural%' AND YEAR(start_date) = 2021;",SELECT name FROM Innovation_Projects WHERE location = 'South America' AND start_date BETWEEN '2021-01-01' AND '2021-12-31';,0 What is the record where the score is w 102–81 (ot)?,"CREATE TABLE table_13812785_8 (record VARCHAR, score VARCHAR);","SELECT record FROM table_13812785_8 WHERE score = ""W 102–81 (OT)"";","SELECT record FROM table_13812785_8 WHERE score = ""W 102–81 (OT)"";",1 What is the nation when the place is 2?,"CREATE TABLE table_26677836_1 (nation VARCHAR, place VARCHAR);",SELECT nation FROM table_26677836_1 WHERE place = 2;,SELECT nation FROM table_26677836_1 WHERE place = 2;,1 What is the total number of male and female members in unions with a 'technology' industry classification?,"CREATE TABLE unions (id INT, name VARCHAR(255), industry VARCHAR(255), member_gender VARCHAR(10), member_count INT); ","SELECT SUM(CASE WHEN member_gender = 'male' THEN member_count ELSE 0 END) as total_male, SUM(CASE WHEN member_gender = 'female' THEN member_count ELSE 0 END) as total_female FROM unions WHERE industry = 'technology';","SELECT SUM(member_count) FROM unions WHERE industry = 'technology' AND member_gender IN ('Male', 'Female');",0 Update the price of all eco-friendly garments by 5% in the US for 2022.,"CREATE TABLE garment_info (garment_type VARCHAR(20), country VARCHAR(20), year INT, is_eco_friendly BOOLEAN, price FLOAT); ",UPDATE garment_info SET price = price * 1.05 WHERE country = 'US' AND is_eco_friendly = TRUE AND year = 2022;,UPDATE garment_info SET price = price * 1.05 WHERE country = 'US' AND is_eco_friendly = true AND year = 2022;,0 Name the third district for christine young,"CREATE TABLE table_15442974_1 (third_district VARCHAR, fifth_district VARCHAR);","SELECT third_district FROM table_15442974_1 WHERE fifth_district = ""Christine Young"";","SELECT third_district FROM table_15442974_1 WHERE fifth_district = ""Christine Young"";",1 What was the location and how many attended when Golden State played? ,"CREATE TABLE table_22883210_9 (location_attendance VARCHAR, team VARCHAR);","SELECT location_attendance FROM table_22883210_9 WHERE team = ""Golden State"";","SELECT location_attendance FROM table_22883210_9 WHERE team = ""Golden State"";",1 What is the AI safety incident type with the highest frequency?,"CREATE TABLE ai_safety_incident_types (incident_type TEXT, frequency INTEGER); ",SELECT incident_type FROM ai_safety_incident_types ORDER BY frequency DESC LIMIT 1;,"SELECT incident_type, frequency FROM ai_safety_incident_types ORDER BY frequency DESC LIMIT 1;",0 Show the total capacity of geothermal projects in the 'renewables' schema.,"CREATE SCHEMA renewables; CREATE TABLE geothermal_projects (project_name VARCHAR(255), capacity INT); ",SELECT SUM(capacity) FROM renewables.geothermal_projects;,SELECT SUM(capacity) FROM renewables.geothermal_projects;,1 List all marine species with a lifespan greater than 5 years found in the Mediterranean,"CREATE TABLE marine_species (id INT, name TEXT, lifespan INT, habitat TEXT);",SELECT name FROM marine_species WHERE lifespan > 5 AND habitat = 'Mediterranean Sea';,SELECT name FROM marine_species WHERE lifespan > 5 AND habitat = 'Mediterranean';,0 "How many gains have a long greater than 8, with avg/g of 124.9?","CREATE TABLE table_name_27 (gain INTEGER, long VARCHAR, avg_g VARCHAR);",SELECT SUM(gain) FROM table_name_27 WHERE long > 8 AND avg_g = 124.9;,SELECT SUM(gain) FROM table_name_27 WHERE long > 8 AND avg_g = 124.9;,1 What is the total funding received by startups founded by BIPOC individuals before 2015?,"CREATE TABLE startups(id INT, name TEXT, founder_ethnicity TEXT, funding FLOAT, founding_year INT); ",SELECT SUM(funding) FROM startups WHERE founder_ethnicity = 'BIPOC' AND founding_year < 2015;,SELECT SUM(funding) FROM startups WHERE founder_ethnicity = 'BIPOC' AND founding_year 2015;,0 What is the total number of patients who have received group therapy in New York?,"CREATE TABLE therapy_sessions (patient_id INT, session_type VARCHAR(50)); CREATE TABLE patient_location (patient_id INT, location VARCHAR(50)); ",SELECT COUNT(DISTINCT patient_id) FROM therapy_sessions JOIN patient_location ON therapy_sessions.patient_id = patient_location.patient_id WHERE session_type = 'Group Therapy';,SELECT COUNT(*) FROM therapy_sessions INNER JOIN patient_location ON therapy_sessions.patient_id = patient_location.patient_id WHERE therapy_sessions.session_type = 'Group Therapy' AND patient_location.location = 'New York';,0 How many laps had a qualification of 136.168?,"CREATE TABLE table_name_50 (laps VARCHAR, qual VARCHAR);","SELECT COUNT(laps) FROM table_name_50 WHERE qual = ""136.168"";","SELECT laps FROM table_name_50 WHERE qual = ""136.168"";",0 "What is the number of employees who have completed diversity and inclusion training in the last 6 months, broken down by job title, ranked by the highest number of employees?","CREATE TABLE EmployeeTraining (EmployeeID INT, JobTitle VARCHAR(20), TrainingType VARCHAR(20), TrainingDate DATE); ","SELECT JobTitle, COUNT(*) as Num_Employees FROM EmployeeTraining WHERE TrainingType = 'Diversity and Inclusion' AND TrainingDate >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) GROUP BY JobTitle ORDER BY Num_Employees DESC;","SELECT JobTitle, COUNT(*) as Total_Employees FROM EmployeeTraining WHERE TrainingType = 'Diversity and Inclusion' AND TrainingDate >= DATEADD(month, -6, GETDATE()) GROUP BY JobTitle ORDER BY Total_Employees DESC;",0 Add a new column 'last_updated_date' to the 'chemical_compounds' table and update the date to '2023-02-15' for all records,"CREATE TABLE chemical_compounds (id INT PRIMARY KEY, name VARCHAR(255), safety_rating INT, manufacturing_location VARCHAR(255));",ALTER TABLE chemical_compounds ADD last_updated_date DATE; UPDATE chemical_compounds SET last_updated_date = '2023-02-15';,"ALTER TABLE chemical_compounds ADD last_updated_date INT PRIMARY KEY, name VARCHAR(255), safety_rating INT, manufacturing_location VARCHAR(255);",0 What is the total donation amount for each gender?,"CREATE TABLE Donors (DonorID INT, DonorName VARCHAR(50), Age INT, Gender VARCHAR(10), DonationAmount DECIMAL(10,2)); ","SELECT Gender, SUM(DonationAmount) FROM Donors GROUP BY Gender;","SELECT Gender, SUM(DonationAmount) FROM Donors GROUP BY Gender;",1 Display the names of investment firms that have funded at least one startup founded by an individual who identifies as LGBTQ+.,"CREATE TABLE investment (id INT, firm TEXT, startup TEXT); ",SELECT DISTINCT firm FROM investment WHERE startup IN (SELECT name FROM startup WHERE founder_identity LIKE '%LGBTQ%');,SELECT firm FROM investment WHERE startup LIKE '%LGBTQ+%' GROUP BY firm HAVING COUNT(*) >= 1;,0 What were the total games in the Big Ten conference when Nebraska lost fewer than 488 games and had a Pct less than 0.7014?,"CREATE TABLE table_name_68 (total_games INTEGER, pct VARCHAR, team VARCHAR, conference VARCHAR, lost VARCHAR);","SELECT SUM(total_games) FROM table_name_68 WHERE conference = ""big ten"" AND lost < 488 AND team = ""nebraska"" AND pct < 0.7014;","SELECT SUM(total_games) FROM table_name_68 WHERE conference = ""big ten"" AND lost 488 AND pct 0.7014;",0 What is the sitalsasthi carnival with hirakud as sambalpuri saree?,"CREATE TABLE table_name_92 (sitalsasthi_carnival VARCHAR, sambalpuri_saree VARCHAR);","SELECT sitalsasthi_carnival FROM table_name_92 WHERE sambalpuri_saree = ""hirakud"";","SELECT sitalsasthi_carnival FROM table_name_92 WHERE sambalpuri_saree = ""hirakud"";",1 What is the average cost of bridge construction projects in the state of California?,"CREATE TABLE Bridge (id INT, name TEXT, state TEXT, cost FLOAT); ",SELECT AVG(cost) FROM Bridge WHERE state = 'California' AND name LIKE '%Bridge',SELECT AVG(cost) FROM Bridge WHERE state = 'California';,0 What country is Bandar Abbas in?,"CREATE TABLE table_name_8 (country VARCHAR, city VARCHAR);","SELECT country FROM table_name_8 WHERE city = ""bandar abbas"";","SELECT country FROM table_name_8 WHERE city = ""bandar abbas"";",1 what's the total w–l where player is boro jovanović category:articles with hcards,"CREATE TABLE table_10294071_1 (total_w_l VARCHAR, player VARCHAR);","SELECT total_w_l FROM table_10294071_1 WHERE player = ""Boro Jovanović Category:Articles with hCards"";","SELECT total_w_l FROM table_10294071_1 WHERE player = ""Boro Jovanovi category:articles with hcards"";",0 What is the recycling rate in the city of Toronto for the year 2020?',"CREATE TABLE recycling_rates (city VARCHAR(20), year INT, recycling_rate FLOAT); ",SELECT recycling_rate FROM recycling_rates WHERE city = 'Toronto' AND year = 2020;,SELECT recycling_rate FROM recycling_rates WHERE city = 'Toronto' AND year = 2020;,1 "What is 2008, when 2006 is ""Grand Slam Tournaments""?",CREATE TABLE table_name_18 (Id VARCHAR);,"SELECT 2008 FROM table_name_18 WHERE 2006 = ""grand slam tournaments"";","SELECT 2008 FROM table_name_18 WHERE 2006 = ""grand slam tournaments"";",1 What position(s) do players from florida state play?,"CREATE TABLE table_15592941_1 (position VARCHAR, college VARCHAR);","SELECT position FROM table_15592941_1 WHERE college = ""Florida State"";","SELECT position FROM table_15592941_1 WHERE college = ""Florida State"";",1 Find the minimum retail price of hemp garments in the UK,"CREATE TABLE garments (id INT, garment_type VARCHAR(255), material VARCHAR(255), price DECIMAL(5,2), country VARCHAR(255));",SELECT MIN(price) FROM garments WHERE garment_type = 'Shirt' AND material = 'Hemp' AND country = 'United Kingdom';,SELECT MIN(price) FROM garments WHERE material = 'Hemp' AND country = 'UK';,0 What is the total number of successful launches for the Ariane 5 rocket?,"CREATE TABLE Ariane5Launches (id INT, launch_date DATE, launch_result VARCHAR(10));",SELECT COUNT(*) FROM Ariane5Launches WHERE launch_result = 'Success';,SELECT COUNT(*) FROM Ariane5Launches WHERE launch_result = 'Successful';,0 "What was the maximum speed for straight-4, 1.466 cc Type r 150?","CREATE TABLE table_name_60 (vmax VARCHAR, type VARCHAR, cylinder VARCHAR, capacity VARCHAR);","SELECT vmax FROM table_name_60 WHERE cylinder = ""straight-4"" AND capacity = ""1.466 cc"" AND type = ""r 150"";","SELECT vmax FROM table_name_60 WHERE cylinder = ""straight-4"" AND capacity = ""1.466 cc"" AND type = ""r 150"";",1 How many meters tall is Ulrike Wolful?,"CREATE TABLE table_23495048_2 (height__mtr_ VARCHAR, contestant VARCHAR);","SELECT height__mtr_ FROM table_23495048_2 WHERE contestant = ""Ulrike Wolful"";","SELECT height__mtr_ FROM table_23495048_2 WHERE contestant = ""Ulrike Wolful"";",1 List all missions conducted by the European Space Agency (ESA),"CREATE TABLE missions (agency VARCHAR(255), mission_name VARCHAR(255), start_date DATE, end_date DATE); ",SELECT mission_name FROM missions WHERE agency = 'ESA';,SELECT mission_name FROM missions WHERE agency = 'ESA';,1 What event did Sjerstin Vermeulen receive a 66.452 result?,"CREATE TABLE table_name_57 (event VARCHAR, athlete VARCHAR, result VARCHAR);","SELECT event FROM table_name_57 WHERE athlete = ""sjerstin vermeulen"" AND result = ""66.452"";","SELECT event FROM table_name_57 WHERE athlete = ""sjerstin vermeulen"" AND result = ""66.452"";",1 How many units of makeup products are sold in each country in the last quarter?,"CREATE TABLE sales (sale_id INT, product_id INT, sale_date DATE, quantity INT, price DECIMAL(5,2)); CREATE TABLE products (product_id INT, product_name VARCHAR(100), category VARCHAR(50), country VARCHAR(50));","SELECT sales.country, SUM(sales.quantity) FROM sales JOIN products ON sales.product_id = products.product_id WHERE products.category = 'Makeup' AND sales.sale_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 3 MONTH) GROUP BY sales.country;","SELECT p.country, SUM(s.quantity * s.price) as total_sold FROM sales s JOIN products p ON s.product_id = p.product_id WHERE s.sale_date >= DATEADD(quarter, -1, GETDATE()) GROUP BY p.country;",0 What is the power kw@RPM of the 13.180 model?,"CREATE TABLE table_11497980_1 (power_kw VARCHAR, model VARCHAR);","SELECT COUNT(power_kw) AS @rpm FROM table_11497980_1 WHERE model = ""13.180"";","SELECT power_kw FROM table_11497980_1 WHERE model = ""13.180"";",0 Calculate the average investment in rural infrastructure projects per country over the past year.,"CREATE TABLE RuralInfrastructure (ProjectID INT, Country VARCHAR(100), Investment DECIMAL(10,2), InvestmentDate DATE); ","SELECT Country, AVG(Investment) AS AvgInvestment FROM RuralInfrastructure WHERE InvestmentDate >= DATEADD(YEAR, -1, GETDATE()) GROUP BY Country;","SELECT Country, AVG(Investment) as AvgInvestment FROM RuralInfrastructure WHERE InvestmentDate >= DATEADD(year, -1, GETDATE()) GROUP BY Country;",0 What is the away team score when the away team is Essendon?,CREATE TABLE table_name_16 (away_team VARCHAR);,"SELECT away_team AS score FROM table_name_16 WHERE away_team = ""essendon"";","SELECT away_team AS score FROM table_name_16 WHERE away_team = ""essendon"";",1 List the number of military vehicles by type in each state,"CREATE TABLE military_vehicles (id INT, type VARCHAR(255), state VARCHAR(255), quantity INT); ","SELECT state, type, COUNT(quantity) as num_vehicles FROM military_vehicles GROUP BY state, type;","SELECT type, state, SUM(quantity) FROM military_vehicles GROUP BY type, state;",0 Insert new records of AI-related patents filed in 2021.,"CREATE TABLE patents (id INT, inventor_id INT, patent_year INT, ai_related BOOLEAN);","INSERT INTO patents (id, inventor_id, patent_year, ai_related) SELECT p.next_id, i.id, 2021, true FROM (SELECT ROW_NUMBER() OVER (ORDER BY name) AS next_id, id FROM inventors i WHERE i.ai_contributions = true) p WHERE p.next_id <= 10;","INSERT INTO patents (id, inventor_id, patent_year, ai_related) VALUES (1, 2021, TRUE);",0 What is the total investment in 'indigenous women-led' agricultural projects in 'Asia' up to 2022?,"CREATE TABLE agricultural_projects (project_id INT, project_name TEXT, leader TEXT, region TEXT, investment_amount INT, year INT); ",SELECT SUM(investment_amount) FROM agricultural_projects WHERE year <= 2022 AND region = 'Asia' AND leader LIKE '%indigenous woman%';,SELECT SUM(investment_amount) FROM agricultural_projects WHERE leader = 'indigenous women-led' AND region = 'Asia' AND year BETWEEN 2022 AND 2022;,0 What is the largest number of wickets when there are more than 630 maidens and a best of 7/72?,"CREATE TABLE table_name_55 (wickets INTEGER, maidens VARCHAR, best VARCHAR);","SELECT MAX(wickets) FROM table_name_55 WHERE maidens > 630 AND best = ""7/72"";","SELECT MAX(wickets) FROM table_name_55 WHERE maidens > 630 AND best = ""7/72"";",1 What is the title of episode No. 65?,"CREATE TABLE table_28195898_1 (title VARCHAR, № VARCHAR);",SELECT title FROM table_28195898_1 WHERE № = 65;,SELECT title FROM table_28195898_1 WHERE No = 65;,0 Update the safety rating of the 'Tesla Model 3' to 5.5.,"CREATE TABLE vehicle_safety (id INT PRIMARY KEY, make VARCHAR(50), model VARCHAR(50), safety_rating FLOAT); ",UPDATE vehicle_safety SET safety_rating = 5.5 WHERE make = 'Tesla' AND model = 'Model 3';,UPDATE vehicle_safety SET safety_rating = 5.5 WHERE make = 'Tesla Model 3';,0 How many electric vehicles were sold in Germany in 2021?,"CREATE TABLE Sales (Id INT, VehicleId INT, Year INT, QuantitySold INT, Country TEXT); ",SELECT SUM(QuantitySold) FROM Sales WHERE Year = 2021 AND Country = 'Germany' AND VehicleId IN (SELECT Id FROM Vehicles WHERE FuelType = 'Electric');,SELECT SUM(QuantitySold) FROM Sales WHERE Year = 2021 AND Country = 'Germany' AND VehicleId IN (SELECT VehicleId FROM Vehicles WHERE Year = 2021);,0 What is the total amount of settlement made for all the settlements?,CREATE TABLE Settlements (Amount_Settled INTEGER);,SELECT SUM(Amount_Settled) FROM Settlements;,SELECT SUM(Amount_Settled) FROM Settlements;,1 find the name of employee who was awarded the most times in the evaluation.,"CREATE TABLE evaluation (Employee_ID VARCHAR); CREATE TABLE employee (name VARCHAR, Employee_ID VARCHAR);",SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY COUNT(*) DESC LIMIT 1;,SELECT T1.name FROM employee AS T1 JOIN evaluation AS T2 ON T1.Employee_ID = T2.Employee_ID GROUP BY T1.Employee_ID ORDER BY COUNT(*) DESC LIMIT 1;,0 Find the average hours of all projects.,CREATE TABLE projects (hours INTEGER);,SELECT AVG(hours) FROM projects;,SELECT AVG(hours) FROM projects;,1 Get the carrier_name and count of shipments for each warehouse_id from the shipment table where the shipped_date is between '2021-01-01' and '2021-12-31' grouped by carrier_name and warehouse_id,"CREATE TABLE shipment (shipment_id VARCHAR(10), status VARCHAR(20), warehouse_id VARCHAR(10), carrier_name VARCHAR(30), shipped_date DATE);","SELECT carrier_name, warehouse_id, COUNT(*) as count FROM shipment WHERE shipped_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY carrier_name, warehouse_id;","SELECT carrier_name, warehouse_id, COUNT(*) FROM shipment WHERE shipped_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY carrier_name, warehouse_id;",0 Who is the co-contestant (yaar vs. Pyaar) with Vishal Singh as the main contestant?,"CREATE TABLE table_name_90 (co_contestant__yaar_vs_pyaar_ VARCHAR, main_contestant VARCHAR);","SELECT co_contestant__yaar_vs_pyaar_ FROM table_name_90 WHERE main_contestant = ""vishal singh"";","SELECT co_contestant__yaar_vs_pyaar_ FROM table_name_90 WHERE main_contestant = ""vishal singh"";",1 What is the most common mental health condition treated in Africa?,"CREATE TABLE conditions (condition_id INT, condition_name TEXT, prevalence FLOAT); CREATE TABLE treatments (treatment_id INT, condition_id INT, patient_id INT, treatment_name TEXT, start_date DATE); ","SELECT conditions.condition_name FROM conditions INNER JOIN (SELECT condition_id, COUNT(*) as treatment_count FROM treatments GROUP BY condition_id ORDER BY treatment_count DESC LIMIT 1) as subquery ON conditions.condition_id = subquery.condition_id;","SELECT conditions.condition_name, COUNT(treatments.treatment_id) as count FROM conditions INNER JOIN treatments ON conditions.condition_id = treatments.condition_id WHERE conditions.prevalence = (SELECT MAX(prevalence) FROM conditions WHERE conditions.condition_id = conditions.condition_id) GROUP BY conditions.condition_name;",0 How many wells were drilled in the 'Barents Sea' from 2015 to 2019?,"CREATE TABLE wells (well_id INT, field VARCHAR(50), region VARCHAR(50), drill_year INT, production_oil FLOAT, production_gas FLOAT); ",SELECT COUNT(*) FROM wells WHERE region = 'Barents Sea' AND drill_year BETWEEN 2015 AND 2019;,SELECT COUNT(*) FROM wells WHERE region = 'Barents Sea' AND drill_year BETWEEN 2015 AND 2019;,1 Update the district of the representative with id 1,"CREATE TABLE representatives (id INT PRIMARY KEY, name VARCHAR(255), district INT, title VARCHAR(255)); ",UPDATE representatives SET district = 5 WHERE id = 1;,UPDATE representatives SET district = district WHERE id = 1;,0 What race did Meo Constantini win at the circuit of monza ?,"CREATE TABLE table_name_36 (name VARCHAR, winning_driver VARCHAR, circuit VARCHAR);","SELECT name FROM table_name_36 WHERE winning_driver = ""meo constantini"" AND circuit = ""monza"";","SELECT name FROM table_name_36 WHERE winning_driver = ""meo constantini"" AND circuit = ""monza"";",1 During which loss was the record 48-50?,"CREATE TABLE table_name_45 (loss VARCHAR, record VARCHAR);","SELECT loss FROM table_name_45 WHERE record = ""48-50"";","SELECT loss FROM table_name_45 WHERE record = ""48-50"";",1 "What is the minimum shipment weight for deliveries to Canada after January 10, 2021?","CREATE TABLE Deliveries (id INT, weight FLOAT, destination VARCHAR(20), ship_date DATE); ",SELECT MIN(weight) FROM Deliveries WHERE destination = 'Canada' AND ship_date > '2021-01-10';,SELECT MIN(weight) FROM Deliveries WHERE destination = 'Canada' AND ship_date > '2021-01-10';,1 How many papers are published in total?,CREATE TABLE papers (Id VARCHAR);,SELECT COUNT(*) FROM papers;,SELECT COUNT(*) FROM papers;,1 What is the total volume of imported fruits in Colombia?,"CREATE TABLE Fruits (fruit_name VARCHAR(50), volume_sold INT, origin VARCHAR(50)); ",SELECT SUM(volume_sold) AS total_imported_fruits FROM Fruits WHERE origin = 'Imported';,SELECT SUM(volume_sold) FROM Fruits WHERE origin = 'Colombia';,0 What is the maximum number of games won by any team in a single season?,"CREATE TABLE games (id INT, team TEXT, season INT, home_or_away TEXT, wins INT, losses INT); ","SELECT team, MAX(wins) FROM games GROUP BY team;",SELECT MAX(wins) FROM games;,0 How many energy storage projects were announced in India in 2022?,"CREATE TABLE EnergyStorageProjects (Country VARCHAR(255), Year INT, Project VARCHAR(255), Status VARCHAR(255)); ",SELECT COUNT(*) AS NumberOfProjects FROM EnergyStorageProjects WHERE Country = 'India' AND Year = 2022 AND Status = 'Announced';,SELECT COUNT(*) FROM EnergyStorageProjects WHERE Country = 'India' AND Year = 2022;,0 What is the nationality for rank 27?,"CREATE TABLE table_name_79 (nationality VARCHAR, rank VARCHAR);",SELECT nationality FROM table_name_79 WHERE rank = 27;,SELECT nationality FROM table_name_79 WHERE rank = 27;,1 What is the name of the episode written by David Matthews?,"CREATE TABLE table_28037619_2 (title VARCHAR, written_by VARCHAR);","SELECT title FROM table_28037619_2 WHERE written_by = ""David Matthews"";","SELECT title FROM table_28037619_2 WHERE written_by = ""David Matthews"";",1 What Gender are the schools that have a Roll of 135?,"CREATE TABLE table_name_62 (gender VARCHAR, roll VARCHAR);","SELECT gender FROM table_name_62 WHERE roll = ""135"";","SELECT gender FROM table_name_62 WHERE roll = ""135"";",1 What is the number of women farmers in Rwanda who have participated in agricultural training programs since 2017?,"CREATE TABLE farmers (id INT, name VARCHAR(50), age INT, gender VARCHAR(10), country VARCHAR(50)); CREATE TABLE trainings (id INT, farmer_id INT, title VARCHAR(50), completion_date DATE); ",SELECT COUNT(*) FROM farmers f JOIN trainings t ON f.id = t.farmer_id WHERE f.gender = 'Female' AND f.country = 'Rwanda' AND t.completion_date >= '2017-01-01';,SELECT COUNT(*) FROM farmers INNER JOIN trainings ON farmers.id = trainings.farmer_id WHERE farmers.country = 'Rwanda' AND farmers.gender = 'Female' AND trainings.completion_date >= '2017-01-01';,0 What award did Forest Whitaker win in 1989?,"CREATE TABLE table_name_54 (award VARCHAR, actor VARCHAR, year VARCHAR);","SELECT award FROM table_name_54 WHERE actor = ""forest whitaker"" AND year = 1989;","SELECT award FROM table_name_54 WHERE actor = ""forest whitaker"" AND year = 1989;",1 "What is the preliminaries of the contestant from Massachusetts with an evening gown higher than 8.631, an average less than 8.791, and an interview higher than 8.608?","CREATE TABLE table_name_97 (preliminaries VARCHAR, interview VARCHAR, state VARCHAR, evening_gown VARCHAR, average VARCHAR);","SELECT COUNT(preliminaries) FROM table_name_97 WHERE evening_gown > 8.631 AND average < 8.791 AND state = ""massachusetts"" AND interview > 8.608;","SELECT preliminary FROM table_name_97 WHERE evening_gown > 8.631 AND average 8.791 AND state = ""massachusetts"" AND interview > 8.608;",0 What is the result/games of Sun 11/28/10 as the date/year?,"CREATE TABLE table_21436373_6 (result_games VARCHAR, date_year VARCHAR);","SELECT result_games FROM table_21436373_6 WHERE date_year = ""Sun 11/28/10"";","SELECT result_games FROM table_21436373_6 WHERE date_year = ""Sun 11/28/10"";",1 what is the total levels in 2007?,"CREATE TABLE table_name_7 (level INTEGER, season VARCHAR);",SELECT SUM(level) FROM table_name_7 WHERE season = 2007;,SELECT SUM(level) FROM table_name_7 WHERE season = 2007;,1 What is the total quantity of items in inventory for customers in Australia in Q3 2022?,"CREATE TABLE Inventory (id INT, customer VARCHAR(255), quantity INT, country VARCHAR(255), quarter INT, year INT);",SELECT SUM(quantity) FROM Inventory WHERE country = 'Australia' AND quarter = 3 AND year = 2022;,SELECT SUM(quantity) FROM Inventory WHERE country = 'Australia' AND quarter = 3 AND year = 2022;,1 What are the top 3 European countries by total revenue from sales of Gadolinium in 2021?,"CREATE TABLE sales (id INT, country VARCHAR(50), Gadolinium_sold FLOAT, revenue FLOAT, datetime DATETIME); ","SELECT country, SUM(revenue) AS total_revenue FROM sales WHERE YEAR(datetime) = 2021 AND Gadolinium_sold IS NOT NULL AND country IN ('Germany', 'France', 'UK') GROUP BY country ORDER BY total_revenue DESC LIMIT 3;","SELECT country, SUM(revenue) as total_revenue FROM sales WHERE Gadolinium_sold = 'Gadolinium' AND YEAR(datetime) = 2021 GROUP BY country ORDER BY total_revenue DESC LIMIT 3;",0 What is the lowest heat of the Lakeside race?,"CREATE TABLE table_name_65 (heat INTEGER, race_title VARCHAR);","SELECT MIN(heat) FROM table_name_65 WHERE race_title = ""lakeside"";","SELECT MIN(heat) FROM table_name_65 WHERE race_title = ""lakeside"";",1 How many community policing events occurred in the 'rural' schema in Q1 2021?,"CREATE SCHEMA if not exists rural; CREATE TABLE if not exists rural.community_policing (id INT, event_date DATE); ",SELECT COUNT(*) FROM rural.community_policing WHERE QUARTER(event_date) = 1 AND YEAR(event_date) = 2021;,SELECT COUNT(*) FROM rural.community_policing WHERE event_date BETWEEN '2021-01-01' AND '2021-03-31';,0 "What is Target Version, when Last Release is 2009-08-09, 1.2.9?","CREATE TABLE table_name_91 (target_version VARCHAR, last_release VARCHAR);","SELECT target_version FROM table_name_91 WHERE last_release = ""2009-08-09, 1.2.9"";","SELECT target_version FROM table_name_91 WHERE last_release = ""2009-08-09, 1.2.9"";",1 When was there a result of 5-1?,"CREATE TABLE table_name_41 (date VARCHAR, result VARCHAR);","SELECT date FROM table_name_41 WHERE result = ""5-1"";","SELECT date FROM table_name_41 WHERE result = ""5-1"";",1 "Add new records to the ""warehouses"" table for each warehouse in the ""warehouse_list"" view","CREATE TABLE warehouses (id INT PRIMARY KEY, name VARCHAR(50), city VARCHAR(50), country VARCHAR(50)); CREATE VIEW warehouse_list AS SELECT 'SEA' AS warehouse, 'Seattle' AS city, 'USA' AS country UNION SELECT 'NYC' AS warehouse, 'New York' AS city, 'USA' AS country;","INSERT INTO warehouses (name, city, country) SELECT warehouse, city, country FROM warehouse_list;","INSERT INTO warehouses (id, name, city, country) VALUES (1, 'Seattle', 'USA', 'USA');",0 Find the total number of marine species recorded in the North Atlantic and South Atlantic.,"CREATE TABLE marine_species (id INT, species_name VARCHAR(255), region VARCHAR(255)); ","(SELECT COUNT(*) FROM marine_species WHERE region IN ('North Atlantic', 'South Atlantic'))","SELECT COUNT(*) FROM marine_species WHERE region IN ('North Atlantic', 'South Atlantic');",0 "Can you tell me the Score that has the Country of united states, and the Place of t2, and the Player of tom watson?","CREATE TABLE table_name_48 (score VARCHAR, player VARCHAR, country VARCHAR, place VARCHAR);","SELECT score FROM table_name_48 WHERE country = ""united states"" AND place = ""t2"" AND player = ""tom watson"";","SELECT score FROM table_name_48 WHERE country = ""united states"" AND place = ""t2"" AND player = ""tom watson"";",1 What was the average citizen satisfaction score for public services in Texas and Florida in 2021?,"CREATE TABLE Satisfaction (Year INT, State TEXT, SatisfactionScore INT); ","SELECT AVG(SatisfactionScore) as AvgSatisfactionScore, State FROM Satisfaction WHERE Year = 2021 AND State IN ('Texas', 'Florida') GROUP BY State;","SELECT AVG(SatisfactionScore) FROM Satisfaction WHERE Year = 2021 AND State IN ('Texas', 'Florida');",0 What is the total number of co-owned properties in the state of New York with an average size of over 1500 square feet?,"CREATE TABLE property (id INT, size INT, state VARCHAR(20), co_owned BOOLEAN);",SELECT COUNT(*) FROM property WHERE state = 'New York' AND co_owned = TRUE GROUP BY co_owned HAVING AVG(size) > 1500;,SELECT COUNT(*) FROM property WHERE state = 'New York' AND co_owned = true AND size > 1500;,0 What was the total games played at the Staples Center?,"CREATE TABLE table_name_56 (game INTEGER, location VARCHAR);","SELECT SUM(game) FROM table_name_56 WHERE location = ""staples center"";","SELECT SUM(game) FROM table_name_56 WHERE location = ""staples center"";",1 What are the names and ranks of all intelligence officers in the 'Intelligence' table?,"CREATE TABLE Intelligence (id INT, name VARCHAR(50), rank VARCHAR(50), specialization VARCHAR(50)); ","SELECT name, rank FROM Intelligence WHERE specialization LIKE '%intelligence%';","SELECT name, rank FROM Intelligence;",0 "How many digital assets were issued in 2021, by companies based in Canada?","CREATE TABLE digital_assets (id INT, issue_date DATE, company TEXT, country TEXT); ",SELECT COUNT(*) FROM digital_assets WHERE YEAR(issue_date) = 2021 AND country = 'Canada';,SELECT COUNT(*) FROM digital_assets WHERE issue_date BETWEEN '2021-01-01' AND '2021-12-31' AND country = 'Canada';,0 What is the land (sqmi) in lansing township?,"CREATE TABLE table_18600760_12 (land___sqmi__ VARCHAR, township VARCHAR);","SELECT land___sqmi__ FROM table_18600760_12 WHERE township = ""Lansing"";","SELECT land___sqmi__ FROM table_18600760_12 WHERE township = ""Lansing"";",1 "Which wellness programs were attended by users from Australia and New Zealand, and how many times did they attend?","CREATE TABLE attendance_data (id INT, user_id INT, program VARCHAR(50), attend_date DATE); ","SELECT program, COUNT(*) as attend_count FROM attendance_data WHERE country IN ('Australia', 'New Zealand') GROUP BY program;","SELECT program, COUNT(*) FROM attendance_data WHERE country IN ('Australia', 'New Zealand') GROUP BY program;",0 What's the name of the stadium when the club was F.C. Igea Virtus Barcellona?,"CREATE TABLE table_name_66 (stadium VARCHAR, club VARCHAR);","SELECT stadium FROM table_name_66 WHERE club = ""f.c. igea virtus barcellona"";","SELECT stadium FROM table_name_66 WHERE club = ""f.c. igea virtues barcellona"";",0 "display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M.","CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR, salary VARCHAR, department_id VARCHAR);","SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%';","SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE first_name 'M';",0 What is the maximum project timeline for historical building renovations in Boston?,"CREATE TABLE Project_Timeline (Project_ID INT, Building_Type VARCHAR(50), Start_Date DATE, End_Date DATE); ","SELECT MAX(DATEDIFF(End_Date, Start_Date)) FROM Project_Timeline WHERE Building_Type = 'Historical';",SELECT MAX(Project_Timeline.Start_Date) FROM Project_Timeline WHERE Project_Timeline.Building_Type = 'Historical' AND Project_Timeline.End_Date IS NOT NULL;,0 Which is the class A when Weslaco was the class AAAAA and brownwood was the class AAAA,"CREATE TABLE table_14747043_1 (class_a VARCHAR, class_aAAAA VARCHAR, Weslaco VARCHAR, class_aAAA VARCHAR, Brownwood VARCHAR);",SELECT class_a FROM table_14747043_1 WHERE class_aAAAA = Weslaco AND class_aAAA = Brownwood;,"SELECT class_a FROM table_14747043_1 WHERE class_aAAA = ""Weslaco"" AND class_aAAAA = ""Brownwood"";",0 "What is the former school of the player from Detroit, MI?","CREATE TABLE table_29418619_1 (former_school VARCHAR, hometown VARCHAR);","SELECT former_school FROM table_29418619_1 WHERE hometown = ""Detroit, MI"";","SELECT former_school FROM table_29418619_1 WHERE hometown = ""Detroit, MI"";",1 What nation was Pageos 1 from?,"CREATE TABLE table_2150068_1 (nation VARCHAR, satellite VARCHAR);","SELECT nation FROM table_2150068_1 WHERE satellite = ""PAGEOS 1"";","SELECT nation FROM table_2150068_1 WHERE satellite = ""Pageos 1"";",0 "Which enzyme names have the substring ""ALA""?",CREATE TABLE enzyme (name VARCHAR);,"SELECT name FROM enzyme WHERE name LIKE ""%ALA%"";",SELECT name FROM enzyme WHERE name LIKE '%ALA%';,0 What was the highest grid for Patrick Carpentier?,"CREATE TABLE table_name_77 (grid INTEGER, driver VARCHAR);","SELECT MAX(grid) FROM table_name_77 WHERE driver = ""patrick carpentier"";","SELECT MAX(grid) FROM table_name_77 WHERE driver = ""patrick carpentier"";",1 List all drugs approved by the EMA in 2020,"CREATE TABLE drug_approval(drug_name TEXT, approval_date DATE, approval_agency TEXT); ",SELECT drug_name FROM drug_approval WHERE approval_agency = 'EMA' AND approval_date BETWEEN '2020-01-01' AND '2020-12-31';,SELECT drug_name FROM drug_approval WHERE approval_agency = 'EMA' AND approval_date BETWEEN '2020-01-01' AND '2020-12-31';,1 What is the average time to resolve a security incident for each incident type?,"CREATE TABLE security_incidents (id INT, incident_type VARCHAR(50), resolution_time INT); ","SELECT incident_type, AVG(resolution_time) as avg_resolution_time FROM security_incidents GROUP BY incident_type;","SELECT incident_type, AVG(resolution_time) as avg_resolution_time FROM security_incidents GROUP BY incident_type;",1 What's filiberto rivera's height?,"CREATE TABLE table_name_54 (height VARCHAR, player VARCHAR);","SELECT COUNT(height) FROM table_name_54 WHERE player = ""filiberto rivera"";","SELECT height FROM table_name_54 WHERE player = ""filiberto rivera"";",0 What is the Week of the game against Seattle Seahawks?,"CREATE TABLE table_name_30 (week INTEGER, opponent VARCHAR);","SELECT AVG(week) FROM table_name_30 WHERE opponent = ""seattle seahawks"";","SELECT SUM(week) FROM table_name_30 WHERE opponent = ""seattle seahawks"";",0 Insert a new wind energy project 'Windfarm 2' in Germany with an installed capacity of 200 MW.,"CREATE TABLE wind_energy (project_id INT, project_name VARCHAR(255), country VARCHAR(255), installed_capacity FLOAT);","INSERT INTO wind_energy (project_name, country, installed_capacity) VALUES ('Windfarm 2', 'Germany', 200);","INSERT INTO wind_energy (project_name, country, installed_capacity) VALUES ('Windfarm 2', 'Germany', 200);",1 What is the St Kilda Away team score?,CREATE TABLE table_name_24 (away_team VARCHAR);,"SELECT away_team AS score FROM table_name_24 WHERE away_team = ""st kilda"";","SELECT away_team AS score FROM table_name_24 WHERE away_team = ""st kilda"";",1 "What is the average age of healthcare workers in the ""rural_clinics"" table?","CREATE TABLE rural_clinics (id INT, name VARCHAR(50), location VARCHAR(50), num_workers INT, avg_age INT);",SELECT AVG(avg_age) FROM rural_clinics;,SELECT AVG(avg_age) FROM rural_clinics;,1 How many employees have been hired in each quarter of the past year?,"CREATE TABLE employees (id INT, name VARCHAR(50), hire_date DATE); ","SELECT EXTRACT(QUARTER FROM hire_date) AS quarter, COUNT(*) FROM employees GROUP BY quarter;","SELECT DATE_FORMAT(hire_date, '%Y-%m') as quarter, COUNT(*) as num_hired FROM employees WHERE hire_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) GROUP BY quarter;",0 What is the mark for Kim Collins?,"CREATE TABLE table_name_11 (mark VARCHAR, name VARCHAR);","SELECT mark FROM table_name_11 WHERE name = ""kim collins"";","SELECT mark FROM table_name_11 WHERE name = ""kim collins"";",1 I want the driver for ferrari who made Laps less than 26 and grids more than 9,"CREATE TABLE table_name_69 (driver VARCHAR, constructor VARCHAR, grid VARCHAR, laps VARCHAR);","SELECT driver FROM table_name_69 WHERE grid > 9 AND laps < 26 AND constructor = ""ferrari"";","SELECT driver FROM table_name_69 WHERE grid > 9 AND laps 26 AND constructor = ""ferrari"";",0 Update the 'investment' amount for the 'Sustainable Irrigation' initiative in the 'Indus Plains' region in 2018.,"CREATE TABLE community_development (id INT, initiative_name VARCHAR(255), region VARCHAR(255), investment FLOAT, completion_year INT); ",UPDATE community_development SET investment = 120000 WHERE initiative_name = 'Sustainable Irrigation' AND region = 'Indus Plains' AND completion_year = 2018;,UPDATE community_development SET investment = 1 WHERE initiative_name = 'Sustainable Irrigation' AND region = 'Indus Plains' AND completion_year = 2018;,0 Which Established has a League of ontario australian football league?,"CREATE TABLE table_name_62 (established VARCHAR, league VARCHAR);","SELECT established FROM table_name_62 WHERE league = ""ontario australian football league"";","SELECT established FROM table_name_62 WHERE league = ""ontario australian football league"";",1 Name the number for automóvil club argentino for juan manuel fangio,"CREATE TABLE table_21977704_1 (no VARCHAR, entrant VARCHAR, driver VARCHAR);","SELECT no FROM table_21977704_1 WHERE entrant = ""Automóvil Club Argentino"" AND driver = ""Juan Manuel Fangio"";","SELECT no FROM table_21977704_1 WHERE entrant = ""Automóvil Club Argentina"" AND driver = ""Juan Manuel Fangio"";",0 What is the average CO2 emission reduction of green building projects in Texas?,"CREATE TABLE green_building_projects (id INT, project_name VARCHAR(50), city VARCHAR(50), state VARCHAR(50), country VARCHAR(50), co2_reduction FLOAT); ",SELECT AVG(co2_reduction) FROM green_building_projects WHERE state = 'TX';,SELECT AVG(co2_reduction) FROM green_building_projects WHERE state = 'Texas';,0 Which destination marketing organizations are in the Asia-Pacific region?,"CREATE TABLE dmo (id INT, name TEXT, region TEXT); ",SELECT name FROM dmo WHERE region = 'Asia-Pacific';,SELECT name FROM dmo WHERE region = 'Asia-Pacific';,1 What was the average cost of rural infrastructure projects in Bangladesh in 2021?,"CREATE TABLE rural_infrastructure (id INT, country VARCHAR(255), project VARCHAR(255), cost FLOAT, year INT); ",SELECT AVG(cost) FROM rural_infrastructure WHERE country = 'Bangladesh' AND year = 2021;,SELECT AVG(cost) FROM rural_infrastructure WHERE country = 'Bangladesh' AND year = 2021;,1 Update the workplace violation count for Workplace D to 25.,"CREATE TABLE violations (id INT, workplace_id INT, violation_count INT); ",UPDATE violations SET violation_count = 25 WHERE workplace_id = 4;,UPDATE violations SET violation_count = 25 WHERE workplace_id = 1;,0 To which party does Robert W. Edgar belong?,"CREATE TABLE table_1341598_39 (party VARCHAR, incumbent VARCHAR);","SELECT party FROM table_1341598_39 WHERE incumbent = ""Robert W. Edgar"";","SELECT party FROM table_1341598_39 WHERE incumbent = ""Robert W. Edgar"";",1 How many students with and without disabilities have utilized disability accommodations in each state?,"CREATE TABLE states (id INT, name VARCHAR(255)); CREATE TABLE students (id INT, state_id INT, has_disability BOOLEAN, accommodation_used BOOLEAN); ","SELECT states.name AS state, SUM(CASE WHEN has_disability THEN 1 ELSE 0 END) AS total_students_with_disabilities, SUM(accommodation_used) AS total_students_using_accommodations FROM students RIGHT JOIN states ON students.state_id = states.id GROUP BY states.name;","SELECT s.name, COUNT(s.id) as num_students FROM states s JOIN students s ON s.state_id = s.id WHERE s.has_disability = TRUE AND s.accommodation_used = TRUE GROUP BY s.name;",0 How many trees were planted as part of carbon offset initiatives in Canada?,"CREATE TABLE carbon_offset (id INT, initiative_name VARCHAR(50), location VARCHAR(50), offset_quantity INT, offset_type VARCHAR(50)); ","SELECT co.initiative_name, SUM(co.offset_quantity) FROM carbon_offset co WHERE co.offset_type = 'Trees' AND co.location = 'Canada' GROUP BY co.initiative_name;",SELECT COUNT(*) FROM carbon_offset WHERE location = 'Canada' AND offset_type = 'Tree';,0 What is the total revenue for music artists by genre?,"CREATE TABLE Music_Artists_Genre (id INT, name VARCHAR(100), genre VARCHAR(50), revenue DECIMAL(10,2)); ","SELECT genre, SUM(revenue) FROM Music_Artists_Genre GROUP BY genre;","SELECT genre, SUM(revenue) FROM Music_Artists_Genre GROUP BY genre;",1 "What is the top fastest time, larger than 2, in Enugu?","CREATE TABLE table_name_76 (fastest_time__s_ INTEGER, location VARCHAR, rank VARCHAR);","SELECT MAX(fastest_time__s_) FROM table_name_76 WHERE location = ""enugu"" AND rank > 2;","SELECT MAX(fastest_time__s_) FROM table_name_76 WHERE location = ""enugu"" AND rank > 2;",1 What is the total revenue generated by each game category?,"CREATE TABLE games (game_id INT, game_name TEXT, game_category TEXT, game_purchase_price FLOAT); ","SELECT game_category, SUM(game_purchase_price) as total_revenue FROM games GROUP BY game_category;","SELECT game_category, SUM(game_purchase_price) FROM games GROUP BY game_category;",0 What kind of report is for the Pau circuit?,"CREATE TABLE table_1140111_5 (report VARCHAR, circuit VARCHAR);","SELECT report FROM table_1140111_5 WHERE circuit = ""Pau"";","SELECT report FROM table_1140111_5 WHERE circuit = ""Pau"";",1 How many military equipment units were manufactured each year?,"CREATE TABLE military_equipment_manufacturing (equipment_type VARCHAR(255), year INT, unit_count INT); ","SELECT year, equipment_type, SUM(unit_count) FROM military_equipment_manufacturing GROUP BY year, equipment_type;","SELECT year, SUM(unit_count) FROM military_equipment_manufacturing GROUP BY year;",0 "How many products have been sold in each region, sorted by sales?","CREATE TABLE sales (product_id INT, quantity INT, region TEXT); ","SELECT region, SUM(quantity) AS total_sales, ROW_NUMBER() OVER (ORDER BY total_sales DESC) AS rn FROM sales GROUP BY region;","SELECT region, SUM(quantity) as total_sales FROM sales GROUP BY region ORDER BY total_sales DESC;",0 What is the most common offense for female offenders in the 'juvenile_justice' table?,"CREATE TABLE juvenile_justice (offender_id INT, age INT, offense VARCHAR(50), disposition VARCHAR(30), processing_date DATE);","SELECT offense, COUNT(*) AS count FROM juvenile_justice WHERE gender = 'female' GROUP BY offense ORDER BY count DESC LIMIT 1;","SELECT offense, COUNT(*) as count FROM juvenile_justice WHERE age >= 18 GROUP BY offense ORDER BY count DESC LIMIT 1;",0 Insert a new rural infrastructure project in Nepal for 'Bridge Construction' with a cost of 40000.00.,"CREATE TABLE rural_infrastructure (id INT, country VARCHAR(20), project_name VARCHAR(50), project_cost FLOAT);","INSERT INTO rural_infrastructure (country, project_name, project_cost) VALUES ('Nepal', 'Bridge Construction', 40000.00);","INSERT INTO rural_infrastructure (project_name, project_cost) VALUES ('Bridge Construction', 'Nepal', 40000.00);",0 Which suffix has the prefix of isothiocyanato- (-ncs)?,"CREATE TABLE table_name_17 (suffix VARCHAR, prefix VARCHAR);","SELECT suffix FROM table_name_17 WHERE prefix = ""isothiocyanato- (-ncs)"";","SELECT suffix FROM table_name_17 WHERE prefix = ""isothiocyanato- (-ncs)"";",1 "What is the total usage of smart city devices installed after January 1, 2019?","CREATE TABLE SmartCityDevice (id INT, name VARCHAR(255), city_id INT, usage INT, install_date DATE); ",SELECT SUM(usage) FROM SmartCityDevice WHERE install_date > '2019-01-01';,SELECT SUM(usage) FROM SmartCityDevice WHERE install_date > '2019-01-01';,1 Calculate the sum of interest-free loans issued to 'Mohammed' in 2022.,"CREATE TABLE interest_free_loans (loan_id INT, amount DECIMAL(10, 2), borrower VARCHAR(255), loan_date DATE); ",SELECT SUM(amount) FROM interest_free_loans WHERE borrower = 'Mohammed' AND loan_date BETWEEN '2022-01-01' AND '2022-12-31';,SELECT SUM(amount) FROM interest_free_loans WHERE borrower = 'Mohammed' AND YEAR(loan_date) = 2022;,0 "What is the number of artifacts made of gold or silver, grouped by excavation site?","CREATE TABLE ArtifactMaterials (MaterialID INT, ArtifactID INT, Material TEXT); ","SELECT e.SiteName, COUNT(*) AS Count FROM ExcavationSites e JOIN ArtifactAnalysis a ON e.SiteID = a.SiteID JOIN ArtifactMaterials m ON a.ArtifactID = m.ArtifactID WHERE m.Material IN ('Gold', 'Silver') GROUP BY e.SiteName;","SELECT Site, COUNT(*) FROM ArtifactMaterials WHERE Material IN ('Gold', 'Silver') GROUP BY Site;",0 What is the total watch time of sports videos by users from India and China?,"CREATE TABLE users (id INT, country VARCHAR(50)); CREATE TABLE videos (id INT, type VARCHAR(50)); CREATE TABLE user_video_view (user_id INT, video_id INT, watch_time INT);","SELECT SUM(uvv.watch_time) as total_watch_time FROM user_video_view uvv JOIN users u ON uvv.user_id = u.id JOIN videos v ON uvv.video_id = v.id WHERE u.country IN ('India', 'China') AND v.type = 'Sports';","SELECT SUM(user_video_view.watch_time) FROM user_video_view INNER JOIN users ON user_video_view.user_id = users.id INNER JOIN videos ON user_video_view.video_id = videos.id WHERE users.country IN ('India', 'China') AND videos.type = 'Sports';",0 What is the maximum number of AFC championships?,CREATE TABLE table_1952057_5 (afc_championships INTEGER);,SELECT MAX(afc_championships) FROM table_1952057_5;,SELECT MAX(afc_championships) FROM table_1952057_5;,1 Which City has a Lead of tyler forrest?,"CREATE TABLE table_name_95 (city VARCHAR, lead VARCHAR);","SELECT city FROM table_name_95 WHERE lead = ""tyler forrest"";","SELECT city FROM table_name_95 WHERE lead = ""tyler forrest"";",1 What is the total quantity of recycled products sold in Europe?,"CREATE TABLE regions (id INT, name TEXT); CREATE TABLE products (id INT, name TEXT, is_recycled BOOLEAN); CREATE TABLE sales (id INT, product TEXT, quantity INT, region TEXT); ",SELECT SUM(sales.quantity) FROM sales INNER JOIN regions ON sales.region = regions.name INNER JOIN products ON sales.product = products.name WHERE products.is_recycled = true AND regions.name = 'Europe';,SELECT SUM(sales.quantity) FROM sales INNER JOIN products ON sales.product = products.id WHERE products.is_recycled = true AND regions.name = 'Europe';,0 "List military equipment maintenance requests for helicopters in Texas in the last 6 months, along with the number of requests.","CREATE TABLE equipment_maintenance (maintenance_id INT, equipment_type TEXT, state TEXT, request_date DATE); ","SELECT equipment_type, COUNT(*) as requests FROM equipment_maintenance WHERE equipment_type = 'Helicopter' AND state = 'Texas' AND request_date >= '2021-12-01' GROUP BY equipment_type;","SELECT COUNT(*) FROM equipment_maintenance WHERE equipment_type = 'Helicopter' AND state = 'Texas' AND request_date >= DATEADD(month, -6, GETDATE());",0 Count the number of esports events in 2022,"CREATE TABLE Esports_Events (id INT, name VARCHAR(50), event_date DATE); ",SELECT COUNT(*) FROM Esports_Events WHERE event_date BETWEEN '2022-01-01' AND '2022-12-31';,SELECT COUNT(*) FROM Esports_Events WHERE YEAR(event_date) = 2022;,0 List the top 3 donors by total donation amount and their respective rank.,"CREATE TABLE top_donors (donor_id INT, donor_name TEXT, total_donations DECIMAL(10,2)); ","SELECT donor_id, donor_name, total_donations, RANK() OVER (ORDER BY total_donations DESC) as donor_rank FROM top_donors;","SELECT donor_name, total_donations FROM top_donors ORDER BY total_donations DESC LIMIT 3;",0 Name the high assists for 29 game,"CREATE TABLE table_17355408_5 (high_assists VARCHAR, game VARCHAR);",SELECT high_assists FROM table_17355408_5 WHERE game = 29;,SELECT high_assists FROM table_17355408_5 WHERE game = 29;,1 What is the average age of players who play games in the 'Simulation' genre in Africa?,"CREATE TABLE players (id INT, age INT, game_genre VARCHAR(20), location VARCHAR(20)); ",SELECT AVG(age) FROM players WHERE game_genre = 'Simulation' AND location LIKE 'Africa%';,SELECT AVG(age) FROM players WHERE game_genre = 'Simulation' AND location = 'Africa';,0 Which players scored the most points when the opposing team was Seattle and how many points did they score?,"CREATE TABLE table_13619135_5 (high_points VARCHAR, team VARCHAR);","SELECT high_points FROM table_13619135_5 WHERE team = ""Seattle"";","SELECT high_points FROM table_13619135_5 WHERE team = ""Seattle"";",1 How many film are there?,CREATE TABLE film (Id VARCHAR);,SELECT COUNT(*) FROM film;,SELECT COUNT(*) FROM film;,1 What is the title of the book when the publisher is black car publishing?,"CREATE TABLE table_20193855_2 (book_title VARCHAR, publisher VARCHAR);","SELECT book_title FROM table_20193855_2 WHERE publisher = ""Black Car Publishing"";","SELECT book_title FROM table_20193855_2 WHERE publisher = ""Black Car Publishing"";",1 "Find the total number of doctor visits for patients with diabetes, in each region, for the year 2019.","CREATE TABLE doctor_visits (patient_id INTEGER, disease VARCHAR(50), region VARCHAR(50), year INTEGER, num_visits INTEGER); ","SELECT region, SUM(num_visits) as total_visits FROM doctor_visits WHERE disease = 'Diabetes' AND year = 2019 GROUP BY region;","SELECT region, SUM(num_visits) FROM doctor_visits WHERE disease = 'Diabetes' AND year = 2019 GROUP BY region;",0 List the names and birthdates of all penguins in the Antarctic Wildlife Reserve.,"CREATE TABLE Animals (name VARCHAR(50), species VARCHAR(50), birthdate DATE); CREATE TABLE Reserves (name VARCHAR(50), location VARCHAR(50)); ","SELECT name, birthdate FROM Animals INNER JOIN Reserves ON TRUE WHERE Animals.species = 'Penguin' AND Reserves.name = 'Antarctic Wildlife Reserve';","SELECT Animals.name, Animals.birthdate FROM Animals INNER JOIN Reserves ON Animals.name = Reserves.name WHERE Reserves.location = 'Antarctic Wildlife Reserve';",0 "How many seasons feature essendon, and a Score of 15.12 (102) – 9.14 (68)?","CREATE TABLE table_name_30 (season VARCHAR, premier VARCHAR, score VARCHAR);","SELECT COUNT(season) FROM table_name_30 WHERE premier = ""essendon"" AND score = ""15.12 (102) – 9.14 (68)"";","SELECT COUNT(season) FROM table_name_30 WHERE premier = ""essendon"" AND score = ""15.12 (102) – 9.14 (68)"";",1 List the clinics located in 'southwest' region from 'rural_clinics' table?,"CREATE SCHEMA if not exists rural_clinics; use rural_clinics; CREATE TABLE clinics (id int, name varchar(255), location varchar(255));",SELECT name FROM clinics WHERE location = 'southwest';,SELECT * FROM rural_clinics.clinics WHERE location ='southwest';,0 What is the distribution of policyholders by age group for a given state?,"CREATE TABLE Policyholders (Policyholder TEXT, Age NUMERIC, State TEXT); ","SELECT State, CASE WHEN Age < 30 THEN 'Under 30' WHEN Age < 50 THEN '30-49' ELSE '50 and over' END AS Age_Group, COUNT(*) FROM Policyholders GROUP BY State, Age_Group;","SELECT State, Age, COUNT(*) FROM Policyholders GROUP BY State, Age;",0 In what Year is the Works No. 2040-2049?,"CREATE TABLE table_name_80 (year VARCHAR, works_no VARCHAR);","SELECT year FROM table_name_80 WHERE works_no = ""2040-2049"";","SELECT year FROM table_name_80 WHERE works_no = ""2040-2049"";",1 How many autonomous vehicles were sold in Germany in Q3 2020?,"CREATE TABLE EuropeanSales (id INT, vehicle_type VARCHAR(50), quantity INT, country VARCHAR(50), quarter INT, year INT); ",SELECT SUM(quantity) FROM EuropeanSales WHERE vehicle_type = 'Autonomous' AND country = 'Germany' AND quarter = 3 AND year = 2020;,SELECT SUM(quantity) FROM EuropeanSales WHERE vehicle_type = 'Autonomous' AND country = 'Germany' AND quarter = 3 AND year = 2020;,1 What is the average age of players who have played Virtual Reality games?,"CREATE TABLE players (id INT, age INT, country VARCHAR(50), vrgames BOOLEAN); ",SELECT AVG(age) FROM players WHERE vrgames = true;,SELECT AVG(age) FROM players WHERE vrgames = true;,1 What is the average waste generation rate per capita in the residential sector across all cities in the country?,"CREATE TABLE residential_waste (city VARCHAR(50), generation_rate FLOAT); ",SELECT AVG(generation_rate) FROM residential_waste;,"SELECT city, AVG(generation_rate) FROM residential_waste GROUP BY city;",0 Which menu items contain eggs as an ingredient and have high calorie count?,"CREATE TABLE Dishes (DishID INT, Name VARCHAR(50), Calories INT); CREATE TABLE Ingredients (IngredientID INT, DishID INT, Name VARCHAR(50)); ",SELECT d.Name FROM Dishes d JOIN Ingredients i ON d.DishID = i.DishID WHERE i.Name = 'Eggs' AND d.Calories > 500;,"SELECT Dishes.Name, Ingredients.Name FROM Dishes INNER JOIN Ingredients ON Dishes.DishID = Ingredients.DishID WHERE Ingredients.Name LIKE '%egg%' AND Dishes.Calories = (SELECT MAX(Calories) FROM Dishes);",0 List the names of people that are not poker players.,"CREATE TABLE poker_player (Name VARCHAR, People_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR);",SELECT Name FROM people WHERE NOT People_ID IN (SELECT People_ID FROM poker_player);,SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Name IS NULL;,0 Tell me opponent for result of w 33-31,"CREATE TABLE table_name_96 (opponent VARCHAR, result VARCHAR);","SELECT opponent FROM table_name_96 WHERE result = ""w 33-31"";","SELECT opponent FROM table_name_96 WHERE result = ""w 33-31"";",1 Count the number of threat intelligence metrics reported in Africa in the last 9 months.,"CREATE TABLE threat_intelligence (metric_id INT, metric_date DATE, region VARCHAR(255)); ","SELECT COUNT(*) FROM threat_intelligence WHERE region = 'Africa' AND metric_date >= DATE_SUB(CURRENT_DATE, INTERVAL 9 MONTH);","SELECT COUNT(*) FROM threat_intelligence WHERE region = 'Africa' AND metric_date >= DATE_SUB(CURRENT_DATE, INTERVAL 9 MONTH);",1 What are the top 5 states with the highest total budget for education?,"CREATE TABLE States (StateName VARCHAR(50), EducationBudget FLOAT); ","SELECT StateName, SUM(EducationBudget) as TotalBudget FROM States GROUP BY StateName ORDER BY TotalBudget DESC LIMIT 5;","SELECT StateName, EducationBudget FROM States ORDER BY EducationBudget DESC LIMIT 5;",0 Find the maximum quantity of 'Quinoa' in the 'Warehouse' table,"CREATE TABLE Warehouse (id INT PRIMARY KEY, product VARCHAR(255), quantity INT); ",SELECT MAX(quantity) FROM Warehouse WHERE product = 'Quinoa';,SELECT MAX(quantity) FROM Warehouse WHERE product = 'Quinoa';,1 What is the maximum local economic impact of cultural heritage sites in Spain?,"CREATE TABLE heritage_sites (site_id INT, site_name TEXT, country TEXT, local_impact INT); ",SELECT MAX(local_impact) FROM heritage_sites WHERE country = 'Spain';,SELECT MAX(local_impact) FROM heritage_sites WHERE country = 'Spain';,1 what is the district with the candidates edward boland (d) unopposed?,"CREATE TABLE table_1341690_21 (district VARCHAR, candidates VARCHAR);","SELECT district FROM table_1341690_21 WHERE candidates = ""Edward Boland (D) Unopposed"";","SELECT district FROM table_1341690_21 WHERE candidates = ""Edward Boland (D) Unopposed"";",1 What is the duration of the flight with end time of 21:06?,"CREATE TABLE table_name_61 (duration VARCHAR, end_time VARCHAR);","SELECT duration FROM table_name_61 WHERE end_time = ""21:06"";","SELECT duration FROM table_name_61 WHERE end_time = ""21:06"";",1 Tell me the lowest # of bids for win percent of .667,"CREATE TABLE table_name_38 (_number_of_bids INTEGER, win__percentage VARCHAR);","SELECT MIN(_number_of_bids) FROM table_name_38 WHERE win__percentage = "".667"";","SELECT MIN(_number_of_bids) FROM table_name_38 WHERE win__percentage = "".667"";",1 Count the number of bridges in the Bridge_Inspections table,"CREATE TABLE Bridge_Inspections (inspection_id INT, bridge_name VARCHAR(50), bridge_type VARCHAR(50), inspection_date DATE);",SELECT COUNT(*) FROM Bridge_Inspections WHERE bridge_type = 'Bridge';,SELECT COUNT(*) FROM Bridge_Inspections;,0 What is the percentage of citizens who are satisfied with public transportation in each district?,"CREATE TABLE districts (district_name VARCHAR(50), num_citizens INT, num_satisfied_citizens INT); ","SELECT district_name, (num_satisfied_citizens * 100.0 / num_citizens) as percentage_satisfied FROM districts;","SELECT district_name, (num_satisfied_citizens * 100.0 / num_satisfied_citizens) * 100.0 / num_satisfied_citizens FROM districts GROUP BY district_name;",0 Which lap number had a grid number bigger than 9 and where the driver was Mark Webber?,"CREATE TABLE table_name_77 (laps VARCHAR, grid VARCHAR, driver VARCHAR);","SELECT laps FROM table_name_77 WHERE grid > 9 AND driver = ""mark webber"";","SELECT laps FROM table_name_77 WHERE grid > 9 AND driver = ""mark webber"";",1 What is every Gregorian month when the season in Tamil is இளவேனில்?,"CREATE TABLE table_1740431_3 (gregorian_months VARCHAR, season_in_tamil VARCHAR);","SELECT gregorian_months FROM table_1740431_3 WHERE season_in_tamil = ""இளவேனில்"";","SELECT gregorian_months FROM table_1740431_3 WHERE season_in_tamil = """";",0 What was Melbourne's away team score?,CREATE TABLE table_name_20 (away_team VARCHAR);,"SELECT away_team AS score FROM table_name_20 WHERE away_team = ""melbourne"";","SELECT away_team AS score FROM table_name_20 WHERE away_team = ""melbourne"";",1 How many visitors traveled to Canada from Africa in 2021?,"CREATE TABLE Visitors (id INT, country VARCHAR(50), destination VARCHAR(50), visit_date DATE); ",SELECT COUNT(*) FROM Visitors WHERE country LIKE 'Africa%' AND destination = 'Canada' AND YEAR(visit_date) = 2021;,SELECT COUNT(*) FROM Visitors WHERE country = 'Canada' AND destination = 'Africa' AND visit_date BETWEEN '2021-01-01' AND '2021-12-31';,0 What was Dan Selznick best time?,"CREATE TABLE table_name_63 (best VARCHAR, name VARCHAR);","SELECT best FROM table_name_63 WHERE name = ""dan selznick"";","SELECT best FROM table_name_63 WHERE name = ""dan selznick"";",1 What are the years won when the to par is +5?,"CREATE TABLE table_name_76 (year_s__won VARCHAR, to_par VARCHAR);","SELECT year_s__won FROM table_name_76 WHERE to_par = ""+5"";","SELECT year_s__won FROM table_name_76 WHERE to_par = ""+5"";",1 Find the name of the winner who has the highest rank points and participated in the Australian Open tourney.,"CREATE TABLE matches (winner_name VARCHAR, tourney_name VARCHAR, winner_rank_points VARCHAR);",SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' ORDER BY winner_rank_points DESC LIMIT 1;,SELECT winner_name FROM matches WHERE tourney_name = 'Australian Open' AND winner_rank_points = (SELECT MAX(winner_rank_points) FROM matches);,0 Identify the top 5 donors by total donation amount in 2022?,"CREATE TABLE donors (donor_id INT, donor_name TEXT, donation_amount DECIMAL, donation_date DATE); ","SELECT donor_name, SUM(donation_amount) AS total_donation_amount FROM donors WHERE EXTRACT(YEAR FROM donation_date) = 2022 GROUP BY donor_name ORDER BY total_donation_amount DESC LIMIT 5;","SELECT donor_name, SUM(donation_amount) as total_donation FROM donors WHERE YEAR(donation_date) = 2022 GROUP BY donor_name ORDER BY total_donation DESC LIMIT 5;",0 What is the Tournament with a Opponents in the final with rod laver fred stolle?,"CREATE TABLE table_name_15 (tournament VARCHAR, opponents_in_the_final VARCHAR);","SELECT tournament FROM table_name_15 WHERE opponents_in_the_final = ""rod laver fred stolle"";","SELECT tournament FROM table_name_15 WHERE opponents_in_the_final = ""rod laver fred stolle"";",1 What was the average donation amount from individual donors in the Pacific region in 2021?,"CREATE TABLE Donations (donor_id INT, donation_amount DECIMAL(10,2), donation_date DATE, region VARCHAR(50)); ",SELECT AVG(donation_amount) FROM Donations WHERE donation_date BETWEEN '2021-01-01' AND '2021-12-31' AND region = 'Pacific' AND donor_id NOT IN (SELECT donor_id FROM Donations WHERE donation_type = 'Corporate');,SELECT AVG(donation_amount) FROM Donations WHERE region = 'Pacific' AND donation_date BETWEEN '2021-01-01' AND '2021-12-31';,0 What is the top losses that with Club of cd toledo and Points more than 56?,"CREATE TABLE table_name_23 (losses INTEGER, club VARCHAR, points VARCHAR);","SELECT MAX(losses) FROM table_name_23 WHERE club = ""cd toledo"" AND points > 56;","SELECT MAX(losses) FROM table_name_23 WHERE club = ""cd toledo"" AND points > 56;",1 What was the total cargo weight transported by vessels from Brazil to Africa in H1 2020?,"CREATE TABLE vessels(id INT, name VARCHAR(100), region VARCHAR(50));CREATE TABLE shipments(id INT, vessel_id INT, cargo_weight FLOAT, ship_date DATE, origin VARCHAR(50), destination VARCHAR(50));","SELECT SUM(cargo_weight) FROM shipments WHERE (origin, destination) = ('Brazil', 'Africa') AND ship_date BETWEEN '2020-01-01' AND '2020-06-30';",SELECT SUM(cargo_weight) FROM shipments WHERE origin = 'Brazil' AND destination = 'Africa' AND ship_date BETWEEN '2020-01-01' AND '2020-12-31';,0 "What is the total number of Against, when Draw is greater than 48?","CREATE TABLE table_name_12 (against VARCHAR, draw INTEGER);",SELECT COUNT(against) FROM table_name_12 WHERE draw > 48;,SELECT COUNT(against) FROM table_name_12 WHERE draw > 48;,1 What is the success rate of cases handled by the 'Doe' law firm?,"CREATE TABLE cases (case_id INT, case_type VARCHAR(20), law_firm VARCHAR(20), case_outcome VARCHAR(10)); ","SELECT law_firm, COUNT(CASE WHEN case_outcome = 'Won' THEN 1 END) / COUNT(*) as success_rate FROM cases WHERE law_firm = 'Doe' GROUP BY law_firm;",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM cases WHERE law_firm = 'Doe')) AS success_rate FROM cases WHERE law_firm = 'Doe';,0 "What is the lowest FA cup that has a league greater than 0, with a Malaysia cup greater than 5?","CREATE TABLE table_name_9 (fa_cup INTEGER, league VARCHAR, malaysia_cup VARCHAR);",SELECT MIN(fa_cup) FROM table_name_9 WHERE league > 0 AND malaysia_cup > 5;,SELECT MIN(fa_cup) FROM table_name_9 WHERE league > 0 AND malaysia_cup > 5;,1 What is the total revenue generated from prepaid mobile plans in the last quarter?,"CREATE TABLE mobile_plans (id INT, plan_type VARCHAR(20), quarter DATE, revenue DECIMAL(10,2)); CREATE TABLE customers (id INT, plan_id INT); ","SELECT SUM(revenue) FROM mobile_plans INNER JOIN customers ON mobile_plans.id = customers.plan_id WHERE plan_type = 'prepaid' AND quarter BETWEEN DATE_SUB('2022-04-01', INTERVAL 3 MONTH) AND '2022-04-01';","SELECT SUM(revenue) FROM mobile_plans JOIN customers ON mobile_plans.plan_id = customers.plan_id WHERE plan_type = 'prepaid' AND quarter BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH) AND CURRENT_DATE;",0 What is the minimum ESG rating for companies in the 'finance' sector?,"CREATE TABLE companies (id INT, sector VARCHAR(20), ESG_rating FLOAT); ",SELECT MIN(ESG_rating) FROM companies WHERE sector = 'finance';,SELECT MIN(ESG_rating) FROM companies WHERE sector = 'finance';,1 What is the minimum CO2 emission in the 'emissions' table?,"CREATE TABLE emissions (id INT, site VARCHAR(50), year INT, co2_emission FLOAT);",SELECT MIN(co2_emission) FROM emissions;,SELECT MIN(co2_emission) FROM emissions;,1 Show the top 5 brands by sales of natural products,"CREATE TABLE sales (id INT, product_id INT, brand_id INT, quantity INT); CREATE TABLE brands (id INT, name VARCHAR(255), is_natural BOOLEAN);","SELECT b.name, SUM(s.quantity) as total_sales FROM brands b INNER JOIN sales s ON b.id = s.brand_id WHERE b.is_natural = TRUE GROUP BY b.name ORDER BY total_sales DESC LIMIT 5;","SELECT b.name, SUM(s.quantity) as total_sales FROM sales s JOIN brands b ON s.brand_id = b.id WHERE b.is_natural = true GROUP BY b.name ORDER BY total_sales DESC LIMIT 5;",0 Who was the opponent at the game when the record was 54-58?,"CREATE TABLE table_name_13 (opponent VARCHAR, record VARCHAR);","SELECT opponent FROM table_name_13 WHERE record = ""54-58"";","SELECT opponent FROM table_name_13 WHERE record = ""54-58"";",1 "What is the lowest goal difference a club with more than 13 wins, less than 8 losses, and less than 11 draws has?","CREATE TABLE table_name_81 (goal_difference INTEGER, draws VARCHAR, wins VARCHAR, losses VARCHAR);",SELECT MIN(goal_difference) FROM table_name_81 WHERE wins > 13 AND losses < 8 AND draws < 11;,SELECT MIN(goal_difference) FROM table_name_81 WHERE wins > 13 AND losses 8 AND draws 11;,0 What is the maximum number of mental health parity violations in each region?,"CREATE TABLE mental_health_parity_violations (violation_id INT, region TEXT, violation_count INT); ","SELECT region, MAX(violation_count) FROM mental_health_parity_violations GROUP BY region;","SELECT region, MAX(violation_count) FROM mental_health_parity_violations GROUP BY region;",1 List the top 3 brands with the highest average cruelty-free product price.,"CREATE TABLE prices (id INT, brand VARCHAR(255), is_cruelty_free BOOLEAN, price DECIMAL(10, 2)); ","SELECT brand, AVG(price) FROM prices WHERE is_cruelty_free = true GROUP BY brand ORDER BY AVG(price) DESC LIMIT 3;","SELECT brand, AVG(price) as avg_price FROM prices WHERE is_cruelty_free = true GROUP BY brand ORDER BY avg_price DESC LIMIT 3;",0 What is the starting point of the route that has its terminus at Ecat/Rosa Park Transit Center?,"CREATE TABLE table_name_27 (starting_point VARCHAR, terminus VARCHAR);","SELECT starting_point FROM table_name_27 WHERE terminus = ""ecat/rosa park transit center"";","SELECT starting_point FROM table_name_27 WHERE terminus = ""ecat/rosa park transit center"";",1 Calculate the average seafood consumption per capita in each province in Canada.,"CREATE TABLE seafood_consumption (id INT, province VARCHAR(255), consumption FLOAT); ","SELECT province, AVG(consumption) FROM seafood_consumption GROUP BY province;","SELECT province, AVG(consumption) FROM seafood_consumption GROUP BY province;",1 "Show the names of all retailers carrying both ""organic"" and ""gluten-free"" products","CREATE TABLE retailers (retailer_id INT, retailer_name VARCHAR(50)); CREATE TABLE inventory (product_id INT, product_name VARCHAR(50), retailer_id INT, is_organic BOOLEAN, is_gluten_free BOOLEAN); ",SELECT DISTINCT r.retailer_name FROM retailers r JOIN inventory i ON r.retailer_id = i.retailer_id WHERE i.is_organic = true AND i.is_gluten_free = true;,SELECT r.retailer_name FROM retailers r JOIN inventory i ON r.retailer_id = i.retailer_id WHERE i.is_organic = TRUE AND i.is_gluten_free = TRUE;,0 "Which track was used on September 12, 1981? ","CREATE TABLE table_22765887_1 (track VARCHAR, date VARCHAR);","SELECT track FROM table_22765887_1 WHERE date = ""September 12, 1981"";","SELECT track FROM table_22765887_1 WHERE date = ""September 12, 1981"";",1 What is the percentage of cosmetic products certified as cruelty-free in the Canadian market compared to those that are not?,"CREATE TABLE cosmetics_certifications (product_id INT, is_cruelty_free BOOLEAN, country TEXT);",SELECT 100.0 * COUNT(*) FILTER (WHERE is_cruelty_free = TRUE) / COUNT(*) as cruelty_free_percentage FROM cosmetics_certifications WHERE country = 'Canada';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM cosmetics_certifications WHERE is_cruelty_free = true AND country = 'Canada')) AS percentage FROM cosmetics_certifications WHERE is_cruelty_free = true AND country = 'Canada';,0 "List all the organizations working on AI ethics in Europe, ordered by the number of projects they have.","CREATE TABLE ai_ethics_orgs(org_name VARCHAR(30), country VARCHAR(10), projects INT); ",SELECT * FROM ai_ethics_orgs ORDER BY projects DESC;,"SELECT org_name, country, projects FROM ai_ethics_orgs WHERE country IN ('Germany', 'France', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy'",0 Create a table named 'volunteer_events',"CREATE TABLE volunteer_events (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), description TEXT, start_date DATETIME, end_date DATETIME);","CREATE TABLE volunteer_events (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), description TEXT, start_date DATETIME, end_date DATETIME);","CREATE TABLE volunteer_events (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), description TEXT, start_date DATETIME, end_date DATETIME);",1 Find the number of unique genres represented in the 'music_streaming' table and the number of unique artists who have held concerts in the 'concert_ticket_sales' table.,"CREATE TABLE music_streaming (artist_id INT, artist_name VARCHAR(100), genre VARCHAR(50)); CREATE TABLE concert_ticket_sales (concert_id INT, artist_id INT, concert_date DATE, venue VARCHAR(100));","SELECT COUNT(DISTINCT genre) AS unique_genres, COUNT(DISTINCT artist_id) AS unique_concert_artists FROM music_streaming;","SELECT COUNT(DISTINCT music_streaming.genre) AS unique_genres, COUNT(DISTINCT concert_ticket_sales.artist_id) AS unique_artists FROM music_streaming INNER JOIN concert_ticket_sales ON music_streaming.artist_id = concert_ticket_sales.artist_id GROUP BY music_streaming.genre;",0 Find the total number of female and male journalists in our database.,"CREATE TABLE journalists (name VARCHAR(50), gender VARCHAR(10), years_experience INT); ","SELECT SUM(CASE WHEN gender = 'Female' THEN 1 ELSE 0 END) AS total_female, SUM(CASE WHEN gender = 'Male' THEN 1 ELSE 0 END) AS total_male FROM journalists;","SELECT gender, COUNT(*) FROM journalists GROUP BY gender;",0 List the total production quantity of Ytterbium for each quarter it was produced.,"CREATE TABLE Ytterbium_Production (Year INT, Quarter INT, Quantity INT); ","SELECT Year, Quarter, SUM(Quantity) FROM Ytterbium_Production GROUP BY Year, Quarter;","SELECT Quarter, SUM(Quantity) FROM Ytterbium_Production GROUP BY Quarter;",0 what is the grid when the rider is mika kallio?,"CREATE TABLE table_name_64 (grid INTEGER, rider VARCHAR);","SELECT MAX(grid) FROM table_name_64 WHERE rider = ""mika kallio"";","SELECT SUM(grid) FROM table_name_64 WHERE rider = ""mika kallio"";",0 List the names of all cities with a population over 1 million,"CREATE TABLE cities (city_id INT, city_name TEXT, population INT);",SELECT city_name FROM cities WHERE population > 1000000;,SELECT city_name FROM cities WHERE population > 10000000;,0 What is the 2010 entry for the row that has a 2009 entry of 270?,CREATE TABLE table_name_35 (Id VARCHAR);,"SELECT 2010 FROM table_name_35 WHERE 2009 = ""270"";",SELECT 2010 FROM table_name_35 WHERE 2009 = 270;,0 What is the average number of games played associated with a first game in 1997 and over 0 games drawn?,"CREATE TABLE table_name_48 (played INTEGER, first_game VARCHAR, drawn VARCHAR);",SELECT AVG(played) FROM table_name_48 WHERE first_game = 1997 AND drawn > 0;,"SELECT AVG(played) FROM table_name_48 WHERE first_game = ""1997"" AND drawn > 0;",0 Insert new satellite image,"CREATE TABLE satellite_images (id INT PRIMARY KEY, farm_id INT, image_url VARCHAR(100), capture_date TIMESTAMP);","INSERT INTO satellite_images (id, farm_id, image_url, capture_date) VALUES (1, 123, 'https://example.com/image1.jpg', '2022-02-01 14:30:00');","INSERT INTO satellite_images (id, farm_id, image_url, capture_date) VALUES (1, 'Satellites', '2022-03-01'), (2, 'Satellites', '2022-03-31'), (3, 'Satellites', '2022-03-31'), (4, 'Satellites', '2022-03-31'), (5, 'Satellites', '2022-03-31');",0 What is the average number of volunteers per day for each program?,"CREATE TABLE daily_program_volunteers (daily_program_volunteer_id INT, program TEXT, volunteer_name TEXT, volunteer_date DATE); ","SELECT program, AVG(num_volunteers) as avg_volunteers_per_day FROM (SELECT program, volunteer_date, COUNT(DISTINCT volunteer_name) as num_volunteers FROM daily_program_volunteers GROUP BY program, volunteer_date) as subquery GROUP BY program;","SELECT program, AVG(COUNT(*)) as avg_volunteers_per_day FROM daily_program_volunteers GROUP BY program;",0 Which driver drove in grid 19?,"CREATE TABLE table_name_12 (driver VARCHAR, grid VARCHAR);",SELECT driver FROM table_name_12 WHERE grid = 19;,SELECT driver FROM table_name_12 WHERE grid = 19;,1 List the top 5 products with the lowest calorie count in the nutrition_data table.,"CREATE TABLE nutrition_data (product_id INT, product_name VARCHAR(50), calorie_count INT); ","SELECT product_id, product_name, calorie_count FROM (SELECT product_id, product_name, calorie_count, ROW_NUMBER() OVER (ORDER BY calorie_count ASC) AS rank FROM nutrition_data) WHERE rank <= 5;","SELECT product_name, calorie_count FROM nutrition_data ORDER BY calorie_count DESC LIMIT 5;",0 What incumbent won the district of texas 22?,"CREATE TABLE table_1341598_44 (incumbent VARCHAR, district VARCHAR);","SELECT incumbent FROM table_1341598_44 WHERE district = ""Texas 22"";","SELECT incumbent FROM table_1341598_44 WHERE district = ""Texas 22"";",1 What is the average defense spending per capita for each region in the last 5 years?,"CREATE TABLE Defense_Spending (id INT, country VARCHAR(50), year INT, amount FLOAT, population INT); CREATE TABLE Countries (id INT, name VARCHAR(50), region VARCHAR(50));","SELECT co.region, AVG(ds.amount/ds.population) as avg_defense_spending_per_capita FROM Defense_Spending ds INNER JOIN Countries co ON ds.country = co.name WHERE ds.year BETWEEN (YEAR(CURRENT_DATE) - 5) AND YEAR(CURRENT_DATE) GROUP BY co.region;","SELECT c.region, AVG(ds.amount/ds.population) as avg_defense_spending_per_capita FROM Defense_Spending ds JOIN Countries c ON ds.country = c.name WHERE ds.year BETWEEN 2017 AND 2021 GROUP BY c.region;",0 Please show different software platforms and the corresponding number of devices using each.,CREATE TABLE device (Software_Platform VARCHAR);,"SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform;","SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform;",1 "Insert a new artifact 'Ancient Coin' from the 'EuropeExcavation' site, type 'Coin', quantity 1.","CREATE TABLE ExcavationSite (SiteID INT PRIMARY KEY, SiteName VARCHAR(100), Location VARCHAR(100), StartDate DATE, EndDate DATE);CREATE TABLE Artifact (ArtifactID INT PRIMARY KEY, SiteID INT, ArtifactName VARCHAR(100), Description TEXT, FOREIGN KEY (SiteID) REFERENCES ExcavationSite(SiteID));CREATE TABLE ArtifactType (ArtifactTypeID INT PRIMARY KEY, TypeName VARCHAR(100));CREATE TABLE ArtifactDetail (ArtifactID INT, ArtifactTypeID INT, Quantity INT, PRIMARY KEY (ArtifactID, ArtifactTypeID), FOREIGN KEY (ArtifactID) REFERENCES Artifact(ArtifactID), FOREIGN KEY (ArtifactTypeID) REFERENCES ArtifactType(ArtifactTypeID));","INSERT INTO Artifact (ArtifactID, SiteID, ArtifactName, Description) VALUES (1415, (SELECT SiteID FROM ExcavationSite WHERE SiteName = 'EuropeExcavation'), 'Ancient Coin', 'An ancient coin from the EuropeExcavation site.');INSERT INTO ArtifactDetail (ArtifactID, ArtifactTypeID, Quantity) VALUES (1415, (SELECT ArtifactTypeID FROM ArtifactType WHERE TypeName = 'Coin'), 1);","INSERT INTO Artifact (ArtifactID, SiteID, ArtifactName, Description) VALUES (4, 'Ancient Coin', 'EuropeExcavation', 1, 1); INSERT INTO ArtifactType (ArtifactTypeID, ArtifactTypeID) VALUES (4, 'EuropeExcavation', 'EuropeExcavation', 1, 1); INSERT INTO ArtifactDetail (ArtifactTypeID, ArtifactTypeID, Quantity) VALUES (4, 'EuropeExcavation', 1, 1);",0 How many fire calls were there between 12:00 PM and 5:00 PM in the West district?,"CREATE TABLE district (id INT, name VARCHAR(20)); CREATE TABLE calls (id INT, district_id INT, call_type VARCHAR(20), call_time TIMESTAMP); ",SELECT COUNT(*) FROM calls WHERE district_id = (SELECT id FROM district WHERE name = 'West') AND call_type = 'Fire' AND call_time BETWEEN '2021-06-01 12:00:00' AND '2021-06-01 17:00:00';,SELECT COUNT(*) FROM calls JOIN district ON calls.district_id = district.id WHERE district.name = 'West' AND call_type = 'fire' AND call_time BETWEEN '12:00 PM' AND '5:00 PM';,0 Delete records of workshops with less than 5 hours,"CREATE TABLE teacher_workshops (id INT, teacher_id INT, workshop VARCHAR(50), hours INT); ",DELETE FROM teacher_workshops WHERE hours < 5;,DELETE FROM teacher_workshops WHERE hours 5;,0 How many total attendees participated in events organized by the Cultural Center?,"CREATE TABLE Venues (id INT PRIMARY KEY, name VARCHAR(20)); CREATE TABLE Events (id INT PRIMARY KEY, name VARCHAR(20), venue VARCHAR(20), attendees INT); ",SELECT SUM(attendees) FROM Events WHERE venue = 'Cultural Center';,SELECT SUM(attendees) FROM Events WHERE venue = 'Cultural Center';,1 Who's ranked less than 2?,"CREATE TABLE table_name_32 (player VARCHAR, rank INTEGER);",SELECT player FROM table_name_32 WHERE rank < 2;,SELECT player FROM table_name_32 WHERE rank 2;,0 List the names of all platinum-certified green buildings in 'USA',"CREATE TABLE GreenBuildings (id INT, building_name VARCHAR(100), certification_level VARCHAR(50), city VARCHAR(50), state VARCHAR(50), country VARCHAR(50));",SELECT building_name FROM GreenBuildings WHERE country = 'USA' AND certification_level = 'Platinum';,SELECT building_name FROM GreenBuildings WHERE certification_level = 'Platinum' AND country = 'USA';,0 Find the unique authors who have written for 'The Guardian' in the technology category.,"CREATE TABLE guardian (article_id INT, title TEXT, author TEXT, category TEXT, publisher TEXT); ",SELECT DISTINCT author FROM guardian WHERE category = 'Technology';,SELECT DISTINCT author FROM guardian WHERE category = 'technology' AND publisher = 'The Guardian';,0 "List all the building permits issued for residential buildings in New York between 2018 and 2020, along with the labor statistics.","CREATE TABLE Building_Permits (Permit_ID INT, Building_Type VARCHAR(50), Issue_Date DATE); CREATE TABLE Residential_Buildings (Building_ID INT, Building_Type VARCHAR(50)); CREATE TABLE Labor_Statistics (Permit_ID INT, Worker_Count INT, Year INT); ","SELECT Building_Permits.Permit_ID, Building_Type, Issue_Date, Worker_Count, Year FROM Building_Permits INNER JOIN Residential_Buildings ON Building_Permits.Building_Type = Residential_Buildings.Building_Type INNER JOIN Labor_Statistics ON Building_Permits.Permit_ID = Labor_Statistics.Permit_ID WHERE Issue_Date BETWEEN '2018-01-01' AND '2020-12-31';","SELECT Building_Permits.Permit_ID, Residential_Buildings.Building_Type, Labor_Statistics.Worker_Count FROM Building_Permits INNER JOIN Residential_Buildings ON Building_Permits.Building_ID = Residential_Buildings.Building_ID INNER JOIN Labor_Statistics ON Residential_Buildings.Building_ID = Labor_Statistics.Permit_ID WHERE Residential_Buildings.Building_Type = 'Residential' AND Residential_Buildings.Building_Type = 'Residential' AND Residential_Buildings.Building_Type = 'Residential' AND Residential_Buildings.Building_Type = 'Residential' AND Residential_Buildings.Building_Type = 'Residential' AND Labor_Statistics.Year BETWEEN 2018 AND 2020;",0 How many rounds have a position of C?,"CREATE TABLE table_name_95 (round VARCHAR, position VARCHAR);","SELECT COUNT(round) FROM table_name_95 WHERE position = ""c"";","SELECT COUNT(round) FROM table_name_95 WHERE position = ""c"";",1 Update the 'gene_sequence' column for 'gene_id' 1001 in the 'genes' table to 'ATGCGAT',"CREATE TABLE genes (gene_id INT PRIMARY KEY, gene_sequence VARCHAR(20));",WITH cte1 AS (UPDATE genes SET gene_sequence = 'ATGCGAT' WHERE gene_id = 1001) SELECT * FROM cte1;,UPDATE genes SET gene_sequence = 'ATGCGAT' WHERE gene_id = 1001;,0 "What record has points greater than 39, with 38 as the game?","CREATE TABLE table_name_1 (record VARCHAR, points VARCHAR, game VARCHAR);",SELECT record FROM table_name_1 WHERE points > 39 AND game = 38;,"SELECT record FROM table_name_1 WHERE points > 39 AND game = ""38"";",0 What was the score on the October 28 game?,"CREATE TABLE table_23601267_2 (final_score VARCHAR, date VARCHAR);","SELECT final_score FROM table_23601267_2 WHERE date = ""October 28"";","SELECT final_score FROM table_23601267_2 WHERE date = ""October 28"";",1 Show ids for all students who have advisor 1121.,"CREATE TABLE Student (StuID VARCHAR, Advisor VARCHAR);",SELECT StuID FROM Student WHERE Advisor = 1121;,SELECT StuID FROM Student WHERE Advisor = 1121;,1 Which artworks were visited the most by female visitors?,"CREATE TABLE Artworks (ArtworkID INT, ArtworkName VARCHAR(100)); CREATE TABLE Visits (VisitID INT, VisitorID INT, ArtworkID INT, VisitDate DATE, Gender VARCHAR(10)); ","SELECT A.ArtworkName, COUNT(*) AS Visits FROM Artworks A JOIN Visits B ON A.ArtworkID = B.ArtworkID WHERE Gender = 'Female' GROUP BY A.ArtworkName ORDER BY Visits DESC;","SELECT Artworks.ArtworkName, COUNT(Visits.VisitorID) AS VisitCount FROM Artworks INNER JOIN Visits ON Artworks.ArtworkID = Visits.ArtworkID WHERE Visits.Gender = 'Female' GROUP BY Artworks.ArtworkName ORDER BY VisitCount DESC LIMIT 1;",0 What was the percentage of national votes for Mahmoud Ahmadinejad?,"CREATE TABLE table_1827900_1 (_percentage_of_votes_nationally VARCHAR, candidates VARCHAR);","SELECT _percentage_of_votes_nationally FROM table_1827900_1 WHERE candidates = ""Mahmoud Ahmadinejad"";","SELECT _percentage_of_votes_nationally FROM table_1827900_1 WHERE candidates = ""Mahmoud Ahmadinejad"";",1 How many energy efficiency projects were completed in each country in the year 2020?,"CREATE TABLE energy_efficiency (country TEXT, year INTEGER, project_count INTEGER); ","SELECT country, SUM(project_count) FROM energy_efficiency WHERE year = 2020 GROUP BY country;","SELECT country, SUM(project_count) FROM energy_efficiency WHERE year = 2020 GROUP BY country;",1 What event did Mikhail Avetisyan win by method of DQ (eye gouging)?,"CREATE TABLE table_name_98 (event VARCHAR, method VARCHAR);","SELECT event FROM table_name_98 WHERE method = ""dq (eye gouging)"";","SELECT event FROM table_name_98 WHERE method = ""dq (eye gouging)"";",1 What is the average age of articles in the 'news' table?,"CREATE TABLE news (title VARCHAR(255), author VARCHAR(255), age INT, category VARCHAR(255)); ",SELECT AVG(age) FROM news;,SELECT AVG(age) FROM news;,1 What is the BB Pop for the song with RIAA of G that was in a year earlier than 1961?,"CREATE TABLE table_name_8 (bb_pop VARCHAR, riaa VARCHAR, year VARCHAR);","SELECT bb_pop FROM table_name_8 WHERE riaa = ""g"" AND year < 1961;","SELECT bb_pop FROM table_name_8 WHERE riaa = ""g"" AND year 1961;",0 What is the name of the team with a rank smaller than 5 and a time of 1:37.58.38?,"CREATE TABLE table_name_10 (team VARCHAR, rank VARCHAR, time VARCHAR);","SELECT team FROM table_name_10 WHERE rank < 5 AND time = ""1:37.58.38"";","SELECT team FROM table_name_10 WHERE rank 5 AND time = ""1:37.58.38"";",0 "For a release price of $72, what is the TDP of the microprocessor?","CREATE TABLE table_16729930_18 (tdp VARCHAR, release_price___usd__ VARCHAR);","SELECT tdp FROM table_16729930_18 WHERE release_price___usd__ = ""$72"";","SELECT tdp FROM table_16729930_18 WHERE release_price___usd__ = ""$72"";",1 What is the average carbon footprint of accommodations in each continent?,"CREATE TABLE carbon_footprint (id INT, accommodation_id INT, carbon_footprint FLOAT); CREATE TABLE accommodations (id INT, name TEXT, continent TEXT); ","SELECT a.continent, AVG(carbon_footprint) FROM carbon_footprint cf JOIN accommodations a ON cf.accommodation_id = a.id GROUP BY a.continent;","SELECT a.continent, AVG(cf.carbon_footprint) as avg_carbon_footprint FROM carbon_footprint cf JOIN accommodations a ON cf.accommodation_id = a.id GROUP BY a.continent;",0 "List all TV shows with their ratings and the production company, ordered by production company in ascending order.","CREATE TABLE tv_show (id INT, title VARCHAR(255), rating DECIMAL(3,2), company VARCHAR(255)); ","SELECT title, rating, company FROM tv_show ORDER BY company ASC;","SELECT title, rating, company FROM tv_show ORDER BY company ASC;",1 Which energy storage technologies have a capacity of over 10000 MW in Australia?,"CREATE TABLE storage_technologies (country text, technology text, capacity integer); ",SELECT technology FROM storage_technologies WHERE country = 'Australia' AND capacity > 10000;,SELECT technology FROM storage_technologies WHERE country = 'Australia' AND capacity > 10000;,1 List all underwater volcanoes in the Arctic Ocean.,"CREATE TABLE ArcticOcean (volcano_name TEXT, location TEXT); ",SELECT volcano_name FROM ArcticOcean;,SELECT volcano_name FROM ArcticOcean WHERE location = 'Arctic Ocean';,0 What is the total of televote for the artist Pokeris when the place was less than 10?,"CREATE TABLE table_name_44 (televote INTEGER, artist VARCHAR, place VARCHAR);","SELECT SUM(televote) FROM table_name_44 WHERE artist = ""pokeris"" AND place < 10;","SELECT SUM(televote) FROM table_name_44 WHERE artist = ""pokeris"" AND place 10;",0 How many rounds were won with James Hunt as pole position and John Watson as fastest lap?,"CREATE TABLE table_1140083_2 (rnd VARCHAR, pole_position VARCHAR, fastest_lap VARCHAR);","SELECT COUNT(rnd) FROM table_1140083_2 WHERE pole_position = ""James Hunt"" AND fastest_lap = ""John Watson"";","SELECT COUNT(rnd) FROM table_1140083_2 WHERE pole_position = ""James Hunt"" AND fastest_lap = ""John Watson"";",1 What is the average length of songs in the hip-hop genre?,"CREATE TABLE songs (id INT, title TEXT, length FLOAT, genre TEXT); ",SELECT AVG(length) FROM songs WHERE genre = 'hip-hop';,SELECT AVG(length) FROM songs WHERE genre = 'Hip-Hop';,0 What is the group A region with a region number of 2?,"CREATE TABLE table_name_20 (group_a VARCHAR, region VARCHAR);",SELECT group_a FROM table_name_20 WHERE region = 2;,SELECT group_a FROM table_name_20 WHERE region = 2;,1 "What is the minimum and maximum number of patients served per rural health center in Europe, and how many of these centers serve more than 30000 patients?","CREATE TABLE rural_health_centers (center_id INT, center_name VARCHAR(100), country VARCHAR(50), num_patients INT); ","SELECT MIN(num_patients) AS min_patients_per_center, MAX(num_patients) AS max_patients_per_center, COUNT(*) FILTER (WHERE num_patients > 30000) AS centers_with_more_than_30000_patients FROM rural_health_centers WHERE country IN (SELECT name FROM countries WHERE continent = 'Europe');","SELECT center_name, MIN(num_patients) as min_patients, MAX(num_patients) as max_patients FROM rural_health_centers WHERE country = 'Europe' GROUP BY center_name HAVING COUNT(*) > 30000;",0 What is the name of Rank 5?,"CREATE TABLE table_name_89 (name VARCHAR, rank VARCHAR);",SELECT name FROM table_name_89 WHERE rank = 5;,SELECT name FROM table_name_89 WHERE rank = 5;,1 What is the distribution of vegan and non-vegan product certifications among cosmetic products?,"CREATE TABLE product_certifications (id INT, product_id INT, certification_type VARCHAR(255)); ","SELECT certification_type, COUNT(*) FROM product_certifications GROUP BY certification_type;","SELECT certification_type, COUNT(*) as certification_count FROM product_certifications GROUP BY certification_type;",0 Which candidate won 61.47% of the votes?,"CREATE TABLE table_name_82 (candidate VARCHAR, share_of_votes VARCHAR);","SELECT candidate FROM table_name_82 WHERE share_of_votes = ""61.47%"";","SELECT candidate FROM table_name_82 WHERE share_of_votes = ""61.47%"";",1 Find the total quantity of each strain sold in Colorado and Oregon.,"CREATE TABLE sales (sale_id INT, dispensary_id INT, strain VARCHAR(255), quantity INT);CREATE TABLE dispensaries (dispensary_id INT, name VARCHAR(255), state VARCHAR(255));","SELECT strain, SUM(quantity) as total_quantity FROM sales JOIN dispensaries ON sales.dispensary_id = dispensaries.dispensary_id WHERE state IN ('Colorado', 'Oregon') GROUP BY strain;","SELECT strain, SUM(quantity) FROM sales JOIN dispensaries ON sales.dispensary_id = dispensaries.dispensary_id WHERE dispensaries.state IN ('Colorado', 'Oregon') GROUP BY strain;",0 What is the total number of hospitalizations for flu and pneumonia in the last 12 months in California?,"CREATE TABLE hospitalizations (hospitalization_id INT, reported_date DATE, state VARCHAR(255), cause VARCHAR(255)); ",SELECT COUNT(*) FROM hospitalizations WHERE state = 'California' AND (cause = 'Flu' OR cause = 'Pneumonia') AND reported_date >= CURDATE() - INTERVAL 12 MONTH;,"SELECT COUNT(*) FROM hospitalizations WHERE state = 'California' AND cause IN ('Flu', 'Pneumonia') AND reported_date >= DATEADD(month, -12, GETDATE());",0 What was the total duration of excavations at the 'Machu Picchu' site?,"CREATE TABLE ExcavationSites (site_id INT, site_name VARCHAR(50)); CREATE TABLE ExcavationTimeline (site_id INT, start_year INT, end_year INT); ","SELECT SUM(DATEDIFF(year, start_year, end_year)) FROM ExcavationTimeline WHERE site_id = (SELECT site_id FROM ExcavationSites WHERE site_name = 'Machu Picchu');",SELECT SUM(CASE WHEN site_name = 'Machu Picchu' THEN 1 ELSE 0 END) AS total_duration FROM ExcavationTimeline INNER JOIN ExcavationSites ON ExcavationTimeline.site_id = ExcavationSites.site_id WHERE ExcavationSites.site_name = 'Machu Picchu';,0 How many marine species have been identified in the Southern Ocean?,"CREATE TABLE marine_species (id INT, species_name VARCHAR(255), location VARCHAR(255)); ",SELECT COUNT(*) FROM marine_species WHERE marine_species.location = 'Southern Ocean';,SELECT COUNT(*) FROM marine_species WHERE location = 'Southern Ocean';,0 What is the average billing amount for cases handled by attorney John Smith?,"CREATE TABLE attorneys (attorney_id INT, name VARCHAR(50)); CREATE TABLE cases (case_id INT, attorney_id INT, billing_amount DECIMAL(10, 2)); ",SELECT AVG(billing_amount) FROM cases WHERE attorney_id = (SELECT attorney_id FROM attorneys WHERE name = 'John Smith');,SELECT AVG(billing_amount) FROM cases JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.name = 'John Smith';,0 What is the average allocation for climate adaptation in the 'europe' region?,"CREATE TABLE climate_funding (id INT, allocation FLOAT, initiative_type TEXT, region_id INT); CREATE TABLE regions (id INT, region TEXT); ",SELECT AVG(allocation) FROM climate_funding INNER JOIN regions ON climate_funding.region_id = regions.id WHERE regions.region = 'Europe' AND climate_funding.initiative_type = 'Adaptation';,SELECT AVG(cf.allocation) FROM climate_funding cf INNER JOIN regions r ON cf.region_id = r.id WHERE r.region = 'europe' AND cf.initiative_type = 'climate adaptation';,0 What is the total number of players by gender and how many players have no gender specified?,"CREATE TABLE Players (PlayerID INT, Age INT, Gender VARCHAR(10), Location VARCHAR(50), LastLogin DATETIME); ","SELECT COALESCE(Gender, 'Not specified') AS Gender, COUNT(*) FROM Players GROUP BY Gender WITH ROLLUP;","SELECT Gender, COUNT(*) FROM Players GROUP BY Gender;",0 What was the To Par of Tiger Woods who won in 1988?,"CREATE TABLE table_name_85 (to_par VARCHAR, year_won VARCHAR);",SELECT to_par FROM table_name_85 WHERE year_won = 1988;,SELECT to_par FROM table_name_85 WHERE year_won = 1988;,1 Who is The Spouse of the Duchess that has a Became Duchess on 31 october 1733 husband's accession?,"CREATE TABLE table_name_31 (spouse VARCHAR, became_duchess VARCHAR);","SELECT spouse FROM table_name_31 WHERE became_duchess = ""31 october 1733 husband's accession"";","SELECT spouse FROM table_name_31 WHERE became_duchess = ""31 october 1733 husband's accession"";",1 "How many articles have been published in each month of the year in the ""articles"" table?","CREATE TABLE articles (id INT, publish_date DATE); ","SELECT DATE_FORMAT(publish_date, '%Y-%m') AS month, COUNT(*) AS articles_count FROM articles GROUP BY month;","SELECT EXTRACT(MONTH FROM publish_date) AS month, COUNT(*) FROM articles GROUP BY month;",0 Which BR number has an LMS number over 14768?,"CREATE TABLE table_name_5 (br_number VARCHAR, lms_number INTEGER);",SELECT br_number FROM table_name_5 WHERE lms_number > 14768;,SELECT br_number FROM table_name_5 WHERE lms_number > 14768;,1 What score has 3-7 as the record?,"CREATE TABLE table_name_46 (score VARCHAR, record VARCHAR);","SELECT score FROM table_name_46 WHERE record = ""3-7"";","SELECT score FROM table_name_46 WHERE record = ""3-7"";",1 List the electric vehicle models and their adoption rates in the US.,"CREATE TABLE ElectricVehicleAdoption (Model VARCHAR(20), Country VARCHAR(10), AdoptionRate FLOAT);","SELECT Model, AdoptionRate FROM ElectricVehicleAdoption WHERE Country = 'US';","SELECT Model, AdoptionRate FROM ElectricVehicleAdoption WHERE Country = 'USA';",0 What is the sum of donations and number of volunteers for each program in Q3 2021?,"CREATE TABLE ProgramVolunteers (ProgramID INT, VolunteerCount INT); ","SELECT ProgramName, SUM(DonationAmount) as TotalDonation, SUM(VolunteerCount) as TotalVolunteers FROM Programs JOIN ProgramVolunteers ON Programs.ProgramID = ProgramVolunteers.ProgramID WHERE DonationDate BETWEEN '2021-07-01' AND '2021-09-30' GROUP BY ProgramName;","SELECT ProgramID, SUM(Donations) as TotalDonations, SUM(VolunteerCount) as TotalVolunteers FROM ProgramVolunteers WHERE QUARTER(VolunteerCount) = 3 AND YEAR(VolunteerCount) = 2021 GROUP BY ProgramID;",0 "born on 1983-03-14, what is the cb's name?","CREATE TABLE table_name_28 (name VARCHAR, pos VARCHAR, date_of_birth VARCHAR);","SELECT name FROM table_name_28 WHERE pos = ""cb"" AND date_of_birth = ""1983-03-14"";","SELECT name FROM table_name_28 WHERE pos = ""cb"" AND date_of_birth = ""1983-03-14"";",1 What is the maximum number of games played by users from Canada?,"CREATE TABLE Players (PlayerID INT, PlayerName VARCHAR(50), Country VARCHAR(50), GamesPlayed INT); ",SELECT MAX(GamesPlayed) FROM Players WHERE Country = 'Canada';,SELECT MAX(GamesPlayed) FROM Players WHERE Country = 'Canada';,1 "What city has riverside ground as the venue, with a year prior to 1998?","CREATE TABLE table_name_16 (city VARCHAR, venue VARCHAR, year VARCHAR);","SELECT city FROM table_name_16 WHERE venue = ""riverside ground"" AND year < 1998;","SELECT city FROM table_name_16 WHERE venue = ""riverside ground"" AND year 1998;",0 What is the total CO2 emission of factories in 'Asia'?,"CREATE TABLE factories (factory_id INT, location VARCHAR(255), co2_emission INT); ",SELECT SUM(co2_emission) FROM factories WHERE location = 'Asia';,SELECT SUM(co2_emission) FROM factories WHERE location = 'Asia';,1 List the names of states that have both healthcare facilities and mental health facilities.,"CREATE TABLE healthcare_facilities (id INT, name VARCHAR(50), state VARCHAR(10)); ",SELECT h.state FROM healthcare_facilities h INNER JOIN mental_health_facilities m ON h.state = m.state GROUP BY h.state;,SELECT state FROM healthcare_facilities WHERE state IN (SELECT state FROM mental_health_facilities);,0 Which Total has an olympic bronze medalist?,"CREATE TABLE table_name_27 (total VARCHAR, rank_points VARCHAR);","SELECT total FROM table_name_27 WHERE rank_points = ""olympic bronze medalist"";","SELECT total FROM table_name_27 WHERE rank_points = ""olympic bronze medalist"";",1 Which artifact types are present at excavation sites dated between 1950 and 1990?,"CREATE TABLE ArtifactsDates (ArtifactID INT, Date DATE); ",SELECT ArtifactType FROM Artifacts a JOIN ArtifactsDates d ON a.ArtifactID = d.ArtifactID WHERE d.Date BETWEEN '1950-01-01' AND '1990-01-01' GROUP BY ArtifactType;,SELECT ArtifactType FROM ArtifactsDates WHERE Date BETWEEN '1950-01-01' AND '1990-12-31';,0 what is the score when the championship is rome and the opponent is richard krajicek?,"CREATE TABLE table_name_31 (score VARCHAR, championship VARCHAR, opponent VARCHAR);","SELECT score FROM table_name_31 WHERE championship = ""rome"" AND opponent = ""richard krajicek"";","SELECT score FROM table_name_31 WHERE championship = ""rome"" AND opponent = ""richard krajicek"";",1 Who directed the episode whose production code is pabf05?,"CREATE TABLE table_28194879_1 (directed_by VARCHAR, production_code VARCHAR);","SELECT directed_by FROM table_28194879_1 WHERE production_code = ""PABF05"";","SELECT directed_by FROM table_28194879_1 WHERE production_code = ""Pabf05"";",0 Name the played with lost of 5,"CREATE TABLE table_name_65 (played VARCHAR, lost VARCHAR);","SELECT played FROM table_name_65 WHERE lost = ""5"";","SELECT played FROM table_name_65 WHERE lost = ""5"";",1 "What is the average distance traveled by the Mars Rover Curiosity, grouped by the type of terrain it has covered?","CREATE TABLE Mars_Rover_Curiosity ( id INT, date DATE, terrain VARCHAR(255), distance FLOAT );","SELECT terrain, AVG(distance) FROM Mars_Rover_Curiosity GROUP BY terrain;","SELECT terrain, AVG(distance) FROM Mars_Rover_Curiosity GROUP BY terrain;",1 List all fans who have not attended any games in the last year,"CREATE TABLE fans (fan_id INT, gender VARCHAR(10), last_attended_game DATE); ",SELECT * FROM fans WHERE last_attended_game IS NULL;,"SELECT * FROM fans WHERE last_attended_game DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);",0 "Identify the top 5 mining states in Australia with the highest environmental impact scores, and show the associated environmental impact categories and values.","CREATE TABLE australian_states (id INT, state TEXT); CREATE TABLE mines (id INT, state TEXT, ei_category TEXT, ei_value FLOAT); ","SELECT a.state, m.ei_category, AVG(m.ei_value) AS avg_ei_value FROM australian_states a JOIN mines m ON a.state = m.state GROUP BY a.state, m.ei_category ORDER BY avg_ei_value DESC LIMIT 5;","SELECT a.state, m.ei_category, m.ei_value FROM australian_states a JOIN mines m ON a.state = m.state GROUP BY a.state ORDER BY ei_category DESC LIMIT 5;",0 Insert a new menu item called 'Veggie Burger' with a price of $12.99 and a quantity of 15.,"CREATE TABLE Menu (id INT, item VARCHAR(50), price DECIMAL(5,2), qty INT);","INSERT INTO Menu (item, price, qty) VALUES ('Veggie Burger', 12.99, 15);","INSERT INTO Menu (id, item, price, qty) VALUES (1, 'Veggie Burger', 12.99, 15);",0 What are the names of parties that do not have delegates in election?,"CREATE TABLE election (Party VARCHAR, Party_ID VARCHAR); CREATE TABLE party (Party VARCHAR, Party_ID VARCHAR);",SELECT Party FROM party WHERE NOT Party_ID IN (SELECT Party FROM election);,SELECT T1.Party FROM election AS T1 JOIN party AS T2 ON T1.Party_ID = T2.Party_ID WHERE T2.Party_ID IS NULL;,0 who is featuring when the title is energy of the daleks?,"CREATE TABLE table_name_18 (featuring VARCHAR, title VARCHAR);","SELECT featuring FROM table_name_18 WHERE title = ""energy of the daleks"";","SELECT featuring FROM table_name_18 WHERE title = ""energy of the daleks"";",1 What are the notes for South Africa?,"CREATE TABLE table_name_8 (notes VARCHAR, country VARCHAR);","SELECT notes FROM table_name_8 WHERE country = ""south africa"";","SELECT notes FROM table_name_8 WHERE country = ""south africa"";",1 what is the to par when the score is 69-70-72-72=283?,"CREATE TABLE table_name_56 (to_par VARCHAR, score VARCHAR);",SELECT to_par FROM table_name_56 WHERE score = 69 - 70 - 72 - 72 = 283;,SELECT to_par FROM table_name_56 WHERE score = 69 - 70 - 72 - 72 = 283;,1 "Which Entrant had the Bugatti T35B Chassis and the Driver, Heinrich-Joachim Von Morgen?","CREATE TABLE table_name_66 (entrant VARCHAR, chassis VARCHAR, driver VARCHAR);","SELECT entrant FROM table_name_66 WHERE chassis = ""bugatti t35b"" AND driver = ""heinrich-joachim von morgen"";","SELECT entrant FROM table_name_66 WHERE chassis = ""bugatti t35b"" AND driver = ""herman-joachim von morgen"";",0 What are the names of all exoplanets discovered by the TESS mission in 2019?,"CREATE TABLE exoplanets_tess (exoplanet_name VARCHAR(255), discovery_mission VARCHAR(255), discovery_year INT); ",SELECT exoplanet_name FROM exoplanets_tess WHERE discovery_mission = 'TESS' AND discovery_year = 2019;,SELECT exoplanet_name FROM exoplanets_tess WHERE discovery_mission = 'TESS' AND discovery_year = 2019;,1 Find the average donation amount per donor for donations made in the 'disaster relief' category.,"CREATE TABLE donors (id INT, name VARCHAR(255)); CREATE TABLE donation_details (donor_id INT, category VARCHAR(255), amount DECIMAL(10, 2)); ","SELECT donors.name, AVG(donation_details.amount) AS avg_donation FROM donors INNER JOIN donation_details ON donors.id = donation_details.donor_id WHERE category = 'disaster relief' GROUP BY donors.id;",SELECT AVG(amount) FROM donation_details JOIN donors ON donation_details.donor_id = donors.id WHERE donation_details.category = 'disaster relief';,0 Which auto shows have the most electric vehicle debuts?,"CREATE TABLE auto_show_info (show_id INT, show_name VARCHAR(100), location VARCHAR(50), year INT, debuts VARCHAR(255));","SELECT show_name, COUNT(*) FROM auto_show_info WHERE debuts LIKE '%Electric%' GROUP BY show_name ORDER BY COUNT(*) DESC LIMIT 1;","SELECT show_name, debuts FROM auto_show_info ORDER BY debuts DESC LIMIT 1;",0 What is the highest and lowest temperature recorded for each crop in the 'historical_weather' table?,"CREATE TABLE historical_weather (id INT, crop VARCHAR(255), temperature DECIMAL(5,2), record_date DATE);","SELECT crop, MAX(temperature) as highest_temperature, MIN(temperature) as lowest_temperature FROM historical_weather GROUP BY crop;","SELECT crop, MAX(temperature) as max_temperature, MIN(temperature) as min_temperature FROM historical_weather GROUP BY crop;",0 Find the average age of players who play 'Fortnite' or 'Call of Duty',"CREATE TABLE PlayerDemographics (PlayerID INT, Game VARCHAR(20), Age INT); ",SELECT AVG(Age) FROM (SELECT Age FROM PlayerDemographics WHERE Game = 'Fortnite' UNION ALL SELECT Age FROM PlayerDemographics WHERE Game = 'Call of Duty') AS Subquery,"SELECT AVG(Age) FROM PlayerDemographics WHERE Game IN ('Fortnite', 'Call of Duty');",0 How many laps was qualifier of 138.212?,"CREATE TABLE table_name_4 (laps VARCHAR, qual VARCHAR);","SELECT laps FROM table_name_4 WHERE qual = ""138.212"";","SELECT laps FROM table_name_4 WHERE qual = ""138.212"";",1 Name the power provided where transfer speed mb/s is 300 and max cable length of 10,"CREATE TABLE table_174151_5 (power_provided VARCHAR, transfer_speed__mb_s_ VARCHAR, max_cable_length__m_ VARCHAR);","SELECT power_provided FROM table_174151_5 WHERE transfer_speed__mb_s_ = ""300"" AND max_cable_length__m_ = ""10"";",SELECT power_provided FROM table_174151_5 WHERE transfer_speed__mb_s_ = 300 AND max_cable_length__m_ = 10;,0 How many deaths did the eyar with exactly 6 hurricanes have?,"CREATE TABLE table_2930244_4 (deaths VARCHAR, number_of_hurricanes VARCHAR);",SELECT COUNT(deaths) FROM table_2930244_4 WHERE number_of_hurricanes = 6;,"SELECT deaths FROM table_2930244_4 WHERE number_of_hurricanes = ""6"";",0 What's the average budget of movies released between 2000 and 2005?,"CREATE TABLE movie (id INT PRIMARY KEY, title VARCHAR(255), year INT, budget INT); ",SELECT AVG(budget) FROM movie WHERE year BETWEEN 2000 AND 2005;,SELECT AVG(budget) FROM movie WHERE year BETWEEN 2000 AND 2005;,1 What is the lowest points won from player victoria azarenka?,"CREATE TABLE table_26218783_7 (points INTEGER, player VARCHAR);","SELECT MIN(points) AS won FROM table_26218783_7 WHERE player = ""Victoria Azarenka"";","SELECT MIN(points) FROM table_26218783_7 WHERE player = ""Victoria Azarenka"";",0 "Find the maximum number of attendees in virtual tours across Asian countries, in the last 6 months.","CREATE TABLE virtual_tours (id INT, location TEXT, attendees INT, tour_date DATE); ","SELECT MAX(attendees) FROM virtual_tours WHERE location LIKE '%Asia%' AND tour_date >= DATE_SUB(NOW(), INTERVAL 6 MONTH);","SELECT MAX(attendees) FROM virtual_tours WHERE location LIKE '%Asia%' AND tour_date >= DATEADD(month, -6, GETDATE());",0 What city had a rank before 3 and primary carrier JetBlue Airways?,"CREATE TABLE table_name_78 (city VARCHAR, rank VARCHAR, carriers VARCHAR);","SELECT city FROM table_name_78 WHERE rank < 3 AND carriers = ""jetblue airways"";","SELECT city FROM table_name_78 WHERE rank 3 AND carriers = ""primary"";",0 What is the position of the player for Washington school?,"CREATE TABLE table_name_44 (position VARCHAR, school VARCHAR);","SELECT position FROM table_name_44 WHERE school = ""washington"";","SELECT position FROM table_name_44 WHERE school = ""washington"";",1 What is the average ticket price for each quarter in the year 2021?,"CREATE TABLE ticket_sales_by_date (sale_id INT, sale_date DATE, ticket_type VARCHAR(255), price DECIMAL(5,2)); ","SELECT EXTRACT(QUARTER FROM sale_date) as quarter, AVG(price) as avg_price FROM ticket_sales_by_date WHERE sale_date >= '2021-01-01' AND sale_date <= '2021-12-31' GROUP BY quarter;","SELECT DATE_FORMAT(sale_date, '%Y-%m') as quarter, AVG(price) as avg_price FROM ticket_sales_by_date WHERE sale_date BETWEEN '2021-01-01' AND '2021-06-30' GROUP BY quarter;",0 "Which Wrestler has an Entered of 5, and a Pinned of mvp?","CREATE TABLE table_name_23 (wrestler VARCHAR, entered VARCHAR, pinned VARCHAR);","SELECT wrestler FROM table_name_23 WHERE entered = 5 AND pinned = ""mvp"";","SELECT wrestler FROM table_name_23 WHERE entered = 5 AND pinned = ""mvp"";",1 Find the total quantity of sustainable materials used by each brand in 2021.,"CREATE TABLE Brands (Brand_ID INT, Brand_Name TEXT); CREATE TABLE Material_Usage (Brand_ID INT, Year INT, Quantity INT);","SELECT B.Brand_Name, SUM(MU.Quantity) AS Total_Quantity_2021 FROM Brands B","SELECT Brands.Brand_Name, SUM(Material_Usage.Quantity) FROM Brands INNER JOIN Material_Usage ON Brands.Brand_ID = Material_Usage.Brand_ID WHERE Material_Usage.Year = 2021 GROUP BY Brands.Brand_Name;",0 Identify the mining operations with the highest water usage.,"CREATE TABLE MiningOperations (OperationID INT, MineName VARCHAR(100), OperationType VARCHAR(50), StartDate DATE, EndDate DATE); CREATE TABLE EnvironmentalImpact (OperationID INT, CO2Emissions INT, WaterUsage INT, WasteGeneration INT); ","SELECT mo.OperationID, mo.MineName, ei.WaterUsage FROM MiningOperations mo JOIN EnvironmentalImpact ei ON mo.OperationID = ei.OperationID ORDER BY ei.WaterUsage DESC LIMIT 1;","SELECT MiningOperations.OperationName, EnvironmentalImpact.WaterUsage, EnvironmentalImpact.WasteGeneration FROM MiningOperations INNER JOIN EnvironmentalImpact ON MiningOperations.OperationID = EnvironmentalImpact.OperationID GROUP BY MiningOperations.OperationName ORDER BY WaterUsage DESC LIMIT 1;",0 What is the average fuel consumption of container ships that docked in the Port of Los Angeles in 2022?,"CREATE TABLE ships(id INT, name VARCHAR(100), type VARCHAR(50), fuel_consumption INT); CREATE TABLE docking(ship_id INT, port VARCHAR(50), year INT); ",SELECT AVG(fuel_consumption) FROM ships JOIN docking ON ships.id = docking.ship_id WHERE docking.port = 'Los Angeles' AND docking.year = 2022 AND ships.type = 'Container';,SELECT AVG(fuel_consumption) FROM ships JOIN docking ON ships.id = docking.ship_id WHERE ships.type = 'Container' AND docking.port = 'Port of Los Angeles' AND docking.year = 2022;,0 What is the Win % in the Span of 2011–2013 with a Lost of less than 1?,"CREATE TABLE table_name_91 (win__percentage INTEGER, span VARCHAR, lost VARCHAR);","SELECT AVG(win__percentage) FROM table_name_91 WHERE span = ""2011–2013"" AND lost < 1;","SELECT SUM(win__percentage) FROM table_name_91 WHERE span = ""2011–2013"" AND lost 1;",0 Calculate the total amount of resources extracted by each mining site,"CREATE TABLE mining_site (id INT, name VARCHAR(255), resource VARCHAR(255), amount INT); ","SELECT ms.name, SUM(ms.amount) as total_resources_extracted FROM mining_site ms GROUP BY ms.name;","SELECT name, SUM(amount) FROM mining_site GROUP BY name;",0 Find the product name and category for the product with the lowest rating in each product category.,"CREATE TABLE products (product_id INT, product_name TEXT, product_category TEXT, rating FLOAT); ","SELECT product_name, product_category FROM (SELECT product_name, product_category, rating, DENSE_RANK() OVER (PARTITION BY product_category ORDER BY rating ASC) as rnk FROM products) t WHERE rnk = 1;","SELECT product_name, product_category FROM products WHERE rating = (SELECT MIN(rating) FROM products GROUP BY product_category);",0 What is the total timber volume harvested in all forests in 2020?,"CREATE TABLE NorthAmericanForests (region VARCHAR(20), year INT, timber_volume FLOAT); CREATE TABLE AmazonRainforest (region VARCHAR(20), year INT, timber_volume FLOAT); ",SELECT SUM(timber_volume) FROM (SELECT timber_volume FROM NorthAmericanForests WHERE year = 2020 UNION ALL SELECT timber_volume FROM AmazonRainforest WHERE year = 2020) AS TotalTimber;,SELECT SUM(NorthAmericanForests.timber_volume) FROM NorthAmericanForests INNER JOIN AmazonRainforest ON NorthAmericanForests.region = AmazonRainforest.region WHERE NorthAmericanForests.year = 2020;,0 "What was the result at dakar , senegal, on 3 september 2011, and with a Score of 2–0?","CREATE TABLE table_name_17 (result VARCHAR, score VARCHAR, venue VARCHAR, date VARCHAR);","SELECT result FROM table_name_17 WHERE venue = ""dakar , senegal"" AND date = ""3 september 2011"" AND score = ""2–0"";","SELECT result FROM table_name_17 WHERE venue = ""dakar, senegal"" AND date = ""3 september 2011"" AND score = ""2–0"";",0 "What is the name, age, and policy type of policyholders who have filed a claim in the last week and have a risk score over 600?","CREATE TABLE policyholder (policyholder_id INT, name VARCHAR(50), age INT, gender VARCHAR(10), zip_code INT, policy_number INT, policy_type VARCHAR(20)); CREATE TABLE policy (policy_id INT, policy_number INT, issue_date DATE, risk_score INT); CREATE TABLE claim (claim_id INT, policy_id INT, claim_date DATE, claim_amount INT);","SELECT policyholder.name, policyholder.age, policyholder.policy_type FROM policyholder JOIN policy ON policyholder.policy_number = policy.policy_number JOIN claim ON policy.policy_id = claim.policy_id WHERE claim_date >= DATEADD(WEEK, -1, GETDATE()) AND policy.risk_score > 600;","SELECT p.name, p.age, p.policy_type FROM policyholder p JOIN policy p ON p.policy_number = p.policy_number JOIN claim c ON p.policy_id = c.policy_id WHERE c.claim_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) AND p.risk_score > 600;",0 List genetic research projects with more than 10 participants.,"CREATE TABLE research_projects (id INT, name VARCHAR(50), lead_researcher VARCHAR(50), participants INT, start_date DATE, end_date DATE);",SELECT name FROM research_projects WHERE participants > 10;,SELECT name FROM research_projects WHERE participants > 10;,1 Select all records from 'customer_size_diversity',"CREATE TABLE customer_size_diversity (customer_id INT PRIMARY KEY, size VARCHAR(10), age INT, location VARCHAR(50)); SELECT * FROM customer_size_diversity;",SELECT * FROM customer_size_diversity;,SELECT * FROM customer_size_diversity;,1 What date did the Bulls play the LA Lakers?,"CREATE TABLE table_11960610_7 (date VARCHAR, team VARCHAR);","SELECT date FROM table_11960610_7 WHERE team = ""LA Lakers"";","SELECT date FROM table_11960610_7 WHERE team = ""LA Lakers"";",1 Name the authority for te akau with roll less than 254 and decile of 8,"CREATE TABLE table_name_64 (authority VARCHAR, area VARCHAR, roll VARCHAR, decile VARCHAR);","SELECT authority FROM table_name_64 WHERE roll < 254 AND decile = ""8"" AND area = ""te akau"";","SELECT authority FROM table_name_64 WHERE roll 254 AND decile = 8 AND area = ""te akau"";",0 "What is the average soil moisture level for all crops in the precision_farming database, grouped by crop type and region?","CREATE TABLE crops (id INT, type VARCHAR(255), region VARCHAR(255)); CREATE TABLE soil_moisture (id INT, crop_id INT, level INT, timestamp TIMESTAMP); ","SELECT c.type, r.region, AVG(sm.level) FROM crops c INNER JOIN soil_moisture sm ON c.id = sm.crop_id INNER JOIN (SELECT region, id FROM crops GROUP BY region) r ON c.region = r.region GROUP BY c.type, r.region;","SELECT crops.type, crops.region, AVG(soil_moisture.level) FROM crops INNER JOIN soil_moisture ON crops.id = soil_moisture.crop_id GROUP BY crops.type, crops.region;",0 Who was drafted by the Baltimore Colts? ,"CREATE TABLE table_2508633_3 (player VARCHAR, nfl_team VARCHAR);","SELECT player FROM table_2508633_3 WHERE nfl_team = ""Baltimore Colts"";","SELECT player FROM table_2508633_3 WHERE nfl_team = ""Baltimore Colts"";",1 Name the remarks for sawhouse,"CREATE TABLE table_211791_1 (remarks VARCHAR, nato_reporting_name VARCHAR);","SELECT remarks FROM table_211791_1 WHERE nato_reporting_name = ""SAWHOUSE"";","SELECT remarks FROM table_211791_1 WHERE nato_reporting_name = ""Ssawhouse"";",0 "What was the ticket price on September 16, 1986?","CREATE TABLE table_name_56 (ticket_price_s_ VARCHAR, date_s_ VARCHAR);","SELECT ticket_price_s_ FROM table_name_56 WHERE date_s_ = ""september 16, 1986"";","SELECT ticket_price_s_ FROM table_name_56 WHERE date_s_ = ""september 16, 1986"";",1 What positions are in the Chicago bulls?,"CREATE TABLE table_name_27 (position VARCHAR, team VARCHAR);","SELECT position FROM table_name_27 WHERE team = ""chicago bulls"";","SELECT position FROM table_name_27 WHERE team = ""chicago bulls"";",1 "For the 'project_materials' table, add a new row with the following information: project_id 1, material 'Concrete', quantity 100 and unit 'ton'.","CREATE TABLE project_materials (project_id INT, material VARCHAR(20), quantity INT, unit VARCHAR(10));","INSERT INTO project_materials (project_id, material, quantity, unit) VALUES (1, 'Concrete', 100, 'ton');","INSERT INTO project_materials (project_id, material, quantity, unit) VALUES (1, 'Concrete', 100, 'ton');",1 Which Case Length has a Base of 14.96 (.589)?,"CREATE TABLE table_name_57 (case_length VARCHAR, base VARCHAR);","SELECT case_length FROM table_name_57 WHERE base = ""14.96 (.589)"";","SELECT case_length FROM table_name_57 WHERE base = ""14.96 (.589)"";",1 Which menu items in the vegan category have a revenue greater than $1000 in 2022?,"CREATE TABLE menu_engineering(menu_item VARCHAR(255), category VARCHAR(255), revenue DECIMAL(10,2), sustainable_source BOOLEAN); ",SELECT menu_item FROM menu_engineering WHERE category = 'Vegan' AND revenue > 1000 AND YEAR(date) = 2022;,SELECT menu_item FROM menu_engineering WHERE category = 'Vegan' AND revenue > 1000 AND sustainable_source = TRUE AND YEAR(date) = 2022;,0 How many different variants are there for Northern Counties bodybuilder?,"CREATE TABLE table_28035004_1 (variant VARCHAR, bodybuilder VARCHAR);","SELECT COUNT(variant) FROM table_28035004_1 WHERE bodybuilder = ""Northern Counties"";","SELECT COUNT(variant) FROM table_28035004_1 WHERE bodybuilder = ""Northern Counties"";",1 Which positions have made 4 touchdowns?,"CREATE TABLE table_14342592_5 (position VARCHAR, touchdowns VARCHAR);",SELECT position FROM table_14342592_5 WHERE touchdowns = 4;,SELECT position FROM table_14342592_5 WHERE touchdowns = 4;,1 Update the ticket price of concert 'Rock the Bay' in 'ticket_sales' table to $120.,"CREATE TABLE ticket_sales (sale_id INT, user_id INT, concert_name VARCHAR(255), quantity INT, total_price DECIMAL(5,2), date_purchased DATE);",UPDATE ticket_sales SET ticket_price = 120 WHERE concert_name = 'Rock the Bay';,UPDATE ticket_sales SET total_price = 120 WHERE concert_name = 'Rock the Bay';,0 "What is the number of visitors who identified as LGBTQ+ that attended virtual exhibitions in San Francisco, CA, USA in 2024 and their average rating?","CREATE TABLE Visitors (ID INT, Age INT, Gender VARCHAR(10), Rating INT, City VARCHAR(20), State VARCHAR(20), Country VARCHAR(20), Sexuality VARCHAR(20)); CREATE TABLE Exhibitions (ID INT, Title VARCHAR(50), City VARCHAR(20), State VARCHAR(20), Country VARCHAR(20), Date DATE, Virtual BOOLEAN); ","SELECT AVG(Visitors.Rating), COUNT(Visitors.ID) FROM Visitors INNER JOIN Exhibitions ON Visitors.City = Exhibitions.City AND Visitors.State = Exhibitions.State AND Visitors.Country = Exhibitions.Country WHERE Exhibitions.Virtual = TRUE AND Visitors.Sexuality = 'LGBTQ+' AND Exhibitions.Date BETWEEN '2024-01-01' AND '2024-12-31';",SELECT AVG(Visitors.Rating) FROM Visitors INNER JOIN Exhibitions ON Visitors.City = Exhibitions.City WHERE Visitors.Sexuality = 'LGBTQ+' AND Exhibitions.Country = 'USA' AND Exhibitions.Virtual = TRUE AND Exhibitions.Date BETWEEN '2024-01-01' AND '2024-12-31';,0 What is the total amount of socially responsible loans issued by financial institutions in the Asia-Pacific region?,"CREATE TABLE loans (id INT, amount DECIMAL(10, 2), issuance_date DATE, institution_id INT, is_socially_responsible BOOLEAN); CREATE TABLE financial_institutions (id INT, name VARCHAR(50), region VARCHAR(20)); ",SELECT SUM(loans.amount) FROM loans INNER JOIN financial_institutions ON loans.institution_id = financial_institutions.id WHERE loans.is_socially_responsible = true AND financial_institutions.region = 'Asia-Pacific';,SELECT SUM(loans.amount) FROM loans INNER JOIN financial_institutions ON loans.institution_id = financial_institutions.id WHERE loans.is_socially_responsible = true AND financial_institutions.region = 'Asia-Pacific';,1 What is the average severity of vulnerabilities found in the North American region?,"CREATE TABLE vulnerabilities (id INT, severity FLOAT, region VARCHAR(50)); ",SELECT AVG(severity) FROM vulnerabilities WHERE region = 'North America';,SELECT AVG(severity) FROM vulnerabilities WHERE region = 'North America';,1 "What is the average salary of construction workers in California and Texas, grouped by occupation?","CREATE TABLE construction_workers (worker_id INT, occupation VARCHAR(50), state VARCHAR(50), salary INT); ","SELECT occupation, AVG(salary) FROM construction_workers WHERE state IN ('California', 'Texas') GROUP BY occupation;","SELECT occupation, AVG(salary) FROM construction_workers WHERE state IN ('California', 'Texas') GROUP BY occupation;",1 Create a table named 'treatments',"CREATE TABLE treatments ( treatment_id INT PRIMARY KEY, name VARCHAR(100), description TEXT, condition_id INT, FOREIGN KEY (condition_id) REFERENCES conditions(condition_id));","CREATE TABLE treatments ( treatment_id INT PRIMARY KEY, name VARCHAR(100), description TEXT, condition_id INT, FOREIGN KEY (condition_id) REFERENCES conditions(condition_id));","CREATE TABLE treatments ( treatment_id INT PRIMARY KEY, name VARCHAR(100), description TEXT, condition_id INT, FOREIGN KEY (condition_id) REFERENCES conditions(condition_id));",1 What is the minimum number of attendees at a cultural event in Tokyo?,"CREATE TABLE events (id INT, name TEXT, location TEXT, attendance INT); ",SELECT MIN(attendance) FROM events WHERE location = 'Tokyo';,SELECT MIN(attendance) FROM events WHERE location = 'Tokyo';,1 Which players are admins in any game?,"CREATE TABLE Players (player_id INT, name VARCHAR(255), age INT, is_admin BOOLEAN); ",SELECT * FROM Players WHERE is_admin = true;,SELECT name FROM Players WHERE is_admin = true;,0 What is the series minimum if the season number is 2.08?,"CREATE TABLE table_24639086_3 (series__number INTEGER, season__number VARCHAR);","SELECT MIN(series__number) FROM table_24639086_3 WHERE season__number = ""2.08"";","SELECT MIN(series__number) FROM table_24639086_3 WHERE season__number = ""2.08"";",1 What is the total cost of all athlete wellbeing programs that started in '2022' from 'athlete_wellbeing' table?,"CREATE TABLE athlete_wellbeing (program_id INT, program_name VARCHAR(255), description TEXT, cost DECIMAL(5,2), date_started DATE, date_ended DATE);",SELECT SUM(cost) FROM athlete_wellbeing WHERE YEAR(date_started) = 2022;,SELECT SUM(cost) FROM athlete_wellbeing WHERE date_started >= '2022-01-01' AND date_ended '2023-01-01';,0 "What is the total number of heritage sites for each UNESCO World Heritage Committee member, excluding those that are not yet inscribed?","CREATE TABLE HeritageSites (id INT, name VARCHAR(50), country VARCHAR(50), is_inscribed BOOLEAN); CREATE TABLE UNESCO_Committee (id INT, country VARCHAR(50));","SELECT C.country, COUNT(H.id) as total_sites FROM HeritageSites H INNER JOIN UNESCO_Committee C ON H.country = C.country WHERE H.is_inscribed GROUP BY C.country;","SELECT UNESCO_Committee.country, COUNT(*) FROM HeritageSites INNER JOIN UNESCO_Committee ON HeritageSites.country = UNESCO_Committee.country WHERE HeritageSites.is_inscribed = TRUE GROUP BY UNESCO_Committee.country;",0 Find the most common ingredient among dishes.,"CREATE TABLE ingredients (menu_id INT, ingredient VARCHAR(50)); ","SELECT ingredient, COUNT(*) AS num_dishes FROM ingredients GROUP BY ingredient ORDER BY num_dishes DESC LIMIT 1;","SELECT ingredient, COUNT(*) as count FROM ingredients GROUP BY ingredient ORDER BY count DESC LIMIT 1;",0 "Create a table named ""cargo"" with columns ""cargo_id"", ""vessel_id"", ""destination"", and ""delivery_date"".","CREATE TABLE cargo (cargo_id INT, vessel_id INT, destination VARCHAR(50), delivery_date DATE);","CREATE TABLE cargo (cargo_id INT, vessel_id INT, destination VARCHAR(50), delivery_date DATE);","CREATE TABLE cargo (cargo_id INT, vessel_id INT, destination VARCHAR(50), delivery_date DATE);",1 What's the percentage of donors who have made donations greater than $500 in each region?,"CREATE TABLE donors (id INT, name TEXT, region TEXT, donation_amount DECIMAL(10,2)); ","SELECT region, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM donors d2 WHERE d1.region = d2.region) AS percentage FROM donors d1 WHERE donation_amount > 500 GROUP BY region;","SELECT region, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM donors WHERE donation_amount > 500) FROM donors GROUP BY region;",0 Delete all records in the wellbeing_programs table with athlete_id 1,"CREATE TABLE wellbeing_programs (program_id INT, athlete_id INT); ",DELETE FROM wellbeing_programs WHERE athlete_id = 1;,DELETE FROM wellbeing_programs WHERE athlete_id = 1;,1 Update the 'city' column in the 'stations' table for 'Station 1' to 'New York',"CREATE TABLE stations (id INT, name TEXT, city TEXT, capacity INT);",UPDATE stations SET city = 'New York' WHERE name = 'Station 1';,UPDATE stations SET city = 'New York' WHERE name = 'Station 1';,1 "What is the Producer on December 25, 2006?","CREATE TABLE table_name_77 (producer VARCHAR, year VARCHAR);","SELECT producer FROM table_name_77 WHERE year = ""december 25, 2006"";","SELECT producer FROM table_name_77 WHERE year = ""december 25, 2006"";",1 Find all organic produce items that have a higher calorie count than the average for their respective categories?,"CREATE TABLE Categories (id INT, name VARCHAR(50), category_avg_calories INT); ",SELECT o.name FROM Organic_Produce o JOIN Categories c ON o.id = c.id WHERE o.calories > c.category_avg_calories;,SELECT name FROM Categories WHERE category_avg_calories > (SELECT AVG(category_avg_calories) FROM Categories);,0 Show the top 3 countries with the highest total ticket sales,"CREATE TABLE ticket_sales (ticket_id INT, team_id INT, country VARCHAR(50), price DECIMAL(5,2)); ","SELECT country, SUM(price) FROM ticket_sales GROUP BY country ORDER BY SUM(price) DESC LIMIT 3;","SELECT country, SUM(price) as total_sales FROM ticket_sales GROUP BY country ORDER BY total_sales DESC LIMIT 3;",0 "What is Manufacturer, when Quantity Made is 2, and when Year Made is 1884?","CREATE TABLE table_name_25 (manufacturer VARCHAR, quantity_made VARCHAR, year_made VARCHAR);","SELECT manufacturer FROM table_name_25 WHERE quantity_made = ""2"" AND year_made = ""1884"";",SELECT manufacturer FROM table_name_25 WHERE quantity_made = 2 AND year_made = 1884;,0 Delete all museum visitors who have not visited in the last 5 years,"CREATE TABLE museum_visitors (id INT, name VARCHAR(255), last_visit DATE); ","WITH inactive_visitors AS (DELETE FROM museum_visitors WHERE last_visit IS NULL OR last_visit < DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR)) SELECT * FROM museum_visitors;","DELETE FROM museum_visitors WHERE last_visit DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR);",0 How many sources are there for south africa?,"CREATE TABLE table_29487895_2 (source_s_ VARCHAR, country___region VARCHAR);","SELECT COUNT(source_s_) FROM table_29487895_2 WHERE country___region = ""South Africa"";","SELECT COUNT(source_s_) FROM table_29487895_2 WHERE country___region = ""South Africa"";",1 "How many tickets were sold for the 2022 World Series game in Boston, MA?","CREATE TABLE tickets (ticket_id INT, game_name VARCHAR(50), location VARCHAR(50), tickets_sold INT); ","SELECT SUM(tickets_sold) FROM tickets WHERE game_name = 'World Series 2022' AND location = 'Boston, MA';",SELECT SUM(tickets_sold) FROM tickets WHERE game_name = 'World Series 2022' AND location = 'Boston';,0 What name has a qual 2 of 1:46.025?,"CREATE TABLE table_name_33 (name VARCHAR, qual_2 VARCHAR);","SELECT name FROM table_name_33 WHERE qual_2 = ""1:46.025"";","SELECT name FROM table_name_33 WHERE qual_2 = ""1:46.025"";",1 How many autonomous driving research studies have been conducted in Sweden?,"CREATE TABLE AutonomousDrivingResearch (Country VARCHAR(50), Studies INT); ",SELECT Studies FROM AutonomousDrivingResearch WHERE Country = 'Sweden';,SELECT SUM(Studies) FROM AutonomousDrivingResearch WHERE Country = 'Sweden';,0 "What is the total carbon sequestered by trees in the carbon_sequestration table, grouped by the year of measurement?","CREATE TABLE carbon_sequestration (tree_id INT, year INT, carbon_sequestered FLOAT);","SELECT year, SUM(carbon_sequestered) FROM carbon_sequestration GROUP BY year;","SELECT year, SUM(carbon_sequestered) FROM carbon_sequestration GROUP BY year;",1 "Rank projects in 'Bridge_Infrastructure' table by cost, breaking ties with project names.","CREATE TABLE Bridge_Infrastructure (id INT, project_name VARCHAR(50), location VARCHAR(50), cost INT);","SELECT project_name, cost, RANK() OVER (ORDER BY cost, project_name) AS project_rank FROM Bridge_Infrastructure;","SELECT project_name, cost, RANK() OVER (ORDER BY cost DESC) as rn FROM Bridge_Infrastructure;",0 What is the region where Milan is located?,"CREATE TABLE table_14532_1 (region VARCHAR, capital VARCHAR);","SELECT region FROM table_14532_1 WHERE capital = ""Milan"";","SELECT region FROM table_14532_1 WHERE capital = ""Milan"";",1 what's the won with try bonus being 8,"CREATE TABLE table_13758945_3 (won VARCHAR, try_bonus VARCHAR);","SELECT won FROM table_13758945_3 WHERE try_bonus = ""8"";",SELECT won FROM table_13758945_3 WHERE try_bonus = 8;,0 What is the toll for light vehicles at the plaza between bela bela and modimolle?,"CREATE TABLE table_1211545_2 (light_vehicle VARCHAR, location VARCHAR);","SELECT light_vehicle FROM table_1211545_2 WHERE location = ""between Bela Bela and Modimolle"";","SELECT light_vehicle FROM table_1211545_2 WHERE location = ""Plaza between Bela Bela and Modimolle"";",0 "Which Avg/G that has a Name of opponents, and an Effic smaller than 129.73?","CREATE TABLE table_name_69 (avg_g INTEGER, name VARCHAR, effic VARCHAR);","SELECT SUM(avg_g) FROM table_name_69 WHERE name = ""opponents"" AND effic < 129.73;","SELECT AVG(avg_g) FROM table_name_69 WHERE name = ""opposers"" AND effic 129.73;",0 What's the Current Status of Livery of the Network South-East?,"CREATE TABLE table_name_66 (current_status VARCHAR, livery VARCHAR);","SELECT current_status FROM table_name_66 WHERE livery = ""network south-east"";","SELECT current_status FROM table_name_66 WHERE livery = ""network south-east"";",1 Name the team for week 1 of 33,"CREATE TABLE table_name_66 (team VARCHAR, week_1 VARCHAR);","SELECT team FROM table_name_66 WHERE week_1 = ""33"";","SELECT team FROM table_name_66 WHERE week_1 = ""33"";",1 What are the names of representatives in descending order of votes?,"CREATE TABLE representative (Name VARCHAR, Representative_ID VARCHAR); CREATE TABLE election (Representative_ID VARCHAR);",SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC;,SELECT T1.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY T2.Vote DESC;,0 list the spokespersons where voting order is 9,"CREATE TABLE table_184803_4 (spokespersons VARCHAR, voting_order VARCHAR);",SELECT spokespersons FROM table_184803_4 WHERE voting_order = 9;,SELECT spokespersons FROM table_184803_4 WHERE voting_order = 9;,1 What is the average bioprocess engineering project duration for projects led by Dr. Patel?,"CREATE TABLE bioprocess_engineering (id INT, project_name VARCHAR(100), lead_engineer VARCHAR(100), duration INT);",SELECT AVG(duration) FROM bioprocess_engineering WHERE lead_engineer = 'Dr. Patel';,SELECT AVG(duration) FROM bioprocess_engineering WHERE lead_engineer = 'Dr. Patel';,1 What is the most common mental health condition treated in the last 12 months in Pacific Islander community and the average age of patients with this condition?,"CREATE TABLE mental_health_conditions (condition_id INT, name VARCHAR(255), description VARCHAR(255)); CREATE TABLE patients (patient_id INT, age INT, gender VARCHAR(10), condition VARCHAR(255), ethnicity VARCHAR(255)); CREATE TABLE therapy_sessions (session_id INT, patient_id INT, therapist_id INT, session_date DATE); CREATE TABLE communities (community_id INT, name VARCHAR(255), type VARCHAR(255));","SELECT mental_health_conditions.name, AVG(patients.age) FROM patients JOIN therapy_sessions ON patients.patient_id = therapy_sessions.patient_id JOIN mental_health_conditions ON patients.condition = mental_health_conditions.condition JOIN communities ON patients.community_id = communities.community_id WHERE communities.type = 'Pacific Islander' AND therapy_sessions.session_date >= DATE_SUB(CURRENT_DATE, INTERVAL 12 MONTH) GROUP BY patients.condition ORDER BY COUNT(*) DESC LIMIT 1;","SELECT mental_health_conditions.name, AVG(patients.age) as avg_age FROM mental_health_conditions INNER JOIN patients ON mental_health_conditions.condition = patients.condition INNER JOIN therapy_sessions ON patients.patient_id = therapy_sessions.patient_id INNER JOIN communities ON therapy_sessions.community_id = communities.community_id WHERE communities.type = 'Pacific Islander' AND therapy_sessions.session_date >= DATEADD(month, -12, GETDATE());",0 "What was the total fare collected from the 'Red Line' on January 1, 2021?","CREATE TABLE routes (route_name VARCHAR(20), fare FLOAT); ",SELECT SUM(fare) FROM routes WHERE route_name = 'Red Line';,SELECT SUM(fare) FROM routes WHERE route_name = 'Red Line' AND date BETWEEN '2021-01-01' AND '2021-01-31';,0 What are the approved treatments when the antibody is bevacizumab?,"CREATE TABLE table_1661124_1 (approved_treatment_s_ VARCHAR, antibody VARCHAR);","SELECT approved_treatment_s_ FROM table_1661124_1 WHERE antibody = ""Bevacizumab"";","SELECT approved_treatment_s_ FROM table_1661124_1 WHERE antibody = ""Bevacizumab"";",1 What is the distribution of genetic research projects by temperature range and country in Oceania?,"CREATE TABLE genetic_research (id INT, project_name VARCHAR(255), country VARCHAR(255), temperature_min FLOAT, temperature_max FLOAT); ","SELECT country, CONCAT(temperature_min, '-', temperature_max) AS temp_range, COUNT(*) FROM genetic_research WHERE country IN ('Australia', 'New Zealand') GROUP BY country, temp_range;","SELECT country, temperature_min, temperature_max, COUNT(*) as num_projects FROM genetic_research WHERE country IN ('Australia', 'Australia', 'New Zealand') GROUP BY country, temperature_min, temperature_max;",0 What is the average length (in seconds) of songs released by artists from the USA?,"CREATE TABLE artist (artist_id INT, artist_name VARCHAR(50), country VARCHAR(20)); CREATE TABLE song (song_id INT, song_name VARCHAR(50), artist_id INT, length INT); ",SELECT AVG(s.length) FROM artist a JOIN song s ON a.artist_id = s.artist_id WHERE a.country = 'USA';,SELECT AVG(song.length) FROM song INNER JOIN artist ON song.artist_id = artist.artist_id WHERE artist.country = 'USA';,0 Identify the total quantity of dairy products supplied by each supplier in the last month?,"CREATE TABLE Suppliers(SupplierID INT, Name VARCHAR(50), Type VARCHAR(50));CREATE TABLE DairyProducts(ProductID INT, SupplierID INT, ProductName VARCHAR(50), Quantity INT, DeliveryDate DATE);","SELECT s.Name, SUM(dp.Quantity) FROM Suppliers s JOIN DairyProducts dp ON s.SupplierID = dp.SupplierID WHERE dp.DeliveryDate >= DATEADD(month, -1, GETDATE()) AND s.Type = 'Dairy Supplier' GROUP BY s.Name;","SELECT Suppliers.Name, SUM(DairyProducts.Quantity) as TotalQuantity FROM Suppliers INNER JOIN DairyProducts ON Suppliers.SupplierID = DairyProducts.SupplierID WHERE DeliveryDate >= DATEADD(month, -1, GETDATE()) GROUP BY Suppliers.Name;",0 Increase the fare for disabled passengers on bus route 105 by 10%.,"CREATE TABLE routes (route_id INT, route_name TEXT); CREATE TABLE fare_collection (collection_id INT, passenger_type TEXT, route_id INT, fare DECIMAL); ",UPDATE fare_collection SET fare = fare * 1.10 WHERE passenger_type = 'Wheelchair' AND route_id = 105;,UPDATE fare_collection SET fare = fare_collection.fare * 1.10 WHERE route_id = (SELECT route_id FROM routes WHERE route_name = 'Bus') AND passenger_type = 'Disabled';,0 What is the trigger pack on the Colt 602 with the a1 rear sight type? ,"CREATE TABLE table_19901_1 (trigger_pack VARCHAR, rear_sight_type VARCHAR, colt_model_no VARCHAR);","SELECT trigger_pack FROM table_19901_1 WHERE rear_sight_type = ""A1"" AND colt_model_no = ""602"";","SELECT trigger_pack FROM table_19901_1 WHERE rear_sight_type = ""A1"" AND colt_model_no = 602;",0 Create a view for the top 3 food suppliers by rating,"CREATE TABLE food_suppliers (supplier_id INT PRIMARY KEY, name VARCHAR(255), rating INT);",CREATE VIEW top_3_food_suppliers AS SELECT * FROM food_suppliers WHERE rating > 4 ORDER BY rating DESC LIMIT 3;,"CREATE VIEW top_three_food_suppliers AS SELECT supplier_id, name, rating FROM food_suppliers ORDER BY rating DESC LIMIT 3;",0 How many crimes were reported in District2 of CityJ in 2018?,"CREATE TABLE crimes_2 (id INT, city VARCHAR(50), district VARCHAR(50), year INT, crime_count INT); ",SELECT SUM(crime_count) FROM crimes_2 WHERE city = 'CityJ' AND district = 'District2' AND year = 2018;,SELECT SUM(crime_count) FROM crimes_2 WHERE city = 'CityJ' AND district = 'District2' AND year = 2018;,1 "What team was the opponent for the game played on September 19, 1999?","CREATE TABLE table_name_92 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_92 WHERE date = ""september 19, 1999"";","SELECT opponent FROM table_name_92 WHERE date = ""september 19, 1999"";",1 When dydek (11) has the highest rebounds what is the date?,"CREATE TABLE table_18904831_6 (date VARCHAR, high_rebounds VARCHAR);","SELECT date FROM table_18904831_6 WHERE high_rebounds = ""Dydek (11)"";","SELECT date FROM table_18904831_6 WHERE high_rebounds = ""Dydek (11)"";",1 What is the Population of the New Bandon Parish with an Area km 2 larger than 326.76?,"CREATE TABLE table_name_97 (population INTEGER, area_km_2 VARCHAR, official_name VARCHAR);","SELECT MAX(population) FROM table_name_97 WHERE area_km_2 > 326.76 AND official_name = ""new bandon"";","SELECT SUM(population) FROM table_name_97 WHERE area_km_2 > 326.76 AND official_name = ""new bandon parish"";",0 What was the number of unique users who streamed a specific artist's songs in 2021?,"CREATE TABLE Artist_Streaming (user INT, artist VARCHAR(50), year INT, streams INT); ","SELECT artist, COUNT(DISTINCT user) FROM Artist_Streaming WHERE year = 2021 GROUP BY artist;",SELECT COUNT(DISTINCT user) FROM Artist_Streaming WHERE year = 2021;,0 What is the total amount of climate finance committed by the United States in the climate communication sector?,"CREATE TABLE climate_finance (id INT, committer VARCHAR(255), committed_amount DECIMAL(10,2), commit_year INT, sector VARCHAR(255));",SELECT SUM(committed_amount) FROM climate_finance WHERE committer = 'United States' AND sector = 'climate communication';,SELECT SUM(committed_amount) FROM climate_finance WHERE committer = 'United States' AND sector = 'climate communication';,1 Identify the number of species in the fish_stock_5 table with a dissolved oxygen level below 6.2.,"CREATE TABLE fish_stock_5 (species VARCHAR(255), dissolved_oxygen FLOAT); ",SELECT COUNT(*) FROM fish_stock_5 WHERE dissolved_oxygen < 6.2;,SELECT COUNT(species) FROM fish_stock_5 WHERE dissolved_oxygen 6.2;,0 Name the frequency with class of b,"CREATE TABLE table_name_78 (frequency VARCHAR, class VARCHAR);","SELECT frequency FROM table_name_78 WHERE class = ""b"";","SELECT frequency FROM table_name_78 WHERE class = ""b"";",1 Populate the virtual_reality table,"CREATE TABLE virtual_reality (vr_id INT PRIMARY KEY, name VARCHAR(50), release_date DATE, manufacturer VARCHAR(50));","INSERT INTO virtual_reality (vr_id, name, release_date, manufacturer) VALUES (1, 'Oculus Quest 2', '2020-10-13', 'Facebook Technologies'), (2, 'HTC Vive Pro 2', '2021-06-01', 'HTC Corporation'), (3, 'Valve Index', '2019-06-28', 'Valve Corporation');","CREATE TABLE virtual_reality (vr_id INT PRIMARY KEY, name VARCHAR(50), release_date DATE, manufacturer VARCHAR(50));",0 "Find the top 3 products with the highest revenue, and their corresponding revenues.","CREATE TABLE sales (sale_id INT, product_id INT, revenue DECIMAL(10,2)); ","SELECT product_id, SUM(revenue) as total_revenue FROM sales GROUP BY product_id ORDER BY total_revenue DESC LIMIT 3;","SELECT product_id, revenue FROM sales ORDER BY revenue DESC LIMIT 3;",0 "Who appointed the representative that had a Presentation of Credentials on March 25, 1976?","CREATE TABLE table_name_72 (appointed_by VARCHAR, presentation_of_credentials VARCHAR);","SELECT appointed_by FROM table_name_72 WHERE presentation_of_credentials = ""march 25, 1976"";","SELECT appointed_by FROM table_name_72 WHERE presentation_of_credentials = ""march 25, 1976"";",1 What is the location of the team Saturn?,"CREATE TABLE table_20140132_1 (location VARCHAR, team VARCHAR);","SELECT location FROM table_20140132_1 WHERE team = ""Saturn"";","SELECT location FROM table_20140132_1 WHERE team = ""Saturn"";",1 What is the average volume of timber produced annually in mangrove forests over the last decade?,"CREATE TABLE mangrove_timber (id INT, year INT, volume FLOAT);",SELECT AVG(volume) as avg_annual_volume FROM mangrove_timber WHERE year BETWEEN 2011 AND 2021;,SELECT AVG(volume) FROM mangrove_timber WHERE year BETWEEN 2017 AND 2021;,0 "Which Game is the highest one that has a Score of 3–4 ot, and Points larger than 75?","CREATE TABLE table_name_96 (game INTEGER, score VARCHAR, points VARCHAR);","SELECT MAX(game) FROM table_name_96 WHERE score = ""3–4 ot"" AND points > 75;","SELECT MAX(game) FROM table_name_96 WHERE score = ""3–4 ot"" AND points > 75;",1 "What is the total value of military equipment sales to each country in Q2 2020, ranked by total sales?","CREATE TABLE Sales_Data (sale_id INT, sale_date DATE, equipment_type VARCHAR(255), country VARCHAR(255), sale_value FLOAT); ","SELECT country, SUM(sale_value) AS total_sales, RANK() OVER (ORDER BY SUM(sale_value) DESC) AS sales_rank FROM Sales_Data WHERE sale_date BETWEEN '2020-04-01' AND '2020-06-30' GROUP BY country;","SELECT country, SUM(sale_value) as total_sales FROM Sales_Data WHERE sale_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY country ORDER BY total_sales DESC;",0 How many people are living with HIV in Oceania?,"CREATE TABLE Continent (name VARCHAR(50), hiv_positive INT); ","SELECT SUM(hiv_positive) FROM Continent WHERE name IN ('Australia', 'New Zealand');",SELECT COUNT(*) FROM Continent WHERE hiv_positive = 1;,0 What record was reached when the Eagles played the Phoenix Cardinals? ,"CREATE TABLE table_16678052_2 (record VARCHAR, opponent VARCHAR);","SELECT record FROM table_16678052_2 WHERE opponent = ""Phoenix Cardinals"";","SELECT record FROM table_16678052_2 WHERE opponent = ""Phoenix Cardinals"";",1 Which suppliers in the 'ethical_suppliers' table are located in low-income countries according to the 'world_bank_data' view?,"CREATE TABLE ethical_suppliers (supplier_id INT, name VARCHAR(255), country VARCHAR(255));CREATE VIEW world_bank_data AS SELECT country, income_group FROM world_bank_income WHERE income_group IN ('Low income', 'Lower middle income');","SELECT e.name, e.country FROM ethical_suppliers e INNER JOIN world_bank_data w ON e.country = w.country;","SELECT supplier_id, name FROM ethical_suppliers WHERE country IN (SELECT country FROM world_bank_data WHERE income_group = 'Low income') AND country IN (SELECT country FROM world_bank_data WHERE income_group = 'Low middle income');",0 "What is the number of streams per day for the ""electronic"" genre in the North American region for the year 2020?","CREATE TABLE DailyStreams(id INT, genre VARCHAR(10), region VARCHAR(10), streams INT, date DATE);","SELECT date, AVG(CAST(streams AS FLOAT)/COUNT(date)) AS streams_per_day FROM DailyStreams WHERE genre = 'electronic' AND region = 'North American' AND year = 2020 GROUP BY date;","SELECT DATE_FORMAT(date, '%Y-%m') as day, SUM(streams) as total_streams FROM DailyStreams WHERE genre = 'electronic' AND region = 'North America' AND date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY day;",0 What was the date of death entry in the row that has a date of inauguration entry of date of inauguration?,"CREATE TABLE table_name_76 (date_of_death VARCHAR, date_of_inauguration VARCHAR);","SELECT date_of_death FROM table_name_76 WHERE date_of_inauguration = ""date of inauguration"";","SELECT date_of_death FROM table_name_76 WHERE date_of_inauguration = ""date of inauguration"";",1 What is the difference in the number of visitors between the two exhibitions?,"CREATE TABLE Exhibition1 (visitor_id INT, primary key(visitor_id)); CREATE TABLE Exhibition2 (visitor_id INT, primary key(visitor_id)); ",SELECT COUNT(Exhibition1.visitor_id) - COUNT(Exhibition2.visitor_id) AS difference FROM Exhibition1 LEFT JOIN Exhibition2 ON Exhibition1.visitor_id = Exhibition2.visitor_id;,"SELECT e1.visitor_id, COUNT(DISTINCT e2.visitor_id) - COUNT(DISTINCT e2.visitor_id) as visitor_difference FROM Exhibition1 e1 JOIN Exhibition2 e2 ON e1.visitor_id = e2.visitor_id GROUP BY e1.visitor_id;",0 What track has a catalogue of 47-9465?,"CREATE TABLE table_name_21 (track INTEGER, catalogue VARCHAR);","SELECT SUM(track) FROM table_name_21 WHERE catalogue = ""47-9465"";","SELECT SUM(track) FROM table_name_21 WHERE catalogue = ""47-9465"";",1 What is the minimum and maximum calorie count for all vegan dishes in the menu table?,"CREATE TABLE menu (id INT, name TEXT, category TEXT, calories INT, is_vegan BOOLEAN); ","SELECT MIN(calories), MAX(calories) FROM menu WHERE is_vegan = true;","SELECT MIN(calories), MAX(calories) FROM menu WHERE is_vegan = true;",1 What is the total revenue generated by dance performances in the last 10 years?,"CREATE TABLE performances (id INT, year INT, category TEXT, revenue INT); ",SELECT SUM(revenue) FROM performances WHERE category = 'Dance' AND year BETWEEN 2013 AND 2022;,SELECT SUM(revenue) FROM performances WHERE category = 'Dance' AND year BETWEEN 2019 AND 2021;,0 "What is the to par that has england as the country, with 66 as a score?","CREATE TABLE table_name_95 (to_par VARCHAR, country VARCHAR, score VARCHAR);","SELECT to_par FROM table_name_95 WHERE country = ""england"" AND score = 66;","SELECT to_par FROM table_name_95 WHERE country = ""england"" AND score = ""66"";",0 What is the average number of publications per faculty member in the 'College of Engineering'?,"CREATE TABLE college (college_name TEXT); CREATE TABLE faculty (faculty_id INTEGER, college_name TEXT, num_publications INTEGER); ",SELECT AVG(num_publications) FROM faculty WHERE college_name = 'College of Engineering';,SELECT AVG(num_publications) FROM faculty WHERE college_name = 'College of Engineering';,1 when was the episode on which barbara windsor and heston blumenthal guest starred broadcasted,"CREATE TABLE table_29135051_3 (broadcast_date VARCHAR, guest_s_ VARCHAR);","SELECT broadcast_date FROM table_29135051_3 WHERE guest_s_ = ""Barbara Windsor and Heston Blumenthal"";","SELECT broadcast_date FROM table_29135051_3 WHERE guest_s_ = ""Barbara Windor and Henry Blumenthal"";",0 "Calculate the total quantity of chemicals that were produced in the first quarter of 2022, partitioned by chemical, and display them in alphabetical order.","CREATE TABLE manufacturing_plants ( id INT PRIMARY KEY, plant_name VARCHAR(255), location VARCHAR(255), country VARCHAR(255), capacity INT, last_inspection_date DATE);CREATE TABLE production_data ( id INT PRIMARY KEY, plant_id INT, chemical_name VARCHAR(255), production_date DATE, quantity INT, FOREIGN KEY (plant_id) REFERENCES manufacturing_plants(id));CREATE TABLE chemical_prices ( id INT PRIMARY KEY, chemical_name VARCHAR(255), price DECIMAL(10,2), price_updated_date DATE);","SELECT chemical_name, SUM(quantity) AS total_quantity FROM production_data WHERE production_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY chemical_name ORDER BY chemical_name;","SELECT chemical_name, SUM(quantity) as total_quantity FROM production_data pd JOIN manufacturing_plants mp ON pd.plant_id = mp.id WHERE pd.production_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY chemical_name ORDER BY total_quantity DESC;",0 Name the points for donald boor,"CREATE TABLE table_25646820_2 (points VARCHAR, player VARCHAR);","SELECT points FROM table_25646820_2 WHERE player = ""Donald Boor"";","SELECT points FROM table_25646820_2 WHERE player = ""Donald Boor"";",1 What percentage of companies were founded by underrepresented racial or ethnic groups in Canada?,"CREATE TABLE company (id INT, name TEXT, country TEXT, founding_date DATE, founder_race TEXT); ","SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM company)) FROM company WHERE founder_race IN ('Black', 'Hispanic', 'Indigenous', 'South Asian', 'Middle Eastern') AND country = 'Canada';","SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM company WHERE country = 'Canada')) AS percentage FROM company WHERE country = 'Canada' AND founder_race IN ('African American', 'Hispanic');",0 "List all employees and their departments from the ""finance"" schema","CREATE TABLE finance.employees (id INT, name VARCHAR(50), department VARCHAR(50)); ",SELECT * FROM finance.employees;,"SELECT name, department FROM finance.employees;",0 "What was the Competition on November 16, 2007?","CREATE TABLE table_name_64 (competition VARCHAR, date VARCHAR);","SELECT competition FROM table_name_64 WHERE date = ""november 16, 2007"";","SELECT competition FROM table_name_64 WHERE date = ""november 16, 2007"";",1 "Identify the number of mobile and broadband subscribers per country, and their respective percentage contributions to total subscribers.","CREATE TABLE MobileSubscribers (SubscriberID int, Country varchar(10)); CREATE TABLE BroadbandSubscribers (SubscriberID int, Country varchar(10)); ","SELECT C.Country, COUNT(M.SubscriberID) AS MobileCount, COUNT(B.SubscriberID) AS BroadbandCount, (COUNT(M.SubscriberID)::float / (COUNT(M.SubscriberID) + COUNT(B.SubscriberID))) * 100 AS MobilePercent, (COUNT(B.SubscriberID)::float / (COUNT(M.SubscriberID) + COUNT(B.SubscriberID))) * 100 AS BroadbandPercent FROM MobileSubscribers M FULL OUTER JOIN BroadbandSubscribers B ON M.Country = B.Country GROUP BY C.Country;","SELECT MobileSubscribers.Country, COUNT(MobileSubscribers.SubscriberID) as TotalSubscribers, (COUNT(BroadbandSubscribers.SubscriberID) * 100.0 / COUNT(MobileSubscribers.SubscriberID)) as Percentage Contribution FROM MobileSubscribers INNER JOIN BroadbandSubscribers ON MobileSubscribers.Country = BroadbandSubscribers.Country GROUP BY MobileSubscribers.Country;",0 What is the average number of days spent in space by astronauts from Japan?,"CREATE TABLE Astronauts (name VARCHAR(30), days_in_space FLOAT, nationality VARCHAR(20)); ",SELECT AVG(days_in_space) FROM Astronauts WHERE nationality = 'Japan';,SELECT AVG(days_in_space) FROM Astronauts WHERE nationality = 'Japan';,1 Which Year Inducted is the highest one that has a Year smaller than 1965?,CREATE TABLE table_name_28 (year INTEGER);,SELECT MAX(year) AS Inducted FROM table_name_28 WHERE year < 1965;,SELECT MAX(year) FROM table_name_28 WHERE year 1965;,0 What is the recycling rate for each material type in New York in 2019?,"CREATE TABLE recycling_rates(year INT, state VARCHAR(20), material VARCHAR(20), recycling_rate DECIMAL(5,2)); ","SELECT year, state, material, AVG(recycling_rate) as avg_recycling_rate FROM recycling_rates WHERE state = 'New York' AND year = 2019 GROUP BY year, state, material;","SELECT material, recycling_rate FROM recycling_rates WHERE state = 'New York' AND year = 2019 GROUP BY material;",0 What is the total budget allocated to schools per district in descending order?,"CREATE TABLE district_schools (school_id INT, district_id INT, budget_allocation INT); ","SELECT district_id, SUM(budget_allocation) as total_budget FROM district_schools GROUP BY district_id ORDER BY total_budget DESC;","SELECT district_id, SUM(budget_allocation) as total_budget FROM district_schools GROUP BY district_id ORDER BY total_budget DESC;",1 How many construction labor hours were spent on projects in the year 2019?,"CREATE TABLE labor_hours (labor_hour_id INT, project_id INT, city VARCHAR(20), hours INT, year INT); ",SELECT SUM(hours) FROM labor_hours WHERE year = 2019;,SELECT SUM(hours) FROM labor_hours WHERE year = 2019;,1 What is the week with a school that is ball state?,"CREATE TABLE table_name_19 (week VARCHAR, school VARCHAR);","SELECT week FROM table_name_19 WHERE school = ""ball state"";","SELECT week FROM table_name_19 WHERE school = ""ball state"";",1 What is the total number of mental health facilities in each county?,"CREATE TABLE mental_health_facilities (facility_id INT, name VARCHAR(50), county VARCHAR(25)); ","SELECT county, COUNT(*) FROM mental_health_facilities GROUP BY county;","SELECT county, COUNT(*) FROM mental_health_facilities GROUP BY county;",1 What result is found for the round that has f?,"CREATE TABLE table_name_37 (result VARCHAR, round VARCHAR);","SELECT result FROM table_name_37 WHERE round = ""f"";","SELECT result FROM table_name_37 WHERE round = ""f"";",1 Which opponent has a Result of l 6–3?,"CREATE TABLE table_name_70 (opponent VARCHAR, result VARCHAR);","SELECT opponent FROM table_name_70 WHERE result = ""l 6–3"";","SELECT opponent FROM table_name_70 WHERE result = ""l 6–3"";",1 "In what year was the cfl team in edmonton, alberta established?","CREATE TABLE table_name_6 (est VARCHAR, city VARCHAR, state_province VARCHAR, league VARCHAR);","SELECT est FROM table_name_6 WHERE state_province = ""alberta"" AND league = ""cfl"" AND city = ""edmonton"";","SELECT est FROM table_name_6 WHERE state_province = ""edmonton, alberta"" AND league = ""cfl"";",0 What are the names and trade names of the medicines which has 'Yes' value in the FDA record?,"CREATE TABLE medicine (name VARCHAR, trade_name VARCHAR, FDA_approved VARCHAR);","SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes';","SELECT name, trade_name FROM medicine WHERE FDA_approved = 'Yes';",1 What player scored 71-69-71=211?,"CREATE TABLE table_name_68 (player VARCHAR, score VARCHAR);",SELECT player FROM table_name_68 WHERE score = 71 - 69 - 71 = 211;,SELECT player FROM table_name_68 WHERE score = 71 - 69 - 71 = 211;,1 Who placed in t5 and scored 73-69-68=210?,"CREATE TABLE table_name_76 (player VARCHAR, place VARCHAR, score VARCHAR);","SELECT player FROM table_name_76 WHERE place = ""t5"" AND score = 73 - 69 - 68 = 210;","SELECT player FROM table_name_76 WHERE place = ""t5"" AND score = 73 - 69 - 68 = 210;",1 List all policy numbers for policyholders in 'Florida' who have a claim amount greater than $3000.,"CREATE TABLE policyholders (id INT, policy_number TEXT, name TEXT, city TEXT, state TEXT, claim_amount FLOAT); ",SELECT policy_number FROM policyholders WHERE state = 'FL' AND claim_amount > 3000;,SELECT policy_number FROM policyholders WHERE state = 'Florida' AND claim_amount > 3000;,0 What was the event on Wed 26 Aug where rider is Andrew Farrell 400cc Kawasaki?,"CREATE TABLE table_23465864_6 (wed_26_aug VARCHAR, rider VARCHAR);","SELECT wed_26_aug FROM table_23465864_6 WHERE rider = ""Andrew Farrell 400cc Kawasaki"";","SELECT wed_26_aug FROM table_23465864_6 WHERE rider = ""Andrew Farrell 400cc Kawasaki"";",1 How many byes when there are more than 16 wins?,"CREATE TABLE table_name_50 (byes INTEGER, wins INTEGER);",SELECT AVG(byes) FROM table_name_50 WHERE wins > 16;,SELECT SUM(byes) FROM table_name_50 WHERE wins > 16;,0 What is the total production volume for wells in the Marcellus Shale formation in the last quarter?,"CREATE TABLE wells (well_id INT, well_name VARCHAR(255), well_type VARCHAR(255), location VARCHAR(255)); ",SELECT SUM(production_volume) FROM well_production WHERE location LIKE 'Marcellus%' AND date >= CURRENT_DATE - INTERVAL '3 months';,"SELECT SUM(production_volume) FROM wells WHERE well_type = 'Marcellus Shale' AND location = 'Marcellus Shale' AND quarter = DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH);",0 What is the maximum flight altitude for each aircraft model?,"CREATE TABLE AircraftModel (ID INT, Name VARCHAR(50), ManufacturerID INT); CREATE TABLE FlightData (ID INT, AircraftModelID INT, Altitude INT);","SELECT am.Name, MAX(fd.Altitude) AS MaxAltitude FROM AircraftModel am JOIN FlightData fd ON am.ID = fd.AircraftModelID GROUP BY am.Name;","SELECT a.Name, MAX(fd.Altitude) FROM AircraftModel a JOIN FlightData fd ON a.ManufacturerID = fd.AircraftModelID GROUP BY a.Name;",0 How many research grants were awarded to underrepresented minority faculty members in the Mathematics department in the last 5 years?,"CREATE TABLE grants_faculty_math (id INT, department VARCHAR(50), faculty_name VARCHAR(50), minority_status VARCHAR(50), amount DECIMAL(10,2), grant_date DATE); ","SELECT COUNT(*) FROM grants_faculty_math WHERE department = 'Mathematics' AND minority_status = 'Underrepresented Minority' AND grant_date >= DATE_SUB(CURDATE(), INTERVAL 5 YEAR);","SELECT COUNT(*) FROM grants_faculty_math WHERE department = 'Mathematics' AND minority_status = 'Underrepresented' AND grant_date >= DATEADD(year, -5, GETDATE());",0 "How many employees at nokia, ranked under 3?","CREATE TABLE table_name_50 (employees INTEGER, company VARCHAR, rank VARCHAR);","SELECT MAX(employees) FROM table_name_50 WHERE company = ""nokia"" AND rank < 3;","SELECT SUM(employees) FROM table_name_50 WHERE company = ""nokia"" AND rank 3;",0 "How much Area (km 2) has a Common of collegno, and a Population smaller than 50137?","CREATE TABLE table_name_60 (area__km_2__ VARCHAR, common_of VARCHAR, population VARCHAR);","SELECT COUNT(area__km_2__) FROM table_name_60 WHERE common_of = ""collegno"" AND population < 50137;","SELECT COUNT(area__km_2__) FROM table_name_60 WHERE common_of = ""collegno"" AND population 50137;",0 How many cases were opened in 'january' 2020?,"CREATE TABLE cases (case_id INT, case_open_date DATE);",SELECT COUNT(*) FROM cases WHERE case_open_date BETWEEN '2020-01-01' AND '2020-01-31';,SELECT COUNT(*) FROM cases WHERE case_open_date BETWEEN '2020-01-01' AND '2020-12-31';,0 Which marine protected areas have ocean acidification monitoring stations?,"CREATE TABLE marine_protected_areas (name varchar(255), acidification_station boolean); ",SELECT name FROM marine_protected_areas WHERE acidification_station = true;,SELECT name FROM marine_protected_areas WHERE acidification_station = true;,1 What is the percentage of global cobalt production by the Democratic Republic of Congo?,"CREATE TABLE annual_cobalt_production (id INT, country VARCHAR(255), year INT, quantity INT); ",SELECT 100.0 * SUM(CASE WHEN country = 'Democratic Republic of Congo' THEN quantity ELSE 0 END) / SUM(quantity) as percentage_of_global_cobalt_production FROM annual_cobalt_production WHERE year = 2020;,SELECT 100.0 * SUM(quantity) / (SELECT SUM(quantity) FROM annual_cobalt_production WHERE country = 'Democratic Republic of Congo') AS percentage FROM annual_cobalt_production WHERE country = 'Democratic Republic of Congo';,0 "What is the score for the player who won $3,600?","CREATE TABLE table_name_40 (score VARCHAR, money___$__ VARCHAR);","SELECT score FROM table_name_40 WHERE money___$__ = ""3,600"";","SELECT score FROM table_name_40 WHERE money___$__ = ""$3,600"";",0 Add a new user who signed up using email,"CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(50), email VARCHAR(50), signup_date DATE, signup_source VARCHAR(20));","INSERT INTO users (id, name, email, signup_date, signup_source) VALUES (321, 'Jamie', 'jamie@example.com', '2022-10-01', 'email');","INSERT INTO users (id, name, email, signup_date, signup_source) VALUES (1, 'Mike', '2018-01-01', 'Email', '2022-01-01');",0 What is the average number of community education programs held in Africa annually?,"CREATE TABLE Education (ProgramID INT, Program VARCHAR(50), Frequency INT, Location VARCHAR(50)); ",SELECT AVG(Frequency) FROM Education WHERE Location = 'Africa';,SELECT AVG(Frequency) FROM Education WHERE Location = 'Africa';,1 What was the total attendance at dance performances in New York City?,"CREATE TABLE events (id INT, event_type VARCHAR(50), city VARCHAR(50), attendance INT); ",SELECT SUM(attendance) FROM events WHERE event_type = 'Dance Performance' AND city = 'New York City';,SELECT SUM(attendance) FROM events WHERE event_type = 'Dance' AND city = 'New York City';,0 Which marine species are found in both the Mediterranean Sea and the Red Sea?,"CREATE TABLE marine_species (species_id INT, name VARCHAR(50), habitat VARCHAR(50)); ",SELECT name FROM marine_species WHERE habitat = 'Mediterranean Sea' INTERSECT SELECT name FROM marine_species WHERE habitat = 'Red Sea';,"SELECT name FROM marine_species WHERE habitat IN ('Mediterranean Sea', 'Red Sea');",0 What is the most common health equity metric violation in Florida?,"CREATE TABLE HealthEquityMetrics (ID INT, Violation VARCHAR(255), State VARCHAR(255)); ","SELECT Violation, COUNT(*) AS Count FROM HealthEquityMetrics WHERE State = 'Florida' GROUP BY Violation ORDER BY Count DESC LIMIT 1;","SELECT Violation, COUNT(*) FROM HealthEquityMetrics WHERE State = 'Florida' GROUP BY Violation ORDER BY COUNT(*) DESC LIMIT 1;",0 What is the distribution of tourists by age and gender for each country?,"CREATE TABLE Tourists (country TEXT, age NUMERIC, gender TEXT); ","SELECT country, gender, AVG(age) FROM Tourists GROUP BY country, gender;","SELECT country, age, gender, COUNT(*) as num_tourists FROM Tourists GROUP BY country, age, gender;",0 What was the type that had an award for song of the year and the position of 3rd place?,"CREATE TABLE table_name_1 (type VARCHAR, award VARCHAR, position VARCHAR);","SELECT type FROM table_name_1 WHERE award = ""song of the year"" AND position = ""3rd place"";","SELECT type FROM table_name_1 WHERE award = ""song of the year"" AND position = ""3rd place"";",1 "What is the total amount invested in organizations located in 'New York, NY' with a 'High' operational risk level?","CREATE TABLE risk (id INT PRIMARY KEY, investment_id INT, type VARCHAR(255), level VARCHAR(255)); CREATE TABLE investment (id INT PRIMARY KEY, organization_id INT, amount FLOAT, date DATE); CREATE TABLE organization (id INT PRIMARY KEY, name VARCHAR(255), sector VARCHAR(255), location VARCHAR(255)); ","SELECT investment.amount FROM investment INNER JOIN organization ON investment.organization_id = organization.id INNER JOIN risk ON investment.id = risk.investment_id WHERE organization.location = 'New York, NY' AND risk.type = 'Operational Risk' AND risk.level = 'High';","SELECT SUM(investment.amount) FROM investment INNER JOIN organization ON investment.organization_id = organization.id WHERE organization.location = 'New York, NY' AND risk.level = 'High';",0 What is the maximum amount of waste produced in a single day by the chemical manufacturing plant located in California?,"CREATE TABLE waste_production (id INT, plant_location VARCHAR(50), production_date DATE, amount_wasted FLOAT);",SELECT MAX(amount_wasted) FROM waste_production WHERE plant_location = 'California';,SELECT MAX(amount_wasted) FROM waste_production WHERE plant_location = 'California';,1 What is the total number of aquatic species in freshwater facilities worldwide?,"CREATE TABLE aquatic_species (id INT, species VARCHAR(50), facility_type VARCHAR(50), facility_location VARCHAR(50)); ","SELECT COUNT(*) FROM aquatic_species WHERE facility_location = 'Freshwater' AND facility_type IN ('Fish Farm', 'Hatchery');",SELECT COUNT(*) FROM aquatic_species WHERE facility_type = 'Freshwater';,0 What Week 5 has a Week 1 of mysti sherwood?,"CREATE TABLE table_name_10 (week_5 VARCHAR, week_1 VARCHAR);","SELECT week_5 FROM table_name_10 WHERE week_1 = ""mysti sherwood"";","SELECT week_5 FROM table_name_10 WHERE week_1 = ""mysti sherwood"";",1 Who are the top 5 attorneys with the highest billing amounts and their respective total billing amounts?,"CREATE TABLE attorneys (id INT, name VARCHAR(255)); CREATE TABLE cases (id INT, attorney_id INT, billing_amount DECIMAL(10, 2)); ","SELECT attorneys.name, SUM(cases.billing_amount) AS total_billing_amount FROM attorneys INNER JOIN cases ON attorneys.id = cases.attorney_id GROUP BY attorneys.name ORDER BY total_billing_amount DESC LIMIT 5;","SELECT attorneys.name, SUM(cases.billing_amount) as total_billing FROM attorneys INNER JOIN cases ON attorneys.id = cases.attorney_id GROUP BY attorneys.name ORDER BY total_billing DESC LIMIT 5;",0 who is the the player with pick # being 132,"CREATE TABLE table_1473672_9 (player VARCHAR, pick__number VARCHAR);",SELECT player FROM table_1473672_9 WHERE pick__number = 132;,SELECT player FROM table_1473672_9 WHERE pick__number = 132;,1 "List the top 3 teams with the highest total ticket sales, along with their total sales, in descending order.","CREATE TABLE ticket_sales (team_id INT, team_name VARCHAR(50), total_sales DECIMAL(10,2)); ","SELECT team_name, total_sales FROM (SELECT team_name, total_sales, ROW_NUMBER() OVER (ORDER BY total_sales DESC) AS rank FROM ticket_sales) AS team_ranks WHERE rank <= 3;","SELECT team_name, total_sales FROM ticket_sales ORDER BY total_sales DESC LIMIT 3;",0 What is the total playtime for players who own a VR headset and have played games in the Action genre?,"CREATE TABLE players_vr (player_id INT, vr_headset TEXT); CREATE TABLE games (game_id INT, game_name TEXT, genre TEXT); CREATE TABLE player_games (player_id INT, game_id INT, playtime INT); ",SELECT SUM(player_games.playtime) FROM player_games JOIN players_vr ON player_games.player_id = players_vr.player_id JOIN games ON player_games.game_id = games.game_id WHERE players_vr.vr_headset IS NOT NULL AND games.genre = 'Action';,SELECT SUM(playtime) FROM player_games JOIN players_vr ON player_games.player_id = players_vr.player_id JOIN games ON player_games.game_id = games.game_id WHERE players_vr.vr_headset = 'VR' AND games.genre = 'Action';,0 "Which Attendance has a Result of w 23-21, and a Week smaller than 5?","CREATE TABLE table_name_75 (attendance INTEGER, result VARCHAR, week VARCHAR);","SELECT AVG(attendance) FROM table_name_75 WHERE result = ""w 23-21"" AND week < 5;","SELECT AVG(attendance) FROM table_name_75 WHERE result = ""w 23-21"" AND week 5;",0 Name the language for el villar 1264,"CREATE TABLE table_2509350_3 (language VARCHAR, el_villar_municipality VARCHAR);",SELECT language FROM table_2509350_3 WHERE el_villar_municipality = 1264;,SELECT language FROM table_2509350_3 WHERE el_villar_municipality = 1264;,1 What round was Ryan Thang drafted in?,"CREATE TABLE table_name_7 (round INTEGER, player VARCHAR);","SELECT MIN(round) FROM table_name_7 WHERE player = ""ryan thang"";","SELECT SUM(round) FROM table_name_7 WHERE player = ""ryan thong"";",0 What is the maximum depth of all mining shafts in the 'mining_shafts' table?,"CREATE TABLE mining_shafts (id INT, mine_name VARCHAR, shaft_number INT, depth DECIMAL); ",SELECT MAX(depth) FROM mining_shafts;,SELECT MAX(depth) FROM mining_shafts;,1 "What is Date (Opening), when Year is less than 2010, and when Date (Closing) is ""September 28""?","CREATE TABLE table_name_5 (date__opening_ VARCHAR, year VARCHAR, date__closing_ VARCHAR);","SELECT date__opening_ FROM table_name_5 WHERE year < 2010 AND date__closing_ = ""september 28"";","SELECT date__opening_ FROM table_name_5 WHERE year 2010 AND date__closing_ = ""september 28"";",0 What is the Result when the Theme was by Dolly Parton?,"CREATE TABLE table_name_42 (result VARCHAR, theme VARCHAR);","SELECT result FROM table_name_42 WHERE theme = ""dolly parton"";","SELECT result FROM table_name_42 WHERE theme = ""dolly parton"";",1 "What is the average number of successful Mars missions launched per year by the United States, ordered from the earliest to latest?","CREATE TABLE MarsMissions (MissionID INT, Name VARCHAR(50), LaunchCountry VARCHAR(50), LaunchDate DATE, Success BOOLEAN); ","SELECT LaunchCountry, AVG(DATEDIFF(YEAR, LaunchDate, LEAD(LaunchDate) OVER (PARTITION BY LaunchCountry ORDER BY LaunchDate))) as avg_launches_per_year FROM MarsMissions WHERE LaunchCountry = 'United States' AND Success = true GROUP BY LaunchCountry ORDER BY avg_launches_per_year","SELECT LaunchCountry, AVG(Success) as AvgSuccess FROM MarsMissions WHERE LaunchCountry = 'United States' GROUP BY LaunchCountry ORDER BY AvgSuccess DESC;",0 What is the number of mobile customers who have not made any voice calls in the last month in the 'tundra' region?,"CREATE TABLE subscribers (id INT, type VARCHAR(10), region VARCHAR(10)); CREATE TABLE calls (subscriber_id INT, call_date DATE); ",SELECT COUNT(*) FROM subscribers LEFT JOIN calls ON subscribers.id = calls.subscriber_id WHERE subscribers.region = 'tundra' AND calls.call_date IS NULL;,"SELECT COUNT(*) FROM subscribers JOIN calls ON subscribers.id = calls.subscriber_id WHERE subscribers.region = 'tundra' AND calls.call_date DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);",0 Find the total revenue created by the companies whose headquarter is located at Austin.,"CREATE TABLE manufacturers (revenue INTEGER, headquarter VARCHAR);",SELECT SUM(revenue) FROM manufacturers WHERE headquarter = 'Austin';,"SELECT SUM(revenue) FROM manufacturers WHERE headquarter = ""Austin"";",0 How many years was he car number 92?,"CREATE TABLE table_181892_4 (speed_rank VARCHAR, car_number VARCHAR);",SELECT COUNT(speed_rank) FROM table_181892_4 WHERE car_number = 92;,SELECT COUNT(speed_rank) FROM table_181892_4 WHERE car_number = 92;,1 Find the correlation between Lanthanum production and market trends for each year.,"CREATE TABLE lanthanum_production (year INT, quantity INT); CREATE TABLE lanthanum_market_trends (year INT, trend VARCHAR(50), value INT);","SELECT l.year, CORR(l.quantity, m.value) AS correlation FROM lanthanum_production l INNER JOIN lanthanum_market_trends m ON l.year = m.year;","SELECT year, CORR(*) as correlation FROM lanthanum_production JOIN lanthanum_market_trends ON lanthanum_production.year = lanthanum_market_trends.year GROUP BY year;",0 Which Tournament has Pat Cash as a runner-up?,"CREATE TABLE table_name_36 (tournament VARCHAR, runner_up VARCHAR);","SELECT tournament FROM table_name_36 WHERE runner_up = ""pat cash"";","SELECT tournament FROM table_name_36 WHERE runner_up = ""pat cash"";",1 What is the total revenue for each category of item on a given day?,"CREATE TABLE Sales (sale_id INT PRIMARY KEY, sale_date DATE, item_sold VARCHAR(255), quantity INT, sale_price DECIMAL(5,2)); CREATE TABLE Menu (menu_id INT PRIMARY KEY, item_name VARCHAR(255), category VARCHAR(255), price DECIMAL(5,2));","SELECT m.category, SUM(s.quantity * s.sale_price) FROM Sales s JOIN Menu m ON s.item_sold = m.item_name WHERE s.sale_date = '2022-01-01' GROUP BY m.category;","SELECT m.category, SUM(s.quantity * s.sale_price) as total_revenue FROM Sales s JOIN Menu m ON s.sale_date = m.menu_id GROUP BY m.category;",0 "Which province had a liberal party member on December 31, 2006?","CREATE TABLE table_name_38 (province VARCHAR, party VARCHAR, date VARCHAR);","SELECT province FROM table_name_38 WHERE party = ""liberal"" AND date = ""december 31, 2006"";","SELECT province FROM table_name_38 WHERE party = ""liberal"" AND date = ""december 31, 2006"";",1 What is the average goals scored when less than 34 were played and there were more than 2 draws?,"CREATE TABLE table_name_78 (goals_scored INTEGER, played VARCHAR, draw VARCHAR);",SELECT AVG(goals_scored) FROM table_name_78 WHERE played < 34 AND draw > 2;,SELECT AVG(goals_scored) FROM table_name_78 WHERE played 34 AND draw > 2;,0 "Which Opponents have a Partner of irina-camelia begu, and a Surface of hard?","CREATE TABLE table_name_15 (opponents VARCHAR, partner VARCHAR, surface VARCHAR);","SELECT opponents FROM table_name_15 WHERE partner = ""irina-camelia begu"" AND surface = ""hard"";","SELECT opponents FROM table_name_15 WHERE partner = ""irina-camelia begu"" AND surface = ""hard"";",1 What city has channel tv (dt) 25 (31)?,"CREATE TABLE table_1353096_1 (city_of_license__market VARCHAR, channel_tv___dt__ VARCHAR);","SELECT city_of_license__market FROM table_1353096_1 WHERE channel_tv___dt__ = ""25 (31)"";","SELECT city_of_license__market FROM table_1353096_1 WHERE channel_tv___dt__ = ""25 (31)"";",1 What's the shut down state of the unit that's been in commercial operation since 01.02.1984?,"CREATE TABLE table_12983929_1 (shut_down VARCHAR, commercial_operation VARCHAR);","SELECT shut_down FROM table_12983929_1 WHERE commercial_operation = ""01.02.1984"";","SELECT shut_down FROM table_12983929_1 WHERE commercial_operation = ""01.02.1984"";",1 "What is the number of public schools and the number of students enrolled in these schools in New York, and what is the average student-teacher ratio in these schools?","CREATE TABLE public_schools (school_name VARCHAR(50), state VARCHAR(20), num_students INT, num_teachers INT); ","SELECT COUNT(*) as num_schools, SUM(num_students) as total_students, AVG(num_students / num_teachers) as avg_student_teacher_ratio FROM public_schools WHERE state = 'New York';","SELECT school_name, num_students, AVG(num_teachers) as avg_student_teacher_ratio FROM public_schools WHERE state = 'New York' GROUP BY school_name;",0 What is the percentage of households in Beijing with water consumption above the city average?,"CREATE TABLE beijing_water_consumption (id INT, date DATE, household_id INT, water_consumption FLOAT); ",SELECT COUNT(*) * 100.0 / (SELECT COUNT(DISTINCT household_id) FROM beijing_water_consumption) FROM beijing_water_consumption WHERE water_consumption > (SELECT AVG(water_consumption) FROM beijing_water_consumption);,SELECT (COUNT(*) FILTER (WHERE water_consumption > (SELECT AVG(water_consumption) FROM beijing_water_consumption)) * 100.0 / COUNT(*) FROM beijing_water_consumption;,0 What is the Score with a Date that is march 12?,"CREATE TABLE table_name_93 (score VARCHAR, date VARCHAR);","SELECT score FROM table_name_93 WHERE date = ""march 12"";","SELECT score FROM table_name_93 WHERE date = ""march 12"";",1 What was Lew Worsham's score?,"CREATE TABLE table_name_53 (score VARCHAR, player VARCHAR);","SELECT score FROM table_name_53 WHERE player = ""lew worsham"";","SELECT score FROM table_name_53 WHERE player = ""lew worsham"";",1 List the top 2 green building projects by investment amount in each country?,"CREATE TABLE green_building_projects (project_name TEXT, country TEXT, investment_amount FLOAT); ","SELECT project_name, country, investment_amount FROM (SELECT project_name, country, investment_amount, ROW_NUMBER() OVER (PARTITION BY country ORDER BY investment_amount DESC) as rn FROM green_building_projects) WHERE rn <= 2;","SELECT country, project_name, investment_amount FROM green_building_projects ORDER BY investment_amount DESC LIMIT 2;",0 How many songs were released by each record label in 2021?,"CREATE TABLE songs (id INT, title VARCHAR(255), artist VARCHAR(255), label VARCHAR(255), release_date DATE); ","SELECT label, COUNT(*) as song_count FROM songs WHERE YEAR(release_date) = 2021 GROUP BY label;","SELECT label, COUNT(*) FROM songs WHERE release_date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY label;",0 What number last Runners-up where there when the Last win was 1999 and the Runners-up was bigger than 1?,"CREATE TABLE table_name_42 (Last VARCHAR, last_win VARCHAR, runners_up VARCHAR);","SELECT COUNT(Last) AS runners_up FROM table_name_42 WHERE last_win = ""1999"" AND runners_up > 1;",SELECT COUNT(Last) FROM table_name_42 WHERE last_win = 1999 AND runners_up > 1;,0 Which Record that has a Loss of mays (0-3)?,"CREATE TABLE table_name_83 (record VARCHAR, loss VARCHAR);","SELECT record FROM table_name_83 WHERE loss = ""mays (0-3)"";","SELECT record FROM table_name_83 WHERE loss = ""mays (0-3)"";",1 Which factories produced the most garments in 2022?,"CREATE TABLE factory_production (factory_id INT, year INT, garments_produced INT);","SELECT factory_id, SUM(garments_produced) AS total_garments_produced FROM factory_production WHERE year = 2022 GROUP BY factory_id ORDER BY total_garments_produced DESC;","SELECT factory_id, SUM(garments_produced) as total_garments FROM factory_production WHERE year = 2022 GROUP BY factory_id ORDER BY total_garments DESC;",0 Insert a new record for 'DrugD' sales in 'Q2 2022' with '5000' units sold.,"CREATE TABLE sales (drug_name TEXT, quarter TEXT, year INTEGER, units_sold INTEGER);","INSERT INTO sales (drug_name, quarter, year, units_sold) VALUES ('DrugD', 'Q2', 2022, 5000);","INSERT INTO sales (drug_name, quarter, year, units_sold) VALUES ('DrugD', 'Q2 2022', 5000);",0 "Find the top 3 strains sold in each dispensary, ordered by total sales amount in descending order.","CREATE TABLE Dispensaries (DispensaryID INT, DispensaryName VARCHAR(50)); CREATE TABLE Strains (StrainID INT, StrainName VARCHAR(50)); CREATE TABLE Sales (SaleID INT, DispensaryID INT, StrainID INT, QuantitySold INT, SaleDate DATE);","SELECT DispensaryID, StrainID, SUM(QuantitySold) AS TotalSales, ROW_NUMBER() OVER (PARTITION BY DispensaryID ORDER BY SUM(QuantitySold) DESC) AS Rank FROM Sales S JOIN Dispensaries D ON S.DispensaryID = D.DispensaryID JOIN Strains ST ON S.StrainID = ST.StrainID GROUP BY DispensaryID, StrainID;","SELECT DispensaryName, StrainName, SUM(QuantitySold) as TotalSales FROM Sales JOIN Dispensaries ON Sales.DispensaryID = Dispensaries.DispensaryID GROUP BY DispensaryName, StrainName ORDER BY TotalSales DESC;",0 Who are the astronauts who have flown more than one space mission?,"CREATE TABLE SpaceMissions(ID INT, AstronautID INT, MissionID INT);",SELECT AstronautID FROM SpaceMissions GROUP BY AstronautID HAVING COUNT(DISTINCT MissionID) > 1;,"SELECT AstronautID, COUNT(*) FROM SpaceMissions GROUP BY AstronautID HAVING COUNT(*) > 1;",0 Calculate the average sentence length for inmates in each legal organization,"CREATE TABLE inmates (inmate_id INT, inmate_name VARCHAR(255), org_id INT, sentence_length INT, PRIMARY KEY (inmate_id)); CREATE TABLE legal_organizations (org_id INT, org_name VARCHAR(255), PRIMARY KEY (org_id)); ","SELECT o.org_name, AVG(i.sentence_length) FROM inmates i INNER JOIN legal_organizations o ON i.org_id = o.org_id GROUP BY o.org_name;","SELECT l.org_name, AVG(i.sentence_length) as avg_sentence_length FROM inmates i JOIN legal_organizations l ON i.org_id = l.org_id GROUP BY l.org_name;",0 What is the maximum value for each type of sensor in the Arctic and the Antarctic?,"CREATE TABLE sensors ( id INT PRIMARY KEY, location VARCHAR(255), type VARCHAR(255), value DECIMAL(10,2), timestamp TIMESTAMP); ","SELECT type, MAX(value) FROM sensors WHERE location IN ('Arctic', 'Antarctic') GROUP BY type;","SELECT type, MAX(value) FROM sensors WHERE location IN ('Arctic', 'Antarctic') GROUP BY type;",1 Which agricultural innovations were implemented in Mexico between 2017 and 2020?,"CREATE TABLE agricultural_innovations (innovation_id INT, country TEXT, innovation TEXT, implementation_year INT); ",SELECT innovation FROM agricultural_innovations WHERE country = 'Mexico' AND implementation_year BETWEEN 2017 AND 2020;,SELECT innovation FROM agricultural_innovations WHERE country = 'Mexico' AND implementation_year BETWEEN 2017 AND 2020;,1 What is the average donation hours per donor for each program?,"CREATE TABLE Donations (id INT, donor_name VARCHAR(255), contact_info VARCHAR(255), program VARCHAR(255), hours INT); ","SELECT program, AVG(hours) as avg_hours_per_donor FROM Donations GROUP BY program;","SELECT program, AVG(hours) as avg_hours FROM Donations GROUP BY program;",0 What is the average value of impact investments in the education sector?,"CREATE TABLE impact_investments (id INT, investment_id INT, sector TEXT, value FLOAT); ",SELECT AVG(value) FROM impact_investments WHERE sector = 'Education';,SELECT AVG(value) FROM impact_investments WHERE sector = 'Education';,1 Opponent of houston texans had what result?,"CREATE TABLE table_name_2 (result VARCHAR, opponent VARCHAR);","SELECT result FROM table_name_2 WHERE opponent = ""houston texans"";","SELECT result FROM table_name_2 WHERE opponent = ""houston texans"";",1 What is the average recycling rate in Mumbai over the last 3 years?,"CREATE TABLE recycling_rates (city VARCHAR(50), year INT, recycling_rate DECIMAL(5,2)); ",SELECT AVG(recycling_rate) FROM recycling_rates WHERE city = 'Mumbai' AND year BETWEEN 2019 AND 2022;,SELECT AVG(recycling_rate) FROM recycling_rates WHERE city = 'Mumbai' AND year BETWEEN 2019 AND 2021;,0 "What is the total revenue from concert ticket sales for artists who identify as non-binary, in the last 12 months?","CREATE TABLE concerts (id INT, artist_id INT, location VARCHAR(255), revenue DECIMAL(10,2), concert_date DATE); CREATE TABLE artists (id INT, gender VARCHAR(10));",SELECT SUM(revenue) FROM concerts INNER JOIN artists ON concerts.artist_id = artists.id WHERE artists.gender = 'non-binary' AND concert_date >= NOW() - INTERVAL 12 MONTH;,"SELECT SUM(revenue) FROM concerts JOIN artists ON concerts.artist_id = artists.id WHERE artists.gender = 'Non-binary' AND concerts.concert_date >= DATEADD(month, -12, GETDATE());",0 "Find the average monthly financial wellbeing score for customers in the age group of 30-40, in the United Kingdom, for the last 12 months.","CREATE TABLE customers (customer_id INT, customer_name VARCHAR(255), age INT, country VARCHAR(255), financial_wellbeing_score DECIMAL(3, 1), financial_wellbeing_date DATE);","SELECT AVG(c.financial_wellbeing_score) as avg_score FROM customers c WHERE c.age BETWEEN 30 AND 40 AND c.country = 'United Kingdom' AND c.financial_wellbeing_date >= DATE_SUB(CURDATE(), INTERVAL 12 MONTH) GROUP BY MONTH(c.financial_wellbeing_date);","SELECT AVG(financial_wellbeing_score) FROM customers WHERE country = 'United Kingdom' AND age BETWEEN 30 AND 40 AND financial_wellbeing_date >= DATEADD(month, -12, GETDATE());",0 "What is the total production volume of samarium in 2018, 2019, and 2020?","CREATE TABLE production (year INT, element TEXT, volume INT); ","SELECT SUM(volume) FROM production WHERE element = 'samarium' AND year IN (2018, 2019, 2020);","SELECT SUM(volume) FROM production WHERE element = 'Samarium' AND year IN (2018, 2019, 2020);",0 Name the competition for motherwell opponents,"CREATE TABLE table_name_17 (competition VARCHAR, opponents VARCHAR);","SELECT competition FROM table_name_17 WHERE opponents = ""motherwell"";","SELECT competition FROM table_name_17 WHERE opponents = ""motherwell"";",1 Which incumbent was first elected in 1987?,"CREATE TABLE table_name_84 (incumbent VARCHAR, first_elected VARCHAR);",SELECT incumbent FROM table_name_84 WHERE first_elected = 1987;,SELECT incumbent FROM table_name_84 WHERE first_elected = 1987;,1 What nationality is the player Muggsy Bogues?,"CREATE TABLE table_10015132_2 (nationality VARCHAR, player VARCHAR);","SELECT nationality FROM table_10015132_2 WHERE player = ""Muggsy Bogues"";","SELECT nationality FROM table_10015132_2 WHERE player = ""Muggsy Bogues"";",1 What is the total waste produced by each production facility in the Middle East region for 2022?,"CREATE TABLE facility_waste_data (facility_id INT, facility_location VARCHAR(255), waste_quantity INT, year INT);","SELECT facility_location, SUM(waste_quantity) AS total_waste FROM facility_waste_data WHERE facility_location LIKE 'Middle East%' AND year = 2022 GROUP BY facility_location;","SELECT facility_location, SUM(waste_quantity) as total_waste FROM facility_waste_data WHERE facility_location LIKE '%Middle East%' AND year = 2022 GROUP BY facility_location;",0 What was the average investment in climate mitigation per quarter for the top 3 investing countries?,"CREATE TABLE country_investments (country VARCHAR(255), sector VARCHAR(255), investment_amount NUMERIC, quarter VARCHAR(255));","SELECT country, AVG(investment_amount) FROM (SELECT country, sector, investment_amount, quarter FROM country_investments WHERE sector = 'mitigation' ORDER BY investment_amount DESC LIMIT 3) subquery GROUP BY country;","SELECT country, AVG(investment_amount) as avg_investment_per_quarter FROM country_investments WHERE sector = 'climate mitigation' GROUP BY country ORDER BY avg_investment_per_quarter DESC LIMIT 3;",0 Name the percentage of votes for 3rd finished,"CREATE TABLE table_26267849_11 (percentage_of_votes VARCHAR, finished VARCHAR);","SELECT percentage_of_votes FROM table_26267849_11 WHERE finished = ""3rd"";","SELECT percentage_of_votes FROM table_26267849_11 WHERE finished = ""3rd"";",1 Which name is the learning/social difficulties type?,"CREATE TABLE table_name_17 (name VARCHAR, type VARCHAR);","SELECT name FROM table_name_17 WHERE type = ""learning/social difficulties"";","SELECT name FROM table_name_17 WHERE type = ""learning/social difficulties"";",1 What is the total quantity of moisturizers sold in Japan and South Korea?,"CREATE TABLE sales (sale_id INT, product_id INT, sale_quantity INT, country VARCHAR(255)); CREATE TABLE product_categories (product_id INT, category VARCHAR(255));","SELECT SUM(sale_quantity) FROM sales JOIN product_categories ON sales.product_id = product_categories.product_id WHERE category = 'moisturizer' AND country IN ('Japan', 'South Korea');","SELECT SUM(sale_quantity) FROM sales JOIN product_categories ON sales.product_id = product_categories.product_id WHERE country IN ('Japan', 'South Korea') AND category = 'Moisturizer';",0 Count the number of distinct countries where cargo operations were conducted by the company 'Neptune Shipping',"CREATE TABLE ports (id INT, name VARCHAR(50), country VARCHAR(50)); CREATE TABLE cargo_operations (id INT, port_id INT, company VARCHAR(50), type VARCHAR(50)); ",SELECT COUNT(DISTINCT country) FROM ports INNER JOIN cargo_operations ON ports.id = cargo_operations.port_id WHERE cargo_operations.company = 'Neptune Shipping';,SELECT COUNT(DISTINCT country) FROM ports JOIN cargo_operations ON ports.id = cargo_operations.port_id WHERE company = 'Neptune Shipping';,0 How many companies were founded by Latinx individuals in 2015?,"CREATE TABLE founders (id INT, name VARCHAR(50), ethnicity VARCHAR(20), company_id INT, founding_year INT);",SELECT COUNT(DISTINCT founders.company_id) FROM founders WHERE founders.ethnicity = 'Latinx' AND founders.founding_year = 2015;,SELECT COUNT(*) FROM founders WHERE ethnicity = 'Latinx' AND founding_year = 2015;,0 What is the average capacity of renewable energy sources in MW?,"CREATE TABLE energy_sources (id INT PRIMARY KEY, source VARCHAR(50), capacity_mw FLOAT); ","SELECT AVG(capacity_mw) FROM energy_sources WHERE source IN ('Wind', 'Solar', 'Hydro');",SELECT AVG(capacity_mw) FROM energy_sources;,0 Add new garment 'Eco Dress' with colors 'Green' and 'Blue' and sizes 'S' and 'M' to the inventory table.,"CREATE TABLE inventory (id INT, garment VARCHAR(255), color VARCHAR(255), size VARCHAR(255), quantity INT);","INSERT INTO inventory (garment, color, size, quantity) VALUES ('Eco Dress', 'Green', 'S', 100), ('Eco Dress', 'Green', 'M', 100), ('Eco Dress', 'Blue', 'S', 100), ('Eco Dress', 'Blue', 'M', 100);","INSERT INTO inventory (id, garment, color, size, quantity) VALUES ('Eco Dress', 'Green', 'Blue', 'S', 'M');",0 List all the workplaces in Canada that have implemented workplace safety measures.,"CREATE TABLE ca_workplaces (id INT, name TEXT, country TEXT, workplace_safety BOOLEAN); ",SELECT name FROM ca_workplaces WHERE workplace_safety = true;,SELECT name FROM ca_workplaces WHERE country = 'Canada' AND workplace_safety = TRUE;,0 "What is the total population of the state of Texas, and what is the percentage of the population that lives in urban areas?","CREATE TABLE StatePopulation (State VARCHAR(100), Population INT, UrbanPopulation INT); ","SELECT (UrbanPopulation / Population) * 100.0 AS UrbanPercentage, Population FROM StatePopulation WHERE State = 'Texas';","SELECT SUM(Population) AS TotalPopulation, (SUM(UrbanPopulation) / SUM(Population)) * 100.0 / SUM(Population)) AS UrbanPopulationPercentage FROM StatePopulation WHERE State = 'Texas';",0 What did Orebro score when Umea scored 2?,"CREATE TABLE table_name_67 (örebro VARCHAR, umeå VARCHAR);","SELECT örebro FROM table_name_67 WHERE umeå = ""2"";","SELECT örebro FROM table_name_67 WHERE ume = ""2"";",0 What is the highest number of stories in homes with a height of 42 m.?,"CREATE TABLE table_name_7 (stories INTEGER, height VARCHAR);","SELECT MAX(stories) FROM table_name_7 WHERE height = ""42 m."";","SELECT MAX(stories) FROM table_name_7 WHERE height = ""42 m."";",1 "What is the highest number of losses of the central murray of lake boga, which has less than 10 wins?","CREATE TABLE table_name_91 (losses INTEGER, central_murray VARCHAR, wins VARCHAR);","SELECT MAX(losses) FROM table_name_91 WHERE central_murray = ""lake boga"" AND wins < 10;","SELECT MAX(losses) FROM table_name_91 WHERE central_murray = ""lake boga"" AND wins 10;",0 Which drugs have been approved in a specific year?,"CREATE TABLE drug_approval (id INT, drug_id INT, year INT); ","SELECT da.drug_id, da.year FROM drug_approval da WHERE da.year = 2016;",SELECT drug_id FROM drug_approval WHERE year = 2021;,0 Tell me the player for pick of 145,"CREATE TABLE table_name_9 (player VARCHAR, pick VARCHAR);","SELECT player FROM table_name_9 WHERE pick = ""145"";",SELECT player FROM table_name_9 WHERE pick = 145;,0 Who is the author for the malasaurus?,"CREATE TABLE table_name_65 (authors VARCHAR, name VARCHAR);","SELECT authors FROM table_name_65 WHERE name = ""malasaurus"";","SELECT authors FROM table_name_65 WHERE name = ""malasaurus"";",1 What's the highest ESG score for companies in the 'finance' sector?,"CREATE TABLE companies (id INT, sector VARCHAR(20), ESG_score FLOAT); ",SELECT MAX(ESG_score) FROM companies WHERE sector = 'finance';,SELECT MAX(ESG_score) FROM companies WHERE sector = 'finance';,1 What is the total quantity of waste produced by factories in India and China in the last month?,"CREATE TABLE factories (factory_id INT, country VARCHAR(50), waste_quantity INT); CREATE TABLE waste_dates (date DATE); ","SELECT SUM(factories.waste_quantity) FROM factories INNER JOIN waste_dates ON 1=1 WHERE waste_dates.date BETWEEN '2022-02-01' AND '2022-02-28' AND factories.country IN ('India', 'China');","SELECT SUM(waste_quantity) FROM factories INNER JOIN waste_dates ON factories.factory_id = waste_dates.factory_id WHERE factories.country IN ('India', 'China') AND waste_dates.date >= DATEADD(month, -1, GETDATE());",0 What episode number was written by Anthony Sparks?,"CREATE TABLE table_25851971_1 (no INTEGER, written_by VARCHAR);","SELECT MIN(no) FROM table_25851971_1 WHERE written_by = ""Anthony Sparks"";","SELECT MAX(no) FROM table_25851971_1 WHERE written_by = ""Anthony Sparks"";",0 "What is the total number of public schools in Los Angeles County, excluding charter schools?","CREATE TABLE public_schools (school_id INT, school_name TEXT, school_type TEXT, county TEXT, enrollment INT); ",SELECT COUNT(*) FROM public_schools WHERE county = 'Los Angeles' AND school_type != 'Charter';,SELECT COUNT(*) FROM public_schools WHERE county = 'Los Angeles' AND school_type!= 'Charter';,0 What is the average billing amount for cases in 'Texas'?,"CREATE TABLE cases (case_id INT, state VARCHAR(50), billing_amount DECIMAL(10,2)); ",SELECT AVG(billing_amount) as avg_billing FROM cases WHERE state = 'Texas';,SELECT AVG(billing_amount) FROM cases WHERE state = 'Texas';,0 What is the date of the game where Dipietro earned a decision and Carolina was the visiting team?,"CREATE TABLE table_name_28 (date VARCHAR, decision VARCHAR, visitor VARCHAR);","SELECT date FROM table_name_28 WHERE decision = ""dipietro"" AND visitor = ""carolina"";","SELECT date FROM table_name_28 WHERE decision = ""dipietro"" AND visitor = ""carolina"";",1 "What was the Opponents in Final during the match with a Score in Final of 6–4, 3–6, 5–7?","CREATE TABLE table_name_5 (opponents_in_final VARCHAR, score_in_final VARCHAR);","SELECT opponents_in_final FROM table_name_5 WHERE score_in_final = ""6–4, 3–6, 5–7"";","SELECT opponents_in_final FROM table_name_5 WHERE score_in_final = ""6–4, 3–6, 5–7"";",1 List the total number of horses on farms in ascending order.,CREATE TABLE farm (Total_Horses VARCHAR);,SELECT Total_Horses FROM farm ORDER BY Total_Horses;,SELECT Total_Horses FROM farm ORDER BY Total_Horses;,1 "Who was the presenter on Thursday of the series in which Emma Willis was the presenter on Wednesday, and Alice Levine Jamie East was the presenter on Sunday?","CREATE TABLE table_name_15 (thursday VARCHAR, wednesday VARCHAR, sunday VARCHAR);","SELECT thursday FROM table_name_15 WHERE wednesday = ""emma willis"" AND sunday = ""alice levine jamie east"";","SELECT thursday FROM table_name_15 WHERE wednesday = ""emma willis"" AND sunday = ""alice levine jamie east"";",1 What is the percentage of the population that has received the flu vaccine by disability status?,"CREATE TABLE population (person_id INT, disability_status VARCHAR(10)); CREATE TABLE flu_vaccinations (vaccination_id INT, person_id INT, vaccination_date DATE);","SELECT p.disability_status, COUNT(DISTINCT p.person_id) * 100.0 / (SELECT COUNT(DISTINCT p.person_id) FROM population p) AS percentage FROM population p JOIN flu_vaccinations fv ON p.person_id = fv.person_id GROUP BY p.disability_status;","SELECT disability_status, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM population)) AS percentage FROM population JOIN flu_vaccinations ON population.person_id = flu_vaccinations.person_id GROUP BY disability_status;",0 What was Barreto's song choice when the theme was samba?,"CREATE TABLE table_27614571_1 (song_choice VARCHAR, theme VARCHAR);","SELECT song_choice FROM table_27614571_1 WHERE theme = ""Samba"";","SELECT song_choice FROM table_27614571_1 WHERE theme = ""Samba"";",1 List all investors who have invested in companies with a high risk score (greater than 8).,"CREATE TABLE investments (investor_id INT, company_id INT, risk_score INT); CREATE TABLE companies (id INT, risk_score INT); ",SELECT DISTINCT i.name FROM investments AS i JOIN companies AS c ON i.company_id = c.id WHERE c.risk_score > 8;,SELECT i.investor_id FROM investments i JOIN companies c ON i.company_id = c.id WHERE c.risk_score > 8;,0 Who built the car that retired due to suspension before 65 laps?,"CREATE TABLE table_name_7 (constructor VARCHAR, laps VARCHAR, time_retired VARCHAR);","SELECT constructor FROM table_name_7 WHERE laps < 65 AND time_retired = ""suspension"";","SELECT constructor FROM table_name_7 WHERE laps 65 AND time_retired = ""suspension"";",0 What is the monthly change in wastewater effluent levels in the city of New York since 2015?,"CREATE TABLE wastewater (date DATE, city VARCHAR(20), effluent_level INT);","SELECT date_trunc('month', date) as month, AVG(effluent_level) - LAG(AVG(effluent_level)) OVER (ORDER BY month) as monthly_change FROM wastewater WHERE city = 'New York' AND date >= '2015-01-01' GROUP BY month;","SELECT effluent_level, EXTRACT(MONTH FROM date) as month, effluent_level, effluent_level FROM wastewater WHERE city = 'New York' AND date >= '2015-01-01' GROUP BY month;",0 "What are the vocal types used in song ""Le Pop""?",CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR);,"SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = ""Le Pop"";","SELECT T1.songid FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE T2.songid = ""Le Pop"";",0 "What is the torque for Model of 2.0 bitdi (cr) dpf, in 2010–?","CREATE TABLE table_name_37 (torque VARCHAR, model VARCHAR, years VARCHAR);","SELECT torque FROM table_name_37 WHERE model = ""2.0 bitdi (cr) dpf"" AND years = ""2010–"";","SELECT torque FROM table_name_37 WHERE model = ""2.0 bitdi (cr) dpf)"" AND years = ""2010–"";",0 Which members have not completed any workouts in the last 60 days?,"CREATE TABLE memberships (id INT, member_type VARCHAR(50), region VARCHAR(50)); CREATE TABLE workout_data (member_id INT, workout_type VARCHAR(50), duration INT, heart_rate_avg INT, calories_burned INT, workout_date DATE);",SELECT m.id FROM memberships m LEFT JOIN workout_data w ON m.id = w.member_id WHERE w.workout_date IS NULL OR w.workout_date < CURRENT_DATE - INTERVAL '60' DAY GROUP BY m.id HAVING COUNT(w.id) = 0;,"SELECT m.member_type FROM memberships m JOIN workout_data w ON m.id = w.member_id WHERE w.workout_date DATE_SUB(CURRENT_DATE, INTERVAL 60 DAY);",0 What place is the player with a score of 69-68=137?,"CREATE TABLE table_name_84 (place VARCHAR, score VARCHAR);",SELECT place FROM table_name_84 WHERE score = 69 - 68 = 137;,SELECT place FROM table_name_84 WHERE score = 69 - 68 = 137;,1 How many songs have been released by non-binary artists on the 'Indie Pop' platform since its inception?,"CREATE TABLE Artists (ArtistID int, ArtistName varchar(100), Gender varchar(50), Platform varchar(50)); CREATE TABLE Songs (SongID int, SongName varchar(100), ReleaseDate date, ArtistID int); ",SELECT COUNT(*) as NumberOfSongs FROM Artists JOIN Songs ON Artists.ArtistID = Songs.ArtistID WHERE Gender = 'Non-binary' AND Platform = 'Indie Pop' AND ReleaseDate >= '2010-01-01';,"SELECT COUNT(*) FROM Songs JOIN Artists ON Songs.ArtistID = Artists.ArtistID WHERE Artists.Gender = 'Non-binary' AND Artists.Platform = 'Indie Pop' AND Songs.ReleaseDate >= DATEADD(year, -1, GETDATE());",0 "WHAT SERIES WAS RELEASED BY ITV STUDIOS AND A RELEASE DATE OF AUGUST 15, 2012?","CREATE TABLE table_name_47 (series VARCHAR, released_by VARCHAR, release_date VARCHAR);","SELECT series FROM table_name_47 WHERE released_by = ""itv studios"" AND release_date = ""august 15, 2012"";","SELECT series FROM table_name_47 WHERE released_by = ""itv studios"" AND release_date = ""august 15, 2012"";",1 "List all startups that have received funding from both ""VC"" and ""angel"" investors","CREATE TABLE funding (startup_id INT, investor_type VARCHAR(10));","SELECT startups.name FROM startups INNER JOIN funding ON startups.id = funding.startup_id WHERE funding.investor_type IN ('VC', 'angel') GROUP BY startups.name HAVING COUNT(DISTINCT funding.investor_type) = 2;","SELECT startup_id FROM funding WHERE investor_type IN ('VC', 'angel') GROUP BY startup_id HAVING COUNT(*) = 2;",0 What was the highest number of votes for mir-hossein mousavi when the number of invalid votes is 5683,"CREATE TABLE table_23390604_1 (mir_hossein_mousavi INTEGER, spoiled_ballots VARCHAR);",SELECT MAX(mir_hossein_mousavi) FROM table_23390604_1 WHERE spoiled_ballots = 5683;,SELECT MAX(mir_hossein_mousavi) FROM table_23390604_1 WHERE spoiled_ballots = 5683;,1 How many public swimming pools are there in each city?,"CREATE TABLE SwimmingPools (City TEXT, NumPools INTEGER); ","SELECT City, NumPools FROM SwimmingPools;","SELECT City, SUM(NumPools) FROM SwimmingPools GROUP BY City;",0 List ports with safety incidents in 2019,"CREATE TABLE ports (id VARCHAR(20), name VARCHAR(20)); CREATE TABLE safety_incidents (id INT, port_id VARCHAR(20), incident_type VARCHAR(50), incident_date DATE); ",SELECT ports.name FROM ports JOIN safety_incidents ON ports.id = safety_incidents.port_id WHERE YEAR(incident_date) = 2019;,SELECT ports.name FROM ports INNER JOIN safety_incidents ON ports.id = safety_incidents.port_id WHERE safety_incidents.incident_date BETWEEN '2019-01-01' AND '2019-12-31';,0 What is the total biomass of coral reefs in the Indo-Pacific region in the 'MarineLife' schema?,"CREATE SCHEMA MarineLife;CREATE TABLE CoralReefs (id INT, region TEXT, biomass REAL); ","SELECT region, SUM(biomass) AS total_biomass FROM MarineLife.CoralReefs WHERE region = 'Indo-Pacific' GROUP BY region;",SELECT SUM(biomass) FROM MarineLife.CoralReefs WHERE region = 'Indo-Pacific';,0 What date did the Geelong team play on as a home team?,"CREATE TABLE table_name_12 (date VARCHAR, home_team VARCHAR);","SELECT date FROM table_name_12 WHERE home_team = ""geelong"";","SELECT date FROM table_name_12 WHERE home_team = ""geelong"";",1 How many parks are called mt. olympus,"CREATE TABLE table_2665085_1 (name VARCHAR, park VARCHAR);","SELECT COUNT(name) FROM table_2665085_1 WHERE park = ""Mt. Olympus"";","SELECT COUNT(name) FROM table_2665085_1 WHERE park = ""Mt. Olympia"";",0 What is the difference in pH levels between organic and non-organic aquaculture sites?,"CREATE TABLE aquaculture_sites_ph (site_id INT, certification VARCHAR(50), pH FLOAT); ","SELECT certification, AVG(pH) AS avg_ph FROM aquaculture_sites_ph GROUP BY certification;","SELECT certification, pH, COUNT(*) OVER (PARTITION BY certification ORDER BY pH DESC) as pH_difference FROM aquaculture_sites_ph;",0 What is the total number of attendees at 'Art Exhibition' events in 'California'?,"CREATE TABLE Attendees_Event_Location_2 (event_name VARCHAR(255), location VARCHAR(255), attendees INT); ",SELECT SUM(attendees) FROM Attendees_Event_Location_2 WHERE event_name = 'Art Exhibition' AND location = 'California';,SELECT SUM(attendees) FROM Attendees_Event_Location_2 WHERE event_name = 'Art Exhibition' AND location = 'California';,1 "What is the lowest Rank for the Name, ""area of permanent crops"", Out of a number smaller than 181?","CREATE TABLE table_name_66 (rank INTEGER, name VARCHAR, out_of VARCHAR);","SELECT MIN(rank) FROM table_name_66 WHERE name = ""area of permanent crops"" AND out_of < 181;","SELECT MIN(rank) FROM table_name_66 WHERE name = ""area of permanent crops"" AND out_of 181;",0 How many users who live in 'Asia' have a follower count greater than 1000?,"CREATE TABLE users (user_id INT, name VARCHAR(255), region VARCHAR(255), followers INT); ",SELECT COUNT(*) FROM users WHERE region = 'Asia' AND followers > 1000;,SELECT COUNT(*) FROM users WHERE region = 'Asia' AND followers > 1000;,1 "what is the earliest date for the album that had a catalog number of 3645, was formatted as a cd and was under the luaka bop label?","CREATE TABLE table_name_2 (date INTEGER, label VARCHAR, catalog VARCHAR, format VARCHAR);","SELECT MIN(date) FROM table_name_2 WHERE catalog = ""3645"" AND format = ""cd"" AND label = ""luaka bop"";","SELECT MIN(date) FROM table_name_2 WHERE catalog = 3645 AND format = ""cd"" AND label = ""luaka bop"";",0 What is the average age of athletes in the basketball_players table?,"CREATE TABLE basketball_players (player_id INT, name VARCHAR(50), age INT, position VARCHAR(20)); ",SELECT AVG(age) FROM basketball_players;,SELECT AVG(age) FROM basketball_players;,1 What was the time in part 3 when Nick Heidfeld was the driver?,"CREATE TABLE table_20159025_1 (part_3 VARCHAR, driver VARCHAR);","SELECT part_3 FROM table_20159025_1 WHERE driver = ""Nick Heidfeld"";","SELECT part_3 FROM table_20159025_1 WHERE driver = ""Nick Heidfeld"";",1 What is the first year in the competition?,CREATE TABLE table_19047_2 (year INTEGER);,SELECT MIN(year) FROM table_19047_2;,SELECT MIN(year) FROM table_19047_2;,1 "How many players are there in each game genre, and what is the total number of games in each genre?","CREATE TABLE Genres (GenreID INT, Genre VARCHAR(20)); CREATE TABLE Games (GameID INT, GameName VARCHAR(50), GenreID INT); CREATE TABLE Players (PlayerID INT, GameID INT); ","SELECT Genres.Genre, COUNT(Players.PlayerID) AS NumPlayers, COUNT(Games.GameID) AS NumGames FROM Genres INNER JOIN Games ON Genres.GenreID = Games.GenreID INNER JOIN Players ON Games.GameID = Players.GameID GROUP BY Genres.Genre;","SELECT Genres.Genre, COUNT(Players.PlayerID) as TotalPlayers, COUNT(Games.GameID) as TotalGames FROM Genres INNER JOIN Games ON Genres.GenreID = Games.GenreID INNER JOIN Players ON Games.GameID = Players.GameID GROUP BY Genres.Genre;",0 What was the Difference of the Team that had a Position less than 2?,"CREATE TABLE table_name_8 (difference VARCHAR, position INTEGER);",SELECT difference FROM table_name_8 WHERE position < 2;,SELECT difference FROM table_name_8 WHERE position 2;,0 Identify garments with forecasted sales greater than the total manufactured quantity.,"CREATE TABLE trend_forecasting(id INT PRIMARY KEY, region VARCHAR(50), product_category VARCHAR(50), forecast_date DATE, forecast_units INT); CREATE TABLE garment_manufacturing(id INT PRIMARY KEY, garment_id INT, country VARCHAR(50), material VARCHAR(50), manufacturing_date DATE, quantity INT);","SELECT t.product_category, t.region, t.forecast_units - SUM(gm.quantity) as diff FROM trend_forecasting t JOIN garment_manufacturing gm ON t.region = gm.country GROUP BY t.product_category, t.region HAVING SUM(gm.quantity) < t.forecast_units;","SELECT gm.material, SUM(gm.quantity) as total_quantity FROM trend_forecasting tf JOIN garment_manufacturing gm ON tf.product_category = gm.material WHERE tf.prevision_units > (SELECT SUM(quantity) FROM garment_manufacturing gm WHERE gm.material = gm.material) GROUP BY gm.product_category;",0 "What's the total donation amount per category, sorted by the highest amount first?","CREATE TABLE donations (id INT, category VARCHAR(255), amount DECIMAL(10, 2)); ","SELECT category, SUM(amount) AS total_donation FROM donations GROUP BY category ORDER BY total_donation DESC;","SELECT category, SUM(amount) as total_donation FROM donations GROUP BY category ORDER BY total_donation DESC;",0 List all crime types and their respective total crime counts across all districts.,"CREATE TABLE crimes (crime_id INT, district_id INT, crime_type TEXT, crime_count INT);","SELECT c.crime_type, SUM(c.crime_count) FROM crimes c GROUP BY c.crime_type;","SELECT crime_type, SUM(crime_count) FROM crimes GROUP BY crime_type;",0 List all marine protected areas,"CREATE TABLE marine_protected_areas (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), size FLOAT, year_established INT); ",SELECT * FROM marine_protected_areas;,SELECT * FROM marine_protected_areas;,1 Which events have the number of notes between one and three? List the event id and the property id.,"CREATE TABLE Customer_Events (Customer_Event_ID VARCHAR, property_id VARCHAR, customer_event_id VARCHAR); CREATE TABLE Customer_Event_Notes (Customer_Event_ID VARCHAR);","SELECT T1.Customer_Event_ID, T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING COUNT(*) BETWEEN 1 AND 3;","SELECT T1.Customer_Event_ID, T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.Customer_Event_ID HAVING COUNT(*) BETWEEN 1 AND 3;",0 What is the market share of the top 3 hotel chains in 'Berlin'?,"CREATE TABLE hotels (hotel_id INT, name TEXT, chain TEXT, city TEXT, revenue FLOAT);","SELECT chain, 100.0 * SUM(revenue) / NULLIF(SUM(revenue) OVER (PARTITION BY city), 0) as market_share FROM hotels WHERE city = 'Berlin' GROUP BY chain ORDER BY market_share DESC LIMIT 3;","SELECT chain, SUM(revenue) as total_revenue FROM hotels WHERE city = 'Berlin' GROUP BY chain ORDER BY total_revenue DESC LIMIT 3;",0 "What is the maximum water consumption (in liters) in a single day for the city of Melbourne, Australia in 2020?","CREATE TABLE daily_water_usage (id INT, city VARCHAR(255), usage_liters INT, date DATE); ",SELECT MAX(usage_liters) FROM daily_water_usage WHERE city = 'Melbourne' AND date BETWEEN '2020-01-01' AND '2020-12-31';,SELECT MAX(usage_liters) FROM daily_water_usage WHERE city = 'Melbourne' AND date BETWEEN '2020-01-01' AND '2020-12-31';,1 "What is the total number of registered voters in the ""VoterData"" table, per state, for voters who are over 70 years old?","CREATE TABLE VoterData (id INT, name VARCHAR(50), age INT, state VARCHAR(50), registered BOOLEAN); ","SELECT state, COUNT(*) as num_voters FROM VoterData WHERE age > 70 AND registered = true GROUP BY state;","SELECT state, COUNT(*) FROM VoterData WHERE age > 70 GROUP BY state;",0 How many patients participated in 'Clinical Trial CT003'?,"CREATE TABLE clinical_trials (trial_id varchar(10), num_patients int); ",SELECT num_patients FROM clinical_trials WHERE trial_id = 'CT003';,SELECT SUM(num_patients) FROM clinical_trials WHERE trial_id = 'CT003';,0 "What is the average value of co-ownership properties in Portland, OR?","CREATE TABLE CoOwnershipProperties (Id INT, City VARCHAR(50), Value FLOAT); ","SELECT City, AVG(Value) FROM CoOwnershipProperties WHERE City = 'Portland' GROUP BY City;",SELECT AVG(Value) FROM CoOwnershipProperties WHERE City = 'Portland';,0 What is the difference of the team with 12 points?,"CREATE TABLE table_name_57 (difference VARCHAR, points VARCHAR);",SELECT difference FROM table_name_57 WHERE points = 12;,"SELECT difference FROM table_name_57 WHERE points = ""12"";",0 "How many verbs mean to grow, to produce","CREATE TABLE table_1745843_10 (part_1 VARCHAR, verb_meaning VARCHAR);","SELECT COUNT(part_1) FROM table_1745843_10 WHERE verb_meaning = ""to grow, to produce"";","SELECT COUNT(part_1) FROM table_1745843_10 WHERE verb_meaning = ""To grow, to produce"";",0 What is the maximum score achieved by players who joined after 2020-12-31 in the game 'Dragon Defenders'?,"CREATE TABLE Dragon_Defenders (player_id INT, player_name VARCHAR(50), score INT, join_date DATE); ",SELECT MAX(score) FROM Dragon_Defenders WHERE join_date > '2020-12-31';,SELECT MAX(score) FROM Dragon_Defenders WHERE join_date > '2020-12-31';,1 What are the songs in volumes with more than 1 week on top?,"CREATE TABLE volume (Song VARCHAR, Weeks_on_Top INTEGER);",SELECT Song FROM volume WHERE Weeks_on_Top > 1;,SELECT Song FROM volume WHERE Weeks_on_Top > 1;,1 What date was versmold?,"CREATE TABLE table_name_15 (date VARCHAR, tournament VARCHAR);","SELECT date FROM table_name_15 WHERE tournament = ""versmold"";","SELECT date FROM table_name_15 WHERE tournament = ""versmold"";",1 What is the average temperature in field 1 over the last week?,"CREATE TABLE field_temperature (field_id INT, date DATE, temperature FLOAT); ","SELECT AVG(temperature) FROM field_temperature WHERE field_id = 1 AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK);","SELECT AVG(temperature) FROM field_temperature WHERE field_id = 1 AND date >= DATEADD(week, -1, GETDATE());",0 List all fish species and their growth rate in the Black Sea.,"CREATE TABLE black_sea (region VARCHAR(255), id INTEGER); CREATE TABLE fish_species_black (id INTEGER, species VARCHAR(255)); CREATE TABLE black_sea_growth (species_id INTEGER, region_id INTEGER, rate FLOAT);","SELECT fs.species, bsg.rate FROM black_sea_growth bsg JOIN fish_species_black fs ON bsg.species_id = fs.id JOIN black_sea bs ON bsg.region_id = bs.id WHERE bs.region = 'Black Sea';","SELECT fish_species_black.species, black_sea_growth.rate FROM fish_species_black INNER JOIN black_sea_growth ON fish_species_black.id = black_sea_growth.species_id INNER JOIN black_sea ON black_sea_growth.region_id = black_sea.region_id WHERE black_sea.region = 'Black Sea';",0 Why did the Belk Gymnasium close?,"CREATE TABLE table_name_95 (reason VARCHAR, venue VARCHAR);","SELECT reason FROM table_name_95 WHERE venue = ""belk gymnasium"";","SELECT reason FROM table_name_95 WHERE venue = ""belk gymnasium"";",1 What was the total number of volunteer hours in the 'Education' category in 2021?,"CREATE TABLE volunteer_hours (id INT, volunteer_id INT, category VARCHAR(20), hours INT, hour_date DATE); ",SELECT SUM(hours) as total_volunteer_hours FROM volunteer_hours WHERE category = 'Education' AND YEAR(hour_date) = 2021;,SELECT SUM(hours) FROM volunteer_hours WHERE category = 'Education' AND YEAR(hour_date) = 2021;,0 "Which match was the final score 7–6 (7–0) , 6–7 (5–7) , 4–6, 6–2, 6–7 (5–7)?","CREATE TABLE table_26202812_7 (no VARCHAR, score_in_the_final VARCHAR);","SELECT no FROM table_26202812_7 WHERE score_in_the_final = ""7–6 (7–0) , 6–7 (5–7) , 4–6, 6–2, 6–7 (5–7)"";","SELECT no FROM table_26202812_7 WHERE score_in_the_final = ""7–6 (7–0), 6–7 (5–7), 4–6, 6–2, 6–7 (5–7)"";",0 What type of graphics are present in the Precision 340 model with the intel 850e chipset?,"CREATE TABLE table_name_99 (graphics VARCHAR, chipset VARCHAR, model VARCHAR);","SELECT graphics FROM table_name_99 WHERE chipset = ""intel 850e"" AND model = ""precision 340"";","SELECT graphics FROM table_name_99 WHERE chipset = ""intel 850e"" AND model = ""precision 340"";",1 "What is the total number of smart contracts with successful transaction counts greater than 1000, grouped by their respective platforms?","CREATE TABLE smart_contracts (platform VARCHAR(255), tx_count INT); ","SELECT platform, COUNT(*) FROM smart_contracts WHERE tx_count > 1000 GROUP BY platform;","SELECT platform, COUNT(*) FROM smart_contracts WHERE tx_count > 1000 GROUP BY platform;",1 What is the highest top-25 with more than 9 top-10 but less than 29 events?,"CREATE TABLE table_name_17 (top_25 INTEGER, top_10 VARCHAR, events VARCHAR);",SELECT MAX(top_25) FROM table_name_17 WHERE top_10 > 9 AND events < 29;,SELECT MAX(top_25) FROM table_name_17 WHERE top_10 > 9 AND events 29;,0 "What is the total number of Year(s), when Date (Opening) is ""September 21""?","CREATE TABLE table_name_39 (year VARCHAR, date__opening_ VARCHAR);","SELECT COUNT(year) FROM table_name_39 WHERE date__opening_ = ""september 21"";","SELECT COUNT(year) FROM table_name_39 WHERE date__opening_ = ""september 21"";",1 What is the percentage change in Praseodymium production from 2018 to 2019?,"CREATE TABLE Praseodymium_Production (year INT, production FLOAT); ","SELECT ((production[year=2019] - production[year=2018])/production[year=2018])*100 FROM Praseodymium_Production WHERE year IN (2018, 2019);",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Praseodymium_Production WHERE year = 2018)) * 100.0 / (SELECT COUNT(*) FROM Praseodymium_Production WHERE year = 2019)) AS percentage_change FROM Praseodymium_Production WHERE year = 2018;,0 What is the total biomass of marine mammals in the Arctic Ocean?,"CREATE TABLE marine_mammals (species TEXT, population REAL, biomass REAL); ","SELECT SUM(biomass) FROM marine_mammals WHERE species IN ('Beluga Whale', 'Narwhal', 'Bowhead Whale');",SELECT SUM(biomass) FROM marine_mammals WHERE species = 'Arctic';,0 What is the average safety rating for electric vehicles in the vehicle_safety_data table?,"CREATE TABLE vehicle_safety_data (id INT, make VARCHAR(20), model VARCHAR(20), safety_rating DECIMAL(3,1)); ","SELECT AVG(safety_rating) FROM vehicle_safety_data WHERE make IN ('Tesla', 'Ford', 'Chevrolet') AND model IN (SELECT DISTINCT model FROM vehicle_safety_data WHERE make IN ('Tesla', 'Ford', 'Chevrolet') AND is_electric = TRUE);",SELECT AVG(safety_rating) FROM vehicle_safety_data WHERE make = 'Electric';,0 Delete records of customers who have not paid their bills in the last 60 days from the billing table,"CREATE TABLE billing (customer_id INT, bill_amount DECIMAL(5,2), payment_date DATE);",DELETE FROM billing WHERE payment_date < (CURRENT_DATE - INTERVAL '60' DAY);,"DELETE FROM billing WHERE bill_amount IS NULL AND payment_date DATE_SUB(CURDATE(), INTERVAL 60 DAY);",0 How many mines are there in each state?,"CREATE TABLE Mines (MineID INT, Name TEXT, Location TEXT, TotalWorkers INT); ","SELECT Location, COUNT(*) FROM Mines GROUP BY Location;","SELECT Location, COUNT(*) FROM Mines GROUP BY Location;",1 What is the engine configuration of the 1.2 mpi engine?,"CREATE TABLE table_name_80 (engine_configuration VARCHAR, engine_name VARCHAR);","SELECT engine_configuration FROM table_name_80 WHERE engine_name = ""1.2 mpi"";","SELECT engine_configuration FROM table_name_80 WHERE engine_name = ""1.2 mpi"";",1 Get creative AI applications using the 'Deep Learning' technology,"CREATE TABLE creative_apps_2 (id INT, name VARCHAR(255), type VARCHAR(255), technology VARCHAR(255)); ",SELECT * FROM creative_apps_2 WHERE technology = 'Deep Learning';,SELECT name FROM creative_apps_2 WHERE technology = 'Deep Learning';,0 How many win total which has the rank smaller than 3 and events smaller than 22,"CREATE TABLE table_name_71 (wins VARCHAR, events VARCHAR, rank VARCHAR);",SELECT COUNT(wins) FROM table_name_71 WHERE events < 22 AND rank < 3;,SELECT COUNT(wins) FROM table_name_71 WHERE events 22 AND rank 3;,0 Which Venue has a Year of 1911?,"CREATE TABLE table_name_60 (venue VARCHAR, year VARCHAR);",SELECT venue FROM table_name_60 WHERE year = 1911;,SELECT venue FROM table_name_60 WHERE year = 1911;,1 "Who were the GT winning team when the results were ""report""?","CREATE TABLE table_27743641_2 (gt_winning_team VARCHAR, results VARCHAR);","SELECT gt_winning_team FROM table_27743641_2 WHERE results = ""Report"";","SELECT gt_winning_team FROM table_27743641_2 WHERE results = ""Report"";",1 How many overall values have a college of Notre Dame and rounds over 2?,"CREATE TABLE table_name_97 (overall VARCHAR, college VARCHAR, round VARCHAR);","SELECT COUNT(overall) FROM table_name_97 WHERE college = ""notre dame"" AND round > 2;","SELECT COUNT(overall) FROM table_name_97 WHERE college = ""notre Dame"" AND round > 2;",0 How many users engaged with virtual tours in 'Africa' during each month of 2022?,"CREATE TABLE virtual_tours (tour_id INT, user_id INT, country VARCHAR(255), tour_date DATE); ","SELECT country, EXTRACT(MONTH FROM tour_date) AS month, COUNT(DISTINCT user_id) FROM virtual_tours WHERE country = 'Africa' AND tour_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY country, month;","SELECT EXTRACT(MONTH FROM tour_date) AS month, COUNT(DISTINCT user_id) FROM virtual_tours WHERE country = 'Africa' GROUP BY month;",0 "What attendance has astros as the opponent, and april 29 as the date?","CREATE TABLE table_name_69 (attendance INTEGER, opponent VARCHAR, date VARCHAR);","SELECT SUM(attendance) FROM table_name_69 WHERE opponent = ""astros"" AND date = ""april 29"";","SELECT AVG(attendance) FROM table_name_69 WHERE opponent = ""astros"" AND date = ""april 29"";",0 Calculate the total recycling rate for each state in the USA in the last year.,"CREATE TABLE usa_recycling_rates (state VARCHAR(50), recycling_rate NUMERIC(10,2), measurement_date DATE); ","SELECT state, SUM(recycling_rate) total_rate FROM usa_recycling_rates WHERE measurement_date >= DATEADD(year, -1, CURRENT_DATE) GROUP BY state, ROW_NUMBER() OVER (PARTITION BY state ORDER BY measurement_date DESC);","SELECT state, SUM(recycling_rate) as total_recycling_rate FROM usa_recycling_rates WHERE measurement_date >= DATEADD(year, -1, GETDATE()) GROUP BY state;",0 Which Status has a Opposing Teams of wales?,"CREATE TABLE table_name_16 (status VARCHAR, opposing_teams VARCHAR);","SELECT status FROM table_name_16 WHERE opposing_teams = ""wales"";","SELECT status FROM table_name_16 WHERE opposing_teams = ""wales"";",1 "What is the lowest Pick #, when College is ""Louisville"", and when Round is less than 10?","CREATE TABLE table_name_6 (pick__number INTEGER, college VARCHAR, round VARCHAR);","SELECT MIN(pick__number) FROM table_name_6 WHERE college = ""louisville"" AND round < 10;","SELECT MIN(pick__number) FROM table_name_6 WHERE college = ""louisville"" AND round 10;",0 List all building permits issued in the last 30 days.,"CREATE TABLE Building_Permits (id INT, permit_number VARCHAR(255), issue_date DATE); ","SELECT permit_number FROM Building_Permits WHERE issue_date >= DATE_SUB(CURDATE(), INTERVAL 30 DAY);","SELECT * FROM Building_Permits WHERE issue_date >= DATEADD(day, -30, GETDATE());",0 What is the lowest ranking for Paul Mctiernan?,"CREATE TABLE table_name_67 (ranking INTEGER, name VARCHAR);","SELECT MIN(ranking) FROM table_name_67 WHERE name = ""paul mctiernan"";","SELECT MIN(ranking) FROM table_name_67 WHERE name = ""paul mctiernan"";",1 "What is the average game duration in minutes for players in the ""CosmicBattles"" table, who have played for more than 10 hours?","CREATE TABLE CosmicBattles (PlayerID INT, GameDurationMinutes INT, PlaytimeHours INT); ",SELECT AVG(GameDurationMinutes) FROM CosmicBattles WHERE PlaytimeHours > 10;,SELECT AVG(GameDurationMinutes) FROM CosmicBattles WHERE PlaytimeHours > 10;,1 What is the largest Attendance with a Loss of darling (0–1)?,"CREATE TABLE table_name_35 (attendance INTEGER, loss VARCHAR);","SELECT MAX(attendance) FROM table_name_35 WHERE loss = ""darling (0–1)"";","SELECT MAX(attendance) FROM table_name_35 WHERE loss = ""darling (0–1)"";",1 How many IoT soil moisture sensors were installed in April?,"CREATE TABLE sensor_installation (sensor_id INT, install_date DATE); ",SELECT COUNT(*) FROM sensor_installation WHERE install_date >= '2021-04-01' AND install_date < '2021-05-01';,SELECT COUNT(*) FROM sensor_installation WHERE install_date BETWEEN '2022-04-01' AND '2022-06-30';,0 What is the total number of properties built after 2010 with sustainable urbanism certifications in London?,"CREATE TABLE properties (id INT, city VARCHAR, build_year INT, sustainable_urbanism BOOLEAN);",SELECT COUNT(*) FROM properties WHERE city = 'London' AND build_year > 2010 AND sustainable_urbanism = TRUE;,SELECT COUNT(*) FROM properties WHERE city = 'London' AND build_year > 2010 AND sustainable_urbanism = true;,0 Which artist has the highest average concert ticket price?,"CREATE TABLE artists (artist_name TEXT, tickets_sold INT, ticket_price FLOAT); ","SELECT artist_name, AVG(ticket_price) as avg_ticket_price FROM artists GROUP BY artist_name ORDER BY avg_ticket_price DESC LIMIT 1;","SELECT artist_name, AVG(ticket_price) as avg_ticket_price FROM artists GROUP BY artist_name ORDER BY avg_ticket_price DESC LIMIT 1;",1 "List the names, roles, and years of experience of all male mining engineers.","CREATE TABLE mine_operators (id INT PRIMARY KEY, name VARCHAR(50), role VARCHAR(50), gender VARCHAR(10), years_of_experience INT); ","SELECT name, role, years_of_experience FROM mine_operators WHERE gender = 'Male';","SELECT name, role, years_of_experience FROM mine_operators WHERE gender = 'Male';",1 "Count the number of records in the table ""coral_reefs""","CREATE TABLE coral_reefs (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), status VARCHAR(255)); ",SELECT COUNT(*) FROM coral_reefs;,SELECT COUNT(*) FROM coral_reefs;,1 Who did the most high rebounds in the game where Sales (17) did the high points?,"CREATE TABLE table_18904831_5 (high_rebounds VARCHAR, high_points VARCHAR);","SELECT high_rebounds FROM table_18904831_5 WHERE high_points = ""Sales (17)"";","SELECT high_rebounds FROM table_18904831_5 WHERE high_points = ""Sales (17)"";",1 List all Shariah-compliant lending activities by EthicalBank in 2021.,"CREATE TABLE shariah_compliant_lending (bank_name TEXT, activity_name TEXT, activity_date DATE); ",SELECT * FROM shariah_compliant_lending WHERE bank_name = 'EthicalBank' AND activity_date BETWEEN '2021-01-01' AND '2021-12-31';,SELECT activity_name FROM shariah_compliant_lending WHERE bank_name = 'EthicalBank' AND activity_date BETWEEN '2021-01-01' AND '2021-12-31';,0 What is the nationality of Martin Lewis?,"CREATE TABLE table_name_62 (nationality VARCHAR, player VARCHAR);","SELECT nationality FROM table_name_62 WHERE player = ""martin lewis"";","SELECT nationality FROM table_name_62 WHERE player = ""martin lewis"";",1 What is the minimum humidity level in 'field7' over the past month?,"CREATE TABLE field7 (date DATE, humidity FLOAT); ",SELECT MIN(humidity) FROM field7 WHERE date >= (CURRENT_DATE - INTERVAL '30 days');,"SELECT MIN(humidity) FROM field7 WHERE date >= DATEADD(month, -1, GETDATE());",0 Which loss had a record of 79-49?,"CREATE TABLE table_name_7 (loss VARCHAR, record VARCHAR);","SELECT loss FROM table_name_7 WHERE record = ""79-49"";","SELECT loss FROM table_name_7 WHERE record = ""79-49"";",1 "Where the grid is under 19, the time finished was logged as received outside assistance, what's the total number of laps?","CREATE TABLE table_name_15 (laps VARCHAR, time_retired VARCHAR, grid VARCHAR);","SELECT COUNT(laps) FROM table_name_15 WHERE time_retired = ""received outside assistance"" AND grid < 19;","SELECT COUNT(laps) FROM table_name_15 WHERE time_retired = ""received outside assistance"" AND grid 19;",0 What was the earliest Year the Linto Team had less than 15 Points with more than 0 Wins?,"CREATE TABLE table_name_86 (year INTEGER, points VARCHAR, wins VARCHAR, team VARCHAR);","SELECT MIN(year) FROM table_name_86 WHERE wins > 0 AND team = ""linto"" AND points < 15;","SELECT MIN(year) FROM table_name_86 WHERE wins > 0 AND team = ""linto"" AND points 15;",0 What is the service charge of the boat howitzers with 1009 made?,"CREATE TABLE table_name_9 (service_charge VARCHAR, number_made VARCHAR);",SELECT service_charge FROM table_name_9 WHERE number_made = 1009;,"SELECT service_charge FROM table_name_9 WHERE number_made = ""1009"";",0 I want to know the condition with Prothrombin time of unaffected and bleeding time of prolonged with partial thromboplastin time of unaffected with platelet count of decreased or unaffected,"CREATE TABLE table_name_75 (condition VARCHAR, platelet_count VARCHAR, partial_thromboplastin_time VARCHAR, prothrombin_time VARCHAR, bleeding_time VARCHAR);","SELECT condition FROM table_name_75 WHERE prothrombin_time = ""unaffected"" AND bleeding_time = ""prolonged"" AND partial_thromboplastin_time = ""unaffected"" AND platelet_count = ""decreased or unaffected"";","SELECT condition FROM table_name_75 WHERE prothrombin_time = ""unaffected"" AND bleeding_time = ""prolonged"" AND partial_thromboplastin_time = ""unaffected"" AND platelet_count = ""decreased or unaffected"";",1 Who was the visiting team that played on September 15?,"CREATE TABLE table_name_41 (visiting_team VARCHAR, date VARCHAR);","SELECT visiting_team FROM table_name_41 WHERE date = ""september 15"";","SELECT visiting_team FROM table_name_41 WHERE date = ""september 15"";",1 "What is Score, when Game is less than 61, when February is less than 11, and when Opponent is ""@ Buffalo Sabres""?","CREATE TABLE table_name_25 (score VARCHAR, opponent VARCHAR, game VARCHAR, february VARCHAR);","SELECT score FROM table_name_25 WHERE game < 61 AND february < 11 AND opponent = ""@ buffalo sabres"";","SELECT score FROM table_name_25 WHERE game 61 AND february 11 AND opponent = ""@ buffalo sabres"";",0 Update the network investments table with the total investment amount for each region?,"CREATE TABLE network_investments (investment_id INT, investment_amount DECIMAL(10,2), region VARCHAR(50)); ","UPDATE network_investments SET total_investment = investment_amount WHERE region IN ('North America', 'Europe', 'Asia');",UPDATE network_investments SET investment_amount = SUM(investment_amount) WHERE region = 'North America';,0 Find the number of companies founded by individuals from Southeast Asia in the healthcare sector that received funding in 2021.,"CREATE TABLE companies (id INT, name TEXT, industry TEXT, founding_year INT, founder_location TEXT); CREATE TABLE funding_records (company_id INT, funding_amount INT, funding_year INT); ",SELECT COUNT(*) FROM companies JOIN funding_records ON companies.id = funding_records.company_id WHERE companies.founder_location = 'Vietnam' AND companies.industry = 'Healthcare' AND funding_records.funding_year = 2021;,SELECT COUNT(*) FROM companies JOIN funding_records ON companies.id = funding_records.company_id WHERE companies.industry = 'Healthcare' AND companies.founder_location = 'Southeast Asia' AND funding_records.funding_year = 2021;,0 Can you tell me the average Total that has the To par of 15?,"CREATE TABLE table_name_36 (total INTEGER, to_par VARCHAR);",SELECT AVG(total) FROM table_name_36 WHERE to_par = 15;,SELECT AVG(total) FROM table_name_36 WHERE to_par = 15;,1 Who did they play at Atlanta-Fulton County Stadium?,"CREATE TABLE table_name_20 (opponent VARCHAR, game_site VARCHAR);","SELECT opponent FROM table_name_20 WHERE game_site = ""atlanta-fulton county stadium"";","SELECT opponent FROM table_name_20 WHERE game_site = ""atlanta-fulton county stadium"";",1 "What years runner-up is Birmingham city, with over 1 runners-up?","CREATE TABLE table_name_91 (years_runner_up VARCHAR, runners_up VARCHAR, club VARCHAR);","SELECT years_runner_up FROM table_name_91 WHERE runners_up > 1 AND club = ""birmingham city"";","SELECT years_runner_up FROM table_name_91 WHERE runners_up > 1 AND club = ""birmingham city"";",1 How many whale sightings were recorded in the North Atlantic in 2020 and 2021?,"CREATE TABLE whale_sightings (id INT, species TEXT, year INT, region TEXT);","SELECT COUNT(*) FROM whale_sightings WHERE species = 'whale' AND region = 'North Atlantic' AND year IN (2020, 2021);","SELECT COUNT(*) FROM whale_sightings WHERE year IN (2020, 2021) AND region = 'North Atlantic';",0 Name the 2009 for when 2007 is 3r and 2010 is q2,CREATE TABLE table_name_52 (Id VARCHAR);,"SELECT 2009 FROM table_name_52 WHERE 2007 = ""3r"" AND 2010 = ""q2"";","SELECT 2009 FROM table_name_52 WHERE 2007 = ""3r"" AND 2010 = ""q2"";",1 What is the production code of the episode directed by David Solomon? ,"CREATE TABLE table_21304155_1 (production_code VARCHAR, directed_by VARCHAR);","SELECT production_code FROM table_21304155_1 WHERE directed_by = ""David Solomon"";","SELECT production_code FROM table_21304155_1 WHERE directed_by = ""David Solomon"";",1 What is the percentage of orders that were delivered in the past week?,"CREATE TABLE orders(id INT, date DATE, delivery BOOLEAN); ",SELECT 100.0 * COUNT(CASE WHEN delivery THEN 1 END) / COUNT(*) as delivery_percentage FROM orders WHERE date >= CURRENT_DATE - INTERVAL '7 days';,"SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM orders WHERE date >= DATEADD(week, -1, GETDATE()))) FROM orders WHERE date >= DATEADD(week, -1, GETDATE());",0 What is the average usage time for mobile plans in each region?,"CREATE TABLE usage (id INT, subscriber_id INT, plan_id INT, usage_time DECIMAL(10,2)); CREATE TABLE mobile_plans (id INT, name VARCHAR(255), type VARCHAR(255), price DECIMAL(10,2)); CREATE TABLE regions (id INT, name VARCHAR(255));","SELECT regions.name AS region, AVG(usage_time) FROM usage JOIN mobile_plans ON usage.plan_id = mobile_plans.id JOIN regions ON subscribers.region = regions.id GROUP BY regions.name;","SELECT r.name, AVG(u.usage_time) as avg_usage_time FROM usage u JOIN mobile_plans m ON u.plan_id = m.id JOIN regions r ON m.region = r.name GROUP BY r.name;",0 What is the English name given to the city of St. John's?,"CREATE TABLE table_1008653_1 (capital___exonym__ VARCHAR, capital___endonym__ VARCHAR);","SELECT capital___exonym__ FROM table_1008653_1 WHERE capital___endonym__ = ""St. John's"";","SELECT capital___exonym__ FROM table_1008653_1 WHERE capital___endonym__ = ""St. John's"";",1 Who is the oldest astronaut that has been on a mission to a spacecraft owned by the USA?,"CREATE TABLE astronauts (id INT, name VARCHAR(50), age INT, spacecraft_id INT, missions INT); ","SELECT name, age FROM astronauts WHERE spacecraft_id IN (SELECT id FROM spacecraft WHERE country = 'USA') ORDER BY age DESC LIMIT 1;",SELECT name FROM astronauts WHERE spacecraft_id = (SELECT id FROM spacecraft WHERE country = 'USA') ORDER BY age DESC LIMIT 1;,0 "Which Time has Laps smaller than 28, and a Rider of nicky hayden?","CREATE TABLE table_name_40 (time VARCHAR, laps VARCHAR, rider VARCHAR);","SELECT time FROM table_name_40 WHERE laps < 28 AND rider = ""nicky hayden"";","SELECT time FROM table_name_40 WHERE laps 28 AND rider = ""nicky hayden"";",0 what's the operational period with camp  sajmište,"CREATE TABLE table_10335_1 (operational VARCHAR, camp VARCHAR);","SELECT operational FROM table_10335_1 WHERE camp = ""Sajmište"";","SELECT operational FROM table_10335_1 WHERE camp = ""Sajmite"";",0 What is the cost of 'chicken' at 'Home Cooking'?,"CREATE TABLE menus (restaurant VARCHAR(255), item VARCHAR(255), cost FLOAT); ",SELECT cost FROM menus WHERE restaurant = 'Home Cooking' AND item = 'chicken';,SELECT cost FROM menus WHERE restaurant = 'Home Cooking' AND item = 'chicken';,1 How many satellites were launched in 2022?,"CREATE TABLE SatelliteLaunches (id INT PRIMARY KEY, country VARCHAR(255), launch_date DATE); CREATE TABLE Satellites (id INT PRIMARY KEY, name VARCHAR(255), launch_id INT, FOREIGN KEY (launch_id) REFERENCES SatelliteLaunches(id));",SELECT COUNT(s.id) as num_satellites FROM SatelliteLaunches l LEFT JOIN Satellites s ON l.id = s.launch_id WHERE YEAR(launch_date) = 2022;,SELECT COUNT(*) FROM SatelliteLaunches WHERE YEAR(launch_date) = 2022;,0 I want the average bronze for total of 19 and silver of 8 with rank of 31,"CREATE TABLE table_name_12 (bronze INTEGER, rank VARCHAR, total VARCHAR, silver VARCHAR);","SELECT AVG(bronze) FROM table_name_12 WHERE total = 19 AND silver = 8 AND rank = ""31"";",SELECT AVG(bronze) FROM table_name_12 WHERE total = 19 AND silver = 8 AND rank = 31;,0 What is the total donation amount for donor 'Jane Doe'?,"CREATE TABLE donors (donor_id INT, donor_name VARCHAR(30), donation_amount DECIMAL(5,2)); ",SELECT SUM(donation_amount) FROM donors WHERE donor_name = 'Jane Doe';,SELECT SUM(donation_amount) FROM donors WHERE donor_name = 'Jane Doe';,1 "Insert a new record of a worker in the automotive industry with a salary of $70,000, employed on 2023-01-01.","CREATE TABLE worker (id INT PRIMARY KEY, industry VARCHAR(50), salary INT, salary_date DATE);","INSERT INTO worker (industry, salary, salary_date) VALUES ('Automotive', 70000, '2023-01-01');","INSERT INTO worker (id, industry, salary, salary_date) VALUES (1, 'Automotive', 70000, '2023-01-01');",0 Find the number of players who are older than 30.,"CREATE TABLE player_demographics (player_id INT, age INT, favorite_genre VARCHAR(20)); ",SELECT COUNT(*) FROM player_demographics WHERE age > 30;,SELECT COUNT(*) FROM player_demographics WHERE age > 30;,1 What is the date of the poll with Goldberg at 26%?,"CREATE TABLE table_name_12 (date VARCHAR, goldberg VARCHAR);","SELECT date FROM table_name_12 WHERE goldberg = ""26%"";","SELECT date FROM table_name_12 WHERE goldberg = ""26%"";",1 How many people ha Romanian as their mother tongue in 2006?,"CREATE TABLE table_name_12 (population__2006_ INTEGER, mother_tongue VARCHAR);","SELECT MAX(population__2006_) FROM table_name_12 WHERE mother_tongue = ""romanian"";","SELECT MAX(population__2006_) FROM table_name_12 WHERE mother_tongue = ""rumanian"";",0 Which green building projects in France have the highest water conservation ratings?,"CREATE TABLE GreenBuildings (building_id INT, building_name VARCHAR(255), country VARCHAR(255), emissions_reduction FLOAT, water_conservation_rating FLOAT);","SELECT building_name, water_conservation_rating FROM GreenBuildings WHERE country = 'France' ORDER BY water_conservation_rating DESC;","SELECT building_name, water_conservation_rating FROM GreenBuildings WHERE country = 'France' ORDER BY water_conservation_rating DESC LIMIT 1;",0 What's the season that had a lost of 9 with 72 games?,"CREATE TABLE table_name_10 (season VARCHAR, games VARCHAR, lost VARCHAR);","SELECT season FROM table_name_10 WHERE games = ""72"" AND lost = ""9"";",SELECT season FROM table_name_10 WHERE games = 72 AND lost = 9;,0 What was the series standing for games over 4?,"CREATE TABLE table_name_2 (series VARCHAR, game INTEGER);",SELECT series FROM table_name_2 WHERE game > 4;,SELECT series FROM table_name_2 WHERE game > 4;,1 Where is the location of Game 4?,"CREATE TABLE table_name_26 (location_attendance VARCHAR, game VARCHAR);","SELECT location_attendance FROM table_name_26 WHERE game = ""4"";",SELECT location_attendance FROM table_name_26 WHERE game = 4;,0 Who had the high rebounds for the game on april 23?,"CREATE TABLE table_11961582_10 (high_rebounds VARCHAR, date VARCHAR);","SELECT high_rebounds FROM table_11961582_10 WHERE date = ""April 23"";","SELECT high_rebounds FROM table_11961582_10 WHERE date = ""April 23"";",1 Delete records from 'RuralHealthFacilities' table where total beds are below 30.,"CREATE TABLE RuralHealthFacilities (FacilityID INT, Name VARCHAR(50), Address VARCHAR(100), TotalBeds INT); ",DELETE FROM RuralHealthFacilities WHERE TotalBeds < 30;,DELETE FROM RuralHealthFacilities WHERE TotalBeds 30;,0 At time 15:29.69 what was the heat?,"CREATE TABLE table_name_1 (heat VARCHAR, time VARCHAR);","SELECT heat FROM table_name_1 WHERE time = ""15:29.69"";","SELECT heat FROM table_name_1 WHERE time = ""15:29.69"";",1 Which crystal structures has a Tc(K) of 110 and the number of Cu-O planes in the unit cell is 3?,"CREATE TABLE table_name_67 (crystal_structure VARCHAR, no_of_cu_o_planes_in_unit_cell VARCHAR, t_c__k_ VARCHAR);",SELECT crystal_structure FROM table_name_67 WHERE no_of_cu_o_planes_in_unit_cell = 3 AND t_c__k_ = 110;,"SELECT crystal_structure FROM table_name_67 WHERE t_c__k_ = 110 AND no_of_cu_o_planes_in_unit_cell = ""3"";",0 "What is the lowest silver that has 2 as the bronze, with a total greater than 4?","CREATE TABLE table_name_33 (silver INTEGER, bronze VARCHAR, total VARCHAR);",SELECT MIN(silver) FROM table_name_33 WHERE bronze = 2 AND total > 4;,SELECT MIN(silver) FROM table_name_33 WHERE bronze = 2 AND total > 4;,1 What is the sum of draws for teams with against of 1731 and under 10 losses?,"CREATE TABLE table_name_67 (draws INTEGER, against VARCHAR, losses VARCHAR);",SELECT SUM(draws) FROM table_name_67 WHERE against = 1731 AND losses < 10;,SELECT SUM(draws) FROM table_name_67 WHERE against = 1731 AND losses 10;,0 "What was the average lead maragin for the dates administered of october 6, 2008?","CREATE TABLE table_name_16 (lead_maragin INTEGER, dates_administered VARCHAR);","SELECT AVG(lead_maragin) FROM table_name_16 WHERE dates_administered = ""october 6, 2008"";","SELECT AVG(lead_maragin) FROM table_name_16 WHERE dates_administered = ""october 6, 2008"";",1 Who made the most recent donation?,"CREATE TABLE Donors (DonorID INT, Name TEXT, DonationDate DATE);","SELECT Name, MAX(DonationDate) FROM Donors GROUP BY Name ORDER BY MAX(DonationDate) DESC LIMIT 1;","SELECT Name, MAX(DonationDate) FROM Donors GROUP BY Name;",0 "Calculate the average daily water consumption in the state of Rajasthan, India for the month of May","CREATE TABLE states (id INT, name VARCHAR(255)); CREATE TABLE water_meter_readings (id INT, state_id INT, consumption FLOAT, reading_date DATE); ",SELECT AVG(water_meter_readings.consumption) as avg_daily_consumption FROM water_meter_readings WHERE water_meter_readings.reading_date >= '2022-05-01' AND water_meter_readings.reading_date <= '2022-05-31' AND water_meter_readings.state_id IN (SELECT id FROM states WHERE name = 'Rajasthan');,SELECT AVG(consumption) FROM water_meter_readings wmr JOIN states s ON wmr.state_id = s.id WHERE s.name = 'Rajasthan' AND wmr.reading_date BETWEEN '2022-05-01' AND '2022-05-31';,0 Who are the policyholders in 'California' with a policy_id greater than 5?,"CREATE TABLE policies (policy_id INT, policyholder_name VARCHAR(50), policyholder_state VARCHAR(20)); ",SELECT policyholder_name FROM policies WHERE policyholder_state = 'California' AND policy_id > 5;,SELECT policyholder_name FROM policies WHERE policyholder_state = 'California' AND policy_id > 5;,1 What are the names of investors who have invested in companies with an M&A exit strategy?,"CREATE TABLE Companies (id INT, name TEXT, exit_strategy TEXT); CREATE TABLE Investors (id INT, name TEXT); ",SELECT Investors.name FROM Companies INNER JOIN Investors ON TRUE WHERE Companies.exit_strategy = 'M&A';,SELECT Investors.name FROM Investors INNER JOIN Companies ON Investors.id = Companies.id WHERE Companies.exit_strategy = 'M&A';,0 "Find the number of social good technology patents granted in India and China, in the year 2020.","CREATE TABLE tech_patents_india(patent_id INT, country VARCHAR(10), grant_year INT); CREATE TABLE tech_patents_china(patent_id INT, country VARCHAR(10), grant_year INT); ",SELECT SUM(grant_year = 2020) FROM tech_patents_india WHERE country = 'India' UNION ALL SELECT SUM(grant_year = 2020) FROM tech_patents_china WHERE country = 'China';,"SELECT COUNT(*) FROM tech_patents_india WHERE country IN ('India', 'China') AND grant_year = 2020;",0 What is the smallest population listed?,CREATE TABLE table_2562572_11 (population__2011_ INTEGER);,SELECT MIN(population__2011_) FROM table_2562572_11;,SELECT MIN(population__2011_) FROM table_2562572_11;,1 "Update the population of the ""Species"" record with a name of Coral to 2000","CREATE TABLE Species (Name VARCHAR(50) PRIMARY KEY, Population INT); ",UPDATE Species SET Population = 2000 WHERE Name = 'Coral';,UPDATE Species SET Population = 2000 WHERE Name = 'Coral';,1 "Which species of bacteria has 5,566 genes?","CREATE TABLE table_name_35 (strain VARCHAR, genes VARCHAR);","SELECT strain FROM table_name_35 WHERE genes = ""5,566"";","SELECT strain FROM table_name_35 WHERE genes = ""5,566"";",1 What is the number of startups founded by people from each continent?,"CREATE TABLE company (name VARCHAR(255), country VARCHAR(100)); ","SELECT CONTINENT(country) as continent, COUNT(*) as num_startups FROM company GROUP BY continent;","SELECT country, COUNT(*) FROM company GROUP BY country;",0 What is the average price of military equipment sold to European countries in the last quarter?,"CREATE TABLE military_equipment (id INT, equipment_name VARCHAR(50), equipment_type VARCHAR(30), price DECIMAL(10,2), sale_date DATE);","SELECT AVG(price) as avg_price FROM military_equipment WHERE sale_date >= DATEADD(quarter, -1, GETDATE()) AND country IN ('France', 'Germany', 'Italy', 'Spain', 'United Kingdom');","SELECT AVG(price) FROM military_equipment WHERE sale_date >= DATEADD(quarter, -1, GETDATE());",0 "Which Points have a Score of 4–1, and a Game smaller than 39?","CREATE TABLE table_name_91 (points INTEGER, score VARCHAR, game VARCHAR);","SELECT SUM(points) FROM table_name_91 WHERE score = ""4–1"" AND game < 39;","SELECT SUM(points) FROM table_name_91 WHERE score = ""4–1"" AND game 39;",0 What is the name when winter is the transfer window?,"CREATE TABLE table_name_47 (name VARCHAR, transfer_window VARCHAR);","SELECT name FROM table_name_47 WHERE transfer_window = ""winter"";","SELECT name FROM table_name_47 WHERE transfer_window = ""winter"";",1 "How many IoT sensors are installed in the US and Canada, by type?","CREATE TABLE sensors (sensor_id INT, sensor_type VARCHAR(255), country VARCHAR(255)); ","SELECT sensors.country, sensors.sensor_type, COUNT(sensors.sensor_id) FROM sensors GROUP BY sensors.country, sensors.sensor_type;","SELECT sensor_type, COUNT(*) FROM sensors WHERE country IN ('USA', 'Canada') GROUP BY sensor_type;",0 How many draws have rumba/tango dance styles?,"CREATE TABLE table_name_79 (draw VARCHAR, dance_styles VARCHAR);","SELECT COUNT(draw) FROM table_name_79 WHERE dance_styles = ""rumba/tango"";","SELECT COUNT(draw) FROM table_name_79 WHERE dance_styles = ""rumba/tango"";",1 List all the vehicles that have never had maintenance performed on them,"CREATE TABLE vehicle (vehicle_id INT, model TEXT, license_plate TEXT); CREATE TABLE maintenance (maintenance_id INT, vehicle_id INT, maintenance_date DATE); ","SELECT v.vehicle_id, v.model, v.license_plate FROM vehicle v LEFT JOIN maintenance m ON v.vehicle_id = m.vehicle_id WHERE m.vehicle_id IS NULL;",SELECT v.model FROM vehicle v JOIN maintenance m ON v.vehicle_id = m.vehicle_id WHERE m.maintenance_date IS NULL;,0 Delete esports events without a game,"esports_event (event_id, name, location, start_date, end_date, prize_pool, game_id)",DELETE FROM esports_event WHERE game_id IS NULL,DELETE FROM esports_events WHERE game_id IS NULL;,0 What is the total number of traffic accidents in each district of Seattle in 2020?,"CREATE TABLE traffic_accidents (id INT, district VARCHAR(255), accident_type VARCHAR(255), reported_date DATE); ","SELECT district, SUM(number_of_accidents) FROM (SELECT district, COUNT(*) as number_of_accidents FROM traffic_accidents WHERE district IN ('Downtown', 'Capitol Hill', 'Ballard', 'West Seattle', 'Queen Anne') AND reported_date >= '2020-01-01' AND reported_date < '2021-01-01' GROUP BY district) as accidents_by_district GROUP BY district;","SELECT district, COUNT(*) FROM traffic_accidents WHERE reported_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY district;",0 "What place has a score greater than 68, and camilo villegas as the player?","CREATE TABLE table_name_51 (place VARCHAR, score VARCHAR, player VARCHAR);","SELECT place FROM table_name_51 WHERE score > 68 AND player = ""camilo villegas"";","SELECT place FROM table_name_51 WHERE score > 68 AND player = ""camilo villegas"";",1 Delete the medical record of astronaut Mae Jemison.,"CREATE TABLE MedicalData (id INT, astronaut_id INT, medical_condition VARCHAR(255), medical_examination_date DATE, age INT); ",DELETE FROM MedicalData WHERE astronaut_id = 4;,DELETE FROM MedicalData WHERE astronaut_id = (SELECT id FROM Astronauts WHERE name = 'Mae Jemison');,0 What Elector has the Place of Birth listed as Bavaria?,"CREATE TABLE table_name_4 (elector VARCHAR, place_of_birth VARCHAR);","SELECT elector FROM table_name_4 WHERE place_of_birth = ""bavaria"";","SELECT elector FROM table_name_4 WHERE place_of_birth = ""bavaria"";",1 List the names of all farms that have been imaged by at least two satellites.,"CREATE TABLE SatelliteImages(satellite VARCHAR(255), farm VARCHAR(255)); ",SELECT farm FROM SatelliteImages GROUP BY farm HAVING COUNT(DISTINCT satellite) >= 2;,SELECT farm FROM SatelliteImages GROUP BY farm HAVING COUNT(*) >= 2;,0 What is the total number of disaster response drills conducted in the state of California in the year 2020?,"CREATE TABLE public.disaster_drills (id SERIAL PRIMARY KEY, state VARCHAR(255), year INTEGER, num_drills INTEGER); ",SELECT SUM(num_drills) FROM public.disaster_drills WHERE state = 'California' AND year = 2020;,SELECT SUM(num_drills) FROM public.disaster_drills WHERE state = 'California' AND year = 2020;,1 "How many marine species are found in the Atlantic basin, grouped by species name?","CREATE TABLE marine_species_atlantic (name VARCHAR(255), basin VARCHAR(255)); ","SELECT name, COUNT(*) as num_species FROM marine_species_atlantic WHERE basin = 'Atlantic' GROUP BY name;","SELECT name, COUNT(*) FROM marine_species_atlantic WHERE basin = 'Atlantic' GROUP BY name;",0 what is the lowest year with the result is nominated for the work title is love bites?,"CREATE TABLE table_name_99 (year INTEGER, result VARCHAR, nominated_work_title VARCHAR);","SELECT MIN(year) FROM table_name_99 WHERE result = ""nominated"" AND nominated_work_title = ""love bites"";","SELECT MIN(year) FROM table_name_99 WHERE result = ""nominated"" AND nominated_work_title = ""love bites"";",1 What is the total cost of mental health treatments for patients with depression?,"CREATE TABLE MentalHealthParity (id INT, patientID INT, condition VARCHAR(50), treatment VARCHAR(50), cost DECIMAL(5,2)); ","SELECT patientID, SUM(cost) as 'TotalCost' FROM MentalHealthParity WHERE condition = 'Depression';",SELECT SUM(cost) FROM MentalHealthParity WHERE condition = 'Depression';,0 Delete all records of founders who have not raised any funds.,"CREATE TABLE founders (id INT, name TEXT, race TEXT, funds_raised FLOAT); ",DELETE FROM founders WHERE funds_raised IS NULL;,DELETE FROM founders WHERE funds_raised IS NULL;,1 What is the average quantity of eco-friendly fabric used per garment?,"CREATE TABLE fabric_usage (id INT, garment_id INT, fabric VARCHAR(20), quantity INT, usage_date DATE); ","SELECT AVG(quantity) FROM fabric_usage WHERE fabric IN ('organic cotton', 'recycled polyester', 'hemp');",SELECT AVG(quantity) FROM fabric_usage WHERE fabric LIKE '%eco%';,0 How many species have been discovered since 2015?,"CREATE TABLE species_discoveries (species_id INT, discovery_year INT);",SELECT COUNT(*) FROM species_discoveries WHERE discovery_year >= 2015;,SELECT COUNT(*) FROM species_discoveries WHERE discovery_year >= 2015;,1 What construction has a CERCLIS ID of ard092916188?,"CREATE TABLE table_name_1 (construction_completed VARCHAR, cerclis_id VARCHAR);","SELECT construction_completed FROM table_name_1 WHERE cerclis_id = ""ard092916188"";","SELECT construction_completed FROM table_name_1 WHERE cerclis_id = ""ard092916188"";",1 What is the original air date of the episode directed by Jeff Melman?,"CREATE TABLE table_13477468_3 (original_air_date VARCHAR, directed_by VARCHAR);","SELECT original_air_date FROM table_13477468_3 WHERE directed_by = ""Jeff Melman"";","SELECT original_air_date FROM table_13477468_3 WHERE directed_by = ""Jeff Melman"";",1 What is the total climate finance provided by North American countries to other regions in 2022?,"CREATE TABLE climate_finance (donor VARCHAR(50), recipient VARCHAR(50), year INT, amount INT); ",SELECT SUM(amount) FROM climate_finance WHERE year = 2022 AND donor = 'North America';,SELECT SUM(amount) FROM climate_finance WHERE donor LIKE '%North America%' AND recipient LIKE '%North America%' AND year = 2022;,0 What is highest place reached by artist Ray Adams?,"CREATE TABLE table_13805773_2 (position INTEGER, artist VARCHAR);","SELECT MAX(position) FROM table_13805773_2 WHERE artist = ""Ray Adams"";","SELECT MAX(position) FROM table_13805773_2 WHERE artist = ""Ray Adams"";",1 What is the number of unique users who have streamed songs from artists who have released a new album in the last year?,"CREATE TABLE user_streams (user_id INT, artist_id INT, stream_date DATE); CREATE TABLE artist_albums (artist_id INT, release_date DATE);","SELECT COUNT(DISTINCT u.user_id) FROM user_streams u JOIN artist_albums a ON u.artist_id = a.artist_id WHERE a.release_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT COUNT(DISTINCT user_id) FROM user_streams JOIN artist_albums ON user_streams.artist_id = artist_albums.artist_id WHERE artist_albums.release_date >= DATEADD(year, -1, GETDATE());",0 Name the year for american conference semifinals,"CREATE TABLE table_name_96 (year VARCHAR, playoffs VARCHAR);","SELECT year FROM table_name_96 WHERE playoffs = ""american conference semifinals"";","SELECT year FROM table_name_96 WHERE playoffs = ""american conference semifinals"";",1 "What is the sum of the pick of darryl pounds, who has an overall greater than 68?","CREATE TABLE table_name_94 (pick INTEGER, name VARCHAR, overall VARCHAR);","SELECT SUM(pick) FROM table_name_94 WHERE name = ""darryl pounds"" AND overall > 68;","SELECT SUM(pick) FROM table_name_94 WHERE name = ""darryl pounds"" AND overall > 68;",1 Name the most # of seats won,CREATE TABLE table_19769687_3 (_number_of_seats_won INTEGER);,SELECT MAX(_number_of_seats_won) FROM table_19769687_3;,SELECT MAX(_number_of_seats_won) FROM table_19769687_3;,1 "What is the enrollment at the institution in New London, Connecticut? ","CREATE TABLE table_261931_2 (enrollment VARCHAR, location VARCHAR);","SELECT enrollment FROM table_261931_2 WHERE location = ""New London, Connecticut"";","SELECT enrollment FROM table_261931_2 WHERE location = ""New London, Connecticut"";",1 Which date had a loser of New York Giants and a result of 23-17?,"CREATE TABLE table_name_77 (date VARCHAR, loser VARCHAR, result VARCHAR);","SELECT date FROM table_name_77 WHERE loser = ""new york giants"" AND result = ""23-17"";","SELECT date FROM table_name_77 WHERE loser = ""new york giants"" AND result = ""23-17"";",1 Which site has the 'Clay Pot' artifact?,"CREATE TABLE SiteG (site_id INT, artifact_name VARCHAR(50), description TEXT); ",SELECT site_id FROM SiteG WHERE artifact_name = 'Clay Pot';,SELECT site_id FROM SiteG WHERE artifact_name = 'Clay Pot';,1 What is the total revenue generated from digital music sales in the United States?,"CREATE TABLE digital_sales (sale_id INT, platform VARCHAR(20), genre VARCHAR(20), units_sold INT, sale_price DECIMAL(5,2)); CREATE TABLE countries (country_code CHAR(2), country_name VARCHAR(50)); ",SELECT SUM(d.sale_price * d.units_sold) as total_revenue FROM digital_sales d INNER JOIN countries c ON d.platform = c.country_name WHERE c.country_code = 'US';,SELECT SUM(sale_price) FROM digital_sales ds JOIN countries c ON ds.country_code = c.country_code WHERE c.country_name = 'United States';,0 What is the latest year born when the current club is Barons LMT?,"CREATE TABLE table_23670057_7 (year_born INTEGER, current_club VARCHAR);","SELECT MAX(year_born) FROM table_23670057_7 WHERE current_club = ""Barons LMT"";","SELECT MAX(year_born) FROM table_23670057_7 WHERE current_club = ""Barons LMT"";",1 Find the first names of faculties of rank Professor in alphabetic order.,"CREATE TABLE FACULTY (Fname VARCHAR, Rank VARCHAR);","SELECT Fname FROM FACULTY WHERE Rank = ""Professor"" ORDER BY Fname;","SELECT Fname FROM FACULTY WHERE Rank = ""Professor"" ORDER BY Fname;",1 What is the number of unique clients represented by attorneys with the last name 'Thomas'?,"CREATE TABLE attorneys (attorney_id INT, name TEXT, title TEXT); CREATE TABLE clients (client_id INT, attorney_id INT, name TEXT); ",SELECT COUNT(DISTINCT clients.client_id) FROM attorneys INNER JOIN clients ON attorneys.attorney_id = clients.attorney_id WHERE attorneys.name = 'Thomas';,SELECT COUNT(DISTINCT clients.client_id) FROM clients INNER JOIN attorneys ON clients.attorney_id = attorneys.attorney_id WHERE attorneys.name = 'Thomas';,0 How many satellites were deployed by each organization in the last 3 years?,"CREATE TABLE Satellite_Deployments (satellite_deployment_id INT, satellite_model VARCHAR(50), deploying_org VARCHAR(50), deployment_date DATE); ","SELECT deploying_org, COUNT(*) as total_deployments FROM Satellite_Deployments WHERE deployment_date >= DATEADD(year, -3, GETDATE()) GROUP BY deploying_org;","SELECT deploying_org, COUNT(*) FROM Satellite_Deployments WHERE deployment_date >= DATEADD(year, -3, GETDATE()) GROUP BY deploying_org;",0 Who is the most frequent visitor to the Asian Art Museum in San Francisco in 2022?,"CREATE TABLE AsianArtVisitors (VisitorID int, VisitorName varchar(100), VisitDate date, MuseumName varchar(100)); ","SELECT VisitorName, COUNT(*) as Visits FROM AsianArtVisitors WHERE MuseumName = 'Asian Art Museum' AND YEAR(VisitDate) = 2022 GROUP BY VisitorName ORDER BY Visits DESC LIMIT 1;","SELECT VisitorName, COUNT(*) as VisitCount FROM AsianArtVisitors WHERE MuseumName = 'Asian Art Museum' AND YEAR(VisitDate) = 2022 GROUP BY VisitorName ORDER BY VisitCount DESC LIMIT 1;",0 What is the progression of professional development workshops attended by a randomly selected teacher?,"CREATE TABLE teacher_workshops (teacher_id INT, workshop_id INT, enrollment_date DATE); CREATE TABLE workshops (workshop_id INT, workshop_name VARCHAR(50)); ","SELECT teacher_id, workshop_id, LEAD(enrollment_date, 1) OVER (PARTITION BY teacher_id ORDER BY enrollment_date) as next_workshop_date FROM teacher_workshops JOIN workshops ON teacher_workshops.workshop_id = workshops.workshop_id WHERE teacher_id = 1;","SELECT teacher_workshops.teacher_id, teacher_workshops.workshop_id, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.teacher_id, teacher_workshops.teacher_id, teacher_workshops.teacher_id, workshop_name, teacher_workshops.workshop_id, teacher_workshops.teacher_id, teacher_workshops.teacher_id, teacher_workshops.teacher_id, teacher_workshops.teacher_id, teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshop_id, teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshop_id, teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshop_id, teacher_workshops.teacher_workshop_id, teacher_workshops.teacher_workshop_id, teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshop_id, teacher_workshops.teacher_workshop_id, teacher_workshops.teacher_workshops.teacher_workshop_id, teacher_workshop_id, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.enrollment_date, teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshops.teacher_workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_id, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop_name, workshop",0 What are the names of hotels in Mexico that have not yet provided virtual tour access?,"CREATE TABLE Hotels (HotelID int, HotelName varchar(50), VirtualTourURL varchar(100)); ",SELECT HotelName FROM Hotels WHERE VirtualTourURL IS NULL AND Country = 'Mexico',SELECT HotelName FROM Hotels WHERE VirtualTourURL IS NULL;,0 "What are the unique combinations of security incident types and their corresponding statuses in the incident_responses table, excluding any records with 'In Progress' status?","CREATE TABLE incident_responses (incident VARCHAR(50), status VARCHAR(15)); ","SELECT incident, status FROM incident_responses WHERE status != 'In Progress' GROUP BY incident, status;","SELECT DISTINCT incident, status FROM incident_responses WHERE status!= 'In Progress';",0 How many years has the Mercury Prize award been given?,"CREATE TABLE table_name_47 (year VARCHAR, award VARCHAR);","SELECT COUNT(year) FROM table_name_47 WHERE award = ""mercury prize"";","SELECT COUNT(year) FROM table_name_47 WHERE award = ""mercury prize"";",1 Which brands have the highest sales of natural hair care products?,"CREATE TABLE sales (sale_id INT, product_id INT, brand VARCHAR(100), sales_volume INT); CREATE TABLE products (product_id INT, product_name VARCHAR(100), is_natural BOOLEAN, product_type VARCHAR(50));","SELECT brand, SUM(sales_volume) as total_sales FROM sales JOIN products ON sales.product_id = products.product_id WHERE is_natural = TRUE AND product_type = 'hair care' GROUP BY brand ORDER BY total_sales DESC LIMIT 5;","SELECT brand, MAX(sales_volume) FROM sales JOIN products ON sales.product_id = products.product_id WHERE products.is_natural = true GROUP BY brand;",0 "What was the highest election with third party member Sir Robert Price, BT, and first party member conservative?","CREATE TABLE table_name_97 (election INTEGER, third_member VARCHAR, first_party VARCHAR);","SELECT MAX(election) FROM table_name_97 WHERE third_member = ""sir robert price, bt"" AND first_party = ""conservative"";","SELECT MAX(election) FROM table_name_97 WHERE third_member = ""sir robert price, bt"" AND first_party = ""conservative"";",1 What is the distribution of fan demographics by favorite esports team?,"CREATE TABLE fan_demographics_esports (id INT, fan VARCHAR(255), age INT, gender VARCHAR(10), team VARCHAR(255)); ","SELECT team, gender, COUNT(*) as fans_count FROM fan_demographics_esports GROUP BY team, gender;","SELECT team, COUNT(*) as num_fans FROM fan_demographics_esports GROUP BY team;",0 What was the date of the Mariners game that had a score of 1-12?,"CREATE TABLE table_name_96 (date VARCHAR, score VARCHAR);","SELECT date FROM table_name_96 WHERE score = ""1-12"";","SELECT date FROM table_name_96 WHERE score = ""1-12"";",1 "Week larger than 5, and an opponent of at new york giants had what record?","CREATE TABLE table_name_69 (record VARCHAR, week VARCHAR, opponent VARCHAR);","SELECT record FROM table_name_69 WHERE week > 5 AND opponent = ""at new york giants"";","SELECT record FROM table_name_69 WHERE week > 5 AND opponent = ""at new york giants"";",1 "What is Highest Days, when Launch Date is 23 January 2010?","CREATE TABLE table_name_16 (days INTEGER, launch_date VARCHAR);","SELECT MAX(days) FROM table_name_16 WHERE launch_date = ""23 january 2010"";","SELECT MAX(days) FROM table_name_16 WHERE launch_date = ""23 january 2010"";",1 What is the total cost of construction permits issued in Los Angeles in Q1 of 2019?,"CREATE TABLE Permit_Data (PermitID INT, City VARCHAR(50), Quarter INT, Year INT, Cost FLOAT);",SELECT SUM(Cost) FROM Permit_Data WHERE City = 'Los Angeles' AND Quarter = 1 AND Year = 2019;,SELECT SUM(Cost) FROM Permit_Data WHERE City = 'Los Angeles' AND Quarter = 1 AND Year = 2019;,1 Show the top 2 states with the most green building certifications.,"CREATE TABLE state_certifications (state VARCHAR(20), certifications INT); ","SELECT state, certifications FROM (SELECT state, certifications, RANK() OVER (ORDER BY certifications DESC) as rank FROM state_certifications) AS subquery WHERE rank <= 2;","SELECT state, certifications FROM state_certifications ORDER BY certifications DESC LIMIT 2;",0 What is the total value of Defense contracts awarded to women-owned businesses in 2019?,"CREATE TABLE DefenseContracts (contract_id INT, contractor_name VARCHAR(255), gender VARCHAR(255), contract_date DATE, contract_value DECIMAL(10,2)); ",SELECT SUM(contract_value) FROM DefenseContracts WHERE gender = 'Female' AND contract_date BETWEEN '2019-01-01' AND '2019-12-31';,SELECT SUM(contract_value) FROM DefenseContracts WHERE gender = 'Female' AND YEAR(contract_date) = 2019;,0 Who was the home team at the game held at Princes Park?,"CREATE TABLE table_name_76 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_76 WHERE venue = ""princes park"";","SELECT home_team FROM table_name_76 WHERE venue = ""princes park"";",1 Who was the champion in the match where C.A. Palmer was the runner-up?,"CREATE TABLE table_name_80 (champion VARCHAR, runner_up VARCHAR);","SELECT champion FROM table_name_80 WHERE runner_up = ""c.a. palmer"";","SELECT champion FROM table_name_80 WHERE runner_up = ""c.a. palmer"";",1 What is the total number of accessible technology initiatives in all continents?,"CREATE TABLE accessible_tech_2 (initiative_id INT, continent VARCHAR(20), initiatives INT); ",SELECT SUM(initiatives) FROM accessible_tech_2;,"SELECT continent, SUM(initiatives) FROM accessible_tech_2 GROUP BY continent;",0 "WHAT IS THE AVERAGE SQUAD NUMBER WITH MARTIN SMITH, AND LEAGUE GOALS LESS THAN 17?","CREATE TABLE table_name_8 (squad_no INTEGER, name VARCHAR, league_goals VARCHAR);","SELECT AVG(squad_no) FROM table_name_8 WHERE name = ""martin smith"" AND league_goals < 17;","SELECT AVG(squad_no) FROM table_name_8 WHERE name = ""martin smith"" AND league_goals 17;",0 What was the Winner of the SS5 Stage?,"CREATE TABLE table_name_54 (winner VARCHAR, stage VARCHAR);","SELECT winner FROM table_name_54 WHERE stage = ""ss5"";","SELECT winner FROM table_name_54 WHERE stage = ""ss5"";",1 How many military equipment maintenance requests were there in January 2020?,"CREATE TABLE maintenance_requests (request_id INT, date DATE, type VARCHAR(255)); ",SELECT COUNT(*) FROM maintenance_requests WHERE date BETWEEN '2020-01-01' AND '2020-01-31' AND type = 'equipment';,SELECT COUNT(*) FROM maintenance_requests WHERE date BETWEEN '2020-01-01' AND '2020-12-31' AND type ='military equipment';,0 Insert a new record for a 'reforestation' project with a budget of 120000 in the 'agricultural_innovation' table.,"CREATE TABLE agricultural_innovation (id INT, project_name VARCHAR(255), budget INT);","INSERT INTO agricultural_innovation (project_name, budget) VALUES ('reforestation', 120000);","INSERT INTO agricultural_innovation (project_name, budget) VALUES ('Reforestation', 120000);",0 "How many visual artists are represented in the database, and what is the distribution by their age group?","CREATE TABLE artists (id INT, name VARCHAR(255), birth_date DATE, age INT);","SELECT FLOOR((YEAR(CURRENT_DATE) - YEAR(birth_date)) / 10) * 10 as age_group, COUNT(*) as artist_count FROM artists GROUP BY age_group;","SELECT COUNT(*), age_group, COUNT(*) FROM artists GROUP BY age_group;",0 Show average safety scores for autonomous vehicles,"CREATE TABLE AutonomousDriving (Vehicle VARCHAR(50), Manufacturer VARCHAR(50), Year INT, AutonomousLevel FLOAT); CREATE TABLE SafetyTesting (Vehicle VARCHAR(50), Manufacturer VARCHAR(50), Year INT, Score INT);","SELECT Manufacturer, AVG(Score) FROM SafetyTesting ST JOIN AutonomousDriving AD ON ST.Manufacturer = AD.Manufacturer GROUP BY Manufacturer;",SELECT AVG(SafetyTesting.Score) FROM SafetyTesting INNER JOIN AutonomousDriving ON SafetyTesting.Vehicle = AutonomousDriving.Vehicle;,0 What's the hometown of thomas tyner?,"CREATE TABLE table_name_80 (hometown VARCHAR, player VARCHAR);","SELECT hometown FROM table_name_80 WHERE player = ""thomas tyner"";","SELECT hometown FROM table_name_80 WHERE player = ""thomas tyner"";",1 What is the total number of clinical trials conducted by BigPharma Inc. in the United States?,"CREATE TABLE clinical_trials (id INT, company VARCHAR(255), country VARCHAR(255), phase VARCHAR(255)); ",SELECT COUNT(*) FROM clinical_trials WHERE company = 'BigPharma Inc.' AND country = 'United States';,SELECT COUNT(*) FROM clinical_trials WHERE company = 'BigPharma Inc.' AND country = 'United States';,1 List all workers who have been trained in Industry 4.0 technologies and their corresponding training dates and locations.,"CREATE TABLE workers (worker_id INT, name TEXT, trained_in TEXT); CREATE TABLE trainings (training_id INT, worker_id INT, training_date DATE, location TEXT); ","SELECT w.name, t.training_date, t.location FROM workers w INNER JOIN trainings t ON w.worker_id = t.worker_id WHERE w.trained_in = 'Industry 4.0';","SELECT workers.name, trainings.training_date, trainings.location FROM workers INNER JOIN trainings ON workers.worker_id = trainings.worker_id WHERE workers.trained_in = 'Industry 4.0';",0 "What is the maximum number of certified green hotels in Africa, and how many of them are located in each country?","CREATE TABLE GreenHotels (HotelID INT, HotelName VARCHAR(50), Country VARCHAR(50), CertificationLevel INT); ","SELECT Country, MAX(CertificationLevel) as MaxCertification, COUNT(*) as HotelCount FROM GreenHotels WHERE Country IN ('Morocco', 'Kenya') GROUP BY Country;","SELECT Country, MAX(CertificationLevel) as MaxCertification, COUNT(*) as TotalCertified FROM GreenHotels GROUP BY Country;",0 List email address and birthday of customer whose first name as Carole.,"CREATE TABLE Customers (email_address VARCHAR, date_of_birth VARCHAR, first_name VARCHAR);","SELECT email_address, date_of_birth FROM Customers WHERE first_name = ""Carole"";","SELECT email_address, date_of_birth FROM Customers WHERE first_name = ""Carole"";",1 What is the total revenue generated by eco-friendly hotels in the last month?,"CREATE TABLE hotels (hotel_id INT, hotel_name TEXT, type TEXT, daily_rate DECIMAL(5,2), revenue INT); ","SELECT SUM(revenue) FROM hotels WHERE type = 'eco' AND revenue BETWEEN DATE_SUB(curdate(), INTERVAL 1 MONTH) AND curdate();",SELECT SUM(revenue) FROM hotels WHERE type = 'Eco-friendly' AND daily_rate >= (SELECT daily_rate FROM hotels WHERE type = 'Eco-friendly' AND daily_rate >= (SELECT daily_rate FROM hotels WHERE type = 'Eco-friendly') AND daily_rate >= (SELECT daily_rate FROM hotels WHERE type = 'Eco-friendly') AND daily_rate >= (SELECT daily_rate FROM hotels WHERE type = 'Eco-friendly') AND day_rate >= (SELECT daily_rate FROM hotels WHERE type = 'Eco-friendly') AND day_rate >= (SELECT daily_rate FROM hotels WHERE type = 'Eco-friendly') AND day_rate >= (SELECT daily_rate FROM hotels WHERE type = 'Eco-friendly');,0 "What country has a to par less than 13, with wayne grady as the player?","CREATE TABLE table_name_6 (country VARCHAR, to_par VARCHAR, player VARCHAR);","SELECT country FROM table_name_6 WHERE to_par < 13 AND player = ""wayne grady"";","SELECT country FROM table_name_6 WHERE to_par 13 AND player = ""wayne grady"";",0 "List all astronauts who have worked on both active and decommissioned spacecraft, along with their professions.","CREATE TABLE Astronaut_Experience (id INT, astronaut_id INT, spacecraft_id INT, role VARCHAR(50), start_date DATE, end_date DATE); ","SELECT DISTINCT ae1.astronaut_id, a.name, a.profession FROM Astronaut_Experience ae1 JOIN Astronaut_Experience ae2 ON ae1.astronaut_id = ae2.astronaut_id JOIN Astronaut a ON ae1.astronaut_id = a.id WHERE ae1.spacecraft_id IN (SELECT id FROM Spacecraft WHERE status = 'Active') AND ae2.spacecraft_id IN (SELECT id FROM Spacecraft WHERE status = 'Decommissioned')","SELECT a.astronaut_id, a.spacecraft_id, a.role, a.start_date, a.end_date FROM Astronaut_Experience a JOIN Spacecraft s ON a.spacecraft_id = s.id WHERE s.spacecraft_id IN ('Active', 'Decommissioned') GROUP BY a.astronaut_id, a.astronaut_id;",0 What is the party affiliation for President Stefano Baccelli?,"CREATE TABLE table_name_33 (party VARCHAR, president VARCHAR);","SELECT party FROM table_name_33 WHERE president = ""stefano baccelli"";","SELECT party FROM table_name_33 WHERE president = ""stefano baccelli"";",1 What is the lowest number of against of NTFA Div 2 Fingal Valley?,"CREATE TABLE table_name_38 (against INTEGER, ntfa_div_2 VARCHAR);","SELECT MIN(against) FROM table_name_38 WHERE ntfa_div_2 = ""fingal valley"";","SELECT MIN(against) FROM table_name_38 WHERE ntfa_div_2 = ""fingal valley"";",1 What are the notes regarding the scout x-4 vehicle which ceased operation in June 1971?,"CREATE TABLE table_name_82 (notes VARCHAR, vehicle VARCHAR, ceased_operation VARCHAR);","SELECT notes FROM table_name_82 WHERE vehicle = ""scout x-4"" AND ceased_operation = ""june 1971"";","SELECT notes FROM table_name_82 WHERE vehicle = ""scout x-4"" AND ceased_operation = ""june 1971"";",1 Find defense contractors who received contracts in both the current year and the previous year,"CREATE TABLE defense_contracts (contract_id INT, vendor_name VARCHAR(255), contract_date DATE);","SELECT vendor_name FROM defense_contracts WHERE YEAR(contract_date) IN (YEAR(CURRENT_DATE), YEAR(DATEADD(year, -1, CURRENT_DATE))) GROUP BY vendor_name HAVING COUNT(DISTINCT YEAR(contract_date)) = 2;","SELECT vendor_name FROM defense_contracts WHERE contract_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE;",0 What is the minimum salary of employees who have not received any ethical AI training?,"CREATE TABLE trainings(id INT, employee_id INT, hours INT); CREATE TABLE employees(id INT, name TEXT, salary FLOAT, training_id INT); ",SELECT MIN(salary) FROM employees WHERE training_id IS NULL;,SELECT MIN(employees.salary) FROM employees INNER JOIN trainings ON employees.training_id = trainings.employee_id WHERE employees.training_id IS NULL;,0 "What opponent has 3-2 as the score, and anderson (2-6) as a loss?","CREATE TABLE table_name_6 (opponent VARCHAR, score VARCHAR, loss VARCHAR);","SELECT opponent FROM table_name_6 WHERE score = ""3-2"" AND loss = ""anderson (2-6)"";","SELECT opponent FROM table_name_6 WHERE score = ""3-2"" AND loss = ""anderson (2-6)"";",1 "Find the bank with the highest average loan amount for Shariah-compliant lending, along with their average loan amount?","CREATE TABLE SHARIAH_COMPLIANT_LOANS (BANK_NAME VARCHAR(50), AMOUNT NUMBER(12,2)); ","SELECT BANK_NAME, AVG(AMOUNT) AVERAGE_LOAN FROM SHARIAH_COMPLIANT_LOANS GROUP BY BANK_NAME HAVING COUNT(*) = (SELECT MAX(COUNT(*)) FROM SHARIAH_COMPLIANT_LOANS GROUP BY BANK_NAME);","SELECT BANK_NAME, AVG(AMOUNT) FROM SHARIAH_COMPLIANT_LOANS GROUP BY BANK_NAME ORDER BY AVG(AMOUNT) DESC LIMIT 1;",0 Add a new labor violation with a fine of $7000 for permit ID 789,"CREATE TABLE labor_stats (permit_id INT, fine INT);","INSERT INTO labor_stats (permit_id, fine) VALUES (789, 7000);","INSERT INTO labor_stats (permit_id, fine) VALUES (789, 7000);",1 What is the total budget for evidence-based policy making programs in Australia in 2021?,"CREATE TABLE EvidenceBasedPrograms (id INT, name VARCHAR(255), start_date DATE, end_date DATE, budget DECIMAL(10,2), location VARCHAR(255)); ",SELECT SUM(budget) FROM EvidenceBasedPrograms WHERE YEAR(start_date) = 2021 AND location = 'Australia' AND purpose = 'evidence-based policy making';,SELECT SUM(budget) FROM EvidenceBasedPrograms WHERE location = 'Australia' AND start_date BETWEEN '2021-01-01' AND '2021-12-31';,0 Which tournament had a qf in 2011?,CREATE TABLE table_name_26 (tournament VARCHAR);,"SELECT tournament FROM table_name_26 WHERE 2011 = ""qf"";","SELECT tournament FROM table_name_26 WHERE 2011 = ""qf"";",1 What year was the role of Rachel active in TV?,"CREATE TABLE table_name_83 (year_active VARCHAR, role VARCHAR);","SELECT year_active FROM table_name_83 WHERE role = ""rachel"";","SELECT year_active FROM table_name_83 WHERE role = ""rachel"";",1 What is the number of wildlife sightings in the Canadian Arctic Archipelago in 2022?,"CREATE TABLE wildlife_sightings (species TEXT, location TEXT, date DATE); ",SELECT COUNT(*) FROM wildlife_sightings WHERE location = 'Canadian Arctic Archipelago' AND date BETWEEN '2022-01-01' AND '2022-12-31';,SELECT COUNT(*) FROM wildlife_sightings WHERE location = 'Canadian Arctic Archipelago' AND date BETWEEN '2022-01-01' AND '2022-12-31';,1 "Which District has a First elected of 1856, and an Incumbent of william kellogg?","CREATE TABLE table_name_20 (district VARCHAR, first_elected VARCHAR, incumbent VARCHAR);","SELECT district FROM table_name_20 WHERE first_elected = 1856 AND incumbent = ""william kellogg"";","SELECT district FROM table_name_20 WHERE first_elected = 1856 AND incumbent = ""william kellogg"";",1 How many citizen feedback records were received for each public service in Q2 2022?,"CREATE TABLE FeedbackQ2 (Service TEXT, Quarter INT, Year INT, FeedbackCount INT); ","SELECT Service, SUM(FeedbackCount) FROM FeedbackQ2 WHERE Quarter = 2 AND Year = 2022 GROUP BY Service;","SELECT Service, SUM(FeedbackCount) FROM FeedbackQ2 WHERE Quarter = 2 AND Year = 2022 GROUP BY Service;",1 How many tree species are found in each region?,"CREATE TABLE regions (id INT, name VARCHAR(255)); CREATE TABLE tree_species (id INT, region_id INT); ","SELECT r.name, COUNT(ts.id) num_species FROM regions r JOIN tree_species ts ON r.id = ts.region_id GROUP BY r.name;","SELECT r.name, COUNT(ts.id) FROM regions r JOIN tree_species ts ON r.id = ts.region_id GROUP BY r.name;",0 How many agricultural innovation projects are in the 'innovation_projects' table?,"CREATE TABLE innovation_projects (id INT, project VARCHAR(50), status VARCHAR(50)); ",SELECT COUNT(*) FROM innovation_projects;,SELECT COUNT(*) FROM innovation_projects WHERE status = 'Agricultural';,0 Show the number of polar bear sightings for each year in the Arctic region.,"CREATE TABLE sightings ( id INT PRIMARY KEY, animal VARCHAR(255), sighting_date DATE, region VARCHAR(255) ); ","SELECT EXTRACT(YEAR FROM sighting_date) AS year, COUNT(*) AS polar_bear_sightings FROM sightings WHERE animal = 'polar bear' AND region = 'Arctic' GROUP BY year;","SELECT EXTRACT(YEAR FROM sighting_date) AS year, COUNT(*) FROM sightings WHERE animal = 'Polar Bear' AND region = 'Arctic' GROUP BY year;",0 What is the total population of animals in each habitat type?,"CREATE TABLE animals (id INT, species TEXT, population INT, habitat_type TEXT); ","SELECT habitat_type, SUM(population) as total_population FROM animals GROUP BY habitat_type;","SELECT habitat_type, SUM(population) FROM animals GROUP BY habitat_type;",0 "What is the total ad spend for all campaigns targeting users in the 'Europe' region, in the past month?","CREATE TABLE campaigns (id INT, name TEXT, target_region TEXT, start_date DATETIME, end_date DATETIME, ad_spend DECIMAL(10,2));","SELECT SUM(ad_spend) FROM campaigns WHERE target_region = 'Europe' AND start_date <= NOW() AND end_date >= DATE_SUB(NOW(), INTERVAL 1 MONTH);","SELECT SUM(ad_spend) FROM campaigns WHERE target_region = 'Europe' AND start_date >= DATEADD(month, -1, GETDATE());",0 When did a Position of 21st (q) happen?,"CREATE TABLE table_name_67 (year VARCHAR, position VARCHAR);","SELECT year FROM table_name_67 WHERE position = ""21st (q)"";","SELECT year FROM table_name_67 WHERE position = ""21st (q)"";",1 Insert data into the table 'waste_generation',"CREATE TABLE waste_generation ( id INT PRIMARY KEY, region VARCHAR(50), year INT, metric DECIMAL(5,2));","INSERT INTO waste_generation (id, region, year, metric) VALUES (1, 'Mumbai', 2018, 5678.90), (2, 'Mumbai', 2019, 6001.12), (3, 'Tokyo', 2018, 3456.78), (4, 'Tokyo', 2019, 3501.09);","INSERT INTO waste_generation (id, region, year, metric) VALUES (1, 'Saudi Arabia', '2022-01-01', '2022-12-31');",0 What's the population of durham parish?,"CREATE TABLE table_name_73 (population VARCHAR, official_name VARCHAR);","SELECT COUNT(population) FROM table_name_73 WHERE official_name = ""durham"";","SELECT population FROM table_name_73 WHERE official_name = ""durham parish"";",0 What are the common biases in AI safety datasets?,"CREATE TABLE Biases (dataset TEXT, bias TEXT); ","SELECT bias FROM Biases WHERE dataset IN ('Dataset-A', 'Dataset-B');",SELECT bias FROM Biases;,0 Whats the name of segment in s08e21,"CREATE TABLE table_15187735_16 (segment_a VARCHAR, netflix VARCHAR);","SELECT segment_a FROM table_15187735_16 WHERE netflix = ""S08E21"";","SELECT segment_a FROM table_15187735_16 WHERE netflix = ""S08E21"";",1 Remove the agency with id 2,"CREATE TABLE agencies (id INT PRIMARY KEY, name VARCHAR(255), type VARCHAR(255), budget DECIMAL(10, 2)); ",DELETE FROM agencies WHERE id = 2;,DELETE FROM agencies WHERE id = 2;,1 What was the Forbers rank (all companies) in 2012 for cenovus energy?,"CREATE TABLE table_23950611_2 (rank__all__2012 VARCHAR, name VARCHAR);","SELECT rank__all__2012 FROM table_23950611_2 WHERE name = ""Cenovus Energy"";","SELECT rank__all__2012 FROM table_23950611_2 WHERE name = ""Cenovus Energy"";",1 What is the order # for the original artist sarah mclachlan?,"CREATE TABLE table_26250145_1 (order__number VARCHAR, original_artist VARCHAR);","SELECT order__number FROM table_26250145_1 WHERE original_artist = ""Sarah McLachlan"";","SELECT order__number FROM table_26250145_1 WHERE original_artist = ""Sarah Mclachlan"";",0 What is the most assists for points 129-3.9?,"CREATE TABLE table_22875514_3 (assists INTEGER, points VARCHAR);","SELECT MAX(assists) FROM table_22875514_3 WHERE points = ""129-3.9"";","SELECT MAX(assists) FROM table_22875514_3 WHERE points = ""129-3.9"";",1 What date did home team liverpool play?,"CREATE TABLE table_name_70 (date VARCHAR, home_team VARCHAR);","SELECT date FROM table_name_70 WHERE home_team = ""liverpool"";","SELECT date FROM table_name_70 WHERE home_team = ""liverpool"";",1 who is the driver when grid is 11?,"CREATE TABLE table_name_81 (driver VARCHAR, grid VARCHAR);",SELECT driver FROM table_name_81 WHERE grid = 11;,SELECT driver FROM table_name_81 WHERE grid = 11;,1 Tell me the nationality of pick 140,"CREATE TABLE table_name_67 (nationality VARCHAR, pick VARCHAR);","SELECT nationality FROM table_name_67 WHERE pick = ""140"";",SELECT nationality FROM table_name_67 WHERE pick = 140;,0 "Update the records of all workers in the 'Food Processing' industry who are male and over 40 years old, changing their industry to 'Agriculture'.","CREATE TABLE Workers (ID INT, Age INT, Gender VARCHAR(10), Industry VARCHAR(20)); ",UPDATE Workers SET Industry = 'Agriculture' WHERE Industry = 'Food Processing' AND Gender = 'Male' AND Age > 40;,UPDATE Workers SET Industry = 'Agriculture' WHERE Gender = 'Male' AND Age > 40;,0 What is the energy efficiency score for countries in the Asia-Pacific region?,"CREATE TABLE energy_efficiency_ap (country TEXT, score FLOAT); ",SELECT score FROM energy_efficiency_ap,SELECT score FROM energy_efficiency_ap WHERE region = 'Asia-Pacific';,0 What is the moving average of product prices for each brand over the last 30 days?,"CREATE TABLE products (product_id INT, product_name VARCHAR(255), brand VARCHAR(255), price DECIMAL(10, 2), sale_date DATE); ","SELECT brand, AVG(price) OVER (PARTITION BY brand ORDER BY sale_date ROWS BETWEEN 29 PRECEDING AND CURRENT ROW) as moving_avg FROM products;","SELECT brand, AVG(price) as moving_avg FROM products WHERE sale_date >= DATEADD(day, -30, GETDATE()) GROUP BY brand;",0 What is the total number of fans for each game?,"CREATE TABLE fan_demographics_by_game (id INT, game_id INT, gender VARCHAR(50), count INT); ","SELECT game_id, SUM(count) as total_fans FROM fan_demographics_by_game GROUP BY game_id;","SELECT game_id, SUM(count) FROM fan_demographics_by_game GROUP BY game_id;",0 What is the total number of vessels by type?,"CREATE TABLE if not exists vessels (id INT, name VARCHAR(255), type VARCHAR(255), year_built INT); CREATE VIEW vessels_by_type AS SELECT type, COUNT(*) as total FROM vessels GROUP BY type;",SELECT * FROM vessels_by_type;,"SELECT type, SUM(total) FROM vessels_by_type GROUP BY type;",0 "Can you tell me the sum of Grid that has the Manufacturer of aprilia, and the sandro cortese?","CREATE TABLE table_name_96 (grid INTEGER, manufacturer VARCHAR, rider VARCHAR);","SELECT SUM(grid) FROM table_name_96 WHERE manufacturer = ""aprilia"" AND rider = ""sandro cortese"";","SELECT SUM(grid) FROM table_name_96 WHERE manufacturer = ""aprilia"" AND rider = ""sandro cortese"";",1 How many packages were shipped via ground transportation from each warehouse in Q1 2021?,"CREATE TABLE packages (id INT, shipment_type VARCHAR(20), warehouse VARCHAR(20), quarter INT); CREATE TABLE warehouses (id INT, name VARCHAR(20)); CREATE TABLE shipment_types (id INT, type VARCHAR(20)); ","SELECT p.warehouse, COUNT(*) FROM packages p JOIN warehouses w ON p.warehouse = w.name JOIN shipment_types st ON p.shipment_type = st.type WHERE st.type = 'Ground' AND p.quarter = 1 GROUP BY p.warehouse;","SELECT w.name, COUNT(p.id) FROM packages p JOIN warehouses w ON p.warehouse = w.name JOIN shipment_types st ON p.shipment_type = st.type WHERE p.quarter = 1 GROUP BY w.name;",0 What is the nationality of Stromile Swift?,"CREATE TABLE table_name_48 (nationality VARCHAR, player VARCHAR);","SELECT nationality FROM table_name_48 WHERE player = ""stromile swift"";","SELECT nationality FROM table_name_48 WHERE player = ""stromile swift"";",1 What is the cross section area (cm 2) for the moment of intertia in torsion (j) (cm 4) 2.54?,"CREATE TABLE table_2071644_1 (cross_section_area__cm_2__ VARCHAR, moment_of_inertia_in_torsion__j___cm_4__ VARCHAR);","SELECT cross_section_area__cm_2__ FROM table_2071644_1 WHERE moment_of_inertia_in_torsion__j___cm_4__ = ""2.54"";","SELECT cross_section_area__cm_2__ FROM table_2071644_1 WHERE moment_of_inertia_in_torsion__j___cm_4__ = ""2.54"";",1 "yes or no for the gold coast with yes for melbourne, yes for adelaide, yes for auckland?","CREATE TABLE table_name_2 (gold_coast VARCHAR, auckland VARCHAR, melbourne VARCHAR, adelaide VARCHAR);","SELECT gold_coast FROM table_name_2 WHERE melbourne = ""yes"" AND adelaide = ""yes"" AND auckland = ""yes"";","SELECT gold_coast FROM table_name_2 WHERE melbourne = ""yes"" AND adelaide = ""yes"" AND auckland = ""yes"";",1 Which Year has a Division larger than 3?,"CREATE TABLE table_name_97 (the_year INTEGER, division INTEGER);",SELECT MAX(the_year) FROM table_name_97 WHERE division > 3;,SELECT AVG(the_year) FROM table_name_97 WHERE division > 3;,0 What is the average ocean acidification level in the North Pacific Ocean?,"CREATE TABLE ocean_acidification_np (id INT, location VARCHAR(255), level FLOAT); ",SELECT AVG(level) FROM ocean_acidification_np;,SELECT AVG(level) FROM ocean_acidification_np WHERE location = 'North Pacific Ocean';,0 Who directed the show that was viewed by 2.06 million U.S. people?,"CREATE TABLE table_11694832_1 (directed_by VARCHAR, us_viewers__millions_ VARCHAR);","SELECT directed_by FROM table_11694832_1 WHERE us_viewers__millions_ = ""2.06"";","SELECT directed_by FROM table_11694832_1 WHERE us_viewers__millions_ = ""2.06"";",1 How many lowest mark entries are there when % passed is 76?,"CREATE TABLE table_29842201_1 (lowest_mark VARCHAR, _percentage_pass VARCHAR);",SELECT COUNT(lowest_mark) FROM table_29842201_1 WHERE _percentage_pass = 76;,"SELECT COUNT(lowest_mark) FROM table_29842201_1 WHERE _percentage_pass = ""76"";",0 When did the Cyclones get 46 points?,"CREATE TABLE table_23184448_3 (date VARCHAR, cyclones_points VARCHAR);",SELECT date FROM table_23184448_3 WHERE cyclones_points = 46;,SELECT date FROM table_23184448_3 WHERE cyclones_points = 46;,1 How many public transportation trips were taken in the last month in CityX?,"CREATE TABLE trips (id INT, date DATE, mode VARCHAR(20)); ","SELECT COUNT(*) FROM trips WHERE mode = 'Bus' OR mode = 'Train' OR mode = 'Subway' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);","SELECT COUNT(*) FROM trips WHERE date >= DATEADD(month, -1, GETDATE());",0 "What was the result associated with the cinemaa awards, and gabbar singh film?","CREATE TABLE table_name_93 (result VARCHAR, award VARCHAR, film VARCHAR);","SELECT result FROM table_name_93 WHERE award = ""cinemaa awards"" AND film = ""gabbar singh"";","SELECT result FROM table_name_93 WHERE award = ""cinemaa awards"" AND film = ""gabbar singh"";",1 "What is the Total with 0 Silver and Gold, 1 Bronze and Rank larger than 2?","CREATE TABLE table_name_54 (total INTEGER, gold VARCHAR, silver VARCHAR, rank VARCHAR, bronze VARCHAR);",SELECT MIN(total) FROM table_name_54 WHERE rank > 2 AND bronze = 1 AND silver > 0 AND gold < 0;,SELECT SUM(total) FROM table_name_54 WHERE rank > 2 AND bronze = 1 AND silver = 0 AND gold = 1;,0 What type of station is within the 972khz frequency?,"CREATE TABLE table_28794440_1 (station_type VARCHAR, frequency VARCHAR);","SELECT station_type FROM table_28794440_1 WHERE frequency = ""972kHz"";","SELECT station_type FROM table_28794440_1 WHERE frequency = ""962khz"";",0 What is the total number of cases in the justice system that were resolved through restorative justice programs?,"CREATE TABLE cases (id INT, resolution_type VARCHAR(20)); ",SELECT COUNT(*) FROM cases WHERE resolution_type = 'Restorative Justice';,SELECT COUNT(*) FROM cases WHERE resolution_type = 'Restorative Justice';,1 What is the to par of player bunky henry?,"CREATE TABLE table_name_5 (to_par VARCHAR, player VARCHAR);","SELECT to_par FROM table_name_5 WHERE player = ""bunky henry"";","SELECT to_par FROM table_name_5 WHERE player = ""bunky henry"";",1 Which Against has a Position larger than 11?,"CREATE TABLE table_name_32 (against VARCHAR, position INTEGER);",SELECT COUNT(against) FROM table_name_32 WHERE position > 11;,SELECT against FROM table_name_32 WHERE position > 11;,0 Which drug has the highest R&D cost among all drugs approved in Europe?,"CREATE TABLE drug (drug_id INT, drug_name TEXT, rd_cost FLOAT, approval_region TEXT); ",SELECT drug_name FROM drug WHERE rd_cost = (SELECT MAX(rd_cost) FROM drug WHERE approval_region = 'Europe');,"SELECT drug_name, MAX(rd_cost) FROM drug WHERE approval_region = 'Europe' GROUP BY drug_name;",0 Who was the loser at Municipal Stadium after 1970?,"CREATE TABLE table_name_96 (loser VARCHAR, location VARCHAR, year VARCHAR);","SELECT loser FROM table_name_96 WHERE location = ""municipal stadium"" AND year > 1970;","SELECT loser FROM table_name_96 WHERE location = ""municipal stadium"" AND year > 1970;",1 Who won the fastest lap if Anders Krohn won the pole position?,"CREATE TABLE table_25459168_2 (fastest_lap VARCHAR, pole_position VARCHAR);","SELECT fastest_lap FROM table_25459168_2 WHERE pole_position = ""Anders Krohn"";","SELECT fastest_lap FROM table_25459168_2 WHERE pole_position = ""Anders Krohn"";",1 Percentage of users listening to hip-hop streams in the US,"CREATE TABLE genres (id INT, name TEXT); ","SELECT ROUND(100 * SUM(CASE WHEN users.country = 'United States' AND genre_id = 1 THEN 1 ELSE 0 END) / COUNT(DISTINCT users.id), 2) AS hiphop_percentage FROM users JOIN user_genres ON users.id = user_genres.user_id JOIN genres ON user_genres.genre_id = genres.id;",SELECT (COUNT(*) FILTER (WHERE name = 'Hip-Hop')) * 100.0 / COUNT(*) FROM genres WHERE name = 'Hip-Hop' AND country = 'US';,0 Add a new charging station in Madrid for electric cars.,"CREATE TABLE charging_stations (station_id INT, type VARCHAR(20), city VARCHAR(20)); ","INSERT INTO charging_stations (station_id, type, city) VALUES (4, 'Car', 'Madrid');","INSERT INTO charging_stations (station_id, type, city) VALUES (1, 'Electric Car', 'Madrid');",0 Calculate the average price of sustainable urbanism projects in Los Angeles with at least 2 co-owners.,"CREATE TABLE sustainable_urbanism (property_id INT, city VARCHAR(50), price INT, co_owner_count INT); ",SELECT AVG(price) FROM sustainable_urbanism WHERE city = 'Los Angeles' AND co_owner_count > 1;,SELECT AVG(price) FROM sustainable_urbanism WHERE city = 'Los Angeles' AND co_owner_count >= 2;,0 How many sustainable urbanism projects are there in the state of Florida?,"CREATE TABLE project (id INT, state VARCHAR(20), sustainable_urbanism BOOLEAN);",SELECT COUNT(*) FROM project WHERE state = 'Florida' AND sustainable_urbanism = TRUE;,SELECT COUNT(*) FROM project WHERE state = 'Florida' AND sustainable_urbanism = true;,0 What are all the conjugated forms of the verb moler where the vosotros / vosotras is moláis for the yo tense?,"CREATE TABLE table_1977630_2 (yo VARCHAR, vosotros___vosotras VARCHAR);","SELECT yo FROM table_1977630_2 WHERE vosotros___vosotras = ""moláis"";","SELECT yo FROM table_1977630_2 WHERE vosotros___vosotras = ""moláis"";",1 "Where is the team that has a stadium capable of a capacity of 10,517 5,006 located?","CREATE TABLE table_283203_1 (location VARCHAR, capacity VARCHAR);","SELECT location FROM table_283203_1 WHERE capacity = ""10,517 5,006"";","SELECT location FROM table_283203_1 WHERE capacity = ""10,517 5,006"";",1 What college is pick number 268 from?,"CREATE TABLE table_name_44 (college VARCHAR, pick__number VARCHAR);","SELECT college FROM table_name_44 WHERE pick__number = ""268"";",SELECT college FROM table_name_44 WHERE pick__number = 268;,0 What is the NOAA of the higher harmonics that have a Darwin of m sf?,"CREATE TABLE table_name_27 (noaa VARCHAR, darwin VARCHAR);","SELECT noaa FROM table_name_27 WHERE darwin = ""m sf"";","SELECT noaa FROM table_name_27 WHERE darwin = ""m sf"";",1 Who was Al Michaels' color commentator in 2003?,"CREATE TABLE table_name_69 (color_commentator_s_ VARCHAR, play_by_play VARCHAR, year VARCHAR);","SELECT color_commentator_s_ FROM table_name_69 WHERE play_by_play = ""al michaels"" AND year > 2003;","SELECT color_commentator_s_ FROM table_name_69 WHERE play_by_play = ""al michaels"" AND year = ""2003"";",0 Calculate total donation amount for each community education program,"CREATE TABLE community_education_program (id INT, name VARCHAR(50), location VARCHAR(50), total_donation DECIMAL(10,2)); ","SELECT cep.name, SUM(d.donation_amount) as total_donation FROM community_education_program cep INNER JOIN donation d ON cep.id = d.community_education_program_id GROUP BY cep.name;","SELECT name, SUM(total_donation) as total_donation FROM community_education_program GROUP BY name;",0 "What are the top 5 most used mobile devices among prepaid customers in the state of California, and how many subscribers use each device?","CREATE TABLE mobile_devices (device_id INT, device_name VARCHAR(50), mobile_services INT, state VARCHAR(20)); CREATE TABLE mobile_customers (customer_id INT, device_id INT, plan_type VARCHAR(10));","SELECT device_name, COUNT(*) as num_subscribers FROM mobile_devices JOIN mobile_customers ON mobile_devices.device_id = mobile_customers.device_id WHERE plan_type = 'prepaid' AND state = 'California' GROUP BY device_name ORDER BY num_subscribers DESC LIMIT 5;","SELECT md.device_name, COUNT(mc.customer_id) as subscriber_count FROM mobile_devices md JOIN mobile_customers mc ON md.device_id = mc.device_id WHERE md.state = 'California' AND mc.plan_type = 'Prepaid' GROUP BY md.device_name ORDER BY subscriber_count DESC LIMIT 5;",0 What is the total production quantity for all wells in the 'Alberta' region that were commissioned in 2018 or earlier?,"CREATE TABLE wells (well_id INT, well_name VARCHAR(50), region VARCHAR(50), production_qty FLOAT, commission_date DATE); ",SELECT SUM(production_qty) as total_production FROM wells WHERE region = 'Alberta' AND commission_date <= '2018-01-01';,SELECT SUM(production_qty) FROM wells WHERE region = 'Alberta' AND commission_date >= '2018-01-01';,0 "who was the opponent when the attendance was larger than 54,766?","CREATE TABLE table_name_27 (opponent VARCHAR, attendance INTEGER);",SELECT opponent FROM table_name_27 WHERE attendance > 54 OFFSET 766;,SELECT opponent FROM table_name_27 WHERE attendance > 54 OFFSET 766;,1 Which airport is in Tokyo and has an ICAO of rjtt?,"CREATE TABLE table_name_73 (airport VARCHAR, city VARCHAR, icao VARCHAR);","SELECT airport FROM table_name_73 WHERE city = ""tokyo"" AND icao = ""rjtt"";","SELECT airport FROM table_name_73 WHERE city = ""tokyo"" AND icao = ""rjtt"";",1 What is the total number of workers employed in sustainable building projects in California?,"CREATE TABLE Workers (WorkerID INT, ProjectID INT, State CHAR(2), IsSustainable BOOLEAN);",SELECT COUNT(*) FROM Workers WHERE State='CA' AND IsSustainable=TRUE;,SELECT COUNT(*) FROM Workers WHERE State = 'California' AND IsSustainable = TRUE;,0 "Insert a new community development initiative in 'Amazonas' region with ID 3, name 'Cultural Center', and status 'planning' into the 'community_development' table.","CREATE TABLE community_development(id INT, region TEXT, initiative_name TEXT, status TEXT);","INSERT INTO community_development (id, region, initiative_name, status) VALUES (3, 'Amazonas', 'Cultural Center', 'planning');","INSERT INTO community_development (id, region, initiative_name, status) VALUES (3, 'Cultural Center', 'Planning');",0 What is the minimum age of patients diagnosed with pneumonia in the Los Angeles region?,"CREATE TABLE Patients (PatientID INT, Age INT, Gender VARCHAR(10), Disease VARCHAR(20), Region VARCHAR(20)); ",SELECT MIN(Age) FROM Patients WHERE Disease = 'Pneumonia' AND Region = 'Los Angeles';,SELECT MIN(Age) FROM Patients WHERE Disease = 'Pneumonia' AND Region = 'Los Angeles';,1 What player played in 2000?,"CREATE TABLE table_name_66 (player VARCHAR, year VARCHAR);",SELECT player FROM table_name_66 WHERE year = 2000;,SELECT player FROM table_name_66 WHERE year = 2000;,1 Which Rank has a Years of 1998–present?,"CREATE TABLE table_name_82 (rank INTEGER, years VARCHAR);","SELECT AVG(rank) FROM table_name_82 WHERE years = ""1998–present"";","SELECT SUM(rank) FROM table_name_82 WHERE years = ""1998–present"";",0 What is the total weight of each food category?,"CREATE TABLE FoodItems (FoodItemID INT, FoodItemName TEXT, Category TEXT, Weight FLOAT);","SELECT Category, SUM(Weight) AS TotalWeight FROM FoodItems GROUP BY Category;","SELECT Category, SUM(Weight) FROM FoodItems GROUP BY Category;",0 Calculate the average research grant amount for faculty members in the Chemistry department,"CREATE TABLE faculty(faculty_id INT, name VARCHAR(50), gender VARCHAR(10), department VARCHAR(20)); CREATE TABLE research_grants(grant_id INT, faculty_id INT, amount DECIMAL(10, 2)); ",SELECT AVG(amount) FROM faculty f INNER JOIN research_grants g ON f.faculty_id = g.faculty_id WHERE f.department = 'Chemistry';,SELECT AVG(rg.amount) FROM research_grants rg JOIN faculty f ON rg.faculty_id = f.faculty_id WHERE f.department = 'Chemistry';,0 "What is the average mass of spacecrafts manufactured in the US, grouped by manufacturer?","CREATE TABLE spacecraft_manufacturers (manufacturer_id INT, name TEXT, country TEXT); CREATE TABLE spacecrafts (spacecraft_id INT, name TEXT, manufacturer_id INT, mass FLOAT); ","SELECT sm.name, AVG(s.mass) FROM spacecrafts s JOIN spacecraft_manufacturers sm ON s.manufacturer_id = sm.manufacturer_id WHERE sm.country = 'USA' GROUP BY sm.name;","SELECT s.name, AVG(s.mass) as avg_mass FROM spacecraft_manufacturers s JOIN spacecrafts s ON s.manufacturer_id = s.manufacturer_id WHERE s.country = 'USA' GROUP BY s.name;",0 How many total points does Mike Hyndman have with more than 119 assists?,"CREATE TABLE table_name_98 (points INTEGER, player VARCHAR, assists VARCHAR);","SELECT SUM(points) FROM table_name_98 WHERE player = ""mike hyndman"" AND assists > 119;","SELECT SUM(points) FROM table_name_98 WHERE player = ""mike hyndman"" AND assists > 119;",1 what is the number of smallpox when typhoid fever is 293,"CREATE TABLE table_1007688_1 (smallpox INTEGER, typhoid_fever VARCHAR);",SELECT MAX(smallpox) FROM table_1007688_1 WHERE typhoid_fever = 293;,SELECT SUM(smallpox) FROM table_1007688_1 WHERE typhoid_fever = 293;,0 "Where has a Rules of thai boxing, and a Round of n/a, and an Opponent of everton crawford?","CREATE TABLE table_name_99 (location VARCHAR, opponent VARCHAR, rules VARCHAR, round VARCHAR);","SELECT location FROM table_name_99 WHERE rules = ""thai boxing"" AND round = ""n/a"" AND opponent = ""everton crawford"";","SELECT location FROM table_name_99 WHERE rules = ""thai boxing"" AND round = ""n/a"" AND opponent = ""everton crawford"";",1 Which country had the highest natural gas production in South America in 2019?,"CREATE TABLE wells (well_id INT, well_name TEXT, location TEXT, gas_production FLOAT); ","SELECT location, SUM(gas_production) as total_gas_production FROM wells GROUP BY location ORDER BY total_gas_production DESC LIMIT 1;","SELECT location, MAX(gas_production) FROM wells WHERE location = 'South America' AND YEAR(well_date) = 2019 GROUP BY location;",0 "List all startups with a founder from the LGBTQ+ community that have had an investment round of at least $2,000,000.","CREATE TABLE startup (id INT, name TEXT, founder_identity TEXT); CREATE TABLE investment (startup_id INT, investment_amount INT); ",SELECT s.name FROM startup s INNER JOIN investment i ON s.id = i.startup_id WHERE i.investment_amount >= 2000000 AND s.founder_identity = 'LGBTQ+';,SELECT startup.name FROM startup INNER JOIN investment ON startup.id = investment.startup_id WHERE startup.founder_identity = 'LGBTQ+' AND investment.investment_amount >= 2000000;,0 How many safety incidents were reported per month in 2022?,"CREATE TABLE safety_incidents (incident_id INT, incident_date DATE, incident_type VARCHAR(50)); ","SELECT EXTRACT(MONTH FROM incident_date) as month, COUNT(incident_id) as incidents_per_month FROM safety_incidents WHERE EXTRACT(YEAR FROM incident_date) = 2022 GROUP BY month;","SELECT EXTRACT(MONTH FROM incident_date) AS month, COUNT(*) FROM safety_incidents WHERE incident_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY month;",0 What is the total number of home games played by the 'Boston Celtics'?,"CREATE TABLE teams (team_id INT, team_name VARCHAR(255)); CREATE TABLE games (game_id INT, home_team_id INT, away_team_id INT); ",SELECT COUNT(CASE WHEN g.home_team_id = 3 THEN 1 END) as home_games_played FROM games g;,SELECT COUNT(*) FROM games JOIN teams ON games.home_team_id = teams.team_id WHERE teams.team_name = 'Boston Celtics';,0 What nationality is Barry Duench?,"CREATE TABLE table_name_6 (nationality VARCHAR, player VARCHAR);","SELECT nationality FROM table_name_6 WHERE player = ""barry duench"";","SELECT nationality FROM table_name_6 WHERE player = ""barry duench"";",1 What is the highest track for the song Rip it Up?,"CREATE TABLE table_name_87 (track INTEGER, song_title VARCHAR);","SELECT MAX(track) FROM table_name_87 WHERE song_title = ""rip it up"";","SELECT MAX(track) FROM table_name_87 WHERE song_title = ""rip it up"";",1 What is the percentage of students with disabilities who have completed a degree program in the last 3 years?,"CREATE TABLE Student_Disabilities (student_id INT, disability_type TEXT, degree_status TEXT); CREATE VIEW Degree_Completion_Count AS SELECT disability_type, COUNT(*) FROM Student_Disabilities WHERE degree_status = 'Completed' AND YEAR(submission_date) BETWEEN YEAR(CURRENT_DATE)-3 AND YEAR(CURRENT_DATE) GROUP BY disability_type; CREATE VIEW Total_Students_With_Disabilities AS SELECT disability_type, COUNT(*) FROM Student_Disabilities GROUP BY disability_type;","SELECT Degree_Completion_Count.disability_type, (Degree_Completion_Count.COUNT(*) / Total_Students_With_Disabilities.COUNT(*))*100 AS percentage FROM Degree_Completion_Count INNER JOIN Total_Students_With_Disabilities ON Degree_Completion_Count.disability_type = Total_Students_With_Disabilities.disability_type;",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Total_Students_With_Disabilities)) FROM Degree_Completion_Count WHERE degree_status = 'Completed' AND YEAR(submission_date) >= YEAR(CURRENT_DATE) - 3;,0 How many AI safety incidents were reported in the last month?,"CREATE TABLE incidents (id INT, date DATE, type TEXT);",SELECT COUNT(*) as num_incidents FROM incidents WHERE date >= (CURRENT_DATE - INTERVAL '1 month');,"SELECT COUNT(*) FROM incidents WHERE date >= DATEADD(month, -1, GETDATE());",0 What is the average revenue per sustainable hotel in Paris?,"CREATE TABLE paris_sustainable_hotels(id INT, name TEXT, sustainable BOOLEAN, revenue FLOAT); ",SELECT AVG(revenue) FROM paris_sustainable_hotels WHERE sustainable = true;,SELECT AVG(revenue) FROM paris_sustainable_hotels WHERE sustainable = true;,1 What section were they in when there were tier 2 in 1996?,"CREATE TABLE table_name_30 (section VARCHAR, level VARCHAR, season VARCHAR);","SELECT section FROM table_name_30 WHERE level = ""tier 2"" AND season = 1996;","SELECT section FROM table_name_30 WHERE level = ""tier 2"" AND season = ""1996"";",0 What to par is located in the united states and has a player by the name of hal sutton?,"CREATE TABLE table_name_44 (to_par VARCHAR, country VARCHAR, player VARCHAR);","SELECT to_par FROM table_name_44 WHERE country = ""united states"" AND player = ""hal sutton"";","SELECT to_par FROM table_name_44 WHERE country = ""united states"" AND player = ""hal sutton"";",1 "Name the region for cd format on february 22, 1984","CREATE TABLE table_name_30 (region VARCHAR, format VARCHAR, date VARCHAR);","SELECT region FROM table_name_30 WHERE format = ""cd"" AND date = ""february 22, 1984"";","SELECT region FROM table_name_30 WHERE format = ""cd"" AND date = ""february 22, 1984"";",1 Find the list of attribute data types possessed by more than 3 attribute definitions.,CREATE TABLE Attribute_Definitions (attribute_data_type VARCHAR);,SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING COUNT(*) > 3;,SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING COUNT(*) > 3;,1 Name the team with best of 58.846,"CREATE TABLE table_name_2 (team VARCHAR, best VARCHAR);","SELECT team FROM table_name_2 WHERE best = ""58.846"";","SELECT team FROM table_name_2 WHERE best = ""58.846"";",1 Who was the visiting team on 12 March 2008?,"CREATE TABLE table_name_77 (visitor VARCHAR, date VARCHAR);","SELECT visitor FROM table_name_77 WHERE date = ""12 march 2008"";","SELECT visitor FROM table_name_77 WHERE date = ""12 march 2008"";",1 "What is the total revenue for each cuisine type, including the sum of sales for all menu items and additional charges?","CREATE TABLE Restaurants (RestaurantID int, RestaurantName varchar(255), Cuisine varchar(255)); CREATE TABLE MenuItems (MenuID int, MenuName varchar(255), RestaurantID int, Sales int); CREATE TABLE AdditionalCharges (ChargeID int, ChargeName varchar(255), RestaurantID int, ChargeAmt int);","SELECT R.Cuisine, SUM(M.Sales + AC.ChargeAmt) as TotalRevenue FROM Restaurants R INNER JOIN MenuItems M ON R.RestaurantID = M.RestaurantID INNER JOIN AdditionalCharges AC ON R.RestaurantID = AC.RestaurantID GROUP BY R.Cuisine;","SELECT Cuisine, SUM(Sales) as TotalRevenue FROM MenuItems JOIN Restaurants ON MenuItems.RestaurantID = Restaurants.RestaurantID JOIN AdditionalCharges ON MenuItems.MenuID = AdditionalCharges.RestaurantID GROUP BY Cuisine;",0 Find the percentage change in the number of subscribers for streaming services by quarter.,"CREATE TABLE subscribers (service VARCHAR(50), subscriber_count INT, quarter VARCHAR(10), year INT); ","SELECT service, quarter, year, LAG(subscriber_count) OVER(PARTITION BY service ORDER BY year, quarter) as prev_subscriber_count, (subscriber_count - COALESCE(prev_subscriber_count, subscriber_count)) * 100.0 / subscriber_count as pct_change FROM subscribers;","SELECT quarter, (subscriber_count - (SELECT subscriber_count FROM subscribers WHERE service = 'Streaming')) * 100.0 / subscriber_count - (SELECT subscriber_count FROM subscribers WHERE service = 'Streaming') as percentage_change FROM subscribers WHERE service = 'Streaming' GROUP BY quarter;",0 What country did Jonas Geirnaert direct a film in?,"CREATE TABLE table_name_30 (country VARCHAR, director_s_ VARCHAR);","SELECT country FROM table_name_30 WHERE director_s_ = ""jonas geirnaert"";","SELECT country FROM table_name_30 WHERE director_s_ = ""jonas geirnaert"";",1 What is the overall media literacy score for content creators in African countries?,"CREATE TABLE content_creators (id INT, name TEXT, country TEXT, media_literacy_score INT); ","SELECT AVG(media_literacy_score) FROM content_creators WHERE country IN ('Nigeria', 'Egypt', 'South Africa', 'Kenya', 'Ghana');",SELECT SUM(media_literacy_score) FROM content_creators WHERE country IN (SELECT country FROM countries WHERE continent = 'Africa');,0 Sum of m. night shyamalan ranks?,"CREATE TABLE table_name_41 (rank INTEGER, director_s_ VARCHAR);","SELECT SUM(rank) FROM table_name_41 WHERE director_s_ = ""m. night shyamalan"";","SELECT SUM(rank) FROM table_name_41 WHERE director_s_ = ""m. night shyamalan"";",1 "What are the names of the defense contractors and their associated military equipment sales in descending order, for sales made in 2021?","CREATE TABLE contractor_sales (contractor VARCHAR(20), equipment_type VARCHAR(20), sale_year INT, quantity INT); ","SELECT contractor, SUM(quantity) as total_sales FROM contractor_sales WHERE sale_year = 2021 GROUP BY contractor ORDER BY total_sales DESC;","SELECT contractor, equipment_type, SUM(quantity) as total_quantity FROM contractor_sales WHERE sale_year = 2021 GROUP BY contractor ORDER BY total_quantity DESC;",0 What is the total number of claims processed for each underwriter?,"CREATE TABLE claims (id INT, underwriter_id INT, processed_date DATE); ","SELECT underwriter_id, COUNT(*) FROM claims GROUP BY underwriter_id;","SELECT underwriter_id, COUNT(*) FROM claims GROUP BY underwriter_id;",1 Which aquatic species have a biomass greater than any species in the Atlantic Ocean?,"CREATE TABLE pacific_fish_stock (id INT, species VARCHAR(255), biomass INT); ",SELECT species FROM pacific_fish_stock WHERE biomass > ALL (SELECT biomass FROM atlantic_fish_stock);,SELECT species FROM pacific_fish_stock WHERE biomass > (SELECT biomass FROM pacific_fish_stock WHERE species LIKE '%Atlantic%');,0 Name the opponent in the final for year of 1888,"CREATE TABLE table_name_36 (opponent_in_the_final VARCHAR, year VARCHAR);",SELECT opponent_in_the_final FROM table_name_36 WHERE year = 1888;,SELECT opponent_in_the_final FROM table_name_36 WHERE year = 1888;,1 What is the total budget for programs focused on Women's Empowerment and Children's Education?,"CREATE TABLE Programs (ProgramID INT, ProgramName TEXT, Budget DECIMAL); ","SELECT SUM(Programs.Budget) FROM Programs WHERE Programs.ProgramName IN ('Women''s Empowerment', 'Children''s Education');","SELECT SUM(Budget) FROM Programs WHERE ProgramName IN ('Women's Empowerment', 'Children's Education');",0 What is the average rating of movies produced in the last 5 years by female directors?,"CREATE TABLE movies (id INT, title TEXT, release_year INT, rating FLOAT, director TEXT); ",SELECT AVG(rating) FROM movies WHERE release_year >= YEAR(CURRENT_DATE) - 5 AND director LIKE '%Female%';,SELECT AVG(rating) FROM movies WHERE release_year >= YEAR(CURRENT_DATE) - 5 AND director = 'Female';,0 What is the cyrillic name other names for the settlement of debeljača?,"CREATE TABLE table_2562572_43 (cyrillic_name_other_names VARCHAR, settlement VARCHAR);","SELECT cyrillic_name_other_names FROM table_2562572_43 WHERE settlement = ""Debeljača"";","SELECT cyrillic_name_other_names FROM table_2562572_43 WHERE settlement = ""Debeljaa"";",0 What is the total production of corn by region?,"CREATE TABLE Region (id INT, name VARCHAR(255)); CREATE TABLE Crop (id INT, name VARCHAR(255), region_id INT, production INT); ",SELECT SUM(Crop.production) FROM Crop INNER JOIN Region ON Crop.region_id = Region.id WHERE Crop.name = 'Corn';,"SELECT r.name, SUM(c.production) as total_production FROM Crop c JOIN Region r ON c.region_id = r.id GROUP BY r.name;",0 What language has sky famiglia as the package/option?,"CREATE TABLE table_name_82 (language VARCHAR, package_option VARCHAR);","SELECT language FROM table_name_82 WHERE package_option = ""sky famiglia"";","SELECT language FROM table_name_82 WHERE package_option = ""sky famiglia"";",1 List the names and delivery times of all shipments that were sent by sea from Canada to Brazil.,"CREATE TABLE Shipments(id INT, mode VARCHAR(50), source VARCHAR(50), destination VARCHAR(50), delivery_time DATE); ","SELECT Shipments.mode, Shipments.source, Shipments.destination, Shipments.delivery_time FROM Shipments WHERE Shipments.mode = 'sea' AND Shipments.source = 'Canada' AND Shipments.destination = 'Brazil';","SELECT s.name, s.delivery_time FROM Shipments s WHERE s.mode = 'Sea' AND s.source = 'Canada' AND s.destination = 'Brazil';",0 Identify the countries with the most satellites in low Earth orbit (LEO) based on the SatelliteOrbits and SpaceLaunches tables?,"CREATE TABLE SatelliteOrbits (SatelliteID INT, OrbitType VARCHAR(50), OrbitHeight INT); CREATE TABLE SpaceLaunches (LaunchID INT, Country VARCHAR(50), SatelliteID INT); ","SELECT s.Country, COUNT(so.SatelliteID) AS TotalSatellitesInLEO FROM SatelliteOrbits so JOIN SpaceLaunches s ON so.SatelliteID = s.SatelliteID WHERE OrbitType = 'LEO' GROUP BY s.Country ORDER BY TotalSatellitesInLEO DESC;","SELECT SatelliteOrbits.OrbitType, SatelliteOrbits.OrbitHeight FROM SatelliteOrbits INNER JOIN SpaceLaunches ON SatelliteOrbits.SatelliteID = SpaceLaunches.SatelliteID WHERE SatelliteOrbits.OrbitType = 'LEO' GROUP BY SatelliteOrbits.OrbitType ORDER BY SatelliteOrbits.OrbitHeight DESC;",0 What is the total number of hospitals and clinics in the public health database?,"CREATE TABLE hospitals (id INT, name VARCHAR(50), location VARCHAR(50)); CREATE TABLE clinics (id INT, name VARCHAR(50), location VARCHAR(50)); ",SELECT COUNT(*) FROM hospitals UNION SELECT COUNT(*) FROM clinics;,SELECT COUNT(*) FROM hospitals; SELECT COUNT(*) FROM clinics;,0 What were the total number of games in April greater than 83?,"CREATE TABLE table_name_61 (april VARCHAR, game INTEGER);",SELECT COUNT(april) FROM table_name_61 WHERE game > 83;,SELECT COUNT(april) FROM table_name_61 WHERE game > 83;,1 "What was the Attendance on May 12, when the New York Yankees were the Opponent?","CREATE TABLE table_name_71 (attendance VARCHAR, opponent VARCHAR, date VARCHAR);","SELECT attendance FROM table_name_71 WHERE opponent = ""new york yankees"" AND date = ""may 12"";","SELECT attendance FROM table_name_71 WHERE opponent = ""new york yankees"" AND date = ""may 12"";",1 What is the outcome of the match played on carpet surface?,"CREATE TABLE table_name_27 (outcome VARCHAR, surface VARCHAR);","SELECT outcome FROM table_name_27 WHERE surface = ""carpet"";","SELECT outcome FROM table_name_27 WHERE surface = ""carpet"";",1 For any races with a start of 14 what was the lowest finish?,"CREATE TABLE table_name_61 (finish INTEGER, start VARCHAR);",SELECT MIN(finish) FROM table_name_61 WHERE start = 14;,SELECT MIN(finish) FROM table_name_61 WHERE start = 14;,1 What is the Team with a Machine that is nsr250 and has Points of 8?,"CREATE TABLE table_name_39 (team VARCHAR, machine VARCHAR, points VARCHAR);","SELECT team FROM table_name_39 WHERE machine = ""nsr250"" AND points = 8;","SELECT team FROM table_name_39 WHERE machine = ""nsr250"" AND points = 8;",1 What is the total number of emergency incidents in the state of Texas?,"CREATE TABLE emergency_incidents (id INT, incident_type VARCHAR(50), incident_location VARCHAR(100), incident_date DATE, city VARCHAR(50), state VARCHAR(50)); ",SELECT COUNT(*) FROM emergency_incidents WHERE state = 'TX';,SELECT COUNT(*) FROM emergency_incidents WHERE state = 'Texas';,0 What is the fewest number of 2005 subscribers for Vodafone?,"CREATE TABLE table_29395291_2 (subscribers__2005___thousands_ INTEGER, provider VARCHAR);","SELECT MIN(subscribers__2005___thousands_) FROM table_29395291_2 WHERE provider = ""Vodafone"";","SELECT MIN(subscribers__2005___thousands_) FROM table_29395291_2 WHERE provider = ""Vodafone"";",1 Which race had a time of 1:24.35?,"CREATE TABLE table_name_90 (race VARCHAR, time VARCHAR);","SELECT race FROM table_name_90 WHERE time = ""1:24.35"";","SELECT race FROM table_name_90 WHERE time = ""1:24.35"";",1 What is the maximum number of flu vaccinations administered in a day in Illinois?,"CREATE TABLE flu_vaccinations (vaccination_id INT, vaccine_name VARCHAR(20), date DATE, state VARCHAR(20)); ","SELECT MAX(count_per_day) FROM (SELECT date, COUNT(*) AS count_per_day FROM flu_vaccinations WHERE vaccine_name = 'Flu' AND state = 'Illinois' GROUP BY date) AS subquery;",SELECT MAX(COUNT(*)) FROM flu_vaccinations WHERE state = 'Illinois';,0 List all unique policy types for policyholders in 'UnderwritingTable1'.,"CREATE TABLE UnderwritingTable1 (PolicyID INT, PolicyType VARCHAR(20)); ",SELECT DISTINCT PolicyType FROM UnderwritingTable1;,SELECT DISTINCT PolicyType FROM UnderwritingTable1;,1 Which Centennial has a del Pueblo of 1986?,"CREATE TABLE table_name_40 (centennial VARCHAR, del_pueblo VARCHAR);","SELECT centennial FROM table_name_40 WHERE del_pueblo = ""1986"";","SELECT centennial FROM table_name_40 WHERE del_pueblo = ""1986"";",1 Which menu items have a revenue greater than a specific amount for a specific cuisine type?,"CREATE TABLE menu_item_revenue (menu_item_id INT, menu_item VARCHAR(255), cuisine VARCHAR(255), revenue FLOAT); ","SELECT menu_item, revenue FROM menu_item_revenue WHERE cuisine = 'Italian' AND revenue > 5000.00;","SELECT menu_item, cuisine, revenue FROM menu_item_revenue WHERE revenue > (SELECT SUM(revenue) FROM menu_item_revenue WHERE cuisine = 'Cuisine');",0 List the regulatory frameworks for the blockchain industry in each region in alphabetical order.,"CREATE TABLE Regions (RegionID int, RegionName varchar(50), IndustryRegulations varchar(50)); ","SELECT RegionName, SPLIT_STRING(IndustryRegulations, ',') as Regulations FROM Regions;","SELECT RegionName, IndustryRegulations FROM Regions ORDER BY IndustryRegulations DESC;",0 Which city does staff with first name as Janessa and last name as Sawayn live?,"CREATE TABLE Staff (staff_address_id VARCHAR, first_name VARCHAR, last_name VARCHAR); CREATE TABLE Addresses (city VARCHAR, address_id VARCHAR);","SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = ""Janessa"" AND T2.last_name = ""Sawayn"";","SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = ""Janessa"" AND T2.last_name = ""Sawayn"";",1 "What is the frequency of Walterboro, SC?","CREATE TABLE table_name_74 (frequency_mhz VARCHAR, city_of_license VARCHAR);","SELECT frequency_mhz FROM table_name_74 WHERE city_of_license = ""walterboro, sc"";","SELECT frequency_mhz FROM table_name_74 WHERE city_of_license = ""walterboro, sc"";",1 "Generate a new table hotel with columns id, name, location, stars, sustainability_certifications and insert a record for a hotel in Paris with 4 stars and no sustainability certifications.","CREATE TABLE hotel (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), stars INT, sustainability_certifications INT);","INSERT INTO hotel (id, name, location, stars, sustainability_certifications) VALUES (1, 'Hotel de Ville', 'Paris', 4, 0);","CREATE TABLE hotel (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), stars INT, sustainability_certifications INT);",0 What is the Home with a Time that is 14:00?,"CREATE TABLE table_name_28 (home VARCHAR, time VARCHAR);","SELECT home FROM table_name_28 WHERE time = ""14:00"";","SELECT home FROM table_name_28 WHERE time = ""14:00"";",1 Determine if there are healthcare providers with no mental health parity scores.,"CREATE TABLE healthcare_providers (provider_id INT, name TEXT, state TEXT); CREATE TABLE mental_health_parity (provider_id INT, score INT);",SELECT h.name FROM healthcare_providers h LEFT JOIN mental_health_parity m ON h.provider_id = m.provider_id WHERE m.score IS NULL;,SELECT hp.name FROM healthcare_providers hp INNER JOIN mental_health_parity mhp ON hp.provider_id = mhp.provider_id WHERE mhp.score IS NULL;,0 What is the most popular type of transportation in 'transportation_data' table?,"CREATE TABLE transportation_data (id INT, system_name VARCHAR(30), system_type VARCHAR(20), popularity INT);","SELECT system_type, MAX(popularity) FROM transportation_data GROUP BY system_type;","SELECT system_type, MAX(popularity) FROM transportation_data GROUP BY system_type;",1 "What is the average safety score for production sites located in California, USA?","CREATE TABLE production_sites(id INT, site_name TEXT, location TEXT, safety_score INT); ","SELECT AVG(safety_score) FROM production_sites WHERE location = 'California, USA';",SELECT AVG(safety_score) FROM production_sites WHERE location = 'California';,0 Which suppliers are associated with ingredient 2?,"CREATE TABLE ingredient_sourcing (id INT, product_id INT, ingredient_id INT, supplier_id INT, country VARCHAR(50)); ",SELECT DISTINCT supplier_id FROM ingredient_sourcing WHERE ingredient_id = 2;,SELECT supplier_id FROM ingredient_sourcing WHERE ingredient_id = 2;,0 When 6 is the rank what is the time for Tuesday August 25th?,"CREATE TABLE table_23465864_3 (tues_25_aug VARCHAR, rank VARCHAR);",SELECT tues_25_aug FROM table_23465864_3 WHERE rank = 6;,SELECT tues_25_aug FROM table_23465864_3 WHERE rank = 6;,1 Update the workout 'Yoga' to have a duration of 60 minutes.,"CREATE TABLE Workouts (id INT, workout_name TEXT, duration INT); ",UPDATE Workouts SET duration = 60 WHERE workout_name = 'Yoga';,UPDATE Workouts SET duration = 60 WHERE workout_name = 'Yoga';,1 What is the maximum depth of ocean floor mapping projects in the Indian region?,"CREATE TABLE ocean_floor_mapping(id INT, region VARCHAR(20), depth FLOAT); ",SELECT MAX(depth) FROM ocean_floor_mapping WHERE region = 'Indian';,SELECT MAX(depth) FROM ocean_floor_mapping WHERE region = 'Indian';,1 January 7.34 where is June ?,"CREATE TABLE table_15945862_1 (january VARCHAR, june VARCHAR);","SELECT january FROM table_15945862_1 WHERE june = ""7.34"";","SELECT january FROM table_15945862_1 WHERE june = ""7.34"";",1 "List the menu items that have never been sold, from the menu_item_dim table.","CREATE TABLE inventory_fact (inventory_id INT, menu_item_id INT, inventory_quantity INT, inventory_date DATE);",SELECT menu_item_name FROM menu_item_dim WHERE menu_item_id NOT IN (SELECT menu_item_id FROM inventory_fact);,"SELECT menu_item_id, inventory_quantity, inventory_date FROM inventory_fact WHERE inventory_date DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND menu_item_id NOT IN (SELECT menu_item_id FROM menu_item_dim);",0 When 11 is the episode what is the air date?,"CREATE TABLE table_28980706_4 (first_air_date VARCHAR, episode VARCHAR);",SELECT first_air_date FROM table_28980706_4 WHERE episode = 11;,SELECT first_air_date FROM table_28980706_4 WHERE episode = 11;,1 "List all public services in the state of California that received budget allocations in the last 5 years, ordered by allocation amount in descending order.","CREATE TABLE PublicServices (ServiceID INT, ServiceName VARCHAR(255), State VARCHAR(255), AllocationDate DATE); ","SELECT ServiceName, AllocationDate, Budget FROM PublicServices INNER JOIN BudgetAllocation ON PublicServices.ServiceID = BudgetAllocation.ServiceID WHERE State = 'California' AND AllocationDate >= DATEADD(year, -5, GETDATE()) ORDER BY Budget DESC;","SELECT ServiceName, AllocationAmount FROM PublicServices WHERE State = 'California' AND AllocationDate >= DATEADD(year, -5, GETDATE()) GROUP BY ServiceName ORDER BY AllocationAmount DESC;",0 What status has 10 as the population?,"CREATE TABLE table_name_10 (status VARCHAR, population VARCHAR);",SELECT status FROM table_name_10 WHERE population = 10;,SELECT status FROM table_name_10 WHERE population = 10;,1 What engine was in the year of 1961?,"CREATE TABLE table_name_85 (engine VARCHAR, year VARCHAR);",SELECT engine FROM table_name_85 WHERE year = 1961;,SELECT engine FROM table_name_85 WHERE year = 1961;,1 What percentage of patients in the USA showed improvement after 3 months of cognitive behavioral therapy?,"CREATE TABLE patients (id INT, country VARCHAR(255)); CREATE TABLE treatments (id INT, patient_id INT, type VARCHAR(255), start_date DATE); CREATE TABLE outcomes (id INT, patient_id INT, treatment_id INT, improvement BOOLEAN, follow_up_date DATE); ",SELECT 100.0 * COUNT(DISTINCT CASE WHEN outcomes.follow_up_date < treatments.start_date + INTERVAL '3 month' AND outcomes.improvement THEN patients.id END) / COUNT(DISTINCT patients.id) AS percentage FROM patients JOIN treatments ON patients.id = treatments.patient_id JOIN outcomes ON treatments.id = outcomes.treatment_id WHERE patients.country = 'USA' AND treatments.type = 'cognitive behavioral therapy';,"SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM patients WHERE country = 'USA')) AS percentage FROM patients WHERE country = 'USA' AND type = 'Cognitive Behavior Therapy' AND follow_up_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH);",0 "Lowest larger than 288, and a Team of east stirlingshire has what lowest average?","CREATE TABLE table_name_61 (average INTEGER, lowest VARCHAR, team VARCHAR);","SELECT MIN(average) FROM table_name_61 WHERE lowest > 288 AND team = ""east stirlingshire"";","SELECT MIN(average) FROM table_name_61 WHERE lowest > 288 AND team = ""east stirlingshire"";",1 Who is the player with a score less than 72 and a to par of +1?,"CREATE TABLE table_name_62 (player VARCHAR, score VARCHAR, to_par VARCHAR);","SELECT player FROM table_name_62 WHERE score < 72 AND to_par = ""+1"";","SELECT player FROM table_name_62 WHERE score 72 AND to_par = ""+1"";",0 Who Eliminated Kane?,"CREATE TABLE table_name_63 (eliminated_by VARCHAR, wrestler VARCHAR);","SELECT eliminated_by FROM table_name_63 WHERE wrestler = ""kane"";","SELECT eliminated_by FROM table_name_63 WHERE wrestler = ""kane"";",1 What is the minimum billing amount for cases handled by attorneys with the title 'Partner'?,"CREATE TABLE attorneys (attorney_id INT, name TEXT, title TEXT); CREATE TABLE cases (case_id INT, attorney_id INT, billing_amount INT); ",SELECT MIN(billing_amount) FROM cases INNER JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.title = 'Partner';,SELECT MIN(billing_amount) FROM cases JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.title = 'Partner';,0 What is the area in square kilometers of Studholm?,"CREATE TABLE table_name_87 (area_km_2 VARCHAR, official_name VARCHAR);","SELECT COUNT(area_km_2) FROM table_name_87 WHERE official_name = ""studholm"";","SELECT area_km_2 FROM table_name_87 WHERE official_name = ""studholm"";",0 Determine the percentage of female founders in each country,"CREATE TABLE founders (id INT, name VARCHAR(255), gender VARCHAR(10), country VARCHAR(255)); ","SELECT country, gender, COUNT(*) as head_count, ROUND(COUNT(*)*100.0/SUM(COUNT(*)) OVER (PARTITION BY country), 2) as gender_percentage FROM founders GROUP BY country, gender;","SELECT country, (COUNT(*) FILTER (WHERE gender = 'Female')) * 100.0 / COUNT(*) FROM founders GROUP BY country;",0 What is the total number of hospital beds in Canada?,"CREATE TABLE HospitalBeds (Country VARCHAR(50), HospitalBeds INT); ",SELECT SUM(HospitalBeds) FROM HospitalBeds WHERE Country = 'Canada';,SELECT SUM(HospitalBeds) FROM HospitalBeds WHERE Country = 'Canada';,1 How many socially responsible loans were issued in the Latin American region?,"CREATE TABLE social_loans (lender VARCHAR(50), region VARCHAR(50), loan_count INT); ",SELECT SUM(loan_count) FROM social_loans WHERE region = 'Latin America';,SELECT SUM(loan_count) FROM social_loans WHERE region = 'Latin America';,1 What is the total waste generation rate in the circular economy initiatives?,"CREATE TABLE CircularEconomy (id INT, initiative VARCHAR(20), waste_generation_rate FLOAT); ",SELECT SUM(waste_generation_rate) FROM CircularEconomy;,SELECT SUM(waste_generation_rate) FROM CircularEconomy;,1 what is the original channel when the year is after 2012?,"CREATE TABLE table_name_7 (original_channel VARCHAR, year INTEGER);",SELECT original_channel FROM table_name_7 WHERE year > 2012;,SELECT original_channel FROM table_name_7 WHERE year > 2012;,1 What year did Avatar Reality release a game?,"CREATE TABLE table_name_14 (year VARCHAR, developer VARCHAR);","SELECT year FROM table_name_14 WHERE developer = ""avatar reality"";","SELECT year FROM table_name_14 WHERE developer = ""avatar reality"";",1 For which season is Tim Mikkelson player of the year?,"CREATE TABLE table_name_87 (season VARCHAR, player_of_the_year VARCHAR);","SELECT season FROM table_name_87 WHERE player_of_the_year = ""tim mikkelson"";","SELECT season FROM table_name_87 WHERE player_of_the_year = ""tim mikkelson"";",1 List the top 3 most common security incidents in the last month from the 'security_incidents' table?,"CREATE TABLE security_incidents (id INT, incident_type VARCHAR(50), incident_count INT, incident_date DATE);","SELECT incident_type, incident_count FROM security_incidents WHERE incident_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH) GROUP BY incident_type ORDER BY incident_count DESC LIMIT 3;","SELECT incident_type, incident_count FROM security_incidents WHERE incident_date >= DATEADD(month, -1, GETDATE()) GROUP BY incident_type ORDER BY incident_count DESC LIMIT 3;",0 "What is the maximum L3 cache of the processor whose speed is 2.00 GHZ, has a QPI speed of 4.8 gt/s, and is model e5504?","CREATE TABLE table_269920_17 (l3_cache__mb_ INTEGER, model VARCHAR, qpi_speed__gt_s_ VARCHAR, speed__ghz_ VARCHAR);","SELECT MAX(l3_cache__mb_) FROM table_269920_17 WHERE qpi_speed__gt_s_ = ""4.8"" AND speed__ghz_ = ""2.00"" AND model = ""E5504"";","SELECT MAX(l3_cache__mb_) FROM table_269920_17 WHERE qpi_speed__gt_s_ = ""2.00"" AND speed__ghz_ = ""4.8"" AND model = ""E5504"";",0 What is the average v-band for Ka-band values under 33 and Q-bands of 1?,"CREATE TABLE table_name_53 (v_band INTEGER, ka_band VARCHAR, q_band VARCHAR);",SELECT AVG(v_band) FROM table_name_53 WHERE ka_band < 33 AND q_band = 1;,SELECT AVG(v_band) FROM table_name_53 WHERE ka_band 33 AND q_band = 1;,0 Delete all marine species records with a population less than 50,"CREATE TABLE marine_species (id INT, name VARCHAR(50), population INT);",DELETE FROM marine_species WHERE population < 50;,DELETE FROM marine_species WHERE population 50;,0 What is the total weight of 'Chicken Wings' sold in the 'Uptown' location?,"CREATE TABLE sales (id INT, menu_id INT, sale_date DATETIME, quantity INT, weight DECIMAL(5,2)); CREATE TABLE menu_items (id INT, name VARCHAR(255), description TEXT);",SELECT SUM(sales.weight) FROM sales INNER JOIN menu_items ON sales.menu_id = menu_items.id WHERE menu_items.name = 'Chicken Wings' AND sales.location = 'Uptown';,SELECT SUM(weight) FROM sales JOIN menu_items ON sales.menu_id = menu_items.id WHERE name = 'Chicken Wings' AND location = 'Uptown';,0 What is the minimum budget allocated for an animal species in the 'animal_budget' table?,"CREATE TABLE animal_budget (species VARCHAR(20), budget INT); ",SELECT MIN(budget) FROM animal_budget;,SELECT MIN(budget) FROM animal_budget;,1 "Insert new records into the 'ocean_temperature' table with the following data: date '2022-06-01', location 'Pacific Ocean', temperature 24, type 'surface'","CREATE TABLE ocean_temperature (date DATE, location VARCHAR(50), temperature INT, type VARCHAR(20));","INSERT INTO ocean_temperature (date, location, temperature, type) VALUES ('2022-06-01', 'Pacific Ocean', 24, 'surface');","INSERT INTO ocean_temperature (date, location, temperature, type) VALUES ('2022-06-01', 'Pacific Ocean', 24,'surface');",0 Which track has the original album turbulent indigo?,"CREATE TABLE table_name_59 (track INTEGER, original_album VARCHAR);","SELECT AVG(track) FROM table_name_59 WHERE original_album = ""turbulent indigo"";","SELECT SUM(track) FROM table_name_59 WHERE original_album = ""turbulent indigo"";",0 When 24.1 million is international tourist arrivals (2012) what is the change (2010 to 2011) ?,"CREATE TABLE table_14752049_6 (change__2010_to_2011_ VARCHAR, international_tourist_arrivals__2012_ VARCHAR);","SELECT change__2010_to_2011_ FROM table_14752049_6 WHERE international_tourist_arrivals__2012_ = ""24.1 million"";","SELECT change__2010_to_2011_ FROM table_14752049_6 WHERE international_tourist_arrivals__2012_ = ""24.1 million"";",1 "What is the Intermediate Sprints Classification Red Jersey that has a Green Jersey of Murilo Antonio Fischer, and Jose Joaquin Rojas Gil?","CREATE TABLE table_name_34 (intermediate_sprints_classification_red_jersey VARCHAR, mountains_classification_green_jersey VARCHAR, points_classification_navy_blue_jersey VARCHAR);","SELECT intermediate_sprints_classification_red_jersey FROM table_name_34 WHERE mountains_classification_green_jersey = ""murilo antonio fischer"" AND points_classification_navy_blue_jersey = ""jose joaquin rojas gil"";","SELECT intermediate_sprints_classification_red_jersey FROM table_name_34 WHERE mountains_classification_green_jersey = ""murilo antonio fischer"" AND points_classification_navy_blue_jersey = ""joaquin rojas gil"";",0 What is the maximum delivery time for packages shipped within the same country?,"CREATE TABLE domestic_delivery_data (delivery_id INT, shipment_id INT, delivery_time INT); ",SELECT MAX(delivery_time) FROM domestic_delivery_data JOIN shipment_data ON domestic_delivery_data.shipment_id = shipment_data.shipment_id WHERE origin_country = destination_country;,SELECT MAX(delivery_time) FROM domestic_delivery_data;,0 Which menu items contain common allergens?,"CREATE TABLE Menu (id INT, name VARCHAR(50), description TEXT, allergens TEXT); ","SELECT name, allergens FROM Menu WHERE allergens IN ('Milk', 'Eggs', 'Wheat');",SELECT name FROM Menu WHERE allergens LIKE '%allergen%';,0 What is the highest number of losses for teams with under 3 draws and 51 points?,"CREATE TABLE table_name_49 (loses INTEGER, draws VARCHAR, points VARCHAR);",SELECT MAX(loses) FROM table_name_49 WHERE draws < 3 AND points = 51;,SELECT MAX(loses) FROM table_name_49 WHERE draws 3 AND points = 51;,0 Find the name of services that have been used for more than 2 times in first notification of loss.,"CREATE TABLE services (service_name VARCHAR, service_id VARCHAR); CREATE TABLE first_notification_of_loss (service_id VARCHAR);",SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id = t2.service_id GROUP BY t1.service_id HAVING COUNT(*) > 2;,SELECT T1.service_name FROM services AS T1 JOIN first_notification_of_loss AS T2 ON T1.service_id = T2.service_id GROUP BY T1.service_id HAVING COUNT(*) > 2;,0 "What is the drafted year when the FCSL Team was Winter Park, in the 4th round?","CREATE TABLE table_name_9 (year_drafted INTEGER, fcsl_team VARCHAR, round VARCHAR);","SELECT MAX(year_drafted) FROM table_name_9 WHERE fcsl_team = ""winter park"" AND round = ""4th"";","SELECT SUM(year_drafted) FROM table_name_9 WHERE fcsl_team = ""winter park"" AND round = ""4th"";",0 "Which Democratic has a District smaller than 7, and a Republican of dan mansell?","CREATE TABLE table_name_99 (democratic VARCHAR, district VARCHAR, republican VARCHAR);","SELECT democratic FROM table_name_99 WHERE district < 7 AND republican = ""dan mansell"";","SELECT democratic FROM table_name_99 WHERE district 7 AND republican = ""dan mansell"";",0 How many ethical fashion brands are based in African countries?,"CREATE TABLE fashion_brands (id INT, country VARCHAR(50), ethical_practices BOOLEAN); ",SELECT COUNT(*) FROM fashion_brands WHERE ethical_practices = true AND country IN (SELECT country FROM countries WHERE continent = 'Africa');,"SELECT COUNT(*) FROM fashion_brands WHERE ethical_practices = TRUE AND country IN ('Nigeria', 'Egypt');",0 Update the 'city_infrastructure' table to change the status of the project with ID 15 to 'Completed',"CREATE TABLE city_infrastructure (project_id INT, project_name VARCHAR(50), project_status VARCHAR(20));",UPDATE city_infrastructure SET project_status = 'Completed' WHERE project_id = 15;,UPDATE city_infrastructure SET project_status = 'Completed' WHERE project_id = 15;,1 "What is the Team that has a Races of 4, and a Points of 0?","CREATE TABLE table_name_10 (team VARCHAR, races VARCHAR, points VARCHAR);","SELECT team FROM table_name_10 WHERE races = ""4"" AND points = ""0"";",SELECT team FROM table_name_10 WHERE races = 4 AND points = 0;,0 What is the population density where area is 48.67?,"CREATE TABLE table_255602_1 (pop_density__per_km²_ VARCHAR, area__km²_ VARCHAR);","SELECT COUNT(pop_density__per_km²_) FROM table_255602_1 WHERE area__km²_ = ""48.67"";","SELECT pop_density__per_km2_ FROM table_255602_1 WHERE area__km2_ = ""48.67"";",0 "What is the largest laps for Time/Retired of + 2 laps, and a Grid of 13?","CREATE TABLE table_name_34 (laps INTEGER, time_retired VARCHAR, grid VARCHAR);","SELECT MAX(laps) FROM table_name_34 WHERE time_retired = ""+ 2 laps"" AND grid = 13;","SELECT MAX(laps) FROM table_name_34 WHERE time_retired = ""+ 2 laps"" AND grid = 13;",1 What date did the T328 that entered service on 18 June 1956 re-enter service?,"CREATE TABLE table_name_22 (re_entered_service__p_ VARCHAR, entered_service__t_ VARCHAR, pre_conversion VARCHAR);","SELECT re_entered_service__p_ FROM table_name_22 WHERE entered_service__t_ = ""18 june 1956"" AND pre_conversion = ""t328"";","SELECT re_entered_service__p_ FROM table_name_22 WHERE entered_service__t_ = ""18 june 1956"" AND pre_conversion = ""t328"";",1 what is the country for geoff ogilvy?,"CREATE TABLE table_name_88 (country VARCHAR, player VARCHAR);","SELECT country FROM table_name_88 WHERE player = ""geoff ogilvy"";","SELECT country FROM table_name_88 WHERE player = ""geoff ogilvy"";",1 "What Tries for has a Team of neath, and Points against larger than 109?","CREATE TABLE table_name_38 (tries_for INTEGER, team VARCHAR, points_against VARCHAR);","SELECT SUM(tries_for) FROM table_name_38 WHERE team = ""neath"" AND points_against > 109;","SELECT SUM(tries_for) FROM table_name_38 WHERE team = ""niceh"" AND points_against > 109;",0 Name the total number of division for fa cups being 9,"CREATE TABLE table_2979789_1 (division VARCHAR, fa_cup_apps VARCHAR);",SELECT COUNT(division) FROM table_2979789_1 WHERE fa_cup_apps = 9;,SELECT COUNT(division) FROM table_2979789_1 WHERE fa_cup_apps = 9;,1 "Name the final place for july 25, 2009","CREATE TABLE table_23819979_3 (final_place VARCHAR, last_match VARCHAR);","SELECT final_place FROM table_23819979_3 WHERE last_match = ""July 25, 2009"";","SELECT final_place FROM table_23819979_3 WHERE last_match = ""July 25, 2009"";",1 "Find the number of female founders in the ""tech"" industry","CREATE TABLE company (id INT, name VARCHAR(255), industry VARCHAR(255)); ",SELECT COUNT(*) FROM company WHERE industry = 'tech' AND gender = 'female';,SELECT COUNT(*) FROM company WHERE industry = 'tech' AND name LIKE '%female%';,0 Name the batting team at Durham,"CREATE TABLE table_11303072_5 (batting_team VARCHAR, fielding_team VARCHAR);","SELECT batting_team FROM table_11303072_5 WHERE fielding_team = ""Durham"";","SELECT batting_team FROM table_11303072_5 WHERE fielding_team = ""Durham"";",1 What type of surface did they play on 23 October 2000?,"CREATE TABLE table_name_67 (surface VARCHAR, date VARCHAR);","SELECT surface FROM table_name_67 WHERE date = ""23 october 2000"";","SELECT surface FROM table_name_67 WHERE date = ""23 october 2000"";",1 What is the average age of patients who have completed the Mindfulness-Based Stress Reduction program?,"CREATE TABLE patient (patient_id INT, name VARCHAR(50), age INT, gender VARCHAR(10), condition VARCHAR(50)); CREATE TABLE treatment (treatment_id INT, patient_id INT, treatment_name VARCHAR(50), start_date DATE, end_date DATE, completed BOOLEAN); ",SELECT AVG(age) FROM patient JOIN treatment ON patient.patient_id = treatment.patient_id WHERE treatment_name = 'Mindfulness-Based Stress Reduction' AND completed = TRUE;,SELECT AVG(patient.age) FROM patient INNER JOIN treatment ON patient.patient_id = treatment.patient_id WHERE treatment.completed = TRUE;,0 What was the year of the last final for the club whose last title was 1990?,"CREATE TABLE table_2869837_1 (last_final VARCHAR, last_title VARCHAR);","SELECT last_final FROM table_2869837_1 WHERE last_title = ""1990"";","SELECT last_final FROM table_2869837_1 WHERE last_title = ""1990"";",1 How many runners-up did Espartanos de Margarita have?,"CREATE TABLE table_name_84 (runners_up VARCHAR, team VARCHAR);","SELECT runners_up FROM table_name_84 WHERE team = ""espartanos de margarita"";","SELECT runners_up FROM table_name_84 WHERE team = ""escpartanos de margarita"";",0 "What is the number of losses for the game with a win % of 71.43%, and No Result is more than 0?","CREATE TABLE table_name_23 (losses INTEGER, win__percentage VARCHAR, no_result VARCHAR);","SELECT SUM(losses) FROM table_name_23 WHERE win__percentage = ""71.43%"" AND no_result > 0;","SELECT SUM(losses) FROM table_name_23 WHERE win__percentage = ""71.43"" AND no_result > 0;",0 What are the points for the GP3 series with 2 podiums?,"CREATE TABLE table_name_92 (points VARCHAR, series VARCHAR, podiums VARCHAR);","SELECT points FROM table_name_92 WHERE series = ""gp3 series"" AND podiums = ""2"";","SELECT points FROM table_name_92 WHERE series = ""gp3"" AND podiums = 2;",0 How many points did Happy Valley score before game 14?,"CREATE TABLE table_name_89 (point VARCHAR, team VARCHAR, game VARCHAR);","SELECT COUNT(point) FROM table_name_89 WHERE team = ""happy valley"" AND game < 14;","SELECT COUNT(point) FROM table_name_89 WHERE team = ""happy valley"" AND game 14;",0 Name the least age for cibao central and santo domingo,"CREATE TABLE table_21346767_3 (age INTEGER, geographical_regions VARCHAR, hometown VARCHAR);","SELECT MIN(age) FROM table_21346767_3 WHERE geographical_regions = ""Cibao Central"" AND hometown = ""Santo Domingo"";","SELECT MIN(age) FROM table_21346767_3 WHERE geographical_regions = ""Cibao Central"" AND hometown = ""Santo Domingo"";",1 Name the least age 30-39 where age 20-29 is 593,"CREATE TABLE table_169693_1 (age_30_39 INTEGER, age_20_29 VARCHAR);",SELECT MIN(age_30_39) FROM table_169693_1 WHERE age_20_29 = 593;,SELECT MIN(age_30_39) FROM table_169693_1 WHERE age_20_29 = 593;,1 Update the garment records with garment_id 1 and 3 to have a price of 25.00 and 35.00 respectively.,"CREATE TABLE Garment (garment_id INT PRIMARY KEY, garment_name VARCHAR(50), category VARCHAR(50), price DECIMAL(10,2)); ",UPDATE Garment SET price = CASE garment_id WHEN 1 THEN 25.00 WHEN 3 THEN 35.00 ELSE price END;,"UPDATE Garment SET price = 25.00 WHERE garment_id IN (1, 3);",0 How many patients with depression were treated in India in the last year?,"CREATE TABLE patients (patient_id INT, has_depression BOOLEAN, treatment_date DATE); ",SELECT COUNT(*) FROM patients WHERE has_depression = TRUE AND treatment_date >= '2021-01-01' AND country = 'India';,"SELECT COUNT(*) FROM patients WHERE has_depression = TRUE AND treatment_date >= DATEADD(year, -1, GETDATE());",0 What is the royal house for Wu at the state of cai?,"CREATE TABLE table_name_45 (royal_house VARCHAR, name VARCHAR, state VARCHAR);","SELECT royal_house FROM table_name_45 WHERE name = ""wu"" AND state = ""cai"";","SELECT royal_house FROM table_name_45 WHERE name = ""wu"" AND state = ""cai"";",1 "When were the ships launched that were laid down on september 1, 1964?","CREATE TABLE table_1014206_2 (launched VARCHAR, laid_down VARCHAR);","SELECT launched FROM table_1014206_2 WHERE laid_down = ""September 1, 1964"";","SELECT launched FROM table_1014206_2 WHERE laid_down = ""September 1, 1964"";",1 List the collective bargaining agreements for the 'Construction Workers Union' and 'Teachers Union'.,"CREATE TABLE CollectiveBargaining (CBAID INT, UnionID INT, AgreementDate DATE); ","SELECT Unions.UnionName, CollectiveBargaining.AgreementDate FROM Unions JOIN CollectiveBargaining ON Unions.UnionID = CollectiveBargaining.UnionID WHERE Unions.UnionName IN ('Construction Workers Union', 'Teachers Union');","SELECT UnionID, AgreementDate FROM CollectiveBargaining WHERE UnionID IN ('Construction Workers Union', 'Teachers Union');",0 What is the average budget for all public schools in each city?,"CREATE TABLE cities (id INT, name VARCHAR(255)); CREATE TABLE schools (id INT, city_id INT, name VARCHAR(255), budget INT);","SELECT c.name, AVG(s.budget) AS avg_budget FROM cities c JOIN schools s ON c.id = s.city_id GROUP BY c.name;","SELECT c.name, AVG(s.budget) as avg_budget FROM cities c JOIN schools s ON c.id = s.city_id GROUP BY c.name;",0 How many patients improved after psychotherapy in each state of the USA?,"CREATE TABLE patients (id INT, state VARCHAR(255), country VARCHAR(255), improvement VARCHAR(255)); CREATE TABLE therapy (patient_id INT, therapy_type VARCHAR(255)); ","SELECT state, COUNT(CASE WHEN improvement = 'Improved' AND country = 'USA' AND therapy_type = 'Psychotherapy' THEN 1 END) as improved_count FROM patients JOIN therapy ON patients.id = therapy.patient_id GROUP BY state;","SELECT p.state, COUNT(p.id) FROM patients p INNER JOIN therapy t ON p.id = t.patient_id WHERE t.therapy_type = 'Psychotherapy' GROUP BY p.state;",0 What is the average CO2 emission (tonnes) for vehicles in 'Germany'?,"CREATE TABLE co2_emissions (vehicle_id INT, country VARCHAR(50), co2_emission FLOAT); ",SELECT AVG(co2_emission) FROM co2_emissions WHERE country = 'Germany';,SELECT AVG(co2_emission) FROM co2_emissions WHERE country = 'Germany';,1 Find the number of unique mental health treatment centers in Canada and Australia.,"CREATE TABLE treatment_centers (id INT, name VARCHAR(255), country VARCHAR(255)); ","SELECT COUNT(DISTINCT country) FROM treatment_centers WHERE country IN ('Canada', 'Australia');","SELECT COUNT(DISTINCT name) FROM treatment_centers WHERE country IN ('Canada', 'Australia');",0 What is the maximum cargo weight transported by 'VesselE' in a single journey?,"CREATE TABLE vessel_performance (vessel_name TEXT, cargo_weight_tonnes INTEGER, journey_id INTEGER); ",SELECT MAX(cargo_weight_tonnes) FROM vessel_performance WHERE vessel_name = 'VesselE';,SELECT MAX(cargo_weight_tonnes) FROM vessel_performance WHERE vessel_name = 'VesselE';,1 Which Democrtic candidate ran against the Socialist candidate Edna Mitchell Blue?,"CREATE TABLE table_name_71 (democratic_ticket VARCHAR, socialist_ticket VARCHAR);","SELECT democratic_ticket FROM table_name_71 WHERE socialist_ticket = ""edna mitchell blue"";","SELECT democratic_ticket FROM table_name_71 WHERE socialist_ticket = ""edna mitchell blue"";",1 What is the date for the game that included a loss of sutcliffe (10-4)?,"CREATE TABLE table_name_45 (date VARCHAR, loss VARCHAR);","SELECT date FROM table_name_45 WHERE loss = ""sutcliffe (10-4)"";","SELECT date FROM table_name_45 WHERE loss = ""soutcliffe (10-4)"";",0 "What opponent has a week less than 12, with November 25, 1965 as the date?","CREATE TABLE table_name_29 (opponent VARCHAR, week VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_29 WHERE week < 12 AND date = ""november 25, 1965"";","SELECT opponent FROM table_name_29 WHERE week 12 AND date = ""november 25, 1965"";",0 What is Australia's highest total?,"CREATE TABLE table_name_86 (total INTEGER, country VARCHAR);","SELECT MAX(total) FROM table_name_86 WHERE country = ""australia"";","SELECT MAX(total) FROM table_name_86 WHERE country = ""australia"";",1 "What is the total installed capacity (in MW) of renewable energy projects in India that were completed after 2018, grouped by type?","CREATE TABLE india_renewable_projects (name TEXT, type TEXT, completion_date DATE, capacity_mw REAL); ","SELECT type, SUM(capacity_mw) FROM india_renewable_projects WHERE completion_date > '2018-12-31' GROUP BY type;","SELECT type, SUM(capacity_mw) FROM india_renewable_projects WHERE completion_date > '2018-01-01' GROUP BY type;",0 which opponent is from February 12?,"CREATE TABLE table_name_1 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_1 WHERE date = ""february 12"";","SELECT opponent FROM table_name_1 WHERE date = ""february 12"";",1 Display the total number of members in the 'technology' union who have been part of the union for over 5 years.,"CREATE TABLE unions (id INT, name TEXT, industry TEXT); CREATE TABLE members (id INT, union_id INT, joining_date DATE); CREATE TABLE union_memberships (member_id INT, union_id INT);","SELECT COUNT(*) FROM members JOIN union_memberships ON members.id = union_memberships.member_id WHERE members.joining_date <= DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR) AND union_memberships.union_id IN (SELECT id FROM unions WHERE industry = 'technology');","SELECT COUNT(DISTINCT members.id) FROM members INNER JOIN union_memberships ON members.union_id = union_memberships.member_id INNER JOIN unions ON union_memberships.union_id = unions.id WHERE unions.name = 'technology' AND members.joining_date >= DATEADD(year, -5, GETDATE());",0 Who wrote the episode with 9.81 million US viewers?,"CREATE TABLE table_28688313_1 (written_by VARCHAR, us_viewers__in_millions_ VARCHAR);","SELECT written_by FROM table_28688313_1 WHERE us_viewers__in_millions_ = ""9.81"";","SELECT written_by FROM table_28688313_1 WHERE us_viewers__in_millions_ = ""9.81"";",1 Name the least amount of losses for 23 points,"CREATE TABLE table_18703133_1 (losses INTEGER, points VARCHAR);",SELECT MIN(losses) FROM table_18703133_1 WHERE points = 23;,SELECT MIN(losses) FROM table_18703133_1 WHERE points = 23;,1 What was the total cost of manufacturing spacecrafts in the year 2024 and 2026?,"CREATE TABLE spacecraft_manufacturing(id INT, cost FLOAT, year INT, manufacturer VARCHAR(20)); ","SELECT SUM(cost) FROM spacecraft_manufacturing WHERE year IN (2024, 2026);","SELECT SUM(cost) FROM spacecraft_manufacturing WHERE year IN (2024, 2026);",1 What is the average enrollment of the IHSAA A class in wolcott?,"CREATE TABLE table_name_34 (enrollment INTEGER, ihsaa_class VARCHAR, location VARCHAR);","SELECT AVG(enrollment) FROM table_name_34 WHERE ihsaa_class = ""a"" AND location = ""wolcott"";","SELECT AVG(enrollment) FROM table_name_34 WHERE ihsaa_class = ""a"" AND location = ""wolcott"";",1 Delete all suppliers from 'Greater Chicago' region,"CREATE TABLE Suppliers (id INT, name TEXT, region TEXT); ",DELETE FROM Suppliers WHERE region = 'Greater Chicago';,DELETE FROM Suppliers WHERE region = 'Greater Chicago';,1 "Which mining sites have a higher than average carbon emissions score, for a specific country?","CREATE TABLE mining_sites (id INT, name VARCHAR(255), country VARCHAR(255), carbon_emissions_score INT); ","SELECT name, carbon_emissions_score FROM mining_sites WHERE country = 'Canada' AND carbon_emissions_score > (SELECT AVG(carbon_emissions_score) FROM mining_sites WHERE country = 'Canada');",SELECT name FROM mining_sites WHERE country = 'USA' AND carbon_emissions_score > (SELECT AVG(carbon_emissions_score) FROM mining_sites WHERE country = 'USA');,0 Who is the director when the production code is 60034?,"CREATE TABLE table_28140588_1 (directed_by VARCHAR, production_code VARCHAR);",SELECT directed_by FROM table_28140588_1 WHERE production_code = 60034;,SELECT directed_by FROM table_28140588_1 WHERE production_code = 60034;,1 Name the least season for round of 32,"CREATE TABLE table_245694_4 (season INTEGER, us_open_cup VARCHAR);","SELECT MIN(season) FROM table_245694_4 WHERE us_open_cup = ""Round of 32"";",SELECT MIN(season) FROM table_245694_4 WHERE us_open_cup = 32;,0 What is the minimum amount of data used in a single day by mobile customers in the 'South America' region?,"CREATE TABLE usage (id INT, subscriber_id INT, data_usage DECIMAL(10,2), type VARCHAR(10), region VARCHAR(10), usage_date DATE); ",SELECT MIN(usage.data_usage) AS min_data_usage FROM usage WHERE usage.type = 'mobile' AND usage.region = 'South America';,SELECT MIN(data_usage) FROM usage WHERE type ='mobile' AND region = 'South America';,0 What is the average price of vegetarian dishes offered by restaurants in California?,"CREATE TABLE restaurants (id INT, name TEXT, location TEXT, type TEXT); CREATE TABLE menu_items (id INT, name TEXT, price DECIMAL(5,2), restaurant_id INT, is_vegetarian BOOLEAN); ",SELECT AVG(price) FROM menu_items INNER JOIN restaurants ON menu_items.restaurant_id = restaurants.id WHERE is_vegetarian = TRUE AND location = 'California';,SELECT AVG(mi.price) FROM menu_items mi JOIN restaurants r ON mi.restaurant_id = r.id WHERE r.location = 'California' AND mi.is_vegetarian = true;,0 Tell me the most crowd for arden street oval venue,"CREATE TABLE table_name_39 (crowd INTEGER, venue VARCHAR);","SELECT MAX(crowd) FROM table_name_39 WHERE venue = ""arden street oval"";","SELECT MAX(crowd) FROM table_name_39 WHERE venue = ""arden street oval"";",1 What is the total funding amount for companies founded by people from underrepresented communities in the technology sector?,"CREATE TABLE Companies (id INT, name TEXT, industry TEXT, founders TEXT, diversity TEXT, funding FLOAT); ",SELECT SUM(funding) FROM Companies WHERE industry = 'Technology' AND diversity = 'Diverse Team';,SELECT SUM(funding) FROM Companies WHERE industry = 'Technology' AND diversity = 'Underrepresented';,0 List the names of all employees who were hired before their manager.,"CREATE TABLE employees (id INT, name VARCHAR(50), manager_id INT, hire_date DATE);","SELECT e1.name FROM employees e1, employees e2 WHERE e1.id = e2.manager_id AND e1.hire_date > e2.hire_date;",SELECT name FROM employees WHERE hire_date (SELECT manager_id FROM employees WHERE hire_date (SELECT hire_date FROM employees WHERE hire_date (SELECT hire_date FROM employees WHERE hire_date (SELECT hire_date FROM employees WHERE hire_date )));,0 List all deep-sea creatures in the Indian Ocean.,"CREATE TABLE deep_sea_creatures (id INT, name TEXT, habitat TEXT, ocean TEXT); ",SELECT * FROM deep_sea_creatures WHERE ocean = 'Indian';,SELECT name FROM deep_sea_creatures WHERE ocean = 'Indian Ocean';,0 "Who are the top three intelligence agency directors with the most successful operations, and what are the names of these operations?","CREATE TABLE intelligence_agency (id INT, name VARCHAR(255), director VARCHAR(255)); CREATE TABLE operation (id INT, agency_id INT, name VARCHAR(255), success_level INT); ","SELECT i.director, o.name FROM operation o JOIN intelligence_agency i ON o.agency_id = i.id ORDER BY o.success_level DESC LIMIT 3;","SELECT i.director, SUM(o.success_level) as total_success_level FROM intelligence_agency i JOIN operation o ON i.id = o.agency_id GROUP BY i.director ORDER BY total_success_level DESC LIMIT 3;",0 "List the number of factories in each region that have implemented Industry 4.0 technologies, along with their respective regions.","CREATE TABLE factories (id INT, name VARCHAR(50), region VARCHAR(20)); CREATE TABLE industry4 (factory_id INT, technology VARCHAR(30)); ","SELECT f.region, COUNT(*) FROM factories f INNER JOIN industry4 i ON f.id = i.factory_id GROUP BY f.region;","SELECT f.region, COUNT(f.id) FROM factories f INNER JOIN industry4 i ON f.id = i4.factory_id WHERE i4.technology = 'Industry 4.0' GROUP BY f.region;",0 "What is the minimum safety score for chemical production plants in the Rocky Mountain region, and how many plants have scores below this minimum value?","CREATE TABLE plants (id INT, name TEXT, location TEXT, safety_score FLOAT); ","SELECT MIN(safety_score) AS min_safety_score, COUNT(*) FROM plants WHERE location = 'Rocky Mountain' AND safety_score < (SELECT MIN(safety_score) FROM plants WHERE location = 'Rocky Mountain');","SELECT MIN(safety_score) as min_safety_score, COUNT(*) as plant_count FROM plants WHERE location = 'Rocky Mountain' AND safety_score (SELECT MIN(safety_score) FROM plants WHERE location = 'Rocky Mountain');",0 Show machines with a 'Chemical' type.,"CREATE TABLE Machines (Id INT, Name VARCHAR(50), Type VARCHAR(50), Status VARCHAR(50)); ",SELECT * FROM Machines WHERE Type = 'Chemical';,SELECT * FROM Machines WHERE Type = 'Chemical';,1 Who are the top 5 threat intelligence sources that have reported the most unique categories in the past week?,"CREATE TABLE threat_intelligence (id INT, source VARCHAR(255), category VARCHAR(255), date DATE); CREATE VIEW threat_summary AS SELECT source, category, date, ROW_NUMBER() OVER (PARTITION BY source ORDER BY date DESC) as rank FROM threat_intelligence;","SELECT source, rank FROM threat_summary WHERE date >= DATEADD(week, -1, CURRENT_DATE) GROUP BY source ORDER BY rank DESC LIMIT 5;","SELECT source, COUNT(DISTINCT category) as unique_category FROM threat_summary WHERE date >= DATEADD(week, -1, GETDATE()) GROUP BY source ORDER BY unique_category DESC LIMIT 5;",0 What was the fate on 27 june 1942?,"CREATE TABLE table_name_44 (fate VARCHAR, date VARCHAR);","SELECT fate FROM table_name_44 WHERE date = ""27 june 1942"";","SELECT fate FROM table_name_44 WHERE date = ""27 june 1942"";",1 Delete the workout with ID 003 from the workouts table.,"CREATE TABLE workouts (id VARCHAR(10), member_id VARCHAR(10), duration INT, date DATE); ",DELETE FROM workouts WHERE id = '003';,DELETE FROM workouts WHERE id = 003;,0 "What was the total spending on rural infrastructure projects in 2020, grouped by project type?","CREATE TABLE rural_infrastructure (year INT, project_type VARCHAR(255), spending FLOAT); ","SELECT project_type, SUM(spending) FROM rural_infrastructure WHERE year = 2020 GROUP BY project_type;","SELECT project_type, SUM(spending) FROM rural_infrastructure WHERE year = 2020 GROUP BY project_type;",1 What is the maximum playtime in a single session?,"CREATE TABLE player_sessions (id INT, player_name TEXT, playtime INT); ",SELECT MAX(playtime) FROM player_sessions;,SELECT MAX(playtime) FROM player_sessions;,1 What are the types and quantities of artifacts found in each excavation site?,"CREATE TABLE excavation_sites (site_id INT, site_name VARCHAR(50), country VARCHAR(50)); CREATE TABLE artifact_inventory (site_id INT, artifact_type VARCHAR(50), quantity INT); ","SELECT e.site_name, a.artifact_type, a.quantity FROM excavation_sites e JOIN artifact_inventory a ON e.site_id = a.site_id;","SELECT excavation_sites.site_name, artifact_type, artifact_inventory.quantity FROM excavation_sites INNER JOIN artifact_inventory ON excavation_sites.site_id = artifact_inventory.site_id GROUP BY excavation_sites.site_name;",0 Name the most pa for ontario ,"CREATE TABLE table_15333005_1 (pa INTEGER, locale VARCHAR, Ontario VARCHAR);",SELECT MAX(pa) FROM table_15333005_1 WHERE locale = Ontario;,"SELECT MAX(pa) FROM table_15333005_1 WHERE locale = ""Ontario"";",0 List the names and research grant amounts for faculty members who have published more than 5 papers in the 'academic_publications' table.,"CREATE TABLE faculty (id INT, name VARCHAR(50), department VARCHAR(20)); CREATE TABLE research_grants (faculty_id INT, grant_amount DECIMAL(10,2)); CREATE TABLE academic_publications (faculty_id INT, paper_count INT);","SELECT f.name, rg.grant_amount FROM faculty f JOIN research_grants rg ON f.id = rg.faculty_id JOIN academic_publications ap ON f.id = ap.faculty_id WHERE ap.paper_count > 5;","SELECT faculty.name, research_grants.grant_amount FROM faculty INNER JOIN research_grants ON faculty.id = research_grants.faculty_id INNER JOIN academic_publications ON faculty.id = academic_publications.faculty_id WHERE academic_publications.paper_count > 5;",0 What is the average CO2 emission per international flight arriving in Brazil?,"CREATE TABLE flight_emissions (flight_number VARCHAR(255), origin VARCHAR(255), destination VARCHAR(255), year INT, co2_emission INT); ",SELECT AVG(co2_emission) FROM flight_emissions WHERE destination = 'Brazil';,SELECT AVG(co2_emission) FROM flight_emissions WHERE origin = 'Brazil' AND destination = 'Brazil';,0 What was the result for the contestant who was a small business owner? ,"CREATE TABLE table_19810459_1 (result VARCHAR, background VARCHAR);","SELECT result FROM table_19810459_1 WHERE background = ""Small business owner"";","SELECT result FROM table_19810459_1 WHERE background = ""Small Business Owner"";",0 How many figures are given for Walker's percentage in Kenosha county?,"CREATE TABLE table_21046399_3 (walker__percentage VARCHAR, county VARCHAR);","SELECT COUNT(walker__percentage) FROM table_21046399_3 WHERE county = ""Kenosha"";","SELECT COUNT(walker__percentage) FROM table_21046399_3 WHERE county = ""Kenosha"";",1 Name the game site with result of w 20-14,"CREATE TABLE table_name_88 (game_site VARCHAR, result VARCHAR);","SELECT game_site FROM table_name_88 WHERE result = ""w 20-14"";","SELECT game_site FROM table_name_88 WHERE result = ""w 20-14"";",1 Show the historical context of artifacts from the Egyptian site.,"CREATE TABLE Artifacts (ArtifactID INT, SiteName TEXT, Description TEXT, HistoricalContext TEXT);",SELECT HistoricalContext FROM Artifacts WHERE SiteName = 'Egyptian Site';,SELECT HistoricalContext FROM Artifacts WHERE SiteName = 'Egyptian';,0 What is the total carbon offset for each renewable energy type?,"CREATE TABLE carbon_offsets (offset_id INTEGER, renewable_type TEXT, offset_amount INTEGER); ","SELECT renewable_type, SUM(offset_amount) FROM carbon_offsets GROUP BY renewable_type;","SELECT renewable_type, SUM(offset_amount) FROM carbon_offsets GROUP BY renewable_type;",1 Which date had a score of 3-2?,"CREATE TABLE table_name_52 (date VARCHAR, score VARCHAR);","SELECT date FROM table_name_52 WHERE score = ""3-2"";","SELECT date FROM table_name_52 WHERE score = ""3-2"";",1 "Insert new exploration data with exploration_id = 303, exploration_name = 'Arctic Drilling', location = 'North Pole', exploratory_status = 'Ongoing'","CREATE TABLE oil_exploration (exploration_id INT PRIMARY KEY, exploration_name VARCHAR(255), location VARCHAR(255), exploratory_status VARCHAR(50));","INSERT INTO oil_exploration (exploration_id, exploration_name, location, exploratory_status) VALUES (303, 'Arctic Drilling', 'North Pole', 'Ongoing');","INSERT INTO oil_exploration (exploration_id, exploration_name, location, exploratory_status) VALUES (303, 'Arctic Drilling', 'North Pole', 'Ongoing');",1 "What is the Wins with a Top-25 of 3, and a Top-5 larger than 1?","CREATE TABLE table_name_86 (wins INTEGER, top_25 VARCHAR, top_5 VARCHAR);",SELECT AVG(wins) FROM table_name_86 WHERE top_25 = 3 AND top_5 > 1;,SELECT SUM(wins) FROM table_name_86 WHERE top_25 = 3 AND top_5 > 1;,0 How many original air dates were there for episodes with a production code of 4398016?,"CREATE TABLE table_21164557_1 (original_air_date VARCHAR, production_code VARCHAR);",SELECT COUNT(original_air_date) FROM table_21164557_1 WHERE production_code = 4398016;,"SELECT COUNT(original_air_date) FROM table_21164557_1 WHERE production_code = ""4398016"";",0 What is the maximum number of daily visitors to cultural heritage sites in Brazil?,"CREATE TABLE cultural_heritage_sites (id INT, name TEXT, country TEXT, daily_visitors INT); ",SELECT MAX(daily_visitors) FROM cultural_heritage_sites WHERE country = 'Brazil';,SELECT MAX(daily_visitors) FROM cultural_heritage_sites WHERE country = 'Brazil';,1 WHAT IS THE PLACE WITH PLAYER mark o'meara?,"CREATE TABLE table_name_78 (place VARCHAR, player VARCHAR);","SELECT place FROM table_name_78 WHERE player = ""mark o'meara"";","SELECT place FROM table_name_78 WHERE player = ""mark o'meara"";",1 What is the Irish name for the £1 fraction of 1/240?,"CREATE TABLE table_1682865_1 (irish_name VARCHAR, £1_fraction VARCHAR);","SELECT irish_name FROM table_1682865_1 WHERE £1_fraction = ""1/240"";","SELECT irish_name FROM table_1682865_1 WHERE £1_fraction = ""1/240"";",1 What is the highest round number for donnie caraway?,"CREATE TABLE table_name_6 (round INTEGER, name VARCHAR);","SELECT MAX(round) FROM table_name_6 WHERE name = ""donnie caraway"";","SELECT MAX(round) FROM table_name_6 WHERE name = ""donnie caraway"";",1 Which venue has a Result of 1–2?,"CREATE TABLE table_name_98 (venue VARCHAR, result VARCHAR);","SELECT venue FROM table_name_98 WHERE result = ""1–2"";","SELECT venue FROM table_name_98 WHERE result = ""1–2"";",1 "What is the total number of people in attendance when the game was at TD Banknorth Garden, in a game higher than 31?","CREATE TABLE table_name_20 (attendance VARCHAR, location VARCHAR, game VARCHAR);","SELECT COUNT(attendance) FROM table_name_20 WHERE location = ""td banknorth garden"" AND game > 31;","SELECT COUNT(attendance) FROM table_name_20 WHERE location = ""td banknorth garden"" AND game > 31;",1 What is the Origin of Programming for the Network NDTV India?,"CREATE TABLE table_name_98 (origin_of_programming VARCHAR, network VARCHAR);","SELECT origin_of_programming FROM table_name_98 WHERE network = ""ndtv india"";","SELECT origin_of_programming FROM table_name_98 WHERE network = ""ndtv india"";",1 What was the competition on 29 November 1997 that resulted in a draw?,"CREATE TABLE table_name_97 (competition VARCHAR, result VARCHAR, date VARCHAR);","SELECT competition FROM table_name_97 WHERE result = ""draw"" AND date = ""29 november 1997"";","SELECT competition FROM table_name_97 WHERE result = ""draw"" AND date = ""29 november 1997"";",1 Update the nutritional information of a specific dish across all restaurants serving it.,"CREATE TABLE Dishes (DishID int, Name varchar(50), Category varchar(50), CaloricContent int); CREATE TABLE Restaurants (RestaurantID int, Name varchar(50), Location varchar(50)); ",UPDATE Dishes SET CaloricContent = 400 WHERE Name = 'Quinoa Salad';,UPDATE Dishes SET CaloricContent = 'CaloricContent' WHERE Name = 'Dish';,0 "What is the largest amount of bronze medals when the silver medals are less than 1, and Belgium (BEL) is the nation, and the gold medals are less than 0?","CREATE TABLE table_name_18 (bronze INTEGER, gold VARCHAR, silver VARCHAR, nation VARCHAR);","SELECT MAX(bronze) FROM table_name_18 WHERE silver < 1 AND nation = ""belgium (bel)"" AND gold < 0;","SELECT MAX(bronze) FROM table_name_18 WHERE silver 1 AND nation = ""belgium (bel)"" AND gold 0;",0 "What is the average number of bronze medals with 1 silver, 5 gold, and over 6 total medals?","CREATE TABLE table_name_85 (bronze INTEGER, total VARCHAR, silver VARCHAR, gold VARCHAR);",SELECT AVG(bronze) FROM table_name_85 WHERE silver = 1 AND gold = 5 AND total < 6;,SELECT AVG(bronze) FROM table_name_85 WHERE silver = 1 AND gold = 5 AND total > 6;,0 What was Melbourne's score as the home team?,CREATE TABLE table_name_16 (home_team VARCHAR);,"SELECT home_team AS score FROM table_name_16 WHERE home_team = ""melbourne"";","SELECT home_team AS score FROM table_name_16 WHERE home_team = ""melbourne"";",1 Find the total number of network infrastructure investments in each country,"CREATE TABLE country_investments (investment_id INT, country VARCHAR(10), investment_amount FLOAT);","SELECT country, SUM(investment_amount) FROM country_investments GROUP BY country;","SELECT country, COUNT(*) FROM country_investments GROUP BY country;",0 Which authors have published more than one paper?,"CREATE TABLE Publications (publication_id INT, author_id INT, title TEXT); ",SELECT author_id FROM Publications GROUP BY author_id HAVING COUNT(*) > 1;,SELECT author_id FROM Publications GROUP BY author_id HAVING COUNT(*) > 1;,1 How many electric vehicles were sold in California in 2021?,"CREATE TABLE vehicle_sales (year INT, state VARCHAR(255), vehicle_type VARCHAR(255), sales INT); ",SELECT SUM(sales) FROM vehicle_sales WHERE year = 2021 AND state = 'California' AND vehicle_type = 'Electric';,SELECT SUM(sales) FROM vehicle_sales WHERE state = 'California' AND vehicle_type = 'Electric' AND year = 2021;,0 Tell me the grantee for las pulgas in 1795,"CREATE TABLE table_name_6 (grantee VARCHAR, date VARCHAR, concession VARCHAR);","SELECT grantee FROM table_name_6 WHERE date = 1795 AND concession = ""las pulgas"";","SELECT grantee FROM table_name_6 WHERE date = ""1795"" AND concession = ""las pulgas"";",0 What is the month sequence for the month name of av?,"CREATE TABLE table_28985631_1 (month_sequence INTEGER, month_name VARCHAR);","SELECT MIN(month_sequence) FROM table_28985631_1 WHERE month_name = ""Av"";","SELECT MAX(month_sequence) FROM table_28985631_1 WHERE month_name = ""AV"";",0 Identify marine life species that have not been observed in the last 3 years in the marine_sightings table.,"CREATE TABLE marine_sightings (id INT, marine_life_type VARCHAR(255), sighting_date DATE); ",SELECT marine_life_type FROM marine_sightings WHERE sighting_date < (CURRENT_DATE - INTERVAL '3 years');,"SELECT marine_life_type FROM marine_sightings WHERE sighting_date DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR);",0 "What is the total number of hours played by players in the ""RacingRivals"" table, who have played for more than 20 hours and have more than 5 wins?","CREATE TABLE RacingRivals (PlayerID INT, HoursPlayed INT, Wins INT); ",SELECT SUM(HoursPlayed) FROM RacingRivals WHERE HoursPlayed > 20 AND Wins > 5;,SELECT SUM(HoursPlayed) FROM RacingRivals WHERE HoursPlayed > 20 AND Wins > 5;,1 What is the total revenue for 'Italian' and 'Chinese' dishes?,"CREATE TABLE menus (menu_id INT, dish_name VARCHAR(50), dish_type VARCHAR(50), price DECIMAL(5,2), sales INT);","SELECT SUM(price * sales) FROM menus WHERE dish_type IN ('Italian', 'Chinese');","SELECT SUM(price * sales) FROM menus WHERE dish_type IN ('Italian', 'Chinese');",1 Delete the record of the aquaculture site in Norway with the highest salinity level?,"CREATE TABLE norway_aquaculture_sites (site_id INT, site_name TEXT, salinity FLOAT, country TEXT); ",DELETE FROM norway_aquaculture_sites WHERE salinity = (SELECT MAX(salinity) FROM norway_aquaculture_sites);,DELETE FROM norway_aquaculture_sites WHERE salinity = (SELECT MAX(salinity) FROM norway_aquaculture_sites);,1 How many mining operations are there in each region with at least one violation?,"CREATE TABLE mining_violations (operation_id INT, region VARCHAR(20), has_violation BOOLEAN); ","SELECT region, COUNT(*) FROM mining_violations WHERE has_violation = TRUE GROUP BY region;","SELECT region, COUNT(*) FROM mining_violations WHERE has_violation = true GROUP BY region;",0 Delete inactive users,"CREATE TABLE devices (id INT PRIMARY KEY, user_id INT, device_type VARCHAR(50), last_seen TIMESTAMP); ",DELETE FROM devices WHERE last_seen < '2022-01-01';,DELETE FROM devices WHERE user_id IN (SELECT user_id FROM devices WHERE device_type = 'Inactive');,0 "What is the Date when the label was alfa records, and a Catalog of alca-487?","CREATE TABLE table_name_61 (date VARCHAR, label VARCHAR, catalog VARCHAR);","SELECT date FROM table_name_61 WHERE label = ""alfa records"" AND catalog = ""alca-487"";","SELECT date FROM table_name_61 WHERE label = ""alfa records"" AND catalog = ""alca-487"";",1 List the top 2 donors from Kenya based on their total donation amount in 2021.,"CREATE TABLE Donors (id INT, name TEXT, country TEXT, donation_amount DECIMAL(10, 2), donation_date DATE); ","SELECT name, SUM(donation_amount) AS total_donation FROM Donors WHERE country = 'Kenya' AND YEAR(donation_date) = 2021 GROUP BY name ORDER BY total_donation DESC LIMIT 2;","SELECT name, SUM(donation_amount) as total_donation FROM Donors WHERE country = 'Kenya' AND YEAR(donation_date) = 2021 GROUP BY name ORDER BY total_donation DESC LIMIT 2;",0 Which Bullet diameter has a Name of 11.4mm werndl m/73?,"CREATE TABLE table_name_22 (bullet_diameter VARCHAR, name VARCHAR);","SELECT bullet_diameter FROM table_name_22 WHERE name = ""11.4mm werndl m/73"";","SELECT bullet_diameter FROM table_name_22 WHERE name = ""11.4mm werndl m/73"";",1 Which organic grocery stores in New York City sell locally sourced fruits?,"CREATE TABLE Store (id INT, name VARCHAR(50), city VARCHAR(50)); CREATE TABLE Inventory (id INT, store_id INT, item VARCHAR(50), is_local BOOLEAN, is_organic BOOLEAN); ",SELECT s.name FROM Store s JOIN Inventory i ON s.id = i.store_id WHERE s.city = 'New York' AND i.is_local = TRUE AND i.is_organic = TRUE AND i.item LIKE 'F%';,SELECT Store.name FROM Store INNER JOIN Inventory ON Store.id = Inventory.store_id WHERE Inventory.is_organic = true AND Inventory.is_local = true AND Store.city = 'New York City';,0 What is the total carbon offset for the year 2020 for the 'Transportation' sector?,"CREATE TABLE Carbon_Offset_Programs (id INT, sector VARCHAR(20), year INT, carbon_offset_amount INT); ",SELECT SUM(carbon_offset_amount) FROM Carbon_Offset_Programs WHERE sector = 'Transportation' AND year = 2020;,SELECT SUM(carbon_offset_amount) FROM Carbon_Offset_Programs WHERE sector = 'Transportation' AND year = 2020;,1 "Rank smaller than 5, and a Time of 31’ 03.093 is what rider?","CREATE TABLE table_name_8 (rider VARCHAR, rank VARCHAR, time VARCHAR);","SELECT rider FROM table_name_8 WHERE rank < 5 AND time = ""31’ 03.093"";","SELECT rider FROM table_name_8 WHERE rank 5 AND time = ""31’ 03.093"";",0 How many drivers are from Hartford city or younger than 40?,"CREATE TABLE driver (home_city VARCHAR, age VARCHAR);",SELECT COUNT(*) FROM driver WHERE home_city = 'Hartford' OR age < 40;,"SELECT COUNT(*) FROM driver WHERE home_city = ""Hartford"" OR age 40;",0 How many patients were treated in 'RuralHealthFacility2' in June 2020?,"CREATE TABLE RuralHealthFacility2 (id INT, date DATE, treatment INT); ",SELECT SUM(treatment) FROM RuralHealthFacility2 WHERE date BETWEEN '2020-06-01' AND '2020-06-30';,SELECT COUNT(*) FROM RuralHealthFacility2 WHERE date BETWEEN '2020-06-01' AND '2020-06-30';,0 List all artists who have streamed in the USA and held concerts in Canada.,"CREATE TABLE music_streaming (artist_id INT, artist_name VARCHAR(100), genre VARCHAR(50), country VARCHAR(50)); CREATE TABLE concert_ticket_sales (concert_id INT, artist_id INT, concert_date DATE, venue VARCHAR(100), country VARCHAR(50));",SELECT DISTINCT artist_name FROM music_streaming WHERE country = 'USA' INTERSECT SELECT DISTINCT artist_name FROM concert_ticket_sales WHERE country = 'Canada';,SELECT a.artist_name FROM music_streaming a INNER JOIN concert_ticket_sales cts ON a.artist_id = cts.artist_id WHERE a.country = 'USA' AND cts.country = 'Canada';,0 When did Richmond play an away game against Collingwood?,"CREATE TABLE table_name_36 (date VARCHAR, away_team VARCHAR);","SELECT date FROM table_name_36 WHERE away_team = ""richmond"";","SELECT date FROM table_name_36 WHERE away_team = ""collingwood"";",0 "How many unique ingredients are used in cosmetics products from ""clean beauty"" brands?","CREATE TABLE products_ingredients (id INT, product VARCHAR(100), brand VARCHAR(100), ingredient VARCHAR(100));","SELECT brand, COUNT(DISTINCT ingredient) as unique_ingredients FROM products_ingredients WHERE brand IN ('BrandA', 'BrandB', 'BrandC') GROUP BY brand;",SELECT COUNT(DISTINCT ingredient) FROM products_ingredients WHERE brand = 'clean beauty';,0 Identify bioprocess engineering companies in India that started a new project in 2021.,"CREATE TABLE company_in (id INT PRIMARY KEY, name VARCHAR(255), location VARCHAR(255), industry VARCHAR(255)); CREATE TABLE project_in (id INT PRIMARY KEY, company_id INT, project_name VARCHAR(255), start_date DATE); ","SELECT c.name FROM company_in c JOIN project_in p ON c.id = p.company_id WHERE c.industry = 'Bioprocess Engineering' AND c.location = 'Bangalore, India' AND p.start_date >= '2021-01-01';",SELECT company_in.name FROM company_in INNER JOIN project_in ON company_in.id = project_in.company_id WHERE company_in.location = 'India' AND project_in.start_date BETWEEN '2021-01-01' AND '2021-12-31';,0 Name the 2010 for 2006 of 2r,CREATE TABLE table_name_9 (Id VARCHAR);,"SELECT 2010 FROM table_name_9 WHERE 2006 = ""2r"";","SELECT 2010 FROM table_name_9 WHERE 2006 = ""2r"";",1 What is the average speed of vessels that have a maximum speed greater than 25 knots?,"CREATE TABLE Vessels (Id INT, Name VARCHAR(100), MaxSpeed FLOAT); ",SELECT AVG(MaxSpeed) FROM Vessels WHERE MaxSpeed > 25;,SELECT AVG(MaxSpeed) FROM Vessels WHERE MaxSpeed > 25;,1 Identify the top 3 mining companies in South America with the highest labor productivity.,"CREATE TABLE company (id INT, name VARCHAR(255), country VARCHAR(255), employees INT, revenue DECIMAL(10,2));CREATE VIEW mining_companies AS SELECT * FROM company WHERE industry = 'Mining';","SELECT c.name, AVG(c.revenue / c.employees) as labor_productivity FROM mining_companies c WHERE c.country LIKE '%South America%' GROUP BY c.name ORDER BY labor_productivity DESC LIMIT 3;","SELECT company.name, SUM(revenue) as total_revenue FROM company INNER JOIN mining_companies ON company.country = mining_companies.company WHERE mining_companies.industry = 'South America' GROUP BY company.name ORDER BY total_revenue DESC LIMIT 3;",0 What is the preservation status of indigenous languages in the 'language_preservation' schema in the Asia-Pacific region?,"CREATE TABLE language_preservation (id INT, language VARCHAR(255), region VARCHAR(255), status VARCHAR(255)); ","SELECT language, status FROM language_preservation.language_preservation WHERE region = 'Asia-Pacific';",SELECT status FROM language_preservation WHERE region = 'Asia-Pacific';,0 What is the total amount of government spending on education by state in 2021?,"CREATE TABLE spending (id INT, department VARCHAR(50), year INT, amount FLOAT); ","SELECT department, state, SUM(amount) as total_spending FROM spending WHERE year = 2021 AND department = 'Education' GROUP BY department, state;","SELECT state, SUM(amount) FROM spending WHERE department = 'Education' AND year = 2021 GROUP BY state;",0 How many Laps with a Grid smaller than 11 did John Watson have?,"CREATE TABLE table_name_71 (laps INTEGER, driver VARCHAR, grid VARCHAR);","SELECT AVG(laps) FROM table_name_71 WHERE driver = ""john watson"" AND grid < 11;","SELECT SUM(laps) FROM table_name_71 WHERE driver = ""john watson"" AND grid 11;",0 Which conference has the nickname Lions?,"CREATE TABLE table_1973729_2 (current_conference VARCHAR, nickname VARCHAR);","SELECT current_conference FROM table_1973729_2 WHERE nickname = ""Lions"";","SELECT current_conference FROM table_1973729_2 WHERE nickname = ""Lions"";",1 What is the total biomass of fish in farms located in Country C?,"CREATE TABLE Farm (FarmID int, FarmName varchar(50), Location varchar(50)); CREATE TABLE FishStock (FishStockID int, FishSpecies varchar(50), FarmID int, Biomass numeric); ",SELECT SUM(Biomass) FROM FishStock WHERE FarmID IN (SELECT FarmID FROM Farm WHERE Location = 'Country C');,SELECT SUM(FishStock.Biomass) FROM Farm INNER JOIN FishStock ON Farm.FarmID = FishStock.FarmID WHERE Farm.Location = 'Country C';,0 How many fans identify as female or non-binary for each team in the NBA?,"CREATE TABLE teams (team_id INT, team_name VARCHAR(50)); CREATE TABLE fans (fan_id INT, team_id INT, gender VARCHAR(50)); ","SELECT t.team_name, COUNT(CASE WHEN f.gender IN ('Female', 'Non-binary') THEN 1 END) as fan_count FROM teams t JOIN fans f ON t.team_id = f.team_id GROUP BY t.team_name;","SELECT t.team_name, COUNT(f.fan_id) as num_fans FROM teams t JOIN fans f ON t.team_id = f.team_id WHERE f.gender IN ('Female', 'Non-binary') GROUP BY t.team_name;",0 What is the total number of veteran employment applications received in the state of Texas in the year 2021?,"CREATE TABLE veteran_employment (application_id INT, state VARCHAR(255), application_date DATE); ",SELECT COUNT(*) FROM veteran_employment WHERE state = 'Texas' AND EXTRACT(YEAR FROM application_date) = 2021;,SELECT COUNT(*) FROM veteran_employment WHERE state = 'Texas' AND YEAR(application_date) = 2021;,0 "what was the participation for saturday, may 12","CREATE TABLE table_27893892_2 (attendance INTEGER, date VARCHAR);","SELECT MAX(attendance) FROM table_27893892_2 WHERE date = ""Saturday, May 12"";","SELECT MAX(attendance) FROM table_27893892_2 WHERE date = ""Saturday, May 12"";",1 Find the number of criminal justice reform cases handled by legal aid attorneys,"CREATE TABLE legal_aid_attorneys (attorney_id INT, name VARCHAR(50), cases_handled INT, cases_type VARCHAR(50)); ",SELECT SUM(cases_handled) FROM legal_aid_attorneys WHERE cases_type LIKE '%criminal justice reform%';,SELECT COUNT(*) FROM legal_aid_attorneys WHERE cases_handled > 0 AND cases_type = 'Criminal Justice Reform';,0 What is the average attendance at events for each event type?,"CREATE TABLE EventTypes (EventTypeID INT, EventTypeName VARCHAR(50)); CREATE TABLE EventAttendance (EventID INT, EventTypeID INT, Attendees INT); ","SELECT et.EventTypeName, AVG(ea.Attendees) as AvgAttendance FROM EventTypes et INNER JOIN EventAttendance ea ON et.EventTypeID = ea.EventTypeID GROUP BY et.EventTypeName;","SELECT EventTypes.EventTypeName, AVG(EAttendance.Attendees) as AvgAttendance FROM EventTypes INNER JOIN EventAttendance ON EventTypes.EventTypeID = EventAttendance.EventTypeID GROUP BY EventTypes.EventTypeName;",0 What is the total revenue for movies released before 2015 and after 2020?,"CREATE TABLE movies (id INT, title VARCHAR(100), genre VARCHAR(50), release_year INT, revenue INT); ",SELECT SUM(revenue) FROM movies WHERE release_year < 2015 OR release_year > 2020;,SELECT SUM(revenue) FROM movies WHERE release_year 2015 AND release_year > 2020;,0 How many professional development courses have been completed by teachers in each region?,"CREATE TABLE teachers (teacher_id INT, teacher_name VARCHAR(50), region VARCHAR(20), courses_completed INT); ","SELECT region, SUM(courses_completed) as total_courses FROM teachers GROUP BY region;","SELECT region, SUM(courses_completed) FROM teachers GROUP BY region;",0 What contestant was premiered on July 25? ,"CREATE TABLE table_18513028_3 (contestant_name VARCHAR, date_premiered__2009_ VARCHAR);","SELECT contestant_name FROM table_18513028_3 WHERE date_premiered__2009_ = ""July 25"";","SELECT contestant_name FROM table_18513028_3 WHERE date_premiered__2009_ = ""July 25"";",1 What is the census ranking for the Perth parish?,"CREATE TABLE table_176524_2 (census_ranking VARCHAR, official_name VARCHAR);","SELECT census_ranking FROM table_176524_2 WHERE official_name = ""Perth"";","SELECT census_ranking FROM table_176524_2 WHERE official_name = ""Perth"";",1 What is the total donation amount for the 'Education' program and total volunteer hours for the 'Animal Welfare' program?,"CREATE TABLE donations (id INT, program VARCHAR(255), amount DECIMAL(10, 2)); CREATE TABLE volunteers (id INT, program VARCHAR(255), hours INT); ",SELECT SUM(d.amount) FROM donations d WHERE d.program = 'Education'; SELECT SUM(v.hours) FROM volunteers v WHERE v.program = 'Animal Welfare';,"SELECT SUM(donations.amount) AS total_donation, SUM(volunteers.hours) AS total_volunteer_hours FROM donations INNER JOIN volunteers ON donations.program = volunteers.program WHERE donations.program = 'Education' AND volunteers.program = 'Animal Welfare';",0 What Service Name has UTV as the owner?,"CREATE TABLE table_name_60 (service_name VARCHAR, owner VARCHAR);","SELECT service_name FROM table_name_60 WHERE owner = ""utv"";","SELECT service_name FROM table_name_60 WHERE owner = ""utv"";",1 How many artists are associated with each platform?,"CREATE TABLE Artists (artist_id INT, artist_name VARCHAR(255)); CREATE TABLE ArtistPlatforms (artist_id INT, platform_id INT); CREATE TABLE Platforms (platform_id INT, platform_name VARCHAR(255)); ","SELECT p.platform_name, COUNT(DISTINCT a.artist_id) AS artist_count FROM ArtistPlatforms ap JOIN Artists a ON ap.artist_id = a.artist_id JOIN Platforms p ON ap.platform_id = p.platform_id GROUP BY p.platform_name;","SELECT p.platform_name, COUNT(a.artist_id) FROM Artists a JOIN ArtistPlatforms ap ON a.artist_id = ap.artist_id JOIN Platforms p ON ap.platform_id = p.platform_id GROUP BY p.platform_name;",0 Find players with the most matches played in a specific time range,"CREATE TABLE playerperformances (player_id INT, game_id INT, match_date DATE, kills INT, deaths INT); ","SELECT player_id, COUNT(*) as num_matches, RANK() OVER (ORDER BY COUNT(*) DESC) as rank FROM playerperformances WHERE match_date BETWEEN '2022-01-01' AND '2022-02-01' GROUP BY player_id","SELECT player_id, SUM(kills) as total_matches FROM playerperformances GROUP BY player_id ORDER BY total_matches DESC LIMIT 1;",0 What is the minimum quantity of sustainable packaging materials available for orders?,"CREATE TABLE SustainablePackaging (id INT, material VARCHAR(50), quantity INT); ",SELECT MIN(quantity) FROM SustainablePackaging;,SELECT MIN(quantity) FROM SustainablePackaging;,1 Calculate the average streaming volume for each music genre in Q1 2021.,"CREATE TABLE streaming_data (stream_id INT, track_name VARCHAR(100), artist_name VARCHAR(100), genre VARCHAR(50), streams INT, stream_date DATE); ","SELECT genre, AVG(streams) as avg_q1_streams FROM streaming_data WHERE YEAR(stream_date) = 2021 AND MONTH(stream_date) BETWEEN 1 AND 3 GROUP BY genre;","SELECT genre, AVG(streams) as avg_streams FROM streaming_data WHERE stream_date BETWEEN '2021-01-01' AND '2021-03-31' GROUP BY genre;",0 What is the total quantity of 'organic cotton' products sold by suppliers in California?,"CREATE TABLE suppliers(supplier_id INT, supplier_name TEXT, state TEXT); CREATE TABLE products(product_id INT, product_name TEXT, supplier_id INT); CREATE TABLE sales(sale_id INT, product_id INT, quantity INT); ",SELECT SUM(sales.quantity) FROM sales JOIN products ON sales.product_id = products.product_id JOIN suppliers ON products.supplier_id = suppliers.supplier_id WHERE suppliers.state = 'California' AND products.product_name LIKE '%organic cotton%';,SELECT SUM(quantity) FROM sales JOIN products ON sales.product_id = products.product_id JOIN suppliers ON sales.supplier_id = suppliers.supplier_id WHERE products.product_name = 'organic cotton' AND suppliers.state = 'California';,0 How many clinical trials were approved for each country in 2020?,"CREATE TABLE clinical_trials (trial_id INT, country VARCHAR(255), approval_date DATE);","SELECT country, COUNT(*) as num_trials FROM clinical_trials WHERE YEAR(approval_date) = 2020 GROUP BY country;","SELECT country, COUNT(*) FROM clinical_trials WHERE approval_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY country;",0 How many community development initiatives were planned in 2018?,"CREATE TABLE community_development (id INT, year INT, initiative VARCHAR(50), status VARCHAR(20)); ",SELECT COUNT(*) FROM community_development WHERE year = 2018 AND status = 'Planned';,SELECT COUNT(*) FROM community_development WHERE year = 2018 AND status = 'Planned';,1 How many players from each continent play Non-VR games?,"CREATE TABLE countries (id INT, name VARCHAR(255), continent VARCHAR(255)); ","SELECT c.continent, COUNT(DISTINCT p.id) as num_players FROM players p JOIN player_games pg ON p.id = pg.player_id JOIN games g ON pg.game_id = g.id JOIN countries c ON p.country = c.name WHERE g.category = 'Non-VR' GROUP BY c.continent;","SELECT continent, COUNT(*) as num_players FROM countries WHERE id NOT IN (SELECT id FROM games WHERE id NOT IN (SELECT id FROM games WHERE id NOT IN (SELECT id FROM games WHERE id NOT IN (SELECT id FROM games WHERE id NOT IN)) GROUP BY continent;",0 What Country has a Director of 2007?,"CREATE TABLE table_name_43 (country VARCHAR, director_s_ VARCHAR);","SELECT country FROM table_name_43 WHERE director_s_ = ""2007"";",SELECT country FROM table_name_43 WHERE director_s_ = 2007;,0 what is the date when the home team is st kilda?,"CREATE TABLE table_name_26 (date VARCHAR, home_team VARCHAR);","SELECT date FROM table_name_26 WHERE home_team = ""st kilda"";","SELECT date FROM table_name_26 WHERE home_team = ""st kilda"";",1 What is the most popular genre of TV shows?,"CREATE TABLE shows_viewers (show_id INT, viewer_id INT, genre VARCHAR(255)); ","SELECT genre, COUNT(*) AS total FROM shows_viewers GROUP BY genre ORDER BY total DESC LIMIT 1;","SELECT genre, COUNT(*) as num_shows FROM shows_viewers GROUP BY genre ORDER BY num_shows DESC LIMIT 1;",0 What is the total tourism revenue for South America in 2020?,"CREATE TABLE tourism_revenue (id INT, destination VARCHAR, region VARCHAR, revenue FLOAT, year INT); ",SELECT SUM(revenue) FROM tourism_revenue WHERE region = 'South America' AND year = 2020;,SELECT SUM(revenue) FROM tourism_revenue WHERE region = 'South America' AND year = 2020;,1 What is the average cargo weight per vessel for vessels that have visited ports in Africa?,"CREATE TABLE Vessels (VesselID INT, Name VARCHAR(255), Type VARCHAR(255), Flag VARCHAR(255)); CREATE TABLE PortVisits (VisitID INT, VesselID INT, Port VARCHAR(255), VisitDate DATE); CREATE TABLE Cargo (CargoID INT, VesselID INT, Weight INT); ",SELECT AVG(Cargo.Weight) FROM Vessels INNER JOIN PortVisits ON Vessels.VesselID = PortVisits.VesselID INNER JOIN Cargo ON Vessels.VesselID = Cargo.VesselID WHERE PortVisits.Port LIKE 'Africa%' GROUP BY Vessels.VesselID;,SELECT AVG(Cargo.Weight) FROM Cargo INNER JOIN Vessels ON Cargo.VesselID = Vessels.VesselID INNER JOIN PortVisits ON Cargo.VesselID = PortVisits.VesselID WHERE PortVisits.Port = 'Africa';,0 Tell me the average spectators for 2006-06-21 and time more than 21,"CREATE TABLE table_name_56 (spectators INTEGER, date VARCHAR, time_cet_ VARCHAR);","SELECT AVG(spectators) FROM table_name_56 WHERE date = ""2006-06-21"" AND time_cet_ > 21;","SELECT AVG(spectators) FROM table_name_56 WHERE date = ""2006-06-21"" AND time_cet_ > 21;",1 Find the average age of bridges in each state,"CREATE TABLE Bridges (bridge_id int, bridge_name varchar(255), year int, location varchar(255));","SELECT state, AVG(YEAR(CURRENT_DATE) - year) AS avg_age FROM Bridges GROUP BY state;","SELECT location, AVG(year) as avg_age FROM Bridges GROUP BY location;",0 Who was the opposing team in the game with a score of 21-17?,"CREATE TABLE table_name_49 (opp_team VARCHAR, score VARCHAR);","SELECT opp_team FROM table_name_49 WHERE score = ""21-17"";","SELECT opp_team FROM table_name_49 WHERE score = ""21-17"";",1 List all cultural heritage sites and their virtual tour availability in Tokyo,"CREATE TABLE heritage_sites (id INT, name TEXT, city TEXT, has_virtual_tour BOOLEAN); ","SELECT name, has_virtual_tour FROM heritage_sites WHERE city = 'Tokyo';","SELECT name, has_virtual_tour FROM heritage_sites WHERE city = 'Tokyo';",1 Which Water has a Metal of contracting?,"CREATE TABLE table_name_72 (water VARCHAR, metal VARCHAR);","SELECT water FROM table_name_72 WHERE metal = ""contracting"";","SELECT water FROM table_name_72 WHERE metal = ""contracting"";",1 "Which League has a Venue of martin luther king, jr. recreation center?","CREATE TABLE table_name_95 (league VARCHAR, venue VARCHAR);","SELECT league FROM table_name_95 WHERE venue = ""martin luther king, jr. recreation center"";","SELECT league FROM table_name_95 WHERE venue = ""martin luther king, jr. recreation center"";",1 Calculate the total number of gluten-free and vegetarian products in stock.,"CREATE TABLE Inventory (product_id INT, product_name VARCHAR(100), is_gluten_free BOOLEAN, is_vegetarian BOOLEAN); ",SELECT SUM(CASE WHEN is_gluten_free = true THEN 1 ELSE 0 END + CASE WHEN is_vegetarian = true THEN 1 ELSE 0 END) FROM Inventory;,SELECT COUNT(*) FROM Inventory WHERE is_gluten_free = true AND is_vegetarian = true;,0 How many communication satellites were launched by SpaceX before 2020?,"CREATE TABLE satellites (id INT, name VARCHAR(50), company VARCHAR(50), launch_year INT); ",SELECT COUNT(*) FROM satellites WHERE company = 'SpaceX' AND launch_year < 2020;,SELECT COUNT(*) FROM satellites WHERE company = 'SpaceX' AND launch_year 2020;,0 "What is the total installed capacity of wind and solar power plants in Germany and France, by year?","CREATE TABLE wind_power (country text, year integer, capacity integer);CREATE TABLE solar_power (country text, year integer, capacity integer);","SELECT w.year, SUM(w.capacity + s.capacity) FROM wind_power w INNER JOIN solar_power s ON w.country = s.country AND w.year = s.year WHERE w.country IN ('Germany', 'France') GROUP BY w.year;","SELECT year, SUM(wind_power.capacity) as total_capacity FROM wind_power INNER JOIN solar_power ON wind_power.country = solar_power.country WHERE wind_power.country IN ('Germany', 'France') GROUP BY year;",0 What is the percentage of workers in the automotive industry who have received industry 4.0 training in North America?,"CREATE TABLE workers (id INT, industry VARCHAR(50), region VARCHAR(50), industry_4_0_training BOOLEAN);",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM workers w WHERE industry = 'automotive' AND region = 'North America')) AS percentage FROM workers w WHERE industry = 'automotive' AND region = 'North America' AND industry_4_0_training = TRUE;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM workers WHERE industry = 'Automotive' AND region = 'North America')) AS percentage FROM workers WHERE industry = 'Automotive' AND industry_4_0_training = TRUE AND region = 'North America';,0 "How many water treatment plants in the state of Florida have water consumption per day greater than 2,500,000 liters?","CREATE TABLE WaterTreatmentPlants (plant_id INT, state VARCHAR(20), water_consumption_per_day FLOAT); ",SELECT COUNT(*) FROM WaterTreatmentPlants WHERE state = 'Florida' AND water_consumption_per_day > 2500000;,SELECT COUNT(*) FROM WaterTreatmentPlants WHERE state = 'Florida' AND water_consumption_per_day > 2 OFFSET 500000;,0 What is the difference in infrastructure budget between the two most recent fiscal years in South America?,"CREATE TABLE InfrastructureBudget (FiscalYear INT, Region VARCHAR(50), Budget FLOAT); ","SELECT LAG(Budget, 1) OVER (ORDER BY FiscalYear) - Budget AS BudgetDifference FROM InfrastructureBudget WHERE Region = 'South America' ORDER BY FiscalYear DESC LIMIT 1;",SELECT Budget - (SELECT Budget FROM InfrastructureBudget WHERE Region = 'South America') AS BudgetDifference FROM InfrastructureBudget WHERE FiscalYear = (SELECT FiscalYear FROM InfrastructureBudget WHERE Region = 'South America') GROUP BY FiscalYear ORDER BY Budget DESC LIMIT 2;,0 What are the ids and names of the web accelerators that are compatible with two or more browsers?,"CREATE TABLE accelerator_compatible_browser (accelerator_id VARCHAR); CREATE TABLE web_client_accelerator (id VARCHAR, Name VARCHAR);","SELECT T1.id, T1.Name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2;","SELECT T1.accelerator_id, T1.Name FROM accelerator_compatible_browser AS T1 JOIN web_client_accelerator AS T2 ON T1.accelerator_id = T2.id GROUP BY T2.accelerator_id HAVING COUNT(*) >= 2;",0 What is the total number of cybersecurity incidents recorded for each month in 2021?,"CREATE TABLE CybersecurityIncidents (Id INT, Month VARCHAR(50), Incidents INT, Year INT); ","SELECT SUM(Incidents), Month FROM CybersecurityIncidents WHERE Year = 2021 GROUP BY Month;","SELECT Month, SUM(Incidents) as TotalIncidents FROM CybersecurityIncidents WHERE Year = 2021 GROUP BY Month;",0 How many security incidents were recorded in 'region_3' in the 'incidents' table?,"CREATE TABLE incidents (incident_id INT, region VARCHAR(50), severity VARCHAR(10)); ",SELECT COUNT(*) FROM incidents WHERE region = 'region_3';,SELECT COUNT(*) FROM incidents WHERE region ='region_3';,0 How many female faculty members are there in the Engineering school?,"CREATE TABLE faculty (id INT, gender VARCHAR(6), school VARCHAR(10)); ",SELECT COUNT(*) FROM faculty WHERE gender = 'female' AND school = 'Engineering';,SELECT COUNT(*) FROM faculty WHERE gender = 'Female' AND school = 'Engineering';,0 "What is the loss for the game against @ expos, with a save of parrett (2)?","CREATE TABLE table_name_28 (loss VARCHAR, opponent VARCHAR, save VARCHAR);","SELECT loss FROM table_name_28 WHERE opponent = ""@ expos"" AND save = ""parrett (2)"";","SELECT loss FROM table_name_28 WHERE opponent = ""@ expos"" AND save = ""parrett (2)"";",1 What is the total quantity of each strain sold in 'dispensary_sales' table?,"CREATE TABLE dispensary_sales (id INT, strain VARCHAR(255), quantity INT, revenue FLOAT);","SELECT strain, SUM(quantity) as total_quantity FROM dispensary_sales GROUP BY strain;","SELECT strain, SUM(quantity) FROM dispensary_sales GROUP BY strain;",0 List the production figures of oil for all fields in the Adriatic Sea in Q2 2018.,"CREATE TABLE adriatic_sea_fields (field_id INT, field_name VARCHAR(50), oil_production FLOAT, datetime DATETIME); ","SELECT field_name, SUM(oil_production) FROM adriatic_sea_fields WHERE QUARTER(datetime) = 2 AND YEAR(datetime) = 2018 GROUP BY field_name;","SELECT field_name, oil_production FROM adriatic_sea_fields WHERE datetime BETWEEN '2018-04-01' AND '2018-04-31';",0 Determine the total funding received by startups founded by Latinx individuals in the social media industry,"CREATE TABLE founders (id INT, company_id INT, ethnicity VARCHAR(255)); CREATE TABLE companies (id INT, industry VARCHAR(255), funding_amount INT); ",SELECT SUM(companies.funding_amount) FROM founders JOIN companies ON founders.company_id = companies.id WHERE companies.industry = 'Social Media' AND founders.ethnicity = 'Latinx';,SELECT SUM(funding_amount) FROM companies JOIN founders ON companies.id = founders.company_id WHERE founders.ethnicity = 'Latinx' AND companies.industry = 'Social Media';,0 "What is the number of games played and the number of wins, losses, and draws for each team in each year, from the teams, games, and games_results tables?","CREATE TABLE teams (team_id INT, team_name VARCHAR(255)); CREATE TABLE games (game_id INT, team_id INT, game_date DATE); CREATE TABLE games_results (game_id INT, team_id INT, result VARCHAR(10));","SELECT t.team_name, EXTRACT(YEAR FROM g.game_date) AS year, COUNT(g.game_id) AS total_games, SUM(CASE WHEN gr.result = 'win' THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN gr.result = 'loss' THEN 1 ELSE 0 END) AS losses, SUM(CASE WHEN gr.result = 'draw' THEN 1 ELSE 0 END) AS draws FROM teams t JOIN games g ON t.team_id = g.team_id JOIN games_results gr ON g.game_id = gr.game_id GROUP BY t.team_name, year;","SELECT teams.team_name, YEAR(games.game_date) AS year, COUNT(games.game_id) AS games_played, COUNT(games_results.game_id) AS wins, COUNT(games_results.game_id) AS losses, COUNT(games_results.game_id) AS draws FROM teams INNER JOIN games ON teams.team_id = games.team_id INNER JOIN games ON games_results.team_id = games_results.team_id GROUP BY teams.team_name;",0 "Can you tell me the total number of Wins that has the Draws larger than 0, and the Points of 11?","CREATE TABLE table_name_48 (wins VARCHAR, draws VARCHAR, points VARCHAR);",SELECT COUNT(wins) FROM table_name_48 WHERE draws > 0 AND points = 11;,SELECT COUNT(wins) FROM table_name_48 WHERE draws > 0 AND points = 11;,1 What is the average duration of successful satellite launches for each country?,"CREATE TABLE satellite_launches (id INT, country VARCHAR(255), result VARCHAR(10), duration INT); ","SELECT country, AVG(duration) as avg_duration FROM satellite_launches WHERE result = 'successful' GROUP BY country;","SELECT country, AVG(duration) as avg_duration FROM satellite_launches WHERE result ='successful' GROUP BY country;",0 What is the total number of registered voters in 'voting_data' table?,"CREATE TABLE voting_data (voter_id INT, name VARCHAR(100), age INT, state VARCHAR(50), registration_date DATE);",SELECT COUNT(*) FROM voting_data;,SELECT COUNT(*) FROM voting_data;,1 Name the phoneme when the example is /umsʁ/,"CREATE TABLE table_name_78 (phoneme VARCHAR, example VARCHAR);","SELECT phoneme FROM table_name_78 WHERE example = ""/umsʁ/"";","SELECT phoneme FROM table_name_78 WHERE example = ""/ums/"";",0 "What is the average daily energy storage capacity (in MWh) for hydroelectric power plants, grouped by country?","CREATE TABLE hydro_power_plants (name VARCHAR(50), location VARCHAR(50), capacity FLOAT, country VARCHAR(50)); ","SELECT country, AVG(capacity) as avg_capacity FROM hydro_power_plants GROUP BY country;","SELECT country, AVG(capacity) FROM hydro_power_plants GROUP BY country;",0 "What is the average rating of appliances for each type and energy efficiency standard in the appliances and energy_efficiency_standards tables, where the year is between 2015 and 2020?","CREATE TABLE energy_efficiency_standards (id INT, standard VARCHAR(255), year INT, min_rating FLOAT); CREATE TABLE appliances (id INT, type VARCHAR(255), standard VARCHAR(255), rating FLOAT); ","SELECT a.type, e.standard, AVG(a.rating) as avg_rating FROM appliances a INNER JOIN energy_efficiency_standards e ON a.standard = e.standard WHERE e.year BETWEEN 2015 AND 2020 GROUP BY a.type, e.standard;","SELECT a.type, e.standard, AVG(a.rating) as avg_rating FROM appliances a JOIN energy_efficiency_standards e ON a.standard = e.standard WHERE e.year BETWEEN 2015 AND 2020 GROUP BY a.type, e.standard;",0 Find the average and total capacity of dorms for the students with gender X.,"CREATE TABLE dorm (student_capacity INTEGER, gender VARCHAR);","SELECT AVG(student_capacity), SUM(student_capacity) FROM dorm WHERE gender = 'X';","SELECT AVG(student_capacity), SUM(student_capacity) FROM dorm WHERE gender = 'X';",1 What date has won as the result and 2-1 as the score with a competition of 2004 tiger cup third place match?,"CREATE TABLE table_name_93 (date VARCHAR, competition VARCHAR, result VARCHAR, score VARCHAR);","SELECT date FROM table_name_93 WHERE result = ""won"" AND score = ""2-1"" AND competition = ""2004 tiger cup third place match"";","SELECT date FROM table_name_93 WHERE result = ""won"" AND score = ""2-1"" AND competition = ""2004 tiger cup third place match"";",1 Who is h.t. brewer when j.e. armstrong is a.j. wilson?,"CREATE TABLE table_1320857_1 (ht_brewer VARCHAR, je_armstrong VARCHAR);","SELECT ht_brewer FROM table_1320857_1 WHERE je_armstrong = ""A.J. Wilson"";","SELECT ht_brewer FROM table_1320857_1 WHERE je_armstrong = ""A.J. Wilson"";",1 "How many marine species are there in the 'marine_species' table, grouped by phylum?","CREATE TABLE marine_species (id INT, name VARCHAR(255), phylum VARCHAR(255)); ","SELECT phylum, COUNT(*) AS num_species FROM marine_species GROUP BY phylum;","SELECT phylum, COUNT(*) FROM marine_species GROUP BY phylum;",0 How many destinations are there for each type of tourism in Asia?,"CREATE TABLE destinations (destination_id INT, name TEXT, type TEXT, continent TEXT); ","SELECT type, continent, COUNT(*) FROM destinations GROUP BY type, continent;","SELECT type, COUNT(*) FROM destinations WHERE continent = 'Asia' GROUP BY type;",0 How many emergency calls were made in each borough in January 2021?,"CREATE TABLE emergency_calls_3 (id INT, borough_id INT, call_time TIMESTAMP); ","SELECT b.name, COUNT(ec.id) FROM borough b JOIN emergency_calls_3 ec ON b.id = ec.borough_id WHERE EXTRACT(MONTH FROM ec.call_time) = 1 GROUP BY b.id;","SELECT borough_id, COUNT(*) FROM emergency_calls_3 WHERE call_time BETWEEN '2021-01-01' AND '2021-01-31' GROUP BY borough_id;",0 Name the theatre for aaron jablonski schuyler grogan with performances more than 49,"CREATE TABLE table_name_31 (theatre VARCHAR, performances VARCHAR, role VARCHAR);","SELECT theatre FROM table_name_31 WHERE performances > 49 AND role = ""aaron jablonski schuyler grogan"";","SELECT theatre FROM table_name_31 WHERE performances > 49 AND role = ""aaron jablonski schuyler grogan"";",1 Which home team's venue is junction oval?,"CREATE TABLE table_name_71 (home_team VARCHAR, venue VARCHAR);","SELECT home_team FROM table_name_71 WHERE venue = ""junction oval"";","SELECT home_team FROM table_name_71 WHERE venue = ""junction oval"";",1 Name the part 3 for treffen,"CREATE TABLE table_1745843_9 (part_3 VARCHAR, part_1 VARCHAR);","SELECT part_3 FROM table_1745843_9 WHERE part_1 = ""treffen"";","SELECT part_3 FROM table_1745843_9 WHERE part_1 = ""treffen"";",1 "Update the exit type for ""Beta Inc"" to ""Acquisition"" in the ""exit_strategies"" table","CREATE TABLE exit_strategies (company_name VARCHAR(255), exit_year INT, exit_type VARCHAR(50));",UPDATE exit_strategies SET exit_type = 'Acquisition' WHERE company_name = 'Beta Inc';,UPDATE exit_strategies SET exit_type = 'Acquisition' WHERE company_name = 'Beta Inc';,1 What station owns Moody Bible Institute,"CREATE TABLE table_134729_3 (format VARCHAR, owner VARCHAR);","SELECT format FROM table_134729_3 WHERE owner = ""Moody Bible Institute"";","SELECT format FROM table_134729_3 WHERE owner = ""Moody Bible Institute"";",1 What was the lowest fumble with an average of less than 5.7 and 236 yards?,"CREATE TABLE table_name_35 (fumbles INTEGER, avg VARCHAR, yards VARCHAR);",SELECT MIN(fumbles) FROM table_name_35 WHERE avg < 5.7 AND yards = 236;,SELECT MIN(fumbles) FROM table_name_35 WHERE avg 5.7 AND yards = 236;,0 Who was the visiting team at the game where Edmonton was the home team and the decision was Osgood?,"CREATE TABLE table_name_98 (visitor VARCHAR, decision VARCHAR, home VARCHAR);","SELECT visitor FROM table_name_98 WHERE decision = ""osgood"" AND home = ""edmonton"";","SELECT visitor FROM table_name_98 WHERE decision = ""osgood"" AND home = ""edmonton"";",1 What can you say is the word from of sam sep?,"CREATE TABLE table_name_30 (word_form VARCHAR, other VARCHAR);","SELECT word_form FROM table_name_30 WHERE other = ""sam sep"";","SELECT word_form FROM table_name_30 WHERE other = ""sam sep"";",1 What is the maximum prize pool for esports events in Europe?,"CREATE TABLE PrizePools (EventID INT, Region VARCHAR(50), PrizePool INT); ",SELECT MAX(PrizePool) FROM PrizePools WHERE Region = 'Europe';,SELECT MAX(PrizePool) FROM PrizePools WHERE Region = 'Europe';,1 "How many vehicles were serviced in the 'Maintenance' workshop between April 1, 2021 and April 7, 2021?","CREATE TABLE maintenance (workshop VARCHAR(20), service_date DATE); ",SELECT COUNT(*) FROM maintenance WHERE workshop = 'Maintenance' AND service_date BETWEEN '2021-04-01' AND '2021-04-07';,SELECT COUNT(*) FROM maintenance WHERE workshop = 'Maintenance' AND service_date BETWEEN '2021-04-01' AND '2021-06-30';,0 Delete the court case with id 2,"CREATE TABLE courts (id INT PRIMARY KEY, name VARCHAR(255), state VARCHAR(2)); CREATE TABLE court_cases (id INT PRIMARY KEY, case_number VARCHAR(50), court_id INT, FOREIGN KEY (court_id) REFERENCES courts(id));",DELETE FROM court_cases WHERE id = 2;,DELETE FROM court_cases WHERE court_id = 2;,0 What is the average environmental impact score for chemical products launched in Q1 and Q2 of 2020?,"CREATE TABLE ChemicalProducts (ProductID INT, Chemical TEXT, ManufacturerID INT, ProductLaunchDate DATE, EnvironmentalImpactScore DECIMAL(3,2)); ","SELECT AVG(CP.EnvironmentalImpactScore) AS AverageScore FROM ChemicalProducts CP WHERE QUARTER(CP.ProductLaunchDate) IN (1, 2) AND YEAR(CP.ProductLaunchDate) = 2020;",SELECT AVG(EnvironmentalImpactScore) FROM ChemicalProducts WHERE ProductLaunchDate BETWEEN '2020-01-01' AND '2020-12-31';,0 List all equipment maintenance records for the month of June 2021,"CREATE TABLE equipment_maintenance (equipment_id int, maintenance_date date, maintenance_type varchar(255), maintenance_cost int);",SELECT * FROM equipment_maintenance WHERE MONTH(maintenance_date) = 6 AND YEAR(maintenance_date) = 2021;,SELECT * FROM equipment_maintenance WHERE maintenance_date BETWEEN '2021-06-01' AND '2021-06-30';,0 "Brett kimmorley, who was chosen for the clive churchill medal belonged to what team?","CREATE TABLE table_11236195_5 (winningteam VARCHAR, clive_churchill_medal VARCHAR);","SELECT winningteam FROM table_11236195_5 WHERE clive_churchill_medal = ""Brett Kimmorley"";","SELECT winningteam FROM table_11236195_5 WHERE clive_churchill_medal = ""Brett Kimmorley"";",1 "List all players who have played ""Sports Game E"" and are over 25 years old.","CREATE TABLE Sports_Game_E (player_id INT, name VARCHAR(50), age INT, gender VARCHAR(10)); ",SELECT * FROM Sports_Game_E WHERE age > 25;,SELECT * FROM Sports_Game_E WHERE age > 25;,1 Which course had a jockey of Royston FFrench?,"CREATE TABLE table_name_22 (course VARCHAR, jockey VARCHAR);","SELECT course FROM table_name_22 WHERE jockey = ""royston ffrench"";","SELECT course FROM table_name_22 WHERE jockey = ""royston ffrench"";",1 What is the molecular target listed under the trademark of irvalec ®,"CREATE TABLE table_12715053_1 (molecular_target VARCHAR, trademark VARCHAR);","SELECT molecular_target FROM table_12715053_1 WHERE trademark = ""Irvalec ®"";","SELECT molecular_target FROM table_12715053_1 WHERE trademark = ""Irvalec ®"";",1 What is the total weight of returned items stored in the New York warehouse?,"CREATE TABLE returned_items_data (item_id INT, item_name VARCHAR(100), quantity INT, warehouse_location VARCHAR(50), item_weight INT); ",SELECT SUM(item_weight * quantity) FROM returned_items_data WHERE warehouse_location = 'New York';,SELECT SUM(item_weight) FROM returned_items_data WHERE warehouse_location = 'New York';,0 When steve mcclaren is the replacer what is the manner of departure?,"CREATE TABLE table_24162080_3 (manner_of_departure VARCHAR, replaced_by VARCHAR);","SELECT manner_of_departure FROM table_24162080_3 WHERE replaced_by = ""Steve McClaren"";","SELECT manner_of_departure FROM table_24162080_3 WHERE replaced_by = ""Steve Mcclaren"";",0 What is the maximum number of albums released by an artist in the electronic genre?,"CREATE TABLE electronic_artists (id INT, name TEXT, genre TEXT, albums INT); ",SELECT MAX(albums) FROM electronic_artists WHERE genre = 'Electronic';,SELECT MAX(albums) FROM electronic_artists WHERE genre = 'Electronic';,1 What is the total fish weight for each country per year?,"CREATE TABLE Country_Year (Country TEXT, Year INT, Fish_Weight FLOAT); ","SELECT Country, Year, SUM(Fish_Weight) OVER (PARTITION BY Country) AS Total_Fish_Weight FROM Country_Year;","SELECT Country, Year, SUM(Fish_Weight) FROM Country_Year GROUP BY Country, Year;",0 Find the total revenue for digital and physical sales for the year 2020.,"CREATE TABLE Sales (SaleID INT, SaleDate DATE, SaleType VARCHAR(10), Revenue DECIMAL(10, 2)); ","SELECT SUM(Revenue) FROM Sales WHERE SaleDate BETWEEN '2020-01-01' AND '2020-12-31' AND SaleType IN ('Digital', 'Physical');","SELECT SUM(Revenue) FROM Sales WHERE SaleType IN ('Digital', 'Physical') AND YEAR(SaleDate) = 2020;",0 What is the total number of species observed in the Indian Ocean's marine protected areas?,"CREATE TABLE marine_protected_areas (id INT, name VARCHAR(255), region VARCHAR(255)); CREATE TABLE species_observed (id INT, marine_protected_area_id INT, species_name VARCHAR(255)); ",SELECT COUNT(DISTINCT species_name) FROM species_observed JOIN marine_protected_areas ON species_observed.marine_protected_area_id = marine_protected_areas.id WHERE marine_protected_areas.region = 'Indian';,SELECT COUNT(*) FROM species_observed JOIN marine_protected_areas ON species_observed.marine_protected_area_id = marine_protected_areas.id WHERE marine_protected_areas.region = 'Indian Ocean';,0 "What is the average weight of chemical substances manufactured in the US that were produced in the last 5 years, grouped by their respective categories?","CREATE TABLE chemicals (id INT, name VARCHAR(255), weight FLOAT, manufacturer_country VARCHAR(255), category VARCHAR(255), production_date DATE);","SELECT category, AVG(weight) as avg_weight FROM chemicals WHERE manufacturer_country = 'USA' AND production_date > DATE_SUB(CURDATE(), INTERVAL 5 YEAR) GROUP BY category;","SELECT category, AVG(weight) as avg_weight FROM chemicals WHERE manufacturer_country = 'USA' AND production_date >= DATEADD(year, -5, GETDATE()) GROUP BY category;",0 Who are the top 3 music artists with the highest number of streams in Brazil?,"CREATE TABLE music_streams (artist_name VARCHAR(255), country VARCHAR(50), streams INT); ","SELECT artist_name, SUM(streams) as total_streams FROM music_streams WHERE country = 'Brazil' GROUP BY artist_name ORDER BY total_streams DESC LIMIT 3;","SELECT artist_name, SUM(streams) as total_streams FROM music_streams WHERE country = 'Brazil' GROUP BY artist_name ORDER BY total_streams DESC LIMIT 3;",1 Where were the Mediterranean games after 2005?,"CREATE TABLE table_name_79 (venue VARCHAR, competition VARCHAR, year VARCHAR);","SELECT venue FROM table_name_79 WHERE competition = ""mediterranean games"" AND year > 2005;","SELECT venue FROM table_name_79 WHERE competition = ""mediterranean games"" AND year > 2005;",1 Who had a to par of +2 and a score of 78-69-68=215?,"CREATE TABLE table_name_22 (player VARCHAR, to_par VARCHAR, score VARCHAR);","SELECT player FROM table_name_22 WHERE to_par = ""+2"" AND score = 78 - 69 - 68 = 215;","SELECT player FROM table_name_22 WHERE to_par = ""+2"" AND score = 78 - 69 - 68 = 215;",1 Identify customers from India who have made international transactions in the last month.,"CREATE TABLE transactions (id INT, account_id INT, transaction_date DATE, transaction_type VARCHAR(50), transaction_amount DECIMAL(10,2)); CREATE TABLE customers (id INT, name VARCHAR(100), age INT, gender VARCHAR(10), city VARCHAR(50), state VARCHAR(50));","SELECT c.id, c.name FROM customers c JOIN (SELECT account_id FROM transactions t WHERE t.transaction_date >= DATEADD(month, -1, CURRENT_DATE) AND t.transaction_type = 'international' GROUP BY account_id) t ON c.id = t.account_id WHERE c.state = 'India';","SELECT c.name FROM customers c INNER JOIN transactions t ON c.id = t.account_id WHERE t.transaction_type = 'International' AND t.transaction_date >= DATEADD(month, -1, GETDATE());",0 What is the total number of games played by FC Barcelona?,"CREATE TABLE teams (id INT, name TEXT, city TEXT, league TEXT); CREATE TABLE games (id INT, home_team_id INT, away_team_id INT);",SELECT COUNT(*) FROM games WHERE home_team_id = (SELECT id FROM teams WHERE name = 'FC Barcelona' AND city = 'Barcelona') OR away_team_id = (SELECT id FROM teams WHERE name = 'FC Barcelona' AND city = 'Barcelona');,SELECT COUNT(*) FROM games JOIN teams ON games.home_team_id = teams.id WHERE teams.name = 'FC Barcelona';,0 "What is the average number of hospital beds in rural hospitals, grouped by state?","CREATE TABLE hospitals (hospital_id INT, hospital_name TEXT, beds INT, rural BOOLEAN, state_id INT); CREATE TABLE states (state_id INT, state TEXT); ","SELECT AVG(hospitals.beds) avg_beds, states.state FROM hospitals JOIN states ON hospitals.state_id = states.state_id WHERE hospitals.rural = true GROUP BY states.state;","SELECT s.state, AVG(h.beds) as avg_beds FROM hospitals h JOIN states s ON h.state_id = s.state_id WHERE h.rural = true GROUP BY s.state;",0 What is the total number of tries scored by the All Blacks Rugby Union Team?,"CREATE TABLE all_blacks_stats (player TEXT, tries INT); ",SELECT SUM(tries) FROM all_blacks_stats;,SELECT SUM(tries) FROM all_blacks_stats;,1 How many mental health campaigns were launched in 'Southwest' region in 2021?,"CREATE TABLE campaigns_2021 (campaign_id INT, name VARCHAR(50), budget INT, region VARCHAR(50)); ",SELECT COUNT(*) FROM campaigns_2021 WHERE region = 'Southwest';,SELECT COUNT(*) FROM campaigns_2021 WHERE region = 'Southwest';,1 What is the total number of people who could stay in the modern rooms in this inn?,"CREATE TABLE Rooms (maxOccupancy INTEGER, decor VARCHAR);",SELECT SUM(maxOccupancy) FROM Rooms WHERE decor = 'modern';,"SELECT SUM(maxOccupancy) FROM Rooms WHERE decor = ""modern"";",0 What is the maximum number of points against when the team has more than 0 losses and plays fewer than 6 games?,"CREATE TABLE table_name_18 (against INTEGER, lost VARCHAR, played VARCHAR);",SELECT MAX(against) FROM table_name_18 WHERE lost > 0 AND played < 6;,SELECT MAX(against) FROM table_name_18 WHERE lost > 0 AND played 6;,0 Display the urban farmers' details who sell their produce above 2 USD.,"CREATE TABLE Urban_Farmers_2 (id INT PRIMARY KEY, name VARCHAR(50), age INT, location VARCHAR(50), organic_certified BOOLEAN); CREATE TABLE Urban_Produce_2 (id INT PRIMARY KEY, product_name VARCHAR(50), price DECIMAL(5,2), farmer_id INT, location VARCHAR(50)); ","SELECT uf.name, uf.location, up.product_name, up.price FROM Urban_Farmers_2 uf INNER JOIN Urban_Produce_2 up ON uf.id = up.farmer_id WHERE up.price > 2;","SELECT Urban_Farmers_2.name, Urban_Produce_2.product_name, Urban_Produce_2.price FROM Urban_Farmers_2 INNER JOIN Urban_Produce_2 ON Urban_Farmers_2.id = Urban_Produce_2.farmer_id WHERE Urban_Produce_2.price > 2;",0 What is the total number of mental health parity violations in each state?,"CREATE TABLE MentalHealthParityViolations (ViolationID INT, State VARCHAR(20)); ","SELECT State, COUNT(*) FROM MentalHealthParityViolations GROUP BY State;","SELECT State, COUNT(*) FROM MentalHealthParityViolations GROUP BY State;",1 What is Driver Howden Ganley's Time/Retired?,"CREATE TABLE table_name_75 (time_retired VARCHAR, driver VARCHAR);","SELECT time_retired FROM table_name_75 WHERE driver = ""howden ganley"";","SELECT time_retired FROM table_name_75 WHERE driver = ""howden ganley"";",1 What is the total number of smart contracts deployed in South Korea in Q2 2022?,"CREATE TABLE smart_contracts (contract_name TEXT, country TEXT, deployment_date DATE); ",SELECT COUNT(*) FROM smart_contracts WHERE country = 'South Korea' AND deployment_date >= '2022-04-01' AND deployment_date < '2022-07-01';,SELECT COUNT(*) FROM smart_contracts WHERE country = 'South Korea' AND deployment_date BETWEEN '2022-04-01' AND '2022-06-30';,0 List the top 5 cities with the highest number of accessible technology centers globally.,"CREATE TABLE Cities (id INT, name TEXT, country TEXT, num_accessible_tech_centers INT); ","SELECT name, country, num_accessible_tech_centers FROM Cities ORDER BY num_accessible_tech_centers DESC LIMIT 5;","SELECT name, num_accessible_tech_centers FROM Cities ORDER BY num_accessible_tech_centers DESC LIMIT 5;",0 How many artworks are there in each medium category?,"CREATE TABLE artworks (id INT, artwork VARCHAR(50), medium VARCHAR(50)); ","SELECT medium, COUNT(*) as num_artworks FROM artworks GROUP BY medium;","SELECT medium, COUNT(*) FROM artworks GROUP BY medium;",0 What is the maximum number of papers published by a graduate student in the Electrical Engineering department?,"CREATE TABLE graduate_students (id INT, name VARCHAR(50), department VARCHAR(50), num_papers INT); ",SELECT MAX(num_papers) FROM graduate_students WHERE department = 'Electrical Engineering';,SELECT MAX(num_papers) FROM graduate_students WHERE department = 'Electrical Engineering';,1 What is the average rating of historical sites in Japan?,"CREATE TABLE historical_sites (site_id INT, name VARCHAR(255), country VARCHAR(255), rating FLOAT, admission_fee FLOAT); ",SELECT AVG(rating) FROM historical_sites WHERE country = 'Japan';,SELECT AVG(rating) FROM historical_sites WHERE country = 'Japan';,1 What is the change in temperature for each Arctic research station over the last year?,"CREATE TABLE temperature_data (station VARCHAR(255), year INT, temperature FLOAT);","SELECT station, (temperature - LAG(temperature) OVER (PARTITION BY station ORDER BY year)) AS temperature_change FROM temperature_data WHERE year BETWEEN 2022 AND 2022;","SELECT station, year, temperature, ROW_NUMBER() OVER (PARTITION BY station ORDER BY year) as rn FROM temperature_data;",0 What's the venue for the asian games tournament?,"CREATE TABLE table_name_55 (venue VARCHAR, tournament VARCHAR);","SELECT venue FROM table_name_55 WHERE tournament = ""asian games"";","SELECT venue FROM table_name_55 WHERE tournament = ""asian games"";",1 List all unique digital initiatives by museums located in the Asia-Pacific region.,"CREATE TABLE Digital_Initiatives (id INT, museum VARCHAR(255), initiative VARCHAR(255)); ",SELECT DISTINCT initiative FROM Digital_Initiatives WHERE museum LIKE 'National Museum%';,SELECT DISTINCT initiative FROM Digital_Initiatives WHERE museum IN (SELECT museum FROM Digital_Initiatives WHERE region = 'Asia-Pacific');,0 Show the UNION of 'sports_team_a_fans' and 'sports_team_b_fans' tables,"CREATE TABLE sports_team_a_fans (fan_id INT, age INT, gender VARCHAR(10), favorite_player VARCHAR(20)); CREATE TABLE sports_team_b_fans (fan_id INT, age INT, gender VARCHAR(10), favorite_player VARCHAR(20)); ",SELECT * FROM sports_team_a_fans UNION SELECT * FROM sports_team_b_fans;,SELECT COUNT(DISTINCT st.fan_id) FROM sports_team_a_fans st INNER JOIN sports_team_b_fans st ON st.fan_id = st.fan_id;,0 "What is 2nd Leg, when Team #2 is ""San Lorenzo""?",CREATE TABLE table_name_96 (team__number2 VARCHAR);,"SELECT 2 AS nd_leg FROM table_name_96 WHERE team__number2 = ""san lorenzo"";","SELECT 2 AS nd_leg FROM table_name_96 WHERE team__number2 = ""san lorenzo"";",1 What venue has 2 as the rank?,"CREATE TABLE table_name_75 (venue VARCHAR, rank VARCHAR);","SELECT venue FROM table_name_75 WHERE rank = ""2"";","SELECT venue FROM table_name_75 WHERE rank = ""2"";",1 What is the total number of streams for each artist from the United States?,"CREATE TABLE Artists (ArtistID INT, ArtistName VARCHAR(100), Country VARCHAR(50)); CREATE TABLE Songs (SongID INT, SongName VARCHAR(100), ArtistID INT); CREATE TABLE Streaming (StreamID INT, SongID INT, Country VARCHAR(50), StreamCount INT); ","SELECT Artists.ArtistName, SUM(Streaming.StreamCount) AS TotalStreams FROM Artists INNER JOIN Songs ON Artists.ArtistID = Songs.ArtistID INNER JOIN Streaming ON Songs.SongID = Streaming.SongID WHERE Artists.Country = 'USA' GROUP BY Artists.ArtistName;","SELECT a.ArtistName, SUM(s.StreamCount) as TotalStreams FROM Artists a INNER JOIN Songs s ON a.ArtistID = s.ArtistID INNER JOIN Streaming s ON s.SongID = s.SongID WHERE a.Country = 'United States' GROUP BY a.ArtistName;",0 How many averages are there when the economy rate is 2.26?,"CREATE TABLE table_19662262_6 (average VARCHAR, economy_rate VARCHAR);","SELECT COUNT(average) FROM table_19662262_6 WHERE economy_rate = ""2.26"";","SELECT COUNT(average) FROM table_19662262_6 WHERE economy_rate = ""2.26"";",1 What is the number of successful and unsuccessful aid missions in Russia and Ukraine?,"CREATE TABLE aid_missions (id INT, country VARCHAR(20), mission_type VARCHAR(10), mission_status VARCHAR(10));","SELECT country, mission_type, COUNT(*) as total FROM aid_missions GROUP BY country, mission_type;","SELECT COUNT(*) FROM aid_missions WHERE country IN ('Russia', 'Ukraine') AND mission_type = 'Successful' AND mission_status = 'Unsuccessful';",0 What is the greatest number of Pakistanis admitted to Canada during those times when the number of Nepalis admitted was 627?,"CREATE TABLE table_1717824_3 (pakistanis_admitted INTEGER, nepalis_admitted VARCHAR);",SELECT MAX(pakistanis_admitted) FROM table_1717824_3 WHERE nepalis_admitted = 627;,SELECT MAX(pakistanis_admitted) FROM table_1717824_3 WHERE nepalis_admitted = 627;,1 What is the change in ocean acidity levels in the Southern Ocean over the past 10 years?,"CREATE TABLE oceanacidity (year INTEGER, location VARCHAR(20), acidity FLOAT); ",SELECT acidity FROM oceanacidity WHERE location = 'Southern Ocean' ORDER BY year DESC LIMIT 10;,SELECT SUM(acidity) FROM oceanacidity WHERE location = 'Southern Ocean' AND year BETWEEN (SELECT MAX(year) FROM oceanacidity WHERE location = 'Southern Ocean') AND (SELECT MAX(year) FROM oceanacidity WHERE location = 'Southern Ocean') AND (SELECT MAX(year) FROM oceanacidity WHERE location = 'Southern Ocean');,0 "What Catalog released on June 29, 1999 has a Digipak Album Format?","CREATE TABLE table_name_8 (catalog VARCHAR, format VARCHAR, date VARCHAR);","SELECT catalog FROM table_name_8 WHERE format = ""digipak album"" AND date = ""june 29, 1999"";","SELECT catalog FROM table_name_8 WHERE format = ""digitipak album"" AND date = ""june 29, 1999"";",0 Which Date has a Ship of hallbjorg?,"CREATE TABLE table_name_87 (date VARCHAR, ship VARCHAR);","SELECT date FROM table_name_87 WHERE ship = ""hallbjorg"";","SELECT date FROM table_name_87 WHERE ship = ""hallbjorg"";",1 Find the average age of farmers by crop type.,"CREATE TABLE farmers (id INT PRIMARY KEY, name TEXT, location TEXT, age INT, crop TEXT); ","SELECT crop, AVG(age) FROM farmers GROUP BY crop;","SELECT crop, AVG(age) FROM farmers GROUP BY crop;",1 "What is the average labor productivity in the mining industry in Australia, by state, for the last 3 years?","CREATE TABLE AustralianLaborProductivity (state TEXT, year INT, industry TEXT, productivity FLOAT); ","SELECT context.state, AVG(context.productivity) as avg_productivity FROM AustralianLaborProductivity context WHERE context.industry = 'Mining' AND context.year BETWEEN 2019 AND 2021 GROUP BY context.state;","SELECT state, AVG(productivity) FROM AustralianLaborProductivity WHERE industry = 'Mining' AND year BETWEEN 2018 AND 2021 GROUP BY state;",0 Who was the host team on October 4?,"CREATE TABLE table_name_31 (host_team VARCHAR, date VARCHAR);","SELECT host_team FROM table_name_31 WHERE date = ""october 4"";","SELECT host_team FROM table_name_31 WHERE date = ""october 4"";",1 What Outgoing manager left at his end of tenure as caretaker and was Replaced by Jesper Hansen?,"CREATE TABLE table_name_78 (outgoing_manager VARCHAR, manner_of_departure VARCHAR, replaced_by VARCHAR);","SELECT outgoing_manager FROM table_name_78 WHERE manner_of_departure = ""end of tenure as caretaker"" AND replaced_by = ""jesper hansen"";","SELECT outgoing_manager FROM table_name_78 WHERE manner_of_departure = ""end of tenure"" AND replaced_by = ""jesper hansen"";",0 Name the total with finish of t22,"CREATE TABLE table_name_24 (total VARCHAR, finish VARCHAR);","SELECT total FROM table_name_24 WHERE finish = ""t22"";","SELECT total FROM table_name_24 WHERE finish = ""t22"";",1 What is the total CO2 emission for flights originating from India?,"CREATE TABLE flights (id INT, origin TEXT, destination TEXT, co2_emission INT); ",SELECT SUM(f.co2_emission) as total_emission FROM flights f WHERE f.origin = 'India';,SELECT SUM(co2_emission) FROM flights WHERE origin = 'India';,0 Who had a finish of t16?,"CREATE TABLE table_name_81 (player VARCHAR, finish VARCHAR);","SELECT player FROM table_name_81 WHERE finish = ""t16"";","SELECT player FROM table_name_81 WHERE finish = ""t16"";",1 What team had less than 159 laps and a time or retired time of 4:00:30.7537 (retired - fire)?,"CREATE TABLE table_name_14 (name VARCHAR, laps VARCHAR, time_retired VARCHAR);","SELECT name FROM table_name_14 WHERE laps < 159 AND time_retired = ""4:00:30.7537 (retired - fire)"";","SELECT name FROM table_name_14 WHERE laps 159 AND time_retired = ""4:00:30.7537 (retired - fire)"";",0 How many decentralized applications are available on the Polkadot network?,"CREATE TABLE polkadot_network (network_name VARCHAR(20), dapps_available INT); ",SELECT dapps_available FROM polkadot_network WHERE network_name = 'Polkadot';,SELECT SUM(dapps_available) FROM polkadot_network;,0 Update 'crime_stats' table to set all 'robbery' records for '2019' to 'theft',"CREATE TABLE crime_stats (id INT, year INT, month INT, type VARCHAR(255), PRIMARY KEY(id));",UPDATE crime_stats SET type = 'theft' WHERE year = 2019 AND type = 'robbery';,UPDATE crime_stats SET type = 'theft' WHERE year = 2019 AND type = 'robbery';,1 Show the top 3 destinations with the highest increase in tourists from 2018 to 2019,"CREATE TABLE tourism_stats (destination VARCHAR(255), year INT, visitors INT); ","SELECT destination, (visitors - (SELECT visitors FROM tourism_stats t2 WHERE t2.destination = t1.destination AND t2.year = 2018)) AS diff FROM tourism_stats t1 WHERE year = 2019 ORDER BY diff DESC LIMIT 3;","SELECT destination, SUM(visitors) as total_visitors FROM tourism_stats WHERE year BETWEEN 2018 AND 2019 GROUP BY destination ORDER BY total_visitors DESC LIMIT 3;",0 What is the average billing amount for cases handled by female attorneys in the 'London' office?,"CREATE TABLE attorneys (attorney_id INT, gender VARCHAR(10), office VARCHAR(50)); CREATE TABLE cases (case_id INT, attorney_id INT, billing_amount DECIMAL(10,2));",SELECT AVG(billing_amount) FROM cases INNER JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.gender = 'female' AND attorneys.office = 'London';,SELECT AVG(billing_amount) FROM cases JOIN attorneys ON cases.attorney_id = attorneys.attorney_id WHERE attorneys.gender = 'Female' AND attorneys.office = 'London';,0 Calculate the average age of users from each country.,"CREATE TABLE users (id INT, name VARCHAR(50), age INT, country VARCHAR(50), created_at TIMESTAMP); ","SELECT country, AVG(age) OVER (PARTITION BY country) as avg_age FROM users;","SELECT country, AVG(age) as avg_age FROM users GROUP BY country;",0 Which Giro di Lombardia has a Paris–Roubaix of servais knaven ( ned )?,"CREATE TABLE table_name_38 (giro_di_lombardia VARCHAR, paris_roubaix VARCHAR);","SELECT giro_di_lombardia FROM table_name_38 WHERE paris_roubaix = ""servais knaven ( ned )"";","SELECT giro_di_lombardia FROM table_name_38 WHERE paris_roubaix = ""servais knaven ( ned )"";",1 How many titles are listed with 8.44 million viewers?,"CREATE TABLE table_24910733_1 (title VARCHAR, us_viewers__millions_ VARCHAR);","SELECT COUNT(title) FROM table_24910733_1 WHERE us_viewers__millions_ = ""8.44"";","SELECT COUNT(title) FROM table_24910733_1 WHERE us_viewers__millions_ = ""8.44"";",1 What is the average loan amount for socially responsible lending in Africa?,"CREATE TABLE socially_responsible_lending (id INT, country VARCHAR(20), loan_amount DECIMAL(10, 2)); ",SELECT AVG(loan_amount) FROM socially_responsible_lending WHERE country = 'Africa',"SELECT AVG(loan_amount) FROM socially_responsible_lending WHERE country IN ('South Africa', 'Egypt');",0 What is the fire control for the sporter target,"CREATE TABLE table_12834315_2 (fire_control VARCHAR, name VARCHAR);","SELECT fire_control FROM table_12834315_2 WHERE name = ""Sporter Target"";","SELECT fire_control FROM table_12834315_2 WHERE name = ""Sporter Target"";",1 What is the total amount donated by each donor in the year 2021?,"CREATE TABLE donors (donor_id INT, donor_name TEXT, donation_amount FLOAT, donation_date DATE); ","SELECT donor_name, SUM(donation_amount) as total_donation FROM donors WHERE EXTRACT(YEAR FROM donation_date) = 2021 GROUP BY donor_name;","SELECT donor_name, SUM(donation_amount) FROM donors WHERE YEAR(donation_date) = 2021 GROUP BY donor_name;",0 What is the total biomass of all fish in the 'tropical' location?,"CREATE TABLE fish_stock (fish_id INT PRIMARY KEY, species VARCHAR(50), location VARCHAR(50), biomass FLOAT); ",SELECT SUM(biomass) FROM fish_stock WHERE location = 'tropical';,SELECT SUM(biomass) FROM fish_stock WHERE location = 'tropical';,1 List countries that have more than one swimmer.,CREATE TABLE swimmer (nationality VARCHAR);,"SELECT nationality, COUNT(*) FROM swimmer GROUP BY nationality HAVING COUNT(*) > 1;",SELECT nationality FROM swimmer GROUP BY nationality HAVING COUNT(*) > 1;,0 What is the maximum billing amount for cases handled by attorneys in the 'Miami' region?,"CREATE TABLE cases (id INT, attorney_id INT, billing_amount INT); CREATE TABLE attorneys (id INT, name TEXT, region TEXT, title TEXT); ",SELECT MAX(billing_amount) FROM cases JOIN attorneys ON cases.attorney_id = attorneys.id WHERE attorneys.region = 'Miami';,SELECT MAX(billing_amount) FROM cases JOIN attorneys ON cases.attorney_id = attorneys.id WHERE attorneys.region = 'Miami';,1 How many clinical trials were conducted in 2021?,"CREATE TABLE clinical_trials (trial_id INTEGER, year INTEGER);",SELECT COUNT(*) FROM clinical_trials WHERE year = 2021;,SELECT COUNT(*) FROM clinical_trials WHERE year = 2021;,1 What is the total revenue generated by art auctions in the American region?,"CREATE TABLE Auctions (AuctionID INT, AuctionName TEXT, Year INT, Region TEXT, Revenue DECIMAL(10,2)); ","SELECT Region, SUM(Revenue) as TotalRevenue FROM Auctions WHERE Region = 'America' GROUP BY Region;",SELECT SUM(Revenue) FROM Auctions WHERE Region = 'America';,0 What is the total military expenditure by NATO members in the last 5 years?,"CREATE TABLE military_expenditure (expenditure_id INT, country TEXT, year INT, amount FLOAT); ",SELECT SUM(amount) FROM military_expenditure WHERE year >= (SELECT YEAR(GETDATE()) - 5) AND country IN (SELECT member_state FROM nato_members),SELECT SUM(amount) FROM military_expenditure WHERE country = 'NATO' AND year BETWEEN 2017 AND 2021;,0 Which Points have an Opponent of @ pittsburgh penguins?,"CREATE TABLE table_name_86 (points INTEGER, opponent VARCHAR);","SELECT MAX(points) FROM table_name_86 WHERE opponent = ""@ pittsburgh penguins"";","SELECT SUM(points) FROM table_name_86 WHERE opponent = ""@ pittsburgh penguins"";",0 What are the SO2 emissions for the 'Tasiast' and 'Katanga' mines?,"CREATE TABLE Environmental_Impact(Mine_Name TEXT, SO2_Emissions INT, Water_Consumption INT); ","SELECT SO2_Emissions FROM Environmental_Impact WHERE Mine_Name IN ('Tasiast', 'Katanga');","SELECT Mine_Name, SO2_Emissions FROM Environmental_Impact WHERE Mine_Name IN ('Tasiast', 'Katanga');",0 What is the navigator for James?,"CREATE TABLE table_name_3 (navigator VARCHAR, driver VARCHAR);","SELECT navigator FROM table_name_3 WHERE driver = ""james"";","SELECT navigator FROM table_name_3 WHERE driver = ""james"";",1 "What is the total number of workers employed in the circular economy sector, by job title?","CREATE TABLE workers (worker_id INT, sector VARCHAR(255), job_title VARCHAR(255)); ","SELECT job_title, COUNT(*) FROM workers WHERE sector = 'Circular Economy' GROUP BY job_title;","SELECT job_title, COUNT(*) FROM workers WHERE sector = 'Circular Economy' GROUP BY job_title;",1 What was the score when the opposition was West Coast in Wanganui?,"CREATE TABLE table_26847237_1 (score VARCHAR, opposition VARCHAR, location VARCHAR);","SELECT score FROM table_26847237_1 WHERE opposition = ""West Coast"" AND location = ""Wanganui"";","SELECT score FROM table_26847237_1 WHERE opposition = ""West Coast"" AND location = ""Wanganui"";",1 What is the fewest number of points for clubs with less than 2 draws and more than 8 matches played?,"CREATE TABLE table_name_38 (points INTEGER, drawn VARCHAR, played VARCHAR);",SELECT MIN(points) FROM table_name_38 WHERE drawn < 2 AND played > 8;,SELECT MIN(points) FROM table_name_38 WHERE drawn 2 AND played > 8;,0 "What are the site names, locations, and total number of artifacts for excavation sites with public outreach events?","CREATE TABLE ExcavationSites (SiteID int, SiteName varchar(50), Location varchar(50)); CREATE TABLE PublicOutreach (EventID int, SiteID int, EventType varchar(20)); CREATE TABLE Artifacts (ArtifactID int, SiteID int, Material varchar(20), Description varchar(100));","SELECT ExcavationSites.SiteName, ExcavationSites.Location, COUNT(Artifacts.ArtifactID) AS TotalArtifacts FROM ExcavationSites INNER JOIN PublicOutreach ON ExcavationSites.SiteID = PublicOutreach.SiteID INNER JOIN Artifacts ON ExcavationSites.SiteID = Artifacts.SiteID WHERE PublicOutreach.EventType = 'event' GROUP BY ExcavationSites.SiteName, ExcavationSites.Location;","SELECT ExcavationSites.SiteName, ExcavationSites.Location, COUNT(Artifacts.ArtifactID) FROM ExcavationSites INNER JOIN PublicOutreach ON ExcavationSites.SiteID = PublicOutreach.SiteID INNER JOIN Artifacts ON ExcavationSites.SiteID = Artifacts.SiteID WHERE PublicOutreach.EventType = 'PublicOutreach';",0 Which brands have the lowest product safety records?,"CREATE TABLE products (product_id INT, name VARCHAR(255), brand VARCHAR(255), safety_rating INT); ","SELECT brand, MIN(safety_rating) FROM products GROUP BY brand;","SELECT brand, MIN(safety_rating) as lowest_safety_rating FROM products GROUP BY brand;",0 Who was the home team at the Nuggets game that had a score of 116–105?,"CREATE TABLE table_name_24 (home VARCHAR, score VARCHAR);","SELECT home FROM table_name_24 WHERE score = ""116–105"";","SELECT home FROM table_name_24 WHERE score = ""116–105"";",1 What is the total amount donated by repeat donors from Africa in 2021?,"CREATE TABLE Donors (DonorID INT, DonorName TEXT, Country TEXT); CREATE TABLE Donations (DonationID INT, DonorID INT, DonationAmount DECIMAL, DonationDate DATE); ",SELECT SUM(Donations.DonationAmount) AS TotalDonated FROM Donors INNER JOIN Donations ON Donors.DonorID = Donations.DonorID WHERE Donors.Country LIKE 'Africa%' AND DonorID IN (SELECT DonorID FROM Donations GROUP BY DonorID HAVING COUNT(*) > 1) AND YEAR(Donations.DonationDate) = 2021;,SELECT SUM(DonationAmount) FROM Donations JOIN Donors ON Donations.DonorID = Donors.DonorID WHERE Donors.Country = 'Africa' AND YEAR(DonationDate) = 2021;,0 What is the Score with an Away that is high park demons?,"CREATE TABLE table_name_66 (score VARCHAR, away VARCHAR);","SELECT score FROM table_name_66 WHERE away = ""high park demons"";","SELECT score FROM table_name_66 WHERE away = ""high park demons"";",1 List the companies that have received funding in both the USA and Canada.,"CREATE TABLE companies (id INT, name TEXT, country TEXT); CREATE TABLE fundings (id INT, company_id INT, round TEXT, country TEXT); ",SELECT companies.name FROM companies INNER JOIN fundings AS us_fundings ON companies.id = us_fundings.company_id AND us_fundings.country = 'USA' INNER JOIN fundings AS canada_fundings ON companies.id = canada_fundings.company_id AND canada_fundings.country = 'Canada' GROUP BY companies.name HAVING COUNT(DISTINCT companies.id) > 1;,"SELECT companies.name FROM companies INNER JOIN fundings ON companies.id = fundings.company_id WHERE fundings.country IN ('USA', 'Canada');",0 "What is the total mineral extraction for each mining company in Brazil, by year, for the last 3 years?","CREATE TABLE MiningCompanyExtraction (year INT, company TEXT, country TEXT, mineral TEXT, quantity INT); ","SELECT context.year, context.company, SUM(context.quantity) as total_mineral_extraction FROM MiningCompanyExtraction context WHERE context.country = 'Brazil' AND context.year BETWEEN 2019 AND 2021 GROUP BY context.year, context.company;","SELECT company, year, SUM(quantity) FROM MiningCompanyExtraction WHERE country = 'Brazil' GROUP BY company, year;",0 List the climate communication campaigns that were conducted in South America in 2019.,"CREATE TABLE climate_communication (campaign VARCHAR(20), location VARCHAR(20), year INT); ",SELECT campaign FROM climate_communication WHERE location = 'South America' AND year = 2019;,SELECT campaign FROM climate_communication WHERE location = 'South America' AND year = 2019;,1 "What is the average time spent on the platform per day for each player who has used the platform for more than 2 hours, sorted by the average time in descending order?","CREATE TABLE PlayerUsage (PlayerID INT, Platform VARCHAR(50), UsageTime FLOAT, UsageDate DATE); ","SELECT PlayerID, AVG(UsageTime) AS AvgTimePerDay, Platform FROM PlayerUsage WHERE UsageTime > 2*60 GROUP BY PlayerID, Platform ORDER BY AvgTimePerDay DESC;","SELECT Platform, AVG(UsageTime) as AvgTimePerDay FROM PlayerUsage WHERE UsageDate >= DATEADD(day, -2, GETDATE()) GROUP BY Platform ORDER BY AvgTimePerDay DESC;",0 "What is the place later than 2007, with 141 (sf:83) points?","CREATE TABLE table_name_98 (place VARCHAR, year VARCHAR, points VARCHAR);","SELECT place FROM table_name_98 WHERE year > 2007 AND points = ""141 (sf:83)"";","SELECT place FROM table_name_98 WHERE year > 2007 AND points = ""141 (sf:83)"";",1 What is the total production cost of garments in the last 30 days?,"CREATE TABLE production (id INT, factory VARCHAR(255), country VARCHAR(255), cost DECIMAL(10,2), production_date DATE); ","SELECT SUM(cost) FROM production WHERE production_date >= DATEADD(day, -30, CURRENT_DATE);","SELECT SUM(cost) FROM production WHERE production_date >= DATEADD(day, -30, GETDATE());",0 How many visitors from historically underrepresented communities engaged with the museum's digital initiatives in the last year?,"CREATE TABLE digital_initiatives (id INT, visitor_id INT, visit_date DATE); CREATE TABLE visitor_demographics (visitor_id INT, community VARCHAR(255)); ","SELECT COUNT(*) FROM digital_initiatives JOIN visitor_demographics ON digital_initiatives.visitor_id = visitor_demographics.visitor_id WHERE community = 'Underrepresented Community' AND visit_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE;","SELECT COUNT(DISTINCT visitor_id) FROM digital_initiatives INNER JOIN visitor_demographics ON digital_initiatives.visitor_id = visitor_demographics.visitor_id WHERE digital_initiatives.visit_date >= DATEADD(year, -1, GETDATE());",0 List all auto shows with a focus on electric vehicles,"CREATE TABLE auto_shows (id INT, name VARCHAR(50), location VARCHAR(50), focus VARCHAR(50)); ","SELECT name, location FROM auto_shows WHERE focus = 'Electric';",SELECT * FROM auto_shows WHERE focus = 'Electric Vehicles';,0 Which vessels have had an incident in the past month?,"CREATE TABLE vessels(id INT, name TEXT); CREATE TABLE incidents(id INT, vessel_id INT, incident_date DATE); ","SELECT DISTINCT v.name FROM vessels v JOIN incidents i ON v.id = i.vessel_id WHERE incident_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) AND CURRENT_DATE;","SELECT v.name FROM vessels v JOIN incidents i ON v.id = i.vessel_id WHERE i.incident_date >= DATEADD(month, -1, GETDATE());",0 What is the minimum textile sourcing cost for a specific fabric type?,"CREATE TABLE textile_sourcing (id INT, item_id INT, fabric TEXT, cost DECIMAL);",SELECT MIN(cost) FROM textile_sourcing WHERE fabric = 'silk';,SELECT MIN(cost) FROM textile_sourcing WHERE fabric = 'Flat';,0 What is the average speed of vessels that departed from port 'A'?,"CREATE TABLE Port (id INT, name TEXT); CREATE TABLE Vessel (id INT, name TEXT, speed FLOAT, port_id INT); ",SELECT AVG(speed) FROM Vessel WHERE port_id = 1;,SELECT AVG(speed) FROM Vessel WHERE port_id = (SELECT id FROM Port WHERE name = 'A');,0 In what year did Easton LL Easton play in Maryland?,"CREATE TABLE table_13012165_1 (year VARCHAR, maryland VARCHAR);","SELECT COUNT(year) FROM table_13012165_1 WHERE maryland = ""Easton LL Easton"";","SELECT year FROM table_13012165_1 WHERE maryland = ""Easton LL Easton"";",0 "Determine the number of policyholders with a policy premium over $1000, grouped by policy type.","CREATE TABLE policyholder_4 (policyholder_id INT, policy_type VARCHAR(20), premium FLOAT); ","SELECT policy_type, COUNT(*) FROM policyholder_4 WHERE premium > 1000 GROUP BY policy_type;","SELECT policy_type, COUNT(*) FROM policyholder_4 WHERE premium > 1000 GROUP BY policy_type;",1 What is the party affiliation for senator mark Wagoner? ,"CREATE TABLE table_26129220_2 (party VARCHAR, senator VARCHAR);","SELECT party FROM table_26129220_2 WHERE senator = ""Mark Wagoner"";","SELECT party FROM table_26129220_2 WHERE senator = ""Mark Wagoner"";",1 "Which Surface has an Outcome of runner-up, and a Score in the final of 4–6, 6–7, 6–2, 2–6?","CREATE TABLE table_name_87 (surface VARCHAR, outcome VARCHAR, score_in_the_final VARCHAR);","SELECT surface FROM table_name_87 WHERE outcome = ""runner-up"" AND score_in_the_final = ""4–6, 6–7, 6–2, 2–6"";","SELECT surface FROM table_name_87 WHERE outcome = ""runner-up"" AND score_in_the_final = ""4–6, 6–7, 6–2, 2–6"";",1 How many stamps were designed for the theme of XII Summit de la Francophonie?,"CREATE TABLE table_11900773_6 (design VARCHAR, theme VARCHAR);","SELECT COUNT(design) FROM table_11900773_6 WHERE theme = ""XII Summit de la Francophonie"";","SELECT COUNT(design) FROM table_11900773_6 WHERE theme = ""XII Summit de la Francophonie"";",1 Who was the Home team in Tie #23?,"CREATE TABLE table_name_80 (home_team VARCHAR, tie_no VARCHAR);",SELECT home_team FROM table_name_80 WHERE tie_no = 23;,"SELECT home_team FROM table_name_80 WHERE tie_no = ""23"";",0 What is the number of legal aid organizations in New York City that provide services in Spanish?,"CREATE TABLE legal_aid_orgs (org_id INT, name VARCHAR(50), city VARCHAR(50), state VARCHAR(20), languages VARCHAR(50)); ",SELECT COUNT(*) FROM legal_aid_orgs WHERE city = 'New York' AND languages LIKE '%Spanish%';,SELECT COUNT(*) FROM legal_aid_orgs WHERE city = 'New York City' AND languages = 'Spanish';,0 Derik Fury plays for which college? ,"CREATE TABLE table_21321804_5 (college VARCHAR, player VARCHAR);","SELECT college FROM table_21321804_5 WHERE player = ""Derik Fury"";","SELECT college FROM table_21321804_5 WHERE player = ""Derik Fury"";",1 What model is the A310 of 1983?,"CREATE TABLE table_name_48 (model VARCHAR, a310 VARCHAR);","SELECT model FROM table_name_48 WHERE a310 = ""1983"";","SELECT model FROM table_name_48 WHERE a310 = ""1983"";",1 "Name the high assists for delta center 19,639","CREATE TABLE table_15869204_5 (high_assists VARCHAR, location_attendance VARCHAR);","SELECT high_assists FROM table_15869204_5 WHERE location_attendance = ""Delta Center 19,639"";","SELECT high_assists FROM table_15869204_5 WHERE location_attendance = ""Delta Center 19,639"";",1 What is the average CO2 emission of buildings constructed before 2000?,"CREATE TABLE buildings (id INT, name TEXT, year INT, co2_emissions FLOAT);",SELECT AVG(co2_emissions) FROM buildings WHERE year < 2000;,SELECT AVG(co2_emissions) FROM buildings WHERE year 2000;,0 "Tier of 2, and a Season of 2000–01 is what European competitions?","CREATE TABLE table_name_35 (european_competitions VARCHAR, tier VARCHAR, season VARCHAR);","SELECT european_competitions FROM table_name_35 WHERE tier = 2 AND season = ""2000–01"";","SELECT european_competitions FROM table_name_35 WHERE tier = 2 AND season = ""2000–01"";",1 "How many students and teachers have participated in mental health programs, for each district, and what percentage of the total population does this represent?","CREATE TABLE district_mh (district_id INT, participant INT, role TEXT); ","SELECT district_id, SUM(participant) as total_participants, 100.0 * SUM(participant) / (SELECT SUM(participant) FROM district_mh WHERE district_id = mh.district_id) as participation_percentage FROM district_mh GROUP BY district_id;","SELECT district_id, COUNT(DISTINCT participant) * 100.0 / (SELECT COUNT(DISTINCT participant) FROM district_mh) as percentage FROM district_mh GROUP BY district_id;",0 List all unique cause areas that have never had a donation.,"CREATE TABLE donations (id INT, donor_size VARCHAR(10), cause_area VARCHAR(20), amount INT); CREATE TABLE volunteers (id INT, name VARCHAR(30), cause_area VARCHAR(20)); ",SELECT cause_area FROM volunteers WHERE cause_area NOT IN (SELECT cause_area FROM donations);,SELECT DISTINCT cause_area FROM donations JOIN volunteers ON donations.cause_area = volunteers.cause_area WHERE donations.id IS NULL;,0 List the names and capacities of cargo ships that have never visited 'Port of Tokyo'.,"CREATE TABLE cargo_visits (cargo_ship_id INT, port_id INT, visited DATE); CREATE TABLE cargo_ships (id INT, name TEXT, capacity INT); CREATE TABLE ports (id INT, name TEXT); ","SELECT cargo_ships.name, cargo_ships.capacity FROM cargo_ships LEFT JOIN cargo_visits ON cargo_ships.id = cargo_visits.cargo_ship_id LEFT JOIN ports ON cargo_visits.port_id = ports.id WHERE ports.name IS NULL;","SELECT cargo_ships.name, cargo_ships.capacity FROM cargo_ships INNER JOIN cargo_visits ON cargo_ships.id = cargo_visits.cargo_ship_id INNER JOIN ports ON cargo_ships.port_id = ports.id WHERE ports.name = 'Port of Tokyo';",0 How many players are from Europe?,"CREATE TABLE players (id INT, name TEXT, country TEXT); ","SELECT COUNT(*) FROM players WHERE country IN ('United Kingdom', 'France', 'Germany', 'Italy', 'Spain');",SELECT COUNT(*) FROM players WHERE country = 'Europe';,0 "Which Week has a Game site of oakland-alameda county coliseum, and an Attendance larger than 52,169?","CREATE TABLE table_name_71 (week INTEGER, game_site VARCHAR, attendance VARCHAR);","SELECT MIN(week) FROM table_name_71 WHERE game_site = ""oakland-alameda county coliseum"" AND attendance > 52 OFFSET 169;","SELECT SUM(week) FROM table_name_71 WHERE game_site = ""oakland-alameda county coliseum"" AND attendance > 52 OFFSET 169;",0 Which race was on the Las Vegas Motor Speedway for 2 hours?,"CREATE TABLE table_name_36 (race VARCHAR, circuit VARCHAR, length VARCHAR);","SELECT race FROM table_name_36 WHERE circuit = ""las vegas motor speedway"" AND length = ""2 hours"";","SELECT race FROM table_name_36 WHERE circuit = ""las vegas motor speedway"" AND length = ""2 hours"";",1 What are the names and budgets of departments with budgets over $20 billion?,"CREATE TABLE government_departments (name TEXT, budget INTEGER); ","SELECT name, budget FROM government_departments WHERE budget > 200000000000;","SELECT name, budget FROM government_departments WHERE budget > 200000000;",0 Display the waste generation and recycling data for 'CityZ' in 2021.,"CREATE TABLE City (cid INT, city_name VARCHAR(255)); CREATE TABLE WasteData (wid INT, cid INT, year INT, waste_amount INT); CREATE TABLE RecyclingData (rec_id INT, cid INT, year INT, recycling_amount INT); ","SELECT City.city_name, WasteData.year, WasteData.waste_amount, RecyclingData.recycling_amount FROM City INNER JOIN WasteData ON City.cid = WasteData.cid INNER JOIN RecyclingData ON City.cid = RecyclingData.cid WHERE City.city_name = 'CityZ' AND WasteData.year = 2021;","SELECT City.city_name, WasteData.waste_amount, RecyclingData.recycling_amount FROM City INNER JOIN WasteData ON City.cid = WasteData.cid INNER JOIN RecyclingData ON City.cid = RecyclingData.cid WHERE City.city_name = 'CityZ' AND WasteData.year = 2021;",0 What is the total quantity of eco-friendly dyes used in clothing production in Q2 and Q4?,"CREATE TABLE Production_Data (Production_Date DATE, Dye_Type TEXT, Quantity INT); ","SELECT SUM(Quantity) FROM Production_Data WHERE Dye_Type IN ('Natural Dye', 'Low-Impact Dye') AND Production_Date BETWEEN '2022-04-01' AND '2022-09-30' OR Production_Date BETWEEN '2022-01-01' AND '2022-03-31';",SELECT SUM(Quantity) FROM Production_Data WHERE Dye_Type = 'Eco-Friendly Dye' AND Production_Date BETWEEN '2022-07-01' AND '2022-09-30';,0 Which district does the incumbent Luther Reily represent?,"CREATE TABLE table_2668169_2 (district VARCHAR, incumbent VARCHAR);","SELECT district FROM table_2668169_2 WHERE incumbent = ""Luther Reily"";","SELECT district FROM table_2668169_2 WHERE incumbent = ""Luther Reily"";",1 Delete record of 'Alice Johnson' from 'athletes' table,"CREATE TABLE athletes (name VARCHAR(100), sport VARCHAR(50), country VARCHAR(50), age INT);",DELETE FROM athletes WHERE name = 'Alice Johnson';,DELETE FROM athletes WHERE name = 'Alice Johnson';,1 Which Laps have Points of 29?,"CREATE TABLE table_name_23 (laps VARCHAR, points VARCHAR);",SELECT laps FROM table_name_23 WHERE points = 29;,SELECT laps FROM table_name_23 WHERE points = 29;,1 How much Dysprosium was produced annually from 2018 to 2021?,"CREATE TABLE production (year INT, element VARCHAR(10), quantity INT); ","SELECT year, SUM(quantity) FROM production WHERE element = 'Dysprosium' GROUP BY year;",SELECT SUM(quantity) FROM production WHERE element = 'Dysprosium' AND year BETWEEN 2018 AND 2021;,0 Update the name of equipment with ID 1 to 'Advanced Drone',"CREATE TABLE equipment (id INT, name VARCHAR(50));",UPDATE equipment SET name = 'Advanced Drone' WHERE id = 1;,UPDATE equipment SET name = 'Advanced Drone' WHERE id = 1;,1 Identify the number of IoT sensors in operation in New York,"CREATE TABLE sensor_info (sensor_id INT, sensor_location VARCHAR(50), operation_status VARCHAR(10));",SELECT COUNT(sensor_id) FROM sensor_info WHERE sensor_location = 'New York';,SELECT COUNT(*) FROM sensor_info WHERE sensor_location = 'New York' AND operation_status = 'Operation';,0 "Name the being qualities for having things of friendships, family, relationships with nature","CREATE TABLE table_name_20 (being__qualities_ VARCHAR, having__things_ VARCHAR);","SELECT being__qualities_ FROM table_name_20 WHERE having__things_ = ""friendships, family, relationships with nature"";","SELECT being__qualities_ FROM table_name_20 WHERE having__things_ = ""friendships, family, relationships with nature"";",1 Show the names of journalists and the number of events they reported.,"CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Event_ID VARCHAR, journalist_ID VARCHAR); CREATE TABLE event (Event_ID VARCHAR);","SELECT T3.Name, COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name;","SELECT T1.Name, COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.journalist_ID = T2.Event_ID GROUP BY T1.journalist_ID;",0 what is the latest episode in season 2 directed by jamie babbit?,"CREATE TABLE table_16390576_3 (no_in_season INTEGER, directed_by VARCHAR);","SELECT MAX(no_in_season) FROM table_16390576_3 WHERE directed_by = ""Jamie Babbit"";","SELECT MAX(no_in_season) FROM table_16390576_3 WHERE directed_by = ""Jamie Babbit"";",1 What is the total number of streams for artists in the 'Pop' genre?,"CREATE TABLE Genre (GenreID INT, Genre VARCHAR(50)); ",SELECT COUNT(*) FROM Streams JOIN Artists ON Streams.ArtistID = Artists.ArtistID WHERE Artists.Genre = 'Pop';,SELECT COUNT(*) FROM Genre WHERE Genre = 'Pop';,0 What city is fuhlsbüttel airport in?,"CREATE TABLE table_name_1 (city VARCHAR, airport VARCHAR);","SELECT city FROM table_name_1 WHERE airport = ""fuhlsbüttel airport"";","SELECT city FROM table_name_1 WHERE airport = ""fuhlsbüttel airport"";",1 How many customers have ordered the 'BBQ Chicken' pizza in January 2022?,"CREATE TABLE Orders (id INT, order_date DATE, customer_id INT); CREATE TABLE OrderDetails (id INT, order_id INT, menu_item VARCHAR(50));",SELECT COUNT(DISTINCT customer_id) FROM Orders JOIN OrderDetails ON Orders.id = OrderDetails.order_id WHERE menu_item = 'BBQ Chicken' AND MONTH(order_date) = 1 AND YEAR(order_date) = 2022;,SELECT COUNT(*) FROM Orders JOIN OrderDetails ON Orders.customer_id = OrderDetails.order_id WHERE menu_item = 'BBQ Chicken' AND order_date BETWEEN '2022-01-01' AND '2022-01-31';,0 What is the total production volume of rare earth elements in China for the year 2020?,"CREATE TABLE production (id INT, mine_id INT, year INT, product TEXT, production_volume INT); ",SELECT SUM(production_volume) FROM production WHERE year = 2020 AND product = 'Rare Earth Elements' AND mine_id IN (SELECT id FROM mines WHERE location = 'China');,SELECT SUM(production_volume) FROM production WHERE year = 2020 AND product = 'Rare Earth Elements';,0 How many items of each size were sold by each salesperson last month?,"CREATE TABLE salesperson_sizes (id INT, salesperson TEXT, size TEXT, quantity INT, date DATE);","SELECT salesperson, size, SUM(quantity) FROM salesperson_sizes WHERE EXTRACT(MONTH FROM date) = MONTH(CURDATE()) - 1 GROUP BY salesperson, size;","SELECT salesperson, size, SUM(quantity) FROM salesperson_sizes WHERE date >= DATEADD(month, -1, GETDATE()) GROUP BY salesperson, size;",0 Find the number of spacecraft manufactured by each company.,"CREATE TABLE SpacecraftManufacturing(company VARCHAR(20), cost INT); ","SELECT company, COUNT(*) FROM SpacecraftManufacturing GROUP BY company;","SELECT company, COUNT(*) FROM SpacecraftManufacturing GROUP BY company;",1 "Insert a new investment round into the ""investment_rounds"" table for 'Charlie Startup' with $10M raised on 2022-01-01","CREATE TABLE investment_rounds (id INT, company_name VARCHAR(100), round_type VARCHAR(50), raised_amount FLOAT, round_date DATE);","INSERT INTO investment_rounds (id, company_name, round_type, raised_amount, round_date) VALUES (3, 'Charlie Startup', 'Series B', 10000000, '2022-01-01');","INSERT INTO investment_rounds (id, company_name, round_type, raised_amount, round_date) VALUES ('Charlie Startup', '2022-01-01', 10000000);",0 How many 'high' severity security incidents were recorded in the last month for the 'finance' department?,"CREATE TABLE incidents (id INT, department VARCHAR(255), severity VARCHAR(255), incident_date DATE); SELECT CURDATE(), DATE_SUB(CURDATE(), INTERVAL 1 MONTH) INTO @current_date, @start_date; SELECT COUNT(*) FROM incidents WHERE department = 'finance' AND severity = 'high' AND incident_date BETWEEN @start_date AND @current_date;","SELECT COUNT(*) FROM incidents WHERE department = 'finance' AND severity = 'high' AND incident_date BETWEEN DATE_SUB(CURDATE(), INTERVAL 1 MONTH) AND CURDATE();","SELECT COUNT(*) FROM incidents WHERE department = 'finance' AND severity = 'high' AND incident_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH);",0 "What is the total cargo weight (in metric tons) handled by each port in the last month, including the port name and the total cargo weight?","CREATE TABLE Port (port_name VARCHAR(50), dock_count INT); CREATE TABLE Cargo (cargo_id INT, cargo_weight FLOAT, vessel_name VARCHAR(50), dock_date DATE); ","SELECT P.port_name, SUM(C.cargo_weight) as total_cargo_weight FROM Port P INNER JOIN Cargo C ON 1=1 WHERE C.dock_date >= DATEADD(MONTH, -1, GETDATE()) GROUP BY P.port_name;","SELECT Port.port_name, SUM(Cargo.cargo_weight) as total_cargo_weight FROM Port INNER JOIN Cargo ON Port.port_name = Cargo.port_name WHERE Cargo.dock_date >= DATEADD(month, -1, GETDATE()) GROUP BY Port.port_name;",0 What is the total number of wins for riders with fewer than 56 races and more than 0 titles?,"CREATE TABLE table_name_45 (wins VARCHAR, races VARCHAR, titles VARCHAR);",SELECT COUNT(wins) FROM table_name_45 WHERE races < 56 AND titles > 0;,SELECT COUNT(wins) FROM table_name_45 WHERE races 56 AND titles > 0;,0 Which artist has the highest number of concert appearances in the USA?,"CREATE TABLE ConcertAppearances (AppearanceID INT, Artist VARCHAR(255), Venue VARCHAR(255), Country VARCHAR(255), Year INT, Appearances INT); ","SELECT Artist, MAX(Appearances) FROM ConcertAppearances WHERE Country = 'USA' GROUP BY Artist;","SELECT Artist, MAX(Appearances) FROM ConcertAppearances WHERE Country = 'USA' GROUP BY Artist;",1 "When the United Kingdom had a time of 1:30.51.2, what was the lowest that they ranked?","CREATE TABLE table_name_8 (place INTEGER, country VARCHAR, time VARCHAR);","SELECT MIN(place) FROM table_name_8 WHERE country = ""united kingdom"" AND time = ""1:30.51.2"";","SELECT MIN(place) FROM table_name_8 WHERE country = ""united kingdom"" AND time = ""1:30.51.2"";",1 Which home team played against the away team Carlton?,"CREATE TABLE table_name_74 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_74 WHERE away_team = ""carlton"";","SELECT home_team FROM table_name_74 WHERE away_team = ""carlton"";",1 What was the minimum number of the episode that first aired August 11?,"CREATE TABLE table_25691838_8 (episode__number INTEGER, original_airdate VARCHAR);","SELECT MIN(episode__number) FROM table_25691838_8 WHERE original_airdate = ""August 11"";","SELECT MIN(episode__number) FROM table_25691838_8 WHERE original_airdate = ""August 11"";",1 What brakes for the 4-speed automatic gearbox?,"CREATE TABLE table_250230_2 (brakes VARCHAR, gearbox VARCHAR);","SELECT brakes FROM table_250230_2 WHERE gearbox = ""4-speed automatic"";","SELECT brakes FROM table_250230_2 WHERE gearbox = ""4-speed automatic"";",1 Which countries in the Middle East have the highest revenue from cultural heritage tourism?,"CREATE TABLE tourism_revenue (country VARCHAR(50), sector VARCHAR(50), revenue DECIMAL(10,2)); ","SELECT country, SUM(revenue) as total_revenue FROM tourism_revenue WHERE sector = 'Cultural Heritage' AND country LIKE 'Middle%' GROUP BY country ORDER BY total_revenue DESC LIMIT 1;","SELECT country, MAX(revenue) FROM tourism_revenue WHERE sector = 'cultural heritage' GROUP BY country;",0 Determine the percentage of building permit data in Florida that is for single-family homes.,"CREATE TABLE permit_data (permit_id INT, property_type VARCHAR(10), state VARCHAR(10)); ",SELECT PERCENTAGE := (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM permit_data WHERE state = 'Florida')) FROM permit_data WHERE property_type = 'Single-family' AND state = 'Florida';,SELECT 100.0 * COUNT(*) / (SELECT COUNT(*) FROM permit_data WHERE property_type = 'Single-family' AND state = 'Florida') AS percentage FROM permit_data WHERE property_type = 'Single-family' AND state = 'Florida';,0 How many accessible technology initiatives were launched in the last 5 years?,"CREATE TABLE initiative (initiative_id INT, initiative_name VARCHAR(255), launch_date DATE); ","SELECT COUNT(*) as num_initiatives FROM initiative WHERE launch_date >= DATE_SUB(CURDATE(), INTERVAL 5 YEAR);","SELECT COUNT(*) FROM initiative WHERE launch_date >= DATEADD(year, -5, GETDATE());",0 What is the highest number of losses that the team incurred while scoring less than 79 points in 10 games with a point differential less than 34?,"CREATE TABLE table_name_69 (losses INTEGER, point_differential VARCHAR, points_for VARCHAR, games_played VARCHAR);",SELECT MAX(losses) FROM table_name_69 WHERE points_for < 79 AND games_played = 10 AND point_differential < 34;,SELECT MAX(losses) FROM table_name_69 WHERE points_for 79 AND games_played = 10 AND point_differential 34;,0 "What is the average salary of employees in each department, pivoted by job level?","CREATE TABLE departments (dept_id INT, dept_name TEXT); CREATE TABLE employees (employee_id INT, name TEXT, salary INT, dept_id INT, job_level TEXT); ","SELECT dept_name, SUM(CASE WHEN job_level = 'Manager' THEN salary ELSE 0 END) AS manager_salary, SUM(CASE WHEN job_level = 'Senior' THEN salary ELSE 0 END) AS senior_salary, SUM(CASE WHEN job_level = 'Junior' THEN salary ELSE 0 END) AS junior_salary FROM employees JOIN departments ON employees.dept_id = departments.dept_id GROUP BY dept_name;","SELECT d.dept_name, e.job_level, AVG(e.salary) as avg_salary FROM departments d JOIN employees e ON d.dept_id = e.dept_id GROUP BY d.dept_name, e.job_level;",0 What team is owned by Mark Smith and has Paul Clapprood as a crew chief?,"CREATE TABLE table_name_8 (team VARCHAR, owner_s_ VARCHAR, crew_chief VARCHAR);","SELECT team FROM table_name_8 WHERE owner_s_ = ""mark smith"" AND crew_chief = ""paul clapprood"";","SELECT team FROM table_name_8 WHERE owner_s_ = ""mark smith"" AND crew_chief = ""paul claapprood"";",0 What was the average time between inspections for all vessels in the Mediterranean in 2021?,"CREATE TABLE Vessels (id INT, name VARCHAR(255), region VARCHAR(255)); CREATE TABLE Inspections (id INT, vessel_id INT, inspection_date DATE); ","SELECT AVG(DATEDIFF(Inspections.inspection_date, LAG(Inspections.inspection_date, 1) OVER (PARTITION BY Inspections.vessel_id ORDER BY Inspections.inspection_date))) FROM Inspections INNER JOIN Vessels ON Inspections.vessel_id = Vessels.id WHERE Vessels.region = 'Mediterranean' AND YEAR(Inspections.inspection_date) = 2021;","SELECT AVG(DATEDIFF(day, inspection_date, '%Y-%m')) FROM Inspections JOIN Vessels ON Inspections.vessel_id = Vessels.id WHERE Vessels.region = 'Mediterranean' AND YEAR(Inspection_date) = 2021;",0 "Create a view named 'defense_contract_summary' with total contracts, total amount, and average amount for defense contracts","CREATE TABLE defense_contracts (contract_id INT, agency VARCHAR(255), vendor VARCHAR(255), amount DECIMAL(10, 2), year INT);","CREATE VIEW defense_contract_summary AS SELECT COUNT(*) AS total_contracts, SUM(amount) AS total_amount, AVG(amount) AS average_amount FROM defense_contracts;","CREATE VIEW defense_contract_summary AS SELECT agency, vendor, SUM(amount) AS total_contracts, SUM(amount) AS total_amount, AVG(amount) AS avg_amount FROM defense_contracts GROUP BY agency, vendor;",0 What is the total funding raised by biotech startups in 2021?,"CREATE TABLE startups (id INT, name VARCHAR(50), location VARCHAR(50), industry VARCHAR(50), funding FLOAT, year INT);",SELECT SUM(funding) FROM startups WHERE industry = 'biotech' AND year = 2021;,SELECT SUM(funding) FROM startups WHERE industry = 'Biotech' AND year = 2021;,0 Which painting was created right after 'The Scream' by Edvard Munch?,"CREATE TABLE munch_paintings (painting_id INT, painting_title VARCHAR(255), painting_creation_date DATE); ","SELECT painting_id, painting_title, painting_creation_date, LEAD(painting_creation_date, 1) OVER (ORDER BY painting_creation_date ASC) as next_painting_date FROM munch_paintings WHERE painting_title = 'The Scream';",SELECT painting_title FROM munch_paintings WHERE painting_creation_date > 'The Scream';,0 "What is the total number of incidents and vulnerabilities, by attack vector and country?","CREATE TABLE incidents (id INT, date DATE, severity VARCHAR(10), attack_vector VARCHAR(20), country VARCHAR(20)); CREATE TABLE vulnerabilities (id INT, date DATE, severity VARCHAR(10), system VARCHAR(20), country VARCHAR(20)); ","SELECT 'incidents' as type, attack_vector, country, COUNT(*) as total FROM incidents GROUP BY attack_vector, country UNION ALL SELECT 'vulnerabilities' as type, system as attack_vector, country, COUNT(*) as total FROM vulnerabilities GROUP BY system, country;","SELECT i.attack_vector, v.country, COUNT(i.id) as total_incidents, COUNT(v.id) as total_vulnerabilities FROM incidents i JOIN vulnerabilities v ON i.country = v.country GROUP BY i.attack_vector, v.country;",0 Identify countries with a minimum of 5 marine research stations.,"CREATE TABLE countries (country_name TEXT, num_research_stations INT); ",SELECT country_name FROM countries WHERE num_research_stations >= 5;,SELECT country_name FROM countries WHERE num_research_stations 5;,0 What is the average gas price for transactions on the Solana network in Q2 2021?,"CREATE TABLE solana_transactions (tx_hash VARCHAR(255), block_number INT, timestamp TIMESTAMP, from_address VARCHAR(42), to_address VARCHAR(42), gas_price DECIMAL(18, 6));",SELECT AVG(gas_price) AS avg_gas_price FROM solana_transactions WHERE timestamp >= '2021-04-01 00:00:00' AND timestamp < '2021-07-01 00:00:00';,SELECT AVG(gas_price) FROM solana_transactions WHERE timestamp BETWEEN '2021-04-01' AND '2021-06-30';,0 What is the Woodside for the 16:19 Coombe Road?,"CREATE TABLE table_name_81 (woodside VARCHAR, coombe_road VARCHAR);","SELECT woodside FROM table_name_81 WHERE coombe_road = ""16:19"";","SELECT woodside FROM table_name_81 WHERE coombe_road = ""16:19"";",1 How many autonomous driving research papers were published by authors from the US in the 'ResearchPapers' database?,"CREATE TABLE ResearchPapers (Id INT, Title VARCHAR(100), Author VARCHAR(100), PublicationYear INT, Country VARCHAR(50));",SELECT COUNT(*) FROM ResearchPapers WHERE Author = 'Smith' OR Author = 'Johnson' OR Author = 'Williams' AND Country = 'USA';,SELECT COUNT(*) FROM ResearchPapers WHERE Author LIKE '%Autonomous Driving%' AND Country = 'USA';,0 "What is the number of disaster relief missions carried out by each organization, sorted by the number of missions in descending order?","CREATE TABLE disaster_relief_missions (mission_id INT, mission_name VARCHAR(255), organization_id INT); CREATE TABLE organizations (organization_id INT, organization_name VARCHAR(255)); ","SELECT organization_id, COUNT(mission_id) as num_of_missions FROM disaster_relief_missions INNER JOIN organizations ON disaster_relief_missions.organization_id = organizations.organization_id GROUP BY organization_id ORDER BY num_of_missions DESC;","SELECT o.organization_name, COUNT(drm.mission_id) as mission_count FROM disaster_relief_missions drm JOIN organizations o ON drm.organization_id = o.organization_id GROUP BY o.organization_name ORDER BY mission_count DESC;",0 what is the venue of neman,"CREATE TABLE table_name_47 (venue VARCHAR, team VARCHAR);","SELECT venue FROM table_name_47 WHERE team = ""neman"";","SELECT venue FROM table_name_47 WHERE team = ""neman"";",1 Add data to 'TeachersProfessionalDevelopment',"CREATE TABLE TeachersProfessionalDevelopment (TeacherID INT PRIMARY KEY, DevelopmentType VARCHAR(50), StartDate DATE, EndDate DATE); ","INSERT INTO TeachersProfessionalDevelopment (TeacherID, DevelopmentType, StartDate, EndDate) VALUES (10, 'Workshop', '2022-02-01', '2022-02-03'), (11, 'Conference', '2022-03-01', '2022-03-05'), (12, 'Online Course', '2022-01-10', '2022-02-28');","INSERT INTO TeachersProfessionalDevelopment (TeacherID, DevelopmentType, StartDate, EndDate) VALUES (1, 'TeachersProfessionalDevelopment', '2022-03-01', '2022-03-31');",0 What is the minimum labor productivity for each mine located in the USA?,"CREATE TABLE mines (mine_id INT, name TEXT, location TEXT, productivity FLOAT); ","SELECT location, MIN(productivity) FROM mines GROUP BY location;","SELECT name, MIN(productivity) FROM mines WHERE location = 'USA' GROUP BY name;",0 List all the unique services provided by the government in 'Texas' and 'New York'.,"CREATE TABLE services (state VARCHAR(20), service VARCHAR(20)); ","SELECT DISTINCT service FROM services WHERE state IN ('Texas', 'New York');","SELECT DISTINCT service FROM services WHERE state IN ('Texas', 'New York');",1 How large was the crowd at Carlton's home game?,"CREATE TABLE table_name_10 (crowd VARCHAR, home_team VARCHAR);","SELECT COUNT(crowd) FROM table_name_10 WHERE home_team = ""carlton"";","SELECT crowd FROM table_name_10 WHERE home_team = ""carlton"";",0 List the auto shows with more than 500 exhibitors,"CREATE TABLE auto_shows (id INT, show_name VARCHAR(50), num_exhibitors INT, year INT); ","SELECT show_name, year FROM auto_shows WHERE num_exhibitors > 500;",SELECT show_name FROM auto_shows WHERE num_exhibitors > 500;,0 "In what way was Kewaubis executed on December 27, 1827?","CREATE TABLE table_name_99 (method VARCHAR, date_of_execution VARCHAR, name VARCHAR);","SELECT method FROM table_name_99 WHERE date_of_execution = ""december 27, 1827"" AND name = ""kewaubis"";","SELECT method FROM table_name_99 WHERE date_of_execution = ""december 27, 1827"" AND name = ""kewaubis"";",1 List all mammals,"CREATE TABLE animals (id INT PRIMARY KEY, name VARCHAR(50), species VARCHAR(50), population INT); CREATE VIEW mammals AS SELECT * FROM animals WHERE species = 'Mammal';",SELECT * FROM mammals;,SELECT * FROM mammals;,1 What is the Date with an Opponent that is hearts?,"CREATE TABLE table_name_51 (date VARCHAR, opponent VARCHAR);","SELECT date FROM table_name_51 WHERE opponent = ""hearts"";","SELECT date FROM table_name_51 WHERE opponent = ""hearts"";",1 "What is the average Year Named, when Latitude is 37.9N, and when Diameter (km) is greater than 76?","CREATE TABLE table_name_70 (year_named INTEGER, latitude VARCHAR, diameter__km_ VARCHAR);","SELECT AVG(year_named) FROM table_name_70 WHERE latitude = ""37.9n"" AND diameter__km_ > 76;","SELECT AVG(year_named) FROM table_name_70 WHERE latitude = ""37.9n"" AND diameter__km_ > 76;",1 "What is the sum of Points, when the Performer is fe-mail?","CREATE TABLE table_name_64 (points INTEGER, performer VARCHAR);","SELECT SUM(points) FROM table_name_64 WHERE performer = ""fe-mail"";","SELECT SUM(points) FROM table_name_64 WHERE performer = ""fe-mail"";",1 List all policies and their respective underwriters.,"CREATE TABLE policies (policy_id INT, underwriter_id INT); CREATE TABLE underwriters (underwriter_id INT, first_name VARCHAR(50), last_name VARCHAR(50));","SELECT policies.policy_id, underwriters.first_name, underwriters.last_name FROM policies INNER JOIN underwriters ON policies.underwriter_id = underwriters.underwriter_id;","SELECT policies.policy_id, underwriters.underwriter_id FROM policies INNER JOIN underwriters ON policies.underwriter_id = underwriters.underwriter_id;",0 What was the date of the game that had a goal of 3?,"CREATE TABLE table_name_48 (date VARCHAR, goal VARCHAR);",SELECT date FROM table_name_48 WHERE goal = 3;,"SELECT date FROM table_name_48 WHERE goal = ""3"";",0 Find the number of tickets sold for each game of the baseball team in Chicago.,"CREATE TABLE tickets (ticket_id INT, game_id INT, quantity INT, price DECIMAL(5,2)); CREATE TABLE games (game_id INT, team VARCHAR(20), location VARCHAR(20)); ","SELECT games.team, SUM(tickets.quantity) FROM tickets INNER JOIN games ON tickets.game_id = games.game_id WHERE games.team = 'Cubs' GROUP BY games.team;","SELECT g.team, COUNT(t.ticket_id) as tickets_sold FROM tickets t JOIN games g ON t.game_id = g.game_id WHERE g.location = 'Chicago' GROUP BY g.team;",0 What is the average percentage of women in the workforce in each industry?,"CREATE TABLE industries (name VARCHAR(255), workforce_count INT); CREATE TABLE workforce (industry VARCHAR(255), gender VARCHAR(255), percentage DECIMAL(10,2)); ","SELECT industry, AVG(percentage) FROM workforce WHERE gender = 'Women' GROUP BY industry;","SELECT i.name, AVG(w.percentage) as avg_female_percentage FROM industries i JOIN workforce w ON i.name = w.industry GROUP BY i.name;",0 How many Vacators were listed when the district was North Carolina 3rd?,"CREATE TABLE table_225095_4 (vacator VARCHAR, district VARCHAR);","SELECT COUNT(vacator) FROM table_225095_4 WHERE district = ""North Carolina 3rd"";","SELECT COUNT(vacator) FROM table_225095_4 WHERE district = ""North Carolina 3rd"";",1 Which engine is used by Team Lemans with Hiroaki Ishiura driving?,"CREATE TABLE table_name_65 (engine VARCHAR, team VARCHAR, driver VARCHAR);","SELECT engine FROM table_name_65 WHERE team = ""team lemans"" AND driver = ""hiroaki ishiura"";","SELECT engine FROM table_name_65 WHERE team = ""team lemans"" AND driver = ""hiroaki ishiura"";",1 Which Date had a Result of 7–20?,"CREATE TABLE table_name_37 (date VARCHAR, result VARCHAR);","SELECT date FROM table_name_37 WHERE result = ""7–20"";","SELECT date FROM table_name_37 WHERE result = ""7–20"";",1 How many traffic violation complaints were submitted in the last month in the transportation department?,"CREATE TABLE TrafficViolations (ID INT, Date DATE, Department VARCHAR(255), Complaint VARCHAR(255)); ","SELECT COUNT(*) FROM TrafficViolations WHERE Department = 'Transportation' AND Date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) AND Complaint = 'Violation'","SELECT COUNT(*) FROM TrafficViolations WHERE Department = 'Transportation' AND Date >= DATEADD(month, -1, GETDATE());",0 What is the total number of appearances for players from Chaux-de-Fonds with places over 8?,"CREATE TABLE table_name_25 (appearances VARCHAR, team VARCHAR, place VARCHAR);","SELECT COUNT(appearances) FROM table_name_25 WHERE team = ""chaux-de-fonds"" AND place > 8;","SELECT COUNT(appearances) FROM table_name_25 WHERE team = ""chaux-de-fonds"" AND place > 8;",1 What is the highest attendance of the game with eastwood town as the away team?,"CREATE TABLE table_name_46 (attendance INTEGER, away_team VARCHAR);","SELECT MAX(attendance) FROM table_name_46 WHERE away_team = ""eastwood town"";","SELECT MAX(attendance) FROM table_name_46 WHERE away_team = ""eastwood town"";",1 What was the total funding received from private sources in Q2 2022?,"CREATE TABLE Funding (funding_source VARCHAR(50), funding_amount DECIMAL(10,2), funding_date DATE); ",SELECT SUM(funding_amount) AS total_private_funding FROM Funding WHERE funding_source = 'Private' AND funding_date BETWEEN '2022-04-01' AND '2022-06-30';,SELECT SUM(funding_amount) FROM Funding WHERE funding_source = 'Private' AND funding_date BETWEEN '2022-04-01' AND '2022-06-30';,0 Update the cultural competency score of 'Hospital A' to 90.,"CREATE TABLE hospitals (name VARCHAR(50), cultural_competency_score INT); ",UPDATE hospitals SET cultural_competency_score = 90 WHERE name = 'Hospital A';,UPDATE hospitals SET cultural_competency_score = 90 WHERE name = 'Hospital A';,1 What is the average water usage for hemp farming?,"CREATE TABLE HempFarming (id INT, water_usage DECIMAL);",select avg(water_usage) from HempFarming;,SELECT AVG(water_usage) FROM HempFarming;,0 What is the maximum number of works sold by an artist in a single year?,"CREATE TABLE Artists (id INT, name VARCHAR(255)); CREATE TABLE Sales (id INT, artist_id INT, sale_date DATE); CREATE TABLE Works (id INT, artist_id INT, sale_date DATE);","SELECT artist_id, MAX(sales_per_year) FROM (SELECT artist_id, YEAR(sale_date) AS sale_year, COUNT(*) AS sales_per_year FROM Sales JOIN Works ON Sales.id = Works.id GROUP BY artist_id, sale_year) subquery GROUP BY artist_id;","SELECT MAX(Sales.sale_date) FROM Sales INNER JOIN Artists ON Sales.artist_id = Artists.id INNER JOIN Works ON Sales.artist_id = Works.artist_id WHERE Sales.sale_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE;",0 What percentage of cosmetics sold in Canada contain organic ingredients?,"CREATE TABLE sales (product_name TEXT, sale_date DATE, country TEXT, organic BOOLEAN); ",SELECT (COUNT(*) FILTER (WHERE organic = true)) * 100.0 / COUNT(*) as organic_percentage FROM sales WHERE country = 'Canada';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM sales WHERE country = 'Canada')) AS percentage FROM sales WHERE country = 'Canada' AND organic = true;,0 What is the total revenue of natural skincare products in Australia in the last year?,"CREATE TABLE skincare_revenue (revenue_id INT, product_id INT, revenue DECIMAL(5,2), is_natural BOOLEAN, revenue_date DATE); ",SELECT SUM(revenue) FROM skincare_revenue WHERE is_natural = true AND revenue_date BETWEEN '2020-01-01' AND '2021-12-31' AND country = 'Australia';,"SELECT SUM(revenue) FROM skincare_revenue WHERE is_natural = true AND revenue_date >= DATEADD(year, -1, GETDATE());",0 Identify the number of companies in each sector that have an ESG score above 80.,"CREATE TABLE companies (id INT, sector VARCHAR(20), ESG_score FLOAT); ","SELECT sector, COUNT(*) FROM companies WHERE ESG_score > 80 GROUP BY sector;","SELECT sector, COUNT(*) FROM companies WHERE ESG_score > 80 GROUP BY sector;",1 Which stage has kourdali as the name?,"CREATE TABLE table_21578303_2 (stage VARCHAR, name VARCHAR);","SELECT stage FROM table_21578303_2 WHERE name = ""Kourdali"";","SELECT stage FROM table_21578303_2 WHERE name = ""Kourdali"";",1 Who was in the Original West End Cast when the Original Broadway Cast was audrie neenan?,"CREATE TABLE table_name_1 (original_west_end_cast VARCHAR, original_broadway_cast VARCHAR);","SELECT original_west_end_cast FROM table_name_1 WHERE original_broadway_cast = ""audrie neenan"";","SELECT original_west_end_cast FROM table_name_1 WHERE original_broadway_cast = ""audrie neenan"";",1 How many safety tests were conducted on autonomous vehicles in Q1 2021?,"CREATE TABLE Safety_Tests_2 (Test_Quarter INT, Vehicle_Type VARCHAR(20)); ",SELECT COUNT(*) FROM Safety_Tests_2 WHERE Vehicle_Type = 'Autonomous' AND Test_Quarter = 1;,SELECT COUNT(*) FROM Safety_Tests_2 WHERE Test_Quarter = 1 AND Vehicle_Type = 'Autonomous';,0 What is the maximum sale price of naval equipment negotiated by VWX Corp with countries in the Asian region?,"CREATE TABLE Contract_Negotiations (contractor VARCHAR(255), region VARCHAR(255), equipment VARCHAR(255), price DECIMAL(10,2), negotiation_date DATE);",SELECT MAX(price) FROM Contract_Negotiations WHERE contractor = 'VWX Corp' AND region = 'Asia' AND equipment = 'naval';,SELECT MAX(price) FROM Contract_Negotiations WHERE contractor = 'VWX Corp' AND region = 'Asia' AND equipment = 'Naval';,0 "Insert a new record into the ""collective_bargaining"" table with the following values: ""Union B"", ""Company ABC"", ""2022-07-01""","CREATE TABLE collective_bargaining (union_name VARCHAR(20), company_name VARCHAR(20), start_date DATE);","INSERT INTO collective_bargaining (union_name, company_name, start_date) VALUES ('Union B', 'Company ABC', '2022-07-01');","INSERT INTO collective_bargaining (union_name, company_name, start_date) VALUES ('Union B', 'Company ABC', '2022-07-01');",1 Who are the farmers who received funding from the 'Rural Development Fund' in 'Asia' and their respective funding amounts?,"CREATE TABLE Rural_Development_Fund(farmer_id INT, farmer_name VARCHAR(50), country VARCHAR(50), funding FLOAT); ","SELECT farmer_name, funding FROM Rural_Development_Fund WHERE country = 'Asia';","SELECT farmer_name, funding FROM Rural_Development_Fund WHERE country = 'Asia';",1 "What record has points less than 16, and detroit as the home?","CREATE TABLE table_name_13 (record VARCHAR, points VARCHAR, home VARCHAR);","SELECT record FROM table_name_13 WHERE points < 16 AND home = ""detroit"";","SELECT record FROM table_name_13 WHERE points 16 AND home = ""detroit"";",0 Which chemical compounds have been used in safety protocols since 2020-01-01?,"CREATE TABLE safety_protocols (id INT, compound_name VARCHAR(255), last_use DATE); ",SELECT compound_name FROM safety_protocols WHERE last_use >= '2020-01-01';,SELECT compound_name FROM safety_protocols WHERE last_use >= '2020-01-01';,1 Add a column named 'Population' to MentalHealthParity,"CREATE TABLE MentalHealthParity (ID INT PRIMARY KEY, State VARCHAR(2), ParityStatus VARCHAR(10));",ALTER TABLE MentalHealthParity ADD Population INT;,"INSERT INTO MentalHealthParity (ID, State, ParityStatus) VALUES (1, 'State', 'Population');",0 Find the ratio of R&D expenditures between 'AstraZeneca' and 'Novartis'.,"CREATE TABLE rd_expenditures (company TEXT, year INT, amount FLOAT); ",SELECT (SELECT SUM(amount) FROM rd_expenditures WHERE company = 'AstraZeneca' AND year = 2020) / (SELECT SUM(amount) FROM rd_expenditures WHERE company = 'Novartis' AND year = 2020);,SELECT AVG(amount) FROM rd_expenditures WHERE company = 'AstraZeneca' INTERSECT SELECT AVG(amount) FROM rd_expenditures WHERE company = 'Novartis';,0 What is the Writer with an Actual Title that is mork & mindy?,"CREATE TABLE table_name_8 (writer VARCHAR, actual_title VARCHAR);","SELECT writer FROM table_name_8 WHERE actual_title = ""mork & mindy"";","SELECT writer FROM table_name_8 WHERE actual_title = ""mork & mindy"";",1 Delete the painting 'Guernica' from the 'Paintings' table.,"CREATE TABLE Paintings (PaintingID INT, Title VARCHAR(50), ArtistID INT, YearCreated INT); ",DELETE FROM Paintings WHERE Title = 'Guernica';,DELETE FROM Paintings WHERE Title = 'Guernica';,1 The game with a loss of smith (2-4) ended with what score?,"CREATE TABLE table_name_6 (score VARCHAR, loss VARCHAR);","SELECT score FROM table_name_6 WHERE loss = ""smith (2-4)"";","SELECT score FROM table_name_6 WHERE loss = ""smith (2-4)"";",1 Find the least popular size among customers,"CREATE TABLE customer_size (id INT, name VARCHAR(50), size VARCHAR(20)); ","SELECT size, COUNT(*) FROM customer_size GROUP BY size ORDER BY COUNT(*) ASC LIMIT 1;","SELECT size, MIN(size) FROM customer_size GROUP BY size;",0 "What is the highest vertical drop among the 1,200 meter long tracks?","CREATE TABLE table_name_9 (vertical_drop__m_ INTEGER, length__m_ VARCHAR);",SELECT MAX(vertical_drop__m_) FROM table_name_9 WHERE length__m_ = 1 OFFSET 200;,"SELECT MAX(vertical_drop__m_) FROM table_name_9 WHERE length__m_ = ""1,200"";",0 How many citizen feedback records were received for each public service in the state of California in the last month?,"CREATE TABLE feedback (service VARCHAR(255), date DATE); ","SELECT service, COUNT(*) FROM feedback WHERE date >= DATEADD(month, -1, GETDATE()) GROUP BY service;","SELECT service, COUNT(*) FROM feedback WHERE date >= DATEADD(month, -1, GETDATE()) GROUP BY service;",1 "Which Purpose has a Location of enewetak, runit (yvonne) and the Name of cactus?","CREATE TABLE table_name_96 (purpose VARCHAR, location VARCHAR, name VARCHAR);","SELECT purpose FROM table_name_96 WHERE location = ""enewetak, runit (yvonne)"" AND name = ""cactus"";","SELECT purpose FROM table_name_96 WHERE location = ""enewetak, runit (yvonne)"" AND name = ""cactus"";",1 "What is GDP 2012 Millions of Euro, when Population in Millions is less than 1.3, and when GDP (Nominal) Per Capita 2012 Euro is 20,700(p)?","CREATE TABLE table_name_51 (gdp_2012_millions_of_euro VARCHAR, population_in_millions VARCHAR, gdp__nominal__per_capita_2012_euro VARCHAR);","SELECT gdp_2012_millions_of_euro FROM table_name_51 WHERE population_in_millions < 1.3 AND gdp__nominal__per_capita_2012_euro = ""20,700(p)"";","SELECT gdp_2012_millions_of_euro FROM table_name_51 WHERE population_in_millions 1.3 AND gdp__nominal__per_capita_2012_euro = ""20,700(p)"";",0 "What is the total number of workers in the 'Arts' industry who are part of a union and earn more than $70,000?","CREATE TABLE workers (id INT, industry VARCHAR(255), salary FLOAT, union_member BOOLEAN); ",SELECT COUNT(*) FROM workers WHERE industry = 'Arts' AND union_member = true AND salary > 70000;,SELECT COUNT(*) FROM workers WHERE industry = 'Arts' AND union_member = true AND salary > 70000;,1 What is the total number of vehicles produced by each manufacturer in the 'vehicle_manufacturers' table?,"CREATE TABLE vehicle_manufacturers (manufacturer_id INT, manufacturer VARCHAR(50)); CREATE TABLE vehicle_production_data (vehicle_id INT, manufacturer_id INT, make VARCHAR(50), model VARCHAR(50), production_year INT);","SELECT manufacturer, COUNT(*) FROM vehicle_manufacturers JOIN vehicle_production_data ON vehicle_manufacturers.manufacturer_id = vehicle_production_data.manufacturer_id GROUP BY manufacturer;","SELECT vm.manufacturer, COUNT(vpd.vehicle_id) as total_vehicles FROM vehicle_manufacturers vm JOIN vehicle_production_data vpd ON vm.manufacturer_id = vpd.manufacturer_id GROUP BY vm.manufacturer;",0 Calculate the local economic impact by country?,"CREATE TABLE local_businesses (business_id INT, business_name VARCHAR(50), country VARCHAR(30)); CREATE TABLE hotel_business_partnerships (partnership_id INT, hotel_id INT, business_id INT); ","SELECT country, SUM(price) FROM local_businesses JOIN hotel_business_partnerships ON local_businesses.business_id = hotel_business_partnerships.business_id JOIN hotel_rooms ON hotel_business_partnerships.hotel_id = hotel_rooms.hotel_id WHERE hotel_rooms.is_eco_friendly = TRUE GROUP BY country;","SELECT lb.country, SUM(hbp.partnership_id) as total_impact FROM local_businesses lb JOIN hotel_business_partnerships hbp ON lb.business_id = hbp.business_id GROUP BY lb.country;",0 "Find the number of AI safety incidents reported in Europe, Asia, and Africa, and provide a breakdown by incident category.","CREATE TABLE safety_incidents (incident_id INT, incident_date DATE, country VARCHAR(255), incident_category VARCHAR(255)); ","SELECT incident_category, COUNT(*) as num_incidents FROM safety_incidents WHERE country IN ('Europe', 'Asia', 'Africa') GROUP BY incident_category;","SELECT country, incident_category, COUNT(*) as incident_count FROM safety_incidents WHERE country IN ('Europe', 'Asia', 'Africa') GROUP BY country, incident_category;",0 Get the number of dams in each county in Texas,"CREATE TABLE Dams (dam_id int, dam_name varchar(255), county varchar(255), state varchar(255));","SELECT county, COUNT(*) FROM Dams WHERE state = 'Texas' GROUP BY county;","SELECT county, COUNT(*) FROM Dams WHERE state = 'Texas' GROUP BY county;",1 Find the total water consumption for the 10 largest cities in the United States?,"CREATE TABLE City_Water_Usage (ID INT, City VARCHAR(50), State VARCHAR(20), Usage FLOAT);","SELECT City, SUM(Usage) FROM (SELECT City, Usage FROM City_Water_Usage WHERE City IN ('New York', 'Los Angeles', 'Chicago', 'Houston', 'Phoenix', 'Philadelphia', 'San Antonio', 'San Diego', 'Dallas', 'San Jose') ORDER BY Usage DESC LIMIT 10) t GROUP BY City;","SELECT City, SUM(Usage) FROM City_Water_Usage WHERE State = 'United States' GROUP BY City ORDER BY SUM(Usage) DESC LIMIT 10;",0 In the week of what was the runner-up Pat Du Pré?,"CREATE TABLE table_29302781_12 (week_of VARCHAR, runner_up VARCHAR);","SELECT week_of FROM table_29302781_12 WHERE runner_up = ""Pat Du Pré"";","SELECT week_of FROM table_29302781_12 WHERE runner_up = ""Pat Du Pré"";",1 What is the average distance traveled for medical visits in rural Texas?,"CREATE TABLE medical_visits (id INT, patient_id INT, visit_date DATE, distance_traveled FLOAT, rural_tx BOOLEAN); ",SELECT AVG(distance_traveled) FROM medical_visits WHERE rural_tx = true;,SELECT AVG(distance_traveled) FROM medical_visits WHERE rural_tx = true;,1 what is the zip code of boonville,"CREATE TABLE table_name_39 (zip_code_prefix_es_ VARCHAR, county_seat VARCHAR);","SELECT zip_code_prefix_es_ FROM table_name_39 WHERE county_seat = ""boonville"";","SELECT zip_code_prefix_es_ FROM table_name_39 WHERE county_seat = ""boonville"";",1 What is the total amount of research grants awarded to female graduate students?,"CREATE TABLE graduate_students (student_id INT, name VARCHAR(50), gender VARCHAR(50)); CREATE TABLE research_grants (grant_id INT, student_id INT, amount INT); ",SELECT SUM(rg.amount) FROM research_grants rg JOIN graduate_students gs ON rg.student_id = gs.student_id WHERE gs.gender = 'Female';,SELECT SUM(rg.amount) FROM research_grants rg JOIN graduate_students gs ON rg.student_id = gs.student_id WHERE gs.gender = 'Female';,1 "Which Wins have a Goal Difference larger than 0, and Goals against larger than 40, and a Position smaller than 6, and a Club of sd indauchu?","CREATE TABLE table_name_33 (wins INTEGER, club VARCHAR, position VARCHAR, goal_difference VARCHAR, goals_against VARCHAR);","SELECT MIN(wins) FROM table_name_33 WHERE goal_difference > 0 AND goals_against > 40 AND position < 6 AND club = ""sd indauchu"";","SELECT AVG(wins) FROM table_name_33 WHERE goal_difference > 0 AND goals_against > 40 AND position 6 AND club = ""sd indauchu"";",0 What is the average number of tickets sold per concert in Canada and Australia combined?,"CREATE TABLE concerts (id INT, artist VARCHAR(50), genre VARCHAR(50), tickets_sold INT, revenue DECIMAL(10,2)); ","SELECT AVG(tickets_sold) FROM concerts WHERE country IN ('Canada', 'Australia');","SELECT AVG(tickets_sold) FROM concerts WHERE country IN ('Canada', 'Australia');",1 How many accessories were sold in Japan in Q1 2021?,"CREATE TABLE japan_accessories (accessory_type VARCHAR(255), sales_quantity INT, quarter INT, year INT); ",SELECT SUM(sales_quantity) FROM japan_accessories WHERE quarter = 1 AND year = 2021;,SELECT SUM(sales_quantity) FROM japan_accessories WHERE quarter = 1 AND year = 2021;,1 What is the total number of amphibians in the 'animals' table with a population size greater than 1000?,"CREATE TABLE animals (id INT, name VARCHAR(50), species VARCHAR(50), population_size INT); ",SELECT COUNT(*) FROM animals WHERE species = 'Anura' AND population_size > 1000;,SELECT COUNT(*) FROM animals WHERE population_size > 1000;,0 What was the lowest no. of attendance on record?,CREATE TABLE table_16119656_1 (attendance INTEGER);,SELECT MIN(attendance) FROM table_16119656_1;,SELECT MIN(attendance) FROM table_16119656_1;,1 Which buildings in Japan have the highest percentage of green roofs?,"CREATE TABLE Building (id INT, name VARCHAR(50), city VARCHAR(50), country VARCHAR(50), sqft INT, PRIMARY KEY (id)); CREATE TABLE GreenRoof (id INT, building_id INT, planted_date DATE, size INT, PRIMARY KEY (id), FOREIGN KEY (building_id) REFERENCES Building (id)); CREATE TABLE Roof (id INT, building_id INT, size INT, PRIMARY KEY (id), FOREIGN KEY (building_id) REFERENCES Building (id)); ","SELECT b.name, (g.size/r.size)*100 as '% of Green Roof' FROM GreenRoof g JOIN Building b ON g.building_id = b.id JOIN Roof r ON b.id = r.building_id ORDER BY '% of Green Roof' DESC LIMIT 1;","SELECT Building.name, COUNT(GreenRoof.id) * 100.0 / (SELECT COUNT(*) FROM Building WHERE Building.country = 'Japan') as green_roof_percentage FROM Building INNER JOIN GreenRoof ON Building.id = GreenRoof.building_id INNER JOIN Roof ON Building.id = Roof.building_id GROUP BY Building.name ORDER BY green_roof_percentage DESC LIMIT 1;",0 How many products are sold in each store?,"CREATE TABLE sales (sale_id INT, product_id INT, store_id INT, sale_date DATE); CREATE TABLE products (product_id INT, product_name VARCHAR(255)); CREATE TABLE stores (store_id INT, store_name VARCHAR(255)); ","SELECT s.store_name, COUNT(DISTINCT p.product_id) as product_count FROM sales s JOIN products p ON s.product_id = p.product_id JOIN stores st ON s.store_id = st.store_id GROUP BY s.store_id;","SELECT stores.store_name, COUNT(products.product_id) FROM sales JOIN products ON sales.product_id = products.product_id JOIN stores ON sales.store_id = stores.store_id GROUP BY stores.store_name;",0 List all suppliers practicing fair labor?,"CREATE TABLE suppliers (id INT, name VARCHAR(50), country VARCHAR(50), fair_labor BOOLEAN); ",SELECT name FROM suppliers WHERE fair_labor = true;,SELECT * FROM suppliers WHERE fair_labor = true;,0 "Find the name of all the clubs at ""AKW"".","CREATE TABLE club (clubname VARCHAR, clublocation VARCHAR);","SELECT clubname FROM club WHERE clublocation = ""AKW"";","SELECT clubname FROM club WHERE clublocation = ""AKW"";",1 What is the average water temperature in salmon farms in Norway?,"CREATE TABLE salmon_farms (id INT, name TEXT, country TEXT); CREATE TABLE temperature_readings (id INT, farm_id INT, temperature FLOAT); ",SELECT AVG(temperature) FROM temperature_readings TR JOIN salmon_farms SF ON TR.farm_id = SF.id WHERE SF.country = 'Norway';,SELECT AVG(temperature) FROM temperature_readings tr JOIN salmon_farms sf ON tr.farm_id = sf.id WHERE sf.country = 'Norway';,0 How many games had red star as the runner up?,"CREATE TABLE table_26455614_1 (attendance VARCHAR, runner_up VARCHAR);","SELECT COUNT(attendance) FROM table_26455614_1 WHERE runner_up = ""Red Star"";","SELECT COUNT(attendance) FROM table_26455614_1 WHERE runner_up = ""Red Star"";",1 Name the score for save of lancaster (3),"CREATE TABLE table_name_7 (score VARCHAR, save VARCHAR);","SELECT score FROM table_name_7 WHERE save = ""lancaster (3)"";","SELECT score FROM table_name_7 WHERE save = ""lancaster (3)"";",1 "How many mining permits were issued in California between 2015 and 2020, and what was the environmental impact assessment score for each permit?","CREATE TABLE mining_permits (id INT, state VARCHAR(255), year INT, assessment_score INT);","SELECT state, year, assessment_score FROM mining_permits WHERE state = 'California' AND year BETWEEN 2015 AND 2020;","SELECT state, COUNT(*) as num_permits, assessment_score FROM mining_permits WHERE state = 'California' AND year BETWEEN 2015 AND 2020 GROUP BY state;",0 WHAT IS THE AWAY TEAM WHEN HOME IS LEEDS UNITED?,"CREATE TABLE table_name_44 (away_team VARCHAR, home_team VARCHAR);","SELECT away_team FROM table_name_44 WHERE home_team = ""leeds united"";","SELECT away_team FROM table_name_44 WHERE home_team = ""leeds united"";",1 What kind of surface was the tournament at Pune played on?,"CREATE TABLE table_name_56 (surface VARCHAR, tournament VARCHAR);","SELECT surface FROM table_name_56 WHERE tournament = ""pune"";","SELECT surface FROM table_name_56 WHERE tournament = ""pune"";",1 "How many wildfires occurred in temperate rainforests in 2019, grouped by their location?","CREATE TABLE forests (id INT, name VARCHAR(255), location VARCHAR(255), biome VARCHAR(255), area FLOAT, elevation_range VARCHAR(255)); CREATE TABLE wildfires (id INT, forest_id INT, year INT, location VARCHAR(255)); ","SELECT location, COUNT(*) FROM wildfires WHERE forest_id IN (SELECT id FROM forests WHERE biome = 'Temperate Rainforest') AND year = 2019 GROUP BY location;","SELECT f.location, COUNT(w.id) FROM forests f INNER JOIN wildfires w ON f.id = w.forest_id WHERE f.biome = 'Temperate Rainforest' AND w.year = 2019 GROUP BY f.location;",0 Which rural infrastructure projects in the 'rural_infrastructure' table have the same initiation year as any community development initiatives in the 'community_development' table but different project names?,"CREATE TABLE rural_infrastructure (id INT, project_name VARCHAR(50), initiation_year INT); CREATE TABLE community_development (id INT, initiative_name VARCHAR(50), initiation_year INT); ",SELECT project_name FROM rural_infrastructure WHERE initiation_year IN (SELECT initiation_year FROM community_development) AND project_name NOT IN (SELECT initiative_name FROM community_development);,SELECT r.project_name FROM rural_infrastructure r INNER JOIN community_development c ON r.id = c.initiative_name WHERE r.initiation_year IS NOT NULL;,0 What is the total value of military equipment sales in the Asia-Pacific region?,"CREATE TABLE equipment_sales (id INT, region VARCHAR(255), sale_value FLOAT); ",SELECT SUM(sale_value) FROM equipment_sales WHERE region = 'Asia-Pacific';,SELECT SUM(sale_value) FROM equipment_sales WHERE region = 'Asia-Pacific';,1 What is the name of the episode performed by Essra Mohawk,"CREATE TABLE table_191105_4 (episode_title VARCHAR, performed_by VARCHAR);","SELECT episode_title FROM table_191105_4 WHERE performed_by = ""Essra Mohawk"";","SELECT episode_title FROM table_191105_4 WHERE performed_by = ""Essra Mohawk"";",1 Show the names and total passengers for all train stations not in London.,"CREATE TABLE station (name VARCHAR, total_passengers VARCHAR, LOCATION VARCHAR);","SELECT name, total_passengers FROM station WHERE LOCATION <> 'London';","SELECT name, total_passengers FROM station WHERE LOCATION 'London';",0 Which programs had the most volunteer hours in Q2 2022?,"CREATE TABLE programs (id INT, name TEXT, hours DECIMAL, program_date DATE);","SELECT name, SUM(hours) as total_hours FROM programs WHERE program_date >= '2022-04-01' AND program_date < '2022-07-01' GROUP BY name ORDER BY total_hours DESC;","SELECT name, SUM(hours) FROM programs WHERE program_date BETWEEN '2022-04-01' AND '2022-06-30' GROUP BY name ORDER BY SUM(hours) DESC LIMIT 1;",0 Update the Troops for Operation Enduring Freedom in the 'PeaceOperations' table to 6000 for the year 2002.,"CREATE TABLE PeaceOperations (Year INT, Operation VARCHAR(50), Country VARCHAR(50), Troops INT); ",UPDATE PeaceOperations SET Troops = 6000 WHERE Year = 2002 AND Operation = 'Operation Enduring Freedom';,UPDATE PeaceOperations SET Troops = 6000 WHERE Year = 2002 AND Operation = 'Enduring Freedom';,0 "What is the average earnings ($) that has meg mallon as the player, with a rank less than 9?","CREATE TABLE table_name_58 (earnings___ INTEGER, player VARCHAR, rank VARCHAR);","SELECT AVG(earnings___) AS $__ FROM table_name_58 WHERE player = ""meg mallon"" AND rank < 9;","SELECT AVG(earnings___) FROM table_name_58 WHERE player = ""meg mallon"" AND rank 9;",0 "Which format is released on May 27, 2009?","CREATE TABLE table_name_31 (format VARCHAR, date VARCHAR);","SELECT format FROM table_name_31 WHERE date = ""may 27, 2009"";","SELECT format FROM table_name_31 WHERE date = ""may 27, 2009"";",1 What is the average funding per climate finance project in 2020?,"CREATE TABLE climate_finance_projects (year INT, funding FLOAT); ",SELECT AVG(funding) FROM climate_finance_projects WHERE year = 2020;,SELECT AVG(funding) FROM climate_finance_projects WHERE year = 2020;,1 Get the 'product_name' and 'country' for 'product_transparency' records with a circular supply chain.,"CREATE TABLE product_transparency (product_id INT, product_name VARCHAR(50), circular_supply_chain BOOLEAN, recycled_content DECIMAL(4,2), COUNTRY VARCHAR(50));","SELECT product_name, country FROM product_transparency WHERE circular_supply_chain = TRUE;","SELECT product_name, country FROM product_transparency WHERE circular_supply_chain = TRUE;",1 What is the maximum number of marine species observed in a single day in the Arabian Sea?,"CREATE TABLE marine_species_observations (observation_id INTEGER, observation_date DATE, species_name TEXT, ocean TEXT, number_of_observations INTEGER);","SELECT MAX(number_of_observations) FROM marine_species_observations WHERE ocean = 'Arabian Sea' AND observation_date BETWEEN '2000-01-01' AND '2022-12-31' GROUP BY ocean, DATE_TRUNC('day', observation_date);",SELECT MAX(number_of_observations) FROM marine_species_observations WHERE ocean = 'Arabian Sea';,0 What are the total number of satellites launched by each company?,"CREATE TABLE satellites (launch_year INT, launch_company VARCHAR(50), num_satellites INT); ","SELECT launch_company, SUM(num_satellites) as total_satellites FROM satellites GROUP BY launch_company ORDER BY total_satellites DESC;","SELECT launch_company, SUM(num_satellites) FROM satellites GROUP BY launch_company;",0 What is the percentage of the total habitat size for each habitat type in the Oceanic conservation programs?,"CREATE TABLE oceanic_habitats (habitat_type VARCHAR(50), size INT); ","SELECT habitat_type, size/SUM(size) as percentage FROM oceanic_habitats;","SELECT habitat_type, 100.0 * SUM(size) / (SELECT SUM(size) FROM oceanic_habitats) AS percentage FROM oceanic_habitats GROUP BY habitat_type;",0 What is the average product rating for the ethically sourced products sold in Florida?,"CREATE TABLE Product_Ratings (product_id INT, rating INT); ",SELECT AVG(rating) FROM Ethical_Products EP JOIN Sales S ON EP.product_id = S.product_id JOIN Product_Ratings PR ON EP.product_id = PR.product_id WHERE is_ethically_sourced = true AND sale_location = 'Florida';,SELECT AVG(rating) FROM Product_Ratings WHERE product_id IN (SELECT product_id FROM Products WHERE state = 'Florida');,0 Which day of the week has the highest usage of public transportation in London?,"CREATE TABLE public_transportation (id INT, mode VARCHAR(255), usage INT, date DATE); ","SELECT TO_CHAR(date, 'Day') AS day_of_week, MAX(usage) AS max_usage FROM public_transportation WHERE city = 'London' GROUP BY day_of_week;","SELECT DATE_FORMAT(date, '%Y-%m') as day_of_week, MAX(usage) as max_usage FROM public_transportation WHERE city = 'London' GROUP BY day_of_week;",0 List all the forest management practices in the 'temperate_forests',"CREATE TABLE forest_management (id INT, forest_type VARCHAR(50), practice_count INT); ",SELECT practice_count FROM forest_management WHERE forest_type = 'Temperate Forests';,SELECT * FROM forest_management WHERE forest_type = 'temperate_forests';,0 "what is the average specific impulse for engines that have a SFC in lb/(lbf·h) of 7.95, and a Effective exhaust velocity (m/s) larger than 4,423","CREATE TABLE table_name_66 (specific_impulse__s_ INTEGER, sfc_in_lb__lbf·h_ VARCHAR, effective_exhaust_velocity__m_s_ VARCHAR);",SELECT AVG(specific_impulse__s_) FROM table_name_66 WHERE sfc_in_lb__lbf·h_ = 7.95 AND effective_exhaust_velocity__m_s_ > 4 OFFSET 423;,SELECT AVG(specific_impulse__s_) FROM table_name_66 WHERE sfc_in_lb__lbfh_ = 7.95 AND effective_exhaust_velocity__m_s_ > 4 OFFSET 423;,0 Tell me the name for commissioned of 30 august 1941 and laid down of 22 september 1939,"CREATE TABLE table_name_73 (name VARCHAR, laid_down VARCHAR, commissioned VARCHAR);","SELECT name FROM table_name_73 WHERE laid_down = ""22 september 1939"" AND commissioned = ""30 august 1941"";","SELECT name FROM table_name_73 WHERE laid_down = ""22 september 1939"" AND commissioned = ""30 august 1941"";",1 What are the names and regions of all vulnerabilities with a severity level of 'Critical'?,"CREATE TABLE vulnerabilities (id INT, name VARCHAR, severity VARCHAR, region VARCHAR); ","SELECT name, region FROM vulnerabilities WHERE severity = 'Critical';","SELECT name, region FROM vulnerabilities WHERE severity = 'Critical';",1 What is the average labor productivity of the Krypton Kite mine for each year?,"CREATE TABLE labor_productivity (year INT, mine_name TEXT, workers INT, productivity FLOAT); ","SELECT year, mine_name, AVG(productivity) as avg_productivity FROM labor_productivity WHERE mine_name = 'Krypton Kite' GROUP BY year;","SELECT year, AVG(productivity) FROM labor_productivity WHERE mine_name = 'Krypton Kite' GROUP BY year;",0 What is the average size of habitats for each animal species?,"CREATE TABLE animals (id INT PRIMARY KEY, name VARCHAR(50), species VARCHAR(50), population INT); CREATE TABLE habitats (id INT PRIMARY KEY, name VARCHAR(50), location VARCHAR(50), size FLOAT, animal_id INT);","SELECT animals.species, AVG(habitats.size) AS avg_size FROM animals INNER JOIN habitats ON animals.id = habitats.animal_id GROUP BY animals.species;","SELECT a.species, AVG(h.size) as avg_size FROM animals a JOIN habitats h ON a.id = h.animal_id GROUP BY a.species;",0 On what date was the episode aired where event 2 was Hang Tough?,"CREATE TABLE table_17257687_1 (air_date VARCHAR, event_2 VARCHAR);","SELECT air_date FROM table_17257687_1 WHERE event_2 = ""Hang Tough"";","SELECT air_date FROM table_17257687_1 WHERE event_2 = ""Hang Tough"";",1 What is the average age of patients who received support groups in the UK?,"CREATE TABLE patients (id INT, age INT, country VARCHAR(20)); CREATE TABLE support_groups (id INT, patient_id INT, group VARCHAR(20)); ",SELECT AVG(patients.age) FROM patients INNER JOIN support_groups ON patients.id = support_groups.patient_id WHERE support_groups.group LIKE '%Support Group%' AND patients.country = 'UK';,SELECT AVG(patients.age) FROM patients INNER JOIN support_groups ON patients.id = support_groups.patient_id WHERE patients.country = 'UK';,0 What is the average number of points of the club with more than 23 goals conceded and a position larger than 12?,"CREATE TABLE table_name_64 (points INTEGER, goals_conceded VARCHAR, position VARCHAR);",SELECT AVG(points) FROM table_name_64 WHERE goals_conceded > 23 AND position > 12;,SELECT AVG(points) FROM table_name_64 WHERE goals_conceded > 23 AND position > 12;,1 What is the maximum funding for biotech startups in Canada?,"CREATE SCHEMA biotech; CREATE TABLE biotech.startups (id INT, name VARCHAR(100), country VARCHAR(50), funding FLOAT); ",SELECT MAX(funding) FROM biotech.startups WHERE country = 'Canada';,SELECT MAX(funding) FROM biotech.startups WHERE country = 'Canada';,1 "what are all the positions of players who's hometown is concord, california","CREATE TABLE table_11677691_12 (position VARCHAR, hometown VARCHAR);","SELECT position FROM table_11677691_12 WHERE hometown = ""Concord, California"";","SELECT position FROM table_11677691_12 WHERE hometown = ""Concord, California"";",1 How many unique donors donated in 'Q3 2022'?,"CREATE TABLE donors (donor_id INT, donor_name TEXT, donation_amount DECIMAL, donation_date DATE); ",SELECT COUNT(DISTINCT donor_id) FROM donors WHERE donation_date BETWEEN '2022-07-01' AND '2022-09-30';,SELECT COUNT(DISTINCT donor_id) FROM donors WHERE donation_date BETWEEN '2022-04-01' AND '2022-06-30';,0 "What is the highest Year, when Laps is greater than 161?","CREATE TABLE table_name_82 (year INTEGER, laps INTEGER);",SELECT MAX(year) FROM table_name_82 WHERE laps > 161;,SELECT MAX(year) FROM table_name_82 WHERE laps > 161;,1 Find the maximum and minimum investment amounts for economic diversification projects.,"CREATE TABLE econ_diversification (id INT, project_name VARCHAR(255), investment_amount FLOAT); ","SELECT MAX(investment_amount) AS max_investment, MIN(investment_amount) AS min_investment FROM econ_diversification;","SELECT MAX(investment_amount), MIN(investment_amount) FROM econ_diversification;",0 What is the total revenue generated by tours in the 'virtual' category?,"CREATE TABLE tours (tour_id INT, tour_name TEXT, category TEXT, start_date DATE, end_date DATE, revenue INT); ",SELECT SUM(revenue) as total_revenue FROM tours WHERE category = 'virtual';,SELECT SUM(revenue) FROM tours WHERE category = 'virtual';,0 What is the maximum safety rating for vehicles manufactured by 'Tesla'?,"CREATE TABLE safety_test_results (vehicle_id INT, make VARCHAR(50), model VARCHAR(50), safety_rating INT);",SELECT MAX(safety_rating) FROM safety_test_results WHERE make = 'Tesla';,SELECT MAX(safety_rating) FROM safety_test_results WHERE make = 'Tesla';,1 What is the average price of sustainable products?,"CREATE TABLE Food (FoodID varchar(10), FoodName varchar(20), Sustainable bit, Price decimal(5,2)); ",SELECT AVG(Price) FROM Food WHERE Sustainable = 1;,SELECT AVG(Price) FROM Food WHERE Sustainable = 1;,1 Call sign of k231bg has what sum of erp w?,"CREATE TABLE table_name_30 (erp_w INTEGER, call_sign VARCHAR);","SELECT SUM(erp_w) FROM table_name_30 WHERE call_sign = ""k231bg"";","SELECT SUM(erp_w) FROM table_name_30 WHERE call_sign = ""k231bg"";",1 How many cannabis plants were harvested in California in Q3 2022?,"CREATE TABLE plant_harvest (plant_count INT, state VARCHAR(20), quarter VARCHAR(10)); ",SELECT SUM(plant_count) as total_plants FROM plant_harvest WHERE state = 'California' AND quarter = 'Q3';,SELECT SUM(plant_count) FROM plant_harvest WHERE state = 'California' AND quarter = 3;,0 What is the percentage of the population that is obese in each age group in the United States?,"CREATE TABLE obesity_rates (id INT, age_group TEXT, obesity_rate DECIMAL(4,2), country TEXT); ","SELECT age_group, obesity_rate FROM obesity_rates WHERE country = 'United States';","SELECT age_group, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM obesity_rates WHERE country = 'United States')) as obese_percentage FROM obesity_rates WHERE country = 'United States' GROUP BY age_group;",0 How many pallets were delivered to each warehouse in Florida on the last day of the month?,"CREATE TABLE deliveries (id INT, warehouse_state VARCHAR(20), pallets INT, delivery_date DATE); ","SELECT warehouse_state, COUNT(pallets) FROM deliveries WHERE warehouse_state = 'Florida' AND delivery_date = LAST_DAY(CURRENT_DATE) GROUP BY warehouse_state;","SELECT warehouse_state, SUM(pallets) as total_pallets FROM deliveries WHERE warehouse_state = 'Florida' AND delivery_date >= DATEADD(month, -1, GETDATE()) GROUP BY warehouse_state;",0 Show the attorney_name and attorney_email for all attorneys in the 'attorneys' table,"CREATE TABLE attorneys (attorney_id INT, attorney_name VARCHAR(50), attorney_email VARCHAR(50), attorney_phone VARCHAR(15)); ","SELECT attorney_name, attorney_email FROM attorneys;","SELECT attorney_name, attorney_email FROM attorneys;",1 "Which ground has a crowd over 41,185?","CREATE TABLE table_name_79 (ground VARCHAR, crowd INTEGER);",SELECT ground FROM table_name_79 WHERE crowd > 41 OFFSET 185;,SELECT ground FROM table_name_79 WHERE crowd > 41 OFFSET 185;,1 Identify the top 3 most popular sustainable items,"CREATE TABLE inventory (id INT, item_name VARCHAR(20), is_sustainable BOOLEAN, quantity INT); ","SELECT item_name, is_sustainable, SUM(quantity) as total_quantity FROM inventory WHERE is_sustainable = true GROUP BY item_name ORDER BY total_quantity DESC LIMIT 3;","SELECT item_name, SUM(quantity) as total_quantity FROM inventory WHERE is_sustainable = true GROUP BY item_name ORDER BY total_quantity DESC LIMIT 3;",0 What is the total biomass for fish species A in all regions?,"CREATE TABLE species (species_id INT, species_name TEXT); CREATE TABLE biomass (biomass_id INT, species_id INT, region_id INT, biomass FLOAT); ",SELECT SUM(biomass) FROM biomass WHERE species_id = (SELECT species_id FROM species WHERE species_name = 'Fish species A');,SELECT SUM(biomass) FROM biomass JOIN species ON biomass.species_id = species.species_id WHERE species_name = 'Fish species A';,0 Name the year when start was 32,"CREATE TABLE table_name_78 (year VARCHAR, start VARCHAR);",SELECT year FROM table_name_78 WHERE start = 32;,SELECT year FROM table_name_78 WHERE start = 32;,1 How many military vehicles has Raytheon Technologies delivered to the Middle East?,"CREATE TABLE Raytheon_Deliveries (id INT, corporation VARCHAR(20), region VARCHAR(20), quantity INT, equipment VARCHAR(20)); ",SELECT SUM(quantity) FROM Raytheon_Deliveries WHERE corporation = 'Raytheon Technologies' AND region = 'Middle East' AND equipment = 'Military Vehicles';,SELECT SUM(quantity) FROM Raytheon_Deliveries WHERE corporation = 'Raytheon Technologies' AND region = 'Middle East';,0 "List all the public transportation projects in the city of New York and Chicago, including their start and end dates, that have an estimated budget over 50 million.","CREATE TABLE TransitProjects (project VARCHAR(50), city VARCHAR(20), start_date DATE, end_date DATE, budget INT); ","SELECT project, city, start_date, end_date FROM TransitProjects WHERE city IN ('New York', 'Chicago') AND budget > 50000000;","SELECT project, city, start_date, end_date FROM TransitProjects WHERE city IN ('New York', 'Chicago') AND budget > 50000000;",1 Insert new records for community health workers with their respective specialties.,"CREATE TABLE CommunityHealthWorkers (WorkerID INT, Name VARCHAR(50), Specialty VARCHAR(50));","INSERT INTO CommunityHealthWorkers (WorkerID, Name, Specialty) VALUES (5, 'Rajesh Patel', 'Mental Health'); INSERT INTO CommunityHealthWorkers (WorkerID, Name, Specialty) VALUES (6, 'María Rodríguez', 'Physical Health'); INSERT INTO CommunityHealthWorkers (WorkerID, Name, Specialty) VALUES (7, 'Nguyen Tran', 'Community Outreach');","INSERT INTO CommunityHealthWorkers (WorkerID, Name, Specialty) VALUES (1, 'Male', 'Community Health Workers'), (2, 'Community Health Workers', 'Community Health Workers'), (3, 'Community Health Workers', 'Community Health Workers'), (4, 'Community Health Workers', 'Community Health Workers'), (5, 'Community Health Workers', 'Community Health Workers'), (5, 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers', 'Community Health Workers');",0 What is the platelet count when partial thromboplastin time and bleeding time are unaffected?,"CREATE TABLE table_221653_1 (platelet_count VARCHAR, partial_thromboplastin_time VARCHAR, bleeding_time VARCHAR);","SELECT platelet_count FROM table_221653_1 WHERE partial_thromboplastin_time = ""Unaffected"" AND bleeding_time = ""Unaffected"";","SELECT platelet_count FROM table_221653_1 WHERE partial_thromboplastin_time = ""Unaffected"" AND bleeding_time = ""Unaffected"";",1 What Viewers (m) has an Episode of 40 days?,"CREATE TABLE table_name_64 (viewers__m_ VARCHAR, episode VARCHAR);","SELECT viewers__m_ FROM table_name_64 WHERE episode = ""40 days"";","SELECT viewers__m_ FROM table_name_64 WHERE episode = ""40 days"";",1 "What is the number of unique patients who have tried each treatment type, ranked by popularity?","CREATE TABLE patients_treatments (patient_id INT, treatment_type VARCHAR(50), duration INT, cost FLOAT); ","SELECT treatment_type, COUNT(DISTINCT patient_id) as num_patients, RANK() OVER (ORDER BY COUNT(DISTINCT patient_id) DESC) as patient_rank FROM patients_treatments GROUP BY treatment_type ORDER BY num_patients DESC;","SELECT treatment_type, COUNT(DISTINCT patient_id) as unique_patients FROM patients_treatments GROUP BY treatment_type ORDER BY unique_patients DESC;",0 What is the total carbon footprint of each dish in the dinner menu?,"CREATE TABLE DinnerMenu (id INT, name VARCHAR(255), carbon_footprint INT);","SELECT name, SUM(carbon_footprint) FROM DinnerMenu GROUP BY name;","SELECT name, SUM(carbon_footprint) FROM DinnerMenu GROUP BY name;",1 What is the range of ocean acidification levels by region?,"CREATE TABLE Ocean_Acidification(id INT, year INT, region VARCHAR(50), location VARCHAR(50), acidification_level DECIMAL(5,2), measurement_date DATE);","SELECT region, CONCAT(CONCAT(MIN(acidification_level), ' - '), MAX(acidification_level)) AS Acidification_Level_Range FROM Ocean_Acidification GROUP BY region;","SELECT region, AVG(acidification_level) as range FROM Ocean_Acidification GROUP BY region;",0 Insert a new record into the emergency_response table for the 'Fire' incident type and a response_time of 4 minutes,"CREATE TABLE emergency_response (incident_type VARCHAR(255), response_time INT);","INSERT INTO emergency_response (incident_type, response_time) VALUES ('Fire', 4);","INSERT INTO emergency_response (incident_type, response_time) VALUES ('Fire', 4);",1 What is the maximum and minimum number of investors per funding round for companies founded by Latinx individuals?,"CREATE TABLE companies (id INT, name TEXT, founder_race TEXT); CREATE TABLE funding_rounds (id INT, company_id INT, investors INT, size INT);","SELECT MAX(funding_rounds.investors), MIN(funding_rounds.investors) FROM companies INNER JOIN funding_rounds ON companies.id = funding_rounds.company_id WHERE companies.founder_race = 'Latinx';","SELECT companies.name, MAX(funding_rounds.investors) AS max_investors, MIN(funding_rounds.size) AS min_investors FROM companies INNER JOIN funding_rounds ON companies.id = funding_rounds.company_id WHERE companies.founder_race = 'Latinx' GROUP BY companies.name;",0 What player is from Seton Hall University?,"CREATE TABLE table_name_24 (player VARCHAR, school VARCHAR);","SELECT player FROM table_name_24 WHERE school = ""seton hall university"";","SELECT player FROM table_name_24 WHERE school = ""seton hall university"";",1 Who are the top 3 artists by number of artworks donated to museums?,"CREATE TABLE donations (id INT, artist VARCHAR(100), museum VARCHAR(50), artworks INT); ","SELECT artist, SUM(artworks) AS total_donations FROM donations GROUP BY artist ORDER BY total_donations DESC LIMIT 3;","SELECT artist, SUM(artworks) as total_artworks FROM donations GROUP BY artist ORDER BY total_artworks DESC LIMIT 3;",0 Display the top 3 cuisines with the highest average revenue across all cities.,"CREATE TABLE Restaurants (restaurant_id INT, name TEXT, city TEXT, cuisine TEXT, revenue FLOAT); ","SELECT cuisine, AVG(revenue) as avg_revenue FROM Restaurants GROUP BY cuisine ORDER BY avg_revenue DESC LIMIT 3;","SELECT cuisine, AVG(revenue) as avg_revenue FROM Restaurants GROUP BY cuisine ORDER BY avg_revenue DESC LIMIT 3;",1 Update the ESG rating of company with id 2 to 8.0,"CREATE TABLE companies (id INT, sector TEXT, ESG_rating FLOAT); ",UPDATE companies SET ESG_rating = 8.0 WHERE id = 2;,UPDATE companies SET ESG_rating = 8.0 WHERE id = 2;,1 What is the average trip duration for eco-tourists from Canada and the USA?,"CREATE TABLE tourism (id INT, country VARCHAR(50), tourist_type VARCHAR(50), trip_duration FLOAT); ","SELECT AVG(trip_duration) FROM tourism WHERE tourist_type = 'ecotourist' AND country IN ('Canada', 'USA');","SELECT AVG(trip_duration) FROM tourism WHERE country IN ('Canada', 'USA');",0 What is the total revenue generated from Platinum memberships in the month of January 2022?,"CREATE TABLE Memberships (MemberID INT, MembershipType VARCHAR(20), StartDate DATE, EndDate DATE, MonthlyFee DECIMAL(5,2)); ",SELECT SUM(MonthlyFee) FROM Memberships WHERE MembershipType = 'Platinum' AND StartDate <= '2022-01-31' AND EndDate >= '2022-01-01';,SELECT SUM(MonthlyFee) FROM Memberships WHERE MembershipType = 'Platinum' AND StartDate BETWEEN '2022-01-01' AND '2022-01-31';,0 What is the average depth of all oceanic trenches?,"CREATE TABLE ocean_trenches (name TEXT, average_depth REAL); ",SELECT AVG(average_depth) FROM ocean_trenches;,SELECT AVG(average_depth) FROM ocean_trenches;,1 What is the average number of laps when Gerhard Berger is the driver?,"CREATE TABLE table_name_23 (laps INTEGER, driver VARCHAR);","SELECT AVG(laps) FROM table_name_23 WHERE driver = ""gerhard berger"";","SELECT AVG(laps) FROM table_name_23 WHERE driver = ""gerhard berger"";",1 Show the top 3 most vulnerable software by the total number of high severity vulnerabilities in the past year.,"CREATE TABLE vulnerabilities (id INT, timestamp TIMESTAMP, software VARCHAR(255), category VARCHAR(255), severity VARCHAR(255)); ","SELECT software, SUM(CASE WHEN severity = 'high' THEN 1 ELSE 0 END) as high_severity_count FROM vulnerabilities WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 YEAR) GROUP BY software ORDER BY high_severity_count DESC LIMIT 3;","SELECT software, COUNT(*) as total_high_severity_vulnerabilities FROM vulnerabilities WHERE timestamp >= DATEADD(year, -1, GETDATE()) GROUP BY software ORDER BY total_high_severity_vulnerabilities DESC LIMIT 3;",0 What is the minimum and maximum property price in the inclusive housing program?,"CREATE TABLE inclusive_housing_prices (property_id INT, price DECIMAL(10,2)); ","SELECT MIN(price), MAX(price) FROM inclusive_housing_prices;","SELECT MIN(price), MAX(price) FROM inclusive_housing_prices;",1 "What is the Proto-Oceanic verb for to die, be dead?","CREATE TABLE table_name_44 (proto_oceanic VARCHAR, verb VARCHAR);","SELECT proto_oceanic FROM table_name_44 WHERE verb = ""to die, be dead"";","SELECT proto_oceanic FROM table_name_44 WHERE verb = ""to die, be dead"";",1 Which vendors have the highest and lowest average carbon footprint for their ingredients?,"CREATE TABLE VendorIngredients (id INT, vendor_id INT, name VARCHAR(255), carbon_footprint INT);","SELECT vendor_id, MAX(carbon_footprint) AS max_carbon_footprint, MIN(carbon_footprint) AS min_carbon_footprint FROM VendorIngredients GROUP BY vendor_id;","SELECT vendor_id, AVG(carbon_footprint) as avg_carbon_footprint FROM VendorIngredients GROUP BY vendor_id ORDER BY avg_carbon_footprint DESC LIMIT 1;",0 what's the party with candidates  jerry weller (r) 51.77% clem balanoff (d) 48.23%,"CREATE TABLE table_1341472_15 (party VARCHAR, candidates VARCHAR);","SELECT party FROM table_1341472_15 WHERE candidates = ""Jerry Weller (R) 51.77% Clem Balanoff (D) 48.23%"";","SELECT party FROM table_1341472_15 WHERE candidates = ""Jerry Weller (R) 51.77% Clem Balanoff (D) 48.23%"";",1 What is the most common rural diagnosis?,"CREATE TABLE visit (visit_id INT, rural BOOLEAN, diagnosis VARCHAR(50));",SELECT diagnosis FROM visit WHERE rural = TRUE GROUP BY diagnosis ORDER BY COUNT(*) DESC LIMIT 1;,"SELECT diagnosis, COUNT(*) as num_diagnosis FROM visit GROUP BY diagnosis ORDER BY num_diagnosis DESC LIMIT 1;",0 What rnds were there for the phoenix international raceway?,"CREATE TABLE table_10707176_2 (rnd VARCHAR, circuit VARCHAR);","SELECT rnd FROM table_10707176_2 WHERE circuit = ""Phoenix International Raceway"";","SELECT rnd FROM table_10707176_2 WHERE circuit = ""Phoenix International Raceway"";",1 What is the average size of traditional arts centers by country?,"CREATE TABLE traditional_arts_centers_country (id INT, center_name VARCHAR(100), size INT, country VARCHAR(50)); ","SELECT country, AVG(size) as avg_size FROM traditional_arts_centers_country GROUP BY country;","SELECT country, AVG(size) FROM traditional_arts_centers_country GROUP BY country;",0 What is the total budget for each department in 2021?,"CREATE TABLE department_data (department VARCHAR(255), budget INT, year INT); ","SELECT department, SUM(budget) FROM department_data WHERE year = 2021 GROUP BY department;","SELECT department, SUM(budget) FROM department_data WHERE year = 2021 GROUP BY department;",1 Find the top 3 clients with the highest account balances in the Western region.,"CREATE TABLE clients (client_id INT, name VARCHAR(50), region VARCHAR(20), account_balance DECIMAL(10, 2)); ","SELECT client_id, name, account_balance FROM clients WHERE region = 'Western' ORDER BY account_balance DESC LIMIT 3;","SELECT client_id, name, account_balance FROM clients WHERE region = 'Western' ORDER BY account_balance DESC LIMIT 3;",1 Calculate the minimum transaction amount for the 'High Value' customer segment in the last quarter.,"CREATE TABLE customers (id INT, segment VARCHAR(20)); CREATE TABLE transactions (id INT, customer_id INT, amount DECIMAL(10,2), transaction_date DATE); ","SELECT MIN(amount) FROM transactions JOIN customers ON transactions.customer_id = customers.id WHERE customers.segment = 'High Value' AND transaction_date >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH);","SELECT MIN(amount) FROM transactions JOIN customers ON transactions.customer_id = customers.id WHERE customers.segment = 'High Value' AND transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH);",0 Which winning song had a debut album in progress?,"CREATE TABLE table_name_32 (winning_song VARCHAR, debut_album VARCHAR);","SELECT winning_song FROM table_name_32 WHERE debut_album = ""in progress"";","SELECT winning_song FROM table_name_32 WHERE debut_album = ""in progress"";",1 Update the 'rural_development' database's 'economic_diversification' table to include a new 'diversification_type' column with values 'Renewable Energy' and 'Tourism' for 'Europe' records,"CREATE TABLE economic_diversification (diversification_id INT PRIMARY KEY, diversification_name VARCHAR(100), country VARCHAR(50), region VARCHAR(50), year_introduced INT);",ALTER TABLE economic_diversification ADD diversification_type VARCHAR(50); UPDATE economic_diversification SET diversification_type = 'Renewable Energy' WHERE country = 'Europe'; UPDATE economic_diversification SET diversification_type = 'Tourism' WHERE country = 'Europe';,UPDATE economic_diversification SET diversification_type = 'Renewable Energy' WHERE region = 'Europe';,0 What is the average fare for a shared ride in London?,"CREATE TABLE shared_rides (ride_id INT, user_id INT, start_time TIMESTAMP, end_time TIMESTAMP, fare FLOAT, city VARCHAR(255));",SELECT AVG(fare) FROM shared_rides WHERE city = 'London';,SELECT AVG(fare) FROM shared_rides WHERE city = 'London';,1 What is the total quantity of coal mined by mining operations located in Germany?,"CREATE TABLE mining_operation (id INT, name VARCHAR(50), location VARCHAR(50), resource VARCHAR(50), quantity INT); ",SELECT SUM(quantity) FROM mining_operation WHERE location = 'Germany' AND resource = 'Coal';,SELECT SUM(quantity) FROM mining_operation WHERE location = 'Germany' AND resource = 'Coal';,1 What is the status of biosensor technology development records for 'BioSensor-A'?,"CREATE TABLE biosensor_tech_development (id INT, tech_type TEXT, status TEXT, date_created DATE);",SELECT status FROM biosensor_tech_development WHERE tech_type = 'BioSensor-A';,SELECT status FROM biosensor_tech_development WHERE tech_type = 'BioSensor-A';,1 What is the total number of medical supplies donated by each organization for the COVID-19 pandemic?,"CREATE TABLE Donors (DonorID int, DonorName varchar(50), DonatedAmount decimal(10,2)); CREATE TABLE PandemicRelief (CampaignID int, DonorID int, PandemicType varchar(50), DonatedAmount decimal(10,2)); ","SELECT DonorName, SUM(DonatedAmount) as TotalDonated FROM Donors INNER JOIN PandemicRelief ON Donors.DonorID = PandemicRelief.DonorID WHERE PandemicType = 'COVID-19' GROUP BY DonorName;","SELECT Donors.DonorName, COUNT(DISTINCT Donors.DonatedAmount) as TotalDonated FROM Donors INNER JOIN PandemicRelief ON Donors.DonorID = PandemicRelief.DonorID WHERE PandemicType = 'COVID-19' GROUP BY Donors.DonorName;",0 "What is the distribution of incident types, in the last week, pivoted by day?","CREATE TABLE incident_types (id INT, timestamp TIMESTAMP, incident_type VARCHAR(255));","SELECT DATE(timestamp) AS incident_day, incident_type, COUNT(*) as incident_count FROM incident_types WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP(), INTERVAL 1 WEEK) GROUP BY incident_day, incident_type ORDER BY incident_day;","SELECT DATE_FORMAT(timestamp, '%Y-%m') as day, COUNT(*) as incident_count FROM incident_types WHERE timestamp >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 WEEK) GROUP BY day;",0 "What was the result for the 1966 fifa world cup qualification in mexico city, mexico and a goal over 8?","CREATE TABLE table_name_41 (result VARCHAR, goal VARCHAR, venue VARCHAR, competition VARCHAR);","SELECT result FROM table_name_41 WHERE venue = ""mexico city, mexico"" AND competition = ""1966 fifa world cup qualification"" AND goal > 8;","SELECT result FROM table_name_41 WHERE venue = ""mexico city, mexico"" AND competition = ""1966 fifa world cup qualification"" AND goal > 8;",1 Get carbon offset programs in a specific region,"CREATE TABLE carbon_offset_programs (id INT, name TEXT, region TEXT); ",SELECT * FROM carbon_offset_programs WHERE region = 'North America';,SELECT name FROM carbon_offset_programs WHERE region = 'North America';,0 Show the 'case_status' for cases in the 'LegalTech' table where the 'case_status' is not 'closed',"CREATE TABLE LegalTech (case_id INT, case_status VARCHAR(10)); ",SELECT DISTINCT case_status FROM LegalTech WHERE case_status != 'closed';,SELECT case_status FROM LegalTech WHERE case_status!= 'closed';,0 What is the average interpretability score and the number of techniques for each algorithm in the 'explainable_ai' table?,"CREATE TABLE explainable_ai (algorithm VARCHAR(255), technique VARCHAR(255), interpretability_score FLOAT); ","SELECT algorithm, AVG(interpretability_score) as avg_interpretability, COUNT(technique) as num_techniques FROM explainable_ai GROUP BY algorithm;","SELECT algorithm, AVG(interpretability_score) as avg_score, COUNT(*) as techniques FROM explainable_ai GROUP BY algorithm;",0 How many accommodations were provided for students with visual impairments?,"CREATE TABLE accommodation (id INT, student_id INT, type VARCHAR(255)); ","SELECT COUNT(a.id) as visual_impairment_accommodations FROM accommodation a WHERE a.type IN ('Large Print', 'Braille');",SELECT COUNT(*) FROM accommodation WHERE type = 'Visual Impairment';,0 Show the total peacekeeping operations budget by fiscal year,"CREATE TABLE peacekeeping_operations (id INT, fiscal_year INT, budget DECIMAL(10, 2)); ","SELECT fiscal_year, SUM(budget) as total_budget FROM peacekeeping_operations GROUP BY fiscal_year;","SELECT fiscal_year, SUM(budget) FROM peacekeeping_operations GROUP BY fiscal_year;",0 How many poetry workshops were held in each community center in Q1 2022?,"CREATE TABLE PoetryWorkshops (id INT, community_center VARCHAR(20), workshop_date DATE); ","SELECT community_center, COUNT(*) as workshop_count FROM PoetryWorkshops WHERE workshop_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY community_center;","SELECT community_center, COUNT(*) FROM PoetryWorkshops WHERE workshop_date BETWEEN '2022-01-01' AND '2022-03-31' GROUP BY community_center;",0 List the names of all faculty members who have received a research grant.,"CREATE TABLE grant (id INT, faculty_id INT); CREATE TABLE faculty (id INT, name TEXT); ",SELECT name FROM faculty WHERE id IN (SELECT faculty_id FROM grant);,SELECT f.name FROM faculty f JOIN grant g ON f.id = g.faculty_id;,0 "What is the panchayat when the public property damage was 1,03,049.60","CREATE TABLE table_20403667_2 (panchayat INTEGER, public_property_damaged__in_lakh_inr__ VARCHAR);","SELECT MAX(panchayat) FROM table_20403667_2 WHERE public_property_damaged__in_lakh_inr__ = ""1,03,049.60"";","SELECT MAX(panchayat) FROM table_20403667_2 WHERE public_property_damaged__in_lakh_inr__ = ""1,03,049.60"";",1 "Which artists have created both paintings and sculptures, and how many of their works are in Gallery C?","CREATE TABLE GalleryC(id INT, type VARCHAR(20), artist VARCHAR(30)); ",SELECT artist FROM GalleryC WHERE type = 'Painting' INTERSECT SELECT artist FROM GalleryC WHERE type = 'Sculpture'; SELECT COUNT(*) FROM (SELECT artist FROM GalleryC WHERE type = 'Painting' INTERSECT SELECT artist FROM GalleryC WHERE type = 'Sculpture') AS subquery WHERE artist IN (SELECT artist FROM GalleryC);,"SELECT artist, COUNT(*) FROM GalleryC WHERE type IN ('Painting', 'Sculpture') GROUP BY artist;",0 What is every CFL team with pick#1?,"CREATE TABLE table_28059992_1 (cfl_team VARCHAR, pick__number VARCHAR);",SELECT cfl_team FROM table_28059992_1 WHERE pick__number = 1;,SELECT cfl_team FROM table_28059992_1 WHERE pick__number = 1;,1 "Present the humanitarian assistance provided by the United Nations, sorted by year","CREATE TABLE humanitarian_assistance (id INT, provider_country VARCHAR(255), recipient_country VARCHAR(255), amount FLOAT, year INT);","SELECT recipient_country, amount FROM humanitarian_assistance WHERE provider_country = 'United Nations' ORDER BY year;","SELECT year, provider_country, amount FROM humanitarian_assistance WHERE provider_country = 'United Nations' ORDER BY year;",0 What is the minimum number of wins for teams that have won a championship in the last 5 years?,"CREATE TABLE teams (team_id INT, team_name VARCHAR(50), division VARCHAR(50), wins INT, championships INT);",SELECT MIN(teams.wins) FROM teams WHERE teams.championships > 0;,SELECT MIN(wins) FROM teams WHERE championships >= (SELECT championships FROM championships WHERE championships >= (SELECT championships FROM championships WHERE championships >= 5) GROUP BY championships;,0 What's the highest time for the 1995 200 metres event?,"CREATE TABLE table_name_31 (time INTEGER, year VARCHAR, event VARCHAR);","SELECT MAX(time) FROM table_name_31 WHERE year = 1995 AND event = ""200 metres"";","SELECT MAX(time) FROM table_name_31 WHERE year = 1995 AND event = ""200 metres"";",1 Which category had an orange finish?,"CREATE TABLE table_name_4 (category VARCHAR, finish VARCHAR);","SELECT category FROM table_name_4 WHERE finish = ""orange"";","SELECT category FROM table_name_4 WHERE finish = ""orange"";",1 What is Maria's Elimination Move?,"CREATE TABLE table_name_88 (elimination VARCHAR, wrestler VARCHAR);","SELECT elimination AS Move FROM table_name_88 WHERE wrestler = ""maria"";","SELECT elimination FROM table_name_88 WHERE wrestler = ""maria"";",0 What is the total number of hours spent on lifelong learning activities by teachers who have completed professional development courses in the last year?,"CREATE TABLE lifelong_learning_activities (activity_id INT, teacher_id INT, hours_spent INT); ","SELECT SUM(lifelong_learning_activities.hours_spent) as total_hours FROM lifelong_learning_activities JOIN teachers ON teachers.teacher_id = lifelong_learning_activities.teacher_id JOIN professional_development_courses ON teachers.teacher_id = professional_development_courses.teacher_id WHERE professional_development_courses.completion_date >= DATEADD(year, -1, GETDATE());","SELECT SUM(hours_spent) FROM lifelong_learning_activities WHERE teacher_id IN (SELECT teacher_id FROM professional_development_courses WHERE course_date >= DATEADD(year, -1, GETDATE());",0 What is the total amount of funding received by organizations focusing on access to justice in Canada and Australia?,"CREATE TABLE access_to_justice_funding (org_id INT, country VARCHAR(255), funding_amount INT); ","SELECT SUM(funding_amount) FROM access_to_justice_funding WHERE country IN ('Canada', 'Australia');","SELECT SUM(funding_amount) FROM access_to_justice_funding WHERE country IN ('Canada', 'Australia');",1 What school does John Crotty play for?,"CREATE TABLE table_name_35 (school_club_team VARCHAR, player VARCHAR);","SELECT school_club_team FROM table_name_35 WHERE player = ""john crotty"";","SELECT school_club_team FROM table_name_35 WHERE player = ""john rotty"";",0 What is the average salary of employees who identify as 'Prefer not to say' in the Sales department?,"CREATE TABLE Employees (EmployeeID INT, Gender VARCHAR(30), Department VARCHAR(20), Salary DECIMAL(10,2)); ",SELECT AVG(Salary) FROM Employees WHERE Gender = 'Prefer not to say' AND Department = 'Sales';,SELECT AVG(Salary) FROM Employees WHERE Gender = 'Prefer not to say' AND Department = 'Sales';,1 What is the total number of volunteer hours served by each volunteer in the Central region?,"CREATE TABLE volunteer_hours (volunteer_id INT, vol_name TEXT, vol_region TEXT, hours_served INT); ","SELECT vol_name, SUM(hours_served) as total_hours FROM volunteer_hours WHERE vol_region = 'Central' GROUP BY vol_name;","SELECT vol_name, SUM(hours_served) FROM volunteer_hours WHERE vol_region = 'Central' GROUP BY vol_name;",0 How many defense contracts were awarded to companies in the Middle East in the last 3 years?,"CREATE TABLE Defense_Contracts_2 (id INT, contractor VARCHAR(50), year INT, awarded_value FLOAT, country VARCHAR(50));",SELECT COUNT(*) FROM Defense_Contracts_2 WHERE country = 'Middle East' AND year >= YEAR(CURRENT_DATE) - 3;,SELECT COUNT(*) FROM Defense_Contracts_2 WHERE country = 'Middle East' AND year BETWEEN 2017 AND 2021;,0 Which winning team beat the New York Yankees?,"CREATE TABLE table_10548224_1 (winning_team VARCHAR, losing_team VARCHAR);","SELECT winning_team FROM table_10548224_1 WHERE losing_team = ""New York Yankees"";","SELECT winning_team FROM table_10548224_1 WHERE losing_team = ""New York Yankees"";",1 "Which game had an attendance of 5,000 and was away?","CREATE TABLE table_name_23 (game INTEGER, venue VARCHAR, attendance VARCHAR);","SELECT AVG(game) FROM table_name_23 WHERE venue = ""away"" AND attendance = 5 OFFSET 000;","SELECT SUM(game) FROM table_name_23 WHERE venue = ""away"" AND attendance = ""5000"";",0 Which product has the highest average environmental impact score?,"CREATE TABLE products (product_id INT, environmental_impact_score FLOAT); ","SELECT product_id, MAX(environmental_impact_score) OVER () AS max_score FROM products;","SELECT product_id, AVG(environmental_impact_score) as avg_score FROM products GROUP BY product_id ORDER BY avg_score DESC LIMIT 1;",0 Find the unique offenses reported in hate crimes in Texas and New York in 2021.,"CREATE TABLE hate_crimes_tx (offense VARCHAR(50), year INT); CREATE TABLE hate_crimes_ny (offense VARCHAR(50), year INT); ",SELECT DISTINCT offense FROM hate_crimes_tx WHERE year = 2021 UNION ALL SELECT DISTINCT offense FROM hate_crimes_ny WHERE year = 2021;,SELECT DISTINCT offense FROM hate_crimes_tx WHERE year = 2021 INTERSECT SELECT DISTINCT offense FROM hate_crimes_ny WHERE year = 2021;,0 Get the average maintenance cost for military equipment,"CREATE TABLE military_equipment_maintenance (equipment_id INT, maintenance_company VARCHAR(255), cost FLOAT); ",SELECT AVG(cost) FROM military_equipment_maintenance;,SELECT AVG(cost) FROM military_equipment_maintenance;,1 How many sustainable projects are there in each city?,"CREATE TABLE city (id INT, name VARCHAR(255), population INT, sustainable_projects INT); ","SELECT name, SUM(sustainable_projects) as total_sustainable_projects FROM city GROUP BY name;","SELECT name, SUM(sustainable_projects) FROM city GROUP BY name;",0 "What is Home Team, when Date is ""28 January 1984"", and when Tie No is ""4""?","CREATE TABLE table_name_65 (home_team VARCHAR, date VARCHAR, tie_no VARCHAR);","SELECT home_team FROM table_name_65 WHERE date = ""28 january 1984"" AND tie_no = ""4"";","SELECT home_team FROM table_name_65 WHERE date = ""28 january 1984"" AND tie_no = ""4"";",1 What is the total budget allocated for healthcare services in the Northeast region in 2020?,"CREATE TABLE Budget (Year INT, Service VARCHAR(20), Region VARCHAR(20), Amount DECIMAL(10,2)); ",SELECT SUM(Amount) FROM Budget WHERE Year = 2020 AND Service = 'Healthcare' AND Region = 'Northeast';,SELECT SUM(Amount) FROM Budget WHERE Year = 2020 AND Service = 'Healthcare' AND Region = 'Northeast';,1 What's the total amount of climate finance committed by developed countries to developing countries for mitigation and adaptation projects in 2020?,"CREATE TABLE climate_finance (year INT, donor VARCHAR(20), recipient VARCHAR(20), category VARCHAR(10), amount FLOAT); ","SELECT SUM(amount) FROM climate_finance WHERE year = 2020 AND (donor IN ('USA', 'Germany', 'France') AND recipient IN ('India', 'Brazil', 'Indonesia', 'South Africa') AND category IN ('mitigation', 'adaptation'));","SELECT SUM(amount) FROM climate_finance WHERE year = 2020 AND donor IN ('developed countries', 'developing countries') AND category IN ('Mitigation', 'Adaptation');",0 How many autonomous driving research papers were published by 'SmartLabs' in 2020?,"CREATE TABLE AutonomousDrivingResearch (ID INT, Lab VARCHAR(255), Year INT, NumPapers INT); ",SELECT NumPapers FROM AutonomousDrivingResearch WHERE Lab = 'SmartLabs' AND Year = 2020;,SELECT SUM(NumPapers) FROM AutonomousDrivingResearch WHERE Lab = 'SmartLabs' AND Year = 2020;,0 What is the venue with a competition in 1964?,"CREATE TABLE table_name_15 (venue VARCHAR, year VARCHAR);",SELECT venue FROM table_name_15 WHERE year = 1964;,SELECT venue FROM table_name_15 WHERE year = 1964;,1 How many records were there when opponents were 9?,"CREATE TABLE table_22815265_1 (record VARCHAR, opponents VARCHAR);",SELECT COUNT(record) FROM table_22815265_1 WHERE opponents = 9;,SELECT COUNT(record) FROM table_22815265_1 WHERE opponents = 9;,1 How many home games did the New York Yankees win in the 2018 season?,"CREATE TABLE baseball_games(id INT, team VARCHAR(50), location VARCHAR(50), result VARCHAR(10), year INT); ",SELECT COUNT(*) FROM baseball_games WHERE team = 'New York Yankees' AND location = 'Yankee Stadium' AND result = 'Win' AND year = 2018;,SELECT COUNT(*) FROM baseball_games WHERE team = 'New York Yankees' AND result = 'Win' AND year = 2018;,0 Which AI technologies are implemented in the 'Luxury_Hotels' table?,"CREATE TABLE Luxury_Hotels (hotel_id INT, hotel_name TEXT, ai_tech TEXT); ",SELECT DISTINCT ai_tech FROM Luxury_Hotels;,SELECT ai_tech FROM Luxury_Hotels;,0 What is the total number of cases heard by each judge in the 'criminal_cases' table?,"CREATE TABLE criminal_cases (case_id INT, judge_name VARCHAR(20), case_type VARCHAR(10), case_outcome VARCHAR(20), hearing_date DATE); ","SELECT judge_name, COUNT(*) as total_cases FROM criminal_cases GROUP BY judge_name;","SELECT judge_name, COUNT(*) FROM criminal_cases GROUP BY judge_name;",0 How many volunteers are there in total?,"CREATE TABLE volunteers( id INT PRIMARY KEY NOT NULL, name VARCHAR(50), age INT, city VARCHAR(30), country VARCHAR(30) ); ",SELECT COUNT(*) FROM volunteers;,SELECT COUNT(*) FROM volunteers;,1 What is the average sleep duration for users from India in November 2022?',"CREATE SCHEMA sleep_data; CREATE TABLE sleep_duration (user_id INT, country VARCHAR(50), sleep_duration INT, sleep_date DATE); ",SELECT AVG(sleep_duration) FROM sleep_data.sleep_duration WHERE country = 'India' AND sleep_date >= '2022-11-01' AND sleep_date <= '2022-11-30';,SELECT AVG(sleep_duration) FROM sleep_data.sleep_duration WHERE country = 'India' AND sleep_date BETWEEN '2022-11-01' AND '2022-01-31';,0 What is the score points when the total is 20?,"CREATE TABLE table_name_4 (score_points VARCHAR, total VARCHAR);","SELECT score_points FROM table_name_4 WHERE total = ""20"";",SELECT score_points FROM table_name_4 WHERE total = 20;,0 What is the rate limit when the desired rate change (%) is +40.4?,"CREATE TABLE table_25316812_1 (rate_limit__p_ VARCHAR, desired_rate_change___percentage_ VARCHAR);","SELECT rate_limit__p_ FROM table_25316812_1 WHERE desired_rate_change___percentage_ = ""+40.4"";","SELECT rate_limit__p_ FROM table_25316812_1 WHERE desired_rate_change___percentage_ = ""+40.4"";",1 Name the period for uruguay,"CREATE TABLE table_24565004_19 (period VARCHAR, nationality² VARCHAR);","SELECT period FROM table_24565004_19 WHERE nationality² = ""Uruguay"";","SELECT period FROM table_24565004_19 WHERE nationality2 = ""Uruguay"";",0 What did fitzroy score at their home game?,CREATE TABLE table_name_98 (home_team VARCHAR);,"SELECT home_team AS score FROM table_name_98 WHERE home_team = ""fitzroy"";","SELECT home_team AS score FROM table_name_98 WHERE home_team = ""fitzroy"";",1 Identify cities with the highest budget allocation for roads and healthcare services.,"CREATE TABLE cities (city_id INT, city_name VARCHAR(255), total_budget INT); CREATE TABLE healthcare_services (service_id INT, service_name VARCHAR(255), city_id INT, budget INT); CREATE TABLE roads (road_id INT, road_name VARCHAR(255), city_id INT, budget INT);","SELECT c.city_name, SUM(h.budget) as total_healthcare_budget, SUM(r.budget) as total_roads_budget FROM cities c INNER JOIN healthcare_services h ON c.city_id = h.city_id INNER JOIN roads r ON c.city_id = r.city_id GROUP BY c.city_name ORDER BY total_healthcare_budget + total_roads_budget DESC LIMIT 5;","SELECT c.city_name, SUM(hs.budget) as total_budget FROM cities c JOIN healthcare_services hs ON c.city_id = hs.city_id JOIN roads r ON hs.city_id = r.city_id GROUP BY c.city_name ORDER BY total_budget DESC LIMIT 1;",0 What is the 1994 finish associated with a 1995 finish of 3R and 1997 of QF?,CREATE TABLE table_name_92 (Id VARCHAR);,"SELECT 1994 FROM table_name_92 WHERE 1997 = ""qf"" AND 1995 = ""3r"";","SELECT 1994 FROM table_name_92 WHERE 1995 = ""3r"" AND 1997 = ""qf"";",0 What is the high assists that has @ detroit as the team?,"CREATE TABLE table_name_93 (high_assists VARCHAR, team VARCHAR);","SELECT high_assists FROM table_name_93 WHERE team = ""@ detroit"";","SELECT high_assists FROM table_name_93 WHERE team = ""@ detroit"";",1 Delete records of farmers who received training before 2018 in the region of 'Tuscany'.,"CREATE TABLE farmers (id INT, name VARCHAR(255), region VARCHAR(255), training_year INT, training_topic VARCHAR(255)); ",DELETE FROM farmers WHERE region = 'Tuscany' AND training_year < 2018;,DELETE FROM farmers WHERE region = 'Tuscany' AND training_year 2018;,0 Delete all records of purchases made by fans at a specific event,"CREATE TABLE fan_purchases (purchase_id INT, fan_id INT, team VARCHAR(50), event_date DATE, amount DECIMAL(5, 2)); ",DELETE FROM fan_purchases WHERE event_date = '2022-03-01';,DELETE FROM fan_purchases WHERE fan_id IN (SELECT fan_id FROM fan_purchases WHERE event_date >= '2022-01-01');,0 What is the average rating of movies produced in the US and released between 2010 and 2015?,"CREATE TABLE movies (id INT, title VARCHAR(255), rating FLOAT, release_year INT, country VARCHAR(50)); ",SELECT AVG(rating) FROM movies WHERE release_year BETWEEN 2010 AND 2015 AND country = 'USA';,SELECT AVG(rating) FROM movies WHERE country = 'USA' AND release_year BETWEEN 2010 AND 2015;,0 what is the average gold when rank is total and silver is more than 20?,"CREATE TABLE table_name_32 (gold INTEGER, rank VARCHAR, silver VARCHAR);","SELECT AVG(gold) FROM table_name_32 WHERE rank = ""total"" AND silver > 20;","SELECT AVG(gold) FROM table_name_32 WHERE rank = ""total"" AND silver > 20;",1 Who directed El Nido?,"CREATE TABLE table_10798928_1 (director VARCHAR, original_title VARCHAR);","SELECT director FROM table_10798928_1 WHERE original_title = ""El nido"";","SELECT director FROM table_10798928_1 WHERE original_title = ""El Nido"";",0 "What is the minimum production of corn and beans by small-scale farmers in Guatemala, considering fair trade practices?","CREATE TABLE fair_trade_production (farmer_id INT, country VARCHAR(50), crop VARCHAR(50), production INT, is_fair_trade BOOLEAN); ",SELECT MIN(production) FROM fair_trade_production WHERE country = 'Guatemala' AND is_fair_trade = true AND (crop = 'Corn' OR crop = 'Beans');,"SELECT MIN(production) FROM fair_trade_production WHERE country = 'Guatemala' AND crop IN ('Corn', 'Beans') AND is_fair_trade = true;",0 What type of engine does the model with model designation 97F00 have?,"CREATE TABLE table_20866024_3 (engine VARCHAR, model_designation VARCHAR);","SELECT engine FROM table_20866024_3 WHERE model_designation = ""97F00"";","SELECT engine FROM table_20866024_3 WHERE model_designation = ""97F00"";",1 What is the simplified Chinese name for the 9th album?,"CREATE TABLE table_name_21 (chinese__simplified_ VARCHAR, album_number VARCHAR);","SELECT chinese__simplified_ FROM table_name_21 WHERE album_number = ""9th"";","SELECT chinese__simplified_ FROM table_name_21 WHERE album_number = ""9th"";",1 What was the score of team 2 Stade Lavallois (D1)?,"CREATE TABLE table_name_5 (score VARCHAR, team_2 VARCHAR);","SELECT score FROM table_name_5 WHERE team_2 = ""stade lavallois (d1)"";","SELECT score FROM table_name_5 WHERE team_2 = ""stade lavallois (d1)"";",1 What is the value in 2013 when it is 1R in 2007 and 2009?,CREATE TABLE table_name_38 (Id VARCHAR);,"SELECT 2013 FROM table_name_38 WHERE 2007 = ""1r"" AND 2009 = ""1r"";","SELECT 2013 FROM table_name_38 WHERE 2007 = ""1r"" AND 2009 = ""1r"";",1 What is the average age of fans who attended more than 5 games?,"CREATE TABLE fan_data (id INT, fan_name VARCHAR(50), age INT, games INT); ",SELECT AVG(age) as avg_age FROM fan_data WHERE games > 5;,SELECT AVG(age) FROM fan_data WHERE games > 5;,0 Find the top 5 donors for the 'Arts' program?,"CREATE TABLE Donors (DonorID INT, DonorName VARCHAR(50), DonationAmount DECIMAL(10,2)); CREATE TABLE DonationPrograms (DonationID INT, ProgramID INT); ","SELECT D.DonorID, D.DonorName, SUM(D.DonationAmount) AS TotalDonated FROM Donors D JOIN DonationPrograms DP ON D.DonationID = DP.DonationID WHERE DP.ProgramID = (SELECT ProgramID FROM Programs WHERE ProgramName = 'Arts') GROUP BY D.DonorID, D.DonorName ORDER BY TotalDonated DESC LIMIT 5;","SELECT DonorName, SUM(DonationAmount) as TotalDonation FROM Donors JOIN DonationPrograms ON Donors.DonorID = DonationPrograms.DonorID WHERE ProgramID = 'Arts' GROUP BY DonorName ORDER BY TotalDonation DESC LIMIT 5;",0 What is the average age of students attending art schools in New York?,"CREATE TABLE Students (id INT PRIMARY KEY, age INT, gender VARCHAR(10), art_school_id INT, FOREIGN KEY (art_school_id) REFERENCES ArtSchools(id)); ",SELECT AVG(Students.age) as avg_age FROM Students JOIN ArtSchools ON Students.art_school_id = ArtSchools.id WHERE ArtSchools.city = 'New York';,SELECT AVG(age) FROM Students WHERE art_school_id IN (SELECT id FROM ArtSchools WHERE city = 'New York');,0 Show the number of public works projects in each state,"CREATE TABLE Public_Works (project_id int, project_name varchar(255), state varchar(255), category varchar(255));","SELECT state, COUNT(*) FROM Public_Works GROUP BY state;","SELECT state, COUNT(*) FROM Public_Works GROUP BY state;",1 "What is the average size in square feet of properties in urban areas, owned by women?","CREATE TABLE property (id INT, size_sqft INT, co_owner VARCHAR(255), area VARCHAR(255)); ","SELECT AVG(size_sqft) FROM property WHERE co_owner IN ('Maria', 'Lisa') AND area = 'urban';",SELECT AVG(size_sqft) FROM property WHERE area = 'Urban' AND co_owner = 'Female';,0 What is the average ESG rating for companies in the 'technology' sector?,"CREATE TABLE companies (id INT, sector VARCHAR(20), ESG_rating FLOAT)",SELECT AVG(ESG_rating) FROM companies WHERE sector = 'technology',SELECT AVG(ESG_rating) FROM companies WHERE sector = 'technology';,0 What is the minimum environmental impact score for chemical D?,"CREATE TABLE environmental_scores (chemical VARCHAR(20), score INT); ","SELECT chemical, min(score) as min_score FROM environmental_scores WHERE chemical = 'chemical D' GROUP BY chemical;",SELECT MIN(score) FROM environmental_scores WHERE chemical = 'chemical D';,0 What club/province for the player with over 18 caps and plays the fly-half?,"CREATE TABLE table_name_28 (club_province VARCHAR, caps VARCHAR, position VARCHAR);","SELECT club_province FROM table_name_28 WHERE caps > 18 AND position = ""fly-half"";","SELECT club_province FROM table_name_28 WHERE caps > 18 AND position = ""fly-half"";",1 Top 3 music genres with highest revenue in the US?,"CREATE TABLE Music_Sales (title VARCHAR(255), genre VARCHAR(50), release_date DATE, revenue INT);","SELECT genre, SUM(revenue) as total_revenue FROM Music_Sales WHERE release_date BETWEEN '2010-01-01' AND '2020-12-31' GROUP BY genre ORDER BY total_revenue DESC LIMIT 3;","SELECT genre, SUM(revenue) as total_revenue FROM Music_Sales WHERE country = 'USA' GROUP BY genre ORDER BY total_revenue DESC LIMIT 3;",0 What is the least amount of severe tropical cyclones for the 1992–93 season and the tropical Lows smaller than 6?,"CREATE TABLE table_name_61 (Severe INTEGER, season VARCHAR, tropical_lows VARCHAR);","SELECT MIN(Severe) AS tropical_cyclones FROM table_name_61 WHERE season = ""1992–93"" AND tropical_lows < 6;","SELECT MIN(Severe) FROM table_name_61 WHERE season = ""1992–93"" AND tropical_lows 6;",0 Which countries have more than 50 volunteers in the 'Volunteers' table?,"CREATE TABLE Volunteers (VolunteerID int, VolunteerName varchar(50), Country varchar(50)); ","SELECT Country, COUNT(*) as TotalVolunteers FROM Volunteers GROUP BY Country HAVING COUNT(*) > 50;",SELECT Country FROM Volunteers GROUP BY Country HAVING COUNT(DISTINCT VolunteerID) > 50;,0 What is the average donation amount by zip code from the 'donations' table?,"CREATE TABLE donations (donor_id INT, zip_code VARCHAR(10), donation_amount DECIMAL(10,2)); ","SELECT zip_code, AVG(donation_amount) AS 'Average Donation Amount' FROM donations GROUP BY zip_code;","SELECT zip_code, AVG(donation_amount) as avg_donation FROM donations GROUP BY zip_code;",0 Find the number of new members from different countries per month,"CREATE TABLE memberships (membership_id INT, member_id INT, join_date DATE, country VARCHAR(20)); ","SELECT DATE_FORMAT(join_date, '%Y-%m') as month, country, COUNT(DISTINCT member_id) as new_members FROM memberships WHERE YEAR(join_date) = 2022 GROUP BY month, country ORDER BY month, new_members DESC;","SELECT DATE_FORMAT(join_date, '%Y-%m') AS month, COUNT(DISTINCT member_id) AS new_members FROM memberships GROUP BY month;",0 What is the total quantity of gold extracted by each company?,"CREATE TABLE company (id INT, name VARCHAR(50));CREATE TABLE extraction (company_id INT, mineral VARCHAR(10), quantity INT); ","SELECT e.company_id, c.name, SUM(e.quantity) AS total_gold_quantity FROM extraction e JOIN company c ON e.company_id = c.id WHERE e.mineral = 'gold' GROUP BY e.company_id, c.name;","SELECT c.name, SUM(e.quantity) FROM company c JOIN extraction e ON c.id = e.company_id WHERE c.mineral = 'gold' GROUP BY c.name;",0 "What's the smallest draw of Warrnambool when the against was less than 1299, more than 7 wins, and less than 2 losses?","CREATE TABLE table_name_29 (draws INTEGER, losses VARCHAR, club VARCHAR, against VARCHAR, wins VARCHAR);","SELECT MIN(draws) FROM table_name_29 WHERE against < 1299 AND wins > 7 AND club = ""warrnambool"" AND losses < 2;","SELECT MIN(draws) FROM table_name_29 WHERE against 1299 AND wins > 7 AND club = ""warrnambool"" AND losses 2;",0 Which countries have no registered volunteers?,"CREATE TABLE Volunteers (VolunteerID int, Name varchar(50), Country varchar(50)); ",SELECT v.Country FROM Volunteers v WHERE v.Country NOT IN (SELECT DISTINCT Country FROM Volunteers WHERE Country IS NOT NULL);,SELECT Country FROM Volunteers WHERE VolunteerID IS NULL;,0 Which Series 2 has a Series 3 of deborah meaden?,"CREATE TABLE table_name_35 (series_2 VARCHAR, series_3 VARCHAR);","SELECT series_2 FROM table_name_35 WHERE series_3 = ""deborah meaden"";","SELECT series_2 FROM table_name_35 WHERE series_3 = ""deborah meaden"";",1 "Find the total amount of untreated wastewater in the province of Quebec, Canada in the last month","CREATE TABLE provinces (id INT, name VARCHAR(255)); CREATE TABLE wastewater_treatment (id INT, province_id INT, treatment_status VARCHAR(255), volume FLOAT, treatment_date DATE); ",SELECT SUM(wastewater_treatment.volume) as total_untreated_volume FROM wastewater_treatment WHERE wastewater_treatment.treatment_status = 'untreated' AND wastewater_treatment.treatment_date >= (CURRENT_DATE - INTERVAL '1 month')::date AND wastewater_treatment.province_id IN (SELECT id FROM provinces WHERE name = 'Quebec');,"SELECT SUM(volume) FROM wastewater_treatment wt JOIN provinces p ON wt.province_id = p.id WHERE p.name = 'Quebec' AND wt.treatment_status = 'untreated' AND wt.treatment_date >= DATEADD(month, -1, GETDATE());",0 Which Notes has a Competition of venice marathon?,"CREATE TABLE table_name_78 (notes VARCHAR, competition VARCHAR);","SELECT notes FROM table_name_78 WHERE competition = ""venice marathon"";","SELECT notes FROM table_name_78 WHERE competition = ""venice marathon"";",1 Update 'price' to 500 for records in the 'toll_booths' table where 'location' is 'Boston',"CREATE TABLE toll_booths (id INT, booth_id VARCHAR(255), location VARCHAR(255), price FLOAT);",UPDATE toll_booths SET price = 500 WHERE location = 'Boston';,UPDATE toll_booths SET price = 500 WHERE location = 'Boston';,1 What is the average cost of space exploration missions by type?,"CREATE TABLE SpaceExploration (Id INT, MissionType VARCHAR(20), Country VARCHAR(20), Cost INT); ","SELECT MissionType, AVG(Cost) as AvgCost FROM SpaceExploration GROUP BY MissionType;","SELECT MissionType, AVG(Cost) FROM SpaceExploration GROUP BY MissionType;",0 what's the economics score with justice being 90.8,"CREATE TABLE table_145439_1 (economics VARCHAR, justice VARCHAR);","SELECT economics FROM table_145439_1 WHERE justice = ""90.8"";","SELECT economics FROM table_145439_1 WHERE justice = ""90.8"";",1 Which first was born on 5 february 1979?,"CREATE TABLE table_name_30 (first VARCHAR, dob VARCHAR);","SELECT first FROM table_name_30 WHERE dob = ""5 february 1979"";","SELECT first FROM table_name_30 WHERE dob = ""5 february 1979"";",1 "Find the total number of games played in Ligue 1 where the home team won, for the 2020-2021 season.","CREATE TABLE Ligue_1_Matches (Season VARCHAR(50), HomeTeam VARCHAR(50), AwayTeam VARCHAR(50), HomeTeamScore INT, AwayTeamScore INT); ",SELECT SUM(HomeTeamScore > AwayTeamScore) FROM Ligue_1_Matches WHERE Season = '2020-2021';,SELECT COUNT(*) FROM Ligue_1_Matches WHERE HomeTeam = 'Won' AND Season = '2020-2021';,0 What is the average water temperature in January for all Salmon farms?,"CREATE TABLE Salmon_farms (id INT, name TEXT, country TEXT, water_temp FLOAT); ",SELECT AVG(water_temp) FROM Salmon_farms WHERE MONTH(created_at) = 1 AND species = 'Salmon';,SELECT AVG(water_temp) FROM Salmon_farms WHERE month = 1;,0 Total number of impact investments in the renewable energy sector?,"CREATE TABLE impact_investments_renewable (id INT, sector VARCHAR(20)); ",SELECT COUNT(*) FROM impact_investments_renewable WHERE sector = 'Renewable Energy';,SELECT COUNT(*) FROM impact_investments_renewable WHERE sector = 'Renewable Energy';,1 How many satellites were deployed per year in the 'satellite_deployment' table?,"CREATE TABLE satellite_deployment (satellite_id INT, deployment_year INT);","SELECT deployment_year, COUNT(*) FROM satellite_deployment GROUP BY deployment_year;","SELECT deployment_year, COUNT(*) FROM satellite_deployment GROUP BY deployment_year;",1 How many songs received a 10 from Goodman and were rated by Tonioli?,"CREATE TABLE table_1014319_1 (tonioli VARCHAR, goodman VARCHAR);","SELECT COUNT(tonioli) FROM table_1014319_1 WHERE goodman = ""10"";","SELECT COUNT(tonioli) FROM table_1014319_1 WHERE goodman = ""10"";",1 What are the draws when the losses are less than 1?,"CREATE TABLE table_name_30 (draws INTEGER, losses INTEGER);",SELECT SUM(draws) FROM table_name_30 WHERE losses < 1;,SELECT AVG(draws) FROM table_name_30 WHERE losses 1;,0 Find the top 5 most engaged users by comment count in the 'travel' category since 2021-09-01.,"CREATE TABLE users (id INT, username TEXT); CREATE TABLE posts (user_id INT, category TEXT, timestamp TIMESTAMP, comment_count INT);","SELECT u.username, SUM(p.comment_count) as total_comments FROM users u JOIN posts p ON u.id = p.user_id WHERE p.category = 'travel' AND p.timestamp >= '2021-09-01' GROUP BY u.username ORDER BY total_comments DESC LIMIT 5;","SELECT users.username, SUM(posts.comment_count) as total_comments FROM users INNER JOIN posts ON users.id = posts.user_id WHERE posts.category = 'travel' AND posts.timestamp >= '2021-10-01' GROUP BY users.username ORDER BY total_comments DESC LIMIT 5;",0 What are the names of the intelligence operations in the Middle East?,"CREATE TABLE Intelligence_Operations (Name VARCHAR(255), Location VARCHAR(255)); ",SELECT Name FROM Intelligence_Operations WHERE Location = 'Middle East';,SELECT Name FROM Intelligence_Operations WHERE Location = 'Middle East';,1 What is the minimum wage in factories in Southeast Asia?,"CREATE TABLE factory_wages (id INT, factory VARCHAR(100), location VARCHAR(100), min_wage DECIMAL(5,2)); ",SELECT MIN(min_wage) FROM factory_wages WHERE location = 'Southeast Asia';,SELECT MIN(min_wage) FROM factory_wages WHERE location = 'Southeast Asia';,1 "Score of 2-1, and a Competition of pl, and a Date of december 22, 2006 had what opponents?","CREATE TABLE table_name_84 (opponents VARCHAR, date VARCHAR, score VARCHAR, competition VARCHAR);","SELECT opponents FROM table_name_84 WHERE score = ""2-1"" AND competition = ""pl"" AND date = ""december 22, 2006"";","SELECT opponents FROM table_name_84 WHERE score = ""2-1"" AND competition = ""pl"" AND date = ""december 22, 2006"";",1 Get the names and annual energy savings of all the wind turbines located in Texas.,"CREATE TABLE wind_turbines (id INT, name VARCHAR(255), location VARCHAR(255), annual_energy_savings FLOAT);","SELECT name, annual_energy_savings FROM wind_turbines WHERE location = 'Texas';","SELECT name, annual_energy_savings FROM wind_turbines WHERE location = 'Texas';",1 "How many co-owned properties are there in the city of Oakland with a listing price above $700,000?","CREATE TABLE properties (id INT, city VARCHAR(20), listing_price FLOAT, co_owned BOOLEAN); ",SELECT COUNT(*) FROM properties WHERE city = 'Oakland' AND listing_price > 700000 AND co_owned = true;,SELECT COUNT(*) FROM properties WHERE city = 'Oakland' AND co_owned = true AND listing_price > 700000;,0 What is the exited day where the celebrity is vic reeves?,"CREATE TABLE table_14345690_5 (exited VARCHAR, celebrity VARCHAR);","SELECT exited FROM table_14345690_5 WHERE celebrity = ""Vic Reeves"";","SELECT exited FROM table_14345690_5 WHERE celebrity = ""Vic Reeves"";",1 "What is the total number of genetic research patents filed per country, in the past 3 years, with a rank per country?","CREATE SCHEMA if not exists biotech; CREATE TABLE if not exists biotech.genetic_patents (id INT, name VARCHAR(50), location VARCHAR(50), filed_date DATE, industry VARCHAR(50)); ","SELECT location, ROW_NUMBER() OVER (PARTITION BY location ORDER BY total_patents DESC) as country_rank, total_patents FROM (SELECT location, COUNT(*) as total_patents FROM biotech.genetic_patents WHERE industry = 'Genetic Research' AND filed_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR) GROUP BY location) as genetic_patents_summary;","SELECT country, COUNT(*) as total_patents, RANK() OVER (ORDER BY COUNT(*) DESC) as rank FROM biotech.genetic_patents WHERE filed_date >= DATEADD(year, -3, GETDATE()) GROUP BY country;",0 "List the number of healthcare providers in each county, for counties with more than 50 providers.","CREATE TABLE healthcare_providers (id INT, county VARCHAR(10), count INT); ","SELECT county, count FROM healthcare_providers WHERE count > 50 GROUP BY county;","SELECT county, count FROM healthcare_providers WHERE count > 50 GROUP BY county;",1 What was the little league team from Michigan when the little league team from Indiana was Terre Haute North LL Terre Haute? ,"CREATE TABLE table_18461045_1 (michigan VARCHAR, indiana VARCHAR);","SELECT michigan FROM table_18461045_1 WHERE indiana = ""Terre Haute North LL Terre Haute"";","SELECT michigan FROM table_18461045_1 WHERE indiana = ""Terre Haute North LL Terre Haute"";",1 "What is the maximum amount of funding for series B rounds for companies in the ""blockchain"" sector?","CREATE TABLE funding (company_id INT, round TEXT, amount INT); ",SELECT MAX(amount) FROM funding JOIN company ON funding.company_id = company.id WHERE company.industry = 'blockchain' AND round = 'series B';,SELECT MAX(amount) FROM funding WHERE round ='series B' AND company_id IN (SELECT company_id FROM companies WHERE sector = 'blockchain');,0 "What is the number of cases handled by each attorney, sorted by the number of cases in descending order?","CREATE TABLE Attorneys (AttorneyID INT, Specialization VARCHAR(255)); CREATE TABLE Cases (CaseID INT, AttorneyID INT, BillingAmount DECIMAL(10, 2)); ","SELECT AttorneyID, COUNT(*) AS NumberOfCases FROM Cases GROUP BY AttorneyID ORDER BY NumberOfCases DESC;","SELECT Attorneys.AttorneyID, COUNT(Cases.CaseID) as CaseCount FROM Attorneys INNER JOIN Cases ON Attorneys.AttorneyID = Cases.AttorneyID GROUP BY Attorneys.AttorneyID ORDER BY CaseCount DESC;",0 Add a new transaction to the 'transactions' table,"CREATE TABLE transactions (tx_id INT PRIMARY KEY, contract_address VARCHAR(42), sender VARCHAR(42), receiver VARCHAR(42), amount FLOAT, tx_time TIMESTAMP);","INSERT INTO transactions (tx_id, contract_address, sender, receiver, amount, tx_time) VALUES (1, '0xghi789', 'Alice', 'Bob', 100, '2023-04-10 14:20:30');",ALTER TABLE transactions ADD tx_id INT PRIMARY KEY;,0 List all explorations in the Gulf of Mexico,"CREATE TABLE if not exists dim_exploration (exploration_id INT PRIMARY KEY, exploration_name VARCHAR(255), location VARCHAR(255));",SELECT exploration_name FROM dim_exploration WHERE location = 'Gulf of Mexico';,SELECT exploration_name FROM dim_exploration WHERE location = 'Gulf of Mexico';,1 What is the total revenue generated from workshops for members aged 25-34 in the San Francisco region?,"CREATE TABLE members (member_id INT, age INT, region VARCHAR(20)); CREATE TABLE workshops (workshop_id INT, member_id INT, revenue DECIMAL(5,2)); ",SELECT SUM(workshops.revenue) FROM members INNER JOIN workshops ON members.member_id = workshops.member_id WHERE members.age BETWEEN 25 AND 34 AND members.region = 'San Francisco';,SELECT SUM(workshops.revenue) FROM workshops INNER JOIN members ON workshops.member_id = members.member_id WHERE members.age BETWEEN 25 AND 34 AND members.region = 'San Francisco';,0 Who is the artist with the most concert tickets sold in the month of 'November'?,"CREATE TABLE concert_sales (id INT, artist VARCHAR(255), city VARCHAR(255), date DATE, tickets_sold INT); ","SELECT artist, SUM(tickets_sold) AS total_tickets_sold FROM concert_sales WHERE date BETWEEN '2022-11-01' AND '2022-11-30' GROUP BY artist ORDER BY total_tickets_sold DESC LIMIT 1;","SELECT artist, SUM(tickets_sold) as total_tickets_sold FROM concert_sales WHERE date BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY artist ORDER BY total_tickets_sold DESC LIMIT 1;",0 Show the total number of autonomous driving research centers in each country,"CREATE TABLE autonomous_driving_research (id INT PRIMARY KEY, center_name VARCHAR(255), country VARCHAR(255), num_researchers INT);","SELECT country, COUNT(*) as total_centers FROM autonomous_driving_research GROUP BY country;","SELECT country, SUM(num_researchers) FROM autonomous_driving_research GROUP BY country;",0 Show the number of trains,CREATE TABLE train (Id VARCHAR);,SELECT COUNT(*) FROM train;,SELECT COUNT(*) FROM train;,1 Which Player had a Long of 5 and Yards of 6?,"CREATE TABLE table_name_74 (player VARCHAR, long VARCHAR, yards VARCHAR);","SELECT player FROM table_name_74 WHERE long = ""5"" AND yards = ""6"";","SELECT player FROM table_name_74 WHERE long = ""5"" AND yards = ""6"";",1 What is the away team's score at punt road oval?,"CREATE TABLE table_name_27 (away_team VARCHAR, venue VARCHAR);","SELECT away_team FROM table_name_27 WHERE venue = ""punt road oval"";","SELECT away_team AS score FROM table_name_27 WHERE venue = ""punt road oval"";",0 "What is the minimum quantity of goods, in metric tons, shipped from Japan to South Korea via the Sea of Japan?","CREATE TABLE shipping_routes (id INT, departure_country VARCHAR(50), arrival_country VARCHAR(50), departure_region VARCHAR(50), arrival_region VARCHAR(50), transportation_method VARCHAR(50), quantity FLOAT); ",SELECT MIN(quantity) FROM shipping_routes WHERE departure_country = 'Japan' AND arrival_country = 'South Korea' AND departure_region = 'Sea of Japan' AND arrival_region = 'Sea of Japan' AND transportation_method = 'Ship';,SELECT MIN(quantity) FROM shipping_routes WHERE departure_country = 'Japan' AND arrival_country = 'South Korea' AND transportation_method = 'Sea of Japan';,0 What is the name of the player who played in 2009 only?,"CREATE TABLE table_12321870_32 (player_name VARCHAR, period VARCHAR);","SELECT player_name FROM table_12321870_32 WHERE period = ""2009"";","SELECT player_name FROM table_12321870_32 WHERE period = ""2009"";",1 Insert a new record for a workplace in the state of Illinois without safety violations.,"CREATE TABLE workplaces (id INT, name TEXT, state TEXT, safety_violation BOOLEAN);","INSERT INTO workplaces (id, name, state, safety_violation) VALUES (1, 'WXY Company', 'Illinois', false);","INSERT INTO workplaces (id, name, state, safety_violation) VALUES (1, 'Illinois', FALSE);",0 What is the percentage of female employees in each mining operation?,"CREATE TABLE mining_operations (id INT, name VARCHAR(50), num_employees INT, gender VARCHAR(50)); ","SELECT name, gender, COUNT(*) * 100.0 / SUM(COUNT(*)) OVER (PARTITION BY name) FROM mining_operations GROUP BY name, gender;","SELECT name, (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM mining_operations WHERE gender = 'Female')) AS female_percentage FROM mining_operations WHERE gender = 'Female' GROUP BY name;",0 "What is the average safety score for each manufacturing site, ordered by the score in descending order?","CREATE TABLE manufacturing_sites (site_id INT, site_name VARCHAR(50), safety_score DECIMAL(3,2)); ","SELECT site_name, AVG(safety_score) OVER (PARTITION BY site_id ORDER BY safety_score DESC) as avg_safety_score FROM manufacturing_sites;","SELECT site_name, AVG(safety_score) as avg_safety_score FROM manufacturing_sites GROUP BY site_name ORDER BY avg_safety_score DESC;",0 "Before the year 2010, and when Kalamazoo had a passenger fare of $517.32, what was the passenger fare for Detroit?","CREATE TABLE table_name_36 (detroit__dtw_ VARCHAR, year VARCHAR, kalamazoo__azo_ VARCHAR);","SELECT detroit__dtw_ FROM table_name_36 WHERE year < 2010 AND kalamazoo__azo_ = ""$517.32"";","SELECT detroit__dtw_ FROM table_name_36 WHERE year 2010 AND kalamazoo__azo_ = ""$517.32"";",0 Update the total number of passengers for the NYC subway line 6,"CREATE TABLE subway_lines (id INT PRIMARY KEY, line_number INT, line_name VARCHAR(255), city VARCHAR(255), total_passengers INT);",UPDATE subway_lines SET total_passengers = 850000 WHERE line_number = 6 AND city = 'NYC';,UPDATE subway_lines SET total_passengers = 6 WHERE line_number = 6;,0 What is the average games that were drawn with ERSC Amberg as name and less than 14 points?,"CREATE TABLE table_name_32 (drawn INTEGER, name VARCHAR, points VARCHAR);","SELECT AVG(drawn) FROM table_name_32 WHERE name = ""ersc amberg"" AND points < 14;","SELECT AVG(drawn) FROM table_name_32 WHERE name = ""ersc amberg"" AND points 14;",0 "What are the names and the corresponding safety protocol IDs of all safety protocols in the safety_protocols table, ordered by the safety protocol ID in ascending order?","CREATE TABLE safety_protocols (protocol_id INT, safety_measure TEXT); ","SELECT safety_measure AS name, protocol_id FROM safety_protocols ORDER BY protocol_id ASC;","SELECT s.protocol_id, s.safety_measure FROM safety_protocols s JOIN safety_protocols s ON s.protocol_id = s.protocol_id ORDER BY s.protocol_id ASC;",0 What is the maximum number of views for articles published in Spanish in 2020?,"CREATE TABLE article_views (article_id INT, views INT, language VARCHAR(100), publish_year INT); ",SELECT MAX(views) FROM article_views WHERE language = 'Spanish' AND publish_year = 2020;,SELECT MAX(views) FROM article_views WHERE language = 'Spanish' AND publish_year = 2020;,1 Name the sum of grid with laps more than 97,"CREATE TABLE table_name_82 (grid INTEGER, laps INTEGER);",SELECT SUM(grid) FROM table_name_82 WHERE laps > 97;,SELECT SUM(grid) FROM table_name_82 WHERE laps > 97;,1 What is the average budget allocated for disability support programs in '2021'?,"CREATE TABLE DisabilitySupportPrograms (year INT, budget DECIMAL(5,2)); ",SELECT AVG(budget) FROM DisabilitySupportPrograms WHERE year = 2021;,SELECT AVG(budget) FROM DisabilitySupportPrograms WHERE year = 2021;,1 What is the total ticket revenue generated by each team during the 2022 season?,"CREATE TABLE ticket_sales (id INT, team VARCHAR(255), season INT, city VARCHAR(255), revenue DECIMAL(5,2)); ","SELECT team, SUM(revenue) as total_revenue FROM ticket_sales WHERE season = 2022 GROUP BY team;","SELECT team, SUM(revenue) as total_revenue FROM ticket_sales WHERE season = 2022 GROUP BY team;",1 What are the names and research interests of professors who have received grants from the 'NSF' in the last 5 years?,"CREATE TABLE professors (professor_id INT, name TEXT, research_interest TEXT);CREATE TABLE grants (grant_id INT, professor_id INT, funding_source TEXT, grant_date DATE); ","SELECT professors.name, professors.research_interest FROM professors INNER JOIN grants ON professors.professor_id = grants.professor_id WHERE grants.funding_source = 'NSF' AND grants.grant_date >= DATEADD(year, -5, CURRENT_DATE);","SELECT professors.name, professors.research_interest FROM professors INNER JOIN grants ON professors.professor_id = grants.professor_id WHERE grants.funding_source = 'NSF' AND grants.grant_date >= DATEADD(year, -5, GETDATE());",0 What is the total for the state of new york and a swimsuit less than 9.394?,"CREATE TABLE table_name_97 (interview INTEGER, state VARCHAR, swimsuit VARCHAR);","SELECT SUM(interview) FROM table_name_97 WHERE state = ""new york"" AND swimsuit < 9.394;","SELECT SUM(interview) FROM table_name_97 WHERE state = ""new york"" AND swimsuit 9.394;",0 Listed with a continent of Africa and before 2009 this structure is called what?,"CREATE TABLE table_name_83 (structure VARCHAR, year VARCHAR, continent VARCHAR);","SELECT structure FROM table_name_83 WHERE year < 2009 AND continent = ""africa"";","SELECT structure FROM table_name_83 WHERE year 2009 AND continent = ""africa"";",0 "Insert a new record into the 'employees' table with ID '0001', name 'John Doe', role 'Engineer', and hourly_wage $35","CREATE TABLE employees (id VARCHAR(10), name VARCHAR(50), role VARCHAR(50), hourly_wage DECIMAL(5,2));","INSERT INTO employees (id, name, role, hourly_wage) VALUES ('0001', 'John Doe', 'Engineer', 35.00);","INSERT INTO employees (id, name, role, hourly_wage) VALUES (0001, 'John Doe', 'Engineer', 35);",0 "What is the average age of female patients who have been diagnosed with diabetes in the rural area of ""West Virginia""?","CREATE TABLE patient (patient_id INT, patient_name TEXT, age INT, gender TEXT, diagnosis TEXT, location TEXT); ",SELECT AVG(age) FROM patient WHERE diagnosis = 'Diabetes' AND gender = 'Female' AND location = 'West Virginia';,SELECT AVG(age) FROM patient WHERE gender = 'Female' AND diagnosis = 'Diabetes' AND location = 'West Virginia';,0 What is the total mass of space debris launched in each year?,"CREATE TABLE space_debris (year INT, category TEXT, mass FLOAT); ","SELECT year, SUM(mass) FROM space_debris GROUP BY year;","SELECT year, SUM(mass) FROM space_debris GROUP BY year;",1 What is the percentage of donors who are from the USA?,"CREATE TABLE donors (id INT, name TEXT, country TEXT); ",SELECT (COUNT(CASE WHEN country = 'USA' THEN 1 END) * 100.0 / COUNT(*)) FROM donors;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM donors WHERE country = 'USA')) AS percentage FROM donors WHERE country = 'USA';,0 What is the surface of the tournament with a runner-up outcome and dudi sela as the opponent?,"CREATE TABLE table_name_59 (surface VARCHAR, outcome VARCHAR, opponent VARCHAR);","SELECT surface FROM table_name_59 WHERE outcome = ""runner-up"" AND opponent = ""dudi sela"";","SELECT surface FROM table_name_59 WHERE outcome = ""runner-up"" AND opponent = ""dudi sela"";",1 What to par has t3 as the place and england as the country?,"CREATE TABLE table_name_96 (to_par VARCHAR, place VARCHAR, country VARCHAR);","SELECT to_par FROM table_name_96 WHERE place = ""t3"" AND country = ""england"";","SELECT to_par FROM table_name_96 WHERE place = ""t3"" AND country = ""england"";",1 Update the weight of all cargos in Chinese ports by 10%.,"CREATE TABLE Port (id INT, name VARCHAR(50), city VARCHAR(50), country VARCHAR(50)); CREATE TABLE Ship (id INT, name VARCHAR(50), type VARCHAR(50), length FLOAT); CREATE TABLE Cargo (id INT, name VARCHAR(50), weight FLOAT, PortId INT, ShipId INT);",UPDATE Cargo SET weight = Cargo.weight * 1.10 WHERE PortId IN (SELECT id FROM Port WHERE country = 'China');,UPDATE Cargo SET weight = weight * 1.10 WHERE PortId = (SELECT id FROM Port WHERE country = 'China');,0 What is the maximum number of accommodations provided to a single student in the art department?,"CREATE TABLE students (id INT, department VARCHAR(255)); CREATE TABLE accommodations (id INT, student_id INT, year INT); ","SELECT MAX(accommodations) FROM (SELECT student_id, COUNT(*) as accommodations FROM accommodations GROUP BY student_id) as subquery WHERE student_id IN (SELECT id FROM students WHERE department = 'art');",SELECT MAX(accommodations.id) FROM students INNER JOIN accommodations ON students.id = accommodations.student_id WHERE students.department = 'Art';,0 What is the total population for Saint-Antoine with an area squared of 6.43?,"CREATE TABLE table_name_60 (population INTEGER, official_name VARCHAR, area_km_2 VARCHAR);","SELECT SUM(population) FROM table_name_60 WHERE official_name = ""saint-antoine"" AND area_km_2 > 6.43;","SELECT SUM(population) FROM table_name_60 WHERE official_name = ""saint-antonio"" AND area_km_2 = 6.43;",0 "What is the highest league cup with more than 0 FA cups, a premier league less than 34 and a total of 11?","CREATE TABLE table_name_77 (league_cup INTEGER, total VARCHAR, fa_cup VARCHAR, premier_league VARCHAR);",SELECT MAX(league_cup) FROM table_name_77 WHERE fa_cup > 0 AND premier_league < 34 AND total = 11;,SELECT MAX(league_cup) FROM table_name_77 WHERE fa_cup > 0 AND premier_league 34 AND total = 11;,0 Find the total capacity of warehouses in the USA?,"CREATE TABLE Warehouse (id INT, location VARCHAR(255), capacity INT); ",SELECT SUM(capacity) FROM Warehouse WHERE location LIKE '%USA%';,SELECT SUM(capacity) FROM Warehouse WHERE location = 'USA';,0 Display the latest soil temperature (in Celsius) for each field,"CREATE TABLE soil_temperature (id INT, field VARCHAR(50), temperature FLOAT, timestamp DATETIME); ","SELECT field, temperature as latest_soil_temperature FROM soil_temperature WHERE timestamp IN (SELECT MAX(timestamp) FROM soil_temperature GROUP BY field);","SELECT field, MAX(temperature) FROM soil_temperature GROUP BY field;",0 "What is the average carbon emission per employee by department in the 'mining_operations', 'carbon_emissions', and 'departments' tables?","CREATE TABLE mining_operations (employee_id INT, name VARCHAR(50), age INT, position VARCHAR(50), country VARCHAR(50)); CREATE TABLE carbon_emissions (employee_id INT, carbon_emissions INT); CREATE TABLE departments (employee_id INT, department VARCHAR(50)); ","SELECT departments.department, AVG(carbon_emissions) FROM mining_operations INNER JOIN carbon_emissions ON mining_operations.employee_id = carbon_emissions.employee_id INNER JOIN departments ON mining_operations.employee_id = departments.employee_id GROUP BY departments.department;","SELECT departments.department, AVG(carbon_emissions.carbon_emissions) as avg_carbon_emission_per_employee FROM departments INNER JOIN mining_operations ON departments.employee_id = mining_operations.employee_id INNER JOIN carbon_emissions ON departments.employee_id = carbon_emissions.employee_id GROUP BY departments.employee_id;",0 What NHL team picked richard borgo?,"CREATE TABLE table_2897457_2 (nhl_team VARCHAR, player VARCHAR);","SELECT nhl_team FROM table_2897457_2 WHERE player = ""Richard Borgo"";","SELECT nhl_team FROM table_2897457_2 WHERE player = ""Richard Borgo"";",1 Find the client_id and name of top 3 clients with highest assets?,"CREATE TABLE clients (client_id INT, name VARCHAR(50), assets DECIMAL(10,2)); ","SELECT client_id, name, assets FROM (SELECT client_id, name, assets, ROW_NUMBER() OVER (ORDER BY assets DESC) as rn FROM clients) t WHERE rn <= 3;","SELECT client_id, name FROM clients ORDER BY assets DESC LIMIT 3;",0 "How many indigenous food system organizations are registered in the 'food_justice' schema, with more than 50 employees?","CREATE SCHEMA food_justice;CREATE TABLE orgs (id INT, name VARCHAR(50), num_employees INT);",SELECT COUNT(*) FROM food_justice.orgs WHERE num_employees > 50;,SELECT COUNT(*) FROM food_justice.orgs WHERE num_employees > 50;,1 "Update the fare_amount to 5.00 for all fares in the route 1 collected on January 1, 2022","CREATE TABLE route (route_id INT, route_name VARCHAR(255)); CREATE TABLE fares (fare_id INT, route_id INT, fare_amount DECIMAL, fare_date DATE); ",UPDATE fares SET fare_amount = 5.00 WHERE route_id = 1 AND fare_date = '2022-01-01';,UPDATE fares SET fare_amount = 5.00 WHERE route_id = 1 AND fare_date BETWEEN '2022-01-01' AND '2022-01-31';,0 What is the maximum weekly wage for each job category in the 'labor_stats' table?,"CREATE TABLE labor_stats (id INT, job_category VARCHAR(255), weekly_wage FLOAT); ","SELECT job_category, MAX(weekly_wage) as max_wage FROM labor_stats GROUP BY job_category;","SELECT job_category, MAX(weekly_wage) FROM labor_stats GROUP BY job_category;",0 How many destinations have travel advisories issued by at least 3 countries?,"CREATE TABLE travel_advisories (country_issuing_advisory VARCHAR(50), destination VARCHAR(50));",SELECT COUNT(DISTINCT destination) FROM travel_advisories WHERE destination IN (SELECT destination FROM travel_advisories GROUP BY destination HAVING COUNT(DISTINCT country_issuing_advisory) >= 3);,SELECT COUNT(*) FROM travel_advisories WHERE country_issuing_advisory IN (SELECT country_issuing_advisory FROM travel_advisories);,0 Which well has the highest production in the month of February 2021 in the Oil_Production table?,"CREATE TABLE Oil_Production (well text, production_date date, quantity real); ","SELECT well, MAX(quantity) FROM Oil_Production WHERE production_date BETWEEN '2021-02-01' AND '2021-02-28' GROUP BY well;","SELECT well, MAX(quantity) FROM Oil_Production WHERE production_date BETWEEN '2021-02-01' AND '2021-02-28' GROUP BY well;",1 what is the original air date of the episode no in season 9?,"CREATE TABLE table_10610087_3 (original_air_date VARCHAR, no_in_season VARCHAR);",SELECT original_air_date FROM table_10610087_3 WHERE no_in_season = 9;,SELECT original_air_date FROM table_10610087_3 WHERE no_in_season = 9;,1 what is the maximum number of animals in a single habitat preservation project?,"CREATE TABLE habitat_preservation (project_id INT, animals INT); ",SELECT MAX(animals) FROM habitat_preservation;,SELECT MAX(animals) FROM habitat_preservation;,1 What is the maximum number of employees in each department in the 'Transportation' agency?,"CREATE SCHEMA Government;CREATE TABLE Government.Agency (name VARCHAR(255), budget INT);CREATE TABLE Government.Department (name VARCHAR(255), agency VARCHAR(255), employees INT, budget INT);","SELECT agency, MAX(employees) FROM Government.Department WHERE agency IN (SELECT name FROM Government.Agency WHERE budget > 2000000) GROUP BY agency;","SELECT g.name, MAX(g.employees) FROM Government.Department g JOIN Government.Agency g ON g.name = g.name WHERE g.agency = 'Transportation' GROUP BY g.name;",0 What is the highest goal difference of the club with more than 34 played?,"CREATE TABLE table_name_54 (goal_difference INTEGER, played INTEGER);",SELECT MAX(goal_difference) FROM table_name_54 WHERE played > 34;,SELECT MAX(goal_difference) FROM table_name_54 WHERE played > 34;,1 What is the total of crowd at Venue of mcg?,"CREATE TABLE table_name_7 (crowd INTEGER, venue VARCHAR);","SELECT SUM(crowd) FROM table_name_7 WHERE venue = ""mcg"";","SELECT SUM(crowd) FROM table_name_7 WHERE venue = ""mcg"";",1 "Calculate the average production rate for each field, considering only the active fields","CREATE TABLE fields (field_id INT, field_name VARCHAR(255), production_rate FLOAT, active BOOLEAN); ","SELECT field_name, AVG(production_rate) as avg_production_rate FROM fields WHERE active = true GROUP BY field_name;","SELECT field_name, AVG(production_rate) as avg_production_rate FROM fields WHERE active = true GROUP BY field_name;",1 What is the country that has the most perpetrators?,CREATE TABLE perpetrator (Country VARCHAR);,"SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1;",SELECT Country FROM perpetrator ORDER BY COUNT(*) DESC LIMIT 1;,0 What is the location and attendance total from the game on December 1?,"CREATE TABLE table_27539808_5 (location_attendance VARCHAR, december VARCHAR);",SELECT location_attendance FROM table_27539808_5 WHERE december = 1;,"SELECT location_attendance FROM table_27539808_5 WHERE december = ""1"";",0 What was the final score in game 38?,"CREATE TABLE table_17058178_8 (score VARCHAR, game VARCHAR);",SELECT score FROM table_17058178_8 WHERE game = 38;,SELECT score FROM table_17058178_8 WHERE game = 38;,1 "Which Width has a Number of vehicles larger than 15, and a Type designation of k5000?","CREATE TABLE table_name_88 (width VARCHAR, number_of_vehicles VARCHAR, type_designation VARCHAR);","SELECT width FROM table_name_88 WHERE number_of_vehicles > 15 AND type_designation = ""k5000"";","SELECT width FROM table_name_88 WHERE number_of_vehicles > 15 AND type_designation = ""k5000"";",1 "Where was the game that had an attendance of 39,889?","CREATE TABLE table_name_64 (game_site VARCHAR, attendance VARCHAR);","SELECT game_site FROM table_name_64 WHERE attendance = ""39,889"";","SELECT game_site FROM table_name_64 WHERE attendance = ""39,889"";",1 Name the total number for 18-49 share being 18-49 being 3.1,"CREATE TABLE table_20971444_3 (share__18_49_ VARCHAR, rating__18_49_ VARCHAR);","SELECT COUNT(share__18_49_) FROM table_20971444_3 WHERE rating__18_49_ = ""3.1"";","SELECT COUNT(share__18_49_) FROM table_20971444_3 WHERE rating__18_49_ = ""3.1"";",1 How many medals for spain with 1 silver?,"CREATE TABLE table_name_68 (total INTEGER, silver VARCHAR, nation VARCHAR);","SELECT SUM(total) FROM table_name_68 WHERE silver = ""1"" AND nation = ""spain"";","SELECT SUM(total) FROM table_name_68 WHERE silver = 1 AND nation = ""spain"";",0 "How many electric vehicle charging stations were installed in each province in Canada, by type, from 2016 to 2021?","CREATE TABLE charging_stations (province text, type text, year integer, stations integer);","SELECT province, type, SUM(stations) as total_stations FROM charging_stations WHERE year BETWEEN 2016 AND 2021 AND province = 'Canada' GROUP BY province, type;","SELECT province, type, SUM(stations) FROM charging_stations WHERE year BETWEEN 2016 AND 2021 GROUP BY province, type;",0 How many members have a membership fee less than the average membership fee for their region?,"CREATE TABLE regional_membership_fees (region VARCHAR(50), avg_fee DECIMAL(5,2)); ","SELECT COUNT(*) FROM memberships INNER JOIN (SELECT region, AVG(membership_fee) AS avg_fee FROM memberships GROUP BY region) AS regional_avg_fees ON memberships.region = regional_avg_fees.region WHERE memberships.membership_fee < regional_avg_fees.avg_fee;",SELECT COUNT(*) FROM regional_membership_fees WHERE avg_fee (SELECT AVG(avg_fee) FROM regional_membership_fees);,0 What are the total sales and number of menu items for each cuisine type?,"CREATE TABLE restaurants (restaurant_id INT, name VARCHAR(255), cuisine VARCHAR(255)); CREATE TABLE menu_items (menu_item_id INT, name VARCHAR(255), price DECIMAL(5,2), restaurant_id INT); ","SELECT cuisine, SUM(price) AS total_sales, COUNT(*) AS num_menu_items FROM restaurants JOIN menu_items ON restaurants.restaurant_id = menu_items.restaurant_id GROUP BY cuisine;","SELECT r.cuisine, SUM(m.price * m.price) as total_sales, COUNT(m.menu_item_id) as num_menu_items FROM restaurants r JOIN menu_items m ON r.restaurant_id = m.restaurant_id GROUP BY r.cuisine;",0 "Who is the opponent on November 20, 1966?","CREATE TABLE table_name_88 (opponent VARCHAR, date VARCHAR);","SELECT opponent FROM table_name_88 WHERE date = ""november 20, 1966"";","SELECT opponent FROM table_name_88 WHERE date = ""november 20, 1966"";",1 Tell me japan for jigsaw land: japan graffiti,"CREATE TABLE table_name_14 (japan VARCHAR, title VARCHAR);","SELECT japan FROM table_name_14 WHERE title = ""jigsaw land: japan graffiti"";","SELECT japan FROM table_name_14 WHERE title = ""jigsaw land: japan graffiti"";",1 "Who won the Mens Singles when the Mixed doubles went to Stellan Mohlin Kerstin Ståhl , Aik?","CREATE TABLE table_12266757_1 (mens_singles VARCHAR, mixed_doubles VARCHAR);","SELECT mens_singles FROM table_12266757_1 WHERE mixed_doubles = ""Stellan Mohlin Kerstin Ståhl , AIK"";","SELECT mens_singles FROM table_12266757_1 WHERE mixed_doubles = ""Stellan Mohlin Kerstin Sthl, Aik"";",0 What is the average time spent on the court by each basketball player in the NBA?,"CREATE TABLE nba_minutes (player_id INT, name VARCHAR(50), team VARCHAR(50), minutes INT); ","SELECT name, minutes / 60 AS avg_minutes FROM nba_minutes;","SELECT name, AVG(minutes) FROM nba_minutes GROUP BY name;",0 "What is the minimum monthly bill for postpaid mobile customers in the ""oceanic"" region, excluding those with unlimited plans?","CREATE TABLE prepaid_plans (id INT, plan_name VARCHAR(20), region VARCHAR(10), monthly_bill INT); CREATE TABLE subscribers (id INT, type VARCHAR(10), region VARCHAR(10), unlimited BOOLEAN); ",SELECT MIN(monthly_bill) FROM prepaid_plans JOIN subscribers ON prepaid_plans.region = subscribers.region WHERE subscribers.type = 'postpaid' AND subscribers.region = 'oceanic' AND subscribers.unlimited = FALSE;,SELECT MIN(monthly_bill) FROM prepaid_plans JOIN subscribers ON prepaid_plans.region = subscribers.region WHERE subscribers.type = 'postpaid' AND subscribers.region = 'oceanic' AND subscribers.unlimited = true;,0 What were highest points received from someone using a zabel-wsp with a position greater than 7?,"CREATE TABLE table_name_15 (points INTEGER, equipment VARCHAR, position VARCHAR);","SELECT MAX(points) FROM table_name_15 WHERE equipment = ""zabel-wsp"" AND position > 7;","SELECT MAX(points) FROM table_name_15 WHERE equipment = ""zabel-wsp"" AND position > 7;",1 When was a report not held?,"CREATE TABLE table_name_29 (year VARCHAR, report VARCHAR);","SELECT year FROM table_name_29 WHERE report = ""not held"";","SELECT year FROM table_name_29 WHERE report = ""not held"";",1 Name the kaz hayashi for block A being bushi,"CREATE TABLE table_name_43 (kaz_hayashi VARCHAR, block_a VARCHAR);","SELECT kaz_hayashi FROM table_name_43 WHERE block_a = ""bushi"";","SELECT kaz_hayashi FROM table_name_43 WHERE block_a = ""bushi"";",1 How many points did William Wasmund have?,"CREATE TABLE table_25730326_2 (points VARCHAR, player VARCHAR);","SELECT points FROM table_25730326_2 WHERE player = ""William Wasmund"";","SELECT points FROM table_25730326_2 WHERE player = ""William Wasmund"";",1 Which vehicle failed at launch?,"CREATE TABLE table_name_34 (vehicle VARCHAR, ceased_operation VARCHAR);","SELECT vehicle FROM table_name_34 WHERE ceased_operation = ""failed at launch"";","SELECT vehicle FROM table_name_34 WHERE ceased_operation = ""failed at launch"";",1 What is the location/state that has adelaide international raceway as the circuit?,"CREATE TABLE table_name_5 (location___state VARCHAR, circuit VARCHAR);","SELECT location___state FROM table_name_5 WHERE circuit = ""adelaide international raceway"";","SELECT location___state FROM table_name_5 WHERE circuit = ""adelaide international raceway"";",1 How many climate mitigation projects have been implemented in Latin America and the Caribbean?,"CREATE TABLE climate_mitigation_projects (id INT, project VARCHAR(50), location VARCHAR(50)); ","SELECT COUNT(*) FROM climate_mitigation_projects WHERE location IN ('Latin America', 'Caribbean');","SELECT COUNT(*) FROM climate_mitigation_projects WHERE location IN ('Latin America', 'Caribbean');",1 What is the total installed capacity (in MW) of wind power projects in the European Union?,"CREATE TABLE wind_projects_3 (project_id INT, project_name TEXT, country TEXT, capacity_mw FLOAT); ","SELECT SUM(capacity_mw) FROM wind_projects_3 WHERE country IN ('Germany', 'France', 'Spain');",SELECT SUM(capacity_mw) FROM wind_projects_3 WHERE country = 'European Union';,0 Operation of find-min has what binary?,"CREATE TABLE table_name_98 (binary VARCHAR, operation VARCHAR);","SELECT binary FROM table_name_98 WHERE operation = ""find-min"";","SELECT binary FROM table_name_98 WHERE operation = ""find-min"";",1 "What was the minimum temperature of refrigerated cargo unloaded at the port of Oakland in July 2021, grouped by cargo type?","CREATE TABLE ports (id INT, name VARCHAR(50)); CREATE TABLE cargo (id INT, port_id INT, cargo_type VARCHAR(50), temperature_type VARCHAR(50), temperature INT, quantity INT); ","SELECT cargo_type, MIN(temperature) as min_temperature FROM cargo WHERE port_id = 1 AND temperature_type = 'Refrigerated' AND MONTH(date) = 7 GROUP BY cargo_type;","SELECT c.cargo_type, MIN(c.temperature) as min_temperature FROM cargo c JOIN ports p ON c.port_id = p.id WHERE p.name = 'Oakland' AND c.temperature_type ='refrigerated' AND c.quantity ='refrigerated' GROUP BY c.cargo_type;",0 "For the model with torque of n·m (lb·ft)/*n·m (lb·ft) @1750, what is the power?","CREATE TABLE table_1212189_1 (power_rpm VARCHAR, torque__nm__rpm VARCHAR);","SELECT power_rpm FROM table_1212189_1 WHERE torque__nm__rpm = ""N·m (lb·ft)/*N·m (lb·ft) @1750"";","SELECT power_rpm FROM table_1212189_1 WHERE torque__nm__rpm = ""nm (lbft)/*nm (lbft) @1750"";",0 What is the rank 16 wins with the latest win at the 1967 Belgian Grand Prix?,"CREATE TABLE table_name_47 (wins VARCHAR, rank VARCHAR, latest_win VARCHAR);","SELECT wins FROM table_name_47 WHERE rank > 16 AND latest_win = ""1967 belgian grand prix"";","SELECT wins FROM table_name_47 WHERE rank = 16 AND latest_win = ""1967 belgian grand prix"";",0 Which marine protected areas in the Indian Ocean have an average depth greater than 500 meters?,"CREATE TABLE marine_protected_areas (name VARCHAR(255), location VARCHAR(255), avg_depth FLOAT); ",SELECT name FROM marine_protected_areas WHERE location = 'Indian Ocean' AND avg_depth > 500;,SELECT name FROM marine_protected_areas WHERE location = 'Indian Ocean' AND avg_depth > 500;,1 In which location is aci vallelunga circuit?,"CREATE TABLE table_23315271_2 (location VARCHAR, circuit VARCHAR);","SELECT location FROM table_23315271_2 WHERE circuit = ""ACI Vallelunga circuit"";","SELECT location FROM table_23315271_2 WHERE circuit = ""Aci Vallelunga"";",0 "Find broadband subscribers with usage in the top 10% for each region, ordered by region and then by usage in descending order.","CREATE TABLE broadband_subscribers (subscriber_id INT, usage FLOAT, region VARCHAR(255)); ","SELECT region, subscriber_id, usage FROM (SELECT region, subscriber_id, usage, NTILE(10) OVER (PARTITION BY region ORDER BY usage DESC) as usage_tile FROM broadband_subscribers) t WHERE t.usage_tile = 1 ORDER BY region, usage DESC;","SELECT region, usage, ROW_NUMBER() OVER (ORDER BY usage DESC) as rank FROM broadband_subscribers WHERE rank = 10;",0 What status has gauteng falcons as the opposing team?,"CREATE TABLE table_name_2 (status VARCHAR, opposing_team VARCHAR);","SELECT status FROM table_name_2 WHERE opposing_team = ""gauteng falcons"";","SELECT status FROM table_name_2 WHERE opposing_team = ""gauteng falcons"";",1 What is the media market ranking for the Blackhawks?,"CREATE TABLE table_1205598_1 (media_market_ranking VARCHAR, nhl_team_s_ VARCHAR);","SELECT COUNT(media_market_ranking) FROM table_1205598_1 WHERE nhl_team_s_ = ""Blackhawks"";","SELECT media_market_ranking FROM table_1205598_1 WHERE nhl_team_s_ = ""Blackhawks"";",0 What is the record on October 30?,"CREATE TABLE table_name_74 (record VARCHAR, date VARCHAR);","SELECT record FROM table_name_74 WHERE date = ""october 30"";","SELECT record FROM table_name_74 WHERE date = ""october 30"";",1 How many wind farms are there in Germany with a capacity greater than 5 MW?,"CREATE TABLE WindFarms (id INT, country VARCHAR(20), capacity FLOAT); ",SELECT COUNT(*) FROM WindFarms WHERE country = 'Germany' AND capacity > 5;,SELECT COUNT(*) FROM WindFarms WHERE country = 'Germany' AND capacity > 5;,1 How many times was the rank (csa) was (msa 348)?,CREATE TABLE table_12720275_1 (rank__csa_ VARCHAR);,"SELECT COUNT(2000 AS _population) FROM table_12720275_1 WHERE rank__csa_ = ""(MSA 348)"";","SELECT COUNT(rank__csa_) FROM table_12720275_1 WHERE rank__csa_ = ""(MSA 348)"";",0 Delete all records of farmed salmon in Scotland in 2022.,"CREATE TABLE Farming(country VARCHAR(255), year INT, species VARCHAR(255), production FLOAT);",DELETE FROM Farming WHERE country = 'Scotland' AND species = 'Salmon' AND year = 2022;,DELETE FROM Farming WHERE country = 'Scotland' AND year = 2022 AND species = 'Salmon';,0 What is the maximum prize money for esports events in 2019?,"CREATE TABLE EsportsEvents (EventID INT PRIMARY KEY, EventName VARCHAR(50), GameName VARCHAR(50), PrizeMoney DECIMAL(10,2), EventDate DATE); ",SELECT MAX(PrizeMoney) FROM EsportsEvents WHERE YEAR(EventDate) = 2019;,SELECT MAX(PrizeMoney) FROM EsportsEvents WHERE YEAR(EventDate) = 2019;,1 Delete player records who haven't played for 6 months from the players table,"CREATE TABLE players (id INT PRIMARY KEY, name TEXT, last_login DATETIME);",DELETE FROM players WHERE last_login < NOW() - INTERVAL 6 MONTH;,"DELETE FROM players WHERE last_login DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH);",0 What is the largest byes with lost games of 4 and Ballarat FL of Melton and the against less than 1819?,"CREATE TABLE table_name_3 (byes INTEGER, against VARCHAR, losses VARCHAR, ballarat_fl VARCHAR);","SELECT MAX(byes) FROM table_name_3 WHERE losses = 4 AND ballarat_fl = ""melton"" AND against < 1819;","SELECT MAX(byes) FROM table_name_3 WHERE losses = 4 AND ballarat_fl = ""melton"" AND against 1819;",0 "Rank the top 3 countries by the number of investigative stories published, in descending order.","CREATE TABLE stories (id INT, title VARCHAR(100), country VARCHAR(50), story_type VARCHAR(50)); ","SELECT country, RANK() OVER (ORDER BY COUNT(*) DESC) ranking FROM stories WHERE story_type = 'Investigative' GROUP BY country HAVING ranking <= 3;","SELECT country, COUNT(*) as story_count FROM stories WHERE story_type = 'investigative' GROUP BY country ORDER BY story_count DESC LIMIT 3;",0 What is the total amount of education aid sent to South Sudan in the past year?,"CREATE TABLE education_aid (id INT, location VARCHAR(50), aid_type VARCHAR(50), amount FLOAT, date DATE); ","SELECT SUM(amount) as total_education_aid FROM education_aid WHERE location = 'South Sudan' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT SUM(amount) FROM education_aid WHERE location = 'South Sudan' AND date >= DATEADD(year, -1, GETDATE());",0 "What is the number of job applicants by job category, for the last 3 months?","CREATE TABLE JobApplications (ApplicationID INT, ApplicantID INT, JobCategory VARCHAR(50), ApplicationDate DATE);","SELECT JobCategory, COUNT(DISTINCT ApplicantID) FROM JobApplications WHERE ApplicationDate >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH) GROUP BY JobCategory;","SELECT JobCategory, COUNT(*) FROM JobApplications WHERE ApplicationDate >= DATEADD(month, -3, GETDATE()) GROUP BY JobCategory;",0 "Create a new table named ""sustainable_materials"" with columns: material_name (text), recycled_content_percentage (float), and embodied_carbon_kg_co2 (float)","CREATE TABLE sustainable_materials (material_name TEXT, recycled_content_percentage FLOAT, embodied_carbon_kg_co2 FLOAT);","CREATE TABLE sustainable_materials (material_name TEXT, recycled_content_percentage FLOAT, embodied_carbon_kg_co2 FLOAT);","CREATE TABLE sustainable_materials (material_name TEXT, recycled_content_percentage FLOAT, embodied_carbon_kg_co2 FLOAT);",1 When looking at new entries this round and seeing 8; what number in total is there for clubs remaining?,"CREATE TABLE table_1281200_1 (clubs_remaining VARCHAR, new_entries_this_round VARCHAR);","SELECT COUNT(clubs_remaining) FROM table_1281200_1 WHERE new_entries_this_round = ""8"";",SELECT COUNT(clubs_remaining) FROM table_1281200_1 WHERE new_entries_this_round = 8;,0 How many points does driver kosuke matsuura have?,"CREATE TABLE table_name_17 (points VARCHAR, driver VARCHAR);","SELECT points FROM table_name_17 WHERE driver = ""kosuke matsuura"";","SELECT points FROM table_name_17 WHERE driver = ""kosuke matsuura"";",1 Find the average age of members who have done 'Pilates' or 'Barre'?,"CREATE TABLE Members (Id INT, Name VARCHAR(50), Age INT, Nationality VARCHAR(50)); CREATE TABLE Workouts (Id INT, MemberId INT, WorkoutType VARCHAR(50), Duration INT, Date DATE); ",SELECT AVG(m.Age) as AverageAge FROM Members m JOIN Workouts w ON m.Id = w.MemberId WHERE w.WorkoutType = 'Pilates' OR w.WorkoutType = 'Barre';,SELECT AVG(Members.Age) FROM Members INNER JOIN Workouts ON Members.Id = Workouts.MemberId WHERE Workouts.WorkoutType = 'Pilates' OR Workouts.WorkoutType = 'Barre';,0 "What is the number of people in attendance when venue shows A, and Di Matteo, M. Hughes were the scorers?","CREATE TABLE table_name_99 (attendance INTEGER, venue VARCHAR, scorers VARCHAR);","SELECT SUM(attendance) FROM table_name_99 WHERE venue = ""a"" AND scorers = ""di matteo, m. hughes"";","SELECT SUM(attendance) FROM table_name_99 WHERE venue = ""a"" AND scorers = ""di matteo, m. hughes"";",1 What's the hometown of the player with a college of lsu?,"CREATE TABLE table_name_51 (hometown VARCHAR, college VARCHAR);","SELECT hometown FROM table_name_51 WHERE college = ""lsu"";","SELECT hometown FROM table_name_51 WHERE college = ""lsu"";",1 Find the total production of Praseodymium and Neodymium for each year in the given dataset?,"CREATE TABLE RareEarthElements_Production (year INT, element TEXT, production INT); ","SELECT year, SUM(production) as total_production FROM RareEarthElements_Production WHERE element IN ('Praseodymium', 'Neodymium') GROUP BY year;","SELECT year, SUM(production) FROM RareEarthElements_Production WHERE element IN ('Praseodymium', 'Neodymium') GROUP BY year;",0 What class has 0 preserved and 2 made?,"CREATE TABLE table_name_56 (class VARCHAR, quantity_preserved VARCHAR, quantity_made VARCHAR);","SELECT class FROM table_name_56 WHERE quantity_preserved = ""0"" AND quantity_made = ""2"";","SELECT class FROM table_name_56 WHERE quantity_preserved = ""0"" AND quantity_made = ""2"";",1 Find the top 5 most sold products in the circular supply chain in 2021.,"CREATE TABLE Products (productID int, productName varchar(255), circularSupplyChain varchar(5)); CREATE TABLE Sales (saleID int, productID int, quantity int, date datetime); ","SELECT P.productName, SUM(S.quantity) as total_sold FROM Products P INNER JOIN Sales S ON P.productID = S.productID WHERE P.circularSupplyChain = 'Y' AND YEAR(S.date) = 2021 GROUP BY P.productID ORDER BY total_sold DESC LIMIT 5;","SELECT Products.productName, SUM(Sales.quantity) as total_quantity FROM Products INNER JOIN Sales ON Products.productID = Sales.productID WHERE Products.circularSupplyChain = 'Circular Supply Chain' AND Sales.date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY Products.productName ORDER BY total_quantity DESC LIMIT 5;",0 In what Venue was Surrey the Opposition in the 2nd Wicket?,"CREATE TABLE table_name_45 (venue VARCHAR, opposition VARCHAR, wicket VARCHAR);","SELECT venue FROM table_name_45 WHERE opposition = ""surrey"" AND wicket = ""2nd"";","SELECT venue FROM table_name_45 WHERE opposition = ""surrey"" AND wicket = ""2nd"";",1 What is the average donation amount by cause?,"CREATE TABLE Donations (DonationID INT, CauseID INT, Amount DECIMAL(10,2)); CREATE TABLE Causes (CauseID INT, CauseName TEXT); ","SELECT C.CauseName, AVG(D.Amount) FROM Donations D JOIN Causes C ON D.CauseID = C.CauseID GROUP BY C.CauseName;","SELECT c.CauseName, AVG(d.Amount) as AvgDonation FROM Donations d JOIN Causes c ON d.CauseID = c.CauseID GROUP BY c.CauseName;",0 What is the average number of seasons for Terri Drake who lost less than 9?,"CREATE TABLE table_name_65 (seasons INTEGER, name VARCHAR, lost VARCHAR);","SELECT AVG(seasons) FROM table_name_65 WHERE name = ""terri drake"" AND lost < 9;","SELECT AVG(seasons) FROM table_name_65 WHERE name = ""territ drake"" AND lost 9;",0 How many open data initiatives were launched by the government of Canada in 2021?,"CREATE TABLE open_data_initiatives (initiative_id INT, initiative_date DATE, initiative_country VARCHAR(50)); ",SELECT COUNT(*) FROM open_data_initiatives WHERE initiative_country = 'Canada' AND initiative_date BETWEEN '2021-01-01' AND '2021-12-31';,SELECT COUNT(*) FROM open_data_initiatives WHERE initiative_country = 'Canada' AND initiative_date BETWEEN '2021-01-01' AND '2021-12-31';,1 Find the number of concerts performed by artists in the same city.,"CREATE TABLE artists (artist_id INT, artist_name VARCHAR(50)); CREATE TABLE concerts (concert_id INT, artist_id INT, city VARCHAR(50)); ","SELECT a1.artist_name AS artist1, a2.artist_name AS artist2, COUNT(*) AS num_concerts FROM artists a1 JOIN concerts c1 ON a1.artist_id = c1.artist_id JOIN concerts c2 ON c1.city = c2.city AND c1.concert_id <> c2.concert_id JOIN artists a2 ON a2.artist_id = c2.artist_id GROUP BY a1.artist_name, a2.artist_name HAVING num_concerts > 1;",SELECT COUNT(*) FROM concerts JOIN artists ON concerts.artist_id = artists.artist_id WHERE artists.city = 'New York';,0 How many employees of each nationality work in the 'Mining Operations' department?,"CREATE TABLE Employees (EmployeeID INT, Name VARCHAR(50), Department VARCHAR(50), Age INT, Nationality VARCHAR(50));","SELECT Department, Nationality, COUNT(*) FROM Employees WHERE Department = 'Mining Operations' GROUP BY Department, Nationality;","SELECT Nationality, COUNT(*) FROM Employees WHERE Department = 'Mining Operations' GROUP BY Nationality;",0 What is the station number of the station at Dogsthorpe?,"CREATE TABLE table_name_40 (station_number VARCHAR, location VARCHAR);","SELECT station_number FROM table_name_40 WHERE location = ""dogsthorpe"";","SELECT station_number FROM table_name_40 WHERE location = ""dogsthorpe"";",1 Which Region has a Catalog of kem 072?,"CREATE TABLE table_name_98 (region VARCHAR, catalog VARCHAR);","SELECT region FROM table_name_98 WHERE catalog = ""kem 072"";","SELECT region FROM table_name_98 WHERE catalog = ""kem 072"";",1 "What is the total revenue for each cuisine type, including the vegan cuisine?","CREATE TABLE restaurants (id INT, name TEXT, cuisine TEXT, revenue INT); ","SELECT cuisine, SUM(revenue) FROM restaurants GROUP BY cuisine;","SELECT cuisine, SUM(revenue) FROM restaurants WHERE cuisine LIKE '%vegan%' GROUP BY cuisine;",0 Who had the save in the game in which Duke (3-2) took the loss?,"CREATE TABLE table_28001186_8 (save VARCHAR, loss VARCHAR);","SELECT save FROM table_28001186_8 WHERE loss = ""Duke (3-2)"";","SELECT save FROM table_28001186_8 WHERE loss = ""Duke (3-2)"";",1 What is the mean Year when the IWCR number was 5 and the Year withdrawn was bigger than 1926?,"CREATE TABLE table_name_85 (year_made INTEGER, iwcr_no VARCHAR, year_withdrawn VARCHAR);","SELECT AVG(year_made) FROM table_name_85 WHERE iwcr_no = ""5"" AND year_withdrawn > 1926;",SELECT AVG(year_made) FROM table_name_85 WHERE iwcr_no = 5 AND year_withdrawn > 1926;,0 Name the work for years before 2007 that won blockbuster entertainment awards,"CREATE TABLE table_name_47 (work VARCHAR, year VARCHAR, award VARCHAR);","SELECT work FROM table_name_47 WHERE year < 2007 AND award = ""blockbuster entertainment awards"";","SELECT work FROM table_name_47 WHERE year 2007 AND award = ""blockbuster entertainment awards"";",0 Show the party with drivers from Hartford and drivers older than 40.,"CREATE TABLE driver (party VARCHAR, home_city VARCHAR, age VARCHAR);",SELECT party FROM driver WHERE home_city = 'Hartford' AND age > 40;,"SELECT party FROM driver WHERE home_city = ""Hartford"" AND age > 40;",0 "Who was the Away captain that played on 12,13,14 Jun 1902 which resulted in a draw?","CREATE TABLE table_name_83 (away_captain VARCHAR, result VARCHAR, date VARCHAR);","SELECT away_captain FROM table_name_83 WHERE result = ""draw"" AND date = ""12,13,14 jun 1902"";","SELECT away_captain FROM table_name_83 WHERE result = ""draw"" AND date = ""12,13,14 jun 1902"";",1 What is the percentage of total concert ticket sales revenue in 2021 for the top 10 most popular artists?,"CREATE TABLE ConcertTicketSales (id INT, year INT, artist_id INT, revenue FLOAT); CREATE TABLE ArtistPopularity (id INT, artist_id INT, popularity FLOAT);","SELECT SUM(cts.revenue) / (SELECT SUM(revenue) FROM ConcertTicketSales WHERE year = 2021) FROM ConcertTicketSales cts JOIN (SELECT artist_id, popularity FROM ArtistPopularity ORDER BY popularity DESC LIMIT 10) a ON cts.artist_id = a.artist_id WHERE cts.year = 2021;",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM ConcertTicketSales WHERE year = 2021)) * 100.0 / (SELECT COUNT(*) FROM ArtistPopularity WHERE year = 2021) AS percentage FROM ConcertTicketSales WHERE year = 2021 GROUP BY artist_id ORDER BY popularity DESC LIMIT 10;,0 How many policies were issued for customers living in 'California'?,"CREATE TABLE policies (policy_id INT, policy_holder_name VARCHAR(50), policy_state VARCHAR(2)); ",SELECT COUNT(*) FROM policies WHERE policy_state = 'CA';,SELECT COUNT(*) FROM policies WHERE policy_state = 'California';,0 What is the total number of environmental incidents reported by each site?,"CREATE TABLE Sites (Site VARCHAR(50), IncidentCount INT); CREATE TABLE Incidents (IncidentID INT, Site VARCHAR(50), IncidentDate DATE); ","SELECT Site, SUM(IncidentCount) FROM Sites INNER JOIN Incidents ON Sites.Site = Incidents.Site GROUP BY Site;","SELECT Sites.Site, SUM(Incidents.IncidentCount) FROM Sites INNER JOIN Incidents ON Sites.Site = Incidents.Site GROUP BY Sites.Site;",0 How many employees have completed workforce development training in the renewable energy sector in India?,"CREATE TABLE employees (employee_id INT, employee_name VARCHAR(255), sector VARCHAR(255), country VARCHAR(255)); CREATE TABLE trainings (training_id INT, training_name VARCHAR(255), sector VARCHAR(255)); ",SELECT COUNT(DISTINCT e.employee_id) as num_employees FROM employees e JOIN trainings t ON e.sector = t.sector WHERE e.country = 'India' AND t.training_name = 'Solar Energy Training';,SELECT COUNT(*) FROM employees e JOIN trainings t ON e.employee_id = t.training_id WHERE e.sector = 'Renewable Energy' AND e.country = 'India';,0 "Game Site of hoosier dome, and a Result of l 7–31 involved what attendance?","CREATE TABLE table_name_29 (attendance VARCHAR, game_site VARCHAR, result VARCHAR);","SELECT attendance FROM table_name_29 WHERE game_site = ""hoosier dome"" AND result = ""l 7–31"";","SELECT attendance FROM table_name_29 WHERE game_site = ""housier dome"" AND result = ""l 7–31"";",0 How many customers are there in each network type?,"CREATE TABLE subscribers (id INT, name VARCHAR(50), network VARCHAR(20)); ","SELECT network, COUNT(*) FROM subscribers GROUP BY network;","SELECT network, COUNT(*) FROM subscribers GROUP BY network;",1 What was the location of the fight when Gassaway fought kevin knabjian?,"CREATE TABLE table_name_66 (location VARCHAR, opponent VARCHAR);","SELECT location FROM table_name_66 WHERE opponent = ""kevin knabjian"";","SELECT location FROM table_name_66 WHERE opponent = ""kevin knabjian"";",1 "Which player is from Tampa, Florida?","CREATE TABLE table_name_68 (player VARCHAR, hometown VARCHAR);","SELECT player FROM table_name_68 WHERE hometown = ""tampa, florida"";","SELECT player FROM table_name_68 WHERE hometown = ""tampa, florida"";",1 What is the total CO2 emissions of each material used in production?,"CREATE TABLE ProductionMaterials (id INT, name TEXT, co2_emissions INT); ","SELECT name, SUM(co2_emissions) FROM ProductionMaterials GROUP BY name;","SELECT name, SUM(co2_emissions) FROM ProductionMaterials GROUP BY name;",1 How many different positions did Sherbrooke Faucons (qmjhl) provide in the draft?,"CREATE TABLE table_1013129_2 (position VARCHAR, college_junior_club_team VARCHAR);","SELECT COUNT(position) FROM table_1013129_2 WHERE college_junior_club_team = ""Sherbrooke Faucons (QMJHL)"";","SELECT COUNT(position) FROM table_1013129_2 WHERE college_junior_club_team = ""Sherbrooke Faucons (QMJHL)"";",1 Who was the incumbent that was first elected in 1892 and retired to run for the senate democratic hold?,"CREATE TABLE table_name_96 (incumbent VARCHAR, first_elected VARCHAR, result VARCHAR);","SELECT incumbent FROM table_name_96 WHERE first_elected = ""1892"" AND result = ""retired to run for the senate democratic hold"";","SELECT incumbent FROM table_name_96 WHERE first_elected = ""1892"" AND result = ""retired to run for the senate democratic hold"";",1 What is the Ethernet port count of the whr-hp-g300n model?,"CREATE TABLE table_name_72 (ethernet_port_count VARCHAR, model VARCHAR);","SELECT ethernet_port_count FROM table_name_72 WHERE model = ""whr-hp-g300n"";","SELECT Ethernet_port_count FROM table_name_72 WHERE model = ""whr-hp-g300n"";",0 Delete all artworks from the artist 'Francisco Goya'?,"CREATE TABLE Artists (ArtistID int, Name text, Nationality text); CREATE TABLE Artworks (ArtworkID int, Title text, ArtistID int); ",DELETE FROM Artworks WHERE ArtistID = (SELECT ArtistID FROM Artists WHERE Name = 'Francisco Goya');,DELETE FROM Artworks WHERE ArtistID = (SELECT ArtistID FROM Artists WHERE Name = 'Francisco Goya');,1 What is the general classification with riccardo riccò as the young rider classification?,"CREATE TABLE table_name_37 (general_classification VARCHAR, young_rider_classification VARCHAR);","SELECT general_classification FROM table_name_37 WHERE young_rider_classification = ""riccardo riccò"";","SELECT general_classification FROM table_name_37 WHERE young_rider_classification = ""riccardo ricc"";",0 What is the total production rate for each location in the last month?,"CREATE TABLE well_production (well_id INT, measurement_date DATE, production_rate FLOAT, location TEXT); ","SELECT location, SUM(production_rate) AS Total_Production_Rate FROM well_production WHERE measurement_date >= DATEADD(month, -1, GETDATE()) GROUP BY location","SELECT location, SUM(production_rate) FROM well_production WHERE measurement_date >= DATEADD(month, -1, GETDATE()) GROUP BY location;",0 How many startups were founded in 2020 by Latinx entrepreneurs?,"CREATE TABLE startups(id INT, name TEXT, founded_year INT, founder_ethnicity TEXT, industry TEXT); ",SELECT COUNT(*) FROM startups WHERE founded_year = 2020 AND founder_ethnicity = 'Latinx';,SELECT COUNT(*) FROM startups WHERE founded_year = 2020 AND founder_ethnicity = 'Latinx';,1 What are the average byes of Bonnie Doon having more than 16 wins?,"CREATE TABLE table_name_54 (byes INTEGER, benalla_dfl VARCHAR, wins VARCHAR);","SELECT AVG(byes) FROM table_name_54 WHERE benalla_dfl = ""bonnie doon"" AND wins > 16;","SELECT AVG(byes) FROM table_name_54 WHERE benalla_dfl = ""bonnie doon"" AND wins > 16;",1 Delete records from the 'communication_campaigns' table where 'start_date' is earlier than 2010-01-01,"CREATE TABLE communication_campaigns (id INT, title VARCHAR(255), start_date DATE, end_date DATE);",DELETE FROM communication_campaigns WHERE start_date < '2010-01-01';,DELETE FROM communication_campaigns WHERE start_date '2010-01-01';,0 "What is Pos., when Height is ""m (ft 10in)"", and when Date of Birth is ""1983-05-29""?","CREATE TABLE table_name_45 (pos VARCHAR, height VARCHAR, date_of_birth VARCHAR);","SELECT pos FROM table_name_45 WHERE height = ""m (ft 10in)"" AND date_of_birth = ""1983-05-29"";","SELECT pos FROM table_name_45 WHERE height = ""m (ft 10in)"" AND date_of_birth = ""1983-05-29"";",1 Where is the home on march 12?,"CREATE TABLE table_name_34 (home VARCHAR, date VARCHAR);","SELECT home FROM table_name_34 WHERE date = ""march 12"";","SELECT home FROM table_name_34 WHERE date = ""march 12"";",1 What is the average incident frequency for each vessel type?,"CREATE TABLE vessel_incident (id INT, vessel_id INT, incident_date DATE); CREATE TABLE vessel_details (id INT, vessel_id INT, age INT, type_id INT);","SELECT vt.name, COUNT(vi.id) / COUNT(DISTINCT vd.id) as avg_incident_frequency FROM vessel_incident vi JOIN vessel v ON vi.vessel_id = v.id JOIN vessel_details vd ON v.id = vd.vessel_id JOIN vessel_type vt ON vd.type_id = vt.id GROUP BY vt.name;","SELECT v.type_id, AVG(v.incident_frequency) as avg_incident_frequency FROM vessel_incident v INNER JOIN vessel_details vd ON v.vessel_id = vd.vessel_id GROUP BY v.type_id;",0 What was the CB CW for the year of 1982?,"CREATE TABLE table_name_89 (cb_cw VARCHAR, year VARCHAR);",SELECT cb_cw FROM table_name_89 WHERE year = 1982;,SELECT cb_cw FROM table_name_89 WHERE year = 1982;,1 What is the total cost of medical supplies for each rural health clinic in 2022?,"CREATE TABLE clinics (clinic_id INT, clinic_name VARCHAR(50)); CREATE TABLE supply_costs (clinic_id INT, supply_id INT, cost FLOAT);","SELECT clinics.clinic_name, SUM(supply_costs.cost) as total_cost FROM clinics INNER JOIN supply_costs ON clinics.clinic_id = supply_costs.clinic_id WHERE YEAR(supply_costs.date) = 2022 GROUP BY clinics.clinic_name;","SELECT c.clinic_name, SUM(sc.cost) as total_cost FROM clinics c JOIN supply_costs sc ON c.clinic_id = sc.clinic_id WHERE YEAR(sc.supply_date) = 2022 GROUP BY c.clinic_name;",0 What is the total revenue generated by sustainable fashion products?,"CREATE TABLE products (product_id INTEGER, name TEXT, category TEXT, sustainable BOOLEAN, price FLOAT); ",SELECT SUM(price) FROM products WHERE sustainable = TRUE;,SELECT SUM(price) FROM products WHERE sustainable = true;,0 What is the Original title for an Episode Actor role which was Directed by Géza Bereményi?,"CREATE TABLE table_name_59 (original_title VARCHAR, role VARCHAR, directed_by VARCHAR);","SELECT original_title FROM table_name_59 WHERE role = ""episode actor"" AND directed_by = ""géza bereményi"";","SELECT original_title FROM table_name_59 WHERE role = ""episode actor"" AND directed_by = ""géza bereményi"";",1 Delete all records from the 'machinery' table where the 'manufacture_date' is earlier than '2000-01-01',"CREATE TABLE machinery (id INT PRIMARY KEY, name VARCHAR(50), type VARCHAR(50), manufacture_date DATE); ",DELETE FROM machinery WHERE manufacture_date < '2000-01-01';,DELETE FROM machinery WHERE manufacture_date '2000-01-01';,0 "Delete all products that are made from materials other than recycled polyester, recycled cotton, or bamboo.","CREATE TABLE PRODUCT ( id INT PRIMARY KEY, name TEXT, material TEXT, quantity INT, price INT, country TEXT, certifications TEXT, is_recycled BOOLEAN ); ","DELETE FROM PRODUCT WHERE material NOT IN ('Recycled Polyester', 'Recycled Cotton', 'Bamboo');",DELETE FROM PRODUCT WHERE material!= 'Recycled Polyester' OR material!= 'Recycled Cotton' OR material!= 'Bamboo';,0 What is the highest overall of the player from Georgia?,"CREATE TABLE table_name_54 (overall INTEGER, college VARCHAR);","SELECT MAX(overall) FROM table_name_54 WHERE college = ""georgia"";","SELECT MAX(overall) FROM table_name_54 WHERE college = ""georgia"";",1 What is the catalog number of Alfa records?,"CREATE TABLE table_name_74 (catalog VARCHAR, label VARCHAR);","SELECT catalog FROM table_name_74 WHERE label = ""alfa records"";","SELECT catalog FROM table_name_74 WHERE label = ""alfa records"";",1 What are the total sales and average price for each genre of digital albums?,"CREATE TABLE genres (genre_id INT, genre VARCHAR(50)); CREATE TABLE albums (album_id INT, genre_id INT, title VARCHAR(100), price DECIMAL(5,2), sales INT);","SELECT genre, SUM(sales) AS total_sales, AVG(price) AS avg_price FROM albums a JOIN genres g ON a.genre_id = g.genre_id GROUP BY genre;","SELECT g.genre, SUM(a.sales) as total_sales, AVG(a.price) as avg_price FROM genres g JOIN albums a ON g.genre_id = a.genre_id GROUP BY g.genre;",0 Which driver has 7 points for team Australia?,"CREATE TABLE table_name_28 (driver VARCHAR, points VARCHAR, team VARCHAR);","SELECT driver FROM table_name_28 WHERE points = 7 AND team = ""team australia"";","SELECT driver FROM table_name_28 WHERE points = 7 AND team = ""australia"";",0 Which Start has 8 Tries and 0 Convs?,"CREATE TABLE table_name_58 (start VARCHAR, tries VARCHAR, conv VARCHAR);","SELECT start FROM table_name_58 WHERE tries = ""8"" AND conv = ""0"";",SELECT start FROM table_name_58 WHERE tries = 8 AND conv = 0;,0 what is the notes for the athlete with the time of 7:38.87?,"CREATE TABLE table_name_86 (notes VARCHAR, time VARCHAR);","SELECT notes FROM table_name_86 WHERE time = ""7:38.87"";","SELECT notes FROM table_name_86 WHERE time = ""7:38.87"";",1 What was the date for Ron Paul as republican and a sample sized less than 472?,"CREATE TABLE table_name_20 (date VARCHAR, sample_size VARCHAR, republican VARCHAR);","SELECT date FROM table_name_20 WHERE sample_size < 472 AND republican = ""ron paul"";","SELECT date FROM table_name_20 WHERE sample_size 472 AND republican = ""ron paul"";",0 In what year did the United States win To par greater than 14,"CREATE TABLE table_name_7 (year_s__won VARCHAR, country VARCHAR, to_par VARCHAR);","SELECT year_s__won FROM table_name_7 WHERE country = ""united states"" AND to_par > 14;","SELECT year_s__won FROM table_name_7 WHERE country = ""united states"" AND to_par > 14;",1 Tell me the Europe for z.h.p. unlosing ranger vs darkdeath evilman,"CREATE TABLE table_name_79 (europe VARCHAR, title VARCHAR);","SELECT europe FROM table_name_79 WHERE title = ""z.h.p. unlosing ranger vs darkdeath evilman"";","SELECT europe FROM table_name_79 WHERE title = ""z.h.p. unlosing ranger vs darkdeath evilman"";",1 "What is the number of financial wellbeing programs offered in each region, for regions with more than 10 programs?","CREATE TABLE programs (id INT, name VARCHAR(50), region VARCHAR(20), category VARCHAR(20)); CREATE TABLE regions (id INT, name VARCHAR(20), description VARCHAR(50)); ","SELECT regions.name, COUNT(programs.id) FROM programs INNER JOIN regions ON programs.region = regions.name GROUP BY regions.name HAVING COUNT(programs.id) > 10;","SELECT r.name, COUNT(p.id) FROM programs p INNER JOIN regions r ON p.region = r.name WHERE p.category = 'Financial Wellbeing' GROUP BY r.name HAVING COUNT(p.id) > 10;",0 Increase the attendance by 10% for events with the 'Family' category.,"CREATE TABLE Events (event_id INT PRIMARY KEY, event_name TEXT, category TEXT, attendees INT);",UPDATE Events SET attendees = attendees * 1.1 WHERE category = 'Family';,UPDATE Events SET attendees = attendees * 1.10 WHERE category = 'Family';,0 How many hotels were added in 'California' each month in 2021?,"CREATE TABLE hotels_history (hotel_id INT, action TEXT, city TEXT, date DATE);","SELECT DATE_FORMAT(date, '%Y-%m') as month, COUNT(*) FROM hotels_history WHERE action = 'add' AND city = 'California' AND date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY month;","SELECT EXTRACT(MONTH FROM date) AS month, COUNT(*) FROM hotels_history WHERE city = 'California' AND EXTRACT(YEAR FROM date) = 2021 GROUP BY month;",0 "Update the ""guests"" table, setting the name to ""Jo Smith"" for all records with the name ""John Smith""","CREATE TABLE guests (id INT, name VARCHAR(50));",WITH cte AS (UPDATE guests SET name = 'Jo Smith' WHERE name = 'John Smith') SELECT * FROM cte;,UPDATE guests SET name = 'Jo Smith' WHERE name = 'John Smith';,0 List all artists and their nationalities from the 'artists' table.,"CREATE TABLE artists (first_name VARCHAR(255), last_name VARCHAR(255), nationality VARCHAR(255)); ","SELECT first_name, last_name, nationality FROM artists;","SELECT first_name, last_name, nationality FROM artists;",1 Calculate the percentage of uninsured individuals in each county in Texas,"CREATE TABLE healthcare_access (id INT, county TEXT, uninsured_count INT, total_population INT);","SELECT county, (uninsured_count * 100.0 / total_population) AS percentage FROM healthcare_access WHERE state = 'Texas';","SELECT county, (uninsured_count / total_population) * 100.0 / total_population FROM healthcare_access WHERE county = 'Texas' GROUP BY county;",0 What is the average amount of climate finance provided by each country for renewable energy projects in 2020?,"CREATE TABLE renewable_energy_projects (country VARCHAR(50), finance_amount NUMERIC(10, 2), year INT); ","SELECT country, AVG(finance_amount) FROM renewable_energy_projects WHERE year = 2020 GROUP BY country;","SELECT country, AVG(finance_amount) FROM renewable_energy_projects WHERE year = 2020 GROUP BY country;",1 What is the average travel advisory level for Asian countries with eco-friendly accommodations?,"CREATE TABLE countries (country_code CHAR(3), country_name VARCHAR(100), continent VARCHAR(50));CREATE TABLE hotels (hotel_id INT, hotel_name VARCHAR(100), is_eco_friendly BOOLEAN, country_code CHAR(3));CREATE TABLE travel_advisories (advisory_id INT, country_code CHAR(3), advisory_level INT, advisory_date DATE);",SELECT AVG(ta.advisory_level) FROM countries c JOIN hotels h ON c.country_code = h.country_code JOIN travel_advisories ta ON c.country_code = ta.country_code WHERE h.is_eco_friendly = TRUE AND c.continent = 'Asia';,SELECT AVG(travel_advisories.advisory_level) FROM travel_advisories INNER JOIN countries ON travel_advisories.country_code = countries.country_code WHERE countries.continent = 'Asia' AND hotels.is_eco_friendly = true;,0 How many mobile and broadband subscribers are there in each age group?,"CREATE TABLE subscriber_demographics (subscriber_id INT, subscriber_type VARCHAR(10), age INT); ","SELECT subscriber_type, FLOOR(age/10)*10 AS age_group, COUNT(*) AS subscriber_count FROM subscriber_demographics GROUP BY subscriber_type, age_group;","SELECT age, subscriber_type, COUNT(*) FROM subscriber_demographics GROUP BY age, subscriber_type;",0 What years did Birger Ruud win the FIS Nordic World Ski Championships?,"CREATE TABLE table_174491_2 (fis_nordic_world_ski_championships VARCHAR, winner VARCHAR);","SELECT fis_nordic_world_ski_championships FROM table_174491_2 WHERE winner = ""Birger Ruud"";","SELECT fis_nordic_world_ski_championships FROM table_174491_2 WHERE winner = ""Birger Ruud"";",1 "What is the sum of League Goals, when Position is ""DF"", when League Cup Apps is ""0"", when Total Apps is ""7"", and when FLT Goals is less than 0?","CREATE TABLE table_name_95 (league_goals INTEGER, flt_goals VARCHAR, total_apps VARCHAR, position VARCHAR, league_cup_apps VARCHAR);","SELECT SUM(league_goals) FROM table_name_95 WHERE position = ""df"" AND league_cup_apps = ""0"" AND total_apps = ""7"" AND flt_goals < 0;","SELECT SUM(league_goals) FROM table_name_95 WHERE position = ""df"" AND league_cup_apps = 0 AND total_apps = 7 AND flt_goals 0;",0 Which menu items have the lowest markup percentages?,"CREATE TABLE MenuItems (item TEXT, category TEXT, price INT, cost INT); ","SELECT item, category, ROUND(100.0 * (price - cost) / cost, 2) as markup_percentage FROM MenuItems ORDER BY markup_percentage ASC LIMIT 3;","SELECT item, MIN(price * cost) as markup_percentage FROM MenuItems GROUP BY item;",0 What are the average diversity scores for suppliers in the manufacturing industry?,"CREATE TABLE suppliers (supplier_id INT, name TEXT, industry TEXT, diversity_score FLOAT);",SELECT AVG(diversity_score) as avg_diversity_score FROM suppliers WHERE industry = 'manufacturing';,SELECT AVG(diversity_score) FROM suppliers WHERE industry = 'Manufacturing';,0 Who are the founders of ethical AI organizations in North America?,"CREATE TABLE ethical_ai (id INT, organization_name TEXT, founder TEXT, region TEXT); ","SELECT organization_name, founder FROM ethical_ai WHERE region = 'North America';",SELECT founder FROM ethical_ai WHERE region = 'North America';,0 What's the total number of members in the 'government' and 'media' unions?,"CREATE TABLE government_union (id INT, name VARCHAR, dob DATE); CREATE TABLE media_union (id INT, name VARCHAR, dob DATE); ",SELECT COUNT(*) FROM ( (SELECT * FROM government_union) UNION (SELECT * FROM media_union) ) AS all_unions;,"SELECT g.name, COUNT(m.id) FROM government_union g JOIN media_union m ON g.id = m.id GROUP BY g.name;",0 What is the average value of defense contracts awarded to companies in Germany in H2 2020?,"CREATE TABLE Defense_Contracts (contract_id INT, company_name TEXT, country TEXT, award_amount FLOAT, half INT, year INT); ",SELECT AVG(award_amount) FROM Defense_Contracts WHERE country = 'Germany' AND half = 2 AND year = 2020;,SELECT AVG(award_amount) FROM Defense_Contracts WHERE country = 'Germany' AND half = 2 AND year = 2020;,1 Which countries in the Africa region have no recorded mineral extractions?,"CREATE TABLE Countries (name TEXT, region TEXT); CREATE TABLE Mineral_Extractions (country TEXT, mineral TEXT, quantity INTEGER); ",SELECT c.name FROM Countries c LEFT JOIN Mineral_Extractions me ON c.name = me.country WHERE me.country IS NULL AND c.region = 'Africa';,SELECT Countries.name FROM Countries INNER JOIN Mineral_Extractions ON Countries.region = Mineral_Extractions.country WHERE Countries.region = 'Africa' AND Mineral_Extractions.mineral IS NULL;,0 Update the total donation amount for donor 'Pedro Garcia' to $4500.,"CREATE TABLE donors (donor_id INT, donor_name TEXT, country TEXT, total_donation_amount FLOAT); ",WITH updated_pedro_garcia AS (UPDATE donors SET total_donation_amount = 4500.00 WHERE donor_name = 'Pedro Garcia' AND country = 'Brazil' RETURNING *) SELECT * FROM updated_pedro_garcia;,UPDATE donors SET total_donation_amount = 4500 WHERE donor_name = 'Pedro Garcia';,0 What is the average age of patients who had positive outcomes after CBT treatment?,"CREATE TABLE patients (patient_id INT, age INT, treatment_outcome VARCHAR(10)); CREATE TABLE treatments (treatment_id INT, treatment_name VARCHAR(10), patient_id INT); ",SELECT AVG(patients.age) FROM patients JOIN treatments ON patients.patient_id = treatments.patient_id WHERE treatments.treatment_name = 'CBT' AND patients.treatment_outcome = 'positive';,SELECT AVG(patients.age) FROM patients INNER JOIN treatments ON patients.patient_id = treatments.patient_id WHERE treatments.treatment_outcome = 'positive';,0 "What is Score, when Total is ""28:42""?","CREATE TABLE table_name_32 (score VARCHAR, total VARCHAR);","SELECT score FROM table_name_32 WHERE total = ""28:42"";","SELECT score FROM table_name_32 WHERE total = ""28:42"";",1 What school has the Lancers as their mascot?,"CREATE TABLE table_name_86 (location VARCHAR, mascot VARCHAR);","SELECT location FROM table_name_86 WHERE mascot = ""lancers"";","SELECT location FROM table_name_86 WHERE mascot = ""lancers"";",1 What is the maximum production quantity (in metric tons) of Promethium in 2017?,"CREATE TABLE production_data (year INT, element TEXT, production_quantity FLOAT); ",SELECT MAX(production_quantity) FROM production_data WHERE element = 'Promethium' AND year = 2017;,SELECT MAX(production_quantity) FROM production_data WHERE element = 'Promethium' AND year = 2017;,1 What is the total volume of timber production in each region for the last 5 years in the timber_production and regions tables?,"CREATE TABLE timber_production (production_id INT, region_id INT, year INT, volume FLOAT); CREATE TABLE regions (region_id INT, region_name VARCHAR(50));","SELECT r.region_name, SUM(tp.volume) FROM timber_production tp JOIN regions r ON tp.region_id = r.region_id WHERE tp.year BETWEEN YEAR(CURRENT_DATE) - 5 AND YEAR(CURRENT_DATE) GROUP BY r.region_name;","SELECT r.region_name, SUM(tp.volume) as total_volume FROM timber_production tp JOIN regions r ON tp.region_id = r.region_id WHERE tp.year BETWEEN 2019 AND 2021 GROUP BY r.region_name;",0 "How many investigative journalists in the ""investigative_journalists"" table are from the United States?","CREATE TABLE investigative_journalists (id INT, name VARCHAR(50), country VARCHAR(50), years_of_experience INT); ",SELECT COUNT(*) FROM investigative_journalists WHERE country = 'USA';,SELECT COUNT(*) FROM investigative_journalists WHERE country = 'United States';,0 What is the number of regulatory violations for each blockchain network?,"CREATE TABLE if not exists regulatory_violations (violation_id INT, network VARCHAR(255), violation_details VARCHAR(255)); ","SELECT network, COUNT(*) as violation_count FROM regulatory_violations GROUP BY network;","SELECT network, COUNT(*) FROM regulatory_violations GROUP BY network;",0 What was the minimum population in 2011?,CREATE TABLE table_2328113_1 (population__2011_ INTEGER);,SELECT MIN(population__2011_) FROM table_2328113_1;,SELECT MIN(population__2011_) FROM table_2328113_1;,1 Name the incumbent for new york 10,"CREATE TABLE table_2668352_11 (incumbent VARCHAR, district VARCHAR);","SELECT incumbent FROM table_2668352_11 WHERE district = ""New York 10"";","SELECT incumbent FROM table_2668352_11 WHERE district = ""New York 10"";",1 "What's the name of the structure at Egypt, Arkansas?","CREATE TABLE table_name_53 (name VARCHAR, town VARCHAR);","SELECT name FROM table_name_53 WHERE town = ""egypt, arkansas"";","SELECT name FROM table_name_53 WHERE town = ""egypt, arkansas"";",1 Who are the lead researchers for the neurological disorder related projects?,"CREATE SCHEMA if not exists genetic_research;CREATE TABLE if not exists genetic_research.projects(id INT, name TEXT, lead_researcher TEXT, disease_category TEXT);",SELECT lead_researcher FROM genetic_research.projects WHERE disease_category = 'Neurological Disorders';,SELECT lead_researcher FROM genetic_research.projects WHERE disease_category = 'Neurological Disorder';,0 What are the names and locations of factories with no workforce development programs?,"CREATE TABLE factories (factory_id INT, name TEXT, location TEXT); CREATE TABLE workforce_development (factory_id INT, program TEXT);","SELECT factories.name, factories.location FROM factories LEFT JOIN workforce_development ON factories.factory_id = workforce_development.factory_id WHERE workforce_development.factory_id IS NULL;","SELECT factories.name, factories.location FROM factories INNER JOIN workforce_development ON factories.factory_id = workforce_development.factory_id WHERE workforce_development.program IS NULL;",0 Calculate the total amount of waste generated for each waste type in 2021.,"CREATE TABLE waste_generation (waste_type TEXT, amount INTEGER, date DATE); ","SELECT waste_type, SUM(amount) FROM waste_generation WHERE date >= '2021-01-01' AND date <= '2021-12-31' GROUP BY waste_type;","SELECT waste_type, SUM(amount) FROM waste_generation WHERE date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY waste_type;",0 Which European countries have the highest carbon tax rates in 2021?,"CREATE TABLE CarbonTaxRates (Country TEXT, Year INT, Rate NUMBER); CREATE TABLE CarbonPrices (Country TEXT, Year INT, Price NUMBER); ","SELECT CarbonTaxRates.Country, CarbonTaxRates.Rate AS Carbon_Tax_Rate FROM CarbonTaxRates WHERE CarbonTaxRates.Country IN ('Sweden', 'Norway', 'Switzerland', 'Denmark') AND CarbonTaxRates.Year = 2021 ORDER BY CarbonTaxRates.Rate DESC;","SELECT ctr.Country, MAX(ctr.Rate) as MaxRate FROM CarbonTaxRates ctr JOIN CarbonPrices cp ON ctr.Country = cp.Country WHERE ctr.Year = 2021 GROUP BY ctr.Country;",0 What is the date of birth of Oliver Buell's child?,"CREATE TABLE table_name_32 (date_of_birth VARCHAR, child VARCHAR);","SELECT date_of_birth FROM table_name_32 WHERE child = ""oliver buell"";","SELECT date_of_birth FROM table_name_32 WHERE child = ""oliver buell"";",1 Which authority has a rocket launch called rehnuma-8?,"CREATE TABLE table_11869952_1 (institutional_authority VARCHAR, rocket_launch VARCHAR);","SELECT institutional_authority FROM table_11869952_1 WHERE rocket_launch = ""Rehnuma-8"";","SELECT institutional_authority FROM table_11869952_1 WHERE rocket_launch = ""Rehnuma-8"";",1 How many charging stations are there in 'California' and 'Texas' in the charging_stations table?,"CREATE TABLE charging_stations (id INT, state TEXT, station_type TEXT, total_stations INT); ","SELECT state, COUNT(*) as total_charging_stations FROM charging_stations WHERE state IN ('California', 'Texas') GROUP BY state;","SELECT COUNT(*) FROM charging_stations WHERE state IN ('California', 'Texas');",0 "what is the sum of drawn when points is less than 15, lost is 8 and position is more than 6?","CREATE TABLE table_name_81 (drawn INTEGER, position VARCHAR, points VARCHAR, lost VARCHAR);",SELECT SUM(drawn) FROM table_name_81 WHERE points < 15 AND lost = 8 AND position > 6;,SELECT SUM(drawn) FROM table_name_81 WHERE points 15 AND lost = 8 AND position > 6;,0 What is the molecular target listed under the compounded name of hemiasterlin (e7974),"CREATE TABLE table_12715053_1 (molecular_target VARCHAR, compound_name VARCHAR);","SELECT molecular_target FROM table_12715053_1 WHERE compound_name = ""Hemiasterlin (E7974)"";","SELECT molecular_target FROM table_12715053_1 WHERE compound_name = ""Hemiasterlin (E7974)"";",1 When is the completed date of the destroyer with a pennant number h59?,"CREATE TABLE table_name_50 (completed VARCHAR, pennant_number VARCHAR);","SELECT completed FROM table_name_50 WHERE pennant_number = ""h59"";","SELECT completed FROM table_name_50 WHERE pennant_number = ""h59"";",1 How many users are from France in the Workout table?,"CREATE TABLE Workout (user_id INT, workout_duration INT, country VARCHAR(50)); ",SELECT COUNT(*) FROM Workout WHERE country = 'France';,SELECT COUNT(*) FROM Workout WHERE country = 'France';,1 "What is the productivity of each mining site, calculated as the ratio of workers to expenditure?","CREATE TABLE mining_sites (site_id INT, site_name TEXT, location TEXT); CREATE TABLE workers (worker_id INT, site_id INT, num_workers INT); CREATE TABLE expenditure (expenditure_id INT, site_id INT, amount FLOAT); ","SELECT mining_sites.site_name, num_workers/amount AS productivity FROM mining_sites INNER JOIN (SELECT site_id, SUM(num_workers) AS num_workers, SUM(amount) AS amount FROM workers INNER JOIN expenditure ON workers.site_id = expenditure.site_id GROUP BY site_id) AS subquery ON mining_sites.site_id = subquery.site_id;","SELECT ms.site_name, w.num_workers, w.num_workers FROM mining_sites ms JOIN workers w ON ms.site_id = w.site_id JOIN expenditure e ON ms.site_id = e.site_id GROUP BY ms.site_name, w.num_workers;",0 What is the minimum length (in seconds) of any song released in the 1970s?,"CREATE TABLE songs (song_id INT, title VARCHAR(255), genre VARCHAR(50), release_year INT, length FLOAT); ",SELECT MIN(length) FROM songs WHERE release_year >= 1970 AND release_year <= 1979;,SELECT MIN(length) FROM songs WHERE release_year = 1970;,0 "What is the explainability score for each AI model, partitioned by model type, ordered by score in ascending order?","CREATE TABLE ai_models_explainability (model_id INT, model_type VARCHAR(50), explainability_score DECIMAL(5,2)); ","SELECT model_type, AVG(explainability_score) as avg_explainability_score FROM ai_models_explainability GROUP BY model_type ORDER BY avg_explainability_score ASC;","SELECT model_type, explainability_score FROM ai_models_explainability ORDER BY explainability_score ASC;",0 What is the average age of NHL players in the 2021-2022 season?,"CREATE TABLE nhl_players (player VARCHAR(50), age INT); ",SELECT AVG(age) AS avg_age FROM nhl_players;,SELECT AVG(age) FROM nhl_players WHERE YEAR(player) = 2021;,0 Which event was held in Beijing?,"CREATE TABLE table_name_44 (event VARCHAR, venue VARCHAR);","SELECT event FROM table_name_44 WHERE venue = ""beijing"";","SELECT event FROM table_name_44 WHERE venue = ""beijing"";",1 Determine the number of products with specific allergens in the product_allergens table.,"CREATE TABLE product_allergens (product_id INT, allergen VARCHAR(50)); ","SELECT product_id, COUNT(*) FROM product_allergens WHERE allergen IN ('Milk', 'Eggs', 'Peanuts') GROUP BY product_id;",SELECT COUNT(*) FROM product_allergens WHERE allergen IN (SELECT allergen FROM product_allergens);,0 What is the minimum price of a menu item that is both vegetarian and gluten-free?,"CREATE TABLE menus (menu_id INT, menu_name TEXT, type TEXT, price DECIMAL); Gluten-free', 9.99);",SELECT MIN(price) FROM menus WHERE type = 'Vegetarian' AND type = 'Gluten-free';,SELECT MIN(price) FROM menus WHERE type = 'Vegetarian' AND gluten-free';,0 Insert a new record for a completed project in the Projects table.,"CREATE TABLE Projects (ProjectID INT, ProjectName VARCHAR(50), StartDate DATE, EndDate DATE, EmployeeID INT, FOREIGN KEY (EmployeeID) REFERENCES Employees(EmployeeID));","INSERT INTO Projects (ProjectID, ProjectName, StartDate, EndDate, EmployeeID) VALUES (2, 'Eco-Friendly Renovation', '2021-10-01', '2022-03-31', 3);","INSERT INTO Projects (ProjectID, ProjectName, StartDate, EndDate, EmployeeID, FOREIGN KEY (EmployeeID)) VALUES (1, 'Completed Project', '2022-03-01', '2022-03-31'), (2, 'Completed Project', '2022-03-31'), (3, 'Completed Project', '2022-03-31');",0 "List all clients who have accounts with a balance greater than $20,000 and their account balance.","CREATE TABLE clients (id INT PRIMARY KEY, name VARCHAR(255), age INT, city VARCHAR(255), account_id INT, balance DECIMAL(10,2)); ","SELECT c.name, c.balance FROM clients c WHERE c.balance > 20000.00;","SELECT c.name, c.age, c.city, c.account_id, c.balance FROM clients c JOIN accounts a ON c.account_id = a.id WHERE c.balance > 20000;",0 "What was the home team's score at the game attended by more than 24,637?","CREATE TABLE table_name_81 (home_team VARCHAR, crowd INTEGER);",SELECT home_team AS score FROM table_name_81 WHERE crowd > 24 OFFSET 637;,SELECT home_team AS score FROM table_name_81 WHERE crowd > 24 OFFSET 637;,1 What is the total cost of all projects in the infrastructure database that started after 2020-01-01?,"CREATE TABLE Infrastructure_Projects (Project_ID INT, Project_Name VARCHAR(50), Project_Type VARCHAR(50), Cost FLOAT, Start_Date DATE); ",SELECT SUM(Cost) FROM Infrastructure_Projects WHERE Start_Date > '2020-01-01';,SELECT SUM(Cost) FROM Infrastructure_Projects WHERE Start_Date > '2020-01-01';,1 What is the earliest round drafted for a University of Southern California player?,"CREATE TABLE table_name_91 (round INTEGER, school VARCHAR);","SELECT MIN(round) FROM table_name_91 WHERE school = ""university of southern california"";","SELECT MIN(round) FROM table_name_91 WHERE school = ""university of southern california"";",1 What is the total population of cities in Europe with a population greater than 1 million?,"CREATE TABLE city_population (city VARCHAR(50), country VARCHAR(50), population INT); ","SELECT SUM(population) FROM city_population WHERE country IN ('France', 'United Kingdom', 'Germany', 'Spain', 'Italy', 'Romania', 'Austria', 'Poland') AND population > 1000000;",SELECT SUM(population) FROM city_population WHERE country = 'Europe' AND population > 10000000;,0 Update the contact information for the 'Code for Change' organization.,"CREATE TABLE organizations (id INT, name TEXT, contact_name TEXT, contact_email TEXT, contact_phone TEXT); ","UPDATE organizations SET contact_name = 'James Lee', contact_email = 'james.lee@codeforchange.org', contact_phone = '555-444-3333' WHERE name = 'Code for Change';",UPDATE organizations SET contact_name = 'Code for Change' WHERE name = 'Code for Change';,0 What is the total waste generated by non-recyclable packaging materials?,"CREATE TABLE inventory (ingredient_id INT, ingredient_name VARCHAR(50), packaging_type VARCHAR(50), quantity INT); CREATE TABLE packaging (packaging_id INT, packaging_type VARCHAR(50), is_recyclable BOOLEAN); ",SELECT SUM(quantity) FROM inventory INNER JOIN packaging ON inventory.packaging_type = packaging.packaging_type WHERE packaging.is_recyclable = false;,SELECT SUM(quantity) FROM inventory i JOIN packaging p ON i.packaging_id = p.packaging_id WHERE p.is_recyclable = true;,0 "Tell me the score for Venue of tanteen recreation ground, st. george's","CREATE TABLE table_name_43 (score VARCHAR, venue VARCHAR);","SELECT score FROM table_name_43 WHERE venue = ""tanteen recreation ground, st. george's"";","SELECT score FROM table_name_43 WHERE venue = ""tanteen recreation ground, st. george's"";",1 "What is the maximum number of working hours per employee in a week for chemical plants in the Mid-Atlantic region, and the corresponding employee and plant?","CREATE TABLE employees (id INT, plant TEXT, employee TEXT, hours_worked FLOAT, work_date DATE); ","SELECT MAX(hours_worked) AS max_hours, plant, employee FROM employees WHERE plant LIKE 'Mid-Atlantic%' GROUP BY plant, employee HAVING max_hours = (SELECT MAX(hours_worked) FROM employees WHERE plant LIKE 'Mid-Atlantic%');","SELECT plant, employee, MAX(hours_worked) as max_hours_per_employee FROM employees WHERE plant LIKE '%Mid-Atlantic%' GROUP BY plant, employee;",0 "What is the total loan amount disbursed per customer for socially responsible loans, partitioned by quarter?","CREATE TABLE socially_responsible_loans (customer_id INT, loan_amount DECIMAL(10, 2), disbursement_date DATE); ","SELECT customer_id, SUM(loan_amount) OVER (PARTITION BY customer_id, DATE_TRUNC('quarter', disbursement_date)) as total_loan_amount, disbursement_date FROM socially_responsible_loans;","SELECT customer_id, DATE_FORMAT(disbursement_date, '%Y-%m') as quarter, SUM(loan_amount) as total_loan_amount FROM socially_responsible_loans GROUP BY customer_id, quarter;",0 "Home Team of chicago bulls, and a Result of 81-83 (3-2) involved what game?","CREATE TABLE table_name_33 (game VARCHAR, home_team VARCHAR, result VARCHAR);","SELECT game FROM table_name_33 WHERE home_team = ""chicago bulls"" AND result = ""81-83 (3-2)"";","SELECT game FROM table_name_33 WHERE home_team = ""chicago bulls"" AND result = ""81-83 (3-2)"";",1 What is the minimum timeline for a sustainable construction project in Colorado?,"CREATE TABLE Sustainable_Projects_CO (project_id INT, project_name VARCHAR(50), state VARCHAR(2), timeline INT, is_sustainable BOOLEAN); ",SELECT MIN(timeline) FROM Sustainable_Projects_CO WHERE state = 'CO' AND is_sustainable = true;,SELECT MIN(timeline) FROM Sustainable_Projects_CO WHERE state = 'Colorado' AND is_sustainable = true;,0 What is the pinyin for the Chinese title 直感一笔?,"CREATE TABLE table_name_78 (pinyin VARCHAR, chinese_title VARCHAR);","SELECT pinyin FROM table_name_78 WHERE chinese_title = ""直感一笔"";","SELECT pinyin FROM table_name_78 WHERE chinese_title = """";",0 What is the average mental health score of students in 'Elementary' schools?,"CREATE TABLE Schools (id INT, name VARCHAR(20)); CREATE TABLE StudentMentalHealth (student_id INT, school_id INT, score INT); ",SELECT AVG(smh.score) FROM StudentMentalHealth smh JOIN Schools s ON smh.school_id = s.id WHERE s.name = 'Elementary';,SELECT AVG(smh.score) FROM StudentMentalHealth smh JOIN Schools s ON smh.school_id = s.id WHERE s.name = 'Elementary';,1 What is the average of the top-25 of those with less than 35 events in the Open Championship?,"CREATE TABLE table_name_32 (top_25 INTEGER, events VARCHAR, tournament VARCHAR);","SELECT AVG(top_25) FROM table_name_32 WHERE events < 35 AND tournament = ""the open championship"";","SELECT AVG(top_25) FROM table_name_32 WHERE events 35 AND tournament = ""open championship"";",0 What was the total cost of projects in the 'water_infrastructure' category?,"CREATE TABLE if not exists projects (id INT, name VARCHAR(100), category VARCHAR(50), total_cost FLOAT); ",SELECT SUM(total_cost) FROM projects WHERE category = 'water_infrastructure';,SELECT SUM(total_cost) FROM projects WHERE category = 'water_infrastructure';,1 What was the airdate of the episode with a UK viewership of 6.02 million?,"CREATE TABLE table_29063233_1 (original_air_date VARCHAR, uk_viewers__million_ VARCHAR);","SELECT original_air_date FROM table_29063233_1 WHERE uk_viewers__million_ = ""6.02"";","SELECT original_air_date FROM table_29063233_1 WHERE uk_viewers__million_ = ""6.22"";",0 What is the overall attendance in the places where the average attendance was 17148?,"CREATE TABLE table_2771237_1 (overall_attendance VARCHAR, average_attendance VARCHAR);",SELECT overall_attendance FROM table_2771237_1 WHERE average_attendance = 17148;,SELECT overall_attendance FROM table_2771237_1 WHERE average_attendance = 17148;,1 What is the total number of articles in the 'opinion' category by 'Jane Smith'?,"CREATE TABLE news (title VARCHAR(255), author VARCHAR(255), word_count INT, category VARCHAR(255)); ",SELECT COUNT(*) FROM news WHERE category = 'Opinion' AND author = 'Jane Smith';,SELECT SUM(word_count) FROM news WHERE author = 'Jane Smith' AND category = 'opinion';,0 "Which Constructor has a Grid smaller than 24, more than 77 laps, and a Driver of jean-pierre beltoise?","CREATE TABLE table_name_53 (constructor VARCHAR, driver VARCHAR, grid VARCHAR, laps VARCHAR);","SELECT constructor FROM table_name_53 WHERE grid < 24 AND laps > 77 AND driver = ""jean-pierre beltoise"";","SELECT constructor FROM table_name_53 WHERE grid 24 AND laps > 77 AND driver = ""jean-pierre beltoise"";",0 "During stage 21, who held the Intergiro classification?","CREATE TABLE table_name_22 (intergiro_classification VARCHAR, stage VARCHAR);","SELECT intergiro_classification FROM table_name_22 WHERE stage = ""21"";",SELECT intergiro_classification FROM table_name_22 WHERE stage = 21;,0 What is the fewest number of top-5s for events with more than 1 win?,"CREATE TABLE table_name_90 (top_5 INTEGER, wins INTEGER);",SELECT MIN(top_5) FROM table_name_90 WHERE wins > 1;,SELECT MIN(top_5) FROM table_name_90 WHERE wins > 1;,1 What is the lowest against value with less than 9 points and more than 6 lost?,"CREATE TABLE table_name_29 (against INTEGER, points VARCHAR, lost VARCHAR);",SELECT MIN(against) FROM table_name_29 WHERE points < 9 AND lost > 6;,SELECT MIN(against) FROM table_name_29 WHERE points 9 AND lost > 6;,0 Total microplastics concentration in Atlantic,"CREATE TABLE marine_pollutants (id INT, location VARCHAR(255), type VARCHAR(255), concentration FLOAT); ","SELECT location, SUM(concentration) FROM marine_pollutants WHERE type = 'Microplastics' GROUP BY location;",SELECT SUM(concentration) FROM marine_pollutants WHERE location = 'Atlantic' AND type = 'Microplastics';,0 On what date is the winning score –8 (70-71-67=208)?,"CREATE TABLE table_name_54 (date VARCHAR, winning_score VARCHAR);",SELECT date FROM table_name_54 WHERE winning_score = –8(70 - 71 - 67 = 208);,SELECT date FROM table_name_54 WHERE winning_score = –8 (70 - 71 - 67 = 208);,0 Create a view for top recycling regions,"CREATE TABLE waste_generation_metrics ( id INT PRIMARY KEY, region VARCHAR(255), total_waste_generated FLOAT, recycled_waste FLOAT, landfilled_waste FLOAT); CREATE VIEW top_recycling_regions AS SELECT * FROM waste_generation_metrics WHERE recycled_waste/(total_waste_generated-landfilled_waste) > 0.5;",CREATE VIEW top_recycling_regions AS SELECT * FROM waste_generation_metrics WHERE recycled_waste/(total_waste_generated-landfilled_waste) > 0.5;,CREATE VIEW top_recycling_regions AS SELECT * FROM waste_generation_metrics;,0 What is the average organic farm size in Australia?,"CREATE TABLE organic_farms (id INT, size INT, country VARCHAR(255)); ",SELECT AVG(size) FROM organic_farms WHERE country = 'Australia';,SELECT AVG(size) FROM organic_farms WHERE country = 'Australia';,1 What is the total number of articles by each author in the 'articles' table?,"CREATE TABLE articles (author VARCHAR(50), article_title VARCHAR(100), publication_date DATE); ","SELECT author, COUNT(*) as total_articles FROM articles GROUP BY author;","SELECT author, COUNT(*) FROM articles GROUP BY author;",0 What was the result of the Best Actor in a Musical category?,"CREATE TABLE table_name_81 (result VARCHAR, category VARCHAR);","SELECT result FROM table_name_81 WHERE category = ""best actor in a musical"";","SELECT result FROM table_name_81 WHERE category = ""best actor in a musical"";",1 "What is Permanent Account, when Updated In Past 30 Days is 10324?","CREATE TABLE table_name_96 (permanent_account VARCHAR, updated_in_past_30_days VARCHAR);","SELECT permanent_account FROM table_name_96 WHERE updated_in_past_30_days = ""10324"";","SELECT permanent_account FROM table_name_96 WHERE updated_in_past_30_days = ""10324"";",1 How many marine species have a population of less than 1000 in the Pacific Ocean?,"CREATE TABLE marine_life (id INT PRIMARY KEY, species VARCHAR(255), population INT, habitat VARCHAR(255));",SELECT COUNT(*) FROM marine_life WHERE population < 1000 AND habitat LIKE '%Pacific%';,SELECT COUNT(*) FROM marine_life WHERE population 1000 AND habitat = 'Pacific Ocean';,0 What character is portrayed by Joe Jonas?,"CREATE TABLE table_name_59 (character VARCHAR, portrayed_by VARCHAR);","SELECT character FROM table_name_59 WHERE portrayed_by = ""joe jonas"";","SELECT character FROM table_name_59 WHERE portrayed_by = ""joe jonas"";",1 What is the average CO2 emission reduction of green building projects in New York and Los Angeles?,"CREATE TABLE GreenBuildingProjects (id INT, city VARCHAR(50), co2_reduction FLOAT); ","SELECT city, AVG(co2_reduction) FROM GreenBuildingProjects WHERE city IN ('NYC', 'LA') GROUP BY city;","SELECT AVG(co2_reduction) FROM GreenBuildingProjects WHERE city IN ('New York', 'Los Angeles');",0 What was the score of the game on December 11?,"CREATE TABLE table_17360840_6 (score VARCHAR, date VARCHAR);","SELECT score FROM table_17360840_6 WHERE date = ""December 11"";","SELECT score FROM table_17360840_6 WHERE date = ""December 11"";",1 What is the market access strategy for the drug 'Curely' in South America?,"CREATE TABLE market_access_2 (drug_name TEXT, strategy TEXT, region TEXT); ",SELECT strategy FROM market_access_2 WHERE drug_name = 'Curely' AND region = 'South America';,SELECT strategy FROM market_access_2 WHERE drug_name = 'Curely' AND region = 'South America';,1 What is the total data usage for each region?,"CREATE TABLE subscribers (id INT, name TEXT, data_usage FLOAT, region TEXT); "," SELECT region, SUM(data_usage) FROM subscribers GROUP BY region; ","SELECT region, SUM(data_usage) FROM subscribers GROUP BY region;",0 What is the total budget for accessible technology projects in the US?,"CREATE TABLE accessible_technology_projects (id INT, project_name VARCHAR(50), location VARCHAR(50), budget INT); ",SELECT SUM(budget) FROM accessible_technology_projects WHERE location = 'USA';,SELECT SUM(budget) FROM accessible_technology_projects WHERE location = 'US';,0 Insert new chemical manufacturers from Japan and South Korea into the database.,"CREATE TABLE chemical_manufacturers (manufacturer_id INT, name VARCHAR(255), country VARCHAR(255)); ","INSERT INTO chemical_manufacturers (manufacturer_id, name, country) VALUES (4, 'ManufacturerD', 'Japan'), (5, 'ManufacturerE', 'South Korea');","INSERT INTO chemical_manufacturers (manufacturer_id, name, country) VALUES (1, 'Japan', 'South Korea');",0 What is the lowest attendance when the Atlanta Falcons were the opponent?,"CREATE TABLE table_name_69 (week INTEGER, opponent VARCHAR);","SELECT MIN(week) FROM table_name_69 WHERE opponent = ""atlanta falcons"";","SELECT MIN(week) FROM table_name_69 WHERE opponent = ""atlanta falcons"";",1 What is the maximum capacity of the Otkrytie Arena stadium?,"CREATE TABLE table_10601843_2 (capacity INTEGER, stadium VARCHAR);","SELECT MAX(capacity) FROM table_10601843_2 WHERE stadium = ""Otkrytie Arena"";","SELECT MAX(capacity) FROM table_10601843_2 WHERE stadium = ""Otkrytie Arena"";",1 What is the rank when the total is less than 1?,"CREATE TABLE table_name_24 (rank INTEGER, total INTEGER);",SELECT MIN(rank) FROM table_name_24 WHERE total < 1;,SELECT AVG(rank) FROM table_name_24 WHERE total 1;,0 List all the unique defense contract types from the defense_contracts view.,CREATE VIEW defense_contracts AS SELECT contract_type FROM military_contracts;,SELECT DISTINCT contract_type FROM defense_contracts;,SELECT DISTINCT contract_type FROM defense_contracts;,1 "What is the nickname of the Adrian, Michigan team?","CREATE TABLE table_27361255_1 (team_nickname VARCHAR, location VARCHAR);","SELECT team_nickname FROM table_27361255_1 WHERE location = ""Adrian, Michigan"";","SELECT team_nickname FROM table_27361255_1 WHERE location = ""Adrian, Michigan"";",1 What was the percentage for K. Themistokleous when I. Kasoulidis was 30.1%?,"CREATE TABLE table_name_65 (k_themistokleous VARCHAR, i_kasoulidis VARCHAR);","SELECT k_themistokleous FROM table_name_65 WHERE i_kasoulidis = ""30.1%"";","SELECT k_themistokleous FROM table_name_65 WHERE i_kasoulidis = ""30.1%"";",1 What is the difference between the total donations for 'Habitats for Tigers' and 'Habitats for Lions'?,"CREATE TABLE Donations (id INT, campaign VARCHAR(255), amount DECIMAL(10, 2));",SELECT (SELECT SUM(amount) FROM Donations WHERE campaign = 'Habitats for Tigers') - (SELECT SUM(amount) FROM Donations WHERE campaign = 'Habitats for Lions');,SELECT SUM(amount) - SUM(amount) FROM Donations WHERE campaign = 'Habitats for Tigers';,0 "Venue of melbourne , australia, and a Extra of 200 m has what results?","CREATE TABLE table_name_90 (result VARCHAR, venue VARCHAR, extra VARCHAR);","SELECT result FROM table_name_90 WHERE venue = ""melbourne , australia"" AND extra = ""200 m"";","SELECT result FROM table_name_90 WHERE venue = ""melbourne, australia"" AND extra = ""200 m"";",0 what is the average number lost when points is 14 and position is more than 1?,"CREATE TABLE table_name_64 (lost INTEGER, points VARCHAR, position VARCHAR);",SELECT AVG(lost) FROM table_name_64 WHERE points = 14 AND position > 1;,SELECT AVG(lost) FROM table_name_64 WHERE points = 14 AND position > 1;,1 what's the maximum purse( $ ) with score value of 204 (-9),"CREATE TABLE table_11621915_1 (purse__ INTEGER, score VARCHAR);","SELECT MAX(purse__) AS $__ FROM table_11621915_1 WHERE score = ""204 (-9)"";","SELECT MAX(purse__) FROM table_11621915_1 WHERE score = ""204 (-9)"";",0 What was the attendance when the score was 8–7?,"CREATE TABLE table_name_16 (attendance INTEGER, score VARCHAR);","SELECT SUM(attendance) FROM table_name_16 WHERE score = ""8–7"";","SELECT AVG(attendance) FROM table_name_16 WHERE score = ""8–7"";",0 What are the names and weights of all shipments that were sent from California to Texas?,"CREATE TABLE Shipments(id INT, source VARCHAR(50), destination VARCHAR(50), weight FLOAT); ","SELECT Shipments.source, Shipments.weight FROM Shipments WHERE Shipments.source = 'California' AND Shipments.destination = 'Texas';","SELECT source, destination, weight FROM Shipments WHERE source = 'California' AND destination = 'Texas';",0 What is the first day cover cancellation for the Karen Smith Design stamp?,"CREATE TABLE table_name_31 (first_day_cover_cancellation VARCHAR, design VARCHAR);","SELECT first_day_cover_cancellation FROM table_name_31 WHERE design = ""karen smith design"";","SELECT first_day_cover_cancellation FROM table_name_31 WHERE design = ""karen smith"";",0 "What is the average number of installations visited per visitor, partitioned by country?","CREATE TABLE Countries (CountryID INT, Country VARCHAR(50)); CREATE TABLE Visits (VisitID INT, VisitorID INT, CountryID INT, InstallationID INT); ","SELECT Country, AVG(InstallationID) OVER (PARTITION BY CountryID) AS AvgInstallationsPerVisitor FROM Visits V JOIN Countries C ON V.CountryID = C.CountryID;","SELECT c.Country, AVG(v.InstallationID) as AvgInstallationsPerVisitor FROM Countries c JOIN Visits v ON c.CountryID = v.CountryID GROUP BY c.Country;",0 What is the average horsepower of electric vehicles in the 'green_vehicles' table?,"CREATE TABLE green_vehicles (make VARCHAR(50), model VARCHAR(50), year INT, horsepower DECIMAL(5,1));",SELECT AVG(horsepower) FROM green_vehicles WHERE make = 'Tesla' OR make = 'Rivian';,SELECT AVG(horsepower) FROM green_vehicles WHERE make = 'Electric';,0 What is the total number of products sold in France in Q2 2022?,"CREATE TABLE sales (product VARCHAR(255), sale_date DATE, quantity INT, country VARCHAR(255)); ",SELECT SUM(quantity) as total_quantity FROM sales WHERE sale_date BETWEEN '2022-04-01' AND '2022-06-30' AND country = 'France';,SELECT SUM(quantity) FROM sales WHERE country = 'France' AND sale_date BETWEEN '2022-04-01' AND '2022-06-30';,0 Find the number of players who have played game Y and game Z in the 'PlayerGames' and 'Games' tables,"CREATE TABLE PlayerGames (PlayerID INT, GameID INT, GameWon BOOLEAN); CREATE TABLE Games (GameID INT, GameName VARCHAR(255)); ","SELECT COUNT(DISTINCT PlayerID) as PlayersPlayedBoth FROM PlayerGames JOIN Games ON PlayerGames.GameID = Games.GameID WHERE Games.GameName IN ('GameY', 'GameZ') GROUP BY Games.GameName HAVING COUNT(DISTINCT Games.GameName) = 2;","SELECT COUNT(DISTINCT PlayerID) FROM PlayerGames INNER JOIN Games ON PlayerGames.GameID = Games.GameID WHERE GameName IN ('GameY', 'GameZ');",0 What is the total sales revenue for each garment category in the Oceania region in Q3 2022?,"CREATE TABLE sales_oceania (sale_id INT, garment_category VARCHAR(50), sale_date DATE, total_sales DECIMAL(10, 2), region VARCHAR(50));","SELECT garment_category, SUM(total_sales) FROM sales_oceania WHERE garment_category IN ('Tops', 'Bottoms', 'Dresses', 'Outerwear') AND sale_date BETWEEN '2022-07-01' AND '2022-09-30' AND region = 'Oceania' GROUP BY garment_category;","SELECT garment_category, SUM(total_sales) FROM sales_oceania WHERE sale_date BETWEEN '2022-04-01' AND '2022-06-30' AND region = 'Oceania' GROUP BY garment_category;",0 Display conservation efforts for endangered marine species in the Atlantic region.,"CREATE TABLE marine_species (id INT, conservation_status VARCHAR(255), region VARCHAR(255)); CREATE TABLE conservation_efforts (id INT, species_id INT, description VARCHAR(255)); ","SELECT marine_species.conservation_status, conservation_efforts.description FROM marine_species INNER JOIN conservation_efforts ON marine_species.id = conservation_efforts.species_id WHERE marine_species.conservation_status = 'Endangered' AND marine_species.region = 'Atlantic';","SELECT marine_species.region, conservation_efforts.description FROM marine_species INNER JOIN conservation_efforts ON marine_species.id = conservation_efforts.species_id WHERE marine_species.conservation_status = 'Endangered' AND marine_species.region = 'Atlantic';",0 What is the latest year they were nominated?,"CREATE TABLE table_name_44 (year INTEGER, result VARCHAR);","SELECT MAX(year) FROM table_name_44 WHERE result = ""nominated"";","SELECT MAX(year) FROM table_name_44 WHERE result = ""nominated"";",1 How many sprints classifications were associated with an overall winner of Joaquin Rodriguez?,"CREATE TABLE table_26257223_13 (sprints_classification VARCHAR, winner VARCHAR);","SELECT COUNT(sprints_classification) FROM table_26257223_13 WHERE winner = ""Joaquin Rodriguez"";","SELECT COUNT(sprints_classification) FROM table_26257223_13 WHERE winner = ""Joaquin Rodriguez"";",1 What is the average age of healthcare workers in Los Angeles County?,"CREATE TABLE healthcare_workers (id INT, name TEXT, age INT, city TEXT); ",SELECT AVG(age) FROM healthcare_workers WHERE city = 'Los Angeles';,SELECT AVG(age) FROM healthcare_workers WHERE city = 'Los Angeles County';,0 What is the total number of heritage sites in African countries with community engagement events?,"CREATE TABLE HeritageSites (country VARCHAR(50), events INT); ","SELECT COUNT(*) FROM HeritageSites WHERE country IN ('Nigeria', 'Kenya', 'Egypt', 'SouthAfrica', 'Ethiopia') AND region = 'Africa' AND events > 0;","SELECT SUM(events) FROM HeritageSites WHERE country IN ('Nigeria', 'Egypt', 'South Africa', 'Egypt');",0 "What is the total waste generation in Europe for the year 2020, separated by region?","CREATE TABLE WasteGenerationEurope (region VARCHAR(50), year INT, waste_quantity INT); ","SELECT region, SUM(waste_quantity) FROM WasteGenerationEurope WHERE year = 2020 GROUP BY region;","SELECT region, SUM(waste_quantity) FROM WasteGenerationEurope WHERE year = 2020 GROUP BY region;",1 What is the average horsepower of vehicles manufactured in Japan with a manual transmission?,"CREATE TABLE Vehicle (id INT, make VARCHAR(255), model VARCHAR(255), horsepower INT, transmission VARCHAR(255), country VARCHAR(255)); ",SELECT AVG(horsepower) FROM Vehicle WHERE country = 'Japan' AND transmission = 'Manual';,SELECT AVG(horsepower) FROM Vehicle WHERE country = 'Japan' AND transmission = 'Manual';,1 How many clubs remained when there were 4 winners from the previous round?,"CREATE TABLE table_29566686_1 (clubs_remaining VARCHAR, winners_from_previous_round VARCHAR);",SELECT clubs_remaining FROM table_29566686_1 WHERE winners_from_previous_round = 4;,SELECT clubs_remaining FROM table_29566686_1 WHERE winners_from_previous_round = 4;,1 "Find the total number of schools in the United States, by state, for public and private schools separately.","CREATE TABLE us_schools (id INT, state VARCHAR(255), school_type VARCHAR(255), num_schools INT); ","SELECT state, SUM(CASE WHEN school_type = 'Public' THEN num_schools ELSE 0 END) AS total_public_schools, SUM(CASE WHEN school_type = 'Private' THEN num_schools ELSE 0 END) AS total_private_schools FROM us_schools GROUP BY state;","SELECT state, SUM(num_schools) as total_schools FROM us_schools GROUP BY state;",0 What is the launch site of the satellite with a 2003-041a COSPAR ID?,"CREATE TABLE table_name_71 (launch_site VARCHAR, cospar_id_satcat_№ VARCHAR);","SELECT launch_site FROM table_name_71 WHERE cospar_id_satcat_№ = ""2003-041a"";","SELECT launch_site FROM table_name_71 WHERE cospar_id_satcat_No = ""2003-041a"";",0 "What is the total number of goals when there are 3 draws, more than 18 losses, and played is smaller than 38?","CREATE TABLE table_name_40 (goals_for VARCHAR, played VARCHAR, draws VARCHAR, losses VARCHAR);",SELECT COUNT(goals_for) FROM table_name_40 WHERE draws = 3 AND losses > 18 AND played < 38;,SELECT COUNT(goals_for) FROM table_name_40 WHERE draws = 3 AND losses > 18 AND played 38;,0 What was the series where the game was 5?,"CREATE TABLE table_23286158_11 (series VARCHAR, game VARCHAR);",SELECT series FROM table_23286158_11 WHERE game = 5;,SELECT series FROM table_23286158_11 WHERE game = 5;,1 What is the average assets value for customers in the United Kingdom?,"CREATE TABLE customers (id INT, name VARCHAR(255), country VARCHAR(255), assets DECIMAL(10, 2)); ",SELECT AVG(assets) FROM customers WHERE country = 'UK';,SELECT AVG(assets) FROM customers WHERE country = 'United Kingdom';,0 Which vegan products do not have a cruelty-free certification?,"CREATE TABLE certification (id INT, product_id INT, is_cruelty_free BOOLEAN, is_vegan BOOLEAN); ",SELECT name FROM product p JOIN certification c ON p.id = c.product_id WHERE is_vegan = true AND is_cruelty_free = false;,SELECT product_id FROM certification WHERE is_cruelty_free = false AND is_vegan = false;,0 What is the success rate of dialectical behavior therapy (DBT) in the UK?,"CREATE TABLE mental_health.treatment_outcomes (outcome_id INT, patient_id INT, treatment_id INT, outcome_type VARCHAR(50), outcome_value INT); ",SELECT AVG(CASE WHEN outcome_type = 'DBT Success' THEN outcome_value ELSE NULL END) FROM mental_health.treatment_outcomes o JOIN mental_health.treatments t ON o.treatment_id = t.treatment_id WHERE t.country = 'UK';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM mental_health.treatment_outcomes WHERE outcome_type = 'DBT')) AS success_rate FROM mental_health.treatment_outcomes WHERE outcome_type = 'DBT' AND country = 'UK';,0 How many female professors are there in the Engineering department with at least one research grant?,"CREATE TABLE department (name VARCHAR(255), id INT);CREATE TABLE professor (name VARCHAR(255), gender VARCHAR(255), department_id INT, grant_amount DECIMAL(10,2));",SELECT COUNT(DISTINCT name) FROM professor WHERE gender = 'Female' AND department_id IN (SELECT id FROM department WHERE name = 'Engineering') AND grant_amount IS NOT NULL;,SELECT COUNT(*) FROM professor WHERE gender = 'Female' AND department_id = (SELECT id FROM department WHERE name = 'Engineering') AND grant_amount >= 1;,0 Name the representating for ingenjör andrées luftfärd,"CREATE TABLE table_name_82 (representing VARCHAR, original_title VARCHAR);","SELECT representing FROM table_name_82 WHERE original_title = ""ingenjör andrées luftfärd"";","SELECT representing FROM table_name_82 WHERE original_title = ""ingenjör andrées luftfärd"";",1 "Find the average CO2 emissions (in kg) for garment manufacturers in France and Germany, for manufacturers with an emission rate higher than 5 kg per garment.","CREATE TABLE Manufacturers (id INT, country VARCHAR(50), co2_emission_rate DECIMAL(5,2)); ","SELECT AVG(m.co2_emission_rate) as avg_emission_rate FROM Manufacturers m WHERE m.country IN ('France', 'Germany') AND m.co2_emission_rate > 5;","SELECT AVG(co2_emission_rate) FROM Manufacturers WHERE country IN ('France', 'Germany') AND co2_emission_rate > 5;",0 Change the region of ethical manufacturer with ID 2 to 'South West',"CREATE SCHEMA manufacturing;CREATE TABLE ethical_manufacturers (id INT PRIMARY KEY, name TEXT, region TEXT); ",UPDATE ethical_manufacturers SET region = 'South West' WHERE id = 2;,UPDATE manufacturing.ethical_manufacturers SET region = 'South West' WHERE id = 2;,0 "What is the maximum water leak volume by city, location, and month?","CREATE TABLE water_leak_2 (id INT, city VARCHAR(255), location VARCHAR(255), leak_volume FLOAT, leak_date DATE); ","SELECT city, location, MAX(leak_volume) FROM water_leak_2 GROUP BY city, location, DATE_FORMAT(leak_date, '%Y-%m');","SELECT city, location, EXTRACT(MONTH FROM leak_date) as month, MAX(leak_volume) as max_leak_volume FROM water_leak_2 GROUP BY city, location, month;",0 What is the average property size in urban areas with co-ownership options?,"CREATE TABLE urban_areas (id INT, area VARCHAR(20), co_ownership BOOLEAN); ",SELECT AVG(property_size) FROM properties JOIN urban_areas ON properties.area = urban_areas.area WHERE urban_areas.co_ownership = true;,SELECT AVG(area) FROM urban_areas WHERE co_ownership = TRUE;,0 Which team did they play at Rich Stadium?,"CREATE TABLE table_14423274_3 (opponent VARCHAR, game_site VARCHAR);","SELECT opponent FROM table_14423274_3 WHERE game_site = ""Rich Stadium"";","SELECT opponent FROM table_14423274_3 WHERE game_site = ""Rich Stadium"";",1 "What is the average weight of pottery artifacts from the 'Indus Valley Civilization' period, excavated in India?","CREATE TABLE artifacts (id serial PRIMARY KEY, type text, weight numeric, historical_period text, excavation_id integer); ",SELECT AVG(weight) as avg_weight FROM artifacts WHERE type = 'pottery' AND historical_period = 'Indus Valley Civilization' AND excavation_id IN (SELECT id FROM excavations WHERE location = 'India');,SELECT AVG(weight) FROM artifacts WHERE type = 'pottery' AND historical_period = 'Indus Valley Civilization' AND excavation_id IN (SELECT id FROM excavations WHERE country = 'India');,0 What is the maximum water temperature recorded for each fish species?,"CREATE TABLE FishSpecies (SpeciesID int, SpeciesName varchar(50), WaterTemp float); ","SELECT SpeciesName, MAX(WaterTemp) as MaxTemp FROM FishSpecies GROUP BY SpeciesName;","SELECT SpeciesName, MAX(WaterTemp) as MaxWaterTemp FROM FishSpecies GROUP BY SpeciesName;",0 Display the total number of fair trade and sustainable clothing items available in the 'EthicalFashion' database,"CREATE TABLE item_stock (item_id INT, item_name VARCHAR(255), is_fair_trade BOOLEAN, is_sustainable BOOLEAN, stock INT);",SELECT SUM(stock) FROM item_stock WHERE is_fair_trade = TRUE AND is_sustainable = TRUE;,SELECT SUM(stock) FROM item_stock WHERE is_fair_trade = TRUE AND is_sustainable = TRUE;,1 What is the daily recycling rate for the region of Andalusia?,"CREATE TABLE region_recycling (region VARCHAR(255), recycling_rate DECIMAL(5,2), total_waste INT, day INT); ",SELECT recycling_rate FROM region_recycling WHERE region='Andalusia' AND day=5;,SELECT recycling_rate FROM region_recycling WHERE region = 'Andalusia' AND day = (SELECT day FROM region_recycling WHERE region = 'Andalusia');,0 Who was the team on March 18?,"CREATE TABLE table_27755603_10 (team VARCHAR, date VARCHAR);","SELECT team FROM table_27755603_10 WHERE date = ""March 18"";","SELECT team FROM table_27755603_10 WHERE date = ""March 18"";",1 What is the difference in total points scored between the first and second halves of each NBA game?,"CREATE TABLE games (game_id INT, first_half_points INT, second_half_points INT);","SELECT game_id, first_half_points - second_half_points AS point_difference FROM games;","SELECT game_id, SUM(first_half_points) - SUM(second_half_points) as total_points_difference FROM games GROUP BY game_id;",0 What date was Colorado the home team?,"CREATE TABLE table_name_85 (date VARCHAR, home VARCHAR);","SELECT date FROM table_name_85 WHERE home = ""colorado"";","SELECT date FROM table_name_85 WHERE home = ""colorado"";",1 "What is the average budget of biotech startups founded in 2020, grouped by their founding country?","CREATE TABLE biotech_startups (id INT PRIMARY KEY, name VARCHAR(255), budget DECIMAL(10,2), founding_year INT, country VARCHAR(255));","SELECT founding_country, AVG(budget) FROM biotech_startups WHERE founding_year = 2020 GROUP BY founding_country;","SELECT country, AVG(budget) as avg_budget FROM biotech_startups WHERE founding_year = 2020 GROUP BY country;",0 How many artifacts were found in 'SiteD'?,"CREATE TABLE SiteD (artifact_id INT, artifact_type TEXT, quantity INT); ",SELECT SUM(quantity) FROM SiteD;,SELECT SUM(quantity) FROM SiteD;,1 List the names of buildings that have no company office.,"CREATE TABLE buildings (name VARCHAR, id VARCHAR, building_id VARCHAR); CREATE TABLE Office_locations (name VARCHAR, id VARCHAR, building_id VARCHAR);",SELECT name FROM buildings WHERE NOT id IN (SELECT building_id FROM Office_locations);,SELECT T1.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.id = T2.building_id WHERE T2.id IS NULL;,0 What is the home in mellon arena at 7:30 pm with a record o 2-5-2?,"CREATE TABLE table_name_25 (home VARCHAR, record VARCHAR, time VARCHAR, location_attendance VARCHAR);","SELECT home FROM table_name_25 WHERE time = ""7:30 pm"" AND location_attendance = ""mellon arena"" AND record = ""2-5-2"";","SELECT home FROM table_name_25 WHERE time = ""7:30 pm"" AND location_attendance = ""mellon arena"" AND record = ""2-5-2"";",1 "List all factories in Vietnam that have been certified as fair trade, along with their certification dates.","CREATE TABLE factories (id INT, name VARCHAR(50), country VARCHAR(50), certification VARCHAR(50)); ",SELECT * FROM factories WHERE country = 'Vietnam' AND certification = 'Fair Trade';,"SELECT name, certification FROM factories WHERE country = 'Vietnam' AND certification = 'Fair Trade';",0 List the names and locations of genetic research institutions in Germany.,"CREATE SCHEMA if not exists biotech;CREATE TABLE if not exists biotech.genetic_research(id INT, name STRING, location STRING);","SELECT name, location FROM biotech.genetic_research WHERE location = 'Germany';","SELECT name, location FROM biotech.genetic_research WHERE location = 'Germany';",1 What is the average price of vegan menu items in the breakfast category?,"CREATE TABLE menus (menu_id INT, menu_name VARCHAR(255), category VARCHAR(255), price DECIMAL(10,2), is_vegan BOOLEAN); ",SELECT AVG(price) FROM menus WHERE category = 'Breakfast' AND is_vegan = TRUE;,SELECT AVG(price) FROM menus WHERE category = 'Breakfast' AND is_vegan = true;,0 What is the average donation amount made to environmental causes in the US in 2021?,"CREATE TABLE donations_environment_us (id INT, donor_name TEXT, country TEXT, cause TEXT, donation_amount DECIMAL, donation_date DATE); ",SELECT AVG(donation_amount) FROM donations_environment_us WHERE country = 'USA' AND cause = 'Environment' AND YEAR(donation_date) = 2021;,SELECT AVG(donation_amount) FROM donations_environment_us WHERE country = 'USA' AND cause = 'environmental' AND donation_date BETWEEN '2021-01-01' AND '2021-12-31';,0 What is the minimum dissolved oxygen level recorded in each monitoring zone in the past year?,"CREATE TABLE yearly_dissolved_oxygen (zone_id INT, zone_name TEXT, date DATE, dissolved_oxygen FLOAT); ","SELECT zone_name, MIN(dissolved_oxygen) FROM yearly_dissolved_oxygen WHERE date >= DATE_SUB(CURDATE(), INTERVAL 1 YEAR) GROUP BY zone_name;","SELECT zone_name, MIN(dissolved_oxygen) FROM yearly_dissolved_oxygen WHERE date >= DATEADD(year, -1, GETDATE()) GROUP BY zone_name;",0 Which Reason has a State (class) of tennessee (2)?,"CREATE TABLE table_name_54 (reason_for_change VARCHAR, state__class_ VARCHAR);","SELECT reason_for_change FROM table_name_54 WHERE state__class_ = ""tennessee (2)"";","SELECT reason_for_change FROM table_name_54 WHERE state__class_ = ""tennessee (2)"";",1 "Determine the total number of wells drilled in each field, indicating which fields have more than 5 wells","CREATE TABLE field_wells (field_id INT, well_id INT); ","SELECT f.field_id, f.field_name, COUNT(fw.well_id) as num_wells FROM fields f INNER JOIN field_wells fw ON f.field_id = fw.field_id GROUP BY f.field_id HAVING num_wells > 5;","SELECT field_id, COUNT(*) FROM field_wells GROUP BY field_id HAVING COUNT(*) > 5;",0 List the names and total earnings of the top 5 players who have earned the most from esports tournaments?,"CREATE TABLE EsportsPlayers (PlayerID INT, Name VARCHAR(50), Country VARCHAR(20), Tournaments INT, Earnings DECIMAL(10,2)); ","SELECT Name, SUM(Earnings) AS TotalEarnings FROM EsportsPlayers GROUP BY Name ORDER BY TotalEarnings DESC LIMIT 5;","SELECT Name, SUM(Earnings) FROM EsportsPlayers GROUP BY Name ORDER BY SUM(Earnings) DESC LIMIT 5;",0 What are the distinct Famous release dates?,CREATE TABLE artist (Famous_Release_date VARCHAR);,SELECT DISTINCT (Famous_Release_date) FROM artist;,SELECT DISTINCT Famous_Release_date FROM artist;,0 List the top 5 most watched news channels in Canada by viewership.,"CREATE TABLE news_channels (channel_name VARCHAR(255), viewership INT, country VARCHAR(64));","SELECT channel_name, viewership FROM news_channels WHERE country = 'Canada' ORDER BY viewership DESC LIMIT 5;","SELECT channel_name, viewership FROM news_channels WHERE country = 'Canada' ORDER BY viewership DESC LIMIT 5;",1 "Which System's Name is Steem, and has a Freeware License?","CREATE TABLE table_name_76 (system VARCHAR, license VARCHAR, name VARCHAR);","SELECT system FROM table_name_76 WHERE license = ""freeware"" AND name = ""steem"";","SELECT system FROM table_name_76 WHERE license = ""freeware"" AND name = ""steem"";",1 What is the total cost of rural infrastructure projects in Mexico and Brazil?,"CREATE TABLE infrastructure_projects (id INT, name TEXT, country TEXT, cost FLOAT); ","SELECT SUM(cost) FROM infrastructure_projects WHERE country IN ('Mexico', 'Brazil');","SELECT SUM(cost) FROM infrastructure_projects WHERE country IN ('Mexico', 'Brazil');",1 For what episode was the rating/share for 18-49 at 2.8/8,"CREATE TABLE table_25391981_20 (episode VARCHAR, rating VARCHAR);",SELECT episode FROM table_25391981_20 WHERE rating / SHARE(18 AS –49) = 2.8 / 8;,"SELECT episode FROM table_25391981_20 WHERE rating = ""18-49 at 2.8/8"";",0 Which driver had a grid of 2?,"CREATE TABLE table_name_63 (driver VARCHAR, grid VARCHAR);",SELECT driver FROM table_name_63 WHERE grid = 2;,SELECT driver FROM table_name_63 WHERE grid = 2;,1 What is the percentage of the population that has a chronic condition by age group?,"CREATE TABLE population (id INT, age_group VARCHAR(255), chronic_condition BOOLEAN); ","SELECT age_group, (COUNT(*) FILTER (WHERE chronic_condition) * 100.0 / COUNT(*)) AS pct_chronic_condition FROM population GROUP BY age_group;","SELECT age_group, (COUNT(*) FILTER (WHERE chronic_condition = TRUE) * 100.0 / COUNT(*)) AS percentage FROM population GROUP BY age_group;",0 "What is the lowest figure for her age when the year of marriage is before 1853, the number of children is less than 8, and the bride was Eliza Maria Partridge?","CREATE TABLE table_name_60 (her_age INTEGER, name VARCHAR, year_of_marriage VARCHAR, _number_of_children VARCHAR);","SELECT MIN(her_age) FROM table_name_60 WHERE year_of_marriage < 1853 AND _number_of_children < 8 AND name = ""eliza maria partridge"";","SELECT MIN(her_age) FROM table_name_60 WHERE year_of_marriage 1853 AND _number_of_children 8 AND name = ""eliza maria partridge"";",0 How many of each menu category are there?,"CREATE TABLE menu_categories (category_id INT, category VARCHAR(255)); ","SELECT category, COUNT(*) as count FROM menu_categories GROUP BY category;","SELECT category, COUNT(*) FROM menu_categories GROUP BY category;",0 What is the percentage of security incidents resolved within the SLA in the past month?,"CREATE TABLE security_incidents (id INT, resolved BOOLEAN, resolved_time TIMESTAMP, SLA_deadline TIMESTAMP);","SELECT ROUND(AVG(CASE WHEN resolved THEN 1.0 ELSE 0.0 END * (resolved_time <= SLA_deadline)) * 100, 2) as percentage_within_SLA FROM security_incidents WHERE resolved_time >= NOW() - INTERVAL '1 month';","SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM security_incidents WHERE resolved = true AND resolved_time >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH)) AS percentage FROM security_incidents WHERE resolved = true AND SLA_deadline >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH);",0 "What is the highest week 9 that had a week 6 of 7, a week 10 of greater than 2, a week 7 of 5, and a week 11 less than 2?","CREATE TABLE table_name_13 (wk_9 INTEGER, wk_11 VARCHAR, wk_7 VARCHAR, wk_6 VARCHAR, wk_10 VARCHAR);","SELECT MAX(wk_9) FROM table_name_13 WHERE wk_6 = ""7"" AND wk_10 > 2 AND wk_7 = ""5"" AND wk_11 < 2;",SELECT MAX(wk_9) FROM table_name_13 WHERE wk_6 = 7 AND wk_10 > 2 AND wk_7 = 5 AND wk_11 2;,0 Who was the director for the film produced by River Films?,"CREATE TABLE table_name_96 (director VARCHAR, producer VARCHAR);","SELECT director FROM table_name_96 WHERE producer = ""river films"";","SELECT director FROM table_name_96 WHERE producer = ""river films"";",1 What is the average capacity that has switzerland as the country?,"CREATE TABLE table_name_19 (capacity INTEGER, country VARCHAR);","SELECT AVG(capacity) FROM table_name_19 WHERE country = ""switzerland"";","SELECT AVG(capacity) FROM table_name_19 WHERE country = ""switzerland"";",1 What is the number of countries with marine protected areas in the Pacific Ocean?,"CREATE TABLE marine_protected_areas_pacific (country_name text, location text); ",SELECT COUNT(DISTINCT country_name) FROM marine_protected_areas_pacific WHERE location = 'Pacific Ocean';,SELECT COUNT(*) FROM marine_protected_areas_pacific;,0 Which player has a score of 71-72=143?,"CREATE TABLE table_name_43 (player VARCHAR, score VARCHAR);",SELECT player FROM table_name_43 WHERE score = 71 - 72 = 143;,SELECT player FROM table_name_43 WHERE score = 71 - 72 = 143;,1 What is the average age of users who achieved their step goal 3 days in a row?,"CREATE TABLE step_counts (id INT, user_id INT, step_count INT, date DATE); ",SELECT AVG(user_age) FROM (SELECT AVG(y.age) as user_age FROM users x INNER JOIN step_counts y ON x.id = y.user_id WHERE (SELECT COUNT(*) FROM step_counts z WHERE z.user_id = y.user_id AND z.date BETWEEN y.date - 2 AND y.date) = 3) subquery;,"SELECT AVG(age) FROM step_counts WHERE date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 DAY);",0 Which artists have produced the most pieces?,"CREATE TABLE Artists (ArtistID int, Name varchar(50), Nationality varchar(50)); CREATE TABLE ArtPieces (ArtPieceID int, Title varchar(50), YearCreated int, ArtistID int);","SELECT Artists.Name, COUNT(ArtPieces.ArtPieceID) AS ArtPiecesCount FROM Artists INNER JOIN ArtPieces ON Artists.ArtistID = ArtPieces.ArtistID GROUP BY Artists.Name ORDER BY ArtPiecesCount DESC;","SELECT Artists.Name, COUNT(ArtPieces.ArtistID) as ArtPieceCount FROM Artists INNER JOIN ArtPieces ON Artists.ArtistID = ArtPieces.ArtistID GROUP BY Artists.Name ORDER BY ArtPieceCount DESC;",0 Calculate veteran employment statistics for each state,"CREATE TABLE veteran_employment (state VARCHAR(2), employed_veterans INT, total_veterans INT, employment_rate FLOAT); ","SELECT state, employed_veterans, total_veterans, (employed_veterans/total_veterans) as employment_rate FROM veteran_employment;","SELECT state, employed_veterans, total_veterans, employment_rate FROM veteran_employment GROUP BY state;",0 What is the Championship with Vitas Gerulaitis as Opponent in the final in a match on Clay Surface?,"CREATE TABLE table_name_3 (championship VARCHAR, surface VARCHAR, opponent_in_the_final VARCHAR);","SELECT championship FROM table_name_3 WHERE surface = ""clay"" AND opponent_in_the_final = ""vitas gerulaitis"";","SELECT championship FROM table_name_3 WHERE surface = ""clay"" AND opponent_in_the_final = ""vitas gerulaitis"";",1 Identify the number of security incidents in the 'HQ' location from the last quarter.,"CREATE TABLE incidents (incident_id INT PRIMARY KEY, incident_date DATE, incident_location VARCHAR(50)); ","SELECT COUNT(*) FROM incidents WHERE incident_location = 'HQ' AND incident_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH);","SELECT COUNT(*) FROM incidents WHERE incident_location = 'HQ' AND incident_date >= DATEADD(quarter, -1, GETDATE());",0 What place has Wales as a country?,"CREATE TABLE table_name_16 (place VARCHAR, country VARCHAR);","SELECT place FROM table_name_16 WHERE country = ""wales"";","SELECT place FROM table_name_16 WHERE country = ""wales"";",1 What is the total billing amount by attorney in the Southwest region?,"CREATE TABLE Attorneys (AttorneyID int, Name varchar(50), Region varchar(10)); CREATE TABLE Billing (BillingID int, AttorneyID int, Amount decimal(10,2)); ","SELECT A.Name, SUM(B.Amount) as TotalBilling FROM Attorneys A JOIN Billing B ON A.AttorneyID = B.AttorneyID WHERE A.Region = 'Southwest' GROUP BY A.Name;","SELECT Attorneys.Name, SUM(Billing.Amount) FROM Attorneys INNER JOIN Billing ON Attorneys.AttorneyID = Billing.AttorneyID WHERE Attorneys.Region = 'Southwest' GROUP BY Attorneys.Name;",0 "What is the number of vaccinated individuals and total population in each state, ordered by the percentage of vaccinated individuals, descending?","CREATE TABLE states (id INT, name TEXT, total_population INT, vaccinated_individuals INT); ","SELECT name, total_population, vaccinated_individuals, (vaccinated_individuals * 100.0 / total_population) as vaccination_percentage FROM states ORDER BY vaccination_percentage DESC;","SELECT name, SUM(vaccinated_individuals) as total_vaccinated_individuals, SUM(total_population) as total_population FROM states GROUP BY name ORDER BY total_population DESC;",0 How many values of prominence(m) occur at rank 5?,"CREATE TABLE table_18946749_4 (prominence__m_ VARCHAR, rank VARCHAR);",SELECT COUNT(prominence__m_) FROM table_18946749_4 WHERE rank = 5;,SELECT COUNT(prominence__m_) FROM table_18946749_4 WHERE rank = 5;,1 What is the Visitor of the Montreal Canadiens Home game with a Record of 6–4–4?,"CREATE TABLE table_name_78 (visitor VARCHAR, home VARCHAR, record VARCHAR);","SELECT visitor FROM table_name_78 WHERE home = ""montreal canadiens"" AND record = ""6–4–4"";","SELECT visitor FROM table_name_78 WHERE home = ""montreal canadiens"" AND record = ""6–4–4"";",1 How long was the match with Jaime Fletcher?,"CREATE TABLE table_name_83 (time VARCHAR, opponent VARCHAR);","SELECT time FROM table_name_83 WHERE opponent = ""jaime fletcher"";","SELECT time FROM table_name_83 WHERE opponent = ""jaime fletcher"";",1 How many legs were own by alan tabern?,"CREATE TABLE table_27906667_2 (legs_won INTEGER, player VARCHAR);","SELECT MAX(legs_won) FROM table_27906667_2 WHERE player = ""Alan Tabern"";","SELECT MAX(legs_won) FROM table_27906667_2 WHERE player = ""Alan Tabern"";",1 What is the record on December 4?,"CREATE TABLE table_name_55 (record VARCHAR, date VARCHAR);","SELECT record FROM table_name_55 WHERE date = ""december 4"";","SELECT record FROM table_name_55 WHERE date = ""december 4"";",1 How many carbon offset initiatives were launched in the city of Tokyo in 2018?,"CREATE TABLE carbon_offset_initiatives (id INT, name TEXT, city TEXT, launch_date DATE); ",SELECT COUNT(*) FROM carbon_offset_initiatives WHERE city = 'Tokyo' AND launch_date <= '2018-12-31';,SELECT COUNT(*) FROM carbon_offset_initiatives WHERE city = 'Tokyo' AND launch_date BETWEEN '2018-01-01' AND '2018-12-31';,0 What is the total CO2 emission from all aquaculture farms in the year 2021?,"CREATE TABLE co2_emission (farm_id INT, year INT, co2_emission INT); ",SELECT SUM(co2_emission) FROM co2_emission WHERE year = 2021;,SELECT SUM(co2_emission) FROM co2_emission WHERE year = 2021;,1 What is the minimum depth recorded for any underwater volcano?,"CREATE TABLE underwater_volcanoes (name VARCHAR(255), depth FLOAT);",SELECT MIN(depth) FROM underwater_volcanoes;,SELECT MIN(depth) FROM underwater_volcanoes;,1 How many total appearances are there when the league appearances is 192?,"CREATE TABLE table_29701419_2 (total_appearances VARCHAR, league_appearances VARCHAR);",SELECT COUNT(total_appearances) FROM table_29701419_2 WHERE league_appearances = 192;,SELECT total_appearances FROM table_29701419_2 WHERE league_appearances = 192;,0 What is the total number of hours played by players in shooter games?,"CREATE TABLE GameSessions (SessionID INT, PlayerID INT, Game VARCHAR(20), Duration INT); ",SELECT SUM(Duration) FROM GameSessions WHERE Game = 'Shooter';,SELECT SUM(Duration) FROM GameSessions WHERE Game = 'Shooter';,1 Which venue held a basketball team?,"CREATE TABLE table_name_98 (venue VARCHAR, sport VARCHAR);","SELECT venue FROM table_name_98 WHERE sport = ""basketball"";","SELECT venue FROM table_name_98 WHERE sport = ""basketball"";",1 What is the number of employees in each department of the Education sector?,"CREATE TABLE Departments (DepartmentID INTEGER, DepartmentName TEXT); CREATE TABLE Employees (EmployeeID INTEGER, EmployeeDepartmentID INTEGER, EmployeeSalary INTEGER, EmployeeSector TEXT);","SELECT D.DepartmentName, COUNT(*) FROM Departments D INNER JOIN Employees E ON D.DepartmentID = E.EmployeeDepartmentID WHERE E.EmployeeSector = 'Education' GROUP BY D.DepartmentName;","SELECT d.DepartmentName, COUNT(e.EmployeeID) FROM Departments d JOIN Employees e ON d.DepartmentID = e.EmployeeDepartmentID WHERE e.EmployeeSector = 'Education' GROUP BY d.DepartmentName;",0 What country has a To par of e?,"CREATE TABLE table_name_84 (country VARCHAR, to_par VARCHAR);","SELECT country FROM table_name_84 WHERE to_par = ""e"";","SELECT country FROM table_name_84 WHERE to_par = ""e"";",1 Who as the home team for game on 5 october 2011?,"CREATE TABLE table_24949975_1 (home_team VARCHAR, date VARCHAR);","SELECT home_team FROM table_24949975_1 WHERE date = ""5 October 2011"";","SELECT home_team FROM table_24949975_1 WHERE date = ""5 October 2011"";",1 "If the Quillacollo Municipality is 93131, what is the Vinto Municipality minimum?","CREATE TABLE table_2509113_2 (vinto_municipality INTEGER, quillacollo_municipality VARCHAR);",SELECT MIN(vinto_municipality) FROM table_2509113_2 WHERE quillacollo_municipality = 93131;,"SELECT MIN(vinto_municipality) FROM table_2509113_2 WHERE quillacollo_municipality = ""93131"";",0 "When the pick was below 42 and the player was Chris Horton, what's the highest Overall pick found?","CREATE TABLE table_name_15 (overall INTEGER, name VARCHAR, pick VARCHAR);","SELECT MAX(overall) FROM table_name_15 WHERE name = ""chris horton"" AND pick < 42;","SELECT MAX(overall) FROM table_name_15 WHERE name = ""chris horton"" AND pick 42;",0 Increase the duration of all workouts in December by 10%.,"CREATE TABLE Workouts (Id INT, MemberId INT, Duration INT, Date DATE); ","UPDATE Workouts SET Duration = Duration * 1.1 WHERE DATE_FORMAT(Date, '%Y-%m') = '2022-12';","UPDATE Workouts SET Duration = Duration * 1.10 WHERE DATE_FORMAT(Date, '%Y-%m') = 'December';",0 How many intelligence operations are associated with each military technology in the 'tech_ops' view?,"CREATE TABLE military_tech (tech VARCHAR(255)); CREATE TABLE intel_ops (op VARCHAR(255)); CREATE VIEW tech_ops AS SELECT mt.tech, io.op FROM military_tech mt CROSS JOIN intel_ops io;","SELECT mt.tech, COUNT(*) FROM tech_ops mt GROUP BY mt.tech;","SELECT mt.tech, COUNT(*) FROM tech_ops GROUP BY mt.tech;",0 What was the position of Greg Fredlund in years after 2008?,"CREATE TABLE table_name_30 (position VARCHAR, year VARCHAR, player VARCHAR);","SELECT position FROM table_name_30 WHERE year > 2008 AND player = ""greg fredlund"";","SELECT position FROM table_name_30 WHERE year > 2008 AND player = ""greg fredlund"";",1 What is the latest manufacturing date of an aircraft by Boeing?,"CREATE TABLE aircraft (id INT, name TEXT, manufacturer TEXT, manufacturing_date DATE); ",SELECT MAX(manufacturing_date) FROM aircraft WHERE manufacturer = 'Boeing';,SELECT MAX(manufacturing_date) FROM aircraft WHERE manufacturer = 'Boeing';,1 What is the total quantity of iron mined in the USA and Sweden?,"CREATE TABLE iron_production (country VARCHAR(20), quantity INT); ","SELECT country, SUM(quantity) FROM iron_production WHERE country IN ('USA', 'Sweden') GROUP BY country;","SELECT SUM(quantity) FROM iron_production WHERE country IN ('USA', 'Sweden');",0 "List all destinations with sustainable tourism practices in the Caribbean that received more than 15,000 visitors in 2020?","CREATE TABLE sustainable_destinations (id INT, destination VARCHAR(50), num_visitors INT, sustainability_score INT, region VARCHAR(50));",SELECT destination FROM sustainable_destinations WHERE num_visitors > 15000 AND sustainability_score > 6 AND region = 'Caribbean' AND YEAR(datetime) = 2020 GROUP BY destination;,SELECT destination FROM sustainable_destinations WHERE sustainability_score > 15000 AND region = 'Caribbean' AND year = 2020;,0 what's the country/region with presenters being heikki paasonen jukka rossi (xtra factor),"CREATE TABLE table_13779832_1 (country_region VARCHAR, presenters VARCHAR);","SELECT country_region FROM table_13779832_1 WHERE presenters = ""Heikki Paasonen Jukka Rossi (Xtra Factor)"";","SELECT country_region FROM table_13779832_1 WHERE presenters = ""Heikki Paasonen Jukka Rossi (Xtra Factor)"";",1 "Determine the number of safety incidents reported for each type of incident, in the past year, and rank them in ascending order.","CREATE TABLE Safety_Incidents (Incident_Type VARCHAR(255), Incident_Date DATE); ","SELECT Incident_Type, COUNT(*) AS Incident_Count, RANK() OVER (ORDER BY COUNT(*) ASC) AS Rank FROM Safety_Incidents WHERE Incident_Date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) GROUP BY Incident_Type;","SELECT Incident_Type, COUNT(*) as Num_Incidents FROM Safety_Incidents WHERE Incident_Date >= DATEADD(year, -1, GETDATE()) GROUP BY Incident_Type ORDER BY Num_Incidents DESC;",0 "WHAT IS THE AVG AST FOR GAMES LARGER THAN 101, RANK 5, TOTAL ASSISTS SMALLER THAN 331?","CREATE TABLE table_name_74 (ast_avg INTEGER, total_assists VARCHAR, games VARCHAR, rank VARCHAR);",SELECT AVG(ast_avg) FROM table_name_74 WHERE games > 101 AND rank = 5 AND total_assists < 331;,SELECT SUM(ast_avg) FROM table_name_74 WHERE games > 101 AND rank = 5 AND total_assists 331;,0 What is the most common language of posts?,"CREATE TABLE posts (id INT, language VARCHAR(255)); ","SELECT language, COUNT(*) AS count FROM posts GROUP BY language ORDER BY count DESC LIMIT 1;","SELECT language, COUNT(*) as count FROM posts GROUP BY language ORDER BY count DESC LIMIT 1;",0 Update the well depth of well 'C3' in the 'Gulf of Mexico' to 4500 feet.,"CREATE TABLE wells (well_id INT, well_name VARCHAR(255), well_depth FLOAT, region VARCHAR(255)); ",UPDATE wells SET well_depth = 4500 WHERE well_name = 'C3' AND region = 'Gulf of Mexico';,UPDATE wells SET well_depth = 4500 WHERE well_name = 'C3' AND region = 'Gulf of Mexico';,1 What is the maximum cost of accommodations provided to students with mobility impairments in the past year?,"CREATE TABLE accommodations (id INT, student_id INT, type TEXT, cost INT, date DATE); ","SELECT MAX(cost) FROM accommodations WHERE type = 'wheelchair' AND date >= DATE_SUB(NOW(), INTERVAL 1 YEAR);","SELECT MAX(cost) FROM accommodations WHERE type = 'Mobility Impairment' AND date >= DATEADD(year, -1, GETDATE());",0 Show last names for all student who are on scholarship.,"CREATE TABLE Student (Lname VARCHAR, StuID VARCHAR); CREATE TABLE Sportsinfo (StuID VARCHAR, onscholarship VARCHAR);",SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y';,"SELECT T1.Lname FROM Student AS T1 JOIN Sportsinfo AS T2 ON T1.StuID = T2.StuID WHERE T2.onscholarship = ""On Scholarship"";",0 "What is the total billing amount for each attorney, ordered by total billing amount in descending order?","CREATE TABLE Attorneys (AttorneyID INT, Name VARCHAR(50), TotalBilling FLOAT); ","SELECT AttorneyID, Name, TotalBilling FROM Attorneys ORDER BY TotalBilling DESC;","SELECT Name, SUM(TotalBilling) as TotalBilling FROM Attorneys GROUP BY Name ORDER BY TotalBilling DESC;",0 Which animal has the lowest population?,"CREATE TABLE animal_population (id INT, animal_name VARCHAR(50), population INT); ","SELECT animal_name, MIN(population) FROM animal_population;","SELECT animal_name, MIN(population) FROM animal_population GROUP BY animal_name;",0 Identify unique cybersecurity strategies implemented by countries with a high military technology budget,"CREATE TABLE CybersecurityStrategies (Id INT PRIMARY KEY, Country VARCHAR(50), Name VARCHAR(50), Budget INT);",SELECT DISTINCT Name FROM CybersecurityStrategies WHERE Country IN (SELECT Country FROM MilitaryBudget WHERE Budget > 1000000) GROUP BY Country;,SELECT DISTINCT Country FROM CybersecurityStrategies WHERE Budget >= (SELECT MAX(Budget) FROM CybersecurityStrategies);,0 How many autonomous taxis are currently operating in San Francisco?,"CREATE TABLE autonomous_taxis (taxi_id INT, taxi_model VARCHAR(50), in_service BOOLEAN, city VARCHAR(50)); ",SELECT COUNT(*) FROM autonomous_taxis WHERE in_service = true AND city = 'San Francisco';,SELECT COUNT(*) FROM autonomous_taxis WHERE city = 'San Francisco' AND in_service = TRUE;,0 What position does the player from malvern prep play?,"CREATE TABLE table_name_40 (position VARCHAR, high_school VARCHAR);","SELECT position FROM table_name_40 WHERE high_school = ""malvern prep"";","SELECT position FROM table_name_40 WHERE high_school = ""malvern prep"";",1 "What is the average rating and review count for each dish, excluding dishes with fewer than 10 reviews?","CREATE TABLE dishes (dish_id INT, dish_name VARCHAR(255), rating DECIMAL(2,1), review_count INT); ","SELECT dish_name, AVG(rating) as avg_rating, SUM(review_count) as total_reviews FROM dishes WHERE review_count >= 10 GROUP BY dish_name;","SELECT dish_name, AVG(rating) as avg_rating, AVG(review_count) as avg_review_count FROM dishes WHERE review_count 10 GROUP BY dish_name;",0 How many artworks were created in the 20th century?,"CREATE TABLE artworks (id INT, title TEXT, year INT, artist_id INT); ",SELECT COUNT(*) FROM artworks WHERE year BETWEEN 1901 AND 2000;,SELECT COUNT(*) FROM artworks WHERE year = 2021;,0 Which engine did Korten Motorsport use?,"CREATE TABLE table_name_86 (engine VARCHAR, team VARCHAR);","SELECT engine FROM table_name_86 WHERE team = ""korten motorsport"";","SELECT engine FROM table_name_86 WHERE team = ""korten motorsport"";",1 What award has breakthrough performance as the category?,"CREATE TABLE table_name_52 (award VARCHAR, category VARCHAR);","SELECT award FROM table_name_52 WHERE category = ""breakthrough performance"";","SELECT award FROM table_name_52 WHERE category = ""breakthrough performance"";",1 Add a new reverse logistics record for the 'GHI' warehouse,"CREATE TABLE warehouse (id INT PRIMARY KEY, name VARCHAR(255)); CREATE TABLE reverse_logistics (id INT PRIMARY KEY, warehouse_id INT, FOREIGN KEY (warehouse_id) REFERENCES warehouse(id));","INSERT INTO reverse_logistics (id, warehouse_id) VALUES ((SELECT COALESCE(MAX(id), 0) + 1 FROM reverse_logistics), (SELECT id FROM warehouse WHERE name = 'GHI'));","INSERT INTO reverse_logistics (id, warehouse_id, FOREIGN KEY (warehouse_id)) VALUES (1, 'GHI');",0 How many clinical trials were conducted by 'CompanyZ' in 2018?,"CREATE TABLE sponsor_trials(sponsor_name TEXT, trial_id INT, trial_year INT); ",SELECT COUNT(*) FROM sponsor_trials WHERE sponsor_name = 'CompanyZ' AND trial_year = 2018;,SELECT COUNT(*) FROM sponsor_trials WHERE sponsor_name = 'CompanyZ' AND trial_year = 2018;,1 "List the total number of aircraft manufactured by each company, including 'Boeing' and 'Airbus India'.","CREATE TABLE aircraft (id INT, model VARCHAR(255), manufacturer VARCHAR(255)); ","SELECT manufacturer, COUNT(*) FROM aircraft GROUP BY manufacturer;","SELECT manufacturer, COUNT(*) FROM aircraft GROUP BY manufacturer;",1 What is the average cultural competency score of health equity metrics?,"CREATE TABLE health_equity_metrics (id INT, name TEXT, score INT, category TEXT);",SELECT AVG(score) FROM health_equity_metrics WHERE category = 'cultural competency';,SELECT AVG(score) FROM health_equity_metrics WHERE category = 'cultural competency';,1 What year has the ride flight deck and a rating of less than 5?,"CREATE TABLE table_name_47 (year_opened VARCHAR, ride VARCHAR, rating VARCHAR);","SELECT COUNT(year_opened) FROM table_name_47 WHERE ride = ""flight deck"" AND rating < 5;","SELECT year_opened FROM table_name_47 WHERE ride = ""flight deck"" AND rating 5;",0 When did South Melbourne play as the away team?,"CREATE TABLE table_name_45 (date VARCHAR, away_team VARCHAR);","SELECT date FROM table_name_45 WHERE away_team = ""south melbourne"";","SELECT date FROM table_name_45 WHERE away_team = ""south melbourne"";",1 "What was the date of the game after week 5 with 62,262 fans attending?","CREATE TABLE table_name_82 (date VARCHAR, week VARCHAR, attendance VARCHAR);","SELECT date FROM table_name_82 WHERE week > 5 AND attendance = ""62,262"";","SELECT date FROM table_name_82 WHERE week > 5 AND attendance = ""62,262"";",1 Which farmers have less than 5 years of experience in the agriculture database?,"CREATE TABLE Farmers (id INT, name VARCHAR, location VARCHAR, years_of_experience INT); ",SELECT name FROM Farmers WHERE years_of_experience < 5;,SELECT name FROM Farmers WHERE years_of_experience 5;,0 "Which traditional art forms in India have more than 5000 practitioners, listed alphabetically by art form?","CREATE TABLE TraditionalArtForms (ArtForm VARCHAR(255), NumberOfPractitioners INT); ","SELECT ArtForm, NumberOfPractitioners FROM TraditionalArtForms WHERE NumberOfPractitioners > 5000 ORDER BY ArtForm ASC;","SELECT ArtForm, NumberOfPractitioners FROM TraditionalArtForms WHERE NumberOfPractitioners > 5000 GROUP BY ArtForm;",0 Which player was drafted after round 9 and number 464 overall?,"CREATE TABLE table_name_83 (player VARCHAR, round VARCHAR, overall VARCHAR);",SELECT player FROM table_name_83 WHERE round > 9 AND overall = 464;,SELECT player FROM table_name_83 WHERE round > 9 AND overall = 464;,1 Which cruelty-free cosmetic brands are most popular among consumers in the Indian market?,"CREATE TABLE cosmetics_purchases (brand TEXT, product_id INT, is_cruelty_free BOOLEAN, country TEXT);","SELECT brand, is_cruelty_free, COUNT(*) as num_purchases FROM cosmetics_purchases WHERE country = 'India' AND is_cruelty_free = TRUE GROUP BY brand, is_cruelty_free ORDER BY num_purchases DESC;","SELECT brand, COUNT(*) FROM cosmetics_purchases WHERE is_cruelty_free = true AND country = 'India' GROUP BY brand ORDER BY COUNT(*) DESC LIMIT 1;",0 Get the total number of wells in each state,"CREATE TABLE wells (id INT, state VARCHAR(2), cost FLOAT); ","SELECT state, COUNT(*) FROM wells GROUP BY state;","SELECT state, COUNT(*) FROM wells GROUP BY state;",1 What date was the Italian Grand Prix?,"CREATE TABLE table_name_12 (date VARCHAR, race VARCHAR);","SELECT date FROM table_name_12 WHERE race = ""italian grand prix"";","SELECT date FROM table_name_12 WHERE race = ""italy grand prix"";",0 What is the name of the tallest building?,"CREATE TABLE building (name VARCHAR, height_feet VARCHAR);",SELECT name FROM building ORDER BY height_feet DESC LIMIT 1;,SELECT name FROM building ORDER BY height_feet DESC LIMIT 1;,1 What is the highest area for locations named Centreville having populations over 532?,"CREATE TABLE table_name_84 (area_km_2 INTEGER, population VARCHAR, official_name VARCHAR);","SELECT MAX(area_km_2) FROM table_name_84 WHERE population > 532 AND official_name = ""centreville"";","SELECT MAX(area_km_2) FROM table_name_84 WHERE population > 532 AND official_name = ""centreville"";",1 What are the top 5 most watched TV shows by users?,"CREATE TABLE tv_shows (id INT, title VARCHAR(255), viewership INT); ","SELECT title, viewership FROM tv_shows ORDER BY viewership DESC LIMIT 5;","SELECT title, viewership FROM tv_shows ORDER BY viewership DESC LIMIT 5;",1 Which number has 11 males?,"CREATE TABLE table_name_41 (number VARCHAR, males VARCHAR);","SELECT number FROM table_name_41 WHERE males = ""11"";",SELECT number FROM table_name_41 WHERE males = 11;,0 How many peacekeeping operations were conducted in 2010?,"CREATE TABLE PeacekeepingOperations (Year INT, Operation VARCHAR(50), Country VARCHAR(50)); ",SELECT COUNT(*) FROM PeacekeepingOperations WHERE Year = 2010;,SELECT COUNT(*) FROM PeacekeepingOperations WHERE Year = 2010;,1 What are the top 3 countries with the highest number of excavated artifacts?,"CREATE TABLE ArtifactsByCountry (Country TEXT, ArtifactCount INT); ","SELECT Country, ArtifactCount FROM ArtifactsByCountry ORDER BY ArtifactCount DESC LIMIT 3;","SELECT Country, COUNT(*) as ArtifactCount FROM ArtifactsByCountry GROUP BY Country ORDER BY ArtifactCount DESC LIMIT 3;",0 "What is the maximum, minimum, and average budget for support programs by disability type?","CREATE TABLE support_programs (program_id INT, program_name VARCHAR(50), budget INT, disability_type VARCHAR(50)); ","SELECT disability_type, MAX(budget) as max_budget, MIN(budget) as min_budget, AVG(budget) as avg_budget FROM support_programs GROUP BY disability_type;","SELECT disability_type, MAX(budget) as max_budget, MIN(budget) as min_budget, AVG(budget) as avg_budget FROM support_programs GROUP BY disability_type;",1 List all mining sites and their corresponding environmental impact scores and locations.,"CREATE TABLE Mining_Sites (id INT, site_name VARCHAR(50), location VARCHAR(50), environmental_impact_score INT); ","SELECT site_name, location, environmental_impact_score FROM Mining_Sites;","SELECT site_name, environmental_impact_score, location FROM Mining_Sites;",0 What is the average salary of female workers in the manufacturing sector in Mexico?,"CREATE TABLE manufacturing_sector (id INT, country VARCHAR(50), industry VARCHAR(50), worker_count INT, avg_salary DECIMAL(10, 2), gender VARCHAR(10)); ",SELECT AVG(ms.avg_salary) as avg_salary FROM manufacturing_sector ms WHERE ms.country = 'Mexico' AND ms.gender = 'Female';,SELECT AVG(avg_salary) FROM manufacturing_sector WHERE country = 'Mexico' AND gender = 'Female';,0 "What is the total number of vessels and their average speed in the Baltic Sea, grouped by their speed category?","CREATE TABLE vessel_speeds (id INT, vessel_name VARCHAR(50), region VARCHAR(50), speed DECIMAL(5,2)); CREATE VIEW speed_categories AS SELECT 0 AS lower_limit, 10 AS upper_limit UNION SELECT 10, 20 UNION SELECT 20, 30;","SELECT IF(speed < 10, 'Slow', IF(speed >= 10 AND speed < 20, 'Medium', 'Fast')) AS speed_category, COUNT(*) AS total_vessels, AVG(speed) AS avg_speed FROM vessel_speeds WHERE region = 'Baltic Sea' GROUP BY speed_category; SELECT * FROM speed_categories;","SELECT speed_categories, COUNT(*) as total_vessels, AVG(speed) as avg_speed FROM vessel_speeds WHERE region = 'Baltic Sea' GROUP BY speed_categories;",0 What team were the Bulls hosted by on December 7?,"CREATE TABLE table_11960610_7 (team VARCHAR, date VARCHAR);","SELECT team FROM table_11960610_7 WHERE date = ""December 7"";","SELECT team FROM table_11960610_7 WHERE date = ""December 7"";",1 "What is the result of nominee, Patricia McGourty, for the drama desk award?","CREATE TABLE table_name_17 (result VARCHAR, award VARCHAR, nominee VARCHAR);","SELECT result FROM table_name_17 WHERE award = ""drama desk award"" AND nominee = ""patricia mcgourty"";","SELECT result FROM table_name_17 WHERE award = ""drama desk award"" AND nominee = ""patrick mcgourty"";",0 What is the maximum power of engine code 2e?,"CREATE TABLE table_name_95 (max_power_at_rpm VARCHAR, engine_code_s_ VARCHAR);","SELECT max_power_at_rpm FROM table_name_95 WHERE engine_code_s_ = ""2e"";","SELECT max_power_at_rpm FROM table_name_95 WHERE engine_code_s_ = ""2e"";",1 how many number is located at registration f-bvff?,"CREATE TABLE table_1997759_1 (number VARCHAR, registration VARCHAR);","SELECT COUNT(number) FROM table_1997759_1 WHERE registration = ""F-BVFF"";","SELECT COUNT(number) FROM table_1997759_1 WHERE registration = ""F-BVFFF"";",0 Which visitor has a record of 2-4?,"CREATE TABLE table_name_39 (visitor VARCHAR, record VARCHAR);","SELECT visitor FROM table_name_39 WHERE record = ""2-4"";","SELECT visitor FROM table_name_39 WHERE record = ""2-4"";",1 What is the traditional with density of 820?,"CREATE TABLE table_2135222_2 (traditional VARCHAR, density VARCHAR);",SELECT traditional FROM table_2135222_2 WHERE density = 820;,SELECT traditional FROM table_2135222_2 WHERE density = 820;,1 What is the maximum daily production rate of gas wells in the Mediterranean Sea that were drilled after 2016?,"CREATE TABLE mediterranean_sea (id INT, well_name VARCHAR(255), drill_date DATE, daily_production_gas FLOAT);",SELECT MAX(daily_production_gas) as max_daily_production_gas FROM mediterranean_sea WHERE drill_date > '2016-12-31';,SELECT MAX(daily_production_gas) FROM mediterranean_sea WHERE drill_date > '2016-01-01';,0 Which regions had a precipitation amount higher than 850 in the years they experienced droughts in 2018 or 2019?,"CREATE TABLE precipitation (region VARCHAR(255), year INT, precipitation_amount INT); CREATE TABLE drought_info (region VARCHAR(255), year INT, severity INT); ",SELECT p.region FROM precipitation p JOIN drought_info d ON p.region = d.region WHERE (p.precipitation_amount > 850 AND d.year = p.year AND d.severity > 0) AND (d.year = 2018 OR d.year = 2019);,"SELECT precipitation.region, precipitation_amount FROM precipitation INNER JOIN drought_info ON precipitation.region = drought_info.region WHERE precipitation_amount > 850 AND drought_info.year IN (2018, 2019);",0 What is the hometown of the player who attended Ohio State?,"CREATE TABLE table_name_35 (hometown VARCHAR, college VARCHAR);","SELECT hometown FROM table_name_35 WHERE college = ""ohio state"";","SELECT hometown FROM table_name_35 WHERE college = ""ohio state"";",1 What is the total labor productivity for all mines?,"CREATE TABLE mines (mine_id INT, name TEXT, location TEXT, productivity FLOAT); ",SELECT SUM(productivity) FROM mines;,SELECT SUM(productivity) FROM mines;,1 What is the trend of video views for the top 5 content creators in Europe over time?,"CREATE TABLE content_creators (id INT, name VARCHAR(50), country VARCHAR(50), views BIGINT, date DATE); ","SELECT name, country, date, views FROM content_creators WHERE country = 'Europe' ORDER BY date;","SELECT name, country, views, ROW_NUMBER() OVER (ORDER BY views DESC) as rank FROM content_creators WHERE country IN ('Germany', 'France', 'Italy', 'Italy', 'France', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy', 'Italy",0 Name the snatch when body weight is 73.7,"CREATE TABLE table_16779068_5 (snatch VARCHAR, body_weight VARCHAR);","SELECT snatch FROM table_16779068_5 WHERE body_weight = ""737"";","SELECT snatch FROM table_16779068_5 WHERE body_weight = ""73.7"";",0 What opponent was playing against the Golden Bears when they scored 3 points?,"CREATE TABLE table_21035326_1 (opponent VARCHAR, golden_bears_points VARCHAR);",SELECT opponent FROM table_21035326_1 WHERE golden_bears_points = 3;,"SELECT opponent FROM table_21035326_1 WHERE golden_bears_points = ""3"";",0 Count the unique materials at 'Museum X'?,"CREATE TABLE Museum_X (Artifact_ID INT, Material VARCHAR(255)); ",SELECT COUNT(DISTINCT Material) FROM Museum_X;,SELECT DISTINCT Material FROM Museum_X;,0 Identify the suppliers who have provided both conventional and organic produce in the past year.,"CREATE TABLE suppliers (supplier_id INT, supplier_name TEXT);CREATE TABLE produce (produce_id INT, produce_name TEXT, is_organic BOOLEAN, last_delivery_date DATE);CREATE TABLE deliveries (supplier_id INT, produce_id INT);","SELECT suppliers.supplier_name FROM suppliers JOIN deliveries ON suppliers.supplier_id = deliveries.supplier_id JOIN produce ON deliveries.produce_id = produce.produce_id WHERE produce.is_organic = TRUE AND produce.last_delivery_date >= DATEADD(year, -1, GETDATE()) INTERSECT SELECT suppliers.supplier_name FROM suppliers JOIN deliveries ON suppliers.supplier_id = deliveries.supplier_id JOIN produce ON deliveries.produce_id = produce.produce_id WHERE produce.is_organic = FALSE AND produce.last_delivery_date >= DATEADD(year, -1, GETDATE());","SELECT suppliers.supplier_name FROM suppliers INNER JOIN deliveries ON suppliers.supplier_id = deliveries.supplier_id INNER JOIN produce ON deliveries.produce_id = produce.produce_id WHERE produce.is_organic = true AND deliveries.last_delivery_date >= DATEADD(year, -1, GETDATE());",0 "What is the total number of artworks in the artworks table, excluding those from the United States, grouped by continent?","CREATE TABLE artworks (artwork_id INT, artwork_name TEXT, artist_name TEXT, country TEXT); CREATE TABLE country_continent (country TEXT, continent TEXT);","SELECT continent, COUNT(DISTINCT artwork_id) FROM artworks JOIN country_continent ON artworks.country = country_continent.country WHERE country != 'United States' GROUP BY continent;","SELECT continent, COUNT(*) FROM artworks JOIN country_continent ON artworks.country = country_continent.country WHERE country!= 'United States' GROUP BY continent;",0 What is the average engagement time for virtual tours of hotels in the Middle East?,"CREATE TABLE virtual_tours (tour_id INT, hotel_id INT, country TEXT, engagement_time INT); ",SELECT AVG(engagement_time) FROM virtual_tours WHERE country = 'Middle East';,SELECT AVG(engagement_time) FROM virtual_tours WHERE country = 'Middle East';,1 "What is the average Total, when Gold is 0, and when Nation is Iran?","CREATE TABLE table_name_71 (total INTEGER, gold VARCHAR, nation VARCHAR);","SELECT AVG(total) FROM table_name_71 WHERE gold = 0 AND nation = ""iran"";","SELECT AVG(total) FROM table_name_71 WHERE gold = 0 AND nation = ""iran"";",1 Link parity laws to regions affected,"CREATE TABLE MentalHealthParity (LawID INT PRIMARY KEY, LawName TEXT, LawDescription TEXT, PassedDate DATE, AffectedRegion TEXT); ",ALTER TABLE MentalHealthParity ADD CONSTRAINT FK_MentalHealthParity_Region FOREIGN KEY (AffectedRegion) REFERENCES Region(RegionName);,"SELECT AffectedRegion, LawName FROM MentalHealthParity;",0 Which pathways have at least 5 genes involved?,"CREATE TABLE GenePathways (gene_id INT, gene_name TEXT, pathway TEXT); ","SELECT pathway, COUNT(*) FROM GenePathways GROUP BY pathway HAVING COUNT(*) >= 5;",SELECT pathway FROM GenePathways GROUP BY pathway HAVING COUNT(*) >= 5;,0 What is the average pollution level in the ocean floor mapping projects located in the Pacific region?,"CREATE TABLE pollution_control(id INT, project VARCHAR(50), region VARCHAR(20), pollution_level FLOAT); ",SELECT AVG(pollution_level) FROM pollution_control WHERE region = 'Pacific';,SELECT AVG(pollution_level) FROM pollution_control WHERE region = 'Pacific';,1 Find the average number of legal aid servings per year in Texas.,"CREATE TABLE legal_aid_servings (serving_id INT, serviced_state VARCHAR(20), servicing_year INT); ",SELECT AVG(servicing_year) FROM legal_aid_servings WHERE serviced_state = 'Texas';,SELECT AVG(serviced_year) FROM legal_aid_servings WHERE serviced_state = 'Texas';,0 "What is the frequency of the station located in polangui, albay?","CREATE TABLE table_27588823_2 (frequency VARCHAR, location VARCHAR);","SELECT frequency FROM table_27588823_2 WHERE location = ""Polangui, Albay"";","SELECT frequency FROM table_27588823_2 WHERE location = ""Polangui, Albay"";",1 What rank does Tricia Flores have?,"CREATE TABLE table_name_22 (rank VARCHAR, name VARCHAR);","SELECT rank FROM table_name_22 WHERE name = ""tricia flores"";","SELECT rank FROM table_name_22 WHERE name = ""tricia fleures"";",0 How many bridges in Texas have a length greater than 500 meters?,"CREATE TABLE bridges (id INT, name VARCHAR(50), state VARCHAR(50), length FLOAT); ",SELECT COUNT(*) FROM bridges WHERE state = 'Texas' AND length > 500;,SELECT COUNT(*) FROM bridges WHERE state = 'Texas' AND length > 500;,1 How many players made 4 touchdowns?,"CREATE TABLE table_14342210_14 (player VARCHAR, touchdowns__5_points_ VARCHAR);",SELECT COUNT(player) FROM table_14342210_14 WHERE touchdowns__5_points_ = 4;,SELECT COUNT(player) FROM table_14342210_14 WHERE touchdowns__5_points_ = 4;,1 Name the party with end date of 22 november 1980,"CREATE TABLE table_name_2 (party VARCHAR, end_date VARCHAR);","SELECT party FROM table_name_2 WHERE end_date = ""22 november 1980"";","SELECT party FROM table_name_2 WHERE end_date = ""22 november 1980"";",1 What is the total biomass of coral reefs in the Atlantic Ocean region in the 'MarineLife' schema?,"CREATE SCHEMA MarineLife;CREATE TABLE CoralReefs (id INT, region TEXT, biomass REAL); ","SELECT region, SUM(biomass) AS total_biomass FROM MarineLife.CoralReefs WHERE region = 'Atlantic Ocean' GROUP BY region;",SELECT SUM(biomass) FROM MarineLife.CoralReefs WHERE region = 'Atlantic Ocean';,0 What is the lowest Total Medals that has madison independent and Bronze Medals larger than 0,"CREATE TABLE table_name_76 (total_medals INTEGER, ensemble VARCHAR, bronze_medals VARCHAR);","SELECT MIN(total_medals) FROM table_name_76 WHERE ensemble = ""madison independent"" AND bronze_medals > 0;","SELECT MIN(total_medals) FROM table_name_76 WHERE ensemble = ""madison independent"" AND bronze_medals > 0;",1 What is the minimum number of followers for users from the United Kingdom who have posted about #sports in the last month?,"CREATE TABLE users (id INT, country VARCHAR(255), followers INT); CREATE TABLE posts (id INT, user_id INT, hashtags VARCHAR(255), post_date DATE);","SELECT MIN(users.followers) FROM users INNER JOIN posts ON users.id = posts.user_id WHERE users.country = 'United Kingdom' AND hashtags LIKE '%#sports%' AND post_date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH);","SELECT MIN(followers) FROM users JOIN posts ON users.id = posts.user_id WHERE users.country = 'United Kingdom' AND hashtags LIKE '%#sports%' AND post_date >= DATEADD(month, -1, GETDATE());",0 What is the name of the circuit in which the race name is ii danish grand prix?,"CREATE TABLE table_1140105_6 (circuit VARCHAR, race_name VARCHAR);","SELECT circuit FROM table_1140105_6 WHERE race_name = ""II Danish Grand Prix"";","SELECT circuit FROM table_1140105_6 WHERE race_name = ""II Danish Grand Prix"";",1 Which properties in 'SustainableCity' have inclusive housing policies and what are their co-owners' names?,"CREATE TABLE properties (id INT, address VARCHAR(255), city VARCHAR(255), state VARCHAR(255), price INT, policy_type VARCHAR(255)); CREATE TABLE co_owners (property_id INT, owner_name VARCHAR(255)); ","SELECT properties.address, co_owners.owner_name FROM properties INNER JOIN co_owners ON properties.id = co_owners.property_id WHERE properties.city = 'SustainableCity' AND properties.policy_type = 'Inclusive';","SELECT properties.address, co_owners.owner_name FROM properties INNER JOIN co_owners ON properties.id = co_owners.property_id WHERE properties.city = 'SustainableCity' AND policies.policy_type = 'Inclusive';",0 What is the highest swimsuit score of the contestant with an evening gown larger than 9.175 and an interview score less than 8.425?,"CREATE TABLE table_name_91 (swimsuit INTEGER, evening_gown VARCHAR, interview VARCHAR);",SELECT MAX(swimsuit) FROM table_name_91 WHERE evening_gown > 9.175 AND interview < 8.425;,SELECT MAX(swimsuit) FROM table_name_91 WHERE evening_gown > 9.175 AND interview 8.425;,0 What is the maximum environmental impact score for mining sites located in 'Texas'?,"CREATE TABLE mining_sites (site_id INT, site_name VARCHAR(50), state VARCHAR(20));CREATE VIEW environmental_impact AS SELECT site_id, SUM(pollution_level) AS total_impact FROM pollution_data GROUP BY site_id;",SELECT MAX(e.total_impact) FROM mining_sites s INNER JOIN environmental_impact e ON s.site_id = e.site_id WHERE s.state = 'Texas';,SELECT MAX(total_impact) FROM environmental_impact WHERE state = 'Texas';,0 Who wrote episode number 19 in the series?,"CREATE TABLE table_28140578_1 (written_by VARCHAR, no_in_series VARCHAR);",SELECT written_by FROM table_28140578_1 WHERE no_in_series = 19;,SELECT written_by FROM table_28140578_1 WHERE no_in_series = 19;,1 how many party with dbeingtrict being alabama 6,"CREATE TABLE table_1342270_3 (party VARCHAR, district VARCHAR);","SELECT COUNT(party) FROM table_1342270_3 WHERE district = ""Alabama 6"";","SELECT COUNT(party) FROM table_1342270_3 WHERE district = ""Alabama 6"";",1 List the number of successful and unsuccessful mediation cases by mediator name,"CREATE TABLE Mediations (MediatorName TEXT, Outcome TEXT, Cases INT); ","SELECT MediatorName, SUM(CASE WHEN Outcome = 'Success' THEN Cases ELSE 0 END) AS SuccessfulCases, SUM(CASE WHEN Outcome = 'Failure' THEN Cases ELSE 0 END) AS UnsuccessfulCases FROM Mediations GROUP BY MediatorName;","SELECT MediatorName, SUM(Cases) as TotalCases, SUM(Cases) as TotalCases FROM Mediations GROUP BY MediatorName;",0 Which district has candidates is dick gephardt (d) 81.9% lee buchschacher (r) 18.1%?,"CREATE TABLE table_1341663_26 (district VARCHAR, candidates VARCHAR);","SELECT district FROM table_1341663_26 WHERE candidates = ""Dick Gephardt (D) 81.9% Lee Buchschacher (R) 18.1%"";","SELECT district FROM table_1341663_26 WHERE candidates = ""Dick Gephardt (D) 81.9% Lee Buchschacher (R) 18.1%"";",1 How many rounds were run in New South Wales?,"CREATE TABLE table_name_84 (round VARCHAR, state VARCHAR);","SELECT COUNT(round) FROM table_name_84 WHERE state = ""new south wales"";","SELECT COUNT(round) FROM table_name_84 WHERE state = ""new south wales"";",1 "What was the winning time for the winning horse, Kentucky ii?","CREATE TABLE table_name_49 (time VARCHAR, winner VARCHAR);","SELECT time FROM table_name_49 WHERE winner = ""kentucky ii"";","SELECT time FROM table_name_49 WHERE winner = ""kentucky ii"";",1 How many green energy projects were funded in Asia in the last 5 years?,"CREATE TABLE green_energy_projects (id INT, funded DATE, region VARCHAR(50)); ","SELECT COUNT(*) FROM green_energy_projects WHERE region = 'Asia' AND funded >= DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR);","SELECT COUNT(*) FROM green_energy_projects WHERE region = 'Asia' AND funded >= DATEADD(year, -5, GETDATE());",0 What team belongs to Delmar?,"CREATE TABLE table_name_36 (team VARCHAR, school VARCHAR);","SELECT team FROM table_name_36 WHERE school = ""delmar"";","SELECT team FROM table_name_36 WHERE school = ""delmar"";",1 What is the Heat of the Player with a Rank of 18 or less and Result of 55.15?,"CREATE TABLE table_name_54 (heat VARCHAR, rank VARCHAR, result VARCHAR);","SELECT heat FROM table_name_54 WHERE rank < 18 AND result = ""55.15"";","SELECT heat FROM table_name_54 WHERE rank 18 AND result = ""55.15"";",0 What are the top 3 genres by song count in the songs table?,"CREATE TABLE songs (id INT, title VARCHAR(255), genre VARCHAR(255)); ","SELECT genre, COUNT(*) FROM songs GROUP BY genre ORDER BY COUNT(*) DESC LIMIT 3;","SELECT genre, COUNT(*) as song_count FROM songs GROUP BY genre ORDER BY song_count DESC LIMIT 3;",0 What is the percentage of recycling facilities that are in the state of California?,"CREATE TABLE recycling_facilities (id INT, state VARCHAR(20), type VARCHAR(20)); ",SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM recycling_facilities)) AS percentage_of_recycling_facilities FROM recycling_facilities WHERE state = 'California';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM recycling_facilities WHERE state = 'California')) AS percentage FROM recycling_facilities WHERE state = 'California';,0 Delete records in the 'public_transportation' table where 'route_length' is less than 10 miles,"CREATE TABLE public_transportation (id INT, route_id VARCHAR(255), route_length FLOAT, type VARCHAR(255));",DELETE FROM public_transportation WHERE route_length < 10;,DELETE FROM public_transportation WHERE route_length 10;,0 Name the date for Loss of schilling (5–2),"CREATE TABLE table_name_31 (date VARCHAR, loss VARCHAR);","SELECT date FROM table_name_31 WHERE loss = ""schilling (5–2)"";","SELECT date FROM table_name_31 WHERE loss = ""schilling (5–2)"";",1 What is the number of female members in the FitnessMembers table and the number of members who subscribed in January from the OnlineMembers table?,"CREATE TABLE FitnessMembers (member_id INT, name VARCHAR(50), age INT, gender VARCHAR(10)); CREATE TABLE OnlineMembers (member_id INT, name VARCHAR(50), age INT, subscription_date DATE); ",SELECT COUNT(*) FROM FitnessMembers WHERE gender = 'Female' UNION SELECT COUNT(*) FROM OnlineMembers WHERE subscription_date LIKE '2022-01%';,SELECT COUNT(*) FROM FitnessMembers fm JOIN OnlineMembers om ON fm.member_id = om.member_id WHERE fm.gender = 'Female' AND om.subscription_date BETWEEN '2022-01-01' AND '2022-01-31';,0 Which support programs are not being utilized by students with hearing impairments?,"CREATE TABLE SupportPrograms (ProgramID INT, ProgramName VARCHAR(50), ProgramType VARCHAR(50)); CREATE TABLE StudentDisabilities (StudentID INT, DisabilityType VARCHAR(50)); CREATE TABLE StudentPrograms (StudentID INT, ProgramID INT); ","SELECT sp.ProgramName, sp.ProgramType FROM SupportPrograms sp LEFT JOIN StudentPrograms spj ON sp.ProgramID = spj.ProgramID LEFT JOIN StudentDisabilities sd ON spj.StudentID = sd.StudentID WHERE sd.DisabilityType IS NULL;",SELECT SupportPrograms.ProgramName FROM SupportPrograms INNER JOIN StudentPrograms ON SupportPrograms.ProgramID = StudentPrograms.ProgramID INNER JOIN StudentDisabilities ON StudentPrograms.StudentID = StudentPrograms.StudentID WHERE StudentDisabilities.DisabilityType IS NULL;,0 What is the total quantity of unsold size 2XL clothing in the warehouse?,"CREATE TABLE Inventory (id INT, product_id INT, size VARCHAR(10), quantity INT); ",SELECT SUM(quantity) FROM Inventory WHERE size = '2XL' AND quantity > 0;,SELECT SUM(quantity) FROM Inventory WHERE size = '2XL';,0 How many public bike sharing programs are available in a given city?,"CREATE TABLE City (city_id INT, city_name VARCHAR(50)); CREATE TABLE Program (program_id INT, program_name VARCHAR(50), city_id INT);",SELECT COUNT(*) as num_programs FROM Program WHERE city_id = 'CityId';,SELECT COUNT(*) FROM Program p JOIN City c ON p.city_id = c.city_id WHERE p.program_name = 'Bike Sharing';,0 Show the total fare collected per route and day of the week in the 'payment' and 'route' tables,"CREATE SCHEMA IF NOT EXISTS public_transport;CREATE TABLE IF NOT EXISTS public_transport.payment (payment_id SERIAL PRIMARY KEY, passenger_id INTEGER, route_id INTEGER, fare DECIMAL, payment_date DATE);CREATE TABLE IF NOT EXISTS public_transport.route (route_id INTEGER PRIMARY KEY, route_name TEXT);","SELECT EXTRACT(DOW FROM payment_date) AS day_of_week, route_id, SUM(fare) FROM public_transport.payment JOIN public_transport.route ON payment.route_id = route.route_id GROUP BY EXTRACT(DOW FROM payment_date), route_id;","SELECT r.route_name, SUM(p.fare) as total_fare FROM public_transport.payment p JOIN public_transport.route r ON p.route_id = r.route_id GROUP BY r.route_name, DATE_FORMAT(p.payment_date, '%Y-%m') GROUP BY r.route_name;",0 What was the date for game 6?,"CREATE TABLE table_name_66 (date VARCHAR, game VARCHAR);",SELECT date FROM table_name_66 WHERE game = 6;,SELECT date FROM table_name_66 WHERE game = 6;,1 Are there SPI on the number 7 cylinder?,"CREATE TABLE table_16731248_1 (spi VARCHAR, number_on_cyl VARCHAR);","SELECT spi FROM table_16731248_1 WHERE number_on_cyl = ""7"";","SELECT spi FROM table_16731248_1 WHERE number_on_cyl = ""7"";",1 Which Opponent has the Event of Sengoku 1?,"CREATE TABLE table_name_94 (opponent VARCHAR, event VARCHAR);","SELECT opponent FROM table_name_94 WHERE event = ""sengoku 1"";","SELECT opponent FROM table_name_94 WHERE event = ""sengoku 1"";",1 On what Date is Carlton the Away Team?,"CREATE TABLE table_name_98 (date VARCHAR, away_team VARCHAR);","SELECT date FROM table_name_98 WHERE away_team = ""carlton"";","SELECT date FROM table_name_98 WHERE away_team = ""carlton"";",1 What are the names of the contractors who have completed at least one sustainable building project?,"CREATE TABLE Contractors (ContractorID INT, ContractorName TEXT); CREATE TABLE SustainableProjects (ProjectID INT, ContractorID INT); ",SELECT ContractorName FROM Contractors C INNER JOIN SustainableProjects SP ON C.ContractorID = SP.ContractorID GROUP BY ContractorName;,SELECT ContractorName FROM Contractors INNER JOIN SustainableProjects ON Contractors.ContractorID = SustainableProjects.ContractorID GROUP BY ContractorName HAVING COUNT(DISTINCT SustainableProjects.ProjectID) >= 1;,0 List the titles of all videos and articles that contain words related to 'diversity' or 'inclusion'.,"CREATE TABLE articles (id INT, title TEXT, content TEXT); CREATE TABLE videos (id INT, title TEXT, url TEXT); ",SELECT title FROM articles WHERE lower(content) LIKE '%diversity%' OR lower(content) LIKE '%inclusion%' UNION SELECT title FROM videos WHERE lower(title) LIKE '%diversity%' OR lower(title) LIKE '%inclusion%';,SELECT v.title FROM videos v JOIN articles a ON v.id = a.id WHERE a.content LIKE '%diversity%' OR a.content LIKE '%inclusion%';,0 What is the make of the car that drove 54 laps?,"CREATE TABLE table_name_26 (constructor VARCHAR, laps VARCHAR);",SELECT constructor FROM table_name_26 WHERE laps = 54;,SELECT constructor FROM table_name_26 WHERE laps = 54;,1 What are the names of countries involved in cybersecurity incidents in the past 2 years?,"CREATE TABLE Cybersecurity_Incidents (country TEXT, year INTEGER); ",SELECT DISTINCT country FROM Cybersecurity_Incidents WHERE year >= 2018;,SELECT country FROM Cybersecurity_Incidents WHERE year >= YEAR(CURRENT_DATE) - 2;,0 What are the names and areas of countries with the top 5 largest area?,"CREATE TABLE country (Name VARCHAR, SurfaceArea VARCHAR);","SELECT Name, SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5;","SELECT Name, SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5;",1 What are the names and quantities of military equipment sold to Canada by Lockheed Martin?,"CREATE TABLE MilitaryEquipmentSales (equipmentName VARCHAR(255), quantity INT, company VARCHAR(255), country VARCHAR(255)); ","SELECT equipmentName, quantity FROM MilitaryEquipmentSales WHERE company = 'Lockheed Martin' AND country = 'Canada';","SELECT equipmentName, quantity FROM MilitaryEquipmentSales WHERE company = 'Lockheed Martin' AND country = 'Canada';",1 "What is City of License, when Frequency is 101.1?","CREATE TABLE table_name_20 (city_of_license VARCHAR, frequency VARCHAR);","SELECT city_of_license FROM table_name_20 WHERE frequency = ""101.1"";","SELECT city_of_license FROM table_name_20 WHERE frequency = ""101.1"";",1 Find the volunteer who has volunteered the most hours in total?,"CREATE TABLE VolunteerHours (VolunteerID int, Name varchar(50), Hours numeric(5,2)); ","SELECT Name, SUM(Hours) OVER (PARTITION BY Name) AS TotalHours FROM VolunteerHours ORDER BY TotalHours DESC LIMIT 1;","SELECT VolunteerID, Name, SUM(Hours) as TotalHours FROM VolunteerHours GROUP BY VolunteerID, Name ORDER BY TotalHours DESC LIMIT 1;",0 What is the score for the Dec 11 game?,"CREATE TABLE table_name_83 (score VARCHAR, december VARCHAR);",SELECT score FROM table_name_83 WHERE december = 11;,"SELECT score FROM table_name_83 WHERE december = ""11"";",0 How many marine mammals are found in the Arctic Ocean?,"CREATE TABLE marine_mammals (name TEXT, ocean TEXT);",SELECT COUNT(*) FROM marine_mammals WHERE ocean = 'Arctic Ocean';,SELECT COUNT(*) FROM marine_mammals WHERE ocean = 'Arctic Ocean';,1 What year had the supernova award?,"CREATE TABLE table_name_46 (year VARCHAR, category VARCHAR);","SELECT year FROM table_name_46 WHERE category = ""supernova award"";","SELECT year FROM table_name_46 WHERE category = ""supernova award"";",1 "What is the total capacity of all vessels owned by company ""OceanServe"" that were built after 2010?","CREATE TABLE company (id INT, name VARCHAR(255)); CREATE TABLE vessel (id INT, company_id INT, capacity INT, build_year INT); ",SELECT SUM(vessel.capacity) FROM vessel INNER JOIN company ON vessel.company_id = company.id WHERE company.name = 'OceanServe' AND vessel.build_year > 2010;,SELECT SUM(vessel.capacity) FROM vessel JOIN company ON vessel.company_id = company.id WHERE company.name = 'OceanServe' AND vessel.build_year > 2010;,0 "What is the count of total applicants, interviewed applicants, and hired applicants by job position for the Sales department?","CREATE TABLE ApplicantData (ApplicantID int, JobPosition varchar(20), ApplicantType varchar(10), Department varchar(20)); ","SELECT JobPosition, COUNT(CASE WHEN ApplicantType = 'Applicant' THEN 1 END) AS TotalApplicants, COUNT(CASE WHEN ApplicantType = 'Interviewed' THEN 1 END) AS InterviewedApplicants, COUNT(CASE WHEN ApplicantType = 'Hired' THEN 1 END) AS HiredApplicants FROM ApplicantData WHERE Department = 'Sales' GROUP BY JobPosition;","SELECT JobPosition, SUM(CASE WHEN ApplicantType = 'Interviewed' THEN 1 ELSE 0 END) AS TotalApplicants, SUM(CASE WHEN ApplicantType = 'Hired' THEN 1 ELSE 0 END) AS InterviewApplicants, SUM(CASE WHEN ApplicantType = 'Hired' THEN 1 ELSE 0 END) AS HireApplicants FROM ApplicantData WHERE Department = 'Sales' GROUP BY JobPosition;",0 What was the try bonus for the team with 25 tries for?,"CREATE TABLE table_name_56 (try_bonus VARCHAR, tries_for VARCHAR);","SELECT try_bonus FROM table_name_56 WHERE tries_for = ""25"";","SELECT try_bonus FROM table_name_56 WHERE tries_for = ""25"";",1 Who is the captain of the Gloucestershire Gladiators? ,"CREATE TABLE table_18461635_1 (captain VARCHAR, team VARCHAR);","SELECT captain FROM table_18461635_1 WHERE team = ""Gloucestershire Gladiators"";","SELECT captain FROM table_18461635_1 WHERE team = ""Gloucestershire Gladiators"";",1 In what year was the movie 8 women up for a César Award?,"CREATE TABLE table_name_70 (year INTEGER, movie VARCHAR, awards VARCHAR);","SELECT MIN(year) FROM table_name_70 WHERE movie = ""8 women"" AND awards = ""césar award"";","SELECT SUM(year) FROM table_name_70 WHERE movie = ""8 women"" AND awards = ""césar award"";",0 Find the average CO2 emissions of the top 5 cities with the highest emissions in the agriculture sector.,"CREATE TABLE emissions (city VARCHAR(20), sector VARCHAR(20), co2_emissions INT); ",SELECT AVG(co2_emissions) FROM (SELECT * FROM emissions WHERE sector = 'agriculture' ORDER BY co2_emissions DESC LIMIT 5);,"SELECT city, AVG(co2_emissions) as avg_co2_emissions FROM emissions WHERE sector = 'Agriculture' GROUP BY city ORDER BY avg_co2_emissions DESC LIMIT 5;",0 Who were the candidates in the election in the Tennessee 9 district? ,"CREATE TABLE table_1342370_41 (candidates VARCHAR, district VARCHAR);","SELECT candidates FROM table_1342370_41 WHERE district = ""Tennessee 9"";","SELECT candidates FROM table_1342370_41 WHERE district = ""Tennessee 9"";",1 What are the names and locations of the eco-friendly accommodations in South America?,"CREATE TABLE Accommodations_South_America (id INT, name VARCHAR(50), location VARCHAR(50), type VARCHAR(50)); ","SELECT name, location FROM Accommodations_South_America WHERE type = 'Eco-Friendly';","SELECT name, location FROM Accommodations_South_America WHERE type = 'Eco-friendly';",0 What's the TNS-Sofres when Ipsos was 27%?,"CREATE TABLE table_name_51 (tns_sofres_6_2_09 VARCHAR, ipsos_6_3_09 VARCHAR);","SELECT tns_sofres_6_2_09 FROM table_name_51 WHERE ipsos_6_3_09 = ""27%"";","SELECT tns_sofres_6_2_09 FROM table_name_51 WHERE ipsos_6_3_09 = ""27%"";",1 Identify the number of organizations in each sector that have ESG scores below 60.,"CREATE TABLE org_sector_2 (id INT, org VARCHAR(100), sector VARCHAR(50), ESG_score FLOAT); ","SELECT sector, COUNT(*) as num_orgs FROM org_sector_2 WHERE ESG_score < 60 GROUP BY sector;","SELECT sector, COUNT(*) FROM org_sector_2 WHERE ESG_score 60 GROUP BY sector;",0 What was the Attendance on Week 10?,"CREATE TABLE table_name_34 (attendance VARCHAR, week VARCHAR);",SELECT attendance FROM table_name_34 WHERE week = 10;,SELECT attendance FROM table_name_34 WHERE week = 10;,1 Which player has montana as the school/club team?,"CREATE TABLE table_name_12 (player VARCHAR, school_club_team VARCHAR);","SELECT player FROM table_name_12 WHERE school_club_team = ""montana"";","SELECT player FROM table_name_12 WHERE school_club_team = ""montana"";",1 Show all headquarters with both a company in banking industry and a company in Oil and gas.,"CREATE TABLE company (headquarters VARCHAR, main_industry VARCHAR);",SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas';,"SELECT headquarters FROM company WHERE main_industry = ""Banking"" INTERSECT SELECT headquarters FROM company WHERE main_industry = ""Oil and Gas"";",0 "Tell me the sum of original week for september 16, 1982","CREATE TABLE table_name_51 (original_week INTEGER, date VARCHAR);","SELECT SUM(original_week) FROM table_name_51 WHERE date = ""september 16, 1982"";","SELECT SUM(original_week) FROM table_name_51 WHERE date = ""september 16, 1982"";",1 Identify the disaster types and the total relief amount for projects in the climate change sector.,"CREATE TABLE disaster_relief (id INT, investment_id INT, disaster_type VARCHAR(50), relief_amount DECIMAL(10,2)); ","SELECT dr.disaster_type, SUM(dr.relief_amount) as total_relief_amount FROM disaster_relief dr JOIN impact_investments i ON dr.investment_id = i.id WHERE i.primary_sector = 'Climate Change';","SELECT disaster_type, SUM(relief_amount) FROM disaster_relief WHERE sector = 'climate change' GROUP BY disaster_type;",0 Which college did Leon Perry attend?,"CREATE TABLE table_16376436_1 (college VARCHAR, player VARCHAR);","SELECT college FROM table_16376436_1 WHERE player = ""Leon Perry"";","SELECT college FROM table_16376436_1 WHERE player = ""Leon Perry"";",1 "What round did Mitch Davis, with an overall higher than 118, have?","CREATE TABLE table_name_50 (round INTEGER, name VARCHAR, overall VARCHAR);","SELECT SUM(round) FROM table_name_50 WHERE name = ""mitch davis"" AND overall < 118;","SELECT SUM(round) FROM table_name_50 WHERE name = ""mitch davis"" AND overall > 118;",0 "When madison square garden ( new york city, new york ) is the tournament venue (city) what is the conference tournament?","CREATE TABLE table_24160890_3 (conference VARCHAR, tournament_venue__city_ VARCHAR);","SELECT conference AS Tournament FROM table_24160890_3 WHERE tournament_venue__city_ = ""Madison Square Garden ( New York City, New York )"";","SELECT conference FROM table_24160890_3 WHERE tournament_venue__city_ = ""Madison Square Garden ( New York City, New York )"";",0 Delete all records from the 'manufacturing_plants' table where the 'renewable_energy_usage' is less than 50%,"CREATE TABLE manufacturing_plants (id INT, name VARCHAR(255), renewable_energy_usage DECIMAL(5,2));",DELETE FROM manufacturing_plants WHERE renewable_energy_usage < 0.50;,DELETE FROM manufacturing_plants WHERE renewable_energy_usage 50;,0 Update the membership tier for members who have achieved a total of 5000 or more calories burned in the past month.,"CREATE TABLE member_workouts (workout_id INT, member_id INT, calories INT, date DATE); CREATE TABLE members (member_id INT, tier VARCHAR(10)); ","UPDATE members SET tier = 'Premium' FROM members INNER JOIN (SELECT member_id, SUM(calories) AS total_calories FROM member_workouts WHERE member_workouts.date >= DATEADD(month, -1, GETDATE()) GROUP BY member_id HAVING SUM(calories) >= 5000) AS high_calorie_members ON members.member_id = high_calorie_members.member_id;","UPDATE member_workouts SET tier = 1 WHERE calories > 5000 AND date >= DATEADD(month, -1, GETDATE());",0 Find the number of victims served by restorative justice programs in 2020,"CREATE TABLE restorative_justice_programs (program_id INT, year INT, victims_served INT); ",SELECT SUM(victims_served) FROM restorative_justice_programs WHERE year = 2020;,SELECT SUM(victims_served) FROM restorative_justice_programs WHERE year = 2020;,1 Add a new 'PollutionSources' table with 3 columns and insert 3 records,"CREATE TABLE PollutionSources (id INT, source_name VARCHAR(50), location VARCHAR(50), type VARCHAR(50));","INSERT INTO PollutionSources (id, source_name, location, type) VALUES (1, 'Oil Rig A', 'Atlantic Ocean', 'Oil Spill'), (2, 'Factory Plant B', 'Pacific Ocean', 'Plastic Waste'), (3, 'Research Vessel C', 'Indian Ocean', 'Chemical Leakage');","INSERT INTO PollutionSources (id, source_name, location, type) VALUES (3, 'PollutionSources', 'New York', 'PollutionSources');",0 Where did Essendon play as the home team?,"CREATE TABLE table_name_95 (venue VARCHAR, home_team VARCHAR);","SELECT venue FROM table_name_95 WHERE home_team = ""essendon"";","SELECT venue FROM table_name_95 WHERE home_team = ""essendon"";",1 List the virtual tours that have been booked more than 5 times in the last month?,"CREATE TABLE virtual_tours (tour_id INT, title VARCHAR(100), booking_date DATE); ","SELECT tour_id, title FROM virtual_tours WHERE booking_date >= DATEADD(month, -1, GETDATE()) GROUP BY tour_id, title HAVING COUNT(*) > 5;","SELECT title FROM virtual_tours WHERE booking_date >= DATEADD(month, -1, GETDATE()) GROUP BY title HAVING COUNT(*) > 5;",0 Create a view named 'high_risk_policyholders' that shows policyholders with age greater than 60 and premium greater than $1000,"CREATE TABLE if not exists policyholders (policyholder_id INT PRIMARY KEY, name VARCHAR(255), age INT, gender VARCHAR(10), policy_type VARCHAR(50), premium DECIMAL(10,2));",CREATE VIEW high_risk_policyholders AS SELECT * FROM policyholders WHERE age > 60 AND premium > 1000;,CREATE VIEW high_risk_policyholders AS SELECT * FROM policyholders WHERE age > 60 AND premium > 1000;,1 What is the distribution of articles by category and author in 'news_articles' table?,"CREATE TABLE news_articles (id INT, title VARCHAR(100), publication_date DATE, category VARCHAR(50), author VARCHAR(50)); ","SELECT category, author, COUNT(*) as num_articles, ROW_NUMBER() OVER (PARTITION BY category ORDER BY COUNT(*) DESC) as rank FROM news_articles GROUP BY category, author;","SELECT category, author, COUNT(*) as num_articles FROM news_articles GROUP BY category, author;",0 Whats the name of segment D in the episode where segment A is tequila,"CREATE TABLE table_15187735_16 (segment_d VARCHAR, segment_a VARCHAR);","SELECT segment_d FROM table_15187735_16 WHERE segment_a = ""Tequila"";","SELECT segment_d FROM table_15187735_16 WHERE segment_a = ""Tequila"";",1 "How many rounds have 6,150 as attendance?","CREATE TABLE table_21350934_2 (round VARCHAR, attendance VARCHAR);","SELECT round FROM table_21350934_2 WHERE attendance = ""6,150"";","SELECT COUNT(round) FROM table_21350934_2 WHERE attendance = ""6,150"";",0 Insert new records of community health workers who specialize in both mental health and physical health.,"CREATE TABLE CommunityHealthWorkers (WorkerID INT, Name VARCHAR(50), Specialty VARCHAR(50));","INSERT INTO CommunityHealthWorkers (WorkerID, Name, Specialty) VALUES (3, 'Jim Brown', 'Mental Health, Physical Health'); INSERT INTO CommunityHealthWorkers (WorkerID, Name, Specialty) VALUES (4, 'Sara Johnson', 'Mental Health, Physical Health');","INSERT INTO CommunityHealthWorkers (WorkerID, Name, Specialty) VALUES (1, 'Mental Health', 'Physical Health');",0 What was Christian Kubusch's lane when the heat was more than 2 and time was DNS?,"CREATE TABLE table_name_91 (lane INTEGER, heat VARCHAR, time VARCHAR, name VARCHAR);","SELECT SUM(lane) FROM table_name_91 WHERE time = ""dns"" AND name = ""christian kubusch"" AND heat > 2;","SELECT SUM(lane) FROM table_name_91 WHERE time = ""dns"" AND name = ""christian kubusch"" AND heat > 2;",1 Who lost with 142 points for?,"CREATE TABLE table_name_73 (lost VARCHAR, points_for VARCHAR);","SELECT lost FROM table_name_73 WHERE points_for = ""142"";","SELECT lost FROM table_name_73 WHERE points_for = ""142"";",1 What is the rank of the team with 11 total medals and more than 4 silver medals has?,"CREATE TABLE table_name_95 (rank INTEGER, total VARCHAR, silver VARCHAR);",SELECT SUM(rank) FROM table_name_95 WHERE total = 11 AND silver > 4;,SELECT SUM(rank) FROM table_name_95 WHERE total = 11 AND silver > 4;,1 What is every population density if name is Beaubassin East?,"CREATE TABLE table_26321719_1 (population_density VARCHAR, name VARCHAR);","SELECT population_density FROM table_26321719_1 WHERE name = ""Beaubassin East"";","SELECT population_density FROM table_26321719_1 WHERE name = ""Beaubassin East"";",1 What club got 239 points against?,"CREATE TABLE table_13564702_4 (club VARCHAR, points_against VARCHAR);","SELECT club FROM table_13564702_4 WHERE points_against = ""239"";","SELECT club FROM table_13564702_4 WHERE points_against = ""239"";",1 How many traditional art forms are practiced in each region?,"CREATE TABLE TRADITIONAL_ARTS (id INT PRIMARY KEY, name VARCHAR(255), region VARCHAR(255)); ","SELECT region, COUNT(*) FROM TRADITIONAL_ARTS GROUP BY region;","SELECT region, COUNT(*) FROM TRADITIONAL_ARTS GROUP BY region;",1 What is the launch designation of the satellite with a 2009-001a COSPAR ID?,"CREATE TABLE table_name_53 (launch_designation VARCHAR, cospar_id_satcat_№ VARCHAR);","SELECT launch_designation FROM table_name_53 WHERE cospar_id_satcat_№ = ""2009-001a"";","SELECT launch_designation FROM table_name_53 WHERE cospar_id_satcat_No = ""2009-001a"";",0 "What was the total amount of Value ($M), when the Rank was higher than 6, and the % change on year was -27?","CREATE TABLE table_name_36 (value__ VARCHAR, rank VARCHAR, _percentage_change_on_year VARCHAR);","SELECT COUNT(value__) AS $m_ FROM table_name_36 WHERE rank > 6 AND _percentage_change_on_year = ""-27"";","SELECT COUNT(value__) FROM table_name_36 WHERE rank > 6 AND _percentage_change_on_year = ""-27"";",0 Calculate the average safety score for unions with safety records over 80 in the 'labor_unions' and 'safety_records' tables,"CREATE TABLE labor_unions (id INT, union_name VARCHAR(50), members INT); CREATE TABLE safety_records (id INT, union_id INT, safety_score INT);",SELECT AVG(s.safety_score) AS avg_safety_score FROM labor_unions l JOIN safety_records s ON l.id = s.union_id WHERE s.safety_score > 80;,SELECT AVG(safety_score) FROM safety_records JOIN labor_unions ON safety_records.union_id = labor_unions.id WHERE safety_score > 80;,0 Which units are commanded by Lieutenant Colonel Francis Hepburn?,"CREATE TABLE table_11793221_2 (unit VARCHAR, commander VARCHAR);","SELECT unit FROM table_11793221_2 WHERE commander = ""Lieutenant Colonel Francis Hepburn"";","SELECT unit FROM table_11793221_2 WHERE commander = ""Lieutenant Colonel Francis Hepburn"";",1 What try bonus has a club of caerphilly rfc?,"CREATE TABLE table_name_27 (try_bonus VARCHAR, club VARCHAR);","SELECT try_bonus FROM table_name_27 WHERE club = ""caerphilly rfc"";","SELECT try_bonus FROM table_name_27 WHERE club = ""caerphilly rfc"";",1 Which month had the most signups?,"CREATE TABLE signups (id INT, signup_date DATE); ","SELECT DATE_FORMAT(signup_date, '%Y-%m') AS month, COUNT(*) AS signups_per_month FROM signups GROUP BY month ORDER BY signups_per_month DESC LIMIT 1;","SELECT EXTRACT(MONTH FROM signup_date) AS month, COUNT(*) AS signup_count FROM signups GROUP BY month ORDER BY signup_count DESC;",0 Update the name of the agricultural project with ID 3 to 'Soil Conservation' and increase its cost by 10% in the Nigeria table.,"CREATE TABLE agricultural_projects (id INT, country VARCHAR(20), project_name VARCHAR(50), project_cost FLOAT); ","UPDATE agricultural_projects SET project_name = 'Soil Conservation', project_cost = project_cost * 1.10 WHERE id = 3 AND country = 'Nigeria';",UPDATE agricultural_projects SET project_name = 'Soil Conservation' WHERE id = 3 AND country = 'Nigeria';,0 How many electric vehicles were sold per month in the 'sales' table?,"CREATE TABLE sales (id INT, sale_date DATE, vehicle_type VARCHAR(20));","SELECT DATE_TRUNC('month', sale_date) AS month, COUNT(*) FILTER (WHERE vehicle_type = 'Electric') AS electric_sales FROM sales GROUP BY month;","SELECT EXTRACT(MONTH FROM sale_date) AS month, COUNT(*) FROM sales WHERE vehicle_type = 'Electric' GROUP BY month;",0 What is the total number of employees who work more than 35 hours per week in the 'healthcare' sector?,"CREATE TABLE healthcare (id INT, employee_name TEXT, hours_worked INT, salary REAL); ",SELECT COUNT(*) FROM healthcare WHERE hours_worked > 35 AND sector = 'healthcare';,SELECT COUNT(*) FROM healthcare WHERE hours_worked > 35 AND sector = 'healthcare';,1 What Country is Rocco Mediate from?,"CREATE TABLE table_name_49 (country VARCHAR, player VARCHAR);","SELECT country FROM table_name_49 WHERE player = ""rocco mediate"";","SELECT country FROM table_name_49 WHERE player = ""rocco medie"";",0 What was the total humanitarian assistance provided in 2013?,"CREATE TABLE HumanitarianAssistance (Country VARCHAR(50), Year INT, Amount FLOAT); ",SELECT SUM(Amount) FROM HumanitarianAssistance WHERE Year = 2013;,SELECT SUM(Amount) FROM HumanitarianAssistance WHERE Year = 2013;,1 how many original air date where family/families is the ryder family and the schwartz family,"CREATE TABLE table_19897294_9 (original_air_date VARCHAR, family_families VARCHAR);","SELECT COUNT(original_air_date) FROM table_19897294_9 WHERE family_families = ""The Ryder Family and The Schwartz Family"";","SELECT COUNT(original_air_date) FROM table_19897294_9 WHERE family_families = ""Ryder Family and Schwartz Family"";",0 What is the destination of the rail with Dhanbad as the origin?,"CREATE TABLE table_name_76 (destination VARCHAR, origin VARCHAR);","SELECT destination FROM table_name_76 WHERE origin = ""dhanbad"";","SELECT destination FROM table_name_76 WHERE origin = ""dhanbad"";",1 What is the total rainfall for each irrigation system in the past month?,"CREATE TABLE irrigation_systems (system_id INTEGER, system_name TEXT, rainfall INTEGER); ","SELECT system_name, SUM(rainfall) as total_rainfall FROM irrigation_systems WHERE system_id IN (SELECT system_id FROM irrigation_systems_data WHERE data_date >= CURDATE() - INTERVAL 1 MONTH) GROUP BY system_name;","SELECT system_name, SUM(rainfall) FROM irrigation_systems WHERE system_date >= DATEADD(month, -1, GETDATE()) GROUP BY system_name;",0 What is the difference between the maximum and minimum transaction amounts for user ID 10?,"CREATE TABLE transactions (user_id INT, transaction_amount DECIMAL(10, 2), transaction_date DATE, country VARCHAR(255)); ","SELECT user_id, MAX(transaction_amount) - MIN(transaction_amount) as transaction_amount_difference FROM transactions WHERE user_id = 10 GROUP BY user_id;",SELECT MAX(transaction_amount) - MIN(transaction_amount) FROM transactions WHERE user_id = 10;,0 What is the average safety rating of all creative AI applications in the 'ai_applications' table?,"CREATE TABLE ai_applications (app_id INT, app_name TEXT, safety_rating FLOAT);",SELECT AVG(safety_rating) FROM ai_applications;,SELECT AVG(safety_rating) FROM ai_applications;,1 How many people were in the crowd when Carlton was the away team?,"CREATE TABLE table_name_43 (crowd VARCHAR, away_team VARCHAR);","SELECT COUNT(crowd) FROM table_name_43 WHERE away_team = ""carlton"";","SELECT crowd FROM table_name_43 WHERE away_team = ""carlton"";",0 What is the maximum installed capacity for a single wind farm in the clean_energy schema?,"CREATE TABLE wind_farms (id INT, name VARCHAR(50), location VARCHAR(50), installed_capacity FLOAT); ",SELECT MAX(installed_capacity) FROM clean_energy.wind_farms;,SELECT MAX(installed_capacity) FROM wind_farms;,0 "What is the total number of volunteers, total donation amount, and average donation per volunteer for the city of Los Angeles?","CREATE TABLE Donors (DonorID INT, Name TEXT, City TEXT, DonationAmount DECIMAL); CREATE TABLE Volunteers (VolunteerID INT, Name TEXT, City TEXT, LastContactDate DATE); ","SELECT Volunteers.City, COUNT(DISTINCT Donors.DonorID) AS TotalVolunteers, SUM(Donors.DonationAmount) AS TotalDonations, AVG(Donors.DonationAmount) AS AverageDonationPerVolunteer FROM Donors INNER JOIN Volunteers ON Donors.City = Volunteers.City WHERE Volunteers.City = 'Los Angeles';","SELECT COUNT(DISTINCT VolunteerID) AS TotalVolunteers, SUM(DonationAmount) AS TotalDonation, AVG(DonationAmount) AS AvgDonationPerVolunteer FROM Donors JOIN Volunteers ON Donors.DonorID = Volunteers.VolunteerID WHERE City = 'Los Angeles' GROUP BY VolunteerID;",0 how many winnings does jeff gordon have?,"CREATE TABLE table_27781212_1 (winnings VARCHAR, driver VARCHAR);","SELECT winnings FROM table_27781212_1 WHERE driver = ""Jeff Gordon"";","SELECT winnings FROM table_27781212_1 WHERE driver = ""Jeff Gordon"";",1 What is the maximum daily water consumption in each state in the United States for the year 2020?,"CREATE TABLE DailyWaterConsumption (ID INT, State VARCHAR(255), EventDate DATE, WaterConsumption FLOAT);","SELECT t1.State, YEAR(t1.EventDate) AS Year, MAX(t1.WaterConsumption) AS MaxDailyWaterConsumption FROM DailyWaterConsumption t1 WHERE YEAR(t1.EventDate) = 2020 GROUP BY t1.State, YEAR(t1.EventDate);","SELECT State, MAX(WaterConsumption) FROM DailyWaterConsumption WHERE YEAR(EventDate) = 2020 GROUP BY State;",0 What was the total production volume of Neodymium in 2018?,"CREATE TABLE neodymium_production (year INT, production_volume INT); ",SELECT SUM(production_volume) FROM neodymium_production WHERE year = 2018;,SELECT SUM(production_volume) FROM neodymium_production WHERE year = 2018;,1 What game was held against a team with a 6-3 record against the Cowboys?,"CREATE TABLE table_22801331_1 (game VARCHAR, record VARCHAR);","SELECT game FROM table_22801331_1 WHERE record = ""6-3"";","SELECT game FROM table_22801331_1 WHERE record = ""6-3"";",1 "Which Population (2005) has a Literacy (2003) of 90%, and an Infant Mortality (2002) of 18.3‰?","CREATE TABLE table_name_14 (population__2005_ INTEGER, literacy__2003_ VARCHAR, infant_mortality__2002_ VARCHAR);","SELECT SUM(population__2005_) FROM table_name_14 WHERE literacy__2003_ = ""90%"" AND infant_mortality__2002_ = ""18.3‰"";","SELECT MAX(population__2005_) FROM table_name_14 WHERE literacy__2003_ = ""90%"" AND infant_mortality__2002_ = ""18.3"";",0 What was the Tie no when then home team was Stoke City for the game played on 9 February 1946?,"CREATE TABLE table_name_19 (tie_no VARCHAR, home_team VARCHAR, date VARCHAR);","SELECT tie_no FROM table_name_19 WHERE home_team = ""stoke city"" AND date = ""9 february 1946"";","SELECT tie_no FROM table_name_19 WHERE home_team = ""stoke city"" AND date = ""9 february 1946"";",1 "Delete space debris records older than 20 years from the ""space_debris"" table.","CREATE TABLE space_debris (id INT, name VARCHAR(50), launch_date DATE, latitude FLOAT, longitude FLOAT); ","DELETE FROM space_debris WHERE launch_date < DATE_SUB(CURRENT_DATE, INTERVAL 20 YEAR);","DELETE FROM space_debris WHERE launch_date DATE_SUB(CURRENT_DATE, INTERVAL 20 YEAR);",0 Which Opponent has a Record of 45–21–4?,"CREATE TABLE table_name_51 (opponent VARCHAR, record VARCHAR);","SELECT opponent FROM table_name_51 WHERE record = ""45–21–4"";","SELECT opponent FROM table_name_51 WHERE record = ""45–21–4"";",1 Determine the change in ore production by mine over the past month.,"CREATE TABLE production_stats (id INT, mine_id INT, date DATE, ore_production FLOAT);","SELECT a.mine_id, a.ore_production - LAG(a.ore_production) OVER (PARTITION BY a.mine_id ORDER BY a.date) as change_in_ore_production FROM production_stats a WHERE a.date >= DATEADD(month, -1, CURRENT_DATE) ORDER BY a.mine_id, a.date;","SELECT mine_id, date, ore_production, ROW_NUMBER() OVER (ORDER BY date DESC) as rn FROM production_stats WHERE date >= DATEADD(month, -1, GETDATE()) GROUP BY mine_id, date;",0 Delete all records from the 'clinics' table where the building_type is 'mobile'.,"CREATE SCHEMA rural; CREATE TABLE rural.clinics (id INT, building_type TEXT);",DELETE FROM rural.clinics WHERE building_type = 'mobile';,DELETE FROM rural.clinics WHERE building_type ='mobile';,0 What is the total number of community health workers who identify as part of a historically underrepresented community?,"CREATE TABLE CommunityHealthWorker (WorkerID INT, Identity VARCHAR(50)); ","SELECT COUNT(*) as Total FROM CommunityHealthWorker WHERE Identity IN ('African American', 'Hispanic', 'Asian American', 'Native American');",SELECT COUNT(*) FROM CommunityHealthWorker WHERE Identity = 'Underrepresented';,0 What's the national title of miss international ikumi yoshimatsu?,"CREATE TABLE table_name_11 (national_title VARCHAR, miss_international VARCHAR);","SELECT national_title FROM table_name_11 WHERE miss_international = ""ikumi yoshimatsu"";","SELECT national_title FROM table_name_11 WHERE miss_international = ""ikumi yoshimatsu"";",1 How many renewable energy projects have been completed in the United Kingdom for each technology category?,"CREATE TABLE RenewableEnergyProjects (project_id INT, project_name VARCHAR(255), country VARCHAR(255), capacity FLOAT, technology VARCHAR(255));","SELECT technology, COUNT(project_id) FROM RenewableEnergyProjects WHERE country = 'United Kingdom' GROUP BY technology;","SELECT technology, COUNT(*) FROM RenewableEnergyProjects WHERE country = 'United Kingdom' GROUP BY technology;",0 What is the total number of employees in the Mining department and their average salary?,"CREATE TABLE Employees (id INT, name VARCHAR(50), department VARCHAR(50), salary FLOAT, employment_status VARCHAR(50)); ","SELECT department, COUNT(*), AVG(salary) FROM Employees WHERE department = 'Mining' GROUP BY department;","SELECT COUNT(*), AVG(salary) FROM Employees WHERE department = 'Mining';",0 What was the passing result for the measure with a description of bus and truck operating license bill?,"CREATE TABLE table_256286_19 (passed VARCHAR, description VARCHAR);","SELECT passed FROM table_256286_19 WHERE description = ""Bus and Truck Operating License Bill"";","SELECT passed FROM table_256286_19 WHERE description = ""Bus and Truck Operating License Bill"";",1 "What is the total number of algorithmic fairness issues reported in South America, and which countries have the most incidents?","CREATE TABLE algorithmic_fairness (id INT, incident_name VARCHAR(255), country VARCHAR(255)); ","SELECT country, COUNT(*) as incident_count FROM algorithmic_fairness WHERE country IN ('Brazil', 'Argentina', 'Colombia') GROUP BY country ORDER BY incident_count DESC;","SELECT country, COUNT(*) as total_issues FROM algorithmic_fairness WHERE country IN (SELECT country FROM algorithmic_fairness WHERE country IN (SELECT country FROM algorithmic_fairness WHERE country IN (SELECT country FROM algorithmic_fairness WHERE country IN (SELECT country FROM algorithmic_fairness WHERE country IN (SELECT country FROM algorithmic_fairness WHERE country IN (SELECT country FROM algorithmic_fairness WHERE country IN (SELECT country FROM algorithmic_fairness) FROM algorithmic_fairness WHERE country IN (SELECT country FROM algorithmic_fairness WHERE country IN (SELECT country FROM algorithmic_fairness WHERE country IN ('South America'))))) GROUP BY country ORDER BY COUNT(*)) DESC LIMIT 1);",0 What block has a COSPAR ID of 1995-060a?,"CREATE TABLE table_name_23 (block VARCHAR, cospar_id VARCHAR);","SELECT block FROM table_name_23 WHERE cospar_id = ""1995-060a"";","SELECT block FROM table_name_23 WHERE cospar_id = ""1995-060a"";",1 What is the total healthcare spending in rural Montana?,"CREATE TABLE spending (id INT, location VARCHAR(20), amount FLOAT); ",SELECT SUM(amount) FROM spending WHERE location = 'rural Montana';,SELECT SUM(amount) FROM spending WHERE location = 'Rural Montana';,0 Identify cities with the highest average sustainability rating,"CREATE TABLE city_sustainability (city VARCHAR(50), avg_rating FLOAT);",SELECT city FROM city_sustainability WHERE avg_rating = (SELECT MAX(avg_rating) FROM city_sustainability);,"SELECT city, AVG(avg_rating) AS avg_rating FROM city_sustainability GROUP BY city ORDER BY avg_rating DESC LIMIT 1;",0 Find the names of all the customers and staff members.,"CREATE TABLE staff (customer_details VARCHAR, staff_details VARCHAR); CREATE TABLE customers (customer_details VARCHAR, staff_details VARCHAR);",SELECT customer_details FROM customers UNION SELECT staff_details FROM staff;,"SELECT T1.customer_details, T1.staff_details FROM customers AS T1 JOIN staff AS T2 ON T1.customer_details = T2.staff_details;",0 What is the total number of tech-based social impact projects implemented in Sub-Saharan Africa and Southeast Asia?,"CREATE TABLE SocialImpactProjects(region VARCHAR(255), tech_based BOOLEAN);","SELECT SUM(tech_based) FROM SocialImpactProjects WHERE region IN ('Sub-Saharan Africa', 'Southeast Asia');","SELECT COUNT(*) FROM SocialImpactProjects WHERE region IN ('Sub-Saharan Africa', 'Southeast Asia') AND tech_based = true;",0 "What is the average weight of returned goods for each reason, grouped by warehouse?","CREATE TABLE Warehouse (id INT, location VARCHAR(255)); CREATE TABLE Returned_Goods (id INT, warehouse_id INT, reason VARCHAR(255), returned_date DATE, weight INT); ","SELECT rg.reason, w.location, AVG(rg.weight) as avg_weight FROM Returned_Goods rg JOIN Warehouse w ON rg.warehouse_id = w.id GROUP BY rg.reason, w.location;","SELECT warehouse_id, reason, AVG(weight) as avg_weight FROM Returned_Goods GROUP BY warehouse_id, reason;",0 Name the number of womens singles for 1999 rio de janeiro,"CREATE TABLE table_28138035_4 (womens_singles VARCHAR, year_location VARCHAR);","SELECT COUNT(womens_singles) FROM table_28138035_4 WHERE year_location = ""1999 Rio de Janeiro"";","SELECT COUNT(womens_singles) FROM table_28138035_4 WHERE year_location = ""1999 Rio de Janeiro"";",1 "Add new record into 'cannabis_production' table with data: license_number: 456A, license_type: 'B'","CREATE TABLE cannabis_production (license_number VARCHAR(10), license_type VARCHAR(1));","INSERT INTO cannabis_production (license_number, license_type) VALUES ('456A', 'B');","INSERT INTO cannabis_production (license_number, license_type) VALUES (456A, 'B');",0 What was the place and how many people attended the game on July 11?,"CREATE TABLE table_18813011_6 (location_attendance VARCHAR, date VARCHAR);","SELECT location_attendance FROM table_18813011_6 WHERE date = ""July 11"";","SELECT location_attendance FROM table_18813011_6 WHERE date = ""July 11"";",1 "What is the number of visitors who identified as Indigenous that attended in-person exhibitions in Sydney, Australia in 2025 and their average rating?","CREATE TABLE Visitors (ID INT, Age INT, Gender VARCHAR(10), Rating INT, City VARCHAR(20), Country VARCHAR(20), Ethnicity VARCHAR(20)); CREATE TABLE Exhibitions (ID INT, Title VARCHAR(50), City VARCHAR(20), Country VARCHAR(20), Date DATE, InPerson BOOLEAN); ","SELECT AVG(Visitors.Rating), COUNT(Visitors.ID) FROM Visitors INNER JOIN Exhibitions ON Visitors.City = Exhibitions.City AND Visitors.Country = Exhibitions.Country WHERE Exhibitions.InPerson = TRUE AND Visitors.Ethnicity = 'Indigenous' AND Exhibitions.Date BETWEEN '2025-01-01' AND '2025-12-31';",SELECT AVG(Visitors.Rating) FROM Visitors INNER JOIN Exhibitions ON Visitors.City = Exhibitions.City WHERE Visitors.Ethnicity = 'Indigenous' AND Exhibitions.Date BETWEEN '2025-01-01' AND '2025-12-31' AND Exhibitions.InPerson = TRUE;,0 What is the to par when the year(s) won is larger than 1999?,"CREATE TABLE table_name_53 (to_par VARCHAR, year_s__won INTEGER);",SELECT to_par FROM table_name_53 WHERE year_s__won > 1999;,SELECT to_par FROM table_name_53 WHERE year_s__won > 1999;,1 Name the tongyong for chinese of 湖內區,"CREATE TABLE table_17015_2 (tongyong VARCHAR, chinese VARCHAR);","SELECT tongyong FROM table_17015_2 WHERE chinese = ""湖內區"";","SELECT tongyong FROM table_17015_2 WHERE chinese = """";",0 "What is the average age of all female authors in the ""journalists"" table?","CREATE TABLE journalists (id INT, name VARCHAR(50), age INT, gender VARCHAR(10));",SELECT AVG(age) FROM journalists WHERE gender = 'female';,SELECT AVG(age) FROM journalists WHERE gender = 'Female';,0 what is the least laps when the grid is 5?,"CREATE TABLE table_name_94 (laps INTEGER, grid VARCHAR);",SELECT MIN(laps) FROM table_name_94 WHERE grid = 5;,SELECT MIN(laps) FROM table_name_94 WHERE grid = 5;,1 Calculate the total sales for each category,"CREATE TABLE products (category VARCHAR(255), product VARCHAR(255), price DECIMAL(10,2), sales INT); ","SELECT category, SUM(sales) as total_sales FROM products GROUP BY category;","SELECT category, SUM(sales) as total_sales FROM products GROUP BY category;",1 What is the minimum budget spent on a single AI project in the ethical AI sector?,"CREATE TABLE ethical_ai_projects (project_name TEXT, sector TEXT, budget INTEGER); ",SELECT MIN(budget) FROM ethical_ai_projects WHERE sector = 'ethical AI';,SELECT MIN(budget) FROM ethical_ai_projects WHERE sector = 'Ethical AI';,0 Find the number of hospitals and clinics without any medical resources,"CREATE TABLE hospitals (id INT, name VARCHAR(50), location VARCHAR(10)); CREATE TABLE clinics (id INT, name VARCHAR(50), location VARCHAR(10))","SELECT 'hospitals' AS location, COUNT(*) FROM hospitals WHERE id NOT IN (SELECT hospital_id FROM medical_resources) UNION ALL SELECT 'clinics', COUNT(*) FROM clinics WHERE id NOT IN (SELECT clinic_id FROM medical_resources)",SELECT COUNT(*) FROM hospitals JOIN clinics ON hospitals.location = clinics.location WHERE clinics.id IS NULL;,0 "Who were the runners-up in the tournament on May 26, 1996?","CREATE TABLE table_name_93 (runner_s__up VARCHAR, date VARCHAR);","SELECT runner_s__up FROM table_name_93 WHERE date = ""may 26, 1996"";","SELECT runner_s__up FROM table_name_93 WHERE date = ""may 26, 1996"";",1 "What is the average water consumption of green buildings in the 'green_buildings' schema, grouped by certification level?","CREATE TABLE green_buildings.buildings (certification_level VARCHAR(255), water_consumption INT); ","SELECT certification_level, AVG(water_consumption) FROM green_buildings.buildings GROUP BY certification_level;","SELECT certification_level, AVG(water_consumption) FROM green_buildings.buildings GROUP BY certification_level;",1 What is the location of the institution nicknamed Lions? ,"CREATE TABLE table_2562113_1 (location VARCHAR, nickname VARCHAR);","SELECT location FROM table_2562113_1 WHERE nickname = ""Lions"";","SELECT location FROM table_2562113_1 WHERE nickname = ""Lions"";",1 Show the shop addresses ordered by their opening year.,"CREATE TABLE shop (address VARCHAR, open_year VARCHAR);",SELECT address FROM shop ORDER BY open_year;,SELECT address FROM shop ORDER BY open_year;,1 What is the sum of flight hours for all Space Shuttle missions?,"CREATE TABLE shuttle_missions (id INT, shuttle VARCHAR(255), flight_hours INT); ",SELECT SUM(flight_hours) FROM shuttle_missions;,SELECT SUM(flight_hours) FROM shuttle_missions;,1 What episode took place in Belfast Waterfront Hall?,"CREATE TABLE table_23122988_1 (episode VARCHAR, location VARCHAR);","SELECT episode FROM table_23122988_1 WHERE location = ""Belfast Waterfront Hall"";","SELECT episode FROM table_23122988_1 WHERE location = ""Belfast Waterfront Hall"";",1 "Show the dates, places, and names of events in descending order of the attendance.","CREATE TABLE event (Date VARCHAR, Name VARCHAR, venue VARCHAR, Event_Attendance VARCHAR);","SELECT Date, Name, venue FROM event ORDER BY Event_Attendance DESC;","SELECT Date, Venue, Name FROM event ORDER BY Event_Attendance DESC;",0 List the authors of submissions in ascending order of scores.,"CREATE TABLE submission (Author VARCHAR, Scores VARCHAR);",SELECT Author FROM submission ORDER BY Scores;,SELECT Author FROM submission ORDER BY Scores ASC;,0 Which vessels had an incident in Q1 2022?,"CREATE TABLE vessels(id INT, name TEXT); CREATE TABLE incidents(id INT, vessel_id INT, incident_date DATE); ",SELECT DISTINCT v.name FROM vessels v JOIN incidents i ON v.id = i.vessel_id WHERE incident_date BETWEEN '2022-01-01' AND '2022-03-31';,SELECT v.name FROM vessels v JOIN incidents i ON v.id = i.vessel_id WHERE i.incident_date BETWEEN '2022-01-01' AND '2022-03-31';,0 Find the number of employees and total salary costs for companies with mining operations in Canada and the US.,"CREATE TABLE company (id INT, name VARCHAR(255), country VARCHAR(255), num_employees INT, avg_salary DECIMAL(10,2));CREATE VIEW canadian_companies AS SELECT * FROM company WHERE country = 'Canada';CREATE VIEW us_companies AS SELECT * FROM company WHERE country = 'USA';CREATE VIEW mining_companies AS SELECT * FROM company WHERE industry = 'Mining';","SELECT mc.name, SUM(mc.num_employees) as total_employees, SUM(mc.num_employees * mc.avg_salary) as total_salary_costs FROM (SELECT * FROM canadian_companies UNION ALL SELECT * FROM us_companies) mc JOIN mining_companies m ON mc.id = m.id GROUP BY mc.name;","SELECT c.country, c.num_employees, SUM(c.avg_salary) FROM company c JOIN canadian_companies c ON c.country = c.country JOIN us_companies u ON c.country = u.country GROUP BY c.country;",0 "What is the total number of vaccinations administered by healthcare providers, per infectious disease, in the last month?","CREATE TABLE healthcare_providers (provider_id INT, provider_name VARCHAR(255), region VARCHAR(255)); CREATE TABLE vaccinations (vaccination_id INT, provider_id INT, infectious_disease VARCHAR(255), vaccination_date DATE); ","SELECT healthcare_providers.region, infectious_disease, COUNT(vaccinations.vaccination_id) as total_vaccinations FROM healthcare_providers JOIN vaccinations ON healthcare_providers.provider_id = vaccinations.provider_id WHERE vaccination_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) AND CURRENT_DATE GROUP BY healthcare_providers.region, infectious_disease;","SELECT infectious_disease, COUNT(*) as total_vaccinations FROM vaccinations JOIN healthcare_providers ON vaccinations.provider_id = healthcare_providers.provider_id WHERE vaccinations.vaccination_date >= DATEADD(month, -1, GETDATE()) GROUP BY infectious_disease;",0 "How many communes associated with over 10 cantons and an area (Square km) of 1,589?","CREATE TABLE table_name_83 (communes INTEGER, cantons VARCHAR, area__square_km_ VARCHAR);",SELECT AVG(communes) FROM table_name_83 WHERE cantons > 10 AND area__square_km_ = 1 OFFSET 589;,"SELECT SUM(communes) FROM table_name_83 WHERE cantons > 10 AND area__square_km_ = ""1589"";",0 Find the address and staff number of the shops that do not have any happy hour.,"CREATE TABLE shop (address VARCHAR, num_of_staff VARCHAR, shop_id VARCHAR); CREATE TABLE happy_hour (address VARCHAR, num_of_staff VARCHAR, shop_id VARCHAR);","SELECT address, num_of_staff FROM shop WHERE NOT shop_id IN (SELECT shop_id FROM happy_hour);","SELECT T1.address, T1.num_of_staff FROM shop AS T1 JOIN happy_hour AS T2 ON T1.shop_id = T2.shop_id WHERE T2.num_of_staff IS NULL;",0 "What is Date, when Away Team is ""Liverpool""?","CREATE TABLE table_name_91 (date VARCHAR, away_team VARCHAR);","SELECT date FROM table_name_91 WHERE away_team = ""liverpool"";","SELECT date FROM table_name_91 WHERE away_team = ""liverpool"";",1 "What is the Upper index Kcal/ Nm 3 of iso-butane, and a Lower index MJ/ Nm 3 smaller than 84.71?","CREATE TABLE table_name_59 (upper_index_kcal__nm_3 VARCHAR, fuel_gas VARCHAR, lower_index_mj__nm_3 VARCHAR);","SELECT COUNT(upper_index_kcal__nm_3) FROM table_name_59 WHERE fuel_gas = ""iso-butane"" AND lower_index_mj__nm_3 < 84.71;","SELECT upper_index_kcal__nm_3 FROM table_name_59 WHERE fuel_gas = ""iso-butane"" AND lower_index_mj__nm_3 84.71;",0 What is the average production cost of garments made from organic cotton per garment type?,"CREATE TABLE OrganicCottonCost (id INT, garment_type VARCHAR(255), cost DECIMAL(10,2)); ","SELECT garment_type, AVG(cost) FROM OrganicCottonCost GROUP BY garment_type;","SELECT garment_type, AVG(cost) FROM OrganicCottonCost GROUP BY garment_type;",1 How many wheelchair-accessible taxis were active on Sundays in the last month?,"CREATE TABLE vehicles (vehicle_id INT, vehicle_type VARCHAR(255), day_of_week ENUM('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday')); CREATE TABLE taxi_activity (taxi_id INT, vehicle_id INT, activity_date DATE); ","SELECT COUNT(*) FROM taxi_activity JOIN vehicles ON taxi_activity.vehicle_id = vehicles.vehicle_id WHERE vehicles.day_of_week = 'Sunday' AND activity_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH);","SELECT COUNT(DISTINCT vehicles.vehicle_id) FROM vehicles INNER JOIN taxi_activity ON vehicles.vehicle_id = taxi_activity.vehicle_id WHERE vehicles.vehicle_type = 'Wheelchair-Accessible' AND vehicles.day_of_week >= DATEADD(month, -1, GETDATE());",0 "What is the total energy storage capacity in Germany, and how does it break down by technology?","CREATE TABLE energy_storage (id INT, country VARCHAR(255), technology VARCHAR(255), capacity FLOAT);","SELECT technology, SUM(capacity) FROM energy_storage WHERE country = 'Germany' GROUP BY technology;","SELECT technology, SUM(capacity) as total_capacity FROM energy_storage WHERE country = 'Germany' GROUP BY technology;",0 How many entries are there for weight when the winner is 1st - defier and venue is randwick?,"CREATE TABLE table_1360997_3 (weight__kg_ VARCHAR, winner_2nd VARCHAR, venue VARCHAR);","SELECT COUNT(weight__kg_) FROM table_1360997_3 WHERE winner_2nd = ""1st - Defier"" AND venue = ""Randwick"";","SELECT COUNT(weight__kg_) FROM table_1360997_3 WHERE winner_2nd = ""1st - Defier"" AND venue = ""Randwick"";",1 Calculate the moving average of water consumption by mining operations in the past 6 months.,"CREATE TABLE WaterConsumption (MineID INT, Date DATE, Consumption INT); ","SELECT MineID, AVG(Consumption) OVER (PARTITION BY MineID ORDER BY Date ROWS BETWEEN 5 PRECEDING AND CURRENT ROW) as MovingAvg FROM WaterConsumption;","SELECT MineID, AVG(Consumption) as MovingAverage FROM WaterConsumption WHERE Date >= DATEADD(month, -6, GETDATE()) GROUP BY MineID;",0 "How many users liked, shared, or commented on posts containing the hashtag '#coffee' in the past week?","CREATE TABLE posts (post_id INT, post_content VARCHAR(255), post_date DATE); CREATE TABLE user_interactions (interaction_id INT, user_id INT, post_id INT, interaction_type VARCHAR(10)); ","SELECT SUM(interaction_type = 'like') + SUM(interaction_type = 'share') + SUM(interaction_type = 'comment') AS total_interactions FROM user_interactions WHERE post_id IN (SELECT post_id FROM posts WHERE post_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK) AND CURRENT_DATE AND post_content LIKE '%#coffee%');","SELECT COUNT(DISTINCT user_interactions.interaction_id) FROM user_interactions INNER JOIN posts ON user_interactions.post_id = posts.post_id WHERE posts.post_content LIKE '%#coffee%' AND posts.post_date >= DATEADD(week, -1, GETDATE());",0 What percentage of electric vehicles in the United States were sold in California in 2021?,"CREATE TABLE Sales (Id INT, VehicleId INT, Quantity INT, State VARCHAR(100), SaleDate DATE); CREATE TABLE ElectricVehicles (Id INT, Name VARCHAR(100), Type VARCHAR(50)); ",SELECT (COUNT(*) FILTER (WHERE State = 'California') * 100.0 / COUNT(*)) AS Percentage FROM Sales INNER JOIN ElectricVehicles ON Sales.VehicleId = ElectricVehicles.Id WHERE Type = 'Electric' AND EXTRACT(YEAR FROM SaleDate) = 2021;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Sales WHERE State = 'California')) AS Percentage FROM Sales WHERE State = 'California' AND YEAR(SaleDate) = 2021 AND Type = 'Electric';,0 Who was the professional partner in season 4?,"CREATE TABLE table_name_29 (professional_partner VARCHAR, season VARCHAR);",SELECT professional_partner FROM table_name_29 WHERE season = 4;,SELECT professional_partner FROM table_name_29 WHERE season = 4;,1 What is the minimum temperature recorded in the 'arctic_weather' table for each month in 2022?,"CREATE TABLE arctic_weather (date DATE, temperature FLOAT);","SELECT EXTRACT(MONTH FROM date) AS month, MIN(temperature) FROM arctic_weather WHERE EXTRACT(YEAR FROM date) = 2022 GROUP BY EXTRACT(MONTH FROM date);","SELECT EXTRACT(MONTH FROM date) AS month, MIN(temperature) FROM arctic_weather WHERE date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY month;",0 Name the venue for 2004 and position of 25th,"CREATE TABLE table_name_4 (venue VARCHAR, position VARCHAR, year VARCHAR);","SELECT venue FROM table_name_4 WHERE position = ""25th"" AND year = 2004;","SELECT venue FROM table_name_4 WHERE position = ""25th"" AND year = 2004;",1 What is the minimum water usage in industrial facilities in Ontario?,"CREATE TABLE industrial_facilities (id INT, province VARCHAR(20), water_usage FLOAT); ",SELECT MIN(water_usage) FROM industrial_facilities WHERE province = 'Ontario';,SELECT MIN(water_usage) FROM industrial_facilities WHERE province = 'Ontario';,1 Identify the consumer awareness trend for ethical fashion in the last 6 months.,"CREATE TABLE consumer_awareness (date DATE, awareness INT); ","SELECT date, awareness, LAG(awareness, 2) OVER (ORDER BY date) as lagged_awareness FROM consumer_awareness;","SELECT date, awareness FROM consumer_awareness WHERE date >= DATEADD(month, -6, GETDATE());",0 How many students with visual impairments have received accommodations in the last year?,"CREATE TABLE Accommodations (id INT, student VARCHAR(255), date DATE); CREATE TABLE Students (id INT, name VARCHAR(255), age INT, disability VARCHAR(255));","SELECT COUNT(*) FROM Accommodations INNER JOIN Students ON Accommodations.student = Students.id WHERE disability = 'visual impairment' AND date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR);","SELECT COUNT(*) FROM Accommodations INNER JOIN Students ON Accommodations.student = Students.id WHERE Students.disability = 'Visual Impairment' AND Accommodations.date >= DATEADD(year, -1, GETDATE());",0 What is the lowest lap with a rank of 30?,"CREATE TABLE table_name_85 (laps INTEGER, rank VARCHAR);","SELECT MIN(laps) FROM table_name_85 WHERE rank = ""30"";",SELECT MIN(laps) FROM table_name_85 WHERE rank = 30;,0 "Who is the shooter with 15 rank points, and 0 score points?","CREATE TABLE table_name_56 (shooter VARCHAR, rank_points VARCHAR, score_points VARCHAR);","SELECT shooter FROM table_name_56 WHERE rank_points = ""15"" AND score_points = ""0"";","SELECT shooter FROM table_name_56 WHERE rank_points = ""15"" AND score_points = ""0"";",1 Who did the Rangers play in a game that was later than 72 when the team record was 39-27-9?,"CREATE TABLE table_name_93 (opponent VARCHAR, game VARCHAR, record VARCHAR);","SELECT opponent FROM table_name_93 WHERE game > 72 AND record = ""39-27-9"";","SELECT opponent FROM table_name_93 WHERE game > 72 AND record = ""39-27-9"";",1 "What is the number of patients treated for each mental health condition, and their respective percentages in the patient_treatment table?","CREATE TABLE patient_treatment (patient_id INT, condition VARCHAR(50), treatment_date DATE); ","SELECT condition, COUNT(*) AS count, ROUND(100.0 * COUNT(*) / (SELECT COUNT(*) FROM patient_treatment), 2) AS percentage FROM patient_treatment GROUP BY condition;","SELECT condition, COUNT(patient_id) as num_patients, (COUNT(patient_id) * 100.0 / (SELECT COUNT(patient_id) FROM patient_treatment)) as percentage FROM patient_treatment GROUP BY condition;",0 What is the average word count of articles by topic?,"CREATE TABLE articles (id INT, title VARCHAR(255), language VARCHAR(255), word_count INT, topic VARCHAR(255)); ","SELECT topic, AVG(word_count) as avg_word_count FROM articles GROUP BY topic;","SELECT topic, AVG(word_count) as avg_word_count FROM articles GROUP BY topic;",1 What is the total number of sustainable tourism initiatives in Africa?,"CREATE TABLE tourism_initiatives (initiative_id INT, region VARCHAR(50), sustainability_level VARCHAR(50)); ",SELECT COUNT(*) FROM tourism_initiatives WHERE region = 'Africa' AND sustainability_level = 'Sustainable';,SELECT COUNT(*) FROM tourism_initiatives WHERE region = 'Africa' AND sustainability_level ='sustainable';,0 What is the 2007 value with 1r in 2009 in the US Open?,CREATE TABLE table_name_26 (tournament VARCHAR);,"SELECT 2007 FROM table_name_26 WHERE 2009 = ""1r"" AND tournament = ""us open"";","SELECT 2007 FROM table_name_26 WHERE 2009 = ""1r"";",0 "What is Total, when Rank Points is ""15"", and when Event is ""WC Beijing""?","CREATE TABLE table_name_70 (total VARCHAR, rank_points VARCHAR, event VARCHAR);","SELECT total FROM table_name_70 WHERE rank_points = ""15"" AND event = ""wc beijing"";","SELECT total FROM table_name_70 WHERE rank_points = ""15"" AND event = ""wc beijing"";",1 Find the minimum and maximum calorie count for vegan items in the inventory.,"CREATE TABLE Inventory(item_id INT, item_name VARCHAR(50), is_vegan BOOLEAN, calorie_count INT); ","SELECT MIN(calorie_count), MAX(calorie_count) FROM Inventory WHERE is_vegan = TRUE;","SELECT MIN(calorie_count), MAX(calorie_count) FROM Inventory WHERE is_vegan = true;",0 What was the average grid at the time Vanwall was constructor and there were 17 laps?,"CREATE TABLE table_name_3 (grid INTEGER, constructor VARCHAR, laps VARCHAR);","SELECT AVG(grid) FROM table_name_3 WHERE constructor = ""vanwall"" AND laps = 17;","SELECT AVG(grid) FROM table_name_3 WHERE constructor = ""vanwall"" AND laps = 17;",1 What was North Melbourne's score when they were the home team?,CREATE TABLE table_name_52 (away_team VARCHAR);,"SELECT away_team AS score FROM table_name_52 WHERE away_team = ""north melbourne"";","SELECT away_team AS score FROM table_name_52 WHERE away_team = ""north melbourne"";",1 what is the filter when the wavelength is 222mm (k-band)?,"CREATE TABLE table_2583036_1 (filter VARCHAR, wavelength VARCHAR);","SELECT filter FROM table_2583036_1 WHERE wavelength = ""222mm (K-band)"";","SELECT filter FROM table_2583036_1 WHERE wavelength = ""222mm (K-band)"";",1 What is the maximum biomass of fish in 'Aquaculture_farms'?,"CREATE TABLE Aquaculture_farms (id INT, name TEXT, country TEXT, biomass FLOAT); ",SELECT MAX(biomass) FROM Aquaculture_farms;,SELECT MAX(biomass) FROM Aquaculture_farms;,1 What is the sum of donation amounts for organizations in 'United States'?,"CREATE TABLE organizations (org_id INT, org_name TEXT, org_country TEXT); ",SELECT SUM(donation_amount) FROM donors WHERE org_country = 'United States';,SELECT SUM(donation_amount) FROM donations JOIN organizations ON donations.org_id = organizations.org_id WHERE organizations.org_country = 'United States';,0 How many michelob ultra mountains classification for darren lill,"CREATE TABLE table_13223187_1 (michelob_ultra_mountains_classification_gold_polka_dot_jersey VARCHAR, drury_hotels_most_aggressive_rider_red_jersey VARCHAR);","SELECT COUNT(michelob_ultra_mountains_classification_gold_polka_dot_jersey) FROM table_13223187_1 WHERE drury_hotels_most_aggressive_rider_red_jersey = ""Darren Lill"";","SELECT COUNT(michelob_ultra_mountains_classification_gold_polka_dot_jersey) FROM table_13223187_1 WHERE drury_hotels_most_aggressive_rider_red_jersey = ""Darren Lill"";",1 Find the average funding amount per industry,"CREATE TABLE companies (id INT, industry VARCHAR(255), funding_amount DECIMAL(10,2)); ","SELECT industry, AVG(funding_amount) FROM companies GROUP BY industry;","SELECT industry, AVG(funding_amount) FROM companies GROUP BY industry;",0 What is the home record for the Maccabi Tel-Aviv club?,"CREATE TABLE table_name_85 (home VARCHAR, club VARCHAR);","SELECT home FROM table_name_85 WHERE club = ""maccabi tel-aviv"";","SELECT home FROM table_name_85 WHERE club = ""maccabi tel-aviv"";",1 What is the recycling rate for each material type in Canada in 2018?,"CREATE TABLE recycling_rates_canada(year INT, material VARCHAR(20), recycling_rate DECIMAL(5,2)); ","SELECT material, AVG(recycling_rate) as avg_recycling_rate FROM recycling_rates_canada WHERE year = 2018 GROUP BY material;","SELECT material, recycling_rate FROM recycling_rates_canada WHERE year = 2018 GROUP BY material;",0 What is the total number of military vehicles manufactured in Germany and Japan?,"CREATE TABLE MilitaryVehicles(id INT PRIMARY KEY, country VARCHAR(50), quantity INT);","SELECT SUM(quantity) FROM MilitaryVehicles WHERE country IN ('Germany', 'Japan');","SELECT SUM(quantity) FROM MilitaryVehicles WHERE country IN ('Germany', 'Japan');",1 Which builder has a Built smaller than 1880?,"CREATE TABLE table_name_8 (builder VARCHAR, built INTEGER);",SELECT builder FROM table_name_8 WHERE built < 1880;,SELECT builder FROM table_name_8 WHERE built 1880;,0 "What is Player, when To Par is greater than 6, and when Year(s) Won is ""1962 , 1967""?","CREATE TABLE table_name_41 (player VARCHAR, to_par VARCHAR, year_s__won VARCHAR);","SELECT player FROM table_name_41 WHERE to_par > 6 AND year_s__won = ""1962 , 1967"";","SELECT player FROM table_name_41 WHERE to_par > 6 AND year_s__won = ""1962, 1967"";",0 What is the maximum emission quantity for each emission type in pollution sources that have not been inspected in the last 6 months?,"CREATE TABLE PollutionSources (id INT, source_name VARCHAR(255), emission_type VARCHAR(255), emission_quantity INT, last_inspection DATE);","SELECT emission_type, MAX(emission_quantity) FROM PollutionSources WHERE last_inspection <= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) GROUP BY emission_type;","SELECT emission_type, MAX(emission_quantity) FROM PollutionSources WHERE last_inspection DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) GROUP BY emission_type;",0 "What is the number of visitors who attended the ""African Art"" exhibition and are under 30 years old?","CREATE TABLE age_demographics (visitor_id INT, age INT); ",SELECT COUNT(*) FROM visitor_presence JOIN exhibitions ON visitor_presence.exhibition_id = exhibitions.exhibition_id JOIN age_demographics ON visitor_presence.visitor_id = age_demographics.visitor_id WHERE exhibitions.exhibition_name = 'African Art' AND age_demographics.age < 30;,SELECT COUNT(*) FROM age_demographics WHERE age 30;,0 What was the largest amount of spectators when St Kilda was the away team?,"CREATE TABLE table_name_36 (crowd INTEGER, away_team VARCHAR);","SELECT MAX(crowd) FROM table_name_36 WHERE away_team = ""st kilda"";","SELECT MAX(crowd) FROM table_name_36 WHERE away_team = ""st kilda"";",1 List the project details of the project both producing patent and paper as outcomes.,"CREATE TABLE Project_outcomes (project_id VARCHAR, outcome_code VARCHAR); CREATE TABLE Projects (project_details VARCHAR, project_id VARCHAR);",SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent';,"SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = ""Patent"" INTERSECT SELECT T2.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = ""Paper"";",0 Name the post poles for 4 podiums,"CREATE TABLE table_27582888_1 (poles INTEGER, podiums VARCHAR);",SELECT MAX(poles) FROM table_27582888_1 WHERE podiums = 4;,SELECT MAX(poles) FROM table_27582888_1 WHERE podiums = 4;,1 Who directed hamateur night?,"CREATE TABLE table_name_2 (director VARCHAR, title VARCHAR);","SELECT director FROM table_name_2 WHERE title = ""hamateur night"";","SELECT director FROM table_name_2 WHERE title = ""hamateur night"";",1 What was the attendance of the Oakland Raiders game?,"CREATE TABLE table_name_34 (attendance VARCHAR, opponent VARCHAR);","SELECT attendance FROM table_name_34 WHERE opponent = ""oakland raiders"";","SELECT attendance FROM table_name_34 WHERE opponent = ""oakland raiders"";",1 What's the title of the episode with production code 104?,"CREATE TABLE table_2818164_2 (title VARCHAR, production_code VARCHAR);",SELECT title FROM table_2818164_2 WHERE production_code = 104;,SELECT title FROM table_2818164_2 WHERE production_code = 104;,1 What is the maximum electric range for vehicles with a top speed greater than 120 mph in the 'vehicle_specs' table?,"CREATE TABLE vehicle_specs (make VARCHAR(50), model VARCHAR(50), year INT, top_speed INT, electric_range INT);",SELECT MAX(electric_range) FROM vehicle_specs WHERE top_speed > 120;,SELECT MAX(electric_range) FROM vehicle_specs WHERE top_speed > 120;,1 What is the highest rated eco-friendly hotel in Amsterdam?,"CREATE TABLE eco_hotels (hotel_id INT, name TEXT, city TEXT, rating FLOAT); ",SELECT name FROM eco_hotels WHERE city = 'Amsterdam' ORDER BY rating DESC LIMIT 1;,"SELECT name, MAX(rating) FROM eco_hotels WHERE city = 'Amsterdam' GROUP BY name;",0 "Find the number of security incidents and their corresponding categories for the technology sector, excluding incidents related to phishing.","CREATE TABLE incidents (category VARCHAR(50), sector VARCHAR(20)); ","SELECT category, COUNT(*) as incident_count FROM incidents WHERE sector = 'Technology' AND category != 'Phishing' GROUP BY category;","SELECT category, COUNT(*) FROM incidents WHERE sector = 'Technology' AND category!= 'phishing' GROUP BY category;",0 What is the first elected for georgia 4?,"CREATE TABLE table_1341930_11 (first_elected VARCHAR, district VARCHAR);","SELECT first_elected FROM table_1341930_11 WHERE district = ""Georgia 4"";","SELECT first_elected FROM table_1341930_11 WHERE district = ""Georgia 4"";",1 What is the 3rd highest score in each subject area?,"CREATE TABLE student_scores (student_id INT, subject TEXT, score INT);","SELECT subject, score FROM (SELECT subject, score, ROW_NUMBER() OVER (PARTITION BY subject ORDER BY score DESC) as rank FROM student_scores) AS subquery WHERE rank = 3;","SELECT subject, score FROM student_scores ORDER BY score DESC LIMIT 3;",0 "List all vessels in the ""Vessels"" table","CREATE TABLE Vessels (Id INT PRIMARY KEY, Name VARCHAR(100), Type VARCHAR(50), Year INT); ",SELECT * FROM Vessels;,SELECT * FROM Vessels;,1 List all the login names and family names of course author and tutors.,"CREATE TABLE Course_Authors_and_Tutors (login_name VARCHAR, family_name VARCHAR);","SELECT login_name, family_name FROM Course_Authors_and_Tutors;","SELECT login_name, family_name FROM Course_Authors_and_Tutors;",1 Delete companies with ESG rating above 85.,"CREATE TABLE companies (id INT, sector TEXT, ESG_rating FLOAT); ",DELETE FROM companies WHERE ESG_rating > 85;,DELETE FROM companies WHERE ESG_rating > 85;,1 What decision had a Record of 3–5–0?,"CREATE TABLE table_name_17 (decision VARCHAR, record VARCHAR);","SELECT decision FROM table_name_17 WHERE record = ""3–5–0"";","SELECT decision FROM table_name_17 WHERE record = ""3–5–0"";",1 What is the total price of cruelty-free skin care products?,"CREATE TABLE Products (id INT, name VARCHAR(50), category VARCHAR(50), price DECIMAL(5,2), cruelty_free BOOLEAN); ",SELECT SUM(p.price) as total_price FROM Products p WHERE p.category = 'Skin Care' AND p.cruelty_free = true;,SELECT SUM(price) FROM Products WHERE cruelty_free = true;,0 Find the number of autonomous driving research papers published by the top 3 countries?,"CREATE TABLE if not exists ResearchPapers (Id int, Title varchar(200), Abstract varchar(500), Authors varchar(200), PublicationDate date, Country varchar(50), IsAutonomousDriving varchar(5)); ",SELECT COUNT(*) FROM (SELECT Country FROM ResearchPapers WHERE IsAutonomousDriving = 'Yes' GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 3) AS Subquery;,"SELECT Country, COUNT(*) FROM ResearchPapers WHERE IsAutonomousDriving = 'Yes' GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 3;",0 Identify the number of artworks created by female artists from the 16th century and their average cultural impact score.,"CREATE TABLE Artists (ArtistID INT, ArtistName VARCHAR(50), Gender VARCHAR(10), BirthYear INT); CREATE TABLE Artworks (ArtworkID INT, ArtistID INT, ArtworkName VARCHAR(50), CulturalImpactScore FLOAT); ","SELECT COUNT(Artworks.ArtworkID), AVG(Artworks.CulturalImpactScore) FROM Artists INNER JOIN Artworks ON Artists.ArtistID = Artworks.ArtistID WHERE Artists.Gender = 'Female' AND Artists.BirthYear BETWEEN 1501 AND 1600;","SELECT COUNT(Artworks.ArtworkID), AVG(Artworks.CulturalImpactScore) FROM Artworks INNER JOIN Artists ON Artworks.ArtistID = Artists.ArtistID WHERE Artists.Gender = 'Female' AND Artists.BirthYear = 16;",0 Compare the market trends of Neodymium and Terbium,"CREATE TABLE market_trends (year INT, element VARCHAR(10), price FLOAT); ","SELECT element, price FROM market_trends WHERE year = 2015 UNION SELECT element, price FROM market_trends WHERE year = 2016 ORDER BY element, price;","SELECT element, price FROM market_trends WHERE element IN ('Neodymium', 'Terbium');",0 "What is the average energy savings achieved by energy efficiency programs in 'EnergySavings' table, per program and year?","CREATE TABLE EnergySavings (program_id INT, program VARCHAR(50), savings INT, year INT);","SELECT program, year, AVG(savings) as avg_savings FROM EnergySavings GROUP BY program, year;","SELECT program, AVG(savings) as avg_savings FROM EnergySavings GROUP BY program, year;",0 How many people attended on July 5?,"CREATE TABLE table_name_10 (attendance INTEGER, date VARCHAR);","SELECT SUM(attendance) FROM table_name_10 WHERE date = ""july 5"";","SELECT SUM(attendance) FROM table_name_10 WHERE date = ""july 5"";",1 Determine the percentage of organic products in the inventory for each product type.,"CREATE TABLE inventory(id INT PRIMARY KEY, product VARCHAR(50), quantity INT, organic BOOLEAN, product_type VARCHAR(50)); CREATE TABLE product_types(id INT PRIMARY KEY, type VARCHAR(50)); ","SELECT pt.type, AVG(CASE WHEN i.organic THEN 100.0 ELSE 0.0 END) AS percentage_organic FROM inventory i JOIN product_types pt ON i.product_type = pt.type GROUP BY pt.type;","SELECT pt.type, (COUNT(i.id) * 100.0 / (SELECT COUNT(i.id) FROM inventory)) as organic_percentage FROM inventory i JOIN product_types pt ON i.product_type = pt.type GROUP BY pt.type;",0 Find the total population for each community in the arctic_communities table.,"CREATE TABLE arctic_communities (id INT, name VARCHAR(50), population INT, language VARCHAR(50)); ","SELECT name, SUM(population) as total_population FROM arctic_communities GROUP BY name;","SELECT name, SUM(population) FROM arctic_communities GROUP BY name;",0 What is the American version of the British ə?,"CREATE TABLE table_name_62 (american VARCHAR, british VARCHAR);","SELECT american FROM table_name_62 WHERE british = ""ə"";","SELECT american FROM table_name_62 WHERE british = """";",0 How many climate communication campaigns were conducted in Small Island Developing States (SIDS) in the year 2020?,"CREATE TABLE climate_communication (year INT, region VARCHAR(255), count INT); ",SELECT count FROM climate_communication WHERE year = 2020 AND region = 'Small Island Developing States';,SELECT SUM(count) FROM climate_communication WHERE year = 2020 AND region = 'SIDS';,0 What is the lowest number of games with a rank less than 1?,"CREATE TABLE table_name_48 (games INTEGER, rank INTEGER);",SELECT MIN(games) FROM table_name_48 WHERE rank < 1;,SELECT MIN(games) FROM table_name_48 WHERE rank 1;,0 "What is the highest grid value with constructor Mclaren - Mercedes, driver David Coulthard, and has fewer than 66 laps?","CREATE TABLE table_name_99 (grid INTEGER, laps VARCHAR, constructor VARCHAR, driver VARCHAR);","SELECT MAX(grid) FROM table_name_99 WHERE constructor = ""mclaren - mercedes"" AND driver = ""david coulthard"" AND laps < 66;","SELECT MAX(grid) FROM table_name_99 WHERE constructor = ""mclaren - mercedes"" AND driver = ""david coulthard"" AND laps 66;",0 What is the tie no of the game that home team huddersfield town played?,"CREATE TABLE table_name_15 (tie_no VARCHAR, home_team VARCHAR);","SELECT tie_no FROM table_name_15 WHERE home_team = ""huddersfield town"";","SELECT tie_no FROM table_name_15 WHERE home_team = ""huddersfield town"";",1 "What is the total number of students enrolled in each district, and what is the average mental health score for students in each district?","CREATE TABLE districts (district_id INT, district_name TEXT); CREATE TABLE students (student_id INT, district_id INT, mental_health_score INT); ","SELECT d.district_name, COUNT(s.student_id) as num_students, AVG(s.mental_health_score) as avg_mental_health_score FROM students s JOIN districts d ON s.district_id = d.district_id GROUP BY s.district_id;","SELECT d.district_name, COUNT(s.student_id) as total_students, AVG(s.mental_health_score) as avg_mental_health_score FROM districts d JOIN students s ON d.district_id = s.district_id GROUP BY d.district_name;",0 What is Round 2 when Round 4 is Double and Round 3 is Single?,"CREATE TABLE table_name_56 (round_2 VARCHAR, round_4 VARCHAR, round_3 VARCHAR);","SELECT round_2 FROM table_name_56 WHERE round_4 = ""double"" AND round_3 = ""single"";","SELECT round_2 FROM table_name_56 WHERE round_4 = ""double"" AND round_3 = ""single"";",1 "Identify drugs approved in the EU, but not yet available in the UK market.","CREATE TABLE drugs (drug_id INT, drug_name VARCHAR(255), manufacturer VARCHAR(255), approval_status VARCHAR(255), market_availability VARCHAR(255)); CREATE TABLE sales (sale_id INT, drug_id INT, sale_amount DECIMAL(10,2), sale_tax DECIMAL(10,2), country VARCHAR(255)); ",SELECT d.drug_name FROM drugs d JOIN sales s ON d.drug_id = s.drug_id WHERE d.approval_status = 'Approved' AND d.market_availability = 'Available in EU' AND s.country != 'UK' GROUP BY d.drug_name;,SELECT d.drug_name FROM drugs d JOIN sales s ON d.drug_id = s.drug_id WHERE d.approval_status = 'Approved' AND s.country = 'EU' AND s.sale_tax IS NULL AND s.country = 'UK';,0 "What is the total revenue generated by community art programs, compared to revenue from permanent art collections, for museums in the United States?","CREATE TABLE museums (id INT, name VARCHAR(255), location VARCHAR(255)); CREATE TABLE art_collections (id INT, museum_id INT, type VARCHAR(255), revenue DECIMAL(10,2)); CREATE TABLE community_programs (id INT, museum_id INT, type VARCHAR(255), revenue DECIMAL(10,2));","SELECT m.location, SUM(ac.revenue) AS total_collection_revenue, SUM(cp.revenue) AS total_program_revenue FROM museums m LEFT JOIN art_collections ac ON m.id = ac.museum_id LEFT JOIN community_programs cp ON m.id = cp.museum_id WHERE m.location = 'United States' GROUP BY m.location;",SELECT SUM(art_collections.revenue) as total_revenue FROM art_collections INNER JOIN community_programs ON art_collections.museum_id = community_programs.museum_id INNER JOIN museums ON community_programs.museum_id = museums.id WHERE museums.location = 'United States' AND community_programs.type = 'Permanent';,0 What is the total number of naval bases in the 'AsiaPacific' schema?,"CREATE SCHEMA AsiaPacific; CREATE TABLE NavalBases (id INT, name VARCHAR(255), type VARCHAR(255), location VARCHAR(255)); ",SELECT COUNT(*) FROM AsiaPacific.NavalBases;,SELECT COUNT(*) FROM AsiaPacific.NavalBases;,1 What is the total number of visitors to arts events in Washington D.C. and the average age of attendees?,"CREATE TABLE arts_events (id INT, city VARCHAR(10), num_visitors INT, avg_age FLOAT); ","SELECT SUM(ae.num_visitors), AVG(ae.avg_age) FROM arts_events ae WHERE ae.city = 'DC';","SELECT city, SUM(num_visitors) as total_visitors, AVG(avg_age) as avg_age FROM arts_events WHERE city = 'Washington D.C.' GROUP BY city;",0 Which genetic research experiments resulted in the highest temperature increase?,"CREATE SCHEMA if not exists genetics;CREATE TABLE if not exists genetics.experiments (id INT, experiment_name VARCHAR(255), temperature_delta INT); ","SELECT experiment_name, temperature_delta FROM (SELECT experiment_name, temperature_delta, RANK() OVER (ORDER BY temperature_delta DESC) AS rank FROM genetics.experiments) ranked_experiments WHERE rank = 1;","SELECT experiment_name, MAX(temperature_delta) FROM genetics.experiments GROUP BY experiment_name;",0 Which city has the highest total budget for each department?,"CREATE TABLE CityBudget (CityName VARCHAR(50), Department VARCHAR(50), Budget INT); ","SELECT CityName, Department, SUM(Budget) OVER(PARTITION BY Department ORDER BY SUM(Budget) DESC ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) as TotalBudget FROM CityBudget GROUP BY CityName, Department;","SELECT CityName, Department, SUM(Budget) as TotalBudget FROM CityBudget GROUP BY CityName, Department ORDER BY TotalBudget DESC LIMIT 1;",0 Find the total number of yellow cards given to the team 'Manchester United' in all competitions.,"CREATE TABLE teams (team_id INT, name TEXT); CREATE TABLE yellow_cards (card_id INT, team_id INT, cards INT); ",SELECT SUM(cards) FROM yellow_cards JOIN teams ON yellow_cards.team_id = teams.team_id WHERE teams.name = 'Manchester United';,SELECT SUM(cards) FROM yellow_cards JOIN teams ON yellow_cards.team_id = teams.team_id WHERE teams.name = 'Manchester United';,1 "What was the team's record at the game attended by 30,452?","CREATE TABLE table_name_22 (record VARCHAR, attendance VARCHAR);","SELECT record FROM table_name_22 WHERE attendance = ""30,452"";","SELECT record FROM table_name_22 WHERE attendance = ""30,452"";",1 What is the average salary by department?,"CREATE TABLE salaries (id INT, employee_id INT, department_id INT, salary DECIMAL(10,2)); ","SELECT department_id, AVG(salary) as avg_salary FROM salaries GROUP BY department_id;","SELECT department_id, AVG(salary) as avg_salary FROM salaries GROUP BY department_id;",1 DELETE all records of audience members who are younger than 18 and attended events in Cairo or Istanbul in 2021.,"CREATE TABLE AudienceMembers (audience_member_id INT, audience_member_age INT, event_city VARCHAR(50), event_year INT); ","DELETE FROM AudienceMembers WHERE audience_member_age < 18 AND event_city IN ('Cairo', 'Istanbul') AND event_year = 2021;","DELETE FROM AudienceMembers WHERE audience_member_age 18 AND event_city IN ('Cairo', 'Istanbul') AND event_year = 2021;",0 "What is the total number of emergency incidents reported by each community policing center, broken down by incident type?","CREATE TABLE community_policing_centers (id INT, center_name TEXT); CREATE TABLE emergency_incidents (id INT, center_id INT, incident_type TEXT, incident_count INT); ","SELECT center_id, incident_type, SUM(incident_count) AS total_incidents FROM emergency_incidents GROUP BY center_id, incident_type;","SELECT c.center_name, e.incident_type, SUM(e.incident_count) as total_incidents FROM community_policing_centers c JOIN emergency_incidents e ON c.id = e.center_id GROUP BY c.center_name, e.incident_type;",0 "What is the lowest amount of silver medals Iceland, who has less than 87 medals, has?","CREATE TABLE table_name_95 (silver INTEGER, nation VARCHAR, total VARCHAR);","SELECT MIN(silver) FROM table_name_95 WHERE nation = ""iceland"" AND total < 87;","SELECT MIN(silver) FROM table_name_95 WHERE nation = ""island"" AND total 87;",0 What is the average virtual tour engagement time per user for hotels in Dubai?,"CREATE TABLE hotels (hotel_id INT, hotel_name TEXT, city TEXT, virtual_tour_views INT, virtual_tour_engagement_time INT); ","SELECT city, AVG(virtual_tour_engagement_time/virtual_tour_views) as avg_engagement_time FROM hotels WHERE city = 'Dubai' GROUP BY city;",SELECT AVG(virtual_tour_engagement_time) FROM hotels WHERE city = 'Dubai';,0 "Display the top 5 restaurants with the most menu items that contain at least one locally sourced ingredient, along with the total number of locally sourced menu items they offer.","CREATE TABLE restaurants (restaurant_id INT, total_menu_items INT); CREATE TABLE menus (menu_id INT, restaurant_id INT, menu_item_id INT, is_local BOOLEAN); ","SELECT r.restaurant_id, SUM(m.is_local) as total_local_items FROM restaurants r INNER JOIN menus m ON r.restaurant_id = m.restaurant_id GROUP BY r.restaurant_id ORDER BY total_local_items DESC LIMIT 5;","SELECT r.restaurant_id, COUNT(m.menu_item_id) as total_local_menu_items FROM restaurants r JOIN menus m ON r.restaurant_id = m.restaurant_id WHERE m.is_local = true GROUP BY r.restaurant_id ORDER BY total_local_menu_items DESC LIMIT 5;",0 What are the catalogs of releases from Sony Music Direct?,"CREATE TABLE table_name_72 (catalog VARCHAR, label VARCHAR);","SELECT catalog FROM table_name_72 WHERE label = ""sony music direct"";","SELECT catalog FROM table_name_72 WHERE label = ""sony music direct"";",1 What is the average hotel star rating for eco-friendly hotels in Costa Rica?,"CREATE TABLE hotels(hotel_id INT, name TEXT, star_rating INT, is_eco_friendly BOOLEAN);CREATE TABLE countries(country_id INT, name TEXT); ",SELECT AVG(star_rating) FROM hotels INNER JOIN countries ON hotels.country_id = countries.country_id WHERE is_eco_friendly = true AND countries.name = 'Costa Rica';,SELECT AVG(hotels.star_rating) FROM hotels INNER JOIN countries ON hotels.country_id = countries.country_id WHERE hotels.is_eco_friendly = true AND countries.name = 'Costa Rica';,0 What is the Location when the time was 11:55?,"CREATE TABLE table_name_22 (location VARCHAR, time VARCHAR);","SELECT location FROM table_name_22 WHERE time = ""11:55"";","SELECT location FROM table_name_22 WHERE time = ""11:55"";",1 List all pollution control initiatives in the North Pacific region.,"CREATE TABLE PollutionControl (id INT, name TEXT, location TEXT, start_date DATE, end_date DATE); ",SELECT * FROM PollutionControl WHERE location = 'North Pacific';,SELECT * FROM PollutionControl WHERE location = 'North Pacific';,1 What's in third place that's going 1-0?,CREATE TABLE table_name_39 (score VARCHAR);,"SELECT 3 AS rd_place FROM table_name_39 WHERE score = ""1-0"";","SELECT third FROM table_name_39 WHERE score = ""1-0"";",0 Who are the top 5 artists with the highest total revenue in 2021?,"CREATE TABLE ArtWorkSales (artworkID INT, artistID INT, saleDate DATE, revenue DECIMAL(10,2)); CREATE TABLE Artists (artistID INT, artistName VARCHAR(50));","SELECT a.artistName, SUM(aws.revenue) as total_revenue FROM ArtWorkSales aws JOIN Artists a ON aws.artistID = a.artistID WHERE YEAR(aws.saleDate) = 2021 GROUP BY a.artistName ORDER BY total_revenue DESC LIMIT 5;","SELECT Artists.artistName, SUM(ArtWorkSales.revenue) as total_revenue FROM Artists INNER JOIN ArtWorkSales ON Artists.artistID = ArtWorkSales.artistID WHERE YEAR(ArtWorkSales.saleDate) = 2021 GROUP BY Artists.artistName ORDER BY total_revenue DESC LIMIT 5;",0 Delete all records from the oceanography table where the salinity is higher than 40,"CREATE TABLE oceanography (id INT PRIMARY KEY, location VARCHAR(255), depth INT, salinity DECIMAL(5,2), temperature DECIMAL(5,2));",DELETE FROM oceanography WHERE salinity > 40;,DELETE FROM oceanography WHERE salinity > 40;,1 Get the total area of the ocean floor mapped by region,"CREATE TABLE ocean_floor_mapping (mapping_id INT, region VARCHAR(255), area INT);","SELECT region, SUM(area) FROM ocean_floor_mapping GROUP BY region;","SELECT region, SUM(area) FROM ocean_floor_mapping GROUP BY region;",1 What is the total number of events held in 'events_log' table for '2020' and '2021'?,"CREATE TABLE events_log (event_name VARCHAR(50), event_year INT); ","SELECT COUNT(*) FROM events_log WHERE event_year IN (2020, 2021);","SELECT COUNT(*) FROM events_log WHERE event_year IN (2020, 2021);",1 Show the three most fuel-efficient car models based on miles per gallon (MPG) in the 'vehicle_stats' table.,"CREATE TABLE vehicle_stats (id INT, car_model VARCHAR(20), MPG FLOAT, safety_rating INT); ","SELECT car_model, AVG(MPG) AS avg_mpg FROM vehicle_stats GROUP BY car_model ORDER BY avg_mpg DESC LIMIT 3;","SELECT car_model, MPG, safety_rating FROM vehicle_stats ORDER BY MPG DESC LIMIT 3;",0 "What is the Length of retirement of the President with an Age at inauguration of 70years, 53days?","CREATE TABLE table_name_51 (length_of_retirement VARCHAR, age_at_inauguration VARCHAR);","SELECT length_of_retirement FROM table_name_51 WHERE age_at_inauguration = ""70years, 53days"";","SELECT length_of_retirement FROM table_name_51 WHERE age_at_inauguration = ""70years, 53days"";",1 How many employees were hired before 2021?,"CREATE TABLE Employees (EmployeeID INT, HireDate DATE); ",SELECT COUNT(*) FROM Employees WHERE YEAR(HireDate) < 2021;,SELECT COUNT(*) FROM Employees WHERE HireDate '2021-01-01';,0 What is the School of the quarterback?,"CREATE TABLE table_name_43 (school VARCHAR, position VARCHAR);","SELECT school FROM table_name_43 WHERE position = ""quarterback"";","SELECT school FROM table_name_43 WHERE position = ""quarterback"";",1 How many touchdowns were scored when QB rating was 82.7?,"CREATE TABLE table_20906175_3 (touchdowns INTEGER, qb_rating VARCHAR);","SELECT MAX(touchdowns) FROM table_20906175_3 WHERE qb_rating = ""82.7"";","SELECT SUM(touchdowns) FROM table_20906175_3 WHERE qb_rating = ""82.7"";",0 Which athlete performed before 1984 in an 800 m event?,"CREATE TABLE table_name_40 (athlete VARCHAR, year VARCHAR, event VARCHAR);","SELECT athlete FROM table_name_40 WHERE year < 1984 AND event = ""800 m"";","SELECT athlete FROM table_name_40 WHERE year 1984 AND event = ""800 m"";",0 Which Driver has a Sponsor of pdvsa?,"CREATE TABLE table_name_26 (driver_s_ VARCHAR, sponsor_s_ VARCHAR);","SELECT driver_s_ FROM table_name_26 WHERE sponsor_s_ = ""pdvsa"";","SELECT driver_s_ FROM table_name_26 WHERE sponsor_s_ = ""pdvsa"";",1 "How many users have interacted with content related to the ""climate change"" topic, in the past month, and what percentage of the total user base does this represent?","CREATE TABLE users (user_id INT, joined_date DATE); CREATE TABLE interactions (interaction_id INT, user_id INT, topic VARCHAR(50), interaction_date DATE);",SELECT COUNT(DISTINCT u.user_id) * 100.0 / (SELECT COUNT(DISTINCT user_id) FROM users) AS percentage FROM users u JOIN interactions i ON u.user_id = i.user_id WHERE i.topic = 'climate change' AND i.interaction_date >= NOW() - INTERVAL '1 month';,"SELECT COUNT(DISTINCT users.user_id) AS num_users, (COUNT(DISTINCT interactions.interaction_id) * 100.0 / (SELECT COUNT(DISTINCT interactions.interaction_id) FROM interactions WHERE topics.topic = 'climate change')) AS percentage FROM users INNER JOIN interactions ON users.user_id = interactions.user_id WHERE topics.topic = 'climate change' AND interaction_date >= DATEADD(month, -1, GETDATE());",0 "What is the average salary for rural healthcare professionals, broken down by job title?","CREATE TABLE salaries (name VARCHAR(255), job_title VARCHAR(255), salary NUMERIC(10, 2)); ","SELECT job_title, AVG(salary) FROM salaries GROUP BY job_title;","SELECT job_title, AVG(salary) FROM salaries GROUP BY job_title;",1 Count the number of cannabis delivery services in Washington D.C. that were operational in 2020.,"CREATE TABLE services (type VARCHAR(20), operational INT, year INT); CREATE TABLE time_periods (year INT); ",SELECT COUNT(*) FROM services WHERE services.type = 'delivery' AND services.operational > 0 AND services.year = 2020;,SELECT COUNT(*) FROM services WHERE type = 'Cannabis Delivery' AND year = 2020;,0 What was the grid number of the team and driver with 14 points?,"CREATE TABLE table_name_9 (grid VARCHAR, points VARCHAR);","SELECT grid FROM table_name_9 WHERE points = ""14"";",SELECT grid FROM table_name_9 WHERE points = 14;,0 What is the total energy consumption of green buildings in the Southern region?,"CREATE TABLE consumption (id INT, region VARCHAR(20), type VARCHAR(20), consumption INT); ",SELECT SUM(consumption) FROM consumption WHERE region = 'Southern' AND type = 'Green';,SELECT SUM(consumption) FROM consumption WHERE region = 'Southern' AND type = 'Green';,1 What is the R&D expenditure for a specific drug in a given year?,"CREATE TABLE drugs (drug_id INT, drug_name VARCHAR(50)); CREATE TABLE rd_expenditures (expenditure_id INT, drug_id INT, year INT, amount INT); ",SELECT r.amount FROM rd_expenditures r JOIN drugs d ON r.drug_id = d.drug_id WHERE d.drug_name = 'DrugA' AND r.year = 2021;,"SELECT d.drug_name, SUM(r.amount) as total_expenditure FROM drugs d JOIN rd_expenditures r ON d.drug_id = r.drug_id GROUP BY d.drug_name;",0 What was the venue for the game on 10-09-2012?,"CREATE TABLE table_name_71 (venue VARCHAR, date VARCHAR);","SELECT venue FROM table_name_71 WHERE date = ""10-09-2012"";","SELECT venue FROM table_name_71 WHERE date = ""10-09-2012"";",1 Which vessels have loaded or unloaded cargo in the Port of Rotterdam in the last 30 days?,"CREATE TABLE CargoOperations (id INT, vessel_id INT, operation_type VARCHAR(20), operation_time TIMESTAMP); ","SELECT vessel_id FROM CargoOperations WHERE operation_time > DATE_SUB(NOW(), INTERVAL 30 DAY) AND operation_port = 'Port of Rotterdam';","SELECT vessel_id FROM CargoOperations WHERE operation_type = 'Loaded' OR operation_type = 'Unloaded' AND operation_time >= DATEADD(day, -30, GETDATE());",0 What was the total cost of all rural infrastructure projects in Kenya in 2015?',"CREATE TABLE rural_infrastructure_projects (id INT, country VARCHAR(255), year INT, cost FLOAT); ",SELECT SUM(cost) FROM rural_infrastructure_projects WHERE country = 'Kenya' AND year = 2015;,SELECT SUM(cost) FROM rural_infrastructure_projects WHERE country = 'Kenya' AND year = 2015;,1 "Which Venue has a Competition of pl group b, and a Score of 2-2?","CREATE TABLE table_name_82 (venue VARCHAR, competition VARCHAR, score VARCHAR);","SELECT venue FROM table_name_82 WHERE competition = ""pl group b"" AND score = ""2-2"";","SELECT venue FROM table_name_82 WHERE competition = ""pl group b"" AND score = ""2-2"";",1 Determine the total number of wins for teams with a mascot starting with the letter 'B'.,"CREATE TABLE teams_mascots (id INT, name VARCHAR(100), mascot VARCHAR(50), wins INT); ",SELECT SUM(wins) FROM teams_mascots WHERE mascot LIKE 'B%';,SELECT SUM(wins) FROM teams_mascots WHERE mascot LIKE 'B%';,1 Who are the top 5 traditional art instructors in Asia by total courses taught?,"CREATE TABLE Instructors (id INT, name VARCHAR(30), region VARCHAR(20)); CREATE TABLE Courses (instructor_id INT, location VARCHAR(20));","SELECT I.name, COUNT(C.instructor_id) as total_courses_taught FROM Instructors I JOIN Courses C ON I.id = C.instructor_id WHERE I.region = 'Asia' GROUP BY I.name ORDER BY total_courses_taught DESC LIMIT 5;","SELECT i.name, COUNT(c.instructor_id) as total_courses FROM Instructors i JOIN Courses c ON i.id = c.instructor_id WHERE i.region = 'Asia' GROUP BY i.name ORDER BY total_courses DESC LIMIT 5;",0 How many employees were hired in 2020?,"CREATE TABLE Hiring (HireID INT, HireDate DATE); ",SELECT COUNT(*) FROM Hiring WHERE YEAR(HireDate) = 2020;,SELECT COUNT(*) FROM Hiring WHERE YEAR(HireDate) = 2020;,1 What is the Place of the Player with a To par of +3 and Score of 73-70-73=216?,"CREATE TABLE table_name_45 (place VARCHAR, to_par VARCHAR, score VARCHAR);","SELECT place FROM table_name_45 WHERE to_par = ""+3"" AND score = 73 - 70 - 73 = 216;","SELECT place FROM table_name_45 WHERE to_par = ""+3"" AND score = 73 - 70 - 73 = 216;",1 Display the unique customer preferences for 'vegan' and 'gluten-free' dishes at 'HealthHut' and 'HarvestBowl'.,"CREATE TABLE HealthHut (customer_id INT, diet_type VARCHAR(15)); CREATE TABLE HarvestBowl (customer_id INT, diet_type VARCHAR(15)); ","SELECT customer_id FROM HealthHut WHERE diet_type IN ('vegan', 'gluten-free') UNION SELECT customer_id FROM HarvestBowl WHERE diet_type IN ('vegan', 'gluten-free');","SELECT DISTINCT HealthHut.diet_type, HarvestBowl.diet_type FROM HealthHut INNER JOIN HarvestBowl ON HealthHut.customer_id = HarvestBowl.customer_id WHERE HealthHut.diet_type IN ('vegan', 'gluten-free') GROUP BY HealthHut.diet_type;",0 What is the average number of accommodations provided per student with intellectual disabilities in each school?,"CREATE TABLE Accommodations (Student VARCHAR(255), School VARCHAR(255), Accommodation VARCHAR(255)); ","SELECT School, AVG(CountOfAccommodations) as AverageAccommodationsPerStudent FROM (SELECT School, Student, COUNT(*) as CountOfAccommodations FROM Accommodations WHERE Accommodation LIKE '%Intellectual Disability%' GROUP BY School, Student) as Subquery GROUP BY School;","SELECT School, AVG(CASE WHEN Accommodation = 'Intellectual Disability' THEN 1 ELSE 0 END) AS Avg_Accommodations FROM Accommodations GROUP BY School;",0 What is the lowest draft of player justin martin from the USA?,"CREATE TABLE table_name_80 (draft INTEGER, nationality VARCHAR, player VARCHAR);","SELECT MIN(draft) FROM table_name_80 WHERE nationality = ""usa"" AND player = ""justin martin"";","SELECT MIN(draft) FROM table_name_80 WHERE nationality = ""usa"" AND player = ""justin martin"";",1 "What is the minimum response time for emergency incidents in the city of Los Angeles, categorized by incident type?","CREATE TABLE emergency_responses (id INT, incident_id INT, response_time INT); CREATE TABLE emergency_incidents (id INT, incident_type VARCHAR(255), report_date DATE); ","SELECT incident_type, MIN(response_time) FROM emergency_responses JOIN emergency_incidents ON emergency_responses.incident_id = emergency_incidents.id GROUP BY incident_type;","SELECT incident_type, MIN(response_time) FROM emergency_responses JOIN emergency_incidents ON emergency_responses.incident_id = emergency_incidents.id WHERE city = 'Los Angeles' GROUP BY incident_type;",0 What is the average waste generation rate per capita in the industrial sector in the year 2019?,"CREATE TABLE waste_generation (id INT, sector VARCHAR(20), year INT, waste_generated FLOAT); ",SELECT AVG(waste_generated) FROM waste_generation WHERE sector = 'industrial' AND year = 2019;,SELECT AVG(waste_generated) FROM waste_generation WHERE sector = 'Industrial' AND year = 2019;,0 What's the minimum number of execution units?,CREATE TABLE table_25839957_5 (execution_units INTEGER);,SELECT MIN(execution_units) FROM table_25839957_5;,SELECT MIN(execution_units) FROM table_25839957_5;,1 What is the theme song for Magarikado no Kanojo?,"CREATE TABLE table_18540104_1 (theme_song_s_ VARCHAR, romaji_title VARCHAR);","SELECT theme_song_s_ FROM table_18540104_1 WHERE romaji_title = ""Magarikado no Kanojo"";","SELECT theme_song_s_ FROM table_18540104_1 WHERE romaji_title = ""Magarikado no Kanojo"";",1 What is the total grant amount awarded to faculty members in the Engineering department in the last 5 years?,"CREATE TABLE research_grants (grant_id INT, title VARCHAR(50), amount DECIMAL(10, 2), year INT, faculty_id INT, department VARCHAR(50)); CREATE TABLE faculty (faculty_id INT, name VARCHAR(50), department VARCHAR(50), gender VARCHAR(10)); ",SELECT SUM(amount) FROM research_grants rg JOIN faculty f ON rg.faculty_id = f.faculty_id WHERE f.department = 'Engineering' AND year BETWEEN YEAR(CURRENT_DATE) - 5 AND YEAR(CURRENT_DATE);,SELECT SUM(rg.amount) FROM research_grants rg JOIN faculty f ON rg.faculty_id = f.faculty_id WHERE rg.department = 'Engineering' AND rg.year BETWEEN 2017 AND 2021;,0 "When the Score was 6-2, which Opponent was played?","CREATE TABLE table_name_16 (opponent VARCHAR, score VARCHAR);","SELECT opponent FROM table_name_16 WHERE score = ""6-2"";","SELECT opponent FROM table_name_16 WHERE score = ""6-2"";",1 What candidates ran in the election when john s. wood was the incumbent?,"CREATE TABLE table_1342331_11 (candidates VARCHAR, incumbent VARCHAR);","SELECT candidates FROM table_1342331_11 WHERE incumbent = ""John S. Wood"";","SELECT candidates FROM table_1342331_11 WHERE incumbent = ""John S. Wood"";",1 "How many tickets were sold for events in New York, broken down by event type?","CREATE TABLE Events (id INT, event_name VARCHAR(100), event_type VARCHAR(50), location VARCHAR(100), start_time TIMESTAMP); CREATE TABLE Tickets (id INT, ticket_number INT, event_id INT, purchaser_name VARCHAR(100), purchase_date DATE);","SELECT event_type, COUNT(ticket_number) as tickets_sold FROM Events JOIN Tickets ON Events.id = Tickets.event_id WHERE location LIKE '%New York%' GROUP BY event_type;","SELECT e.event_type, COUNT(t.ticket_number) FROM Events e JOIN Tickets t ON e.id = t.event_id WHERE e.location = 'New York' GROUP BY e.event_type;",0 What is the average income and population of cities in Washington with a population greater than 50000?,"CREATE TABLE cities (name TEXT, state TEXT, avg_income INTEGER, population INTEGER); ","SELECT AVG(avg_income) as avg_income, AVG(population) as avg_population FROM cities WHERE state = 'Washington' AND population > 50000;","SELECT AVG(avg_income), population FROM cities WHERE state = 'Washington' AND population > 50000;",0 Show the average amount of funds raised by companies founded by LGBTQ+ individuals.,"CREATE TABLE company (id INT, name TEXT, founder_gender TEXT, founder_sexuality TEXT); CREATE TABLE investment (id INT, company_id INT, amount INT); ",SELECT AVG(amount) FROM investment JOIN company ON investment.company_id = company.id WHERE company.founder_sexuality = 'LGBTQ+',SELECT AVG(investment.amount) FROM investment INNER JOIN company ON investment.company_id = company.id WHERE company.founder_gender = 'LGBTQ+';,0 what is the original channel when the note is co-star in year 2012?,"CREATE TABLE table_name_61 (original_channel VARCHAR, note VARCHAR, year VARCHAR);","SELECT original_channel FROM table_name_61 WHERE note = ""co-star"" AND year = 2012;","SELECT original_channel FROM table_name_61 WHERE note = ""co-star"" AND year = 2012;",1 How many public libraries were there in 'CityA' as of 2020?,"CREATE TABLE Libraries(city VARCHAR(20), year INT, num_libraries INT); ",SELECT num_libraries FROM Libraries WHERE city = 'CityA' AND year = 2020;,SELECT SUM(num_libraries) FROM Libraries WHERE city = 'CityA' AND year = 2020;,0 "What is Party, when Results is ""Re-Elected"", and when District is ""Louisiana 5""?","CREATE TABLE table_name_76 (party VARCHAR, results VARCHAR, district VARCHAR);","SELECT party FROM table_name_76 WHERE results = ""re-elected"" AND district = ""louisiana 5"";","SELECT party FROM table_name_76 WHERE results = ""re-elected"" AND district = ""louisiana 5"";",1 What was the reating share when the total viewers was 11.49 million?,"CREATE TABLE table_23793770_2 (rating VARCHAR, total_viewers__in_millions_ VARCHAR);","SELECT rating / SHARE(18 AS –49) FROM table_23793770_2 WHERE total_viewers__in_millions_ = ""11.49"";","SELECT rating FROM table_23793770_2 WHERE total_viewers__in_millions_ = ""11.49"";",0 What is the percentage of repeat visitors to our exhibits in the last year?,"CREATE TABLE visitors (id INT, visit_year INT, exhibit_id INT); ",SELECT (COUNT(DISTINCT CASE WHEN visit_year = 2021 AND visit_year = 2022 THEN visitor_id END) / COUNT(DISTINCT visitor_id)) * 100 AS percentage_repeat_visitors FROM visitors;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM visitors WHERE visit_year >= YEAR(CURRENT_DATE) - INTERVAL '1 year')) as repeat_percentage FROM visitors WHERE visit_year >= YEAR(CURRENT_DATE);,0 What game has jones (10) as the high rebounds?,"CREATE TABLE table_name_94 (game VARCHAR, high_rebounds VARCHAR);","SELECT game FROM table_name_94 WHERE high_rebounds = ""jones (10)"";","SELECT game FROM table_name_94 WHERE high_rebounds = ""jones (10)"";",1 "Which class corresponds to more than 2 points, wins greater than 0, and a year earlier than 1973?","CREATE TABLE table_name_47 (class VARCHAR, wins VARCHAR, points VARCHAR, year VARCHAR);",SELECT class FROM table_name_47 WHERE points > 2 AND year < 1973 AND wins > 0;,SELECT class FROM table_name_47 WHERE points > 2 AND year 1973 AND wins > 0;,0 What is the highest Indian population?,CREATE TABLE table_10118412_6 (indian INTEGER);,SELECT MAX(indian) FROM table_10118412_6;,SELECT MAX(indian) FROM table_10118412_6;,1 "What is the lowest league cup with a premier League of 1, and the total is less than 5?","CREATE TABLE table_name_71 (league_cup INTEGER, premier_league VARCHAR, total VARCHAR);",SELECT MIN(league_cup) FROM table_name_71 WHERE premier_league = 1 AND total < 5;,SELECT MIN(league_cup) FROM table_name_71 WHERE premier_league = 1 AND total 5;,0 What kind of brakes for the model type rb 4at with 16x8.0jj (front) 16x8.0jj (rear) wheels and 225/50r16 92v(front) 225/50r16 92v(rear) tyres?,"CREATE TABLE table_250230_2 (brakes VARCHAR, model VARCHAR, wheels VARCHAR, tyres VARCHAR);","SELECT brakes FROM table_250230_2 WHERE wheels = ""16x8.0JJ (front) 16x8.0JJ (rear)"" AND tyres = ""225/50R16 92V(front) 225/50R16 92V(rear)"" AND model = ""Type RB 4AT"";","SELECT brakes FROM table_250230_2 WHERE wheels = ""16x8.0jj (front) 16x8.0jj (rear)"" AND tyres = ""225/50r16 92v(front) 225/50r16 92v(rear)"" AND model = ""Rb 4at"";",0 What is the maximum response time for emergency calls in the 'metro' schema?,"CREATE SCHEMA if not exists metro; CREATE TABLE if not exists metro.emergency_responses (id INT, response_time TIME); ",SELECT MAX(TIME_TO_SEC(response_time)) FROM metro.emergency_responses;,SELECT MAX(response_time) FROM metro.emergency_responses;,0 What is the percentage of Buddhist when the Population is ~2.6 million (2.6million)?,"CREATE TABLE table_name_39 (_percentage_buddhist VARCHAR, population VARCHAR);","SELECT _percentage_buddhist FROM table_name_39 WHERE population = ""~2.6 million (2.6million)"";","SELECT _percentage_buddhist FROM table_name_39 WHERE population = ""2.6 million (2.6million)"";",0 What is the minimum depth of the ocean floor in the Indian region?,"CREATE TABLE OceanFloorMapping (id INT, region VARCHAR(20), depth FLOAT); ",SELECT MIN(depth) FROM OceanFloorMapping WHERE region = 'Indian';,SELECT MIN(depth) FROM OceanFloorMapping WHERE region = 'Indian';,1 "Name the lowest Gain which has a Long of 0, and a GP-GS of 4–0, and a Loss smaller than 3?","CREATE TABLE table_name_95 (gain INTEGER, loss VARCHAR, long VARCHAR, gp_gs VARCHAR);","SELECT MIN(gain) FROM table_name_95 WHERE long = 0 AND gp_gs = ""4–0"" AND loss < 3;","SELECT MIN(gain) FROM table_name_95 WHERE long = 0 AND gp_gs = ""4–0"" AND loss 3;",0 What's the total budget for programs in the environment and human rights categories?,"CREATE TABLE Programs (ProgramID INT, ProgramName TEXT, Category TEXT, Budget DECIMAL); ","SELECT SUM(Budget) FROM Programs WHERE Category IN ('Environment', 'Human Rights');","SELECT SUM(Budget) FROM Programs WHERE Category IN ('Environment', 'Human Rights');",1 "Which home team has more than 19,000 spectators?","CREATE TABLE table_name_73 (home_team VARCHAR, crowd INTEGER);",SELECT home_team FROM table_name_73 WHERE crowd > 19 OFFSET 000;,SELECT home_team FROM table_name_73 WHERE crowd > 19 OFFSET 000;,1 Who are the supporters that provided donations on the same day?,"CREATE TABLE donations (id INT, supporter INT, donation_date DATE); ","SELECT a.supporter AS supporter1, b.supporter AS supporter2, a.donation_date FROM donations AS a INNER JOIN donations AS b ON a.donation_date = b.donation_date WHERE a.supporter <> b.supporter;","SELECT supporter FROM donations WHERE donation_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) AND CURRENT_DATE;",0 "What team was opponen in baltimore, at 2:00pm, on 4/06/08?","CREATE TABLE table_name_11 (opponent VARCHAR, date VARCHAR, city VARCHAR, time VARCHAR);","SELECT opponent FROM table_name_11 WHERE city = ""baltimore"" AND time = ""2:00pm"" AND date = ""4/06/08"";","SELECT opponent FROM table_name_11 WHERE city = ""baltimore"" AND time = ""2:00pm"" AND date = ""4/06/08"";",1 What is the average attendance for games played at stadium 'Stadium X'?,"CREATE TABLE games (stadium TEXT, attendance INT); ",SELECT AVG(attendance) FROM games WHERE stadium = 'Stadium X';,SELECT AVG(attendance) FROM games WHERE stadium = 'Stadium X';,1 What are the countries that have greater surface area than any country in Europe?,"CREATE TABLE country (Name VARCHAR, SurfaceArea INTEGER, Continent VARCHAR);","SELECT Name FROM country WHERE SurfaceArea > (SELECT MIN(SurfaceArea) FROM country WHERE Continent = ""Europe"");",SELECT Name FROM country WHERE SurfaceArea > (SELECT MAX(SurfaceArea) FROM country WHERE Continent = 'Europe');,0 "What is the minimum hydroelectricity with a less than 116.4 total, and a greater than 18.637 solar?","CREATE TABLE table_name_51 (hydroelectricity INTEGER, total VARCHAR, solar VARCHAR);",SELECT MIN(hydroelectricity) FROM table_name_51 WHERE total < 116.4 AND solar > 18.637;,SELECT MIN(hydroelectricity) FROM table_name_51 WHERE total 116.4 AND solar > 18.637;,0 Delete records in landfill_capacity where country is 'Germany',"CREATE TABLE landfill_capacity (id INT, country VARCHAR(20), year INT, capacity INT);",WITH data_to_delete AS (DELETE FROM landfill_capacity WHERE country = 'Germany' RETURNING *) DELETE FROM landfill_capacity WHERE id IN (SELECT id FROM data_to_delete);,DELETE FROM landfill_capacity WHERE country = 'Germany';,0 List all military aircraft carriers and their respective classes in the 'Aircraft_Carriers' table.,"CREATE SCHEMA IF NOT EXISTS defense_security;CREATE TABLE IF NOT EXISTS defense_security.Aircraft_Carriers (id INT PRIMARY KEY, carrier_name VARCHAR(255), class VARCHAR(255));","SELECT carrier_name, class FROM defense_security.Aircraft_Carriers;","SELECT carrier_name, class FROM defense_security.Aircraft_Carriers;",1 What is the total budget of projects focused on AI ethics in North America?,"CREATE TABLE projects (id INT, budget FLOAT, focus VARCHAR(255), location VARCHAR(255)); ",SELECT SUM(budget) FROM projects WHERE focus = 'AI ethics' AND location = 'North America';,SELECT SUM(budget) FROM projects WHERE focus = 'AI Ethics' AND location = 'North America';,0 What is the first yar that someone won with a score of 68-66-68-71=273?,"CREATE TABLE table_18862490_2 (year INTEGER, score VARCHAR);",SELECT MIN(year) FROM table_18862490_2 WHERE score = 68 - 66 - 68 - 71 = 273;,SELECT MIN(year) FROM table_18862490_2 WHERE score = 68 - 66 - 68 - 71 = 273;,1 How many water quality violations were there in each country in the year 2022?,"CREATE TABLE water_quality_violations(violation_id INT, violation_date DATE, country TEXT); ","SELECT country, COUNT(*) FROM water_quality_violations WHERE YEAR(violation_date) = 2022 GROUP BY country;","SELECT country, COUNT(*) FROM water_quality_violations WHERE violation_date BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY country;",0 What was the result for the 2007 WCC when Sun Yue was the alternate?,"CREATE TABLE table_name_33 (result VARCHAR, alternate VARCHAR, event VARCHAR);","SELECT result FROM table_name_33 WHERE alternate = ""sun yue"" AND event = ""2007 wcc"";","SELECT result FROM table_name_33 WHERE alternate = ""sun yue"" AND event = ""2007 wcc"";",1 List the names of organizations that have not made any social impact investments.,"CREATE TABLE social_impact_investments (investment_id INT, organization_id INT, region VARCHAR(50)); CREATE TABLE organizations (organization_id INT, organization_name VARCHAR(100)); ",SELECT o.organization_name FROM organizations o LEFT JOIN social_impact_investments i ON o.organization_id = i.organization_id WHERE i.investment_id IS NULL;,SELECT organizations.organization_name FROM organizations INNER JOIN social_impact_investments ON organizations.organization_id = social_impact_investments.organization_id WHERE organizations.organization_id IS NULL;,0 What was the winning percent of Notre Dame in 1905?,"CREATE TABLE table_name_86 (pct VARCHAR, years VARCHAR);","SELECT pct FROM table_name_86 WHERE years = ""1905"";",SELECT pct FROM table_name_86 WHERE years = 1905;,0 Which Oberliga Südwest has an Oberliga Bayern of fc schweinfurt 05?,"CREATE TABLE table_name_82 (oberliga_südwest VARCHAR, oberliga_bayern VARCHAR);","SELECT oberliga_südwest FROM table_name_82 WHERE oberliga_bayern = ""fc schweinfurt 05"";","SELECT oberliga_südwest FROM table_name_82 WHERE oberliga_bayern = ""fc schweinfurt 05"";",1 Calculate the average waste generation rate per day for each manufacturing plant in the month of February 2022.,"CREATE TABLE manufacturing_plants (id INT, name VARCHAR(50));CREATE TABLE waste_generation (plant_id INT, date DATE, amount INT); ","SELECT m.name, AVG(w.amount / 31.0) AS avg_daily_amount FROM manufacturing_plants m INNER JOIN waste_generation w ON m.id = w.plant_id WHERE w.date >= '2022-02-01' AND w.date <= '2022-02-28' GROUP BY m.name;","SELECT manufacturing_plants.name, AVG(waste_generation.amount) as avg_waste_per_day FROM manufacturing_plants INNER JOIN waste_generation ON manufacturing_plants.id = waste_generation.plant_id WHERE waste_generation.date BETWEEN '2022-02-01' AND '2022-02-28' GROUP BY manufacturing_plants.name;",0 What parties have at least three representatives?,CREATE TABLE representative (Party VARCHAR);,SELECT Party FROM representative GROUP BY Party HAVING COUNT(*) >= 3;,SELECT Party FROM representative GROUP BY Party HAVING COUNT(*) >= 3;,1 Update the 'last_funded_date' for 'Startup XYZ' in the 'startups' table to '2022-06-01',"CREATE TABLE startups (startup_name VARCHAR(50), last_funded_date DATE);",UPDATE startups SET last_funded_date = '2022-06-01' WHERE startup_name = 'Startup XYZ';,UPDATE startups SET last_funded_date = '2022-06-01' WHERE startup_name = 'Startup XYZ';,1 Identify the number of threat intelligence reports generated by region in the last month,"CREATE TABLE threat_intelligence (report_id INT, report_date DATE, region TEXT); ","SELECT region, COUNT(report_id) FROM threat_intelligence WHERE report_date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH) GROUP BY region;","SELECT region, COUNT(*) FROM threat_intelligence WHERE report_date >= DATEADD(month, -1, GETDATE()) GROUP BY region;",0 How many volunteers are there in total from the country of Canada?,"CREATE TABLE volunteers (id INT, name TEXT, country TEXT); ",SELECT COUNT(*) FROM volunteers WHERE country = 'Canada';,SELECT COUNT(*) FROM volunteers WHERE country = 'Canada';,1 What is the maximum and minimum temperature in the 'Pacific Ocean'?,"CREATE TABLE ocean_temps (id INTEGER, location VARCHAR(255), temperature REAL);","SELECT MIN(temperature) AS min_temp, MAX(temperature) AS max_temp FROM ocean_temps WHERE location = 'Pacific Ocean';","SELECT MAX(temperature), MIN(temperature) FROM ocean_temps WHERE location = 'Pacific Ocean';",0 What is the total cargo weight transported by each vessel in the last month?,"CREATE TABLE cargo (id INT, vessel_id INT, weight INT, date DATE); ","SELECT vessel_id, SUM(weight) as total_weight FROM cargo WHERE date >= '2022-05-01' AND date < '2022-06-01' GROUP BY vessel_id;","SELECT vessel_id, SUM(weight) as total_weight FROM cargo WHERE date >= DATEADD(month, -1, GETDATE()) GROUP BY vessel_id;",0 "For the team whose shirt sponsor is Evonik, who is the kitmaker?","CREATE TABLE table_name_54 (kitmaker VARCHAR, shirt_sponsor VARCHAR);","SELECT kitmaker FROM table_name_54 WHERE shirt_sponsor = ""evonik"";","SELECT kitmaker FROM table_name_54 WHERE shirt_sponsor = ""evonik"";",1 what's the home where date is march 27,"CREATE TABLE table_11964047_9 (home VARCHAR, date VARCHAR);","SELECT home FROM table_11964047_9 WHERE date = ""March 27"";","SELECT home FROM table_11964047_9 WHERE date = ""March 27"";",1 What was the total number of Byes for the team that had 1136 Against and fewer than 0 Draws?,"CREATE TABLE table_name_84 (byes VARCHAR, against VARCHAR, draws VARCHAR);",SELECT COUNT(byes) FROM table_name_84 WHERE against = 1136 AND draws < 0;,SELECT COUNT(byes) FROM table_name_84 WHERE against = 1136 AND draws 0;,0 What is the average fare for each train route during peak hours?,"CREATE TABLE train_routes (route_id INT, route_name TEXT, starting_point TEXT, ending_point TEXT, peak_hour BOOLEAN); CREATE TABLE train_fares (fare_id INT, route_id INT, fare_amount DECIMAL, fare_date DATE, fare_time TIME);","SELECT tr.route_name, AVG(tf.fare_amount) as avg_peak_fare FROM train_routes tr INNER JOIN train_fares tf ON tr.route_id = tf.route_id WHERE tr.peak_hour = TRUE GROUP BY tr.route_name;","SELECT tr.route_name, AVG(tf.fare_amount) as avg_fare FROM train_routes tr JOIN train_fares tf ON tr.route_id = tf.route_id WHERE tr.peak_hour = TRUE GROUP BY tr.route_name;",0 "What is 2001, when 1994 is ""A"", and when Tournament is ""Monte Carlo Masters""?",CREATE TABLE table_name_74 (tournament VARCHAR);,"SELECT 2001 FROM table_name_74 WHERE 1994 = ""a"" AND tournament = ""monte carlo masters"";","SELECT 2001 FROM table_name_74 WHERE 1994 = ""a"" AND tournament = ""monte carlo masters"";",1 Delete records of products that have been discontinued in the past 3 years from the products table.,"CREATE TABLE products (product_id INT PRIMARY KEY, product_name TEXT, discontinued_date DATE);",DELETE FROM products WHERE discontinued_date >= DATE(NOW()) - INTERVAL 3 YEAR;,"DELETE FROM products WHERE discontinued_date >= DATEADD(year, -3, GETDATE());",0 Find the number of unique species observed at each research station.,"CREATE TABLE species_observations (species_id INT, station_id INT);","SELECT station_id, COUNT(DISTINCT species_id) AS unique_species_count FROM species_observations GROUP BY station_id;","SELECT station_id, COUNT(DISTINCT species_id) FROM species_observations GROUP BY station_id;",0 What is the average squad age of the team whose shirt sponsor is Sho'rtan Gaz Mahsulot and whose kit manufacturer is Adidas? ,"CREATE TABLE table_25527255_2 (average_squad_age VARCHAR, shirt_sponsor VARCHAR, kit_manufacturer VARCHAR);","SELECT average_squad_age FROM table_25527255_2 WHERE shirt_sponsor = ""Sho'rtan Gaz Mahsulot"" AND kit_manufacturer = ""Adidas"";","SELECT average_squad_age FROM table_25527255_2 WHERE shirt_sponsor = ""Sho'rtan Gaz Mahsulot"" AND kit_manufacturer = ""Adidas"";",1 How many visitors below age 30 are there?,CREATE TABLE visitor (age INTEGER);,SELECT COUNT(*) FROM visitor WHERE age < 30;,SELECT COUNT(*) FROM visitor WHERE age 30;,0 What was the competition that was played in Zurich?,"CREATE TABLE table_name_96 (competition VARCHAR, venue VARCHAR);","SELECT competition FROM table_name_96 WHERE venue = ""zurich"";","SELECT competition FROM table_name_96 WHERE venue = ""zurich"";",1 What is the total market capitalization of digital assets in the Finance sector?,"CREATE TABLE digital_assets (asset_id INT, name VARCHAR(255), sector VARCHAR(255), market_cap DECIMAL(18,2)); ",SELECT SUM(market_cap) FROM digital_assets WHERE sector = 'Finance';,SELECT SUM(market_cap) FROM digital_assets WHERE sector = 'Finance';,1 List the number of exploration projects in Africa that started in the last 3 years.,"CREATE TABLE exploration_projects (id INT, location VARCHAR(20), start_date DATE);","SELECT COUNT(*) FROM exploration_projects WHERE location LIKE 'Africa%' AND start_date > DATE_SUB(CURDATE(), INTERVAL 3 YEAR);","SELECT COUNT(*) FROM exploration_projects WHERE location = 'Africa' AND start_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 YEAR);",0 "What is the average depth of all trenches in the Pacific Ocean, excluding trenches with an average depth of over 8000 meters?","CREATE TABLE ocean_trenches (trench_name TEXT, ocean TEXT, avg_depth FLOAT);",SELECT AVG(avg_depth) FROM ocean_trenches WHERE ocean = 'Pacific' HAVING AVG(avg_depth) < 8000;,SELECT AVG(avg_depth) FROM ocean_trenches WHERE ocean = 'Pacific Ocean' AND avg_depth 8000;,0 What is the average time to resolve security incidents for each category in the 'incident_response' table?,"CREATE TABLE incident_response (id INT, incident_category VARCHAR(50), resolution_time INT); ","SELECT incident_category, AVG(resolution_time) FROM incident_response GROUP BY incident_category;","SELECT incident_category, AVG(resolution_time) FROM incident_response GROUP BY incident_category;",1 "Find the number of routes and airport name for each source airport, order the results by decreasing number of routes.","CREATE TABLE airports (name VARCHAR, apid VARCHAR); CREATE TABLE routes (src_apid VARCHAR);","SELECT COUNT(*), T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name ORDER BY COUNT(*) DESC;","SELECT T1.name, COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.apid ORDER BY COUNT(*) DESC;",0 Which Overall has a Round of 7?,"CREATE TABLE table_name_99 (overall INTEGER, round VARCHAR);",SELECT MIN(overall) FROM table_name_99 WHERE round = 7;,SELECT SUM(overall) FROM table_name_99 WHERE round = 7;,0 "What is the average health equity score for urban areas, and how many community health workers serve in these areas?","CREATE TABLE state_health_equity (state VARCHAR(2), area VARCHAR(5), score INT); CREATE TABLE community_health_workers_by_area (area VARCHAR(5), num_workers INT); ","SELECT s.area, AVG(s.score) as avg_score, c.num_workers FROM state_health_equity s JOIN community_health_workers_by_area c ON s.area = c.area WHERE s.area = 'urban' GROUP BY s.area, c.num_workers;","SELECT AVG(score) as avg_score, SUM(num_workers) as total_workers FROM state_health_equity INNER JOIN community_health_workers_by_area ON state_health_equity.area = community_health_workers_by_area.area WHERE area = 'Urban';",0 Which public awareness campaigns ran in 2021?,"CREATE TABLE campaigns (campaign_id INT, campaign_name VARCHAR(50), campaign_year INT); ",SELECT campaign_name FROM campaigns WHERE campaign_year = 2021;,SELECT campaign_name FROM campaigns WHERE campaign_year = 2021;,1 How many VR sets have been sold in specific regions?,"CREATE TABLE VR_Sales (SaleID INT, Region VARCHAR(20), QuantitySold INT); ","SELECT Region, SUM(QuantitySold) FROM VR_Sales GROUP BY Region;","SELECT Region, SUM(QuantitySold) FROM VR_Sales GROUP BY Region;",1 What is the population of Cardwell?,"CREATE TABLE table_171236_2 (population INTEGER, official_name VARCHAR);","SELECT MIN(population) FROM table_171236_2 WHERE official_name = ""Cardwell"";","SELECT SUM(population) FROM table_171236_2 WHERE official_name = ""Cardwell"";",0 What is the total cost of inventory for non-vegetarian menu items in the month of January 2022?,"CREATE TABLE Menu (menu_id INT, menu_name VARCHAR(20), is_vegetarian BOOLEAN); CREATE TABLE Inventory (inventory_id INT, menu_id INT, inventory_cost FLOAT); ",SELECT SUM(Inventory.inventory_cost) FROM Inventory INNER JOIN Menu ON Inventory.menu_id = Menu.menu_id WHERE Menu.is_vegetarian = FALSE AND MONTH(Inventory.inventory_date) = 1 AND YEAR(Inventory.inventory_date) = 2022;,SELECT SUM(Inventory.inventory_cost) FROM Inventory INNER JOIN Menu ON Inventory.menu_id = Menu.menu_id WHERE Menu.is_vegetarian = true AND Inventory.inventory_date BETWEEN '2022-01-01' AND '2022-01-31';,0 Show the account id with most number of transactions.,CREATE TABLE Financial_transactions (account_id VARCHAR);,SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY COUNT(*) DESC LIMIT 1;,SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY COUNT(*) DESC LIMIT 1;,1 What is the Position of Pick #321?,"CREATE TABLE table_name_97 (position VARCHAR, pick__number VARCHAR);",SELECT position FROM table_name_97 WHERE pick__number = 321;,"SELECT position FROM table_name_97 WHERE pick__number = ""321"";",0 How many marine species live at a depth greater than 5000 meters?,"CREATE TABLE species (id INT, name VARCHAR(255), habitat VARCHAR(255), depth FLOAT); ",SELECT COUNT(*) FROM species WHERE depth > 5000;,SELECT COUNT(*) FROM species WHERE depth > 5000;,1 What's the score for December of 30?,"CREATE TABLE table_name_48 (score VARCHAR, december VARCHAR);",SELECT score FROM table_name_48 WHERE december = 30;,SELECT score FROM table_name_48 WHERE december = 30;,1 What is the count of visitors from India who attended exhibitions in 2022?,"CREATE TABLE Visitors (visitor_id INT, visitor_name VARCHAR(50), country VARCHAR(50)); CREATE TABLE Exhibitions (exhibition_id INT, exhibition_name VARCHAR(50), exhibition_year INT); CREATE TABLE Attendance (attendance_id INT, visitor_id INT, exhibition_id INT, attendance_date DATE); ",SELECT COUNT(*) FROM Visitors v JOIN Attendance a ON v.visitor_id = a.visitor_id JOIN Exhibitions e ON a.exhibition_id = e.exhibition_id WHERE v.country = 'India' AND e.exhibition_year = 2022;,SELECT COUNT(DISTINCT Visitors.visitor_id) FROM Visitors INNER JOIN Attendance ON Visitors.visitor_id = Attendance.visitor_id INNER JOIN Exhibitions ON Attendance.exhibition_id = Exhibitions.exhibition_id WHERE Visitors.country = 'India' AND Exhibitions.exhibition_year = 2022;,0 Name the birth of the person married 24 may 1935,"CREATE TABLE table_name_8 (birth VARCHAR, marriage VARCHAR);","SELECT birth FROM table_name_8 WHERE marriage = ""24 may 1935"";","SELECT birth FROM table_name_8 WHERE marriage = ""24 may 1935"";",1 What was the average money when the score was 74-72-75-71=292?,"CREATE TABLE table_name_82 (money___ INTEGER, score VARCHAR);",SELECT AVG(money___) AS $__ FROM table_name_82 WHERE score = 74 - 72 - 75 - 71 = 292;,SELECT AVG(money___) FROM table_name_82 WHERE score = 74 - 72 - 75 - 71 = 292;,0 What is the rank of explainable AI models by fairness score?,"CREATE TABLE ExplainableAI (model_name TEXT, fairness_score FLOAT); ","SELECT model_name, RANK() OVER (ORDER BY fairness_score DESC) rank FROM ExplainableAI;","SELECT model_name, fairness_score, RANK() OVER (ORDER BY fairness_score DESC) as rank FROM ExplainableAI;",0 What is the total revenue generated from mobile and broadband subscribers in Michigan?,"CREATE TABLE mobile_subscribers (id INT, name VARCHAR(50), monthly_fee DECIMAL(10,2), state VARCHAR(50)); CREATE TABLE broadband_subscribers (id INT, name VARCHAR(50), monthly_fee DECIMAL(10,2), state VARCHAR(50)); ","SELECT SUM(mobile_subscribers.monthly_fee + broadband_subscribers.monthly_fee) FROM mobile_subscribers, broadband_subscribers WHERE mobile_subscribers.state = 'MI' AND broadband_subscribers.state = 'MI';","SELECT SUM(mobile_subscribers.monthly_fee) as total_revenue, SUM(broadband_subscribers.monthly_fee) as total_revenue FROM mobile_subscribers INNER JOIN broadband_subscribers ON mobile_subscribers.id = broadband_subscribers.id WHERE mobile_subscribers.state = 'Michigan' GROUP BY mobile_subscribers.monthly_fee;",0 What was the result for james o'h. patterson when first elected in 1904?,"CREATE TABLE table_name_40 (result VARCHAR, first_elected VARCHAR, incumbent VARCHAR);","SELECT result FROM table_name_40 WHERE first_elected = ""1904"" AND incumbent = ""james o'h. patterson"";","SELECT result FROM table_name_40 WHERE first_elected = ""1904"" AND incumbent = ""james o'h. patterson"";",1 What is the Record at School of Tom O'Brien's team?,"CREATE TABLE table_28744929_2 (record_at_school VARCHAR, head_coach VARCHAR);","SELECT record_at_school FROM table_28744929_2 WHERE head_coach = ""Tom O'Brien"";","SELECT record_at_school FROM table_28744929_2 WHERE head_coach = ""Tom O'Brien"";",1 "What is the total number of students and staff in the ""disability_services"" schema, grouped by accommodation type, excluding the ""service_animal"" type?","CREATE SCHEMA disability_services; CREATE TABLE staff (id INT, name VARCHAR(50), accommodation VARCHAR(50)); CREATE TABLE students (id INT, name VARCHAR(50), accommodation VARCHAR(50));","SELECT accommodation, COUNT(*) FROM disability_services.staff WHERE accommodation != 'service_animal' GROUP BY accommodation UNION SELECT accommodation, COUNT(*) FROM disability_services.students WHERE accommodation != 'service_animal' GROUP BY accommodation;","SELECT s.accommodation, COUNT(s.id) as total_students, COUNT(s.id) as total_staff FROM disability_services.staff s JOIN disability_services.students s ON s.accommodation = s.accommodation WHERE s.accommodation!='service_animal' GROUP BY s.accommodation;",0 What was the competition for score of 3-0,"CREATE TABLE table_name_71 (competition VARCHAR, score VARCHAR);","SELECT competition FROM table_name_71 WHERE score = ""3-0"";","SELECT competition FROM table_name_71 WHERE score = ""3-0"";",1 Who is the player with a to par of +1?,"CREATE TABLE table_name_71 (player VARCHAR, to_par VARCHAR);","SELECT player FROM table_name_71 WHERE to_par = ""+1"";","SELECT player FROM table_name_71 WHERE to_par = ""+1"";",1 What is the average CO2 emission per international flight for each country?,"CREATE TABLE international_flights (flight_id INT, flight_number VARCHAR(50), airline_id INT, origin_country_id INT, destination_country_id INT, CO2_emissions INT, PRIMARY KEY (flight_id), FOREIGN KEY (airline_id) REFERENCES airlines(airline_id), FOREIGN KEY (origin_country_id) REFERENCES countries(country_id), FOREIGN KEY (destination_country_id) REFERENCES countries(country_id));CREATE TABLE countries (country_id INT, country_name VARCHAR(50), PRIMARY KEY (country_id));CREATE TABLE airlines (airline_id INT, airline_name VARCHAR(50), PRIMARY KEY (airline_id));","SELECT c.country_name, AVG(if.CO2_emissions) as avg_CO2_emission FROM international_flights if JOIN countries c ON if.origin_country_id = c.country_id GROUP BY c.country_name;","SELECT countries.country_name, AVG(international_flights.CO2_emissions) as avg_CO2_emissions FROM countries INNER JOIN international_flights ON countries.country_id = international_flights.country_id INNER JOIN airlines ON international_flights.airline_id = airlines.airline_id GROUP BY countries.country_name;",0 List the age of all music artists.,CREATE TABLE artist (Age VARCHAR);,SELECT Age FROM artist;,SELECT Age FROM artist;,1 Find the name and training hours of players whose hours are below 1500.,"CREATE TABLE Player (pName VARCHAR, HS INTEGER);","SELECT pName, HS FROM Player WHERE HS < 1500;","SELECT pName, HS FROM Player WHERE HS 1500;",0 What was the average monthly sales revenue for each store location in Canada in 2020?,"CREATE TABLE sales (store_location VARCHAR(50), sale_date DATE, revenue DECIMAL(10,2));","SELECT store_location, AVG(revenue) as avg_monthly_revenue FROM sales WHERE country = 'Canada' AND sale_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY store_location;","SELECT store_location, AVG(revenue) as avg_monthly_revenue FROM sales WHERE sale_date BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY store_location;",0 Which languages are at risk of disappearing and their associated heritage sites?,"CREATE TABLE LanguagesAtRisk (id INT, language TEXT, status TEXT); CREATE TABLE AssociatedHeritages (id INT, language_id INT, heritage_site TEXT); ","SELECT L.language, AH.heritage_site FROM LanguagesAtRisk L INNER JOIN AssociatedHeritages AH ON L.id = AH.language_id;","SELECT LanguagesAtRisk.language, AssociatedHeritages.heritage_site FROM LanguagesAtRisk INNER JOIN AssociatedHeritages ON LanguagesAtRisk.id = AssociatedHeritages.language_id WHERE LanguagesAtRisk.status = 'Disappearing';",0 What is the total playtime for each player in the last month?,"CREATE TABLE Players (PlayerID INT, PlayerName TEXT); CREATE TABLE GameSessions (SessionID INT, PlayerID INT, GameID INT, StartTime TIMESTAMP); ","SELECT Players.PlayerName, SUM(TIMESTAMPDIFF(MINUTE, GameSessions.StartTime, NOW())) as TotalPlaytime FROM Players JOIN GameSessions ON Players.PlayerID = GameSessions.PlayerID WHERE GameSessions.StartTime > DATE_SUB(NOW(), INTERVAL 1 MONTH) GROUP BY Players.PlayerName;","SELECT Players.PlayerName, SUM(GameSessions.StartTime) as TotalPlaytime FROM Players INNER JOIN GameSessions ON Players.PlayerID = GameSessions.PlayerID WHERE GameSessions.StartTime >= DATEADD(month, -1, GETDATE()) GROUP BY Players.PlayerName;",0 What is the total value of materials sourced from ethical suppliers for the automotive industry in the last financial year?,"CREATE TABLE materials_sourcing (id INT, industry VARCHAR(50), supplier_type VARCHAR(50), value DECIMAL(10,2), financial_year INT); ",SELECT SUM(value) FROM materials_sourcing WHERE industry = 'Automotive' AND supplier_type = 'Ethical' AND financial_year = 2021;,SELECT SUM(value) FROM materials_sourcing WHERE industry = 'Automotive' AND supplier_type = 'Ethical' AND financial_year BETWEEN 2019 AND 2021;,0 List all employees who have been in their current position for more than two years and are not in the 'Executive' department.,"CREATE TABLE Employees (Employee_ID INT, First_Name VARCHAR(50), Last_Name VARCHAR(50), Department VARCHAR(50), Position VARCHAR(50), Hire_Date DATE); ","SELECT * FROM Employees WHERE DATEDIFF(year, Hire_Date, GETDATE()) > 2 AND Department != 'Executive'","SELECT Employees.First_Name, Employees.Last_Name FROM Employees WHERE Employees.Department = 'Executive' AND Employees.Position = 'Executive' AND Employees.Hire_Date DATE_SUB(CURRENT_DATE, INTERVAL 2 YEAR);",0 How many returns were there from California to New York with a value greater than $100 in Q2?,"CREATE TABLE returns (id INT, value FLOAT, origin VARCHAR(20), destination VARCHAR(20), returned_date DATE); ",SELECT COUNT(*) FROM returns WHERE origin = 'California' AND destination = 'New York' AND value > 100 AND MONTH(returned_date) BETWEEN 4 AND 6;,SELECT COUNT(*) FROM returns WHERE origin = 'California' AND destination = 'New York' AND value > 100 AND returned_date BETWEEN '2022-07-01' AND '2022-09-30';,0 Identify the top 3 crops with the highest water usage in precision farming.,"CREATE TABLE Crops(name VARCHAR(255), water_usage INT); ","SELECT name, water_usage FROM Crops ORDER BY water_usage DESC LIMIT 3;","SELECT name, water_usage FROM Crops ORDER BY water_usage DESC LIMIT 3;",1 What is the earliest launch year for military satellites in the Oceanic region?,"CREATE TABLE MilitarySatellites (Id INT, Country VARCHAR(50), SatelliteName VARCHAR(50), LaunchYear INT, Function VARCHAR(50));",SELECT MIN(LaunchYear) AS EarliestLaunchYear FROM MilitarySatellites WHERE Country = 'Australia';,SELECT MIN(LaunchYear) FROM MilitarySatellites WHERE Country LIKE '%Oceania%';,0 Find the number of policyholders per state from the underwriting database.,"CREATE TABLE policyholders (policyholder_id INT, state VARCHAR(2));","SELECT state, COUNT(*) FROM policyholders GROUP BY state;","SELECT state, COUNT(*) FROM policyholders GROUP BY state;",1 What was Juan Manuel Fangio's reported pole position and the tire of C?,"CREATE TABLE table_name_34 (report VARCHAR, pole_position VARCHAR, tyre VARCHAR);","SELECT report FROM table_name_34 WHERE pole_position = ""juan manuel fangio"" AND tyre = ""c"";","SELECT report FROM table_name_34 WHERE pole_position = ""juan manuel fangio"" AND tyre = ""c"";",1 Which regions have a higher industrial water usage compared to domestic water usage?,"CREATE TABLE water_usage (sector VARCHAR(20), region VARCHAR(20), usage INT); ",SELECT region FROM water_usage WHERE industrial > domestic,"SELECT region, SUM(usage) as total_usage FROM water_usage WHERE sector = 'industrial' GROUP BY region HAVING SUM(usage) > (SELECT SUM(usage) FROM water_usage WHERE sector = 'domestic');",0 Name the year with finish of 12th and record of 23-36,"CREATE TABLE table_name_14 (year VARCHAR, finish VARCHAR, record VARCHAR);","SELECT year FROM table_name_14 WHERE finish = ""12th"" AND record = ""23-36"";","SELECT year FROM table_name_14 WHERE finish = ""12th"" AND record = ""23-36"";",1 When was the attendance 3686?,"CREATE TABLE table_name_23 (date VARCHAR, attendance VARCHAR);",SELECT date FROM table_name_23 WHERE attendance = 3686;,SELECT date FROM table_name_23 WHERE attendance = 3686;,1 What is the percentage of patients who were diagnosed with anxiety and depression in 2020?,"CREATE TABLE diagnoses (id INT, patient_id INT, diagnosis VARCHAR(20), diagnosis_date DATE); ","SELECT (COUNT(*) FILTER (WHERE diagnosis IN ('anxiety', 'depression'))) * 100.0 / COUNT(*) AS percentage FROM diagnoses WHERE YEAR(diagnosis_date) = 2020;","SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM diagnoses WHERE diagnosis_date BETWEEN '2020-01-01' AND '2020-12-31')) FROM diagnoses WHERE diagnosis IN ('Anxiety', 'Depression');",0 "Where was the December 12, 1965 game? ","CREATE TABLE table_17781886_1 (game_site VARCHAR, date VARCHAR);","SELECT game_site FROM table_17781886_1 WHERE date = ""December 12, 1965"";","SELECT game_site FROM table_17781886_1 WHERE date = ""December 12, 1965"";",1 Add a new job title called 'Data Science Manager' to the JobTitle table,"CREATE TABLE JobTitle (JobTitleID INT PRIMARY KEY, JobTitleName VARCHAR(50));","INSERT INTO JobTitle (JobTitleID, JobTitleName) VALUES (7, 'Data Science Manager');","INSERT INTO JobTitle (JobTitleID, JobTitleName) VALUES (1, 'Data Science Manager');",0 How many Grand Prix were the winning constructor Benetton - Ford and the pole position was Michael Schumacher?,"CREATE TABLE table_1137702_3 (grand_prix VARCHAR, winning_constructor VARCHAR, pole_position VARCHAR);","SELECT COUNT(grand_prix) FROM table_1137702_3 WHERE winning_constructor = ""Benetton - Ford"" AND pole_position = ""Michael Schumacher"";","SELECT COUNT(grand_prix) FROM table_1137702_3 WHERE winning_constructor = ""Benetton - Ford"" AND pole_position = ""Michael Schumacher"";",1 What is Brian Gay's place?,"CREATE TABLE table_name_77 (place VARCHAR, player VARCHAR);","SELECT place FROM table_name_77 WHERE player = ""brian gay"";","SELECT place FROM table_name_77 WHERE player = ""brian gay"";",1 What is the total amount of research grants awarded to faculty members who identify as Asian?,"CREATE TABLE faculties (faculty_id INT, name VARCHAR(50), department VARCHAR(20), race VARCHAR(20)); CREATE TABLE research_grants (grant_id INT, title VARCHAR(50), amount DECIMAL(10,2), principal_investigator VARCHAR(50), faculty_id INT, start_date DATE, end_date DATE); ",SELECT SUM(amount) FROM research_grants JOIN faculties ON research_grants.faculty_id = faculties.faculty_id WHERE faculties.race = 'Asian';,SELECT SUM(rg.amount) FROM research_grants rg JOIN faculties f ON rg.faculty_id = f.faculty_id WHERE f.race = 'Asian';,0 What are the top 3 satellite models with the most successful deployments in the Asia-Pacific region?,"CREATE TABLE Satellite (satellite_model VARCHAR(50), region VARCHAR(50), deployments INT); CREATE TABLE Deployment_Log (satellite_model VARCHAR(50), deployment_status VARCHAR(50)); ","SELECT s.satellite_model, COUNT(s.deployments) as total_deployments FROM Satellite s INNER JOIN Deployment_Log dl ON s.satellite_model = dl.satellite_model WHERE s.region = 'Asia-Pacific' AND dl.deployment_status = 'Success' GROUP BY s.satellite_model ORDER BY total_deployments DESC LIMIT 3;","SELECT satellite_model, SUM(deployments) as total_deployments FROM Satellite INNER JOIN Deployment_Log ON Satellite.satellite_model = Deployment_Log.satellite_model WHERE Satellite.region = 'Asia-Pacific' GROUP BY satellite_model ORDER BY total_deployments DESC LIMIT 3;",0 What is the total sales revenue for each drug in Q1 2020?,"CREATE TABLE drugs (drug_id INT, drug_name TEXT); CREATE TABLE sales (sale_id INT, drug_id INT, sale_date DATE, revenue FLOAT); ","SELECT drug_name, SUM(revenue) as Q1_2020_Revenue FROM sales JOIN drugs ON sales.drug_id = drugs.drug_id WHERE sale_date BETWEEN '2020-01-01' AND '2020-03-31' GROUP BY drug_name;","SELECT d.drug_name, SUM(s.revenue) as total_revenue FROM drugs d JOIN sales s ON d.drug_id = s.drug_id WHERE s.sale_date BETWEEN '2020-01-01' AND '2020-03-31' GROUP BY d.drug_name;",0 "What was the average viewership for TV shows, by day of the week and genre?","CREATE TABLE TVShowsViewership (title VARCHAR(255), genre VARCHAR(255), viewership FLOAT, air_date DATE); ","SELECT genre, DATE_PART('dow', air_date) as day_of_week, AVG(viewership) FROM TVShowsViewership GROUP BY genre, day_of_week;","SELECT DATE_FORMAT(air_date, '%Y-%m') AS day_of_week, genre, AVG(viewership) AS avg_viewership FROM TVShowsViewership GROUP BY day_of_week, genre;",0 What is the average loan amount for socially responsible lending in the United Kingdom?,"CREATE TABLE socially_responsible_lending (id INT, country VARCHAR(255), loan_amount DECIMAL(10,2));",SELECT AVG(loan_amount) FROM socially_responsible_lending WHERE country = 'United Kingdom';,SELECT AVG(loan_amount) FROM socially_responsible_lending WHERE country = 'United Kingdom';,1 Name the sum of Long for yards less than 197 and players of matt nagy,"CREATE TABLE table_name_12 (long INTEGER, yards VARCHAR, player VARCHAR);","SELECT SUM(long) FROM table_name_12 WHERE yards < 197 AND player = ""matt nagy"";","SELECT SUM(long) FROM table_name_12 WHERE yards 197 AND player = ""matt nagy"";",0 What is the maximum waiting time for trams in the Vienna public transportation network?,"CREATE TABLE tram_waiting_times (tram_id INT, waiting_time INT); ",SELECT MAX(waiting_time) FROM tram_waiting_times;,SELECT MAX(waiting_time) FROM tram_waiting_times;,1 What is the percentage of employees in each department who have completed diversity training?,"CREATE TABLE Employees (EmployeeID INT, Name VARCHAR(50), JobTitle VARCHAR(50), Department VARCHAR(50)); CREATE TABLE Training (TrainingID INT, EmployeeID INT, Course VARCHAR(50), Completed DATE); ","SELECT E.Department, (COUNT(*) / (SELECT COUNT(*) FROM Employees WHERE Department = E.Department)) * 100 AS Percentage FROM Employees E INNER JOIN Training T ON E.EmployeeID = T.EmployeeID WHERE T.Course = 'Diversity Training' GROUP BY E.Department;","SELECT Department, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Employees WHERE JobTitle = 'Diversity') AS Percentage FROM Employees WHERE JobTitle = 'Diversity' GROUP BY Department;",0 How many total volunteers have there been in projects funded by the World Bank?,"CREATE TABLE volunteers (id INT, project_id INT, name TEXT); CREATE TABLE projects (id INT, funder TEXT, total_funding DECIMAL); ",SELECT COUNT(*) FROM volunteers INNER JOIN projects ON volunteers.project_id = projects.id WHERE projects.funder = 'World Bank';,SELECT COUNT(*) FROM volunteers JOIN projects ON volunteers.project_id = projects.id WHERE projects.funder = 'World Bank';,0 Create a view to show the total number of autonomous vehicles in each city,"CREATE TABLE autonomous_vehicles (id INT PRIMARY KEY, city VARCHAR(255), type VARCHAR(255), num_vehicles INT);","CREATE VIEW autonomous_vehicles_by_city AS SELECT city, SUM(num_vehicles) as total_autonomous_vehicles FROM autonomous_vehicles WHERE type = 'Autonomous' GROUP BY city;","CREATE VIEW autonomous_vehicles AS SELECT city, SUM(num_vehicles) AS total_vehicles FROM autonomous_vehicles GROUP BY city;",0 Name the try bonus and tries for 30,"CREATE TABLE table_15467476_2 (try_bonus VARCHAR, tries_for VARCHAR);","SELECT try_bonus FROM table_15467476_2 WHERE tries_for = ""30"";",SELECT try_bonus FROM table_15467476_2 WHERE tries_for = 30;,0 What is the sum of draws with 274-357 goals?,"CREATE TABLE table_name_94 (drawn INTEGER, goals VARCHAR);","SELECT SUM(drawn) FROM table_name_94 WHERE goals = ""274-357"";","SELECT SUM(drawn) FROM table_name_94 WHERE goals = ""274-357"";",1 In which competition was Moradi's time 1:48.58?,"CREATE TABLE table_name_12 (competition VARCHAR, notes VARCHAR);","SELECT competition FROM table_name_12 WHERE notes = ""1:48.58"";","SELECT competition FROM table_name_12 WHERE notes = ""1:48.58"";",1 What is the average ethical rating of suppliers in Germany and France?,"CREATE TABLE suppliers (id INT, name VARCHAR(50), location VARCHAR(50), ethical_rating FLOAT); ","SELECT AVG(ethical_rating) FROM suppliers WHERE location IN ('Germany', 'France');","SELECT AVG(ethical_rating) FROM suppliers WHERE location IN ('Germany', 'France');",1 How many times did Robin Hayes run?,"CREATE TABLE table_1805191_34 (candidates VARCHAR, incumbent VARCHAR);","SELECT COUNT(candidates) FROM table_1805191_34 WHERE incumbent = ""Robin Hayes"";","SELECT COUNT(candidates) FROM table_1805191_34 WHERE incumbent = ""Robin Hayes"";",1 What network has a Play-by-play by Jack Edwards in 2000?,"CREATE TABLE table_name_3 (network VARCHAR, play_by_play VARCHAR, year VARCHAR);","SELECT network FROM table_name_3 WHERE play_by_play = ""jack edwards"" AND year = 2000;","SELECT network FROM table_name_3 WHERE play_by_play = ""jack edwards"" AND year = 2000;",1 what is the loan club with the start source is bbc sport and started on 9 february?,"CREATE TABLE table_name_28 (loan_club VARCHAR, start_source VARCHAR, started VARCHAR);","SELECT loan_club FROM table_name_28 WHERE start_source = ""bbc sport"" AND started = ""9 february"";","SELECT loan_club FROM table_name_28 WHERE start_source = ""bbc sport"" AND started = ""9 february"";",1 Who directed the episode that was watched by 2.97 million U.S. viewers? ,"CREATE TABLE table_29920800_1 (directed_by VARCHAR, us_viewers__million_ VARCHAR);","SELECT directed_by FROM table_29920800_1 WHERE us_viewers__million_ = ""2.97"";","SELECT directed_by FROM table_29920800_1 WHERE us_viewers__million_ = ""2.97"";",1 Name the date with works number less than 1673 and number less than 3,"CREATE TABLE table_name_42 (date VARCHAR, works_number VARCHAR, number VARCHAR);",SELECT date FROM table_name_42 WHERE works_number < 1673 AND number < 3;,SELECT date FROM table_name_42 WHERE works_number 1673 AND number 3;,0 What is the safety record for the Boeing 737 MAX series?,"CREATE TABLE FlightSafety (Id INT, Manufacturer VARCHAR(50), Model VARCHAR(50), Incidents INT); ",SELECT Incidents FROM FlightSafety WHERE Manufacturer = 'Boeing' AND Model = '737 MAX';,SELECT Incidents FROM FlightSafety WHERE Manufacturer = 'Boeing' AND Model = '737 MAX';,1 What is the distribution of visitors by age group for the modern art exhibitions?,"CREATE TABLE Exhibitions (ID INT, Name VARCHAR(255), Type VARCHAR(255)); CREATE TABLE Visitors (ID INT, ExhibitionID INT, Age INT, Gender VARCHAR(50));","SELECT e.Type, v.AgeGroup, COUNT(v.ID) as VisitorCount FROM Visitors v JOIN (SELECT ExhibitionID, CASE WHEN Age < 18 THEN 'Under 18' WHEN Age BETWEEN 18 AND 35 THEN '18-35' WHEN Age BETWEEN 36 AND 60 THEN '36-60' ELSE 'Above 60' END AS AgeGroup FROM Visitors WHERE ExhibitionID IN (1, 2)) v2 ON v.ID = v2.ID GROUP BY e.Type, v.AgeGroup;","SELECT e.Type, v.Age, COUNT(v.ID) as VisitorCount FROM Visitors v JOIN Exhibitions e ON v.ExhibitionID = e.ID WHERE e.Type = 'Modern Art' GROUP BY e.Type, v.Age;",0 "Which away team has an attendance of more than 17,000?","CREATE TABLE table_name_30 (away_team VARCHAR, crowd INTEGER);",SELECT away_team FROM table_name_30 WHERE crowd > 17 OFFSET 000;,SELECT away_team FROM table_name_30 WHERE crowd > 17 OFFSET 000;,1 List the top 3 mines with the highest annual coal production in the USA.,"CREATE TABLE mines (id INT, name VARCHAR(255), location VARCHAR(255), annual_coal_production INT); ","SELECT m.name, m.annual_coal_production FROM mines m ORDER BY m.annual_coal_production DESC LIMIT 3;","SELECT name, annual_coal_production FROM mines WHERE location = 'USA' ORDER BY annual_coal_production DESC LIMIT 3;",0 On what date was the DVD released for the season with fewer than 13 episodes that aired before season 8?,"CREATE TABLE table_name_74 (dvd_release_date VARCHAR, season VARCHAR, episodes VARCHAR);",SELECT dvd_release_date FROM table_name_74 WHERE season < 8 AND episodes < 13;,SELECT dvd_release_date FROM table_name_74 WHERE season 8 AND episodes 13;,0 "What is the average attendance for the games after week 2 on September 23, 1973?","CREATE TABLE table_name_31 (attendance INTEGER, date VARCHAR, week VARCHAR);","SELECT AVG(attendance) FROM table_name_31 WHERE date = ""september 23, 1973"" AND week > 2;","SELECT AVG(attendance) FROM table_name_31 WHERE date = ""september 23, 1973"" AND week > 2;",1 What is the total number of astronauts who have been to the Moon?,"CREATE TABLE astronauts (id INT, name TEXT, moon_visits INT); ",SELECT COUNT(*) FROM astronauts WHERE moon_visits > 0;,SELECT COUNT(*) FROM astronauts WHERE moon_visits = 1;,0 What is the minimum funding for biosensor technology development?,"CREATE TABLE biosensor_tech (id INT, project TEXT, funding FLOAT); ",SELECT MIN(funding) FROM biosensor_tech;,SELECT MIN(funding) FROM biosensor_tech;,1 Which manufacturers have the highest and lowest average prices for eco-friendly garments?,"CREATE TABLE manufacturers (manufacturer_id INT, manufacturer_name VARCHAR(255));CREATE TABLE garments (garment_id INT, garment_name VARCHAR(255), manufacturer_id INT, price DECIMAL(10,2), is_eco_friendly BOOLEAN);","SELECT m.manufacturer_name, AVG(g.price) AS avg_price FROM garments g JOIN manufacturers m ON g.manufacturer_id = m.manufacturer_id WHERE g.is_eco_friendly = TRUE GROUP BY m.manufacturer_name ORDER BY avg_price DESC, m.manufacturer_name ASC LIMIT 1; SELECT m.manufacturer_name, AVG(g.price) AS avg_price FROM garments g JOIN manufacturers m ON g.manufacturer_id = m.manufacturer_id WHERE g.is_eco_friendly = TRUE GROUP BY m.manufacturer_name ORDER BY avg_price ASC, m.manufacturer_name ASC LIMIT 1;","SELECT m.manufacturer_name, AVG(g.price) as avg_price FROM manufacturers m INNER JOIN garments g ON m.manufacturer_id = g.manufacturer_id WHERE g.is_eco_friendly = true GROUP BY m.manufacturer_name ORDER BY avg_price DESC LIMIT 1;",0 What is the total number of infrastructure projects?,"CREATE TABLE infrastructure_projects (id INT, project_name VARCHAR(50), location VARCHAR(50)); ",SELECT COUNT(*) as num_projects FROM infrastructure_projects;,SELECT COUNT(*) FROM infrastructure_projects;,0 Who was the writer for the episode with 2.15 million u.s.viewers?,"CREATE TABLE table_22380270_1 (written_by VARCHAR, us_viewers__millions_ VARCHAR);","SELECT written_by FROM table_22380270_1 WHERE us_viewers__millions_ = ""2.15"";","SELECT written_by FROM table_22380270_1 WHERE us_viewers__millions_ = ""2.15"";",1 "For series number 256, what was the original air date?","CREATE TABLE table_17356106_1 (original_air_date VARCHAR, series__number VARCHAR);",SELECT original_air_date FROM table_17356106_1 WHERE series__number = 256;,SELECT original_air_date FROM table_17356106_1 WHERE series__number = 256;,1 What is the maximum donation amount in 'city_donations' table for 'Asia'?,"CREATE TABLE city_donations (donation_id INT, donation_amount FLOAT, donation_date DATE, city VARCHAR(50)); ",SELECT MAX(donation_amount) FROM city_donations WHERE city = 'Asia';,SELECT MAX(donation_amount) FROM city_donations WHERE city = 'Asia';,1 What is the average virtual tour engagement time in Africa?,"CREATE TABLE virtual_tour_engagement (engagement_id INT, tour_id INT, engagement_time FLOAT); CREATE TABLE tour_region (tour_id INT, region TEXT); ",SELECT AVG(engagement_time) FROM virtual_tour_engagement INNER JOIN tour_region ON virtual_tour_engagement.tour_id = tour_region.tour_id WHERE tour_region.region = 'Africa';,SELECT AVG(virtual_tour_engagement.engagement_time) FROM virtual_tour_engagement INNER JOIN tour_region ON virtual_tour_engagement.tour_id = tour_region.tour_id WHERE tour_region.region = 'Africa';,0 When was the incumbent in the Tennessee 4 district first elected? ,"CREATE TABLE table_1341453_44 (first_elected VARCHAR, district VARCHAR);","SELECT first_elected FROM table_1341453_44 WHERE district = ""Tennessee 4"";","SELECT first_elected FROM table_1341453_44 WHERE district = ""Tennessee 4"";",1 Count the number of visitors who visited multiple museums,"CREATE TABLE MuseumVisitors (visitor_id INT, museum_id INT); ",SELECT COUNT(*) FROM (SELECT visitor_id FROM MuseumVisitors GROUP BY visitor_id HAVING COUNT(DISTINCT museum_id) > 1) subquery;,SELECT COUNT(DISTINCT visitor_id) FROM MuseumVisitors;,0 Which club was from Great Britain?,"CREATE TABLE table_name_27 (club VARCHAR, nation VARCHAR);","SELECT club FROM table_name_27 WHERE nation = ""great britain"";","SELECT club FROM table_name_27 WHERE nation = ""great britain"";",1 "What were the Opponents of the team, that made it to the third round, before 2008?","CREATE TABLE table_name_95 (opponents VARCHAR, year VARCHAR, progress VARCHAR);","SELECT opponents FROM table_name_95 WHERE year < 2008 AND progress = ""third round"";","SELECT opponents FROM table_name_95 WHERE year 2008 AND progress = ""third round"";",0 How many artworks were exhibited in the Whitney Biennial?,"CREATE TABLE Exhibitions (id INT, artwork_id INT, exhibition_name TEXT); CREATE TABLE Artworks (id INT, title TEXT, artist_id INT, price INT); ",SELECT COUNT(DISTINCT Artworks.id) FROM Artworks INNER JOIN Exhibitions ON Artworks.id = Exhibitions.artwork_id WHERE Exhibitions.exhibition_name = 'Whitney Biennial';,SELECT COUNT(*) FROM Exhibitions e JOIN Artworks a ON e.artwork_id = a.artist_id WHERE e.exhibition_name = 'Whitney Biennial';,0 "What is the total amount of climate finance provided by each organization, ranked from highest to lowest, for the years 2010-2020?","CREATE TABLE ClimateFinance (Organization VARCHAR(50), Year INT, Amount INT); ","SELECT Organization, SUM(Amount) AS TotalFinance FROM ClimateFinance WHERE Year BETWEEN 2010 AND 2020 GROUP BY Organization ORDER BY TotalFinance DESC;","SELECT Organization, SUM(Amount) as TotalFinance FROM ClimateFinance WHERE Year BETWEEN 2010 AND 2020 GROUP BY Organization ORDER BY TotalFinance DESC;",0 Delete records with a quantity of 0 from the item_inventory table,"CREATE TABLE item_inventory (item_id INT, item_name VARCHAR(50), quantity INT, warehouse_id INT);",DELETE FROM item_inventory WHERE quantity = 0;,DELETE FROM item_inventory WHERE quantity = 0;,1 what is the hometown for mike ladd?,"CREATE TABLE table_29598261_1 (hometown VARCHAR, name VARCHAR);","SELECT hometown FROM table_29598261_1 WHERE name = ""Mike Ladd"";","SELECT hometown FROM table_29598261_1 WHERE name = ""Mike Ladd"";",1 What is the highest points won when the player is aravane rezaï?,"CREATE TABLE table_24431348_20 (points INTEGER, player VARCHAR);","SELECT MAX(points) AS won FROM table_24431348_20 WHERE player = ""Aravane Rezaï"";","SELECT MAX(points) FROM table_24431348_20 WHERE player = ""Aravane Reza"";",0 What was the average number of pallets handled per day by 'Warehouse F' in 'Quarter 3' of '2022'?,"CREATE TABLE Warehouse (name varchar(20), pallets_handled int, handling_date date); ",SELECT AVG(pallets_handled / (EXTRACT(DAY FROM handling_date) - EXTRACT(DAY FROM LAG(handling_date) OVER (PARTITION BY name ORDER BY handling_date)))) FROM Warehouse WHERE name = 'Warehouse F' AND quarter = 3 AND year = 2022;,SELECT AVG(pallets_handled) FROM Warehouse WHERE name = 'Warehouse F' AND handling_date BETWEEN '2022-01-01' AND '2022-12-31';,0 What's the 1981 census of Livorno?,CREATE TABLE table_10138926_1 (city VARCHAR);,"SELECT 1981 AS _census FROM table_10138926_1 WHERE city = ""Livorno"";","SELECT 1981 FROM table_10138926_1 WHERE city = ""Livorno"";",0 Which threat actors were active in the healthcare sector in the last year?,"CREATE TABLE threat_actors (id INT, actor VARCHAR(50), date DATE);","SELECT DISTINCT actor FROM threat_actors WHERE sector = 'Healthcare' AND date >= DATEADD(year, -1, GETDATE());","SELECT actor FROM threat_actors WHERE date >= DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND sector = 'Healthcare';",0 How many art events were held in the second half of the month (days 16-31) for museums located in Paris?,"CREATE TABLE ArtEvents (Id INT PRIMARY KEY, Title VARCHAR(100), Date DATE, MuseumId INT, FOREIGN KEY (MuseumId) REFERENCES Museums(Id)); ",SELECT SUM(CASE WHEN EXTRACT(DAY FROM Date) BETWEEN 16 AND 31 THEN 1 ELSE 0 END) FROM ArtEvents WHERE MuseumId IN (SELECT Id FROM Museums WHERE City = 'Paris');,"SELECT COUNT(*) FROM ArtEvents WHERE Date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 2 MONTH) AND CURRENT_DATE AND Museums.MuseumId IN (SELECT MuseumId FROM Museums WHERE Location = 'Paris');",0 Show the names of conductors that have conducted more than one orchestras.,"CREATE TABLE orchestra (Conductor_ID VARCHAR); CREATE TABLE conductor (Name VARCHAR, Conductor_ID VARCHAR);",SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1;,SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID HAVING COUNT(*) > 1;,1 What are the names of graduate students who have published in journals with the highest impact factors?,"CREATE TABLE student (id INT, name VARCHAR(50), program VARCHAR(50)); CREATE TABLE publication (id INT, title VARCHAR(100), journal_name VARCHAR(50), impact_factor DECIMAL(3,1));",SELECT s.name FROM student s JOIN publication p ON s.id IN (SELECT student_id FROM grant WHERE title IN (SELECT title FROM publication WHERE impact_factor = (SELECT MAX(impact_factor) FROM publication)));,SELECT s.name FROM student s JOIN publication p ON s.id = p.journal_name WHERE p.impact_factor = (SELECT MAX(impact_factor) FROM student WHERE program = 'Graduate');,0 Calculate the percentage of economic diversification efforts that were successful in 2021.,"CREATE TABLE economic_diversification (year INT, success BOOLEAN); ",SELECT (COUNT(CASE WHEN success THEN 1 END) * 100.0 / COUNT(*)) as success_percentage FROM economic_diversification WHERE year = 2021;,SELECT (COUNT(*) FILTER (WHERE success = TRUE)) * 100.0 / COUNT(*) FROM economic_diversification WHERE year = 2021;,0 What is tops for Folwer?,CREATE TABLE table_20142629_2 (fowler INTEGER);,SELECT MAX(fowler) FROM table_20142629_2;,SELECT MAX(fowler) FROM table_20142629_2;,1 "List all defense projects with their start and end dates in Europe, sorted by start date.","CREATE TABLE defense_projects (id INT, project_name VARCHAR(50), start_date DATE, end_date DATE); ","SELECT project_name, start_date, end_date FROM defense_projects WHERE region = 'Europe' ORDER BY start_date;","SELECT project_name, start_date, end_date FROM defense_projects WHERE start_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date IS NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date NOT NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NULL OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_date not NUll OR end_",0 How many disasters were responded to in Haiti from 2010 to 2020?,"CREATE TABLE disasters (id INT, country TEXT, year INT, num_disasters INT); INSERT INTO disasters",SELECT COUNT(*) FROM disasters WHERE country = 'Haiti' AND year BETWEEN 2010 AND 2020;,SELECT SUM(num_disasters) FROM disasters WHERE country = 'Haiti' AND year BETWEEN 2010 AND 2020;,0 How many solar power plants are there in California and Texas?,"CREATE TABLE solar_plants (state VARCHAR(50), num_plants INT); ","SELECT SUM(num_plants) FROM solar_plants WHERE state IN ('California', 'Texas');","SELECT SUM(num_plants) FROM solar_plants WHERE state IN ('California', 'Texas');",1 "What the total of Week with attendance of 53,147","CREATE TABLE table_name_70 (week INTEGER, attendance VARCHAR);","SELECT SUM(week) FROM table_name_70 WHERE attendance = ""53,147"";","SELECT SUM(week) FROM table_name_70 WHERE attendance = ""53,147"";",1 "What is the maximum calorie count for vegan products in the NutritionData table, grouped by product type?","CREATE TABLE NutritionData(product_id INT, product_type VARCHAR(50), is_vegan BOOLEAN, calorie_count INT);","SELECT product_type, MAX(calorie_count) FROM NutritionData WHERE is_vegan = TRUE GROUP BY product_type;","SELECT product_type, MAX(calorie_count) FROM NutritionData WHERE is_vegan = true GROUP BY product_type;",0 Which Shariah-compliant financial products have the highest average amount issued by Islamic Bank?,"CREATE TABLE IslamicBank (id INT, product_type VARCHAR(20), amount INT); ","SELECT product_type, AVG(amount) AS avg_amount FROM IslamicBank WHERE product_type LIKE 'ShariahCompliant%' GROUP BY product_type ORDER BY avg_amount DESC LIMIT 1;","SELECT product_type, AVG(amount) as avg_amount FROM IslamicBank WHERE product_type = 'Shariah-compliant' GROUP BY product_type ORDER BY avg_amount DESC LIMIT 1;",0 What is the total number of animals in 'Habitat C'?,"CREATE TABLE Habitats (id INT, name VARCHAR(20)); CREATE TABLE Animals (id INT, name VARCHAR(20), habitat_id INT); ",SELECT COUNT(*) FROM Animals WHERE habitat_id = (SELECT id FROM Habitats WHERE name = 'Habitat C');,SELECT COUNT(*) FROM Animals WHERE habitat_id = (SELECT id FROM Habitats WHERE name = 'Habitat C');,1 What's the attendance of the game where there was a Loss of Yates (3-2)?,"CREATE TABLE table_name_37 (attendance VARCHAR, loss VARCHAR);","SELECT attendance FROM table_name_37 WHERE loss = ""yates (3-2)"";","SELECT attendance FROM table_name_37 WHERE loss = ""yates (3-2)"";",1 Decrease sales of 'DrugG' by 20% in Q1 2021.,"CREATE TABLE sales_2 (drug_name TEXT, qty_sold INTEGER, sale_date DATE); ",UPDATE sales_2 SET qty_sold = FLOOR(qty_sold * 0.80) WHERE drug_name = 'DrugG' AND sale_date BETWEEN '2021-01-01' AND '2021-03-31';,DELETE FROM sales_2 WHERE drug_name = 'DrugG' AND qty_sold (SELECT MAX(qty_sold) FROM sales_2 WHERE drug_name = 'DrugG' AND sale_date BETWEEN '2021-01-01' AND '2021-03-31');,0 What is the total biomass for fish in each country?,"CREATE TABLE country (id INT, name VARCHAR(255)); CREATE TABLE fish_stock (country_id INT, species_id INT, biomass DECIMAL(10,2)); ","SELECT c.name, SUM(fs.biomass) AS total_biomass FROM country c JOIN fish_stock fs ON c.id = fs.country_id GROUP BY c.id, c.name;","SELECT c.name, SUM(fs.biomass) as total_biomass FROM country c JOIN fish_stock fs ON c.id = fs.country_id GROUP BY c.name;",0 "In what week was the December 21, 1969 game?","CREATE TABLE table_name_68 (week INTEGER, date VARCHAR);","SELECT AVG(week) FROM table_name_68 WHERE date = ""december 21, 1969"";","SELECT SUM(week) FROM table_name_68 WHERE date = ""december 21, 1969"";",0 Who are the top 2 artists with the most contributions to traditional arts?,"CREATE TABLE Artists (ArtistID int, ArtistName varchar(100), ArtForm varchar(50), Contributions int); ","SELECT ArtistName FROM (SELECT ArtistName, ROW_NUMBER() OVER (ORDER BY Contributions DESC) as rn FROM Artists) t WHERE rn <= 2;","SELECT ArtistName, Contributions FROM Artists WHERE ArtForm = 'Traditional' ORDER BY Contributions DESC LIMIT 2;",0 Identify the top 3 countries with the highest seafood consumption by weight in the past year.,"CREATE TABLE country_data (country VARCHAR(255), seafood_weight FLOAT, year INT); CREATE TABLE country (id INT, name VARCHAR(255), continent VARCHAR(255));","SELECT c.country, SUM(country_data.seafood_weight) as total_weight, RANK() OVER (ORDER BY SUM(country_data.seafood_weight) DESC) as rank FROM country_data JOIN country ON c.country = country_data.country WHERE country_data.year = EXTRACT(YEAR FROM CURRENT_DATE) - 1 GROUP BY c.country ORDER BY total_weight DESC LIMIT 3;","SELECT country, seafood_weight FROM country_data WHERE year BETWEEN 2017 AND 2021 GROUP BY country ORDER BY seafood_weight DESC LIMIT 3;",0 What is the percentage of renewable energy generation capacity in South Africa that is attributed to solar energy?,"CREATE TABLE renewable_energy_capacity_sa (energy_source VARCHAR(50), capacity INT); ",SELECT 100.0 * SUM(CASE WHEN energy_source = 'solar' THEN capacity ELSE 0 END) / SUM(capacity) as solar_percentage FROM renewable_energy_capacity_sa;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM renewable_energy_capacity_sa)) FROM renewable_energy_capacity_sa WHERE energy_source = 'Solar';,0 How many people named Nick Lucas are on the show?,"CREATE TABLE table_12441518_1 (portrayed_by VARCHAR, character VARCHAR);","SELECT COUNT(portrayed_by) FROM table_12441518_1 WHERE character = ""Nick Lucas"";","SELECT COUNT(portrayed_by) FROM table_12441518_1 WHERE character = ""Nick Lucas"";",1 What was the high rebounds from the date of April 14?,"CREATE TABLE table_name_29 (high_rebounds VARCHAR, date VARCHAR);","SELECT high_rebounds FROM table_name_29 WHERE date = ""april 14"";","SELECT high_rebounds FROM table_name_29 WHERE date = ""april 14"";",1 Who is the winning driver that has a construction of brm?,"CREATE TABLE table_name_27 (winning_driver VARCHAR, constructor VARCHAR);","SELECT winning_driver FROM table_name_27 WHERE constructor = ""brm"";","SELECT winning_driver FROM table_name_27 WHERE constructor = ""brm"";",1 "Update the arctic_weather table to correct the temperature for January 1, 2022.","CREATE TABLE arctic_weather (id INT, date DATE, temperature FLOAT); ",UPDATE arctic_weather SET temperature = 12.5 WHERE date = '2022-01-01';,UPDATE arctic_weather SET temperature = 1 WHERE date = '2022-01-01';,0 what is the average rank when the lane is more than 4 and the name is dominik meichtry?,"CREATE TABLE table_name_97 (rank INTEGER, lane VARCHAR, name VARCHAR);","SELECT AVG(rank) FROM table_name_97 WHERE lane > 4 AND name = ""dominik meichtry"";","SELECT AVG(rank) FROM table_name_97 WHERE lane > 4 AND name = ""dominik meichtry"";",1 what is the highest grid for new zealand?,"CREATE TABLE table_name_59 (grid INTEGER, team VARCHAR);","SELECT MAX(grid) FROM table_name_59 WHERE team = ""new zealand"";","SELECT MAX(grid) FROM table_name_59 WHERE team = ""new zealand"";",1 Delete records of patients without a diagnosis in 'RuralHealthFacility3'.,"CREATE TABLE RuralHealthFacility3 (patient_id INT, patient_name VARCHAR(50), age INT, diagnosis VARCHAR(20)); ",DELETE FROM RuralHealthFacility3 WHERE diagnosis IS NULL;,DELETE FROM RuralHealthFacility3 WHERE diagnosis IS NULL;,1 What are the names of the defense projects and their start dates for Boeing in Africa?,"CREATE TABLE Boeing_Projects (id INT, corporation VARCHAR(20), region VARCHAR(20), project_name VARCHAR(20), start_date DATE); ","SELECT project_name, start_date FROM Boeing_Projects WHERE corporation = 'Boeing' AND region = 'Africa';","SELECT project_name, start_date FROM Boeing_Projects WHERE corporation = 'Boeing' AND region = 'Africa';",1 List the fashion trends of 2022 with sales greater than 2000?,"CREATE TABLE trends_2022 (id INT, product VARCHAR(20), sales INT); ",SELECT product FROM trends_2022 WHERE sales > 2000;,SELECT * FROM trends_2022 WHERE sales > 2000;,0 What are the directions for the guardian whose weapon is khaḍga (sword)?,"CREATE TABLE table_100518_1 (direction VARCHAR, weapon VARCHAR);","SELECT direction FROM table_100518_1 WHERE weapon = ""Khaḍga (sword)"";","SELECT direction FROM table_100518_1 WHERE weapon = ""Khaga (sword)"";",0 "What is the ISIN that has a coupon of 1.02 and a value issued of 447,000,000?","CREATE TABLE table_21692771_1 (isin VARCHAR, coupon VARCHAR, amount_issued_ VARCHAR, € VARCHAR);","SELECT isin FROM table_21692771_1 WHERE coupon = ""1.02"" AND amount_issued_[€] = ""447,000,000"";","SELECT isin FROM table_21692771_1 WHERE amount_issued_ = ""1.22"" AND € = ""447,000,000"";",0 What is the average age of all employees working in the 'Mining Operations' department?,"CREATE TABLE Employees (EmployeeID INT, Name VARCHAR(50), Department VARCHAR(50), Age INT);",SELECT AVG(Age) FROM Employees WHERE Department = 'Mining Operations';,SELECT AVG(Age) FROM Employees WHERE Department = 'Mining Operations';,1 Name the lowest round for when pole position and winning driver is michael schumacher,"CREATE TABLE table_name_27 (round INTEGER, pole_position VARCHAR, fastest_lap VARCHAR, winning_driver VARCHAR);","SELECT MIN(round) FROM table_name_27 WHERE fastest_lap = ""michael schumacher"" AND winning_driver = ""michael schumacher"" AND pole_position = ""michael schumacher"";","SELECT MIN(round) FROM table_name_27 WHERE fastest_lap = ""pole"" AND winning_driver = ""michael schumacher"";",0 How many viewers in millions watched the episode with the production code 6acx16?,"CREATE TABLE table_22261877_1 (us_viewers__million_ VARCHAR, production_code VARCHAR);","SELECT us_viewers__million_ FROM table_22261877_1 WHERE production_code = ""6ACX16"";","SELECT us_viewers__million_ FROM table_22261877_1 WHERE production_code = ""6ACX16"";",1 Which apparatus had a final score that was more than 17.75?,"CREATE TABLE table_name_38 (apparatus VARCHAR, score_final INTEGER);",SELECT apparatus FROM table_name_38 WHERE score_final > 17.75;,SELECT apparatus FROM table_name_38 WHERE score_final > 17.75;,1 how many times was the incumbent is john b. yates?,"CREATE TABLE table_2668347_14 (party VARCHAR, incumbent VARCHAR);","SELECT COUNT(party) FROM table_2668347_14 WHERE incumbent = ""John B. Yates"";","SELECT COUNT(party) FROM table_2668347_14 WHERE incumbent = ""John B. Yates"";",1 What are the names of UNESCO heritage sites in Europe and their types?,"CREATE TABLE UNESCO_SITES (id INT PRIMARY KEY, name VARCHAR(255), region VARCHAR(255), type VARCHAR(255)); ","SELECT name, type FROM UNESCO_SITES WHERE region = 'Europe';","SELECT name, type FROM UNESCO_SITES WHERE region = 'Europe';",1 Which college's cfl team is the hamilton tiger-cats?,"CREATE TABLE table_name_58 (college VARCHAR, cfl_team VARCHAR);","SELECT college FROM table_name_58 WHERE cfl_team = ""hamilton tiger-cats"";","SELECT college FROM table_name_58 WHERE cfl_team = ""hamilton tiger-cats"";",1 "What is the total number of security incidents and their average resolution time, grouped by quarter?","CREATE TABLE incidents (id INT, incident_date DATE, resolution_time INT); ","SELECT YEAR(incident_date) as year, QUARTER(incident_date) as quarter, COUNT(*) as num_incidents, AVG(resolution_time) as avg_resolution_time FROM incidents GROUP BY year, quarter;","SELECT DATE_FORMAT(incident_date, '%Y-%m') as quarter, COUNT(*) as total_incidents, AVG(resolution_time) as avg_resolution_time FROM incidents GROUP BY quarter;",0 How many ports are in the 'port_details' table?,"CREATE TABLE port_details (id INT, name TEXT, location TEXT, num_of_berries INT); ",SELECT COUNT(*) FROM port_details;,SELECT COUNT(*) FROM port_details;,1 What is the total number of points scored by the top 5 players in the WNBA in the 2022 season?,"CREATE TABLE wnba_players (id INT, name VARCHAR(100), team VARCHAR(50), position VARCHAR(50), points INT, assists INT, rebounds INT, games_played INT);",SELECT SUM(points) as total_points FROM wnba_players WHERE season = 2022 AND category = 'regular' GROUP BY name ORDER BY total_points DESC LIMIT 5;,SELECT SUM(points) FROM wnba_players WHERE team = 'WNBA' AND position = 'Player' AND games_played >= 5;,0 Which Release Date has a Voltage Range of 1.148 v - 1.196 v?,"CREATE TABLE table_name_34 (release_date VARCHAR, voltage_range VARCHAR);","SELECT release_date FROM table_name_34 WHERE voltage_range = ""1.148 v - 1.196 v"";","SELECT release_date FROM table_name_34 WHERE voltage_range = ""1.148 v - 1.196 v"";",1 What is the average donation amount for each donor in the 'Donors' table who made donations in 2021?,"CREATE TABLE Donors (DonorID INT, DonationAmount DECIMAL(10,2), DonationDate DATE);","SELECT DonorID, AVG(DonationAmount) FROM Donors WHERE YEAR(DonationDate) = 2021 GROUP BY DonorID;","SELECT DonorID, AVG(DonationAmount) FROM Donors WHERE YEAR(DonationDate) = 2021 GROUP BY DonorID;",1 What is the total revenue of all fair trade products imported to Spain?,"CREATE TABLE imports (id INT, product TEXT, revenue FLOAT, is_fair_trade BOOLEAN, country TEXT); ",SELECT SUM(revenue) FROM imports WHERE is_fair_trade = true AND country = 'Spain';,SELECT SUM(revenue) FROM imports WHERE is_fair_trade = true AND country = 'Spain';,1 "Of the times the Broncos played the Cincinnati Bengals, what was the highest attendance?","CREATE TABLE table_17294353_1 (attendance INTEGER, opponent VARCHAR);","SELECT MAX(attendance) FROM table_17294353_1 WHERE opponent = ""Cincinnati Bengals"";","SELECT MAX(attendance) FROM table_17294353_1 WHERE opponent = ""Cincinnati Bengals"";",1 What is the total number of cases in the 'victim_services' table?,"CREATE TABLE victim_services (id INT, case_number INT, victim_name VARCHAR(255), service_type VARCHAR(255)); ",SELECT COUNT(*) FROM victim_services;,SELECT COUNT(*) FROM victim_services;,1 "What was the film that grossed $26,010,864 ranked?","CREATE TABLE table_name_76 (rank INTEGER, gross VARCHAR);","SELECT MIN(rank) FROM table_name_76 WHERE gross = ""$26,010,864"";","SELECT SUM(rank) FROM table_name_76 WHERE gross = ""$26,010,864"";",0 What is the total quantity of 'Shirts' sold by stores in 'New York' and 'California'?,"CREATE TABLE stores (store_id INT, store_name VARCHAR(20), state VARCHAR(20)); CREATE TABLE sales (sale_id INT, product_type VARCHAR(20), store_id INT, quantity_sold INT); ","SELECT SUM(quantity_sold) FROM sales JOIN stores ON sales.store_id = stores.store_id WHERE stores.state IN ('New York', 'California') AND product_type = 'Shirts';","SELECT SUM(quantity_sold) FROM sales JOIN stores ON sales.store_id = stores.store_id WHERE product_type = 'Shirts' AND state IN ('New York', 'California');",0 Which player had an overall pick of 130?,"CREATE TABLE table_name_53 (player VARCHAR, overall VARCHAR);","SELECT player FROM table_name_53 WHERE overall = ""130"";",SELECT player FROM table_name_53 WHERE overall = 130;,0 "What is the partial failure for the Country of russia, and a Failure larger than 0, and a Family of angara, and a Launch larger than 1?","CREATE TABLE table_name_53 (partial_failures INTEGER, launches VARCHAR, family VARCHAR, country VARCHAR, failures VARCHAR);","SELECT AVG(partial_failures) FROM table_name_53 WHERE country = ""russia"" AND failures > 0 AND family = ""angara"" AND launches > 1;","SELECT AVG(partial_failures) FROM table_name_53 WHERE country = ""russia"" AND failures > 0 AND family = ""angara"" AND launches > 1;",1 What is the name of the customer who has made the minimum amount of payment in one claim?,"CREATE TABLE claim_headers (amount_piad INTEGER); CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR); CREATE TABLE policies (policy_id VARCHAR, customer_id VARCHAR); CREATE TABLE claim_headers (policy_id VARCHAR, amount_piad INTEGER);",SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT MIN(amount_piad) FROM claim_headers);,SELECT T1.customer_details FROM customers AS T1 JOIN claim_headers AS T2 ON T1.customer_id = T2.customer_id JOIN policies AS T3 ON T3.policy_id = T3.policy_id JOIN claim_headers AS T4 ON T3.amount_piad = T4.amount_piad GROUP BY T3.customer_id HAVING COUNT(*) > 1;,0 How many street lighting repair requests were made in each city?,"CREATE TABLE Service_Requests(City VARCHAR(20), Service VARCHAR(20), Request_Date DATE); ","SELECT City, COUNT(*) FROM Service_Requests WHERE Service = 'Street Lighting' GROUP BY City;","SELECT City, COUNT(*) FROM Service_Requests WHERE Service = 'Street Lighting Repair' GROUP BY City;",0 Get the number of water treatment plants in 'WaterTreatmentPlants' table for each unique treatment type,"CREATE TABLE WaterTreatmentPlants (plant_id INT, location VARCHAR(50), treatment_type VARCHAR(20));","SELECT treatment_type, COUNT(*) FROM WaterTreatmentPlants GROUP BY treatment_type;","SELECT treatment_type, COUNT(plant_id) FROM WaterTreatmentPlants GROUP BY treatment_type;",0 What is the minimum and maximum sea ice extent in the Arctic Ocean for each month in 2021?,"CREATE TABLE SeaIceExtent (id INT, month INT, extent DECIMAL(5,2), date DATE); ","SELECT month, MIN(extent) AS min_extent, MAX(extent) AS max_extent FROM SeaIceExtent WHERE date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY month;","SELECT month, MIN(extent) as min_extent, MAX(extent) as max_extent FROM SeaIceExtent WHERE date BETWEEN '2021-01-01' AND '2021-12-31' GROUP BY month;",0 What is the total number of auto shows held in Japan since 2010?,"CREATE TABLE AutoShows (id INT, location VARCHAR(255), show_date DATE, attendance INT); ",SELECT SUM(attendance) FROM AutoShows WHERE location = 'Tokyo' AND show_date >= '2010-01-01';,SELECT SUM(attendance) FROM AutoShows WHERE location = 'Japan' AND show_date >= '2010-01-01';,0 Which locations did Gordon Johncock hold the pole position? ,"CREATE TABLE table_22673872_1 (location VARCHAR, pole_position VARCHAR);","SELECT location FROM table_22673872_1 WHERE pole_position = ""Gordon Johncock"";","SELECT location FROM table_22673872_1 WHERE pole_position = ""Gordon Johncock"";",1 What organization had the founding date of 1998-11-08? ,"CREATE TABLE table_2538117_12 (organization VARCHAR, founding_date VARCHAR);","SELECT organization FROM table_2538117_12 WHERE founding_date = ""1998-11-08"";","SELECT organization FROM table_2538117_12 WHERE founding_date = ""1998-11-08"";",1 Which farmers in India are using outdated equipment?,"CREATE TABLE Farmers (id INT PRIMARY KEY, name VARCHAR(255), age INT, gender VARCHAR(10), location VARCHAR(255), farmer_id INT); CREATE TABLE Equipment (id INT PRIMARY KEY, type VARCHAR(255), model VARCHAR(255), purchased_date DATE, farmer_id INT, FOREIGN KEY (farmer_id) REFERENCES Farmers(farmer_id));","SELECT Farmers.name, Equipment.type, Equipment.model FROM Farmers INNER JOIN Equipment ON Farmers.farmer_id = Equipment.farmer_id WHERE Farmers.location = 'India' AND Equipment.purchased_date < DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR);",SELECT Farmers.name FROM Farmers INNER JOIN Equipment ON Farmers.farmer_id = Equipment.farmer_id WHERE Farmers.location = 'India' AND Equipment.purchased_date IS NULL;,0 How many space missions were successfully completed by 'NASA' in the 'SpaceExploration' schema?,"CREATE SCHEMA SpaceExploration; CREATE TABLE SpaceExploration.NASA_Missions (mission VARCHAR(255), mission_status VARCHAR(255)); ",SELECT COUNT(*) FROM SpaceExploration.NASA_Missions WHERE mission_status = 'Success';,SELECT COUNT(*) FROM SpaceExploration.NASA_Missions WHERE mission_status = 'Successful';,0 What is the total number of emergency calls in the East district?,"CREATE TABLE district (id INT, name VARCHAR(20)); CREATE TABLE calls (id INT, district_id INT, call_type VARCHAR(20), call_time TIMESTAMP); ",SELECT COUNT(*) FROM calls WHERE district_id = (SELECT id FROM district WHERE name = 'East');,SELECT COUNT(*) FROM calls JOIN district ON calls.district_id = district.id WHERE district.name = 'East' AND call_type = 'Emergency';,0 where did hancock get 3.09%,"CREATE TABLE table_19681738_1 (county VARCHAR, hancock__percentage VARCHAR);","SELECT county FROM table_19681738_1 WHERE hancock__percentage = ""3.09%"";","SELECT county FROM table_19681738_1 WHERE hancock__percentage = ""3.09%"";",1 What is the percentage of seafood exported to Europe from Africa in 2022?,"CREATE TABLE seafood_export (product VARCHAR(255), quantity INT, year INT, country VARCHAR(255), PRIMARY KEY (product, year, country)); ",SELECT (SUM(quantity) * 100.0 / (SELECT SUM(quantity) FROM seafood_export WHERE year = 2022)) FROM seafood_export WHERE year = 2022 AND country IN (SELECT country FROM countries WHERE continent = 'Africa') AND region = 'Europe';,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM seafood_export WHERE country = 'Africa')) AS percentage FROM seafood_export WHERE year = 2022 AND country = 'Europe';,0 "What is the total quantity of metal waste produced in the city of Tokyo, Japan, for the year 2021?","CREATE TABLE waste_types (type VARCHAR(20), quantity INT); ",SELECT SUM(quantity) FROM waste_types WHERE type = 'metal' AND YEAR(date) = 2021;,SELECT SUM(quantity) FROM waste_types WHERE type ='metal' AND YEAR(production_date) = 2021;,0 Find the compliance date for the 'Ballast Water Management Convention' regulation by carriers from Canada.,"CREATE TABLE Compliance (ComplianceID INT, RegulationID INT, CarrierID INT, ComplianceDate DATE); ",SELECT ComplianceDate FROM Compliance JOIN Carrier ON Compliance.CarrierID = Carrier.CarrierID JOIN Regulation ON Compliance.RegulationID = Regulation.RegulationID WHERE Regulation.Name = 'Ballast Water Management Convention' AND Carrier.Country = 'Canada';,SELECT ComplianceDate FROM Compliance WHERE RegulationID = (SELECT RegulationID FROM Regulations WHERE Country = 'Canada') AND RegulationID = (SELECT RegulationID FROM Regulations WHERE Country = 'Canada');,0 Who were the candidates in district Wisconsin 4?,"CREATE TABLE table_1341453_51 (candidates VARCHAR, district VARCHAR);","SELECT candidates FROM table_1341453_51 WHERE district = ""Wisconsin 4"";","SELECT candidates FROM table_1341453_51 WHERE district = ""Wisconsin 4"";",1 How many customers have a savings account in the Nairobi branch?,"CREATE TABLE accounts (customer_id INT, account_type VARCHAR(20), branch VARCHAR(20), balance DECIMAL(10,2)); ",SELECT COUNT(*) FROM accounts WHERE account_type = 'Savings' AND branch = 'Nairobi';,SELECT COUNT(*) FROM accounts WHERE account_type = 'Savings' AND branch = 'Nairobi';,1 What was the total cost of all agricultural innovation projects in the province of Mpumalanga in 2020?,"CREATE TABLE agricultural_projects (id INT, province VARCHAR(50), cost FLOAT, project_type VARCHAR(50), start_date DATE); ",SELECT SUM(cost) FROM agricultural_projects WHERE province = 'Mpumalanga' AND start_date >= '2020-01-01' AND start_date < '2021-01-01' AND project_type = 'Drip Irrigation';,SELECT SUM(cost) FROM agricultural_projects WHERE province = 'Mpumalanga' AND YEAR(start_date) = 2020 AND project_type = 'Agricultural Innovation';,0 what is the first performance of the last performance on 03/29/1957,"CREATE TABLE table_19189856_1 (first_performance VARCHAR, last_performance VARCHAR);","SELECT first_performance FROM table_19189856_1 WHERE last_performance = ""03/29/1957"";","SELECT first_performance FROM table_19189856_1 WHERE last_performance = ""03/29/1957"";",1 How many workers were employed in 2021?,"CREATE TABLE workforce (year INT, total_workers INT); INSERT INTO workforce",SELECT total_workers FROM workforce WHERE year = 2021;,SELECT SUM(total_workers) FROM workforce WHERE year = 2021;,0 "What is the total number of COVID-19 vaccines administered in Oakland, CA in 2021?","CREATE TABLE CovidVaccinations (ID INT, Quantity INT, Location VARCHAR(50), Year INT); ",SELECT SUM(Quantity) FROM CovidVaccinations WHERE Location = 'Oakland' AND Year = 2021;,SELECT SUM(Quantity) FROM CovidVaccinations WHERE Location = 'Oakland' AND Year = 2021;,1 How many projects were completed in California?,"CREATE TABLE Projects (name TEXT, start_year INT, end_year INT, location TEXT);",SELECT COUNT(*) FROM Projects WHERE location = 'California' AND end_year IS NOT NULL;,SELECT COUNT(*) FROM Projects WHERE location = 'California';,0 "For the gte northwest classic with the score of 207 (-9), what is the average 1st prize ($)","CREATE TABLE table_name_71 (score VARCHAR, tournament VARCHAR);","SELECT AVG(1 AS st_prize__) AS $__ FROM table_name_71 WHERE score = ""207 (-9)"" AND tournament = ""gte northwest classic"";","SELECT AVG(1 AS st_prize_$) FROM table_name_71 WHERE score = ""207 (-9)"" AND tournament = ""gte northwest classic"";",0 What is the minimum mental health score of students in 'Winter 2022' by school district?,"CREATE TABLE student_mental_health (student_id INT, mental_health_score INT, school_district VARCHAR(255), date DATE); CREATE VIEW winter_2022_smh AS SELECT * FROM student_mental_health WHERE date BETWEEN '2022-01-01' AND '2022-03-31';","SELECT MIN(mental_health_score) as min_mental_health, school_district FROM winter_2022_smh GROUP BY school_district;","SELECT school_district, MIN(mental_health_score) FROM winter_2022_smh GROUP BY school_district;",0 What is the name of the captain for team Norwich City?,"CREATE TABLE table_name_49 (captain VARCHAR, team VARCHAR);","SELECT captain FROM table_name_49 WHERE team = ""norwich city"";","SELECT captain FROM table_name_49 WHERE team = ""norwich city"";",1 Display the names of unions with more than 5000 members that are not located in the United States.,"CREATE TABLE union_size(id INT, union_name VARCHAR(50), members INT, location VARCHAR(14));",SELECT union_name FROM union_size WHERE members > 5000 AND location != 'United States';,SELECT union_name FROM union_size WHERE members > 5000 AND location!= 'United States';,0 What was the length time of the 3.5 release?,"CREATE TABLE table_16279520_1 (length VARCHAR, release VARCHAR);","SELECT length FROM table_16279520_1 WHERE release = ""3.5"";","SELECT length FROM table_16279520_1 WHERE release = ""3.5"";",1 How are the public health policies in India ordered by start date?,"CREATE TABLE public_health_policies (id INT, name VARCHAR, state VARCHAR, country VARCHAR, start_date DATE, end_date DATE); ","SELECT public_health_policies.*, ROW_NUMBER() OVER(PARTITION BY public_health_policies.country ORDER BY public_health_policies.start_date DESC) as rank FROM public_health_policies WHERE public_health_policies.country = 'India';",SELECT * FROM public_health_policies WHERE country = 'India' ORDER BY start_date;,0 How many workers in the automotive industry have been trained in Industry 4.0 technologies?,"CREATE TABLE workers (id INT, name TEXT, industry TEXT, training_status TEXT); CREATE TABLE trainings (id INT, worker_id INT, training_type TEXT); ",SELECT COUNT(*) FROM workers w JOIN trainings t ON w.id = t.worker_id WHERE w.industry = 'Automotive' AND t.training_type = 'Industry 4.0';,SELECT COUNT(DISTINCT workers.id) FROM workers INNER JOIN trainings ON workers.id = trainings.worker_id WHERE workers.industry = 'Automotive' AND trainings.training_type = 'Industry 4.0';,0 What was the final score in game 15? ,"CREATE TABLE table_17001658_5 (score VARCHAR, game VARCHAR);",SELECT score FROM table_17001658_5 WHERE game = 15;,SELECT score FROM table_17001658_5 WHERE game = 15;,1 "What is the total budget allocated for waste management and housing services in 2022, by state?","CREATE TABLE BudgetAllocations (State VARCHAR(50), Service VARCHAR(50), Year INT, Amount DECIMAL(10,2)); ","SELECT State, SUM(Amount) as TotalBudget FROM BudgetAllocations WHERE Service IN ('Waste Management', 'Housing') AND Year = 2022 GROUP BY State;","SELECT State, SUM(Amount) FROM BudgetAllocations WHERE Service IN ('Waste Management', 'Housing') AND Year = 2022 GROUP BY State;",0 How many ranks are for Switzerland with more than 2 total medals?,"CREATE TABLE table_name_39 (rank VARCHAR, nation VARCHAR, total VARCHAR);","SELECT COUNT(rank) FROM table_name_39 WHERE nation = ""switzerland"" AND total > 2;","SELECT COUNT(rank) FROM table_name_39 WHERE nation = ""switzerland"" AND total > 2;",1 What is the total number of cases resolved in the cases table in 2019 and 2020?,"CREATE TABLE cases (id INT, year INT, restorative_justice BOOLEAN);","SELECT SUM(*) FROM cases WHERE year IN (2019, 2020);","SELECT COUNT(*) FROM cases WHERE year IN (2019, 2020) AND restorative_justice = TRUE;",0 Add a new excavation site 'SiteG' from the 'Stone Age' period and related artifacts.,"CREATE TABLE ExcavationSites (site_id INT, site_name TEXT, period TEXT); CREATE TABLE Artifacts (artifact_id INT, site_id INT, artifact_name TEXT); ","INSERT INTO ExcavationSites (site_id, site_name, period) VALUES (3, 'SiteG', 'Stone Age'); INSERT INTO Artifacts (artifact_id, site_id, artifact_name) VALUES (4, 3, 'Artifact4'), (5, 3, 'Artifact5');","INSERT INTO ExcavationSites (site_id, site_name, period) VALUES (1, 'SiteG', 'Stone Age'); INSERT INTO Artifacts (site_id, artifact_name) VALUES (1, 'SiteG', 'Stone Age');",0 Identify the menu items that have been 86'ed (removed) more than once in the last month.,"CREATE TABLE Restaurants (RestaurantID INT, Name VARCHAR(50)); CREATE TABLE Menu (MenuID INT, RestaurantID INT, Item VARCHAR(50), Price DECIMAL(10,2), Last86Date DATE);","SELECT M.Item FROM Menu M WHERE M.Last86Date < DATE_SUB(CURDATE(), INTERVAL 30 DAY) GROUP BY M.Item HAVING COUNT(*) > 1;","SELECT Menu.Item FROM Menu INNER JOIN Restaurants ON Menu.RestaurantID = Restaurants.RestaurantID WHERE Menu.Last86Date >= DATEADD(month, -1, GETDATE()) GROUP BY Menu.Item HAVING COUNT(*) > 1;",0 List all unique countries of origin for artists in the database.,"CREATE TABLE Artists (ArtistID INT, Name VARCHAR(255), BirthYear INT, DeathYear INT, Country VARCHAR(255)); ",SELECT DISTINCT Country FROM Artists;,SELECT DISTINCT Country FROM Artists;,1 Count the number of gas wells in the Urengoy gas field and their total daily production,"CREATE TABLE gas_wells (well_id INT, location VARCHAR(20), daily_production FLOAT); ","SELECT location, COUNT(*), SUM(daily_production) FROM gas_wells WHERE location = 'Urengoy gas field' GROUP BY location;","SELECT COUNT(*), SUM(daily_production) FROM gas_wells WHERE location = 'Urengoy';",0 What venue features carlton at home?,"CREATE TABLE table_name_88 (venue VARCHAR, home_team VARCHAR);","SELECT venue FROM table_name_88 WHERE home_team = ""carlton"";","SELECT venue FROM table_name_88 WHERE home_team = ""carlton"";",1 What is the latest launch year for military satellites in the European region?,"CREATE TABLE MilitarySatellites (Id INT, Country VARCHAR(50), SatelliteName VARCHAR(50), LaunchYear INT, Function VARCHAR(50));","SELECT MAX(LaunchYear) AS LatestLaunchYear FROM MilitarySatellites WHERE Country IN ('France', 'Germany');",SELECT MAX(LaunchYear) FROM MilitarySatellites WHERE Country LIKE 'Europe%';,0 What is the cultural competency score of each healthcare provider?,"CREATE TABLE Providers (ProviderID int, ProviderName varchar(50));CREATE TABLE CulturalCompetency (CCID int, ProviderID int, Score int);","SELECT ProviderName, AVG(Score) as AvgScore FROM CulturalCompetency JOIN Providers ON CulturalCompetency.ProviderID = Providers.ProviderID GROUP BY ProviderID, ProviderName;","SELECT Providers.ProviderName, CulturalCompetency.Score FROM Providers INNER JOIN CulturalCompetency ON Providers.ProviderID = CulturalCompetency.ProviderID GROUP BY Providers.ProviderName;",0 What is the maximum number of reviews for hotels in Africa?,"CREATE TABLE hotels (id INT, name TEXT, country TEXT, reviews INT); ",SELECT MAX(reviews) FROM hotels WHERE country = 'Africa';,SELECT MAX(reviews) FROM hotels WHERE country = 'Africa';,1 What is the total number of marine research vessels in the Southern Ocean?,"CREATE TABLE marine_research_vessels (id INT, name TEXT, region TEXT, type TEXT); ",SELECT COUNT(*) FROM marine_research_vessels WHERE region = 'Southern';,SELECT COUNT(*) FROM marine_research_vessels WHERE region = 'Southern Ocean' AND type = 'Research';,0 Which restorative program in Florida has the highest number of successful completions?,"CREATE TABLE restorative_completions (completion_id INT, program_id INT, state VARCHAR(20), completions INT); ","SELECT program_id, MAX(completions) FROM restorative_completions WHERE state = 'Florida' GROUP BY program_id;","SELECT program_id, MAX(completions) FROM restorative_completions WHERE state = 'Florida' GROUP BY program_id;",1 What is the total budget for each program category?,"CREATE TABLE Programs (ProgramID INT, ProgramName TEXT, ProgramCategory TEXT, Budget DECIMAL); ","SELECT ProgramCategory, SUM(Budget) as TotalBudget FROM Programs GROUP BY ProgramCategory;","SELECT ProgramCategory, SUM(Budget) FROM Programs GROUP BY ProgramCategory;",0 What is the average flight time for each aircraft model?,"CREATE TABLE aircraft_flight_times (id INT, model VARCHAR(255), flight_time FLOAT); ","SELECT model, AVG(flight_time) AS avg_flight_time FROM aircraft_flight_times GROUP BY model;","SELECT model, AVG(flight_time) FROM aircraft_flight_times GROUP BY model;",0 List all unique training types in the diversity_training table,"CREATE TABLE diversity_training (id INT PRIMARY KEY, employee_id INT, training_type VARCHAR(255), completion_date DATE);",SELECT DISTINCT training_type FROM diversity_training;,SELECT DISTINCT training_type FROM diversity_training;,1 "What is Case Suffix (Case), when Postposition is ""-mde (drops d)""?","CREATE TABLE table_name_94 (case_suffix__case_ VARCHAR, postposition VARCHAR);","SELECT case_suffix__case_ FROM table_name_94 WHERE postposition = ""-mde (drops d)"";","SELECT case_suffix__case_ FROM table_name_94 WHERE postposition = ""-mde (drops d)"";",1 When was Stephen J. Solarz first elected?,"CREATE TABLE table_1341663_33 (first_elected INTEGER, incumbent VARCHAR);","SELECT MIN(first_elected) FROM table_1341663_33 WHERE incumbent = ""Stephen J. Solarz"";","SELECT MAX(first_elected) FROM table_1341663_33 WHERE incumbent = ""Stephen J. Solarz"";",0 Who were the 3rd couple that were viewed by 4.89 million viewers? ,CREATE TABLE table_25664518_4 (viewers__millions_ VARCHAR);,"SELECT 3 AS rd_couple FROM table_25664518_4 WHERE viewers__millions_ = ""4.89"";","SELECT 3 AS rd_couple FROM table_25664518_4 WHERE viewers__millions_ = ""4.89"";",1 Which skipper has 78 points?,"CREATE TABLE table_name_90 (skipper VARCHAR, points VARCHAR);","SELECT skipper FROM table_name_90 WHERE points = ""78"";",SELECT skipper FROM table_name_90 WHERE points = 78;,0 Name the last for softball before 2000,"CREATE TABLE table_name_95 (last VARCHAR, year VARCHAR, sport VARCHAR);","SELECT last FROM table_name_95 WHERE year < 2000 AND sport = ""softball"";","SELECT last FROM table_name_95 WHERE year 2000 AND sport = ""softball"";",0 "What is the average bioprocess engineering patent filing date, per country, in the past 5 years?","CREATE SCHEMA if not exists biotech; CREATE TABLE if not exists biotech.patents (id INT, name VARCHAR(50), location VARCHAR(50), filed_date DATE, industry VARCHAR(50)); ","SELECT location, AVG(filed_date) as avg_filing_date FROM biotech.patents WHERE industry = 'Bioprocess Engineering' AND filed_date >= DATE_SUB(CURRENT_DATE, INTERVAL 5 YEAR) GROUP BY location;","SELECT AVG(filed_date) FROM biotech.patents WHERE industry = 'Bioprocess Engineering' AND filed_date >= DATEADD(year, -5, GETDATE());",0 What was the highest place result in 2010 with a Clean and Jerk weight of 224kg?,"CREATE TABLE table_name_92 (place INTEGER, year VARCHAR, clean_and_jerk VARCHAR);","SELECT MAX(place) FROM table_name_92 WHERE year = 2010 AND clean_and_jerk = ""224kg"";","SELECT MAX(place) FROM table_name_92 WHERE year = 2010 AND clean_and_jerk = ""224kg"";",1 What is the average energy efficiency rating for geothermal projects in North America?,"CREATE TABLE geothermal_projects (id INT, name VARCHAR(255), location VARCHAR(255), rating FLOAT);",SELECT AVG(rating) FROM geothermal_projects WHERE location LIKE '%North America%';,SELECT AVG(rating) FROM geothermal_projects WHERE location = 'North America';,0 Which author has the most publications in the 'Journal of Machine Learning' in the past three years?,"CREATE TABLE Publications (ID INT, Author VARCHAR(50), Journal VARCHAR(50), Year INT, CitationCount INT); ","SELECT Author, COUNT(*) AS PublicationCount FROM Publications WHERE Journal = 'Journal of Machine Learning' AND Year >= 2019 GROUP BY Author ORDER BY PublicationCount DESC LIMIT 1;","SELECT Author, CitationCount FROM Publications WHERE Journal = 'Journal of Machine Learning' AND Year BETWEEN 2019 AND 2021 ORDER BY CitationCount DESC LIMIT 1;",0 "What is the total landfill capacity in the US and Canada, as of 2022?","CREATE TABLE landfill_capacity (country TEXT, capacity INTEGER, year INTEGER);","SELECT SUM(capacity) FROM landfill_capacity WHERE country IN ('USA', 'Canada') AND year = 2022;","SELECT SUM(capacity) FROM landfill_capacity WHERE country IN ('USA', 'Canada') AND year = 2022;",1 Find the number of visitors who attended events in different cities.,"CREATE TABLE different_cities_visitors (id INT, name TEXT, city TEXT); ","SELECT COUNT(DISTINCT different_cities_visitors.name) FROM different_cities_visitors WHERE different_cities_visitors.city IN ('NY', 'LA', 'Chicago');","SELECT city, COUNT(*) FROM different_cities_visitors GROUP BY city;",0 What are the job titles and salaries of all veterans employed in the IT industry in the state of New York?,"CREATE TABLE VeteranEmployment (employee_id INT, name VARCHAR(255), job_title VARCHAR(255), industry VARCHAR(255), state VARCHAR(255), salary FLOAT); ","SELECT job_title, salary FROM VeteranEmployment WHERE industry = 'IT' AND state = 'New York';","SELECT job_title, salary FROM VeteranEmployment WHERE industry = 'IT' AND state = 'New York';",1 How many items withdrawn had numbers over 5?,"CREATE TABLE table_name_93 (withdrawn VARCHAR, number INTEGER);",SELECT COUNT(withdrawn) FROM table_name_93 WHERE number > 5;,SELECT COUNT(withdrawn) FROM table_name_93 WHERE number > 5;,1 What is the maximum cargo capacity in TEUs for vessels owned by companies based in Asia with the word 'Ocean' in their name?,"CREATE TABLE companies (company_id INT, company_name TEXT, country TEXT); CREATE TABLE vessels (vessel_id INT, company_id INT, capacity INT); ",SELECT MAX(vessels.capacity) FROM vessels JOIN companies ON vessels.company_id = companies.company_id WHERE companies.country = 'Asia' AND companies.company_name LIKE '%Ocean%';,SELECT MAX(vessels.capacity) FROM vessels INNER JOIN companies ON vessels.company_id = companies.company_id WHERE companies.country = 'Asia' AND companies.company_name LIKE '%Ocean%';,0 What is the average temperature in Texas IoT sensors last week?,"CREATE TABLE if NOT EXISTS iot_sensors (id int, location varchar(50), temperature float, timestamp datetime); ","SELECT AVG(temperature) FROM iot_sensors WHERE location = 'Texas' AND timestamp >= DATE_SUB(NOW(), INTERVAL 1 WEEK);","SELECT AVG(temperature) FROM iot_sensors WHERE location = 'Texas' AND timestamp >= DATE_SUB(CURRENT_DATE, INTERVAL 1 WEEK);",0 Name the opponent with record of 52-58,"CREATE TABLE table_name_10 (opponent VARCHAR, record VARCHAR);","SELECT opponent FROM table_name_10 WHERE record = ""52-58"";","SELECT opponent FROM table_name_10 WHERE record = ""52-58"";",1 "Count the number of co-owned properties in Portland with a listing price above $300,000.","CREATE TABLE properties (id INT, city VARCHAR(20), listing_price INT, co_owned BOOLEAN); ",SELECT COUNT(*) FROM properties WHERE city = 'Portland' AND listing_price > 300000 AND co_owned = true;,SELECT COUNT(*) FROM properties WHERE city = 'Portland' AND co_owned = true AND listing_price > 300000;,0 Find the total number of visitors from Indigenous communities who engaged with digital exhibits in 2021?,"CREATE TABLE Communities (id INT, community_type VARCHAR(30)); CREATE TABLE DigitalEngagement (id INT, visitor_id INT, community_id INT, year INT); ",SELECT COUNT(DISTINCT DigitalEngagement.visitor_id) FROM DigitalEngagement INNER JOIN Communities ON DigitalEngagement.community_id = Communities.id WHERE Communities.community_type = 'Indigenous' AND DigitalEngagement.year = 2021;,SELECT COUNT(DISTINCT d.visitor_id) FROM DigitalEngagement d JOIN Communities c ON d.community_id = c.id WHERE c.community_type = 'Indigenous' AND d.year = 2021;,0 Delete records with a 'date_completed' before '2021-01-01' from the 'teacher_training' table,"CREATE TABLE teacher_training (teacher_id INT, training_title VARCHAR(100), date_completed DATE);",DELETE FROM teacher_training WHERE date_completed < '2021-01-01';,DELETE FROM teacher_training WHERE date_completed '2021-01-01';,0 What was the result of the election in the district whose incumbent is Tom Foley?,"CREATE TABLE table_1341568_48 (status VARCHAR, incumbent VARCHAR);","SELECT status FROM table_1341568_48 WHERE incumbent = ""Tom Foley"";","SELECT status FROM table_1341568_48 WHERE incumbent = ""Tom Foley"";",1 "What is the maximum and minimum finance amount spent on climate mitigation projects in each region, for the last 3 years?","CREATE TABLE climate_finance (id INT, region TEXT, project_type TEXT, finance_amount FLOAT);","SELECT region, MAX(finance_amount) as max_finance, MIN(finance_amount) as min_finance FROM climate_finance WHERE project_type = 'mitigation' AND year BETWEEN (YEAR(CURRENT_DATE) - 3) AND YEAR(CURRENT_DATE) GROUP BY region;","SELECT region, MAX(finance_amount) as max_finance, MIN(finance_amount) as min_finance FROM climate_finance WHERE project_type = 'climate mitigation' AND project_date >= DATEADD(year, -3, GETDATE()) GROUP BY region;",0 What is every description if NO votes is 233759?,"CREATE TABLE table_256286_43 (description VARCHAR, no_votes VARCHAR);",SELECT description FROM table_256286_43 WHERE no_votes = 233759;,SELECT description FROM table_256286_43 WHERE no_votes = 233759;,1 What's the total Lost with Games that's less than 4?,"CREATE TABLE table_name_23 (lost INTEGER, games INTEGER);",SELECT SUM(lost) FROM table_name_23 WHERE games < 4;,SELECT SUM(lost) FROM table_name_23 WHERE games 4;,0 What is shown on Friday when Tuesday is Jay Mohr Sports?,"CREATE TABLE table_name_25 (friday VARCHAR, tuesday VARCHAR);","SELECT friday FROM table_name_25 WHERE tuesday = ""jay mohr sports"";","SELECT friday FROM table_name_25 WHERE tuesday = ""jay mohr sports"";",1 How many energy storage projects were completed in Texas between 2018 and 2020?,"CREATE TABLE energy_storage_projects (project_name VARCHAR(50), state VARCHAR(20), year INT); ",SELECT COUNT(*) FROM energy_storage_projects esp WHERE esp.state = 'Texas' AND esp.year BETWEEN 2018 AND 2020;,SELECT COUNT(*) FROM energy_storage_projects WHERE state = 'Texas' AND year BETWEEN 2018 AND 2020;,0 Find the average grant amount awarded to female faculty members in the Mathematics department.,"CREATE TABLE Faculty(FacultyID INT, Gender VARCHAR(255), Department VARCHAR(255), GrantAmount DECIMAL(10, 2)); ",SELECT AVG(Faculty.GrantAmount) FROM Faculty WHERE Faculty.Gender = 'Female' AND Faculty.Department = 'Mathematics';,SELECT AVG(GrantAmount) FROM Faculty WHERE Gender = 'Female' AND Department = 'Mathematics';,0 Which team has a qualifying 2 time under 59.612 and a best of 59.14?,"CREATE TABLE table_name_58 (team VARCHAR, qual_2 VARCHAR, best VARCHAR);",SELECT team FROM table_name_58 WHERE qual_2 < 59.612 AND best = 59.14;,"SELECT team FROM table_name_58 WHERE qual_2 59.612 AND best = ""59.14"";",0 What is the distribution of articles published by month in the 'monthly_reports' table?,"CREATE TABLE monthly_reports (id INT, title VARCHAR(255), author VARCHAR(255), published_date DATE);","SELECT MONTHNAME(published_date) as month, COUNT(*) as articles_published FROM monthly_reports GROUP BY month;","SELECT EXTRACT(MONTH FROM published_date) AS month, COUNT(*) AS articles_per_month FROM monthly_reports GROUP BY month;",0 Name the laps for qual of 144.665,"CREATE TABLE table_name_94 (laps INTEGER, qual VARCHAR);","SELECT SUM(laps) FROM table_name_94 WHERE qual = ""144.665"";","SELECT SUM(laps) FROM table_name_94 WHERE qual = ""144.665"";",1 "What is the total number of threat intelligence reports submitted by contractors in the defense industry, by region, in the past year?","CREATE TABLE threat_intelligence_reports (report_id INT, report_date DATE, contractor TEXT, region TEXT, report_description TEXT); ","SELECT region, COUNT(*) as num_reports FROM threat_intelligence_reports WHERE report_date BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR) AND CURRENT_DATE GROUP BY region;","SELECT region, COUNT(*) FROM threat_intelligence_reports WHERE report_date >= DATEADD(year, -1, GETDATE()) GROUP BY region;",0 Delete the production data for Gadolinium from the Australian mine in 2019.,"CREATE TABLE mine (id INT, name TEXT, location TEXT, Gadolinium_monthly_production FLOAT, timestamp TIMESTAMP); ",DELETE FROM mine WHERE name = 'Australian Mine' AND EXTRACT(YEAR FROM timestamp) = 2019 AND EXISTS (SELECT * FROM mine WHERE name = 'Australian Mine' AND Gadolinium_monthly_production IS NOT NULL AND EXTRACT(YEAR FROM timestamp) = 2019);,DELETE FROM mine WHERE location = 'Australia' AND YEAR(timestamp) = 2019 AND Gadolinium_monthly_production = 0;,0 What are the top 5 countries with the highest CO2 emissions from tourism?,"CREATE TABLE tourism_emissions (id INT, country VARCHAR(255), co2_emissions INT, visit_date DATE); ","SELECT country, SUM(co2_emissions) FROM tourism_emissions WHERE visit_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) GROUP BY country ORDER BY SUM(co2_emissions) DESC LIMIT 5;","SELECT country, co2_emissions FROM tourism_emissions ORDER BY co2_emissions DESC LIMIT 5;",0 "Which club has a 2nd round score of 1:0, 3:0?","CREATE TABLE table_name_39 (club VARCHAR, round VARCHAR, score VARCHAR);","SELECT club FROM table_name_39 WHERE round = ""2nd round"" AND score = ""1:0, 3:0"";","SELECT club FROM table_name_39 WHERE round = ""2nd"" AND score = ""1:0, 3:0"";",0 "What is the highest Red List for the muridae family and species Authority of microtus pinetorum (le conte, 1830)?","CREATE TABLE table_name_70 (red_list INTEGER, family VARCHAR, species_authority VARCHAR);","SELECT MAX(red_list) FROM table_name_70 WHERE family = ""muridae"" AND species_authority = ""microtus pinetorum (le conte, 1830)"";","SELECT MAX(red_list) FROM table_name_70 WHERE family = ""muridae"" AND species_authority = ""microtus pinetorum (le conte, 1830)"";",1 Name the minimum tiesplayed for 6 years,"CREATE TABLE table_10295819_2 (ties_played INTEGER, years_played VARCHAR);",SELECT MIN(ties_played) FROM table_10295819_2 WHERE years_played = 6;,SELECT MIN(ties_played) FROM table_10295819_2 WHERE years_played = 6;,1 What's the time of IFL: Championship Final?,"CREATE TABLE table_name_98 (time VARCHAR, event VARCHAR);","SELECT time FROM table_name_98 WHERE event = ""ifl: championship final"";","SELECT time FROM table_name_98 WHERE event = ""ifl: championship final"";",1 What place did jacky cupit take when his To par was under 13?,"CREATE TABLE table_name_67 (place VARCHAR, to_par VARCHAR, player VARCHAR);","SELECT place FROM table_name_67 WHERE to_par < 13 AND player = ""jacky cupit"";","SELECT place FROM table_name_67 WHERE to_par 13 AND player = ""jacky cupit"";",0 How many home runs has each baseball player hit in the MLB?,"CREATE TABLE mlb_players (player_id INT, name VARCHAR(50), team VARCHAR(50), homeruns INT); ","SELECT name, homeruns FROM mlb_players;","SELECT name, homeruns FROM mlb_players;",1 What is the total of cuts made where the top 25 is less than 6 and the top-5 is more than 0?,"CREATE TABLE table_name_90 (cuts_made INTEGER, top_25 VARCHAR, top_5 VARCHAR);",SELECT SUM(cuts_made) FROM table_name_90 WHERE top_25 < 6 AND top_5 > 0;,SELECT SUM(cuts_made) FROM table_name_90 WHERE top_25 6 AND top_5 > 0;,0 What is the average investment per funding round per company?,"CREATE TABLE Company (id INT, name VARCHAR(50), industry VARCHAR(50), founding_year INT); CREATE TABLE Investments (id INT, company_id INT, investment_type VARCHAR(50), investment_amount INT); ","SELECT company_id, AVG(investment_amount) as avg_investment FROM Investments GROUP BY company_id;","SELECT Company.name, AVG(Investments.investment_amount) as avg_investment_per_round FROM Company INNER JOIN Investments ON Company.id = Investments.company_id GROUP BY Company.name;",0 How many original air dates were there for episode 22?,"CREATE TABLE table_24798489_2 (original_airdate VARCHAR, episode_number VARCHAR);",SELECT COUNT(original_airdate) FROM table_24798489_2 WHERE episode_number = 22;,SELECT COUNT(original_airdate) FROM table_24798489_2 WHERE episode_number = 22;,1 How much money does player horton smith have?,"CREATE TABLE table_name_62 (money___$__ VARCHAR, player VARCHAR);","SELECT money___$__ FROM table_name_62 WHERE player = ""horton smith"";","SELECT money___$__ FROM table_name_62 WHERE player = ""horton smith"";",1 What's the lowest round with the opponent John Howard that had a method of Decision (unanimous)?,"CREATE TABLE table_name_21 (round INTEGER, method VARCHAR, opponent VARCHAR);","SELECT MIN(round) FROM table_name_21 WHERE method = ""decision (unanimous)"" AND opponent = ""john howard"";","SELECT MIN(round) FROM table_name_21 WHERE method = ""decision (unanimous)"" AND opponent = ""john harvey"";",0 When was the marriage of the person who died on 17 December 1471?,"CREATE TABLE table_name_90 (marriage VARCHAR, death VARCHAR);","SELECT marriage FROM table_name_90 WHERE death = ""17 december 1471"";","SELECT marriage FROM table_name_90 WHERE death = ""17 december 1471"";",1 What is the Year with a Number that is larger than 34?,"CREATE TABLE table_name_96 (year VARCHAR, number INTEGER);",SELECT year FROM table_name_96 WHERE number > 34;,SELECT year FROM table_name_96 WHERE number > 34;,1 what is the number where the player was jimmy demaret,CREATE TABLE table_262383_1 (runner_s__up VARCHAR);,"SELECT 54 AS _holes FROM table_262383_1 WHERE runner_s__up = ""Jimmy Demaret"";","SELECT COUNT(*) FROM table_262383_1 WHERE runner_s__up = ""Jimmy Demaret"";",0 What is the maximum donation amount and the state for that donation?,"CREATE TABLE Donations (id INT, donor_name TEXT, donation_amount FLOAT, donation_date DATE, state TEXT); ","SELECT state, MAX(donation_amount) FROM Donations;","SELECT MAX(donation_amount), state FROM Donations;",0 How many songs have mi-chemin as their Japanese name and romanji name?,"CREATE TABLE table_10979230_4 (romaji_title VARCHAR, japanese_title VARCHAR);","SELECT COUNT(romaji_title) FROM table_10979230_4 WHERE japanese_title = ""Mi-Chemin"";","SELECT COUNT(romaji_title) FROM table_10979230_4 WHERE japanese_title = ""Mi-chemin"";",0 What is the maximum broadband speed in South America?,"CREATE TABLE broadband_speeds (location VARCHAR(20), speed FLOAT); ",SELECT MAX(speed) FROM broadband_speeds WHERE location LIKE 'South%';,SELECT MAX(speed) FROM broadband_speeds WHERE location = 'South America';,0 How many average laps for Alex Tagliani with more than 17 points?,"CREATE TABLE table_name_54 (laps INTEGER, driver VARCHAR, points VARCHAR);","SELECT AVG(laps) FROM table_name_54 WHERE driver = ""alex tagliani"" AND points > 17;","SELECT AVG(laps) FROM table_name_54 WHERE driver = ""alex tagliani"" AND points > 17;",1 What home team has Richmond listed as their Away team?,"CREATE TABLE table_name_69 (home_team VARCHAR, away_team VARCHAR);","SELECT home_team FROM table_name_69 WHERE away_team = ""richmond"";","SELECT home_team FROM table_name_69 WHERE away_team = ""richmond"";",1 "What is the total quantity of military equipment sold by each salesperson, ordered by the highest sales?","CREATE TABLE salesperson (salesperson_id INT, name VARCHAR(50), region VARCHAR(50)); CREATE TABLE military_equipment_sales (sale_id INT, salesperson_id INT, equipment_type VARCHAR(50), quantity INT, sale_date DATE); ","SELECT salesperson_id, name, SUM(quantity) as total_quantity FROM military_equipment_sales mES JOIN salesperson s ON mES.salesperson_id = s.salesperson_id GROUP BY salesperson_id, name ORDER BY total_quantity DESC;","SELECT salesperson.name, SUM(military_equipment_sales.quantity) as total_quantity FROM salesperson INNER JOIN military_equipment_sales ON salesperson.salesperson_id = military_equipment_sales.salesperson_id GROUP BY salesperson.name ORDER BY total_quantity DESC;",0 When valora roucek is the contestant how many heights in centimeters are there?,"CREATE TABLE table_18626383_2 (height__cm_ VARCHAR, contestant VARCHAR);","SELECT COUNT(height__cm_) FROM table_18626383_2 WHERE contestant = ""Valora Roucek"";","SELECT COUNT(height__cm_) FROM table_18626383_2 WHERE contestant = ""Valora Roucek"";",1 What are the ingredient sourcing details for ingredient 3?,"CREATE TABLE ingredient_sourcing (id INT, product_id INT, ingredient_id INT, supplier_id INT, country VARCHAR(50)); ","SELECT DISTINCT product_id, supplier_id, country FROM ingredient_sourcing WHERE ingredient_id = 3;","SELECT ingredient_id, supplier_id, country FROM ingredient_sourcing WHERE ingredient_id = 3;",0 What is the total quantity of minerals extracted from each country?,"CREATE TABLE Minerals (MineralID INT PRIMARY KEY, MineralName VARCHAR(50), ExtractionSite VARCHAR(50), Quantity INT, ExtractionDate DATE); ","SELECT ExtractionSites.Location, SUM(Minerals.Quantity) FROM Minerals INNER JOIN ExtractionSites ON Minerals.ExtractionSite = ExtractionSites.SiteName GROUP BY ExtractionSites.Location;","SELECT ExtractionSite, SUM(Quantity) FROM Minerals GROUP BY ExtractionSite;",0 What is the station type for the branding ABS-CBN TV-32 Tagaytay?,"CREATE TABLE table_2610582_2 (station_type VARCHAR, branding VARCHAR);","SELECT station_type FROM table_2610582_2 WHERE branding = ""ABS-CBN TV-32 Tagaytay"";","SELECT station_type FROM table_2610582_2 WHERE branding = ""ABS-CBN TV-32 Tagaytay"";",1 Did the legislation pass that had 42.87% yes votes?,"CREATE TABLE table_256286_63 (passed VARCHAR, _percentage_yes VARCHAR);","SELECT passed FROM table_256286_63 WHERE _percentage_yes = ""42.87%"";","SELECT passed FROM table_256286_63 WHERE _percentage_yes = ""42.87%"";",1 What is the total number of graduate students per department?,"CREATE TABLE departments (id INT, name VARCHAR(255)); CREATE TABLE graduate_students (id INT, department_id INT, gender VARCHAR(10), num_students INT); ","SELECT d.name, SUM(gs.num_students) FROM departments d JOIN graduate_students gs ON d.id = gs.department_id GROUP BY d.name;","SELECT d.name, SUM(gs.num_students) as total_students FROM departments d JOIN graduate_students gs ON d.id = gs.department_id GROUP BY d.name;",0 Which public services received the highest and lowest budget allocations in the city of Chicago in 2022?,"CREATE TABLE city_budget (city VARCHAR(255), year INT, department VARCHAR(255), allocated_budget FLOAT); ","SELECT department, allocated_budget FROM city_budget WHERE city = 'Chicago' AND year = 2022 ORDER BY allocated_budget DESC, department ASC LIMIT 1; SELECT department, allocated_budget FROM city_budget WHERE city = 'Chicago' AND year = 2022 ORDER BY allocated_budget ASC, department ASC LIMIT 1;","SELECT department, MAX(allocated_budget) AS max_budget, MIN(allocated_budget) AS min_budget FROM city_budget WHERE city = 'Chicago' AND year = 2022 GROUP BY department;",0 Name the broadcast date of 6.9 million viewers,"CREATE TABLE table_2114308_1 (broadcast_date VARCHAR, viewers__in_millions_ VARCHAR);","SELECT broadcast_date FROM table_2114308_1 WHERE viewers__in_millions_ = ""6.9"";","SELECT broadcast_date FROM table_2114308_1 WHERE viewers__in_millions_ = ""6.9"";",1 What is the league for season 1955-56?,"CREATE TABLE table_name_93 (league VARCHAR, season VARCHAR);","SELECT league FROM table_name_93 WHERE season = ""1955-56"";","SELECT league FROM table_name_93 WHERE season = ""1955-56"";",1 Tell me the year built for withdrawn of 1983,"CREATE TABLE table_name_19 (year_built__converted VARCHAR, _ VARCHAR, withdrawn VARCHAR);",SELECT year_built__converted * _ FROM table_name_19 WHERE withdrawn = 1983;,"SELECT year_built__converted FROM table_name_19 WHERE _ = ""1983"" AND withdrawn = ""1983"";",0 "Which hard has a Clay of 0–0, Grass of 0–0, Carpet of 0–0, and a Record of 1–0?","CREATE TABLE table_name_10 (hard VARCHAR, record VARCHAR, carpet VARCHAR, clay VARCHAR, grass VARCHAR);","SELECT hard FROM table_name_10 WHERE clay = ""0–0"" AND grass = ""0–0"" AND carpet = ""0–0"" AND record = ""1–0"";","SELECT hard FROM table_name_10 WHERE clay = ""0–0"" AND grass = ""0–0"" AND carpet = ""0–0"" AND record = ""1–0"";",1 What is the total number of mining operations in the state of California?,"CREATE TABLE mining_operations (id INT, name TEXT, location TEXT); ",SELECT COUNT(*) FROM mining_operations WHERE location = 'California';,SELECT COUNT(*) FROM mining_operations WHERE location = 'California';,1 What award did Andrew Ryder win as producer?,"CREATE TABLE table_name_40 (award VARCHAR, producer_s_ VARCHAR);","SELECT award FROM table_name_40 WHERE producer_s_ = ""andrew ryder"";","SELECT award FROM table_name_40 WHERE producer_s_ = ""andrew ryder"";",1 What is the total prize pool for all esports events?,"CREATE TABLE PrizePools (EventID INT, Region VARCHAR(50), PrizePool INT); ",SELECT SUM(PrizePool) FROM PrizePools;,SELECT SUM(PrizePool) FROM PrizePools;,1 How many losses did the club who had 9 bonus points and 11 wins have?,"CREATE TABLE table_27293285_2 (lost VARCHAR, bonus_points VARCHAR, won VARCHAR);","SELECT lost FROM table_27293285_2 WHERE bonus_points = ""9"" AND won = ""11"";","SELECT lost FROM table_27293285_2 WHERE bonus_points = ""9"" AND won = ""11"";",1 What is the total cost of green building materials used in Los Angeles in 2020?,"CREATE TABLE Green_Building_Materials (Material_ID INT, Material_Type VARCHAR(50), Cost FLOAT, City VARCHAR(50), Year INT); ","SELECT SUM(Cost) FROM Green_Building_Materials WHERE City = 'Los Angeles' AND Year = 2020 AND Material_Type IN ('Solar Panels', 'Energy-efficient Windows');",SELECT SUM(Cost) FROM Green_Building_Materials WHERE City = 'Los Angeles' AND Year = 2020;,0 List the unique professional development courses attended by teachers in 'Chicago'?,"CREATE TABLE teacher_pd (teacher_id INT, course_name VARCHAR(50), location VARCHAR(20)); ",SELECT DISTINCT course_name FROM teacher_pd WHERE location = 'Chicago';,SELECT DISTINCT course_name FROM teacher_pd WHERE location = 'Chicago';,1 What is the total number of lifetime learning hours for each student in 2019?,"CREATE TABLE lifetime_learning (student_id INT, year INT, learning_hours INT); ","SELECT student_id, SUM(learning_hours) as total_learning_hours FROM lifetime_learning WHERE year = 2019 GROUP BY student_id;","SELECT student_id, SUM(learning_hours) FROM lifetime_learning WHERE year = 2019 GROUP BY student_id;",0 What's the home team for the junction oval venue?,"CREATE TABLE table_name_28 (home_team VARCHAR, venue VARCHAR);","SELECT home_team AS score FROM table_name_28 WHERE venue = ""junction oval"";","SELECT home_team FROM table_name_28 WHERE venue = ""junction oval"";",0 What was the first leg score for the match that had AS Police as team 2?,CREATE TABLE table_name_34 (team_2 VARCHAR);,"SELECT 1 AS st_leg FROM table_name_34 WHERE team_2 = ""as police"";","SELECT MIN(first_leg) FROM table_name_34 WHERE team_2 = ""as police"";",0 Which Report has a Winning driver of emerson fittipaldi?,"CREATE TABLE table_name_61 (report VARCHAR, winning_driver VARCHAR);","SELECT report FROM table_name_61 WHERE winning_driver = ""emerson fittipaldi"";","SELECT report FROM table_name_61 WHERE winning_driver = ""emerson fittipaldi"";",1 what's the district with party being republican and elected being 1998,"CREATE TABLE table_13833770_3 (district VARCHAR, party VARCHAR, elected VARCHAR);","SELECT district FROM table_13833770_3 WHERE party = ""Republican"" AND elected = 1998;","SELECT district FROM table_13833770_3 WHERE party = ""Republican"" AND elected = 1998;",1 How many rural health clinics in the state of Texas have no dental check-ups performed in the year 2022?,"CREATE TABLE appointment (appointment_id INT, clinic_id INT, appointment_date DATE, appointment_type VARCHAR(20)); CREATE TABLE clinic_detail (clinic_id INT, location VARCHAR(20)); ",SELECT COUNT(*) FROM clinic_detail WHERE clinic_id NOT IN (SELECT clinic_id FROM appointment WHERE appointment_type = 'dental' AND YEAR(appointment_date) = 2022) AND location = 'Texas';,SELECT COUNT(*) FROM appointment JOIN clinic_detail ON appointment.clinic_id = clinic_detail.clinic_id WHERE clinic_detail.location = 'Texas' AND appointment_date = '2022-01-01' AND appointment_type = 'Dental Check-up';,0 What is Hungary's time with a heat higher than 2 and two lanes?,"CREATE TABLE table_name_45 (time VARCHAR, lane VARCHAR, heat VARCHAR, nationality VARCHAR);","SELECT time FROM table_name_45 WHERE heat > 2 AND nationality = ""hungary"" AND lane = 2;","SELECT time FROM table_name_45 WHERE heat > 2 AND nationality = ""hungary"" AND lane = ""two"";",0 What is the average rating of TV shows by release year?,"CREATE TABLE tv_show_ratings (title VARCHAR(255), rating FLOAT, release_year INT); ","SELECT release_year, AVG(rating) FROM tv_show_ratings GROUP BY release_year;","SELECT release_year, AVG(rating) FROM tv_show_ratings GROUP BY release_year;",1 What is the size of the crowd for the game with Footscray as the home team?,"CREATE TABLE table_name_59 (crowd INTEGER, home_team VARCHAR);","SELECT AVG(crowd) FROM table_name_59 WHERE home_team = ""footscray"";","SELECT SUM(crowd) FROM table_name_59 WHERE home_team = ""footscray"";",0 What is every value for Points 2 when the value of won is 30?,"CREATE TABLE table_17359181_1 (points_2 VARCHAR, won VARCHAR);",SELECT points_2 FROM table_17359181_1 WHERE won = 30;,SELECT points_2 FROM table_17359181_1 WHERE won = 30;,1 who is the the candidates with first elected being 1977,"CREATE TABLE table_1341586_19 (candidates VARCHAR, first_elected VARCHAR);",SELECT candidates FROM table_1341586_19 WHERE first_elected = 1977;,SELECT candidates FROM table_1341586_19 WHERE first_elected = 1977;,1 Which team 1 has cbm valladolid as team 2?,"CREATE TABLE table_name_75 (team_1 VARCHAR, team_2 VARCHAR);","SELECT team_1 FROM table_name_75 WHERE team_2 = ""cbm valladolid"";","SELECT team_1 FROM table_name_75 WHERE team_2 = ""cbm valladolid"";",1 What is Hasan Shah's hometown?,"CREATE TABLE table_name_40 (hometown VARCHAR, name VARCHAR);","SELECT hometown FROM table_name_40 WHERE name = ""hasan shah"";","SELECT hometown FROM table_name_40 WHERE name = ""hasan shan"";",0 What are the top 3 countries in South America by total revenue from sales of Yttrium in 2018?,"CREATE TABLE sales (id INT, country VARCHAR(50), Yttrium_sold FLOAT, revenue FLOAT, datetime DATETIME); ","SELECT country, SUM(revenue) AS total_revenue FROM sales WHERE YEAR(datetime) = 2018 AND Yttrium_sold IS NOT NULL AND country LIKE 'South%' GROUP BY country ORDER BY total_revenue DESC LIMIT 3;","SELECT country, SUM(revenue) as total_revenue FROM sales WHERE Yttrium_sold = 'Yttrium' AND YEAR(datetime) = 2018 GROUP BY country ORDER BY total_revenue DESC LIMIT 3;",0 How many eco-friendly hotels are there in each country in the Americas?,"CREATE TABLE hotels (id INT, name TEXT, city TEXT, country TEXT, sustainable BOOLEAN); ","SELECT country, COUNT(*) FROM hotels WHERE sustainable = true AND country IN (SELECT name FROM countries WHERE continent = 'Americas') GROUP BY country;","SELECT country, COUNT(*) FROM hotels WHERE sustainable = TRUE GROUP BY country;",0 What are the top 3 building permits by cost?,"CREATE TABLE building_permits (permit_id SERIAL PRIMARY KEY, issue_date DATE, cost INTEGER); ","SELECT permit_id, issue_date, cost FROM building_permits ORDER BY cost DESC LIMIT 3;","SELECT permit_id, cost FROM building_permits ORDER BY cost DESC LIMIT 3;",0 How many couples have an average of 25.3?,"CREATE TABLE table_20424140_3 (couple VARCHAR, average VARCHAR);","SELECT COUNT(couple) FROM table_20424140_3 WHERE average = ""25.3"";","SELECT COUNT(couple) FROM table_20424140_3 WHERE average = ""25.3"";",1 During which years did number 13 play for the Rockets?,"CREATE TABLE table_11734041_3 (years_for_rockets VARCHAR, no_s_ VARCHAR);","SELECT years_for_rockets FROM table_11734041_3 WHERE no_s_ = ""13"";",SELECT years_for_rockets FROM table_11734041_3 WHERE no_s_ = 13;,0 List all beauty products with potentially harmful ingredients.,"CREATE TABLE Products (product_id INT, product_name VARCHAR(255), harmful_ingredient_1 BOOLEAN, harmful_ingredient_2 BOOLEAN, harmful_ingredient_3 BOOLEAN); ",SELECT * FROM Products WHERE harmful_ingredient_1 = TRUE OR harmful_ingredient_2 = TRUE OR harmful_ingredient_3 = TRUE;,SELECT * FROM Products WHERE harmful_ingredient_1 = TRUE AND harmful_ingredient_2 = TRUE AND harmful_ingredient_3 = TRUE;,0 "List artworks by artists from India or Spain, excluding those created before 1900.","CREATE TABLE Artists (ArtistID INT PRIMARY KEY, Name VARCHAR(100), Nationality VARCHAR(50)); CREATE TABLE ArtWorks (ArtWorkID INT PRIMARY KEY, Title VARCHAR(100), YearCreated INT, ArtistID INT, FOREIGN KEY (ArtistID) REFERENCES Artists(ArtistID)); ","SELECT ArtWorks.Title FROM ArtWorks INNER JOIN Artists ON ArtWorks.ArtistID = Artists.ArtistID WHERE Artists.Nationality IN ('Indian', 'Spanish') AND ArtWorks.YearCreated > 1900;","SELECT ArtWorks.Title FROM ArtWorks INNER JOIN Artists ON ArtWorks.ArtistID = Artists.ArtistID WHERE Artists.Nationality IN ('India', 'Spain') AND ArtWorks.YearCreated 1900;",0 Find the number of concerts happened in the stadium with the highest capacity .,"CREATE TABLE concert (stadium_id VARCHAR, capacity VARCHAR); CREATE TABLE stadium (stadium_id VARCHAR, capacity VARCHAR);",SELECT COUNT(*) FROM concert WHERE stadium_id = (SELECT stadium_id FROM stadium ORDER BY capacity DESC LIMIT 1);,SELECT COUNT(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T2.capacity = (SELECT MAX(capacity) FROM stadium);,0 Identify if there's a bias in AI fairness dataset based on ethnicity.,"CREATE TABLE ai_fairness_dataset (algorithm VARCHAR(255), ethnicity VARCHAR(50), passed_test BOOLEAN); ","SELECT algorithm, AVG(passed_test) AS pass_rate FROM ai_fairness_dataset GROUP BY algorithm HAVING pass_rate < 0.5 OR pass_rate > 0.8;","SELECT algorithm, ethnicity, passed_test FROM ai_fairness_dataset WHERE passed_test = TRUE;",0 How many new mining sites were added in Africa in the past year?,"CREATE TABLE mining_sites (id INT, name VARCHAR(50), location VARCHAR(50), added_date DATE, PRIMARY KEY (id)); ","SELECT COUNT(*) FROM mining_sites WHERE added_date >= DATEADD(year, -1, GETDATE()) AND location LIKE 'Africa%';","SELECT COUNT(*) FROM mining_sites WHERE location LIKE 'Africa%' AND added_date >= DATEADD(year, -1, GETDATE());",0 Find the number of members in unions based in California,"CREATE TABLE union_details (id INT, union_name VARCHAR(255), location VARCHAR(255)); ",SELECT COUNT(*) FROM union_details WHERE location = 'California';,SELECT COUNT(*) FROM union_details WHERE location = 'California';,1 "What is the average 'sustainability_score' of factories in the 'factory' table, grouped by 'location'?","CREATE TABLE factory (factory_id INT, location VARCHAR(20), sustainability_score INT); ","SELECT location, AVG(sustainability_score) FROM factory GROUP BY location;","SELECT location, AVG(sustainability_score) FROM factory GROUP BY location;",1 What the rank of the Virgin Islands athlete with react under 0.168?,"CREATE TABLE table_name_44 (rank VARCHAR, react VARCHAR, nationality VARCHAR);","SELECT rank FROM table_name_44 WHERE react < 0.168 AND nationality = ""virgin islands"";","SELECT rank FROM table_name_44 WHERE react 0.168 AND nationality = ""virgin islands"";",0 What is the sum of the total for a routine score of 26.6?,"CREATE TABLE table_name_69 (total INTEGER, routine_score VARCHAR);",SELECT SUM(total) FROM table_name_69 WHERE routine_score = 26.6;,"SELECT SUM(total) FROM table_name_69 WHERE routine_score = ""26.6"";",0 Which TV shows were renewed and have a rating higher than 8?,"CREATE TABLE TV_Shows (show_id INT, title VARCHAR(100), genre VARCHAR(50), viewership INT, rating INT, status VARCHAR(10)); ",SELECT title FROM TV_Shows WHERE status = 'Renewed' AND rating > 8;,SELECT title FROM TV_Shows WHERE status = 'Renewed' AND rating > 8;,1 What is the total waste generation in kg for each country in 2021?,"CREATE TABLE waste_generation (country VARCHAR(255), year INT, amount FLOAT); ","SELECT wg.country, SUM(wg.amount) as total_waste FROM waste_generation wg WHERE wg.year = 2021 GROUP BY wg.country;","SELECT country, SUM(amount) FROM waste_generation WHERE year = 2021 GROUP BY country;",0 What is the highest Jews and others 1?,CREATE TABLE table_25947046_1 (jews_and_others_1 INTEGER);,SELECT MAX(jews_and_others_1) FROM table_25947046_1;,SELECT MAX(jews_and_others_1) FROM table_25947046_1;,1 What is the total budget for all infrastructure projects in 'Montreal' and 'Ottawa'?,"CREATE TABLE InfrastructureB(id INT, city VARCHAR(20), project VARCHAR(30), budget DECIMAL(10,2)); ",SELECT SUM(budget) FROM (SELECT budget FROM InfrastructureB WHERE city = 'Montreal' UNION ALL SELECT budget FROM InfrastructureB WHERE city = 'Ottawa') AS Total;,"SELECT SUM(budget) FROM InfrastructureB WHERE city IN ('Montreal', 'Ottawa');",0 "What are the names and production quantities of all wells that were active in Q4 2021, sorted by production quantity?","CREATE TABLE wells (well_id INT, well_name TEXT, production_qty INT, start_date DATE, end_date DATE); ","SELECT well_name, production_qty FROM wells WHERE start_date <= '2021-10-01' AND end_date >= '2021-01-01' ORDER BY production_qty DESC;","SELECT well_name, production_qty FROM wells WHERE start_date BETWEEN '2021-04-01' AND '2021-06-30' ORDER BY production_qty DESC;",0 What is the name of the race when Lineth Chepkurui is the athlete?,"CREATE TABLE table_name_17 (race VARCHAR, athlete VARCHAR);","SELECT race FROM table_name_17 WHERE athlete = ""lineth chepkurui"";","SELECT race FROM table_name_17 WHERE athlete = ""lineth chepkurui"";",1 What is the win-loss record of teams in the 'Pacific Division' for the 2021-2022 season?,"CREATE TABLE GameResults (GameID INT, HomeTeam VARCHAR(20), AwayTeam VARCHAR(20), HomeScore INT, AwayScore INT, SeasonYear INT); ","SELECT HomeTeam, COUNT(*) AS Wins, (SELECT COUNT(*) FROM GameResults WHERE SeasonYear = 2021 AND AwayTeam = HomeTeam AND AwayScore < HomeScore) AS Losses FROM GameResults WHERE SeasonYear = 2021 AND HomeTeam IN ('Sharks', 'Kings', 'Ducks', 'Stars', 'Oilers') GROUP BY HomeTeam;","SELECT HomeTeam, AwayTeam, HomeScore, AwayScore, SeasonYear FROM GameResults WHERE HomeTeam = 'Pacific Division' AND SeasonYear = 2021 AND AwayTeam = 'Pacific Division';",0 What is the maximum number of passengers carried by a single spacecraft of ROSCOSMOS?,"CREATE TABLE Spacecraft(id INT, organization VARCHAR(255), name VARCHAR(255), capacity INT); ",SELECT MAX(capacity) FROM Spacecraft WHERE organization = 'ROSCOSMOS';,SELECT MAX(capacity) FROM Spacecraft WHERE organization = 'ROSCOSMOS';,1 What was the average artifact weight from each excavation site?,"CREATE TABLE excavation_sites (site_id INT, site_name VARCHAR(50), country VARCHAR(50)); CREATE TABLE artifacts (artifact_id INT, site_id INT, weight DECIMAL(5,2));","SELECT e.site_name, AVG(a.weight) as avg_weight FROM excavation_sites e JOIN artifacts a ON e.site_id = a.site_id GROUP BY e.site_id, e.site_name ORDER BY avg_weight DESC;","SELECT excavation_sites.site_name, AVG(artifacts.weight) as avg_weight FROM excavation_sites INNER JOIN artifacts ON excavation_sites.site_id = artifacts.site_id GROUP BY excavation_sites.site_name;",0 What is the maximum budget (in USD) for Green-Star certified buildings in the 'GreenBuildings' table?,"CREATE TABLE GreenBuildings ( id INT, name VARCHAR(50), squareFootage INT, certification VARCHAR(10), budget DECIMAL(10,2) ); ",SELECT MAX(budget) FROM GreenBuildings WHERE certification = 'Green-Star';,SELECT MAX(budget) FROM GreenBuildings WHERE certification = 'Green-Star';,1 What is the percentage of students who passed the mental health survey?,"CREATE TABLE students (id INT, name TEXT, gender TEXT, mental_health_score INT); ",SELECT (COUNT(*) FILTER (WHERE mental_health_score >= 70)) * 100.0 / COUNT(*) FROM students;,SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM students)) AS percentage FROM students WHERE mental_health_score >= (SELECT COUNT(*) FROM students);,0 What is the average price of eco-friendly tour packages?,"CREATE TABLE tour_packages (package_id INT, package_type VARCHAR(20), price DECIMAL(5,2), is_eco_friendly BOOLEAN); ",SELECT AVG(price) FROM tour_packages WHERE is_eco_friendly = TRUE;,SELECT AVG(price) FROM tour_packages WHERE is_eco_friendly = true;,0 How many marine protected areas are there in each continent?,"CREATE TABLE marine_protected_areas (area_id INT, country TEXT, continent TEXT); ","SELECT continent, COUNT(area_id) FROM marine_protected_areas GROUP BY continent;","SELECT continent, COUNT(*) FROM marine_protected_areas GROUP BY continent;",0 What is the total water savings from water conservation initiatives in Arizona in the last 5 years?,"CREATE TABLE water_savings (savings_id INT, location VARCHAR(255), savings_amount FLOAT, savings_date DATE); ",SELECT SUM(savings_amount) FROM water_savings WHERE location = 'Arizona' AND savings_date >= '2016-01-01';,"SELECT SUM(savings_amount) FROM water_savings WHERE location = 'Arizona' AND savings_date >= DATEADD(year, -5, GETDATE());",0 Identify the number of hotels in each country that have adopted AI technology.,"CREATE TABLE hotels (hotel_id INT, country TEXT, ai_adoption BOOLEAN); ","SELECT country, COUNT(CASE WHEN ai_adoption = TRUE THEN 1 END) AS num_ai_hotels FROM hotels GROUP BY country;","SELECT country, COUNT(*) FROM hotels WHERE ai_adoption = TRUE GROUP BY country;",0 What is the diversity ratio of gender in the company?,"CREATE TABLE EmployeeData (EmployeeID INT, Gender VARCHAR(10)); ","SELECT (COUNT(*) FILTER (WHERE Gender IN ('Male', 'Female', 'Non-binary'))) * 100.0 / COUNT(*) FROM EmployeeData;",SELECT COUNT(*) * 100.0 / (SELECT COUNT(*) FROM EmployeeData) AS DiversityRate FROM EmployeeData GROUP BY Gender;,0 List all VR devices used by players in the 'VRUsers' table.,"CREATE TABLE VRUsers (PlayerID INT, VRDevice VARCHAR(20)); ",SELECT DISTINCT VRDevice FROM VRUsers;,SELECT VRDevice FROM VRUsers;,0 What is the production code of the episode that had 5.43 million viewers?,"CREATE TABLE table_24938621_3 (production_code VARCHAR, us_viewers__million_ VARCHAR);","SELECT production_code FROM table_24938621_3 WHERE us_viewers__million_ = ""5.43"";","SELECT production_code FROM table_24938621_3 WHERE us_viewers__million_ = ""5.43"";",1 What is Astrid Gruber's email and phone number?,"CREATE TABLE customers (email VARCHAR, phone VARCHAR, first_name VARCHAR, last_name VARCHAR);","SELECT email, phone FROM customers WHERE first_name = ""Astrid"" AND last_name = ""Gruber"";","SELECT email, phone FROM customers WHERE first_name = ""Astrid Gruber"" AND last_name = ""Astrid"";",0 Which Result has a Round larger than 17?,"CREATE TABLE table_name_37 (result VARCHAR, round INTEGER);",SELECT result FROM table_name_37 WHERE round > 17;,SELECT result FROM table_name_37 WHERE round > 17;,1 What percentage of sustainable textile waste is generated from South American countries?,"CREATE TABLE WasteOrigin (Brand VARCHAR(255), Country VARCHAR(255), WasteQuantity INT); ","SELECT (COUNT(*) * 100.0 / (SELECT COUNT(*) FROM WasteOrigin)) AS Percentage FROM WasteOrigin WHERE Country IN ('BR', 'AR', 'CO');",SELECT (SUM(WasteQuantity) / (SELECT SUM(WasteQuantity) FROM WasteOrigin WHERE Country LIKE 'South%')) * 100.0 / (SELECT SUM(WasteQuantity) FROM WasteOrigin WHERE Country LIKE 'South%');,0 "What is the average order value for each salesperson, by month?","CREATE TABLE sales (salesperson VARCHAR(255), order_date DATE, order_value DECIMAL(10,2));","SELECT salesperson, DATE_TRUNC('month', order_date) AS order_month, AVG(order_value) AS avg_order_value FROM sales GROUP BY salesperson, order_month;","SELECT salesperson, DATE_FORMAT(order_date, '%Y-%m') as month, AVG(order_value) as avg_order_value FROM sales GROUP BY salesperson, month;",0 On what surface was the Australian Open (6) played on?,"CREATE TABLE table_29163303_1 (surface VARCHAR, championship VARCHAR);","SELECT surface FROM table_29163303_1 WHERE championship = ""Australian Open (6)"";","SELECT surface FROM table_29163303_1 WHERE championship = ""Australian Open (6)"";",1 What is the average calories burned per workout for users in the 'New York' region?,"CREATE TABLE Users (id INT, user_name TEXT, region TEXT); CREATE TABLE Workouts (id INT, user_id INT, workout_name TEXT, calories INT); ",SELECT AVG(calories) FROM Workouts JOIN Users ON Workouts.user_id = Users.id WHERE Users.region = 'New York';,SELECT AVG(Workouts.calories) FROM Workouts INNER JOIN Users ON Workouts.user_id = Users.id WHERE Users.region = 'New York';,0 Show the top 5 teams with the highest total salaries for their athletes,"CREATE TABLE team_salaries (team VARCHAR(50), total_salary DECIMAL(10,2));","INSERT INTO team_salaries (team, total_salary) SELECT t.team, SUM(base_salary + bonus) FROM athlete_salaries AS asal JOIN team_roster tr ON asal.athlete_id = tr.athlete_id JOIN team_data t ON tr.team_id = t.team_id GROUP BY t.team ORDER BY total_salary DESC LIMIT 5;","SELECT team, total_salary FROM team_salaries ORDER BY total_salary DESC LIMIT 5;",0 "How many shared bicycles were available in Berlin on July 4, 2021?","CREATE TABLE shared_bicycles( bicycle_id INT, availability_status VARCHAR(50), availability_date DATE, city VARCHAR(50));",SELECT COUNT(*) FROM shared_bicycles WHERE availability_status = 'available' AND availability_date = '2021-07-04' AND city = 'Berlin';,SELECT COUNT(*) FROM shared_bicycles WHERE city = 'Berlin' AND availability_date BETWEEN '2021-01-04' AND '2021-07-04';,0 "What is the distribution of healthcare facilities by type and rating, for facilities serving over 5000 patients?","CREATE TABLE public.healthcare_access (id SERIAL PRIMARY KEY, state TEXT, city TEXT, facility_type TEXT, patients_served INT, rating INT); ","SELECT facility_type, rating, COUNT(*) FROM public.healthcare_access WHERE patients_served > 5000 GROUP BY facility_type, rating;","SELECT facility_type, rating FROM public.healthcare_access WHERE patients_served > 5000 GROUP BY facility_type, rating;",0 What is the average depth of ocean floor mapping projects in the Pacific region where the maximum depth is greater than 6000 meters?,"CREATE TABLE ocean_floor_mapping(id INT, region VARCHAR(20), depth FLOAT); ",SELECT AVG(depth) FROM ocean_floor_mapping WHERE region = 'Pacific' HAVING MAX(depth) > 6000;,SELECT AVG(depth) FROM ocean_floor_mapping WHERE region = 'Pacific' AND depth > 6000;,0 What was the average number of likes per post for users in South America in Q3 2023?,"CREATE SCHEMA socialmedia;CREATE TABLE posts (id INT, user_id INT, likes INT, timestamp TIMESTAMP, region VARCHAR(255));",SELECT AVG(likes) FROM socialmedia.posts WHERE region = 'South America' AND EXTRACT(YEAR FROM timestamp) = 2023 AND EXTRACT(QUARTER FROM timestamp) = 3;,SELECT AVG(likes) FROM socialmedia.posts WHERE timestamp BETWEEN '2023-04-01' AND '2023-06-30' AND region = 'South America';,0 What kind of Week 2 has a Week 4 of araya robinson?,"CREATE TABLE table_name_15 (week_2 VARCHAR, week_4 VARCHAR);","SELECT week_2 FROM table_name_15 WHERE week_4 = ""araya robinson"";","SELECT week_2 FROM table_name_15 WHERE week_4 = ""araya robinson"";",1 How many startups have been founded by people from historically underrepresented racial or ethnic groups in the last 10 years?,"CREATE TABLE companies (id INT, name TEXT, founder_race TEXT, founding_date DATE);","SELECT founder_race, COUNT(*) as num_startups FROM companies WHERE founding_date >= DATE_SUB(CURDATE(), INTERVAL 10 YEAR) AND founder_race IN ('African American', 'Hispanic', 'Native American', 'Pacific Islander') GROUP BY founder_race;","SELECT COUNT(*) FROM companies WHERE founder_race IN ('African American', 'Hispanic') AND founding_date >= DATEADD(year, -10, GETDATE());",0 What team raced with a Foyt engine in the Texas Grand Prix?,"CREATE TABLE table_1405704_1 (team VARCHAR, race_name VARCHAR, engine VARCHAR);","SELECT team FROM table_1405704_1 WHERE race_name = ""Texas Grand Prix"" AND engine = ""Foyt"";","SELECT team FROM table_1405704_1 WHERE race_name = ""Texas Grand Prix"" AND engine = ""Foyt"";",1 What is the date recorded for I Want to Be Free with a length of 2:12?,"CREATE TABLE table_name_63 (recorded VARCHAR, time VARCHAR, song_title VARCHAR);","SELECT recorded FROM table_name_63 WHERE time = ""2:12"" AND song_title = ""i want to be free"";","SELECT recorded FROM table_name_63 WHERE time = ""2:12"" AND song_title = ""i want to be free"";",1 Which is the lowest played with 28-10 points and goals higher than 29?,"CREATE TABLE table_name_97 (played INTEGER, points VARCHAR, goals_for VARCHAR);","SELECT MIN(played) FROM table_name_97 WHERE points = ""28-10"" AND goals_for > 29;","SELECT MIN(played) FROM table_name_97 WHERE points = ""28-10"" AND goals_for > 29;",1 What is the highest rated eco-friendly hotel in Kyoto?,"CREATE TABLE eco_hotels (hotel_id INT, hotel_name VARCHAR(100), city VARCHAR(100), rating FLOAT); ","SELECT hotel_name, MAX(rating) FROM eco_hotels WHERE city = 'Kyoto';","SELECT hotel_name, MAX(rating) FROM eco_hotels WHERE city = 'Kyoto' GROUP BY hotel_name;",0 Create a table to store information about archaeologists,"CREATE TABLE Archaeologists (ArchaeologistID INT PRIMARY KEY, FirstName VARCHAR(255), LastName VARCHAR(255), Specialty TEXT, Country VARCHAR(255));","CREATE TABLE Archaeologists (ArchaeologistID INT PRIMARY KEY, FirstName VARCHAR(255), LastName VARCHAR(255), Specialty TEXT, Country VARCHAR(255));","CREATE TABLE Archaeologists (ArchaeologistID INT PRIMARY KEY, FirstName VARCHAR(255), LastName VARCHAR(255), Specialty TEXT, Country VARCHAR(255));",1 What is the average response time for medical emergencies in the North district?,"CREATE TABLE district (id INT, name VARCHAR(20)); CREATE TABLE calls (id INT, district_id INT, call_type VARCHAR(20), call_time TIMESTAMP, response_time INT); ",SELECT AVG(response_time) FROM calls WHERE district_id = (SELECT id FROM district WHERE name = 'North') AND call_type = 'Medical';,SELECT AVG(response_time) FROM calls JOIN district ON calls.district_id = district.id WHERE district.name = 'North' AND call_type = 'Medical Emergency';,0 What was the total cost of all humanitarian assistance operations in the Caribbean in 2019?,"CREATE TABLE humanitarian_assistance (operation_id INT, operation_name VARCHAR(255), region VARCHAR(255), start_date DATE, end_date DATE, cost DECIMAL(10,2)); CREATE TABLE operations (operation_id INT, operation_name VARCHAR(255));",SELECT SUM(cost) FROM humanitarian_assistance INNER JOIN operations ON humanitarian_assistance.operation_id = operations.operation_id WHERE region = 'Caribbean' AND YEAR(start_date) = 2019;,SELECT SUM(cost) FROM humanitarian_assistance WHERE region = 'Caribbean' AND YEAR(start_date) = 2019;,0 What is the NHL team in the media market ranking number 7?,"CREATE TABLE table_1205598_1 (nhl_team_s_ VARCHAR, media_market_ranking VARCHAR);",SELECT nhl_team_s_ FROM table_1205598_1 WHERE media_market_ranking = 7;,SELECT nhl_team_s_ FROM table_1205598_1 WHERE media_market_ranking = 7;,1