id
stringlengths
8
8
db_id
stringlengths
2
28
SQL
stringclasses
24 values
question
stringlengths
56
837
difficulty
float64
tables
stringlengths
45
658
prompt
stringlengths
615
1.69k
local244
music
null
Calculate the duration of each track, classify them as short, medium, or long, output the minimum and maximum time for each kind (in minutes) and the total revenue for each category, group by the category.
null
['Album' 'Artist' 'Customer' 'Employee' 'Genre' 'Invoice' 'InvoiceLine' 'MediaType' 'Playlist' 'PlaylistTrack' 'Track']
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: music 2. **Tables**: Album, Artist, Customer, Employee, Genre, Invoice, InvoiceLine, MediaType, Playlist, PlaylistTrack, Track 3. **User Question**: Calculate the duration of each track, classify them as short, mediu...
local253
education_business
null
Using a Salary Dataset where the salary values need to be cleaned by removing non-numeric characters and converting them to a numeric type, write a detailed SQL query that identifies the top 5 companies by average salary in each of Mumbai, Pune, New Delhi, and Hyderabad, then compares each company’s average salary in t...
null
['hardware_dim_customer' 'hardware_fact_pre_invoice_deductions' 'web_sales_reps' 'hardware_dim_product' 'web_orders' 'StaffHours' 'university_enrollment' 'university_faculty' 'university_student' 'university_offering' 'web_accounts' 'web_events' 'SalaryDataset' 'web_region' 'hardware_fact_gross_price' 'hardware_fa...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: education_business 2. **Tables**: hardware_dim_customer, hardware_fact_pre_invoice_deductions, web_sales_reps, hardware_dim_product, web_orders, StaffHours, university_enrollment, university_faculty, university_stude...
local258
IPL
null
Calculate the total number of wickets taken by each bowler (excluding run-outs and other dismissals not attributed to the bowler), their economy rate (total runs conceded divided by total overs bowled, considering only runs scored off the bat and ignoring any extra runs like wides and no-balls), their strike rate (aver...
null
['player' 'team' 'match' 'player_match' 'ball_by_ball' 'batsman_scored' 'wicket_taken' 'extra_runs' 'delivery']
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: IPL 2. **Tables**: player, team, match, player_match, ball_by_ball, batsman_scored, wicket_taken, extra_runs, delivery 3. **User Question**: Calculate the total number of wickets taken by each bowler (excluding run-o...
local259
IPL
null
For each player, list their ID, name, their most frequent role across all matches, batting hand, bowling skill, total runs scored, total matches played, total times they were dismissed, batting average (total runs divided by total dismissals), highest score in a single match, the number of matches in which they scored ...
null
['player' 'team' 'match' 'player_match' 'ball_by_ball' 'batsman_scored' 'wicket_taken' 'extra_runs' 'delivery']
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: IPL 2. **Tables**: player, team, match, player_match, ball_by_ball, batsman_scored, wicket_taken, extra_runs, delivery 3. **User Question**: For each player, list their ID, name, their most frequent role across all m...
local262
stacking
null
Which problems exceed the total number of times they appear in the solution table when counting all occurrences, across steps 1, 2, and 3, where any non-"Stack" model's maximum test score is lower than the "Stack" model's test score for the same step and version?
null
['problem' 'eda' 'feature_importance' 'solution' 'model_score' 'model_importance' 'model']
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: stacking 2. **Tables**: problem, eda, feature_importance, solution, model_score, model_importance, model 3. **User Question**: Which problems exceed the total number of times they appear in the solution table when co...
local263
stacking
null
Identify the L1_model associated with each model (specified by name and version) that occurs most frequently for each status ('strong' or 'soft'), along with the number of times it occurs. A model has a 'strong' status if, for any of its steps, the maximum test score among non-'Stack' models is less than the 'Stack' mo...
null
['problem' 'eda' 'feature_importance' 'solution' 'model_score' 'model_importance' 'model']
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: stacking 2. **Tables**: problem, eda, feature_importance, solution, model_score, model_importance, model 3. **User Question**: Identify the L1_model associated with each model (specified by name and version) that occ...
local264
stacking
null
Which model category (L1_model) appears the most frequently across all steps and versions when comparing traditional models to the Stack model, and what is the total count of its occurrences?
null
['problem' 'eda' 'feature_importance' 'solution' 'model_score' 'model_importance' 'model']
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: stacking 2. **Tables**: problem, eda, feature_importance, solution, model_score, model_importance, model 3. **User Question**: Which model category (L1_model) appears the most frequently across all steps and versions...
local269
oracle_sql
null
What is the average total quantity across all final packaging combinations, considering only the leaf-level items within each combination after fully expanding any nested packaging relationships?
null
['customers' 'conway_gen_zero' 'web_devices' 'web_demographics' 'channels_dim' 'gender_dim' 'packaging' 'packaging_relations' 'product_groups' 'products' 'monthly_sales' 'breweries' 'purchases' 'product_alcohol' 'customer_favorites' 'customer_reviews' 'locations' 'inventory' 'orders' 'orderlines' 'monthly_budget' '...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: oracle_sql 2. **Tables**: customers, conway_gen_zero, web_devices, web_demographics, channels_dim, gender_dim, packaging, packaging_relations, product_groups, products, monthly_sales, breweries, purchases, product_al...
local270
oracle_sql
null
Which top-level packaging containers, meaning those not contained within any other packaging, have any item for which the total quantity accumulated across all nested levels in the hierarchy exceeds 500, and what are the names of both these containers and the corresponding items?
null
['customers' 'conway_gen_zero' 'web_devices' 'web_demographics' 'channels_dim' 'gender_dim' 'packaging' 'packaging_relations' 'product_groups' 'products' 'monthly_sales' 'breweries' 'purchases' 'product_alcohol' 'customer_favorites' 'customer_reviews' 'locations' 'inventory' 'orders' 'orderlines' 'monthly_budget' '...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: oracle_sql 2. **Tables**: customers, conway_gen_zero, web_devices, web_demographics, channels_dim, gender_dim, packaging, packaging_relations, product_groups, products, monthly_sales, breweries, purchases, product_al...
local272
oracle_sql
null
For order 423, identify the product IDs, aisles, and positions from which to pick the exact quantities needed for each order line, ensuring that the total picked quantity for each product matches the cumulative quantities ordered without exceeding the available inventory in warehouse 1. Calculate the quantities to be p...
null
['customers' 'conway_gen_zero' 'web_devices' 'web_demographics' 'channels_dim' 'gender_dim' 'packaging' 'packaging_relations' 'product_groups' 'products' 'monthly_sales' 'breweries' 'purchases' 'product_alcohol' 'customer_favorites' 'customer_reviews' 'locations' 'inventory' 'orders' 'orderlines' 'monthly_budget' '...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: oracle_sql 2. **Tables**: customers, conway_gen_zero, web_devices, web_demographics, channels_dim, gender_dim, packaging, packaging_relations, product_groups, products, monthly_sales, breweries, purchases, product_al...
local273
oracle_sql
null
Calculate the average pick percentage for each product name, using a first-in-first-out approach that selects from inventory locations based on the earliest purchase date and smallest available quantity, ensuring that the picked quantity reflects only the overlapping range between each order’s required quantity and the...
null
['customers' 'conway_gen_zero' 'web_devices' 'web_demographics' 'channels_dim' 'gender_dim' 'packaging' 'packaging_relations' 'product_groups' 'products' 'monthly_sales' 'breweries' 'purchases' 'product_alcohol' 'customer_favorites' 'customer_reviews' 'locations' 'inventory' 'orders' 'orderlines' 'monthly_budget' '...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: oracle_sql 2. **Tables**: customers, conway_gen_zero, web_devices, web_demographics, channels_dim, gender_dim, packaging, packaging_relations, product_groups, products, monthly_sales, breweries, purchases, product_al...
local274
oracle_sql
null
Which products were picked for order 421, and what is the average number of units picked for each product, using FIFO (First-In, First-Out) method?
null
['customers' 'conway_gen_zero' 'web_devices' 'web_demographics' 'channels_dim' 'gender_dim' 'packaging' 'packaging_relations' 'product_groups' 'products' 'monthly_sales' 'breweries' 'purchases' 'product_alcohol' 'customer_favorites' 'customer_reviews' 'locations' 'inventory' 'orders' 'orderlines' 'monthly_budget' '...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: oracle_sql 2. **Tables**: customers, conway_gen_zero, web_devices, web_demographics, channels_dim, gender_dim, packaging, packaging_relations, product_groups, products, monthly_sales, breweries, purchases, product_al...
local275
oracle_sql
null
Based on monthly sales data starting in January 2016 and using a centered moving average to adjust for seasonality, which products had a seasonality-adjusted sales ratio that stayed consistently above 2 for every month in the year 2017?
null
['customers' 'conway_gen_zero' 'web_devices' 'web_demographics' 'channels_dim' 'gender_dim' 'packaging' 'packaging_relations' 'product_groups' 'products' 'monthly_sales' 'breweries' 'purchases' 'product_alcohol' 'customer_favorites' 'customer_reviews' 'locations' 'inventory' 'orders' 'orderlines' 'monthly_budget' '...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: oracle_sql 2. **Tables**: customers, conway_gen_zero, web_devices, web_demographics, channels_dim, gender_dim, packaging, packaging_relations, product_groups, products, monthly_sales, breweries, purchases, product_al...
local277
oracle_sql
null
What is the average forecasted annual sales for products 4160 and 7790 during 2018, using monthly sales data starting from January 2016 for the first 36 months, applying seasonality adjustments from time steps 7 through 30, and employing a weighted regression method to estimate sales?
null
['customers' 'conway_gen_zero' 'web_devices' 'web_demographics' 'channels_dim' 'gender_dim' 'packaging' 'packaging_relations' 'product_groups' 'products' 'monthly_sales' 'breweries' 'purchases' 'product_alcohol' 'customer_favorites' 'customer_reviews' 'locations' 'inventory' 'orders' 'orderlines' 'monthly_budget' '...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: oracle_sql 2. **Tables**: customers, conway_gen_zero, web_devices, web_demographics, channels_dim, gender_dim, packaging, packaging_relations, product_groups, products, monthly_sales, breweries, purchases, product_al...
local279
oracle_sql
null
Using a recursive monthly inventory adjustment model starting from December 2018 inventory levels, where we restock a product if its ending inventory drops below the minimum required level, determine for each product the month in 2019 where the absolute difference between its ending inventory and the minimum required l...
null
['customers' 'conway_gen_zero' 'web_devices' 'web_demographics' 'channels_dim' 'gender_dim' 'packaging' 'packaging_relations' 'product_groups' 'products' 'monthly_sales' 'breweries' 'purchases' 'product_alcohol' 'customer_favorites' 'customer_reviews' 'locations' 'inventory' 'orders' 'orderlines' 'monthly_budget' '...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: oracle_sql 2. **Tables**: customers, conway_gen_zero, web_devices, web_demographics, channels_dim, gender_dim, packaging, packaging_relations, product_groups, products, monthly_sales, breweries, purchases, product_al...
local283
EU_soccer
null
Analyze the soccer match dataset to determine the champion team for each season across all countries and leagues, awarding 3 points for every win, 1 point for every tie, and 0 points for every loss. For each season, return the champion’s team name, the league, the country, and the total points accumulated.
null
['sqlite_sequence' 'Player_Attributes' 'Player' 'Match' 'League' 'Country' 'Team' 'Team_Attributes']
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: EU_soccer 2. **Tables**: sqlite_sequence, Player_Attributes, Player, Match, League, Country, Team, Team_Attributes 3. **User Question**: Analyze the soccer match dataset to determine the champion team for each season...
local284
bank_sales_trading
null
For veg whsle data, can you generate a summary of our items' loss rates? Include the average loss rate, and also break down the count of items that are below, above, and within one standard deviation from this average.
null
['weekly_sales' 'shopping_cart_users' 'bitcoin_members' 'interest_metrics' 'customer_regions' 'customer_transactions' 'bitcoin_transactions' 'customer_nodes' 'cleaned_weekly_sales' 'veg_txn_df' 'shopping_cart_events' 'shopping_cart_page_hierarchy' 'bitcoin_prices' 'interest_map' 'veg_loss_rate_df' 'shopping_cart_ca...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: bank_sales_trading 2. **Tables**: weekly_sales, shopping_cart_users, bitcoin_members, interest_metrics, customer_regions, customer_transactions, bitcoin_transactions, customer_nodes, cleaned_weekly_sales, veg_txn_df,...
local285
bank_sales_trading
null
For veg whsle data, can you analyze our financial performance over the years 2020 to 2023? I need insights into the average wholesale price, maximum wholesale price, minimum wholesale price, wholesale price difference, total wholesale price, total selling price, average loss rate, total loss, and profit for each catego...
null
['weekly_sales' 'shopping_cart_users' 'bitcoin_members' 'interest_metrics' 'customer_regions' 'customer_transactions' 'bitcoin_transactions' 'customer_nodes' 'cleaned_weekly_sales' 'veg_txn_df' 'shopping_cart_events' 'shopping_cart_page_hierarchy' 'bitcoin_prices' 'interest_map' 'veg_loss_rate_df' 'shopping_cart_ca...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: bank_sales_trading 2. **Tables**: weekly_sales, shopping_cart_users, bitcoin_members, interest_metrics, customer_regions, customer_transactions, bitcoin_transactions, customer_nodes, cleaned_weekly_sales, veg_txn_df,...
local286
electronic_sales
null
Prepare a comprehensive performance report on our sellers, focusing on total sales, average item price, average review scores, and packing times. Ensure that the report includes only those sellers who have sold a quantity of more than 100 products and highlight the product category names in English with the highest sal...
null
['customers' 'sellers' 'order_reviews' 'order_items' 'products' 'geolocation' 'product_category_name_translation' 'orders' 'order_payments']
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: electronic_sales 2. **Tables**: customers, sellers, order_reviews, order_items, products, geolocation, product_category_name_translation, orders, order_payments 3. **User Question**: Prepare a comprehensive performan...
local301
bank_sales_trading
SELECT before_effect, after_effect, after_effect - before_effect AS change_amount, ROUND(((after_effect * 1.0 / before_effect) - 1) * 100, 2) AS percent_change, '2018' AS year FROM ( SELECT SUM(CASE WHEN delta_weeks BETWEEN 1 AND 4 THEN sales END) AS after_effect, SUM(CASE WHEN...
For weekly-sales data, I need an analysis of our sales performance around mid-June for the years 2018, 2019, and 2020. Specifically, calculate the percentage change in sales between the four weeks leading up to June 15 and the four weeks following June 15 for each year.
null
['weekly_sales' 'shopping_cart_users' 'bitcoin_members' 'interest_metrics' 'customer_regions' 'customer_transactions' 'bitcoin_transactions' 'customer_nodes' 'cleaned_weekly_sales' 'veg_txn_df' 'shopping_cart_events' 'shopping_cart_page_hierarchy' 'bitcoin_prices' 'interest_map' 'veg_loss_rate_df' 'shopping_cart_ca...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: bank_sales_trading 2. **Tables**: weekly_sales, shopping_cart_users, bitcoin_members, interest_metrics, customer_regions, customer_transactions, bitcoin_transactions, customer_nodes, cleaned_weekly_sales, veg_txn_df,...
local302
bank_sales_trading
null
Analyze the average percentage change in sales between the 12 weeks before and after June 15, 2020, for each attribute type: region, platform, age band, demographic, and customer type. For each attribute type, calculate the average percentage change in sales across all its attribute values. Identify the attribute type ...
null
['weekly_sales' 'shopping_cart_users' 'bitcoin_members' 'interest_metrics' 'customer_regions' 'customer_transactions' 'bitcoin_transactions' 'customer_nodes' 'cleaned_weekly_sales' 'veg_txn_df' 'shopping_cart_events' 'shopping_cart_page_hierarchy' 'bitcoin_prices' 'interest_map' 'veg_loss_rate_df' 'shopping_cart_ca...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: bank_sales_trading 2. **Tables**: weekly_sales, shopping_cart_users, bitcoin_members, interest_metrics, customer_regions, customer_transactions, bitcoin_transactions, customer_nodes, cleaned_weekly_sales, veg_txn_df,...
local329
log
null
How many unique sessions visited the /regist/input page and then the /regist/confirm page, in that order?
null
['mst_users' 'action_log' 'activity_log' 'read_log' 'form_log' 'form_error_log' 'action_log_with_ip' 'access_log' 'action_log_with_noise' 'invalid_action_log' 'mst_categories' 'dup_action_log' 'mst_products_20161201' 'mst_products_20170101' 'app1_mst_users' 'app2_mst_users' 'mst_users_with_card_number' 'purchase_l...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: log 2. **Tables**: mst_users, action_log, activity_log, read_log, form_log, form_error_log, action_log_with_ip, access_log, action_log_with_noise, invalid_action_log, mst_categories, dup_action_log, mst_products_2016...
local330
log
null
Using the activity log table, compute the total number of unique user sessions where each web page appears as either a landing page (the first page visited in a session based on timestamp) or an exit page (the last page visited in a session based on timestamp), or both. Count each session only once per page even if the...
null
['mst_users' 'action_log' 'activity_log' 'read_log' 'form_log' 'form_error_log' 'action_log_with_ip' 'access_log' 'action_log_with_noise' 'invalid_action_log' 'mst_categories' 'dup_action_log' 'mst_products_20161201' 'mst_products_20170101' 'app1_mst_users' 'app2_mst_users' 'mst_users_with_card_number' 'purchase_l...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: log 2. **Tables**: mst_users, action_log, activity_log, read_log, form_log, form_error_log, action_log_with_ip, access_log, action_log_with_noise, invalid_action_log, mst_categories, dup_action_log, mst_products_2016...
local331
log
null
Which three distinct third-page visits are most frequently observed immediately after two consecutive visits to the '/detail' page, and how many times does each third-page visit occur?
null
['mst_users' 'action_log' 'activity_log' 'read_log' 'form_log' 'form_error_log' 'action_log_with_ip' 'access_log' 'action_log_with_noise' 'invalid_action_log' 'mst_categories' 'dup_action_log' 'mst_products_20161201' 'mst_products_20170101' 'app1_mst_users' 'app2_mst_users' 'mst_users_with_card_number' 'purchase_l...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: log 2. **Tables**: mst_users, action_log, activity_log, read_log, form_log, form_error_log, action_log_with_ip, access_log, action_log_with_noise, invalid_action_log, mst_categories, dup_action_log, mst_products_2016...
local358
log
null
How many users are there in each age category (20s, 30s, 40s, 50s, and others)?
null
['mst_users' 'action_log' 'activity_log' 'read_log' 'form_log' 'form_error_log' 'action_log_with_ip' 'access_log' 'action_log_with_noise' 'invalid_action_log' 'mst_categories' 'dup_action_log' 'mst_products_20161201' 'mst_products_20170101' 'app1_mst_users' 'app2_mst_users' 'mst_users_with_card_number' 'purchase_l...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: log 2. **Tables**: mst_users, action_log, activity_log, read_log, form_log, form_error_log, action_log_with_ip, access_log, action_log_with_noise, invalid_action_log, mst_categories, dup_action_log, mst_products_2016...
local360
log
null
For each user session in the activity log table, identify the number of events that occurred before the first '/detail' click or '/complete' conversion, counting only events that have a non-empty search type. Find the sessions with the minimum count of such pre-click/pre-conversion events. If multiple sessions share th...
null
['mst_users' 'action_log' 'activity_log' 'read_log' 'form_log' 'form_error_log' 'action_log_with_ip' 'access_log' 'action_log_with_noise' 'invalid_action_log' 'mst_categories' 'dup_action_log' 'mst_products_20161201' 'mst_products_20170101' 'app1_mst_users' 'app2_mst_users' 'mst_users_with_card_number' 'purchase_l...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: log 2. **Tables**: mst_users, action_log, activity_log, read_log, form_log, form_error_log, action_log_with_ip, access_log, action_log_with_noise, invalid_action_log, mst_categories, dup_action_log, mst_products_2016...
local344
f1
null
Considering all races where pit stop data is available, and focusing on instances when a driver was not behind another car on the previous lap but is behind on the current lap (accounting for retirements, pit-stop entries, pit-stop exits, and race starts), how many times has each type of overtake occurred in Formula 1?
null
['circuits' 'constructor_results' 'constructor_standings' 'constructors' 'driver_standings' 'drivers' 'lap_times' 'pit_stops' 'qualifying' 'races' 'results' 'seasons' 'status' 'sprint_results' 'short_grand_prix_names' 'short_constructor_names' 'liveries' 'tdr_overrides' 'circuits_ext' 'constructors_ext' 'drivers_ex...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: f1 2. **Tables**: circuits, constructor_results, constructor_standings, constructors, driver_standings, drivers, lap_times, pit_stops, qualifying, races, results, seasons, status, sprint_results, short_grand_prix_nam...
local336
f1
null
In the first five laps of the race, how many overtakes occurred in each category—retirements, pit stops, start-related overtakes, and standard on-track passes?
null
['circuits' 'constructor_results' 'constructor_standings' 'constructors' 'driver_standings' 'drivers' 'lap_times' 'pit_stops' 'qualifying' 'races' 'results' 'seasons' 'status' 'sprint_results' 'short_grand_prix_names' 'short_constructor_names' 'liveries' 'tdr_overrides' 'circuits_ext' 'constructors_ext' 'drivers_ex...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: f1 2. **Tables**: circuits, constructor_results, constructor_standings, constructors, driver_standings, drivers, lap_times, pit_stops, qualifying, races, results, seasons, status, sprint_results, short_grand_prix_nam...
local335
f1
null
In Formula 1 seasons since 2001, considering only drivers who scored points in a season, which five constructors have had the most seasons where their drivers scored the fewest total points among all point-scoring drivers in that season?
null
['circuits' 'constructor_results' 'constructor_standings' 'constructors' 'driver_standings' 'drivers' 'lap_times' 'pit_stops' 'qualifying' 'races' 'results' 'seasons' 'status' 'sprint_results' 'short_grand_prix_names' 'short_constructor_names' 'liveries' 'tdr_overrides' 'circuits_ext' 'constructors_ext' 'drivers_ex...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: f1 2. **Tables**: circuits, constructor_results, constructor_standings, constructors, driver_standings, drivers, lap_times, pit_stops, qualifying, races, results, seasons, status, sprint_results, short_grand_prix_nam...
local309
f1
with year_points as ( select races.year, drivers.forename || ' ' || drivers.surname as driver, constructors.name as constructor, sum(results.points) as points from results left join races on results.race_id = races.race_id -- Ensure these columns exist in your schema le...
For each year, which driver and which constructor scored the most points? I want the full name of each driver.
null
['circuits' 'constructor_results' 'constructor_standings' 'constructors' 'driver_standings' 'drivers' 'lap_times' 'pit_stops' 'qualifying' 'races' 'results' 'seasons' 'status' 'sprint_results' 'short_grand_prix_names' 'short_constructor_names' 'liveries' 'tdr_overrides' 'circuits_ext' 'constructors_ext' 'drivers_ex...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: f1 2. **Tables**: circuits, constructor_results, constructor_standings, constructors, driver_standings, drivers, lap_times, pit_stops, qualifying, races, results, seasons, status, sprint_results, short_grand_prix_nam...
local310
f1
null
Using only the data from the ‘results’ table, find the three years in which the sum of the highest total points earned by any driver and the highest total points earned by any constructor in that year (both calculated by summing up points from the ‘results’ table) is smallest, and list those three years in order of asc...
null
['circuits' 'constructor_results' 'constructor_standings' 'constructors' 'driver_standings' 'drivers' 'lap_times' 'pit_stops' 'qualifying' 'races' 'results' 'seasons' 'status' 'sprint_results' 'short_grand_prix_names' 'short_constructor_names' 'liveries' 'tdr_overrides' 'circuits_ext' 'constructors_ext' 'drivers_ex...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: f1 2. **Tables**: circuits, constructor_results, constructor_standings, constructors, driver_standings, drivers, lap_times, pit_stops, qualifying, races, results, seasons, status, sprint_results, short_grand_prix_nam...
local311
f1
null
Which constructors had the top 3 combined points from their best driver and team, and in which years did they achieve them?
null
['circuits' 'constructor_results' 'constructor_standings' 'constructors' 'driver_standings' 'drivers' 'lap_times' 'pit_stops' 'qualifying' 'races' 'results' 'seasons' 'status' 'sprint_results' 'short_grand_prix_names' 'short_constructor_names' 'liveries' 'tdr_overrides' 'circuits_ext' 'constructors_ext' 'drivers_ex...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: f1 2. **Tables**: circuits, constructor_results, constructor_standings, constructors, driver_standings, drivers, lap_times, pit_stops, qualifying, races, results, seasons, status, sprint_results, short_grand_prix_nam...
local354
f1
null
Among Formula 1 drivers who raced during the 1950s, which drivers completed a season in that decade with the same constructor in both the first and the last race they participated in, while also taking part in at least two distinct race rounds during that season?
null
['circuits' 'constructor_results' 'constructor_standings' 'constructors' 'driver_standings' 'drivers' 'lap_times' 'pit_stops' 'qualifying' 'races' 'results' 'seasons' 'status' 'sprint_results' 'short_grand_prix_names' 'short_constructor_names' 'liveries' 'tdr_overrides' 'circuits_ext' 'constructors_ext' 'drivers_ex...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: f1 2. **Tables**: circuits, constructor_results, constructor_standings, constructors, driver_standings, drivers, lap_times, pit_stops, qualifying, races, results, seasons, status, sprint_results, short_grand_prix_nam...
local355
f1
null
Calculate the overall average first round and average last round of races missed by Formula 1 drivers across all years. Include only drivers who missed fewer than three races in a given year and who switched teams between their appearances immediately before and after their hiatus (i.e., the constructor ID for the race...
null
['circuits' 'constructor_results' 'constructor_standings' 'constructors' 'driver_standings' 'drivers' 'lap_times' 'pit_stops' 'qualifying' 'races' 'results' 'seasons' 'status' 'sprint_results' 'short_grand_prix_names' 'short_constructor_names' 'liveries' 'tdr_overrides' 'circuits_ext' 'constructors_ext' 'drivers_ex...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: f1 2. **Tables**: circuits, constructor_results, constructor_standings, constructors, driver_standings, drivers, lap_times, pit_stops, qualifying, races, results, seasons, status, sprint_results, short_grand_prix_nam...
local356
f1
null
Provide the full names of drivers who have been overtaken on track more times than they have overtaken others on track during race laps, excluding position changes due to pit stops (both at pit entry and exit), retirements, or position changes that occurred during the first lap of a race (considered as start movements)...
null
['circuits' 'constructor_results' 'constructor_standings' 'constructors' 'driver_standings' 'drivers' 'lap_times' 'pit_stops' 'qualifying' 'races' 'results' 'seasons' 'status' 'sprint_results' 'short_grand_prix_names' 'short_constructor_names' 'liveries' 'tdr_overrides' 'circuits_ext' 'constructors_ext' 'drivers_ex...
Solve the given problem according to instructions given above: ## Your SYSTEM Inputs 1. **Database**: f1 2. **Tables**: circuits, constructor_results, constructor_standings, constructors, driver_standings, drivers, lap_times, pit_stops, qualifying, races, results, seasons, status, sprint_results, short_grand_prix_nam...