Dataset Viewer
Auto-converted to Parquet Duplicate
question_id
int64
3
9.42k
db_id
stringclasses
69 values
hint
stringlengths
208
975
steps
listlengths
3
6
3
movie_platform
1. Join the `movies` table to the `ratings` table on `movie_id` to connect each film with its rating records. 2. Group the joined data by `movie_id` and `movie_title` to compute the total number of ratings per movie; the external concept "most ratings" maps to counting these grouped `ratings` rows. 3. In a subquery, re...
[ "Join the `movies` table to the `ratings` table on `movie_id` to connect each film with its rating records.", "Group the joined data by `movie_id` and `movie_title` to compute the total number of ratings per movie; the external concept \"most ratings\" maps to counting these grouped `ratings` rows.", "In a subq...
11
movie_platform
1. Join the `ratings` table to `movies` on `movie_id` to connect each rating with its corresponding movie title. 2. Filter `ratings` to only rows where `rating_timestamp_utc` indicates the year 2020. 3. Further filter to rows where `rating_score` is 4 or greater, mapping the "4 and above" requirement. 4. Return distinc...
[ "Join the `ratings` table to `movies` on `movie_id` to connect each rating with its corresponding movie title.", "Filter `ratings` to only rows where `rating_timestamp_utc` indicates the year 2020.", "Further filter to rows where `rating_score` is 4 or greater, mapping the \"4 and above\" requirement.", "Retu...
16
movie_platform
1. Target the `lists` table exclusively; it contains both the list names and follower counts, so no joins are needed. 2. Map "most followed" to the maximum value of the `list_followers` column. 3. Calculate that maximum by running a subquery that selects `MAX(list_followers)` from `lists`. 4. In the outer query, select...
[ "Target the `lists` table exclusively; it contains both the list names and follower counts, so no joins are needed.", "Map \"most followed\" to the maximum value of the `list_followers` column.", "Calculate that maximum by running a subquery that selects `MAX(list_followers)` from `lists`.", "In the outer que...
17
movie_platform
1. Query only the `lists` table, as it contains every attribute needed to answer the question. 2. Map "URL to the list page on Mubi" to the `list_url` column; this is the sole column to return. 3. Map "followers between 1-2" to the `list_followers` column and restrict its values to the inclusive range 1 through 2. 4. M...
[ "Query only the `lists` table, as it contains every attribute needed to answer the question.", "Map \"URL to the list page on Mubi\" to the `list_url` column; this is the sole column to return.", "Map \"followers between 1-2\" to the `list_followers` column and restrict its values to the inclusive range 1 throu...
19
movie_platform
1. Query the `ratings` table directly, as it contains every column needed: `movie_id`, `rating_score`, `user_has_payment_method`, `user_eligible_for_trial`, and `user_id`. 2. Filter to rows where `movie_id` equals 1269. 3. Apply the rating filter using the external knowledge mapping: keep only rows with `rating_score` ...
[ "Query the `ratings` table directly, as it contains every column needed: `movie_id`, `rating_score`, `user_has_payment_method`, `user_eligible_for_trial`, and `user_id`.", "Filter to rows where `movie_id` equals 1269.", "Apply the rating filter using the external knowledge mapping: keep only rows with `rating_s...
25
movie_platform
1. Query the `movies` table, which contains both director names and release years, so no joins are needed. 2. Filter rows where `director_name` equals 'Quentin Tarantino'. 3. Order the results by `movie_release_year` ascending to rank his films from oldest to newest, mapping the phrase "third movie" to the third oldest...
[ "Query the `movies` table, which contains both director names and release years, so no joins are needed.", "Filter rows where `director_name` equals 'Quentin Tarantino'.", "Order the results by `movie_release_year` ascending to rank his films from oldest to newest, mapping the phrase \"third movie\" to the thir...
27
movie_platform
1. Identify that you need the `ratings` table for score data and the `movies` table for the title and director name. 2. Join `ratings` and `movies` on the shared `movie_id` key to link each rating to its film. 3. Filter the joined rows to only those where `movie_title` is exactly 'When Will I Be Loved'. 4. Aggregate th...
[ "Identify that you need the `ratings` table for score data and the `movies` table for the title and director name.", "Join `ratings` and `movies` on the shared `movie_id` key to link each rating to its film.", "Filter the joined rows to only those where `movie_title` is exactly 'When Will I Be Loved'.", "Aggr...
33
movie_platform
1. Join the lists and lists_users tables on matching user_id and list_id to combine each list's follower count with the user's subscription status at the time of creation. 2. Filter for rows where user_id equals 4208563, mapping the external identifier to the user_id column. 3. Compute the maximum list_followers value ...
[ "Join the lists and lists_users tables on matching user_id and list_id to combine each list's follower count with the user's subscription status at the time of creation.", "Filter for rows where user_id equals 4208563, mapping the external identifier to the user_id column.", "Compute the maximum list_followers ...
37
movie_platform
1. Join the movies table to ratings on movie_id to pair movie titles with user rating records. 2. Filter movies by movie_title equal to 'The Magnificent Ambersons', mapping the external knowledge to the title column. 3. Filter ratings by rating_score less than or equal to 2, mapping the external knowledge about the low...
[ "Join the movies table to ratings on movie_id to pair movie titles with user rating records.", "Filter movies by movie_title equal to 'The Magnificent Ambersons', mapping the external knowledge to the title column.", "Filter ratings by rating_score less than or equal to 2, mapping the external knowledge about t...
38
movie_platform
1. Join `lists` with `lists_users` on matching `list_id` and `user_id` to pair each list’s follower count with its creation record. 2. Restrict to rows where `lists_users.list_creation_date_utc` falls between '2016-02-01' and '2016-02-29' and `user_eligible_for_trial` equals '1', applying the February 2016 and trial-el...
[ "Join `lists` with `lists_users` on matching `list_id` and `user_id` to pair each list’s follower count with its creation record.", "Restrict to rows where `lists_users.list_creation_date_utc` falls between '2016-02-01' and '2016-02-29' and `user_eligible_for_trial` equals '1', applying the February 2016 and tria...
40
movie_platform
1. Filter the movies table to rows where movie_release_year is between 1960 and 1985, group by director_id, and keep only directors having at least 10 movies in that window. 2. Join those qualifying directors back to movies on director_id, again restricting to release years 1960–1985, to collect every eligible movie’s ...
[ "Filter the movies table to rows where movie_release_year is between 1960 and 1985, group by director_id, and keep only directors having at least 10 movies in that window.", "Join those qualifying directors back to movies on director_id, again restricting to release years 1960–1985, to collect every eligible movi...
47
movie_platform
1. Left join movies to ratings on movie_id while requiring rating_score to be 5, so only top ratings are attached. 2. Filter to rows where director_name is Christopher Nolan, using the external knowledge mapping. 3. Group by movie_id to count how many 5-star ratings each Nolan movie received. 4. In a subquery, repeat t...
[ "Left join movies to ratings on movie_id while requiring rating_score to be 5, so only top ratings are attached.", "Filter to rows where director_name is Christopher Nolan, using the external knowledge mapping.", "Group by movie_id to count how many 5-star ratings each Nolan movie received.", "In a subquery, ...
50
movie_platform
1. Target the lists table because the question asks about movie lists and their update versus creation dates. 2. Extract the year portion from list_update_timestamp_utc and list_creation_timestamp_utc by using the first four characters of each text timestamp. 3. Subtract the creation year from the update year to determ...
[ "Target the lists table because the question asks about movie lists and their update versus creation dates.", "Extract the year portion from list_update_timestamp_utc and list_creation_timestamp_utc by using the first four characters of each text timestamp.", "Subtract the creation year from the update year to ...
53
movie_platform
1. Use the `lists` table exclusively, as the question only concerns movie lists and requires no joins. 2. Filter on `list_creation_timestamp_utc` being greater than '2010/1/1' to satisfy "created after 2010/1/1". 3. Filter on `list_followers` being greater than 200 to satisfy "over 200 followers". 4. Aggregate the filt...
[ "Use the `lists` table exclusively, as the question only concerns movie lists and requires no joins.", "Filter on `list_creation_timestamp_utc` being greater than '2010/1/1' to satisfy \"created after 2010/1/1\".", "Filter on `list_followers` being greater than 200 to satisfy \"over 200 followers\".", "Aggreg...
54
movie_platform
1. Use the `lists_users` table, which records each list a user created and whether that user was a subscriber at creation time; no table joins are required. 2. Filter the rows to those where `user_id` equals 83373278, matching the specified user identifier. 3. Further filter to rows where `user_subscriber` equals 1, ap...
[ "Use the `lists_users` table, which records each list a user created and whether that user was a subscriber at creation time; no table joins are required.", "Filter the rows to those where `user_id` equals 83373278, matching the specified user identifier.", "Further filter to rows where `user_subscriber` equals...
59
movie_platform
1. Locate the target list by filtering the lists table where list_title equals '250 Favourite Films'. 2. Join lists_users to that record using both list_id and user_id to reach the creator's status at the time of creation. 3. Map the trialist condition to the lists_users.user_trialist column, treating a value of 1 as t...
[ "Locate the target list by filtering the lists table where list_title equals '250 Favourite Films'.", "Join lists_users to that record using both list_id and user_id to reach the creator's status at the time of creation.", "Map the trialist condition to the lists_users.user_trialist column, treating a value of ...
64
movie_platform
1. Map the natural-language list name "250 Favourite Films" to the `list_title` column in the `lists` table and the requested "avatar image" to the `user_avatar_image_url` column in the `lists_users` table. 2. Join the `lists` table with the `lists_users` table on both `list_id` and `user_id` to connect each list with ...
[ "Map the natural-language list name \"250 Favourite Films\" to the `list_title` column in the `lists` table and the requested \"avatar image\" to the `user_avatar_image_url` column in the `lists_users` table.", "Join the `lists` table with the `lists_users` table on both `list_id` and `user_id` to connect each li...
70
movie_platform
1. Map the external knowledge: the movie title "A Way of Life" corresponds to `movies.movie_title`, user 39115684 corresponds to `ratings.user_id`, and the rating time corresponds to `ratings.rating_timestamp_utc`. 2. Join the `ratings` table with the `movies` table on their shared `movie_id` key. 3. Filter `movies.mov...
[ "Map the external knowledge: the movie title \"A Way of Life\" corresponds to `movies.movie_title`, user 39115684 corresponds to `ratings.user_id`, and the rating time corresponds to `ratings.rating_timestamp_utc`.", "Join the `ratings` table with the `movies` table on their shared `movie_id` key.", "Filter `mo...
76
movie_platform
1. Join the ratings table to the movies table on movie_id to link each critic record to its corresponding film title. 2. Filter ratings to the specific user by setting user_id equal to 58149469. 3. Apply the critic engagement conditions by setting critic_likes equal to 1 and critic_comments equal to 2. 4. Return only t...
[ "Join the ratings table to the movies table on movie_id to link each critic record to its corresponding film title.", "Filter ratings to the specific user by setting user_id equal to 58149469.", "Apply the critic engagement conditions by setting critic_likes equal to 1 and critic_comments equal to 2.", "Retur...
78
movie_platform
1. Join the ratings table with movies on movie_id to connect each rating record to its movie title. 2. Filter where movie_title equals 'A Way of Life'. 3. Filter where rating_timestamp_utc is on or after '2012-01-01' to capture only ratings made after the year 2011. 4. Compute COUNT(DISTINCT rating_id) on the ratings t...
[ "Join the ratings table with movies on movie_id to connect each rating record to its movie title.", "Filter where movie_title equals 'A Way of Life'.", "Filter where rating_timestamp_utc is on or after '2012-01-01' to capture only ratings made after the year 2011.", "Compute COUNT(DISTINCT rating_id) on the r...
80
movie_platform
1. Filter the `lists` table on `list_title` = '250 Favourite Films', using the external knowledge that this string is a list title, to identify the target `user_id`. 2. Join the `ratings` table to that result on `user_id` to gather every `movie_id` rated by the list's creator. 3. Join the `movies` table to `ratings` on...
[ "Filter the `lists` table on `list_title` = '250 Favourite Films', using the external knowledge that this string is a list title, to identify the target `user_id`.", "Join the `ratings` table to that result on `user_id` to gather every `movie_id` rated by the list's creator.", "Join the `movies` table to `ratin...
81
movie_platform
1. Join the ratings table to the movies table on the movie_id key to link each rating to its corresponding film. 2. Filter the result to keep only rows where the movie_title column equals 'A Way of Life', mapping the external knowledge that this string is the movie's title. 3. Aggregate the filtered rows by computing t...
[ "Join the ratings table to the movies table on the movie_id key to link each rating to its corresponding film.", "Filter the result to keep only rows where the movie_title column equals 'A Way of Life', mapping the external knowledge that this string is the movie's title.", "Aggregate the filtered rows by compu...
88
movie_platform
1. Target the `movies` table since it contains titles, directors, and popularity data. 2. Filter rows where `director_name` equals 'Paul Thomas Anderson'. 3. Compute the maximum `movie_popularity` within that director-specific subset. 4. Keep only rows matching that maximum popularity to capture the most popular film(s...
[ "Target the `movies` table since it contains titles, directors, and popularity data.", "Filter rows where `director_name` equals 'Paul Thomas Anderson'.", "Compute the maximum `movie_popularity` within that director-specific subset.", "Keep only rows matching that maximum popularity to capture the most popula...
92
movie_platform
1. Use only the `lists` table, since it contains both the list titles and their comment counts. 2. Map the requirement "the most comments" to the maximum value of the `list_comments` column using a MAX aggregate across all rows. 3. Compute that maximum comment count from the `lists` table. 4. Filter the `lists` table t...
[ "Use only the `lists` table, since it contains both the list titles and their comment counts.", "Map the requirement \"the most comments\" to the maximum value of the `list_comments` column using a MAX aggregate across all rows.", "Compute that maximum comment count from the `lists` table.", "Filter the `list...
93
movie_platform
1. Join the `movies` and `ratings` tables on `movie_id` to link each film to its user ratings. 2. Filter to rows where `movie_release_year` equals 2008, applying the release-year condition. 3. Group the filtered results by `movie_id` (and its associated `movie_title`) to prepare for per-film aggregation. 4. Compute `AV...
[ "Join the `movies` and `ratings` tables on `movie_id` to link each film to its user ratings.", "Filter to rows where `movie_release_year` equals 2008, applying the release-year condition.", "Group the filtered results by `movie_id` (and its associated `movie_title`) to prepare for per-film aggregation.", "Com...
94
movie_platform
1. Join the `movies` table to the `ratings` table on `movie_id` to connect each movie title with its rating records. 2. Map the phrase "likes related to the critic made by the user rating the movie" to the `critic_likes` column in `ratings`. 3. Group the joined results by `movies.movie_id` to aggregate data per distinc...
[ "Join the `movies` table to the `ratings` table on `movie_id` to connect each movie title with its rating records.", "Map the phrase \"likes related to the critic made by the user rating the movie\" to the `critic_likes` column in `ratings`.", "Group the joined results by `movies.movie_id` to aggregate data per...
95
movie_platform
1. Start from the lists_users table to access user_id and list_creation_date_utc. 2. Inner join the lists table on list_id to bring in list_followers for each list. 3. Apply the follower condition by filtering list_followers to greater than 100, mapping the external knowledge for "more than 100 followers". 4. Apply the...
[ "Start from the lists_users table to access user_id and list_creation_date_utc.", "Inner join the lists table on list_id to bring in list_followers for each list.", "Apply the follower condition by filtering list_followers to greater than 100, mapping the external knowledge for \"more than 100 followers\".", ...
97
movie_platform
1. Use the external knowledge to map "cover image of the user" to the column user_cover_image_url in the lists_users table. 2. Join lists_users with lists on the shared list_id key to connect each list creator with the corresponding list record. 3. Filter the joined rows to only those where the list_title in lists matc...
[ "Use the external knowledge to map \"cover image of the user\" to the column user_cover_image_url in the lists_users table.", "Join lists_users with lists on the shared list_id key to connect each list creator with the corresponding list record.", "Filter the joined rows to only those where the list_title in li...
100
movie_platform
1. Join the ratings table with the movies table on movie_id to connect each user score to its corresponding film details. 2. Filter the ratings side to user_id equal to 2941, applying the external knowledge that "user 2941" maps to that column. 3. Filter the movies side to movie_release_year equal to 2003, applying the...
[ "Join the ratings table with the movies table on movie_id to connect each user score to its corresponding film details.", "Filter the ratings side to user_id equal to 2941, applying the external knowledge that \"user 2941\" maps to that column.", "Filter the movies side to movie_release_year equal to 2003, appl...
101
movie_platform
1. Join the `ratings` table with the `movies` table on the `movie_id` column to link each rating to its corresponding movie title. 2. Filter the joined results to keep only the movie where `movie_title` equals 'Patti Smith: Dream of Life'. 3. Further filter the `ratings` rows to include only those where `user_trialist`...
[ "Join the `ratings` table with the `movies` table on the `movie_id` column to link each rating to its corresponding movie title.", "Filter the joined results to keep only the movie where `movie_title` equals 'Patti Smith: Dream of Life'.", "Further filter the `ratings` rows to include only those where `user_tri...
106
movie_platform
1. Join the ratings table to the movies table on the movie_id column to connect each rating score with its corresponding movie title. 2. Filter the joined rows to only those where movie_title matches 'Versailles Rive-Gauche'. 3. Compute the average of the rating_score column from the ratings table for the filtered set....
[ "Join the ratings table to the movies table on the movie_id column to connect each rating score with its corresponding movie title.", "Filter the joined rows to only those where movie_title matches 'Versailles Rive-Gauche'.", "Compute the average of the rating_score column from the ratings table for the filtere...
107
movie_platform
1. Join the ratings table with the movies table on the movie_id key to link each rating to its corresponding film. 2. Filter the ratings table to only rows where user_id equals 59988436, mapping the specified user in the question. 3. Further filter the ratings table to only rows where critic_comments equals 21, mapping...
[ "Join the ratings table with the movies table on the movie_id key to link each rating to its corresponding film.", "Filter the ratings table to only rows where user_id equals 59988436, mapping the specified user in the question.", "Further filter the ratings table to only rows where critic_comments equals 21, m...
119
movie_platform
1. Join the `ratings` table to the `movies` table on the shared `movie_id` column. 2. Filter the `movies` table to rows where `movie_title` equals 'Downfall', mapping the movie name from the external knowledge. 3. Filter the `ratings` table to rows where `rating_score` equals 4, mapping the rating value from the extern...
[ "Join the `ratings` table to the `movies` table on the shared `movie_id` column.", "Filter the `movies` table to rows where `movie_title` equals 'Downfall', mapping the movie name from the external knowledge.", "Filter the `ratings` table to rows where `rating_score` equals 4, mapping the rating value from the ...
134
movie_platform
1. Query the movies table to find the maximum movie_popularity value where movie_release_year equals 1995, applying the external knowledge that "released in 1995" maps to movie_release_year = 1995 and "most popularity movie" maps to MAX(movie_popularity). 2. Join the ratings table with the movies table on the shared mo...
[ "Query the movies table to find the maximum movie_popularity value where movie_release_year equals 1995, applying the external knowledge that \"released in 1995\" maps to movie_release_year = 1995 and \"most popularity movie\" maps to MAX(movie_popularity).", "Join the ratings table with the movies table on the s...
144
movie_platform
1. Query the lists table directly; no joins are needed since both required fields live there. 2. Filter rows where list_movie_number >= 200 to satisfy the "at least 200 movies" condition from the external knowledge. 3. Compute the average of list_followers across the filtered rows, applying the external knowledge mappi...
[ "Query the lists table directly; no joins are needed since both required fields live there.", "Filter rows where list_movie_number >= 200 to satisfy the \"at least 200 movies\" condition from the external knowledge.", "Compute the average of list_followers across the filtered rows, applying the external knowled...
147
movie_platform
1. Use the `lists` table to locate the record whose `list_title` matches 'Sound and Vision', applying the external knowledge that this list title is stored in the `list_title` column. 2. Join `lists_users` to `lists` on both `list_id` and `user_id` to connect the list with its creator and capture the creator's subscrip...
[ "Use the `lists` table to locate the record whose `list_title` matches 'Sound and Vision', applying the external knowledge that this list title is stored in the `list_title` column.", "Join `lists_users` to `lists` on both `list_id` and `user_id` to connect the list with its creator and capture the creator's subs...
150
movie_platform
1. Start from the `ratings` table and join it to the `movies` table on the shared `movie_id` key to link each rating to its movie title. 2. Filter the `ratings` rows to only those where `user_id` equals 39115684, since the external knowledge maps "user 39115684" to that exact column value. 3. Select `movie_title` from ...
[ "Start from the `ratings` table and join it to the `movies` table on the shared `movie_id` key to link each rating to its movie title.", "Filter the `ratings` rows to only those where `user_id` equals 39115684, since the external knowledge maps \"user 39115684\" to that exact column value.", "Select `movie_titl...
157
movie_platform
1. Filter the `movies` table to rows where `movie_release_year` is between 1970 and 1979, keeping `movie_id`, `director_id`, and `director_name`. 2. Group that filtered set by `director_id` and count `movie_id` to get each director’s number of 70s movies. 3. Compute the maximum of those counts to identify the highest n...
[ "Filter the `movies` table to rows where `movie_release_year` is between 1970 and 1979, keeping `movie_id`, `director_id`, and `director_name`.", "Group that filtered set by `director_id` and count `movie_id` to get each director’s number of 70s movies.", "Compute the maximum of those counts to identify the hig...
166
movie_platform
1. Start from the `movies` table and left join `ratings` on `movie_id` so every movie is kept even if it has no ratings. 2. Filter out any movies where `movie_release_year` is null, since only known years can be used to find the oldest. 3. Group by `movie_id`, `director_name`, and `movie_release_year` to collapse all r...
[ "Start from the `movies` table and left join `ratings` on `movie_id` so every movie is kept even if it has no ratings.", "Filter out any movies where `movie_release_year` is null, since only known years can be used to find the oldest.", "Group by `movie_id`, `director_name`, and `movie_release_year` to collapse...
168
book_publishing_company
1. Join the sales table with titles on title_id to connect order records with title names. 2. Filter to rows where the year of ord_date is 1992, mapping the requested year to the date column. 3. Group by title_id and sum the qty column to get the total ordered quantity per title. 4. Order the results by that summed qua...
[ "Join the sales table with titles on title_id to connect order records with title names.", "Filter to rows where the year of ord_date is 1992, mapping the requested year to the date column.", "Group by title_id and sum the qty column to get the total ordered quantity per title.", "Order the results by that su...
169
book_publishing_company
1. Recognize that the requested output columns—title, price, and publication date—are stored in the titles table, while the payment-terms condition resides in the sales table. 2. Join the sales table to the titles table using the shared title_id column to link each sale record to its corresponding title details. 3. App...
[ "Recognize that the requested output columns—title, price, and publication date—are stored in the titles table, while the payment-terms condition resides in the sales table.", "Join the sales table to the titles table using the shared title_id column to link each sale record to its corresponding title details.", ...
175
book_publishing_company
1. Identify that titles holds the required title, notes, and pubdate, while publishers holds the publisher name (pub_name). 2. Join titles and publishers using the common pub_id column. 3. Filter to rows where the year portion of pubdate is 1991. 4. Return the columns title, notes, and pub_name.
[ "Identify that titles holds the required title, notes, and pubdate, while publishers holds the publisher name (pub_name).", "Join titles and publishers using the common pub_id column.", "Filter to rows where the year portion of pubdate is 1991.", "Return the columns title, notes, and pub_name." ]
177
book_publishing_company
1. Group `sales` by `stor_id`, sum `qty` to determine the store with the highest overall quantity, and retain that single `stor_id`. 2. Join that store’s `sales` records to `stores` on `stor_id` and to `titles` on `title_id` to access `stor_name` and `title`. 3. Group by `stor_id` and `title` to compute per-title quant...
[ "Group `sales` by `stor_id`, sum `qty` to determine the store with the highest overall quantity, and retain that single `stor_id`.", "Join that store’s `sales` records to `stores` on `stor_id` and to `titles` on `title_id` to access `stor_name` and `title`.", "Group by `stor_id` and `title` to compute per-title...
181
book_publishing_company
1. Identify the employee table as the sole source; no joins are needed because first name, last name, and hire date all reside there. 2. Map the external knowledge that "hired before year 1990" means extracting the year from the hire_date column and comparing it to 1990. 3. Apply a filter keeping only rows where the ex...
[ "Identify the employee table as the sole source; no joins are needed because first name, last name, and hire date all reside there.", "Map the external knowledge that \"hired before year 1990\" means extracting the year from the hire_date column and comparing it to 1990.", "Apply a filter keeping only rows wher...
182
book_publishing_company
1. Use only the `employee` table because first name, last name, hire date, and job level all reside there; no joins are needed. 2. Compute the minimum value of `job_lvl` across the entire `employee` table to identify the lowest job level per the external knowledge. 3. Filter the `employee` rows to only those where `job...
[ "Use only the `employee` table because first name, last name, hire date, and job level all reside there; no joins are needed.", "Compute the minimum value of `job_lvl` across the entire `employee` table to identify the lowest job level per the external knowledge.", "Filter the `employee` rows to only those wher...
183
book_publishing_company
1. Use the employee table, which contains hire_date and emp_id; no joins are required. 2. Derive the calendar year from the hire_date column for each record. 3. Group the rows by that derived year and count emp_id within each group to compute the total hires per year. 4. Apply the external knowledge that "most hired em...
[ "Use the employee table, which contains hire_date and emp_id; no joins are required.", "Derive the calendar year from the hire_date column for each record.", "Group the rows by that derived year and count emp_id within each group to compute the total hires per year.", "Apply the external knowledge that \"most...
189
book_publishing_company
1. Join the titles and publishers tables on pub_id to connect each title record with its publisher name. 2. Filter to only titles whose pubdate falls in 1991 by extracting the year from the datetime column. 3. Group the results by publisher id and publisher name to prepare per-publisher aggregates. 4. In a subquery, co...
[ "Join the titles and publishers tables on pub_id to connect each title record with its publisher name.", "Filter to only titles whose pubdate falls in 1991 by extracting the year from the datetime column.", "Group the results by publisher id and publisher name to prepare per-publisher aggregates.", "In a subq...
206
book_publishing_company
1. Map the external knowledge phrase "Life Without Fear" to the title column in the titles table. 2. Join the titles table with the publishers table on the pub_id key to link the book to its publisher. 3. Filter for rows where titles.title equals exactly 'Life Without Fear'. 4. Return only the country column from the p...
[ "Map the external knowledge phrase \"Life Without Fear\" to the title column in the titles table.", "Join the titles table with the publishers table on the pub_id key to link the book to its publisher.", "Filter for rows where titles.title equals exactly 'Life Without Fear'.", "Return only the country column ...
209
book_publishing_company
1. Identify that "books" refers to the `titles` table and "sell the best" means the highest total `qty` from the `sales` table. 2. Group `sales` by `title_id`, sum `qty` to get total sales per book, order by that sum descending, and keep only the top 4 results. 3. Join those 4 best-selling `title_id` values back to the...
[ "Identify that \"books\" refers to the `titles` table and \"sell the best\" means the highest total `qty` from the `sales` table.", "Group `sales` by `title_id`, sum `qty` to get total sales per book, order by that sum descending, and keep only the top 4 results.", "Join those 4 best-selling `title_id` values b...
214
book_publishing_company
1. Target the `titles` table, which contains both the book `type` and the pre-paid amount stored in the `advance` column. 2. Map the question’s phrase “most pre-paid amount” to the `advance` column, interpreting “most” as the maximum value. 3. Sort all records by `advance` in descending order so the row with the highes...
[ "Target the `titles` table, which contains both the book `type` and the pre-paid amount stored in the `advance` column.", "Map the question’s phrase “most pre-paid amount” to the `advance` column, interpreting “most” as the maximum value.", "Sort all records by `advance` in descending order so the row with the ...
216
book_publishing_company
1. Look in the `employee` table since it stores staff records including names and job levels. 2. Map the question's phrase "job level" to the `job_lvl` column using the external knowledge. 3. Map the surname "O'Rourke" to the `lname` column, escaping the embedded apostrophe as two single quotes in the string literal. 4...
[ "Look in the `employee` table since it stores staff records including names and job levels.", "Map the question's phrase \"job level\" to the `job_lvl` column using the external knowledge.", "Map the surname \"O'Rourke\" to the `lname` column, escaping the embedded apostrophe as two single quotes in the string ...
222
book_publishing_company
1. Identify that the requested "notes" column is in the titles table and that "order happened on" maps to ord_date in the sales table. 2. Join titles with sales on title_id to link each order record to its corresponding title details. 3. Filter the results to only orders whose ord_date falls on September 14, 1994, by c...
[ "Identify that the requested \"notes\" column is in the titles table and that \"order happened on\" maps to ord_date in the sales table.", "Join titles with sales on title_id to link each order record to its corresponding title details.", "Filter the results to only orders whose ord_date falls on September 14, ...
226
book_publishing_company
1. Identify the target employee in the employee table by filtering fname to 'Victoria', minit to 'P', and lname to 'Ashworth'. 2. Recognize that the employee table does not contain a city column; city is stored in the publishers table linked by pub_id. 3. Inner join employee to publishers on the pub_id column to connec...
[ "Identify the target employee in the employee table by filtering fname to 'Victoria', minit to 'P', and lname to 'Ashworth'.", "Recognize that the employee table does not contain a city column; city is stored in the publishers table linked by pub_id.", "Inner join employee to publishers on the pub_id column to ...
227
book_publishing_company
1. Join the sales table with the stores table on the stor_id column to connect orders to store locations. 2. Filter the results to only rows where stores.city equals 'Remulade', applying the external knowledge that Remulade is a city. 3. Count distinct values of sales.ord_num, since the external knowledge specifies tha...
[ "Join the sales table with the stores table on the stor_id column to connect orders to store locations.", "Filter the results to only rows where stores.city equals 'Remulade', applying the external knowledge that Remulade is a city.", "Count distinct values of sales.ord_num, since the external knowledge specifi...
228
book_publishing_company
1. Join the sales table to stores on stor_id to pair every order quantity with its store city. 2. Filter the joined rows to orders placed in 1993 by checking the year of ord_date. 3. Compute two conditional sums of qty from sales: one total where city is 'Fremont' and another where city is 'Portland'. 4. Calculate the ...
[ "Join the sales table to stores on stor_id to pair every order quantity with its store city.", "Filter the joined rows to orders placed in 1993 by checking the year of ord_date.", "Compute two conditional sums of qty from sales: one total where city is 'Fremont' and another where city is 'Portland'.", "Calcul...
230
book_publishing_company
1. Use only the `employee` table since all required fields are present there. 2. Select the `fname`, `minit`, and `lname` columns to compose the full name. 3. Filter rows by extracting the year from `hire_date` and keeping those between 1990 and 1995 inclusive. 4. Order the output by `job_lvl` in descending order.
[ "Use only the `employee` table since all required fields are present there.", "Select the `fname`, `minit`, and `lname` columns to compose the full name.", "Filter rows by extracting the year from `hire_date` and keeping those between 1990 and 1995 inclusive.", "Order the output by `job_lvl` in descending ord...
237
book_publishing_company
1. Start with the `titles` table, applying the external knowledge that the `notes` column stores what a title is about. 2. Filter to the single row where `notes` exactly matches the description regarding helpful hints on using electronic resources. 3. Join the filtered `titles` records to the `publishers` table on the ...
[ "Start with the `titles` table, applying the external knowledge that the `notes` column stores what a title is about.", "Filter to the single row where `notes` exactly matches the description regarding helpful hints on using electronic resources.", "Join the filtered `titles` records to the `publishers` table o...
239
book_publishing_company
1. Join sales to stores on stor_id, apply the external knowledge that California means state equals 'CA', then group by sales.title_id and sum sales.qty to compute each title's total California sales. 2. Calculate the average across all those per-title California sales totals to establish the threshold for "more than a...
[ "Join sales to stores on stor_id, apply the external knowledge that California means state equals 'CA', then group by sales.title_id and sum sales.qty to compute each title's total California sales.", "Calculate the average across all those per-title California sales totals to establish the threshold for \"more t...
240
retail_complains
1. Target the callcenterlogs table, which contains both the complaint receipt date and the server time metric. 2. Map "day received" to the `Date received` column and "most verbose complaint" to the maximum ser_time per the external knowledge. 3. Compute the maximum ser_time across all rows in callcenterlogs. 4. Filter...
[ "Target the callcenterlogs table, which contains both the complaint receipt date and the server time metric.", "Map \"day received\" to the `Date received` column and \"most verbose complaint\" to the maximum ser_time per the external knowledge.", "Compute the maximum ser_time across all rows in callcenterlogs....
241
retail_complains
1. Target the callcenterlogs table, which stores both the complaint receipt date and the server start time. 2. Filter rows where `Date received` is exactly '2017-03-22' to isolate complaints from that day. 3. Apply the external knowledge that "earliest complaint" corresponds to the oldest value in the `ser_start` colum...
[ "Target the callcenterlogs table, which stores both the complaint receipt date and the server start time.", "Filter rows where `Date received` is exactly '2017-03-22' to isolate complaints from that day.", "Apply the external knowledge that \"earliest complaint\" corresponds to the oldest value in the `ser_star...
245
retail_complains
1. Map the requested "detailed product" to the `Sub-product` column in the `events` table. 2. Identify the client by filtering the `client` table on `first` = 'Diesel' and `last` = 'Galloway'. 3. Join `client` to `events` using `client_id` = `Client_ID` to link the person to their complaints. 4. Filter the `events` rec...
[ "Map the requested \"detailed product\" to the `Sub-product` column in the `events` table.", "Identify the client by filtering the `client` table on `first` = 'Diesel' and `last` = 'Galloway'.", "Join `client` to `events` using `client_id` = `Client_ID` to link the person to their complaints.", "Filter the `e...
248
retail_complains
1. Join the client table to callcenterlogs on client_id matching rand client to connect clients with their complaint records. 2. Filter the callcenterlogs rows to only those where Date received equals '2017-03-27'. 3. Further filter to only rows where the server column equals 'MICHAL'. 4. Return the first, middle, and ...
[ "Join the client table to callcenterlogs on client_id matching rand client to connect clients with their complaint records.", "Filter the callcenterlogs rows to only those where Date received equals '2017-03-27'.", "Further filter to only rows where the server column equals 'MICHAL'.", "Return the first, midd...
263
retail_complains
1. Join the events table to the client table on client_id matching Client_ID to associate each complaint with its client’s name and sex. 2. Filter the client side to sex = 'Male' (from “Mr.”), first = 'Brantley', middle = 'Julian', and last = 'Stanley'. 3. Filter the events side to Date received = '2012-05-18', mapping...
[ "Join the events table to the client table on client_id matching Client_ID to associate each complaint with its client’s name and sex.", "Filter the client side to sex = 'Male' (from “Mr.”), first = 'Brantley', middle = 'Julian', and last = 'Stanley'.", "Filter the events side to Date received = '2012-05-18', m...
265
retail_complains
1. Start with the reviews table to retrieve the review text from the Reviews column. 2. Filter the reviews rows to the specific date '2017-07-22' using the Date column. 3. Since city names are stored in the district table, join reviews to district on their shared district_id key. 4. Apply the city filter by restricting...
[ "Start with the reviews table to retrieve the review text from the Reviews column.", "Filter the reviews rows to the specific date '2017-07-22' using the Date column.", "Since city names are stored in the district table, join reviews to district on their shared district_id key.", "Apply the city filter by res...
267
retail_complains
1. Join the `reviews` table with the `district` table on the `district_id` key to connect star ratings to city locations. 2. Filter `reviews` to rows where `Product` equals 'Eagle Capital' per the external knowledge mapping. 3. Filter the joined result to rows where `district`.`city` equals 'Little Rock'. 4. Filter `re...
[ "Join the `reviews` table with the `district` table on the `district_id` key to connect star ratings to city locations.", "Filter `reviews` to rows where `Product` equals 'Eagle Capital' per the external knowledge mapping.", "Filter the joined result to rows where `district`.`city` equals 'Little Rock'.", "Fi...
273
retail_complains
1. Use only the client table since all requested demographic fields are stored there. 2. Map full name to the first, middle, and last columns; map date of birth to the year, month, and day columns; map email id to the email column. 3. Filter rows to elderly clients by requiring age to be greater than 65. 4. Return exac...
[ "Use only the client table since all requested demographic fields are stored there.", "Map full name to the first, middle, and last columns; map date of birth to the year, month, and day columns; map email id to the email column.", "Filter rows to elderly clients by requiring age to be greater than 65.", "Ret...
274
retail_complains
1. Use the reviews table alone; no joins are required because Product and Stars are both in it. 2. Filter the rows to only those where Stars equals 5. 3. Group the filtered results by Product and count the rows in each group to compute the number of five-star reviews per product. 4. Wrap that grouped query as a derived...
[ "Use the reviews table alone; no joins are required because Product and Stars are both in it.", "Filter the rows to only those where Stars equals 5.", "Group the filtered results by Product and count the rows in each group to compute the number of five-star reviews per product.", "Wrap that grouped query as a...
282
retail_complains
1. Join the client table with the events table on client_id matching Client_ID to link each client to their complaint records. 2. Filter the client table to only those with a year value between 1980 and 2000. 3. Restrict results to male clients by requiring the sex column to equal 'Male'. 4. Filter the events table so ...
[ "Join the client table with the events table on client_id matching Client_ID to link each client to their complaint records.", "Filter the client table to only those with a year value between 1980 and 2000.", "Restrict results to male clients by requiring the sex column to equal 'Male'.", "Filter the events t...
283
retail_complains
1. Join the `events` table to the `client` table on `events.Client_ID` = `client.client_id` to link each complaint to its client's state. 2. Filter for Florida by mapping it to `client.state` = 'FL'. 3. Map "medium" to the `events.Submitted via` column and group the filtered results by this column. 4. Count the number ...
[ "Join the `events` table to the `client` table on `events.Client_ID` = `client.client_id` to link each complaint to its client's state.", "Filter for Florida by mapping it to `client.state` = 'FL'.", "Map \"medium\" to the `events.Submitted via` column and group the filtered results by this column.", "Count t...
286
retail_complains
1. Join the client table to the events table on client_id (client.client_id = events.Client_ID) to link each client with their complaint records and tags. 2. Filter the events table to only rows where Tags equals 'Servicemember' to identify complaints from service members. 3. Filter the client table to only rows where ...
[ "Join the client table to the events table on client_id (client.client_id = events.Client_ID) to link each client with their complaint records and tags.", "Filter the events table to only rows where Tags equals 'Servicemember' to identify complaints from service members.", "Filter the client table to only rows ...
310
retail_complains
1. Join the client table to the events table on client_id = Client_ID to link each client with their complaints. 2. Filter client.sex to 'Female' and client.year to 2000 to restrict to female clients born in 2000. 3. Filter the events table so that Submitted via is not equal to 'Web', mapping the external knowledge tha...
[ "Join the client table to the events table on client_id = Client_ID to link each client with their complaints.", "Filter client.sex to 'Female' and client.year to 2000 to restrict to female clients born in 2000.", "Filter the events table so that Submitted via is not equal to 'Web', mapping the external knowled...
314
retail_complains
1. Join the events table to the client table using events.Client_ID = client.client_id to access both the complaint submission method and client age. 2. Filter the joined records to only those where events."Submitted via" equals 'Postal mail', mapping the external knowledge that "sent their complaints by" refers to thi...
[ "Join the events table to the client table using events.Client_ID = client.client_id to access both the complaint submission method and client age.", "Filter the joined records to only those where events.\"Submitted via\" equals 'Postal mail', mapping the external knowledge that \"sent their complaints by\" refer...
315
retail_complains
1. Join the `client` table to the `district` table on the `district_id` key so that each client record is linked to its city. 2. Filter the joined rows to keep only those where the `city` column in `district` equals 'Norwalk', applying the external knowledge mapping. 3. Compute the average age by summing the `age` valu...
[ "Join the `client` table to the `district` table on the `district_id` key so that each client record is linked to its city.", "Filter the joined rows to keep only those where the `city` column in `district` equals 'Norwalk', applying the external knowledge mapping.", "Compute the average age by summing the `age...
318
retail_complains
1. Filter the client table to rows where the first name is 'Noah' and the last name is 'Thompson'. 2. Join the filtered client record to the district table on district_id to retrieve the state abbreviation. 3. Join the district result to the state table on state_abbrev matching StateCode to access the region. 4. Return...
[ "Filter the client table to rows where the first name is 'Noah' and the last name is 'Thompson'.", "Join the filtered client record to the district table on district_id to retrieve the state abbreviation.", "Join the district result to the state table on state_abbrev matching StateCode to access the region.", ...
321
retail_complains
1. Use the events table as the starting point to link complaints, clients, and products. 2. Join client on events.Client_ID = client.client_id, then filter to first = 'Kendall', last = 'Allen', and sex = 'Female'. 3. Join callcenterlogs on events.`Complaint ID` = callcenterlogs.`Complaint ID` to access the ser_time col...
[ "Use the events table as the starting point to link complaints, clients, and products.", "Join client on events.Client_ID = client.client_id, then filter to first = 'Kendall', last = 'Allen', and sex = 'Female'.", "Join callcenterlogs on events.`Complaint ID` = callcenterlogs.`Complaint ID` to access the ser_ti...
323
retail_complains
1. Join the client table to the events table on client.client_id = events.Client_ID to link each client with their complaint records. 2. Filter the client rows to only those where the city column equals 'New York City'. 3. Filter the events rows to only those where the `Submitted via` column equals 'Fax', applying the ...
[ "Join the client table to the events table on client.client_id = events.Client_ID to link each client with their complaint records.", "Filter the client rows to only those where the city column equals 'New York City'.", "Filter the events rows to only those where the `Submitted via` column equals 'Fax', applyin...
324
retail_complains
1. Start from the events table and filter to rows where Product equals 'Credit card', applying the external knowledge that credit cards map to the Product column. 2. Select distinct Client_ID from those filtered rows so each client is counted only once regardless of multiple complaints. 3. Join this deduplicated set wi...
[ "Start from the events table and filter to rows where Product equals 'Credit card', applying the external knowledge that credit cards map to the Product column.", "Select distinct Client_ID from those filtered rows so each client is counted only once regardless of multiple complaints.", "Join this deduplicated ...
330
retail_complains
1. Join the district and client tables on the district_id column to associate each client with their geographic division. 2. Filter the joined results to only rows where the district division equals 'Pacific'. 3. Map the requested "full names" to the first, middle, and last columns in the client table. 4. Return the fi...
[ "Join the district and client tables on the district_id column to associate each client with their geographic division.", "Filter the joined results to only rows where the district division equals 'Pacific'.", "Map the requested \"full names\" to the first, middle, and last columns in the client table.", "Ret...
333
retail_complains
1. Use the client table for address columns and the events table for complaint date and submission method. 2. Join client to events on client_id matching Client_ID. 3. Filter events.Date received to '2012-03-14' based on the March 14 2012 external knowledge mapping. 4. Filter events.Submitted via to 'Postal mail' based...
[ "Use the client table for address columns and the events table for complaint date and submission method.", "Join client to events on client_id matching Client_ID.", "Filter events.Date received to '2012-03-14' based on the March 14 2012 external knowledge mapping.", "Filter events.Submitted via to 'Postal mai...
337
retail_complains
1. Filter the client table to the row where the email column equals 'skylar.ramirez@gmail.com'. 2. Join the district table on district_id to retrieve the state_abbrev for that client. 3. Join the state table on state_abbrev matching StateCode to obtain the full state name. 4. Return only the State column from the state...
[ "Filter the client table to the row where the email column equals 'skylar.ramirez@gmail.com'.", "Join the district table on district_id to retrieve the state_abbrev for that client.", "Join the state table on state_abbrev matching StateCode to obtain the full state name.", "Return only the State column from t...
339
retail_complains
1. Use the client table for owner identity and the callcenterlogs table for complaint details including final phone number, server, and date. 2. Join client to callcenterlogs on client_id matching rand client to link each complaint to its owner. 3. Filter callcenterlogs to server equal to MORIAH. 4. Filter callcenterlo...
[ "Use the client table for owner identity and the callcenterlogs table for complaint details including final phone number, server, and date.", "Join client to callcenterlogs on client_id matching rand client to link each complaint to its owner.", "Filter callcenterlogs to server equal to MORIAH.", "Filter call...
340
retail_complains
1. Inner join the client table with callcenterlogs on client_id matching rand client to associate each caller’s age with their complaint’s server time. 2. Convert the textual ser_time values from HH:MM:SS format into decimal minutes by calculating hours multiplied by 60 plus minutes plus seconds divided by 60. 3. Use c...
[ "Inner join the client table with callcenterlogs on client_id matching rand client to associate each caller’s age with their complaint’s server time.", "Convert the textual ser_time values from HH:MM:SS format into decimal minutes by calculating hours multiplied by 60 plus minutes plus seconds divided by 60.", ...
346
retail_complains
1. Identify that client emails are stored in the client table and complaint types are stored in callcenterlogs. 2. Join client to callcenterlogs on client_id matching rand client. 3. Filter the joined rows to only those where callcenterlogs.type equals 'PS'. 4. Select distinct values of the email column from the client...
[ "Identify that client emails are stored in the client table and complaint types are stored in callcenterlogs.", "Join client to callcenterlogs on client_id matching rand client.", "Filter the joined rows to only those where callcenterlogs.type equals 'PS'.", "Select distinct values of the email column from th...
353
retail_complains
1. Note from the external knowledge that last name refers to the last column in the client table, and that 0 priority means the priority column in callcenterlogs equals 0. 2. Form an inner join between the client table and the callcenterlogs table on client_id equals rand client to link each client to their complaint r...
[ "Note from the external knowledge that last name refers to the last column in the client table, and that 0 priority means the priority column in callcenterlogs equals 0.", "Form an inner join between the client table and the callcenterlogs table on client_id equals rand client to link each client to their complai...
354
retail_complains
1. Identify that client first names reside in the `client` table while call IDs reside in `callcenterlogs`, so a join between these two tables is required. 2. Link `client` to `callcenterlogs` on `client_id` equal to the `rand client` foreign key. 3. Apply the filter that `client.first` begins with the letter B, mappin...
[ "Identify that client first names reside in the `client` table while call IDs reside in `callcenterlogs`, so a join between these two tables is required.", "Link `client` to `callcenterlogs` on `client_id` equal to the `rand client` foreign key.", "Apply the filter that `client.first` begins with the letter B, ...
365
retail_complains
1. Query only the callcenterlogs table because it holds every required output field and predicate; no joins are necessary. 2. Map the external knowledge term "final phone number" to the phonefinal column. 3. Map the date range 1/1/2014 to 12/30/2014 to the Date received column by keeping only 2014 dates and excluding 2...
[ "Query only the callcenterlogs table because it holds every required output field and predicate; no joins are necessary.", "Map the external knowledge term \"final phone number\" to the phonefinal column.", "Map the date range 1/1/2014 to 12/30/2014 to the Date received column by keeping only 2014 dates and exc...
367
retail_complains
1. Use the `events` table exclusively; no joins are needed because `Date received`, `Product`, and `Issue` are all in this table. 2. Filter rows to `Product` = 'Credit card' and `Issue` = 'Overlimit fee', applying the external knowledge that maps credit card customers to that product and overlimit fees to that issue. 3...
[ "Use the `events` table exclusively; no joins are needed because `Date received`, `Product`, and `Issue` are all in this table.", "Filter rows to `Product` = 'Credit card' and `Issue` = 'Overlimit fee', applying the external knowledge that maps credit card customers to that product and overlimit fees to that issu...
369
retail_complains
1. Join `client` with `district` on `district_id` so the city of each client is available. 2. Keep only rows where `district.city` equals Indianapolis. 3. Find the single latest birthdate among those rows by ordering `year` DESC, `month` DESC, `day` DESC and limiting to one record. 4. Filter that same Indianapolis set ...
[ "Join `client` with `district` on `district_id` so the city of each client is available.", "Keep only rows where `district.city` equals Indianapolis.", "Find the single latest birthdate among those rows by ordering `year` DESC, `month` DESC, `day` DESC and limiting to one record.", "Filter that same Indianapo...
371
retail_complains
1. Join `callcenterlogs` with `events` on the shared `Complaint ID` key to connect server time data with complaint issue details. 2. Filter the joined rows to keep only those where `events.Issue` equals 'Arbitration'. 3. Map the phrase "longest server time" to the maximum value of `callcenterlogs.ser_time` using the pr...
[ "Join `callcenterlogs` with `events` on the shared `Complaint ID` key to connect server time data with complaint issue details.", "Filter the joined rows to keep only those where `events.Issue` equals 'Arbitration'.", "Map the phrase \"longest server time\" to the maximum value of `callcenterlogs.ser_time` usin...
376
retail_complains
1. Use the `client` table, which contains both client names and their city of residence. 2. Map the question's "New York city" to the `city` column using the exact string value 'New York City' from external knowledge. 3. Filter rows by applying the condition `city = 'New York City'`. 4. Return the `first` and `last` co...
[ "Use the `client` table, which contains both client names and their city of residence.", "Map the question's \"New York city\" to the `city` column using the exact string value 'New York City' from external knowledge.", "Filter rows by applying the condition `city = 'New York City'`.", "Return the `first` and...
380
retail_complains
1. Join the `client` table with the `district` table on the `district_id` key to link each client to their geographic division. 2. Filter the joined rows to only those where the `district` table's `division` column equals 'South Atlantic', applying the external knowledge mapping. 3. Calculate the average of the `age` c...
[ "Join the `client` table with the `district` table on the `district_id` key to link each client to their geographic division.", "Filter the joined rows to only those where the `district` table's `division` column equals 'South Atlantic', applying the external knowledge mapping.", "Calculate the average of the `...
381
retail_complains
1. Join client to district on district_id, then district to state on state_abbrev to link each client to their region. 2. Filter for rows where state.Region equals 'Midwest'. 3. Group by district.city and count client.client_id to compute the number of clients per Midwest city. 4. Compute the minimum of those city-leve...
[ "Join client to district on district_id, then district to state on state_abbrev to link each client to their region.", "Filter for rows where state.Region equals 'Midwest'.", "Group by district.city and count client.client_id to compute the number of clients per Midwest city.", "Compute the minimum of those c...
385
retail_complains
1. Use the district table and treat state_abbrev as the state identifier per external knowledge. 2. Group the rows by state_abbrev to aggregate data per state. 3. Count distinct cities within each state, since multiple district rows may reference the same city. 4. In a subquery, compute the same distinct-city counts by...
[ "Use the district table and treat state_abbrev as the state identifier per external knowledge.", "Group the rows by state_abbrev to aggregate data per state.", "Count distinct cities within each state, since multiple district rows may reference the same city.", "In a subquery, compute the same distinct-city c...
388
retail_complains
1. Join the client table to the events table on client_id matching Client_ID to associate each complaint with its client. 2. Filter the events table to only rows where the year of Date received is 2012. 3. Filter the events table to only rows where the Product column equals Credit card. 4. Filter the client table to on...
[ "Join the client table to the events table on client_id matching Client_ID to associate each complaint with its client.", "Filter the events table to only rows where the year of Date received is 2012.", "Filter the events table to only rows where the Product column equals Credit card.", "Filter the client tab...
402
retail_complains
1. Join callcenterlogs and events on the Complaint ID column to combine server information with product and complaint date data. 2. Use the external knowledge mapping March 2017 to filter the events table's Date received column for dates beginning with 2017-03. 3. Filter the callcenterlogs table to include only rows wh...
[ "Join callcenterlogs and events on the Complaint ID column to combine server information with product and complaint date data.", "Use the external knowledge mapping March 2017 to filter the events table's Date received column for dates beginning with 2017-03.", "Filter the callcenterlogs table to include only r...
406
retail_complains
1. Join the `client` table to the `events` table on `client_id` = `Client_ID` to connect each client's age with their complaint details. 2. Compute the average age of all clients and derive the threshold as 60% of that average, per the external knowledge. 3. Filter the joined rows to keep only those where the client's ...
[ "Join the `client` table to the `events` table on `client_id` = `Client_ID` to connect each client's age with their complaint details.", "Compute the average age of all clients and derive the threshold as 60% of that average, per the external knowledge.", "Filter the joined rows to keep only those where the cli...
408
movies_4
1. Filter the movie table to the record where title equals 'Four Rooms' using the external knowledge mapping for the movie name. 2. Join movie_company on movie_id to link the selected movie to its associated production company records. 3. Join production_company on company_id to access the corresponding company_name va...
[ "Filter the movie table to the record where title equals 'Four Rooms' using the external knowledge mapping for the movie name.", "Join movie_company on movie_id to link the selected movie to its associated production company records.", "Join production_company on company_id to access the corresponding company_n...
410
movies_4
1. Identify the three tables needed: production_company to locate the company, movie_company as the bridge table linking companies to movies, and movie to retrieve the final titles. 2. Apply the external knowledge by filtering production_company to only rows where company_name equals 'Universal Pictures'. 3. Join movie...
[ "Identify the three tables needed: production_company to locate the company, movie_company as the bridge table linking companies to movies, and movie to retrieve the final titles.", "Apply the external knowledge by filtering production_company to only rows where company_name equals 'Universal Pictures'.", "Join...
412
movies_4
1. Filter the movie table to the record where the title is "Pirates of the Caribbean: At World's End". 2. Join movie_crew to that movie on movie_id to access the film's crew members. 3. Apply the external knowledge that "director of photography" maps to the job column in movie_crew, filtering to rows where job equals '...
[ "Filter the movie table to the record where the title is \"Pirates of the Caribbean: At World's End\".", "Join movie_crew to that movie on movie_id to access the film's crew members.", "Apply the external knowledge that \"director of photography\" maps to the job column in movie_crew, filtering to rows where jo...
414
movies_4
1. Filter the movie table by the title column to isolate 'Pirates of the Caribbean: At World's End', applying the external knowledge mapping for the quoted title and escaping the embedded apostrophe. 2. Join the filtered movie table to movie_crew on movie_id to retrieve all crew records linked to that specific film. 3....
[ "Filter the movie table by the title column to isolate 'Pirates of the Caribbean: At World's End', applying the external knowledge mapping for the quoted title and escaping the embedded apostrophe.", "Join the filtered movie table to movie_crew on movie_id to retrieve all crew records linked to that specific film...
End of preview. Expand in Data Studio

BIRD-Platinum Training Hints

One hint for each of the 2,064 questions on the training side of the ReViSQL authors' verified release of BIRD-Platinum, written against the same rows our recipe trained on (see BIRD-Platinum-Hard, whose split config lists the partition). Each hint is a numbered plan of 3 to 6 short steps.

How the hints were made

The hints were generated by Kimi K2.6 at temperature 0. For each question the model saw the question, its evidence, the database schema and the gold SQL query, and wrote a short plan for reaching the answer.

How we used them

During reinforcement-learning training, when all 16 attempts at a question failed, the question was sampled again with Training hint: and the hint appended to the prompt, and that group was trained on instead. Hints are a training aid only. Never show them at evaluation time.

What to expect

The hints recover a learning signal from questions the model otherwise fails on every attempt: a hinted re-run usually gets at least some attempts right. Because the hints were written with access to the gold query, some are quite direct, and the model then solves the hinted question on every attempt. We're releasing it because training with it gave us some eval lift. We expect a set written by human experts to outperform it.

Fields

  • question_id: the BIRD question id; joins to BIRD-Platinum's question_id
  • db_id: the BIRD training database
  • hint: the hint as appended to the prompt
  • steps: the same hint split into its steps

Usage

from datasets import load_dataset

hints = load_dataset("scottfitz/BIRD-Platinum-Hints", split="train")

License and attribution

CC BY-SA 4.0. The hints are derived from BIRD-Platinum (Zhu et al., 2026), which is derived from BIRD (Li et al., 2023); both are licensed CC BY-SA 4.0.

Citation

@article{zhu2026revisql,
  title   = {Human-Level Text-to-SQL via Reinforcement Learning on Verified Data, Without Pipeline Engineering},
  author  = {Zhu, Yuxuan and Jin, Tengjun and Choi, Yoojin and Kang, Daniel},
  journal = {arXiv preprint arXiv:2603.20004},
  year    = {2026}
}

@inproceedings{li2023bird,
  title     = {Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLs},
  author    = {Li, Jinyang and others},
  booktitle = {Advances in Neural Information Processing Systems},
  year      = {2023}
}
Downloads last month
44

Paper for scottfitz/BIRD-Platinum-Hints