question stringlengths 1 606 | db_id stringclasses 139
values | external_knowledge stringclasses 1
value | sql stringlengths 19 1.35k | data_source stringclasses 1
value | prompt listlengths 2 2 | ability stringclasses 1
value | reward_model dict | extra_info dict |
|---|---|---|---|---|---|---|---|---|
Among swimmers who participated in the event held at the stadium with the lowest ID, what are their IDs and 100-meter times for the five slowest swimmers? | swimming | select t0.id, t0.meter_100 as c1 from swimmer as t0 join record as t1 on t0.id = t1.swimmer_id join event as t2 on t1.event_id = t2.id, (select name as c2 from event group by c2 order by min(stadium_id) asc nulls last limit 1) as t0 where t2.name = t0.c2 order by c1 asc nulls last limit 5 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "swimming",
"sql": "select t0.id, t0.meter_100 as c1 from swimmer as t0 join record as t1 on t0.id = t1.swimmer_id join event as t2 on t1.event_id = t2.id, (select name as c2 from event group by c2 order by min(stadium_id) asc nulls last limit 1) as t0 where t2.name = t0.c2 order ... | {
"index": 1618,
"split": "train"
} | |
What are the product ID, size, and color for products purchased by customers named Devin Glover or customers whose first name starts with "Devi"? | customers_and_invoices | select t0.product_id, t0.product_size, t0.product_color from products as t0 join order_items as t1 on t0.product_id = t1.product_id join orders as t2 on t1.order_id = t2.order_id join customers as t3 on t2.customer_id = t3.customer_id where t3.customer_first_name = 'Devin' and t3.customer_last_name = 'Glover' or t3.cus... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customers_and_invoices",
"sql": "select t0.product_id, t0.product_size, t0.product_color from products as t0 join order_items as t1 on t0.product_id = t1.product_id join orders as t2 on t1.order_id = t2.order_id join customers as t3 on t2.customer_id = t3.customer_id where t3.cus... | {
"index": 215,
"split": "train"
} | |
What is the number of records, the youngest age, and the number of unique names for each person in the database? | wedding | select name as c3, count(*), min(age), count(distinct (name)) from people group by c3 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "wedding",
"sql": "select name as c3, count(*), min(age), count(distinct (name)) from people group by c3"
},
"style": "rule"
} | {
"index": 1838,
"split": "train"
} | |
Can you list the top 10 airports along with their domestic passenger counts, total passenger numbers, associated aircraft IDs, and aircraft descriptions for matches where the winning aircraft came from a country ending with "rmany" or from the country with the most matches overall? Please sort the results by aircraft d... | aircraft | select t0.domestic_passengers, t0.airport_name, t0.total_passengers, t2.aircraft_id, t2.description as c3 from airport as t0 join airport_aircraft as t1 on t0.airport_id = t1.airport_id join aircraft as t2 on t1.aircraft_id = t2.aircraft_id join match as t3 on t2.aircraft_id = t3.winning_aircraft, (select country as c4... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "aircraft",
"sql": "select t0.domestic_passengers, t0.airport_name, t0.total_passengers, t2.aircraft_id, t2.description as c3 from airport as t0 join airport_aircraft as t1 on t0.airport_id = t1.airport_id join aircraft as t2 on t1.aircraft_id = t2.aircraft_id join match as t3 on ... | {
"index": 550,
"split": "train"
} | |
What are the pages per minute color, product name, and product ID for the product with ID 6 available in store 2? | store_product | select t0.pages_per_minute_color, t0.product from product as t0 join store_product as t1 on t0.product_id = t1.product_id where t1.store_id = 2 and t1.product_id = 6 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "store_product",
"sql": "select t0.pages_per_minute_color, t0.product from product as t0 join store_product as t1 on t0.product_id = t1.product_id where t1.store_id = 2 and t1.product_id = 6"
},
"style": "rule"
} | {
"index": 2163,
"split": "train"
} | |
What are the product type codes and product IDs of the top 10 most expensive products with product IDs greater than 13? | department_store | select t0.product_type_code from products as t0 join order_items as t1 on t0.product_id = t1.product_id where t1.product_id > 13 order by t0.product_price desc limit 10 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "department_store",
"sql": "select t0.product_type_code from products as t0 join order_items as t1 on t0.product_id = t1.product_id where t1.product_id > 13 order by t0.product_price desc limit 10"
},
"style": "rule"
} | {
"index": 2462,
"split": "train"
} | |
Can you tell me the director, release year, and budget of the most expensive movie associated with the least common book club linked to movies that have "7" in their movie ID? | culture_company | select t0.director, t0.year, t0.budget_million as c3 from movie as t0 join culture_company as t1 on t0.movie_id = t1.movie_id, (select book_club_id as c2 from culture_company where movie_id like '%7%' group by c2 order by count(*) asc nulls last limit 1) as t0 where t1.book_club_id = t0.c2 order by c3 desc limit 1 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "culture_company",
"sql": "select t0.director, t0.year, t0.budget_million as c3 from movie as t0 join culture_company as t1 on t0.movie_id = t1.movie_id, (select book_club_id as c2 from culture_company where movie_id like '%7%' group by c2 order by count(*) asc nulls last limit 1)... | {
"index": 1978,
"split": "train"
} | |
What is the address start date, customer ID, name, and phone number of the customer with the lowest phone number (alphabetically) who has placed an order and has a customer ID of either 13 or between 1 and 6? | customers_and_products_contacts | select t0.date_from, t0.customer_id, t1.customer_name, t1.customer_phone as c2 from customer_address_history as t0 join customers as t1 on t0.customer_id = t1.customer_id join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.customer_id = 13 or t2.customer_id between 1 and 6 order by c2 asc nulls last ... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customers_and_products_contacts",
"sql": "select t0.date_from, t0.customer_id, t1.customer_name, t1.customer_phone as c2 from customer_address_history as t0 join customers as t1 on t0.customer_id = t1.customer_id join customer_orders as t2 on t1.customer_id = t2.customer_id where... | {
"index": 896,
"split": "train"
} | |
What are the details of the last 10 accounts involved in payment transactions, including their other account details, customer IDs, and account IDs, sorted by account ID from highest to lowest? | customers_card_transactions | select t0.other_account_details, t0.customer_id, t0.account_id as c1 from accounts as t0 join financial_transactions as t1 on t0.account_id = t1.account_id where t1.transaction_type = 'Payment' or t1.transaction_type = 'Payment' order by c1 desc limit 10 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customers_card_transactions",
"sql": "select t0.other_account_details, t0.customer_id, t0.account_id as c1 from accounts as t0 join financial_transactions as t1 on t0.account_id = t1.account_id where t1.transaction_type = 'Payment' or t1.transaction_type = 'Payment' order by c1 d... | {
"index": 1185,
"split": "train"
} | |
Which books have been published both in dates containing the digit "2" and at a price of 6 million or more, and what are their issues counts and book IDs? | book_2 | select anon_1.c0, anon_1.c1 from (select t0.issues as c0, t0.book_id as c1 from book as t0 join publication as t1 on t0.book_id = t1.book_id where t1.publication_date like '%2%' intersect select t0.issues as c0, t0.book_id as c1 from book as t0 join publication as t1 on t0.book_id = t1.book_id where t1.price >= 6000000... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "book_2",
"sql": "select anon_1.c0, anon_1.c1 from (select t0.issues as c0, t0.book_id as c1 from book as t0 join publication as t1 on t0.book_id = t1.book_id where t1.publication_date like '%2%' intersect select t0.issues as c0, t0.book_id as c1 from book as t0 join publication a... | {
"index": 2917,
"split": "train"
} | |
Does the grant with ID 2 have an earlier end date than the grant with ID 3? | tracking_grants_for_research | select t1.c0 < t0.c0 from (select grant_end_date as c0 from grants where grant_id = 2) as t1, (select grant_end_date as c0 from grants where grant_id = 3) as t0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "tracking_grants_for_research",
"sql": "select t1.c0 < t0.c0 from (select grant_end_date as c0 from grants where grant_id = 2) as t1, (select grant_end_date as c0 from grants where grant_id = 3) as t0"
},
"style": "rule"
} | {
"index": 3959,
"split": "train"
} | |
What are the faculty, campus, and year details for staff at campus with ID 13 who are also working at campuses located in the county with the highest number of campuses? | csu_1 | select anon_1.c1, anon_1.c0, anon_1.c3 from (select t0.faculty as c1, t0.campus as c0, t0.year as c3 from faculty as t0 join campuses as t1 on t0.campus = t1.id where t1.id = 13 intersect select t0.faculty as c1, t0.campus as c0, t0.year as c3 from faculty as t0 join campuses as t1 on t0.campus = t1.id, (select county ... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "csu_1",
"sql": "select anon_1.c1, anon_1.c0, anon_1.c3 from (select t0.faculty as c1, t0.campus as c0, t0.year as c3 from faculty as t0 join campuses as t1 on t0.campus = t1.id where t1.id = 13 intersect select t0.faculty as c1, t0.campus as c0, t0.year as c3 from faculty as t0 j... | {
"index": 1147,
"split": "train"
} | |
What is the customer ID and rental date of the most recent rental handled by staff with ID 1 or less? | sakila_1 | select customer_id, rental_date as c1 from rental where staff_id <= 1 order by c1 desc limit 1 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "sakila_1",
"sql": "select customer_id, rental_date as c1 from rental where staff_id <= 1 order by c1 desc limit 1"
},
"style": "rule"
} | {
"index": 2316,
"split": "train"
} | |
Which students are participating in activities overseen by faculty members involved in activities with IDs greater than the average activity ID among those with IDs above 771? For these students, what are their ages and IDs, and what are the names and IDs of the activities they participate in? | activity_1 | select t0.age, t0.stuid, t2.activity_name, t2.actid from student as t0 join participates_in as t1 on t0.stuid = t1.stuid join activity as t2 on t1.actid = t2.actid join faculty_participates_in as t3 on t2.actid = t3.actid, (select avg(actid) as c2 from faculty_participates_in where actid > 771) as t0 where t3.actid > t... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "activity_1",
"sql": "select t0.age, t0.stuid, t2.activity_name, t2.actid from student as t0 join participates_in as t1 on t0.stuid = t1.stuid join activity as t2 on t1.actid = t2.actid join faculty_participates_in as t3 on t2.actid = t3.actid, (select avg(actid) as c2 from facult... | {
"index": 2143,
"split": "train"
} | |
What are the ticket prices, artist IDs, exhibition IDs, years, and themes for all exhibitions, excluding those created by artists from the United States? | theme_gallery | select anon_1.c4, anon_1.c0, anon_1.c3, anon_1.c1, anon_1.c2 from (select ticket_price as c4, artist_id as c0, exhibition_id as c3, year as c1, theme as c2 from exhibition except select t0.ticket_price as c4, t0.artist_id as c0, t0.exhibition_id as c3, t0.year as c1, t0.theme as c2 from exhibition as t0 join artist as ... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "theme_gallery",
"sql": "select anon_1.c4, anon_1.c0, anon_1.c3, anon_1.c1, anon_1.c2 from (select ticket_price as c4, artist_id as c0, exhibition_id as c3, year as c1, theme as c2 from exhibition except select t0.ticket_price as c4, t0.artist_id as c0, t0.exhibition_id as c3, t0.... | {
"index": 2855,
"split": "train"
} | |
How many incidents of each incident type occurred on August 13, 2017, at 10:15 PM, and what is the count of incident type codes for those incidents? | behavior_monitoring | select incident_type_code as c1, count(*), count(incident_type_code) from behavior_incident where date_incident_start = '2017-08-13 22:15:05' group by c1 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "behavior_monitoring",
"sql": "select incident_type_code as c1, count(*), count(incident_type_code) from behavior_incident where date_incident_start = '2017-08-13 22:15:05' group by c1"
},
"style": "rule"
} | {
"index": 2089,
"split": "train"
} | |
What is the difference between the average album ID associated with album 346 and that associated with album 117? | store_1 | select t1.c2 - t0.c2 from (select avg(t1.album_id) as c2 from albums as t0 join tracks as t1 on t0.id = t1.album_id where t0.id = 117 group by t0.id) as t1, (select t0.id, avg(t1.album_id) as c2 from albums as t0 join tracks as t1 on t0.id = t1.album_id where t0.id = 346 group by t0.id) as t0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "store_1",
"sql": "select t1.c2 - t0.c2 from (select avg(t1.album_id) as c2 from albums as t0 join tracks as t1 on t0.id = t1.album_id where t0.id = 117 group by t0.id) as t1, (select t0.id, avg(t1.album_id) as c2 from albums as t0 join tracks as t1 on t0.id = t1.album_id where t0... | {
"index": 3625,
"split": "train"
} | |
What is the difference in pages per minute color between the products with IDs 3 and 4? | store_product | select t1.c1 - t0.c1 from (select pages_per_minute_color as c1 from product where product_id = 4) as t1, (select pages_per_minute_color as c1 from product where product_id = 3) as t0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "store_product",
"sql": "select t1.c1 - t0.c1 from (select pages_per_minute_color as c1 from product where product_id = 4) as t1, (select pages_per_minute_color as c1 from product where product_id = 3) as t0"
},
"style": "rule"
} | {
"index": 3626,
"split": "train"
} | |
What is the difference between the average camera lens ID used for mountain 12 and 1.0? | mountain_photos | select t0.c0 - 1.0 from (select avg(t1.camera_lens_id) as c0 from mountain as t0 join photos as t1 on t0.id = t1.mountain_id where t0.id = 12 group by t0.id) as t0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "mountain_photos",
"sql": "select t0.c0 - 1.0 from (select avg(t1.camera_lens_id) as c0 from mountain as t0 join photos as t1 on t0.id = t1.mountain_id where t0.id = 12 group by t0.id) as t0"
},
"style": "rule"
} | {
"index": 3869,
"split": "train"
} | |
What are the unique order details and the last name of the customer with customer ID 5? | customers_and_invoices | select distinct t0.order_details, t1.customer_last_name from orders as t0 join customers as t1 on t0.customer_id = t1.customer_id where t1.customer_id = 5 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customers_and_invoices",
"sql": "select distinct t0.order_details, t1.customer_last_name from orders as t0 join customers as t1 on t0.customer_id = t1.customer_id where t1.customer_id = 5"
},
"style": "rule"
} | {
"index": 2945,
"split": "train"
} | |
Which game types and names are for games with ID 2 or higher that have not been played for more than 47 hours? | game_1 | select anon_1.c0, anon_1.c1 from (select t0.gtype as c0, t0.gname as c1 from video_games as t0 join plays_games as t1 on t0.gameid = t1.gameid where t1.gameid >= 2 except select t0.gtype as c0, t0.gname as c1 from video_games as t0 join plays_games as t1 on t0.gameid = t1.gameid where t1.hours_played > 47) as anon_1 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "game_1",
"sql": "select anon_1.c0, anon_1.c1 from (select t0.gtype as c0, t0.gname as c1 from video_games as t0 join plays_games as t1 on t0.gameid = t1.gameid where t1.gameid >= 2 except select t0.gtype as c0, t0.gname as c1 from video_games as t0 join plays_games as t1 on t0.ga... | {
"index": 1623,
"split": "train"
} | |
What was the date of the latest transaction made by the investor with the highest ID after April 27, 1979, at 6:03:59 AM? | tracking_share_transactions | select t0.date_of_transaction, t0.investor_id as c3 from transactions as t0, (select max(investor_id) as c1 from transactions where date_of_transaction > '1979-04-27 06:03:59') as t1 where c3 = t1.c1 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "tracking_share_transactions",
"sql": "select t0.date_of_transaction, t0.investor_id as c3 from transactions as t0, (select max(investor_id) as c1 from transactions where date_of_transaction > '1979-04-27 06:03:59') as t1 where c3 = t1.c1"
},
"style": "rule"
} | {
"index": 3802,
"split": "train"
} | |
Show the length in feet, architect ID, bridge name, and architect name for all bridges designed by architects whose IDs start with "2". | architecture | select t0.length_feet, t0.architect_id, t0.name, t1.name from bridge as t0 join architect as t1 on t0.architect_id = t1.id where t1.id like '2%' | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "architecture",
"sql": "select t0.length_feet, t0.architect_id, t0.name, t1.name from bridge as t0 join architect as t1 on t0.architect_id = t1.id where t1.id like '2%'"
},
"style": "rule"
} | {
"index": 551,
"split": "train"
} | |
Find the opening years and cities of stadiums that hosted both events occurring in years starting with '2' and the event with ID 3. | swimming | select anon_1.c0, anon_1.c1 from (select t0.opening_year as c0, t0.city as c1 from stadium as t0 join event as t1 on t0.id = t1.stadium_id where t1.year like '2%' intersect select t0.opening_year as c0, t0.city as c1 from stadium as t0 join event as t1 on t0.id = t1.stadium_id where t1.id = 3) as anon_1 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "swimming",
"sql": "select anon_1.c0, anon_1.c1 from (select t0.opening_year as c0, t0.city as c1 from stadium as t0 join event as t1 on t0.id = t1.stadium_id where t1.year like '2%' intersect select t0.opening_year as c0, t0.city as c1 from stadium as t0 join event as t1 on t0.id... | {
"index": 1940,
"split": "train"
} | |
What are the genre ratings, genre names, and song ratings for songs whose associated file durations include the number '2'? | music_1 | select t0.rating, t0.g_name, t1.rating from genre as t0 join song as t1 on t0.g_name = t1.genre_is join files as t2 on t1.f_id = t2.f_id where t2.duration like '%2%' | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "music_1",
"sql": "select t0.rating, t0.g_name, t1.rating from genre as t0 join song as t1 on t0.g_name = t1.genre_is join files as t2 on t1.f_id = t2.f_id where t2.duration like '%2%'"
},
"style": "rule"
} | {
"index": 840,
"split": "train"
} | |
What is the name, FDA approval status, and interaction type of the first medicine (when sorted alphabetically) that interacts with enzymes whose product name contains "eme" or that interacts with enzymes whose product has the lowest average OMIM score? | medicine_enzyme_interaction | select t0.name as c3, t0.fda_approved, t1.interaction_type from medicine as t0 join medicine_enzyme_interaction as t1 on t0.id = t1.medicine_id join enzyme as t2 on t1.enzyme_id = t2.id, (select product as c0 from enzyme group by c0 order by avg(omim) asc nulls last limit 1) as t0 where t2.product like '%eme%' or t2.pr... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "medicine_enzyme_interaction",
"sql": "select t0.name as c3, t0.fda_approved, t1.interaction_type from medicine as t0 join medicine_enzyme_interaction as t1 on t0.id = t1.medicine_id join enzyme as t2 on t1.enzyme_id = t2.id, (select product as c0 from enzyme group by c0 order by ... | {
"index": 2386,
"split": "train"
} | |
Find the names and IDs of products with product ID 1, list the top 5 based on product name in reverse alphabetical order. | tracking_orders | select t0.product_name as c0, t0.product_id from products as t0 join order_items as t1 on t0.product_id = t1.product_id where t1.product_id = 1 order by c0 desc limit 5 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "tracking_orders",
"sql": "select t0.product_name as c0, t0.product_id from products as t0 join order_items as t1 on t0.product_id = t1.product_id where t1.product_id = 1 order by c0 desc limit 5"
},
"style": "rule"
} | {
"index": 1047,
"split": "train"
} | |
Did customer 11 become a customer after customer 3? | customers_and_addresses | select t1.c2 > t0.c2 from (select date_became_customer as c2 from customers where customer_id = 11) as t1, (select date_became_customer as c2 from customers where customer_id = 3) as t0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customers_and_addresses",
"sql": "select t1.c2 > t0.c2 from (select date_became_customer as c2 from customers where customer_id = 11) as t1, (select date_became_customer as c2 from customers where customer_id = 3) as t0"
},
"style": "rule"
} | {
"index": 3828,
"split": "train"
} | |
List the names of up to three cities starting with "Ca" that have more than 82% white population, along with their highest recorded Hispanic percentage, ordered by city name from Z to A.
This phrasing maintains all details—city name filter, demographic conditions, grouping, maximum Hispanic value, sorting, and limit—w... | county_public_safety | select name as c1, max(hispanic) from city where c1 like 'Ca%' and white > 82.0 group by c1 order by c1 desc limit 3 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "county_public_safety",
"sql": "select name as c1, max(hispanic) from city where c1 like 'Ca%' and white > 82.0 group by c1 order by c1 desc limit 3"
},
"style": "rule"
} | {
"index": 2638,
"split": "train"
} | |
How many days passed between a customer's birth date and the date they became a customer, for those whose email addresses include both 'well@' and 'well@'? | driving_school | select julianday(t1.c0) - julianday(t0.c3) from (select date_of_birth as c0 from customers) as t1, (select date_became_customer as c3 from customers where email_address like '%well@%' and email_address like '%well@%') as t0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "driving_school",
"sql": "select julianday(t1.c0) - julianday(t0.c3) from (select date_of_birth as c0 from customers) as t1, (select date_became_customer as c3 from customers where email_address like '%well@%' and email_address like '%well@%') as t0"
},
"style": "rule"
} | {
"index": 3708,
"split": "train"
} | |
What are the day number, calendar date, document type code, and document name for the earliest date where documents have either a type code starting with "RV" or whose document type code does not exist among the documents? | cre_Doc_Tracking_DB | select t0.day_number as c0, t0.calendar_date, t1.document_type_code as c2, t1.document_name from ref_calendar as t0 join all_documents as t1 on t0.calendar_date = t1.date_stored join ref_document_types as t2 on t1.document_type_code = t2.document_type_code where t2.document_type_code like 'RV%' or (not t2.document_type... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "cre_Doc_Tracking_DB",
"sql": "select t0.day_number as c0, t0.calendar_date, t1.document_type_code as c2, t1.document_name from ref_calendar as t0 join all_documents as t1 on t0.calendar_date = t1.date_stored join ref_document_types as t2 on t1.document_type_code = t2.document_typ... | {
"index": 444,
"split": "train"
} | |
What are the date, workshop ID, and venue for workshops, and what are the corresponding workshop ID and acceptance result for submissions authored by someone whose name ends with "Steve Niehaus"? | workshop_paper | select t0.date, t0.workshop_id, t0.venue, t1.workshop_id, t1.result from workshop as t0 join acceptance as t1 on t0.workshop_id = t1.workshop_id join submission as t2 on t1.submission_id = t2.submission_id where t2.author like '%Steve Niehaus' | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "workshop_paper",
"sql": "select t0.date, t0.workshop_id, t0.venue, t1.workshop_id, t1.result from workshop as t0 join acceptance as t1 on t0.workshop_id = t1.workshop_id join submission as t2 on t1.submission_id = t2.submission_id where t2.author like '%Steve Niehaus'"
},
"st... | {
"index": 2885,
"split": "train"
} | |
What is the difference between the number of courses authored by author 11 and 2? | e_learning | select t0.c2 - 2 from (select count(distinct (t1.course_id)) as c2 from course_authors_and_tutors as t0 join courses as t1 on t0.author_id = t1.author_id where t0.author_id = 11 group by t0.author_id) as t0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "e_learning",
"sql": "select t0.c2 - 2 from (select count(distinct (t1.course_id)) as c2 from course_authors_and_tutors as t0 join courses as t1 on t0.author_id = t1.author_id where t0.author_id = 11 group by t0.author_id) as t0"
},
"style": "rule"
} | {
"index": 3234,
"split": "train"
} | |
Which are the ten products that have the highest number of problem logs, including their name, ID, and total number of associated logs? | tracking_software_problems | select t0.product_name, t0.product_id as c2, count(t2.problem_id) as c0 from product as t0 join problems as t1 on t0.product_id = t1.product_id join problem_log as t2 on t1.problem_id = t2.problem_id group by c2 order by c0 asc nulls last limit 10 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "tracking_software_problems",
"sql": "select t0.product_name, t0.product_id as c2, count(t2.problem_id) as c0 from product as t0 join problems as t1 on t0.product_id = t1.product_id join problem_log as t2 on t1.problem_id = t2.problem_id group by c2 order by c0 asc nulls last limi... | {
"index": 1458,
"split": "train"
} | |
Is the number of credits for course 338 less than 4? | college_2 | select credits < 4 from course where course_id = 338 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "college_2",
"sql": "select credits < 4 from course where course_id = 338"
},
"style": "rule"
} | {
"index": 3330,
"split": "train"
} | |
Can you tell me the top 3 catalog levels, including their numbers, names, and attribute values, associated with catalog entries 5 and 2, ordered from the highest to the lowest catalog level? | product_catalog | select t0.catalog_level_number as c0, t0.catalog_level_name, t1.attribute_value from catalog_structure as t0 join catalog_contents_additional_attributes as t1 on t0.catalog_level_number = t1.catalog_level_number where t1.catalog_entry_id = 5 or t1.catalog_entry_id = 2 order by c0 desc limit 3 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "product_catalog",
"sql": "select t0.catalog_level_number as c0, t0.catalog_level_name, t1.attribute_value from catalog_structure as t0 join catalog_contents_additional_attributes as t1 on t0.catalog_level_number = t1.catalog_level_number where t1.catalog_entry_id = 5 or t1.catalo... | {
"index": 526,
"split": "train"
} | |
List the first and last names of actors who appeared in films with IDs 378 or 989, showing up to five actors sorted alphabetically by last name. | sakila_1 | select t0.first_name, t0.last_name as c0 from actor as t0 join film_actor as t1 on t0.actor_id = t1.actor_id where t1.film_id = 378 or t1.film_id = 989 order by c0 asc nulls last limit 5 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "sakila_1",
"sql": "select t0.first_name, t0.last_name as c0 from actor as t0 join film_actor as t1 on t0.actor_id = t1.actor_id where t1.film_id = 378 or t1.film_id = 989 order by c0 asc nulls last limit 5"
},
"style": "rule"
} | {
"index": 1353,
"split": "train"
} | |
Which products have complaints with a complaint type code ending in "ble," but do not have a product ID of 119 or 120? Please provide their product IDs, category codes, and descriptions. | customer_complaints | select anon_1.c2, anon_1.c1, anon_1.c0 from (select t0.product_id as c2, t0.product_category_code as c1, t0.product_description as c0 from products as t0 join complaints as t1 on t0.product_id = t1.product_id where t1.complaint_type_code like '%ble' except select t0.product_id as c2, t0.product_category_code as c1, t0.... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customer_complaints",
"sql": "select anon_1.c2, anon_1.c1, anon_1.c0 from (select t0.product_id as c2, t0.product_category_code as c1, t0.product_description as c0 from products as t0 join complaints as t1 on t0.product_id = t1.product_id where t1.complaint_type_code like '%ble' ... | {
"index": 2058,
"split": "train"
} | |
Which actors have never appeared in any films with inventory IDs less than 141? (Provide their first names, last names, and actor IDs.)? | sakila_1 | select anon_1.c2, anon_1.c1, anon_1.c0 from (select first_name as c2, last_name as c1, actor_id as c0 from actor except select t0.first_name as c2, t0.last_name as c1, t0.actor_id as c0 from actor as t0 join film_actor as t1 on t0.actor_id = t1.actor_id join film as t2 on t1.film_id = t2.film_id join inventory as t3 on... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "sakila_1",
"sql": "select anon_1.c2, anon_1.c1, anon_1.c0 from (select first_name as c2, last_name as c1, actor_id as c0 from actor except select t0.first_name as c2, t0.last_name as c1, t0.actor_id as c0 from actor as t0 join film_actor as t1 on t0.actor_id = t1.actor_id join fi... | {
"index": 2117,
"split": "train"
} | |
Can you provide the local authority, station ID, route station ID, and train ID for trains whose train numbers are between 16381 and 16382 or less than 56701? | station_weather | select t0.local_authority, t0.id, t1.station_id, t1.train_id from station as t0 join route as t1 on t0.id = t1.station_id join train as t2 on t1.train_id = t2.id where t2.train_number between 16381 and 16382 or t2.train_number < 56701 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "station_weather",
"sql": "select t0.local_authority, t0.id, t1.station_id, t1.train_id from station as t0 join route as t1 on t0.id = t1.station_id join train as t2 on t1.train_id = t2.id where t2.train_number between 16381 and 16382 or t2.train_number < 56701"
},
"style": "r... | {
"index": 552,
"split": "train"
} | |
What are the three lowest longitude values and their associated station IDs for the station with ID 67, sorted by longitude? | bike_1 | select t0.long as c0 from station as t0 join status as t1 on t0.id = t1.station_id where t1.station_id = 67 order by c0 asc nulls last limit 3 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "bike_1",
"sql": "select t0.long as c0 from station as t0 join status as t1 on t0.id = t1.station_id where t1.station_id = 67 order by c0 asc nulls last limit 3"
},
"style": "rule"
} | {
"index": 445,
"split": "train"
} | |
Which user pairs have trust relationships where the reviewed item is either titled "blue hoodie" or has a name that includes the letter "b", and what are their trust scores and user IDs? | epinions_1 | select t0.target_u_id, t0.trust, t0.source_u_id from trust as t0 join useracct as t1 on t0.source_u_id = t1.u_id join review as t2 on t1.u_id = t2.u_id join item as t3 on t2.i_id = t3.i_id where t3.title = 'blue hoodie' or t3.title like '%b%' | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "epinions_1",
"sql": "select t0.target_u_id, t0.trust, t0.source_u_id from trust as t0 join useracct as t1 on t0.source_u_id = t1.u_id join review as t2 on t1.u_id = t2.u_id join item as t3 on t2.i_id = t3.i_id where t3.title = 'blue hoodie' or t3.title like '%b%'"
},
"style":... | {
"index": 2820,
"split": "train"
} | |
For shipments with order IDs less than 10, what are the shipment tracking numbers and the average invoice number for each tracking number? | tracking_orders | select shipment_tracking_number as c0, avg(invoice_number) from shipments where order_id < 10 group by c0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "tracking_orders",
"sql": "select shipment_tracking_number as c0, avg(invoice_number) from shipments where order_id < 10 group by c0"
},
"style": "rule"
} | {
"index": 1815,
"split": "train"
} | |
What are the address ID, last name, email address of teachers, and the student ID for the student with ID 15? | behavior_monitoring | select t0.address_id, t0.last_name, t0.email_address, t1.student_id as c2 from teachers as t0 join assessment_notes as t1 on t0.teacher_id = t1.teacher_id where c2 = 15 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "behavior_monitoring",
"sql": "select t0.address_id, t0.last_name, t0.email_address, t1.student_id as c2 from teachers as t0 join assessment_notes as t1 on t0.teacher_id = t1.teacher_id where c2 = 15"
},
"style": "rule"
} | {
"index": 2337,
"split": "train"
} | |
Which five products have the lowest daily hire cost, along with their IDs and descriptions, and share the least common availability status (either available or not available), sorted by product ID? | products_for_hire | select t0.daily_hire_cost, t0.product_id, t0.product_description, t1.product_id as c2 from products_for_hire as t0 join view_product_availability as t1 on t0.product_id = t1.product_id, (select available_yn as c0 from view_product_availability group by c0 order by count(*) asc nulls last limit 1) as t0 where t1.availab... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "products_for_hire",
"sql": "select t0.daily_hire_cost, t0.product_id, t0.product_description, t1.product_id as c2 from products_for_hire as t0 join view_product_availability as t1 on t0.product_id = t1.product_id, (select available_yn as c0 from view_product_availability group by... | {
"index": 842,
"split": "train"
} | |
Is the combined checking balance for customer 7 less than 2000 dollars? | small_bank_1 | select t0.c0 < 2000.0 from (select sum(t1.balance) as c0 from accounts as t0 join checking as t1 on t0.custid = t1.custid where t0.custid = 7 group by t0.custid) as t0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "small_bank_1",
"sql": "select t0.c0 < 2000.0 from (select sum(t1.balance) as c0 from accounts as t0 join checking as t1 on t0.custid = t1.custid where t0.custid = 7 group by t0.custid) as t0"
},
"style": "rule"
} | {
"index": 3348,
"split": "train"
} | |
For subjects that have more than three courses with subject ID 2 and authors with IDs between 4 and 15, what is the subject name and subject ID? Additionally, what is the smallest author ID associated with these courses? | e_learning | select t0.subject_name, t0.subject_id as c1, min(t1.author_id) from subjects as t0 join courses as t1 on t0.subject_id = t1.subject_id where t1.subject_id = 2 and t1.author_id between 4 and 15 group by c1 having count(*) > 3 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "e_learning",
"sql": "select t0.subject_name, t0.subject_id as c1, min(t1.author_id) from subjects as t0 join courses as t1 on t0.subject_id = t1.subject_id where t1.subject_id = 2 and t1.author_id between 4 and 15 group by c1 having count(*) > 3"
},
"style": "rule"
} | {
"index": 810,
"split": "train"
} | |
For each pilot, how many unique pilot IDs are recorded, and can you list them starting with the pilots who have the most unique IDs? | pilot_record | select pilot_id as c1, count(distinct (pilot_id)) as c0 from pilot_record group by c1 order by c0 desc | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "pilot_record",
"sql": "select pilot_id as c1, count(distinct (pilot_id)) as c0 from pilot_record group by c1 order by c0 desc"
},
"style": "rule"
} | {
"index": 716,
"split": "train"
} | |
How many unique companies are there for each type of operating company? | flight_company | select type as c0, count(distinct (id)) from operate_company group by c0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "flight_company",
"sql": "select type as c0, count(distinct (id)) from operate_company group by c0"
},
"style": "rule"
} | {
"index": 1452,
"split": "train"
} | |
When was the biggest payment made? | insurance_policies | select t0.date_payment_made, t0.amount_payment as c2 from payments as t0, (select max(amount_payment) as c1 from payments) as t1 where c2 = t1.c1 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "insurance_policies",
"sql": "select t0.date_payment_made, t0.amount_payment as c2 from payments as t0, (select max(amount_payment) as c1 from payments) as t1 where c2 = t1.c1"
},
"style": "rule"
} | {
"index": 3859,
"split": "train"
} | |
Find the IDs of events whose names start with "World" or that are held in stadiums whose names are not listed in the stadium records. | swimming | select distinct id from event where name like 'World%' or (not name in (select name as c1 from stadium)) | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "swimming",
"sql": "select distinct id from event where name like 'World%' or (not name in (select name as c1 from stadium))"
},
"style": "rule"
} | {
"index": 288,
"split": "train"
} | |
What are the ten dorm amenities with the smallest highest amenid values, considering only amenities that are either associated with dorms or specifically have the amenid 909? Please include the amenid and its name in the results. | dorm_1 | select max(t0.amenid) as c1, t1.amenity_name, t1.amenid as c0 from has_amenity as t0 join dorm_amenity as t1 on t0.amenid = t1.amenid where c0 in (select t0.amenid as c3 from has_amenity) or c0 = 909 group by c0 order by c1 asc nulls last limit 10 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "dorm_1",
"sql": "select max(t0.amenid) as c1, t1.amenity_name, t1.amenid as c0 from has_amenity as t0 join dorm_amenity as t1 on t0.amenid = t1.amenid where c0 in (select t0.amenid as c3 from has_amenity) or c0 = 909 group by c0 order by c1 asc nulls last limit 10"
},
"style"... | {
"index": 2912,
"split": "train"
} | |
What are the custid and savings balances of the three customers with names ending in "Brown" who have the lowest savings balances? | small_bank_1 | select t0.custid, t0.balance as c0 from savings as t0 join accounts as t1 on t0.custid = t1.custid where t1.name like '%Brown' order by c0 asc nulls last limit 3 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "small_bank_1",
"sql": "select t0.custid, t0.balance as c0 from savings as t0 join accounts as t1 on t0.custid = t1.custid where t1.name like '%Brown' order by c0 asc nulls last limit 3"
},
"style": "rule"
} | {
"index": 1642,
"split": "train"
} | |
Which customer IDs associated with orders that include products with IDs less than 15 and have order IDs greater than 11 are listed among the first five when sorted by their order status code in alphabetical order, placing nulls at the end? | customers_and_products_contacts | select t0.customer_id from customer_orders as t0 join order_items as t1 on t0.order_id = t1.order_id where t1.product_id < 15 and t1.order_id > 11 order by t0.order_status_code asc nulls last limit 5 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customers_and_products_contacts",
"sql": "select t0.customer_id from customer_orders as t0 join order_items as t1 on t0.order_id = t1.order_id where t1.product_id < 15 and t1.order_id > 11 order by t0.order_status_code asc nulls last limit 5"
},
"style": "rule"
} | {
"index": 2197,
"split": "train"
} | |
Show the name, event ID, date, venue, and attendance figures for events that are associated with journalists who have reported news. | news_report | select anon_1.c3, anon_1.c1, anon_1.c0, anon_1.c5, anon_1.c2 from (select name as c3, event_id as c1, date as c0, venue as c5, event_attendance as c2 from event intersect select t0.name as c3, t0.event_id as c1, t0.date as c0, t0.venue as c5, t0.event_attendance as c2 from event as t0 join news_report as t1 on t0.event... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "news_report",
"sql": "select anon_1.c3, anon_1.c1, anon_1.c0, anon_1.c5, anon_1.c2 from (select name as c3, event_id as c1, date as c0, venue as c5, event_attendance as c2 from event intersect select t0.name as c3, t0.event_id as c1, t0.date as c0, t0.venue as c5, t0.event_attend... | {
"index": 1545,
"split": "train"
} | |
How many project outcomes have been recorded with the outcome being a Patent? | tracking_grants_for_research | select count(*) from project_outcomes where outcome_code = 'Patent' | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "tracking_grants_for_research",
"sql": "select count(*) from project_outcomes where outcome_code = 'Patent'"
},
"style": "rule"
} | {
"index": 678,
"split": "train"
} | |
What is the smallest camera lens ID used for photos taken of mountain 12? | mountain_photos | select t0.c0 from (select min(t1.camera_lens_id) as c0 from mountain as t0 join photos as t1 on t0.id = t1.mountain_id where t0.id = 12 group by t0.id) as t0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "mountain_photos",
"sql": "select t0.c0 from (select min(t1.camera_lens_id) as c0 from mountain as t0 join photos as t1 on t0.id = t1.mountain_id where t0.id = 12 group by t0.id) as t0"
},
"style": "rule"
} | {
"index": 3387,
"split": "train"
} | |
Is the cross-reference ID for the council tax record with ID 2 greater than the smallest cross-reference ID in the council tax table? | local_govt_mdm | select t2.c1 > t1.c3 from (select cmi_cross_ref_id as c1 from council_tax where council_tax_id = 2) as t2, (select min(cmi_cross_ref_id) as c3 from council_tax) as t1 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "local_govt_mdm",
"sql": "select t2.c1 > t1.c3 from (select cmi_cross_ref_id as c1 from council_tax where council_tax_id = 2) as t2, (select min(cmi_cross_ref_id) as c3 from council_tax) as t1"
},
"style": "rule"
} | {
"index": 3950,
"split": "train"
} | |
What is the percentage change in the maximum staff ID associated with complaints about product 118 on October 14, 2007, at 9:50:43 PM, for customers with IDs 115 or higher? | customer_complaints | select (t0.c2 / cast(t0.c2 as real) - 1) * 100 from (select max(t1.staff_id) as c2 from products as t0 join complaints as t1 on t0.product_id = t1.product_id where t0.product_id = 118 and t1.date_complaint_raised = '2007-10-14 21:50:43' and t1.customer_id >= 115 group by t0.product_id) as t0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customer_complaints",
"sql": "select (t0.c2 / cast(t0.c2 as real) - 1) * 100 from (select max(t1.staff_id) as c2 from products as t0 join complaints as t1 on t0.product_id = t1.product_id where t0.product_id = 118 and t1.date_complaint_raised = '2007-10-14 21:50:43' and t1.custom... | {
"index": 3412,
"split": "train"
} | |
Which customer IDs, order statuses, order dates, and order IDs are for orders that have matching records in the database and are associated with invoices issued between August 12, 1972, and February 27, 2005? | tracking_orders | select anon_1.c2, anon_1.c1, anon_1.c0, anon_1.c3 from (select customer_id as c2, order_status as c1, date_order_placed as c0, order_id as c3 from orders intersect select t0.customer_id as c2, t0.order_status as c1, t0.date_order_placed as c0, t0.order_id as c3 from orders as t0 join shipments as t1 on t0.order_id = t1... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "tracking_orders",
"sql": "select anon_1.c2, anon_1.c1, anon_1.c0, anon_1.c3 from (select customer_id as c2, order_status as c1, date_order_placed as c0, order_id as c3 from orders intersect select t0.customer_id as c2, t0.order_status as c1, t0.date_order_placed as c0, t0.order_i... | {
"index": 704,
"split": "train"
} | |
Looking at actors who played characters containing "ly Flet," what are the first five roles grouped by duration where the total sum of musical IDs is between 1 and 6, ordered from shortest to longest duration? | musical | select sum(musical_id) from actor where character like '%ly Flet%' group by duration having sum(musical_id) between 1 and 6 order by duration asc nulls last limit 5 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "musical",
"sql": "select sum(musical_id) from actor where character like '%ly Flet%' group by duration having sum(musical_id) between 1 and 6 order by duration asc nulls last limit 5"
},
"style": "rule"
} | {
"index": 667,
"split": "train"
} | |
Can you tell me the semester and year combinations where courses ending with "all" were taken, or where the course with ID 426 was taught? | college_2 | select anon_1.c0, anon_1.c2 from (select semester as c0, year as c2 from takes where c0 like '%all' union select semester, year from teaches where course_id = 426) as anon_1 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "college_2",
"sql": "select anon_1.c0, anon_1.c2 from (select semester as c0, year as c2 from takes where c0 like '%all' union select semester, year from teaches where course_id = 426) as anon_1"
},
"style": "rule"
} | {
"index": 103,
"split": "train"
} | |
What are the top 5 allergies and their types associated with students whose majors are either less than 50 or 100 and above, along with their student IDs? The results should be listed in alphabetical order by allergy name. | allergy_1 | select t0.allergy, t0.allergytype, t1.stuid, t1.allergy as c1 from allergy_type as t0 join has_allergy as t1 on t0.allergy = t1.allergy join student as t2 on t1.stuid = t2.stuid where t2.major < 50 or t2.major >= 100 order by c1 asc nulls last limit 5 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "allergy_1",
"sql": "select t0.allergy, t0.allergytype, t1.stuid, t1.allergy as c1 from allergy_type as t0 join has_allergy as t1 on t0.allergy = t1.allergy join student as t2 on t1.stuid = t2.stuid where t2.major < 50 or t2.major >= 100 order by c1 asc nulls last limit 5"
},
... | {
"index": 2077,
"split": "train"
} | |
Who are the first three complaints, including their types and staff involved, handled by staff members whose first names include "Radly" or end with "Dagmar," ordered by the staff's ID? | customer_complaints | select t0.complaint_type_code, t0.staff_id, t1.staff_id as c1 from complaints as t0 join staff as t1 on t0.staff_id = t1.staff_id where t1.first_name like '%radly%' or t1.first_name like '%Dagmar' order by c1 asc nulls last limit 3 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customer_complaints",
"sql": "select t0.complaint_type_code, t0.staff_id, t1.staff_id as c1 from complaints as t0 join staff as t1 on t0.staff_id = t1.staff_id where t1.first_name like '%radly%' or t1.first_name like '%Dagmar' order by c1 asc nulls last limit 3"
},
"style": "... | {
"index": 1568,
"split": "train"
} | |
Based on the average product ID per order with status 'Part', what is the rank of order number 7 when sorted from the lowest to highest average? | customers_and_products_contacts | select t1.c1, t1.c5 as c0 from (select row_number() over (order by t0.c2 asc nulls last) as c1, t0.c3 as c5 from (select t0.order_id as c3, avg(t1.product_id) as c2 from customer_orders as t0 join order_items as t1 on t0.order_id = t1.order_id where t0.order_status_code = 'Part' group by c3) as t0) as t1 where c0 = 7 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customers_and_products_contacts",
"sql": "select t1.c1, t1.c5 as c0 from (select row_number() over (order by t0.c2 asc nulls last) as c1, t0.c3 as c5 from (select t0.order_id as c3, avg(t1.product_id) as c2 from customer_orders as t0 join order_items as t1 on t0.order_id = t1.ord... | {
"index": 3476,
"split": "train"
} | |
For each school located in a county that includes "50" in its name, what are the school names along with their highest enrollment figures? | school_finance | select school_name as c1, max(enrollment) from school where county like '%50%' group by c1 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "school_finance",
"sql": "select school_name as c1, max(enrollment) from school where county like '%50%' group by c1"
},
"style": "rule"
} | {
"index": 1448,
"split": "train"
} | |
Which browsers have a market share listed along with their associated accelerator IDs, where the accelerators support web client operating systems that include "Windows, Mac" or "s, Mac,"? | browser_web | select t0.id, t0.market_share, t1.accelerator_id from browser as t0 join accelerator_compatible_browser as t1 on t0.id = t1.browser_id join web_client_accelerator as t2 on t1.accelerator_id = t2.id where t2.operating_system like '%Windows, Mac%' or t2.operating_system like '%s, Mac,%' | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "browser_web",
"sql": "select t0.id, t0.market_share, t1.accelerator_id from browser as t0 join accelerator_compatible_browser as t1 on t0.id = t1.browser_id join web_client_accelerator as t2 on t1.accelerator_id = t2.id where t2.operating_system like '%Windows, Mac%' or t2.operat... | {
"index": 3,
"split": "train"
} | |
What are the top three industries, along with their profits and market values, where the employees share the most common name in the company, listed in alphabetical order of the industry? | company_employee | select t0.industry as c0, t0.profits_in_billion, t0.market_value_in_billion from company as t0 join employment as t1 on t0.company_id = t1.company_id join people as t2 on t1.people_id = t2.people_id, (select name as c1 from people group by c1 order by count(*) desc limit 1) as t0 where t2.name = t0.c1 order by c0 asc n... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "company_employee",
"sql": "select t0.industry as c0, t0.profits_in_billion, t0.market_value_in_billion from company as t0 join employment as t1 on t0.company_id = t1.company_id join people as t2 on t1.people_id = t2.people_id, (select name as c1 from people group by c1 order by c... | {
"index": 77,
"split": "train"
} | |
Which Rooms, Buildings, and Divisions are associated with departments that have members with faculty IDs less than 8772 and also include department number 520? | college_3 | select anon_1.c2, anon_1.c0, anon_1.c1 from (select t0.room as c2, t0.building as c0, t0.division as c1 from department as t0 join member_of as t1 on t0.dno = t1.dno where t1.facid < 8772 intersect select t0.room as c2, t0.building as c0, t0.division as c1 from department as t0 join member_of as t1 on t0.dno = t1.dno w... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "college_3",
"sql": "select anon_1.c2, anon_1.c0, anon_1.c1 from (select t0.room as c2, t0.building as c0, t0.division as c1 from department as t0 join member_of as t1 on t0.dno = t1.dno where t1.facid < 8772 intersect select t0.room as c2, t0.building as c0, t0.division as c1 fro... | {
"index": 1446,
"split": "train"
} | |
What is the rank of student 1017 among students involved in activities with IDs up to 790, when sorted in order of increasing activity ID? | activity_1 | select t1.c0, t1.c1 as c4 from (select row_number() over (order by actid asc nulls last) as c0, stuid as c1 from participates_in where actid <= 790) as t1 where c4 = 1017 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "activity_1",
"sql": "select t1.c0, t1.c1 as c4 from (select row_number() over (order by actid asc nulls last) as c0, stuid as c1 from participates_in where actid <= 790) as t1 where c4 = 1017"
},
"style": "rule"
} | {
"index": 3458,
"split": "train"
} | |
Which three devices have the fewest entries in the database, based on the number of records associated with each device? | device | select device as c1, count(software_platform) from device group by c1 order by count(*) asc nulls last limit 3 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "device",
"sql": "select device as c1, count(software_platform) from device group by c1 order by count(*) asc nulls last limit 3"
},
"style": "rule"
} | {
"index": 1005,
"split": "train"
} | |
List the names of the delivery routes that have an ID greater than 8, arranged in alphabetical order. | customer_deliveries | select t0.route_name as c0 from delivery_routes as t0 join delivery_route_locations as t1 on t0.route_id = t1.route_id where t1.route_id > 8 order by c0 asc nulls last | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customer_deliveries",
"sql": "select t0.route_name as c0 from delivery_routes as t0 join delivery_route_locations as t1 on t0.route_id = t1.route_id where t1.route_id > 8 order by c0 asc nulls last"
},
"style": "rule"
} | {
"index": 1125,
"split": "train"
} | |
Which order item has the highest product quantity in invoices dated between March 13 and March 15, 2018? | customers_and_invoices | select t0.order_id, t0.product_quantity as c0 from order_items as t0 join orders as t1 on t0.order_id = t1.order_id join invoices as t2 on t1.order_id = t2.order_id where t2.invoice_date between '2018-03-13 07:27:38' and '2018-03-15 09:38:49' order by c0 desc limit 1 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customers_and_invoices",
"sql": "select t0.order_id, t0.product_quantity as c0 from order_items as t0 join orders as t1 on t0.order_id = t1.order_id join invoices as t2 on t1.order_id = t2.order_id where t2.invoice_date between '2018-03-13 07:27:38' and '2018-03-15 09:38:49' orde... | {
"index": 727,
"split": "train"
} | |
Can you tell me the names, IDs, the date they became customers, and their contact channel codes for the first three customers who have a contact channel ending with "held" and whose contact channels were active before January 2, 2018, sorted alphabetically by channel code? | customers_and_addresses | select t0.customer_name, t0.customer_id, t0.date_became_customer, t1.channel_code as c1 from customers as t0 join customer_contact_channels as t1 on t0.customer_id = t1.customer_id where c1 like '%held' and t1.active_from_date < '2018-01-02 18:37:48' order by c1 asc nulls last limit 3 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customers_and_addresses",
"sql": "select t0.customer_name, t0.customer_id, t0.date_became_customer, t1.channel_code as c1 from customers as t0 join customer_contact_channels as t1 on t0.customer_id = t1.customer_id where c1 like '%held' and t1.active_from_date < '2018-01-02 18:37... | {
"index": 804,
"split": "train"
} | |
How many days passed between the order date and the actual delivery date for orders placed on or before July 3, 2000, at 9:41:50 PM? | cre_Drama_Workshop_Groups | select julianday(t1.c1) - julianday(t0.c3) from (select actual_delivery_date as c1 from customer_orders where order_date <= '2000-07-03 21:41:50' and order_date <= '2000-07-03 21:41:50') as t1, (select order_date as c3 from customer_orders) as t0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "cre_Drama_Workshop_Groups",
"sql": "select julianday(t1.c1) - julianday(t0.c3) from (select actual_delivery_date as c1 from customer_orders where order_date <= '2000-07-03 21:41:50' and order_date <= '2000-07-03 21:41:50') as t1, (select order_date as c3 from customer_orders) as ... | {
"index": 3941,
"split": "train"
} | |
Which are the top 5 products with the highest counts, total prices, and number of complaint statuses, among those handled by staff with ID less than or equal to 118 or exactly 114, sorted by the most diverse product descriptions? | customer_complaints | select count(t0.product_id), sum(t0.product_price), count(t1.complaint_status_code) from products as t0 join complaints as t1 on t0.product_id = t1.product_id where t1.staff_id <= 118 or t1.staff_id = 114 order by count(distinct (t0.product_description)) desc limit 5 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customer_complaints",
"sql": "select count(t0.product_id), sum(t0.product_price), count(t1.complaint_status_code) from products as t0 join complaints as t1 on t0.product_id = t1.product_id where t1.staff_id <= 118 or t1.staff_id = 114 order by count(distinct (t0.product_descripti... | {
"index": 2609,
"split": "train"
} | |
How many customers are recorded in the database? | insurance_policies | select count(*) from customers | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "insurance_policies",
"sql": "select count(*) from customers"
},
"style": "rule"
} | {
"index": 1421,
"split": "train"
} | |
In the follows data, what are the top three follow relationships in terms of F1, along with the names and partition IDs of the associated users who have tweets created on or before March 9th, 2018 at 8:01:02 PM? The results should be sorted by F1 in descending order. | twitter_1 | select t0.f1 as c3, t0.f2, t1.name, t1.partitionid from follows as t0 join user_profiles as t1 on t0.f2 = t1.uid join tweets as t2 on t1.uid = t2.uid where t2.createdate <= '2018-03-09 20:01:02' or t2.createdate <= '2018-03-09 20:01:02' order by c3 desc limit 3 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "twitter_1",
"sql": "select t0.f1 as c3, t0.f2, t1.name, t1.partitionid from follows as t0 join user_profiles as t1 on t0.f2 = t1.uid join tweets as t2 on t1.uid = t2.uid where t2.createdate <= '2018-03-09 20:01:02' or t2.createdate <= '2018-03-09 20:01:02' order by c3 desc limit ... | {
"index": 2555,
"split": "train"
} | |
Is user 3's total trust score, considering only trust values of 10 or less, less than the highest total trust score among all users? | epinions_1 | select t2.c2 < t1.c3 from (select sum(t1.trust) as c2 from useracct as t0 join trust as t1 on t0.u_id = t1.source_u_id where t0.u_id = 3 and t1.trust <= 10 group by t0.u_id) as t2, (select max(t0.c2) as c3 from (select sum(t1.trust) as c2 from useracct as t0 join trust as t1 on t0.u_id = t1.source_u_id group by t0.u_id... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "epinions_1",
"sql": "select t2.c2 < t1.c3 from (select sum(t1.trust) as c2 from useracct as t0 join trust as t1 on t0.u_id = t1.source_u_id where t0.u_id = 3 and t1.trust <= 10 group by t0.u_id) as t2, (select max(t0.c2) as c3 from (select sum(t1.trust) as c2 from useracct as t0 ... | {
"index": 3314,
"split": "train"
} | |
How much more recent is the latest compatibility year of accelerator 3 compared to accelerator 9? | browser_web | select t1.c0 - t0.c0 from (select max(t1.compatible_since_year) as c0 from web_client_accelerator as t0 join accelerator_compatible_browser as t1 on t0.id = t1.accelerator_id where t0.id = 9 group by t0.id) as t1, (select t0.id, max(t1.compatible_since_year) as c0 from web_client_accelerator as t0 join accelerator_comp... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "browser_web",
"sql": "select t1.c0 - t0.c0 from (select max(t1.compatible_since_year) as c0 from web_client_accelerator as t0 join accelerator_compatible_browser as t1 on t0.id = t1.accelerator_id where t0.id = 9 group by t0.id) as t1, (select t0.id, max(t1.compatible_since_year)... | {
"index": 3587,
"split": "train"
} | |
What are the document type codes, grant IDs, and response received dates for documents related to the most common research outcome? | tracking_grants_for_research | select anon_1.c3, anon_1.c0, anon_1.c1 from (select document_type_code as c3, grant_id as c0, response_received_date as c1 from documents intersect select t0.document_type_code as c3, t0.grant_id as c0, t0.response_received_date as c1 from documents as t0 join grants as t1 on t0.grant_id = t1.grant_id join organisation... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "tracking_grants_for_research",
"sql": "select anon_1.c3, anon_1.c0, anon_1.c1 from (select document_type_code as c3, grant_id as c0, response_received_date as c1 from documents intersect select t0.document_type_code as c3, t0.grant_id as c0, t0.response_received_date as c1 from d... | {
"index": 213,
"split": "train"
} | |
What are the distinct customer IDs and outcome codes for customers whose phone number is 1-957-676-9414 or starts with "(030)52"? | customers_campaigns_ecommerce | select distinct t0.customer_id, t0.outcome_code from mailshot_customers as t0 join customers as t1 on t0.customer_id = t1.customer_id where t1.customer_phone = '1-957-676-9414' or t1.customer_phone like '(030)52%' | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customers_campaigns_ecommerce",
"sql": "select distinct t0.customer_id, t0.outcome_code from mailshot_customers as t0 join customers as t1 on t0.customer_id = t1.customer_id where t1.customer_phone = '1-957-676-9414' or t1.customer_phone like '(030)52%'"
},
"style": "rule"
} | {
"index": 1303,
"split": "train"
} | |
What is the city of the first person (when ordered alphabetically) who has a friend with a name that includes "a"? | network_2 | select t0.city as c0 from person as t0 join personfriend as t1 on t0.name = t1.friend where t1.friend like '%a%' order by c0 asc nulls last limit 1 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "network_2",
"sql": "select t0.city as c0 from person as t0 join personfriend as t1 on t0.name = t1.friend where t1.friend like '%a%' order by c0 asc nulls last limit 1"
},
"style": "rule"
} | {
"index": 2221,
"split": "train"
} | |
What are the invoice numbers and transaction amounts for financial transactions linked to order items from orders with IDs under 14? | customers_and_invoices | select t0.invoice_number, t0.transaction_amount from financial_transactions as t0 join invoices as t1 on t0.invoice_number = t1.invoice_number join orders as t2 on t1.order_id = t2.order_id join order_items as t3 on t2.order_id = t3.order_id where t3.order_id < 14 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customers_and_invoices",
"sql": "select t0.invoice_number, t0.transaction_amount from financial_transactions as t0 join invoices as t1 on t0.invoice_number = t1.invoice_number join orders as t2 on t1.order_id = t2.order_id join order_items as t3 on t2.order_id = t3.order_id where... | {
"index": 492,
"split": "train"
} | |
Which aircrafts have flights ending with "York" as their destination, but are not flights to the most frequently traveled destination? Can you provide their Aids, distances, and names? | flight_1 | select anon_1.c1, anon_1.c2, anon_1.c0 from (select t0.aid as c1, t0.distance as c2, t0.name as c0 from aircraft as t0 join flight as t1 on t0.aid = t1.aid where t1.destination like '%York' except select t0.aid as c1, t0.distance as c2, t0.name as c0 from aircraft as t0 join flight as t1 on t0.aid = t1.aid, (select des... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "flight_1",
"sql": "select anon_1.c1, anon_1.c2, anon_1.c0 from (select t0.aid as c1, t0.distance as c2, t0.name as c0 from aircraft as t0 join flight as t1 on t0.aid = t1.aid where t1.destination like '%York' except select t0.aid as c1, t0.distance as c2, t0.name as c0 from aircr... | {
"index": 1282,
"split": "train"
} | |
What is the lowest monthly rental for student 13's address? | behavior_monitoring | select t0.c2 from (select min(t1.monthly_rental) as c2 from students as t0 join student_addresses as t1 on t0.student_id = t1.student_id where t0.student_id = 13 group by t0.student_id) as t0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "behavior_monitoring",
"sql": "select t0.c2 from (select min(t1.monthly_rental) as c2 from students as t0 join student_addresses as t1 on t0.student_id = t1.student_id where t0.student_id = 13 group by t0.student_id) as t0"
},
"style": "rule"
} | {
"index": 3357,
"split": "train"
} | |
Which players with their IDs, high school scores, and names have tried out at colleges whose names include "OU," and are present in both the Player table and the tryout-related records for such colleges? | soccer_2 | select anon_1.c2, anon_1.c0, anon_1.c1 from (select pid as c2, hs as c0, pname as c1 from player intersect select t0.pid as c2, t0.hs as c0, t0.pname as c1 from player as t0 join tryout as t1 on t0.pid = t1.pid join college as t2 on t1.cname = t2.cname where t2.cname like '%OU%') as anon_1 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "soccer_2",
"sql": "select anon_1.c2, anon_1.c0, anon_1.c1 from (select pid as c2, hs as c0, pname as c1 from player intersect select t0.pid as c2, t0.hs as c0, t0.pname as c1 from player as t0 join tryout as t1 on t0.pid = t1.pid join college as t2 on t1.cname = t2.cname where t2... | {
"index": 1204,
"split": "train"
} | |
What are the maximum page sizes and pages per minute in color for the products carried in store number 5, excluding products whose maximum page size starts with "216mm x 355m"? | store_product | select t0.max_page_size as c2, t0.pages_per_minute_color from product as t0 join store_product as t1 on t0.product_id = t1.product_id where t1.store_id = 5 and (not t1.product_id in (select t0.product_id as c1 from product where c2 like '216mm x 355m%')) | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "store_product",
"sql": "select t0.max_page_size as c2, t0.pages_per_minute_color from product as t0 join store_product as t1 on t0.product_id = t1.product_id where t1.store_id = 5 and (not t1.product_id in (select t0.product_id as c1 from product where c2 like '216mm x 355m%'))"
... | {
"index": 2296,
"split": "train"
} | |
Which manager or supervisor do the support representatives with email addresses containing "om" or starting with "luisg@embr" report to? | store_1 | select t0.reports_to from employees as t0 join customers as t1 on t0.id = t1.support_rep_id where t1.email like '%om%' or t1.email like 'luisg@embr%' | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "store_1",
"sql": "select t0.reports_to from employees as t0 join customers as t1 on t0.id = t1.support_rep_id where t1.email like '%om%' or t1.email like 'luisg@embr%'"
},
"style": "rule"
} | {
"index": 502,
"split": "train"
} | |
Find the top three trust scores along with the source and target user IDs for reviews rated between 7 and 10, sorted by the target user ID in descending order. | epinions_1 | select t0.trust, t0.source_u_id, t0.target_u_id as c2 from trust as t0 join useracct as t1 on t0.source_u_id = t1.u_id join review as t2 on t1.u_id = t2.u_id where t2.rating between 7 and 10 order by c2 desc limit 3 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "epinions_1",
"sql": "select t0.trust, t0.source_u_id, t0.target_u_id as c2 from trust as t0 join useracct as t1 on t0.source_u_id = t1.u_id join review as t2 on t1.u_id = t2.u_id where t2.rating between 7 and 10 order by c2 desc limit 3"
},
"style": "rule"
} | {
"index": 1983,
"split": "train"
} | |
Was the invoice date for invoice 308 made before the invoice date for invoice 394? | store_1 | select t1.c2 < t0.c2 from (select invoice_date as c2 from invoices where id = 308) as t1, (select invoice_date as c2 from invoices where id = 394) as t0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "store_1",
"sql": "select t1.c2 < t0.c2 from (select invoice_date as c2 from invoices where id = 308) as t1, (select invoice_date as c2 from invoices where id = 394) as t0"
},
"style": "rule"
} | {
"index": 3978,
"split": "train"
} | |
What are the total pounds purchased and the branch IDs for transactions made at branches where members registered in 2016? | shop_membership | select t0.total_pounds, t0.branch_id from purchase as t0 join branch as t1 on t0.branch_id = t1.branch_id join membership_register_branch as t2 on t1.branch_id = t2.branch_id where t2.register_year like '%2016' | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "shop_membership",
"sql": "select t0.total_pounds, t0.branch_id from purchase as t0 join branch as t1 on t0.branch_id = t1.branch_id join membership_register_branch as t2 on t1.branch_id = t2.branch_id where t2.register_year like '%2016'"
},
"style": "rule"
} | {
"index": 346,
"split": "train"
} | |
Which staff members, including their first names, staff IDs, email addresses, and phone numbers, have handled complaints about products priced under $35 or about the product with ID 117? | customer_complaints | select anon_1.c3, anon_1.c2, anon_1.c0, anon_1.c1 from (select t0.first_name as c3, t0.staff_id as c2, t0.email_address as c0, t0.phone_number as c1 from staff as t0 join complaints as t1 on t0.staff_id = t1.staff_id join products as t2 on t1.product_id = t2.product_id where t2.product_price < 35 union select t0.first_... | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "customer_complaints",
"sql": "select anon_1.c3, anon_1.c2, anon_1.c0, anon_1.c1 from (select t0.first_name as c3, t0.staff_id as c2, t0.email_address as c0, t0.phone_number as c1 from staff as t0 join complaints as t1 on t0.staff_id = t1.staff_id join products as t2 on t1.product... | {
"index": 1128,
"split": "train"
} | |
What are the titles, identifiers, and countries of incorporation for book clubs associated with companies whose names end with "Cathay Pacific Culture"? | culture_company | select t0.book_title, t0.book_club_id, t1.incorporated_in from book_club as t0 join culture_company as t1 on t0.book_club_id = t1.book_club_id where t1.company_name like '%Cathay Pacific Culture' | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "culture_company",
"sql": "select t0.book_title, t0.book_club_id, t1.incorporated_in from book_club as t0 join culture_company as t1 on t0.book_club_id = t1.book_club_id where t1.company_name like '%Cathay Pacific Culture'"
},
"style": "rule"
} | {
"index": 1250,
"split": "train"
} | |
Did the booking with ID 6 start before the booking with ID 14? | products_for_hire | select t1.c1 < t0.c1 from (select booking_start_date as c1 from bookings where booking_id = 6) as t1, (select booking_start_date as c1 from bookings where booking_id = 14) as t0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "products_for_hire",
"sql": "select t1.c1 < t0.c1 from (select booking_start_date as c1 from bookings where booking_id = 6) as t1, (select booking_start_date as c1 from bookings where booking_id = 14) as t0"
},
"style": "rule"
} | {
"index": 3141,
"split": "train"
} | |
What is the total amount of transactions made by investor 2? | tracking_share_transactions | select t0.c2 from (select sum(t1.amount_of_transaction) as c2 from investors as t0 join transactions as t1 on t0.investor_id = t1.investor_id where t0.investor_id = 2 group by t0.investor_id) as t0 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "tracking_share_transactions",
"sql": "select t0.c2 from (select sum(t1.amount_of_transaction) as c2 from investors as t0 join transactions as t1 on t0.investor_id = t1.investor_id where t0.investor_id = 2 group by t0.investor_id) as t0"
},
"style": "rule"
} | {
"index": 3404,
"split": "train"
} | |
Which fault statuses and fault log entries are recorded in the Fault_Log_Parts table that do not correspond to fault logs linked to assets with an ID greater than 8? | assets_maintenance | select anon_1.c0, anon_1.c1 from (select fault_status as c0, fault_log_entry_id as c1 from fault_log_parts except select t0.fault_status as c0, t0.fault_log_entry_id as c1 from fault_log_parts as t0 join fault_log as t1 on t0.fault_log_entry_id = t1.fault_log_entry_id where t1.asset_id > 8) as anon_1 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "assets_maintenance",
"sql": "select anon_1.c0, anon_1.c1 from (select fault_status as c0, fault_log_entry_id as c1 from fault_log_parts except select t0.fault_status as c0, t0.fault_log_entry_id as c1 from fault_log_parts as t0 join fault_log as t1 on t0.fault_log_entry_id = t1.f... | {
"index": 1191,
"split": "train"
} | |
Find the titles and IDs of items, along with the number of reviews, where the item ID is either not present in the items table or is less than or equal to 5. | epinions_1 | select t0.title, t0.i_id as c2, count(*) from item as t0 join review as t1 on t0.i_id = t1.i_id where (not t1.i_id in (select c2 as c2 from item)) or t1.i_id <= 5 group by c2 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "epinions_1",
"sql": "select t0.title, t0.i_id as c2, count(*) from item as t0 join review as t1 on t0.i_id = t1.i_id where (not t1.i_id in (select c2 as c2 from item)) or t1.i_id <= 5 group by c2"
},
"style": "rule"
} | {
"index": 2364,
"split": "train"
} | |
What are the endowment amounts and donator names, along with the mascots of schools that have a budget for school IDs 2 or 5? | school_finance | select t0.amount, t0.donator_name, t1.mascot from endowment as t0 join school as t1 on t0.school_id = t1.school_id join budget as t2 on t1.school_id = t2.school_id where t2.school_id = 2 or t2.school_id = 5 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "school_finance",
"sql": "select t0.amount, t0.donator_name, t1.mascot from endowment as t0 join school as t1 on t0.school_id = t1.school_id join budget as t2 on t1.school_id = t2.school_id where t2.school_id = 2 or t2.school_id = 5"
},
"style": "rule"
} | {
"index": 285,
"split": "train"
} | |
Which building has the lowest minimum department budget among all buildings where that minimum is less than 617,253.94? | college_2 | select building as c0 from department group by c0 having min(budget) < 617253.94 order by min(budget) asc nulls last limit 1 | spider | [
{
"content": "You are a helpful SQL expert assistant.\nThe assistant first thinks about how to write the SQL query by analyzing the question, database schema and external knowledge, then provides the final SQL query.\nThe reasoning process and SQL query are enclosed within <think> </think> and <answer> </answer... | logic | {
"ground_truth": {
"db_id": "college_2",
"sql": "select building as c0 from department group by c0 having min(budget) < 617253.94 order by min(budget) asc nulls last limit 1"
},
"style": "rule"
} | {
"index": 680,
"split": "train"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.