SAVI-SQL
Collection
3 items • Updated
idx stringlengths 33 52 | instance_id stringlengths 12 17 | db_id stringclasses 209
values | messages listlengths 2 2 | prompt listlengths 1 1 | completion listlengths 1 1 |
|---|---|---|---|---|---|
501860_sft_cte_gptoss120b_spider_train_one_9547 | local_spider_2857 | customer_deliveries | [
{
"role": "user",
"content": "【CTE (Common Table Expression) generation 】\nYou are an experienced database expert.\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this... | [
{
"role": "user",
"content": "【CTE (Common Table Expression) generation 】\nYou are an experienced database expert.\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this... | [
{
"role": "assistant",
"reasoning_content": "",
"content": "\nJSON Response: \n```json\n{\"Employees\": \"drop_all\"}\n```\n"
}
] |
333889_sft_cte_gptoss120b_spider_train_fk_8474 | local_spider_6700 | driving_school | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation 】\n\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this table is relevant to the question or ... | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation 】\n\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this table is relevant to the question or ... | [
{
"role": "assistant",
"reasoning_content": "",
"content": "CTE Query: \n```cte\nWITH Cancelled_lessons AS (SELECT \"lesson_id\", \"lesson_status_code\" FROM \"Lessons\" WHERE \"lesson_status_code\" = 'Cancelled' ) \n```\nJSON Response: \n```json\n{\"Addresses\": \"drop_all\", \"Staff\": \"drop_all\", \... |
68378_sft_cte_qwen25_spider_train_7301 | local_spider_2891 | icfp_1 | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation】\nYou are an experienced database expert.\nYou have two tasks.\n1. Decide whether this table is relevant to the question or not and write in json format include all columns you think is needed to answer the question.\n2. Generate a CTE... | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation】\nYou are an experienced database expert.\nYou have two tasks.\n1. Decide whether this table is relevant to the question or not and write in json format include all columns you think is needed to answer the question.\n2. Generate a CTE... | [
{
"role": "assistant",
"reasoning_content": "Let's break down the task step by step:\n\n### Step-by-Step Analysis\n\n1. **Identify Relevant Information:**\n - The question asks for papers that have \"Olin Shivers\" as an author. \n - The `Authorship` table connects authors to papers (via `authID` and `p... |
95936_sft_cte_nemotron3super_bird_train_fk_5453 | local_bird_3583 | authors | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation】\nYou are an experienced database expert.\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this... | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation】\nYou are an experienced database expert.\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this... | [
{
"role": "assistant",
"reasoning_content": "The user wants a JSON block indicating whether a CTE is needed, in a specific format. The previous response had a JSON block but maybe the format was slightly off or the user wants a specific structure like ",
"content": "CTE Query: \n```cte\nWITH author_cte ... |
276523_sft_cte_gptoss120b_bird_train_one_35111 | local_bird_7082 | works_cycles | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation 】\n\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this table is relevant to the question or ... | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation 】\n\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this table is relevant to the question or ... | [
{
"role": "assistant",
"reasoning_content": "",
"content": "The tables ['Store'] are not have any relevant information to answer the question `Average cost of purchase orders made during the first six months of 2012.`. So we can drop all these tables. Because no relevant tables, there are no CTE query ... |
444979_sft_cte_llama33_spider_train_fk_1728 | local_spider_1312 | performance_attendance | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation】\nYou are an experienced database expert.\nYou have two tasks.\n1. Decide whether this table is relevant to the question or not and write in json format include all columns you think is needed to answer the question.\n2. Generate a CTE... | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation】\nYou are an experienced database expert.\nYou have two tasks.\n1. Decide whether this table is relevant to the question or not and write in json format include all columns you think is needed to answer the question.\n2. Generate a CTE... | [
{
"role": "assistant",
"reasoning_content": "To answer the question, \"What is the average number of attendees for performances?\", we need to identify the table and column that store the number of attendees for each performance. From the provided database schema, the `performance` table has a column named ... |
278185_sft_cte_gptoss120b_bird_train_one_36773 | local_bird_7132 | works_cycles | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation 】\nYou are an experienced database expert. Your task is to generate a CTE (Common Table Expression) query to help answer the question based on the provided database schema and select relevant columns from the schema by generate a json ... | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation 】\nYou are an experienced database expert. Your task is to generate a CTE (Common Table Expression) query to help answer the question based on the provided database schema and select relevant columns from the schema by generate a json ... | [
{
"role": "assistant",
"reasoning_content": "We need to consider the provided schema: only one table described: ProductModelProductDescriptionCulture. But there are other tables referenced in previous CTEs: EmailAddress, Person. Those are part of the broader database not shown now. The instruction: \"Do not... |
30772_sft_cte_xiaomi25pro_spider_train_size300_218 | local_spider_110 | bike_1 | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation】\nYou are an experienced database expert.\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this... | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation】\nYou are an experienced database expert.\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this... | [
{
"role": "assistant",
"reasoning_content": " The `weather` table contains `date` and `max_temperature_f`, which directly relate to the question about dates when the maximum temperature is higher than 85. The column `max_temperature_f` can be filtered to find rows where it exceeds 85, and `date` provides th... |
427615_sft_cte_gptoss120b_bird_train_fk_15720 | local_bird_7281 | works_cycles | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation 】\n\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this table is relevant to the question or ... | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation 】\n\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this table is relevant to the question or ... | [
{
"role": "assistant",
"reasoning_content": "",
"content": "The tables ['Culture', 'ProductDescription', 'ProductModel', 'ProductModelProductDescriptionCulture'] are not have any relevant information to answer the question `What is the highest profit on net for a product?`. So we can drop all these tab... |
62441_sft_cte_qwen25_spider_train_1364 | local_spider_589 | store_1 | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation】\nYou are an experienced database expert.\nYou have two tasks.\n1. Decide whether this table is relevant to the question or not and write in json format include all columns you think is needed to answer the question.\n2. Generate a CTE... | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation】\nYou are an experienced database expert.\nYou have two tasks.\n1. Decide whether this table is relevant to the question or not and write in json format include all columns you think is needed to answer the question.\n2. Generate a CTE... | [
{
"role": "assistant",
"reasoning_content": "You are correct. The JSON and CTE must be consistent regarding the columns included. If the CTE selects specific columns, the JSON should reflect those columns as well. \n\nSince the CTE query filters based on `first_name` and `last_name`, these columns should be... |
13711_sft_cte_glm5_spider_train_fk_2857 | local_spider_3416 | hr_1 | [
{
"role": "user",
"content": "【CTE (Common Table Expression) generation】\n\nYou have two tasks.\n1. Decide whether this table is relevant to the question or not and write in json format include all columns you think is needed to answer the question.\n2. Generate a CTE (Common Table Expression) query to prov... | [
{
"role": "user",
"content": "【CTE (Common Table Expression) generation】\n\nYou have two tasks.\n1. Decide whether this table is relevant to the question or not and write in json format include all columns you think is needed to answer the question.\n2. Generate a CTE (Common Table Expression) query to prov... | [
{
"role": "assistant",
"reasoning_content": "We need to produce CTE query and JSON answer.\n\nGiven schema hr_1 with tables: departments, job_history, jobs, employees.\n\nQuestion: \"when is the hire date for those employees whose first name does not containing the letter M?\" So we need hire date of employ... |
289675_sft_cte_gptoss120b_bird_train_one_48263 | local_bird_7576 | image_and_language | [
{
"role": "user",
"content": "【CTE (Common Table Expression) generation 】\nYou are an experienced database expert.\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this... | [
{
"role": "user",
"content": "【CTE (Common Table Expression) generation 】\nYou are an experienced database expert.\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this... | [
{
"role": "assistant",
"reasoning_content": "",
"content": "JSON Response: \n```json\n{\"ATT_CLASSES\": [\"ATT_CLASS_ID\", \"ATT_CLASS\"]}\n```\nCTE Query: \n```cte\nWITH sparse_attribute_cte AS (SELECT \"ATT_CLASS_ID\", \"ATT_CLASS\" FROM \"ATT_CLASSES\" WHERE \"ATT_CLASS\" = 'sparse' ) \n```\n"
}
] |
325364_sft_cte_llama33_spider_train_25885 | local_spider_6972 | culture_company | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation】\nYou are an experienced database expert.\nYou have two tasks.\n1. Decide whether this table is relevant to the question or not and write in json format include all columns you think is needed to answer the question.\n2. Generate a CTE... | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation】\nYou are an experienced database expert.\nYou have two tasks.\n1. Decide whether this table is relevant to the question or not and write in json format include all columns you think is needed to answer the question.\n2. Generate a CTE... | [
{
"role": "assistant",
"reasoning_content": "To answer the question, we first need to identify the relevant tables and columns in the provided schema. The question asks for the number of books for each publisher. However, the provided schema only includes a table named `culture_company` which does not direc... |
234313_sft_cte_llama33_bird_train_7449 | local_bird_1586 | car_retails | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation 】\n\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query in ```cte block to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this table is relevant to ... | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation 】\n\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query in ```cte block to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this table is relevant to ... | [
{
"role": "assistant",
"reasoning_content": "",
"content": "The tables ['customers'] are not have any relevant information to answer the question `List the product code of the top five motorcycles, by descending order, the number of quantity in stock.`. So we can drop all these tables. Because no relev... |
516173_sft_cte_gptoss120b_spider_train_one_23860 | local_spider_6233 | ship_1 | [
{
"role": "user",
"content": "【CTE (Common Table Expression) generation 】\nYou are an experienced database expert.\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this... | [
{
"role": "user",
"content": "【CTE (Common Table Expression) generation 】\nYou are an experienced database expert.\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this... | [
{
"role": "assistant",
"reasoning_content": "We need to decide if the table captain is relevant. It contains Class column. We need classes with >2 captains. The table alone can answer: group by Class, count distinct Captain_ID >2. So relevant.\n\nWe need CTE query. Probably just select Class from captain gr... |
250220_sft_cte_gptoss120b_bird_train_one_8808 | local_bird_1835 | soccer_2016 | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation】\nYou are an experienced database expert.\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this... | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation】\nYou are an experienced database expert.\nYou have two tasks.\n1. Generate a CTE (Common Table Expression) query to provide all the necessary information from the provided schema to help to answer the question.\n2. Decide whether this... | [
{
"role": "assistant",
"reasoning_content": "",
"content": "The tables ['City'] are not have any relevant information to answer the question `Who is the player who won the first ever \"man of the match\" award?`. So we can drop all these tables. Because no relevant tables, there are no CTE query genera... |
286904_sft_cte_gptoss120b_bird_train_one_45492 | local_bird_7400 | works_cycles | [
{
"role": "user",
"content": "【CTE (Common Table Expression) generation】\n\nYou have two tasks.\n1. Decide whether this table is relevant to the question or not and write in json format include all columns you think is needed to answer the question.\n2. Generate a CTE (Common Table Expression) query to prov... | [
{
"role": "user",
"content": "【CTE (Common Table Expression) generation】\n\nYou have two tasks.\n1. Decide whether this table is relevant to the question or not and write in json format include all columns you think is needed to answer the question.\n2. Generate a CTE (Common Table Expression) query to prov... | [
{
"role": "assistant",
"reasoning_content": "",
"content": "The tables ['BillOfMaterials'] are not have any relevant information to answer the question `Which seasonal discount had the highest discount percentage?`. So we can drop all these tables. Because no relevant tables, there are no CTE query gen... |
343949_sft_cte_gptoss120b_bird_train_size300_9772 | local_bird_3611 | authors | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation 】\nYou are an experienced database expert. Your task is to generate a CTE (Common Table Expression) query to help answer the question based on the provided database schema and select relevant columns from the schema by generate a json ... | [
{
"role": "user",
"content": "【 CTE (Common Table Expression) generation 】\nYou are an experienced database expert. Your task is to generate a CTE (Common Table Expression) query to help answer the question based on the provided database schema and select relevant columns from the schema by generate a json ... | [
{
"role": "assistant",
"reasoning_content": "",
"content": "We need to address feedback: \"The lacking columns are: Table: Conference - Column: Mathematics of Program Construction ;\". The user says JSON and CTE are inconsistent; missing column is \"Mathematics of Program Construction\". But that's a va... |