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 |
|---|---|---|---|---|---|---|
local002 | E_commerce | null | Can you calculate the 5-day symmetric moving average of predicted toy sales for December 5 to 8, 2018, using daily sales data from January 1, 2017, to August 29, 2018, with a simple linear regression model? Finally provide the sum of those four 5-day moving averages? | null | ['product_category_name_translation' 'sellers' 'customers' 'geolocation'
'order_items' 'order_payments' 'order_reviews' 'orders' 'products'
'leads_qualified' 'leads_closed'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: E_commerce
2. **Tables**: product_category_name_translation, sellers, customers, geolocation, order_items, order_payments, order_reviews, orders, products, leads_qualified, leads_closed
3. **User Question**: Can you ... |
local003 | E_commerce | WITH RecencyScore AS (
SELECT customer_unique_id,
MAX(order_purchase_timestamp) AS last_purchase,
NTILE(5) OVER (ORDER BY MAX(order_purchase_timestamp) DESC) AS recency
FROM orders
JOIN customers USING (customer_id)
WHERE order_status = 'delivered'
GROUP BY customer_unique_... | According to the RFM definition document, calculate the average sales per order for each customer within distinct RFM segments, considering only 'delivered' orders. Use the customer unique identifier. Clearly define how to calculate Recency based on the latest purchase timestamp and specify the criteria for classifying... | null | ['product_category_name_translation' 'sellers' 'customers' 'geolocation'
'order_items' 'order_payments' 'order_reviews' 'orders' 'products'
'leads_qualified' 'leads_closed'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: E_commerce
2. **Tables**: product_category_name_translation, sellers, customers, geolocation, order_items, order_payments, order_reviews, orders, products, leads_qualified, leads_closed
3. **User Question**: Accordin... |
local004 | E_commerce | WITH CustomerData AS (
SELECT
customer_unique_id,
COUNT(DISTINCT orders.order_id) AS order_count,
SUM(payment_value) AS total_payment,
JULIANDAY(MIN(order_purchase_timestamp)) AS first_order_day,
JULIANDAY(MAX(order_purchase_timestamp)) AS last_order_day
FROM customers
... | Could you tell me the number of orders, average payment per order and customer lifespan in weeks of the 3 custumers with the highest average payment per order, where the lifespan is calculated by subtracting the earliest purchase date from the latest purchase date in days, dividing by seven, and if the result is less t... | null | ['product_category_name_translation' 'sellers' 'customers' 'geolocation'
'order_items' 'order_payments' 'order_reviews' 'orders' 'products'
'leads_qualified' 'leads_closed'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: E_commerce
2. **Tables**: product_category_name_translation, sellers, customers, geolocation, order_items, order_payments, order_reviews, orders, products, leads_qualified, leads_closed
3. **User Question**: Could yo... |
local007 | Baseball | null | Could you help me calculate the average single career span value in years for all baseball players? Please precise the result as a float number. First, calculate the difference in years, months, and days between the debut and final game dates. For each player, the career span is computed as the sum of the absolute numb... | null | ['all_star' 'appearances' 'manager_award' 'player_award'
'manager_award_vote' 'player_award_vote' 'batting' 'batting_postseason'
'player_college' 'fielding' 'fielding_outfield' 'fielding_postseason'
'hall_of_fame' 'home_game' 'manager' 'manager_half' 'player' 'park'
'pitching' 'pitching_postseason' 'salary' 'colleg... |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Baseball
2. **Tables**: all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_o... |
local008 | Baseball | WITH player_stats AS (
SELECT
b.player_id,
p.name_given AS player_name,
SUM(b.g) AS games_played,
SUM(b.r) AS runs,
SUM(b.h) AS hits,
SUM(b.hr) AS home_runs
FROM player p
JOIN batting b ON p.player_id = b.player_id
GROUP BY b.player_id, p.name_given
)
SEL... | I would like to know the given names of baseball players who have achieved the highest value of games played, runs, hits, and home runs, with their corresponding score values. | null | ['all_star' 'appearances' 'manager_award' 'player_award'
'manager_award_vote' 'player_award_vote' 'batting' 'batting_postseason'
'player_college' 'fielding' 'fielding_outfield' 'fielding_postseason'
'hall_of_fame' 'home_game' 'manager' 'manager_half' 'player' 'park'
'pitching' 'pitching_postseason' 'salary' 'colleg... |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Baseball
2. **Tables**: all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_o... |
local009 | Airlines | null | What is the distance of the longest route where Abakan is either the departure or destination city (in kilometers)? | null | ['aircrafts_data' 'airports_data' 'boarding_passes' 'bookings' 'flights'
'seats' 'ticket_flights' 'tickets' 'city_map'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Airlines
2. **Tables**: aircrafts_data, airports_data, boarding_passes, bookings, flights, seats, ticket_flights, tickets, city_map
3. **User Question**: What is the distance of the longest route where Abakan is eith... |
local010 | Airlines | null | Distribute all the unique city pairs into the distance ranges 0, 1000, 2000, 3000, 4000, 5000, and 6000+, based on their average distance of all routes between them. Then how many pairs are there in the distance range with the fewest unique city paires? | null | ['aircrafts_data' 'airports_data' 'boarding_passes' 'bookings' 'flights'
'seats' 'ticket_flights' 'tickets' 'city_map'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Airlines
2. **Tables**: aircrafts_data, airports_data, boarding_passes, bookings, flights, seats, ticket_flights, tickets, city_map
3. **User Question**: Distribute all the unique city pairs into the distance ranges ... |
local015 | California_Traffic_Collision | null | Please calculate the fatality rate for motorcycle collisions, separated by helmet usage. Specifically, calculate two percentages: 1) the percentage of motorcyclist fatalities in collisions where parties (drivers or passengers) were wearing helmets, and 2) the percentage of motorcyclist fatalities in collisions where pa... | null | ['victims' 'collisions' 'case_ids' 'parties'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: California_Traffic_Collision
2. **Tables**: victims, collisions, case_ids, parties
3. **User Question**: Please calculate the fatality rate for motorcycle collisions, separated by helmet usage. Specifically, calculat... |
local017 | California_Traffic_Collision | WITH AnnualTotals AS (
SELECT
STRFTIME('%Y', collision_date) AS Year,
COUNT(case_id) AS AnnualTotal
FROM
collisions
GROUP BY
Year
),
CategoryTotals AS (
SELECT
STRFTIME('%Y', collision_date) AS Year,
pcf_violation_category AS Category,
COUNT(c... | In which year were the two most common causes of traffic accidents different from those in other years? | null | ['victims' 'collisions' 'case_ids' 'parties'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: California_Traffic_Collision
2. **Tables**: victims, collisions, case_ids, parties
3. **User Question**: In which year were the two most common causes of traffic accidents different from those in other years?
## OUT... |
local018 | California_Traffic_Collision | null | For the primary collision factor violation category that was the most common cause of traffic accidents in 2021, how many percentage points did its share of annual road incidents in 2021 decrease compared to its share in 2011? | null | ['victims' 'collisions' 'case_ids' 'parties'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: California_Traffic_Collision
2. **Tables**: victims, collisions, case_ids, parties
3. **User Question**: For the primary collision factor violation category that was the most common cause of traffic accidents in 2021... |
local019 | WWE | WITH MatchDetails AS (
SELECT
b.name AS titles,
m.duration AS match_duration,
w1.name || ' vs ' || w2.name AS matches,
m.win_type AS win_type,
l.name AS location,
e.name AS event,
ROW_NUMBER() OVER (PARTITION BY b.name ORDER BY m.duration ASC) AS rank
FROM... | For the NXT title that had the shortest match (excluding titles with "title change"), what were the names of the two wrestlers involved? | null | ['Promotions' 'sqlite_sequence' 'Tables' 'Cards' 'Locations' 'Events'
'Matches' 'Belts' 'Wrestlers' 'Match_Types'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: WWE
2. **Tables**: Promotions, sqlite_sequence, Tables, Cards, Locations, Events, Matches, Belts, Wrestlers, Match_Types
3. **User Question**: For the NXT title that had the shortest match (excluding titles with "tit... |
local026 | IPL | null | Please help me identify the top 3 bowlers who, in the overs where the maximum runs were conceded in each match, gave up the highest number of runs in a single over across all matches. For each of these bowlers, provide the match in which they conceded these maximum runs. Only consider overs that had the most runs conce... | 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**: Please help me identify the top 3 bowlers who, in the overs where the maxim... |
local020 | IPL | null | Which bowler has the lowest bowling average per wicket taken? | 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**: Which bowler has the lowest bowling average per wicket taken?
## OUTPUT FO... |
local021 | IPL | null | Could you calculate the average of the total runs scored by all strikers who have scored more than 50 runs in any single match? | 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**: Could you calculate the average of the total runs scored by all strikers wh... |
local022 | IPL | -- Step 1: Calculate players' total runs in each match
WITH player_runs AS (
SELECT
bbb.striker AS player_id,
bbb.match_id,
SUM(bsc.runs_scored) AS total_runs
FROM
ball_by_ball AS bbb
JOIN
batsman_scored AS bsc
ON
bbb.match_id = bsc.match_id
... | Retrieve the names of players who scored no less than 100 runs in a match while playing for the team that lost that match. | 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**: Retrieve the names of players who scored no less than 100 runs in a match w... |
local023 | IPL | WITH runs_scored AS (
SELECT
bb.striker AS player_id,
bb.match_id,
bs.runs_scored AS runs
FROM
ball_by_ball AS bb
JOIN
batsman_scored AS bs ON bb.match_id = bs.match_id
AND bb.over_id = bs.over_id
AND bb.ball_id = bs.ball_id
A... | Please help me find the names of top 5 players with the highest average runs per match in season 5, along with their batting averages. | 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**: Please help me find the names of top 5 players with the highest average run... |
local024 | IPL | null | Can you help me find the top 5 countries whose players have the highest average of their individual average runs per match across all seasons? Specifically, for each player, calculate their average runs per match over all matches they played, then compute the average of these player averages for each country, and inclu... | 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**: Can you help me find the top 5 countries whose players have the highest ave... |
local025 | IPL | null | For each match, considering every innings, please combine runs from both batsman scored and extra runs for each over, then identify the single over with the highest total runs, retrieve the bowler for that over from the ball by ball table, and calculate the average of these highest over totals across all matches, ensur... | 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 match, considering every innings, please combine runs from both ba... |
local028 | Brazilian_E_Commerce | null | Could you generate a report that shows the number of delivered orders for each month in the years 2016, 2017, and 2018? Each column represents a year, and each row represents a month | null | ['olist_customers' 'olist_sellers' 'olist_order_reviews'
'olist_order_items' 'olist_products' 'olist_geolocation'
'product_category_name_translation' 'olist_orders' 'olist_order_payments'
'olist_products_dataset'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Brazilian_E_Commerce
2. **Tables**: olist_customers, olist_sellers, olist_order_reviews, olist_order_items, olist_products, olist_geolocation, product_category_name_translation, olist_orders, olist_order_payments, ol... |
local031 | Brazilian_E_Commerce | null | What is the highest monthly delivered orders volume in the year with the lowest annual delivered orders volume among 2016, 2017, and 2018? | null | ['olist_customers' 'olist_sellers' 'olist_order_reviews'
'olist_order_items' 'olist_products' 'olist_geolocation'
'product_category_name_translation' 'olist_orders' 'olist_order_payments'
'olist_products_dataset'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Brazilian_E_Commerce
2. **Tables**: olist_customers, olist_sellers, olist_order_reviews, olist_order_items, olist_products, olist_geolocation, product_category_name_translation, olist_orders, olist_order_payments, ol... |
local029 | Brazilian_E_Commerce | WITH customer_orders AS (
SELECT
c.customer_unique_id,
COUNT(o.order_id) AS Total_Orders_By_Customers,
AVG(p.payment_value) AS Average_Payment_By_Customer,
c.customer_city,
c.customer_state
FROM olist_customers c
JOIN olist_orders o ON c.customer_id = o.customer_id
... | Please identify the top three customers, based on their customer_unique_id, who have the highest number of delivered orders, and provide the average payment value, city, and state for each of these customers. | null | ['olist_customers' 'olist_sellers' 'olist_order_reviews'
'olist_order_items' 'olist_products' 'olist_geolocation'
'product_category_name_translation' 'olist_orders' 'olist_order_payments'
'olist_products_dataset'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Brazilian_E_Commerce
2. **Tables**: olist_customers, olist_sellers, olist_order_reviews, olist_order_items, olist_products, olist_geolocation, product_category_name_translation, olist_orders, olist_order_payments, ol... |
local030 | Brazilian_E_Commerce | null | Among all cities with delivered orders, find the five cities whose summed payments are the lowest, then calculate the average of their total payments and the average of their total delivered order counts. | null | ['olist_customers' 'olist_sellers' 'olist_order_reviews'
'olist_order_items' 'olist_products' 'olist_geolocation'
'product_category_name_translation' 'olist_orders' 'olist_order_payments'
'olist_products_dataset'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Brazilian_E_Commerce
2. **Tables**: olist_customers, olist_sellers, olist_order_reviews, olist_order_items, olist_products, olist_geolocation, product_category_name_translation, olist_orders, olist_order_payments, ol... |
local032 | Brazilian_E_Commerce | null | Could you help me find the sellers who excel in the following categories, considering only delivered orders: the seller with the highest number of distinct customer unique IDs, the seller with the highest profit (calculated as price minus freight value), the seller with the highest number of distinct orders, and the se... | null | ['olist_customers' 'olist_sellers' 'olist_order_reviews'
'olist_order_items' 'olist_products' 'olist_geolocation'
'product_category_name_translation' 'olist_orders' 'olist_order_payments'
'olist_products_dataset'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Brazilian_E_Commerce
2. **Tables**: olist_customers, olist_sellers, olist_order_reviews, olist_order_items, olist_products, olist_geolocation, product_category_name_translation, olist_orders, olist_order_payments, ol... |
local034 | Brazilian_E_Commerce | null | Could you help me calculate the average of the total number of payments made using the most preferred payment method for each product category, where the most preferred payment method in a category is the one with the highest number of payments? | null | ['olist_customers' 'olist_sellers' 'olist_order_reviews'
'olist_order_items' 'olist_products' 'olist_geolocation'
'product_category_name_translation' 'olist_orders' 'olist_order_payments'
'olist_products_dataset'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Brazilian_E_Commerce
2. **Tables**: olist_customers, olist_sellers, olist_order_reviews, olist_order_items, olist_products, olist_geolocation, product_category_name_translation, olist_orders, olist_order_payments, ol... |
local037 | Brazilian_E_Commerce | null | Identify the top three product categories whose most commonly used payment type has the highest number of payments across all categories, and specify the number of payments made in each category using that payment type. | null | ['olist_customers' 'olist_sellers' 'olist_order_reviews'
'olist_order_items' 'olist_products' 'olist_geolocation'
'product_category_name_translation' 'olist_orders' 'olist_order_payments'
'olist_products_dataset'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Brazilian_E_Commerce
2. **Tables**: olist_customers, olist_sellers, olist_order_reviews, olist_order_items, olist_products, olist_geolocation, product_category_name_translation, olist_orders, olist_order_payments, ol... |
local035 | Brazilian_E_Commerce | null | In the “olist_geolocation” table, please identify which two consecutive cities, when sorted by geolocation_state, geolocation_city, geolocation_zip_code_prefix, geolocation_lat, and geolocation_lng, have the greatest distance between them based on the difference in distance computed between each city and its immediate ... | null | ['olist_customers' 'olist_sellers' 'olist_order_reviews'
'olist_order_items' 'olist_products' 'olist_geolocation'
'product_category_name_translation' 'olist_orders' 'olist_order_payments'
'olist_products_dataset'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Brazilian_E_Commerce
2. **Tables**: olist_customers, olist_sellers, olist_order_reviews, olist_order_items, olist_products, olist_geolocation, product_category_name_translation, olist_orders, olist_order_payments, ol... |
local038 | Pagila | SELECT
actor.first_name || ' ' || actor.last_name AS full_name
FROM
actor
INNER JOIN film_actor ON actor.actor_id = film_actor.actor_id
INNER JOIN film ON film_actor.film_id = film.film_id
INNER JOIN film_category ON film.film_id = film_category.film_id
INNER JOIN category ON film_category.category_id = categor... | Could you help me determine which actor starred most frequently in English-language children's category films that were rated either G or PG, had a running time of 120 minutes or less, and were released between 2000 and 2010? Please provide the actor's full name. | null | ['actor' 'country' 'city' 'address' 'language' 'category' 'customer'
'film' 'film_actor' 'film_category' 'film_text' 'inventory' 'staff'
'store' 'payment' 'rental'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Pagila
2. **Tables**: actor, country, city, address, language, category, customer, film, film_actor, film_category, film_text, inventory, staff, store, payment, rental
3. **User Question**: Could you help me determin... |
local039 | Pagila | SELECT
category.name
FROM
category
INNER JOIN film_category USING (category_id)
INNER JOIN film USING (film_id)
INNER JOIN inventory USING (film_id)
INNER JOIN rental USING (inventory_id)
INNER JOIN customer USING (customer_id)
INNER JOIN address USING (address_id)
INNER JOIN city USING (city_id)
WHERE
LOWE... | Please help me find the film category with the highest total rental hours in cities where the city's name either starts with "A" or contains a hyphen. | null | ['actor' 'country' 'city' 'address' 'language' 'category' 'customer'
'film' 'film_actor' 'film_category' 'film_text' 'inventory' 'staff'
'store' 'payment' 'rental'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Pagila
2. **Tables**: actor, country, city, address, language, category, customer, film, film_actor, film_category, film_text, inventory, staff, store, payment, rental
3. **User Question**: Please help me find the fi... |
local040 | modern_data | null | In the combined dataset that unifies the trees data with the income data by ZIP code, filling missing ZIP values where necessary, which three boroughs, restricted to records with median and mean income both greater than zero and a valid borough name, contain the highest number of trees, and what is the average mean inc... | null | ['pizza_names' 'companies_funding' 'pizza_customer_orders'
'pizza_toppings' 'trees' 'pizza_recipes' 'statistics' 'income_trees'
'pizza_clean_runner_orders' 'pizza_runner_orders' 'word_list'
'companies_dates' 'pizza_get_extras' 'pizza_get_exclusions'
'pizza_clean_customer_orders' 'companies_industries' 'pizza_runner... |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: modern_data
2. **Tables**: pizza_names, companies_funding, pizza_customer_orders, pizza_toppings, trees, pizza_recipes, statistics, income_trees, pizza_clean_runner_orders, pizza_runner_orders, word_list, companies_d... |
local041 | modern_data | null | What percentage of trees in the Bronx have a health status of Good? | null | ['pizza_names' 'companies_funding' 'pizza_customer_orders'
'pizza_toppings' 'trees' 'pizza_recipes' 'statistics' 'income_trees'
'pizza_clean_runner_orders' 'pizza_runner_orders' 'word_list'
'companies_dates' 'pizza_get_extras' 'pizza_get_exclusions'
'pizza_clean_customer_orders' 'companies_industries' 'pizza_runner... |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: modern_data
2. **Tables**: pizza_names, companies_funding, pizza_customer_orders, pizza_toppings, trees, pizza_recipes, statistics, income_trees, pizza_clean_runner_orders, pizza_runner_orders, word_list, companies_d... |
local049 | modern_data | null | Can you help me calculate the average number of new unicorn companies per year in the top industry from 2019 to 2021? | null | ['pizza_names' 'companies_funding' 'pizza_customer_orders'
'pizza_toppings' 'trees' 'pizza_recipes' 'statistics' 'income_trees'
'pizza_clean_runner_orders' 'pizza_runner_orders' 'word_list'
'companies_dates' 'pizza_get_extras' 'pizza_get_exclusions'
'pizza_clean_customer_orders' 'companies_industries' 'pizza_runner... |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: modern_data
2. **Tables**: pizza_names, companies_funding, pizza_customer_orders, pizza_toppings, trees, pizza_recipes, statistics, income_trees, pizza_clean_runner_orders, pizza_runner_orders, word_list, companies_d... |
local054 | chinook | null | Could you tell me the first names of customers who spent less than $1 on albums by the best-selling artist, along with the amounts they spent? | null | ['albums' 'sqlite_sequence' 'artists' 'customers' 'employees' 'genres'
'invoices' 'invoice_items' 'media_types' 'playlists' 'playlist_track'
'tracks' 'sqlite_stat1'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: chinook
2. **Tables**: albums, sqlite_sequence, artists, customers, employees, genres, invoices, invoice_items, media_types, playlists, playlist_track, tracks, sqlite_stat1
3. **User Question**: Could you tell me the... |
local055 | chinook | null | Identify the artist with the highest overall sales of albums (tie broken by alphabetical order) and the artist with the lowest overall sales of albums (tie broken by alphabetical order), then calculate the amount each customer spent specifically on those two artists’ albums. Next, compute the average spending for the c... | null | ['albums' 'sqlite_sequence' 'artists' 'customers' 'employees' 'genres'
'invoices' 'invoice_items' 'media_types' 'playlists' 'playlist_track'
'tracks' 'sqlite_stat1'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: chinook
2. **Tables**: albums, sqlite_sequence, artists, customers, employees, genres, invoices, invoice_items, media_types, playlists, playlist_track, tracks, sqlite_stat1
3. **User Question**: Identify the artist w... |
local198 | chinook | null | Using the sales data, what is the median value of total sales made in countries where the number of customers is greater than 4? | null | ['albums' 'sqlite_sequence' 'artists' 'customers' 'employees' 'genres'
'invoices' 'invoice_items' 'media_types' 'playlists' 'playlist_track'
'tracks' 'sqlite_stat1'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: chinook
2. **Tables**: albums, sqlite_sequence, artists, customers, employees, genres, invoices, invoice_items, media_types, playlists, playlist_track, tracks, sqlite_stat1
3. **User Question**: Using the sales data,... |
local056 | sqlite-sakila | null | Which customer has the highest average monthly change in payment amounts? Provide the customer's full name. | null | ['actor' 'country' 'city' 'address' 'language' 'category' 'customer'
'film' 'film_actor' 'film_category' 'film_text' 'inventory' 'staff'
'store' 'payment' 'rental' 'monthly_payment_totals' 'MonthlyTotals'
'total_revenue_by_film'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: sqlite-sakila
2. **Tables**: actor, country, city, address, language, category, customer, film, film_actor, film_category, film_text, inventory, staff, store, payment, rental, monthly_payment_totals, MonthlyTotals, t... |
local058 | education_business | WITH UniqueProducts2020 AS (
SELECT
dp.segment,
COUNT(DISTINCT fsm.product_code) AS unique_products_2020
FROM
hardware_fact_sales_monthly fsm
JOIN
hardware_dim_product dp ON fsm.product_code = dp.product_code
WHERE
fsm.fiscal_year = 2020
GROUP BY
dp.se... | Can you provide a list of hardware product segments along with their unique product counts for 2020 in the output, ordered by the highest percentage increase in unique fact sales products from 2020 to 2021? | 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... |
local059 | education_business | null | For the calendar year 2021, what is the overall average quantity sold of the top three best-selling hardware products (by total quantity sold) in each division? | 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... |
local060 | complex_oracle | null | In the United States, for Q4 2019 and Q4 2020, first select only those cities where total sales (with no promotions) rose by at least 20% from Q4 2019 to Q4 2020. Among these cities, rank products by their overall sales (still excluding promotions) in those quarters and take the top 20%. Then compute each top product’s... | null | ['countries' 'customers' 'promotions' 'products' 'times' 'channels'
'sales' 'costs' 'supplementary_demographics' 'currency'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: complex_oracle
2. **Tables**: countries, customers, promotions, products, times, channels, sales, costs, supplementary_demographics, currency
3. **User Question**: In the United States, for Q4 2019 and Q4 2020, first... |
local063 | complex_oracle | null | Among all products sold in the United States with promo_id=999, considering only those cities whose sales increased by at least 20% from Q4 2019 (calendar_quarter_id=1772) to Q4 2020 (calendar_quarter_id=1776), which product that ranks in the top 20% of total sales has the smallest percentage-point change in its share ... | null | ['countries' 'customers' 'promotions' 'products' 'times' 'channels'
'sales' 'costs' 'supplementary_demographics' 'currency'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: complex_oracle
2. **Tables**: countries, customers, promotions, products, times, channels, sales, costs, supplementary_demographics, currency
3. **User Question**: Among all products sold in the United States with pr... |
local061 | complex_oracle | null | What is the average projected monthly sales in USD for France in 2021, considering only product sales with promotions where promo_total_id = 1 and channels where channel_total_id = 1, by taking each product’s monthly sales from 2019 and 2020, calculating the growth rate from 2019 to 2020 for that same product and month... | null | ['countries' 'customers' 'promotions' 'products' 'times' 'channels'
'sales' 'costs' 'supplementary_demographics' 'currency'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: complex_oracle
2. **Tables**: countries, customers, promotions, products, times, channels, sales, costs, supplementary_demographics, currency
3. **User Question**: What is the average projected monthly sales in USD f... |
local050 | complex_oracle | null | What is the median of the average monthly projected sales in USD for France in 2021, calculated by using the monthly sales data from 2019 and 2020 (filtered by promo_total_id=1 and channel_total_id=1), applying the growth rate from 2019 to 2020 to project 2021, converting to USD based on the currency table, and then de... | null | ['countries' 'customers' 'promotions' 'products' 'times' 'channels'
'sales' 'costs' 'supplementary_demographics' 'currency'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: complex_oracle
2. **Tables**: countries, customers, promotions, products, times, channels, sales, costs, supplementary_demographics, currency
3. **User Question**: What is the median of the average monthly projected ... |
local062 | complex_oracle | null | Please group all Italian customers into ten buckets for December 2021 by summing their profits from all products purchased (where profit is calculated as quantity_sold multiplied by the difference between unit_price and unit_cost), then divide the overall range of total monthly profits into ten equal intervals. For eac... | null | ['countries' 'customers' 'promotions' 'products' 'times' 'channels'
'sales' 'costs' 'supplementary_demographics' 'currency'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: complex_oracle
2. **Tables**: countries, customers, promotions, products, times, channels, sales, costs, supplementary_demographics, currency
3. **User Question**: Please group all Italian customers into ten buckets ... |
local067 | complex_oracle | null | Can you provide the highest and lowest profits for Italian customers segmented into ten evenly divided tiers based on their December 2021 sales profits? | null | ['countries' 'customers' 'promotions' 'products' 'times' 'channels'
'sales' 'costs' 'supplementary_demographics' 'currency'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: complex_oracle
2. **Tables**: countries, customers, promotions, products, times, channels, sales, costs, supplementary_demographics, currency
3. **User Question**: Can you provide the highest and lowest profits for I... |
local070 | city_legislation | null | Please examine our database records for Chinese cities (country_code_2 = 'cn') during July 2021 and identify both the shortest and longest streaks of consecutive date entries. For each date in these streaks, return exactly one record per date along with the corresponding city name. In your output, please ensure the fir... | null | ['aliens_details' 'skills_dim' 'legislators_terms' 'cities_currencies'
'legislators' 'skills_job_dim' 'job_postings_fact' 'alien_data'
'cities_countries' 'legislation_date_dim' 'cities' 'aliens_location'
'aliens' 'cities_languages' 'job_company' 'city_legislation'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: city_legislation
2. **Tables**: aliens_details, skills_dim, legislators_terms, cities_currencies, legislators, skills_job_dim, job_postings_fact, alien_data, cities_countries, legislation_date_dim, cities, aliens_loc... |
local071 | city_legislation | null | Could you review our records in June 2022 and identify which countries have the longest streak of consecutive inserted city dates? Please list the 2-letter length country codes of these countries. | null | ['aliens_details' 'skills_dim' 'legislators_terms' 'cities_currencies'
'legislators' 'skills_job_dim' 'job_postings_fact' 'alien_data'
'cities_countries' 'legislation_date_dim' 'cities' 'aliens_location'
'aliens' 'cities_languages' 'job_company' 'city_legislation'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: city_legislation
2. **Tables**: aliens_details, skills_dim, legislators_terms, cities_currencies, legislators, skills_job_dim, job_postings_fact, alien_data, cities_countries, legislation_date_dim, cities, aliens_loc... |
local072 | city_legislation | null | Identify the country with data inserted on nine different days in January 2022. Then, find the longest consecutive period with data insertions for this country during January 2022, and calculate the proportion of entries that are from its capital city within this longest consecutive insertion period. | null | ['aliens_details' 'skills_dim' 'legislators_terms' 'cities_currencies'
'legislators' 'skills_job_dim' 'job_postings_fact' 'alien_data'
'cities_countries' 'legislation_date_dim' 'cities' 'aliens_location'
'aliens' 'cities_languages' 'job_company' 'city_legislation'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: city_legislation
2. **Tables**: aliens_details, skills_dim, legislators_terms, cities_currencies, legislators, skills_job_dim, job_postings_fact, alien_data, cities_countries, legislation_date_dim, cities, aliens_loc... |
local068 | city_legislation | null | Calculate the number of new cities inserted in April, May, and June for each year from 2021 to 2023. For each month, compute the cumulative running total of cities added for that specific month across the years up to and including the given year (i.e., sum the counts of that month over the years). Additionally, calcula... | null | ['aliens_details' 'skills_dim' 'legislators_terms' 'cities_currencies'
'legislators' 'skills_job_dim' 'job_postings_fact' 'alien_data'
'cities_countries' 'legislation_date_dim' 'cities' 'aliens_location'
'aliens' 'cities_languages' 'job_company' 'city_legislation'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: city_legislation
2. **Tables**: aliens_details, skills_dim, legislators_terms, cities_currencies, legislators, skills_job_dim, job_postings_fact, alien_data, cities_countries, legislation_date_dim, cities, aliens_loc... |
local073 | modern_data | null | For each pizza order, provide a single result row with the row ID, order ID, customer ID, pizza name, and final set of ingredients. The final ingredients are determined by starting with the standard toppings from the pizza’s recipe, removing any excluded toppings, and adding any extra toppings. Present the ingredients ... | null | ['pizza_names' 'companies_funding' 'pizza_customer_orders'
'pizza_toppings' 'trees' 'pizza_recipes' 'statistics' 'income_trees'
'pizza_clean_runner_orders' 'pizza_runner_orders' 'word_list'
'companies_dates' 'pizza_get_extras' 'pizza_get_exclusions'
'pizza_clean_customer_orders' 'companies_industries' 'pizza_runner... |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: modern_data
2. **Tables**: pizza_names, companies_funding, pizza_customer_orders, pizza_toppings, trees, pizza_recipes, statistics, income_trees, pizza_clean_runner_orders, pizza_runner_orders, word_list, companies_d... |
local066 | modern_data | WITH cte_cleaned_customer_orders AS (
SELECT
*,
ROW_NUMBER() OVER () AS original_row_number
FROM
pizza_clean_customer_orders
),
split_regular_toppings AS (
SELECT
pizza_id,
TRIM(SUBSTR(toppings, 1, INSTR(toppings || ',', ',') - 1)) AS topping_id,
SUBSTR(toppi... | Based on our customer pizza order information, summarize the total quantity of each ingredient used in the pizzas we delivered. Output the name and quantity for each ingredient. | null | ['pizza_names' 'companies_funding' 'pizza_customer_orders'
'pizza_toppings' 'trees' 'pizza_recipes' 'statistics' 'income_trees'
'pizza_clean_runner_orders' 'pizza_runner_orders' 'word_list'
'companies_dates' 'pizza_get_extras' 'pizza_get_exclusions'
'pizza_clean_customer_orders' 'companies_industries' 'pizza_runner... |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: modern_data
2. **Tables**: pizza_names, companies_funding, pizza_customer_orders, pizza_toppings, trees, pizza_recipes, statistics, income_trees, pizza_clean_runner_orders, pizza_runner_orders, word_list, companies_d... |
local065 | modern_data | WITH get_extras_count AS (
WITH RECURSIVE split_extras AS (
SELECT
order_id,
TRIM(SUBSTR(extras, 1, INSTR(extras || ',', ',') - 1)) AS each_extra,
SUBSTR(extras || ',', INSTR(extras || ',', ',') + 1) AS remaining_extras
FROM
pizza_clean_customer_orders... | Calculate the total income from Meat Lovers pizzas priced at $12 and Vegetarian pizzas at $10. Include any extra toppings charged at $1 each. Ensure that canceled orders are filtered out. How much money has Pizza Runner earned in total? | null | ['pizza_names' 'companies_funding' 'pizza_customer_orders'
'pizza_toppings' 'trees' 'pizza_recipes' 'statistics' 'income_trees'
'pizza_clean_runner_orders' 'pizza_runner_orders' 'word_list'
'companies_dates' 'pizza_get_extras' 'pizza_get_exclusions'
'pizza_clean_customer_orders' 'companies_industries' 'pizza_runner... |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: modern_data
2. **Tables**: pizza_names, companies_funding, pizza_customer_orders, pizza_toppings, trees, pizza_recipes, statistics, income_trees, pizza_clean_runner_orders, pizza_runner_orders, word_list, companies_d... |
local074 | bank_sales_trading | null | Please generate a summary of the closing balances at the end of each month for each customer transactions, show the monthly changes and monthly cumulative bank account balances. Ensure that even if a customer has no account activity in a given month, the balance for that month is still included in the output. | 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,... |
local064 | bank_sales_trading | null | For each customer and each month of 2020, first calculate the month-end balance by adding all deposit amounts and subtracting all withdrawal amounts that occurred during that specific month. Then determine which month in 2020 has the highest count of customers with a positive month-end balance and which month has the l... | 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,... |
local297 | bank_sales_trading | null | For each customer, group all deposits and withdrawals by the first day of each month to obtain a monthly net amount, then calculate each month’s closing balance by cumulatively summing these monthly nets. Next, determine the most recent month’s growth rate by comparing its closing balance to the prior month’s balance, ... | 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,... |
local298 | bank_sales_trading | null | For each month, calculate the total balance from all users for the previous month (measured as of the 1st of each month), replacing any negative balances with zero. Ensure that data from the first month is used only as a baseline for calculating previous total balance, and exclude it from the final output. Sort the res... | 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,... |
local299 | bank_sales_trading | null | For a bank database with customer transactions, calculate each customer's daily running balance (where deposits add to the balance and other transaction types subtract). For each customer and each day, compute the 30-day rolling average balance (only after having 30 days of data, and treating negative averages as zero)... | 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,... |
local300 | bank_sales_trading | null | For each customer, calculate their daily balances for every day between their earliest and latest transaction dates, including days without transactions by carrying forward the previous day's balance. Treat any negative daily balances as zero. Then, for each month, determine the highest daily balance each customer had ... | 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,... |
local075 | bank_sales_trading | WITH product_viewed AS (
SELECT
t1.page_id,
SUM(CASE WHEN event_type = 1 THEN 1 ELSE 0 END) AS n_page_views,
SUM(CASE WHEN event_type = 2 THEN 1 ELSE 0 END) AS n_added_to_cart
FROM
shopping_cart_page_hierarchy AS t1
JOIN
shopping_cart_events AS t2
ON
t1.pa... | Can you provide a breakdown of how many times each product was viewed, how many times they were added to the shopping cart, and how many times they were left in the cart without being purchased? Also, give me the count of actual purchases for each product. Ensure that products with a page id in (1, 2, 12, 13) are filte... | 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,... |
local077 | bank_sales_trading | null | Please analyze our interest data from September 2018 to August 2019. For each month, calculate the average composition for each interest by dividing the composition by the index value. Identify the interest with the highest average composition value each month and report its average composition as the max index composi... | 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,... |
local078 | bank_sales_trading | WITH get_interest_rank AS (
SELECT
t1.month_year,
t2.interest_name,
t1.composition,
RANK() OVER (
PARTITION BY t2.interest_name
ORDER BY t1.composition DESC
) AS interest_rank
FROM
interest_metrics AS t1
JOIN
interest_map AS t... | Identify the top 10 and bottom 10 interest categories based on their highest composition values across all months. For each category, display the time(MM-YYYY), interest name, and the composition value | 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,... |
local081 | northwind | null | Considering only the customers who placed orders in 1998, calculate the total amount each customer spent by summing the unit price multiplied by the quantity of all products in their orders, excluding any discounts. Assign each customer to a spending group based on the customer group thresholds, and determine how many ... | null | ['categories' 'customercustomerdemo' 'customerdemographics' 'customers'
'employees' 'employeeterritories' 'order_details' 'orders' 'products'
'region' 'shippers' 'suppliers' 'territories' 'usstates'
'customergroupthreshold'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: northwind
2. **Tables**: categories, customercustomerdemo, customerdemographics, customers, employees, employeeterritories, order_details, orders, products, region, shippers, suppliers, territories, usstates, custome... |
local085 | northwind | null | Among employees who have more than 50 total orders, which three have the highest percentage of late orders, where an order is considered late if the shipped date is on or after its required date? Please list each employee's ID, the number of late orders, and the corresponding late-order percentage. | null | ['categories' 'customercustomerdemo' 'customerdemographics' 'customers'
'employees' 'employeeterritories' 'order_details' 'orders' 'products'
'region' 'shippers' 'suppliers' 'territories' 'usstates'
'customergroupthreshold'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: northwind
2. **Tables**: categories, customercustomerdemo, customerdemographics, customers, employees, employeeterritories, order_details, orders, products, region, shippers, suppliers, territories, usstates, custome... |
local096 | Db-IMDB | null | For each year, calculate the percentage of films that had exclusively female actors (meaning no male actors and no actors with unknown/unspecified gender). Consider actors with gender marked as 'Male' or 'None' as non-female. For the results, display the year, the total number of movies in that year, and the percentage... | null | ['Movie' 'Genre' 'Language' 'Country' 'Location' 'M_Location' 'M_Country'
'M_Language' 'M_Genre' 'Person' 'M_Producer' 'M_Director' 'M_Cast'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Db-IMDB
2. **Tables**: Movie, Genre, Language, Country, Location, M_Location, M_Country, M_Language, M_Genre, Person, M_Producer, M_Director, M_Cast
3. **User Question**: For each year, calculate the percentage of fi... |
local097 | Db-IMDB | null | Could you analyze our data and identify which ten-year period starting from any movie release year present in the data had the largest number of films, considering consecutive ten-year periods beginning at each unique year? Only output the start year and the total count for that specific period. | null | ['Movie' 'Genre' 'Language' 'Country' 'Location' 'M_Location' 'M_Country'
'M_Language' 'M_Genre' 'Person' 'M_Producer' 'M_Director' 'M_Cast'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Db-IMDB
2. **Tables**: Movie, Genre, Language, Country, Location, M_Location, M_Country, M_Language, M_Genre, Person, M_Producer, M_Director, M_Cast
3. **User Question**: Could you analyze our data and identify which... |
local098 | Db-IMDB | null | From the first year each actor appeared in a film to the last, how many actors in the database never had a gap longer than three consecutive years without at least one new movie appearance, meaning there is no four-year span anywhere in their active career without at least a single film credit? | null | ['Movie' 'Genre' 'Language' 'Country' 'Location' 'M_Location' 'M_Country'
'M_Language' 'M_Genre' 'Person' 'M_Producer' 'M_Director' 'M_Cast'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Db-IMDB
2. **Tables**: Movie, Genre, Language, Country, Location, M_Location, M_Country, M_Language, M_Genre, Person, M_Producer, M_Director, M_Cast
3. **User Question**: From the first year each actor appeared in a ... |
local099 | Db-IMDB | WITH YASH_CHOPRAS_PID AS (
SELECT
TRIM(P.PID) AS PID
FROM
Person P
WHERE
TRIM(P.Name) = 'Yash Chopra'
),
NUM_OF_MOV_BY_ACTOR_DIRECTOR AS (
SELECT
TRIM(MC.PID) AS ACTOR_PID,
TRIM(MD.PID) AS DIRECTOR_PID,
COUNT(DISTINCT TRIM(MD.MID)) AS NUM_OF_MOV
FROM
... | I need you to look into the actor collaborations and tell me how many actors have made more films with Yash Chopra than with any other director. This will help us understand his influence on the industry better. | null | ['Movie' 'Genre' 'Language' 'Country' 'Location' 'M_Location' 'M_Country'
'M_Language' 'M_Genre' 'Person' 'M_Producer' 'M_Director' 'M_Cast'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Db-IMDB
2. **Tables**: Movie, Genre, Language, Country, Location, M_Location, M_Country, M_Language, M_Genre, Person, M_Producer, M_Director, M_Cast
3. **User Question**: I need you to look into the actor collaborati... |
local100 | Db-IMDB | null | Find out how many actors have a 'Shahrukh number' of 2? This means they acted in a film with someone who acted with Shahrukh Khan, but not directly with him. | null | ['Movie' 'Genre' 'Language' 'Country' 'Location' 'M_Location' 'M_Country'
'M_Language' 'M_Genre' 'Person' 'M_Producer' 'M_Director' 'M_Cast'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: Db-IMDB
2. **Tables**: Movie, Genre, Language, Country, Location, M_Location, M_Country, M_Language, M_Genre, Person, M_Producer, M_Director, M_Cast
3. **User Question**: Find out how many actors have a 'Shahrukh num... |
local114 | education_business | null | Provide a detailed web sales report for each region, including the number of orders, total sales amount, and the name and sales amount of all sales representatives who achieved the highest total sales amount in that region (include all representatives in case of a tie). | 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... |
local128 | BowlingLeague | null | List the bowlers (including their ID, first name, and last name), match number, game number, handicap score, tournament date, and location for only those bowlers who have won games with a handicap score of 190 or less at all three venues: Thunderbird Lanes, Totem Lanes, and Bolero Lanes. Only include the specific game ... | null | ['Bowler_Scores' 'Bowler_Scores_Archive' 'Bowlers' 'sqlite_sequence'
'Match_Games' 'Match_Games_Archive' 'Teams' 'Tournaments'
'Tournaments_Archive' 'Tourney_Matches' 'Tourney_Matches_Archive'
'WAZips'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: BowlingLeague
2. **Tables**: Bowler_Scores, Bowler_Scores_Archive, Bowlers, sqlite_sequence, Match_Games, Match_Games_Archive, Teams, Tournaments, Tournaments_Archive, Tourney_Matches, Tourney_Matches_Archive, WAZips... |
local130 | school_scheduling | null | Could you provide a list of last names for all students who have completed English courses (where completion is defined as having a ClassStatus of 2), along with their quintile ranks based on their individual grades in those courses? The quintile should be determined by calculating how many students have grades greater... | null | ['Buildings' 'Categories' 'Class_Rooms' 'sqlite_sequence' 'Classes'
'Departments' 'Faculty' 'Faculty_Categories' 'Faculty_Classes'
'Faculty_Subjects' 'Majors' 'Staff' 'Student_Class_Status'
'Student_Schedules' 'Students' 'Subjects'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: school_scheduling
2. **Tables**: Buildings, Categories, Class_Rooms, sqlite_sequence, Classes, Departments, Faculty, Faculty_Categories, Faculty_Classes, Faculty_Subjects, Majors, Staff, Student_Class_Status, Student... |
local131 | EntertainmentAgency | SELECT
Musical_Styles.StyleName,
COUNT(RankedPreferences.FirstStyle)
AS FirstPreference,
COUNT(RankedPreferences.SecondStyle)
AS SecondPreference,
COUNT(RankedPreferences.ThirdStyle)
AS ThirdPreference
FROM Musical_Styles,
(SELECT (CASE WHEN
Musical_Preferences.PreferenceSeq = 1
... | Could you list each musical style with the number of times it appears as a 1st, 2nd, or 3rd preference in a single row per style? | null | ['Agents' 'Customers' 'Engagements' 'Entertainer_Members'
'Entertainer_Styles' 'Entertainers' 'Members' 'Musical_Preferences'
'Musical_Styles' 'ztblDays' 'ztblMonths' 'ztblSkipLabels' 'ztblWeeks'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: EntertainmentAgency
2. **Tables**: Agents, Customers, Engagements, Entertainer_Members, Entertainer_Styles, Entertainers, Members, Musical_Preferences, Musical_Styles, ztblDays, ztblMonths, ztblSkipLabels, ztblWeeks
... |
local133 | EntertainmentAgency | null | Given a database of musical styles and user preferences, where Musical_Preferences contains user rankings of musical styles (PreferenceSeq=1 for first choice, PreferenceSeq=2 for second choice, PreferenceSeq=3 for third choice): Calculate a weighted score for each musical style by assigning 3 points for each time it wa... | null | ['Agents' 'Customers' 'Engagements' 'Entertainer_Members'
'Entertainer_Styles' 'Entertainers' 'Members' 'Musical_Preferences'
'Musical_Styles' 'ztblDays' 'ztblMonths' 'ztblSkipLabels' 'ztblWeeks'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: EntertainmentAgency
2. **Tables**: Agents, Customers, Engagements, Entertainer_Members, Entertainer_Styles, Entertainers, Members, Musical_Preferences, Musical_Styles, ztblDays, ztblMonths, ztblSkipLabels, ztblWeeks
... |
local132 | EntertainmentAgency | null | Show all pairs of entertainers and customers who each have up to three style strengths or preferences, where the first and second style preferences of the customers match the first and second style strengths of the entertainers (or in reverse order). Only return the entertainer’s stage name and the customer’s last name | null | ['Agents' 'Customers' 'Engagements' 'Entertainer_Members'
'Entertainer_Styles' 'Entertainers' 'Members' 'Musical_Preferences'
'Musical_Styles' 'ztblDays' 'ztblMonths' 'ztblSkipLabels' 'ztblWeeks'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: EntertainmentAgency
2. **Tables**: Agents, Customers, Engagements, Entertainer_Members, Entertainer_Styles, Entertainers, Members, Musical_Preferences, Musical_Styles, ztblDays, ztblMonths, ztblSkipLabels, ztblWeeks
... |
local141 | AdventureWorks | null | How did each salesperson's annual total sales compare to their annual sales quota? Provide the difference between their total sales and the quota for each year, organized by salesperson and year. | null | ['salesperson' 'product' 'productmodelproductdescriptionculture'
'productdescription' 'productreview' 'productcategory'
'productsubcategory' 'salesorderdetail' 'salesorderheader'
'salesterritory' 'countryregioncurrency' 'currencyrate'
'SalesPersonQuotaHistory'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: AdventureWorks
2. **Tables**: salesperson, product, productmodelproductdescriptionculture, productdescription, productreview, productcategory, productsubcategory, salesorderdetail, salesorderheader, salesterritory, c... |
local152 | imdb_movies | null | Can you provide the top 9 directors by movie count, including their ID, name, number of movies, average inter-movie duration (rounded to the nearest integer), average rating (rounded to 2 decimals), total votes, minimum and maximum ratings, and total movie duration? Sort the output first by movie count in descending or... | null | ['ERD' 'movies' 'genre' 'director_mapping' 'role_mapping' 'names'
'ratings'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: imdb_movies
2. **Tables**: ERD, movies, genre, director_mapping, role_mapping, names, ratings
3. **User Question**: Can you provide the top 9 directors by movie count, including their ID, name, number of movies, aver... |
local230 | imdb_movies | null | Determine the top three genres with the most movies rated above 8, and then identify the top four directors who have directed the most films rated above 8 within those genres. List these directors and their respective movie counts. | null | ['ERD' 'movies' 'genre' 'director_mapping' 'role_mapping' 'names'
'ratings'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: imdb_movies
2. **Tables**: ERD, movies, genre, director_mapping, role_mapping, names, ratings
3. **User Question**: Determine the top three genres with the most movies rated above 8, and then identify the top four di... |
local156 | bank_sales_trading | null | Analyze the annual average purchase price per Bitcoin by region, computed as the total dollar amount spent divided by the total quantity purchased each year, excluding the first year's data for each region. Then, for each year, rank the regions based on these average purchase prices, and calculate the annual percentage... | 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,... |
local157 | bank_sales_trading | null | Using the "bitcoin_prices" table, please calculate the daily percentage change in trading volume for each ticker from August 1 to August 10, 2021, ensuring that any volume ending in "K" or "M" is accurately converted to thousands or millions, any "-" volume is treated as zero, only non-zero volumes are used to determin... | 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,... |
local163 | education_business | WITH AvgSalaries AS (
SELECT
facrank AS FacRank,
AVG(facsalary) AS AvSalary
FROM
university_faculty
GROUP BY
facrank
),
SalaryDifferences AS (
SELECT
university_faculty.facrank AS FacRank,
university_faculty.facfirstname AS FacFirstName,
univ... | Which university faculty members' salaries are closest to the average salary for their respective ranks? Please provide the ranks, first names, last names, and salaries.university | 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... |
local168 | city_legislation | null | Among job postings that specifically have the Data Analyst, require a non-null annual average salary, and are remote, what is the overall average salary when considering only the top three most frequently demanded skills for these positions? | null | ['aliens_details' 'skills_dim' 'legislators_terms' 'cities_currencies'
'legislators' 'skills_job_dim' 'job_postings_fact' 'alien_data'
'cities_countries' 'legislation_date_dim' 'cities' 'aliens_location'
'aliens' 'cities_languages' 'job_company' 'city_legislation'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: city_legislation
2. **Tables**: aliens_details, skills_dim, legislators_terms, cities_currencies, legislators, skills_job_dim, job_postings_fact, alien_data, cities_countries, legislation_date_dim, cities, aliens_loc... |
local169 | city_legislation | null | What is the annual retention rate of legislators who began their first term between January 1, 1917 and December 31, 1999, measured as the proportion of this cohort still in office on December 31st for each of the first 20 years following their initial term start? The results should show all 20 periods in sequence rega... | null | ['aliens_details' 'skills_dim' 'legislators_terms' 'cities_currencies'
'legislators' 'skills_job_dim' 'job_postings_fact' 'alien_data'
'cities_countries' 'legislation_date_dim' 'cities' 'aliens_location'
'aliens' 'cities_languages' 'job_company' 'city_legislation'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: city_legislation
2. **Tables**: aliens_details, skills_dim, legislators_terms, cities_currencies, legislators, skills_job_dim, job_postings_fact, alien_data, cities_countries, legislation_date_dim, cities, aliens_loc... |
local171 | city_legislation | null | For male legislators from Louisiana, how many distinct legislators were actively serving on December 31 of each year from more than 30 years since their first term up to less than 50 years, grouping the results by the exact number of years elapsed since their first term? | null | ['aliens_details' 'skills_dim' 'legislators_terms' 'cities_currencies'
'legislators' 'skills_job_dim' 'job_postings_fact' 'alien_data'
'cities_countries' 'legislation_date_dim' 'cities' 'aliens_location'
'aliens' 'cities_languages' 'job_company' 'city_legislation'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: city_legislation
2. **Tables**: aliens_details, skills_dim, legislators_terms, cities_currencies, legislators, skills_job_dim, job_postings_fact, alien_data, cities_countries, legislation_date_dim, cities, aliens_loc... |
local167 | city_legislation | null | Based on the state each female legislator first represented, which state has the highest number of female legislators whose terms included December 31st at any point, and what is that count? Please provide the state's abbreviation. | null | ['aliens_details' 'skills_dim' 'legislators_terms' 'cities_currencies'
'legislators' 'skills_job_dim' 'job_postings_fact' 'alien_data'
'cities_countries' 'legislation_date_dim' 'cities' 'aliens_location'
'aliens' 'cities_languages' 'job_company' 'city_legislation'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: city_legislation
2. **Tables**: aliens_details, skills_dim, legislators_terms, cities_currencies, legislators, skills_job_dim, job_postings_fact, alien_data, cities_countries, legislation_date_dim, cities, aliens_loc... |
local170 | city_legislation | null | Identify the state abbreviations where, for both male and female legislators, the retention rate remains greater than zero at specific intervals of 0, 2, 4, 6, 8, and 10 years after their first term start date. A legislator is considered retained if they are serving on December 31 of the respective year. Only include s... | null | ['aliens_details' 'skills_dim' 'legislators_terms' 'cities_currencies'
'legislators' 'skills_job_dim' 'job_postings_fact' 'alien_data'
'cities_countries' 'legislation_date_dim' 'cities' 'aliens_location'
'aliens' 'cities_languages' 'job_company' 'city_legislation'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: city_legislation
2. **Tables**: aliens_details, skills_dim, legislators_terms, cities_currencies, legislators, skills_job_dim, job_postings_fact, alien_data, cities_countries, legislation_date_dim, cities, aliens_loc... |
local193 | sqlite-sakila | null | Could you find out the average percentage of the total lifetime sales (LTV) that occur in the first 7 and 30 days after a customer's initial purchase? Also, include the average total lifetime sales (LTV). Please exclude customers with zero lifetime sales. The 7- and 30-day periods should be based on the exact number of... | null | ['actor' 'country' 'city' 'address' 'language' 'category' 'customer'
'film' 'film_actor' 'film_category' 'film_text' 'inventory' 'staff'
'store' 'payment' 'rental' 'monthly_payment_totals' 'MonthlyTotals'
'total_revenue_by_film'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: sqlite-sakila
2. **Tables**: actor, country, city, address, language, category, customer, film, film_actor, film_category, film_text, inventory, staff, store, payment, rental, monthly_payment_totals, MonthlyTotals, t... |
local194 | sqlite-sakila | null | Please provide a list of the top three revenue-generating films for each actor, along with the average revenue per actor in those films, calculated by dividing the total film revenue equally among the actors for each film. | null | ['actor' 'country' 'city' 'address' 'language' 'category' 'customer'
'film' 'film_actor' 'film_category' 'film_text' 'inventory' 'staff'
'store' 'payment' 'rental' 'monthly_payment_totals' 'MonthlyTotals'
'total_revenue_by_film'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: sqlite-sakila
2. **Tables**: actor, country, city, address, language, category, customer, film, film_actor, film_category, film_text, inventory, staff, store, payment, rental, monthly_payment_totals, MonthlyTotals, t... |
local195 | sqlite-sakila | null | Please find out how widespread the appeal of our top five actors is. What percentage of our customers have rented films featuring these actors? | null | ['actor' 'country' 'city' 'address' 'language' 'category' 'customer'
'film' 'film_actor' 'film_category' 'film_text' 'inventory' 'staff'
'store' 'payment' 'rental' 'monthly_payment_totals' 'MonthlyTotals'
'total_revenue_by_film'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: sqlite-sakila
2. **Tables**: actor, country, city, address, language, category, customer, film, film_actor, film_category, film_text, inventory, staff, store, payment, rental, monthly_payment_totals, MonthlyTotals, t... |
local196 | sqlite-sakila | null | For each rating category of the first movie rented by customers—where the first movie is identified based on the earliest payment date per customer—please provide the average total amount spent per customer and the average number of subsequent rentals (calculated as the total number of rentals minus one) for customers ... | null | ['actor' 'country' 'city' 'address' 'language' 'category' 'customer'
'film' 'film_actor' 'film_category' 'film_text' 'inventory' 'staff'
'store' 'payment' 'rental' 'monthly_payment_totals' 'MonthlyTotals'
'total_revenue_by_film'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: sqlite-sakila
2. **Tables**: actor, country, city, address, language, category, customer, film, film_actor, film_category, film_text, inventory, staff, store, payment, rental, monthly_payment_totals, MonthlyTotals, t... |
local197 | sqlite-sakila | WITH result_table AS (
SELECT
strftime('%m', pm.payment_date) AS pay_mon,
customer_id,
COUNT(pm.amount) AS pay_countpermon,
SUM(pm.amount) AS pay_amount
FROM
payment AS pm
GROUP BY
pay_mon,
customer_id
),
top10_customer AS (
SELECT
customer_id,
SUM(tb.pay_amount) AS... | Among our top 10 paying customers, can you identify the largest change in payment amounts from one month to the immediately following month? Specifically, please determine for which customer and during which month this maximum month-over-month difference occurred, and provide the difference rounded to two decimal place... | null | ['actor' 'country' 'city' 'address' 'language' 'category' 'customer'
'film' 'film_actor' 'film_category' 'film_text' 'inventory' 'staff'
'store' 'payment' 'rental' 'monthly_payment_totals' 'MonthlyTotals'
'total_revenue_by_film'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: sqlite-sakila
2. **Tables**: actor, country, city, address, language, category, customer, film, film_actor, film_category, film_text, inventory, staff, store, payment, rental, monthly_payment_totals, MonthlyTotals, t... |
local199 | sqlite-sakila | WITH result_table AS (
SELECT
strftime('%Y', RE.RENTAL_DATE) AS YEAR,
strftime('%m', RE.RENTAL_DATE) AS RENTAL_MONTH,
ST.STORE_ID,
COUNT(RE.RENTAL_ID) AS count
FROM
RENTAL RE
JOIN STAFF ST ON RE.STAFF_ID = ST.STAFF_ID
GROUP BY
YEAR,
RENTAL_MONTH,
ST.STORE_ID
),
mon... | Can you identify the year and month with the highest rental orders created by the store's staff for each store? Please list the store ID, the year, the month, and the total rentals for those dates. | null | ['actor' 'country' 'city' 'address' 'language' 'category' 'customer'
'film' 'film_actor' 'film_category' 'film_text' 'inventory' 'staff'
'store' 'payment' 'rental' 'monthly_payment_totals' 'MonthlyTotals'
'total_revenue_by_film'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: sqlite-sakila
2. **Tables**: actor, country, city, address, language, category, customer, film, film_actor, film_category, film_text, inventory, staff, store, payment, rental, monthly_payment_totals, MonthlyTotals, t... |
local201 | modern_data | null | Identify the first 10 words, sorted alphabetically, that are 4 to 5 characters long, start with 'r', and have at least one anagram of the same length, considering case-sensitive letters. Provide the count of such anagrams for each word. | null | ['pizza_names' 'companies_funding' 'pizza_customer_orders'
'pizza_toppings' 'trees' 'pizza_recipes' 'statistics' 'income_trees'
'pizza_clean_runner_orders' 'pizza_runner_orders' 'word_list'
'companies_dates' 'pizza_get_extras' 'pizza_get_exclusions'
'pizza_clean_customer_orders' 'companies_industries' 'pizza_runner... |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: modern_data
2. **Tables**: pizza_names, companies_funding, pizza_customer_orders, pizza_toppings, trees, pizza_recipes, statistics, income_trees, pizza_clean_runner_orders, pizza_runner_orders, word_list, companies_d... |
local202 | city_legislation | null | For alien data, how many of the top 10 states by alien population have a higher percentage of friendly aliens than hostile aliens, with an average alien age exceeding 200? | null | ['aliens_details' 'skills_dim' 'legislators_terms' 'cities_currencies'
'legislators' 'skills_job_dim' 'job_postings_fact' 'alien_data'
'cities_countries' 'legislation_date_dim' 'cities' 'aliens_location'
'aliens' 'cities_languages' 'job_company' 'city_legislation'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: city_legislation
2. **Tables**: aliens_details, skills_dim, legislators_terms, cities_currencies, legislators, skills_job_dim, job_postings_fact, alien_data, cities_countries, legislation_date_dim, cities, aliens_loc... |
local209 | delivery_center | null | In the dataset of orders joined with store information, which store has the highest total number of orders, and among that store’s orders, what is the ratio of orders that appear in the deliveries table with a 'DELIVERED' status to the total orders for that store? | null | ['channels' 'drivers' 'deliveries' 'hubs' 'payments' 'stores' 'orders'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: delivery_center
2. **Tables**: channels, drivers, deliveries, hubs, payments, stores, orders
3. **User Question**: In the dataset of orders joined with store information, which store has the highest total number of o... |
local210 | delivery_center | WITH february_orders AS (
SELECT
h.hub_name AS hub_name,
COUNT(*) AS orders_february
FROM
orders o
LEFT JOIN
stores s ON o.store_id = s.store_id
LEFT JOIN
hubs h ON s.hub_id = h.hub_id
WHERE o.order_created_month = 2 AND o.order_status = 'FINISHED'
GR... | Can you identify the hubs that saw more than a 20% increase in finished orders from February to March? | null | ['channels' 'drivers' 'deliveries' 'hubs' 'payments' 'stores' 'orders'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: delivery_center
2. **Tables**: channels, drivers, deliveries, hubs, payments, stores, orders
3. **User Question**: Can you identify the hubs that saw more than a 20% increase in finished orders from February to March... |
local212 | delivery_center | null | Can you find 5 delivery drivers with the highest average number of daily deliveries? | null | ['channels' 'drivers' 'deliveries' 'hubs' 'payments' 'stores' 'orders'] |
Solve the given problem according to instructions given above:
## Your SYSTEM Inputs
1. **Database**: delivery_center
2. **Tables**: channels, drivers, deliveries, hubs, payments, stores, orders
3. **User Question**: Can you find 5 delivery drivers with the highest average number of daily deliveries?
## OUTPUT FORMA... |
local218 | EU_soccer | null | Can you calculate the median from the highest season goals of each team? | 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**: Can you calculate the median from the highest season goals of each team?
## OU... |
local219 | EU_soccer | WITH match_view AS(
SELECT
M.id,
L.name AS league,
M.season,
M.match_api_id,
T.team_long_name AS home_team,
TM.team_long_name AS away_team,
M.home_team_goal,
M.away_team_goal,
P1.player_name AS home_gk,
P2.player_name AS home_center_back_1,
P3.player_name AS home_center_back_... | In each league, considering all seasons, which single team has the fewest total match wins based on comparing home and away goals, including teams with zero wins, ensuring that if multiple teams tie for the fewest wins, only one team is returned for each league? | 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**: In each league, considering all seasons, which single team has the fewest total... |
local221 | EU_soccer | null | Tell me top10 teams with the most wins across the league | 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**: Tell me top10 teams with the most wins across the league
## OUTPUT FORMAT
You... |
local220 | EU_soccer | null | Which player has participated in the highest number of winning matches and which player has participated in the highest number of losing matches, considering only matches where they actually played (excluding null entries) and where their team won or lost (excluding draws)? | 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**: Which player has participated in the highest number of winning matches and whic... |
local228 | IPL | null | For each IPL season, identify the top three batsmen with the highest total runs scored and the top three bowlers with the most wickets taken, excluding ‘run out’, ‘hit wicket’, and ‘retired hurt’ dismissals. In the event of ties in runs or wickets, break the tie using the smaller player ID. Then output these six player... | 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 IPL season, identify the top three batsmen with the highest total ... |
local229 | IPL | null | Find the IDs of players who scored the highest number of partnership runs for each match. The output should include the IDs of two players, each with their individual scores and the total partnership score. For each pair, the player with the higher individual score should be listed as player 1, and the player with the ... | 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**: Find the IDs of players who scored the highest number of partnership runs f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.